neo-cmp-cli 1.2.2 → 1.2.5

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 (87) hide show
  1. package/package.json +1 -1
  2. package/src/module/index.js +3 -5
  3. package/src/module/main.js +3 -7
  4. package/src/neo/neoRequire.js +18 -0
  5. package/src/template/antd-custom-cmp-template/neo.config.js +2 -0
  6. package/src/template/antd-custom-cmp-template/package.json +2 -2
  7. package/src/template/antd-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  8. package/src/template/antd-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  9. package/src/template/antd-custom-cmp-template/src/assets/img/favicon.png +0 -0
  10. package/src/template/antd-custom-cmp-template/src/components/info-card/index.tsx +3 -3
  11. package/src/template/develop/neo-custom-cmp-template/.prettierrc.js +12 -0
  12. package/src/template/develop/neo-custom-cmp-template/README.md +48 -0
  13. package/src/template/develop/neo-custom-cmp-template/commitlint.config.js +59 -0
  14. package/src/template/develop/neo-custom-cmp-template/docs/README.md +13 -0
  15. package/src/template/develop/neo-custom-cmp-template/neo.config.js +121 -0
  16. package/src/template/develop/neo-custom-cmp-template/package.json +63 -0
  17. package/src/template/develop/neo-custom-cmp-template/public/css/base.css +283 -0
  18. package/src/template/develop/neo-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
  19. package/src/template/develop/neo-custom-cmp-template/public/template.html +13 -0
  20. package/src/template/develop/neo-custom-cmp-template/src/assets/css/common.scss +127 -0
  21. package/src/template/develop/neo-custom-cmp-template/src/assets/css/mixin.scss +47 -0
  22. package/src/template/develop/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  23. package/src/template/develop/neo-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  24. package/src/template/develop/neo-custom-cmp-template/src/assets/img/favicon.png +0 -0
  25. package/src/template/develop/neo-custom-cmp-template/src/assets/img/table.svg +1 -0
  26. package/src/template/develop/neo-custom-cmp-template/src/components/contact-card-list/README.md +65 -0
  27. package/src/template/develop/neo-custom-cmp-template/src/components/contact-card-list/index.tsx +180 -0
  28. package/src/template/develop/neo-custom-cmp-template/src/components/contact-card-list/model.ts +56 -0
  29. package/src/template/develop/neo-custom-cmp-template/src/components/contact-card-list/style.scss +260 -0
  30. package/src/template/develop/neo-custom-cmp-template/src/components/contact-form/README.md +94 -0
  31. package/src/template/develop/neo-custom-cmp-template/src/components/contact-form/index.tsx +251 -0
  32. package/src/template/develop/neo-custom-cmp-template/src/components/contact-form/model.ts +56 -0
  33. package/src/template/develop/neo-custom-cmp-template/src/components/contact-form/style.scss +120 -0
  34. package/src/template/{neo-custom-cmp-template → develop/neo-custom-cmp-template}/src/components/neo-entity-grid/index.tsx +41 -32
  35. package/src/template/{neo-custom-cmp-template → develop/neo-custom-cmp-template}/src/components/neo-entity-grid/model.ts +0 -7
  36. package/src/template/develop/neo-custom-cmp-template/src/utils/axiosFetcher.ts +29 -0
  37. package/src/template/develop/neo-custom-cmp-template/src/utils/queryObjectData.ts +39 -0
  38. package/src/template/develop/neo-custom-cmp-template/src/utils/xobjects.ts +203 -0
  39. package/src/template/develop/neo-custom-cmp-template/tsconfig.json +68 -0
  40. package/src/template/echarts-custom-cmp-template/package.json +2 -2
  41. package/src/template/echarts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  42. package/src/template/echarts-custom-cmp-template/src/assets/img/chart.svg +1 -0
  43. package/src/template/echarts-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  44. package/src/template/echarts-custom-cmp-template/src/assets/img/favicon.png +0 -0
  45. package/src/template/neo-custom-cmp-template/README.md +4 -3
  46. package/src/template/neo-custom-cmp-template/docs/README.md +244 -0
  47. package/src/template/neo-custom-cmp-template/neo.config.js +1 -0
  48. package/src/template/neo-custom-cmp-template/package.json +6 -3
  49. package/src/template/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  50. package/src/template/neo-custom-cmp-template/src/assets/img/card-list.svg +1 -0
  51. package/src/template/neo-custom-cmp-template/src/assets/img/contact-form.svg +1 -0
  52. package/src/template/neo-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  53. package/src/template/neo-custom-cmp-template/src/assets/img/table.svg +1 -0
  54. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/README.md +66 -0
  55. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/index.tsx +180 -0
  56. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/model.ts +56 -0
  57. package/src/template/neo-custom-cmp-template/src/components/contact-card-list/style.scss +260 -0
  58. package/src/template/neo-custom-cmp-template/src/components/contact-form/README.md +94 -0
  59. package/src/template/neo-custom-cmp-template/src/components/contact-form/index.tsx +251 -0
  60. package/src/template/neo-custom-cmp-template/src/components/contact-form/model.ts +56 -0
  61. package/src/template/neo-custom-cmp-template/src/components/contact-form/style.scss +120 -0
  62. package/src/template/neo-custom-cmp-template/src/components/xobject-table/README.md +113 -0
  63. package/src/template/neo-custom-cmp-template/src/components/xobject-table/index.tsx +744 -0
  64. package/src/template/neo-custom-cmp-template/src/components/xobject-table/model.ts +122 -0
  65. package/src/template/neo-custom-cmp-template/src/components/xobject-table/style.scss +304 -0
  66. package/src/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +37 -0
  67. package/src/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +65 -0
  68. package/src/template/neo-custom-cmp-template/src/utils/xobjects.ts +162 -0
  69. package/src/template/neo-custom-cmp-template/tsconfig.json +4 -1
  70. package/src/template/react-custom-cmp-template/package.json +1 -1
  71. package/src/template/react-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  72. package/src/template/react-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  73. package/src/template/react-custom-cmp-template/src/assets/img/favicon.png +0 -0
  74. package/src/template/react-ts-custom-cmp-template/package.json +1 -1
  75. package/src/template/react-ts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  76. package/src/template/react-ts-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  77. package/src/template/react-ts-custom-cmp-template/src/assets/img/favicon.png +0 -0
  78. package/src/template/vue2-custom-cmp-template/package.json +1 -1
  79. package/src/template/vue2-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  80. package/src/template/vue2-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  81. package/src/template/vue2-custom-cmp-template/src/assets/img/favicon.png +0 -0
  82. package/bin/neo.js +0 -2
  83. package/src/template/neo-custom-cmp-template/src/components/info-card/index.tsx +0 -69
  84. package/src/template/neo-custom-cmp-template/src/components/info-card/model.ts +0 -78
  85. package/src/template/neo-custom-cmp-template/src/components/info-card/style.scss +0 -105
  86. /package/src/template/{neo-custom-cmp-template → develop/neo-custom-cmp-template}/src/components/neo-entity-grid/README.md +0 -0
  87. /package/src/template/{neo-custom-cmp-template → develop/neo-custom-cmp-template}/src/components/neo-entity-grid/style.scss +0 -0
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756957113315" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5395" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M288 768v115.2c0 25.6 19.2 44.8 44.8 44.8h556.8c25.6 0 44.8-19.2 44.8-44.8v-198.4s0-6.4-6.4-6.4h-83.2c-38.4 0-70.4-32-70.4-70.4 0-38.4 32-70.4 70.4-70.4h83.2s6.4 0 6.4-6.4V332.8c0-25.6-19.2-44.8-44.8-44.8H768C768 198.4 697.6 128 608 128S448 198.4 448 288H332.8c-25.6 0-44.8 19.2-44.8 44.8V448C198.4 448 128 518.4 128 608S198.4 768 288 768z m0-249.6h70.4V358.4h160V288c0-51.2 38.4-89.6 89.6-89.6 51.2 0 89.6 38.4 89.6 89.6v70.4h160v108.8h-19.2c-76.8 0-140.8 64-140.8 140.8 0 76.8 64 140.8 140.8 140.8h19.2v108.8H358.4v-160H288c-51.2 0-89.6-38.4-89.6-89.6 0-51.2 38.4-89.6 89.6-89.6z" p-id="5396" fill="#0764f5"></path></svg>
@@ -46,7 +46,7 @@
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
47
  "@types/react": "^16.9.11",
