cty-mui-core 1.0.4 → 1.0.5
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/components/alert.js +2 -2
- package/components/alert2.js +1 -1
- package/components/config2.js +165 -12
- package/components/cty-audio.js +2 -2
- package/components/cty-cascader.js +6 -3
- package/components/cty-pdf-viewer.js +2 -2
- package/components/cty-share-sheet.js +2 -2
- package/components/cty-video.js +6 -5
- package/components/index.js +11 -12
- package/components/ion-infinite-scroll-content.js +1 -1
- package/components/ion-loading.js +1 -1
- package/components/ion-refresher-content.js +1 -1
- package/components/toast.js +1 -1
- package/dist/cjs/cty-alert_2.cjs.entry.js +2 -3
- package/dist/cjs/cty-audio.cjs.entry.js +2 -2
- package/dist/cjs/cty-cascader.cjs.entry.js +6 -3
- package/dist/cjs/cty-pdf-viewer.cjs.entry.js +2 -2
- package/dist/cjs/cty-share-sheet.cjs.entry.js +2 -3
- package/dist/cjs/cty-video.cjs.entry.js +6 -5
- package/dist/cjs/index.cjs.js +24 -25
- package/dist/collection/components/alert/alert.js +1 -1
- package/dist/collection/components/audio/audio.js +1 -1
- package/dist/collection/components/cascader/cascader.js +6 -3
- package/dist/collection/components/pdf-viewer/pdf-viewer.js +1 -1
- package/dist/collection/components/share-sheet/share-sheet.js +1 -1
- package/dist/collection/components/video/video.js +6 -5
- package/dist/collection/global/cty-mui-global.js +1 -1
- package/dist/cty-mui/cty-mui.esm.js +1 -1
- package/dist/cty-mui/index.esm.js +1 -1
- package/dist/cty-mui/{p-528063e0.entry.js → p-0065ca91.entry.js} +1 -1
- package/dist/cty-mui/{p-a985c9be.system.entry.js → p-05f84baf.system.entry.js} +1 -1
- package/dist/cty-mui/{p-f3f8786c.system.entry.js → p-0cf8450c.system.entry.js} +1 -1
- package/dist/cty-mui/p-16c44e92.system.js +1 -1
- package/dist/cty-mui/{p-87e6d007.entry.js → p-28560f4a.entry.js} +1 -1
- package/dist/cty-mui/{p-0b60e66b.entry.js → p-375c3159.entry.js} +1 -1
- package/dist/cty-mui/{p-849c8101.system.entry.js → p-62a82a6d.system.entry.js} +1 -1
- package/dist/cty-mui/p-7114a5b4.system.entry.js +1 -0
- package/dist/cty-mui/{p-e59df1a9.system.entry.js → p-7676438b.system.entry.js} +1 -1
- package/dist/cty-mui/p-939f5021.system.js +1 -0
- package/dist/cty-mui/p-94b2d08c.entry.js +1 -0
- package/dist/cty-mui/p-ac0a3233.entry.js +1 -0
- package/dist/cty-mui/p-b34d9a2f.system.entry.js +1 -0
- package/dist/cty-mui/p-fa724d72.entry.js +1 -0
- package/dist/docs.json +2 -2
- package/dist/esm/cty-alert_2.entry.js +2 -3
- package/dist/esm/cty-audio.entry.js +2 -2
- package/dist/esm/cty-cascader.entry.js +6 -3
- package/dist/esm/cty-pdf-viewer.entry.js +2 -2
- package/dist/esm/cty-share-sheet.entry.js +2 -3
- package/dist/esm/cty-video.entry.js +6 -5
- package/dist/esm/index.js +9 -10
- package/dist/esm-es5/cty-alert_2.entry.js +1 -1
- package/dist/esm-es5/cty-audio.entry.js +1 -1
- package/dist/esm-es5/cty-cascader.entry.js +1 -1
- package/dist/esm-es5/cty-pdf-viewer.entry.js +1 -1
- package/dist/esm-es5/cty-share-sheet.entry.js +1 -1
- package/dist/esm-es5/cty-video.entry.js +1 -1
- package/dist/esm-es5/index.js +1 -1
- package/dist/types/components/cascader/cascader.d.ts +1 -0
- package/package.json +1 -1
- package/components/config3.js +0 -171
- package/dist/cjs/config-e19fcf65.js +0 -20
- package/dist/cty-mui/p-0518caca.entry.js +0 -1
- package/dist/cty-mui/p-2a93bb99.system.entry.js +0 -1
- package/dist/cty-mui/p-314473bf.system.js +0 -1
- package/dist/cty-mui/p-31a40f14.entry.js +0 -1
- package/dist/cty-mui/p-5daeea4a.entry.js +0 -1
- package/dist/cty-mui/p-7c1f6cfc.system.js +0 -1
- package/dist/cty-mui/p-b46e6c9b.system.entry.js +0 -1
- package/dist/cty-mui/p-f6a8abe8.js +0 -1
- package/dist/esm/config-0776646f.js +0 -18
- package/dist/esm-es5/config-0776646f.js +0 -1
package/components/alert.js
CHANGED
|
@@ -2,7 +2,7 @@ import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/
|
|
|
2
2
|
import { c as createLockController, g as getClassMap, s as sanitizeDOMString, d as defineCustomElement$2, e as enterAnimation, l as leaveAnimation } from './overlay.js';
|
|
3
3
|
import { c as createDelegateController, a as createTriggerController, p as prepareOverlay, b as present, d as dismiss, e as eventMethod } from './overlays.js';
|
|
4
4
|
import { r as raf } from './helpers3.js';
|
|
5
|
-
import { c as config } from './
|
|
5
|
+
import { c as config } from './config.js';
|
|
6
6
|
import { d as defineCustomElement$3 } from './icon.js';
|
|
7
7
|
import { d as defineCustomElement$1 } from './icon2.js';
|
|
8
8
|
|
|
@@ -101,7 +101,7 @@ const Alert = /*@__PURE__*/ proxyCustomElement(class Alert extends HTMLElement {
|
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
103
|
render() {
|
|
104
|
-
return (h(Host, { key: '
|
|
104
|
+
return (h(Host, { key: '2693a8a2631d92ad9f323747e425770125752eeb', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-overlay", { key: '9d51c2696ae1d2d4f35dc9a5702336939cf1acb5', animated: false, backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("slot", { key: '86ea129915a6074a8da3ee8d98663ad53c955472', name: "alert" }), h("div", { key: 'b2929ce71ade71befde4310bfc058424ab237779', class: "cty-alert", onClick: (e) => e.stopPropagation() }, this.img && h("img", { key: '95ce34363462fed18d917db284cf97781d594c5b', src: this.img, class: "cty-alert__img" }), this.closeable && h("slot", { key: '8a3621bbd1cff88112d1077a4f569cc72ce0f2f8', name: "close" }, h("button", { key: '4e6c9a680fc855722c713184d2c26bf49c08234d', class: "cty-alert__close cty-button-native", onClick: () => this.dismiss() }, h("cty-icon", { key: '05882dcbeed8a699e14c5de51c0df0abcc3b6aa8', name: "cty-close2" }))), h("slot", { key: '525bf2cc9482eaca2b3d9effa94bb46010521d1e', name: "header" }), h("div", { key: 'e9f0bddc5b523d9e4d28db7e8b1248b17d472ed9', class: "cty-alert__header flex-align-center", part: "header" }, h("slot", { key: '95fa202c9c3dd08bfe59237371f16d5c6efc989b', name: "title-start" }), h("h3", { key: '0fd533376b7c15f4918437deec7ee0f7ddff4a49', class: "cty-alert__title" }, this.title), h("slot", { key: '6cfc14da3b4ebfa5e10bc17bb1a5b4d172c7170d', name: "title-end" })), h("slot", { key: 'dc96a08610c050bd3f97eb9fd70ebadce430c6c9', name: "content" }), this.content && h("div", { key: 'c2a524ee6de82e40a1d62b03ee28b34e489cf825', part: "content", class: "cty-alert__content", innerHTML: sanitizeDOMString(this.content) }), h("slot", { key: '67452e3d6f3aed243b7c6b3b16d126252a14d1a6', name: "buttons" }), !!this._buttonList.length && h("div", { key: 'c8c02c750469a601b742d436a2cddf459f6fe376', class: "cty-alert__buttons flex", part: "buttons" }, this._buttonList.map((ele, idx) => h("button", { part: "button button" + idx, onClick: () => this._buttonClick(ele, idx), class: { 'cty-alert__button cty-button-native': true } }, ele.text))), h("slot", { key: '72e9bbfd40d495878f7bf0ba950d5a7bf110c7a7', name: "bottom" })))));
|
|
105
105
|
}
|
|
106
106
|
get el() { return this; }
|
|
107
107
|
static get watchers() { return {
|
package/components/alert2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, forceUpdate, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './
|
|
2
|
+
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './config2.js';
|
|
3
3
|
import { c as createButtonActiveGesture } from './button-active.js';
|
|
4
4
|
import { r as raf } from './helpers2.js';
|
|
5
5
|
import { c as createLockController } from './lock-controller.js';
|
package/components/config2.js
CHANGED
|
@@ -1,18 +1,171 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/*!
|
|
2
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Does a simple sanitization of all elements
|
|
6
|
+
* in an untrusted string
|
|
7
|
+
*/
|
|
8
|
+
const sanitizeDOMString = (untrustedString) => {
|
|
9
|
+
try {
|
|
10
|
+
if (untrustedString instanceof IonicSafeString) {
|
|
11
|
+
return untrustedString.value;
|
|
12
|
+
}
|
|
13
|
+
if (!isSanitizerEnabled() || typeof untrustedString !== 'string' || untrustedString === '') {
|
|
14
|
+
return untrustedString;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* onload is fired when appending to a document
|
|
18
|
+
* fragment in Chrome. If a string
|
|
19
|
+
* contains onload then we should not
|
|
20
|
+
* attempt to add this to the fragment.
|
|
21
|
+
*/
|
|
22
|
+
if (untrustedString.includes('onload=')) {
|
|
23
|
+
return '';
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Create a document fragment
|
|
27
|
+
* separate from the main DOM,
|
|
28
|
+
* create a div to do our work in
|
|
29
|
+
*/
|
|
30
|
+
const documentFragment = document.createDocumentFragment();
|
|
31
|
+
const workingDiv = document.createElement('div');
|
|
32
|
+
documentFragment.appendChild(workingDiv);
|
|
33
|
+
workingDiv.innerHTML = untrustedString;
|
|
34
|
+
/**
|
|
35
|
+
* Remove any elements
|
|
36
|
+
* that are blocked
|
|
37
|
+
*/
|
|
38
|
+
blockedTags.forEach((blockedTag) => {
|
|
39
|
+
const getElementsToRemove = documentFragment.querySelectorAll(blockedTag);
|
|
40
|
+
for (let elementIndex = getElementsToRemove.length - 1; elementIndex >= 0; elementIndex--) {
|
|
41
|
+
const element = getElementsToRemove[elementIndex];
|
|
42
|
+
if (element.parentNode) {
|
|
43
|
+
element.parentNode.removeChild(element);
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
documentFragment.removeChild(element);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* We still need to sanitize
|
|
50
|
+
* the children of this element
|
|
51
|
+
* as they are left behind
|
|
52
|
+
*/
|
|
53
|
+
const childElements = getElementChildren(element);
|
|
54
|
+
/* eslint-disable-next-line */
|
|
55
|
+
for (let childIndex = 0; childIndex < childElements.length; childIndex++) {
|
|
56
|
+
sanitizeElement(childElements[childIndex]);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
/**
|
|
61
|
+
* Go through remaining elements and remove
|
|
62
|
+
* non-allowed attribs
|
|
63
|
+
*/
|
|
64
|
+
// IE does not support .children on document fragments, only .childNodes
|
|
65
|
+
const dfChildren = getElementChildren(documentFragment);
|
|
66
|
+
/* eslint-disable-next-line */
|
|
67
|
+
for (let childIndex = 0; childIndex < dfChildren.length; childIndex++) {
|
|
68
|
+
sanitizeElement(dfChildren[childIndex]);
|
|
69
|
+
}
|
|
70
|
+
// Append document fragment to div
|
|
71
|
+
const fragmentDiv = document.createElement('div');
|
|
72
|
+
fragmentDiv.appendChild(documentFragment);
|
|
73
|
+
// First child is always the div we did our work in
|
|
74
|
+
const getInnerDiv = fragmentDiv.querySelector('div');
|
|
75
|
+
return getInnerDiv !== null ? getInnerDiv.innerHTML : fragmentDiv.innerHTML;
|
|
4
76
|
}
|
|
5
|
-
|
|
6
|
-
|
|
77
|
+
catch (err) {
|
|
78
|
+
console.error(err);
|
|
79
|
+
return '';
|
|
7
80
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
81
|
+
};
|
|
82
|
+
/**
|
|
83
|
+
* Clean up current element based on allowed attributes
|
|
84
|
+
* and then recursively dig down into any child elements to
|
|
85
|
+
* clean those up as well
|
|
86
|
+
*/
|
|
87
|
+
// TODO(FW-2832): type (using Element triggers other type errors as well)
|
|
88
|
+
const sanitizeElement = (element) => {
|
|
89
|
+
// IE uses childNodes, so ignore nodes that are not elements
|
|
90
|
+
if (element.nodeType && element.nodeType !== 1) {
|
|
91
|
+
return;
|
|
11
92
|
}
|
|
12
|
-
|
|
13
|
-
|
|
93
|
+
/**
|
|
94
|
+
* If attributes is not a NamedNodeMap
|
|
95
|
+
* then we should remove the element entirely.
|
|
96
|
+
* This helps avoid DOM Clobbering attacks where
|
|
97
|
+
* attributes is overridden.
|
|
98
|
+
*/
|
|
99
|
+
if (typeof NamedNodeMap !== 'undefined' && !(element.attributes instanceof NamedNodeMap)) {
|
|
100
|
+
element.remove();
|
|
101
|
+
return;
|
|
102
|
+
}
|
|
103
|
+
for (let i = element.attributes.length - 1; i >= 0; i--) {
|
|
104
|
+
const attribute = element.attributes.item(i);
|
|
105
|
+
const attributeName = attribute.name;
|
|
106
|
+
// remove non-allowed attribs
|
|
107
|
+
if (!allowedAttributes.includes(attributeName.toLowerCase())) {
|
|
108
|
+
element.removeAttribute(attributeName);
|
|
109
|
+
continue;
|
|
110
|
+
}
|
|
111
|
+
// clean up any allowed attribs
|
|
112
|
+
// that attempt to do any JS funny-business
|
|
113
|
+
const attributeValue = attribute.value;
|
|
114
|
+
/**
|
|
115
|
+
* We also need to check the property value
|
|
116
|
+
* as javascript: can allow special characters
|
|
117
|
+
* such as 	 and still be valid (i.e. java	script)
|
|
118
|
+
*/
|
|
119
|
+
const propertyValue = element[attributeName];
|
|
120
|
+
/* eslint-disable */
|
|
121
|
+
if ((attributeValue != null && attributeValue.toLowerCase().includes('javascript:')) ||
|
|
122
|
+
(propertyValue != null && propertyValue.toLowerCase().includes('javascript:'))) {
|
|
123
|
+
element.removeAttribute(attributeName);
|
|
124
|
+
}
|
|
125
|
+
/* eslint-enable */
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Sanitize any nested children
|
|
129
|
+
*/
|
|
130
|
+
const childElements = getElementChildren(element);
|
|
131
|
+
/* eslint-disable-next-line */
|
|
132
|
+
for (let i = 0; i < childElements.length; i++) {
|
|
133
|
+
sanitizeElement(childElements[i]);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
/**
|
|
137
|
+
* IE doesn't always support .children
|
|
138
|
+
* so we revert to .childNodes instead
|
|
139
|
+
*/
|
|
140
|
+
// TODO(FW-2832): type
|
|
141
|
+
const getElementChildren = (el) => {
|
|
142
|
+
return el.children != null ? el.children : el.childNodes;
|
|
143
|
+
};
|
|
144
|
+
const isSanitizerEnabled = () => {
|
|
145
|
+
var _a;
|
|
146
|
+
const win = window;
|
|
147
|
+
const config = (_a = win === null || win === void 0 ? void 0 : win.Ionic) === null || _a === void 0 ? void 0 : _a.config;
|
|
148
|
+
if (config) {
|
|
149
|
+
if (config.get) {
|
|
150
|
+
return config.get('sanitizerEnabled', true);
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
return config.sanitizerEnabled === true || config.sanitizerEnabled === undefined;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return true;
|
|
157
|
+
};
|
|
158
|
+
const allowedAttributes = ['class', 'id', 'href', 'src', 'name', 'slot'];
|
|
159
|
+
const blockedTags = ['script', 'style', 'iframe', 'meta', 'link', 'object', 'embed'];
|
|
160
|
+
class IonicSafeString {
|
|
161
|
+
constructor(value) {
|
|
162
|
+
this.value = value;
|
|
14
163
|
}
|
|
15
164
|
}
|
|
16
|
-
const config = /*@__PURE__*/ new Config();
|
|
17
165
|
|
|
18
|
-
|
|
166
|
+
/*!
|
|
167
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
168
|
+
*/
|
|
169
|
+
const ENABLE_HTML_CONTENT_DEFAULT = false;
|
|
170
|
+
|
|
171
|
+
export { ENABLE_HTML_CONTENT_DEFAULT as E, sanitizeDOMString as s };
|
package/components/cty-audio.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as config } from './
|
|
2
|
+
import { c as config } from './config.js';
|
|
3
3
|
import { n as network } from './network.js';
|
|
4
4
|
import { a as checkmarkCircle, b as radioButtonOffOutline } from './index4.js';
|
|
5
5
|
import { d as defineCustomElement$8 } from './action-sheet.js';
|
|
@@ -252,7 +252,7 @@ const Audio = /*@__PURE__*/ proxyCustomElement(class Audio extends HTMLElement {
|
|
|
252
252
|
});
|
|
253
253
|
}
|
|
254
254
|
render() {
|
|
255
|
-
return (h(Host, { key: '
|
|
255
|
+
return (h(Host, { key: '525d019627542421e46c8d65ab84c18bd386329b', class: "cty-audio flex-align-center" }, h("slot", { key: '04b4028b0652aadc51a5254b962a76e01563321c', name: "start" }), this.playCtrl && (h("button", { key: 'b4243c55f0d537da7226810b53fab08eddfd6a33', class: "cty-audio__toggle-play cty-button-native", onClick: () => this.switchAudio() }, h("cty-icon", { key: '0123126a3c421999c8be3b15e45c0000b2c745f0', name: !this.isPlaying ? 'cty-play' : 'cty-pause' }))), h("slot", { key: '50def909760f8e628fba76ee2cddc999b6c5759b', name: "range" }), h("div", { key: '1a3cd49ec5fbb48dd1198e9be1c0f9760e1bcfef', class: "cty-audio__range flex-column-between" }, h("div", { key: '3e828255cd8009bac7363789a17da2ad49b5ef4f', class: "cty-audio__range-touch", onTouchStart: e => this._doPrgTouchstart(e), onTouchMove: e => this._doPrgTouchmove(e), onTouchEnd: () => this._doPrgTouchend() }), h("ion-range", { key: '254787054ef8b2eb90e6b887835a0611d5cc1622', class: "cty-audio__range-progress", value: this.playProgress }), h("div", { key: '2f70fd76dd0199af8bfdb1fb11e54b6373138e44', class: "cty-audio__range-label flex-center-between" }, h("span", { key: 'e59d41a5a87f5c6052a2b5c5774eb9185d5ab1e8' }, this.currentTimeLabel), h("span", { key: '4320b790c7efa99bb2ad37f6444e2bf7bb7dc78a' }, this.totalTimeLabel))), h("div", { key: '79e3cd1ed3d5c7f7ab7e604da844a08906592cda', class: "flex-center cty-audio__rate" }, this.rateVisible && (h("button", { key: '1cf26f50258b3a2e501504444f74f98328a51c61', class: "cty-button-native flex-column-between cty-audio__rate-button", onClick: e => this._toSetRate(e) }, h("slot", { key: '12af93ec902a58302f4e6ca25c5287e49731f690', name: "rate-button" }, h("img", { key: '8fdf74d3664be992494c2b7647a30a0106e724d1', src: this.rateIconUrl }), h("span", { key: 'd817413a93c70188da5c9c0c4a9aeaf782a0a699' }, "\u500D\u901F")))), h("slot", { key: 'f82c935430628c707a281912096b33b225da8ef7', name: "rate" })), h("slot", { key: '23215483f08f51fda375e4c205d514c204c692bb', name: "end" }), h("audio", { key: 'dcc7e069fd8c9337a51e048ee337626aefd1ee32', ref: el => (this.audioEl = el), preload: "metadata", src: this.url, autoplay: this.autoplay && this.isWifi, onTimeUpdate: () => this._audioTimeupdate(), onCanPlay: () => this._audioCanplay(), onEnded: () => this._audioEnded(), onPlay: () => this._audioPlay(), onPause: () => this._audioPause(), onError: () => this._audioError() }), this.rateDialogVisible && (h("cty-action-sheet", { key: '7be9ac03b42c5b8449eb1ef2ec7232bb81368bda', animated: false, root: '', cancelText: "\u53D6\u6D88", overlayIndex: 1, onCtyDismiss: () => (this.rateDialogVisible = false) }, h("div", { key: '7c3b4cce9cc715e44c780faa332419b5f9fcd278', slot: 'options', class: "cty-overlay__rates" }, this.rates.map((item) => h("button", { class: { active: this.rate == item, 'flex-center-between cty-button-native cty-overlay__rate': true }, onClick: () => this.setPlayRate(item) }, h("span", null, item, "X"), h("cty-icon", { name: this.rate == item ? checkmarkCircle : radioButtonOffOutline, slot: "end" })))))), h("ion-toast", { key: '2d234e711075f622033c5e0635617fab2ed94288', "is-open": this.isToastVisible, message: this.toastMessage, duration: this.toastDuration, onIonToastDidDismiss: () => this.isToastVisible = false, position: 'middle' })));
|
|
256
256
|
}
|
|
257
257
|
get el() { return this; }
|
|
258
258
|
static get style() { return CtyAudioStyle0; }
|
|
@@ -13537,6 +13537,7 @@ const Cascader = /*@__PURE__*/ proxyCustomElement(class Cascader extends HTMLEle
|
|
|
13537
13537
|
mousemoving: false,
|
|
13538
13538
|
};
|
|
13539
13539
|
this.firstRender = true;
|
|
13540
|
+
this._defaultValues = [];
|
|
13540
13541
|
// Controller
|
|
13541
13542
|
this.delegateController = createDelegateController(this);
|
|
13542
13543
|
this.lockController = createLockController();
|
|
@@ -13602,10 +13603,12 @@ const Cascader = /*@__PURE__*/ proxyCustomElement(class Cascader extends HTMLEle
|
|
|
13602
13603
|
//this.presented && this.dismiss();
|
|
13603
13604
|
}
|
|
13604
13605
|
columnsChange() {
|
|
13606
|
+
this._defaultValues = this.defaultValues;
|
|
13605
13607
|
this.initScrollColumns();
|
|
13606
13608
|
}
|
|
13607
13609
|
componentWillLoad() {
|
|
13608
13610
|
prepareOverlay(this.el);
|
|
13611
|
+
this._defaultValues = this.defaultValues;
|
|
13609
13612
|
this.triggerChanged();
|
|
13610
13613
|
this.initDimensions();
|
|
13611
13614
|
this.initScrollColumns();
|
|
@@ -13649,7 +13652,7 @@ const Cascader = /*@__PURE__*/ proxyCustomElement(class Cascader extends HTMLEle
|
|
|
13649
13652
|
scrollEl: null,
|
|
13650
13653
|
scrolling: false,
|
|
13651
13654
|
};
|
|
13652
|
-
const value = this.
|
|
13655
|
+
const value = this._defaultValues[idx];
|
|
13653
13656
|
const index = scrollColumn.column.findIndex(option => value === this.getValue(option));
|
|
13654
13657
|
scrollColumn.index = index === -1 ? 0 : index;
|
|
13655
13658
|
this.scrollTo(scrollColumn);
|
|
@@ -13678,7 +13681,7 @@ const Cascader = /*@__PURE__*/ proxyCustomElement(class Cascader extends HTMLEle
|
|
|
13678
13681
|
};
|
|
13679
13682
|
scrollColumns.push(scrollColumn);
|
|
13680
13683
|
if (syncModelValue) {
|
|
13681
|
-
const value = this.
|
|
13684
|
+
const value = this._defaultValues[scrollColumns.length - 1];
|
|
13682
13685
|
const index = children.findIndex(option => value === this.getValue(option));
|
|
13683
13686
|
scrollColumn.index = index === -1 ? 0 : index;
|
|
13684
13687
|
}
|
|
@@ -13876,7 +13879,7 @@ const Cascader = /*@__PURE__*/ proxyCustomElement(class Cascader extends HTMLEle
|
|
|
13876
13879
|
this.ctyConfirm.emit({ values, indexes, options });
|
|
13877
13880
|
}
|
|
13878
13881
|
render() {
|
|
13879
|
-
return (h(Host, { key: '
|
|
13882
|
+
return (h(Host, { key: 'da948a780df0cd6dcec82e0ad9fac412b078701e', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-overlay", { key: '222192192332e55542f0b5c1036524902de25139', animated: false, backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, h("div", { key: '54d584fbe2dabac39ef12b0e2d1f98d1b61638a9', class: "cty-cascader-container", ref: (el) => (this.cascaderContainerEl = el) }, h("div", { key: 'd5be79a9d21de02099939ac1dd5d23d603186dfc', class: "cty-cascader", onClick: (e) => e.stopPropagation() }, h("slot", { key: '5326c8b90ce7b6a98d93c9f75f6b80048dd684a7', name: 'header' }), h("div", { key: '331202433d5bb660352ad47742e272a97a58127f', class: "cty-cascader-header" }, h("button", { key: 'fdcc3eac96cb86bb61c045baf5caa2355019ee4b', onClick: () => this.dismiss(), class: "cancel cty-button-native" }, this.cancelText), h("div", { key: 'ce4afdb8db6e9f00e8fa3c37c6ac67d73b184273', class: "cty-cascader-title" }, this.title), h("button", { key: '06e9ace9c7c40aabb56d073fec2545518b24b84d', onClick: () => this.confirm(), class: "confirm cty-button-native" }, this.confirmText)), h("div", { key: '115c34d4f69e78d5ea13925bd3aef803f5a3e826', class: "cty-cascader-columns", style: { height: this.columnHeight + 'px' } }, this.scrollColumns.map(c => h("div", { class: "cty-cascader-column", onTouchStart: (e) => this.handleTouchstart(e, c), onTouchMove: (e) => this.handleTouchmove(e, c), onTouchEnd: () => this.handleTouchend(c), onMouseDown: (e) => this.handleTouchstart(e, c), onMouseMove: (e) => this.handleTouchmove(e, c), onMouseUp: () => this.handleTouchend(c) }, h("div", { class: "cty-cascader-scroller", style: { transform: 'translateY(' + c.translate + 'px)', 'transition-duration': c.duration + 'ms', 'transition-property': c.duration ? 'transform' : 'none' }, onTransitionEnd: () => this.handleTransitionend(c) }, c.column.map((option, i) => h("div", { class: 'cty-cascader-option ' + (option.className || ''), style: { height: this.optionHeight + 'px' }, onClick: () => this.handleClick(c, i) }, h("div", { class: 'cty-cascader-text ' + (option.textClassName || '') }, option[this.textKey])))))), h("div", { key: '21765620c13f041a56433ebc34b9b92be9b4e81b', class: "cty-cascader-picked", style: { top: this.center + 'px', height: this.optionHeight + 'px' } }), h("div", { key: 'b9680146bca4bee8a84bb67c207eadd619131eaa', class: "cty-cascader-mask", style: { 'background-size': '100% ' + (this.columnHeight - this.optionHeight) / 2 + 'px' } })))))));
|
|
13880
13883
|
}
|
|
13881
13884
|
get el() { return this; }
|
|
13882
13885
|
static get watchers() { return {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as config } from './
|
|
2
|
+
import { c as config } from './config.js';
|
|
3
3
|
|
|
4
4
|
const pdfViewerCss = ":host{display:block;width:100%;height:100%}::slotted(.cty-pdf-viewer__iframe){display:block;width:100%;height:100%;margin:0;border:none}";
|
|
5
5
|
const CtyPdfViewerStyle0 = pdfViewerCss;
|
|
@@ -31,7 +31,7 @@ const PdfViewer = /*@__PURE__*/ proxyCustomElement(class PdfViewer extends HTMLE
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
render() {
|
|
34
|
-
return (h(Host, { key: '
|
|
34
|
+
return (h(Host, { key: '5e279da3b29c569d07851b694350610463b318c4', class: "cty-pdf-viewer" }, h("slot", { key: 'da6a6f842f652206f96c8be09e9e5c3728d62fbf' })));
|
|
35
35
|
}
|
|
36
36
|
get el() { return this; }
|
|
37
37
|
static get style() { return CtyPdfViewerStyle0; }
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { c as config } from './
|
|
2
|
+
import { c as config } from './config.js';
|
|
3
3
|
import { d as deviceInfo$1 } from './device-info2.js';
|
|
4
4
|
import { c as checkAppPermission, r as requestStorageAuthorization } from './utils.js';
|
|
5
5
|
import { d as deviceInfo } from './device-info.js';
|
|
@@ -637,7 +637,7 @@ const ShareSheet = /*@__PURE__*/ proxyCustomElement(class ShareSheet extends HTM
|
|
|
637
637
|
this.ctyGuide.emit();
|
|
638
638
|
}
|
|
639
639
|
render() {
|
|
640
|
-
return (h(Host, { key: '
|
|
640
|
+
return (h(Host, { key: 'ea8d6b20a91457d7c6f258ea328ff88459894bea', class: Object.assign(Object.assign({}, getClassMap(this.cssClass)), { 'overlay-hidden': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, h("cty-overlay", { key: '9c9d67ec3499817c8ca346dda954435eed21ad3a', animated: false, backdropDismiss: this.backdropDismiss, position: "bottom", onCtyDismiss: () => this.dismiss() }, this.guide && this.isMicroMessager && (h("div", { key: '293bdd02dbe36450ad324ef58d2d2fa7f057e17c', class: "cty-share-guide", onClick: () => this._doGuid() }, h("img", { key: '8b1c9f7a2afec1f5e14f4a47031f230c6d356dbb', src: this.guideImg }))), h("slot", { key: 'a7e7fbc9b543bd51ec1bed0c09a358725b5cf1da', name: "share-sheet" }), !this.hiddenSheet && (h("div", { key: '268545574acba20e36ae1c6a34b1903bca13c04d', class: "cty-share-sheet safe-area-bottom-padding", onClick: (e) => e.stopPropagation() }, h("slot", { key: 'b5bf08b27a455b565d450b8666745492175e7e0d', name: "header" }), (this.title || this.description) && (h("div", { key: '517d0adc533c43520280b25ebd3f15f5213977c3', class: "cty-share-sheet__header", part: "header" }, this.title && h("cty-divider", { key: 'c7b71fd69fe671bbf9e3cbc79c59e37b3e4ec939' }, this.title), this.description && h("p", { key: '006d6c2f99fca374266fbd5aa76abd0066c3b425', class: "cty-share-sheet__description" }, this.description))), h("slot", { key: '3e02dd037f30410b7a4659d0fe1fc58f096fd6ea', name: "options" }), h("div", { key: '5d338a94948e3e866894926c26098d0c34d9c866', class: "cty-share-sheet__options flex", part: "options" }, this._options.map((option, idx) => (h("div", { part: "option", class: "cty-share-sheet__option flex-align-center", onClick: () => this._buttonClick(option, idx) }, option.icon && option.icon.indexOf('/') >= 0 && !option.icon.endsWith('.svg') && h("img", { class: "cty-share-sheet__img", src: option.icon }), option.icon && (option.icon.indexOf('/') < 0 || option.icon.endsWith('.svg')) && h("cty-icon", { name: option.icon, class: "cty-share-sheet__icon" }), option.title && h("span", { class: "cty-share-sheet__option-title" }, option.title), option.description && h("span", { class: "cty-share-sheet__option-description" }, option.description))))), h("slot", { key: 'cf3bf35d6b83b3538176ace802d95bb08140c486', name: "cancel" }), this.cancelText && (h("button", { key: 'd56a150f045fc74bc2cfd21d4c6e5c23fb1da809', part: "cancel", class: "cty-button-native cty-share-sheet__cancel", onClick: () => this.dismiss() }, this.cancelText))))), this.showPermissionPurpose && h("cty-permission-purpose", { key: '66048460a81302fe6220798dbf898174091f850e', description: this.permissionDescription }), h("ion-toast", { key: 'ba977a93d9e5b51fc7a51a1998f2992159af7e0b', "is-open": this.isToastOpen, message: this.toastContent, duration: 2000 })));
|
|
641
641
|
}
|
|
642
642
|
get el() { return this; }
|
|
643
643
|
static get watchers() { return {
|
package/components/cty-video.js
CHANGED
|
@@ -4,7 +4,7 @@ import { a as secondsToVehicle, s as statusBar } from './status-bar.js';
|
|
|
4
4
|
import { f as fromEvent } from './merge.js';
|
|
5
5
|
import { n as network } from './network.js';
|
|
6
6
|
import { d as deviceInfo } from './device-info2.js';
|
|
7
|
-
import { c as config } from './
|
|
7
|
+
import { c as config } from './config.js';
|
|
8
8
|
import { v as volumeMuteOutline, o as volumeOffOutline, q as volumeLowOutline, u as volumeMediumOutline, w as volumeHighOutline, k as chevronBackOutline } from './index4.js';
|
|
9
9
|
import './gesture-controller.js';
|
|
10
10
|
import { i as isPlatform } from './platform.js';
|
|
@@ -644,7 +644,7 @@ const Video = /*@__PURE__*/ proxyCustomElement(class Video extends HTMLElement {
|
|
|
644
644
|
});
|
|
645
645
|
};
|
|
646
646
|
this.url = '';
|
|
647
|
-
this.poster =
|
|
647
|
+
this.poster = '';
|
|
648
648
|
this.startTime = 0;
|
|
649
649
|
this.preload = 'metadata';
|
|
650
650
|
this.allowForward = true;
|
|
@@ -1229,7 +1229,8 @@ const Video = /*@__PURE__*/ proxyCustomElement(class Video extends HTMLElement {
|
|
|
1229
1229
|
}
|
|
1230
1230
|
}
|
|
1231
1231
|
renderPlayer() {
|
|
1232
|
-
|
|
1232
|
+
const poster = this.poster || `${config.get('resUrlPrefix', '')}assets/cty_res/img/poster.jpg`;
|
|
1233
|
+
return (h("div", { class: "cty-video__wrapper", "data-tap-disable": "true" }, this.player === 'video' && h("video", { ref: (el) => (this.videoEl = el), class: "cty-video__player", poster: poster, preload: this.preload, "x5-video-player-type": "h5", "x5-video-player-fullscreen": "true", playsinline: true, "webkit-playsinline": true, autoplay: (this.isWifi || this.isMicroMessager || this.trafficAutoplay) && this.autoplay, onCanPlay: this._doCanplay, onTimeUpdate: this._doTimeupdate, onPlay: this._doPlay, onPause: this._doPause, onEnded: this._doEnded, onPlaying: this._doPlaying, onVolumeChange: this._doChangeVolume, onError: this._doError, onStalled: this._doStalled, onWaiting: this._doWaiting, onSeeked: this._doSeeked, src: this.url, typeof: "video/mp4" }), this.player === 'audio' && h("div", { class: "cty-video__player cty-video__audio-player" }, h("audio", { ref: (el) => (this.videoEl = el), class: "cty-video__player-audio", preload: this.preload, autoplay: (this.isWifi || this.isMicroMessager || this.trafficAutoplay) && this.autoplay, onCanPlay: this._doCanplay, onTimeUpdate: this._doTimeupdate, onEnded: this._doEnded, onPlaying: this._doPlaying, onPlay: this._doPlay, onPause: this._doPause, onVolumeChange: this._doChangeVolume, onError: this._doError, onStalled: this._doStalled }, h("source", { src: this.url, type: "audio/mp3" }), h("source", { src: this.url, type: "audio/ogg" })), h("slot", { name: "audio-content" }))));
|
|
1233
1234
|
}
|
|
1234
1235
|
renderControls() {
|
|
1235
1236
|
return (h("div", { class: "cty-video__controls", ref: (el) => (this.videoCtrlEl = el) }, h("slot", { name: "header" }), this.showCtrl && this.headerCtrl && (h("ion-grid", { class: "cty-video__header" }, h("ion-row", null, h("ion-col", { class: "flex-align-center cty-video__header-back" }, h("ion-button", { onClick: this._dismiss }, h("cty-icon", { name: chevronBackOutline }))), h("ion-col", { size: "6", class: "cty-video__title flex-align-center cty-ellipsis" }, this.title), h("ion-col", null, h("slot", { name: "headerCol" }))))), h("slot", { name: "footer" }), this.showCtrl && this.footerCtrl && (h("ion-grid", { class: {
|
|
@@ -1250,12 +1251,12 @@ const Video = /*@__PURE__*/ proxyCustomElement(class Video extends HTMLElement {
|
|
|
1250
1251
|
}, onClick: (event) => event.stopPropagation(), style: { top: this.dotDotPanelTop, left: this.dotDotPanelLeft, opacity: this.reallyShowDot ? '1' : '0' } }, h("span", { class: "cty-video__dot-label cty-ellipsis2" }, this.currentMarker.description), h("ion-button", { onClick: this._toPoint }, h("cty-icon", { name: "cty-play-ex" }), "\u77E5\u8BC6\u70B9"), h("span", { class: "cty-video__dot-triangle", style: { 'margin-left': this.triangleMargin + 'px' } }))), h("slot", { name: "ctrl" })));
|
|
1251
1252
|
}
|
|
1252
1253
|
render() {
|
|
1253
|
-
return (h(Host, { key: '
|
|
1254
|
+
return (h(Host, { key: 'a6edf0d562977a16c76b30ad45e3c5a73615488b', class: {
|
|
1254
1255
|
'cty-video': true,
|
|
1255
1256
|
'cty-video__vertical': this.deviceIsPORTRAIT,
|
|
1256
1257
|
'cty-video__unfullscreen': !this.curIsFullscreen,
|
|
1257
1258
|
'cty-video__large-screen': this.direction == 'P' && this.curIsFullscreen && (this.isPC || this.isIpad)
|
|
1258
|
-
} }, this.renderPlayer(), this.renderControls(), (!this.isLoading || this.isMicroMessager) && !this.isPlaying && !this.showInteractiveLayer && this.showTogglePlay && (h("ion-button", { key: '
|
|
1259
|
+
} }, this.renderPlayer(), this.renderControls(), (!this.isLoading || this.isMicroMessager) && !this.isPlaying && !this.showInteractiveLayer && this.showTogglePlay && (h("ion-button", { key: '6c1988d12b0b2879c7b1978fa2d3b4b030e0244e', part: "toggle-play", class: "cty-video__toggle-play flex-center", onClick: (e) => { this.toggleVideo(e); } }, h("cty-icon", { key: 'ff5545e3cbdfdf5576cd4db7d2043e28208edbd8', name: "cty-play" }))), !this.isWifi && !this.isPlaying && !this.isLoading && !this.isMicroMessager && this.trafficMsg && (h("div", { key: '3a55623ba544428f46451190145190805f0ed85b', class: "cty-video__toast cty-ellipsis", part: "toast" }, this.trafficMsg)), this.warningMsg != '' && (h("div", { key: 'dad0cfd2fcbeb646b5691ef23becb7dd25d82383', class: "cty-video__toast cty-ellipsis", part: "toast" }, this.warningMsg)), this.showPlayRate && (h("div", { key: '3a2a725d67316a0de4d3db4602d0c46e1ad1d461', class: "cty-video__rate", onClick: () => this.showPlayRate = false }, h("div", { key: '040554f876ef5a89868e64089cc8a0416a3ee02e', class: "cty-video__rate-mask flex-center-justify-end" }, h("div", { key: '9a7a3ddc6d41009efa1412f8037f0680d65b50c1', class: "cty-video__rate-list" }, this._rates.map((item) => (h("button", { onClick: () => this.setPlayRate(item), class: { active: this.rate == item, 'cty-video__rate-list-item': true } }, h("span", null, item, "X")))))))), this.hasInteractive && this.curIsFullscreen && (h("div", { key: 'f6e7a4324c2a3d87d88c900021e508a5a1621f7d', class: "cty-video__player cty-video__interactive", onClick: () => { }, ref: (el) => this.interactiveEl = el }))));
|
|
1259
1260
|
}
|
|
1260
1261
|
static get assetsDirs() { return ["assets"]; }
|
|
1261
1262
|
get el() { return this; }
|
package/components/index.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
export { getAssetPath, setAssetPath, setNonce, setPlatformOptions } from '@stencil/core/internal/client';
|
|
2
2
|
import { c as createAnimation } from './animation.js';
|
|
3
3
|
import './gesture-controller.js';
|
|
4
|
-
import { c as config } from './
|
|
5
|
-
import { c as config$1 } from './config.js';
|
|
4
|
+
import { c as config } from './config.js';
|
|
6
5
|
export { s as setupConfig } from './config.js';
|
|
7
6
|
import { p as pad } from './format.js';
|
|
8
7
|
export { h as camelToKebab, i as clamp, c as convertNumber, f as fileSize, k as kebabToCamel, n as numberToChinese, d as numberToLetter, p as pad, g as parseArray, e as parseJson, a as percent, b as price, r as randomNum } from './format.js';
|
|
@@ -13700,7 +13699,7 @@ const CTYCityData = [
|
|
|
13700
13699
|
];
|
|
13701
13700
|
|
|
13702
13701
|
const encode = (value) => {
|
|
13703
|
-
const base64Key = config
|
|
13702
|
+
const base64Key = config.get('base64Key', '');
|
|
13704
13703
|
let output = '';
|
|
13705
13704
|
let chr1, chr2, chr3, enc1, enc2, enc3, enc4;
|
|
13706
13705
|
let i = 0;
|
|
@@ -13724,7 +13723,7 @@ const encode = (value) => {
|
|
|
13724
13723
|
return output;
|
|
13725
13724
|
};
|
|
13726
13725
|
const decode = (value) => {
|
|
13727
|
-
const base64Key = config
|
|
13726
|
+
const base64Key = config.get('base64Key', '');
|
|
13728
13727
|
let output = '';
|
|
13729
13728
|
let chr1, chr2, chr3;
|
|
13730
13729
|
let enc1, enc2, enc3, enc4;
|
|
@@ -13820,7 +13819,7 @@ const fromBase64 = (value) => {
|
|
|
13820
13819
|
|
|
13821
13820
|
const language = {
|
|
13822
13821
|
get() {
|
|
13823
|
-
return config
|
|
13822
|
+
return config.get('langCode', 'zh-CN').substring(config.get('langCode', 'zh-CN').length - 2).toLocaleLowerCase();
|
|
13824
13823
|
}
|
|
13825
13824
|
};
|
|
13826
13825
|
const tmp = {
|
|
@@ -13839,17 +13838,17 @@ const tmp = {
|
|
|
13839
13838
|
};
|
|
13840
13839
|
const defaultDateFormat = {
|
|
13841
13840
|
get() {
|
|
13842
|
-
return config
|
|
13841
|
+
return config.get('defaultDateFormat', '') || tmp[language.get()].defaultDateFormat;
|
|
13843
13842
|
}
|
|
13844
13843
|
};
|
|
13845
13844
|
const defaultDateTimeFormat = {
|
|
13846
13845
|
get() {
|
|
13847
|
-
return config
|
|
13846
|
+
return config.get('defaultDateTimeFormat', '') || tmp[language.get()].defaultDateTimeFormat;
|
|
13848
13847
|
}
|
|
13849
13848
|
};
|
|
13850
13849
|
const defaultTimeZone = {
|
|
13851
13850
|
get() {
|
|
13852
|
-
return config
|
|
13851
|
+
return config.get('defaultTimeZone', '');
|
|
13853
13852
|
}
|
|
13854
13853
|
};
|
|
13855
13854
|
/**
|
|
@@ -14419,7 +14418,7 @@ function localGet(key) {
|
|
|
14419
14418
|
* @returns {string}
|
|
14420
14419
|
*/
|
|
14421
14420
|
function getKey$1(key) {
|
|
14422
|
-
return config
|
|
14421
|
+
return config.get('storageKey', 'cty.ui_') + key;
|
|
14423
14422
|
}
|
|
14424
14423
|
/**
|
|
14425
14424
|
* Delete the value from localStorage by key
|
|
@@ -14465,7 +14464,7 @@ function sessionGet(key) {
|
|
|
14465
14464
|
* @returns {string}
|
|
14466
14465
|
*/
|
|
14467
14466
|
function getKey(key) {
|
|
14468
|
-
return config
|
|
14467
|
+
return config.get('storageKey', 'cty.ui_') + key;
|
|
14469
14468
|
}
|
|
14470
14469
|
/**
|
|
14471
14470
|
* Delete the value from localStorage by key
|
|
@@ -15643,8 +15642,8 @@ const initialize = (userConfig = {}) => {
|
|
|
15643
15642
|
}
|
|
15644
15643
|
};
|
|
15645
15644
|
const configObj = Object.assign(Object.assign(Object.assign({}, defaultConfig), CtyMUI.config), userConfig);
|
|
15646
|
-
config
|
|
15647
|
-
CtyMUI.config = config
|
|
15645
|
+
config.reset(configObj);
|
|
15646
|
+
CtyMUI.config = config;
|
|
15648
15647
|
};
|
|
15649
15648
|
|
|
15650
15649
|
const createController = (tagName) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './
|
|
2
|
+
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './config2.js';
|
|
3
3
|
import { b as config } from './platform.js';
|
|
4
4
|
import { g as getIonMode } from './ionic-global.js';
|
|
5
5
|
import { d as defineCustomElement$2 } from './spinner.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './
|
|
2
|
+
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './config2.js';
|
|
3
3
|
import { r as raf } from './helpers2.js';
|
|
4
4
|
import { c as createLockController } from './lock-controller.js';
|
|
5
5
|
import { c as createDelegateController, a as createTriggerController, B as BACKDROP, p as prepareOverlay, s as setOverlayId, b as present, d as dismiss, e as eventMethod } from './overlays2.js';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './
|
|
2
|
+
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './config2.js';
|
|
3
3
|
import { K as caretBackSharp, L as arrowDown } from './index4.js';
|
|
4
4
|
import { b as config } from './platform.js';
|
|
5
5
|
import { g as getIonMode } from './ionic-global.js';
|
package/components/toast.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Build, proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
|
-
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './
|
|
2
|
+
import { E as ENABLE_HTML_CONTENT_DEFAULT, s as sanitizeDOMString } from './config2.js';
|
|
3
3
|
import { b as getElementRoot, r as raf } from './helpers2.js';
|
|
4
4
|
import { c as createLockController } from './lock-controller.js';
|
|
5
5
|
import { p as printIonWarning } from './index6.js';
|
|
@@ -8,8 +8,7 @@ const overlays = require('./overlays-c34dfe45.js');
|
|
|
8
8
|
const lockController = require('./lock-controller-2e7c1655.js');
|
|
9
9
|
const helpers = require('./helpers-2d48f682.js');
|
|
10
10
|
const theme = require('./theme-a16341cf.js');
|
|
11
|
-
const config = require('./config-
|
|
12
|
-
require('./config-156f10b9.js');
|
|
11
|
+
const config = require('./config-156f10b9.js');
|
|
13
12
|
require('./helpers-54669e09.js');
|
|
14
13
|
require('./animation-0c52d0da.js');
|
|
15
14
|
require('./index-a370c7e1.js');
|
|
@@ -109,7 +108,7 @@ const Alert = class {
|
|
|
109
108
|
}
|
|
110
109
|
}
|
|
111
110
|
render() {
|
|
112
|
-
return (index.h(index.Host, { key: '
|
|
111
|
+
return (index.h(index.Host, { key: '2693a8a2631d92ad9f323747e425770125752eeb', class: Object.assign(Object.assign({}, theme.getClassMap(this.cssClass)), { 'overlay-hidden cty-pos-cover': true }), style: { zIndex: `${20000 + this.overlayIndex}` } }, index.h("cty-overlay", { key: '9d51c2696ae1d2d4f35dc9a5702336939cf1acb5', animated: false, backdropDismiss: this.backdropDismiss, onCtyDismiss: () => this.dismiss() }, index.h("slot", { key: '86ea129915a6074a8da3ee8d98663ad53c955472', name: "alert" }), index.h("div", { key: 'b2929ce71ade71befde4310bfc058424ab237779', class: "cty-alert", onClick: (e) => e.stopPropagation() }, this.img && index.h("img", { key: '95ce34363462fed18d917db284cf97781d594c5b', src: this.img, class: "cty-alert__img" }), this.closeable && index.h("slot", { key: '8a3621bbd1cff88112d1077a4f569cc72ce0f2f8', name: "close" }, index.h("button", { key: '4e6c9a680fc855722c713184d2c26bf49c08234d', class: "cty-alert__close cty-button-native", onClick: () => this.dismiss() }, index.h("cty-icon", { key: '05882dcbeed8a699e14c5de51c0df0abcc3b6aa8', name: "cty-close2" }))), index.h("slot", { key: '525bf2cc9482eaca2b3d9effa94bb46010521d1e', name: "header" }), index.h("div", { key: 'e9f0bddc5b523d9e4d28db7e8b1248b17d472ed9', class: "cty-alert__header flex-align-center", part: "header" }, index.h("slot", { key: '95fa202c9c3dd08bfe59237371f16d5c6efc989b', name: "title-start" }), index.h("h3", { key: '0fd533376b7c15f4918437deec7ee0f7ddff4a49', class: "cty-alert__title" }, this.title), index.h("slot", { key: '6cfc14da3b4ebfa5e10bc17bb1a5b4d172c7170d', name: "title-end" })), index.h("slot", { key: 'dc96a08610c050bd3f97eb9fd70ebadce430c6c9', name: "content" }), this.content && index.h("div", { key: 'c2a524ee6de82e40a1d62b03ee28b34e489cf825', part: "content", class: "cty-alert__content", innerHTML: index$1.sanitizeDOMString(this.content) }), index.h("slot", { key: '67452e3d6f3aed243b7c6b3b16d126252a14d1a6', name: "buttons" }), !!this._buttonList.length && index.h("div", { key: 'c8c02c750469a601b742d436a2cddf459f6fe376', class: "cty-alert__buttons flex", part: "buttons" }, this._buttonList.map((ele, idx) => index.h("button", { part: "button button" + idx, onClick: () => this._buttonClick(ele, idx), class: { 'cty-alert__button cty-button-native': true } }, ele.text))), index.h("slot", { key: '72e9bbfd40d495878f7bf0ba950d5a7bf110c7a7', name: "bottom" })))));
|
|
113
112
|
}
|
|
114
113
|
get el() { return index.getElement(this); }
|
|
115
114
|
static get watchers() { return {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-09f6f59d.js');
|
|
6
|
-
const config = require('./config-
|
|
6
|
+
const config = require('./config-156f10b9.js');
|
|
7
7
|
const network = require('./network-8e98924e.js');
|
|
8
8
|
const index$1 = require('./index-419d516f.js');
|
|
9
9
|
require('./merge-877c9d6b.js');
|
|
@@ -248,7 +248,7 @@ const Audio = class {
|
|
|
248
248
|
});
|
|
249
249
|
}
|
|
250
250
|
render() {
|
|
251
|
-
return (index.h(index.Host, { key: '
|
|
251
|
+
return (index.h(index.Host, { key: '525d019627542421e46c8d65ab84c18bd386329b', class: "cty-audio flex-align-center" }, index.h("slot", { key: '04b4028b0652aadc51a5254b962a76e01563321c', name: "start" }), this.playCtrl && (index.h("button", { key: 'b4243c55f0d537da7226810b53fab08eddfd6a33', class: "cty-audio__toggle-play cty-button-native", onClick: () => this.switchAudio() }, index.h("cty-icon", { key: '0123126a3c421999c8be3b15e45c0000b2c745f0', name: !this.isPlaying ? 'cty-play' : 'cty-pause' }))), index.h("slot", { key: '50def909760f8e628fba76ee2cddc999b6c5759b', name: "range" }), index.h("div", { key: '1a3cd49ec5fbb48dd1198e9be1c0f9760e1bcfef', class: "cty-audio__range flex-column-between" }, index.h("div", { key: '3e828255cd8009bac7363789a17da2ad49b5ef4f', class: "cty-audio__range-touch", onTouchStart: e => this._doPrgTouchstart(e), onTouchMove: e => this._doPrgTouchmove(e), onTouchEnd: () => this._doPrgTouchend() }), index.h("ion-range", { key: '254787054ef8b2eb90e6b887835a0611d5cc1622', class: "cty-audio__range-progress", value: this.playProgress }), index.h("div", { key: '2f70fd76dd0199af8bfdb1fb11e54b6373138e44', class: "cty-audio__range-label flex-center-between" }, index.h("span", { key: 'e59d41a5a87f5c6052a2b5c5774eb9185d5ab1e8' }, this.currentTimeLabel), index.h("span", { key: '4320b790c7efa99bb2ad37f6444e2bf7bb7dc78a' }, this.totalTimeLabel))), index.h("div", { key: '79e3cd1ed3d5c7f7ab7e604da844a08906592cda', class: "flex-center cty-audio__rate" }, this.rateVisible && (index.h("button", { key: '1cf26f50258b3a2e501504444f74f98328a51c61', class: "cty-button-native flex-column-between cty-audio__rate-button", onClick: e => this._toSetRate(e) }, index.h("slot", { key: '12af93ec902a58302f4e6ca25c5287e49731f690', name: "rate-button" }, index.h("img", { key: '8fdf74d3664be992494c2b7647a30a0106e724d1', src: this.rateIconUrl }), index.h("span", { key: 'd817413a93c70188da5c9c0c4a9aeaf782a0a699' }, "\u500D\u901F")))), index.h("slot", { key: 'f82c935430628c707a281912096b33b225da8ef7', name: "rate" })), index.h("slot", { key: '23215483f08f51fda375e4c205d514c204c692bb', name: "end" }), index.h("audio", { key: 'dcc7e069fd8c9337a51e048ee337626aefd1ee32', ref: el => (this.audioEl = el), preload: "metadata", src: this.url, autoplay: this.autoplay && this.isWifi, onTimeUpdate: () => this._audioTimeupdate(), onCanPlay: () => this._audioCanplay(), onEnded: () => this._audioEnded(), onPlay: () => this._audioPlay(), onPause: () => this._audioPause(), onError: () => this._audioError() }), this.rateDialogVisible && (index.h("cty-action-sheet", { key: '7be9ac03b42c5b8449eb1ef2ec7232bb81368bda', animated: false, root: '', cancelText: "\u53D6\u6D88", overlayIndex: 1, onCtyDismiss: () => (this.rateDialogVisible = false) }, index.h("div", { key: '7c3b4cce9cc715e44c780faa332419b5f9fcd278', slot: 'options', class: "cty-overlay__rates" }, this.rates.map((item) => index.h("button", { class: { active: this.rate == item, 'flex-center-between cty-button-native cty-overlay__rate': true }, onClick: () => this.setPlayRate(item) }, index.h("span", null, item, "X"), index.h("cty-icon", { name: this.rate == item ? index$1.checkmarkCircle : index$1.radioButtonOffOutline, slot: "end" })))))), index.h("ion-toast", { key: '2d234e711075f622033c5e0635617fab2ed94288', "is-open": this.isToastVisible, message: this.toastMessage, duration: this.toastDuration, onIonToastDidDismiss: () => this.isToastVisible = false, position: 'middle' })));
|
|
252
252
|
}
|
|
253
253
|
get el() { return index.getElement(this); }
|
|
254
254
|
};
|