@tachybase/client 1.3.19 → 1.3.21
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/Application.mjs +1 -9
- package/es/application/components/index.d.ts +0 -2
- package/es/application/components/index.mjs +0 -2
- package/es/application/schema-initializer/context/index.d.ts +1 -1
- package/es/application/utils/globalDeps.mjs +1 -1
- package/es/block-provider/hooks/index.mjs +1 -1
- package/es/built-in/index.d.ts +2 -1
- package/es/built-in/index.mjs +3 -2
- package/es/collection-manager/Configuration/components/Summary.mjs +3 -3
- package/es/collection-manager/collectionPlugin.mjs +36 -0
- package/es/collection-manager/interfaces/url.d.ts +4 -0
- package/es/collection-manager/interfaces/url.mjs +10 -1
- package/es/collection-manager/templates/sql.d.ts +3 -3
- package/es/collection-manager/templates/view.d.ts +3 -3
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +1 -15
- package/es/flag-provider/FlagProvider.d.ts +1 -0
- package/es/flag-provider/hooks/useFlag.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +1 -4
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +14 -2
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +1 -3
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +0 -4
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +0 -4
- package/es/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.mjs +95 -5
- package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.d.ts +2 -0
- package/es/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.mjs +99 -0
- package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.d.ts +2 -0
- package/es/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.mjs +64 -0
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +15 -2
- package/es/modules/fields/component/Select/selectComponentFieldSettings.mjs +26 -7
- package/es/schema-component/antd/association-field/InternalViewer.mjs +4 -58
- package/es/schema-component/antd/association-field/hooks.d.ts +4 -0
- package/es/schema-component/antd/association-field/hooks.mjs +52 -1
- package/es/schema-component/antd/color-select/ColorSelect.mjs +3 -3
- package/es/schema-component/antd/date-picker/util.d.ts +13 -0
- package/es/schema-component/antd/date-picker/util.mjs +14 -1
- package/es/schema-component/antd/input/Input.mjs +2 -1
- package/es/schema-component/antd/input/ReadPretty.d.ts +1 -0
- package/es/schema-component/antd/input/ReadPretty.mjs +29 -1
- package/es/schema-component/antd/markdown/Markdown.mjs +4 -4
- package/es/schema-component/antd/page/Page.Settings.mjs +0 -33
- package/es/schema-component/antd/page/Page.mjs +46 -95
- package/es/schema-component/antd/page/hooks/index.d.ts +1 -1
- package/es/schema-component/antd/page/hooks/index.mjs +1 -1
- package/es/schema-component/antd/page/index.d.ts +1 -0
- package/es/schema-component/antd/page/index.mjs +1 -0
- package/es/schema-component/antd/page/pageExtendComponentProvider.d.ts +3 -0
- package/es/schema-component/antd/page/pageExtendComponentProvider.mjs +9 -0
- package/es/schema-component/antd/page/style.d.ts +0 -5
- package/es/schema-component/antd/page/style.mjs +1 -45
- package/es/schema-component/antd/password/utils.d.ts +1 -1
- package/es/schema-component/antd/select/FormulaSelect.mjs +16 -4
- package/es/schema-component/antd/select/ReadPretty.mjs +16 -3
- package/es/schema-component/antd/select/Select.mjs +6 -1
- package/es/schema-component/hooks/useFieldModeOptions.mjs +13 -10
- package/es/schema-settings/EditFormulaTitleField.mjs +19 -1
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +3 -2
- package/es/schema-settings/SchemaSettingsPlugin.mjs +4 -0
- package/es/schema-settings/VariableInput/hooks/index.d.ts +1 -0
- package/es/schema-settings/VariableInput/hooks/index.mjs +1 -0
- package/es/schema-settings/VariableInput/hooks/useExactDateVariable.d.ts +93 -0
- package/es/schema-settings/VariableInput/hooks/useExactDateVariable.mjs +75 -0
- package/es/schema-settings/VariableInput/hooks/useVariableOptions.mjs +11 -1
- package/es/user/ChangePassword.mjs +109 -6
- package/es/user/index.d.ts +1 -0
- package/es/user/index.mjs +2 -0
- package/es/variables/hooks/useBuiltinVariables.mjs +8 -2
- package/lib/application/Application.js +0 -8
- package/lib/application/components/index.js +0 -18
- package/lib/block-provider/hooks/index.js +5 -5
- package/lib/built-in/acl/Configuration/MenuItemsProvider.js +2 -2
- package/lib/built-in/attachment-preview/previewers/file-sheet.js +2 -2
- package/lib/built-in/index.js +30 -4
- package/lib/built-in/pm/index.js +1 -1
- package/lib/collection-manager/Configuration/components/Summary.js +3 -3
- package/lib/collection-manager/collectionPlugin.js +36 -0
- package/lib/collection-manager/index.js +17 -17
- package/lib/collection-manager/interfaces/url.js +10 -1
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +1 -15
- package/lib/flag-provider/hooks/useFlag.js +1 -1
- package/lib/icon/Icon.js +2 -2
- package/lib/locale/zh-CN.js +6 -0
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +0 -3
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +14 -2
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +1 -3
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +0 -4
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +0 -4
- package/lib/modules/fields/component/CustomTitle/customTitleComponentFieldSettings.js +93 -3
- package/lib/modules/fields/component/InputPreview/inputPreviewComponentFieldSettings.js +133 -0
- package/lib/modules/fields/component/MultipleSelect/multipleSelectComponentFieldSettings.js +98 -0
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +16 -3
- package/lib/modules/fields/component/Select/selectComponentFieldSettings.js +23 -4
- package/lib/schema-component/antd/action/Action.Container.js +2 -2
- package/lib/schema-component/antd/action/Action.Modal.js +2 -2
- package/lib/schema-component/antd/action/Action.Sheet.js +2 -2
- package/lib/schema-component/antd/association-field/InternalViewer.js +1 -55
- package/lib/schema-component/antd/association-field/hooks.js +54 -0
- package/lib/schema-component/antd/color-select/ColorSelect.js +4 -4
- package/lib/schema-component/antd/date-picker/util.js +16 -0
- package/lib/schema-component/antd/form-tab/index.js +2 -2
- package/lib/schema-component/antd/form-v2/index.js +2 -2
- package/lib/schema-component/antd/input/Input.js +2 -1
- package/lib/schema-component/antd/input/ReadPretty.js +28 -0
- package/lib/schema-component/antd/markdown/Markdown.js +5 -5
- package/lib/schema-component/antd/page/Page.Settings.js +0 -33
- package/lib/schema-component/antd/page/Page.js +41 -90
- package/lib/schema-component/antd/page/hooks/index.js +5 -5
- package/lib/schema-component/antd/page/index.js +9 -0
- package/lib/{application/components/ShareSchemaComponent.js → schema-component/antd/page/pageExtendComponentProvider.js} +15 -10
- package/lib/schema-component/antd/page/style.js +2 -49
- package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -2
- package/lib/schema-component/antd/select/FormulaSelect.js +16 -4
- package/lib/schema-component/antd/select/ReadPretty.js +15 -2
- package/lib/schema-component/antd/select/Select.js +6 -1
- package/lib/schema-component/antd/table-v2/index.js +3 -3
- package/lib/schema-component/antd/upload/shared.js +4 -4
- package/lib/schema-component/hooks/useFieldModeOptions.js +13 -10
- package/lib/schema-settings/EditFormulaTitleField.js +19 -1
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +3 -2
- package/lib/schema-settings/SchemaSettingsPlugin.js +4 -0
- package/lib/schema-settings/VariableInput/hooks/index.js +9 -0
- package/lib/schema-settings/VariableInput/hooks/useExactDateVariable.js +112 -0
- package/lib/schema-settings/VariableInput/hooks/useVariableOptions.js +11 -1
- package/lib/user/ChangePassword.js +118 -5
- package/lib/user/index.js +24 -4
- package/lib/variables/VariablesProvider.js +2 -2
- package/lib/variables/hooks/useBuiltinVariables.js +7 -1
- package/package.json +10 -10
- package/es/application/components/SharePage.d.ts +0 -4
- package/es/application/components/SharePage.mjs +0 -113
- package/es/application/components/ShareSchemaComponent.d.ts +0 -1
- package/es/application/components/ShareSchemaComponent.mjs +0 -10
- package/es/schema-component/antd/page/hooks/useShareActions.d.ts +0 -7
- package/es/schema-component/antd/page/hooks/useShareActions.mjs +0 -242
- package/lib/application/components/SharePage.js +0 -156
- package/lib/schema-component/antd/page/hooks/useShareActions.js +0 -286
|
@@ -38,6 +38,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
38
38
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
39
39
|
require("react");
|
|
40
40
|
const components_namespaceObject = require("@tachybase/components");
|
|
41
|
+
const schema_namespaceObject = require("@tachybase/schema");
|
|
41
42
|
const css_namespaceObject = require("@emotion/css");
|
|
42
43
|
const external_antd_namespaceObject = require("antd");
|
|
43
44
|
const external_classnames_namespaceObject = require("classnames");
|
|
@@ -189,11 +190,38 @@ const _JSON = (props)=>{
|
|
|
189
190
|
children: null != props.value ? JSON.stringify(props.value, null, null != (_props_space = props.space) ? _props_space : 2) : ''
|
|
190
191
|
});
|
|
191
192
|
};
|
|
193
|
+
const sizes = {
|
|
194
|
+
small: 24,
|
|
195
|
+
middle: 48,
|
|
196
|
+
large: 72,
|
|
197
|
+
oversized: 120
|
|
198
|
+
};
|
|
199
|
+
const _Preview = (props)=>{
|
|
200
|
+
var _fieldSchema_xcomponentprops, _fieldSchema_xcomponentprops1;
|
|
201
|
+
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
202
|
+
const size = (null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops['size']) || 'small';
|
|
203
|
+
const objectFit = (null == (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops1['objectFit']) || 'cover';
|
|
204
|
+
if (!props.value) return props.value;
|
|
205
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Image, {
|
|
206
|
+
style: [
|
|
207
|
+
'small',
|
|
208
|
+
'middle',
|
|
209
|
+
'large',
|
|
210
|
+
'oversized'
|
|
211
|
+
].includes(size) ? {
|
|
212
|
+
width: sizes[size],
|
|
213
|
+
height: sizes[size],
|
|
214
|
+
objectFit
|
|
215
|
+
} : {},
|
|
216
|
+
src: props.value
|
|
217
|
+
});
|
|
218
|
+
};
|
|
192
219
|
ReadPretty.Input = _Input;
|
|
193
220
|
ReadPretty.TextArea = _TextArea;
|
|
194
221
|
ReadPretty.URL = _URL;
|
|
195
222
|
ReadPretty.Html = _Html;
|
|
196
223
|
ReadPretty.JSON = _JSON;
|
|
224
|
+
ReadPretty.Preview = _Preview;
|
|
197
225
|
exports.ReadPretty = __webpack_exports__.ReadPretty;
|
|
198
226
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
199
227
|
"ReadPretty"
|
|
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
Markdown: ()=>
|
|
28
|
-
default: ()=>
|
|
27
|
+
Markdown: ()=>Markdown_Markdown,
|
|
28
|
+
default: ()=>Markdown,
|
|
29
29
|
MarkdownReadPretty: ()=>MarkdownReadPretty
|
|
30
30
|
});
|
|
31
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
@@ -38,7 +38,7 @@ const external_input_index_js_namespaceObject = require("../input/index.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");
|
|
41
|
-
const
|
|
41
|
+
const Markdown_Markdown = (0, schema_namespaceObject.connect)(external_antd_namespaceObject.Input.TextArea, (0, schema_namespaceObject.mapProps)((props, field)=>({
|
|
42
42
|
autoSize: {
|
|
43
43
|
maxRows: 10,
|
|
44
44
|
minRows: 3
|
|
@@ -71,8 +71,8 @@ const MarkdownReadPretty = (props)=>{
|
|
|
71
71
|
value: value
|
|
72
72
|
}));
|
|
73
73
|
};
|
|
74
|
-
|
|
75
|
-
const
|
|
74
|
+
Markdown_Markdown.Void = external_Markdown_Void_js_namespaceObject.MarkdownVoid;
|
|
75
|
+
const Markdown = Markdown_Markdown;
|
|
76
76
|
exports.Markdown = __webpack_exports__.Markdown;
|
|
77
77
|
exports.MarkdownReadPretty = __webpack_exports__.MarkdownReadPretty;
|
|
78
78
|
exports["default"] = __webpack_exports__["default"];
|
|
@@ -28,7 +28,6 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
28
28
|
});
|
|
29
29
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
30
30
|
const external_react_i18next_namespaceObject = require("react-i18next");
|
|
31
|
-
const external_react_router_namespaceObject = require("react-router");
|
|
32
31
|
const external_index_js_namespaceObject = require("../../index.js");
|
|
33
32
|
const index_js_namespaceObject = require("../../../application/schema-settings/index.js");
|
|
34
33
|
const schema_toolbar_index_js_namespaceObject = require("../../../application/schema-toolbar/index.js");
|
|
@@ -65,38 +64,6 @@ const pageSettings = new index_js_namespaceObject.SchemaSettings({
|
|
|
65
64
|
};
|
|
66
65
|
}
|
|
67
66
|
},
|
|
68
|
-
{
|
|
69
|
-
name: 'enablesharePage',
|
|
70
|
-
type: 'switch',
|
|
71
|
-
useVisible () {
|
|
72
|
-
const isShare = (0, external_react_router_namespaceObject.useMatch)('/share/:name');
|
|
73
|
-
return !isShare;
|
|
74
|
-
},
|
|
75
|
-
useComponentProps () {
|
|
76
|
-
var _fieldSchema_xcomponentprops;
|
|
77
|
-
const { dn } = (0, external_index_js_namespaceObject.useDesignable)();
|
|
78
|
-
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
79
|
-
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
80
|
-
const { title } = (0, schema_toolbar_index_js_namespaceObject.useSchemaToolbar)();
|
|
81
|
-
return {
|
|
82
|
-
title: t('Enable Share page'),
|
|
83
|
-
checked: null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.enableSharePage,
|
|
84
|
-
onChange (v) {
|
|
85
|
-
fieldSchema['x-component-props'] = fieldSchema['x-component-props'] || {};
|
|
86
|
-
fieldSchema['x-component-props']['enableSharePage'] = v;
|
|
87
|
-
if (!fieldSchema.title) fieldSchema.title = title;
|
|
88
|
-
dn.emit('patch', {
|
|
89
|
-
schema: {
|
|
90
|
-
['x-uid']: fieldSchema['x-uid'],
|
|
91
|
-
['x-component-props']: fieldSchema['x-component-props'],
|
|
92
|
-
title: fieldSchema.title
|
|
93
|
-
}
|
|
94
|
-
});
|
|
95
|
-
dn.refresh();
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
},
|
|
100
67
|
{
|
|
101
68
|
name: 'divider',
|
|
102
69
|
type: 'divider',
|
|
@@ -66,7 +66,6 @@ const external_hooks_index_js_namespaceObject = require("../../hooks/index.js");
|
|
|
66
66
|
const external_error_fallback_index_js_namespaceObject = require("../error-fallback/index.js");
|
|
67
67
|
const external_FixedBlock_js_namespaceObject = require("./FixedBlock.js");
|
|
68
68
|
var external_FixedBlock_js_default = /*#__PURE__*/ __webpack_require__.n(external_FixedBlock_js_namespaceObject);
|
|
69
|
-
const useShareActions_js_namespaceObject = require("./hooks/useShareActions.js");
|
|
70
69
|
const external_Page_style_js_namespaceObject = require("./Page.style.js");
|
|
71
70
|
const external_PageDesigner_js_namespaceObject = require("./PageDesigner.js");
|
|
72
71
|
const external_PageTabDesigner_js_namespaceObject = require("./PageTabDesigner.js");
|
|
@@ -128,29 +127,21 @@ const Page = (props)=>{
|
|
|
128
127
|
}));
|
|
129
128
|
};
|
|
130
129
|
const PageHeader = (props)=>{
|
|
131
|
-
var _fieldSchema_xcomponentprops;
|
|
130
|
+
var _fieldSchema_xcomponentprops, _Object_values, _Object_values1;
|
|
132
131
|
const { disablePageHeader, enablePageTabs, setHeight, activeKey, setLoading, setSearchParams, fieldSchema, title, parentProps, enableSharePage } = props;
|
|
133
132
|
const { theme } = (0, theme_index_js_namespaceObject.useGlobalTheme)();
|
|
134
133
|
const options = (0, external_react_namespaceObject.useContext)(schema_namespaceObject.SchemaOptionsContext);
|
|
135
134
|
const compile = (0, external_hooks_index_js_namespaceObject.useCompile)();
|
|
136
|
-
const [open, setOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
137
|
-
const [imageOpen, setImageOpen] = (0, external_react_namespaceObject.useState)(false);
|
|
138
135
|
const { showScrollArea } = (0, useContextMenu_js_namespaceObject.useContextMenu)();
|
|
139
136
|
const hidePageTitle = null == (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) ? void 0 : _fieldSchema_xcomponentprops.hidePageTitle;
|
|
137
|
+
const extendComponents = fieldSchema['x-extend-components'] || {};
|
|
140
138
|
const pageHeaderTitle = hidePageTitle ? void 0 : fieldSchema.title || compile(title);
|
|
141
|
-
const isShare = (0, external_react_router_dom_namespaceObject.useMatch)('/share/:name');
|
|
142
139
|
const items = fieldSchema.mapProperties((schema)=>({
|
|
143
140
|
key: schema.name,
|
|
144
141
|
label: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabItem, {
|
|
145
142
|
schema: schema
|
|
146
143
|
})
|
|
147
144
|
}));
|
|
148
|
-
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
149
|
-
const { styles } = (0, external_style_js_namespaceObject.useStyles)();
|
|
150
|
-
const { copyLink, imageAction } = (0, useShareActions_js_namespaceObject.useShareActions)({
|
|
151
|
-
title: pageHeaderTitle,
|
|
152
|
-
uid: ''
|
|
153
|
-
});
|
|
154
145
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
155
146
|
ref: (ref)=>{
|
|
156
147
|
setHeight(Math.floor((null == ref ? void 0 : ref.getBoundingClientRect().height) || 0) + 1);
|
|
@@ -162,12 +153,29 @@ const PageHeader = (props)=>{
|
|
|
162
153
|
ghost: false,
|
|
163
154
|
title: pageHeaderTitle || ' ',
|
|
164
155
|
...parentProps,
|
|
165
|
-
extra: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
156
|
+
extra: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
157
|
+
children: [
|
|
158
|
+
null == (_Object_values = Object.values(extendComponents)) ? void 0 : _Object_values.map((item, index)=>{
|
|
159
|
+
const schema = {
|
|
160
|
+
type: 'void',
|
|
161
|
+
name: item.name,
|
|
162
|
+
'x-component': item.component,
|
|
163
|
+
'x-component-props': {}
|
|
164
|
+
};
|
|
165
|
+
const componentProps = {
|
|
166
|
+
...props,
|
|
167
|
+
isExtra: true,
|
|
168
|
+
fieldSchema
|
|
169
|
+
};
|
|
170
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.PageExtendComponentProvider, {
|
|
171
|
+
...componentProps,
|
|
172
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_core_index_js_namespaceObject.SchemaComponent, {
|
|
173
|
+
schema: schema
|
|
174
|
+
})
|
|
175
|
+
});
|
|
176
|
+
}),
|
|
177
|
+
!enablePageTabs && showScrollArea && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.ScrollArea, {})
|
|
178
|
+
]
|
|
171
179
|
}),
|
|
172
180
|
footer: enablePageTabs && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabComponent, {
|
|
173
181
|
activeKey: activeKey,
|
|
@@ -179,84 +187,27 @@ const PageHeader = (props)=>{
|
|
|
179
187
|
items: items
|
|
180
188
|
})
|
|
181
189
|
}),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
width: 500,
|
|
198
|
-
onCancel: ()=>{
|
|
199
|
-
setOpen(false);
|
|
200
|
-
},
|
|
201
|
-
children: [
|
|
202
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
203
|
-
className: styles.secondmodal,
|
|
204
|
-
children: [
|
|
205
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
206
|
-
className: "tb-header-modal-list",
|
|
207
|
-
onClick: copyLink,
|
|
208
|
-
children: [
|
|
209
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icon_index_js_namespaceObject.Icon, {
|
|
210
|
-
type: "PaperClipOutlined"
|
|
211
|
-
}),
|
|
212
|
-
t('Copy link')
|
|
213
|
-
]
|
|
214
|
-
}),
|
|
215
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
216
|
-
className: "tb-header-modal-list",
|
|
217
|
-
onClick: ()=>{
|
|
218
|
-
setImageOpen(true);
|
|
219
|
-
},
|
|
220
|
-
children: [
|
|
221
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icon_index_js_namespaceObject.Icon, {
|
|
222
|
-
type: "QrcodeOutlined"
|
|
223
|
-
}),
|
|
224
|
-
t('Generate QR code')
|
|
225
|
-
]
|
|
226
|
-
})
|
|
227
|
-
]
|
|
228
|
-
}),
|
|
229
|
-
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Modal, {
|
|
230
|
-
className: styles.imageModal,
|
|
231
|
-
open: imageOpen,
|
|
232
|
-
footer: null,
|
|
233
|
-
onCancel: ()=>{
|
|
234
|
-
setImageOpen(false);
|
|
235
|
-
},
|
|
236
|
-
children: imageAction()
|
|
190
|
+
null == (_Object_values1 = Object.values(extendComponents)) ? void 0 : _Object_values1.map((item, index)=>{
|
|
191
|
+
const schema = {
|
|
192
|
+
type: 'void',
|
|
193
|
+
name: 'icon' + item.name,
|
|
194
|
+
'x-component': item.component,
|
|
195
|
+
'x-component-props': {}
|
|
196
|
+
};
|
|
197
|
+
const componentProps = {
|
|
198
|
+
...props,
|
|
199
|
+
fieldSchema
|
|
200
|
+
};
|
|
201
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.PageExtendComponentProvider, {
|
|
202
|
+
...componentProps,
|
|
203
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_core_index_js_namespaceObject.SchemaComponent, {
|
|
204
|
+
schema: schema
|
|
237
205
|
})
|
|
238
|
-
|
|
206
|
+
});
|
|
239
207
|
})
|
|
240
208
|
]
|
|
241
209
|
});
|
|
242
210
|
};
|
|
243
|
-
const HeaderExtra = (param)=>{
|
|
244
|
-
let { enablePageTabs, showScrollArea, isShare, setOpen, enableSharePage } = param;
|
|
245
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(jsx_runtime_namespaceObject.Fragment, {
|
|
246
|
-
children: [
|
|
247
|
-
!isShare && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
248
|
-
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.ShareAltOutlined, {}),
|
|
249
|
-
onClick: ()=>{
|
|
250
|
-
setOpen(true);
|
|
251
|
-
},
|
|
252
|
-
style: {
|
|
253
|
-
visibility: "".concat(enableSharePage ? 'visible' : 'hidden')
|
|
254
|
-
}
|
|
255
|
-
}),
|
|
256
|
-
!enablePageTabs && showScrollArea && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.ScrollArea, {})
|
|
257
|
-
]
|
|
258
|
-
});
|
|
259
|
-
};
|
|
260
211
|
const TabComponent = (props)=>{
|
|
261
212
|
const { activeKey, setLoading, setSearchParams, showScrollArea, options, theme, items } = props;
|
|
262
213
|
const { styles } = (0, external_Page_style_js_namespaceObject.useStyles)();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
"./
|
|
4
|
-
module.exports = require("./
|
|
3
|
+
"./useIsBlockInPage": function(module) {
|
|
4
|
+
module.exports = require("./useIsBlockInPage.js");
|
|
5
5
|
}
|
|
6
6
|
};
|
|
7
7
|
var __webpack_module_cache__ = {};
|
|
@@ -47,10 +47,10 @@ function __webpack_require__(moduleId) {
|
|
|
47
47
|
var __webpack_exports__ = {};
|
|
48
48
|
(()=>{
|
|
49
49
|
__webpack_require__.r(__webpack_exports__);
|
|
50
|
-
var
|
|
50
|
+
var _useIsBlockInPage__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./useIsBlockInPage");
|
|
51
51
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
52
|
-
for(var __WEBPACK_IMPORT_KEY__ in
|
|
53
|
-
return
|
|
52
|
+
for(var __WEBPACK_IMPORT_KEY__ in _useIsBlockInPage__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
53
|
+
return _useIsBlockInPage__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
54
54
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
55
55
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
56
56
|
})();
|
|
@@ -17,6 +17,9 @@ var __webpack_modules__ = {
|
|
|
17
17
|
},
|
|
18
18
|
"./hooks?5620": function(module) {
|
|
19
19
|
module.exports = require("./hooks/index.js");
|
|
20
|
+
},
|
|
21
|
+
"./pageExtendComponentProvider": function(module) {
|
|
22
|
+
module.exports = require("./pageExtendComponentProvider.js");
|
|
20
23
|
}
|
|
21
24
|
};
|
|
22
25
|
var __webpack_module_cache__ = {};
|
|
@@ -98,6 +101,12 @@ var __webpack_exports__ = {};
|
|
|
98
101
|
return _hooks__WEBPACK_IMPORTED_MODULE_5__[key];
|
|
99
102
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
100
103
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
104
|
+
var _pageExtendComponentProvider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("./pageExtendComponentProvider");
|
|
105
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
106
|
+
for(var __WEBPACK_IMPORT_KEY__ in _pageExtendComponentProvider__WEBPACK_IMPORTED_MODULE_6__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
107
|
+
return _pageExtendComponentProvider__WEBPACK_IMPORTED_MODULE_6__[key];
|
|
108
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
109
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
101
110
|
})();
|
|
102
111
|
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
103
112
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -24,20 +24,25 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
27
|
+
usePageExtendComponentContext: ()=>usePageExtendComponentContext,
|
|
28
|
+
PageExtendComponentContext: ()=>PageExtendComponentContext,
|
|
29
|
+
PageExtendComponentProvider: ()=>PageExtendComponentProvider
|
|
28
30
|
});
|
|
29
31
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
uid: params.name
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const PageExtendComponentContext = /*#__PURE__*/ (0, external_react_namespaceObject.createContext)({});
|
|
34
|
+
const PageExtendComponentProvider = (props)=>/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(PageExtendComponentContext.Provider, {
|
|
35
|
+
value: props,
|
|
36
|
+
children: props.children
|
|
36
37
|
});
|
|
37
|
-
|
|
38
|
-
exports.
|
|
38
|
+
const usePageExtendComponentContext = ()=>(0, external_react_namespaceObject.useContext)(PageExtendComponentContext);
|
|
39
|
+
exports.PageExtendComponentContext = __webpack_exports__.PageExtendComponentContext;
|
|
40
|
+
exports.PageExtendComponentProvider = __webpack_exports__.PageExtendComponentProvider;
|
|
41
|
+
exports.usePageExtendComponentContext = __webpack_exports__.usePageExtendComponentContext;
|
|
39
42
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
40
|
-
"
|
|
43
|
+
"PageExtendComponentContext",
|
|
44
|
+
"PageExtendComponentProvider",
|
|
45
|
+
"usePageExtendComponentContext"
|
|
41
46
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
42
47
|
Object.defineProperty(exports, '__esModule', {
|
|
43
48
|
value: true
|
|
@@ -24,46 +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
|
-
getStyles: ()=>getStyles
|
|
28
|
-
useStyles: ()=>useStyles
|
|
27
|
+
getStyles: ()=>getStyles
|
|
29
28
|
});
|
|
30
|
-
const external_antd_style_namespaceObject = require("antd-style");
|
|
31
29
|
const index_js_namespaceObject = require("../__builtins__/index.js");
|
|
32
|
-
function _tagged_template_literal(strings, raw) {
|
|
33
|
-
if (!raw) raw = strings.slice(0);
|
|
34
|
-
return Object.freeze(Object.defineProperties(strings, {
|
|
35
|
-
raw: {
|
|
36
|
-
value: Object.freeze(raw)
|
|
37
|
-
}
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
function _templateObject() {
|
|
41
|
-
const data = _tagged_template_literal([
|
|
42
|
-
"\n .ant-modal-content {\n position: relative;\n overflow: hidden;\n border-radius: 16px;\n &::before,\n &::after {\n content: '';\n position: absolute;\n width: 300px;\n height: 300px;\n background: radial-gradient(circle, rgba(0, 149, 255, 0.11) 0%, transparent 70%);\n z-index: 0;\n pointer-events: none;\n }\n\n &::before {\n top: -165px;\n left: -10px;\n }\n\n &::after {\n bottom: -160px;\n right: -150px;\n }\n .ant-modal-header {\n text-align: center;\n margin-bottom: 20px;\n margin-top: 15px;\n .ant-modal-title {\n font-size: x-large;\n font-weight: 400;\n }\n }\n .ant-modal-body {\n justify-items: center;\n }\n }\n "
|
|
43
|
-
]);
|
|
44
|
-
_templateObject = function() {
|
|
45
|
-
return data;
|
|
46
|
-
};
|
|
47
|
-
return data;
|
|
48
|
-
}
|
|
49
|
-
function _templateObject1() {
|
|
50
|
-
const data = _tagged_template_literal([
|
|
51
|
-
"\n display: flex;\n justify-content: center;\n align-items: center;\n width: 100%;\n margin-top: 20px;\n margin-bottom: 40px;\n position: relative;\n gap: 20%;\n padding-left: 10%;\n padding-right: 10%;\n .tb-header-modal-list {\n width: 50%;\n gap: 10px;\n display: flex;\n flex-direction: column;\n justify-content: center;\n text-align: center;\n border: 1px solid transparent;\n border-color: rgba(203, 227, 254, 0.62);\n box-shadow: none;\n border-radius: 12px;\n padding: 16px;\n transition:\n box-shadow 0.2s ease,\n transform 0.2s ease;\n z-index: 1;\n position: relative;\n &:hover {\n border-color: rgba(0, 120, 255, 0.3);\n box-shadow: 0 4px 16px rgba(0, 120, 255, 0.15);\n }\n &:active {\n box-shadow: none;\n transform: translateY(2px);\n }\n .anticon {\n width: 100%;\n display: flex;\n justify-content: center;\n svg {\n width: 30px;\n height: 30px;\n }\n }\n .tb-header-modal-list-text {\n text-align: center;\n }\n }\n "
|
|
52
|
-
]);
|
|
53
|
-
_templateObject1 = function() {
|
|
54
|
-
return data;
|
|
55
|
-
};
|
|
56
|
-
return data;
|
|
57
|
-
}
|
|
58
|
-
function _templateObject2() {
|
|
59
|
-
const data = _tagged_template_literal([
|
|
60
|
-
"\n display: flex;\n justify-content: center;\n .ant-modal-content {\n width: 280px;\n height: 360px;\n }\n "
|
|
61
|
-
]);
|
|
62
|
-
_templateObject2 = function() {
|
|
63
|
-
return data;
|
|
64
|
-
};
|
|
65
|
-
return data;
|
|
66
|
-
}
|
|
67
30
|
const getStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=>{
|
|
68
31
|
const { componentCls } = token;
|
|
69
32
|
return {
|
|
@@ -208,19 +171,9 @@ const getStyles = (0, index_js_namespaceObject.genStyleHook)('tb-page', (token)=
|
|
|
208
171
|
}
|
|
209
172
|
};
|
|
210
173
|
});
|
|
211
|
-
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
212
|
-
let { css, token } = param;
|
|
213
|
-
return {
|
|
214
|
-
firstmodal: css(_templateObject()),
|
|
215
|
-
secondmodal: css(_templateObject1()),
|
|
216
|
-
imageModal: css(_templateObject2())
|
|
217
|
-
};
|
|
218
|
-
});
|
|
219
174
|
exports.getStyles = __webpack_exports__.getStyles;
|
|
220
|
-
exports.useStyles = __webpack_exports__.useStyles;
|
|
221
175
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
222
|
-
"getStyles"
|
|
223
|
-
"useStyles"
|
|
176
|
+
"getStyles"
|
|
224
177
|
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
225
178
|
Object.defineProperty(exports, '__esModule', {
|
|
226
179
|
value: true
|
|
@@ -24,8 +24,8 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
ScrollArea: ()=>ScrollArea,
|
|
28
|
+
default: ()=>scroll_area_ScrollArea
|
|
29
29
|
});
|
|
30
30
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
31
31
|
const external_react_namespaceObject = require("react");
|
|
@@ -24,7 +24,7 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
default: ()=>
|
|
27
|
+
default: ()=>select_FormulaSelect
|
|
28
28
|
});
|
|
29
29
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
30
30
|
const external_react_namespaceObject = require("react");
|
|
@@ -131,6 +131,7 @@ const useLabelOptions = (others)=>{
|
|
|
131
131
|
const collectionField = (0, external_react_namespaceObject.useMemo)(()=>getField(fieldSchema['x-collection-field']), [
|
|
132
132
|
fieldSchema['x-collection-field']
|
|
133
133
|
]);
|
|
134
|
+
if (!(null == collectionField ? void 0 : collectionField.target) && !fieldSchema['collectionName']) return others;
|
|
134
135
|
const request = {
|
|
135
136
|
resource: (null == collectionField ? void 0 : collectionField.target) || fieldSchema['collectionName'],
|
|
136
137
|
action: 'list',
|
|
@@ -179,16 +180,18 @@ const useLabelOptions = (others)=>{
|
|
|
179
180
|
}
|
|
180
181
|
return others;
|
|
181
182
|
};
|
|
182
|
-
const
|
|
183
|
+
const FormulaSelect = (props)=>{
|
|
183
184
|
const { objectValue, loading, value, rawOptions, defaultValue, ...others } = props;
|
|
184
185
|
let mode = props.multiple ? 'multiple' : props.mode;
|
|
185
186
|
const filterField = null == others ? void 0 : others['params'];
|
|
186
187
|
const [options, setOptions] = (0, external_react_namespaceObject.useState)([]);
|
|
187
188
|
const [collectionName, setCollectionName] = (0, external_react_namespaceObject.useState)('');
|
|
189
|
+
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
188
190
|
const api = (0, index_js_namespaceObject.useAPIClient)();
|
|
189
191
|
if (mode && ![
|
|
190
192
|
'multiple',
|
|
191
|
-
'tags'
|
|
193
|
+
'tags',
|
|
194
|
+
'CustomTitle'
|
|
192
195
|
].includes(mode)) mode = void 0;
|
|
193
196
|
const fieldProps = {
|
|
194
197
|
...others
|
|
@@ -210,6 +213,7 @@ const FormulaSelect_FormulaSelect = (props)=>{
|
|
|
210
213
|
} else if ((null == others ? void 0 : others.collection) === collectionName) fieldProps['options'] = options.map((option)=>({
|
|
211
214
|
...option
|
|
212
215
|
}));
|
|
216
|
+
else fieldProps['options'] = getFormulaValue(props.fieldNames['formula'], (null == props ? void 0 : props.options) || [], fieldSchema);
|
|
213
217
|
const modifiedProps = useLabelOptions(fieldProps);
|
|
214
218
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(ObjectSelect, {
|
|
215
219
|
rawOptions: rawOptions,
|
|
@@ -220,7 +224,15 @@ const FormulaSelect_FormulaSelect = (props)=>{
|
|
|
220
224
|
loading: loading
|
|
221
225
|
});
|
|
222
226
|
};
|
|
223
|
-
const
|
|
227
|
+
const select_FormulaSelect = FormulaSelect;
|
|
228
|
+
const getFormulaValue = (template, options, fieldSchema)=>options.map((item)=>{
|
|
229
|
+
const label = item.label;
|
|
230
|
+
const customLabel = template.replace(new RegExp("{{".concat(fieldSchema['name'], "}}"), 'g'), label);
|
|
231
|
+
return {
|
|
232
|
+
...item,
|
|
233
|
+
label: customLabel
|
|
234
|
+
};
|
|
235
|
+
});
|
|
224
236
|
exports["default"] = __webpack_exports__["default"];
|
|
225
237
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
226
238
|
"default"
|
|
@@ -34,7 +34,7 @@ const CollectionFieldProvider_js_namespaceObject = require("../../../data-source
|
|
|
34
34
|
const EllipsisWithTooltip_js_namespaceObject = require("../input/EllipsisWithTooltip.js");
|
|
35
35
|
const external_utils_js_namespaceObject = require("./utils.js");
|
|
36
36
|
const ReadPretty = (0, schema_namespaceObject.observer)((props)=>{
|
|
37
|
-
var _field_value;
|
|
37
|
+
var _field_value, _fieldSchema_xcomponentprops_fieldNames;
|
|
38
38
|
const fieldNames = {
|
|
39
39
|
...external_utils_js_namespaceObject.defaultFieldNames,
|
|
40
40
|
...props.fieldNames
|
|
@@ -43,8 +43,10 @@ const ReadPretty = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
43
43
|
if (!(0, schema_namespaceObject.isValid)(props.value)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {});
|
|
44
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
45
|
const collectionField = (0, CollectionFieldProvider_js_namespaceObject.useCollectionField)();
|
|
46
|
+
const fieldSchema = (0, schema_namespaceObject.useFieldSchema)();
|
|
46
47
|
const dataSource = field.dataSource || props.options || (null == collectionField ? void 0 : collectionField.uiSchema.enum) || [];
|
|
47
|
-
const
|
|
48
|
+
const options = (0, external_utils_js_namespaceObject.getCurrentOptions)(field.value, dataSource, fieldNames);
|
|
49
|
+
const currentOptions = getFormulaValue(null == (_fieldSchema_xcomponentprops_fieldNames = fieldSchema['x-component-props'].fieldNames) ? void 0 : _fieldSchema_xcomponentprops_fieldNames['formula'], options, fieldSchema);
|
|
48
50
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
49
51
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(EllipsisWithTooltip_js_namespaceObject.EllipsisWithTooltip, {
|
|
50
52
|
ellipsis: props.ellipsis,
|
|
@@ -58,6 +60,17 @@ const ReadPretty = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
58
60
|
}, {
|
|
59
61
|
displayName: 'ReadPretty'
|
|
60
62
|
});
|
|
63
|
+
const getFormulaValue = (template, options, fieldSchema)=>{
|
|
64
|
+
if (!template) return options;
|
|
65
|
+
return options.map((item)=>{
|
|
66
|
+
const label = item.label;
|
|
67
|
+
const customLabel = template.replace(new RegExp("{{".concat(fieldSchema['name'], "}}"), 'g'), label);
|
|
68
|
+
return {
|
|
69
|
+
...item,
|
|
70
|
+
label: customLabel
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
};
|
|
61
74
|
exports.ReadPretty = __webpack_exports__.ReadPretty;
|
|
62
75
|
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
63
76
|
"ReadPretty"
|
|
@@ -120,8 +120,12 @@ const InternalSelect = (0, schema_namespaceObject.connect)((props)=>{
|
|
|
120
120
|
let mode = props.multiple ? 'multiple' : props.mode;
|
|
121
121
|
if (mode && ![
|
|
122
122
|
'multiple',
|
|
123
|
-
'tags'
|
|
123
|
+
'tags',
|
|
124
|
+
'CustomTitle'
|
|
124
125
|
].includes(mode)) mode = void 0;
|
|
126
|
+
let options = props.options ? [
|
|
127
|
+
...props.options
|
|
128
|
+
] : [];
|
|
125
129
|
if ([
|
|
126
130
|
'CustomTitle'
|
|
127
131
|
].includes(props.mode) && ('formula' in others.fieldNames || 'collection' in props)) return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_FormulaSelect_js_default(), {
|
|
@@ -156,6 +160,7 @@ const InternalSelect = (0, schema_namespaceObject.connect)((props)=>{
|
|
|
156
160
|
"aria-label": "icon-close-select"
|
|
157
161
|
})
|
|
158
162
|
},
|
|
163
|
+
options: options,
|
|
159
164
|
popupMatchSelectWidth: false,
|
|
160
165
|
notFoundContent: loading ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Spin, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Empty, {
|
|
161
166
|
image: external_antd_namespaceObject.Empty.PRESENTED_IMAGE_SIMPLE
|
|
@@ -92,8 +92,8 @@ var __webpack_exports__ = {};
|
|
|
92
92
|
var _TableBlockDesigner__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("./TableBlockDesigner");
|
|
93
93
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
94
94
|
for(var __WEBPACK_IMPORT_KEY__ in _TableBlockDesigner__WEBPACK_IMPORTED_MODULE_8__)if ([
|
|
95
|
-
"useColumnSchema",
|
|
96
95
|
"TableV2",
|
|
96
|
+
"useColumnSchema",
|
|
97
97
|
"default"
|
|
98
98
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
99
99
|
return _TableBlockDesigner__WEBPACK_IMPORTED_MODULE_8__[key];
|
|
@@ -102,8 +102,8 @@ var __webpack_exports__ = {};
|
|
|
102
102
|
var _TableField__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("./TableField");
|
|
103
103
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
104
104
|
for(var __WEBPACK_IMPORT_KEY__ in _TableField__WEBPACK_IMPORTED_MODULE_9__)if ([
|
|
105
|
-
"useColumnSchema",
|
|
106
105
|
"TableV2",
|
|
106
|
+
"useColumnSchema",
|
|
107
107
|
"default"
|
|
108
108
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
109
109
|
return _TableField__WEBPACK_IMPORTED_MODULE_9__[key];
|
|
@@ -112,8 +112,8 @@ var __webpack_exports__ = {};
|
|
|
112
112
|
var _TableSelectorDesigner__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__("./TableSelectorDesigner");
|
|
113
113
|
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
114
114
|
for(var __WEBPACK_IMPORT_KEY__ in _TableSelectorDesigner__WEBPACK_IMPORTED_MODULE_10__)if ([
|
|
115
|
-
"useColumnSchema",
|
|
116
115
|
"TableV2",
|
|
116
|
+
"useColumnSchema",
|
|
117
117
|
"default"
|
|
118
118
|
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
119
119
|
return _TableSelectorDesigner__WEBPACK_IMPORTED_MODULE_10__[key];
|