@dckj-npm/lowcode-plugin-code-generator 1.3.2 → 1.3.4

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/LICENSE +21 -21
  2. package/README.md +53 -52
  3. package/es/components/CodeGenActionBtn/CodeGenActionBtn.js +19 -22
  4. package/es/components/CodeGenActionBtn/CodeGenActionBtn.scss +13 -13
  5. package/es/components/CodeGenPreview/CodeGenPreview.scss +16 -16
  6. package/es/components/CodeGenPreview/useIsInIntranet.js +15 -15
  7. package/es/components/CodeGenResult/CodeGenResult.js +11 -11
  8. package/es/components/CodeGenResult/CodeGenResult.scss +7 -7
  9. package/es/components/CodeSandboxPreview/CodeSandboxPreview.js +23 -23
  10. package/es/components/CodeSandboxPreview/CodeSandboxPreview.scss +18 -18
  11. package/es/components/FileTypeIcon/FileTypeIcon.scss +36 -36
  12. package/es/components/SourcesView/SourcesView.js +2 -1
  13. package/es/components/SourcesView/SourcesView.scss +24 -24
  14. package/es/demo/index.js +31 -32
  15. package/es/demo/index.scss +56 -56
  16. package/es/index.js +10 -9
  17. package/es/utils/utils.js +22 -25
  18. package/lib/components/CodeGenActionBtn/CodeGenActionBtn.js +20 -24
  19. package/lib/components/CodeGenActionBtn/CodeGenActionBtn.scss +13 -13
  20. package/lib/components/CodeGenPreview/CodeGenPreview.scss +16 -16
  21. package/lib/components/CodeGenPreview/useIsInIntranet.js +16 -17
  22. package/lib/components/CodeGenResult/CodeGenResult.js +12 -13
  23. package/lib/components/CodeGenResult/CodeGenResult.scss +7 -7
  24. package/lib/components/CodeSandboxPreview/CodeSandboxPreview.js +24 -25
  25. package/lib/components/CodeSandboxPreview/CodeSandboxPreview.scss +18 -18
  26. package/lib/components/FileTypeIcon/FileTypeIcon.scss +36 -36
  27. package/lib/components/GravityPreview/GravityPreview.js +1 -2
  28. package/lib/components/GravityPreview/GravitySdk.js +1 -2
  29. package/lib/components/SourcesView/SourcesView.js +3 -3
  30. package/lib/components/SourcesView/SourcesView.scss +24 -24
  31. package/lib/demo/index.js +32 -34
  32. package/lib/demo/index.scss +56 -56
  33. package/lib/index.js +11 -11
  34. package/lib/utils/utils.js +22 -25
  35. package/package.json +94 -94
  36. package/es/components/CodeGenActionBtn/CodeGenActionBtn.d.ts +0 -8
  37. package/es/components/CodeGenActionBtn/index.d.ts +0 -1
  38. package/es/components/CodeGenPreview/CodeGenPreview.d.ts +0 -8
  39. package/es/components/CodeGenPreview/fixPreviewCode.d.ts +0 -2
  40. package/es/components/CodeGenPreview/index.d.ts +0 -1
  41. package/es/components/CodeGenPreview/useIsInIntranet.d.ts +0 -4
  42. package/es/components/CodeGenResult/CodeGenResult.d.ts +0 -9
  43. package/es/components/CodeGenResult/index.d.ts +0 -1
  44. package/es/components/CodeSandboxPreview/CodeSandboxPreview.d.ts +0 -4
  45. package/es/components/CodeSandboxPreview/index.d.ts +0 -1
  46. package/es/components/FileTypeIcon/FileTypeIcon.d.ts +0 -6
  47. package/es/components/FileTypeIcon/index.d.ts +0 -1
  48. package/es/components/GravityCode/GravityCode.d.ts +0 -9
  49. package/es/components/GravityCode/index.d.ts +0 -1
  50. package/es/components/GravityPreview/ForceUpdate.d.ts +0 -6
  51. package/es/components/GravityPreview/GravityPreview.d.ts +0 -7
  52. package/es/components/GravityPreview/GravitySdk.d.ts +0 -10
  53. package/es/components/GravityPreview/index.d.ts +0 -1
  54. package/es/components/SourcesView/SourcesView.d.ts +0 -9
  55. package/es/components/SourcesView/index.d.ts +0 -1
  56. package/es/demo/index.d.ts +0 -1
  57. package/es/index.d.ts +0 -30
  58. package/es/types/SyncCodeGenResult.d.ts +0 -16
  59. package/es/types/index.d.ts +0 -1
  60. package/es/utils/utils.d.ts +0 -26
  61. package/lib/components/CodeGenActionBtn/CodeGenActionBtn.d.ts +0 -8
  62. package/lib/components/CodeGenActionBtn/index.d.ts +0 -1
  63. package/lib/components/CodeGenPreview/CodeGenPreview.d.ts +0 -8
  64. package/lib/components/CodeGenPreview/fixPreviewCode.d.ts +0 -2
  65. package/lib/components/CodeGenPreview/index.d.ts +0 -1
  66. package/lib/components/CodeGenPreview/useIsInIntranet.d.ts +0 -4
  67. package/lib/components/CodeGenResult/CodeGenResult.d.ts +0 -9
  68. package/lib/components/CodeGenResult/index.d.ts +0 -1
  69. package/lib/components/CodeSandboxPreview/CodeSandboxPreview.d.ts +0 -4
  70. package/lib/components/CodeSandboxPreview/index.d.ts +0 -1
  71. package/lib/components/FileTypeIcon/FileTypeIcon.d.ts +0 -6
  72. package/lib/components/FileTypeIcon/index.d.ts +0 -1
  73. package/lib/components/GravityCode/GravityCode.d.ts +0 -9
  74. package/lib/components/GravityCode/index.d.ts +0 -1
  75. package/lib/components/GravityPreview/ForceUpdate.d.ts +0 -6
  76. package/lib/components/GravityPreview/GravityPreview.d.ts +0 -7
  77. package/lib/components/GravityPreview/GravitySdk.d.ts +0 -10
  78. package/lib/components/GravityPreview/index.d.ts +0 -1
  79. package/lib/components/SourcesView/SourcesView.d.ts +0 -9
  80. package/lib/components/SourcesView/index.d.ts +0 -1
  81. package/lib/demo/index.d.ts +0 -1
  82. package/lib/index.d.ts +0 -30
  83. package/lib/types/SyncCodeGenResult.d.ts +0 -16
  84. package/lib/types/index.d.ts +0 -1
  85. package/lib/utils/utils.d.ts +0 -26
