@luck-design-biz/luckda 1.0.2-2 → 1.0.2-20
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/components/Builder/index.js +13 -10
- package/es/components/ComplexItem/index.js +5 -3
- package/es/components/ComplexItem/service.js +6 -3
- package/es/components/LDActions/index.js +1 -0
- package/es/components/LdAutoForm/index.js +5 -4
- package/es/components/LdCard/index.js +10 -8
- package/es/components/LdCom/index.js +3 -2
- package/es/components/LdFormList/index.js +10 -7
- package/es/components/LdGrid/index.js +11 -12
- package/es/components/LdGridForm/index.js +5 -4
- package/es/helper/FromItems.js +64 -5
- package/es/helper/action.js +2 -0
- package/es/helper/ldBuilder.js +5 -4
- package/es/helper/ldComBuild.js +16 -11
- package/es/locales/zh-CN.js +61 -6
- package/es/lowcode/constants/api-url.js +359 -190
- package/es/lowcode/constants/event-topics.js +4 -0
- package/es/lowcode/constants/index.js +5 -4
- package/es/lowcode/engine/meta/box.props.default.json +1 -1
- package/es/lowcode/engine/meta/box.props.json +1 -1
- package/es/lowcode/engine/meta/cardlist.props.json +3 -5
- package/es/lowcode/engine/meta/components-list.json +6 -0
- package/es/lowcode/engine/meta/dialog.props.default.json +4 -1
- package/es/lowcode/engine/meta/dialog.props.json +24 -4
- package/es/lowcode/engine/meta/drawer.props.json +1 -1
- package/es/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/es/lowcode/engine/meta/fielddate.props.json +48 -1
- package/es/lowcode/engine/meta/fieldeditor.props.json +0 -1
- package/es/lowcode/engine/meta/fieldgroup.props.json +0 -1
- package/es/lowcode/engine/meta/fieldyear.props.json +0 -1
- package/es/lowcode/engine/meta/form.props.json +3 -19
- package/es/lowcode/engine/meta/grouptree.props.json +0 -1
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/es/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/es/lowcode/engine/meta/jsx.props.json +4 -3
- package/es/lowcode/engine/meta/layout.props.default.json +1 -1
- package/es/lowcode/engine/meta/layout.props.json +1 -1
- package/es/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/es/lowcode/engine/meta/proxy.props.json +66 -0
- package/es/lowcode/engine/meta/section.props.json +2 -2
- package/es/lowcode/engine/meta/table.props.json +0 -7
- package/es/lowcode/engine/meta/tabs.props.json +1 -1
- package/es/lowcode/engine/meta/tree.props.json +1 -5
- package/es/lowcode/engine/provider/ContextProvider/index.js +45 -9
- package/es/lowcode/engine/provider/ContextProvider/router.js +21 -1
- package/es/lowcode/engine/provider/ContextProvider/usePageDataStore.js +36 -30
- package/es/lowcode/engine/provider/ContextProvider/usePageVar.js +11 -5
- package/es/lowcode/engine/provider/ContextProvider/useTodo.js +2 -4
- package/es/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/es/lowcode/engine/provider/PageProxyProvider.js +95 -0
- package/es/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/es/lowcode/engine/tools/helper.js +25 -1
- package/es/lowcode/engine/tools/initDS.js +4 -4
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +135 -27
- package/es/lowcode/painter/DesignToolbar.js +102 -188
- package/es/lowcode/painter/History.js +300 -0
- package/es/lowcode/painter/Panel.js +1 -1
- package/es/lowcode/painter/Ribbon.js +37 -1
- package/es/lowcode/painter/components/AdvancePanel.js +55 -51
- package/es/lowcode/painter/components/DragDrop/DragDropContext.js +10 -3
- package/es/lowcode/painter/components/TipIcon.js +12 -4
- package/es/lowcode/painter/components/TreeEditor.js +76 -8
- package/es/lowcode/painter/components/code-editor/BaseEditor.js +10 -6
- package/es/lowcode/painter/components/code-editor/DiffEditor.js +41 -0
- package/es/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/es/lowcode/painter/components/field-setting/SettingUI.js +56 -5
- package/es/lowcode/painter/components/field-setting/index.js +24 -1
- package/es/lowcode/painter/components/shortcut-modal/KeyIcon.js +11 -0
- package/es/lowcode/painter/components/shortcut-modal/index.js +208 -0
- package/es/lowcode/painter/panel-section/BlockEditor/index.js +10 -19
- package/es/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/es/lowcode/painter/panel-section/ConditionCheck.js +70 -0
- package/es/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/es/lowcode/painter/panel-section/DialogSize.js +76 -0
- package/es/lowcode/painter/panel-section/DialogWidthHeight.js +60 -0
- package/es/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +2 -2
- package/es/lowcode/painter/panel-section/JSEditor/ToolBar.js +174 -0
- package/es/lowcode/painter/panel-section/JSEditor/index.js +181 -0
- package/es/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/es/lowcode/painter/panel-section/PageLayoutDisplay.js +7 -2
- package/es/lowcode/painter/panel-section/ProxyLinker.js +137 -0
- package/es/lowcode/painter/panel-section/ProxyParams.js +28 -0
- package/es/lowcode/painter/panel-section/ProxyParamsSetter.js +240 -0
- package/es/lowcode/painter/panel-section/StylePanel/MainPanel.js +37 -26
- package/es/lowcode/painter/style/action-bind-modal.less +1 -1
- package/es/lowcode/painter/style/components.less +1 -1
- package/es/lowcode/painter/style/history.less +46 -0
- package/es/lowcode/painter/style/outline.less +1 -1
- package/es/lowcode/painter/style/panel-item.less +1 -0
- package/es/lowcode/preview/DebugTool.js +78 -0
- package/es/lowcode/preview/DebugToolDetail.js +103 -0
- package/es/lowcode/preview/index.js +10 -17
- package/es/lowcode/preview/useDebugSettings.js +62 -0
- package/es/lowcode/view/Canvas.js +5 -1
- package/es/lowcode/view/ErrorBoundary.js +80 -0
- package/es/lowcode/view/Page.js +11 -6
- package/es/lowcode/view/lc-components/Box/FunctionDesign.js +4 -2
- package/es/lowcode/view/lc-components/Box/index.less +2 -2
- package/es/lowcode/view/lc-components/Box/meta.json +1 -1
- package/es/lowcode/view/lc-components/CardList/index.js +3 -0
- package/es/lowcode/view/lc-components/CardList/meta.json +3 -5
- package/es/lowcode/view/lc-components/Dialog/index.js +13 -5
- package/es/lowcode/view/lc-components/Dialog/meta.json +24 -4
- package/es/lowcode/view/lc-components/Drawer/index.js +5 -3
- package/es/lowcode/view/lc-components/Drawer/meta.json +1 -1
- package/es/lowcode/view/lc-components/FieldDate/meta.json +48 -1
- package/es/lowcode/view/lc-components/FieldEditor/meta.json +0 -1
- package/es/lowcode/view/lc-components/FieldGroup/meta.json +0 -1
- package/es/lowcode/view/lc-components/FieldYear/meta.json +0 -1
- package/es/lowcode/view/lc-components/Form/index.js +15 -19
- package/es/lowcode/view/lc-components/Form/meta.json +3 -19
- package/es/lowcode/view/lc-components/GroupTree/meta.json +0 -1
- package/es/lowcode/view/lc-components/JSX/RuntimeComp.js +32 -16
- package/es/lowcode/view/lc-components/JSX/meta.json +4 -3
- package/es/lowcode/view/lc-components/Layout/meta.json +1 -1
- package/es/lowcode/view/lc-components/PageLayout/index.js +1 -1
- package/es/lowcode/view/lc-components/Proxy/FunctionDesign.js +17 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionLive.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/FunctionPreview.js +23 -0
- package/es/lowcode/view/lc-components/Proxy/index.js +42 -0
- package/es/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/es/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/es/lowcode/view/lc-components/Section/meta.json +2 -2
- package/es/lowcode/view/lc-components/Table/components/TopImex.js +16 -13
- package/es/lowcode/view/lc-components/Table/index.js +11 -3
- package/es/lowcode/view/lc-components/Table/meta.json +0 -7
- package/es/lowcode/view/lc-components/Tabs/index.js +6 -2
- package/es/lowcode/view/lc-components/Tabs/meta.json +1 -1
- package/es/lowcode/view/lc-components/Tree/index.js +3 -0
- package/es/lowcode/view/lc-components/Tree/meta.json +1 -5
- package/es/lowcode/view/lc-components/Wrapper.js +9 -1
- package/es/upload/FilesWall/index.js +16 -6
- package/es/upload/Form/gridForm.js +16 -6
- package/es/upload/FormItem/index.js +16 -4
- package/es/utils/action.js +3 -2
- package/es/utils/form.js +4 -3
- package/es/utils/grid.js +10 -2
- package/lib/components/Builder/index.js +13 -10
- package/lib/components/ComplexItem/index.js +5 -3
- package/lib/components/ComplexItem/service.js +6 -3
- package/lib/components/LDActions/index.js +1 -0
- package/lib/components/LdAutoForm/index.js +3 -2
- package/lib/components/LdCard/index.js +10 -8
- package/lib/components/LdCom/index.js +3 -2
- package/lib/components/LdFormList/index.js +9 -6
- package/lib/components/LdGrid/index.js +11 -12
- package/lib/components/LdGridForm/index.js +3 -2
- package/lib/helper/FromItems.js +64 -5
- package/lib/helper/action.js +2 -0
- package/lib/helper/ldBuilder.js +4 -4
- package/lib/helper/ldComBuild.js +14 -9
- package/lib/locales/zh-CN.js +61 -6
- package/lib/lowcode/constants/api-url.js +360 -190
- package/lib/lowcode/constants/event-topics.js +5 -1
- package/lib/lowcode/constants/index.js +6 -5
- package/lib/lowcode/engine/meta/box.props.default.json +1 -1
- package/lib/lowcode/engine/meta/box.props.json +1 -1
- package/lib/lowcode/engine/meta/cardlist.props.json +3 -5
- package/lib/lowcode/engine/meta/components-list.json +6 -0
- package/lib/lowcode/engine/meta/dialog.props.default.json +4 -1
- package/lib/lowcode/engine/meta/dialog.props.json +24 -4
- package/lib/lowcode/engine/meta/drawer.props.json +1 -1
- package/lib/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +48 -1
- package/lib/lowcode/engine/meta/fieldeditor.props.json +0 -1
- package/lib/lowcode/engine/meta/fieldgroup.props.json +0 -1
- package/lib/lowcode/engine/meta/fieldyear.props.json +0 -1
- package/lib/lowcode/engine/meta/form.props.json +3 -19
- package/lib/lowcode/engine/meta/grouptree.props.json +0 -1
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/lib/lowcode/engine/meta/jsx.props.default.json +1 -2
- package/lib/lowcode/engine/meta/jsx.props.json +4 -3
- package/lib/lowcode/engine/meta/layout.props.default.json +1 -1
- package/lib/lowcode/engine/meta/layout.props.json +1 -1
- package/lib/lowcode/engine/meta/proxy.props.default.json +15 -0
- package/lib/lowcode/engine/meta/proxy.props.json +66 -0
- package/lib/lowcode/engine/meta/section.props.json +2 -2
- package/lib/lowcode/engine/meta/table.props.json +0 -7
- package/lib/lowcode/engine/meta/tabs.props.json +1 -1
- package/lib/lowcode/engine/meta/tree.props.json +1 -5
- package/lib/lowcode/engine/provider/ContextProvider/index.js +50 -13
- package/lib/lowcode/engine/provider/ContextProvider/router.js +22 -1
- package/lib/lowcode/engine/provider/ContextProvider/usePageDataStore.js +37 -31
- package/lib/lowcode/engine/provider/ContextProvider/usePageVar.js +10 -4
- package/lib/lowcode/engine/provider/ContextProvider/useTodo.js +1 -3
- package/lib/lowcode/engine/provider/EventBusProvider.js +14 -4
- package/lib/lowcode/engine/provider/PageProxyProvider.js +103 -0
- package/lib/lowcode/engine/provider/RemoteSourceProvider.js +10 -12
- package/lib/lowcode/engine/tools/helper.js +25 -0
- package/lib/lowcode/engine/tools/initDS.js +4 -4
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +132 -24
- package/lib/lowcode/painter/DesignToolbar.js +98 -184
- package/lib/lowcode/painter/History.js +308 -0
- package/lib/lowcode/painter/Panel.js +1 -1
- package/lib/lowcode/painter/Ribbon.js +37 -1
- package/lib/lowcode/painter/components/AdvancePanel.js +53 -49
- package/lib/lowcode/painter/components/DragDrop/DragDropContext.js +10 -3
- package/lib/lowcode/painter/components/TipIcon.js +12 -4
- package/lib/lowcode/painter/components/TreeEditor.js +76 -8
- package/lib/lowcode/painter/components/code-editor/BaseEditor.js +10 -6
- package/lib/lowcode/painter/components/code-editor/DiffEditor.js +49 -0
- package/lib/lowcode/painter/components/field-setting/FieldAttrs.js +2 -2
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +55 -4
- package/lib/lowcode/painter/components/field-setting/index.js +24 -1
- package/lib/lowcode/painter/components/shortcut-modal/KeyIcon.js +18 -0
- package/lib/lowcode/painter/components/shortcut-modal/index.js +215 -0
- package/lib/lowcode/painter/panel-section/BlockEditor/index.js +9 -18
- package/lib/lowcode/painter/panel-section/BlocksEditor/index.js +4 -1
- package/lib/lowcode/painter/panel-section/ConditionCheck.js +78 -0
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/lib/lowcode/painter/panel-section/DialogSize.js +83 -0
- package/lib/lowcode/painter/panel-section/DialogWidthHeight.js +67 -0
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +2 -2
- package/lib/lowcode/painter/panel-section/JSEditor/ToolBar.js +181 -0
- package/lib/lowcode/painter/panel-section/JSEditor/index.js +189 -0
- package/lib/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- package/lib/lowcode/painter/panel-section/PageLayoutDisplay.js +7 -2
- package/lib/lowcode/painter/panel-section/ProxyLinker.js +145 -0
- package/lib/lowcode/painter/panel-section/ProxyParams.js +35 -0
- package/lib/lowcode/painter/panel-section/ProxyParamsSetter.js +248 -0
- package/lib/lowcode/painter/panel-section/StylePanel/MainPanel.js +37 -26
- package/lib/lowcode/painter/style/action-bind-modal.less +1 -1
- package/lib/lowcode/painter/style/components.less +1 -1
- package/lib/lowcode/painter/style/history.less +46 -0
- package/lib/lowcode/painter/style/outline.less +1 -1
- package/lib/lowcode/painter/style/panel-item.less +1 -0
- package/lib/lowcode/preview/DebugTool.js +86 -0
- package/lib/lowcode/preview/DebugToolDetail.js +111 -0
- package/lib/lowcode/preview/index.js +10 -18
- package/lib/lowcode/preview/useDebugSettings.js +69 -0
- package/lib/lowcode/view/Canvas.js +5 -1
- package/lib/lowcode/view/ErrorBoundary.js +88 -0
- package/lib/lowcode/view/Page.js +12 -7
- package/lib/lowcode/view/lc-components/Box/FunctionDesign.js +4 -2
- package/lib/lowcode/view/lc-components/Box/index.less +2 -2
- package/lib/lowcode/view/lc-components/Box/meta.json +1 -1
- package/lib/lowcode/view/lc-components/CardList/index.js +3 -0
- package/lib/lowcode/view/lc-components/CardList/meta.json +3 -5
- package/lib/lowcode/view/lc-components/Dialog/index.js +11 -3
- package/lib/lowcode/view/lc-components/Dialog/meta.json +24 -4
- package/lib/lowcode/view/lc-components/Drawer/index.js +3 -1
- package/lib/lowcode/view/lc-components/Drawer/meta.json +1 -1
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +48 -1
- package/lib/lowcode/view/lc-components/FieldEditor/meta.json +0 -1
- package/lib/lowcode/view/lc-components/FieldGroup/meta.json +0 -1
- package/lib/lowcode/view/lc-components/FieldYear/meta.json +0 -1
- package/lib/lowcode/view/lc-components/Form/index.js +15 -19
- package/lib/lowcode/view/lc-components/Form/meta.json +3 -19
- package/lib/lowcode/view/lc-components/GroupTree/meta.json +0 -1
- package/lib/lowcode/view/lc-components/JSX/RuntimeComp.js +33 -16
- package/lib/lowcode/view/lc-components/JSX/meta.json +4 -3
- package/lib/lowcode/view/lc-components/Layout/meta.json +1 -1
- package/lib/lowcode/view/lc-components/PageLayout/index.js +1 -1
- package/lib/lowcode/view/lc-components/Proxy/FunctionDesign.js +24 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionLive.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/FunctionPreview.js +30 -0
- package/lib/lowcode/view/lc-components/Proxy/index.js +50 -0
- package/lib/lowcode/view/lc-components/Proxy/index.less +5 -0
- package/lib/lowcode/view/lc-components/Proxy/meta.json +66 -0
- package/lib/lowcode/view/lc-components/Section/meta.json +2 -2
- package/lib/lowcode/view/lc-components/Table/components/TopImex.js +16 -13
- package/lib/lowcode/view/lc-components/Table/index.js +11 -3
- package/lib/lowcode/view/lc-components/Table/meta.json +0 -7
- package/lib/lowcode/view/lc-components/Tabs/index.js +5 -1
- package/lib/lowcode/view/lc-components/Tabs/meta.json +1 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +3 -0
- package/lib/lowcode/view/lc-components/Tree/meta.json +1 -5
- package/lib/lowcode/view/lc-components/Wrapper.js +8 -0
- package/lib/upload/FilesWall/index.js +13 -3
- package/lib/upload/Form/gridForm.js +13 -3
- package/lib/upload/FormItem/index.js +15 -3
- package/lib/utils/action.js +6 -0
- package/lib/utils/form.js +3 -2
- package/lib/utils/grid.js +11 -3
- package/package.json +1 -2
- package/es/lowcode/painter/panel-section/JSEditor.js +0 -49
- package/es/lowcode/view/errorBoundary.js +0 -61
- package/lib/lowcode/painter/panel-section/JSEditor.js +0 -57
- package/lib/lowcode/view/errorBoundary.js +0 -69
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
3
|
var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
|
|
4
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
8
|
exports.default = void 0;
|
|
9
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
10
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
|
|
11
9
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
-
var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
|
|
13
10
|
var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
|
|
14
11
|
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
|
15
12
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
@@ -21,27 +18,51 @@ var _antd = require("luck-design/antd");
|
|
|
21
18
|
var _utils = require("@luck-design-biz/base/utils");
|
|
22
19
|
var _ContextProvider = require("../engine/provider/ContextProvider");
|
|
23
20
|
var _JsonEditor = _interopRequireDefault(require("../painter/components/code-editor/JsonEditor"));
|
|
24
|
-
var _PreviewIframe = _interopRequireDefault(require("./components/PreviewIframe"));
|
|
25
21
|
var _constants = require("../constants");
|
|
26
22
|
var _design = _interopRequireDefault(require("./style/design.less"));
|
|
27
23
|
var _apiUrl = require("../constants/api-url");
|
|
28
24
|
var _helper = require("../engine/tools/helper");
|
|
29
25
|
var _TipIcon = _interopRequireDefault(require("./components/TipIcon"));
|
|
30
|
-
var
|
|
26
|
+
var _shortcutModal = _interopRequireDefault(require("./components/shortcut-modal"));
|
|
31
27
|
var CodeSvg = function CodeSvg() {
|
|
32
28
|
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
33
29
|
width: "18",
|
|
34
30
|
height: "18",
|
|
35
31
|
viewBox: "0 0 18 18",
|
|
36
|
-
fill: "none"
|
|
37
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
32
|
+
fill: "none"
|
|
38
33
|
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
39
34
|
d: "M2.4749 9.0916L5.45264 6.20703L5.45439 5.93457V4.69707L0.91748 9.0916L5.45439 13.4844V12.2469L5.45264 11.9744L2.4749 9.0916ZM15.2067 9.00723L12.229 6.12441L12.2272 5.85195V4.61445L16.7642 9.00723L12.2272 13.4018V12.1625L12.229 11.89L15.2067 9.00723ZM8.12451 15.0295H6.76045L9.55713 2.80566H10.9212L8.12451 15.0295Z",
|
|
40
35
|
fill: "currentColor"
|
|
41
36
|
}));
|
|
42
37
|
};
|
|
38
|
+
var KeyboardSvg = function KeyboardSvg() {
|
|
39
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
40
|
+
fill: "none",
|
|
41
|
+
width: "18",
|
|
42
|
+
height: "18",
|
|
43
|
+
viewBox: "0 0 1024 1024"
|
|
44
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
45
|
+
fill: "currentColor",
|
|
46
|
+
d: "M800 544h-96a32 32 0 0 1 0-64h64v-128a32 32 0 0 1 64 0v160a32 32 0 0 1-32 32zM128 192h768a64 64 0 0 1 64 64v512a64 64 0 0 1-64 64H128a64 64 0 0 1-64-64V256a64 64 0 0 1 64-64z m32 64a32 32 0 0 0-32 32v448a32 32 0 0 0 32 32h704a32 32 0 0 0 32-32V288a32 32 0 0 0-32-32H160z m64 64h64a32 32 0 1 1 0 64H224a32 32 0 1 1 0-64z m192 0h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64z m192 0h64a32 32 0 0 1 0 64h-64a32 32 0 0 1 0-64zM224 480h32a32 32 0 1 1 0 64H224a32 32 0 0 1 0-64z m160 0h32a32 32 0 0 1 0 64h-32a32 32 0 0 1 0-64z m160 0h32a32 32 0 0 1 0 64h-32a32 32 0 0 1 0-64zM224 640h32a32 32 0 0 1 0 64H224a32 32 0 0 1 0-64z m160 0h256a32 32 0 0 1 0 64h-256a32 32 0 0 1 0-64z m384 0h32a32 32 0 0 1 0 64h-32a32 32 0 0 1 0-64z"
|
|
47
|
+
}));
|
|
48
|
+
};
|
|
49
|
+
var clearSvg = function clearSvg() {
|
|
50
|
+
return /*#__PURE__*/_react.default.createElement("svg", {
|
|
51
|
+
fill: "none",
|
|
52
|
+
viewBox: "0 0 1024 1024",
|
|
53
|
+
width: "18",
|
|
54
|
+
height: "18"
|
|
55
|
+
}, /*#__PURE__*/_react.default.createElement("path", {
|
|
56
|
+
d: "M837.818182 915.549091h-131.956364c-12.8 0-23.272727-10.472727-23.272727-23.272727v-58.181819c0-4.189091-8.843636-11.636364-23.272727-11.636363s-23.272727 7.447273-23.272728 11.636363v58.181819c0 12.8-10.472727 23.272727-23.272727 23.272727H465.454545c-12.8 0-23.272727-10.472727-23.272727-23.272727s10.472727-23.272727 23.272727-23.272728h124.043637v-34.909091c0-32.581818 30.72-58.181818 69.818182-58.181818s69.818182 25.6 69.818181 58.181818v34.909091H814.545455v-232.727272H209.454545v232.727272h93.789091c12.8 0 23.272727 10.472727 23.272728 23.272728s-10.472727 23.272727-23.272728 23.272727H186.181818c-12.8 0-23.272727-10.472727-23.272727-23.272727v-279.272728c0-12.8 10.472727-23.272727 23.272727-23.272727h651.636364c12.8 0 23.272727 10.472727 23.272727 23.272727v279.272728c0 12.8-10.472727 23.272727-23.272727 23.272727z",
|
|
57
|
+
fill: "currentColor"
|
|
58
|
+
}), /*#__PURE__*/_react.default.createElement("path", {
|
|
59
|
+
d: "M837.818182 636.276364H186.181818c-12.8 0-23.272727-10.472727-23.272727-23.272728v-69.818181c0-11.403636 8.145455-20.945455 19.316364-22.807273l244.596363-43.054546V124.276364c0-26.065455 23.970909-46.545455 54.225455-46.545455h62.138182c30.487273 0 54.225455 20.48 54.225454 46.545455V477.090909l244.596364 43.054546c11.170909 1.861818 19.316364 11.636364 19.316363 22.807272v69.818182A23.738182 23.738182 0 0 1 837.818182 636.276364z m-628.363637-46.545455h605.09091v-26.996364l-244.596364-43.054545a23.202909 23.202909 0 0 1-19.316364-22.807273V126.138182a13.172364 13.172364 0 0 0-7.68-2.094546h-62.138182c-3.723636 0-6.516364 1.163636-7.68 2.094546v370.269091c0 11.403636-8.145455 20.945455-19.316363 22.807272L209.454545 562.734545v26.996364z",
|
|
60
|
+
fill: "currentColor"
|
|
61
|
+
}));
|
|
62
|
+
};
|
|
43
63
|
var DesignToolbar = function DesignToolbar(_ref) {
|
|
44
|
-
var
|
|
64
|
+
var canvas = _ref.canvas,
|
|
65
|
+
locale = _ref.locale,
|
|
45
66
|
onLangChange = _ref.onLangChange;
|
|
46
67
|
var location = (0, _umi.useLocation)();
|
|
47
68
|
var editorRef = (0, _react.useRef)();
|
|
@@ -61,12 +82,8 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
61
82
|
setShow = _useState6[1];
|
|
62
83
|
var _useState7 = (0, _react.useState)(false),
|
|
63
84
|
_useState8 = (0, _slicedToArray2.default)(_useState7, 2),
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
var _useState9 = (0, _react.useState)([]),
|
|
67
|
-
_useState10 = (0, _slicedToArray2.default)(_useState9, 2),
|
|
68
|
-
userOptions = _useState10[0],
|
|
69
|
-
setUserOptions = _useState10[1];
|
|
85
|
+
showShortcut = _useState8[0],
|
|
86
|
+
setShowShortcut = _useState8[1];
|
|
70
87
|
var _useTemporalStore = (0, _ContextProvider.useTemporalStore)(function (state) {
|
|
71
88
|
return {
|
|
72
89
|
undo: state.undo,
|
|
@@ -79,10 +96,6 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
79
96
|
canRedo = _useTemporalStore.canRedo,
|
|
80
97
|
undo = _useTemporalStore.undo,
|
|
81
98
|
redo = _useTemporalStore.redo;
|
|
82
|
-
var _useCookieState = (0, _ahooks.useCookieState)(_constants.COOKIE_VIRTUAL_ACCOUNT_KEY),
|
|
83
|
-
_useCookieState2 = (0, _slicedToArray2.default)(_useCookieState, 2),
|
|
84
|
-
userId = _useCookieState2[0],
|
|
85
|
-
setUserId = _useCookieState2[1];
|
|
86
99
|
var _useRequest = (0, _ahooks.useRequest)(_apiUrl.fetchClearCache, {
|
|
87
100
|
manual: true
|
|
88
101
|
}),
|
|
@@ -94,20 +107,6 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
94
107
|
}),
|
|
95
108
|
updatePageDataLoading = _useRequest2.loading,
|
|
96
109
|
runAsync = _useRequest2.runAsync;
|
|
97
|
-
(0, _react.useEffect)(function () {
|
|
98
|
-
var topicId = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref2) {
|
|
99
|
-
var _langList = _ref2.langList;
|
|
100
|
-
return setLangList(_langList);
|
|
101
|
-
}).watch();
|
|
102
|
-
return function () {
|
|
103
|
-
return context.$unsubscriber(context.topics.LANG_SETTING_SELECT, topicId);
|
|
104
|
-
};
|
|
105
|
-
}, []);
|
|
106
|
-
(0, _react.useEffect)(function () {
|
|
107
|
-
if (!showPreview) {
|
|
108
|
-
setUserId(void 0);
|
|
109
|
-
}
|
|
110
|
-
}, [showPreview]);
|
|
111
110
|
var handleSave = (0, _ahooks.useMemoizedFn)( /*#__PURE__*/(0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee() {
|
|
112
111
|
var _yield$runAsync, code;
|
|
113
112
|
return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
|
|
@@ -152,6 +151,17 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
152
151
|
}
|
|
153
152
|
}, _callee);
|
|
154
153
|
})), []);
|
|
154
|
+
(0, _react.useEffect)(function () {
|
|
155
|
+
var lssid = context.$subscriber(context.topics.LANG_SETTING_SELECT).on(function (_ref3) {
|
|
156
|
+
var _langList = _ref3.langList;
|
|
157
|
+
setLangList(_langList);
|
|
158
|
+
}).watch();
|
|
159
|
+
var dasid = context.$subscriber(context.topics.DESIGN_OPERATE_SAVE).on(handleSave).watch();
|
|
160
|
+
return function () {
|
|
161
|
+
context.$unsubscriber(context.topics.LANG_SETTING_SELECT, lssid);
|
|
162
|
+
context.$unsubscriber(context.topics.DESIGN_OPERATE_SAVE, dasid);
|
|
163
|
+
};
|
|
164
|
+
}, []);
|
|
155
165
|
var handleClearCache = (0, _ahooks.useMemoizedFn)(function () {
|
|
156
166
|
_antd.Modal.confirm({
|
|
157
167
|
title: (0, _utils.formatMessage)({
|
|
@@ -186,43 +196,6 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
186
196
|
}));
|
|
187
197
|
}
|
|
188
198
|
});
|
|
189
|
-
var _useDebounceFn = (0, _ahooks.useDebounceFn)( /*#__PURE__*/function () {
|
|
190
|
-
var _ref4 = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(value) {
|
|
191
|
-
var _yield$fetchSearchUse, code, list, detail;
|
|
192
|
-
return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
|
|
193
|
-
while (1) switch (_context2.prev = _context2.next) {
|
|
194
|
-
case 0:
|
|
195
|
-
_context2.next = 2;
|
|
196
|
-
return (0, _apiUrl.fetchSearchUser)({
|
|
197
|
-
sname: value
|
|
198
|
-
});
|
|
199
|
-
case 2:
|
|
200
|
-
_yield$fetchSearchUse = _context2.sent;
|
|
201
|
-
code = _yield$fetchSearchUse.code;
|
|
202
|
-
list = _yield$fetchSearchUse.list;
|
|
203
|
-
detail = _yield$fetchSearchUse.detail;
|
|
204
|
-
if (code === 1) {
|
|
205
|
-
setUserOptions(list.map(function (id) {
|
|
206
|
-
var item = detail[id];
|
|
207
|
-
return (0, _objectSpread2.default)((0, _objectSpread2.default)({}, item), {}, {
|
|
208
|
-
key: "".concat(item.indocno),
|
|
209
|
-
label: item.sname
|
|
210
|
-
});
|
|
211
|
-
}));
|
|
212
|
-
}
|
|
213
|
-
case 7:
|
|
214
|
-
case "end":
|
|
215
|
-
return _context2.stop();
|
|
216
|
-
}
|
|
217
|
-
}, _callee2);
|
|
218
|
-
}));
|
|
219
|
-
return function (_x) {
|
|
220
|
-
return _ref4.apply(this, arguments);
|
|
221
|
-
};
|
|
222
|
-
}(), {
|
|
223
|
-
wait: 500
|
|
224
|
-
}),
|
|
225
|
-
handleSearch = _useDebounceFn.run;
|
|
226
199
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
227
200
|
className: _design.default['lc-painter-design-toolbar']
|
|
228
201
|
}, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
@@ -307,18 +280,37 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
307
280
|
label: '页面属性'
|
|
308
281
|
})), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
309
282
|
type: "vertical"
|
|
310
|
-
}), /*#__PURE__*/_react.default.createElement(
|
|
311
|
-
|
|
283
|
+
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
284
|
+
title: (0, _utils.formatMessage)({
|
|
285
|
+
id: 'luckda.lowcode.design.toolbar.shortcut',
|
|
286
|
+
label: '快捷键'
|
|
287
|
+
}),
|
|
288
|
+
component: KeyboardSvg,
|
|
289
|
+
className: _design.default.hoverPrimary,
|
|
312
290
|
style: {
|
|
313
291
|
fontSize: 14,
|
|
314
|
-
margin: '0
|
|
292
|
+
margin: '0 8px 0 6px'
|
|
315
293
|
},
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
294
|
+
onClick: function onClick() {
|
|
295
|
+
return setShowShortcut(true);
|
|
296
|
+
}
|
|
297
|
+
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
298
|
+
title: (0, _utils.formatMessage)({
|
|
299
|
+
id: 'luckda.lowcode.design.toolbar.code',
|
|
300
|
+
label: 'Schema面板'
|
|
301
|
+
}),
|
|
302
|
+
component: CodeSvg,
|
|
303
|
+
className: _design.default.hoverPrimary,
|
|
304
|
+
style: {
|
|
305
|
+
fontSize: 14,
|
|
306
|
+
margin: '0 8px 0 6px'
|
|
307
|
+
},
|
|
308
|
+
onClick: function onClick() {
|
|
309
|
+
if (!updatePageDataLoading) setShow(true);
|
|
310
|
+
}
|
|
311
|
+
}), /*#__PURE__*/_react.default.createElement(_antd.Divider, {
|
|
312
|
+
type: "vertical"
|
|
313
|
+
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
322
314
|
title: (0, _utils.formatMessage)({
|
|
323
315
|
id: 'luckda.lowcode.design.toolbar.debug',
|
|
324
316
|
label: '调试'
|
|
@@ -329,51 +321,34 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
329
321
|
margin: '0 8px 0 6px'
|
|
330
322
|
},
|
|
331
323
|
className: _design.default.hoverPrimary,
|
|
332
|
-
onClick:
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
}
|
|
344
|
-
_context3.next = 4;
|
|
345
|
-
return handleSave();
|
|
346
|
-
case 4:
|
|
347
|
-
context.$publisher(context.topics.COMPONENT_ACTIVE, null);
|
|
348
|
-
setShowPreview(true);
|
|
349
|
-
case 6:
|
|
350
|
-
case "end":
|
|
351
|
-
return _context3.stop();
|
|
324
|
+
onClick: function onClick() {
|
|
325
|
+
if (!updatePageDataLoading) {
|
|
326
|
+
var _getCreateHistoryOpti = (0, _umi.getCreateHistoryOptions)(),
|
|
327
|
+
basename = _getCreateHistoryOpti.basename;
|
|
328
|
+
var previewUrl = "".concat(basename === '/' ? '' : basename, "/byteman/preview/").concat(location.query.code);
|
|
329
|
+
if ((0, _ContextProvider.getNeedPrompt)()) {
|
|
330
|
+
context.$publisherOnce(context.topics.DESIGN_OPERATE_SAVE).then(function () {
|
|
331
|
+
window.open(previewUrl, '_blank');
|
|
332
|
+
});
|
|
333
|
+
} else {
|
|
334
|
+
window.open(previewUrl, '_blank');
|
|
352
335
|
}
|
|
353
|
-
|
|
354
|
-
|
|
336
|
+
context.$publisher(context.topics.COMPONENT_ACTIVE, null);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
355
339
|
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
356
340
|
title: (0, _utils.formatMessage)({
|
|
357
|
-
id: 'luckda.lowcode.design.toolbar.
|
|
358
|
-
label: '
|
|
341
|
+
id: 'luckda.lowcode.design.toolbar.clear',
|
|
342
|
+
label: '清除缓存'
|
|
359
343
|
}),
|
|
360
|
-
component:
|
|
344
|
+
component: clearSvg,
|
|
361
345
|
className: _design.default.hoverPrimary,
|
|
346
|
+
loading: clearCacheLoading,
|
|
362
347
|
style: {
|
|
363
348
|
fontSize: 14,
|
|
364
349
|
margin: '0 8px 0 6px'
|
|
365
350
|
},
|
|
366
|
-
onClick:
|
|
367
|
-
return (0, _regeneratorRuntime2.default)().wrap(function _callee4$(_context4) {
|
|
368
|
-
while (1) switch (_context4.prev = _context4.next) {
|
|
369
|
-
case 0:
|
|
370
|
-
if (!updatePageDataLoading) setShow(true);
|
|
371
|
-
case 1:
|
|
372
|
-
case "end":
|
|
373
|
-
return _context4.stop();
|
|
374
|
-
}
|
|
375
|
-
}, _callee4);
|
|
376
|
-
}))
|
|
351
|
+
onClick: handleClearCache
|
|
377
352
|
}), /*#__PURE__*/_react.default.createElement(_TipIcon.default, {
|
|
378
353
|
title: (0, _utils.formatMessage)({
|
|
379
354
|
id: 'luckda.lowcode.design.toolbar.save',
|
|
@@ -385,7 +360,9 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
385
360
|
fontSize: 14,
|
|
386
361
|
margin: '0 11px 0 5px'
|
|
387
362
|
},
|
|
388
|
-
onClick:
|
|
363
|
+
onClick: function onClick() {
|
|
364
|
+
return context.$publisher(context.topics.DESIGN_OPERATE_SAVE);
|
|
365
|
+
}
|
|
389
366
|
})), /*#__PURE__*/_react.default.createElement(_antd.Modal, {
|
|
390
367
|
visible: show,
|
|
391
368
|
width: 1024,
|
|
@@ -401,75 +378,12 @@ var DesignToolbar = function DesignToolbar(_ref) {
|
|
|
401
378
|
style: {
|
|
402
379
|
height: '70vh'
|
|
403
380
|
}
|
|
404
|
-
}, JSON.stringify(pageData, null, '\t'))), /*#__PURE__*/_react.default.createElement(
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
style: {
|
|
408
|
-
display: 'flex',
|
|
409
|
-
height: 54,
|
|
410
|
-
alignItems: 'center',
|
|
411
|
-
justifyContent: 'space-between'
|
|
412
|
-
}
|
|
413
|
-
}, /*#__PURE__*/_react.default.createElement("h3", {
|
|
414
|
-
style: {
|
|
415
|
-
marginBottom: 0
|
|
416
|
-
}
|
|
417
|
-
}, (0, _utils.formatMessage)({
|
|
418
|
-
id: 'luckda.lowcode.design.toolbar.pagePreview',
|
|
419
|
-
label: '页面预览'
|
|
420
|
-
})), /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_antd.Select, {
|
|
421
|
-
placeholder: (0, _utils.formatMessage)({
|
|
422
|
-
id: 'luckda.lowcode.design.toolbar.selectUser',
|
|
423
|
-
label: '请选择模拟登录人'
|
|
424
|
-
}),
|
|
425
|
-
allowClear: true,
|
|
426
|
-
style: {
|
|
427
|
-
width: 180
|
|
428
|
-
},
|
|
429
|
-
filterOption: false,
|
|
430
|
-
labelInValue: true,
|
|
431
|
-
showSearch: true,
|
|
432
|
-
getPopupContainer: function getPopupContainer() {
|
|
433
|
-
return document.getElementById('preview-drawer-header').closest('.ant-drawer-wrapper-body');
|
|
434
|
-
},
|
|
435
|
-
onSearch: handleSearch,
|
|
436
|
-
onChange: function onChange(_, _opt) {
|
|
437
|
-
if (_opt) {
|
|
438
|
-
setUserId(_opt.props.sloginid);
|
|
439
|
-
} else {
|
|
440
|
-
setUserId(void 0);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
}, userOptions.map(function (_ref7) {
|
|
444
|
-
var key = _ref7.key,
|
|
445
|
-
label = _ref7.label,
|
|
446
|
-
rest = (0, _objectWithoutProperties2.default)(_ref7, _excluded);
|
|
447
|
-
return /*#__PURE__*/_react.default.createElement(_antd.Select.Option, (0, _extends2.default)({
|
|
448
|
-
key: key,
|
|
449
|
-
value: key
|
|
450
|
-
}, rest), label);
|
|
451
|
-
})))),
|
|
452
|
-
placement: "bottom",
|
|
453
|
-
height: "94vh",
|
|
454
|
-
footer: false,
|
|
455
|
-
headerStyle: {
|
|
456
|
-
padding: '0 48px 0 24px'
|
|
457
|
-
},
|
|
458
|
-
bodyStyle: {
|
|
459
|
-
height: 'calc(100% - 54px)',
|
|
460
|
-
backgroundColor: 'var(--ant-component-background,#F0F2F5)'
|
|
461
|
-
},
|
|
462
|
-
visible: showPreview,
|
|
463
|
-
destroyOnClose: true,
|
|
381
|
+
}, JSON.stringify(pageData, null, '\t'))), /*#__PURE__*/_react.default.createElement(_shortcutModal.default, {
|
|
382
|
+
target: canvas,
|
|
383
|
+
show: showShortcut,
|
|
464
384
|
onClose: function onClose() {
|
|
465
|
-
return
|
|
466
|
-
},
|
|
467
|
-
getContainer: function getContainer() {
|
|
468
|
-
return document.getElementById('lc-design-workspace');
|
|
385
|
+
return setShowShortcut(false);
|
|
469
386
|
}
|
|
470
|
-
}
|
|
471
|
-
code: location.query.code,
|
|
472
|
-
userId: userId
|
|
473
|
-
})));
|
|
387
|
+
}));
|
|
474
388
|
};
|
|
475
389
|
var _default = exports.default = DesignToolbar;
|