@maxelms/create-plugin-cli 1.1.25-master.1 → 1.1.27

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 (92) hide show
  1. package/package.json +1 -1
  2. package/templates/angular-micro-app/.eslintrc.js +3 -0
  3. package/templates/angular-micro-app/README.md +5 -0
  4. package/templates/angular-micro-app/examples/main.css +2 -0
  5. package/templates/angular-micro-app/examples/main.js +2 -0
  6. package/templates/angular-micro-app/examples/main.js.LICENSE.txt +52 -0
  7. package/templates/angular-micro-app/examples/playground.html +1 -0
  8. package/templates/angular-micro-app/examples/react-dom.production.min.js +2 -0
  9. package/templates/angular-micro-app/examples/react-dom.production.min.js.LICENSE.txt +8 -0
  10. package/templates/angular-micro-app/examples/react.production.min.js +2 -0
  11. package/templates/angular-micro-app/examples/react.production.min.js.LICENSE.txt +8 -0
  12. package/templates/angular-micro-app/examples/vue.runtime.global.js +9054 -0
  13. package/templates/angular-micro-app/examples/zone.umd.min.js +2 -0
  14. package/templates/angular-micro-app/examples/zone.umd.min.js.LICENSE.txt +29 -0
  15. package/templates/angular-micro-app/manifest.json.tpl +3 -0
  16. package/templates/angular-micro-app/package.json.tpl +40 -0
  17. package/templates/angular-micro-app/pnpm-lock.yaml +7998 -0
  18. package/templates/angular-micro-app/public/configuration.json +34 -0
  19. package/templates/angular-micro-app/public/index.html.tpl +15 -0
  20. package/templates/angular-micro-app/src/about.component.ts +42 -0
  21. package/templates/angular-micro-app/src/app-routing.module.ts +12 -0
  22. package/templates/angular-micro-app/src/app.component.css +22 -0
  23. package/templates/angular-micro-app/src/app.component.html +304 -0
  24. package/templates/angular-micro-app/src/app.component.ts +42 -0
  25. package/templates/angular-micro-app/src/app.module.ts +27 -0
  26. package/templates/angular-micro-app/src/contact.component.ts +42 -0
  27. package/templates/angular-micro-app/src/home.component.ts +42 -0
  28. package/templates/angular-micro-app/src/index.ts +54 -0
  29. package/templates/angular-micro-app/src/props.service.ts +18 -0
  30. package/templates/angular-micro-app/src/single-spa-props.ts +7 -0
  31. package/templates/angular-micro-app/tsconfig.json +25 -0
  32. package/templates/angular-micro-app/webpack.config.js +112 -0
  33. package/templates/angular-micro-button/.eslintrc.js +3 -0
  34. package/templates/angular-micro-button/README.md +5 -0
  35. package/templates/angular-micro-button/manifest.json.tpl +3 -0
  36. package/templates/angular-micro-button/package.json.tpl +39 -0
  37. package/templates/angular-micro-button/pnpm-lock.yaml +7977 -0
  38. package/templates/angular-micro-button/public/configuration.json +34 -0
  39. package/templates/angular-micro-button/public/index.html.tpl +15 -0
  40. package/templates/angular-micro-button/src/app.component.css +10 -0
  41. package/templates/angular-micro-button/src/app.component.html +2 -0
  42. package/templates/angular-micro-button/src/app.component.ts.tpl +38 -0
  43. package/templates/angular-micro-button/src/app.module.ts +27 -0
  44. package/templates/angular-micro-button/src/components/content.component.css +116 -0
  45. package/templates/angular-micro-button/src/components/content.component.html +3 -0
  46. package/templates/angular-micro-button/src/components/content.component.ts +16 -0
  47. package/templates/angular-micro-button/src/index.ts.tpl +107 -0
  48. package/templates/angular-micro-button/src/master-props.ts +7 -0
  49. package/templates/angular-micro-button/tsconfig.json +25 -0
  50. package/templates/angular-micro-button/webpack.config.js +112 -0
  51. package/templates/angular-micro-field/.eslintrc.js +3 -0
  52. package/templates/angular-micro-field/README.md +5 -0
  53. package/templates/angular-micro-field/examples/main.css +2 -0
  54. package/templates/angular-micro-field/examples/main.js +2 -0
  55. package/templates/angular-micro-field/examples/main.js.LICENSE.txt +52 -0
  56. package/templates/angular-micro-field/examples/playground.html +1 -0
  57. package/templates/angular-micro-field/examples/react-dom.production.min.js +2 -0
  58. package/templates/angular-micro-field/examples/react-dom.production.min.js.LICENSE.txt +8 -0
  59. package/templates/angular-micro-field/examples/react.production.min.js +2 -0
  60. package/templates/angular-micro-field/examples/react.production.min.js.LICENSE.txt +8 -0
  61. package/templates/angular-micro-field/examples/vue.runtime.global.js +9054 -0
  62. package/templates/angular-micro-field/examples/zone.umd.min.js +2 -0
  63. package/templates/angular-micro-field/examples/zone.umd.min.js.LICENSE.txt +29 -0
  64. package/templates/angular-micro-field/manifest.json.tpl +3 -0
  65. package/templates/angular-micro-field/package.json.tpl +39 -0
  66. package/templates/angular-micro-field/pnpm-lock.yaml +7977 -0
  67. package/templates/angular-micro-field/public/configuration.json +34 -0
  68. package/templates/angular-micro-field/public/index.html.tpl +15 -0
  69. package/templates/angular-micro-field/src/app.component.css +10 -0
  70. package/templates/angular-micro-field/src/app.component.html +8 -0
  71. package/templates/angular-micro-field/src/app.component.ts.tpl +60 -0
  72. package/templates/angular-micro-field/src/app.module.ts +14 -0
  73. package/templates/angular-micro-field/src/components/content.component.css +116 -0
  74. package/templates/angular-micro-field/src/components/content.component.html +10 -0
  75. package/templates/angular-micro-field/src/components/content.component.ts +21 -0
  76. package/templates/angular-micro-field/src/index.ts.tpl +101 -0
  77. package/templates/angular-micro-field/src/master-props.ts +7 -0
  78. package/templates/angular-micro-field/tsconfig.json +25 -0
  79. package/templates/angular-micro-field/webpack.config.js +112 -0
  80. package/templates/angular-micro-plugin/package.json.tpl +2 -2
  81. package/templates/react-micro-app/package.json.tpl +6 -0
  82. package/templates/react-micro-button/package.json.tpl +5 -0
  83. package/templates/react-micro-button/src/index.tsx +1 -0
  84. package/templates/react-micro-field/package.json.tpl +5 -0
  85. package/templates/react-micro-field-umi/package.json.tpl +5 -0
  86. package/templates/react-micro-plugin/package.json.tpl +5 -0
  87. package/templates/react-micro-plugin-umi/package.json.tpl +5 -0
  88. package/templates/vue3-micro-button/package.json.tpl +1 -1
  89. package/templates/vue3-micro-field/package.json.tpl +1 -1
  90. package/templates/vue3-micro-plugin/package.json.tpl +1 -1
  91. package/templates/vue3vite-micro-button/package.json.tpl +1 -1
  92. package/templates/vue3vite-micro-plugin/package.json.tpl +1 -1
