@ray-js/api 1.6.18 → 1.6.20-alpha.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 (49) hide show
  1. package/@types/MediaKit.d.ts +77 -0
  2. package/@types/all-kits.d.ts +1 -0
  3. package/lib/MediaKit-3.4.1.d.ts +3 -0
  4. package/lib/MediaKit-3.4.1.js +11 -0
  5. package/lib/all-kits.d.ts +1 -0
  6. package/lib/all-kits.js +1 -0
  7. package/lib/cloud/alarm.js +2 -2
  8. package/lib/cloud/core.js +1 -1
  9. package/lib/cloud/device.js +7 -7
  10. package/lib/cloud/doorlock/auth.js +8 -8
  11. package/lib/cloud/doorlock/device.js +13 -13
  12. package/lib/cloud/doorlock/fittings.js +4 -4
  13. package/lib/cloud/doorlock/log.js +7 -7
  14. package/lib/cloud/doorlock/member-opmode.js +6 -6
  15. package/lib/cloud/doorlock/member.js +13 -13
  16. package/lib/cloud/doorlock/offline-pwd.js +4 -4
  17. package/lib/cloud/doorlock/sence.js +3 -3
  18. package/lib/cloud/doorlock/service.js +1 -1
  19. package/lib/cloud/doorlock/setting.js +11 -11
  20. package/lib/cloud/doorlock/temp-pwd.js +7 -7
  21. package/lib/cloud/doorlock/unlock-method.js +3 -3
  22. package/lib/cloud/doorlock/unlock.js +3 -3
  23. package/lib/cloud/interface.js +3 -2
  24. package/lib/cloud/linkage.js +17 -17
  25. package/lib/cloud/outdoor.js +1 -1
  26. package/lib/cloud/recipe/basket.js +10 -11
  27. package/lib/cloud/recipe/category-list.js +2 -2
  28. package/lib/cloud/recipe/custom.js +4 -5
  29. package/lib/cloud/recipe/menu.js +3 -4
  30. package/lib/cloud/recipe/query.js +3 -4
  31. package/lib/cloud/recipe/record.js +3 -3
  32. package/lib/cloud/recipe/score.js +3 -4
  33. package/lib/cloud/recipe/star.js +5 -6
  34. package/lib/cloud/remoteGroup.js +2 -2
  35. package/lib/cloud/statistic.js +9 -9
  36. package/lib/cloud/timer.js +14 -14
  37. package/lib/getBoundingClientRect/index.thing.js +0 -1
  38. package/lib/getBoundingClientRect/index.wechat.js +0 -1
  39. package/lib/getCdnUrl/index.thing.js +5 -5
  40. package/lib/getCdnUrl/index.wechat.js +5 -5
  41. package/lib/getElementById/index.thing.js +1 -1
  42. package/lib/getElementById/index.wechat.js +1 -1
  43. package/lib/panel/i18n/index.js +12 -16
  44. package/lib/panel/i18n/index.wechat.js +12 -16
  45. package/lib/panel/publishDps.js +1 -1
  46. package/lib/redirectTo/index.js +0 -2
  47. package/lib/utils.js +9 -9
  48. package/lib/utils.wechat.js +5 -6
  49. package/package.json +5 -5
