@cloudbase/lowcode-builder 0.1.26 → 1.0.2
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/lib/builder/core/index.d.ts +1 -3
- package/lib/builder/core/index.js +42 -52
- package/lib/builder/h5/compile.d.ts +1 -1
- package/lib/builder/h5/compile.js +59 -20
- package/lib/builder/h5/copy.js +2 -4
- package/lib/builder/h5/generate.js +3 -3
- package/lib/builder/h5/index.d.ts +5 -4
- package/lib/builder/h5/index.js +25 -14
- package/lib/builder/h5/material.js +6 -11
- package/lib/builder/h5/npm.js +6 -5
- package/lib/builder/mp/index.js +38 -49
- package/lib/builder/mp/materials.js +25 -18
- package/lib/builder/mp/mixMode.js +7 -10
- package/lib/builder/mp/mp_config.js +2 -3
- package/lib/builder/mp/wxml.js +1 -1
- package/lib/builder/service/webpack.d.ts +7 -1
- package/lib/builder/service/webpack.js +97 -24
- package/lib/builder/types/common.d.ts +1 -1
- package/lib/builder/types/common.js +2 -1
- package/lib/builder/util/common.js +1 -4
- package/lib/builder/util/generateFiles.js +12 -10
- package/lib/builder/util/mp.js +2 -8
- package/lib/builder.web.js +71 -0
- package/lib/index.d.ts +4 -0
- package/lib/index.js +6 -0
- package/lib/types.d.ts +1 -0
- package/lib/types.js +11 -0
- package/package.json +3 -8
- package/template/html/index.html.ejs +59 -29
- package/template/mp/common/weapp-page.js +23 -1
- package/template/mp/common/weapp-sdk.js +35 -0
- package/template/mp/package.json +1 -1
- package/template/mp/page/index.js +2 -1
- package/template/package.json +5 -2
- package/template/webpack/getCSSModuleLocalIdent.js +28 -0
- package/template/webpack/web.prod.js +112 -103
- package/template/src/app/common.js +0 -13
- package/template/src/app/global-api.js +0 -99
- package/template/src/app/handlers.js +0 -13
- package/template/src/app/material-actions.js +0 -16
- package/template/src/app/mountAppApis.js +0 -25
- package/template/src/app/mountMpApis.js +0 -4
- package/template/src/datasources/config.js.tpl +0 -23
- package/template/src/datasources/dataset-profiles.js.tpl +0 -5
- package/template/src/datasources/datasource-profiles.js.tpl +0 -4
- package/template/src/datasources/index.js +0 -31
- package/template/src/handlers/FieldMiddleware/renderer.jsx +0 -331
- package/template/src/handlers/HotAreas.js +0 -36
- package/template/src/handlers/PositionHandler.jsx +0 -8
- package/template/src/handlers/actionHandler/utils.js +0 -149
- package/template/src/handlers/componentEventActionEmitter.js +0 -29
- package/template/src/handlers/componentNodeMap.js +0 -24
- package/template/src/handlers/controller.js +0 -5
- package/template/src/handlers/emitComponentEvent.js +0 -8
- package/template/src/handlers/eventListener/componentEventListener.js +0 -15
- package/template/src/handlers/eventListener/hotAreaEventListener.js +0 -32
- package/template/src/handlers/eventListener/index.js +0 -29
- package/template/src/handlers/eventListener/pageEventListener.js +0 -11
- package/template/src/handlers/eventListener/types.js +0 -32
- package/template/src/handlers/hooks/index.js +0 -14
- package/template/src/handlers/initWebEnv.js +0 -4
- package/template/src/handlers/injectStyle.js +0 -14
- package/template/src/handlers/instanceMap.js +0 -39
- package/template/src/handlers/lifecycle.js +0 -232
- package/template/src/handlers/render.jsx +0 -131
- package/template/src/handlers/utils/common.js +0 -151
- package/template/src/handlers/utils/eventProxy.js +0 -64
- package/template/src/handlers/utils/events.js +0 -8
- package/template/src/handlers/utils/index.js +0 -4
- package/template/src/handlers/utils/widgets.js +0 -320
- package/template/src/index.jsx +0 -142
- package/template/src/index.less +0 -119
- package/template/src/libraries/default-lib/wx_yypt_report_v2.js +0 -441
- package/template/src/pages/app.tpl +0 -124
- package/template/src/router/index.tpl +0 -28
- package/template/src/store/computed.js +0 -11
- package/template/src/store/index.js +0 -40
- package/template/src/utils/ScanCodeComponent.js +0 -396
- package/template/src/utils/date.js +0 -324
- package/template/src/utils/history.js +0 -72
- package/template/src/utils/index.js +0 -67
- package/template/src/utils/kbone.js +0 -18
- package/template/src/utils/monitor-jssdk.min.js +0 -763
- package/template/src/utils/request.js +0 -5
- package/template/src/utils/scan-code-action.js +0 -27
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Suspense } from "react";
|
|
3
|
-
import ReactDOM from 'react-dom';
|
|
4
|
-
|
|
5
|
-
const ScanCode = React.lazy(() => import('./ScanCodeComponent'));
|
|
6
|
-
const WEAPP_SCAN_CODE_ELEMENT_ID = 'weapp-scan-code-modal-root';
|
|
7
|
-
export function scanCodeApi(opts) {
|
|
8
|
-
const options = {
|
|
9
|
-
onlyFromCamera: false,
|
|
10
|
-
scanType: ['barCode', 'qrCode'],
|
|
11
|
-
success: () => {},
|
|
12
|
-
fail: () => {},
|
|
13
|
-
complete: () => {},
|
|
14
|
-
enableDefaultBehavior: true,
|
|
15
|
-
...opts,
|
|
16
|
-
};
|
|
17
|
-
if (typeof options.scanType === 'string') {
|
|
18
|
-
options.scanType = [options.scanType];
|
|
19
|
-
}
|
|
20
|
-
let root = document.getElementById(WEAPP_SCAN_CODE_ELEMENT_ID);
|
|
21
|
-
if (!root) {
|
|
22
|
-
root = document.createElement('div');
|
|
23
|
-
root.id = WEAPP_SCAN_CODE_ELEMENT_ID;
|
|
24
|
-
}
|
|
25
|
-
document.body.appendChild(root);
|
|
26
|
-
ReactDOM.render(<Suspense fallback={<></>}><ScanCode root={root} options={options} /></Suspense>, root);
|
|
27
|
-
}
|