@@ -0,0 +1,34 @@
1
+ {
2
+ "propName1": {
3
+ "label": "配置项一",
4
+ "type": "string",
5
+ "defaultValue": "配置项内容"
6
+ },
7
+ "propName2": {
8
+ "label": "配置项二",
9
+ "type": "number",
10
+ "defaultValue": 350
11
+ },
12
+ "propName3": {
13
+ "label": "配置项三",
14
+ "type": "select",
15
+ "options": [
16
+ {
17
+ "label": "选项1",
18
+ "value": "option1"
19
+ },
20
+ {
21
+ "label": "选项2",
22
+ "value": "option2"
23
+ },
24
+ {
25
+ "label": "选项3",
26
+ "value": "option3"
27
+ }
28
+ ]
29
+ },
30
+ "externalParams": {
31
+ "label": "外部参数",
32
+ "type": "string"
33
+ }
34
+ }
@@ -0,0 +1,15 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+ <title>Maxelms 页面组件 angular13</title>
7
+ <base href="/">
8
+ <meta name="viewport" content="width=device-width, initial-scale=1">
9
+ </head>
10
+
11
+ <body>
12
+ <div id="root-<%= timestamp %>"></div>
13
+ </body>
14
+
15
+ </html>
@@ -0,0 +1,10 @@
1
+ /* App component styles - minimal styles for layout */
2
+ :host {
3
+ font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
4
+ font-size: 14px;
5
+ color: #333;
6
+ box-sizing: border-box;
7
+ -webkit-font-smoothing: antialiased;
8
+ -moz-osx-font-smoothing: grayscale;
9
+ }
10
+
@@ -0,0 +1,8 @@
1
+ <app-content
2
+ [title]="title"
3
+ [propName1]="propName1"
4
+ [propName2]="propName2"
5
+ [value]="value"
6
+ [isFormEditing]="isFormEditing"
7
+ (valueChange)="onValueChange($event)">
8
+ </app-content>
@@ -0,0 +1,60 @@
1
+ import { Component, OnDestroy, OnInit, ChangeDetectorRef } from '@angular/core'
2
+ import { Subscription } from 'rxjs'
3
+ import { MasterPropsSubject } from './master-props'
4
+
5
+ type Value = {
6
+ text?: string
7
+ value?: string
8
+ }
9
+
10
+ @Component({
11
+ selector: '#root-<%= timestamp %>',
12
+ templateUrl: './app.component.html',
13
+ styleUrls: ['./app.component.css'],
14
+ })
15
+ export class AppComponent implements OnInit, OnDestroy {
16
+
17
+ title = 'angular13';
18
+ propName1: string = '';
19
+ propName2: string = '';
20
+ isFormEditing?: boolean = false;
21
+ value?: string = '';
22
+ onChange?: (val: Value) => void;
23
+
24
+ private propsSub?: Subscription;
25
+
26
+ constructor(private cdr: ChangeDetectorRef) {}
27
+
28
+ ngOnInit() {
29
+ console.log('ngOnInit')
30
+
31
+ // 订阅 singleSpaProps
32
+ this.propsSub = MasterPropsSubject.subscribe((props: any) => {
33
+ // console.log('收到主应用传来的 props:', props)
34
+ const {
35
+ configurations, bizData,
36
+ isFormEditing, value, onChange
37
+ } = props || {}
38
+ this.propName1 = configurations?.propName1 || ''
39
+ this.propName2 = configurations?.propName2 || ''
40
+ // this.isFormEditing = isFormEditing || false
41
+ this.isFormEditing = true
42
+ this.value = value?.text || ''
43
+ console.log(value?.text, 123412341234)
44
+ this.onChange = onChange
45
+ this.cdr.detectChanges() // 手动触发变更检测
46
+ })
47
+ }
48
+
49
+ onValueChange(newValue: string): void {
50
+ this.value = newValue;
51
+ console.log('Value changed to:', newValue);
52
+ // 这里可以添加其他逻辑,比如发送到父应用
53
+ this.onChange?.({ text: newValue, value: newValue });
54
+ this.cdr.detectChanges() // 手动触发变更检测
55
+ }
56
+
57
+ ngOnDestroy() {
58
+ this.propsSub?.unsubscribe()
59
+ }
60
+ }
@@ -0,0 +1,14 @@
1
+ import { NgModule } from '@angular/core'
2
+ import { BrowserModule } from '@angular/platform-browser'
3
+ import { AppComponent } from './app.component'
4
+ import { ContentComponent } from './components/content.component'
5
+
6
+ @NgModule({
7
+ declarations: [
8
+ AppComponent,
9
+ ContentComponent,
10
+ ],
11
+ imports: [BrowserModule],
12
+ bootstrap: [AppComponent],
13
+ })
14
+ export class AppModule {}
@@ -0,0 +1,116 @@
1
+ .content {
2
+ display: flex;
3
+ margin: 82px auto 32px;
4
+ padding: 0 16px;
5
+ max-width: 960px;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ }
9
+
10
+ .readonly-text {
11
+ padding: 20px;
12
+ border: 1px solid #ddd;
13
+ border-radius: 8px;
14
+ background-color: #f9f9f9;
15
+ min-width: 300px;
16
+ }
17
+
18
+ .readonly-text p {
19
+ margin: 8px 0;
20
+ color: #333;
21
+ }
22
+
23
+ input {
24
+ padding: 10px;
25
+ border: 1px solid #ccc;
26
+ border-radius: 4px;
27
+ font-size: 14px;
28
+ min-width: 300px;
29
+ }
30
+
31
+ input:focus {
32
+ outline: none;
33
+ border-color: #1976d2;
34
+ box-shadow: 0 0 0 2px rgba(25, 118, 210, 0.2);
35
+ }
36
+
37
+ .card {
38
+ border-radius: 4px;
39
+ border: 1px solid #eee;
40
+ background-color: #fafafa;
41
+ height: 40px;
42
+ width: 200px;
43
+ margin: 0 8px 16px;
44
+ padding: 16px;
45
+ display: flex;
46
+ flex-direction: row;
47
+ justify-content: center;
48
+ align-items: center;
49
+ transition: all 0.2s ease-in-out;
50
+ line-height: 24px;
51
+ }
52
+
53
+ .card.card-small {
54
+ height: 16px;
55
+ width: 168px;
56
+ }
57
+
58
+ .card.highlight-card {
59
+ background-color: #1976d2;
60
+ color: white;
61
+ font-weight: 600;
62
+ border: none;
63
+ width: auto;
64
+ min-width: 30%;
65
+ position: relative;
66
+ }
67
+
68
+ .card.card.highlight-card span {
69
+ margin-left: 60px;
70
+ }
71
+
72
+ svg#rocket {
73
+ width: 80px;
74
+ position: absolute;
75
+ left: -10px;
76
+ top: -24px;
77
+ }
78
+
79
+ svg#rocket-smoke {
80
+ height: calc(100vh - 95px);
81
+ position: absolute;
82
+ top: 10px;
83
+ right: 180px;
84
+ z-index: -10;
85
+ }
86
+
87
+ svg#clouds {
88
+ position: fixed;
89
+ bottom: -160px;
90
+ left: -230px;
91
+ z-index: -10;
92
+ width: 1920px;
93
+ }
94
+
95
+ /* Responsive Styles */
96
+ @media screen and (max-width: 767px) {
97
+ .content {
98
+ width: 100%;
99
+ }
100
+
101
+ .card.highlight-card span {
102
+ margin-left: 72px;
103
+ }
104
+
105
+ svg#rocket-smoke {
106
+ right: 120px;
107
+ transform: rotate(-5deg);
108
+ }
109
+ }
110
+
111
+ @media screen and (max-width: 575px) {
112
+ svg#rocket-smoke {
113
+ display: none;
114
+ visibility: hidden;
115
+ }
116
+ }
@@ -0,0 +1,10 @@
1
+ <div class="content" role="main">
2
+ <!-- 当 isFormEditing 为 true 时显示 input 框 -->
3
+ <input *ngIf="isFormEditing" [title]="propName1" [placeholder]="propName2" [value]="value"
4
+ (input)="onInputChange($event)" />
5
+
6
+ <!-- 当 isFormEditing 为 false 时显示只读文本 -->
7
+ <div *ngIf="!isFormEditing" class="readonly-text">
8
+ {{ value }}
9
+ </div>
10
+ </div>
@@ -0,0 +1,21 @@
1
+ import { Component, Input, Output, EventEmitter } from '@angular/core';
2
+
3
+ @Component({
4
+ selector: 'app-content',
5
+ templateUrl: './content.component.html',
6
+ styleUrls: ['./content.component.css']
7
+ })
8
+ export class ContentComponent {
9
+ @Input() title: string = 'angular13';
10
+ @Input() propName1: string = '';
11
+ @Input() propName2: string = '';
12
+ @Input() value: string = '';
13
+ @Input() isFormEditing: boolean = false;
14
+
15
+ @Output() valueChange = new EventEmitter<string>();
16
+
17
+ onInputChange(event: Event): void {
18
+ const target = event.target as HTMLInputElement;
19
+ this.valueChange.emit(target.value);
20
+ }
21
+ }
@@ -0,0 +1,101 @@
1
+ import { enableProdMode } from '@angular/core'
2
+ import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'
3
+ // import { singleSpaAngular, getSingleSpaExtraProviders } from 'single-spa-angular';
4
+ import { registerPlugin, poweredByMaxelms } from '@maxelms/create-pulgin-api'
5
+
6
+ import { AppModule } from './app.module'
7
+ import { MasterPropsSubject } from './master-props'
8
+
9
+ const container = '#root-<%= timestamp %>'
10
+ const environment = process.env.NODE_ENV === 'production'
11
+ let $root: any
12
+ let appModuleRef: any = null; // 保存应用模块引用
13
+
14
+ if (environment) {
15
+ enableProdMode()
16
+ }
17
+
18
+ if (!poweredByMaxelms) {
19
+ const props = {
20
+ configurations: {
21
+ 'propName1': '11',
22
+ 'propName2': 3502,
23
+ },
24
+ }
25
+ console.log(props, 'props poweredByMaxelms')
26
+ render(props, 'mount')
27
+
28
+ // 为开发环境添加全局卸载函数
29
+ (window as any).unmountAngularApp = unmountApp
30
+ } else {
31
+
32
+ registerPlugin?.({
33
+ bootstrap() {
34
+ },
35
+ mount(props: any) {
36
+ // console.log(props, 'props mount')
37
+ render(props, 'mount')
38
+ $root = document.querySelector(`#${props.containerId} ${container}`)
39
+ },
40
+ update(props: any) {
41
+ // console.log(props, 'props update')
42
+ render(props, 'update')
43
+ },
44
+ unmount(props: any) {
45
+ // console.log(props, 'props unmount')
46
+ unmountApp()
47
+ },
48
+ })
49
+ }
50
+
51
+
52
+ function render(singleSpaProps: any, mode: 'mount' | 'update') {
53
+ MasterPropsSubject.next(singleSpaProps)
54
+
55
+ if (mode === 'mount') {
56
+ // 首次挂载时创建应用
57
+ console.log('首次挂载,创建 Angular 应用')
58
+ appModuleRef = platformBrowserDynamic().bootstrapModule(AppModule, {
59
+ ngZone: 'noop',
60
+ })
61
+ return appModuleRef
62
+ } else if (mode === 'update') {
63
+ // 更新时只发送新的 props,不重新创建应用
64
+ console.log('更新模式,只发送新的 props')
65
+ MasterPropsSubject.next(singleSpaProps)
66
+ return appModuleRef
67
+ }
68
+ }
69
+
70
+ function unmountApp() {
71
+ console.log('卸载 Angular 应用')
72
+
73
+ if (appModuleRef) {
74
+ try {
75
+ // 销毁 Angular 应用实例
76
+ appModuleRef.destroy()
77
+ console.log('Angular 应用已成功销毁')
78
+ } catch (error) {
79
+ console.error('销毁 Angular 应用时出错:', error)
80
+ } finally {
81
+ // 清理引用
82
+ appModuleRef = null
83
+ }
84
+ } else {
85
+ console.log('没有找到 Angular 应用实例,无需销毁')
86
+ }
87
+
88
+ // 清理 DOM 元素
89
+ try {
90
+ const containerElement = document.querySelector(container)
91
+ if (containerElement) {
92
+ containerElement.innerHTML = ''
93
+ console.log('DOM 容器已清理')
94
+ }
95
+ } catch (error) {
96
+ console.error('清理 DOM 时出错:', error)
97
+ }
98
+
99
+ // 清理全局变量
100
+ $root = null
101
+ }
@@ -0,0 +1,7 @@
1
+ import { ReplaySubject } from 'rxjs'
2
+
3
+ export const MasterPropsSubject = new ReplaySubject<MasterProps>(1)
4
+
5
+ // Add any custom single-spa props you have to this type def
6
+ // https://single-spa.js.org/docs/building-applications.html#custom-props
7
+ export type MasterProps = any;
@@ -0,0 +1,25 @@
1
+ {
2
+ "compileOnSave": false,
3
+ "compilerOptions": {
4
+ "baseUrl": "./",
5
+ "outDir": "./dist",
6
+ "sourceMap": true,
7
+ "declaration": false,
8
+ "downlevelIteration": true,
9
+ "experimentalDecorators": true,
10
+ "moduleResolution": "node",
11
+ "importHelpers": true,
12
+ "target": "es2017",
13
+ "module": "es2020",
14
+ "lib": ["es2018", "dom"],
15
+ "skipLibCheck": true,
16
+ "noImplicitAny": false,
17
+ "strict": false
18
+ },
19
+ "files": [
20
+ "src/index.ts"
21
+ ],
22
+ "include": [
23
+ "src/app/**/*",
24
+ ]
25
+ }
@@ -0,0 +1,112 @@
1
+ const path = require('path')
2
+ const HtmlWebpackPlugin = require('html-webpack-plugin')
3
+ const CopyWebpackPlugin = require('copy-webpack-plugin')
4
+ const { AngularWebpackPlugin } = require('@ngtools/webpack')
5
+
6
+ const isProduction = process.env.NODE_ENV == 'production'
7
+
8
+ const config = {
9
+ entry: {
10
+ index: './src/index.ts',
11
+ },
12
+ output: {
13
+ publicPath: '',
14
+ path: path.resolve(__dirname, 'dist'),
15
+ filename: isProduction
16
+ ? '[name].[contenthash].bundle.js'
17
+ : '[name].bundle.js',
18
+ },
19
+ devServer: {
20
+ open: ['/', '/playground.html'],
21
+ host: 'localhost',
22
+ port: 8080,
23
+ headers: {
24
+ 'Access-Control-Allow-Origin': '*',
25
+ },
26
+ proxy: {
27
+ '/api/': {
28
+ target: 'https://max-ai.maxelms.com/',
29
+ changeOrigin: true,
30
+ cookieDomainRewrite: '',
31
+ },
32
+ '/app/api/': {
33
+ target: 'https://max-ai.maxelms.com/',
34
+ changeOrigin: true,
35
+ cookieDomainRewrite: '',
36
+ },
37
+ '/app-admin/api/': {
38
+ target: 'https://max-ai.maxelms.com/',
39
+ changeOrigin: true,
40
+ cookieDomainRewrite: '',
41
+ },
42
+ },
43
+ static: [{
44
+ directory: path.join(__dirname, 'examples/'),
45
+ }, {
46
+ directory: path.join(__dirname, 'public/'),
47
+ }],
48
+ },
49
+ plugins: [
50
+ new HtmlWebpackPlugin({
51
+ inject: true,
52
+ template: 'public/index.html',
53
+ chunks: ['index'],
54
+ filename: 'index.html',
55
+ }),
56
+ new CopyWebpackPlugin({
57
+ patterns: [
58
+ {
59
+ from: 'public',
60
+ globOptions: {
61
+ dot: true,
62
+ gitignore: true,
63
+ ignore: ['**/public/index.html', '**/public/configuration.html'],
64
+ },
65
+ noErrorOnMissing: true,
66
+ },
67
+ { from: 'README.md' },
68
+ { from: 'manifest.json' },
69
+ ],
70
+ }),
71
+ new AngularWebpackPlugin({
72
+ tsconfig: './tsconfig.json',
73
+ jitMode: true,
74
+ }),
75
+ ],
76
+ module: {
77
+ rules: [
78
+ {
79
+ test: /\.ts$/,
80
+ loader: '@ngtools/webpack',
81
+ exclude: /node_modules/,
82
+ },
83
+ {
84
+ test: /\.html$/,
85
+ use: 'raw-loader',
86
+ },
87
+ {
88
+ test: /\.css$/,
89
+ use: ['to-string-loader', 'css-loader'],
90
+ },
91
+ {
92
+ test: /\.(eot|svg|ttf|woff|woff2|png|jpg|gif)$/i,
93
+ type: 'asset',
94
+ },
95
+ ],
96
+ },
97
+ resolve: {
98
+ extensions: ['.ts', '.js'],
99
+ alias: {
100
+ '@': path.resolve('src'),
101
+ },
102
+ },
103
+ }
104
+
105
+ module.exports = () => {
106
+ if (isProduction) {
107
+ config.mode = 'production'
108
+ } else {
109
+ config.mode = 'development'
110
+ }
111
+ return config
112
+ }
@@ -10,8 +10,8 @@
10
10
  "@angular/core": "13.0.0",
