@tachybase/client 0.23.48 → 1.0.6
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 +5 -2
- package/es/api-client/APIClient.mjs +93 -49
- package/es/api-client/hooks/useRequest.d.ts +2 -0
- package/es/application/Application.d.ts +6 -0
- package/es/application/Application.mjs +19 -0
- package/es/application/CustomRouterContextProvider.d.ts +54 -0
- package/es/application/CustomRouterContextProvider.mjs +209 -0
- package/es/application/RouterManager.d.ts +8 -3
- package/es/application/RouterManager.mjs +48 -15
- package/es/application/hooks/index.d.ts +1 -0
- package/es/application/hooks/index.mjs +1 -0
- package/es/application/hooks/useGlobalVariable.d.ts +1 -0
- package/es/application/hooks/useGlobalVariable.mjs +18 -0
- package/es/application/schema-initializer/context/index.d.ts +1 -1
- package/es/application/schema-settings/hooks/index.d.ts +1 -1
- package/es/application/schema-settings/hooks/index.mjs +6 -8
- package/es/block-provider/hooks/index.d.ts +2 -0
- package/es/block-provider/hooks/index.mjs +29 -22
- package/es/built-in/context-menu/ContextMenu.provider.mjs +6 -6
- package/es/built-in/context-menu/ContextMenuItemsProps.d.ts +4 -4
- package/es/built-in/context-menu/ContextMenuItemsProps.mjs +6 -6
- package/es/built-in/context-menu/index.mjs +1 -1
- package/es/built-in/context-menu/useContextMenu.d.ts +2 -2
- package/es/built-in/index.mjs +8 -0
- package/es/built-in/locale/LocalePlugin.mjs +5 -1
- package/es/built-in/page-style/PageStyle.provider.mjs +2 -2
- package/es/built-in/system-settings/SystemSettingsProvider.d.ts +2 -3
- package/es/built-in/system-settings/SystemSettingsProvider.mjs +4 -3
- package/es/built-in/system-settings/SystemSettingsShortcut.mjs +11 -8
- package/es/collection-manager/Configuration/AddCollectionAction.mjs +12 -2
- package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.d.ts +2 -0
- package/es/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.mjs +255 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.d.ts +89 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.mjs +96 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.d.ts +3 -0
- package/es/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.mjs +47 -0
- package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.d.ts +3 -0
- package/es/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.mjs +44 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.mjs +380 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.d.ts +8 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.mjs +4 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxImportAction.mjs +187 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.d.ts +1 -0
- package/es/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.mjs +30 -0
- package/es/collection-manager/collectionPlugin.mjs +3 -1
- package/es/collection-manager/templates/import.mjs +1 -1
- package/es/collection-manager/templates/sql.d.ts +1 -1
- package/es/collection-manager/templates/view.d.ts +1 -1
- package/es/collection-manager/templates/xlsx.d.ts +11 -0
- package/es/collection-manager/templates/xlsx.mjs +19 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.d.ts +1 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterface.mjs +18 -0
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.d.ts +8 -1
- package/es/data-source/collection-field-interface/CollectionFieldInterfaceManager.mjs +20 -0
- package/es/data-source/commonsSettingsItem/fieldComponent.mjs +3 -1
- package/es/data-source/data-source/DataSource.d.ts +1 -1
- package/es/filter-provider/utils.mjs +6 -0
- package/es/i18n/i18n.mjs +7 -12
- package/es/modules/actions/delete/deleteActionSettings.mjs +10 -0
- package/es/modules/blocks/data-blocks/form/FilterItemCustomSettings.mjs +1 -1
- package/es/modules/blocks/data-blocks/form/fieldSettingsFormItem.mjs +9 -4
- package/es/modules/blocks/data-blocks/table/hooks/useTableBlockProps.mjs +6 -4
- package/es/modules/blocks/data-blocks/table/tableBlockSettings.mjs +4 -0
- package/es/modules/blocks/data-blocks/table/tableColumnSettings.mjs +44 -0
- package/es/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.mjs +4 -0
- package/es/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.mjs +9 -0
- package/es/modules/fields/component/Radio/radioComponentFieldSettings.mjs +0 -4
- package/es/modules/fields/component/SubTable/secondLevelSelect.d.ts +11 -0
- package/es/modules/fields/component/SubTable/secondLevelSelect.mjs +102 -0
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.d.ts +79 -41
- package/es/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.mjs +103 -100
- package/es/powered-by/index.mjs +4 -7
- package/es/schema-component/antd/action/Action.Designer.mjs +43 -5
- package/es/schema-component/antd/action/Action.Modal.mjs +19 -31
- package/es/schema-component/antd/action/Action.Modal.style.d.ts +4 -0
- package/es/schema-component/antd/action/Action.Modal.style.mjs +35 -0
- package/es/schema-component/antd/action/Action.mjs +1 -3
- package/es/schema-component/antd/action/utils.d.ts +1 -1
- package/es/schema-component/antd/action/utils.mjs +70 -70
- package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -1
- package/es/schema-component/antd/checkbox/Checkbox.mjs +9 -2
- package/es/schema-component/antd/index.d.ts +1 -0
- package/es/schema-component/antd/index.mjs +1 -0
- package/es/schema-component/antd/media-card/MediaCard.d.ts +11 -0
- package/es/schema-component/antd/media-card/MediaCard.mjs +35 -0
- package/es/schema-component/antd/media-card/index.d.ts +1 -0
- package/es/schema-component/antd/media-card/index.mjs +1 -0
- package/es/schema-component/antd/media-card/style.d.ts +3 -0
- package/es/schema-component/antd/media-card/style.mjs +25 -0
- package/es/schema-component/antd/page/Page.d.ts +1 -5
- package/es/schema-component/antd/page/Page.mjs +235 -144
- package/es/schema-component/antd/page/Page.style.d.ts +5 -0
- package/es/schema-component/antd/page/Page.style.mjs +45 -0
- package/es/schema-component/antd/page/PageDesigner.d.ts +3 -0
- package/es/schema-component/antd/page/PageDesigner.mjs +28 -0
- package/es/schema-component/antd/page/PageTabDesigner.d.ts +0 -3
- package/es/schema-component/antd/page/PageTabDesigner.mjs +3 -50
- package/es/schema-component/antd/page/style.d.ts +1 -1
- package/es/schema-component/antd/page/style.mjs +3 -13
- package/es/schema-component/antd/password/Password.d.ts +1 -1
- package/es/schema-component/antd/password/utils.d.ts +1 -1
- package/es/schema-component/antd/scroll-area/ScrollArea.d.ts +1 -1
- package/es/schema-component/antd/scroll-area/ScrollArea.mjs +2 -1
- package/es/schema-component/antd/variable/TextArea.mjs +1 -1
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.d.ts +13 -0
- package/es/schema-component/antd/variable/TextAreaWithGlobalScope.mjs +59 -0
- package/es/schema-component/antd/variable/index.d.ts +1 -0
- package/es/schema-component/antd/variable/index.mjs +3 -0
- package/es/schema-component/common/dnd-context/index.mjs +1 -7
- package/es/schema-component/common/sortable-item/DragHandlePageTab.d.ts +1 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.mjs +71 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.d.ts +3 -0
- package/es/schema-component/common/sortable-item/DragHandlePageTab.style.mjs +25 -0
- package/es/schema-items/GeneralSettings.mjs +5 -0
- package/es/schema-settings/EditCustomDefaultValue.mjs +1 -1
- package/es/schema-settings/SchemaSettings.mjs +1 -1
- package/es/schema-settings/SchemaSettingsDefaultValue.mjs +2 -0
- package/es/schema-settings/utils/createModalSettingsItem.d.ts +26 -0
- package/es/schema-settings/utils/createModalSettingsItem.mjs +46 -0
- package/es/schema-settings/utils/createSelectSettingsItem.d.ts +25 -0
- package/es/schema-settings/utils/createSelectSettingsItem.mjs +40 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.d.ts +21 -0
- package/es/schema-settings/utils/createSwitchSettingsItem.mjs +38 -0
- package/es/schema-settings/utils/createTextSettingsItem.d.ts +9 -0
- package/es/schema-settings/utils/createTextSettingsItem.mjs +21 -0
- package/es/schema-settings/utils/index.d.ts +4 -0
- package/es/schema-settings/utils/index.mjs +4 -0
- package/es/schema-settings/utils/util.d.ts +12 -0
- package/es/schema-settings/utils/util.mjs +24 -0
- package/es/user/CurrentUserProvider.mjs +6 -3
- package/lib/api-client/APIClient.js +93 -49
- package/lib/application/Application.js +19 -0
- package/lib/application/CustomRouterContextProvider.js +276 -0
- package/lib/application/RouterManager.js +49 -15
- package/lib/application/hooks/index.js +9 -0
- package/lib/application/hooks/useGlobalVariable.js +52 -0
- package/lib/application/schema-initializer/hooks/index.js +2 -2
- package/lib/application/schema-settings/hooks/index.js +6 -8
- package/lib/block-provider/hooks/index.js +80 -59
- package/lib/built-in/context-menu/ContextMenu.provider.js +6 -6
- package/lib/built-in/context-menu/ContextMenuItemsProps.js +6 -6
- package/lib/built-in/context-menu/index.js +1 -1
- package/lib/built-in/index.js +8 -0
- package/lib/built-in/locale/LocalePlugin.js +5 -1
- package/lib/built-in/page-style/PageStyle.provider.js +2 -2
- package/lib/built-in/system-settings/SystemSettingsProvider.js +4 -3
- package/lib/built-in/system-settings/SystemSettingsShortcut.js +11 -8
- package/lib/collection-manager/Configuration/AddCollectionAction.js +12 -2
- package/lib/collection-manager/Configuration/ImportXlsx/ImportXlsxMetaAction.js +304 -0
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxCollectionSchema.js +130 -0
- package/lib/collection-manager/Configuration/ImportXlsx/XlsxEditFieldAction.js +81 -0
- package/lib/collection-manager/Configuration/ImportXlsx/setUpdateXlsxCollectionField.js +78 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFieldsConfigure.js +414 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxFormValueContextProvider.js +53 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxImportAction.js +235 -0
- package/lib/collection-manager/Configuration/ImportXlsx/xlsxPreviewTable.js +64 -0
- package/lib/collection-manager/collectionPlugin.js +3 -1
- package/lib/collection-manager/templates/import.js +1 -1
- package/lib/collection-manager/templates/xlsx.js +53 -0
- package/lib/data-source/collection-field-interface/CollectionFieldInterface.js +18 -0
- package/lib/data-source/collection-field-interface/CollectionFieldInterfaceManager.js +20 -0
- package/lib/data-source/commonsSettingsItem/fieldComponent.js +3 -1
- package/lib/filter-provider/utils.js +6 -0
- package/lib/i18n/i18n.js +7 -12
- package/lib/locale/en_US.js +1 -0
- package/lib/locale/zh-CN.js +14 -2
- package/lib/modules/actions/delete/deleteActionSettings.js +10 -0
- package/lib/modules/blocks/data-blocks/form/FilterItemCustomSettings.js +1 -1
- package/lib/modules/blocks/data-blocks/form/fieldSettingsFormItem.js +9 -4
- package/lib/modules/blocks/data-blocks/table/hooks/useTableBlockProps.js +6 -4
- package/lib/modules/blocks/data-blocks/table/tableBlockSettings.js +4 -0
- package/lib/modules/blocks/data-blocks/table/tableColumnSettings.js +44 -0
- package/lib/modules/blocks/filter-blocks/collapse/filterCollapseItemFieldSettings.js +4 -0
- package/lib/modules/blocks/filter-blocks/form/filterFormItemFieldSettings.js +9 -0
- package/lib/modules/fields/component/Radio/radioComponentFieldSettings.js +0 -4
- package/lib/modules/fields/component/SubTable/secondLevelSelect.js +136 -0
- package/lib/modules/fields/component/SubTable/subTablePopoverComponentFieldSettings.js +104 -103
- package/lib/powered-by/index.js +4 -7
- package/lib/schema-component/antd/action/Action.Designer.js +43 -5
- package/lib/schema-component/antd/action/Action.Modal.js +19 -31
- package/lib/schema-component/antd/action/Action.Modal.style.js +69 -0
- package/lib/schema-component/antd/action/Action.js +1 -3
- package/lib/schema-component/antd/action/utils.js +70 -70
- package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -1
- package/lib/schema-component/antd/checkbox/Checkbox.js +9 -2
- package/lib/schema-component/antd/index.js +18 -4
- package/lib/schema-component/antd/media-card/MediaCard.js +69 -0
- package/lib/schema-component/antd/media-card/index.js +65 -0
- package/lib/schema-component/antd/media-card/style.js +59 -0
- package/lib/schema-component/antd/page/Page.js +235 -144
- package/lib/schema-component/antd/page/Page.style.js +79 -0
- package/lib/schema-component/antd/page/PageDesigner.js +62 -0
- package/lib/schema-component/antd/page/PageTabDesigner.js +2 -50
- package/lib/schema-component/antd/page/style.js +3 -13
- package/lib/schema-component/antd/scroll-area/ScrollArea.js +2 -1
- package/lib/schema-component/antd/variable/TextArea.js +1 -1
- package/lib/schema-component/antd/variable/TextAreaWithGlobalScope.js +94 -0
- package/lib/schema-component/antd/variable/index.js +13 -1
- package/lib/schema-component/common/dnd-context/index.js +1 -7
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.js +105 -0
- package/lib/schema-component/common/sortable-item/DragHandlePageTab.style.js +59 -0
- package/lib/schema-items/GeneralSettings.js +5 -0
- package/lib/schema-settings/EditCustomDefaultValue.js +1 -1
- package/lib/schema-settings/SchemaSettings.js +1 -1
- package/lib/schema-settings/SchemaSettingsDefaultValue.js +2 -0
- package/lib/schema-settings/utils/createModalSettingsItem.js +94 -0
- package/lib/schema-settings/utils/createSelectSettingsItem.js +88 -0
- package/lib/schema-settings/utils/createSwitchSettingsItem.js +86 -0
- package/lib/schema-settings/utils/createTextSettingsItem.js +55 -0
- package/lib/schema-settings/utils/index.js +92 -0
- package/lib/schema-settings/utils/util.js +74 -0
- package/lib/user/CurrentUserProvider.js +6 -3
- package/package.json +7 -7
|
@@ -251,7 +251,7 @@ function AfterSuccess() {
|
|
|
251
251
|
const openMode = findSchema(ctx.fieldSchema);
|
|
252
252
|
const component = fieldSchema.parent.parent['x-component'];
|
|
253
253
|
const schema = {
|
|
254
|
-
...external_utils_js_namespaceObject.afterSuccessSchema
|
|
254
|
+
...(0, external_utils_js_namespaceObject.afterSuccessSchema)(t)
|
|
255
255
|
};
|
|
256
256
|
if ((!openMode || 'page' === openMode) && component.includes('Form') || !component.includes('Form')) delete schema.properties.popupClose;
|
|
257
257
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaSettings_js_namespaceObject.SchemaSettingsModalItem, {
|
|
@@ -359,7 +359,10 @@ function WorkflowSelectComponent(param) {
|
|
|
359
359
|
'config.collection': noCollection ? void 0 : workflowCollection,
|
|
360
360
|
sync: void 0 === props.filterSync ? void 0 : props.filterSync,
|
|
361
361
|
key: void 0 === props.filterKey ? void 0 : props.filterKey
|
|
362
|
-
}
|
|
362
|
+
},
|
|
363
|
+
sort: [
|
|
364
|
+
'-updatedAt'
|
|
365
|
+
]
|
|
363
366
|
}
|
|
364
367
|
},
|
|
365
368
|
optionFilter: optionFilter,
|
|
@@ -395,19 +398,53 @@ function WorkflowConfig() {
|
|
|
395
398
|
const formAction = null == formBlock ? void 0 : formBlock.type;
|
|
396
399
|
const buttonAction = fieldSchema['x-action'];
|
|
397
400
|
const description = {
|
|
398
|
-
submit: t('Workflow will be triggered before or after submitting succeeded
|
|
401
|
+
submit: t('Workflow will be triggered before or after submitting succeeded.', {
|
|
399
402
|
ns: 'workflow'
|
|
400
403
|
}),
|
|
401
|
-
'customize:save': t('Workflow will be triggered before or after submitting succeeded
|
|
404
|
+
'customize:save': t('Workflow will be triggered before or after submitting succeeded.', {
|
|
402
405
|
ns: 'workflow'
|
|
403
406
|
}),
|
|
404
407
|
'customize:triggerWorkflows': t('Workflow will be triggered directly once the button clicked, without data saving.', {
|
|
405
408
|
ns: 'workflow'
|
|
406
409
|
}),
|
|
407
|
-
destroy: t('Workflow will be triggered before
|
|
410
|
+
destroy: t('Workflow will be triggered before or after submitting succeeded.', {
|
|
408
411
|
ns: 'workflow'
|
|
409
412
|
})
|
|
410
413
|
}[null == fieldSchema ? void 0 : fieldSchema['x-action']];
|
|
414
|
+
let orderColumn = {};
|
|
415
|
+
if ([
|
|
416
|
+
'submit',
|
|
417
|
+
'customize:save',
|
|
418
|
+
'destroy'
|
|
419
|
+
].includes(null == fieldSchema ? void 0 : fieldSchema['x-action'])) orderColumn = {
|
|
420
|
+
order: {
|
|
421
|
+
type: 'void',
|
|
422
|
+
'x-component': 'ArrayTable.Column',
|
|
423
|
+
'x-component-props': {
|
|
424
|
+
title: t('Sequentially', {
|
|
425
|
+
ns: 'workflow'
|
|
426
|
+
})
|
|
427
|
+
},
|
|
428
|
+
properties: {
|
|
429
|
+
order: {
|
|
430
|
+
type: 'string',
|
|
431
|
+
'x-decorator': 'FormItem',
|
|
432
|
+
'x-component': 'Select',
|
|
433
|
+
default: 'after',
|
|
434
|
+
enum: [
|
|
435
|
+
{
|
|
436
|
+
label: t('After'),
|
|
437
|
+
value: 'after'
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
label: t('Before'),
|
|
441
|
+
value: 'before'
|
|
442
|
+
}
|
|
443
|
+
]
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
};
|
|
411
448
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaSettings_js_namespaceObject.SchemaSettingsActionModalItem, {
|
|
412
449
|
title: t('Bind workflows', {
|
|
413
450
|
ns: 'workflow'
|
|
@@ -508,6 +545,7 @@ function WorkflowConfig() {
|
|
|
508
545
|
}
|
|
509
546
|
}
|
|
510
547
|
},
|
|
548
|
+
...orderColumn,
|
|
511
549
|
operations: {
|
|
512
550
|
type: 'void',
|
|
513
551
|
'x-component': 'ArrayTable.Column',
|
|
@@ -49,10 +49,10 @@ const schema_namespaceObject = require("@tachybase/schema");
|
|
|
49
49
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
50
50
|
const css_namespaceObject = require("@emotion/css");
|
|
51
51
|
const external_antd_namespaceObject = require("antd");
|
|
52
|
-
const external_antd_style_namespaceObject = require("antd-style");
|
|
53
52
|
const external_classnames_namespaceObject = require("classnames");
|
|
54
53
|
var external_classnames_default = /*#__PURE__*/ __webpack_require__.n(external_classnames_namespaceObject);
|
|
55
54
|
const external_index_js_namespaceObject = require("./index.js");
|
|
55
|
+
const external_Action_Modal_style_js_namespaceObject = require("./Action.Modal.style.js");
|
|
56
56
|
require("./hooks/useSetAriaLabelForModal.js");
|
|
57
57
|
function _tagged_template_literal(strings, raw) {
|
|
58
58
|
if (!raw) raw = strings.slice(0);
|
|
@@ -64,7 +64,7 @@ function _tagged_template_literal(strings, raw) {
|
|
|
64
64
|
}
|
|
65
65
|
function _templateObject() {
|
|
66
66
|
const data = _tagged_template_literal([
|
|
67
|
-
"\n
|
|
67
|
+
"\n background: none;\n border: none;\n "
|
|
68
68
|
]);
|
|
69
69
|
_templateObject = function() {
|
|
70
70
|
return data;
|
|
@@ -72,29 +72,14 @@ function _templateObject() {
|
|
|
72
72
|
return data;
|
|
73
73
|
}
|
|
74
74
|
function _templateObject1() {
|
|
75
|
-
const data = _tagged_template_literal([
|
|
76
|
-
"\n background: none;\n border: none;\n "
|
|
77
|
-
]);
|
|
78
|
-
_templateObject1 = function() {
|
|
79
|
-
return data;
|
|
80
|
-
};
|
|
81
|
-
return data;
|
|
82
|
-
}
|
|
83
|
-
function _templateObject2() {
|
|
84
75
|
const data = _tagged_template_literal([
|
|
85
76
|
"\n background: none;\n border: none;\n "
|
|
86
77
|
]);
|
|
87
|
-
|
|
78
|
+
_templateObject1 = function() {
|
|
88
79
|
return data;
|
|
89
80
|
};
|
|
90
81
|
return data;
|
|
91
82
|
}
|
|
92
|
-
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
93
|
-
let { css } = param;
|
|
94
|
-
return {
|
|
95
|
-
container: css(_templateObject())
|
|
96
|
-
};
|
|
97
|
-
});
|
|
98
83
|
const openSizeWidthMap = new Map([
|
|
99
84
|
[
|
|
100
85
|
'small',
|
|
@@ -111,7 +96,7 @@ const openSizeWidthMap = new Map([
|
|
|
111
96
|
]);
|
|
112
97
|
const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
|
|
113
98
|
const { footerNodeName = 'Action.Modal.Footer', width, ...others } = props;
|
|
114
|
-
const { styles } = useStyles();
|
|
99
|
+
const { styles } = (0, external_Action_Modal_style_js_namespaceObject.useStyles)();
|
|
115
100
|
const { visible, setVisible, openSize = 'middle', modalProps } = (0, external_index_js_namespaceObject.useActionContext)();
|
|
116
101
|
const actualWidth = null != width ? width : openSizeWidthMap.get(openSize);
|
|
117
102
|
const schema = (0, schema_namespaceObject.useFieldSchema)();
|
|
@@ -121,6 +106,11 @@ const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
121
106
|
return buf;
|
|
122
107
|
});
|
|
123
108
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Modal, {
|
|
109
|
+
className: external_classnames_default()(others.className, null == modalProps ? void 0 : modalProps.className, styles.container, 'amplifier-block'),
|
|
110
|
+
style: {
|
|
111
|
+
...null == modalProps ? void 0 : modalProps.style,
|
|
112
|
+
...null == others ? void 0 : others.style
|
|
113
|
+
},
|
|
124
114
|
width: actualWidth,
|
|
125
115
|
title: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
126
116
|
style: {
|
|
@@ -139,7 +129,7 @@ const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
139
129
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
140
130
|
type: "text",
|
|
141
131
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.CloseOutlined, {}),
|
|
142
|
-
className: (0, css_namespaceObject.css)(
|
|
132
|
+
className: (0, css_namespaceObject.css)(_templateObject()),
|
|
143
133
|
onClick: ()=>setVisible(false, true)
|
|
144
134
|
})
|
|
145
135
|
]
|
|
@@ -148,25 +138,23 @@ const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
148
138
|
}),
|
|
149
139
|
...others,
|
|
150
140
|
...modalProps,
|
|
151
|
-
style: {
|
|
152
|
-
...null == modalProps ? void 0 : modalProps.style,
|
|
153
|
-
...null == others ? void 0 : others.style
|
|
154
|
-
},
|
|
155
141
|
destroyOnClose: true,
|
|
156
142
|
open: visible,
|
|
157
143
|
closable: false,
|
|
158
|
-
className: external_classnames_default()(others.className, null == modalProps ? void 0 : modalProps.className, styles.container, 'amplifier-block'),
|
|
159
144
|
footer: !!footerSchema && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.RecursionField, {
|
|
160
145
|
basePath: field.address,
|
|
161
146
|
schema: schema,
|
|
162
147
|
onlyRenderProperties: true,
|
|
163
148
|
filterProperties: (s)=>s['x-component'] === footerNodeName
|
|
164
149
|
}),
|
|
165
|
-
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
150
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
151
|
+
className: styles.modalClassName,
|
|
152
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(schema_namespaceObject.RecursionField, {
|
|
153
|
+
basePath: field.address,
|
|
154
|
+
schema: schema,
|
|
155
|
+
onlyRenderProperties: true,
|
|
156
|
+
filterProperties: (s)=>s['x-component'] !== footerNodeName
|
|
157
|
+
})
|
|
170
158
|
})
|
|
171
159
|
});
|
|
172
160
|
}, {
|
|
@@ -190,7 +178,7 @@ const Amplifier = ()=>{
|
|
|
190
178
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Button, {
|
|
191
179
|
icon: isAmplifier ? /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.FullscreenExitOutlined, {}) : /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.FullscreenOutlined, {}),
|
|
192
180
|
type: "text",
|
|
193
|
-
className: (0, css_namespaceObject.css)(
|
|
181
|
+
className: (0, css_namespaceObject.css)(_templateObject1()),
|
|
194
182
|
onClick: (e)=>{
|
|
195
183
|
const element = e.target.closest('.ant-modal-content');
|
|
196
184
|
const modal = document.querySelector('.ant-modal');
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(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 = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
useStyles: ()=>useStyles
|
|
30
|
+
});
|
|
31
|
+
const external_antd_style_namespaceObject = require("antd-style");
|
|
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 &.tb-action-popup {\n .ant-modal-header {\n // TODO: theme variables\n margin-top: -20px;\n margin-left: -24px;\n margin-right: -24px;\n padding-top: 20px;\n padding-left: 24px;\n padding-right: 24px;\n padding-bottom: 20px;\n }\n .ant-modal-content {\n background: var(--tb-box-bg);\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 max-height: 80vh;\n overflow: hidden;\n .ant-tabs-content-holder {\n height: 70vh;\n overflow-y: scroll;\n overflow-x: hidden;\n }\n "
|
|
52
|
+
]);
|
|
53
|
+
_templateObject1 = function() {
|
|
54
|
+
return data;
|
|
55
|
+
};
|
|
56
|
+
return data;
|
|
57
|
+
}
|
|
58
|
+
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
59
|
+
let { css } = param;
|
|
60
|
+
return {
|
|
61
|
+
container: css(_templateObject()),
|
|
62
|
+
modalClassName: css(_templateObject1())
|
|
63
|
+
};
|
|
64
|
+
});
|
|
65
|
+
var __webpack_export_target__ = exports;
|
|
66
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
67
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
68
|
+
value: true
|
|
69
|
+
});
|
|
@@ -102,9 +102,7 @@ const Action = (0, withDynamicSchemaProps_js_namespaceObject.withDynamicSchemaPr
|
|
|
102
102
|
const openMode = null == fieldSchema ? void 0 : null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops['openMode'];
|
|
103
103
|
const openSize = null == fieldSchema ? void 0 : null === (_fieldSchema_xcomponentprops1 = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops1 ? void 0 : _fieldSchema_xcomponentprops1['openSize'];
|
|
104
104
|
const disabled = form.disabled || field.disabled || (null === (_field_data = field.data) || void 0 === _field_data ? void 0 : _field_data.disabled) || propsDisabled;
|
|
105
|
-
const linkageRules = (
|
|
106
|
-
fieldSchema
|
|
107
|
-
]);
|
|
105
|
+
const linkageRules = (null == fieldSchema ? void 0 : fieldSchema['x-linkage-rules']) || [];
|
|
108
106
|
const { designable } = (0, external_index_js_namespaceObject.useDesignable)();
|
|
109
107
|
const tarComponent = (0, external_hooks_index_js_namespaceObject.useComponent)(component) || component;
|
|
110
108
|
const { modal } = external_antd_namespaceObject.App.useApp();
|
|
@@ -168,80 +168,80 @@ const linkageAction = async (param)=>{
|
|
|
168
168
|
return null;
|
|
169
169
|
}
|
|
170
170
|
};
|
|
171
|
-
const afterSuccessSchema = {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
171
|
+
const afterSuccessSchema = (t)=>({
|
|
172
|
+
type: 'object',
|
|
173
|
+
title: t('After successful submission'),
|
|
174
|
+
properties: {
|
|
175
|
+
successMessage: {
|
|
176
|
+
title: '{{t("Popup message")}}',
|
|
177
|
+
'x-decorator': 'FormItem',
|
|
178
|
+
'x-component': 'Input.TextArea',
|
|
179
|
+
'x-component-props': {}
|
|
180
|
+
},
|
|
181
|
+
popupClose: {
|
|
182
|
+
title: '{{t("Popup close method")}}',
|
|
183
|
+
enum: [
|
|
184
|
+
{
|
|
185
|
+
label: '{{t("Automatic close")}}',
|
|
186
|
+
value: false
|
|
187
|
+
},
|
|
188
|
+
{
|
|
189
|
+
label: '{{t("Manually close")}}',
|
|
190
|
+
value: true
|
|
191
|
+
}
|
|
192
|
+
],
|
|
193
|
+
'x-decorator': 'FormItem',
|
|
194
|
+
'x-component': 'Radio.Group',
|
|
195
|
+
'x-component-props': {}
|
|
196
|
+
},
|
|
197
|
+
manualClose: {
|
|
198
|
+
title: '{{t("Message clear metchod")}}',
|
|
199
|
+
enum: [
|
|
200
|
+
{
|
|
201
|
+
label: '{{t("Automatic close")}}',
|
|
202
|
+
value: false
|
|
203
|
+
},
|
|
204
|
+
{
|
|
205
|
+
label: '{{t("Manually close")}}',
|
|
206
|
+
value: true
|
|
207
|
+
}
|
|
208
|
+
],
|
|
209
|
+
'x-decorator': 'FormItem',
|
|
210
|
+
'x-component': 'Radio.Group',
|
|
211
|
+
'x-component-props': {}
|
|
212
|
+
},
|
|
213
|
+
redirecting: {
|
|
214
|
+
title: '{{t("Then")}}',
|
|
215
|
+
enum: [
|
|
216
|
+
{
|
|
217
|
+
label: '{{t("Stay on current page")}}',
|
|
218
|
+
value: false
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: '{{t("Redirect to")}}',
|
|
222
|
+
value: true
|
|
223
|
+
}
|
|
224
|
+
],
|
|
225
|
+
'x-decorator': 'FormItem',
|
|
226
|
+
'x-component': 'Radio.Group',
|
|
227
|
+
'x-component-props': {},
|
|
228
|
+
'x-reactions': {
|
|
229
|
+
target: 'redirectTo',
|
|
230
|
+
fulfill: {
|
|
231
|
+
state: {
|
|
232
|
+
visible: '{{!!$self.value}}'
|
|
233
|
+
}
|
|
233
234
|
}
|
|
234
235
|
}
|
|
236
|
+
},
|
|
237
|
+
redirectTo: {
|
|
238
|
+
title: '{{t("Link")}}',
|
|
239
|
+
'x-decorator': 'FormItem',
|
|
240
|
+
'x-component': 'Input',
|
|
241
|
+
'x-component-props': {}
|
|
235
242
|
}
|
|
236
|
-
},
|
|
237
|
-
redirectTo: {
|
|
238
|
-
title: '{{t("Link")}}',
|
|
239
|
-
'x-decorator': 'FormItem',
|
|
240
|
-
'x-component': 'Input',
|
|
241
|
-
'x-component-props': {}
|
|
242
243
|
}
|
|
243
|
-
}
|
|
244
|
-
};
|
|
244
|
+
});
|
|
245
245
|
var __webpack_export_target__ = exports;
|
|
246
246
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
247
247
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -204,6 +204,7 @@ const InternalTabs = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
204
204
|
(0, external_ahooks_namespaceObject.useDeepCompareEffect)(()=>{
|
|
205
205
|
if (!defOptions.length) return;
|
|
206
206
|
const fieldTabs = field.value;
|
|
207
|
+
if (!fieldTabs) return;
|
|
207
208
|
if (quickAddParentField && (null == quickAddParentField ? void 0 : quickAddParentField.value) !== 'none') {
|
|
208
209
|
const filterParantOptions = tabsParantFilterOptions(defOptions, fieldTabs, quickAddField);
|
|
209
210
|
setDefOptions(filterParantOptions);
|
|
@@ -281,7 +282,7 @@ const InternalTabs = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
281
282
|
element.style.color = '#1e1e1e';
|
|
282
283
|
});
|
|
283
284
|
},
|
|
284
|
-
children: item.label
|
|
285
|
+
children: item.label || null
|
|
285
286
|
}, item.id))
|
|
286
287
|
}),
|
|
287
288
|
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
@@ -45,7 +45,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
45
45
|
default: ()=>Checkbox_rslib_entry_
|
|
46
46
|
});
|
|
47
47
|
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
48
|
-
require("react");
|
|
48
|
+
const external_react_namespaceObject = require("react");
|
|
49
49
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
50
50
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
51
51
|
const external_antd_namespaceObject = require("antd");
|
|
@@ -80,12 +80,19 @@ const InternalCheckbox = (0, schema_namespaceObject.connect)((props)=>{
|
|
|
80
80
|
}), (0, schema_namespaceObject.mapReadPretty)(ReadPretty));
|
|
81
81
|
const InternalRadioGroup = (0, schema_namespaceObject.connect)((props)=>{
|
|
82
82
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
83
|
+
const [value, setValue] = (0, external_react_namespaceObject.useState)();
|
|
83
84
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Radio.Group, {
|
|
84
85
|
...props,
|
|
86
|
+
onChange: (value)=>{
|
|
87
|
+
if ('null' !== value.target.value) props.onChange(value.target.value);
|
|
88
|
+
else props.onChange(null);
|
|
89
|
+
setValue(value.target.value);
|
|
90
|
+
},
|
|
91
|
+
value: props.value || value,
|
|
85
92
|
options: [
|
|
86
93
|
{
|
|
87
94
|
label: t('?'),
|
|
88
|
-
value:
|
|
95
|
+
value: 'null'
|
|
89
96
|
},
|
|
90
97
|
{
|
|
91
98
|
label: t('Yes'),
|
|
@@ -102,6 +102,9 @@ var __webpack_modules__ = {
|
|
|
102
102
|
"./markdown?ce72": function(module) {
|
|
103
103
|
module.exports = require("./markdown/index.js");
|
|
104
104
|
},
|
|
105
|
+
"./media-card": function(module) {
|
|
106
|
+
module.exports = require("./media-card/index.js");
|
|
107
|
+
},
|
|
105
108
|
"./menu": function(module) {
|
|
106
109
|
module.exports = require("./menu/index.js");
|
|
107
110
|
},
|
|
@@ -234,10 +237,10 @@ var __webpack_exports__ = {};
|
|
|
234
237
|
__webpack_require__.r(__webpack_exports__);
|
|
235
238
|
__webpack_require__.d(__webpack_exports__, {
|
|
236
239
|
CodeMirror: function() {
|
|
237
|
-
return
|
|
240
|
+
return _tachybase_components__WEBPACK_IMPORTED_MODULE_61__.CodeMirror;
|
|
238
241
|
},
|
|
239
242
|
PageHeader: function() {
|
|
240
|
-
return
|
|
243
|
+
return _ant_design_pro_layout__WEBPACK_IMPORTED_MODULE_60__.PageHeader;
|
|
241
244
|
},
|
|
242
245
|
genStyleHook: function() {
|
|
243
246
|
return _builtins___WEBPACK_IMPORTED_MODULE_2__.genStyleHook;
|
|
@@ -872,8 +875,19 @@ for(var __WEBPACK_IMPORT_KEY__ in _variable__WEBPACK_IMPORTED_MODULE_58__)if ([
|
|
|
872
875
|
return _variable__WEBPACK_IMPORTED_MODULE_58__[key];
|
|
873
876
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
874
877
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
875
|
-
var
|
|
876
|
-
var
|
|
878
|
+
var _media_card__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__("./media-card");
|
|
879
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
880
|
+
for(var __WEBPACK_IMPORT_KEY__ in _media_card__WEBPACK_IMPORTED_MODULE_59__)if ([
|
|
881
|
+
"PageHeader",
|
|
882
|
+
"CodeMirror",
|
|
883
|
+
"genStyleHook",
|
|
884
|
+
"default"
|
|
885
|
+
].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
886
|
+
return _media_card__WEBPACK_IMPORTED_MODULE_59__[key];
|
|
887
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
888
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
889
|
+
var _ant_design_pro_layout__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__("@ant-design/pro-layout");
|
|
890
|
+
var _tachybase_components__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__("@tachybase/components");
|
|
877
891
|
var __webpack_export_target__ = exports;
|
|
878
892
|
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
879
893
|
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_require__ = {};
|
|
3
|
+
(()=>{
|
|
4
|
+
__webpack_require__.d = function(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 = function(obj, prop) {
|
|
13
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
(()=>{
|
|
17
|
+
__webpack_require__.r = function(exports1) {
|
|
18
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
19
|
+
value: 'Module'
|
|
20
|
+
});
|
|
21
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
22
|
+
value: true
|
|
23
|
+
});
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
var __webpack_exports__ = {};
|
|
27
|
+
__webpack_require__.r(__webpack_exports__);
|
|
28
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
29
|
+
MediaCard: ()=>MediaCard
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const external_antd_style_namespaceObject = require("antd-style");
|
|
33
|
+
const index_js_namespaceObject = require("../../../icon/index.js");
|
|
34
|
+
const external_style_js_namespaceObject = require("./style.js");
|
|
35
|
+
const MediaCard = (props)=>{
|
|
36
|
+
const { icon, color, title, layout = 'horizontal', onClick = ()=>{}, className, needHover = true } = props;
|
|
37
|
+
const { styles } = (0, external_style_js_namespaceObject.useStyles)();
|
|
38
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)("div", {
|
|
39
|
+
className: (0, external_antd_style_namespaceObject.cx)(styles.mediaCardStyle, {
|
|
40
|
+
layout: 'vertical' === layout,
|
|
41
|
+
'need-hover': needHover
|
|
42
|
+
}, className),
|
|
43
|
+
onClick: onClick,
|
|
44
|
+
children: [
|
|
45
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
46
|
+
className: "icon-wrapper",
|
|
47
|
+
style: {
|
|
48
|
+
backgroundColor: null != color ? color : '#e5e5e5'
|
|
49
|
+
},
|
|
50
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(index_js_namespaceObject.Icon, {
|
|
51
|
+
className: "icon",
|
|
52
|
+
type: null != icon ? icon : 'AppstoreOutlined',
|
|
53
|
+
style: {
|
|
54
|
+
color: null != color ? color : '#e5e5e5'
|
|
55
|
+
}
|
|
56
|
+
})
|
|
57
|
+
}),
|
|
58
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
59
|
+
className: "title",
|
|
60
|
+
children: title
|
|
61
|
+
})
|
|
62
|
+
]
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
var __webpack_export_target__ = exports;
|
|
66
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
67
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
68
|
+
value: true
|
|
69
|
+
});
|