package/lib/utils.js CHANGED
@@ -4,15 +4,15 @@ export function createFactory(kitName) {
4
4
  let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
5
5
  return function () {
6
6
  var _inst$opts$namespace;
7
- const methodName = "ty.".concat(opts.namespace ? opts.namespace + '.' : '').concat(name);
7
+ const methodName = `ty.${opts.namespace ? opts.namespace + '.' : ''}${name}`;
8
8
  if (opts.deprecated) {
9
- console.warn("\"".concat(methodName, "\" method has been deprecated."));
9
+ console.warn(`"${methodName}" method has been deprecated.`);
10
10
  }
11
11
  const inst = typeof ty === 'undefined' ? {} : ty;
12
12
  const method = opts.namespace ? ((_inst$opts$namespace = inst[opts.namespace]) !== null && _inst$opts$namespace !== void 0 ? _inst$opts$namespace : {})[name] : inst[name];
13
13
  if (!method) {
14
- console.warn('tips:', "\"".concat(methodName, "\" method not exits."));
15
- console.warn('tips:', "Please check kit \"".concat(kitName, "\" dependency is enabled."));
14
+ console.warn('tips:', `"${methodName}" method not exits.`);
15
+ console.warn('tips:', `Please check kit "${kitName}" dependency is enabled.`);
16
16
  return;
17
17
  }
18
18
  // eslint-disable-next-line prefer-rest-params
@@ -24,14 +24,14 @@ export function factory(name) {
24
24
  let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
25
25
  return function () {
26
26
  var _inst$opts$namespace2;
27
- const methodName = "ty.".concat(opts.namespace ? opts.namespace + '.' : '').concat(name);
27
+ const methodName = `ty.${opts.namespace ? opts.namespace + '.' : ''}${name}`;
28
28
  if (opts.deprecated) {
29
- console.warn("\"".concat(methodName, "\" method has been deprecated."));
29
+ console.warn(`"${methodName}" method has been deprecated.`);
30
30
  }
31
31
  const inst = typeof ty === 'undefined' ? {} : ty;
32
32
  const method = opts.namespace ? ((_inst$opts$namespace2 = inst[opts.namespace]) !== null && _inst$opts$namespace2 !== void 0 ? _inst$opts$namespace2 : {})[name] : inst[name];
33
33
  if (!method) {
34
- console.warn('tips:', "\"".concat(methodName, "\" method not exits."));
34
+ console.warn('tips:', `"${methodName}" method not exits.`);
35
35
  return;
36
36
  }
37
37
  // eslint-disable-next-line prefer-rest-params
@@ -41,11 +41,11 @@ export function factory(name) {
41
41
  export function factoryConstants(name) {
42
42
  let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
43
43
  if (opts.deprecated) {
44
- console.warn("\"ty.".concat(name, "\" constant has been deprecated."));
44
+ console.warn(`"ty.${name}" constant has been deprecated.`);
45
45
  }
46
46
  const inst = typeof ty === 'undefined' ? {} : ty;
47
47
  if (!inst[name]) {
48
- console.warn('tips', "\"ty.".concat(name, "\" constant not exits."));
48
+ console.warn('tips', `"ty.${name}" constant not exits.`);
49
49
  return;
50
50
  }
51
51
  return inst[name];
@@ -1,4 +1,3 @@
1
- import "core-js/modules/es.regexp.exec.js";
2
1
  // @ts-ignore
3
2
  import * as tyWx from '@ray-js/wechat';
4
3
  import { stringifyUrl as _stringifyUrl, parseUrl as _parseUrl } from 'query-string';
@@ -14,7 +13,7 @@ export function factory(name) {
14
13
  if (/(set|get|remove|clear)+Storage(Sync)?$/.test(name)) {
15
14
  return function (option) {
16
15
  if (opts.deprecated) {
17
- console.warn("\u8BE5\u65B9\u6CD5 ".concat(name, " \u5DF2\u5F03\u7528"));
16
+ console.warn(`该方法 ${name} 已弃用`);
18
17
  }
19
18
  // eslint-disable-next-line prefer-rest-params
20
19
  return wx[name].call(this, option.key, option.data);
@@ -22,10 +21,10 @@ export function factory(name) {
22
21
  }
23
22
  return function () {
24
23
  if (opts.deprecated) {
25
- console.warn("\u8BE5\u65B9\u6CD5 ".concat(name, " \u5DF2\u5F03\u7528"));
24
+ console.warn(`该方法 ${name} 已弃用`);
26
25
  }
27
26
  if (!tyWx[name] && !wx[name]) {
28
- console.warn("// TODO \u6682\u672A\u5B9E\u73B0\u65B9\u6CD5 wx.".concat(name));
27
+ console.warn(`// TODO 暂未实现方法 wx.${name}`);
29
28
  return;
30
29
  }
31
30
  // 优先取得 TTT 能力的方法
@@ -39,11 +38,11 @@ export function factory(name) {
39
38
  export function factoryConstants(name) {
40
39
  let opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
41
40
  if (opts.deprecated) {
42
- console.warn("\u8BE5\u53D8\u91CF ".concat(name, " \u5DF2\u5F03\u7528"));
41
+ console.warn(`该变量 ${name} 已弃用`);
43
42
  }
44
43
  const inst = typeof wx === 'undefined' ? {} : wx;
45
44
  if (!inst[name]) {
46
- console.warn("// TODO \u6682\u672A\u5B9E\u73B0\u53D8\u91CF ".concat(name));
45
+ console.warn(`// TODO 暂未实现变量 ${name}`);
47
46
  return;
48
47
  }
49
48
  return inst[name];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/api",
3
- "version": "1.6.18",
3
+ "version": "1.6.20-alpha.0",
4
4
  "description": "Ray universal api",
5
5
  "keywords": [
6
6
  "ray"
@@ -29,14 +29,14 @@
29
29
  "watch": "ray start --type=component"
30
30
  },
31
31
  "dependencies": {
32
- "@ray-js/framework": "1.6.18",
33
- "@ray-js/router": "1.6.18",
32
+ "@ray-js/framework": "1.6.20-alpha.0",
33
+ "@ray-js/router": "1.6.20-alpha.0",
34
34
  "@ray-js/wechat": "^0.2.19",
35
35
  "base64-browser": "^1.0.1",
36
36
  "query-string": "^7.1.3"
37
37
  },
38
38
  "devDependencies": {
39
- "@ray-js/cli": "1.6.18",
39
+ "@ray-js/cli": "1.6.20-alpha.0",
40
40
  "art-template": "^4.13.2",
41
41
  "fs-extra": "^10.1.0",
42
42
  "miniprogram-api-typings": "^3.12.3",
@@ -46,5 +46,5 @@
46
46
  "access": "public",
47
47
  "registry": "https://registry.npmjs.com"
48
48
  },
49
- "gitHead": "537ce09350475f32d1ac01abd36cc9171f9c7ecd"
49
+ "gitHead": "6111376e4f7189596d01d840c06e43284eb74d2e"
50
50
  }