@dckj-npm/lowcode-plugin-code-generator 1.3.1 → 1.3.3

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 (73) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +53 -52
  3. package/es/components/CodeGenActionBtn/CodeGenActionBtn.js +11 -14
  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 +4 -4
  7. package/es/components/CodeGenResult/CodeGenResult.scss +7 -7
  8. package/es/components/CodeSandboxPreview/CodeSandboxPreview.scss +18 -18
  9. package/es/components/FileTypeIcon/FileTypeIcon.scss +36 -36
  10. package/es/components/SourcesView/SourcesView.scss +24 -24
  11. package/es/demo/index.scss +56 -56
  12. package/es/utils/utils.js +14 -17
  13. package/lib/components/CodeGenActionBtn/CodeGenActionBtn.js +11 -14
  14. package/lib/components/CodeGenActionBtn/CodeGenActionBtn.scss +13 -13
  15. package/lib/components/CodeGenPreview/CodeGenPreview.scss +16 -16
  16. package/lib/components/CodeGenPreview/useIsInIntranet.js +4 -4
  17. package/lib/components/CodeGenResult/CodeGenResult.scss +7 -7
  18. package/lib/components/CodeSandboxPreview/CodeSandboxPreview.scss +18 -18
  19. package/lib/components/FileTypeIcon/FileTypeIcon.scss +36 -36
  20. package/lib/components/SourcesView/SourcesView.scss +24 -24
  21. package/lib/demo/index.scss +56 -56
  22. package/lib/utils/utils.js +14 -17
  23. package/package.json +94 -94
  24. package/es/components/CodeGenActionBtn/CodeGenActionBtn.d.ts +0 -8
  25. package/es/components/CodeGenActionBtn/index.d.ts +0 -1
  26. package/es/components/CodeGenPreview/CodeGenPreview.d.ts +0 -8
  27. package/es/components/CodeGenPreview/fixPreviewCode.d.ts +0 -2
  28. package/es/components/CodeGenPreview/index.d.ts +0 -1
  29. package/es/components/CodeGenPreview/useIsInIntranet.d.ts +0 -4
  30. package/es/components/CodeGenResult/CodeGenResult.d.ts +0 -9
  31. package/es/components/CodeGenResult/index.d.ts +0 -1
  32. package/es/components/CodeSandboxPreview/CodeSandboxPreview.d.ts +0 -4
  33. package/es/components/CodeSandboxPreview/index.d.ts +0 -1
  34. package/es/components/FileTypeIcon/FileTypeIcon.d.ts +0 -6
  35. package/es/components/FileTypeIcon/index.d.ts +0 -1
  36. package/es/components/GravityCode/GravityCode.d.ts +0 -9
  37. package/es/components/GravityCode/index.d.ts +0 -1
  38. package/es/components/GravityPreview/ForceUpdate.d.ts +0 -6
  39. package/es/components/GravityPreview/GravityPreview.d.ts +0 -7
  40. package/es/components/GravityPreview/GravitySdk.d.ts +0 -10
  41. package/es/components/GravityPreview/index.d.ts +0 -1
  42. package/es/components/SourcesView/SourcesView.d.ts +0 -9
  43. package/es/components/SourcesView/index.d.ts +0 -1
  44. package/es/demo/index.d.ts +0 -1
  45. package/es/index.d.ts +0 -30
  46. package/es/types/SyncCodeGenResult.d.ts +0 -16
  47. package/es/types/index.d.ts +0 -1
  48. package/es/utils/utils.d.ts +0 -26
  49. package/lib/components/CodeGenActionBtn/CodeGenActionBtn.d.ts +0 -8
  50. package/lib/components/CodeGenActionBtn/index.d.ts +0 -1
  51. package/lib/components/CodeGenPreview/CodeGenPreview.d.ts +0 -8
  52. package/lib/components/CodeGenPreview/fixPreviewCode.d.ts +0 -2
  53. package/lib/components/CodeGenPreview/index.d.ts +0 -1
  54. package/lib/components/CodeGenPreview/useIsInIntranet.d.ts +0 -4
  55. package/lib/components/CodeGenResult/CodeGenResult.d.ts +0 -9
  56. package/lib/components/CodeGenResult/index.d.ts +0 -1
  57. package/lib/components/CodeSandboxPreview/CodeSandboxPreview.d.ts +0 -4
  58. package/lib/components/CodeSandboxPreview/index.d.ts +0 -1
  59. package/lib/components/FileTypeIcon/FileTypeIcon.d.ts +0 -6
  60. package/lib/components/FileTypeIcon/index.d.ts +0 -1
  61. package/lib/components/GravityCode/GravityCode.d.ts +0 -9
  62. package/lib/components/GravityCode/index.d.ts +0 -1
  63. package/lib/components/GravityPreview/ForceUpdate.d.ts +0 -6
  64. package/lib/components/GravityPreview/GravityPreview.d.ts +0 -7
  65. package/lib/components/GravityPreview/GravitySdk.d.ts +0 -10
  66. package/lib/components/GravityPreview/index.d.ts +0 -1
  67. package/lib/components/SourcesView/SourcesView.d.ts +0 -9
  68. package/lib/components/SourcesView/index.d.ts +0 -1
  69. package/lib/demo/index.d.ts +0 -1
  70. package/lib/index.d.ts +0 -30
  71. package/lib/types/SyncCodeGenResult.d.ts +0 -16
  72. package/lib/types/index.d.ts +0 -1
  73. package/lib/utils/utils.d.ts +0 -26