11
11
  "@angular/platform-browser": "13.0.0",
12
12
  "@angular/platform-browser-dynamic": "13.0.0",
13
- "@maxelms/create-plugin-cli": "1.1.24",
14
- "@maxelms/create-pulgin-api": "1.0.0",
13
+ "@maxelms/create-plugin-cli": "^1.0.0",
14
+ "@maxelms/create-pulgin-api": "^1.0.0",
15
15
  "@ngtools/webpack": "13",
16
16
  "css-loader": "7.1.2",
17
17
  "raw-loader": "4.0.2",
@@ -50,5 +50,11 @@
50
50
  "react": "16.14.0",
51
51
  "react-dom": "16.14.0",
52
52
  "react-router-dom": "6.4.3"
53
+ },
54
+ "resolutions": {
55
+ "antd": "4.21.2",
56
+ "react": "16.14.0",
57
+ "react-dom": "16.14.0",
58
+ "react-router-dom": "6.4.3"
53
59
  }
54
60
  }
@@ -46,5 +46,10 @@
46
46
  "antd": "4.21.2",
47
47
  "react": "16.14.0",
48
48
  "react-dom": "16.14.0"
49
+ },
50
+ "resolutions": {
51
+ "antd": "4.21.2",
52
+ "react": "16.14.0",
53
+ "react-dom": "16.14.0"
49
54
  }
