@shijiu/jsview-vue 0.9.631 → 1.9.628

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 (78) hide show
  1. package/dom/bin/jsview-browser-debug-dom.min.js +1 -1
  2. package/dom/bin/jsview-dom.min.js +1 -1
  3. package/dom/{target_core_revision.js → target_core_revision.mjs} +6 -6
  4. package/index.d.ts +1 -0
  5. package/index.js +1 -10
  6. package/loader/jsview-main.js +1 -1
  7. package/loader/loader.js +0 -1
  8. package/package.json +3 -3
  9. package/patches/node_modules/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +17225 -2182
  10. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-css-to-js.js +10 -12
  11. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-format.js +5 -1
  12. package/patches/node_modules/@vue/compiler-sfc/dist/jsview-style-types.js +6 -1
  13. package/patches/node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +6972 -7050
  14. package/patches/node_modules/@vue/runtime-dom/dist/runtime-dom.esm-bundler.js +221 -117
  15. package/patches/node_modules/postcss-js/objectifier.js +4 -4
  16. package/samples/Basic/App.vue +2 -2
  17. package/samples/Basic/components/FontStyle.css +1 -1
  18. package/samples/Basic/components/anim/AnimGroup.vue +4 -4
  19. package/samples/Basic/components/div/DivGroup1.vue +4 -4
  20. package/samples/Basic/components/div/DivGroup2.vue +5 -5
  21. package/samples/Basic/components/img/ImageGroup.vue +2 -2
  22. package/samples/Basic/components/panel/Panel1.vue +6 -6
  23. package/samples/Basic/components/panel/Panel2.vue +2 -2
  24. package/samples/Basic/components/text/TextGroup1.vue +4 -4
  25. package/samples/Basic/components/text/TextGroup2.vue +2 -2
  26. package/samples/Basic/components/text/TextOverflow.vue +2 -2
  27. package/samples/DemoHomepage/App.vue +1 -1
  28. package/samples/DemoHomepage/components/BodyFrame.vue +0 -2
  29. package/samples/DemoHomepage/router.js +36 -51
  30. package/samples/DemoHomepage/views/Homepage.vue +9 -5
  31. package/samples/HashHistory/router.js +6 -6
  32. package/samples/Input/App.vue +17 -8
  33. package/samples/Input/InputPanel.vue +11 -18
  34. package/samples/MetroWidgetDemos/PingPong/App.vue +3 -3
  35. package/samples/MetroWidgetDemos/PingPong/AppPage.vue +2 -17
  36. package/samples/MetroWidgetDemos/PingPong/AppTab.vue +10 -3
  37. package/samples/MetroWidgetDemos/PingPong/{TabItem.vue → Item.vue} +10 -2
  38. package/samples/MetroWidgetDemos/PingPong/ViewSwiper.vue +2 -2
  39. package/samples/Preload/App.vue +11 -16
  40. package/samples/SprayView/App.vue +2 -2
  41. package/samples/TextureAnimation/App2.vue +14 -42
  42. package/samples/VideoDemo/App.vue +2 -2
  43. package/samples/VisibleSensorDemo/App.vue +25 -92
  44. package/scripts/jsview-post-install.js +5 -5
  45. package/scripts/jsview-run-android.js +12 -11
  46. package/utils/JsViewEngineWidget/JsvFocusBlock.vue +56 -52
  47. package/utils/JsViewEngineWidget/JsvFocusManager.js +1 -1
  48. package/utils/JsViewPlugin/JsvPlayer/JsvMedia.js +2 -36
  49. package/utils/JsViewPlugin/JsvPlayer/JsvPlayer.vue +0 -14
  50. package/utils/JsViewPlugin/JsvPlayer/index.js +1 -8
  51. package/utils/JsViewPlugin/JsvPlayer/version.js +4 -4
  52. package/utils/JsViewVueTools/JsvHashHistory.js +12 -12
  53. package/utils/JsViewVueTools/index.d.ts +5 -1
  54. package/utils/JsViewVueTools/index.js +1 -2
  55. package/utils/JsViewVueWidget/BrowserDebugWidget/BrowserPreload.vue +1 -11
  56. package/utils/JsViewVueWidget/JsvActorMove/JsvActorMove.vue +2 -2
  57. package/utils/JsViewVueWidget/JsvInput/Cursor.vue +2 -4
  58. package/utils/JsViewVueWidget/JsvInput/JsvInput.vue +12 -13
  59. package/utils/JsViewVueWidget/JsvPreload/JsvPreload.vue +41 -37
  60. package/utils/JsViewVueWidget/JsvTextureAnim/JsvTextureAnim.vue +8 -1
  61. package/utils/JsViewVueWidget/JsvVisibleSensor/JsvVisibleSensor.vue +1 -1
  62. package/utils/index.d.ts +3 -0
  63. package/utils/index.js +10 -0
  64. package/dom/jsv-browser-debug-dom.js_1 +0 -8
  65. package/dom/jsv-dom.js_1 +0 -6
  66. package/dom/jsv-forge-define.js_1 +0 -6
  67. package/patches/node_modules/@babel/preset-env/lib/available-plugins.js +0 -219
  68. package/patches/node_modules/@vue/cli-plugin-typescript/index.js +0 -100
  69. package/patches/node_modules/@vue/cli-service/lib/commands/serve.js +0 -395
  70. package/patches/node_modules/@vue/cli-service/lib/config/app.js +0 -272
  71. package/patches/node_modules/@vue/cli-service/lib/config/assets.js +0 -70
  72. package/patches/node_modules/@vue/cli-service/lib/config/base.js +0 -212
  73. package/patches/node_modules/vue-loader/dist/resolveScript.js +0 -70
  74. package/samples/Collision/App.vue +0 -452
  75. package/samples/ImpactStop/App.vue +0 -435
  76. package/samples/TextureAnimation/assets/light.png +0 -0
  77. package/samples/TextureAnimation/assets/light2.png +0 -0
  78. package/utils/JsViewVueTools/JsvImpactTracer.js +0 -113
