@luck-design-biz/luckda 1.0.6-13tl → 1.0.7
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 +37 -27
- package/es/components/ComplexItem/index.js +5 -3
- package/es/components/ComplexItem/service.js +6 -3
- package/es/components/LdAutoForm/index.js +25 -12
- package/es/components/LdCard/index.js +10 -8
- package/es/components/LdCom/index.js +3 -2
- package/es/components/LdFormList/index.js +5 -4
- package/es/components/LdGrid/index.js +29 -20
- package/es/components/LdGridForm/index.js +16 -7
- package/es/components/LdInfoPanel/index.js +16 -10
- package/es/helper/FromItems.js +64 -5
- package/es/helper/form.js +8 -2
- package/es/helper/ldBuilder.js +9 -5
- package/es/helper/ldComBuild.js +16 -11
- package/es/locales/zh-CN.js +40 -4
- package/es/lowcode/constants/api-url.js +202 -175
- package/es/lowcode/constants/event-topics.js +2 -0
- package/es/lowcode/constants/index.js +5 -4
- package/es/lowcode/engine/meta/components-list.json +6 -0
- package/es/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/es/lowcode/engine/meta/fielddate.props.json +48 -0
- package/es/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/es/lowcode/engine/meta/pagecomponent.props.default.json +8 -0
- package/es/lowcode/engine/meta/pagecomponent.props.json +41 -0
- 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/provider/ContextProvider/index.js +45 -9
- 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 +44 -5
- package/es/lowcode/engine/tools/initDS.js +4 -4
- package/es/lowcode/painter/Design.js +1 -0
- package/es/lowcode/painter/DesignOperator.js +129 -27
- package/es/lowcode/painter/DesignToolbar.js +88 -173
- package/es/lowcode/painter/components/AdvancePanel.js +28 -10
- package/es/lowcode/painter/components/TipIcon.js +12 -4
- package/es/lowcode/painter/components/field-setting/SettingUI.js +56 -4
- 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 +0 -1
- package/es/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/es/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/es/lowcode/painter/panel-section/IconConditionSelector.js +2 -1
- package/es/lowcode/painter/panel-section/JSEditor/ToolBar.js +7 -4
- package/es/lowcode/painter/panel-section/JSEditor/index.js +15 -5
- package/es/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- 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/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/Page.js +8 -3
- package/es/lowcode/view/lc-components/CardList/index.js +3 -0
- package/es/lowcode/view/lc-components/Dialog/index.js +9 -7
- package/es/lowcode/view/lc-components/Drawer/index.js +2 -0
- package/es/lowcode/view/lc-components/FieldDate/meta.json +48 -0
- package/es/lowcode/view/lc-components/Form/index.js +3 -0
- 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/Table/components/TopImex.js +5 -23
- package/es/lowcode/view/lc-components/Table/index.js +12 -6
- package/es/lowcode/view/lc-components/Tabs/index.js +6 -2
- package/es/lowcode/view/lc-components/Tree/index.js +3 -0
- package/es/lowcode/view/lc-components/Wrapper.js +7 -1
- package/es/services.js +25 -7
- package/es/utils/action.js +3 -2
- package/es/utils/form.js +37 -4
- package/es/utils/grid.js +2 -1
- package/lib/components/Builder/index.js +36 -26
- package/lib/components/ComplexItem/index.js +5 -3
- package/lib/components/ComplexItem/service.js +6 -3
- package/lib/components/LdAutoForm/index.js +22 -9
- package/lib/components/LdCard/index.js +10 -8
- package/lib/components/LdCom/index.js +3 -2
- package/lib/components/LdFormList/index.js +4 -3
- package/lib/components/LdGrid/index.js +29 -20
- package/lib/components/LdGridForm/index.js +13 -4
- package/lib/components/LdInfoPanel/index.js +15 -9
- package/lib/helper/FromItems.js +64 -5
- package/lib/helper/form.js +8 -2
- package/lib/helper/ldBuilder.js +8 -5
- package/lib/helper/ldComBuild.js +14 -9
- package/lib/locales/zh-CN.js +40 -4
- package/lib/lowcode/constants/api-url.js +204 -175
- package/lib/lowcode/constants/event-topics.js +3 -1
- package/lib/lowcode/constants/index.js +6 -5
- package/lib/lowcode/engine/meta/components-list.json +6 -0
- package/lib/lowcode/engine/meta/fielddate.props.default.json +1 -0
- package/lib/lowcode/engine/meta/fielddate.props.json +48 -0
- package/lib/lowcode/engine/meta/js-editor/auto-complete.json +5 -0
- package/lib/lowcode/engine/meta/pagecomponent.props.default.json +8 -0
- package/lib/lowcode/engine/meta/pagecomponent.props.json +41 -0
- 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/provider/ContextProvider/index.js +50 -13
- 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 +44 -4
- package/lib/lowcode/engine/tools/initDS.js +4 -4
- package/lib/lowcode/painter/Design.js +1 -0
- package/lib/lowcode/painter/DesignOperator.js +126 -24
- package/lib/lowcode/painter/DesignToolbar.js +84 -169
- package/lib/lowcode/painter/components/AdvancePanel.js +27 -9
- package/lib/lowcode/painter/components/TipIcon.js +12 -4
- package/lib/lowcode/painter/components/field-setting/SettingUI.js +55 -3
- 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 +0 -1
- package/lib/lowcode/painter/panel-section/DataSetSelector.js +6 -3
- package/lib/lowcode/painter/panel-section/FieldsSetting.js +1 -1
- package/lib/lowcode/painter/panel-section/IconConditionSelector.js +2 -1
- package/lib/lowcode/painter/panel-section/JSEditor/ToolBar.js +7 -4
- package/lib/lowcode/painter/panel-section/JSEditor/index.js +14 -4
- package/lib/lowcode/painter/panel-section/JSEditor/index.less +4 -0
- 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/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/Page.js +8 -3
- package/lib/lowcode/view/lc-components/CardList/index.js +3 -0
- package/lib/lowcode/view/lc-components/Dialog/index.js +9 -7
- package/lib/lowcode/view/lc-components/Drawer/index.js +2 -0
- package/lib/lowcode/view/lc-components/FieldDate/meta.json +48 -0
- package/lib/lowcode/view/lc-components/Form/index.js +3 -0
- 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/Table/components/TopImex.js +4 -22
- package/lib/lowcode/view/lc-components/Table/index.js +12 -6
- package/lib/lowcode/view/lc-components/Tabs/index.js +5 -1
- package/lib/lowcode/view/lc-components/Tree/index.js +3 -0
- package/lib/lowcode/view/lc-components/Wrapper.js +6 -0
- package/lib/services.js +26 -7
- package/lib/utils/action.js +6 -0
- package/lib/utils/form.js +38 -4
- package/lib/utils/grid.js +2 -1
- package/package.json +1 -1
- package/es/lowcode/engine/meta/button.api.json +0 -0
- package/lib/lowcode/engine/meta/button.api.json +0 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
3
|
+
import _extends from "@babel/runtime/helpers/esm/extends";
|
|
4
|
+
import React, { useRef, useEffect } from 'react';
|
|
5
|
+
import { useMap, useMemoizedFn } from 'ahooks';
|
|
6
|
+
import { Button, Collapse, Icon, Form, Input, Select, InputNumber, Switch } from 'luck-design/antd';
|
|
7
|
+
import styled from 'styled-components';
|
|
8
|
+
import { formatMessage, suid } from '@luck-design-biz/base/utils';
|
|
9
|
+
var SmallForm = styled(Form).withConfig({
|
|
10
|
+
displayName: "SmallForm",
|
|
11
|
+
componentId: "luckda-6530__sc-1aq87r3-0"
|
|
12
|
+
})(["font-size:12px;padding-top:8px;.ant-form-item{font-size:12px;margin-bottom:8px;.ant-form-item-label,.ant-form-item-control{height:24px;line-height:24px !important;}.ant-form-item-control.has-error{height:36px;.ant-form-explain{font-size:12px;}}label{font-size:12px;}}"]);
|
|
13
|
+
var SmallCollapse = styled(Collapse).withConfig({
|
|
14
|
+
displayName: "SmallCollapse",
|
|
15
|
+
componentId: "luckda-6530__sc-1aq87r3-1"
|
|
16
|
+
})(["font-size:12px;margin-bottom:8px;& > .ant-collapse-item > .ant-collapse-header{padding:4px 8px 4px 36px;}.ant-collapse-content > .ant-collapse-content-box{padding:4px 8px;}"]);
|
|
17
|
+
var ButtonWrapper = styled.div.withConfig({
|
|
18
|
+
displayName: "ButtonWrapper",
|
|
19
|
+
componentId: "luckda-6530__sc-1aq87r3-2"
|
|
20
|
+
})(["display:grid;grid-template-columns:1fr 1fr;gap:8px;"]);
|
|
21
|
+
var _I18N_PREFIX_ = 'luckda.lowcode.painter.panel-section.proxy-params-setter';
|
|
22
|
+
var _OPTIONS_ = [{
|
|
23
|
+
label: formatMessage({
|
|
24
|
+
id: "".concat(_I18N_PREFIX_, ".param-origin.state"),
|
|
25
|
+
label: '页面全局状态'
|
|
26
|
+
}),
|
|
27
|
+
value: 'state'
|
|
28
|
+
}, {
|
|
29
|
+
label: formatMessage({
|
|
30
|
+
id: "".concat(_I18N_PREFIX_, ".param-origin.global"),
|
|
31
|
+
label: '页面全局变量'
|
|
32
|
+
}),
|
|
33
|
+
value: 'global'
|
|
34
|
+
}, {
|
|
35
|
+
label: formatMessage({
|
|
36
|
+
id: "".concat(_I18N_PREFIX_, ".param-origin.url"),
|
|
37
|
+
label: '页面URL参数'
|
|
38
|
+
}),
|
|
39
|
+
value: 'url'
|
|
40
|
+
}, {
|
|
41
|
+
label: formatMessage({
|
|
42
|
+
id: "".concat(_I18N_PREFIX_, ".param-origin.string"),
|
|
43
|
+
label: '字符串常量'
|
|
44
|
+
}),
|
|
45
|
+
value: 'string'
|
|
46
|
+
}, {
|
|
47
|
+
label: formatMessage({
|
|
48
|
+
id: "".concat(_I18N_PREFIX_, ".param-origin.num"),
|
|
49
|
+
label: '数字常量'
|
|
50
|
+
}),
|
|
51
|
+
value: 'num'
|
|
52
|
+
}, {
|
|
53
|
+
label: formatMessage({
|
|
54
|
+
id: "".concat(_I18N_PREFIX_, ".param-origin.bool"),
|
|
55
|
+
label: '布尔常量'
|
|
56
|
+
}),
|
|
57
|
+
value: 'bool'
|
|
58
|
+
}];
|
|
59
|
+
var ParamForm = Form.create({
|
|
60
|
+
name: 'param_form',
|
|
61
|
+
onValuesChange: function onValuesChange(props, _, allValues) {
|
|
62
|
+
props.onChange(props.id, allValues);
|
|
63
|
+
}
|
|
64
|
+
})(function (_ref) {
|
|
65
|
+
var form = _ref.form,
|
|
66
|
+
getForm = _ref.getForm,
|
|
67
|
+
defaultValue = _ref.defaultValue;
|
|
68
|
+
useEffect(function () {
|
|
69
|
+
getForm(form);
|
|
70
|
+
}, []);
|
|
71
|
+
var formItemCol = {
|
|
72
|
+
labelCol: {
|
|
73
|
+
span: 8
|
|
74
|
+
},
|
|
75
|
+
wrapperCol: {
|
|
76
|
+
span: 16
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
return /*#__PURE__*/React.createElement(SmallForm, {
|
|
80
|
+
hideRequiredMark: true,
|
|
81
|
+
layout: "horizontal"
|
|
82
|
+
}, /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
83
|
+
label: formatMessage({
|
|
84
|
+
id: "".concat(_I18N_PREFIX_, ".param-name"),
|
|
85
|
+
label: '参数名称'
|
|
86
|
+
})
|
|
87
|
+
}, formItemCol), form.getFieldDecorator('name', {
|
|
88
|
+
initialValue: defaultValue.name,
|
|
89
|
+
rules: [{
|
|
90
|
+
required: true,
|
|
91
|
+
message: formatMessage({
|
|
92
|
+
id: "".concat(_I18N_PREFIX_, ".warn.param-name"),
|
|
93
|
+
label: '请输入参数名称'
|
|
94
|
+
})
|
|
95
|
+
}]
|
|
96
|
+
})( /*#__PURE__*/React.createElement(Input, {
|
|
97
|
+
size: "small"
|
|
98
|
+
}))), /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
99
|
+
label: formatMessage({
|
|
100
|
+
id: "".concat(_I18N_PREFIX_, ".param-origin"),
|
|
101
|
+
label: '参数来源'
|
|
102
|
+
})
|
|
103
|
+
}, formItemCol), form.getFieldDecorator('origin', {
|
|
104
|
+
initialValue: defaultValue.origin || 'state'
|
|
105
|
+
})( /*#__PURE__*/React.createElement(Select, {
|
|
106
|
+
size: "small"
|
|
107
|
+
}, _OPTIONS_.map(function (item) {
|
|
108
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
109
|
+
key: item.value,
|
|
110
|
+
value: item.value
|
|
111
|
+
}, item.label);
|
|
112
|
+
})))), ['state', 'global', 'url', 'string'].includes(form.getFieldValue('origin')) && /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
113
|
+
label: formatMessage({
|
|
114
|
+
id: "".concat(_I18N_PREFIX_, ".param-value"),
|
|
115
|
+
label: '值或变量名'
|
|
116
|
+
})
|
|
117
|
+
}, formItemCol), form.getFieldDecorator('value', {
|
|
118
|
+
initialValue: defaultValue.value,
|
|
119
|
+
rules: [{
|
|
120
|
+
required: true,
|
|
121
|
+
message: formatMessage({
|
|
122
|
+
id: "".concat(_I18N_PREFIX_, ".warn.param-value"),
|
|
123
|
+
label: '请输入参数值或变量名'
|
|
124
|
+
})
|
|
125
|
+
}]
|
|
126
|
+
})( /*#__PURE__*/React.createElement(Input, {
|
|
127
|
+
size: "small"
|
|
128
|
+
}))), form.getFieldValue('origin') === 'num' && /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
129
|
+
label: formatMessage({
|
|
130
|
+
id: "".concat(_I18N_PREFIX_, ".param-value"),
|
|
131
|
+
label: '值或变量名'
|
|
132
|
+
})
|
|
133
|
+
}, formItemCol), form.getFieldDecorator('value', {
|
|
134
|
+
initialValue: defaultValue.value || 0
|
|
135
|
+
})( /*#__PURE__*/React.createElement(InputNumber, {
|
|
136
|
+
size: "small"
|
|
137
|
+
}))), form.getFieldValue('origin') === 'bool' && /*#__PURE__*/React.createElement(Form.Item, _extends({
|
|
138
|
+
label: formatMessage({
|
|
139
|
+
id: "".concat(_I18N_PREFIX_, ".param-value"),
|
|
140
|
+
label: '值或变量名'
|
|
141
|
+
})
|
|
142
|
+
}, formItemCol), form.getFieldDecorator('value', {
|
|
143
|
+
initialValue: defaultValue.value || false,
|
|
144
|
+
valuePropName: 'checked'
|
|
145
|
+
})( /*#__PURE__*/React.createElement(Switch, {
|
|
146
|
+
size: "small"
|
|
147
|
+
}))));
|
|
148
|
+
});
|
|
149
|
+
var ProxyParamsSetter = function ProxyParamsSetter(_ref2) {
|
|
150
|
+
var defaultValue = _ref2.defaultValue,
|
|
151
|
+
onChange = _ref2.onChange;
|
|
152
|
+
var formsRef = useRef([]);
|
|
153
|
+
var _useMap = useMap(defaultValue.map(function (item) {
|
|
154
|
+
return [item.id, item];
|
|
155
|
+
})),
|
|
156
|
+
_useMap2 = _slicedToArray(_useMap, 2),
|
|
157
|
+
map = _useMap2[0],
|
|
158
|
+
_useMap2$ = _useMap2[1],
|
|
159
|
+
set = _useMap2$.set,
|
|
160
|
+
remove = _useMap2$.remove;
|
|
161
|
+
var handleAdd = useMemoizedFn(function () {
|
|
162
|
+
var _id = suid();
|
|
163
|
+
set(_id, {
|
|
164
|
+
id: _id,
|
|
165
|
+
origin: 'state'
|
|
166
|
+
});
|
|
167
|
+
});
|
|
168
|
+
var handleSave = useMemoizedFn(function () {
|
|
169
|
+
var isValid = true;
|
|
170
|
+
formsRef.current.some(function (_form) {
|
|
171
|
+
_form.validateFields(function (err, val) {
|
|
172
|
+
isValid = !err;
|
|
173
|
+
});
|
|
174
|
+
return !isValid;
|
|
175
|
+
});
|
|
176
|
+
if (!isValid) return;
|
|
177
|
+
onChange(Array.from(map).map(function (_ref3) {
|
|
178
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
|
179
|
+
id = _ref4[0],
|
|
180
|
+
item = _ref4[1];
|
|
181
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
182
|
+
id: id
|
|
183
|
+
});
|
|
184
|
+
}));
|
|
185
|
+
});
|
|
186
|
+
var handleChange = useMemoizedFn(function (id, val) {
|
|
187
|
+
set(id, val);
|
|
188
|
+
});
|
|
189
|
+
var handleDelete = useMemoizedFn(function (id, index) {
|
|
190
|
+
formsRef.current = [];
|
|
191
|
+
remove(id);
|
|
192
|
+
});
|
|
193
|
+
return /*#__PURE__*/React.createElement("div", null, Array.from(map).map(function (_ref5, index) {
|
|
194
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
|
195
|
+
id = _ref6[0],
|
|
196
|
+
item = _ref6[1];
|
|
197
|
+
return /*#__PURE__*/React.createElement(SmallCollapse, {
|
|
198
|
+
key: id,
|
|
199
|
+
activeKey: "panel"
|
|
200
|
+
}, /*#__PURE__*/React.createElement(Collapse.Panel, {
|
|
201
|
+
header: "".concat(formatMessage({
|
|
202
|
+
id: "".concat(_I18N_PREFIX_, ".param"),
|
|
203
|
+
label: "\u9875\u9762\u53C2\u6570"
|
|
204
|
+
})).concat(index + 1),
|
|
205
|
+
key: "panel",
|
|
206
|
+
extra: /*#__PURE__*/React.createElement(Icon, {
|
|
207
|
+
type: "minus-circle",
|
|
208
|
+
style: {
|
|
209
|
+
color: 'var(--luck-color-danger)'
|
|
210
|
+
},
|
|
211
|
+
onClick: function onClick() {
|
|
212
|
+
return handleDelete(id);
|
|
213
|
+
}
|
|
214
|
+
})
|
|
215
|
+
}, /*#__PURE__*/React.createElement(ParamForm, {
|
|
216
|
+
id: id,
|
|
217
|
+
defaultValue: item,
|
|
218
|
+
getForm: function getForm(_form) {
|
|
219
|
+
return formsRef.current[index] = _form;
|
|
220
|
+
},
|
|
221
|
+
onChange: handleChange
|
|
222
|
+
})));
|
|
223
|
+
}), /*#__PURE__*/React.createElement(ButtonWrapper, null, /*#__PURE__*/React.createElement(Button, {
|
|
224
|
+
size: "small",
|
|
225
|
+
block: true,
|
|
226
|
+
onClick: handleAdd
|
|
227
|
+
}, formatMessage({
|
|
228
|
+
id: "".concat(_I18N_PREFIX_, ".add"),
|
|
229
|
+
label: '添加参数'
|
|
230
|
+
})), /*#__PURE__*/React.createElement(Button, {
|
|
231
|
+
size: "small",
|
|
232
|
+
block: true,
|
|
233
|
+
type: "primary",
|
|
234
|
+
onClick: handleSave
|
|
235
|
+
}, formatMessage({
|
|
236
|
+
id: "".concat(_I18N_PREFIX_, ".save"),
|
|
237
|
+
label: '保存并返回'
|
|
238
|
+
}))));
|
|
239
|
+
};
|
|
240
|
+
export default ProxyParamsSetter;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
+
import React, { useRef, useState } from 'react';
|
|
3
|
+
import { useMemoizedFn, useDrag, useBoolean } from 'ahooks';
|
|
4
|
+
import { Icon, Drawer } from 'luck-design/antd';
|
|
5
|
+
import styled from 'styled-components';
|
|
6
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
7
|
+
import DebugToolDetail from "./DebugToolDetail";
|
|
8
|
+
var Wrapper = styled.div.withConfig({
|
|
9
|
+
displayName: "Wrapper",
|
|
10
|
+
componentId: "luckda-6530__sc-1x7h5jv-0"
|
|
11
|
+
})(["position:fixed;border-top-left-radius:16px;border-bottom-left-radius:16px;cursor:pointer;z-index:1000;background:rgba(40,40,40,0.5);backdrop-filter:blur(6px);display:flex;align-items:center;justify-content:center;transition:right 0.4s ease-in-out;"]);
|
|
12
|
+
var MoveIcon = styled.div.withConfig({
|
|
13
|
+
displayName: "MoveIcon",
|
|
14
|
+
componentId: "luckda-6530__sc-1x7h5jv-1"
|
|
15
|
+
})(["height:46px;border-left:1px solid rgb(191,191,191,0.4);cursor:move;&:hover{background:transparent;backdrop-filter:blur(6px);}"]);
|
|
16
|
+
var DebugTool = function DebugTool() {
|
|
17
|
+
var dragRef = useRef();
|
|
18
|
+
var _useState = useState([-32, 100]),
|
|
19
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
20
|
+
_useState2$ = _slicedToArray(_useState2[0], 2),
|
|
21
|
+
right = _useState2$[0],
|
|
22
|
+
top = _useState2$[1],
|
|
23
|
+
setPostion = _useState2[1];
|
|
24
|
+
var _useBoolean = useBoolean(false),
|
|
25
|
+
_useBoolean2 = _slicedToArray(_useBoolean, 2),
|
|
26
|
+
show = _useBoolean2[0],
|
|
27
|
+
_useBoolean2$ = _useBoolean2[1],
|
|
28
|
+
setTrue = _useBoolean2$.setTrue,
|
|
29
|
+
setFalse = _useBoolean2$.setFalse;
|
|
30
|
+
var handleMouseEnter = useMemoizedFn(function () {
|
|
31
|
+
setPostion([0, top]);
|
|
32
|
+
});
|
|
33
|
+
var handleMouseLeave = useMemoizedFn(function () {
|
|
34
|
+
setPostion([-32, top]);
|
|
35
|
+
});
|
|
36
|
+
var handleDragEnd = useMemoizedFn(function (event) {
|
|
37
|
+
setPostion([right, event.y]);
|
|
38
|
+
});
|
|
39
|
+
useDrag('', dragRef, {
|
|
40
|
+
onDragEnd: handleDragEnd
|
|
41
|
+
});
|
|
42
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Wrapper, {
|
|
43
|
+
style: {
|
|
44
|
+
right: right,
|
|
45
|
+
top: "".concat(top, "px")
|
|
46
|
+
},
|
|
47
|
+
onMouseEnter: handleMouseEnter,
|
|
48
|
+
onMouseLeave: handleMouseLeave
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Icon, {
|
|
50
|
+
type: "bug",
|
|
51
|
+
style: {
|
|
52
|
+
padding: '16px 8px 16px 16px'
|
|
53
|
+
},
|
|
54
|
+
onClick: setTrue
|
|
55
|
+
}), /*#__PURE__*/React.createElement(MoveIcon, {
|
|
56
|
+
ref: dragRef
|
|
57
|
+
}, /*#__PURE__*/React.createElement("svg", {
|
|
58
|
+
viewBox: "0 0 1024 1024",
|
|
59
|
+
width: "20",
|
|
60
|
+
height: "46"
|
|
61
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
62
|
+
d: "M320 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128zM704 64a64 64 0 1 0 0 128 64 64 0 0 0 0-128zM256 384a64 64 0 1 1 128 0 64 64 0 0 1-128 0zM704 320a64 64 0 1 0 0 128 64 64 0 0 0 0-128zM256 640a64 64 0 1 1 128 0 64 64 0 0 1-128 0zM320 832a64 64 0 1 0 0 128 64 64 0 0 0 0-128zM640 640a64 64 0 1 1 128 0 64 64 0 0 1-128 0zM704 832a64 64 0 1 0 0 128 64 64 0 0 0 0-128z",
|
|
63
|
+
fill: "#bfbfbf"
|
|
64
|
+
})))), /*#__PURE__*/React.createElement(Drawer, {
|
|
65
|
+
title: formatMessage({
|
|
66
|
+
id: 'luckda.lowcode.design.toolbar.debugTool',
|
|
67
|
+
label: '调试工具'
|
|
68
|
+
}),
|
|
69
|
+
visible: show,
|
|
70
|
+
onClose: setFalse,
|
|
71
|
+
footer: false,
|
|
72
|
+
mask: false,
|
|
73
|
+
bodyStyle: {
|
|
74
|
+
padding: '4px 16px'
|
|
75
|
+
}
|
|
76
|
+
}, /*#__PURE__*/React.createElement(DebugToolDetail, null)));
|
|
77
|
+
};
|
|
78
|
+
export default DebugTool;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
3
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
4
|
+
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
5
|
+
import React, { useState } from 'react';
|
|
6
|
+
import { useDebounceFn } from 'ahooks';
|
|
7
|
+
import { Form, Select } from 'luck-design/antd';
|
|
8
|
+
import { formatMessage } from '@luck-design-biz/base/utils';
|
|
9
|
+
import useDebugSettings from "./useDebugSettings";
|
|
10
|
+
import { fetchSearchUser } from "../constants/api-url";
|
|
11
|
+
var DebugToolDetail = function DebugToolDetail(_ref) {
|
|
12
|
+
var form = _ref.form;
|
|
13
|
+
var _useDebugSettings = useDebugSettings(),
|
|
14
|
+
_useDebugSettings2 = _slicedToArray(_useDebugSettings, 2),
|
|
15
|
+
debugSettings = _useDebugSettings2[0],
|
|
16
|
+
setDebugSetting = _useDebugSettings2[1];
|
|
17
|
+
var _useState = useState([]),
|
|
18
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
19
|
+
userOptions = _useState2[0],
|
|
20
|
+
setUserOptions = _useState2[1];
|
|
21
|
+
var _useDebounceFn = useDebounceFn( /*#__PURE__*/function () {
|
|
22
|
+
var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(value) {
|
|
23
|
+
var _yield$fetchSearchUse, code, list, detail;
|
|
24
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
25
|
+
while (1) switch (_context.prev = _context.next) {
|
|
26
|
+
case 0:
|
|
27
|
+
_context.next = 2;
|
|
28
|
+
return fetchSearchUser({
|
|
29
|
+
sname: value
|
|
30
|
+
});
|
|
31
|
+
case 2:
|
|
32
|
+
_yield$fetchSearchUse = _context.sent;
|
|
33
|
+
code = _yield$fetchSearchUse.code;
|
|
34
|
+
list = _yield$fetchSearchUse.list;
|
|
35
|
+
detail = _yield$fetchSearchUse.detail;
|
|
36
|
+
if (code === 1) {
|
|
37
|
+
setUserOptions(list.map(function (id) {
|
|
38
|
+
var item = detail[id];
|
|
39
|
+
return _objectSpread(_objectSpread({}, item), {}, {
|
|
40
|
+
key: "".concat(item.sloginid),
|
|
41
|
+
label: item.sname
|
|
42
|
+
});
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
case 7:
|
|
46
|
+
case "end":
|
|
47
|
+
return _context.stop();
|
|
48
|
+
}
|
|
49
|
+
}, _callee);
|
|
50
|
+
}));
|
|
51
|
+
return function (_x) {
|
|
52
|
+
return _ref2.apply(this, arguments);
|
|
53
|
+
};
|
|
54
|
+
}(), {
|
|
55
|
+
wait: 500
|
|
56
|
+
}),
|
|
57
|
+
handleSearch = _useDebounceFn.run;
|
|
58
|
+
return /*#__PURE__*/React.createElement(Form, {
|
|
59
|
+
layout: "vertical"
|
|
60
|
+
}, /*#__PURE__*/React.createElement(Form.Item, {
|
|
61
|
+
label: formatMessage({
|
|
62
|
+
id: 'luckda.lowcode.design.toolbar.selectUser',
|
|
63
|
+
label: '模拟登录人'
|
|
64
|
+
})
|
|
65
|
+
}, form.getFieldDecorator('account')( /*#__PURE__*/React.createElement(Select, {
|
|
66
|
+
placeholder: formatMessage({
|
|
67
|
+
id: 'luckda.lowcode.design.toolbar.placeholder.selectUser',
|
|
68
|
+
label: '请选择模拟登录人'
|
|
69
|
+
}),
|
|
70
|
+
allowClear: true,
|
|
71
|
+
size: "small",
|
|
72
|
+
style: {
|
|
73
|
+
width: '100%'
|
|
74
|
+
},
|
|
75
|
+
filterOption: false,
|
|
76
|
+
labelInValue: true,
|
|
77
|
+
defaultValue: debugSettings.account ? {
|
|
78
|
+
value: debugSettings.account,
|
|
79
|
+
label: debugSettings.accountName
|
|
80
|
+
} : void 0,
|
|
81
|
+
showSearch: true,
|
|
82
|
+
onSearch: handleSearch,
|
|
83
|
+
onChange: function onChange(_opt) {
|
|
84
|
+
if (_opt) {
|
|
85
|
+
setDebugSetting('account', _opt.key);
|
|
86
|
+
setDebugSetting('accountName', _opt.label);
|
|
87
|
+
} else {
|
|
88
|
+
setDebugSetting('account', void 0);
|
|
89
|
+
setDebugSetting('accountName', void 0);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}, userOptions.map(function (_ref3) {
|
|
93
|
+
var key = _ref3.key,
|
|
94
|
+
label = _ref3.label;
|
|
95
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
96
|
+
key: key,
|
|
97
|
+
value: key
|
|
98
|
+
}, label);
|
|
99
|
+
})))));
|
|
100
|
+
};
|
|
101
|
+
export default Form.create({
|
|
102
|
+
name: 'debug_tool'
|
|
103
|
+
})(DebugToolDetail);
|
|
@@ -1,28 +1,21 @@
|
|
|
1
1
|
import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
|
|
2
|
-
import React
|
|
3
|
-
import { useUpdateEffect } from 'ahooks';
|
|
2
|
+
import React from 'react';
|
|
4
3
|
import EventBusProvider from "../engine/provider/EventBusProvider";
|
|
5
4
|
import ContextProvider from "../engine/provider/ContextProvider";
|
|
6
5
|
import Page from "../view/Page";
|
|
7
6
|
import { RUNTIME } from "../constants/index";
|
|
7
|
+
import DebugTool from "./DebugTool";
|
|
8
|
+
import useDebugSettings from "./useDebugSettings";
|
|
8
9
|
var Preview = function Preview(_ref) {
|
|
9
|
-
var code = _ref.code
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
useUpdateEffect(function () {
|
|
16
|
-
setCurrentKey(void 0);
|
|
17
|
-
setTimeout(function () {
|
|
18
|
-
setCurrentKey(userId);
|
|
19
|
-
});
|
|
20
|
-
}, [userId]);
|
|
21
|
-
return code && currentKey ? /*#__PURE__*/React.createElement(EventBusProvider, {
|
|
22
|
-
key: code,
|
|
10
|
+
var code = _ref.code;
|
|
11
|
+
var _useDebugSettings = useDebugSettings(),
|
|
12
|
+
_useDebugSettings2 = _slicedToArray(_useDebugSettings, 1),
|
|
13
|
+
debugSettings = _useDebugSettings2[0];
|
|
14
|
+
return /*#__PURE__*/React.createElement(EventBusProvider, {
|
|
15
|
+
key: "".concat(code, ":").concat(debugSettings.account),
|
|
23
16
|
runtime: RUNTIME.PREVIEW
|
|
24
17
|
}, /*#__PURE__*/React.createElement(ContextProvider, {
|
|
25
18
|
code: code
|
|
26
|
-
}, /*#__PURE__*/React.createElement(Page, null)
|
|
19
|
+
}, /*#__PURE__*/React.createElement(Page, null), /*#__PURE__*/React.createElement(DebugTool, null)));
|
|
27
20
|
};
|
|
28
21
|
export default Preview;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import _regeneratorRuntime from "@babel/runtime/helpers/esm/regeneratorRuntime";
|
|
2
|
+
import _asyncToGenerator from "@babel/runtime/helpers/esm/asyncToGenerator";
|
|
3
|
+
import { create } from 'zustand';
|
|
4
|
+
import { immer } from 'zustand/middleware/immer';
|
|
5
|
+
import { subscribeWithSelector } from 'zustand/middleware';
|
|
6
|
+
import { useMemoizedFn, useAsyncEffect } from 'ahooks';
|
|
7
|
+
import { isNil } from 'lodash';
|
|
8
|
+
import { COOKIE_VIRTUAL_ACCOUNT_KEY } from "../constants";
|
|
9
|
+
import { fetchSearchUser } from "../constants/api-url";
|
|
10
|
+
export var useDebugSettingsStore = create()(immer(subscribeWithSelector(function () {
|
|
11
|
+
return {
|
|
12
|
+
account: window.cookie.get(COOKIE_VIRTUAL_ACCOUNT_KEY)
|
|
13
|
+
};
|
|
14
|
+
})));
|
|
15
|
+
var useDebugSettings = function useDebugSettings() {
|
|
16
|
+
var debugSettings = useDebugSettingsStore(function (store) {
|
|
17
|
+
return store;
|
|
18
|
+
});
|
|
19
|
+
useAsyncEffect( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
|
|
20
|
+
var _yield$fetchSearchUse, code, list, detail;
|
|
21
|
+
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
22
|
+
while (1) switch (_context.prev = _context.next) {
|
|
23
|
+
case 0:
|
|
24
|
+
if (!(debugSettings.account && isNil(debugSettings.accountName))) {
|
|
25
|
+
_context.next = 8;
|
|
26
|
+
break;
|
|
27
|
+
}
|
|
28
|
+
_context.next = 3;
|
|
29
|
+
return fetchSearchUser({
|
|
30
|
+
sloginidListIn: [debugSettings.account]
|
|
31
|
+
});
|
|
32
|
+
case 3:
|
|
33
|
+
_yield$fetchSearchUse = _context.sent;
|
|
34
|
+
code = _yield$fetchSearchUse.code;
|
|
35
|
+
list = _yield$fetchSearchUse.list;
|
|
36
|
+
detail = _yield$fetchSearchUse.detail;
|
|
37
|
+
if (code === 1) {
|
|
38
|
+
useDebugSettingsStore.setState(function (store) {
|
|
39
|
+
store.accountName = detail[list[0]].sname;
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
case 8:
|
|
43
|
+
case "end":
|
|
44
|
+
return _context.stop();
|
|
45
|
+
}
|
|
46
|
+
}, _callee);
|
|
47
|
+
})), []);
|
|
48
|
+
var setDebugSetting = useMemoizedFn(function (key, value) {
|
|
49
|
+
useDebugSettingsStore.setState(function (store) {
|
|
50
|
+
if (key === 'account') {
|
|
51
|
+
window.cookie.set(COOKIE_VIRTUAL_ACCOUNT_KEY, value);
|
|
52
|
+
}
|
|
53
|
+
if (isNil(value)) {
|
|
54
|
+
delete store[key];
|
|
55
|
+
} else {
|
|
56
|
+
store[key] = value;
|
|
57
|
+
}
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
return [debugSettings, setDebugSetting];
|
|
61
|
+
};
|
|
62
|
+
export default useDebugSettings;
|
|
@@ -48,7 +48,11 @@ var Canvas = function Canvas(_ref) {
|
|
|
48
48
|
return function () {
|
|
49
49
|
var _advance$events3;
|
|
50
50
|
unsub();
|
|
51
|
-
|
|
51
|
+
var varKeys = (pageVars || []).map(function (v) {
|
|
52
|
+
return v.name;
|
|
53
|
+
});
|
|
54
|
+
useStateStore.getState().clear(varKeys);
|
|
55
|
+
ctx._deleteRemoteApis(varKeys);
|
|
52
56
|
ctx.doAction(advance === null || advance === void 0 || (_advance$events3 = advance.events) === null || _advance$events3 === void 0 ? void 0 : _advance$events3.onPageUnmount);
|
|
53
57
|
};
|
|
54
58
|
}, []);
|
package/es/lowcode/view/Page.js
CHANGED
|
@@ -8,6 +8,7 @@ import { useMemoizedFn, useCreation, useBoolean } from 'ahooks';
|
|
|
8
8
|
import { Skeleton } from 'luck-design/antd';
|
|
9
9
|
import classNames from 'classnames';
|
|
10
10
|
import { useRemoteSource, useContext } from "../engine/provider/ContextProvider";
|
|
11
|
+
import { usePageProxyContext } from "../engine/provider/PageProxyProvider";
|
|
11
12
|
import initDS from "../engine/tools/initDS";
|
|
12
13
|
import Loading from "./Loading";
|
|
13
14
|
import Wrapper from "./lc-components/Wrapper";
|
|
@@ -28,12 +29,16 @@ var LCPage = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
28
29
|
loadMount = _useBoolean2[0],
|
|
29
30
|
setTrue = _useBoolean2[1].setTrue;
|
|
30
31
|
var ctx = useContext();
|
|
31
|
-
var
|
|
32
|
-
|
|
32
|
+
var ppCtx = usePageProxyContext();
|
|
33
|
+
var handlePageLoadMount = useMemoizedFn(function (_ref2, topId) {
|
|
34
|
+
var proxyCode = _ref2.proxyCode;
|
|
35
|
+
if ((ppCtx === null || ppCtx === void 0 ? void 0 : ppCtx.proxyCode) !== proxyCode) return;
|
|
36
|
+
_dsRef.current = initDS(ctx, ppCtx === null || ppCtx === void 0 ? void 0 : ppCtx.proxyCode);
|
|
33
37
|
setTrue();
|
|
38
|
+
ctx.$unsubscriber(ctx.topics.PAGE_LOAD_MOUNT, topId);
|
|
34
39
|
});
|
|
35
40
|
useCreation(function () {
|
|
36
|
-
ctx.$subscriber(ctx.topics.PAGE_LOAD_MOUNT).
|
|
41
|
+
ctx.$subscriber(ctx.topics.PAGE_LOAD_MOUNT).on(handlePageLoadMount).watch();
|
|
37
42
|
}, []);
|
|
38
43
|
var getTargetDom = useMemoizedFn(function () {
|
|
39
44
|
return _rootRef.current;
|
|
@@ -7,6 +7,7 @@ import classNames from 'classnames';
|
|
|
7
7
|
import { isNil, keyBy } from 'lodash';
|
|
8
8
|
import { Modal, recheck, IconFont } from '@luck-design-biz/base';
|
|
9
9
|
import { useContext } from "../../../engine/provider/ContextProvider";
|
|
10
|
+
import { usePageProxyContext } from "../../../engine/provider/PageProxyProvider";
|
|
10
11
|
import Wrapper from "../Wrapper";
|
|
11
12
|
import { LdCard, LDActions } from "../../../../index";
|
|
12
13
|
import TopFilter from "../Table/components/TopFilter";
|
|
@@ -45,6 +46,7 @@ var LCCardList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
45
46
|
renderContent = _ref.renderContent,
|
|
46
47
|
describeLines = _ref.describeLines;
|
|
47
48
|
var ctx = useContext();
|
|
49
|
+
var ppCtx = usePageProxyContext();
|
|
48
50
|
var apiRef = useRef();
|
|
49
51
|
var wrapperRef = useRef();
|
|
50
52
|
var instanceRef = useCombinedRefs(ref);
|
|
@@ -253,6 +255,7 @@ var LCCardList = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
253
255
|
ref: instanceRef,
|
|
254
256
|
wrapper: wrapperRef,
|
|
255
257
|
wrapperProps: _wrapperProps,
|
|
258
|
+
pageProxy: ppCtx,
|
|
256
259
|
_loading: ctx.loading,
|
|
257
260
|
className: classNames(_defineProperty({}, className, !!className)),
|
|
258
261
|
ldId: id,
|
|
@@ -71,6 +71,7 @@ var LCDialog = function LCDialog(_ref) {
|
|
|
71
71
|
if (open) {
|
|
72
72
|
ctx.doAction(advance.events.onOpen);
|
|
73
73
|
} else {
|
|
74
|
+
_setTitle(title);
|
|
74
75
|
ctx.doAction(advance.events.onClose);
|
|
75
76
|
setLoading(false);
|
|
76
77
|
}
|
|
@@ -82,18 +83,19 @@ var LCDialog = function LCDialog(_ref) {
|
|
|
82
83
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
|
83
84
|
while (1) switch (_context.prev = _context.next) {
|
|
84
85
|
case 0:
|
|
85
|
-
|
|
86
|
-
_context.
|
|
86
|
+
setLoading(true);
|
|
87
|
+
_context.prev = 1;
|
|
88
|
+
_context.next = 4;
|
|
87
89
|
return ctx.doAction(advance.events.onOk);
|
|
88
|
-
case
|
|
89
|
-
_context.prev =
|
|
90
|
+
case 4:
|
|
91
|
+
_context.prev = 4;
|
|
90
92
|
setLoading(false);
|
|
91
|
-
return _context.finish(
|
|
92
|
-
case
|
|
93
|
+
return _context.finish(4);
|
|
94
|
+
case 7:
|
|
93
95
|
case "end":
|
|
94
96
|
return _context.stop();
|
|
95
97
|
}
|
|
96
|
-
}, _callee, null, [[
|
|
98
|
+
}, _callee, null, [[1,, 4, 7]]);
|
|
97
99
|
})));
|
|
98
100
|
var _footer = useCreation(function () {
|
|
99
101
|
if (isBoolean(footer) && !footer || isObject(footer) && !footer.checked || isObject(footer) && footer.code && !executeCode(ctx, footer.code)) return {
|