50
55
  }
@@ -5,6 +5,7 @@ import App from './App';
5
5
  import './index.less';
6
6
 
7
7
  const render = (container: string, props?: any) => {
8
+ if (!document.querySelector(container)) return
8
9
  ReactDOM.render(<App {...props} />, document.querySelector(container));
9
10
  };
10
11
 
@@ -47,5 +47,10 @@
47
47
  "antd": "4.21.2",
48
48
  "react": "16.14.0",
49
49
  "react-dom": "16.14.0"
50
+ },
51
+ "resolutions": {
52
+ "antd": "4.21.2",
53
+ "react": "16.14.0",
54
+ "react-dom": "16.14.0"
50
55
  }
51
56
  }
@@ -44,5 +44,10 @@
44
44
  "prettier": "^2.2.0",
45
45
  "typescript": "^4.1.2",
46
46
  "yorkie": "^2.0.0"
47
+ },
48
+ "resolutions": {
49
+ "antd": "4.21.2",
50
+ "react": "16.14.0",
51
+ "react-dom": "16.14.0"
47
52
  }
48
53
  }
@@ -47,5 +47,10 @@
47
47
  "antd": "4.21.2",
48
48
  "react": "16.14.0",
49
49
  "react-dom": "16.14.0"
50
+ },
51
+ "resolutions": {
52
+ "antd": "4.21.2",
53
+ "react": "16.14.0",
54
+ "react-dom": "16.14.0"
50
55
  }
