@tarojs/plugin-platform-jd 3.5.0-beta.4 → 3.5.0-theta.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.
- package/dist/index.js +97 -96
- package/dist/index.js.map +1 -1
- package/dist/runtime-utils.js +18 -18
- package/dist/runtime.js +19 -19
- package/dist/runtime.js.map +1 -1
- package/index.js +1 -0
- package/package.json +4 -5
- package/types/index.d.ts +44 -5
- package/types/runtime-utils.d.ts +19 -6
- package/types/runtime.d.ts +1 -1
- package/LICENSE +0 -21
- package/types/apis.d.ts +0 -1
- package/types/components.d.ts +0 -14
- package/types/program.d.ts +0 -28
- package/types/template.d.ts +0 -15
package/dist/index.js
CHANGED
|
@@ -3,121 +3,122 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
var service = require('@tarojs/service');
|
|
6
|
-
var template = require('@tarojs/shared/dist/template');
|
|
7
6
|
var shared = require('@tarojs/shared');
|
|
7
|
+
var template = require('@tarojs/shared/dist/template');
|
|
8
8
|
|
|
9
9
|
/*! *****************************************************************************
|
|
10
|
-
Copyright (c) Microsoft Corporation.
|
|
11
|
-
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
|
|
12
|
-
this file except in compliance with the License. You may obtain a copy of the
|
|
13
|
-
License at http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
Copyright (c) Microsoft Corporation.
|
|
14
11
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
|
|
18
|
-
MERCHANTABLITY OR NON-INFRINGEMENT.
|
|
12
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
13
|
+
purpose with or without fee is hereby granted.
|
|
19
14
|
|
|
20
|
-
|
|
21
|
-
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
16
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
17
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
18
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
19
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
20
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
21
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
22
22
|
***************************************************************************** */
|
|
23
23
|
|
|
24
24
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
25
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
25
26
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
26
27
|
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
27
28
|
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
28
|
-
function step(result) { result.done ? resolve(result.value) :
|
|
29
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
29
30
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
30
31
|
});
|
|
31
32
|
}
|
|
32
33
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
replacePropName(name, value, componentName) {
|
|
49
|
-
if (value === 'eh') {
|
|
50
|
-
const nameLowerCase = name.toLowerCase();
|
|
51
|
-
if (nameLowerCase === 'bindlongtap' && componentName !== 'canvas')
|
|
52
|
-
return 'bindlongpress';
|
|
53
|
-
return nameLowerCase;
|
|
54
|
-
}
|
|
55
|
-
return name;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
const components = {
|
|
60
|
-
// ======== 调整属性 ========
|
|
61
|
-
Swiper: {
|
|
62
|
-
'easing-function': shared.singleQuote('default')
|
|
63
|
-
},
|
|
64
|
-
Canvas: {
|
|
65
|
-
type: ''
|
|
66
|
-
},
|
|
67
|
-
Button: {
|
|
68
|
-
bindGetPhoneNumber: ''
|
|
69
|
-
},
|
|
70
|
-
Map: {
|
|
71
|
-
bindRegionChange: ''
|
|
72
|
-
}
|
|
34
|
+
const components = {
|
|
35
|
+
// ======== 调整属性 ========
|
|
36
|
+
Swiper: {
|
|
37
|
+
'easing-function': shared.singleQuote('default')
|
|
38
|
+
},
|
|
39
|
+
Canvas: {
|
|
40
|
+
type: ''
|
|
41
|
+
},
|
|
42
|
+
Button: {
|
|
43
|
+
bindGetPhoneNumber: ''
|
|
44
|
+
},
|
|
45
|
+
Map: {
|
|
46
|
+
bindRegionChange: ''
|
|
47
|
+
}
|
|
73
48
|
};
|
|
74
49
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
close: this.modifyTemplate
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* 增加组件或修改组件属性
|
|
104
|
-
*/
|
|
105
|
-
modifyTemplate() {
|
|
106
|
-
this.template.mergeComponents(this.ctx, components);
|
|
107
|
-
}
|
|
50
|
+
class Template extends template.UnRecursiveTemplate {
|
|
51
|
+
constructor() {
|
|
52
|
+
super(...arguments);
|
|
53
|
+
this.supportXS = false;
|
|
54
|
+
this.Adapter = {
|
|
55
|
+
if: 'jd:if',
|
|
56
|
+
else: 'jd:else',
|
|
57
|
+
elseif: 'jd:elif',
|
|
58
|
+
for: 'jd:for',
|
|
59
|
+
forItem: 'jd:for-item',
|
|
60
|
+
forIndex: 'jd:for-index',
|
|
61
|
+
key: 'jd:key',
|
|
62
|
+
type: 'jd'
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
replacePropName(name, value, componentName) {
|
|
66
|
+
if (value === 'eh') {
|
|
67
|
+
const nameLowerCase = name.toLowerCase();
|
|
68
|
+
if (nameLowerCase === 'bindlongtap' && componentName !== 'canvas')
|
|
69
|
+
return 'bindlongpress';
|
|
70
|
+
return nameLowerCase;
|
|
71
|
+
}
|
|
72
|
+
return name;
|
|
73
|
+
}
|
|
108
74
|
}
|
|
109
75
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
76
|
+
const PACKAGE_NAME = '@tarojs/plugin-platform-jd';
|
|
77
|
+
class JD extends service.TaroPlatformBase {
|
|
78
|
+
/**
|
|
79
|
+
* 1. setupTransaction - init
|
|
80
|
+
* 2. setup
|
|
81
|
+
* 3. setupTransaction - close
|
|
82
|
+
* 4. buildTransaction - init
|
|
83
|
+
* 5. build
|
|
84
|
+
* 6. buildTransaction - close
|
|
85
|
+
*/
|
|
86
|
+
constructor(ctx, config) {
|
|
87
|
+
super(ctx, config);
|
|
88
|
+
this.platform = 'jd';
|
|
89
|
+
this.globalObject = 'jd';
|
|
90
|
+
this.projectConfigJson = 'project.jd.json';
|
|
91
|
+
this.runtimePath = `${PACKAGE_NAME}/dist/runtime`;
|
|
92
|
+
this.fileType = {
|
|
93
|
+
templ: '.jxml',
|
|
94
|
+
style: '.jxss',
|
|
95
|
+
config: '.json',
|
|
96
|
+
script: '.js'
|
|
97
|
+
};
|
|
98
|
+
this.template = new Template();
|
|
99
|
+
this.setupTransaction.addWrapper({
|
|
100
|
+
close: this.modifyTemplate
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 增加组件或修改组件属性
|
|
105
|
+
*/
|
|
106
|
+
modifyTemplate() {
|
|
107
|
+
this.template.mergeComponents(this.ctx, components);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
var index = (ctx) => {
|
|
112
|
+
ctx.registerPlatform({
|
|
113
|
+
name: 'jd',
|
|
114
|
+
useConfigName: 'mini',
|
|
115
|
+
fn({ config }) {
|
|
116
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
117
|
+
const program = new JD(ctx, config);
|
|
118
|
+
yield program.start();
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
121
122
|
};
|
|
122
123
|
|
|
123
124
|
exports.JD = JD;
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/components.ts","../src/template.ts","../src/program.ts","../src/index.ts"],"sourcesContent":["import { singleQuote } from '@tarojs/shared'\n\nexport const components = {\n // ======== 调整属性 ========\n Swiper: {\n 'easing-function': singleQuote('default')\n },\n Canvas: {\n type: ''\n },\n Button: {\n bindGetPhoneNumber: ''\n },\n Map: {\n bindRegionChange: ''\n }\n}\n","import { UnRecursiveTemplate } from '@tarojs/shared/dist/template'\n\nexport class Template extends UnRecursiveTemplate {\n supportXS = false\n Adapter = {\n if: 'jd:if',\n else: 'jd:else',\n elseif: 'jd:elif',\n for: 'jd:for',\n forItem: 'jd:for-item',\n forIndex: 'jd:for-index',\n key: 'jd:key',\n type: 'jd'\n }\n\n replacePropName (name, value, componentName) {\n if (value === 'eh') {\n const nameLowerCase = name.toLowerCase()\n if (nameLowerCase === 'bindlongtap' && componentName !== 'canvas') return 'bindlongpress'\n return nameLowerCase\n }\n return name\n }\n}\n","import { TaroPlatformBase } from '@tarojs/service'\n\nimport { components } from './components'\nimport { Template } from './template'\n\nconst PACKAGE_NAME = '@tarojs/plugin-platform-jd'\n\nexport default class JD extends TaroPlatformBase {\n platform = 'jd'\n globalObject = 'jd'\n projectConfigJson = 'project.jd.json'\n runtimePath = `${PACKAGE_NAME}/dist/runtime`\n fileType = {\n templ: '.jxml',\n style: '.jxss',\n config: '.json',\n script: '.js'\n }\n\n template = new Template()\n\n /**\n * 1. setupTransaction - init\n * 2. setup\n * 3. setupTransaction - close\n * 4. buildTransaction - init\n * 5. build\n * 6. buildTransaction - close\n */\n constructor (ctx, config) {\n super(ctx, config)\n\n this.setupTransaction.addWrapper({\n close: this.modifyTemplate\n })\n }\n\n /**\n * 增加组件或修改组件属性\n */\n modifyTemplate () {\n this.template.mergeComponents(this.ctx, components)\n }\n}\n","import type { IPluginContext } from '@tarojs/service'\n\nimport JD from './program'\n\n// 让其它平台插件可以继承此平台\nexport { JD }\n\nexport default (ctx: IPluginContext) => {\n ctx.registerPlatform({\n name: 'jd',\n useConfigName: 'mini',\n async fn ({ config }) {\n const program = new JD(ctx, config)\n await program.start()\n }\n })\n}\n"],"names":["singleQuote","UnRecursiveTemplate","TaroPlatformBase"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEO,MAAM,UAAU,GAAG;;AAExB,IAAA,MAAM,EAAE;AACN,QAAA,iBAAiB,EAAEA,kBAAW,CAAC,SAAS,CAAC;AAC1C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,EAAE;AACT,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,kBAAkB,EAAE,EAAE;AACvB,KAAA;AACD,IAAA,GAAG,EAAE;AACH,QAAA,gBAAgB,EAAE,EAAE;AACrB,KAAA;CACF;;ACdK,MAAO,QAAS,SAAQC,4BAAmB,CAAA;AAAjD,IAAA,WAAA,GAAA;;QACE,IAAS,CAAA,SAAA,GAAG,KAAK,CAAA;AACjB,QAAA,IAAA,CAAA,OAAO,GAAG;AACR,YAAA,EAAE,EAAE,OAAO;AACX,YAAA,IAAI,EAAE,SAAS;AACf,YAAA,MAAM,EAAE,SAAS;AACjB,YAAA,GAAG,EAAE,QAAQ;AACb,YAAA,OAAO,EAAE,aAAa;AACtB,YAAA,QAAQ,EAAE,cAAc;AACxB,YAAA,GAAG,EAAE,QAAQ;AACb,YAAA,IAAI,EAAE,IAAI;SACX,CAAA;KAUF;AARC,IAAA,eAAe,CAAE,IAAI,EAAE,KAAK,EAAE,aAAa,EAAA;QACzC,IAAI,KAAK,KAAK,IAAI,EAAE;AAClB,YAAA,MAAM,aAAa,GAAG,IAAI,CAAC,WAAW,EAAE,CAAA;AACxC,YAAA,IAAI,aAAa,KAAK,aAAa,IAAI,aAAa,KAAK,QAAQ;AAAE,gBAAA,OAAO,eAAe,CAAA;AACzF,YAAA,OAAO,aAAa,CAAA;AACrB,SAAA;AACD,QAAA,OAAO,IAAI,CAAA;KACZ;AACF;;AClBD,MAAM,YAAY,GAAG,4BAA4B,CAAA;AAE5B,MAAA,EAAG,SAAQC,wBAAgB,CAAA;AAc9C;;;;;;;AAOG;IACH,WAAa,CAAA,GAAG,EAAE,MAAM,EAAA;AACtB,QAAA,KAAK,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;QAtBpB,IAAQ,CAAA,QAAA,GAAG,IAAI,CAAA;QACf,IAAY,CAAA,YAAA,GAAG,IAAI,CAAA;QACnB,IAAiB,CAAA,iBAAA,GAAG,iBAAiB,CAAA;AACrC,QAAA,IAAA,CAAA,WAAW,GAAG,CAAA,EAAG,YAAY,CAAA,aAAA,CAAe,CAAA;AAC5C,QAAA,IAAA,CAAA,QAAQ,GAAG;AACT,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,KAAK,EAAE,OAAO;AACd,YAAA,MAAM,EAAE,OAAO;AACf,YAAA,MAAM,EAAE,KAAK;SACd,CAAA;AAED,QAAA,IAAA,CAAA,QAAQ,GAAG,IAAI,QAAQ,EAAE,CAAA;AAavB,QAAA,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC;YAC/B,KAAK,EAAE,IAAI,CAAC,cAAc;AAC3B,SAAA,CAAC,CAAA;KACH;AAED;;AAEG;IACH,cAAc,GAAA;QACZ,IAAI,CAAC,QAAQ,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,CAAA;KACpD;AACF;;ACpCD,YAAe,CAAC,GAAmB,KAAI;IACrC,GAAG,CAAC,gBAAgB,CAAC;AACnB,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,aAAa,EAAE,MAAM;QACf,EAAE,CAAE,EAAE,MAAM,EAAE,EAAA;;gBAClB,MAAM,OAAO,GAAG,IAAI,EAAE,CAAC,GAAG,EAAE,MAAM,CAAC,CAAA;AACnC,gBAAA,MAAM,OAAO,CAAC,KAAK,EAAE,CAAA;aACtB,CAAA,CAAA;AAAA,SAAA;AACF,KAAA,CAAC,CAAA;AACJ,CAAC;;;;;"}
|
package/dist/runtime-utils.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { processApis, singleQuote } from '@tarojs/shared';
|
|
2
2
|
|
|
3
|
-
function initNativeApi(taro) {
|
|
4
|
-
processApis(taro, jd);
|
|
3
|
+
function initNativeApi(taro) {
|
|
4
|
+
processApis(taro, jd);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const components = {
|
|
8
|
-
// ======== 调整属性 ========
|
|
9
|
-
Swiper: {
|
|
10
|
-
'easing-function': singleQuote('default')
|
|
11
|
-
},
|
|
12
|
-
Canvas: {
|
|
13
|
-
type: ''
|
|
14
|
-
},
|
|
15
|
-
Button: {
|
|
16
|
-
bindGetPhoneNumber: ''
|
|
17
|
-
},
|
|
18
|
-
Map: {
|
|
19
|
-
bindRegionChange: ''
|
|
20
|
-
}
|
|
7
|
+
const components = {
|
|
8
|
+
// ======== 调整属性 ========
|
|
9
|
+
Swiper: {
|
|
10
|
+
'easing-function': singleQuote('default')
|
|
11
|
+
},
|
|
12
|
+
Canvas: {
|
|
13
|
+
type: ''
|
|
14
|
+
},
|
|
15
|
+
Button: {
|
|
16
|
+
bindGetPhoneNumber: ''
|
|
17
|
+
},
|
|
18
|
+
Map: {
|
|
19
|
+
bindRegionChange: ''
|
|
20
|
+
}
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const hostConfig = {
|
|
24
|
-
initNativeApi
|
|
23
|
+
const hostConfig = {
|
|
24
|
+
initNativeApi
|
|
25
25
|
};
|
|
26
26
|
|
|
27
27
|
export { components, hostConfig, initNativeApi };
|
package/dist/runtime.js
CHANGED
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import { processApis, singleQuote, mergeReconciler, mergeInternalComponents } from '@tarojs/shared';
|
|
2
2
|
|
|
3
|
-
function initNativeApi(taro) {
|
|
4
|
-
processApis(taro, jd);
|
|
3
|
+
function initNativeApi(taro) {
|
|
4
|
+
processApis(taro, jd);
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
const components = {
|
|
8
|
-
// ======== 调整属性 ========
|
|
9
|
-
Swiper: {
|
|
10
|
-
'easing-function': singleQuote('default')
|
|
11
|
-
},
|
|
12
|
-
Canvas: {
|
|
13
|
-
type: ''
|
|
14
|
-
},
|
|
15
|
-
Button: {
|
|
16
|
-
bindGetPhoneNumber: ''
|
|
17
|
-
},
|
|
18
|
-
Map: {
|
|
19
|
-
bindRegionChange: ''
|
|
20
|
-
}
|
|
7
|
+
const components = {
|
|
8
|
+
// ======== 调整属性 ========
|
|
9
|
+
Swiper: {
|
|
10
|
+
'easing-function': singleQuote('default')
|
|
11
|
+
},
|
|
12
|
+
Canvas: {
|
|
13
|
+
type: ''
|
|
14
|
+
},
|
|
15
|
+
Button: {
|
|
16
|
+
bindGetPhoneNumber: ''
|
|
17
|
+
},
|
|
18
|
+
Map: {
|
|
19
|
+
bindRegionChange: ''
|
|
20
|
+
}
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
const hostConfig = {
|
|
24
|
-
initNativeApi
|
|
23
|
+
const hostConfig = {
|
|
24
|
+
initNativeApi
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
mergeReconciler(hostConfig);
|
|
27
|
+
mergeReconciler(hostConfig);
|
|
28
28
|
mergeInternalComponents(components);
|
|
29
29
|
//# sourceMappingURL=runtime.js.map
|
package/dist/runtime.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sources":["../src/apis.ts","../src/components.ts","../src/runtime-utils.ts","../src/runtime.ts"],"sourcesContent":["import { processApis } from '@tarojs/shared'\n\ndeclare const jd: any\n\nexport function initNativeApi (taro) {\n processApis(taro, jd)\n}\n","import { singleQuote } from '@tarojs/shared'\n\nexport const components = {\n // ======== 调整属性 ========\n Swiper: {\n 'easing-function': singleQuote('default')\n },\n Canvas: {\n type: ''\n },\n Button: {\n bindGetPhoneNumber: ''\n },\n Map: {\n bindRegionChange: ''\n }\n}\n","import { initNativeApi } from './apis'\n\nexport { initNativeApi }\nexport * from './components'\nexport const hostConfig = {\n initNativeApi\n}\n","import {
|
|
1
|
+
{"version":3,"file":"runtime.js","sources":["../src/apis.ts","../src/components.ts","../src/runtime-utils.ts","../src/runtime.ts"],"sourcesContent":["import { processApis } from '@tarojs/shared'\n\ndeclare const jd: any\n\nexport function initNativeApi (taro) {\n processApis(taro, jd)\n}\n","import { singleQuote } from '@tarojs/shared'\n\nexport const components = {\n // ======== 调整属性 ========\n Swiper: {\n 'easing-function': singleQuote('default')\n },\n Canvas: {\n type: ''\n },\n Button: {\n bindGetPhoneNumber: ''\n },\n Map: {\n bindRegionChange: ''\n }\n}\n","import { initNativeApi } from './apis'\n\nexport { initNativeApi }\nexport * from './components'\nexport const hostConfig = {\n initNativeApi\n}\n","import { mergeInternalComponents, mergeReconciler } from '@tarojs/shared'\n\nimport { components, hostConfig } from './runtime-utils'\n\nmergeReconciler(hostConfig)\nmergeInternalComponents(components)\n"],"names":[],"mappings":";;AAIM,SAAU,aAAa,CAAE,IAAI,EAAA;AACjC,IAAA,WAAW,CAAC,IAAI,EAAE,EAAE,CAAC,CAAA;AACvB;;ACJO,MAAM,UAAU,GAAG;;AAExB,IAAA,MAAM,EAAE;AACN,QAAA,iBAAiB,EAAE,WAAW,CAAC,SAAS,CAAC;AAC1C,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,IAAI,EAAE,EAAE;AACT,KAAA;AACD,IAAA,MAAM,EAAE;AACN,QAAA,kBAAkB,EAAE,EAAE;AACvB,KAAA;AACD,IAAA,GAAG,EAAE;AACH,QAAA,gBAAgB,EAAE,EAAE;AACrB,KAAA;CACF;;ACZM,MAAM,UAAU,GAAG;IACxB,aAAa;CACd;;ACFD,eAAe,CAAC,UAAU,CAAC,CAAA;AAC3B,uBAAuB,CAAC,UAAU,CAAC"}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/plugin-platform-jd",
|
|
3
|
-
"version": "3.5.0-
|
|
3
|
+
"version": "3.5.0-theta.0",
|
|
4
4
|
"description": "京东小程序平台插件",
|
|
5
5
|
"author": "Chen-jj",
|
|
6
6
|
"homepage": "https://github.com/nervjs/taro/tree/master/packages/taro-jd#readme",
|
|
@@ -27,8 +27,7 @@
|
|
|
27
27
|
"url": "https://github.com/NervJS/taro/issues"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@tarojs/service": "
|
|
31
|
-
"@tarojs/shared": "
|
|
32
|
-
}
|
|
33
|
-
"gitHead": "7aca7841ed7e2af1b182ff5d24e91f44730ce783"
|
|
30
|
+
"@tarojs/service": "workspace:*",
|
|
31
|
+
"@tarojs/shared": "workspace:*"
|
|
32
|
+
}
|
|
34
33
|
}
|
package/types/index.d.ts
CHANGED
|
@@ -1,5 +1,44 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { IPluginContext, TaroPlatformBase } from '@tarojs/service';
|
|
2
|
+
import { UnRecursiveTemplate } from "@tarojs/shared/dist/template";
|
|
3
|
+
declare class Template extends UnRecursiveTemplate {
|
|
4
|
+
supportXS: boolean;
|
|
5
|
+
Adapter: {
|
|
6
|
+
if: string;
|
|
7
|
+
else: string;
|
|
8
|
+
elseif: string;
|
|
9
|
+
for: string;
|
|
10
|
+
forItem: string;
|
|
11
|
+
forIndex: string;
|
|
12
|
+
key: string;
|
|
13
|
+
type: string;
|
|
14
|
+
};
|
|
15
|
+
replacePropName(name: any, value: any, componentName: any): any;
|
|
16
|
+
}
|
|
17
|
+
declare class JD extends TaroPlatformBase {
|
|
18
|
+
platform: string;
|
|
19
|
+
globalObject: string;
|
|
20
|
+
projectConfigJson: string;
|
|
21
|
+
runtimePath: string;
|
|
22
|
+
fileType: {
|
|
23
|
+
templ: string;
|
|
24
|
+
style: string;
|
|
25
|
+
config: string;
|
|
26
|
+
script: string;
|
|
27
|
+
};
|
|
28
|
+
template: Template;
|
|
29
|
+
/**
|
|
30
|
+
* 1. setupTransaction - init
|
|
31
|
+
* 2. setup
|
|
32
|
+
* 3. setupTransaction - close
|
|
33
|
+
* 4. buildTransaction - init
|
|
34
|
+
* 5. build
|
|
35
|
+
* 6. buildTransaction - close
|
|
36
|
+
*/
|
|
37
|
+
constructor(ctx: any, config: any);
|
|
38
|
+
/**
|
|
39
|
+
* 增加组件或修改组件属性
|
|
40
|
+
*/
|
|
41
|
+
modifyTemplate(): void;
|
|
42
|
+
}
|
|
43
|
+
declare const _default: (ctx: IPluginContext) => void;
|
|
44
|
+
export { _default as default, JD };
|
package/types/runtime-utils.d.ts
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
declare function initNativeApi(taro: any): void;
|
|
2
|
+
declare const components: {
|
|
3
|
+
Swiper: {
|
|
4
|
+
"easing-function": string;
|
|
5
|
+
};
|
|
6
|
+
Canvas: {
|
|
7
|
+
type: string;
|
|
8
|
+
};
|
|
9
|
+
Button: {
|
|
10
|
+
bindGetPhoneNumber: string;
|
|
11
|
+
};
|
|
12
|
+
Map: {
|
|
13
|
+
bindRegionChange: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
declare const hostConfig: {
|
|
17
|
+
initNativeApi: typeof initNativeApi;
|
|
18
|
+
};
|
|
19
|
+
export { initNativeApi, components, hostConfig };
|
package/types/runtime.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2018
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
package/types/apis.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function initNativeApi(taro: any): void;
|
package/types/components.d.ts
DELETED
package/types/program.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { TaroPlatformBase } from '@tarojs/service';
|
|
2
|
-
import { Template } from './template';
|
|
3
|
-
export default class JD extends TaroPlatformBase {
|
|
4
|
-
platform: string;
|
|
5
|
-
globalObject: string;
|
|
6
|
-
projectConfigJson: string;
|
|
7
|
-
runtimePath: string;
|
|
8
|
-
fileType: {
|
|
9
|
-
templ: string;
|
|
10
|
-
style: string;
|
|
11
|
-
config: string;
|
|
12
|
-
script: string;
|
|
13
|
-
};
|
|
14
|
-
template: Template;
|
|
15
|
-
/**
|
|
16
|
-
* 1. setupTransaction - init
|
|
17
|
-
* 2. setup
|
|
18
|
-
* 3. setupTransaction - close
|
|
19
|
-
* 4. buildTransaction - init
|
|
20
|
-
* 5. build
|
|
21
|
-
* 6. buildTransaction - close
|
|
22
|
-
*/
|
|
23
|
-
constructor(ctx: any, config: any);
|
|
24
|
-
/**
|
|
25
|
-
* 增加组件或修改组件属性
|
|
26
|
-
*/
|
|
27
|
-
modifyTemplate(): void;
|
|
28
|
-
}
|
package/types/template.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { UnRecursiveTemplate } from '@tarojs/shared/dist/template';
|
|
2
|
-
export declare class Template extends UnRecursiveTemplate {
|
|
3
|
-
supportXS: boolean;
|
|
4
|
-
Adapter: {
|
|
5
|
-
if: string;
|
|
6
|
-
else: string;
|
|
7
|
-
elseif: string;
|
|
8
|
-
for: string;
|
|
9
|
-
forItem: string;
|
|
10
|
-
forIndex: string;
|
|
11
|
-
key: string;
|
|
12
|
-
type: string;
|
|
13
|
-
};
|
|
14
|
-
replacePropName(name: any, value: any, componentName: any): any;
|
|
15
|
-
}
|