neo-cmp-cli 1.12.11 → 1.13.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 (81) hide show
  1. package/README.md +28 -13
  2. package/dist/index2.js +1 -1
  3. package/dist/module/neoInitByCopy.js +1 -1
  4. package/dist/package.json.js +1 -1
  5. package/docs/H5/347/253/257 NeoEntityList /344/275/277/347/224/250/350/257/264/346/230/216.md" +293 -0
  6. package/package.json +1 -1
  7. package/template/antd-custom-cmp-template/package.json +3 -3
  8. package/template/asset-manage-template/package.json +1 -1
  9. package/template/echarts-custom-cmp-template/package.json +3 -3
  10. package/template/empty-custom-cmp-template/package.json +1 -1
  11. package/template/map-custom-cmp-template/.prettierrc.js +12 -0
  12. package/template/map-custom-cmp-template/README.md +99 -0
  13. package/template/map-custom-cmp-template/commitlint.config.js +59 -0
  14. package/template/map-custom-cmp-template/neo.config.js +115 -0
  15. package/template/map-custom-cmp-template/package.json +59 -0
  16. package/template/map-custom-cmp-template/public/css/base.css +283 -0
  17. package/template/map-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
  18. package/template/map-custom-cmp-template/public/template.html +13 -0
  19. package/template/map-custom-cmp-template/src/assets/css/common.scss +127 -0
  20. package/template/map-custom-cmp-template/src/assets/css/mixin.scss +47 -0
  21. package/template/map-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  22. package/template/map-custom-cmp-template/src/assets/img/chart.svg +1 -0
  23. package/template/map-custom-cmp-template/src/assets/img/custom-widget.svg +1 -0
  24. package/template/map-custom-cmp-template/src/assets/img/favicon.png +0 -0
  25. package/template/map-custom-cmp-template/src/utils/url.ts +82 -0
  26. package/template/map-custom-cmp-template/tsconfig.json +68 -0
  27. package/template/neo-bi-cmps/.prettierrc.js +12 -0
  28. package/template/neo-bi-cmps/@types/neo-ui-common.d.ts +36 -0
  29. package/template/neo-bi-cmps/README.md +99 -0
  30. package/template/neo-bi-cmps/commitlint.config.js +59 -0
  31. package/template/neo-bi-cmps/neo.config.js +124 -0
  32. package/template/neo-bi-cmps/package.json +62 -0
  33. package/template/neo-bi-cmps/public/css/base.css +283 -0
  34. package/template/neo-bi-cmps/public/scripts/app/bluebird.js +6679 -0
  35. package/template/neo-bi-cmps/public/template.html +13 -0
  36. package/template/neo-bi-cmps/src/assets/css/common.scss +127 -0
  37. package/template/neo-bi-cmps/src/assets/css/mixin.scss +47 -0
  38. package/template/neo-bi-cmps/src/assets/img/AIBtn.gif +0 -0
  39. package/template/neo-bi-cmps/src/assets/img/NeoCRM.jpg +0 -0
  40. package/template/neo-bi-cmps/src/assets/img/aiLogo.png +0 -0
  41. package/template/neo-bi-cmps/src/assets/img/card-list.svg +1 -0
  42. package/template/neo-bi-cmps/src/assets/img/contact-form.svg +1 -0
  43. package/template/neo-bi-cmps/src/assets/img/custom-form.svg +1 -0
  44. package/template/neo-bi-cmps/src/assets/img/custom-widget.svg +1 -0
  45. package/template/neo-bi-cmps/src/assets/img/data-list.svg +1 -0
  46. package/template/neo-bi-cmps/src/assets/img/detail.svg +1 -0
  47. package/template/neo-bi-cmps/src/assets/img/favicon.png +0 -0
  48. package/template/neo-bi-cmps/src/assets/img/map.svg +1 -0
  49. package/template/neo-bi-cmps/src/assets/img/search.svg +1 -0
  50. package/template/neo-bi-cmps/src/assets/img/table.svg +1 -0
  51. package/template/neo-bi-cmps/src/components/targetNumber__c/README.md +100 -0
  52. package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/configSchema.ts +253 -0
  53. package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.scss +76 -0
  54. package/template/neo-bi-cmps/src/components/targetNumber__c/customStyleConfig/index.tsx +148 -0
  55. package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +440 -0
  56. package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +128 -0
  57. package/template/neo-bi-cmps/src/components/targetNumber__c/style.scss +173 -0
  58. package/template/neo-bi-cmps/src/utils/axiosFetcher.ts +37 -0
  59. package/template/neo-bi-cmps/src/utils/queryObjectData.ts +76 -0
  60. package/template/neo-bi-cmps/src/utils/xobjects.ts +162 -0
  61. package/template/neo-bi-cmps/tsconfig.json +40 -0
  62. package/template/neo-custom-cmp-template/package.json +3 -3
  63. package/template/neo-h5-cmps/package.json +2 -2
  64. package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +2 -2
  65. package/template/neo-order-cmps/package.json +1 -1
  66. package/template/neo-web-cmps/package.json +3 -3
  67. package/template/neo-web-cmps/src/components/entityGrid2__c/index.tsx +16 -4
  68. package/template/neo-web-cmps/src/components/entityGrid2__c/style.scss +1 -3
  69. package/template/neo-web-cmps/src/components/entityGrid3__c/index.tsx +1 -1
  70. package/template/neo-web-cmps/src/components/entityGrid3__c/style.scss +2 -4
  71. package/template/neo-web-cmps/src/components/entityGrid4__c/index.tsx +8 -6
  72. package/template/neo-web-cmps/src/components/entityGrid__c/model.ts +2 -1
  73. package/template/react-custom-cmp-template/package.json +1 -1
  74. package/template/react-ts-custom-cmp-template/package.json +1 -1
  75. package/template/vue2-custom-cmp-template/package.json +3 -3
  76. package/template/echarts-custom-cmp-template/src/components/mapWidget__c/README.md +0 -125
  77. /package/docs/{NeoEntityGrid → Web/347/253/257 NeoEntityGrid }/344/275/277/347/224/250/350/257/264/346/230/216.md" +0 -0
  78. /package/template/{echarts-custom-cmp-template → map-custom-cmp-template}/src/components/mapWidget__c/index.tsx +0 -0
  79. /package/template/{echarts-custom-cmp-template → map-custom-cmp-template}/src/components/mapWidget__c/model.ts +0 -0
  80. /package/template/{echarts-custom-cmp-template → map-custom-cmp-template}/src/components/mapWidget__c/style.scss +0 -0
  81. /package/template/{echarts-custom-cmp-template/src/components/mapWidget__c/USAGE.md → map-custom-cmp-template/src/components/mapWidget__c//345/234/260/345/233/276/347/273/204/344/273/266/345/277/253/351/200/237/344/275/277/347/224/250/346/214/207/345/215/227.md"} +0 -0
@@ -0,0 +1,124 @@
1
+ 'use strict';
2
+ const path = require('path');
3
+ const fs = require('fs');
4
+
5
+ // 统一路径解析
6
+ function resolve(dir) {
7
+ return path.resolve(__dirname, dir);
8
+ }
9
+
10
+ // 包括生产和开发的环境配置信息
11
+ module.exports = {
12
+ settings: {
13
+ enableESLint: false, // 调试模式是否开启ESLint,默认开启ESLint检测代码格式
14
+ enableESLintFix: false, // 是否自动修正代码格式,默认不自动修正
15
+ enableStyleLint: false, // 是否开启StyleLint,默认开启ESLint检测代码格式
16
+ enableStyleLintFix: false, // 是否需要StyleLint自动修正代码格式
17
+ },
18
+ webpack: {
19
+ target: ['web', 'es5'], // 指定目标环境为 web 和 es5,确保兼容性
20
+ resolve: {
21
+ // webpack的resolve配置
22
+ extensions: ['.js', '.jsx', '.ts', '.tsx', '.umd.js', '.min.js', '.json'], // 用于配置webpack在尝试过程中用到的后缀列表
23
+ alias: {
24
+ '@': resolve('src'),
25
+ $assets: resolve('src/assets'),
26
+ $public: resolve('public'),
27
+ $utils: resolve('src/utils'),
28
+ },
29
+ },
30
+ // sassResources中的sass文件会自动注入每一个sass文件中
31
+ sassResources: [
32
+ resolve('./src/assets/css/common.scss'),
33
+ resolve('./src/assets/css/mixin.scss'),
34
+ ],
35
+ // createDeclaration: true, // 打包时是否创建ts声明文件
36
+ ignoreNodeModules: false, // 打包时是否忽略 node_modules
37
+ // allowList: [], // ignoreNodeModules为true时生效
38
+ // projectDir: ['src'],
39
+ // template: resolve('./public/template.html'), // 自定义html模板
40
+ // plugins: [],
41
+ // babelPlugins: [],
42
+ },
43
+ // 用于添加 Neo 共享依赖模块的配置信息
44
+ /*
45
+ neoCommonModule: {
46
+ // exports: ['xxModule'], // 数组写法,用于导出当前自定义组件中的第三方依赖模块
47
+ exports: { // 对象写法,可用于导出自定义组件中的某个内容模块(需要使用绝对路径导出)
48
+ 'xxModule': path.resolve('./src/components/xxModule'), // 导出 xx组件 或 xx模块
49
+ },
50
+ // remoteDeps: ['xxCmpType'], // 远程依赖组件,表示当前自定义组件会用到的依赖组件,需要和 externals 配合使用
51
+ // externals: ['xxModule'], // 自定义组件中需要剔除的模块,仅支持数组写法
52
+ },
53
+ */
54
+ linkDebug: {
55
+ // 用于开启本地调试模式的相关配置信息
56
+ /*
57
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
58
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
59
+ // 外链调试(在线上页面设计器端预览自定义组件)
60
+ index: [
61
+ './src/components/xxCmp/register.ts',
62
+ './src/components/xxCmp/model.ts',
63
+ ],
64
+ },
65
+ NODE_ENV: 'development',
66
+ port: 80, // 设置基础端口,如果被占用则自动寻找可用端口
67
+ closeHotReload: true, // 是否关闭热更新
68
+ assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
69
+ assetsSubDirectory: '',
70
+ hostname: 'localhost',
71
+ proxyTable: {
72
+ '/apiTest': {
73
+ target: 'http://api-test.com.cn', // 不支持跨域的接口根地址
74
+ ws: true,
75
+ changeOrigin: true,
76
+ },
77
+ }
78
+ */
79
+ },
80
+ // 选择「自定义环境」时需要添加 NeoCRM 平台配置,可自定义对接的任何环境
81
+ neoConfig: {
82
+ // authType: 'oauth2', // 默认授权模式:OAuth2 授权码模式
83
+ neoBaseURL: 'https://crm-test.xiaoshouyi.com', // 平台根地址(默认:https://crm.xiaoshouyi.com)
84
+ loginURL: 'https://login-test.xiaoshouyi.com/auc/oauth2/auth', // 登录授权 URL(默认:https://login.xiaoshouyi.com/auc/oauth2/auth)
85
+ tokenURL: 'https://login-test.xiaoshouyi.com/auc/oauth2/token', // Token 获取接口地址(默认:https://login.xiaoshouyi.com/auc/oauth2/token)
86
+ },
87
+ pushCmp: {
88
+ // 用于构建并发布至 NeoCRM 的相关配置
89
+ // 备注:pushCmp 会服用量 build2lib 中的配置,执行 neo push cmp 时最好注释掉 build2lib 中的配置。
90
+ /*
91
+ 【特别说明】以下配置项都自带默认值,非必填。如需自定义请自行配置。
92
+ NODE_ENV: 'production',
93
+ entry: { // 根据 src/components 目录下的文件自动生成 entry 相关配置
94
+ InfoCardModel: './src/components/xxCmp/model.ts',
95
+ infoCard: './src/components/xxCmp/register.ts'
96
+ },
97
+ cssExtract: false, // 不额外提取css文件
98
+ assetsRoot: resolve('dist') // 上传指定目录下的脚本文件
99
+ */
100
+ },
101
+ /*
102
+ build2lib: {
103
+ entry: {
104
+ targetNumber: './src/components/targetNumber__c/index.tsx',
105
+ customStyleConfig: './src/components/targetNumber__c/customStyleConfig',
106
+ },
107
+ output: {
108
+ filename: '[name].js',
109
+ },
110
+ removeNeoCommonModules: true, // 是否移除 Neo 共享的依赖模块,默认不移除
111
+ NODE_ENV: 'production', // development、production
112
+ libraryName: 'NeoBIComponent', // 构建第三方功能包时最后导出的引用变量名
113
+ assetsRoot: resolve('./lib'), // 打包后的文件绝对路径(物理路径)
114
+ assetsPublicPath: '/', // 设置静态资源的引用路径(根域名+路径)
115
+ assetsSubDirectory: '', // 资源引用二级路径
116
+ ignoreNodeModules: false,
117
+ // allowList: ['@babel/runtime', '@babel/runtime/helpers/inheritsLoose'],
118
+ productionSourceMap: false,
119
+ productionGzip: false,
120
+ productionGzipExtensions: ['js', 'css', 'json'],
121
+ bundleAnalyzerReport: false,
122
+ },
123
+ */
124
+ };
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "neo-bi-cmps",
3
+ "version": "1.0.9",
4
+ "description": "数值指标组件模板: 用于展示实体数据源中关键数值指标,支持从 XObject 实体对象获取动态数据。",
5
+ "framework": "react-ts",
6
+ "keywords": [
7
+ "react&ts技术栈",
8
+ "数值指标组件模板"
9
+ ],
10
+ "author": "wibetter",
11
+ "license": "MIT",
12
+ "scripts": {
13
+ "linkDebug": "neo linkDebug",
14
+ "neoLogin": "neo login",
15
+ "pushCmp": "neo push cmp",
16
+ "pullCmp": "neo pull cmp",
17
+ "deleteCmp": "neo delete cmp",
18
+ "build2lib": "neo build2lib",
19
+ "format": "prettier --write \"src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}\""
20
+ },
21
+ "files": [
22
+ "lib/*"
23
+ ],
24
+ "husky": {
25
+ "hooks": {
26
+ "pre-commit": "lint-staged",
27
+ "commit-msg": "commitlint -E HUSKY_GIT_PARAMS"
28
+ }
29
+ },
30
+ "lint-staged": {
31
+ "src/**/**/*.{js,jsx,ts,tsx,vue,scss,json}": [
32
+ "prettier --write"
33
+ ]
34
+ },
35
+ "dependencies": {
36
+ "neo-register": "^1.1.3",
37
+ "react": "^16.9.0",
38
+ "react-dom": "^16.9.0",
39
+ "axios": "^0.27.2",
40
+ "antd": "^4.9.4",
41
+ "lodash": "^4.17.21",
42
+ "neo-open-api": "^1.1.9",
43
+ "@wibetter/json-editor": "^6.0.5",
44
+ "tslib": "2.3.0"
45
+ },
46
+ "devDependencies": {
47
+ "@babel/runtime": "^7.26.0",
48
+ "@commitlint/cli": "^8.3.5",
49
+ "@commitlint/config-conventional": "^9.1.1",
50
+ "@types/react": "^16.9.11",
51
+ "@types/react-dom": "^16.9.15",
52
+ "@types/axios": "^0.14.0",
53
+ "neo-cmp-cli": "^1.10.18",
54
+ "husky": "^4.2.5",
55
+ "lint-staged": "^10.2.9",
56
+ "prettier": "^2.0.5"
57
+ },
58
+ "engines": {
59
+ "node": ">= 16.0.0",
60
+ "npm": ">= 8.0.0"
61
+ }
62
+ }
@@ -0,0 +1,283 @@
1
+ @charset "utf-8";
2
+
3
+ body {
4
+ margin: 0;
5
+ border-width: 0;
6
+ padding: 0;
7
+ font-family: PingFangSC-Regular;
8
+ }
9
+
10
+ div,
11
+ dl,
12
+ dt,
13
+ dd,
14
+ ul,
15
+ ol,
16
+ li,
17
+ h1,
18
+ h2,
19
+ h3,
20
+ h4,
21
+ h5,
22
+ h6,
23
+ pre,
24
+ code,
25
+ form,
26
+ fieldset,
27
+ legend,
28
+ input,
29
+ textarea,
30
+ p,
31
+ blockquote,
32
+ th,
33
+ td,
34
+ hr,
35
+ i,
36
+ button,
37
+ article,
38
+ aside,
39
+ details,
40
+ figcaption,
41
+ figure,
42
+ footer,
43
+ header,
44
+ hgroup,
45
+ menu,
46
+ nav,
47
+ section {
48
+ margin: 0;
49
+ padding: 0;
50
+ border-width: 0;
51
+ font-family: PingFangSC-Regular;
52
+ box-sizing: padding-box;
53
+ -webkit-box-sizing: padding-box;
54
+ -moz-box-sizing: padding-box;
55
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
56
+ }
57
+
58
+ body,
59
+ button,
60
+ input,
61
+ select,
62
+ textarea {
63
+ font-size: 14px;
64
+ line-height: 1.125;
65
+ }
66
+
67
+ [v-cloak] {
68
+ display: none;
69
+ }
70
+
71
+ li,
72
+ ul,
73
+ ol {
74
+ list-style: none;
75
+ }
76
+
77
+ a {
78
+ text-decoration: none;
79
+ }
80
+
81
+ a:active {
82
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
83
+ }
84
+
85
+ sub,
86
+ sup {
87
+ line-height: 0;
88
+ }
89
+
90
+ table {
91
+ border-collapse: collapse;
92
+ border-spacing: 0;
93
+ }
94
+
95
+ li {
96
+ list-style: none;
97
+ }
98
+
99
+ fieldset,
100
+ img {
101
+ border: 0;
102
+ }
103
+
104
+ input,
105
+ textarea {
106
+ outline-style: none;
107
+ }
108
+
109
+ input[type='text'],
110
+ input[type='search'],
111
+ input[type='password'] {
112
+ -webkit-border-radius: 0;
113
+ -moz-border-radius: 0;
114
+ -o-border-radius: 0;
115
+ border-radius: 0;
116
+ }
117
+
118
+ textarea {
119
+ resize: none;
120
+ }
121
+
122
+ address,
123
+ caption,
124
+ cite,
125
+ code,
126
+ dfn,
127
+ em,
128
+ i,
129
+ th,
130
+ var {
131
+ font-style: normal;
132
+ font-weight: normal;
133
+ }
134
+
135
+ legend {
136
+ color: #000;
137
+ }
138
+
139
+ abbr,
140
+ acronym {
141
+ border: 0;
142
+ font-variant: normal;
143
+ }
144
+
145
+ a {
146
+ text-decoration: none;
147
+ outline: none;
148
+ }
149
+
150
+ a:hover {
151
+ text-decoration: none;
152
+ }
153
+
154
+ .clearit {
155
+ clear: both;
156
+ height: 0;
157
+ font-size: 0;
158
+ overflow: hidden;
159
+ }
160
+
161
+ /* surface下viewport不生效的解决办法 */
162
+ @media screen and (min-width: 767px) and (device-aspect-ratio: 16/9) {
163
+ @-ms-viewport {
164
+ zoom: 1;
165
+ max-zoom: 1;
166
+ min-zoom: 1;
167
+ }
168
+ }
169
+
170
+ /* surface下IE10 点击链接,背景变色 */
171
+ @media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
172
+ a {
173
+ background-color: transparent;
174
+ }
175
+ }
176
+
177
+ img {
178
+ -ms-interpolation-mode: bicubic;
179
+ image-rendering: optimizeQuality;
180
+ }
181
+
182
+ /* portrait:指定输出设备中的页面可见区域高度大于或等于宽度, landscape:横屏*/
183
+ @media not screen and (orientation: landscape),
184
+ not screen and (orientation: portrait) {
185
+ body,
186
+ button,
187
+ input,
188
+ select,
189
+ textarea {
190
+ font-family: 'Microsoft Yahei', 'Simsun';
191
+ }
192
+ }
193
+
194
+ ::-moz-placeholder {
195
+ color: #767676;
196
+ }
197
+
198
+ ::-webkit-input-placeholder {
199
+ color: #767676;
200
+ }
201
+
202
+ :-ms-input-placeholder {
203
+ color: #767676;
204
+ }
205
+
206
+ .cont-selected {
207
+ display: block !important;
208
+ }
209
+
210
+ .hidden {
211
+ visibility: hidden;
212
+ }
213
+
214
+ .ellipsis {
215
+ overflow: hidden;
216
+ white-space: nowrap;
217
+ text-overflow: ellipsis;
218
+ }
219
+
220
+ .clearfix:after {
221
+ content: '.';
222
+ display: block;
223
+ height: 0;
224
+ visibility: hidden;
225
+ clear: both;
226
+ }
227
+
228
+ .left {
229
+ float: left;
230
+ }
231
+
232
+ .right {
233
+ float: right;
234
+ }
235
+
236
+ .center {
237
+ margin: 0 auto;
238
+ }
239
+
240
+ .text-center {
241
+ text-align: center;
242
+ }
243
+
244
+ .text-right {
245
+ text-align: right;
246
+ }
247
+
248
+ .text-left {
249
+ text-align: left;
250
+ }
251
+
252
+ .no-border {
253
+ border: none !important;
254
+ }
255
+
256
+ .click-event {
257
+ cursor: pointer;
258
+ }
259
+
260
+ /* 增加iphoneX适配 */
261
+ @media only screen and (device-width: 375px) and (device-height: 812px) and (-webkit-device-pixel-ratio: 3) {
262
+ .ipx-fixed-bottom {
263
+ bottom: 34px !important;
264
+ }
265
+
266
+ .ipx-fixed-top {
267
+ top: 20px !important;
268
+ }
269
+
270
+ .ipx-margin-top {
271
+ margin-top: 20px !important;
272
+ }
273
+
274
+ .ipx-margin-bottom {
275
+ margin-bottom: 20px !important;
276
+ }
277
+
278
+ .ipx-height {
279
+ height: 34px !important;
280
+ }
281
+ }
282
+
283
+ /* 业务级公用代码 */