@@ -1,56 +1,56 @@
1
- body {
2
- font-family: PingFangSC-Regular, Roboto, Helvetica Neue, Helvetica, Tahoma, Arial, PingFang SC-Light, Microsoft YaHei;
3
- font-size: 12px;
4
- * {
5
- box-sizing: border-box;
6
- }
7
- }
8
-
9
- body,
10
- #lce-container {
11
- position: fixed;
12
- left: 0;
13
- right: 0;
14
- bottom: 0;
15
- top: 0;
16
- box-sizing: border-box;
17
- padding: 0;
18
- margin: 0;
19
- overflow: hidden;
20
- text-rendering: optimizeLegibility;
21
- -webkit-user-select: none;
22
- -webkit-user-drag: none;
23
- -webkit-text-size-adjust: none;
24
- -webkit-touch-callout: none;
25
- -webkit-font-smoothing: antialiased;
26
- #engine {
27
- width: 100%;
28
- height: 100%;
29
- }
30
- }
31
-
32
- html {
33
- min-width: 1024px;
34
- }
35
-
36
- .save-sample {
37
- width: 80px;
38
- height: 30px;
39
- background-color: #5584ff;
40
- border: none;
41
- outline: none;
42
- border-radius: 4px;
43
- color: white;
44
- cursor: pointer;
45
- }
46
-
47
- .load-assets {
48
- width: 100px;
49
- height: 30px;
50
- background-color: #5584ff;
51
- border: none;
52
- outline: none;
53
- border-radius: 4px;
54
- color: white;
55
- cursor: pointer;
56
- }
1
+ body {
2
+ font-family: PingFangSC-Regular, Roboto, Helvetica Neue, Helvetica, Tahoma, Arial, PingFang SC-Light, Microsoft YaHei;
3
+ font-size: 12px;
4
+ * {
5
+ box-sizing: border-box;
6
+ }
7
+ }
8
+
9
+ body,
10
+ #lce-container {
11
+ position: fixed;
12
+ left: 0;
13
+ right: 0;
14
+ bottom: 0;
15
+ top: 0;
16
+ box-sizing: border-box;
17
+ padding: 0;
18
+ margin: 0;
19
+ overflow: hidden;
20
+ text-rendering: optimizeLegibility;
21
+ -webkit-user-select: none;
22
+ -webkit-user-drag: none;
23
+ -webkit-text-size-adjust: none;
24
+ -webkit-touch-callout: none;
25
+ -webkit-font-smoothing: antialiased;
26
+ #engine {
27
+ width: 100%;
28
+ height: 100%;
29
+ }
30
+ }
31
+
32
+ html {
33
+ min-width: 1024px;
34
+ }
35
+
36
+ .save-sample {
37
+ width: 80px;
38
+ height: 30px;
39
+ background-color: #5584ff;
40
+ border: none;
41
+ outline: none;
42
+ border-radius: 4px;
43
+ color: white;
44
+ cursor: pointer;
45
+ }
46
+
47
+ .load-assets {
48
+ width: 100px;
49
+ height: 30px;
50
+ background-color: #5584ff;
51
+ border: none;
52
+ outline: none;
53
+ border-radius: 4px;
54
+ color: white;
55
+ cursor: pointer;
56
+ }
package/lib/index.js CHANGED
@@ -7,8 +7,7 @@ var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"))
7
7
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
8
8
  var CodeGenerator = _interopRequireWildcard(require("@dckj-npm/lowcode-code-generator/standalone-loader"));
