@tachybase/client 0.23.58 → 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 +3 -0
- package/es/application/Application.mjs +11 -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/schema-initializer/context/index.d.ts +1 -1
- package/es/block-provider/hooks/index.d.ts +2 -0
- package/es/block-provider/hooks/index.mjs +25 -21
- 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 +5 -0
- package/es/built-in/page-style/PageStyle.provider.mjs +2 -2
- package/es/collection-manager/templates/sql.d.ts +1 -1
- package/es/collection-manager/templates/view.d.ts +1 -1
- 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 +2 -2
- 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/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 +38 -3
- package/es/schema-component/antd/action/Action.Modal.mjs +0 -1
- package/es/schema-component/antd/action/Action.mjs +1 -3
- package/es/schema-component/antd/association-field/SubTabs/InternalCollapse.mjs +2 -1
- package/es/schema-component/antd/checkbox/Checkbox.mjs +6 -4
- 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.mjs +34 -24
- package/es/schema-component/antd/password/utils.d.ts +1 -1
- 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 +11 -0
- package/lib/application/CustomRouterContextProvider.js +276 -0
- package/lib/application/RouterManager.js +49 -15
- package/lib/application/schema-initializer/hooks/index.js +2 -2
- package/lib/block-provider/hooks/index.js +76 -58
- 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 +5 -0
- package/lib/built-in/page-style/PageStyle.provider.js +2 -2
- 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 +10 -1
- 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 +2 -2
- 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/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 +38 -3
- package/lib/schema-component/antd/action/Action.Modal.js +0 -1
- package/lib/schema-component/antd/action/Action.js +1 -3
- package/lib/schema-component/antd/association-field/SubTabs/InternalCollapse.js +2 -1
- package/lib/schema-component/antd/checkbox/Checkbox.js +6 -4
- 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 +34 -24
- 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
|
@@ -398,19 +398,53 @@ function WorkflowConfig() {
|
|
|
398
398
|
const formAction = null == formBlock ? void 0 : formBlock.type;
|
|
399
399
|
const buttonAction = fieldSchema['x-action'];
|
|
400
400
|
const description = {
|
|
401
|
-
submit: t('Workflow will be triggered before or after submitting succeeded
|
|
401
|
+
submit: t('Workflow will be triggered before or after submitting succeeded.', {
|
|
402
402
|
ns: 'workflow'
|
|
403
403
|
}),
|
|
404
|
-
'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.', {
|
|
405
405
|
ns: 'workflow'
|
|
406
406
|
}),
|
|
407
407
|
'customize:triggerWorkflows': t('Workflow will be triggered directly once the button clicked, without data saving.', {
|
|
408
408
|
ns: 'workflow'
|
|
409
409
|
}),
|
|
410
|
-
destroy: t('Workflow will be triggered before
|
|
410
|
+
destroy: t('Workflow will be triggered before or after submitting succeeded.', {
|
|
411
411
|
ns: 'workflow'
|
|
412
412
|
})
|
|
413
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
|
+
};
|
|
414
448
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(SchemaSettings_js_namespaceObject.SchemaSettingsActionModalItem, {
|
|
415
449
|
title: t('Bind workflows', {
|
|
416
450
|
ns: 'workflow'
|
|
@@ -511,6 +545,7 @@ function WorkflowConfig() {
|
|
|
511
545
|
}
|
|
512
546
|
}
|
|
513
547
|
},
|
|
548
|
+
...orderColumn,
|
|
514
549
|
operations: {
|
|
515
550
|
type: 'void',
|
|
516
551
|
'x-component': 'ArrayTable.Column',
|
|
@@ -105,7 +105,6 @@ const ActionModal = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
105
105
|
if (s['x-component'] === footerNodeName) return s;
|
|
106
106
|
return buf;
|
|
107
107
|
});
|
|
108
|
-
console.log('%c Line:41 🍧 styles.container', 'font-size:18px;color:#e41a6a;background:#7f2b82', styles.container);
|
|
109
108
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Modal, {
|
|
110
109
|
className: external_classnames_default()(others.className, null == modalProps ? void 0 : modalProps.className, styles.container, 'amplifier-block'),
|
|
111
110
|
style: {
|
|
@@ -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();
|
|
@@ -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,13 +80,15 @@ 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
|
|
83
|
+
const [value, setValue] = (0, external_react_namespaceObject.useState)();
|
|
84
84
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Radio.Group, {
|
|
85
85
|
...props,
|
|
86
86
|
onChange: (value)=>{
|
|
87
|
-
if ('null' !== value.target.value) props.onChange(value);
|
|
88
|
-
else
|
|
87
|
+
if ('null' !== value.target.value) props.onChange(value.target.value);
|
|
88
|
+
else props.onChange(null);
|
|
89
|
+
setValue(value.target.value);
|
|
89
90
|
},
|
|
91
|
+
value: props.value || value,
|
|
90
92
|
options: [
|
|
91
93
|
{
|
|
92
94
|
label: t('?'),
|
|
@@ -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
|
+
});
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __webpack_modules__ = {
|
|
3
|
+
"./MediaCard": function(module) {
|
|
4
|
+
module.exports = require("./MediaCard.js");
|
|
5
|
+
}
|
|
6
|
+
};
|
|
7
|
+
var __webpack_module_cache__ = {};
|
|
8
|
+
function __webpack_require__(moduleId) {
|
|
9
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
10
|
+
if (void 0 !== cachedModule) return cachedModule.exports;
|
|
11
|
+
var module = __webpack_module_cache__[moduleId] = {
|
|
12
|
+
exports: {}
|
|
13
|
+
};
|
|
14
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
15
|
+
return module.exports;
|
|
16
|
+
}
|
|
17
|
+
(()=>{
|
|
18
|
+
__webpack_require__.n = function(module) {
|
|
19
|
+
var getter = module && module.__esModule ? function() {
|
|
20
|
+
return module['default'];
|
|
21
|
+
} : function() {
|
|
22
|
+
return module;
|
|
23
|
+
};
|
|
24
|
+
__webpack_require__.d(getter, {
|
|
25
|
+
a: getter
|
|
26
|
+
});
|
|
27
|
+
return getter;
|
|
28
|
+
};
|
|
29
|
+
})();
|
|
30
|
+
(()=>{
|
|
31
|
+
__webpack_require__.d = function(exports1, definition) {
|
|
32
|
+
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: definition[key]
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
(()=>{
|
|
39
|
+
__webpack_require__.o = function(obj, prop) {
|
|
40
|
+
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
41
|
+
};
|
|
42
|
+
})();
|
|
43
|
+
(()=>{
|
|
44
|
+
__webpack_require__.r = function(exports1) {
|
|
45
|
+
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
46
|
+
value: 'Module'
|
|
47
|
+
});
|
|
48
|
+
Object.defineProperty(exports1, '__esModule', {
|
|
49
|
+
value: true
|
|
50
|
+
});
|
|
51
|
+
};
|
|
52
|
+
})();
|
|
53
|
+
var __webpack_exports__ = {};
|
|
54
|
+
__webpack_require__.r(__webpack_exports__);
|
|
55
|
+
var _MediaCard__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./MediaCard");
|
|
56
|
+
var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
57
|
+
for(var __WEBPACK_IMPORT_KEY__ in _MediaCard__WEBPACK_IMPORTED_MODULE_0__)if ("default" !== __WEBPACK_IMPORT_KEY__) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = (function(key) {
|
|
58
|
+
return _MediaCard__WEBPACK_IMPORTED_MODULE_0__[key];
|
|
59
|
+
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
60
|
+
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
61
|
+
var __webpack_export_target__ = exports;
|
|
62
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
63
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
64
|
+
value: true
|
|
65
|
+
});
|
|
@@ -0,0 +1,59 @@
|
|
|
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 display: flex;\n flex-direction: row;\n justify-content: center;\n align-items: center;\n gap: 10px;\n width: fit-content;\n padding: 10px;\n cursor: pointer;\n\n &.layout {\n flex-direction: column;\n }\n :hover {\n border-radius: 10px;\n transform: scale(1.05);\n transition: all 0.3s;\n }\n\n &.need-hover:hover {\n background-color: var(--colorPrimaryText);\n }\n\n .icon-wrapper {\n padding: 20px;\n border-radius: 40%;\n .icon {\n padding: 10px;\n border-radius: 50%;\n background-color: #ffffff;\n font-size: 20px;\n }\n }\n\n .title {\n flex: 1;\n display: inline-block;\n font-size: 16px;\n color: #2f2f2f;\n overflow: hidden;\n }\n "
|
|
43
|
+
]);
|
|
44
|
+
_templateObject = function() {
|
|
45
|
+
return data;
|
|
46
|
+
};
|
|
47
|
+
return data;
|
|
48
|
+
}
|
|
49
|
+
const useStyles = (0, external_antd_style_namespaceObject.createStyles)((param)=>{
|
|
50
|
+
let { css, token } = param;
|
|
51
|
+
return {
|
|
52
|
+
mediaCardStyle: css(_templateObject())
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
var __webpack_export_target__ = exports;
|
|
56
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
57
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
58
|
+
value: true
|
|
59
|
+
});
|
|
@@ -47,6 +47,7 @@ const components_namespaceObject = require("@tachybase/components");
|
|
|
47
47
|
const schema_namespaceObject = require("@tachybase/schema");
|
|
48
48
|
const icons_namespaceObject = require("@ant-design/icons");
|
|
49
49
|
const pro_layout_namespaceObject = require("@ant-design/pro-layout");
|
|
50
|
+
const core_namespaceObject = require("@dnd-kit/core");
|
|
50
51
|
const external_antd_namespaceObject = require("antd");
|
|
51
52
|
const external_antd_style_namespaceObject = require("antd-style");
|
|
52
53
|
const external_classnames_namespaceObject = require("classnames");
|
|
@@ -65,6 +66,7 @@ const useGetAriaLabelOfSchemaInitializer_js_namespaceObject = require("../../../
|
|
|
65
66
|
const theme_index_js_namespaceObject = require("../../../style/theme/index.js");
|
|
66
67
|
const external_common_index_js_namespaceObject = require("../../common/index.js");
|
|
67
68
|
const sortable_item_index_js_namespaceObject = require("../../common/sortable-item/index.js");
|
|
69
|
+
const DragHandlePageTab_js_namespaceObject = require("../../common/sortable-item/DragHandlePageTab.js");
|
|
68
70
|
const external_core_index_js_namespaceObject = require("../../core/index.js");
|
|
69
71
|
const external_hooks_index_js_namespaceObject = require("../../hooks/index.js");
|
|
70
72
|
const external_error_fallback_index_js_namespaceObject = require("../error-fallback/index.js");
|
|
@@ -134,7 +136,7 @@ const PageHeader = (props)=>{
|
|
|
134
136
|
const { theme } = (0, theme_index_js_namespaceObject.useGlobalTheme)();
|
|
135
137
|
const options = (0, external_react_namespaceObject.useContext)(schema_namespaceObject.SchemaOptionsContext);
|
|
136
138
|
const compile = (0, external_hooks_index_js_namespaceObject.useCompile)();
|
|
137
|
-
const {
|
|
139
|
+
const { showScrollArea } = (0, useContextMenu_js_namespaceObject.useContextMenu)();
|
|
138
140
|
const hidePageTitle = null === (_fieldSchema_xcomponentprops = fieldSchema['x-component-props']) || void 0 === _fieldSchema_xcomponentprops ? void 0 : _fieldSchema_xcomponentprops.hidePageTitle;
|
|
139
141
|
const pageHeaderTitle = hidePageTitle ? void 0 : fieldSchema.title || compile(title);
|
|
140
142
|
const items = fieldSchema.mapProperties((schema)=>({
|
|
@@ -153,12 +155,12 @@ const PageHeader = (props)=>{
|
|
|
153
155
|
ghost: false,
|
|
154
156
|
title: pageHeaderTitle || ' ',
|
|
155
157
|
...parentProps,
|
|
156
|
-
extra: !enablePageTabs &&
|
|
158
|
+
extra: !enablePageTabs && showScrollArea && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.ScrollArea, {}),
|
|
157
159
|
footer: enablePageTabs && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabComponent, {
|
|
158
160
|
activeKey: activeKey,
|
|
159
161
|
setLoading: setLoading,
|
|
160
162
|
setSearchParams: setSearchParams,
|
|
161
|
-
|
|
163
|
+
showScrollArea: showScrollArea,
|
|
162
164
|
options: options,
|
|
163
165
|
theme: theme,
|
|
164
166
|
items: items
|
|
@@ -167,9 +169,14 @@ const PageHeader = (props)=>{
|
|
|
167
169
|
});
|
|
168
170
|
};
|
|
169
171
|
const TabComponent = (props)=>{
|
|
170
|
-
const { activeKey, setLoading, setSearchParams,
|
|
172
|
+
const { activeKey, setLoading, setSearchParams, showScrollArea, options, theme, items } = props;
|
|
171
173
|
const { styles } = (0, external_Page_style_js_namespaceObject.useStyles)();
|
|
172
174
|
const [hasMounted, setHasMounted] = (0, external_react_namespaceObject.useState)(false);
|
|
175
|
+
const sensors = (0, core_namespaceObject.useSensors)((0, core_namespaceObject.useSensor)(core_namespaceObject.PointerSensor, {
|
|
176
|
+
activationConstraint: {
|
|
177
|
+
distance: 5
|
|
178
|
+
}
|
|
179
|
+
}));
|
|
173
180
|
const handleTabClick = (activeKey)=>{
|
|
174
181
|
setLoading(true);
|
|
175
182
|
setSearchParams([
|
|
@@ -188,6 +195,7 @@ const TabComponent = (props)=>{
|
|
|
188
195
|
});
|
|
189
196
|
}, []);
|
|
190
197
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_common_index_js_namespaceObject.DndContext, {
|
|
198
|
+
sensors: sensors,
|
|
191
199
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_antd_namespaceObject.Tabs, {
|
|
192
200
|
className: styles.tabComponentClass,
|
|
193
201
|
type: "card",
|
|
@@ -198,7 +206,7 @@ const TabComponent = (props)=>{
|
|
|
198
206
|
onTabClick: handleTabClick,
|
|
199
207
|
tabBarExtraContent: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(TabBarExtraContent, {
|
|
200
208
|
theme: theme,
|
|
201
|
-
|
|
209
|
+
showScrollArea: showScrollArea,
|
|
202
210
|
options: options
|
|
203
211
|
})
|
|
204
212
|
})
|
|
@@ -208,31 +216,33 @@ const TabItem = (props)=>{
|
|
|
208
216
|
const { schema } = props;
|
|
209
217
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
210
218
|
const { styles } = (0, external_Page_style_js_namespaceObject.useStyles)();
|
|
211
|
-
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.
|
|
219
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(sortable_item_index_js_namespaceObject.SortableItem, {
|
|
212
220
|
id: schema.name,
|
|
213
221
|
schema: schema,
|
|
214
222
|
className: external_classnames_default()('tb-action-link', 'designerCss', props.className, styles.tabItemClass),
|
|
215
|
-
children:
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
223
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsxs)(DragHandlePageTab_js_namespaceObject.DragHandlePageTab, {
|
|
224
|
+
children: [
|
|
225
|
+
schema['x-icon'] && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_icon_index_js_namespaceObject.Icon, {
|
|
226
|
+
style: {
|
|
227
|
+
marginRight: 8
|
|
228
|
+
},
|
|
229
|
+
type: schema['x-icon']
|
|
230
|
+
}),
|
|
231
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
232
|
+
children: schema.title || t('Unnamed')
|
|
233
|
+
}),
|
|
234
|
+
/*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
235
|
+
className: "tab-designer-wrapper",
|
|
236
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_PageTabDesigner_js_namespaceObject.PageTabDesigner, {
|
|
237
|
+
schema: schema
|
|
238
|
+
})
|
|
229
239
|
})
|
|
230
|
-
|
|
231
|
-
|
|
240
|
+
]
|
|
241
|
+
})
|
|
232
242
|
});
|
|
233
243
|
};
|
|
234
244
|
const TabBarExtraContent = (props)=>{
|
|
235
|
-
const {
|
|
245
|
+
const { showScrollArea, options, theme } = props;
|
|
236
246
|
const dn = (0, external_hooks_index_js_namespaceObject.useDesignable)();
|
|
237
247
|
const { t } = (0, external_react_i18next_namespaceObject.useTranslation)();
|
|
238
248
|
const { getAriaLabel } = (0, useGetAriaLabelOfSchemaInitializer_js_namespaceObject.useGetAriaLabelOfSchemaInitializer)();
|
|
@@ -265,7 +275,7 @@ const TabBarExtraContent = (props)=>{
|
|
|
265
275
|
icon: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(icons_namespaceObject.PlusOutlined, {}),
|
|
266
276
|
onClick: handleAddTab
|
|
267
277
|
}),
|
|
268
|
-
|
|
278
|
+
showScrollArea && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(external_index_js_namespaceObject.ScrollArea, {
|
|
269
279
|
className: "scroll-area-extra-content"
|
|
270
280
|
})
|
|
271
281
|
]
|
|
@@ -113,13 +113,7 @@ const DndContext = (0, schema_namespaceObject.observer)((props)=>{
|
|
|
113
113
|
dropAnimation: {
|
|
114
114
|
duration: 10,
|
|
115
115
|
easing: 'cubic-bezier(0.18, 0.67, 0.6, 1.22)'
|
|
116
|
-
}
|
|
117
|
-
children: visible && /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("span", {
|
|
118
|
-
style: {
|
|
119
|
-
whiteSpace: 'nowrap'
|
|
120
|
-
},
|
|
121
|
-
children: t('Dragging')
|
|
122
|
-
})
|
|
116
|
+
}
|
|
123
117
|
}),
|
|
124
118
|
props.children
|
|
125
119
|
]
|
|
@@ -0,0 +1,105 @@
|
|
|
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
|
+
DragHandlePageTab: ()=>DragHandlePageTab
|
|
30
|
+
});
|
|
31
|
+
const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
32
|
+
const external_react_namespaceObject = require("react");
|
|
33
|
+
const external_antd_style_namespaceObject = require("antd-style");
|
|
34
|
+
const index_js_namespaceObject = require("../../hooks/index.js");
|
|
35
|
+
const external_DragHandlePageTab_style_js_namespaceObject = require("./DragHandlePageTab.style.js");
|
|
36
|
+
const external_SortableItem_js_namespaceObject = require("./SortableItem.js");
|
|
37
|
+
const DragHandlePageTab = (props)=>{
|
|
38
|
+
const { isSubMenu, children, className: overStyle, isAdminMenu } = props;
|
|
39
|
+
const { draggable } = (0, external_react_namespaceObject.useContext)(external_SortableItem_js_namespaceObject.SortableContext);
|
|
40
|
+
const { designable } = (0, index_js_namespaceObject.useDesignable)();
|
|
41
|
+
const { attributes, listeners, setNodeRef, transform, isDragging } = draggable;
|
|
42
|
+
const { styles } = (0, external_DragHandlePageTab_style_js_namespaceObject.useStyles)();
|
|
43
|
+
const ref = (0, external_react_namespaceObject.useRef)(null);
|
|
44
|
+
const [dimensions, setDimensions] = (0, external_react_namespaceObject.useState)({
|
|
45
|
+
width: 0,
|
|
46
|
+
height: 0
|
|
47
|
+
});
|
|
48
|
+
const [initialPosition, setInitialPosition] = (0, external_react_namespaceObject.useState)({
|
|
49
|
+
x: 0,
|
|
50
|
+
y: 0
|
|
51
|
+
});
|
|
52
|
+
const centerOffset = {
|
|
53
|
+
x: 4 * dimensions.width,
|
|
54
|
+
y: 3 * dimensions.height
|
|
55
|
+
};
|
|
56
|
+
const style = {
|
|
57
|
+
position: isDragging ? 'fixed' : 'static',
|
|
58
|
+
top: isDragging ? initialPosition.y - centerOffset.y : 0,
|
|
59
|
+
left: isDragging ? initialPosition.x - centerOffset.x : 0,
|
|
60
|
+
width: isDragging ? 'max-content' : '100%',
|
|
61
|
+
height: isDragging ? 'max-content' : '100%',
|
|
62
|
+
zIndex: isDragging ? 999 : 'auto',
|
|
63
|
+
pointerEvents: isDragging ? 'none' : 'auto',
|
|
64
|
+
transform: transform ? "translate3d(".concat(transform.x, "px, ").concat(transform.y, "px, 0) scale(").concat(isDragging ? 1.05 : 1, ")") : void 0,
|
|
65
|
+
boxShadow: isDragging ? '0 4px 8px rgba(0, 0, 0, 0.1)' : 'none'
|
|
66
|
+
};
|
|
67
|
+
const handleMouseDown = (event)=>{
|
|
68
|
+
if (ref.current) {
|
|
69
|
+
const { width, height } = ref.current.getBoundingClientRect();
|
|
70
|
+
const { clientX, clientY } = event;
|
|
71
|
+
setDimensions({
|
|
72
|
+
width,
|
|
73
|
+
height
|
|
74
|
+
});
|
|
75
|
+
setInitialPosition({
|
|
76
|
+
x: clientX,
|
|
77
|
+
y: clientY
|
|
78
|
+
});
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
if (!designable) return children;
|
|
82
|
+
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
83
|
+
ref: setNodeRef,
|
|
84
|
+
className: (0, external_antd_style_namespaceObject.cx)(styles.dragHandleMenu, {
|
|
85
|
+
draggable: isDragging,
|
|
86
|
+
leftBorder: isSubMenu && isDragging,
|
|
87
|
+
adminMenu: isAdminMenu && isDragging
|
|
88
|
+
}, overStyle),
|
|
89
|
+
style: style,
|
|
90
|
+
...listeners,
|
|
91
|
+
...attributes,
|
|
92
|
+
role: "none",
|
|
93
|
+
onMouseDown: handleMouseDown,
|
|
94
|
+
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)("div", {
|
|
95
|
+
ref: ref,
|
|
96
|
+
className: 'wrapper',
|
|
97
|
+
children: children
|
|
98
|
+
})
|
|
99
|
+
});
|
|
100
|
+
};
|
|
101
|
+
var __webpack_export_target__ = exports;
|
|
102
|
+
for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
103
|
+
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
104
|
+
value: true
|
|
105
|
+
});
|