@@ -7,8 +7,8 @@
7
7
  * 列表的内容可以是图片,音频等任何网络资源,下载后缓存在本地,归入本地缓存管理(LRU清理策略)
8
8
  * onPreloading {Function(float percent)}: 预加载中回调,返回预加载进度
9
9
  * onPreloadDone {Function(sizeArray)}: 预加载完成回调,sizeArray(格式Object[]),每个的格式为{width, height}
10
- * onDownloadDone {Function(pathesArray, extra)}: 预下载完成回调,pathesArray(格式为String[])为下载好回调的地址,
11
- * 其中pathesArray为存储位置的路径列表, extra为额外信息(目前只有下载图片时的尺寸)
10
+ * onDownloadDone {Function(pathesArray)}: 预下载完成回调,pathesArray(格式为String[])为下载好回调的地址,
11
+ * 其中pathesArray为存储位置的路径列表
12
12
  *
13
13
  * 注意事项:
14
14
  * 指定加载时的尺寸(0为不指定),与img标签中的 jsv_img_scaledown_tex 属性一起使用
@@ -54,11 +54,10 @@ const buildPreloadInfo = (
54
54
  };
55
55
  };
56
56
 
57
- const buildDownloadInfo = (url, net_setting = null, get_image_size) => {
57
+ const buildDownloadInfo = (url, net_setting = null) => {
58
58
  return {
59
59
  url,
60
60
  netSetting: net_setting,
61
- getImageSize: get_image_size,
62
61
  magicToken: CONST_FORMAT_TOKEN, // 用于格式校验
63
62
  };
64
63
  };
@@ -80,7 +79,6 @@ export default {
80
79
  downloadViewList: [],
81
80
  preloadStateList: [],
82
81
  downloadStateList: [],
83
- downloadResultMap: {},
84
82
  preloadResultMap: {},
85
83
  CONST_FORMAT_TOKEN: "_JsvP_",
86
84
  preloadIsNullNum: 0, // 纪录传入的preload为null的数量,由于vue不支持在子组件修改props值,所有在删除值为null时,需要++,这样才能保证与传入数据的length相等从而触发回调
@@ -138,6 +136,29 @@ export default {
138
136
  }
139
137
  },
140
138
 
139
+ // shouldComponentUpdate(nextProps, nextState) {
140
+ // if (
141
+ // nextProps.preloadList.length === this.preloadList.length &&
142
+ // nextProps.downloadList.length === this.downloadList.length
143
+ // ) {
144
+ // let same = true;
145
+ // for (let i = 0; i < nextProps.preloadList.length; i++) {
146
+ // if (nextProps.preloadList[i].url !== this.preloadList[i].url) {
147
+ // same = false;
148
+ // break;
149
+ // }
150
+ // }
151
+ // for (let i = 0; i < nextProps.downloadList.length; i++) {
152
+ // if (nextProps.downloadList[i].url !== this.downloadList[i].url) {
153
+ // same = false;
154
+ // break;
155
+ // }
156
+ // }
157
+ // return !same;
158
+ // }
159
+ // return true;
160
+ // },
161
+
141
162
  _checkPreload() {
142
163
  let loadedNum = 0;
143
164
  this.preloadStateList.forEach((state) => {
@@ -240,10 +261,7 @@ export default {
240
261
  if (!state) return;
241
262
  }
242
263
  if (this.$props.onDownloadDone) {
243
- this.$props.onDownloadDone(
244
- this.downloadStateList,
245
- this.downloadResultMap
246
- );
264
+ this.$props.onDownloadDone(this.downloadStateList);
247
265
  }
248
266
  },
249
267
 
@@ -251,6 +269,7 @@ export default {
251
269
  if (!this.downloadList) {
252
270
  return;
253
271
  }
272
+ this.downloadStateList = new Array(this.downloadList.length).fill(null);
254
273
  // 直接在map前将url为null的值清除掉
255
274
  let downloadListData = this.downloadList;
256
275
  for (let i = 0; i < downloadListData.length; i++) {
@@ -258,14 +277,13 @@ export default {
258
277
  downloadListData.splice(i, 1);
259
278
  }
260
279
  }
261
- this.downloadStateList = new Array(downloadListData.length).fill(null);
262
280
  this.downloadViewList = downloadListData.map((item, index) => {
263
281
  if (item.magicToken !== this.CONST_FORMAT_TOKEN) {
264
282
  console.error(
265
283
  "Error:format mismatch, data should comes from function buildDownloadInfo()"
266
284
  );
267
285
  }
268
- console.log(`OnDownload get${index} url=${item.url}`);
286
+ console.log(`OnDownload get${index} url=${item.url}`)
269
287
  const base_url = item.url;
270
288
  let image_url = base_url;
271
289
  if (base_url && base_url.indexOf("http") < 0) {
@@ -274,33 +292,19 @@ export default {
274
292
  image_url = new window.JsView.Dom.UrlRef(base_url).href;
275
293
  }
276
294
  }
277
- const texture = ForgeExtension.TextureManager.GetDownloadTexture(
278
- image_url,
279
- null,
280
- item.getImageSize
281
- );
295
+ const texture =
296
+ ForgeExtension.TextureManager.GetDownloadTexture(image_url);
282
297
  if (!texture) {
283
- console.error(
284
- "Error: Down view build texture failed for " + image_url
285
- );
286
- // 无法创建texture的图片先认为加载完成
287
- this.downloadStateList[index] = "invalid";
288
- return;
289
- }
290
- const callback_token = texture.RegisterLoadImageCallback(
291
- null,
292
- (texture_info) => {
293
- console.log(`OnDownload done index${index}`);
294
- this.downloadStateList[index] = texture_info.extra.absolutePath;
295
- if (item.getImageSize && texture_info.extra.width && texture_info.extra.height) {
296
- this.downloadResultMap[texture_info.extra.absolutePath] = {
297
- width: texture_info.extra.width,
298
- height: texture_info.extra.height,
299
- };
300
- }
301
- this._checkDownload();
302
- }
303
- );
298
+ console.error("Error: Down view build texture failed for " + image_url);
299
+ // 无法创建texture的图片先认为加载完成
300
+ this.downloadStateList[index] = "invalid";
301
+ return;
302
+ }
303
+ const callback_token = texture.RegisterLoadImageCallback(null, (texture_info) => {
304
+ console.log(`OnDownload done index${index}`)
305
+ this.downloadStateList[index] = texture_info.extra.absolutePath;
306
+ this._checkDownload();
307
+ });
304
308
  if (texture.EnableBackgroundLoad) {
305
309
  texture.EnableBackgroundLoad(this);
306
310
  }
@@ -2,7 +2,7 @@
2
2
  * @Author: ChenChanghua
3
3
  * @Date: 2022-02-07 14:21:37
4
4
  * @LastEditors: ChenChanghua
5
- * @LastEditTime: 2022-08-24 13:18:21
5
+ * @LastEditTime: 2022-08-23 11:33:56
6
6
  * @Description: file content
7
7
  -->
8
8
  <script>
@@ -117,6 +117,11 @@ export default {
117
117
  type: Object,
118
118
  },
119
119
  },
120
+ data() {
121
+ return {
122
+ test: 0,
123
+ }
124
+ },
120
125
  watch: {
121
126
  texCoord: {
122
127
  handler(newValue, oldValue) {
@@ -198,6 +203,7 @@ export default {
198
203
  if (decorate_setting.url) {
199
204
  let converted_url = urlCheckSet(decorate_setting.url);
200
205
  let view_texture = textureManager.GetImage2(converted_url);
206
+
201
207
  nine_patch_view.EnableAlphaMix(view_texture);
202
208
  } else {
203
209
  console.error("ninepatch url not set");
@@ -302,6 +308,7 @@ export default {
302
308
  "RGB_8888",
303
309
  null
304
310
  );
311
+
305
312
  // 1.1 兼容border转为decorate
306
313
  let decorate = this.$props.decorate;
307
314
  if (this.$props.borderRadius) {
@@ -29,7 +29,7 @@
29
29
  </template>
30
30
 
31
31
  <script setup>
32
- import { reactive, ref, toRaw, watchEffect, onMounted, defineExpose } from 'vue'
32
+ import { reactive, ref, toRaw, watchEffect, onMounted } from 'vue'
33
33
  import { Forge } from "jsview/dom/jsv-forge-define";
34
34
 
35
35
  const props = defineProps({
@@ -0,0 +1,3 @@
1
+ export * from "./JsViewVueWidget";
2
+ export * from "./JsViewEngineWidget";
3
+ export * from "./JsViewVueTools";
package/utils/index.js ADDED
@@ -0,0 +1,10 @@
1
+ /*
2
+ * @Author: ChenChanghua
3
+ * @Date: 2022-07-05 14:22:52
4
+ * @LastEditors: ChenChanghua
5
+ * @LastEditTime: 2022-07-05 15:07:30
6
+ * @Description: file content
7
+ */
8
+ export * from "./JsViewVueWidget";
9
+ export * from "./JsViewEngineWidget";
10
+ export * from "./JsViewVueTools";
@@ -1,8 +0,0 @@
1
- import "./browser-root-style.css"
2
-
3
- // Release entry
4
- // export * from "./bin/jsview-browser-debug-dom.min"
5
-
6
- // Debug entry
7
- // TODO: 进行编译(yarn build)时,需要关闭掉此require
8
- export * from "../deps/jsview-dom/src/dom-browser-hook"
package/dom/jsv-dom.js_1 DELETED
@@ -1,6 +0,0 @@
1
- // Release entry
2
- // export * from "./bin/jsview-dom.min"
3
-
4
- // Debug entry
5
- // TODO: 进行编译(yarn build)时,需要关闭掉此require
6
- export * from "../deps/jsview-dom/src/dom-wrapper"
@@ -1,6 +0,0 @@
1
- // Release entry
2
- // export * from "./bin/jsview-forge-define.min"
3
-
4
- // Debug entry
5
- // TODO: 进行编译(yarn build)时,需要关闭掉此require
6
- export * from "../deps/jsview-dom/src/forge"
@@ -1,219 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.minVersions = exports.default = void 0;
7
-
8
- var _pluginSyntaxAsyncGenerators = require("@babel/plugin-syntax-async-generators");
9
-
10
- var _pluginSyntaxClassProperties = require("@babel/plugin-syntax-class-properties");
11
-
12
- var _pluginSyntaxClassStaticBlock = require("@babel/plugin-syntax-class-static-block");
13
-
14
- var _pluginSyntaxDynamicImport = require("@babel/plugin-syntax-dynamic-import");
15
-
16
- var _pluginSyntaxExportNamespaceFrom = require("@babel/plugin-syntax-export-namespace-from");
17
-
18
- var _pluginSyntaxJsonStrings = require("@babel/plugin-syntax-json-strings");
19
-
20
- var _pluginSyntaxLogicalAssignmentOperators = require("@babel/plugin-syntax-logical-assignment-operators");
21
-
22
- var _pluginSyntaxNullishCoalescingOperator = require("@babel/plugin-syntax-nullish-coalescing-operator");
23
-
24
- var _pluginSyntaxNumericSeparator = require("@babel/plugin-syntax-numeric-separator");
25
-
26
- var _pluginSyntaxObjectRestSpread = require("@babel/plugin-syntax-object-rest-spread");
27
-
28
- var _pluginSyntaxOptionalCatchBinding = require("@babel/plugin-syntax-optional-catch-binding");
29
-
30
- var _pluginSyntaxOptionalChaining = require("@babel/plugin-syntax-optional-chaining");
31
-
32
- var _pluginSyntaxPrivatePropertyInObject = require("@babel/plugin-syntax-private-property-in-object");
33
-
34
- var _pluginSyntaxTopLevelAwait = require("@babel/plugin-syntax-top-level-await");
35
-
36
- var _pluginProposalAsyncGeneratorFunctions = require("@babel/plugin-proposal-async-generator-functions");
37
-
38
- var _pluginProposalClassProperties = require("@babel/plugin-proposal-class-properties");
39
-
40
- var _pluginProposalClassStaticBlock = require("@babel/plugin-proposal-class-static-block");
41
-
42
- var _pluginProposalDynamicImport = require("@babel/plugin-proposal-dynamic-import");
43
-
44
- var _pluginProposalExportNamespaceFrom = require("@babel/plugin-proposal-export-namespace-from");
45
-
46
- var _pluginProposalJsonStrings = require("@babel/plugin-proposal-json-strings");
47
-
48
- var _pluginProposalLogicalAssignmentOperators = require("@babel/plugin-proposal-logical-assignment-operators");
49
-
50
- var _pluginProposalNullishCoalescingOperator = require("@babel/plugin-proposal-nullish-coalescing-operator");
51
-
52
- var _pluginProposalNumericSeparator = require("@babel/plugin-proposal-numeric-separator");
53
-
54
- var _pluginProposalObjectRestSpread = require("@babel/plugin-proposal-object-rest-spread");
55
-
56
- var _pluginProposalOptionalCatchBinding = require("@babel/plugin-proposal-optional-catch-binding");
57
-
58
- var _pluginProposalOptionalChaining = require("@babel/plugin-proposal-optional-chaining");
59
-
60
- var _pluginProposalPrivateMethods = require("@babel/plugin-proposal-private-methods");
61
-
62
- var _pluginProposalPrivatePropertyInObject = require("@babel/plugin-proposal-private-property-in-object");
63
-
64
- var _pluginProposalUnicodePropertyRegex = require("@babel/plugin-proposal-unicode-property-regex");
65
-
66
- var _pluginTransformAsyncToGenerator = require("@babel/plugin-transform-async-to-generator");
67
-
68
- var _pluginTransformArrowFunctions = require("@babel/plugin-transform-arrow-functions");
69
-
70
- var _pluginTransformBlockScopedFunctions = require("@babel/plugin-transform-block-scoped-functions");
71
-
72
- var _pluginTransformBlockScoping = require("@babel/plugin-transform-block-scoping");
73
-
74
- var _pluginTransformClasses = require("@babel/plugin-transform-classes");
75
-
76
- var _pluginTransformComputedProperties = require("@babel/plugin-transform-computed-properties");
77
-
78
- var _pluginTransformDestructuring = require("@babel/plugin-transform-destructuring");
79
-
80
- var _pluginTransformDotallRegex = require("@babel/plugin-transform-dotall-regex");
81
-
82
- var _pluginTransformDuplicateKeys = require("@babel/plugin-transform-duplicate-keys");
83
-
84
- var _pluginTransformExponentiationOperator = require("@babel/plugin-transform-exponentiation-operator");
85
-
86
- var _pluginTransformForOf = require("@babel/plugin-transform-for-of");
87
-
88
- var _pluginTransformFunctionName = require("@babel/plugin-transform-function-name");
89
-
90
- var _pluginTransformLiterals = require("@babel/plugin-transform-literals");
91
-
92
- var _pluginTransformMemberExpressionLiterals = require("@babel/plugin-transform-member-expression-literals");
93
-
94
- var _pluginTransformModulesAmd = require("@babel/plugin-transform-modules-amd");
95
-
96
- var _pluginTransformModulesCommonjs = require("@babel/plugin-transform-modules-commonjs");
97
-
98
- var _pluginTransformModulesSystemjs = require("@babel/plugin-transform-modules-systemjs");
99
-
100
- var _pluginTransformModulesUmd = require("@babel/plugin-transform-modules-umd");
101
-
102
- var _pluginTransformNamedCapturingGroupsRegex = require("@babel/plugin-transform-named-capturing-groups-regex");
103
-
104
- var _pluginTransformNewTarget = require("@babel/plugin-transform-new-target");
105
-
106
- var _pluginTransformObjectSuper = require("@babel/plugin-transform-object-super");
107
-
108
- var _pluginTransformParameters = require("@babel/plugin-transform-parameters");
109
-
110
- var _pluginTransformPropertyLiterals = require("@babel/plugin-transform-property-literals");
111
-
112
- var _pluginTransformRegenerator = require("@babel/plugin-transform-regenerator");
113
-
114
- var _pluginTransformReservedWords = require("@babel/plugin-transform-reserved-words");
115
-
116
- var _pluginTransformShorthandProperties = require("@babel/plugin-transform-shorthand-properties");
117
-
118
- var _pluginTransformSpread = require("@babel/plugin-transform-spread");
119
-
120
- var _pluginTransformStickyRegex = require("@babel/plugin-transform-sticky-regex");
121
-
122
- var _pluginTransformTemplateLiterals = require("@babel/plugin-transform-template-literals");
123
-
124
- var _pluginTransformTypeofSymbol = require("@babel/plugin-transform-typeof-symbol");
125
-
126
- var _pluginTransformUnicodeEscapes = require("@babel/plugin-transform-unicode-escapes");
127
-
128
- var _pluginTransformUnicodeRegex = require("@babel/plugin-transform-unicode-regex");
129
-
130
- var _transformAsyncArrowsInClass = require("@babel/preset-modules/lib/plugins/transform-async-arrows-in-class");
131
-
132
- var _transformEdgeDefaultParameters = require("@babel/preset-modules/lib/plugins/transform-edge-default-parameters");
133
-
134
- var _transformEdgeFunctionName = require("@babel/preset-modules/lib/plugins/transform-edge-function-name");
135
-
136
- var _transformTaggedTemplateCaching = require("@babel/preset-modules/lib/plugins/transform-tagged-template-caching");
137
-
138
- var _transformSafariBlockShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-block-shadowing");
139
-
140
- var _transformSafariForShadowing = require("@babel/preset-modules/lib/plugins/transform-safari-for-shadowing");
141
-
142
- var _pluginBugfixV8SpreadParametersInOptionalChaining = require("@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining");
143
-
144
- var _default = {
145
- "bugfix/transform-async-arrows-in-class": () => _transformAsyncArrowsInClass,
146
- "bugfix/transform-edge-default-parameters": () => _transformEdgeDefaultParameters,
147
- "bugfix/transform-edge-function-name": () => _transformEdgeFunctionName,
148
- "bugfix/transform-safari-block-shadowing": () => _transformSafariBlockShadowing,
149
- "bugfix/transform-safari-for-shadowing": () => _transformSafariForShadowing,
150
- "bugfix/transform-tagged-template-caching": () => _transformTaggedTemplateCaching,
151
- // "bugfix/transform-v8-spread-parameters-in-optional-chaining": () => _pluginBugfixV8SpreadParametersInOptionalChaining.default, // QCode Removed
152
- "proposal-async-generator-functions": () => _pluginProposalAsyncGeneratorFunctions.default,
153
- "proposal-class-properties": () => _pluginProposalClassProperties.default,
154
- "proposal-class-static-block": () => _pluginProposalClassStaticBlock.default,
155
- "proposal-dynamic-import": () => _pluginProposalDynamicImport.default,
156
- "proposal-export-namespace-from": () => _pluginProposalExportNamespaceFrom.default,
157
- "proposal-json-strings": () => _pluginProposalJsonStrings.default,
158
- "proposal-logical-assignment-operators": () => _pluginProposalLogicalAssignmentOperators.default,
159
- // "proposal-nullish-coalescing-operator": () => _pluginProposalNullishCoalescingOperator.default, // QCode Removed
160
- "proposal-numeric-separator": () => _pluginProposalNumericSeparator.default,
161
- "proposal-object-rest-spread": () => _pluginProposalObjectRestSpread.default,
162
- "proposal-optional-catch-binding": () => _pluginProposalOptionalCatchBinding.default,
163
- //"proposal-optional-chaining": () => _pluginProposalOptionalChaining.default, // QCode Removed
164
- "proposal-private-methods": () => _pluginProposalPrivateMethods.default,
165
- "proposal-private-property-in-object": () => _pluginProposalPrivatePropertyInObject.default,
166
- "proposal-unicode-property-regex": () => _pluginProposalUnicodePropertyRegex.default,
167
- "syntax-async-generators": () => _pluginSyntaxAsyncGenerators,
168
- "syntax-class-properties": () => _pluginSyntaxClassProperties,
169
- "syntax-class-static-block": () => _pluginSyntaxClassStaticBlock.default,
170
- "syntax-dynamic-import": () => _pluginSyntaxDynamicImport,
171
- "syntax-export-namespace-from": () => _pluginSyntaxExportNamespaceFrom,
172
- "syntax-json-strings": () => _pluginSyntaxJsonStrings,
173
- "syntax-logical-assignment-operators": () => _pluginSyntaxLogicalAssignmentOperators,
174
- // "syntax-nullish-coalescing-operator": () => _pluginSyntaxNullishCoalescingOperator, // QCode Removed
175
- "syntax-numeric-separator": () => _pluginSyntaxNumericSeparator,
176
- "syntax-object-rest-spread": () => _pluginSyntaxObjectRestSpread,
177
- "syntax-optional-catch-binding": () => _pluginSyntaxOptionalCatchBinding,
178
- // "syntax-optional-chaining": () => _pluginSyntaxOptionalChaining, // QCode Removed
179
- "syntax-private-property-in-object": () => _pluginSyntaxPrivatePropertyInObject.default,
180
- "syntax-top-level-await": () => _pluginSyntaxTopLevelAwait.default,
181
- "transform-arrow-functions": () => _pluginTransformArrowFunctions.default,
182
- // "transform-async-to-generator": () => _pluginTransformAsyncToGenerator.default, // QCode Removed
183
- "transform-block-scoped-functions": () => _pluginTransformBlockScopedFunctions.default,
184
- "transform-block-scoping": () => _pluginTransformBlockScoping.default,
185
- "transform-classes": () => _pluginTransformClasses.default,
186
- "transform-computed-properties": () => _pluginTransformComputedProperties.default,
187
- "transform-destructuring": () => _pluginTransformDestructuring.default,
188
- "transform-dotall-regex": () => _pluginTransformDotallRegex.default,
189
- "transform-duplicate-keys": () => _pluginTransformDuplicateKeys.default,
190
- "transform-exponentiation-operator": () => _pluginTransformExponentiationOperator.default,
191
- "transform-for-of": () => _pluginTransformForOf.default,
192
- "transform-function-name": () => _pluginTransformFunctionName.default,
193
- "transform-literals": () => _pluginTransformLiterals.default,
194
- "transform-member-expression-literals": () => _pluginTransformMemberExpressionLiterals.default,
195
- "transform-modules-amd": () => _pluginTransformModulesAmd.default,
196
- "transform-modules-commonjs": () => _pluginTransformModulesCommonjs.default,
197
- "transform-modules-systemjs": () => _pluginTransformModulesSystemjs.default,
198
- "transform-modules-umd": () => _pluginTransformModulesUmd.default,
199
- "transform-named-capturing-groups-regex": () => _pluginTransformNamedCapturingGroupsRegex.default,
200
- "transform-new-target": () => _pluginTransformNewTarget.default,
201
- "transform-object-super": () => _pluginTransformObjectSuper.default,
202
- "transform-parameters": () => _pluginTransformParameters.default,
203
- "transform-property-literals": () => _pluginTransformPropertyLiterals.default,
204
- // "transform-regenerator": () => _pluginTransformRegenerator.default, // QCode Removed
205
- "transform-reserved-words": () => _pluginTransformReservedWords.default,
206
- "transform-shorthand-properties": () => _pluginTransformShorthandProperties.default,
207
- "transform-spread": () => _pluginTransformSpread.default,
208
- "transform-sticky-regex": () => _pluginTransformStickyRegex.default,
209
- "transform-template-literals": () => _pluginTransformTemplateLiterals.default,
210
- "transform-typeof-symbol": () => _pluginTransformTypeofSymbol.default,
211
- "transform-unicode-escapes": () => _pluginTransformUnicodeEscapes.default,
212
- "transform-unicode-regex": () => _pluginTransformUnicodeRegex.default
213
- };
214
- exports.default = _default;
215
- const minVersions = {
216
- "proposal-class-static-block": "7.12.0",
217
- "proposal-private-property-in-object": "7.10.0"
218
- };
219
- exports.minVersions = minVersions;
@@ -1,100 +0,0 @@
1
- const path = require('path')
2
-
3
- module.exports = (api, projectOptions) => {
4
- const useThreads = process.env.NODE_ENV === 'production' && !!projectOptions.parallel
5
-
6
- const { semver, loadModule } = require('@vue/cli-shared-utils')
7
- const vue = loadModule('vue', api.service.context)
8
- const isVue3 = (vue && semver.major(vue.version) === 3)
9
-
10
- api.chainWebpack(config => {
11
- config.resolveLoader.modules.prepend(path.join(__dirname, 'node_modules'))
12
-
13
- if (!projectOptions.pages) {
14
- config.entry('main.jsv') // QCode Modified
15
- .clear()
16
- .add('./node_modules/@shijiu/jsview-vue/loader/jsview-main.js') // QCode Modified
17
- }
18
-
19
- config.resolve
20
- .extensions
21
- .prepend('.ts')
22
- .prepend('.tsx')
23
-
24
- const tsRule = config.module.rule('ts').test(/\.ts$/)
25
- const tsxRule = config.module.rule('tsx').test(/\.tsx$/)
26
-
27
- // add a loader to both *.ts & vue<lang="ts">
28
- const addLoader = ({ name, loader, options }) => {
29
- tsRule.use(name).loader(loader).options(options)
30
- tsxRule.use(name).loader(loader).options(options)
31
- }
32
-
33
- addLoader({
34
- name: 'cache-loader',
35
- loader: require.resolve('cache-loader'),
36
- options: api.genCacheConfig('ts-loader', {
37
- 'ts-loader': require('ts-loader/package.json').version,
38
- 'typescript': require('typescript/package.json').version,
39
- modern: !!process.env.VUE_CLI_MODERN_BUILD
40
- }, 'tsconfig.json')
41
- })
42
-
43
- if (useThreads) {
44
- addLoader({
45
- name: 'thread-loader',
46
- loader: require.resolve('thread-loader'),
47
- options:
48
- typeof projectOptions.parallel === 'number'
49
- ? { workers: projectOptions.parallel }
50
- : {}
51
- })
52
- }
53
-
54
- if (api.hasPlugin('babel')) {
55
- addLoader({
56
- name: 'babel-loader',
57
- loader: require.resolve('babel-loader')
58
- })
59
- }
60
- addLoader({
61
- name: 'ts-loader',
62
- loader: require.resolve('ts-loader'),
63
- options: {
64
- transpileOnly: true,
65
- appendTsSuffixTo: ['\\.vue$'],
66
- // https://github.com/TypeStrong/ts-loader#happypackmode-boolean-defaultfalse
67
- happyPackMode: useThreads
68
- }
69
- })
70
- // make sure to append TSX suffix
71
- tsxRule.use('ts-loader').loader(require.resolve('ts-loader')).tap(options => {
72
- options = Object.assign({}, options)
73
- delete options.appendTsSuffixTo
74
- options.appendTsxSuffixTo = ['\\.vue$']
75
- return options
76
- })
77
-
78
- // this plugin does not play well with jest + cypress setup (tsPluginE2e.spec.js) somehow
79
- // so temporarily disabled for vue-cli tests
80
- if (!process.env.VUE_CLI_TEST) {
81
- config
82
- .plugin('fork-ts-checker')
83
- .use(require('fork-ts-checker-webpack-plugin'), [{
84
- typescript: {
85
- extensions: {
86
- vue: {
87
- enabled: true,
88
- compiler: isVue3 ? require.resolve('@vue/compiler-sfc') : require.resolve('vue-template-compiler')
89
- }
90
- },
91
- diagnosticOptions: {
92
- semantic: true,
93
- // https://github.com/TypeStrong/ts-loader#happypackmode
94
- syntactic: useThreads
95
- }
96
- }
97
- }])
98
- }
99
- })
100
- }