@tarojs/components 3.7.0-alpha.1 → 3.7.0-alpha.3
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/cjs/hls-00fec546.js +25673 -0
- package/dist/{esm/index-394db4c1.js → cjs/index-f6805218.js} +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/taro-button-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-components.cjs.js +1 -1
- package/dist/cjs/taro-cover-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-icon-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-image-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-input-core.cjs.entry.js +6 -11
- package/dist/cjs/taro-navigator-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-picker-core_2.cjs.entry.js +23 -20
- package/dist/cjs/taro-picker-view-column-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-pull-to-refresh.cjs.entry.js +1 -1
- package/dist/cjs/taro-rich-text-core.cjs.entry.js +6 -0
- package/dist/cjs/taro-scroll-view-core.cjs.entry.js +1 -1
- package/dist/cjs/taro-swiper-core_2.cjs.entry.js +1 -1
- package/dist/cjs/taro-tabbar.cjs.entry.js +1 -1
- package/dist/cjs/taro-text-core.cjs.entry.js +9 -6
- package/dist/cjs/taro-textarea-core.cjs.entry.js +1 -8
- package/dist/cjs/taro-video-control_3.cjs.entry.js +3 -3
- package/dist/cjs/taro-view-core.cjs.entry.js +1 -1
- package/dist/collection/components/checkbox/checkbox.js +4 -4
- package/dist/collection/components/input/input.js +9 -13
- package/dist/collection/components/picker/picker-group.js +29 -26
- package/dist/collection/components/picker/picker.js +42 -16
- package/dist/collection/components/rich-text/rich-text.js +71 -0
- package/dist/collection/components/rich-text/style/index.css +16 -0
- package/dist/collection/components/text/style/index.css +20 -3
- package/dist/collection/components/text/text.js +66 -6
- package/dist/collection/components/textarea/textarea.js +4 -10
- package/dist/collection/components/video/video.js +1 -1
- package/dist/components/hls.js +23206 -24210
- package/dist/components/index2.js +1 -7
- package/dist/components/picker-group.js +9 -9
- package/dist/components/taro-checkbox-core.js +1 -1
- package/dist/components/taro-input-core.js +7 -12
- package/dist/components/taro-picker-core.js +16 -13
- package/dist/components/taro-rich-text-core.js +10 -1
- package/dist/components/taro-text-core.js +13 -7
- package/dist/components/taro-textarea-core.js +2 -9
- package/dist/components/taro-video-core.js +2 -2
- package/dist/esm/hls-4018c7ea.js +25671 -0
- package/dist/{cjs/index-067a58c1.js → esm/index-c3e4004b.js} +1 -12
- package/dist/esm/loader.js +1 -1
- package/dist/esm/taro-button-core.entry.js +1 -1
- package/dist/esm/taro-components.js +1 -1
- package/dist/esm/taro-cover-view-core.entry.js +1 -1
- package/dist/esm/taro-icon-core.entry.js +1 -1
- package/dist/esm/taro-image-core.entry.js +1 -1
- package/dist/esm/taro-input-core.entry.js +6 -11
- package/dist/esm/taro-navigator-core.entry.js +1 -1
- package/dist/esm/taro-picker-core_2.entry.js +23 -20
- package/dist/esm/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm/taro-rich-text-core.entry.js +6 -0
- package/dist/esm/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm/taro-tabbar.entry.js +1 -1
- package/dist/esm/taro-text-core.entry.js +9 -6
- package/dist/esm/taro-textarea-core.entry.js +1 -8
- package/dist/esm/taro-video-control_3.entry.js +3 -3
- package/dist/esm/taro-view-core.entry.js +1 -1
- package/dist/esm-es5/hls-4018c7ea.js +1 -0
- package/dist/esm-es5/index-c3e4004b.js +7 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/taro-button-core.entry.js +1 -1
- package/dist/esm-es5/taro-components.js +1 -1
- package/dist/esm-es5/taro-cover-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-icon-core.entry.js +1 -1
- package/dist/esm-es5/taro-image-core.entry.js +1 -1
- package/dist/esm-es5/taro-input-core.entry.js +1 -1
- package/dist/esm-es5/taro-navigator-core.entry.js +1 -1
- package/dist/esm-es5/taro-picker-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-picker-view-column-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-pull-to-refresh.entry.js +1 -1
- package/dist/esm-es5/taro-rich-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-scroll-view-core.entry.js +1 -1
- package/dist/esm-es5/taro-swiper-core_2.entry.js +1 -1
- package/dist/esm-es5/taro-tabbar.entry.js +1 -1
- package/dist/esm-es5/taro-text-core.entry.js +1 -1
- package/dist/esm-es5/taro-textarea-core.entry.js +1 -1
- package/dist/esm-es5/taro-video-control_3.entry.js +1 -1
- package/dist/esm-es5/taro-view-core.entry.js +1 -1
- package/dist/taro-components/p-01e163f8.system.entry.js +1 -0
- package/dist/taro-components/p-085076c5.system.entry.js +1 -0
- package/dist/taro-components/{p-25adb80c.entry.js → p-091a7153.entry.js} +1 -1
- package/dist/taro-components/{p-cd90bead.system.entry.js → p-0cf235de.system.entry.js} +1 -1
- package/dist/taro-components/p-0fa96970.entry.js +1 -0
- package/dist/taro-components/{p-edbb1a17.system.entry.js → p-1991cc1a.system.entry.js} +1 -1
- package/dist/taro-components/{p-c0ec2f41.system.entry.js → p-2accb92c.system.entry.js} +1 -1
- package/dist/taro-components/p-2ec68968.system.js +7 -0
- package/dist/taro-components/{p-18703731.system.entry.js → p-416cc4dd.system.entry.js} +1 -1
- package/dist/taro-components/p-425c209a.entry.js +1 -0
- package/dist/taro-components/p-43efbf30.js +1 -0
- package/dist/taro-components/{p-385d8aed.entry.js → p-4874f671.entry.js} +1 -1
- package/dist/taro-components/{p-2c89af5b.system.entry.js → p-657cb6e4.system.entry.js} +1 -1
- package/dist/taro-components/p-6cde180b.entry.js +1 -0
- package/dist/taro-components/{p-c490cd45.entry.js → p-7152d85b.entry.js} +1 -1
- package/dist/taro-components/{p-ab2d4f12.entry.js → p-719e1eaf.entry.js} +1 -1
- package/dist/taro-components/{p-b898d734.entry.js → p-78e4805e.entry.js} +1 -1
- package/dist/taro-components/{p-6800ccdc.system.entry.js → p-7ff654e6.system.entry.js} +1 -1
- package/dist/taro-components/{p-16336cc6.system.entry.js → p-98f9f50f.system.entry.js} +1 -1
- package/dist/taro-components/p-9edea30f.system.entry.js +1 -0
- package/dist/taro-components/{p-3f9f3448.entry.js → p-9fe49bab.entry.js} +1 -1
- package/dist/taro-components/{p-31bba7c3.entry.js → p-a20ecd3b.entry.js} +1 -1
- package/dist/taro-components/p-a20fed0a.entry.js +1 -0
- package/dist/taro-components/{p-7c2454dd.system.entry.js → p-a8925584.system.entry.js} +1 -1
- package/dist/taro-components/p-a8e7cf87.entry.js +1 -0
- package/dist/taro-components/{p-5905e3ef.system.entry.js → p-a96b4b19.system.entry.js} +1 -1
- package/dist/taro-components/{p-c2322741.system.entry.js → p-b1d2b575.system.entry.js} +1 -1
- package/dist/taro-components/p-c39a46ca.system.entry.js +1 -0
- package/dist/taro-components/{p-ca3a269f.entry.js → p-c4b8851b.entry.js} +1 -1
- package/dist/taro-components/{p-e5f78321.system.entry.js → p-cdb76676.system.entry.js} +1 -1
- package/dist/taro-components/p-de951a46.js +7 -0
- package/dist/taro-components/p-e09451c5.system.entry.js +1 -0
- package/dist/taro-components/{p-df4c2f21.entry.js → p-e33f3592.entry.js} +1 -1
- package/dist/taro-components/p-e78775ce.system.js +1 -0
- package/dist/taro-components/p-ebc7b6fc.entry.js +1 -0
- package/dist/taro-components/p-ed331c06.system.js +1 -1
- package/dist/taro-components/p-f02b6f70.entry.js +1 -0
- package/dist/taro-components/{p-1e43a2d5.entry.js → p-f07cd1de.entry.js} +1 -1
- package/dist/taro-components/p-f6f6a996.system.entry.js +1 -0
- package/dist/taro-components/taro-components.css +1 -1
- package/dist/taro-components/taro-components.esm.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +1 -1
- package/dist/types/components/input/input.d.ts +2 -2
- package/dist/types/components/picker/picker-group.d.ts +3 -3
- package/dist/types/components/picker/picker.d.ts +7 -2
- package/dist/types/components/rich-text/rich-text.d.ts +4 -0
- package/dist/types/components/text/text.d.ts +4 -0
- package/dist/types/components/textarea/textarea.d.ts +0 -1
- package/dist/types/components.d.ts +26 -8
- package/lib/react/component-lib/index.js +50 -50
- package/lib/react/component-lib/index.js.map +1 -1
- package/lib/react/component-lib/reactify-wc.js +1 -1
- package/lib/react/component-lib/reactify-wc.js.map +1 -1
- package/lib/react/components.d.ts +1 -3
- package/lib/react/components.js +2 -2
- package/lib/react/components.js.map +1 -1
- package/lib/react/helper.d.ts +1 -1
- package/lib/react/react-component-lib/createOverlayComponent.js.map +1 -1
- package/lib/react/react-component-lib/utils/attachProps.js +1 -4
- package/lib/react/react-component-lib/utils/attachProps.js.map +1 -1
- package/lib/vue2/components.d.ts +9 -3
- package/lib/vue2/components.js +12 -6
- package/lib/vue2/components.js.map +1 -1
- package/lib/vue2/vue-component-lib/utils.js.map +1 -1
- package/lib/vue3/component-lib/index.js +48 -48
- package/lib/vue3/component-lib/index.js.map +1 -1
- package/lib/vue3/components.d.ts +1 -1
- package/lib/vue3/components.js +13 -6
- package/lib/vue3/components.js.map +1 -1
- package/lib/vue3/vue-component-lib/utils.js.map +1 -1
- package/package.json +13 -11
- package/types/Button.d.ts +9 -7
- package/types/ChannelVideo.d.ts +4 -0
- package/types/Form.d.ts +11 -0
- package/types/Image.d.ts +5 -0
- package/types/Input.d.ts +6 -1
- package/types/LivePlayer.d.ts +17 -0
- package/types/LivePusher.d.ts +10 -0
- package/types/Picker.d.ts +9 -0
- package/types/Progress.d.ts +2 -2
- package/types/RichText.d.ts +6 -4
- package/types/ScrollView.d.ts +5 -5
- package/types/ShareElement.d.ts +39 -0
- package/types/StickySection.d.ts +0 -1
- package/types/Swiper.d.ts +10 -0
- package/types/Text.d.ts +8 -3
- package/types/Textarea.d.ts +10 -3
- package/types/Video.d.ts +12 -0
- package/types/View.d.ts +1 -1
- package/virtual-list/index.js +2 -2
- package/dist/cjs/hls-0f2d4d85.js +0 -26677
- package/dist/esm/hls-0e83e558.js +0 -26675
- package/dist/esm-es5/hls-0e83e558.js +0 -289
- package/dist/esm-es5/index-394db4c1.js +0 -7
- package/dist/taro-components/p-198000d8.system.js +0 -289
- package/dist/taro-components/p-2fad2a65.js +0 -7
- package/dist/taro-components/p-387314fa.system.js +0 -7
- package/dist/taro-components/p-3e701660.js +0 -289
- package/dist/taro-components/p-4e9bd4f6.entry.js +0 -1
- package/dist/taro-components/p-589293fd.entry.js +0 -1
- package/dist/taro-components/p-58b19305.system.entry.js +0 -1
- package/dist/taro-components/p-5b67a98e.entry.js +0 -1
- package/dist/taro-components/p-735c2a72.system.entry.js +0 -1
- package/dist/taro-components/p-97f0ad72.system.entry.js +0 -1
- package/dist/taro-components/p-a132ebb9.entry.js +0 -1
- package/dist/taro-components/p-c43c5e89.system.entry.js +0 -1
- package/dist/taro-components/p-cc7b95fd.system.entry.js +0 -1
- package/dist/taro-components/p-d9e2e3aa.entry.js +0 -1
- package/dist/taro-components/p-dcbb7b2d.entry.js +0 -1
- package/dist/taro-components/p-ed011ff9.entry.js +0 -1
- package/dist/taro-components/p-fa43177b.system.entry.js +0 -1
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
2
|
-
|
|
3
|
-
function getDefaultExportFromCjs (x) {
|
|
4
|
-
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
1
|
function createCommonjsModule(fn, basedir, module) {
|
|
8
2
|
return module = {
|
|
9
3
|
path: basedir,
|
|
@@ -74,4 +68,4 @@ var classnames = createCommonjsModule(function (module) {
|
|
|
74
68
|
}());
|
|
75
69
|
});
|
|
76
70
|
|
|
77
|
-
export {
|
|
71
|
+
export { classnames as c };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
1
|
+
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
3
|
const TOP = 102;
|
|
4
4
|
const LINE_HEIGHT = 34;
|
|
@@ -8,13 +8,13 @@ const TaroPickerGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
8
8
|
constructor() {
|
|
9
9
|
super();
|
|
10
10
|
this.__registerHost();
|
|
11
|
+
this.onColumnChange = createEvent(this, "columnChange", 7);
|
|
11
12
|
this.mode = undefined;
|
|
12
13
|
this.range = [];
|
|
13
14
|
this.rangeKey = undefined;
|
|
14
15
|
this.height = undefined;
|
|
15
16
|
this.columnId = undefined;
|
|
16
17
|
this.updateHeight = undefined;
|
|
17
|
-
this.onColumnChange = undefined;
|
|
18
18
|
this.updateDay = undefined;
|
|
19
19
|
this.startY = undefined;
|
|
20
20
|
this.preY = undefined;
|
|
@@ -84,7 +84,7 @@ const TaroPickerGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
84
84
|
this.updateHeight(newPos, this.columnId);
|
|
85
85
|
}
|
|
86
86
|
async handleMoveEnd(clientY) {
|
|
87
|
-
const { mode, range, height, updateHeight,
|
|
87
|
+
const { mode, range, height, updateHeight, columnId } = this;
|
|
88
88
|
const max = 0;
|
|
89
89
|
const min = -LINE_HEIGHT * (range.length - 1);
|
|
90
90
|
const endY = clientY;
|
|
@@ -135,7 +135,7 @@ const TaroPickerGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
135
135
|
// 先按公式算出 index, 再用此 index 算出一个整数高度
|
|
136
136
|
const index = Math.round(absoluteHeight / -LINE_HEIGHT);
|
|
137
137
|
const relativeHeight = TOP - LINE_HEIGHT * index;
|
|
138
|
-
if (this.mode === 'date') {
|
|
138
|
+
if (this.mode === 'date' && typeof this.updateDay === 'function') {
|
|
139
139
|
if (this.columnId === '0') {
|
|
140
140
|
this.updateDay(+this.range[index].replace(/[^0-9]/gi, ''), 0);
|
|
141
141
|
}
|
|
@@ -147,14 +147,16 @@ const TaroPickerGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
147
147
|
}
|
|
148
148
|
}
|
|
149
149
|
updateHeight(relativeHeight, columnId, mode === 'time');
|
|
150
|
-
onColumnChange
|
|
150
|
+
this.onColumnChange.emit({
|
|
151
|
+
columnId,
|
|
152
|
+
height: relativeHeight,
|
|
153
|
+
});
|
|
151
154
|
}
|
|
152
155
|
onMouseDown(e) {
|
|
153
156
|
this.isMove = true;
|
|
154
157
|
this.handleMoveStart(e.clientY);
|
|
155
158
|
}
|
|
156
159
|
onMouseMove(e) {
|
|
157
|
-
e.preventDefault();
|
|
158
160
|
if (!this.isMove)
|
|
159
161
|
return;
|
|
160
162
|
this.handleMoving(e.clientY);
|
|
@@ -169,7 +171,6 @@ const TaroPickerGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
169
171
|
this.handleMoveStart(e.changedTouches[0].clientY);
|
|
170
172
|
}
|
|
171
173
|
onTouchMove(e) {
|
|
172
|
-
e.preventDefault();
|
|
173
174
|
this.handleMoving(e.changedTouches[0].clientY);
|
|
174
175
|
}
|
|
175
176
|
onTouchEnd(e) {
|
|
@@ -190,7 +191,6 @@ const TaroPickerGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
190
191
|
"height": [2],
|
|
191
192
|
"columnId": [1, "column-id"],
|
|
192
193
|
"updateHeight": [16],
|
|
193
|
-
"onColumnChange": [16],
|
|
194
194
|
"updateDay": [16],
|
|
195
195
|
"startY": [32],
|
|
196
196
|
"preY": [32],
|
|
@@ -200,7 +200,7 @@ const TaroPickerGroup = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
200
200
|
"handleMoveStart": [64],
|
|
201
201
|
"handleMoving": [64],
|
|
202
202
|
"handleMoveEnd": [64]
|
|
203
|
-
}, [[1, "mousedown", "onMouseDown"], [
|
|
203
|
+
}, [[1, "mousedown", "onMouseDown"], [3, "mousemove", "onMouseMove"], [1, "mouseup", "onMouseMoveEnd"], [1, "mouseleave", "onMouseMoveEnd"], [1, "touchstart", "onTouchStart"], [3, "touchmove", "onTouchMove"], [1, "touchend", "onTouchEnd"]]]);
|
|
204
204
|
function defineCustomElement() {
|
|
205
205
|
if (typeof customElements === "undefined") {
|
|
206
206
|
return;
|
|
@@ -51,7 +51,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
51
51
|
static get style() { return indexCss; }
|
|
52
52
|
}, [4, "taro-checkbox-core", {
|
|
53
53
|
"name": [1],
|
|
54
|
-
"value": [
|
|
54
|
+
"value": [1032],
|
|
55
55
|
"color": [1],
|
|
56
56
|
"id": [1025],
|
|
57
57
|
"checked": [4],
|
|
@@ -126,7 +126,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
126
126
|
this.isOnComposition = true;
|
|
127
127
|
}
|
|
128
128
|
};
|
|
129
|
-
this.
|
|
129
|
+
this.handleBeforeInput = (e) => {
|
|
130
130
|
if (!e.data)
|
|
131
131
|
return;
|
|
132
132
|
const isNumber = e.data && /[0-9]/.test(e.data);
|
|
@@ -139,7 +139,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
141
|
};
|
|
142
|
-
this.value =
|
|
142
|
+
this.value = '';
|
|
143
143
|
this.type = undefined;
|
|
144
144
|
this.password = false;
|
|
145
145
|
this.placeholder = undefined;
|
|
@@ -176,14 +176,9 @@ const Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
176
176
|
else {
|
|
177
177
|
(_b = this.inputRef) === null || _b === void 0 ? void 0 : _b.addEventListener('compositionstart', this.handleComposition);
|
|
178
178
|
(_c = this.inputRef) === null || _c === void 0 ? void 0 : _c.addEventListener('compositionend', this.handleComposition);
|
|
179
|
-
(_d = this.inputRef) === null || _d === void 0 ? void 0 : _d.addEventListener('beforeinput', this.
|
|
180
|
-
(_e = this.inputRef) === null || _e === void 0 ? void 0 : _e.addEventListener('textInput', this.
|
|
179
|
+
(_d = this.inputRef) === null || _d === void 0 ? void 0 : _d.addEventListener('beforeinput', this.handleBeforeInput);
|
|
180
|
+
(_e = this.inputRef) === null || _e === void 0 ? void 0 : _e.addEventListener('textInput', this.handleBeforeInput);
|
|
181
181
|
}
|
|
182
|
-
Object.defineProperty(this.el, 'value', {
|
|
183
|
-
get: () => this.inputRef.value,
|
|
184
|
-
set: value => this.value !== value && (this.value = value),
|
|
185
|
-
configurable: true
|
|
186
|
-
});
|
|
187
182
|
}
|
|
188
183
|
disconnectedCallback() {
|
|
189
184
|
var _a, _b, _c, _d, _e;
|
|
@@ -193,8 +188,8 @@ const Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
193
188
|
else {
|
|
194
189
|
(_b = this.inputRef) === null || _b === void 0 ? void 0 : _b.removeEventListener('compositionstart', this.handleComposition);
|
|
195
190
|
(_c = this.inputRef) === null || _c === void 0 ? void 0 : _c.removeEventListener('compositionend', this.handleComposition);
|
|
196
|
-
(_d = this.inputRef) === null || _d === void 0 ? void 0 : _d.removeEventListener('beforeinput', this.
|
|
197
|
-
(_e = this.inputRef) === null || _e === void 0 ? void 0 : _e.removeEventListener('textInput', this.
|
|
191
|
+
(_d = this.inputRef) === null || _d === void 0 ? void 0 : _d.removeEventListener('beforeinput', this.handleBeforeInput);
|
|
192
|
+
(_e = this.inputRef) === null || _e === void 0 ? void 0 : _e.removeEventListener('textInput', this.handleBeforeInput);
|
|
198
193
|
}
|
|
199
194
|
}
|
|
200
195
|
render() {
|
|
@@ -218,7 +213,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
218
213
|
"placeholder": [1],
|
|
219
214
|
"disabled": [4],
|
|
220
215
|
"maxlength": [2],
|
|
221
|
-
"autoFocus": [
|
|
216
|
+
"autoFocus": [4, "focus"],
|
|
222
217
|
"confirmType": [1, "confirm-type"],
|
|
223
218
|
"name": [1],
|
|
224
219
|
"nativeProps": [16],
|
|
@@ -218,11 +218,19 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
218
218
|
})
|
|
219
219
|
.join('-');
|
|
220
220
|
}
|
|
221
|
-
this.
|
|
221
|
+
this.value = value;
|
|
222
|
+
this.pickerValue = this.value;
|
|
222
223
|
this.onChange.emit({
|
|
223
224
|
value
|
|
224
225
|
});
|
|
225
226
|
};
|
|
227
|
+
this.handleColumnChange = (e) => {
|
|
228
|
+
const { columnId, height } = e.detail;
|
|
229
|
+
this.onColumnChange.emit({
|
|
230
|
+
column: Number(columnId),
|
|
231
|
+
value: (TOP - height) / LINE_HEIGHT
|
|
232
|
+
});
|
|
233
|
+
};
|
|
226
234
|
// 点击取消按钮或蒙层
|
|
227
235
|
this.handleCancel = () => {
|
|
228
236
|
this.hidePicker();
|
|
@@ -260,12 +268,6 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
260
268
|
}
|
|
261
269
|
}
|
|
262
270
|
};
|
|
263
|
-
this.handleColumnChange = (height, columnId) => {
|
|
264
|
-
this.onColumnChange.emit({
|
|
265
|
-
column: Number(columnId),
|
|
266
|
-
value: (TOP - height) / LINE_HEIGHT
|
|
267
|
-
});
|
|
268
|
-
};
|
|
269
271
|
this.updateDay = (value, fields) => {
|
|
270
272
|
const { _start, _end, _updateValue } = this.pickerDate;
|
|
271
273
|
_updateValue[fields] = value;
|
|
@@ -351,6 +353,7 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
351
353
|
this.end = '';
|
|
352
354
|
this.fields = 'day';
|
|
353
355
|
this.name = '';
|
|
356
|
+
this.textProps = {};
|
|
354
357
|
this.pickerValue = [];
|
|
355
358
|
this.height = [];
|
|
356
359
|
this.hidden = true;
|
|
@@ -362,11 +365,6 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
362
365
|
this.handleProps();
|
|
363
366
|
}
|
|
364
367
|
componentDidLoad() {
|
|
365
|
-
Object.defineProperty(this.el, 'value', {
|
|
366
|
-
get: () => this.pickerValue,
|
|
367
|
-
set: value => this.value !== value && (this.value = value),
|
|
368
|
-
configurable: true
|
|
369
|
-
});
|
|
370
368
|
if (this.overlay) {
|
|
371
369
|
document.body.appendChild(this.overlay);
|
|
372
370
|
}
|
|
@@ -445,6 +443,9 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
445
443
|
throw new Error('Date Interval Error');
|
|
446
444
|
}
|
|
447
445
|
}
|
|
446
|
+
else {
|
|
447
|
+
throw new Error(`Picker not support "${mode}" mode.`);
|
|
448
|
+
}
|
|
448
449
|
// Prop 变化时,无论是否正在显示弹层,都更新 height 值
|
|
449
450
|
this.height = this.getHeightByIndex();
|
|
450
451
|
// 同步表单 value 值,用于 form submit
|
|
@@ -460,6 +461,7 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
460
461
|
}
|
|
461
462
|
}
|
|
462
463
|
render() {
|
|
464
|
+
var _a, _b;
|
|
463
465
|
const { name, mode, fadeOut, hidden } = this;
|
|
464
466
|
// 选项条
|
|
465
467
|
let pickerGroup;
|
|
@@ -484,7 +486,7 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
484
486
|
'weui-animate-slide-down': fadeOut
|
|
485
487
|
});
|
|
486
488
|
const shouldDivHidden = hidden ? { display: 'none' } : {};
|
|
487
|
-
return (h(Host, null, h("div", { onClick: this.showPicker }, h("slot", null), h("input", { type: 'hidden', name: name, value: formatValue(this.pickerValue) })), h("div", { class: 'weui-picker__overlay', style: shouldDivHidden, ref: el => { this.overlay = el; } }, h("div", { class: clsMask, onClick: this.handleCancel }), h("div", { class: clsSlider }, h("div", { class: 'weui-picker__hd' }, h("div", { class: 'weui-picker__action', onClick: this.handleCancel },
|
|
489
|
+
return (h(Host, null, h("div", { onClick: this.showPicker }, h("slot", null), h("input", { type: 'hidden', name: name, value: formatValue(this.pickerValue) })), h("div", { class: 'weui-picker__overlay', style: shouldDivHidden, ref: el => { this.overlay = el; } }, h("div", { class: clsMask, onClick: this.handleCancel }), h("div", { class: clsSlider }, h("div", { class: 'weui-picker__hd' }, h("div", { class: 'weui-picker__action', onClick: this.handleCancel }, (_a = this.textProps.cancelText) !== null && _a !== void 0 ? _a : '取消'), h("div", { class: 'weui-picker__action', onClick: this.handleChange }, (_b = this.textProps.okText) !== null && _b !== void 0 ? _b : '确定')), h("div", { class: 'weui-picker__bd' }, pickerGroup), h("input", { type: 'hidden', name: name, value: formatValue(this.pickerValue) })))));
|
|
488
490
|
}
|
|
489
491
|
get el() { return this; }
|
|
490
492
|
static get watchers() { return {
|
|
@@ -505,6 +507,7 @@ const Picker = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
505
507
|
"end": [1],
|
|
506
508
|
"fields": [1],
|
|
507
509
|
"name": [1],
|
|
510
|
+
"textProps": [16],
|
|
508
511
|
"pickerValue": [32],
|
|
509
512
|
"height": [32],
|
|
510
513
|
"hidden": [32],
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
|
|
3
|
+
const indexCss = "taro-rich-text-core{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}taro-rich-text-core[selectable=true],taro-rich-text-core[user-select=true]{display:block;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}taro-rich-text-core[space]{white-space:pre-wrap}taro-rich-text-core[space=ensp]{word-spacing:0.5em}taro-rich-text-core[space=nbsp]{word-spacing:1em}";
|
|
4
|
+
|
|
3
5
|
const RichText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
4
6
|
constructor() {
|
|
5
7
|
super();
|
|
@@ -51,6 +53,9 @@ const RichText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
51
53
|
return null;
|
|
52
54
|
};
|
|
53
55
|
this.nodes = undefined;
|
|
56
|
+
this.selectable = false;
|
|
57
|
+
this.userSelect = false;
|
|
58
|
+
this.space = undefined;
|
|
54
59
|
}
|
|
55
60
|
render() {
|
|
56
61
|
const { nodes, renderNode } = this;
|
|
@@ -61,8 +66,12 @@ const RichText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
61
66
|
return h(Host, { innerHTML: nodes });
|
|
62
67
|
}
|
|
63
68
|
}
|
|
69
|
+
static get style() { return indexCss; }
|
|
64
70
|
}, [0, "taro-rich-text-core", {
|
|
65
|
-
"nodes": [1]
|
|
71
|
+
"nodes": [1],
|
|
72
|
+
"selectable": [1028],
|
|
73
|
+
"userSelect": [1028, "user-select"],
|
|
74
|
+
"space": [1]
|
|
66
75
|
}]);
|
|
67
76
|
function defineCustomElement$1() {
|
|
68
77
|
if (typeof customElements === "undefined") {
|
|
@@ -1,23 +1,29 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as classnames } from './index2.js';
|
|
3
2
|
|
|
4
|
-
const indexCss = "taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none
|
|
3
|
+
const indexCss = "taro-text-core{display:inline;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}taro-text-core[selectable=true],taro-text-core[user-select=true]{display:inline-block;-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}taro-text-core[space]{white-space:pre-wrap}taro-text-core[space=ensp]{word-spacing:0.5em}taro-text-core[space=nbsp]{word-spacing:1em}taro-text-core[number-of-lines]{--line-clamp:2;display:-webkit-box;-webkit-box-orient:vertical;word-wrap:break-word;overflow:hidden;text-overflow:ellipsis;-webkit-line-clamp:var(--line-clamp)}";
|
|
5
4
|
|
|
6
5
|
const Text = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
6
|
constructor() {
|
|
8
7
|
super();
|
|
9
8
|
this.__registerHost();
|
|
10
9
|
this.selectable = false;
|
|
10
|
+
this.userSelect = false;
|
|
11
|
+
this.space = undefined;
|
|
12
|
+
this.numberOfLines = undefined;
|
|
11
13
|
}
|
|
12
14
|
render() {
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
const style = {};
|
|
16
|
+
if (typeof this.numberOfLines === 'number') {
|
|
17
|
+
style['--line-clamp'] = this.numberOfLines;
|
|
18
|
+
}
|
|
19
|
+
return (h(Host, { style: style }, h("slot", null)));
|
|
17
20
|
}
|
|
18
21
|
static get style() { return indexCss; }
|
|
19
22
|
}, [4, "taro-text-core", {
|
|
20
|
-
"selectable": [
|
|
23
|
+
"selectable": [1028],
|
|
24
|
+
"userSelect": [1028, "user-select"],
|
|
25
|
+
"space": [1025],
|
|
26
|
+
"numberOfLines": [2, "number-of-lines"]
|
|
21
27
|
}]);
|
|
22
28
|
function defineCustomElement$1() {
|
|
23
29
|
if (typeof customElements === "undefined") {
|
|
@@ -108,7 +108,7 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
108
108
|
numberOfLines = Math.floor(taHeight / taLineHeight);
|
|
109
109
|
return numberOfLines;
|
|
110
110
|
};
|
|
111
|
-
this.value =
|
|
111
|
+
this.value = '';
|
|
112
112
|
this.placeholder = undefined;
|
|
113
113
|
this.disabled = false;
|
|
114
114
|
this.maxlength = 140;
|
|
@@ -127,13 +127,6 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
127
127
|
async focus() {
|
|
128
128
|
this.textareaRef.focus();
|
|
129
129
|
}
|
|
130
|
-
componentDidLoad() {
|
|
131
|
-
Object.defineProperty(this.el, 'value', {
|
|
132
|
-
get: () => this.textareaRef.value,
|
|
133
|
-
set: value => this.value !== value && (this.value = value),
|
|
134
|
-
configurable: true
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
130
|
render() {
|
|
138
131
|
const { value, placeholder, disabled, maxlength, autoFocus, autoHeight, name, nativeProps, handleInput, handleFocus, handleBlur, handleChange } = this;
|
|
139
132
|
const otherProps = {};
|
|
@@ -158,7 +151,7 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
158
151
|
"placeholder": [1],
|
|
159
152
|
"disabled": [4],
|
|
160
153
|
"maxlength": [2],
|
|
161
|
-
"autoFocus": [
|
|
154
|
+
"autoFocus": [4, "focus"],
|
|
162
155
|
"autoHeight": [4, "auto-height"],
|
|
163
156
|
"name": [1],
|
|
164
157
|
"nativeProps": [16],
|
|
@@ -74,8 +74,8 @@ const Video = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
|
74
74
|
const { src, videoRef } = this;
|
|
75
75
|
if (isHls(src)) {
|
|
76
76
|
import(
|
|
77
|
-
/*
|
|
78
|
-
'./hls.js').then(
|
|
77
|
+
/* webpackExports: ["default"] */
|
|
78
|
+
'./hls.js').then(e => {
|
|
79
79
|
const Hls = e.default;
|
|
80
80
|
this.HLS = Hls;
|
|
81
81
|
if (Hls.isSupported()) {
|