@cloudbase/lowcode-builder 0.1.24 → 1.0.0

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.
Files changed (85) hide show
  1. package/lib/builder/core/index.d.ts +1 -3
  2. package/lib/builder/core/index.js +42 -52
  3. package/lib/builder/h5/compile.d.ts +1 -1
  4. package/lib/builder/h5/compile.js +59 -20
  5. package/lib/builder/h5/copy.js +2 -4
  6. package/lib/builder/h5/generate.js +3 -3
  7. package/lib/builder/h5/index.d.ts +5 -4
  8. package/lib/builder/h5/index.js +25 -14
  9. package/lib/builder/h5/material.js +6 -11
  10. package/lib/builder/h5/npm.js +6 -5
  11. package/lib/builder/mp/index.js +38 -49
  12. package/lib/builder/mp/materials.js +25 -18
  13. package/lib/builder/mp/mixMode.js +7 -10
  14. package/lib/builder/mp/mp_config.js +2 -3
  15. package/lib/builder/mp/wxml.js +1 -1
  16. package/lib/builder/service/webpack.d.ts +7 -1
  17. package/lib/builder/service/webpack.js +97 -24
  18. package/lib/builder/types/common.d.ts +1 -1
  19. package/lib/builder/types/common.js +2 -1
  20. package/lib/builder/util/common.js +1 -4
  21. package/lib/builder/util/generateFiles.js +12 -10
  22. package/lib/builder/util/mp.js +2 -8
  23. package/lib/builder.web.js +71 -0
  24. package/lib/index.d.ts +4 -0
  25. package/lib/index.js +6 -0
  26. package/lib/types.d.ts +1 -0
  27. package/lib/types.js +11 -0
  28. package/package.json +3 -8
  29. package/template/html/index.html.ejs +59 -29
  30. package/template/mp/app.js +11 -0
  31. package/template/mp/common/weapp-page.js +23 -1
  32. package/template/mp/package.json +1 -1
  33. package/template/mp/page/index.js +2 -1
  34. package/template/package.json +5 -2
  35. package/template/webpack/getCSSModuleLocalIdent.js +28 -0
  36. package/template/webpack/web.prod.js +112 -103
  37. package/template/src/app/common.js +0 -13
  38. package/template/src/app/global-api.js +0 -99
  39. package/template/src/app/handlers.js +0 -13
  40. package/template/src/app/material-actions.js +0 -16
  41. package/template/src/app/mountAppApis.js +0 -25
  42. package/template/src/app/mountMpApis.js +0 -4
  43. package/template/src/datasources/config.js.tpl +0 -23
  44. package/template/src/datasources/dataset-profiles.js.tpl +0 -5
  45. package/template/src/datasources/datasource-profiles.js.tpl +0 -4
  46. package/template/src/datasources/index.js +0 -31
  47. package/template/src/handlers/FieldMiddleware/renderer.jsx +0 -331
  48. package/template/src/handlers/HotAreas.js +0 -36
  49. package/template/src/handlers/PositionHandler.jsx +0 -8
  50. package/template/src/handlers/actionHandler/utils.js +0 -149
  51. package/template/src/handlers/componentEventActionEmitter.js +0 -29
  52. package/template/src/handlers/componentNodeMap.js +0 -24
  53. package/template/src/handlers/controller.js +0 -5
  54. package/template/src/handlers/emitComponentEvent.js +0 -8
  55. package/template/src/handlers/eventListener/componentEventListener.js +0 -15
  56. package/template/src/handlers/eventListener/hotAreaEventListener.js +0 -32
  57. package/template/src/handlers/eventListener/index.js +0 -29
  58. package/template/src/handlers/eventListener/pageEventListener.js +0 -11
  59. package/template/src/handlers/eventListener/types.js +0 -32
  60. package/template/src/handlers/hooks/index.js +0 -14
  61. package/template/src/handlers/initWebEnv.js +0 -4
  62. package/template/src/handlers/injectStyle.js +0 -14
  63. package/template/src/handlers/instanceMap.js +0 -39
  64. package/template/src/handlers/lifecycle.js +0 -232
  65. package/template/src/handlers/render.jsx +0 -131
  66. package/template/src/handlers/utils/common.js +0 -151
  67. package/template/src/handlers/utils/eventProxy.js +0 -64
  68. package/template/src/handlers/utils/events.js +0 -8
  69. package/template/src/handlers/utils/index.js +0 -4
  70. package/template/src/handlers/utils/widgets.js +0 -320
  71. package/template/src/index.jsx +0 -142
  72. package/template/src/index.less +0 -119
  73. package/template/src/libraries/default-lib/wx_yypt_report_v2.js +0 -441
  74. package/template/src/pages/app.tpl +0 -124
  75. package/template/src/router/index.tpl +0 -28
  76. package/template/src/store/computed.js +0 -11
  77. package/template/src/store/index.js +0 -40
  78. package/template/src/utils/ScanCodeComponent.js +0 -396
  79. package/template/src/utils/date.js +0 -324
  80. package/template/src/utils/history.js +0 -72
  81. package/template/src/utils/index.js +0 -67
  82. package/template/src/utils/kbone.js +0 -18
  83. package/template/src/utils/monitor-jssdk.min.js +0 -763
  84. package/template/src/utils/request.js +0 -5
  85. package/template/src/utils/scan-code-action.js +0 -27
@@ -1,5 +0,0 @@
1
- import axios from 'axios'
2
-
3
- export const request = axios
4
-
5
- export { axios }
@@ -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
- }