48
48
  "@types/react-dom": "^16.9.15",
49
- "neo-cmp-cli": "^1.2.2",
49
+ "neo-cmp-cli": "^1.2.3",
50
50
  "husky": "^4.2.5",
51
51
  "lint-staged": "^10.2.9",
52
52
  "prettier": "^2.0.5"
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756957113315" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5395" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M288 768v115.2c0 25.6 19.2 44.8 44.8 44.8h556.8c25.6 0 44.8-19.2 44.8-44.8v-198.4s0-6.4-6.4-6.4h-83.2c-38.4 0-70.4-32-70.4-70.4 0-38.4 32-70.4 70.4-70.4h83.2s6.4 0 6.4-6.4V332.8c0-25.6-19.2-44.8-44.8-44.8H768C768 198.4 697.6 128 608 128S448 198.4 448 288H332.8c-25.6 0-44.8 19.2-44.8 44.8V448C198.4 448 128 518.4 128 608S198.4 768 288 768z m0-249.6h70.4V358.4h160V288c0-51.2 38.4-89.6 89.6-89.6 51.2 0 89.6 38.4 89.6 89.6v70.4h160v108.8h-19.2c-76.8 0-140.8 64-140.8 140.8 0 76.8 64 140.8 140.8 140.8h19.2v108.8H358.4v-160H288c-51.2 0-89.6-38.4-89.6-89.6 0-51.2 38.4-89.6 89.6-89.6z" p-id="5396" fill="#0764f5"></path></svg>
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.2.2",
47
+ "neo-cmp-cli": "^1.2.3",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5",
@@ -0,0 +1 @@
1
+ <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756957113315" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5395" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M288 768v115.2c0 25.6 19.2 44.8 44.8 44.8h556.8c25.6 0 44.8-19.2 44.8-44.8v-198.4s0-6.4-6.4-6.4h-83.2c-38.4 0-70.4-32-70.4-70.4 0-38.4 32-70.4 70.4-70.4h83.2s6.4 0 6.4-6.4V332.8c0-25.6-19.2-44.8-44.8-44.8H768C768 198.4 697.6 128 608 128S448 198.4 448 288H332.8c-25.6 0-44.8 19.2-44.8 44.8V448C198.4 448 128 518.4 128 608S198.4 768 288 768z m0-249.6h70.4V358.4h160V288c0-51.2 38.4-89.6 89.6-89.6 51.2 0 89.6 38.4 89.6 89.6v70.4h160v108.8h-19.2c-76.8 0-140.8 64-140.8 140.8 0 76.8 64 140.8 140.8 140.8h19.2v108.8H358.4v-160H288c-51.2 0-89.6-38.4-89.6-89.6 0-51.2 38.4-89.6 89.6-89.6z" p-id="5396" fill="#0764f5"></path></svg>
package/bin/neo.js DELETED
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- require('../src/module/index');
@@ -1,69 +0,0 @@
1
- import * as React from 'react';
2
- import './style.scss'; // 组件内容样式
3
-
4
- interface InfoCardProps {
5
- title: string;
6
- backgroundImage: string;
7
- imgCount: number;
8
- commentCount: number;
9
- data?: any;
10
- }
11
-
12
- export default class InfoCard extends React.PureComponent<InfoCardProps> {
13
- constructor(props: InfoCardProps) {
14
- super(props);
15
- this.agreeDataFormat = this.agreeDataFormat.bind(this);
16
- }
17
-
18
- agreeDataFormat(agreeData: number) {
19
- if (agreeData && agreeData <= 9999) {
20
- return agreeData;
21
- }
22
- if (agreeData && agreeData > 9999) {
23
- return `${Math.floor(agreeData / 1000) / 10}w`;
24
- }
25
- return '';
26
- }
27
-
28
- render() {
29
- const { title, backgroundImage, imgCount, commentCount } = this.props;
30
- console.log('当前自定义组件:', this.props, this);
31
- const curAmisData = this.props.data || {};
32
-
33
- const userInfo = curAmisData.__NeoCurrentUser;
34
- const systemInfo = curAmisData.__NeoSystemInfo || {};
35
-
36
- const curBackgroundImage =
37
- backgroundImage || 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg';
38
- return (
39
- <div className="info-card-container">
40
- <div className="news-title">
41
- {title ||
42
- '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。'}
43
- {systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
44
- </div>
45
- <div className="item-imgbox">
46
- {userInfo && userInfo.icon && (
47
- <div className="user-info-box">
48
- <img src={userInfo.icon} className="user-icon" />
49
- <span className="user-name">{userInfo.name}</span>
50
- </div>
51
- )}
52
- <div
53
- className="news-img"
54
- style={{ backgroundImage: `url(${curBackgroundImage})` }}
55
- ></div>
56
- {imgCount > 0 && <div className="img-count">{imgCount}</div>}
57
- </div>
58
- <div className="news-info">
59
- <div className="left media-mark">NeoCRM · 低代码平台</div>
60
- {commentCount && commentCount > 0 && (
61
- <div className="cmt-num right">
62
- {this.agreeDataFormat(commentCount)}评
63
- </div>
64
- )}
65
- </div>
66
- </div>
67
- );
68
- }
69
- }
@@ -1,78 +0,0 @@
1
- /**
2
- * @file 自定义组件对接编辑器的描述文件
3
- */
4
- export class InfoCardModel {
5
- /**
6
- * cmpType 为自定义组件名称,用于标识组件的唯一性
7
- * 在构建时根据当前组件目录名称自动生成
8
- */
9
- // cmpType: string = 'info-card';
10
-
11
- // 组件名称,用于设置在编辑器左侧组件面板中展示的名称
12
- label: string = '信息卡片';
13
-
14
- // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
- description: string = '信息展示卡片';
16
-
17
- // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示(可设置多个分类标签)
18
- tags: string[] = ['自定义组件'];
19
-
20
- // 组件图标,用于设置在编辑器左侧组件面板中展示的图标
21
- iconSrc: string = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
22
- // iconSrc = 'https://neo-widgets.bj.bcebos.com/favicon.png';
23
-
24
- // 初次插入页面的默认属性数据
25
- defaultComProps = {
26
- title:
27
- '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。',
28
- label: '信息卡片',
29
- backgroundImage: 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg',
30
- imgCount: 3,
31
- commentCount: 2025,
32
- };
33
-
34
- // 设计器端预览时展示的默认数据
35
- previewComProps = {
36
- label: '信息卡片',
37
- };
38
-
39
- /**
40
- * 组件面板配置,用于生成编辑器右侧属性配置面板内容
41
- */
42
- propsSchema = [
43
- {
44
- type: 'textarea',
45
- name: 'title',
46
- label: '卡片title',
47
- value:
48
- '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。',
49
- },
50
- {
51
- type: 'text',
52
- name: 'backgroundImage',
53
- label: '展示图片',
54
- value: 'https://neo-widgets.bj.bcebos.com/NeoCRM.jpg',
55
- },
56
- {
57
- type: 'number',
58
- name: 'imgCount',
59
- label: '图片数量',
60
- value: 3,
61
- },
62
- {
63
- type: 'number',
64
- name: 'commentCount',
65
- label: '评论数',
66
- value: 2025,
67
- },
68
- ];
69
-
70
- // 支持 函数式写法:propsSchemaCreator,com 为组件实例。优先级比 propsSchema 高
71
- /*
72
- propsSchemaCreator = (com: any) => {
73
- return [];
74
- };
75
- */
76
- }
77
-
78
- export default InfoCardModel;
@@ -1,105 +0,0 @@
1
- :root {
2
- --padding-bottom: 12px;
3
- }
4
-
5
- .info-card-container {
6
- position: relative;
7
- box-sizing: border-box;
8
-
9
- /* border-bottom: 1px solid #ececec; */
10
- margin: 6px 12px;
11
- padding: 6px var(--padding-bottom);
12
- background-color: #fff;
13
-
14
- .news-title {
15
- padding: 6px 0;
16
- font-family: PingFangSC-Regular;
17
- font-size: 16px;
18
- line-height: 22px;
19
- color: #5f5e5e;
20
- }
21
-
22
- .item-imgbox {
23
- position: relative;
24
- height: 395px;
25
- background: #f0f0f0;
26
- cursor: pointer;
27
- box-sizing: border-box;
28
- text-align: center;
29
- overflow: hidden;
30
-
31
- .news-img {
32
- width: 100%;
33
- height: 100%;
34
- box-sizing: border-box;
35
- background-size: contain;
36
- }
37
-
38
- .img-count {
39
- position: absolute;
40
- top: 0;
41
- right: 0;
42
- padding: 6px 8px;
43
- color: #fff;
44
- min-width: 60px;
45
- text-align: center;
46
- line-height: 1.2;
47
- background: rgb(0 0 0 / 40%);
48
- font-size: 25px;
49
- box-sizing: border-box;
50
- overflow: hidden;
51
- }
52
-
53
- .user-info-box {
54
- position: absolute;
55
- top: 10px;
56
- left: 10px;
57
- width: 100px;
58
- min-height: 100px;
59
- padding: 6px 8px;
60
- color: #fff;
61
- min-width: 60px;
62
- text-align: center;
63
- line-height: 1.2;
64
- background: rgb(0 0 0 / 40%);
65
- font-size: 25px;
66
- box-sizing: border-box;
67
- overflow: hidden;
68
- display: flex;
69
- flex-direction: column;
70
- align-items: center;
71
- justify-content: center;
72
-
73
- .user-icon {
74
- width: 64px;
75
- height: 64px;
76
- border-radius: 50%;
77
- }
78
-
79
- .user-name {
80
- font-size: 16px;
81
- font-weight: 600;
82
- margin-top: 10px;
83
- }
84
- }
85
- }
86
-
87
- .news-info {
88
- font-family: PingFangSC-Light;
89
- height: 28px;
90
- box-sizing: border-box;
91
- display: flex;
92
- justify-content: space-between;
93
- align-items: center;
94
- }
95
-
96
- .media-mark,
97
- .cmt-num {
98
- display: inline-block;
99
- height: 28px;
100
- line-height: 28px;
101
- font-family: PingFangSC-Light;
102
- font-size: 18px;
103
- color: #828282;
104
- }
105
- }