@pod-os/elements 0.24.2-rc.2a139ac.0 → 0.24.2-rc.fd22901.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/cjs/ion-badge_8.cjs.entry.js +1 -1
- package/dist/cjs/ion-card_34.cjs.entry.js +19 -19
- package/dist/cjs/ion-card_34.cjs.entry.js.map +1 -1
- package/dist/cjs/pos-app-generic.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-ldp-container.cjs.entry.js +1 -1
- package/dist/cjs/pos-app-rdf-document.cjs.entry.js +1 -1
- package/dist/collection/apps/pos-app-browser/pos-app-browser.css +13 -0
- package/dist/collection/apps/pos-app-browser/pos-app-browser.js +1 -1
- package/dist/collection/apps/pos-app-browser/pos-app-browser.js.map +1 -1
- package/dist/collection/apps/pos-app-dashboard/pos-app-dashboard.js +1 -1
- package/dist/collection/apps/pos-app-dashboard/pos-example-resources/pos-example-resources.js +1 -1
- package/dist/collection/apps/pos-app-dashboard/pos-getting-started/pos-getting-started.js +1 -1
- package/dist/collection/apps/pos-app-generic/pos-app-generic.js +1 -1
- package/dist/collection/apps/pos-app-ldp-container/pos-app-ldp-container.js +1 -1
- package/dist/collection/apps/pos-app-rdf-document/pos-app-rdf-document.js +1 -1
- package/dist/collection/apps/pos-app-settings/pos-app-settings.js +1 -1
- package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.js +2 -1
- package/dist/collection/apps/pos-app-settings/pos-getting-started/pos-setting-offline-cache.js.map +1 -1
- package/dist/collection/components/pos-add-new-thing/pos-add-new-thing.js +1 -1
- package/dist/collection/components/pos-app/pos-app.js +1 -1
- package/dist/collection/components/pos-dialog/pos-dialog.js +1 -1
- package/dist/collection/components/pos-error-toast/pos-error-toast.js +1 -1
- package/dist/collection/components/pos-literals/pos-literals.js +1 -1
- package/dist/collection/components/pos-login/pos-login.js +1 -1
- package/dist/collection/components/pos-login-form/pos-login-form.js +1 -1
- package/dist/collection/components/pos-navigation-bar/pos-navigation-bar.js +1 -1
- package/dist/collection/components/pos-new-thing-form/pos-new-thing-form.js +1 -1
- package/dist/collection/components/pos-rich-link/pos-rich-link.js +2 -2
- package/dist/collection/components/pos-router/pos-router.js +1 -1
- package/dist/collection/components/pos-select-term/pos-select-term.js +1 -1
- package/dist/components/index11.js +170 -172
- package/dist/components/index11.js.map +1 -1
- package/dist/components/index12.js +198 -0
- package/dist/components/index12.js.map +1 -0
- package/dist/components/ion-app.js +1 -1
- package/dist/components/pos-add-new-thing2.js +1 -1
- package/dist/components/pos-app-browser.js +2 -2
- package/dist/components/pos-app-browser.js.map +1 -1
- package/dist/components/pos-app-dashboard2.js +1 -1
- package/dist/components/pos-app-generic.js +1 -1
- package/dist/components/pos-app-ldp-container.js +1 -1
- package/dist/components/pos-app-rdf-document.js +1 -1
- package/dist/components/pos-app-settings2.js +1 -1
- package/dist/components/pos-app2.js +3 -26
- package/dist/components/pos-app2.js.map +1 -1
- package/dist/components/pos-dialog2.js +1 -1
- package/dist/components/pos-error-toast2.js +1 -1
- package/dist/components/pos-example-resources2.js +1 -1
- package/dist/components/pos-getting-started2.js +1 -1
- package/dist/components/pos-literals2.js +1 -1
- package/dist/components/pos-login-form2.js +1 -1
- package/dist/components/pos-login2.js +1 -1
- package/dist/components/pos-navigation-bar2.js +1 -1
- package/dist/components/pos-new-thing-form2.js +1 -1
- package/dist/components/pos-rich-link2.js +2 -2
- package/dist/components/pos-router2.js +1 -1
- package/dist/components/pos-select-term2.js +1 -1
- package/dist/components/pos-setting-offline-cache2.js +2 -1
- package/dist/components/pos-setting-offline-cache2.js.map +1 -1
- package/dist/components/session.js +2 -193
- package/dist/components/session.js.map +1 -1
- package/dist/components/settings.js +29 -0
- package/dist/components/settings.js.map +1 -0
- package/dist/elements/elements.esm.js +1 -1
- package/dist/elements/p-48f2cf16.entry.js +2 -0
- package/dist/elements/p-6e0e0f54.entry.js +2 -0
- package/dist/elements/{p-83d99403.entry.js → p-8cea7540.entry.js} +8 -8
- package/dist/elements/{p-83d99403.entry.js.map → p-8cea7540.entry.js.map} +1 -1
- package/dist/elements/{p-4b8c7388.entry.js → p-8eb66b39.entry.js} +2 -2
- package/dist/elements/p-b58b6be4.entry.js +2 -0
- package/dist/esm/ion-badge_8.entry.js +1 -1
- package/dist/esm/ion-card_34.entry.js +19 -19
- package/dist/esm/ion-card_34.entry.js.map +1 -1
- package/dist/esm/pos-app-generic.entry.js +1 -1
- package/dist/esm/pos-app-ldp-container.entry.js +1 -1
- package/dist/esm/pos-app-rdf-document.entry.js +1 -1
- package/package.json +1 -1
- package/dist/elements/p-52678615.entry.js +0 -2
- package/dist/elements/p-a1fbbc32.entry.js +0 -2
- package/dist/elements/p-c7b331ce.entry.js +0 -2
- /package/dist/elements/{p-a1fbbc32.entry.js.map → p-48f2cf16.entry.js.map} +0 -0
- /package/dist/elements/{p-52678615.entry.js.map → p-6e0e0f54.entry.js.map} +0 -0
- /package/dist/elements/{p-4b8c7388.entry.js.map → p-8eb66b39.entry.js.map} +0 -0
- /package/dist/elements/{p-c7b331ce.entry.js.map → p-b58b6be4.entry.js.map} +0 -0
|
@@ -1,198 +1,196 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { u as now, v as pointerCoord } from './helpers.js';
|
|
1
|
+
import { getRenderingRef, forceUpdate } from '@stencil/core/internal/client';
|
|
3
2
|
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
const appendToMap = (map, propName, value) => {
|
|
4
|
+
const items = map.get(propName);
|
|
5
|
+
if (!items) {
|
|
6
|
+
map.set(propName, [value]);
|
|
7
|
+
}
|
|
8
|
+
else if (!items.includes(value)) {
|
|
9
|
+
items.push(value);
|
|
10
|
+
}
|
|
11
|
+
};
|
|
12
|
+
const debounce = (fn, ms) => {
|
|
13
|
+
let timeoutId;
|
|
14
|
+
return (...args) => {
|
|
15
|
+
if (timeoutId) {
|
|
16
|
+
clearTimeout(timeoutId);
|
|
17
|
+
}
|
|
18
|
+
timeoutId = setTimeout(() => {
|
|
19
|
+
timeoutId = 0;
|
|
20
|
+
fn(...args);
|
|
21
|
+
}, ms);
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Check if a possible element isConnected.
|
|
27
|
+
* The property might not be there, so we check for it.
|
|
28
|
+
*
|
|
29
|
+
* We want it to return true if isConnected is not a property,
|
|
30
|
+
* otherwise we would remove these elements and would not update.
|
|
31
|
+
*
|
|
32
|
+
* Better leak in Edge than to be useless.
|
|
6
33
|
*/
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
34
|
+
const isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;
|
|
35
|
+
const cleanupElements = debounce((map) => {
|
|
36
|
+
for (let key of map.keys()) {
|
|
37
|
+
map.set(key, map.get(key).filter(isConnected));
|
|
10
38
|
}
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
39
|
+
}, 2000);
|
|
40
|
+
const stencilSubscription = () => {
|
|
41
|
+
if (typeof getRenderingRef !== 'function') {
|
|
42
|
+
// If we are not in a stencil project, we do nothing.
|
|
43
|
+
// This function is not really exported by @stencil/core.
|
|
44
|
+
return {};
|
|
45
|
+
}
|
|
46
|
+
const elmsToUpdate = new Map();
|
|
47
|
+
return {
|
|
48
|
+
dispose: () => elmsToUpdate.clear(),
|
|
49
|
+
get: (propName) => {
|
|
50
|
+
const elm = getRenderingRef();
|
|
51
|
+
if (elm) {
|
|
52
|
+
appendToMap(elmsToUpdate, propName, elm);
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
set: (propName) => {
|
|
56
|
+
const elements = elmsToUpdate.get(propName);
|
|
57
|
+
if (elements) {
|
|
58
|
+
elmsToUpdate.set(propName, elements.filter(forceUpdate));
|
|
59
|
+
}
|
|
60
|
+
cleanupElements(elmsToUpdate);
|
|
61
|
+
},
|
|
62
|
+
reset: () => {
|
|
63
|
+
elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));
|
|
64
|
+
cleanupElements(elmsToUpdate);
|
|
65
|
+
},
|
|
22
66
|
};
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
const unwrap = (val) => (typeof val === 'function' ? val() : val);
|
|
70
|
+
const createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {
|
|
71
|
+
const unwrappedState = unwrap(defaultState);
|
|
72
|
+
let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));
|
|
73
|
+
const handlers = {
|
|
74
|
+
dispose: [],
|
|
75
|
+
get: [],
|
|
76
|
+
set: [],
|
|
77
|
+
reset: [],
|
|
26
78
|
};
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (lastTouch < t) {
|
|
34
|
-
pointerDown(ev);
|
|
35
|
-
}
|
|
79
|
+
const reset = () => {
|
|
80
|
+
var _a;
|
|
81
|
+
// When resetting the state, the default state may be a function - unwrap it to invoke it.
|
|
82
|
+
// otherwise, the state won't be properly reset
|
|
83
|
+
states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));
|
|
84
|
+
handlers.reset.forEach((cb) => cb());
|
|
36
85
|
};
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
86
|
+
const dispose = () => {
|
|
87
|
+
// Call first dispose as resetting the state would
|
|
88
|
+
// cause less updates ;)
|
|
89
|
+
handlers.dispose.forEach((cb) => cb());
|
|
90
|
+
reset();
|
|
42
91
|
};
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
activeDefer = undefined;
|
|
47
|
-
if (activatableEle) {
|
|
48
|
-
removeActivated(false);
|
|
49
|
-
activatableEle = undefined;
|
|
50
|
-
}
|
|
92
|
+
const get = (propName) => {
|
|
93
|
+
handlers.get.forEach((cb) => cb(propName));
|
|
94
|
+
return states.get(propName);
|
|
51
95
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
96
|
+
const set = (propName, value) => {
|
|
97
|
+
const oldValue = states.get(propName);
|
|
98
|
+
if (shouldUpdate(value, oldValue, propName)) {
|
|
99
|
+
states.set(propName, value);
|
|
100
|
+
handlers.set.forEach((cb) => cb(propName, value, oldValue));
|
|
55
101
|
}
|
|
56
|
-
setActivatedElement(getActivatableTarget(ev), ev);
|
|
57
102
|
};
|
|
58
|
-
const
|
|
59
|
-
|
|
103
|
+
const state = (typeof Proxy === 'undefined'
|
|
104
|
+
? {}
|
|
105
|
+
: new Proxy(unwrappedState, {
|
|
106
|
+
get(_, propName) {
|
|
107
|
+
return get(propName);
|
|
108
|
+
},
|
|
109
|
+
ownKeys(_) {
|
|
110
|
+
return Array.from(states.keys());
|
|
111
|
+
},
|
|
112
|
+
getOwnPropertyDescriptor() {
|
|
113
|
+
return {
|
|
114
|
+
enumerable: true,
|
|
115
|
+
configurable: true,
|
|
116
|
+
};
|
|
117
|
+
},
|
|
118
|
+
has(_, propName) {
|
|
119
|
+
return states.has(propName);
|
|
120
|
+
},
|
|
121
|
+
set(_, propName, value) {
|
|
122
|
+
set(propName, value);
|
|
123
|
+
return true;
|
|
124
|
+
},
|
|
125
|
+
}));
|
|
126
|
+
const on = (eventName, callback) => {
|
|
127
|
+
handlers[eventName].push(callback);
|
|
128
|
+
return () => {
|
|
129
|
+
removeFromArray(handlers[eventName], callback);
|
|
130
|
+
};
|
|
60
131
|
};
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
}
|
|
66
|
-
if (activeDefer)
|
|
67
|
-
clearTimeout(activeDefer);
|
|
68
|
-
activeDefer = undefined;
|
|
69
|
-
const { x, y } = pointerCoord(ev);
|
|
70
|
-
// deactivate selected
|
|
71
|
-
if (activatableEle) {
|
|
72
|
-
if (clearDefers.has(activatableEle)) {
|
|
73
|
-
throw new Error('internal error');
|
|
132
|
+
const onChange = (propName, cb) => {
|
|
133
|
+
const unSet = on('set', (key, newValue) => {
|
|
134
|
+
if (key === propName) {
|
|
135
|
+
cb(newValue);
|
|
74
136
|
}
|
|
75
|
-
|
|
76
|
-
|
|
137
|
+
});
|
|
138
|
+
// We need to unwrap the defaultState because it might be a function.
|
|
139
|
+
// Otherwise we might not be sending the right reset value.
|
|
140
|
+
const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));
|
|
141
|
+
return () => {
|
|
142
|
+
unSet();
|
|
143
|
+
unReset();
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
const use = (...subscriptions) => {
|
|
147
|
+
const unsubs = subscriptions.reduce((unsubs, subscription) => {
|
|
148
|
+
if (subscription.set) {
|
|
149
|
+
unsubs.push(on('set', subscription.set));
|
|
77
150
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
// activate
|
|
81
|
-
if (el) {
|
|
82
|
-
const deferId = clearDefers.get(el);
|
|
83
|
-
if (deferId) {
|
|
84
|
-
clearTimeout(deferId);
|
|
85
|
-
clearDefers.delete(el);
|
|
151
|
+
if (subscription.get) {
|
|
152
|
+
unsubs.push(on('get', subscription.get));
|
|
86
153
|
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
addActivated(el, x, y);
|
|
90
|
-
activeDefer = undefined;
|
|
91
|
-
};
|
|
92
|
-
if (isInstant(el)) {
|
|
93
|
-
callback();
|
|
154
|
+
if (subscription.reset) {
|
|
155
|
+
unsubs.push(on('reset', subscription.reset));
|
|
94
156
|
}
|
|
95
|
-
|
|
96
|
-
|
|
157
|
+
if (subscription.dispose) {
|
|
158
|
+
unsubs.push(on('dispose', subscription.dispose));
|
|
97
159
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
const addActivated = (el, x, y) => {
|
|
102
|
-
lastActivated = Date.now();
|
|
103
|
-
el.classList.add(ACTIVATED);
|
|
104
|
-
if (!useRippleEffect)
|
|
105
|
-
return;
|
|
106
|
-
const rippleEffect = getRippleEffect(el);
|
|
107
|
-
if (rippleEffect !== null) {
|
|
108
|
-
removeRipple();
|
|
109
|
-
activeRipple = rippleEffect.addRipple(x, y);
|
|
110
|
-
}
|
|
160
|
+
return unsubs;
|
|
161
|
+
}, []);
|
|
162
|
+
return () => unsubs.forEach((unsub) => unsub());
|
|
111
163
|
};
|
|
112
|
-
const
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
activeRipple = undefined;
|
|
116
|
-
}
|
|
164
|
+
const forceUpdate = (key) => {
|
|
165
|
+
const oldValue = states.get(key);
|
|
166
|
+
handlers.set.forEach((cb) => cb(key, oldValue, oldValue));
|
|
117
167
|
};
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
clearDefers.delete(active);
|
|
129
|
-
}, CLEAR_STATE_DEFERS);
|
|
130
|
-
clearDefers.set(active, deferId);
|
|
131
|
-
}
|
|
132
|
-
else {
|
|
133
|
-
active.classList.remove(ACTIVATED);
|
|
134
|
-
}
|
|
168
|
+
return {
|
|
169
|
+
state,
|
|
170
|
+
get,
|
|
171
|
+
set,
|
|
172
|
+
on,
|
|
173
|
+
onChange,
|
|
174
|
+
use,
|
|
175
|
+
dispose,
|
|
176
|
+
reset,
|
|
177
|
+
forceUpdate,
|
|
135
178
|
};
|
|
136
|
-
doc.addEventListener('ionGestureCaptured', cancelActive);
|
|
137
|
-
doc.addEventListener('touchstart', onTouchStart, true);
|
|
138
|
-
doc.addEventListener('touchcancel', onTouchEnd, true);
|
|
139
|
-
doc.addEventListener('touchend', onTouchEnd, true);
|
|
140
|
-
/**
|
|
141
|
-
* Tap click effects such as the ripple effect should
|
|
142
|
-
* not happen when scrolling. For example, if a user scrolls
|
|
143
|
-
* the page but also happens to do a touchstart on a button
|
|
144
|
-
* as part of the scroll, the ripple effect should not
|
|
145
|
-
* be dispatched. The ripple effect should only happen
|
|
146
|
-
* if the button is activated and the page is not scrolling.
|
|
147
|
-
*
|
|
148
|
-
* pointercancel is dispatched on a gesture when scrolling
|
|
149
|
-
* starts, so this lets us avoid having to listen for
|
|
150
|
-
* ion-content's scroll events.
|
|
151
|
-
*/
|
|
152
|
-
doc.addEventListener('pointercancel', cancelActive, true);
|
|
153
|
-
doc.addEventListener('mousedown', onMouseDown, true);
|
|
154
|
-
doc.addEventListener('mouseup', onMouseUp, true);
|
|
155
179
|
};
|
|
156
|
-
|
|
157
|
-
const
|
|
158
|
-
if (
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
* objects other than Element can be targets too.
|
|
162
|
-
* For example, AudioContext can be a target. In this
|
|
163
|
-
* case, we know that the event is a UIEvent so we
|
|
164
|
-
* can assume that the path will contain either Element
|
|
165
|
-
* or ShadowRoot.
|
|
166
|
-
*/
|
|
167
|
-
const path = ev.composedPath();
|
|
168
|
-
for (let i = 0; i < path.length - 2; i++) {
|
|
169
|
-
const el = path[i];
|
|
170
|
-
if (!(el instanceof ShadowRoot) && el.classList.contains('ion-activatable')) {
|
|
171
|
-
return el;
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
else {
|
|
176
|
-
return ev.target.closest('.ion-activatable');
|
|
180
|
+
const removeFromArray = (array, item) => {
|
|
181
|
+
const index = array.indexOf(item);
|
|
182
|
+
if (index >= 0) {
|
|
183
|
+
array[index] = array[array.length - 1];
|
|
184
|
+
array.length--;
|
|
177
185
|
}
|
|
178
186
|
};
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
const ripple = el.shadowRoot.querySelector('ion-ripple-effect');
|
|
185
|
-
if (ripple) {
|
|
186
|
-
return ripple;
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
return el.querySelector('ion-ripple-effect');
|
|
187
|
+
|
|
188
|
+
const createStore = (defaultState, shouldUpdate) => {
|
|
189
|
+
const map = createObservableMap(defaultState, shouldUpdate);
|
|
190
|
+
map.use(stencilSubscription());
|
|
191
|
+
return map;
|
|
190
192
|
};
|
|
191
|
-
const ACTIVATED = 'ion-activated';
|
|
192
|
-
const ADD_ACTIVATED_DEFERS = 100;
|
|
193
|
-
const CLEAR_STATE_DEFERS = 150;
|
|
194
|
-
const MOUSE_WAIT = 2500;
|
|
195
193
|
|
|
196
|
-
export {
|
|
194
|
+
export { createStore as c };
|
|
197
195
|
|
|
198
196
|
//# sourceMappingURL=index11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"index11.js","mappings":";;;AAAA;AACA;AACA;AAGY,MAAC,aAAa,GAAG,CAAC,MAAM,KAAK;AACzC,IAAI,IAAI,GAAG,KAAK,SAAS,EAAE;AAC3B,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,IAAI,SAAS,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC;AACrC,IAAI,IAAI,aAAa,GAAG,CAAC,CAAC;AAC1B,IAAI,IAAI,cAAc,CAAC;AACvB,IAAI,IAAI,YAAY,CAAC;AACrB,IAAI,IAAI,WAAW,CAAC;AACpB,IAAI,MAAM,eAAe,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,EAAE,IAAI,CAAC,IAAI,MAAM,CAAC,UAAU,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC;AAC3G,IAAI,MAAM,WAAW,GAAG,IAAI,OAAO,EAAE,CAAC;AACtC;AACA,IAAI,MAAM,YAAY,GAAG,CAAC,EAAE,KAAK;AACjC,QAAQ,SAAS,GAAG,GAAG,CAAC,EAAE,CAAC,CAAC;AAC5B,QAAQ,WAAW,CAAC,EAAE,CAAC,CAAC;AACxB,KAAK,CAAC;AACN,IAAI,MAAM,UAAU,GAAG,CAAC,EAAE,KA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":[],"sources":["../node_modules/@ionic/core/dist/collection/utils/tap-click/index.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { doc } from \"../browser/index\";\nimport { now, pointerCoord } from \"../helpers\";\nexport const startTapClick = (config) => {\n if (doc === undefined) {\n return;\n }\n let lastTouch = -MOUSE_WAIT * 10;\n let lastActivated = 0;\n let activatableEle;\n let activeRipple;\n let activeDefer;\n const useRippleEffect = config.getBoolean('animated', true) && config.getBoolean('rippleEffect', true);\n const clearDefers = new WeakMap();\n // Touch Events\n const onTouchStart = (ev) => {\n lastTouch = now(ev);\n pointerDown(ev);\n };\n const onTouchEnd = (ev) => {\n lastTouch = now(ev);\n pointerUp(ev);\n };\n const onMouseDown = (ev) => {\n // Ignore right clicks\n if (ev.button === 2) {\n return;\n }\n const t = now(ev) - MOUSE_WAIT;\n if (lastTouch < t) {\n pointerDown(ev);\n }\n };\n const onMouseUp = (ev) => {\n const t = now(ev) - MOUSE_WAIT;\n if (lastTouch < t) {\n pointerUp(ev);\n }\n };\n const cancelActive = () => {\n if (activeDefer)\n clearTimeout(activeDefer);\n activeDefer = undefined;\n if (activatableEle) {\n removeActivated(false);\n activatableEle = undefined;\n }\n };\n const pointerDown = (ev) => {\n if (activatableEle) {\n return;\n }\n setActivatedElement(getActivatableTarget(ev), ev);\n };\n const pointerUp = (ev) => {\n setActivatedElement(undefined, ev);\n };\n const setActivatedElement = (el, ev) => {\n // do nothing\n if (el && el === activatableEle) {\n return;\n }\n if (activeDefer)\n clearTimeout(activeDefer);\n activeDefer = undefined;\n const { x, y } = pointerCoord(ev);\n // deactivate selected\n if (activatableEle) {\n if (clearDefers.has(activatableEle)) {\n throw new Error('internal error');\n }\n if (!activatableEle.classList.contains(ACTIVATED)) {\n addActivated(activatableEle, x, y);\n }\n removeActivated(true);\n }\n // activate\n if (el) {\n const deferId = clearDefers.get(el);\n if (deferId) {\n clearTimeout(deferId);\n clearDefers.delete(el);\n }\n el.classList.remove(ACTIVATED);\n const callback = () => {\n addActivated(el, x, y);\n activeDefer = undefined;\n };\n if (isInstant(el)) {\n callback();\n }\n else {\n activeDefer = setTimeout(callback, ADD_ACTIVATED_DEFERS);\n }\n }\n activatableEle = el;\n };\n const addActivated = (el, x, y) => {\n lastActivated = Date.now();\n el.classList.add(ACTIVATED);\n if (!useRippleEffect)\n return;\n const rippleEffect = getRippleEffect(el);\n if (rippleEffect !== null) {\n removeRipple();\n activeRipple = rippleEffect.addRipple(x, y);\n }\n };\n const removeRipple = () => {\n if (activeRipple !== undefined) {\n activeRipple.then((remove) => remove());\n activeRipple = undefined;\n }\n };\n const removeActivated = (smooth) => {\n removeRipple();\n const active = activatableEle;\n if (!active) {\n return;\n }\n const time = CLEAR_STATE_DEFERS - Date.now() + lastActivated;\n if (smooth && time > 0 && !isInstant(active)) {\n const deferId = setTimeout(() => {\n active.classList.remove(ACTIVATED);\n clearDefers.delete(active);\n }, CLEAR_STATE_DEFERS);\n clearDefers.set(active, deferId);\n }\n else {\n active.classList.remove(ACTIVATED);\n }\n };\n doc.addEventListener('ionGestureCaptured', cancelActive);\n doc.addEventListener('touchstart', onTouchStart, true);\n doc.addEventListener('touchcancel', onTouchEnd, true);\n doc.addEventListener('touchend', onTouchEnd, true);\n /**\n * Tap click effects such as the ripple effect should\n * not happen when scrolling. For example, if a user scrolls\n * the page but also happens to do a touchstart on a button\n * as part of the scroll, the ripple effect should not\n * be dispatched. The ripple effect should only happen\n * if the button is activated and the page is not scrolling.\n *\n * pointercancel is dispatched on a gesture when scrolling\n * starts, so this lets us avoid having to listen for\n * ion-content's scroll events.\n */\n doc.addEventListener('pointercancel', cancelActive, true);\n doc.addEventListener('mousedown', onMouseDown, true);\n doc.addEventListener('mouseup', onMouseUp, true);\n};\n// TODO(FW-2832): type\nconst getActivatableTarget = (ev) => {\n if (ev.composedPath !== undefined) {\n /**\n * composedPath returns EventTarget[]. However,\n * objects other than Element can be targets too.\n * For example, AudioContext can be a target. In this\n * case, we know that the event is a UIEvent so we\n * can assume that the path will contain either Element\n * or ShadowRoot.\n */\n const path = ev.composedPath();\n for (let i = 0; i < path.length - 2; i++) {\n const el = path[i];\n if (!(el instanceof ShadowRoot) && el.classList.contains('ion-activatable')) {\n return el;\n }\n }\n }\n else {\n return ev.target.closest('.ion-activatable');\n }\n};\nconst isInstant = (el) => {\n return el.classList.contains('ion-activatable-instant');\n};\nconst getRippleEffect = (el) => {\n if (el.shadowRoot) {\n const ripple = el.shadowRoot.querySelector('ion-ripple-effect');\n if (ripple) {\n return ripple;\n }\n }\n return el.querySelector('ion-ripple-effect');\n};\nconst ACTIVATED = 'ion-activated';\nconst ADD_ACTIVATED_DEFERS = 100;\nconst CLEAR_STATE_DEFERS = 150;\nconst MOUSE_WAIT = 2500;\n"],"version":3}
|
|
1
|
+
{"file":"index11.js","mappings":";;AAEA,MAAM,WAAW,GAAG,CAAC,GAAG,EAAE,QAAQ,EAAE,KAAK,KAAK;AAC9C,IAAI,MAAM,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;AACpC,IAAI,IAAI,CAAC,KAAK,EAAE;AAChB,QAAQ,GAAG,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;AACnC,KAAK;AACL,SAAS,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE;AACrC,QAAQ,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AAC1B,KAAK;AACL,CAAC,CAAC;AACF,MAAM,QAAQ,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK;AAC7B,IAAI,IAAI,SAAS,CAAC;AAClB,IAAI,OAAO,CAAC,GAAG,IAAI,KAAK;AACxB,QAAQ,IAAI,SAAS,EAAE;AACvB,YAAY,YAAY,CAAC,SAAS,CAAC,CAAC;AACpC,SAAS;AACT,QAAQ,SAAS,GAAG,UAAU,CAAC,MAAM;AACrC,YAAY,SAAS,GAAG,CAAC,CAAC;AAC1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AAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;AAClE,KAAK,CAAC;AACN,IAAI,OAAO;AACX,QAAQ,KAAK;AACb,QAAQ,GAAG;AACX,QAAQ,GAAG;AACX,QAAQ,EAAE;AACV,QAAQ,QAAQ;AAChB,QAAQ,GAAG;AACX,QAAQ,OAAO;AACf,QAAQ,KAAK;AACb,QAAQ,WAAW;AACnB,KAAK,CAAC;AACN,CAAC,CAAC;AACF,MAAM,eAAe,GAAG,CAAC,KAAK,EAAE,IAAI,KAAK;AACzC,IAAI,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AACtC,IAAI,IAAI,KAAK,IAAI,CAAC,EAAE;AACpB,QAAQ,KAAK,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;AAC/C,QAAQ,KAAK,CAAC,MAAM,EAAE,CAAC;AACvB,KAAK;AACL,CAAC,CAAC;AACF;AACK,MAAC,WAAW,GAAG,CAAC,YAAY,EAAE,YAAY,KAAK;AACpD,IAAI,MAAM,GAAG,GAAG,mBAAmB,CAAC,YAAY,EAAE,YAAY,CAAC,CAAC;AAChE,IAAI,GAAG,CAAC,GAAG,CAAC,mBAAmB,EAAE,CAAC,CAAC;AACnC,IAAI,OAAO,GAAG,CAAC;AACf;;;;","names":[],"sources":["../node_modules/@stencil/store/dist/index.mjs"],"sourcesContent":["import { getRenderingRef, forceUpdate } from '@stencil/core';\n\nconst appendToMap = (map, propName, value) => {\n const items = map.get(propName);\n if (!items) {\n map.set(propName, [value]);\n }\n else if (!items.includes(value)) {\n items.push(value);\n }\n};\nconst debounce = (fn, ms) => {\n let timeoutId;\n return (...args) => {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n timeoutId = 0;\n fn(...args);\n }, ms);\n };\n};\n\n/**\n * Check if a possible element isConnected.\n * The property might not be there, so we check for it.\n *\n * We want it to return true if isConnected is not a property,\n * otherwise we would remove these elements and would not update.\n *\n * Better leak in Edge than to be useless.\n */\nconst isConnected = (maybeElement) => !('isConnected' in maybeElement) || maybeElement.isConnected;\nconst cleanupElements = debounce((map) => {\n for (let key of map.keys()) {\n map.set(key, map.get(key).filter(isConnected));\n }\n}, 2000);\nconst stencilSubscription = () => {\n if (typeof getRenderingRef !== 'function') {\n // If we are not in a stencil project, we do nothing.\n // This function is not really exported by @stencil/core.\n return {};\n }\n const elmsToUpdate = new Map();\n return {\n dispose: () => elmsToUpdate.clear(),\n get: (propName) => {\n const elm = getRenderingRef();\n if (elm) {\n appendToMap(elmsToUpdate, propName, elm);\n }\n },\n set: (propName) => {\n const elements = elmsToUpdate.get(propName);\n if (elements) {\n elmsToUpdate.set(propName, elements.filter(forceUpdate));\n }\n cleanupElements(elmsToUpdate);\n },\n reset: () => {\n elmsToUpdate.forEach((elms) => elms.forEach(forceUpdate));\n cleanupElements(elmsToUpdate);\n },\n };\n};\n\nconst unwrap = (val) => (typeof val === 'function' ? val() : val);\nconst createObservableMap = (defaultState, shouldUpdate = (a, b) => a !== b) => {\n const unwrappedState = unwrap(defaultState);\n let states = new Map(Object.entries(unwrappedState !== null && unwrappedState !== void 0 ? unwrappedState : {}));\n const handlers = {\n dispose: [],\n get: [],\n set: [],\n reset: [],\n };\n const reset = () => {\n var _a;\n // When resetting the state, the default state may be a function - unwrap it to invoke it.\n // otherwise, the state won't be properly reset\n states = new Map(Object.entries((_a = unwrap(defaultState)) !== null && _a !== void 0 ? _a : {}));\n handlers.reset.forEach((cb) => cb());\n };\n const dispose = () => {\n // Call first dispose as resetting the state would\n // cause less updates ;)\n handlers.dispose.forEach((cb) => cb());\n reset();\n };\n const get = (propName) => {\n handlers.get.forEach((cb) => cb(propName));\n return states.get(propName);\n };\n const set = (propName, value) => {\n const oldValue = states.get(propName);\n if (shouldUpdate(value, oldValue, propName)) {\n states.set(propName, value);\n handlers.set.forEach((cb) => cb(propName, value, oldValue));\n }\n };\n const state = (typeof Proxy === 'undefined'\n ? {}\n : new Proxy(unwrappedState, {\n get(_, propName) {\n return get(propName);\n },\n ownKeys(_) {\n return Array.from(states.keys());\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true,\n };\n },\n has(_, propName) {\n return states.has(propName);\n },\n set(_, propName, value) {\n set(propName, value);\n return true;\n },\n }));\n const on = (eventName, callback) => {\n handlers[eventName].push(callback);\n return () => {\n removeFromArray(handlers[eventName], callback);\n };\n };\n const onChange = (propName, cb) => {\n const unSet = on('set', (key, newValue) => {\n if (key === propName) {\n cb(newValue);\n }\n });\n // We need to unwrap the defaultState because it might be a function.\n // Otherwise we might not be sending the right reset value.\n const unReset = on('reset', () => cb(unwrap(defaultState)[propName]));\n return () => {\n unSet();\n unReset();\n };\n };\n const use = (...subscriptions) => {\n const unsubs = subscriptions.reduce((unsubs, subscription) => {\n if (subscription.set) {\n unsubs.push(on('set', subscription.set));\n }\n if (subscription.get) {\n unsubs.push(on('get', subscription.get));\n }\n if (subscription.reset) {\n unsubs.push(on('reset', subscription.reset));\n }\n if (subscription.dispose) {\n unsubs.push(on('dispose', subscription.dispose));\n }\n return unsubs;\n }, []);\n return () => unsubs.forEach((unsub) => unsub());\n };\n const forceUpdate = (key) => {\n const oldValue = states.get(key);\n handlers.set.forEach((cb) => cb(key, oldValue, oldValue));\n };\n return {\n state,\n get,\n set,\n on,\n onChange,\n use,\n dispose,\n reset,\n forceUpdate,\n };\n};\nconst removeFromArray = (array, item) => {\n const index = array.indexOf(item);\n if (index >= 0) {\n array[index] = array[array.length - 1];\n array.length--;\n }\n};\n\nconst createStore = (defaultState, shouldUpdate) => {\n const map = createObservableMap(defaultState, shouldUpdate);\n map.use(stencilSubscription());\n return map;\n};\n\nexport { createObservableMap, createStore };\n"],"version":3}
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
import { d as doc } from './index5.js';
|
|
2
|
+
import { u as now, v as pointerCoord } from './helpers.js';
|
|
3
|
+
|
|
4
|
+
/*!
|
|
5
|
+
* (C) Ionic http://ionicframework.com - MIT License
|
|
6
|
+
*/
|
|
7
|
+
const startTapClick = (config) => {
|
|
8
|
+
if (doc === undefined) {
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
let lastTouch = -MOUSE_WAIT * 10;
|
|
12
|
+
let lastActivated = 0;
|
|
13
|
+
let activatableEle;
|
|
14
|
+
let activeRipple;
|
|
15
|
+
let activeDefer;
|
|
16
|
+
const useRippleEffect = config.getBoolean('animated', true) && config.getBoolean('rippleEffect', true);
|
|
17
|
+
const clearDefers = new WeakMap();
|
|
18
|
+
// Touch Events
|
|
19
|
+
const onTouchStart = (ev) => {
|
|
20
|
+
lastTouch = now(ev);
|
|
21
|
+
pointerDown(ev);
|
|
22
|
+
};
|
|
23
|
+
const onTouchEnd = (ev) => {
|
|
24
|
+
lastTouch = now(ev);
|
|
25
|
+
pointerUp(ev);
|
|
26
|
+
};
|
|
27
|
+
const onMouseDown = (ev) => {
|
|
28
|
+
// Ignore right clicks
|
|
29
|
+
if (ev.button === 2) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const t = now(ev) - MOUSE_WAIT;
|
|
33
|
+
if (lastTouch < t) {
|
|
34
|
+
pointerDown(ev);
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
const onMouseUp = (ev) => {
|
|
38
|
+
const t = now(ev) - MOUSE_WAIT;
|
|
39
|
+
if (lastTouch < t) {
|
|
40
|
+
pointerUp(ev);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
const cancelActive = () => {
|
|
44
|
+
if (activeDefer)
|
|
45
|
+
clearTimeout(activeDefer);
|
|
46
|
+
activeDefer = undefined;
|
|
47
|
+
if (activatableEle) {
|
|
48
|
+
removeActivated(false);
|
|
49
|
+
activatableEle = undefined;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
const pointerDown = (ev) => {
|
|
53
|
+
if (activatableEle) {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
setActivatedElement(getActivatableTarget(ev), ev);
|
|
57
|
+
};
|
|
58
|
+
const pointerUp = (ev) => {
|
|
59
|
+
setActivatedElement(undefined, ev);
|
|
60
|
+
};
|
|
61
|
+
const setActivatedElement = (el, ev) => {
|
|
62
|
+
// do nothing
|
|
63
|
+
if (el && el === activatableEle) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (activeDefer)
|
|
67
|
+
clearTimeout(activeDefer);
|
|
68
|
+
activeDefer = undefined;
|
|
69
|
+
const { x, y } = pointerCoord(ev);
|
|
70
|
+
// deactivate selected
|
|
71
|
+
if (activatableEle) {
|
|
72
|
+
if (clearDefers.has(activatableEle)) {
|
|
73
|
+
throw new Error('internal error');
|
|
74
|
+
}
|
|
75
|
+
if (!activatableEle.classList.contains(ACTIVATED)) {
|
|
76
|
+
addActivated(activatableEle, x, y);
|
|
77
|
+
}
|
|
78
|
+
removeActivated(true);
|
|
79
|
+
}
|
|
80
|
+
// activate
|
|
81
|
+
if (el) {
|
|
82
|
+
const deferId = clearDefers.get(el);
|
|
83
|
+
if (deferId) {
|
|
84
|
+
clearTimeout(deferId);
|
|
85
|
+
clearDefers.delete(el);
|
|
86
|
+
}
|
|
87
|
+
el.classList.remove(ACTIVATED);
|
|
88
|
+
const callback = () => {
|
|
89
|
+
addActivated(el, x, y);
|
|
90
|
+
activeDefer = undefined;
|
|
91
|
+
};
|
|
92
|
+
if (isInstant(el)) {
|
|
93
|
+
callback();
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
activeDefer = setTimeout(callback, ADD_ACTIVATED_DEFERS);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
activatableEle = el;
|
|
100
|
+
};
|
|
101
|
+
const addActivated = (el, x, y) => {
|
|
102
|
+
lastActivated = Date.now();
|
|
103
|
+
el.classList.add(ACTIVATED);
|
|
104
|
+
if (!useRippleEffect)
|
|
105
|
+
return;
|
|
106
|
+
const rippleEffect = getRippleEffect(el);
|
|
107
|
+
if (rippleEffect !== null) {
|
|
108
|
+
removeRipple();
|
|
109
|
+
activeRipple = rippleEffect.addRipple(x, y);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const removeRipple = () => {
|
|
113
|
+
if (activeRipple !== undefined) {
|
|
114
|
+
activeRipple.then((remove) => remove());
|
|
115
|
+
activeRipple = undefined;
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
const removeActivated = (smooth) => {
|
|
119
|
+
removeRipple();
|
|
120
|
+
const active = activatableEle;
|
|
121
|
+
if (!active) {
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
const time = CLEAR_STATE_DEFERS - Date.now() + lastActivated;
|
|
125
|
+
if (smooth && time > 0 && !isInstant(active)) {
|
|
126
|
+
const deferId = setTimeout(() => {
|
|
127
|
+
active.classList.remove(ACTIVATED);
|
|
128
|
+
clearDefers.delete(active);
|
|
129
|
+
}, CLEAR_STATE_DEFERS);
|
|
130
|
+
clearDefers.set(active, deferId);
|
|
131
|
+
}
|
|
132
|
+
else {
|
|
133
|
+
active.classList.remove(ACTIVATED);
|
|
134
|
+
}
|
|
135
|
+
};
|
|
136
|
+
doc.addEventListener('ionGestureCaptured', cancelActive);
|
|
137
|
+
doc.addEventListener('touchstart', onTouchStart, true);
|
|
138
|
+
doc.addEventListener('touchcancel', onTouchEnd, true);
|
|
139
|
+
doc.addEventListener('touchend', onTouchEnd, true);
|
|
140
|
+
/**
|
|
141
|
+
* Tap click effects such as the ripple effect should
|
|
142
|
+
* not happen when scrolling. For example, if a user scrolls
|
|
143
|
+
* the page but also happens to do a touchstart on a button
|
|
144
|
+
* as part of the scroll, the ripple effect should not
|
|
145
|
+
* be dispatched. The ripple effect should only happen
|
|
146
|
+
* if the button is activated and the page is not scrolling.
|
|
147
|
+
*
|
|
148
|
+
* pointercancel is dispatched on a gesture when scrolling
|
|
149
|
+
* starts, so this lets us avoid having to listen for
|
|
150
|
+
* ion-content's scroll events.
|
|
151
|
+
*/
|
|
152
|
+
doc.addEventListener('pointercancel', cancelActive, true);
|
|
153
|
+
doc.addEventListener('mousedown', onMouseDown, true);
|
|
154
|
+
doc.addEventListener('mouseup', onMouseUp, true);
|
|
155
|
+
};
|
|
156
|
+
// TODO(FW-2832): type
|
|
157
|
+
const getActivatableTarget = (ev) => {
|
|
158
|
+
if (ev.composedPath !== undefined) {
|
|
159
|
+
/**
|
|
160
|
+
* composedPath returns EventTarget[]. However,
|
|
161
|
+
* objects other than Element can be targets too.
|
|
162
|
+
* For example, AudioContext can be a target. In this
|
|
163
|
+
* case, we know that the event is a UIEvent so we
|
|
164
|
+
* can assume that the path will contain either Element
|
|
165
|
+
* or ShadowRoot.
|
|
166
|
+
*/
|
|
167
|
+
const path = ev.composedPath();
|
|
168
|
+
for (let i = 0; i < path.length - 2; i++) {
|
|
169
|
+
const el = path[i];
|
|
170
|
+
if (!(el instanceof ShadowRoot) && el.classList.contains('ion-activatable')) {
|
|
171
|
+
return el;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
return ev.target.closest('.ion-activatable');
|
|
177
|
+
}
|
|
178
|
+
};
|
|
179
|
+
const isInstant = (el) => {
|
|
180
|
+
return el.classList.contains('ion-activatable-instant');
|
|
181
|
+
};
|
|
182
|
+
const getRippleEffect = (el) => {
|
|
183
|
+
if (el.shadowRoot) {
|
|
184
|
+
const ripple = el.shadowRoot.querySelector('ion-ripple-effect');
|
|
185
|
+
if (ripple) {
|
|
186
|
+
return ripple;
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
return el.querySelector('ion-ripple-effect');
|
|
190
|
+
};
|
|
191
|
+
const ACTIVATED = 'ion-activated';
|
|
192
|
+
const ADD_ACTIVATED_DEFERS = 100;
|
|
193
|
+
const CLEAR_STATE_DEFERS = 150;
|
|
194
|
+
const MOUSE_WAIT = 2500;
|
|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AI,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE;AACzF,gBAAgB,OAAO,EAAE,CAAC;AAC1B,aAAa;AACb,SAAS;AACT,KAAK;AACL,SAAS;AACT,QAAQ,OAAO,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACrD,KAAK;AACL,CAAC,CAAC;AACF,MAAM,SAAS,GAAG,CAAC,EAAE,KAAK;AAC1B,IAAI,OAAO,EAAE,CAAC,SAAS,CAAC,QAAQ,CAAC,yBAAyB,CAAC,CAAC;AAC5D,CAAC,CAAC;AACF,MAAM,eAAe,GAAG,CAAC,EAAE,KAAK;AAChC,IAAI,IAAI,EAAE,CAAC,UAAU,EAAE;AACvB,QAAQ,MAAM,MAAM,GAAG,EAAE,CAAC,UAAU,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;AACxE,QAAQ,IAAI,MAAM,EAAE;AACpB,YAAY,OAAO,MAAM,CAAC;AAC1B,SAAS;AACT,KAAK;AACL,IAAI,OAAO,EAAE,CAAC,aAAa,CAAC,mBAAmB,CAAC,CAAC;AACjD,CAAC,CAAC;AACF,MAAM,SAAS,GAAG,eAAe,CAAC;AAClC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAC/B,MAAM,UAAU,GAAG,IAAI;;;;","names":[],"sources":["../node_modules/@ionic/core/dist/collection/utils/tap-click/index.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { doc } from \"../browser/index\";\nimport { now, pointerCoord } from \"../helpers\";\nexport const startTapClick = (config) => {\n if (doc === undefined) {\n return;\n }\n let lastTouch = -MOUSE_WAIT * 10;\n let lastActivated = 0;\n let activatableEle;\n let activeRipple;\n let activeDefer;\n const useRippleEffect = config.getBoolean('animated', true) && config.getBoolean('rippleEffect', true);\n const clearDefers = new WeakMap();\n // Touch Events\n const onTouchStart = (ev) => {\n lastTouch = now(ev);\n pointerDown(ev);\n };\n const onTouchEnd = (ev) => {\n lastTouch = now(ev);\n pointerUp(ev);\n };\n const onMouseDown = (ev) => {\n // Ignore right clicks\n if (ev.button === 2) {\n return;\n }\n const t = now(ev) - MOUSE_WAIT;\n if (lastTouch < t) {\n pointerDown(ev);\n }\n };\n const onMouseUp = (ev) => {\n const t = now(ev) - MOUSE_WAIT;\n if (lastTouch < t) {\n pointerUp(ev);\n }\n };\n const cancelActive = () => {\n if (activeDefer)\n clearTimeout(activeDefer);\n activeDefer = undefined;\n if (activatableEle) {\n removeActivated(false);\n activatableEle = undefined;\n }\n };\n const pointerDown = (ev) => {\n if (activatableEle) {\n return;\n }\n setActivatedElement(getActivatableTarget(ev), ev);\n };\n const pointerUp = (ev) => {\n setActivatedElement(undefined, ev);\n };\n const setActivatedElement = (el, ev) => {\n // do nothing\n if (el && el === activatableEle) {\n return;\n }\n if (activeDefer)\n clearTimeout(activeDefer);\n activeDefer = undefined;\n const { x, y } = pointerCoord(ev);\n // deactivate selected\n if (activatableEle) {\n if (clearDefers.has(activatableEle)) {\n throw new Error('internal error');\n }\n if (!activatableEle.classList.contains(ACTIVATED)) {\n addActivated(activatableEle, x, y);\n }\n removeActivated(true);\n }\n // activate\n if (el) {\n const deferId = clearDefers.get(el);\n if (deferId) {\n clearTimeout(deferId);\n clearDefers.delete(el);\n }\n el.classList.remove(ACTIVATED);\n const callback = () => {\n addActivated(el, x, y);\n activeDefer = undefined;\n };\n if (isInstant(el)) {\n callback();\n }\n else {\n activeDefer = setTimeout(callback, ADD_ACTIVATED_DEFERS);\n }\n }\n activatableEle = el;\n };\n const addActivated = (el, x, y) => {\n lastActivated = Date.now();\n el.classList.add(ACTIVATED);\n if (!useRippleEffect)\n return;\n const rippleEffect = getRippleEffect(el);\n if (rippleEffect !== null) {\n removeRipple();\n activeRipple = rippleEffect.addRipple(x, y);\n }\n };\n const removeRipple = () => {\n if (activeRipple !== undefined) {\n activeRipple.then((remove) => remove());\n activeRipple = undefined;\n }\n };\n const removeActivated = (smooth) => {\n removeRipple();\n const active = activatableEle;\n if (!active) {\n return;\n }\n const time = CLEAR_STATE_DEFERS - Date.now() + lastActivated;\n if (smooth && time > 0 && !isInstant(active)) {\n const deferId = setTimeout(() => {\n active.classList.remove(ACTIVATED);\n clearDefers.delete(active);\n }, CLEAR_STATE_DEFERS);\n clearDefers.set(active, deferId);\n }\n else {\n active.classList.remove(ACTIVATED);\n }\n };\n doc.addEventListener('ionGestureCaptured', cancelActive);\n doc.addEventListener('touchstart', onTouchStart, true);\n doc.addEventListener('touchcancel', onTouchEnd, true);\n doc.addEventListener('touchend', onTouchEnd, true);\n /**\n * Tap click effects such as the ripple effect should\n * not happen when scrolling. For example, if a user scrolls\n * the page but also happens to do a touchstart on a button\n * as part of the scroll, the ripple effect should not\n * be dispatched. The ripple effect should only happen\n * if the button is activated and the page is not scrolling.\n *\n * pointercancel is dispatched on a gesture when scrolling\n * starts, so this lets us avoid having to listen for\n * ion-content's scroll events.\n */\n doc.addEventListener('pointercancel', cancelActive, true);\n doc.addEventListener('mousedown', onMouseDown, true);\n doc.addEventListener('mouseup', onMouseUp, true);\n};\n// TODO(FW-2832): type\nconst getActivatableTarget = (ev) => {\n if (ev.composedPath !== undefined) {\n /**\n * composedPath returns EventTarget[]. However,\n * objects other than Element can be targets too.\n * For example, AudioContext can be a target. In this\n * case, we know that the event is a UIEvent so we\n * can assume that the path will contain either Element\n * or ShadowRoot.\n */\n const path = ev.composedPath();\n for (let i = 0; i < path.length - 2; i++) {\n const el = path[i];\n if (!(el instanceof ShadowRoot) && el.classList.contains('ion-activatable')) {\n return el;\n }\n }\n }\n else {\n return ev.target.closest('.ion-activatable');\n }\n};\nconst isInstant = (el) => {\n return el.classList.contains('ion-activatable-instant');\n};\nconst getRippleEffect = (el) => {\n if (el.shadowRoot) {\n const ripple = el.shadowRoot.querySelector('ion-ripple-effect');\n if (ripple) {\n return ripple;\n }\n }\n return el.querySelector('ion-ripple-effect');\n};\nconst ACTIVATED = 'ion-activated';\nconst ADD_ACTIVATED_DEFERS = 100;\nconst CLEAR_STATE_DEFERS = 150;\nconst MOUSE_WAIT = 2500;\n"],"version":3}
|
|
@@ -16,7 +16,7 @@ const App = /*@__PURE__*/ proxyCustomElement(class App extends HTMLElement {
|
|
|
16
16
|
rIC(async () => {
|
|
17
17
|
const isHybrid = isPlatform(window, 'hybrid');
|
|
18
18
|
if (!config.getBoolean('_testing')) {
|
|
19
|
-
import('./
|
|
19
|
+
import('./index12.js').then((module) => module.startTapClick(config));
|
|
20
20
|
}
|
|
21
21
|
if (config.getBoolean('statusTap', isHybrid)) {
|
|
22
22
|
import('./status-tap.js').then((module) => module.startStatusTap());
|