package/package.json CHANGED
@@ -1,94 +1,94 @@
1
- {
2
- "name": "@dckj-npm/lowcode-plugin-code-generator",
3
- "version": "1.3.1",
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.15",
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.3",
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.18",
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';
@@ -1,26 +0,0 @@
1
- import { ResourceListType } from "../types";
2
- import { IPublicTypeProjectSchema } from "@alilc/lowcode-types";
3
- /**
4
- * 从缓存获取ResourceList
5
- * @param scenarioName
6
- */
7
- export declare const getResourceListFromLocalStorage: (scenarioName: string) => Promise<ResourceListType[]>;
8
- /**
9
- * 根据ResourceList获取所有schema
10
- * @param scenarioName
11
- * @param ResourceList
12
- */
13
- export declare const getAllSchemaByResourceList: (scenarioName: string, ResourceList: ResourceListType[]) => Promise<IPublicTypeProjectSchema[]>;
14
- export declare const getResourceName: (scenarioName: string, ns?: string) => string;
15
- /**
16
- * 获取项目id
17
- */
18
- export declare function getProjectId(): string;
19
- /**
20
- * 获取地址栏参数值
21
- * @param queryName
22
- * @param defaultValue
23
- * @returns {string}
24
- */
25
- export declare function getValueFromQueryByName(queryName: string, defaultValue?: string): string;
26
- export declare const getLSName: (scenarioName: string, id?: string, ns?: string) => string;
@@ -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/lib/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';
@@ -1,26 +0,0 @@
1
- import { ResourceListType } from "../types";
2
- import { IPublicTypeProjectSchema } from "@alilc/lowcode-types";
3
- /**
4
- * 从缓存获取ResourceList
5
- * @param scenarioName
6
- */
7
- export declare const getResourceListFromLocalStorage: (scenarioName: string) => Promise<ResourceListType[]>;
8
- /**
9
- * 根据ResourceList获取所有schema
10
- * @param scenarioName
11
- * @param ResourceList
12
- */
13
- export declare const getAllSchemaByResourceList: (scenarioName: string, ResourceList: ResourceListType[]) => Promise<IPublicTypeProjectSchema[]>;
14
- export declare const getResourceName: (scenarioName: string, ns?: string) => string;
15
- /**
16
- * 获取项目id
17
- */
18
- export declare function getProjectId(): string;
19
- /**
20
- * 获取地址栏参数值
21
- * @param queryName
22
- * @param defaultValue
23
- * @returns {string}
24
- */
25
- export declare function getValueFromQueryByName(queryName: string, defaultValue?: string): string;
26
- export declare const getLSName: (scenarioName: string, id?: string, ns?: string) => string;