9
9
  var _CodeGenActionBtn = require("./components/CodeGenActionBtn");
10
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
11
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { "default": e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n["default"] = e, t && t.set(e, n), n; }
10
+ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t2 in e) "default" !== _t2 && {}.hasOwnProperty.call(e, _t2) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t2)) && (i.get || i.set) ? o(f, _t2, i) : f[_t2] = e[_t2]); return f; })(e, t); }
12
11
  var codeGeneratorPlugin = function codeGeneratorPlugin(ctx, options) {
13
12
  return {
14
13
  // 插件对外暴露的数据和方法
@@ -20,7 +19,8 @@ var codeGeneratorPlugin = function codeGeneratorPlugin(ctx, options) {
20
19
  // 插件的初始化函数,在引擎初始化之后会立刻调用
21
20
  init: function init() {
22
21
  return (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee() {
23
- return _regenerator["default"].wrap(function _callee$(_context) {
22
+ var _t;
23
+ return _regenerator["default"].wrap(function (_context) {
24
24
  while (1) switch (_context.prev = _context.next) {
25
25
  case 0:
26
26
  _context.prev = 0;
@@ -42,18 +42,18 @@ var codeGeneratorPlugin = function codeGeneratorPlugin(ctx, options) {
42
42
 
43
43
  // 提前初始化下,这样后面用的时候更快
44
44
  CodeGenerator.init();
45
- _context.next = 9;
45
+ _context.next = 2;
46
46
  break;
47
- case 5:
48
- _context.prev = 5;
49
- _context.t0 = _context["catch"](0);
50
- console.error('[plugin-code-geneator] failed to init: ', _context.t0);
51
- throw _context.t0;
52
- case 9:
47
+ case 1:
48
+ _context.prev = 1;
49
+ _t = _context["catch"](0);
50
+ console.error('[plugin-code-geneator] failed to init: ', _t);
51
+ throw _t;
52
+ case 2:
53
53
  case "end":
54
54
  return _context.stop();
55
55
  }
56
- }, _callee, null, [[0, 5]]);
56
+ }, _callee, null, [[0, 1]]);
57
57
  }))();
58
58
  },
59
59
  destroy: function destroy() {}
@@ -8,24 +8,24 @@ exports.getResourceName = exports.getResourceListFromLocalStorage = void 0;
8
8
  exports.getValueFromQueryByName = getValueFromQueryByName;
9
9
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
10
10
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
- /**
12
- * 从缓存获取ResourceList
13
- * @param scenarioName
11
+ /**
12
+ * 从缓存获取ResourceList
13
+ * @param scenarioName
14
14
  */
15
15
  var getResourceListFromLocalStorage = exports.getResourceListFromLocalStorage = /*#__PURE__*/function () {
16
16
  var _ref = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee(scenarioName) {
17
- return _regenerator["default"].wrap(function _callee$(_context) {
17
+ return _regenerator["default"].wrap(function (_context) {
18
18
  while (1) switch (_context.prev = _context.next) {
19
19
  case 0:
20
20
  if (scenarioName) {
21
- _context.next = 3;
21
+ _context.next = 1;
22
22
  break;
23
23
  }
24
24
  console.error('scenarioName is required!');
25
25
  return _context.abrupt("return");
26
- case 3:
26
+ case 1:
27
27
  return _context.abrupt("return", JSON.parse(window.localStorage.getItem(getResourceName(scenarioName)) || '[{"title":"首页","slug":"index","id": "index"}]'));
28
- case 4:
28
+ case 2:
29
29
  case "end":
30
30
  return _context.stop();
31
31
  }
@@ -36,31 +36,28 @@ var getResourceListFromLocalStorage = exports.getResourceListFromLocalStorage =
36
36
  };
37
37
  }();
38
38
 
39
- /**
40
- * 根据ResourceList获取所有schema
41
- * @param scenarioName
42
- * @param ResourceList
39
+ /**
40
+ * 根据ResourceList获取所有schema
41
+ * @param scenarioName
42
+ * @param ResourceList
43
43
  */
44
44
  var getAllSchemaByResourceList = exports.getAllSchemaByResourceList = /*#__PURE__*/function () {
45
45
  var _ref2 = (0, _asyncToGenerator2["default"])(/*#__PURE__*/_regenerator["default"].mark(function _callee2(scenarioName, ResourceList) {
46
- return _regenerator["default"].wrap(function _callee2$(_context2) {
46
+ return _regenerator["default"].wrap(function (_context2) {
47
47
  while (1) switch (_context2.prev = _context2.next) {
48
48
  case 0:
49
49
  if (ResourceList) {
50
- _context2.next = 3;
50
+ _context2.next = 1;
51
51
  break;
52
52
  }
53
53
  console.error('ResourceList is required!');
54
54
  return _context2.abrupt("return");
55
- case 3:
55
+ case 1:
56
56
  return _context2.abrupt("return", ResourceList.map(function (item) {
57
- console.log('ResourceList.map', item);
58
- console.log('getLSName(scenarioName, item.id)', getLSName(scenarioName, item.id));
59
57
  var localSchema = window.localStorage.getItem(getLSName(scenarioName, item.id)) || '{}';
60
- console.log('localSchema', localSchema);
61
58
  return JSON.parse(localSchema);
62
59
  }));
63
- case 4:
60
+ case 2:
64
61
  case "end":
65
62
  return _context2.stop();
66
63
  }
@@ -77,18 +74,18 @@ var getResourceName = exports.getResourceName = function getResourceName(scenari
77
74
  return scenarioName + ":" + ns;
78
75
  };
79
76
 
80
- /**
81
- * 获取项目id
77
+ /**
78
+ * 获取项目id
82
79
  */
83
80
  function getProjectId() {
84
81
  return getValueFromQueryByName('projectId', 'general');
85
82
  }
86
83
 
87
- /**
88
- * 获取地址栏参数值
89
- * @param queryName
90
- * @param defaultValue
91
- * @returns {string}
84
+ /**
85
+ * 获取地址栏参数值
86
+ * @param queryName
87
+ * @param defaultValue
88
+ * @returns {string}
92
89
  */
93
90
  function getValueFromQueryByName(queryName, defaultValue) {
94
91
  if (defaultValue === void 0) {
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
- {
2
- "name": "@dckj-npm/lowcode-plugin-code-generator",
3
- "version": "1.3.2",
4
- "description": "集团低代码引擎 - 浏览器出码插件",
5
- "main": "lib/index.js",
6
- "module": "es/index.js",
7
- "types": "es/index.d.ts",
8
- "files": [
9
- "lib",
10
- "es",
11
- "README.md"
12
- ],
13
- "scripts": {
14
- "start": "npm run dev",
15
- "dev": "cross-env NODE_ENV=development build-scripts start --config build.dev.json --host localhost",
16
- "build": "build-scripts build --skip-demo",
17
- "clean": "rimraf es lib dist",
18
- "prettier": "prettier --write 'src/**/*.{js,jsx,tsx,ts,less,md,json}'",
19
- "prepablishOnly": "npm run clean && npm run build"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "git@gitlab.alibaba-inc.com:ali-lowcode/code-generator-demo.git"
24
- },
25
- "keywords": [
26
- "出码"
27
- ],
28
- "authors": [
29
- {
30
- "name": "zgm"
31
- }
32
- ],
33
- "license": "MIT",
34
- "dependencies": {
35
- "@alilc/lowcode-code-generator": "^1.0.4",
36
- "@alilc/lowcode-plugin-base-monaco-editor": "^1.0.0",
37
- "@alilc/lowcode-types": "^1.0.0",
38
- "@dckj-npm/lowcode-code-generator": "^1.2.16",
39
- "@types/file-saver": "^2.0.4",
40
- "@types/js-base64": "^3.3.1",
41
- "@types/string-natural-compare": "^3.0.2",
42
- "codesandbox": "^2.2.3",
43
- "file-saver": "^2.0.5",
44
- "js-base64": "^3.6.1",
45
- "jszip": "^3.7.1",
46
- "semver": "^7.3.5",
47
- "string-natural-compare": "^3.0.1",
48
- "tslib": "^2.3.1"
49
- },
50
- "peerDependencies": {
51
- "@alilc/lowcode-engine": "^1.0.0",
52
- "react": "16.x || 17.x"
53
- },
54
- "devDependencies": {
55
- "@alib/build-scripts": "^0.1.18",
56
- "@alifd/theme-lowcode-light": "^0.2.1",
57
- "@alilc/lowcode-engine": "^1.0.0",
58
- "@alilc/lowcode-engine-ext": "^1.0.0",
59
- "@alilc/lowcode-plugin-code-editor": "^1.0.1",
60
- "@alilc/lowcode-plugin-components-pane": "^1.0.2",
61
- "@alilc/lowcode-plugin-datasource-pane": "^1.0.3",
62
- "@alilc/lowcode-plugin-inject": "^1.0.0",
63
- "@alilc/lowcode-plugin-manual": "^1.0.3",
64
- "@alilc/lowcode-plugin-schema": "^1.0.0",
65
- "@alilc/lowcode-plugin-simulator-select": "^1.0.0",
66
- "@alilc/lowcode-plugin-undo-redo": "^1.0.0",
67
- "@alilc/lowcode-plugin-zh-en": "^1.0.0",
68
- "@alilc/lowcode-react-renderer": "^1.0.0",
69
- "@alilc/lowcode-setter-behavior": "^1.0.0",
70
- "@alilc/lowcode-setter-title": "^1.0.2",
71
- "@alilc/lowcode-types": "^1.0.0",
72
- "@types/classnames": "^2.2.7",
73
- "@types/events": "^3.0.0",
74
- "@types/node": "^13.7.1",
75
- "@types/react": "^16.8.3",
76
- "@types/react-dom": "^16.8.2",
77
- "@types/streamsaver": "^2.0.0",
78
- "build-plugin-component": "^0.2.10",
79
- "build-plugin-fusion": "^0.1.0",
80
- "build-plugin-moment-locales": "^0.1.0",
81
- "build-plugin-react-app": "^1.1.2",
82
- "cross-env": "^7.0.3",
83
- "prettier": "^2.5.1",
84
- "react": "^16.8.3",
85
- "react-dom": "^16.8.3",
86
- "rimraf": "^3.0.2",
87
- "tsconfig-paths-webpack-plugin": "^3.2.0",
88
- "typescript": "^4.5.4"
89
- },
90
- "publishConfig": {
91
- "access": "public",
92
- "registry": "https://registry.npmjs.org/"
93
- }
94
- }
1
+ {
2
+ "name": "@dckj-npm/lowcode-plugin-code-generator",
3
+ "version": "1.3.4",
4
+ "description": "集团低代码引擎 - 浏览器出码插件",
5
+ "main": "lib/index.js",
6
+ "module": "es/index.js",
7
+ "types": "es/index.d.ts",
8
+ "files": [
9
+ "lib",
10
+ "es",
11
+ "README.md"
12
+ ],
13
+ "scripts": {
14
+ "start": "npm run dev",
15
+ "dev": "cross-env NODE_ENV=development build-scripts start --config build.dev.json --host localhost",
16
+ "build": "build-scripts build --skip-demo",
17
+ "clean": "rimraf es lib dist",
18
+ "prettier": "prettier --write 'src/**/*.{js,jsx,tsx,ts,less,md,json}'",
19
+ "prepablishOnly": "npm run clean && npm run build"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git@gitlab.alibaba-inc.com:ali-lowcode/code-generator-demo.git"
24
+ },
25
+ "keywords": [
26
+ "出码"
27
+ ],
28
+ "authors": [
29
+ {
30
+ "name": "zgm"
31
+ }
32
+ ],
33
+ "license": "MIT",
34
+ "dependencies": {
35
+ "@alilc/lowcode-code-generator": "^1.0.4",
36
+ "@alilc/lowcode-plugin-base-monaco-editor": "^1.0.0",
37
+ "@alilc/lowcode-types": "^1.0.0",
38
+ "@dckj-npm/lowcode-code-generator": "^1.2.21",
39
+ "@types/file-saver": "^2.0.4",
40
+ "@types/js-base64": "^3.3.1",
41
+ "@types/string-natural-compare": "^3.0.2",
42
+ "codesandbox": "^2.2.3",
43
+ "file-saver": "^2.0.5",
44
+ "js-base64": "^3.6.1",
45
+ "jszip": "^3.7.1",
46
+ "semver": "^7.3.5",
47
+ "string-natural-compare": "^3.0.1",
48
+ "tslib": "^2.3.1"
49
+ },
50
+ "peerDependencies": {
51
+ "@alilc/lowcode-engine": "^1.0.0",
52
+ "react": "16.x || 17.x"
53
+ },
54
+ "devDependencies": {
55
+ "@alib/build-scripts": "^0.1.18",
56
+ "@alifd/theme-lowcode-light": "^0.2.1",
57
+ "@alilc/lowcode-engine": "^1.0.0",
58
+ "@alilc/lowcode-engine-ext": "^1.0.0",
59
+ "@alilc/lowcode-plugin-code-editor": "^1.0.1",
60
+ "@alilc/lowcode-plugin-components-pane": "^1.0.2",
61
+ "@alilc/lowcode-plugin-datasource-pane": "^1.0.3",
62
+ "@alilc/lowcode-plugin-inject": "^1.0.0",
63
+ "@alilc/lowcode-plugin-manual": "^1.0.3",
64
+ "@alilc/lowcode-plugin-schema": "^1.0.0",
65
+ "@alilc/lowcode-plugin-simulator-select": "^1.0.0",
66
+ "@alilc/lowcode-plugin-undo-redo": "^1.0.0",
67
+ "@alilc/lowcode-plugin-zh-en": "^1.0.0",
68
+ "@alilc/lowcode-react-renderer": "^1.0.0",
69
+ "@alilc/lowcode-setter-behavior": "^1.0.0",
70
+ "@alilc/lowcode-setter-title": "^1.0.2",
71
+ "@alilc/lowcode-types": "^1.0.0",
72
+ "@types/classnames": "^2.2.7",
73
+ "@types/events": "^3.0.0",
74
+ "@types/node": "^13.7.1",
75
+ "@types/react": "^16.8.3",
76
+ "@types/react-dom": "^16.8.2",
77
+ "@types/streamsaver": "^2.0.0",
78
+ "build-plugin-component": "^0.2.10",
79
+ "build-plugin-fusion": "^0.1.0",
80
+ "build-plugin-moment-locales": "^0.1.0",
81
+ "build-plugin-react-app": "^1.1.2",
82
+ "cross-env": "^7.0.3",
83
+ "prettier": "^2.5.1",
84
+ "react": "^16.8.3",
85
+ "react-dom": "^16.8.3",
86
+ "rimraf": "^3.0.2",
87
+ "tsconfig-paths-webpack-plugin": "^3.2.0",
88
+ "typescript": "^4.5.4"
89
+ },
90
+ "publishConfig": {
91
+ "access": "public",
92
+ "registry": "https://registry.npmjs.org/"
93
+ }
94
+ }
@@ -1,8 +0,0 @@
1
- /// <reference types="react" />
2
- import './CodeGenActionBtn.scss';
3
- import type { ILowCodePluginContext } from '@alilc/lowcode-engine';
4
- import { ProjectSchema } from '@alilc/lowcode-types';
5
- export declare function CodeGenActionBtn({ ctx }: {
6
- ctx: ILowCodePluginContext;
7
- }): JSX.Element;
8
- export declare function fixSchema(schema: ProjectSchema): Promise<ProjectSchema>;
@@ -1 +0,0 @@
1
- export * from './CodeGenActionBtn';
@@ -1,8 +0,0 @@
1
- import type { GravityCode } from '../GravityCode';
2
- import './CodeGenPreview.scss';
3
- export declare type CodeGenPreviewProps = {
4
- code: GravityCode | null;
5
- height: string | number;
6
- refresh: string | number;
7
- };
8
- export declare function CodeGenPreview(props: CodeGenPreviewProps): any;
@@ -1,2 +0,0 @@
1
- import { GravityCode } from '../GravityCode/GravityCode';
2
- export declare function fixPreviewCode(code: GravityCode | null, unused?: unknown): GravityCode | null;
@@ -1 +0,0 @@
1
- export * from './CodeGenPreview';
@@ -1,4 +0,0 @@
1
- /**
2
- * 判断是否在内网环境中中
3
- */
4
- export declare function useIsInIntranet(): any;
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import './CodeGenResult.scss';
3
- import { Result } from '@alilc/lowcode-code-generator/standalone-loader';
4
- import { ProjectSchema } from '@alilc/lowcode-types';
5
- export declare function CodeGenResult({ result, schema }: {
6
- result: Result | null | undefined;
7
- schema: ProjectSchema | null;
8
- originalSchema: ProjectSchema | null;
9
- }): JSX.Element;
@@ -1 +0,0 @@
1
- export * from './CodeGenResult';
@@ -1,4 +0,0 @@
1
- /// <reference types="react" />
2
- import type { CodeGenPreviewProps } from '../CodeGenPreview';
3
- import './CodeSandboxPreview.scss';
4
- export declare function CodeSandboxPreview({ code, height }: CodeGenPreviewProps): JSX.Element;
@@ -1 +0,0 @@
1
- export * from './CodeSandboxPreview';
@@ -1,6 +0,0 @@
1
- import './FileTypeIcon.scss';
2
- import React from 'react';
3
- export declare type FileTypeIconProps = React.HtmlHTMLAttributes<HTMLSpanElement> & {
4
- type: string;
5
- };
6
- export declare function FileTypeIcon({ type, ...props }: FileTypeIconProps): JSX.Element;
@@ -1 +0,0 @@
1
- export * from './FileTypeIcon';
@@ -1,9 +0,0 @@
1
- export declare type GravityCode = {
2
- type: string;
3
- modules: Record<string, {
4
- entry?: 1;
5
- packagejson?: 1;
6
- code: string;
7
- fpath: string;
8
- }>;
9
- };
@@ -1 +0,0 @@
1
- export * from './GravityCode';
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export interface ForceUpdateProps {
3
- watchKey: string | number;
4
- children?: React.ReactNode;
5
- }
6
- export declare function ForceUpdate({ watchKey, children }: ForceUpdateProps): JSX.Element;
@@ -1,7 +0,0 @@
1
- /// <reference types="react" />
2
- import { GravityCode } from '../GravityCode/GravityCode';
3
- export declare function GravityPreview({ code, height, refresh }: {
4
- code: GravityCode | null;
5
- height: string | number;
6
- refresh: string | number;
7
- }): JSX.Element;
@@ -1,10 +0,0 @@
1
- /// <reference types="react" />
2
- export declare function getHeight(): any;
3
- export declare function refresh(): void;
4
- export declare function clear(): void;
5
- export declare function getBoostState(): any;
6
- export declare function toggleBoostState(): void;
7
- export declare function isPrivateMode(): any;
8
- export declare function change(filename: any, content: any): void;
9
- declare const _default: (props: any) => JSX.Element;
10
- export default _default;
@@ -1 +0,0 @@
1
- export * from './GravityPreview';
@@ -1,9 +0,0 @@
1
- /// <reference types="react" />
2
- import './SourcesView.scss';
3
- import '@alilc/lowcode-plugin-base-monaco-editor/lib/style';
4
- import { GravityCode } from '../GravityCode';
5
- export declare function SourcesView({ height, code, onCodeChange }: {
6
- height: string;
7
- code: GravityCode;
8
- onCodeChange: (code: GravityCode) => void;
9
- }): JSX.Element;
@@ -1 +0,0 @@
1
- export * from './SourcesView';
@@ -1 +0,0 @@
1
- import './index.scss';
package/es/index.d.ts DELETED
@@ -1,30 +0,0 @@
1
- import * as CodeGenerator from '@dckj-npm/lowcode-code-generator/standalone-loader';
2
- export interface ICodeGenPlugin {
3
- generateCode: typeof CodeGenerator.generateCode;
4
- }
5
- export declare type CodeGenPluginOptions = {
6
- /** 是否要禁用出码的动作按钮(默认: 否) */
7
- disableCodeGenActionBtn?: boolean;
8
- };
9
- declare const codeGeneratorPlugin: {
10
- (ctx: any, options?: CodeGenPluginOptions): {
11
- exports(): {
12
- generateCode: typeof CodeGenerator.generateCode;
13
- };
14
- init(): Promise<void>;
15
- destroy(): void;
16
- };
17
- pluginName: string;
18
- meta: {
19
- dependencies: any[];
20
- preferenceDeclaration: {
21
- title: string;
22
- properties: {
23
- key: string;
24
- type: string;
25
- description: string;
26
- }[];
27
- };
28
- };
29
- };
30
- export default codeGeneratorPlugin;
@@ -1,16 +0,0 @@
1
- export declare type SyncCodeGenResult = {
2
- type: 'SYNC_RESULT';
3
- sourceFiles: Array<{
4
- pathName: string;
5
- content: string;
6
- }>;
7
- };
8
- /**
9
- * 页面参数
10
- */
11
- export interface ResourceListType {
12
- title: string;
13
- slug: string;
14
- id: string;
15
- firstPage: 'true' | 'false';
16
- }
@@ -1 +0,0 @@
1
- export * from './SyncCodeGenResult';