@tarojs/components-react 4.0.0-beta.61 → 4.0.0-beta.63
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.
|
@@ -60,11 +60,11 @@ const Progress = {
|
|
|
60
60
|
const RichText = {
|
|
61
61
|
nodes: DEFAULT_EMPTY_ARRAY
|
|
62
62
|
};
|
|
63
|
-
const Text = {
|
|
63
|
+
const Text = Object.assign({
|
|
64
64
|
selectable: DEFAULT_FALSE,
|
|
65
65
|
space: NO_DEFAULT_VALUE,
|
|
66
66
|
decode: DEFAULT_FALSE
|
|
67
|
-
};
|
|
67
|
+
}, touchEvents);
|
|
68
68
|
const Button = Object.assign({
|
|
69
69
|
size: singleQuote('default'),
|
|
70
70
|
type: NO_DEFAULT_VALUE,
|
|
@@ -119,10 +119,10 @@ const Input = {
|
|
|
119
119
|
bindConfirm: NO_DEFAULT_VALUE,
|
|
120
120
|
name: NO_DEFAULT_VALUE
|
|
121
121
|
};
|
|
122
|
-
const Label = {
|
|
122
|
+
const Label = Object.assign({
|
|
123
123
|
for: NO_DEFAULT_VALUE,
|
|
124
124
|
name: NO_DEFAULT_VALUE
|
|
125
|
-
};
|
|
125
|
+
}, touchEvents);
|
|
126
126
|
const Picker = {
|
|
127
127
|
mode: singleQuote('selector'),
|
|
128
128
|
disabled: NO_DEFAULT_VALUE,
|
|
@@ -385,6 +385,7 @@ const Slot = {
|
|
|
385
385
|
const NativeSlot = {
|
|
386
386
|
name: NO_DEFAULT_VALUE
|
|
387
387
|
};
|
|
388
|
+
const Script = {};
|
|
388
389
|
const internalComponents = {
|
|
389
390
|
View,
|
|
390
391
|
Icon,
|
|
@@ -425,7 +426,8 @@ const internalComponents = {
|
|
|
425
426
|
Map: MapComp,
|
|
426
427
|
Slot,
|
|
427
428
|
SlotView,
|
|
428
|
-
NativeSlot
|
|
429
|
+
NativeSlot,
|
|
430
|
+
Script
|
|
429
431
|
};
|
|
430
432
|
const controlledComponent = new Set(['input', 'checkbox', 'picker', 'picker-view', 'radio', 'slider', 'switch', 'textarea']);
|
|
431
433
|
const focusComponents = new Set(['input', 'textarea']);
|
|
@@ -555,6 +557,50 @@ class Events {
|
|
|
555
557
|
}
|
|
556
558
|
Events.eventSplitter = ','; // Note: Harmony ACE API 8 开发板不支持使用正则 split 字符串 /\s+/
|
|
557
559
|
|
|
560
|
+
class PageEvts extends Events {
|
|
561
|
+
constructor() {
|
|
562
|
+
super(...arguments);
|
|
563
|
+
this.exeList = [];
|
|
564
|
+
}
|
|
565
|
+
on(eventName, callback) {
|
|
566
|
+
super.on(eventName, callback, this);
|
|
567
|
+
this.exeList = this.exeList.reduce((prev, item) => {
|
|
568
|
+
if (item.eventName === eventName) {
|
|
569
|
+
super.trigger(item.eventName, item.data);
|
|
570
|
+
} else {
|
|
571
|
+
prev.push(item);
|
|
572
|
+
}
|
|
573
|
+
return prev;
|
|
574
|
+
}, []);
|
|
575
|
+
return this;
|
|
576
|
+
}
|
|
577
|
+
emit(events, data) {
|
|
578
|
+
// eslint-disable-next-line
|
|
579
|
+
routeChannel.trigger(events, data);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
const pageChannel = new PageEvts();
|
|
583
|
+
class RouteEvts extends Events {
|
|
584
|
+
emit(events, data) {
|
|
585
|
+
pageChannel.off(events);
|
|
586
|
+
pageChannel.exeList.push({
|
|
587
|
+
eventName: events,
|
|
588
|
+
data
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
addEvents(events) {
|
|
592
|
+
if (!events || typeof events !== 'object') return;
|
|
593
|
+
Object.keys(events).forEach(key => {
|
|
594
|
+
this.off(key);
|
|
595
|
+
this.on(key, events[key], this);
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
const routeChannel = new RouteEvts();
|
|
600
|
+
const EventChannel = {
|
|
601
|
+
pageChannel,
|
|
602
|
+
routeChannel
|
|
603
|
+
};
|
|
558
604
|
function isString(o) {
|
|
559
605
|
return typeof o === 'string';
|
|
560
606
|
}
|
|
@@ -1160,5 +1206,5 @@ var Shortcuts;
|
|
|
1160
1206
|
Shortcuts["Src"] = "src";
|
|
1161
1207
|
})(Shortcuts || (Shortcuts = {}));
|
|
1162
1208
|
|
|
1163
|
-
export { EMPTY_ARR, EMPTY_OBJ, Events, HOOK_TYPE, PLATFORM_CONFIG_MAP, PLATFORM_TYPE, Shortcuts, TaroHook, TaroHooks, animation, box, cacheDataGet, cacheDataHas, cacheDataSet, capitalize, controlledComponent, ensure, focusComponents, getComponentsAlias, getPlatformType, getUniqueKey, hasOwn, hooks, indent, internalComponents, isArray, isBoolean, isBooleanStringLiteral, isFunction, isNull, isNumber, isObject, isString, isUndefined, isWebPlatform, mergeInternalComponents, mergeReconciler, nestElements, nonsupport, noop, processApis, queryToJson, setUniqueKeyToRoute, singleQuote, toCamelCase, toDashed, toKebabCase, touchEvents, unbox, voidElements, warn };
|
|
1209
|
+
export { EMPTY_ARR, EMPTY_OBJ, EventChannel, Events, HOOK_TYPE, PLATFORM_CONFIG_MAP, PLATFORM_TYPE, Shortcuts, TaroHook, TaroHooks, animation, box, cacheDataGet, cacheDataHas, cacheDataSet, capitalize, controlledComponent, ensure, focusComponents, getComponentsAlias, getPlatformType, getUniqueKey, hasOwn, hooks, indent, internalComponents, isArray, isBoolean, isBooleanStringLiteral, isFunction, isNull, isNumber, isObject, isString, isUndefined, isWebPlatform, mergeInternalComponents, mergeReconciler, nestElements, nonsupport, noop, processApis, queryToJson, setUniqueKeyToRoute, singleQuote, toCamelCase, toDashed, toKebabCase, touchEvents, unbox, voidElements, warn };
|
|
1164
1210
|
//# sourceMappingURL=shared.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -60,11 +60,11 @@ const Progress = {
|
|
|
60
60
|
const RichText = {
|
|
61
61
|
nodes: DEFAULT_EMPTY_ARRAY
|
|
62
62
|
};
|
|
63
|
-
const Text = {
|
|
63
|
+
const Text = Object.assign({
|
|
64
64
|
selectable: DEFAULT_FALSE,
|
|
65
65
|
space: NO_DEFAULT_VALUE,
|
|
66
66
|
decode: DEFAULT_FALSE
|
|
67
|
-
};
|
|
67
|
+
}, touchEvents);
|
|
68
68
|
const Button = Object.assign({
|
|
69
69
|
size: singleQuote('default'),
|
|
70
70
|
type: NO_DEFAULT_VALUE,
|
|
@@ -119,10 +119,10 @@ const Input = {
|
|
|
119
119
|
bindConfirm: NO_DEFAULT_VALUE,
|
|
120
120
|
name: NO_DEFAULT_VALUE
|
|
121
121
|
};
|
|
122
|
-
const Label = {
|
|
122
|
+
const Label = Object.assign({
|
|
123
123
|
for: NO_DEFAULT_VALUE,
|
|
124
124
|
name: NO_DEFAULT_VALUE
|
|
125
|
-
};
|
|
125
|
+
}, touchEvents);
|
|
126
126
|
const Picker = {
|
|
127
127
|
mode: singleQuote('selector'),
|
|
128
128
|
disabled: NO_DEFAULT_VALUE,
|
|
@@ -385,6 +385,7 @@ const Slot = {
|
|
|
385
385
|
const NativeSlot = {
|
|
386
386
|
name: NO_DEFAULT_VALUE
|
|
387
387
|
};
|
|
388
|
+
const Script = {};
|
|
388
389
|
const internalComponents = {
|
|
389
390
|
View,
|
|
390
391
|
Icon,
|
|
@@ -425,7 +426,8 @@ const internalComponents = {
|
|
|
425
426
|
Map: MapComp,
|
|
426
427
|
Slot,
|
|
427
428
|
SlotView,
|
|
428
|
-
NativeSlot
|
|
429
|
+
NativeSlot,
|
|
430
|
+
Script
|
|
429
431
|
};
|
|
430
432
|
const controlledComponent = new Set(['input', 'checkbox', 'picker', 'picker-view', 'radio', 'slider', 'switch', 'textarea']);
|
|
431
433
|
const focusComponents = new Set(['input', 'textarea']);
|
|
@@ -555,6 +557,50 @@ class Events {
|
|
|
555
557
|
}
|
|
556
558
|
Events.eventSplitter = ','; // Note: Harmony ACE API 8 开发板不支持使用正则 split 字符串 /\s+/
|
|
557
559
|
|
|
560
|
+
class PageEvts extends Events {
|
|
561
|
+
constructor() {
|
|
562
|
+
super(...arguments);
|
|
563
|
+
this.exeList = [];
|
|
564
|
+
}
|
|
565
|
+
on(eventName, callback) {
|
|
566
|
+
super.on(eventName, callback, this);
|
|
567
|
+
this.exeList = this.exeList.reduce((prev, item) => {
|
|
568
|
+
if (item.eventName === eventName) {
|
|
569
|
+
super.trigger(item.eventName, item.data);
|
|
570
|
+
} else {
|
|
571
|
+
prev.push(item);
|
|
572
|
+
}
|
|
573
|
+
return prev;
|
|
574
|
+
}, []);
|
|
575
|
+
return this;
|
|
576
|
+
}
|
|
577
|
+
emit(events, data) {
|
|
578
|
+
// eslint-disable-next-line
|
|
579
|
+
routeChannel.trigger(events, data);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
const pageChannel = new PageEvts();
|
|
583
|
+
class RouteEvts extends Events {
|
|
584
|
+
emit(events, data) {
|
|
585
|
+
pageChannel.off(events);
|
|
586
|
+
pageChannel.exeList.push({
|
|
587
|
+
eventName: events,
|
|
588
|
+
data
|
|
589
|
+
});
|
|
590
|
+
}
|
|
591
|
+
addEvents(events) {
|
|
592
|
+
if (!events || typeof events !== 'object') return;
|
|
593
|
+
Object.keys(events).forEach(key => {
|
|
594
|
+
this.off(key);
|
|
595
|
+
this.on(key, events[key], this);
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
const routeChannel = new RouteEvts();
|
|
600
|
+
const EventChannel = {
|
|
601
|
+
pageChannel,
|
|
602
|
+
routeChannel
|
|
603
|
+
};
|
|
558
604
|
function isString(o) {
|
|
559
605
|
return typeof o === 'string';
|
|
560
606
|
}
|
|
@@ -1160,5 +1206,5 @@ var Shortcuts;
|
|
|
1160
1206
|
Shortcuts["Src"] = "src";
|
|
1161
1207
|
})(Shortcuts || (Shortcuts = {}));
|
|
1162
1208
|
|
|
1163
|
-
export { EMPTY_ARR, EMPTY_OBJ, Events, HOOK_TYPE, PLATFORM_CONFIG_MAP, PLATFORM_TYPE, Shortcuts, TaroHook, TaroHooks, animation, box, cacheDataGet, cacheDataHas, cacheDataSet, capitalize, controlledComponent, ensure, focusComponents, getComponentsAlias, getPlatformType, getUniqueKey, hasOwn, hooks, indent, internalComponents, isArray, isBoolean, isBooleanStringLiteral, isFunction, isNull, isNumber, isObject, isString, isUndefined, isWebPlatform, mergeInternalComponents, mergeReconciler, nestElements, nonsupport, noop, processApis, queryToJson, setUniqueKeyToRoute, singleQuote, toCamelCase, toDashed, toKebabCase, touchEvents, unbox, voidElements, warn };
|
|
1209
|
+
export { EMPTY_ARR, EMPTY_OBJ, EventChannel, Events, HOOK_TYPE, PLATFORM_CONFIG_MAP, PLATFORM_TYPE, Shortcuts, TaroHook, TaroHooks, animation, box, cacheDataGet, cacheDataHas, cacheDataSet, capitalize, controlledComponent, ensure, focusComponents, getComponentsAlias, getPlatformType, getUniqueKey, hasOwn, hooks, indent, internalComponents, isArray, isBoolean, isBooleanStringLiteral, isFunction, isNull, isNumber, isObject, isString, isUndefined, isWebPlatform, mergeInternalComponents, mergeReconciler, nestElements, nonsupport, noop, processApis, queryToJson, setUniqueKeyToRoute, singleQuote, toCamelCase, toDashed, toKebabCase, touchEvents, unbox, voidElements, warn };
|
|
1164
1210
|
//# sourceMappingURL=shared.esm.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"shared.esm.js","sources":[],"sourcesContent":[],"names":[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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tarojs/components-react",
|
|
3
|
-
"version": "4.0.0-beta.
|
|
3
|
+
"version": "4.0.0-beta.63",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main:h5": "dist/index.js",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"classnames": "^2.2.5",
|
|
29
29
|
"swiper": "6.8.0",
|
|
30
30
|
"tslib": "^2.6.2",
|
|
31
|
-
"@tarojs/taro": "4.0.0-beta.
|
|
32
|
-
"@tarojs/components": "4.0.0-beta.
|
|
31
|
+
"@tarojs/taro": "4.0.0-beta.63",
|
|
32
|
+
"@tarojs/components": "4.0.0-beta.63"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@babel/core": "^7.14.5",
|