51
56
  }
@@ -44,5 +44,10 @@
44
44
  "prettier": "^2.2.0",
45
45
  "typescript": "^4.1.2",
46
46
  "yorkie": "^2.0.0"
47
+ },
48
+ "resolutions": {
49
+ "antd": "4.21.2",
50
+ "react": "16.14.0",
51
+ "react-dom": "16.14.0"
47
52
  }
48
53
  }
@@ -9,7 +9,7 @@
9
9
  "lint": "vue-cli-service lint"
10
10
  },
11
11
  "dependencies": {
12
- "@maxelms/create-pulgin-api": "1.0.0",
12
+ "@maxelms/create-pulgin-api": "^1.0.0",
13
13
  "core-js": "3.6.5",
14
14
  "element-ui": "2.15.6",
15
15
  "vue": "3.0.0",
@@ -9,7 +9,7 @@
9
9
  "lint": "vue-cli-service lint"
10
10
  },
11
11
  "dependencies": {
12
- "@maxelms/create-pulgin-api": "1.0.0",
12
+ "@maxelms/create-pulgin-api": "^1.0.0",
13
13
  "core-js": "3.6.5",
14
14
  "element-ui": "2.15.6",
15
15
  "vue": "3.0.0",
@@ -9,7 +9,7 @@
9
9
  "lint": "vue-cli-service lint"
10
10
  },
11
11
  "dependencies": {
12
- "@maxelms/create-pulgin-api": "1.0.0",
12
+ "@maxelms/create-pulgin-api": "^1.0.0",
13
13
  "core-js": "3.6.5",
14
14
  "element-ui": "2.15.6",
15
15
  "vue": "3.0.0",
@@ -16,7 +16,7 @@
16
16
  },
17
17
  "dependencies": {
18
18
  "@esbuild/darwin-arm64": "0.24.0",
19
- "@maxelms/create-pulgin-api": "1.0.0",
19
+ "@maxelms/create-pulgin-api": "^1.0.0",
20
20
  "@rollup/rollup-darwin-arm64": "4.28.1",
21
21
  "pinia": "2.2.6",
22
22
  "vue": "3.5.13",