1 | 'use strict';
|
2 |
|
3 | Object.defineProperty(exports, '__esModule', { value: true });
|
4 |
|
5 | function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
6 |
|
7 | const React = require('react');
|
8 | const React__default = _interopDefault(React);
|
9 | const loader = require('@ionic/core/loader');
|
10 | const ionicons = require('ionicons');
|
11 | const icons = require('ionicons/icons');
|
12 | const core = require('@ionic/core');
|
13 | const tslib = require('tslib');
|
14 | const ReactDom = _interopDefault(require('react-dom'));
|
15 |
|
16 | const IonLifeCycleContext = React__default.createContext({
|
17 | onIonViewWillEnter: () => { return; },
|
18 | ionViewWillEnter: () => { return; },
|
19 | onIonViewDidEnter: () => { return; },
|
20 | ionViewDidEnter: () => { return; },
|
21 | onIonViewWillLeave: () => { return; },
|
22 | ionViewWillLeave: () => { return; },
|
23 | onIonViewDidLeave: () => { return; },
|
24 | ionViewDidLeave: () => { return; },
|
25 | });
|
26 | const DefaultIonLifeCycleContext = class {
|
27 | constructor() {
|
28 | this.ionViewWillEnterCallbacks = [];
|
29 | this.ionViewDidEnterCallbacks = [];
|
30 | this.ionViewWillLeaveCallbacks = [];
|
31 | this.ionViewDidLeaveCallbacks = [];
|
32 | }
|
33 | onIonViewWillEnter(callback) {
|
34 | if (callback.id) {
|
35 | const index = this.ionViewWillEnterCallbacks.findIndex(x => x.id === callback.id);
|
36 | if (index > -1) {
|
37 | this.ionViewWillEnterCallbacks[index] = callback;
|
38 | }
|
39 | else {
|
40 | this.ionViewWillEnterCallbacks.push(callback);
|
41 | }
|
42 | }
|
43 | else {
|
44 | this.ionViewWillEnterCallbacks.push(callback);
|
45 | }
|
46 | }
|
47 | ionViewWillEnter() {
|
48 | this.ionViewWillEnterCallbacks.forEach(cb => cb());
|
49 | }
|
50 | onIonViewDidEnter(callback) {
|
51 | if (callback.id) {
|
52 | const index = this.ionViewDidEnterCallbacks.findIndex(x => x.id === callback.id);
|
53 | if (index > -1) {
|
54 | this.ionViewDidEnterCallbacks[index] = callback;
|
55 | }
|
56 | else {
|
57 | this.ionViewDidEnterCallbacks.push(callback);
|
58 | }
|
59 | }
|
60 | else {
|
61 | this.ionViewDidEnterCallbacks.push(callback);
|
62 | }
|
63 | }
|
64 | ionViewDidEnter() {
|
65 | this.ionViewDidEnterCallbacks.forEach(cb => cb());
|
66 | }
|
67 | onIonViewWillLeave(callback) {
|
68 | if (callback.id) {
|
69 | const index = this.ionViewWillLeaveCallbacks.findIndex(x => x.id === callback.id);
|
70 | if (index > -1) {
|
71 | this.ionViewWillLeaveCallbacks[index] = callback;
|
72 | }
|
73 | else {
|
74 | this.ionViewWillLeaveCallbacks.push(callback);
|
75 | }
|
76 | }
|
77 | else {
|
78 | this.ionViewWillLeaveCallbacks.push(callback);
|
79 | }
|
80 | }
|
81 | ionViewWillLeave() {
|
82 | this.ionViewWillLeaveCallbacks.forEach(cb => cb());
|
83 | }
|
84 | onIonViewDidLeave(callback) {
|
85 | if (callback.id) {
|
86 | const index = this.ionViewDidLeaveCallbacks.findIndex(x => x.id === callback.id);
|
87 | if (index > -1) {
|
88 | this.ionViewDidLeaveCallbacks[index] = callback;
|
89 | }
|
90 | else {
|
91 | this.ionViewDidLeaveCallbacks.push(callback);
|
92 | }
|
93 | }
|
94 | else {
|
95 | this.ionViewDidLeaveCallbacks.push(callback);
|
96 | }
|
97 | }
|
98 | ionViewDidLeave() {
|
99 | this.ionViewDidLeaveCallbacks.forEach(cb => cb());
|
100 | this.componentCanBeDestroyed();
|
101 | }
|
102 | onComponentCanBeDestroyed(callback) {
|
103 | this.componentCanBeDestroyedCallback = callback;
|
104 | }
|
105 | componentCanBeDestroyed() {
|
106 | if (this.componentCanBeDestroyedCallback) {
|
107 | this.componentCanBeDestroyedCallback();
|
108 | }
|
109 | }
|
110 | };
|
111 |
|
112 | const withIonLifeCycle = (WrappedComponent) => {
|
113 | return class IonLifeCycle extends React__default.Component {
|
114 | constructor(props) {
|
115 | super(props);
|
116 | this.componentRef = React__default.createRef();
|
117 | }
|
118 | componentDidMount() {
|
119 | const element = this.componentRef.current;
|
120 | this.context.onIonViewWillEnter(() => {
|
121 | if (element && element.ionViewWillEnter) {
|
122 | element.ionViewWillEnter();
|
123 | }
|
124 | });
|
125 | this.context.onIonViewDidEnter(() => {
|
126 | if (element && element.ionViewDidEnter) {
|
127 | element.ionViewDidEnter();
|
128 | }
|
129 | });
|
130 | this.context.onIonViewWillLeave(() => {
|
131 | if (element && element.ionViewWillLeave) {
|
132 | element.ionViewWillLeave();
|
133 | }
|
134 | });
|
135 | this.context.onIonViewDidLeave(() => {
|
136 | if (element && element.ionViewDidLeave) {
|
137 | element.ionViewDidLeave();
|
138 | }
|
139 | });
|
140 | }
|
141 | render() {
|
142 | return (React__default.createElement(IonLifeCycleContext.Consumer, null, context => {
|
143 | this.context = context;
|
144 | return (React__default.createElement(WrappedComponent, Object.assign({ ref: this.componentRef }, this.props)));
|
145 | }));
|
146 | }
|
147 | };
|
148 | };
|
149 |
|
150 | const useIonViewWillEnter = (callback, deps = []) => {
|
151 | const context = React.useContext(IonLifeCycleContext);
|
152 | const id = React.useRef();
|
153 | id.current = id.current || Math.floor(Math.random() * 1000000);
|
154 | React.useEffect(() => {
|
155 | callback.id = id.current;
|
156 | context.onIonViewWillEnter(callback);
|
157 | }, deps);
|
158 | };
|
159 | const useIonViewDidEnter = (callback, deps = []) => {
|
160 | const context = React.useContext(IonLifeCycleContext);
|
161 | const id = React.useRef();
|
162 | id.current = id.current || Math.floor(Math.random() * 1000000);
|
163 | React.useEffect(() => {
|
164 | callback.id = id.current;
|
165 | context.onIonViewDidEnter(callback);
|
166 | }, deps);
|
167 | };
|
168 | const useIonViewWillLeave = (callback, deps = []) => {
|
169 | const context = React.useContext(IonLifeCycleContext);
|
170 | const id = React.useRef();
|
171 | id.current = id.current || Math.floor(Math.random() * 1000000);
|
172 | React.useEffect(() => {
|
173 | callback.id = id.current;
|
174 | context.onIonViewWillLeave(callback);
|
175 | }, deps);
|
176 | };
|
177 | const useIonViewDidLeave = (callback, deps = []) => {
|
178 | const context = React.useContext(IonLifeCycleContext);
|
179 | const id = React.useRef();
|
180 | id.current = id.current || Math.floor(Math.random() * 1000000);
|
181 | React.useEffect(() => {
|
182 | callback.id = id.current;
|
183 | context.onIonViewDidLeave(callback);
|
184 | }, deps);
|
185 | };
|
186 |
|
187 | const NavContext = React__default.createContext({
|
188 | getPageManager: () => undefined,
|
189 | getStackManager: () => undefined,
|
190 | goBack: (defaultHref) => {
|
191 | if (defaultHref !== undefined) {
|
192 | window.location.pathname = defaultHref;
|
193 | }
|
194 | else {
|
195 | window.history.back();
|
196 | }
|
197 | },
|
198 | navigate: (path) => { window.location.pathname = path; },
|
199 | hasIonicRouter: () => false,
|
200 | registerIonPage: () => undefined,
|
201 | currentPath: undefined
|
202 | });
|
203 |
|
204 | const dashToPascalCase = (str) => str.toLowerCase().split('-').map(segment => segment.charAt(0).toUpperCase() + segment.slice(1)).join('');
|
205 | const camelToDashCase = (str) => str.replace(/([A-Z])/g, (m) => `-${m[0].toLowerCase()}`);
|
206 |
|
207 | const attachProps = (node, newProps, oldProps = {}) => {
|
208 |
|
209 | if (node instanceof Element) {
|
210 |
|
211 | const className = getClassName(node.classList, newProps, oldProps);
|
212 | if (className !== '') {
|
213 | node.className = className;
|
214 | }
|
215 | Object.keys(newProps).forEach(name => {
|
216 | if (name === 'children' || name === 'style' || name === 'ref' || name === 'class' || name === 'className' || name === 'forwardedRef') {
|
217 | return;
|
218 | }
|
219 | if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
220 | const eventName = name.substring(2);
|
221 | const eventNameLc = eventName[0].toLowerCase() + eventName.substring(1);
|
222 | if (!isCoveredByReact(eventNameLc)) {
|
223 | syncEvent(node, eventNameLc, newProps[name]);
|
224 | }
|
225 | }
|
226 | else {
|
227 | node[name] = newProps[name];
|
228 | const propType = typeof newProps[name];
|
229 | if (propType === 'string') {
|
230 | node.setAttribute(camelToDashCase(name), newProps[name]);
|
231 | }
|
232 | else {
|
233 | node[name] = newProps[name];
|
234 | }
|
235 | }
|
236 | });
|
237 | }
|
238 | };
|
239 | const getClassName = (classList, newProps, oldProps) => {
|
240 | const newClassProp = newProps.className || newProps.class;
|
241 | const oldClassProp = oldProps.className || oldProps.class;
|
242 |
|
243 | const currentClasses = arrayToMap(classList);
|
244 | const incomingPropClasses = arrayToMap(newClassProp ? newClassProp.split(' ') : []);
|
245 | const oldPropClasses = arrayToMap(oldClassProp ? oldClassProp.split(' ') : []);
|
246 | const finalClassNames = [];
|
247 |
|
248 |
|
249 | currentClasses.forEach(currentClass => {
|
250 | if (incomingPropClasses.has(currentClass)) {
|
251 |
|
252 | finalClassNames.push(currentClass);
|
253 | incomingPropClasses.delete(currentClass);
|
254 | }
|
255 | else if (!oldPropClasses.has(currentClass)) {
|
256 |
|
257 | finalClassNames.push(currentClass);
|
258 | }
|
259 | });
|
260 | incomingPropClasses.forEach(s => finalClassNames.push(s));
|
261 | return finalClassNames.join(' ');
|
262 | };
|
263 |
|
264 |
|
265 |
|
266 |
|
267 | const isCoveredByReact = (eventNameSuffix, doc = document) => {
|
268 | const eventName = 'on' + eventNameSuffix;
|
269 | let isSupported = eventName in doc;
|
270 | if (!isSupported) {
|
271 | const element = doc.createElement('div');
|
272 | element.setAttribute(eventName, 'return;');
|
273 | isSupported = typeof element[eventName] === 'function';
|
274 | }
|
275 | return isSupported;
|
276 | };
|
277 | const syncEvent = (node, eventName, newEventHandler) => {
|
278 | const eventStore = node.__events || (node.__events = {});
|
279 | const oldEventHandler = eventStore[eventName];
|
280 |
|
281 | if (oldEventHandler) {
|
282 | node.removeEventListener(eventName, oldEventHandler);
|
283 | }
|
284 |
|
285 | node.addEventListener(eventName, eventStore[eventName] = function handler(e) {
|
286 | if (newEventHandler) {
|
287 | newEventHandler.call(this, e);
|
288 | }
|
289 | });
|
290 | };
|
291 | const arrayToMap = (arr) => {
|
292 | const map = new Map();
|
293 | arr.forEach((s) => map.set(s, s));
|
294 | return map;
|
295 | };
|
296 |
|
297 | const createForwardRef = (ReactComponent, displayName) => {
|
298 | const forwardRef = (props, ref) => {
|
299 | return React__default.createElement(ReactComponent, Object.assign({}, props, { forwardedRef: ref }));
|
300 | };
|
301 | forwardRef.displayName = displayName;
|
302 | return React__default.forwardRef(forwardRef);
|
303 | };
|
304 | const isPlatform = (platform) => {
|
305 | return core.isPlatform(window, platform);
|
306 | };
|
307 | const getPlatforms = () => {
|
308 | return core.getPlatforms(window);
|
309 | };
|
310 | const getConfig = () => {
|
311 | if (typeof window !== 'undefined') {
|
312 | const Ionic = window.Ionic;
|
313 | if (Ionic && Ionic.config) {
|
314 | return Ionic.config;
|
315 | }
|
316 | }
|
317 | return null;
|
318 | };
|
319 |
|
320 | const createReactComponent = (tagName, routerLinkComponent = false) => {
|
321 | const displayName = dashToPascalCase(tagName);
|
322 | const ReactComponent = class extends React__default.Component {
|
323 | constructor(props) {
|
324 | super(props);
|
325 | this.handleClick = (e) => {
|
326 | const { routerLink, routerDirection } = this.props;
|
327 | if (routerLink !== undefined) {
|
328 | e.preventDefault();
|
329 | this.context.navigate(routerLink, routerDirection);
|
330 | }
|
331 | };
|
332 | }
|
333 | componentDidMount() {
|
334 | this.componentDidUpdate(this.props);
|
335 | }
|
336 | componentDidUpdate(prevProps) {
|
337 | const node = ReactDom.findDOMNode(this);
|
338 | attachProps(node, this.props, prevProps);
|
339 | }
|
340 | render() {
|
341 | const _a = this.props, { children, forwardedRef, style, className, ref } = _a, cProps = tslib.__rest(_a, ["children", "forwardedRef", "style", "className", "ref"]);
|
342 | const propsToPass = Object.keys(cProps).reduce((acc, name) => {
|
343 | if (name.indexOf('on') === 0 && name[2] === name[2].toUpperCase()) {
|
344 | const eventName = name.substring(2).toLowerCase();
|
345 | if (isCoveredByReact(eventName)) {
|
346 | acc[name] = cProps[name];
|
347 | }
|
348 | }
|
349 | return acc;
|
350 | }, {});
|
351 | const newProps = Object.assign(Object.assign({}, propsToPass), { ref: forwardedRef, style });
|
352 | if (routerLinkComponent) {
|
353 | if (this.props.routerLink && !this.props.href) {
|
354 | newProps.href = this.props.routerLink;
|
355 | }
|
356 | if (newProps.onClick) {
|
357 | const oldClick = newProps.onClick;
|
358 | newProps.onClick = (e) => {
|
359 | oldClick(e);
|
360 | if (!e.defaultPrevented) {
|
361 | this.handleClick(e);
|
362 | }
|
363 | };
|
364 | }
|
365 | else {
|
366 | newProps.onClick = this.handleClick;
|
367 | }
|
368 | }
|
369 | return React__default.createElement(tagName, newProps, children);
|
370 | }
|
371 | static get displayName() {
|
372 | return displayName;
|
373 | }
|
374 | static get contextType() {
|
375 | return NavContext;
|
376 | }
|
377 | };
|
378 | return createForwardRef(ReactComponent, displayName);
|
379 | };
|
380 |
|
381 |
|
382 | const IonApp = createReactComponent('ion-app');
|
383 | const IonTab = createReactComponent('ion-tab');
|
384 | const IonTabButton = createReactComponent('ion-tab-button');
|
385 | const IonRouterLink = createReactComponent('ion-router-link', true);
|
386 | const IonAvatar = createReactComponent('ion-avatar');
|
387 | const IonBackdrop = createReactComponent('ion-backdrop');
|
388 | const IonBadge = createReactComponent('ion-badge');
|
389 | const IonButton = createReactComponent('ion-button', true);
|
390 | const IonButtons = createReactComponent('ion-buttons');
|
391 | const IonCard = createReactComponent('ion-card', true);
|
392 | const IonCardContent = createReactComponent('ion-card-content');
|
393 | const IonCardHeader = createReactComponent('ion-card-header');
|
394 | const IonCardSubtitle = createReactComponent('ion-card-subtitle');
|
395 | const IonCardTitle = createReactComponent('ion-card-title');
|
396 | const IonCheckbox = createReactComponent('ion-checkbox');
|
397 | const IonCol = createReactComponent('ion-col');
|
398 | const IonContent = createReactComponent('ion-content');
|
399 | const IonChip = createReactComponent('ion-chip');
|
400 | const IonDatetime = createReactComponent('ion-datetime');
|
401 | const IonFab = createReactComponent('ion-fab');
|
402 | const IonFabButton = createReactComponent('ion-fab-button', true);
|
403 | const IonFabList = createReactComponent('ion-fab-list');
|
404 | const IonFooter = createReactComponent('ion-footer');
|
405 | const IonGrid = createReactComponent('ion-grid');
|
406 | const IonHeader = createReactComponent('ion-header');
|
407 | const IonImg = createReactComponent('ion-img');
|
408 | const IonInfiniteScroll = createReactComponent('ion-infinite-scroll');
|
409 | const IonInfiniteScrollContent = createReactComponent('ion-infinite-scroll-content');
|
410 | const IonInput = createReactComponent('ion-input');
|
411 | const IonItem = createReactComponent('ion-item', true);
|
412 | const IonItemDivider = createReactComponent('ion-item-divider');
|
413 | const IonItemGroup = createReactComponent('ion-item-group');
|
414 | const IonItemOption = createReactComponent('ion-item-option', true);
|
415 | const IonItemOptions = createReactComponent('ion-item-options');
|
416 | const IonItemSliding = createReactComponent('ion-item-sliding');
|
417 | const IonLabel = createReactComponent('ion-label');
|
418 | const IonList = createReactComponent('ion-list');
|
419 | const IonListHeader = createReactComponent('ion-list-header');
|
420 | const IonMenu = createReactComponent('ion-menu');
|
421 | const IonMenuButton = createReactComponent('ion-menu-button');
|
422 | const IonMenuToggle = createReactComponent('ion-menu-toggle');
|
423 | const IonNote = createReactComponent('ion-note');
|
424 | const IonPickerColumn = createReactComponent('ion-picker-column');
|
425 | const IonNav = createReactComponent('ion-nav');
|
426 | const IonProgressBar = createReactComponent('ion-progress-bar');
|
427 | const IonRadio = createReactComponent('ion-radio');
|
428 | const IonRadioGroup = createReactComponent('ion-radio-group');
|
429 | const IonRange = createReactComponent('ion-range');
|
430 | const IonRefresher = createReactComponent('ion-refresher');
|
431 | const IonRefresherContent = createReactComponent('ion-refresher-content');
|
432 | const IonReorder = createReactComponent('ion-reorder');
|
433 | const IonReorderGroup = createReactComponent('ion-reorder-group');
|
434 | const IonRippleEffect = createReactComponent('ion-ripple-effect');
|
435 | const IonRow = createReactComponent('ion-row');
|
436 | const IonSearchbar = createReactComponent('ion-searchbar');
|
437 | const IonSegment = createReactComponent('ion-segment');
|
438 | const IonSegmentButton = createReactComponent('ion-segment-button');
|
439 | const IonSelect = createReactComponent('ion-select');
|
440 | const IonSelectOption = createReactComponent('ion-select-option');
|
441 | const IonSelectPopover = createReactComponent('ion-select-popover');
|
442 | const IonSkeletonText = createReactComponent('ion-skeleton-text');
|
443 | const IonSlide = createReactComponent('ion-slide');
|
444 | const IonSlides = createReactComponent('ion-slides');
|
445 | const IonSpinner = createReactComponent('ion-spinner');
|
446 | const IonSplitPane = createReactComponent('ion-split-pane');
|
447 | const IonText = createReactComponent('ion-text');
|
448 | const IonTextarea = createReactComponent('ion-textarea');
|
449 | const IonThumbnail = createReactComponent('ion-thumbnail');
|
450 | const IonTitle = createReactComponent('ion-title');
|
451 | const IonToggle = createReactComponent('ion-toggle');
|
452 | const IonToolbar = createReactComponent('ion-toolbar');
|
453 | const IonVirtualScroll = createReactComponent('ion-virtual-scroll');
|
454 |
|
455 | const createControllerComponent = (displayName, controller) => {
|
456 | const didDismissEventName = `on${displayName}DidDismiss`;
|
457 | const didPresentEventName = `on${displayName}DidPresent`;
|
458 | const willDismissEventName = `on${displayName}WillDismiss`;
|
459 | const willPresentEventName = `on${displayName}WillPresent`;
|
460 | class Overlay extends React__default.Component {
|
461 | constructor(props) {
|
462 | super(props);
|
463 | this.isUnmounted = false;
|
464 | this.handleDismiss = this.handleDismiss.bind(this);
|
465 | }
|
466 | static get displayName() {
|
467 | return displayName;
|
468 | }
|
469 | async componentDidMount() {
|
470 | const { isOpen } = this.props;
|
471 | if (isOpen) {
|
472 | this.present();
|
473 | }
|
474 | }
|
475 | componentWillUnmount() {
|
476 | this.isUnmounted = true;
|
477 | if (this.overlay) {
|
478 | this.overlay.dismiss();
|
479 | }
|
480 | }
|
481 | async componentDidUpdate(prevProps) {
|
482 | if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
|
483 | this.present(prevProps);
|
484 | }
|
485 | if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
|
486 | await this.overlay.dismiss();
|
487 | }
|
488 | }
|
489 | handleDismiss(event) {
|
490 | if (this.props.onDidDismiss) {
|
491 | this.props.onDidDismiss(event);
|
492 | }
|
493 | if (this.props.forwardedRef) {
|
494 | this.props.forwardedRef.current = undefined;
|
495 | }
|
496 | }
|
497 | async present(prevProps) {
|
498 | const _a = this.props, cProps = tslib.__rest(_a, ["isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"]);
|
499 | this.overlay = await controller.create(Object.assign({}, cProps));
|
500 | attachProps(this.overlay, {
|
501 | [didDismissEventName]: this.handleDismiss,
|
502 | [didPresentEventName]: (e) => this.props.onDidPresent && this.props.onDidPresent(e),
|
503 | [willDismissEventName]: (e) => this.props.onWillDismiss && this.props.onWillDismiss(e),
|
504 | [willPresentEventName]: (e) => this.props.onWillPresent && this.props.onWillPresent(e)
|
505 | }, prevProps);
|
506 |
|
507 |
|
508 | if (this.props.isOpen === true && this.isUnmounted === false) {
|
509 | if (this.props.forwardedRef) {
|
510 | this.props.forwardedRef.current = this.overlay;
|
511 | }
|
512 | await this.overlay.present();
|
513 | }
|
514 | }
|
515 | render() {
|
516 | return null;
|
517 | }
|
518 | }
|
519 | return React__default.forwardRef((props, ref) => {
|
520 | return React__default.createElement(Overlay, Object.assign({}, props, { forwardedRef: ref }));
|
521 | });
|
522 | };
|
523 |
|
524 | const IonAlert = createControllerComponent('IonAlert', core.alertController);
|
525 |
|
526 | const IonLoading = createControllerComponent('IonLoading', core.loadingController);
|
527 |
|
528 | const toastController = {
|
529 | create: (options) => core.toastController.create(options),
|
530 | dismiss: (data, role, id) => core.toastController.dismiss(data, role, id),
|
531 | getTop: () => core.toastController.getTop()
|
532 | };
|
533 | const IonToast = createControllerComponent('IonToast', toastController);
|
534 |
|
535 | const IonPicker = createControllerComponent('IonPicker', core.pickerController);
|
536 |
|
537 | const createOverlayComponent = (displayName, controller) => {
|
538 | const didDismissEventName = `on${displayName}DidDismiss`;
|
539 | const didPresentEventName = `on${displayName}DidPresent`;
|
540 | const willDismissEventName = `on${displayName}WillDismiss`;
|
541 | const willPresentEventName = `on${displayName}WillPresent`;
|
542 | class Overlay extends React__default.Component {
|
543 | constructor(props) {
|
544 | super(props);
|
545 | this.el = document.createElement('div');
|
546 | this.handleDismiss = this.handleDismiss.bind(this);
|
547 | }
|
548 | static get displayName() {
|
549 | return displayName;
|
550 | }
|
551 | componentDidMount() {
|
552 | if (this.props.isOpen) {
|
553 | this.present();
|
554 | }
|
555 | }
|
556 | componentWillUnmount() {
|
557 | if (this.overlay) {
|
558 | this.overlay.dismiss();
|
559 | }
|
560 | }
|
561 | handleDismiss(event) {
|
562 | if (this.props.onDidDismiss) {
|
563 | this.props.onDidDismiss(event);
|
564 | }
|
565 | if (this.props.forwardedRef) {
|
566 | this.props.forwardedRef.current = undefined;
|
567 | }
|
568 | }
|
569 | async componentDidUpdate(prevProps) {
|
570 | if (this.overlay) {
|
571 | attachProps(this.overlay, this.props, prevProps);
|
572 | }
|
573 | if (prevProps.isOpen !== this.props.isOpen && this.props.isOpen === true) {
|
574 | this.present(prevProps);
|
575 | }
|
576 | if (this.overlay && prevProps.isOpen !== this.props.isOpen && this.props.isOpen === false) {
|
577 | await this.overlay.dismiss();
|
578 | }
|
579 | }
|
580 | async present(prevProps) {
|
581 | const _a = this.props, cProps = tslib.__rest(_a, ["children", "isOpen", "onDidDismiss", "onDidPresent", "onWillDismiss", "onWillPresent"]);
|
582 | const elementProps = Object.assign(Object.assign({}, cProps), { ref: this.props.forwardedRef, [didDismissEventName]: this.handleDismiss, [didPresentEventName]: (e) => this.props.onDidPresent && this.props.onDidPresent(e), [willDismissEventName]: (e) => this.props.onWillDismiss && this.props.onWillDismiss(e), [willPresentEventName]: (e) => this.props.onWillPresent && this.props.onWillPresent(e) });
|
583 | this.overlay = await controller.create(Object.assign(Object.assign({}, elementProps), { component: this.el, componentProps: {} }));
|
584 | if (this.props.forwardedRef) {
|
585 | this.props.forwardedRef.current = this.overlay;
|
586 | }
|
587 | attachProps(this.overlay, elementProps, prevProps);
|
588 | await this.overlay.present();
|
589 | }
|
590 | render() {
|
591 | return ReactDom.createPortal(this.props.isOpen ? this.props.children : null, this.el);
|
592 | }
|
593 | }
|
594 | return React__default.forwardRef((props, ref) => {
|
595 | return React__default.createElement(Overlay, Object.assign({}, props, { forwardedRef: ref }));
|
596 | });
|
597 | };
|
598 |
|
599 | const actionSheetController = {
|
600 | create: (options) => core.actionSheetController.create(options),
|
601 | dismiss: (data, role, id) => core.actionSheetController.dismiss(data, role, id),
|
602 | getTop: () => core.actionSheetController.getTop()
|
603 | };
|
604 | const IonActionSheet = createOverlayComponent('IonActionSheet', actionSheetController);
|
605 |
|
606 | const IonModal = createOverlayComponent('IonModal', core.modalController);
|
607 |
|
608 | const IonPopover = createOverlayComponent('IonPopover', core.popoverController);
|
609 |
|
610 | class IonPageInternal extends React__default.Component {
|
611 | constructor(props) {
|
612 | super(props);
|
613 | this.ref = this.props.forwardedRef || React__default.createRef();
|
614 | }
|
615 | componentDidMount() {
|
616 | if (this.context && this.ref && this.ref.current) {
|
617 | if (this.context.hasIonicRouter()) {
|
618 | this.context.registerIonPage(this.ref.current);
|
619 | }
|
620 | }
|
621 | }
|
622 | render() {
|
623 | const _a = this.props, { className, children, forwardedRef } = _a, props = tslib.__rest(_a, ["className", "children", "forwardedRef"]);
|
624 | return (React__default.createElement("div", Object.assign({ className: className ? `ion-page ${className}` : 'ion-page', ref: this.ref }, props), children));
|
625 | }
|
626 | static get displayName() {
|
627 | return 'IonPage';
|
628 | }
|
629 | static get contextType() {
|
630 | return NavContext;
|
631 | }
|
632 | }
|
633 | const IonPage = createForwardRef(IonPageInternal, 'IonPage');
|
634 |
|
635 | const IonTabsContext = React__default.createContext({
|
636 | activeTab: undefined,
|
637 | selectTab: () => false
|
638 | });
|
639 |
|
640 | const IonTabBarInner = createReactComponent('ion-tab-bar');
|
641 | const IonBackButtonInner = createReactComponent('ion-back-button');
|
642 | const IonRouterOutletInner = createReactComponent('ion-router-outlet');
|
643 |
|
644 | const IonIconInner = createReactComponent('ion-icon');
|
645 |
|
646 | const IonRouterOutletContainer = (() => class extends React__default.Component {
|
647 | render() {
|
648 | const StackManager = this.context.getStackManager();
|
649 | return (this.context.hasIonicRouter() ? (React__default.createElement(StackManager, null,
|
650 | React__default.createElement(IonRouterOutletInner, Object.assign({ ref: this.props.forwardedRef }, this.props), this.props.children))) : (React__default.createElement(IonRouterOutletInner, Object.assign({ ref: this.props.forwardedRef }, this.props), this.props.children)));
|
651 | }
|
652 | static get contextType() {
|
653 | return NavContext;
|
654 | }
|
655 | })();
|
656 | const IonRouterOutlet = createForwardRef(IonRouterOutletContainer, 'IonRouterOutlet');
|
657 |
|
658 | class IonTabBarUnwrapped extends React__default.PureComponent {
|
659 | constructor(props) {
|
660 | super(props);
|
661 | this.setActiveTabOnContext = (_tab) => { };
|
662 | const tabs = {};
|
663 | React__default.Children.forEach(props.children, (child) => {
|
664 | if (child != null && typeof child === 'object' && child.props && child.type === IonTabButton) {
|
665 | tabs[child.props.tab] = {
|
666 | originalHref: child.props.href,
|
667 | currentHref: child.props.href
|
668 | };
|
669 | }
|
670 | });
|
671 | const tabKeys = Object.keys(tabs);
|
672 | const activeTab = tabKeys
|
673 | .find(key => {
|
674 | const href = tabs[key].originalHref;
|
675 | return props.currentPath.startsWith(href);
|
676 | }) || tabKeys[0];
|
677 | this.state = {
|
678 | activeTab,
|
679 | tabs
|
680 | };
|
681 | this.onTabButtonClick = this.onTabButtonClick.bind(this);
|
682 | this.renderTabButton = this.renderTabButton.bind(this);
|
683 | this.setActiveTabOnContext = this.setActiveTabOnContext.bind(this);
|
684 | this.selectTab = this.selectTab.bind(this);
|
685 | }
|
686 | selectTab(tab) {
|
687 | const tabUrl = this.state.tabs[tab];
|
688 | if (tabUrl) {
|
689 | this.onTabButtonClick(new CustomEvent('ionTabButtonClick', {
|
690 | detail: {
|
691 | href: tabUrl.currentHref,
|
692 | tab,
|
693 | selected: tab === this.state.activeTab
|
694 | }
|
695 | }));
|
696 | return true;
|
697 | }
|
698 | return false;
|
699 | }
|
700 | static getDerivedStateFromProps(props, state) {
|
701 | const tabs = Object.assign({}, state.tabs);
|
702 | const activeTab = Object.keys(state.tabs)
|
703 | .find(key => {
|
704 | const href = state.tabs[key].originalHref;
|
705 | return props.currentPath.startsWith(href);
|
706 | });
|
707 |
|
708 | React__default.Children.forEach(props.children, (child) => {
|
709 | if (child != null && typeof child === 'object' && child.props && child.type === IonTabButton) {
|
710 | const tab = tabs[child.props.tab];
|
711 | if (tab.originalHref !== child.props.href) {
|
712 | tabs[child.props.tab] = {
|
713 | originalHref: child.props.href,
|
714 | currentHref: child.props.href
|
715 | };
|
716 | }
|
717 | }
|
718 | });
|
719 | if (!(activeTab === undefined || (activeTab === state.activeTab && state.tabs[activeTab].currentHref === props.currentPath))) {
|
720 | tabs[activeTab] = {
|
721 | originalHref: tabs[activeTab].originalHref,
|
722 | currentHref: props.currentPath
|
723 | };
|
724 | }
|
725 | return {
|
726 | activeTab,
|
727 | tabs
|
728 | };
|
729 | }
|
730 | onTabButtonClick(e) {
|
731 | const originalHref = this.state.tabs[e.detail.tab].originalHref;
|
732 | const currentHref = e.detail.href;
|
733 | const { activeTab: prevActiveTab } = this.state;
|
734 |
|
735 | if (prevActiveTab === e.detail.tab) {
|
736 | if (originalHref === currentHref) {
|
737 | this.context.navigate(originalHref, 'none');
|
738 | }
|
739 | else {
|
740 | this.context.navigate(originalHref, 'back', 'pop');
|
741 | }
|
742 | }
|
743 | else {
|
744 | if (this.props.onIonTabsWillChange) {
|
745 | this.props.onIonTabsWillChange(new CustomEvent('ionTabWillChange', { detail: { tab: e.detail.tab } }));
|
746 | }
|
747 | if (this.props.onIonTabsDidChange) {
|
748 | this.props.onIonTabsDidChange(new CustomEvent('ionTabDidChange', { detail: { tab: e.detail.tab } }));
|
749 | }
|
750 | this.setActiveTabOnContext(e.detail.tab);
|
751 | this.context.navigate(currentHref, 'none');
|
752 | }
|
753 | }
|
754 | renderTabButton(activeTab) {
|
755 | return (child) => {
|
756 | if (child != null && child.props && child.type === IonTabButton) {
|
757 | const href = (child.props.tab === activeTab) ? this.props.currentPath : (this.state.tabs[child.props.tab].currentHref);
|
758 | return React__default.cloneElement(child, {
|
759 | href,
|
760 | onIonTabButtonClick: this.onTabButtonClick
|
761 | });
|
762 | }
|
763 | return null;
|
764 | };
|
765 | }
|
766 | render() {
|
767 | const { activeTab } = this.state;
|
768 | return (React__default.createElement(IonTabBarInner, Object.assign({}, this.props, { selectedTab: activeTab }), React__default.Children.map(this.props.children, this.renderTabButton(activeTab))));
|
769 | }
|
770 | static get contextType() {
|
771 | return NavContext;
|
772 | }
|
773 | }
|
774 | const IonTabBarContainer = React__default.memo((_a) => {
|
775 | var { forwardedRef } = _a, props = tslib.__rest(_a, ["forwardedRef"]);
|
776 | const context = React.useContext(NavContext);
|
777 | return (React__default.createElement(IonTabBarUnwrapped, Object.assign({ ref: forwardedRef }, props, { currentPath: props.currentPath || context.currentPath }), props.children));
|
778 | });
|
779 | const IonTabBar = createForwardRef(IonTabBarContainer, 'IonTabBar');
|
780 |
|
781 | const hostStyles = {
|
782 | display: 'flex',
|
783 | position: 'absolute',
|
784 | top: '0',
|
785 | left: '0',
|
786 | right: '0',
|
787 | bottom: '0',
|
788 | flexDirection: 'column',
|
789 | width: '100%',
|
790 | height: '100%',
|
791 | contain: 'layout size style'
|
792 | };
|
793 | const tabsInner = {
|
794 | position: 'relative',
|
795 | flex: 1,
|
796 | contain: 'layout size style'
|
797 | };
|
798 | class IonTabs extends React__default.Component {
|
799 | constructor(props) {
|
800 | super(props);
|
801 | this.routerOutletRef = React__default.createRef();
|
802 | this.tabBarRef = React__default.createRef();
|
803 | this.ionTabContextState = {
|
804 | activeTab: undefined,
|
805 | selectTab: () => false
|
806 | };
|
807 | }
|
808 | componentDidMount() {
|
809 | if (this.tabBarRef.current) {
|
810 |
|
811 | this.ionTabContextState.activeTab = this.tabBarRef.current.state.activeTab;
|
812 |
|
813 | this.tabBarRef.current.setActiveTabOnContext = (tab) => {
|
814 | this.ionTabContextState.activeTab = tab;
|
815 | };
|
816 | this.ionTabContextState.selectTab = this.tabBarRef.current.selectTab;
|
817 | }
|
818 | }
|
819 | render() {
|
820 | let outlet;
|
821 | let tabBar;
|
822 | const children = typeof this.props.children === 'function' ?
|
823 | this.props.children(this.ionTabContextState) : this.props.children;
|
824 | React__default.Children.forEach(children, (child) => {
|
825 | if (child == null || typeof child !== 'object' || !child.hasOwnProperty('type')) {
|
826 | return;
|
827 | }
|
828 | if (child.type === IonRouterOutlet) {
|
829 | outlet = child;
|
830 | }
|
831 | else if (child.type === React.Fragment && child.props.children[0].type === IonRouterOutlet) {
|
832 | outlet = child.props.children[0];
|
833 | }
|
834 | if (child.type === IonTabBar) {
|
835 | const { onIonTabsDidChange, onIonTabsWillChange } = this.props;
|
836 | tabBar = React__default.cloneElement(child, {
|
837 | onIonTabsDidChange,
|
838 | onIonTabsWillChange,
|
839 | ref: this.tabBarRef
|
840 | });
|
841 | }
|
842 | else if (child.type === React.Fragment && child.props.children[1].type === IonTabBar) {
|
843 | const { onIonTabsDidChange, onIonTabsWillChange } = this.props;
|
844 | tabBar = React__default.cloneElement(child.props.children[1], {
|
845 | onIonTabsDidChange,
|
846 | onIonTabsWillChange,
|
847 | ref: this.tabBarRef
|
848 | });
|
849 | }
|
850 | });
|
851 | if (!outlet) {
|
852 | throw new Error('IonTabs must contain an IonRouterOutlet');
|
853 | }
|
854 | if (!tabBar) {
|
855 |
|
856 | throw new Error('IonTabs needs a IonTabBar');
|
857 | }
|
858 | return (React__default.createElement(IonTabsContext.Provider, { value: this.ionTabContextState },
|
859 | React__default.createElement("div", { style: hostStyles },
|
860 | tabBar.props.slot === 'top' ? tabBar : null,
|
861 | React__default.createElement("div", { style: tabsInner, className: "tabs-inner" }, outlet),
|
862 | tabBar.props.slot === 'bottom' ? tabBar : null)));
|
863 | }
|
864 | static get contextType() {
|
865 | return NavContext;
|
866 | }
|
867 | }
|
868 |
|
869 | const IonBackButton = (() => class extends React__default.Component {
|
870 | constructor() {
|
871 | super(...arguments);
|
872 | this.clickButton = (e) => {
|
873 | const defaultHref = this.props.defaultHref;
|
874 | if (this.context.hasIonicRouter()) {
|
875 | e.stopPropagation();
|
876 | this.context.goBack(defaultHref);
|
877 | }
|
878 | else if (defaultHref !== undefined) {
|
879 | window.location.href = defaultHref;
|
880 | }
|
881 | };
|
882 | }
|
883 | render() {
|
884 | return (React__default.createElement(IonBackButtonInner, Object.assign({ onClick: this.clickButton }, this.props)));
|
885 | }
|
886 | static get displayName() {
|
887 | return 'IonBackButton';
|
888 | }
|
889 | static get contextType() {
|
890 | return NavContext;
|
891 | }
|
892 | })();
|
893 |
|
894 | const isDevMode = () => {
|
895 | return process && process.env && process.env.NODE_ENV === 'development';
|
896 | };
|
897 | const warnings = {};
|
898 | const deprecationWarning = (key, message) => {
|
899 | if (isDevMode()) {
|
900 | if (!warnings[key]) {
|
901 | console.warn(message);
|
902 | warnings[key] = true;
|
903 | }
|
904 | }
|
905 | };
|
906 |
|
907 | class IonIconContainer extends React__default.PureComponent {
|
908 | constructor(props) {
|
909 | super(props);
|
910 | if (this.props.name) {
|
911 | deprecationWarning('icon-name', 'In Ionic React, you import icons from "ionicons/icons" and set the icon you imported to the "icon" property. Setting the "name" property has no effect.');
|
912 | }
|
913 | }
|
914 | render() {
|
915 | var _a, _b;
|
916 | const _c = this.props, { icon, ios, md } = _c, rest = tslib.__rest(_c, ["icon", "ios", "md"]);
|
917 | let iconToUse;
|
918 | if (ios || md) {
|
919 | if (isPlatform('ios')) {
|
920 | iconToUse = (_a = ios !== null && ios !== void 0 ? ios : md) !== null && _a !== void 0 ? _a : icon;
|
921 | }
|
922 | else {
|
923 | iconToUse = (_b = md !== null && md !== void 0 ? md : ios) !== null && _b !== void 0 ? _b : icon;
|
924 | }
|
925 | }
|
926 | else {
|
927 | iconToUse = icon;
|
928 | }
|
929 | return (React__default.createElement(IonIconInner, Object.assign({ ref: this.props.forwardedRef, icon: iconToUse }, rest), this.props.children));
|
930 | }
|
931 | static get contextType() {
|
932 | return NavContext;
|
933 | }
|
934 | }
|
935 | const IonIcon = createForwardRef(IonIconContainer, 'IonIcon');
|
936 |
|
937 | class CreateAnimation extends React__default.PureComponent {
|
938 | constructor(props) {
|
939 | super(props);
|
940 | this.nodes = new Map();
|
941 | this.animation = core.createAnimation(props.id);
|
942 | }
|
943 | setupAnimation(props) {
|
944 | const animation = this.animation;
|
945 | if (this.nodes.size > 0) {
|
946 | animation.addElement(Array.from(this.nodes.values()));
|
947 | }
|
948 | checkConfig(animation, props);
|
949 | checkPlayback(animation, props);
|
950 | }
|
951 | componentDidMount() {
|
952 | const props = this.props;
|
953 | this.setupAnimation(props);
|
954 | }
|
955 | componentDidUpdate(prevProps) {
|
956 | const animation = this.animation;
|
957 | const props = this.props;
|
958 | checkConfig(animation, props, prevProps);
|
959 | checkProgress(animation, props, prevProps);
|
960 | checkPlayback(animation, props, prevProps);
|
961 | }
|
962 | render() {
|
963 | const { children } = this.props;
|
964 | return (React__default.createElement(React__default.Fragment, null, React__default.Children.map(children, ((child, id) => React__default.cloneElement(child, { ref: (el) => this.nodes.set(id, el) })))));
|
965 | }
|
966 | }
|
967 | const checkConfig = (animation, currentProps = {}, prevProps = {}) => {
|
968 | const reservedProps = ['children', 'progressStart', 'progressStep', 'progressEnd', 'pause', 'stop', 'destroy', 'play', 'from', 'to', 'fromTo', 'onFinish'];
|
969 | for (const key in currentProps) {
|
970 | if (currentProps.hasOwnProperty(key) &&
|
971 | !reservedProps.includes(key) &&
|
972 | currentProps[key] !== prevProps[key]) {
|
973 | animation[key](currentProps[key]);
|
974 | }
|
975 | }
|
976 | const fromValues = currentProps.from;
|
977 | if (fromValues && fromValues !== prevProps.from) {
|
978 | const values = (Array.isArray(fromValues)) ? fromValues : [fromValues];
|
979 | values.forEach(val => animation.from(val.property, val.value));
|
980 | }
|
981 | const toValues = currentProps.to;
|
982 | if (toValues && toValues !== prevProps.to) {
|
983 | const values = (Array.isArray(toValues)) ? toValues : [toValues];
|
984 | values.forEach(val => animation.to(val.property, val.value));
|
985 | }
|
986 | const fromToValues = currentProps.fromTo;
|
987 | if (fromToValues && fromToValues !== prevProps.fromTo) {
|
988 | const values = (Array.isArray(fromToValues)) ? fromToValues : [fromToValues];
|
989 | values.forEach(val => animation.fromTo(val.property, val.fromValue, val.toValue));
|
990 | }
|
991 | const onFinishValues = currentProps.onFinish;
|
992 | if (onFinishValues && onFinishValues !== prevProps.onFinish) {
|
993 | const values = (Array.isArray(onFinishValues)) ? onFinishValues : [onFinishValues];
|
994 | values.forEach(val => animation.onFinish(val.callback, val.opts));
|
995 | }
|
996 | };
|
997 | const checkProgress = (animation, currentProps = {}, prevProps = {}) => {
|
998 | var _a, _b, _c, _d, _e;
|
999 | const { progressStart, progressStep, progressEnd } = currentProps;
|
1000 | if (progressStart && (((_a = prevProps.progressStart) === null || _a === void 0 ? void 0 : _a.forceLinearEasing) !== (progressStart === null || progressStart === void 0 ? void 0 : progressStart.forceLinearEasing) || ((_b = prevProps.progressStart) === null || _b === void 0 ? void 0 : _b.step) !== (progressStart === null || progressStart === void 0 ? void 0 : progressStart.step))) {
|
1001 | animation.progressStart(progressStart.forceLinearEasing, progressStart.step);
|
1002 | }
|
1003 | if (progressStep && ((_c = prevProps.progressStep) === null || _c === void 0 ? void 0 : _c.step) !== (progressStep === null || progressStep === void 0 ? void 0 : progressStep.step)) {
|
1004 | animation.progressStep(progressStep.step);
|
1005 | }
|
1006 | if (progressEnd && (((_d = prevProps.progressEnd) === null || _d === void 0 ? void 0 : _d.playTo) !== (progressEnd === null || progressEnd === void 0 ? void 0 : progressEnd.playTo) || ((_e = prevProps.progressEnd) === null || _e === void 0 ? void 0 : _e.step) !== (progressEnd === null || progressEnd === void 0 ? void 0 : progressEnd.step) || (prevProps === null || prevProps === void 0 ? void 0 : prevProps.dur) !== (progressEnd === null || progressEnd === void 0 ? void 0 : progressEnd.dur))) {
|
1007 | animation.progressEnd(progressEnd.playTo, progressEnd.step, progressEnd.dur);
|
1008 | }
|
1009 | };
|
1010 | const checkPlayback = (animation, currentProps = {}, prevProps = {}) => {
|
1011 | if (!prevProps.play && currentProps.play) {
|
1012 | animation.play();
|
1013 | }
|
1014 | if (!prevProps.pause && currentProps.pause) {
|
1015 | animation.pause();
|
1016 | }
|
1017 | if (!prevProps.stop && currentProps.stop) {
|
1018 | animation.stop();
|
1019 | }
|
1020 | if (!prevProps.destroy && currentProps.destroy) {
|
1021 | animation.destroy();
|
1022 | }
|
1023 | };
|
1024 |
|
1025 |
|
1026 | ionicons.addIcons({
|
1027 | 'arrow-back-sharp': icons.arrowBackSharp,
|
1028 | 'caret-back-sharp': icons.caretBackSharp,
|
1029 | 'chevron-back': icons.chevronBack,
|
1030 | 'chevron-forward': icons.chevronForward,
|
1031 | 'close': icons.close,
|
1032 | 'close-circle': icons.closeCircle,
|
1033 | 'close-sharp': icons.closeSharp,
|
1034 | 'menu-outline': icons.menuOutline,
|
1035 | 'menu-sharp': icons.menuSharp,
|
1036 | 'reorder-two-sharp': icons.reorderTwoSharp,
|
1037 | 'reorder-three-outline': icons.reorderThreeOutline,
|
1038 | 'search-outline': icons.searchOutline,
|
1039 | 'search-sharp': icons.searchSharp,
|
1040 | });
|
1041 |
|
1042 |
|
1043 | loader.defineCustomElements(window);
|
1044 |
|
1045 | Object.defineProperty(exports, 'IonicSafeString', {
|
1046 | enumerable: true,
|
1047 | get: function () {
|
1048 | return core.IonicSafeString;
|
1049 | }
|
1050 | });
|
1051 | Object.defineProperty(exports, 'createAnimation', {
|
1052 | enumerable: true,
|
1053 | get: function () {
|
1054 | return core.createAnimation;
|
1055 | }
|
1056 | });
|
1057 | Object.defineProperty(exports, 'createGesture', {
|
1058 | enumerable: true,
|
1059 | get: function () {
|
1060 | return core.createGesture;
|
1061 | }
|
1062 | });
|
1063 | Object.defineProperty(exports, 'iosTransitionAnimation', {
|
1064 | enumerable: true,
|
1065 | get: function () {
|
1066 | return core.iosTransitionAnimation;
|
1067 | }
|
1068 | });
|
1069 | Object.defineProperty(exports, 'mdTransitionAnimation', {
|
1070 | enumerable: true,
|
1071 | get: function () {
|
1072 | return core.mdTransitionAnimation;
|
1073 | }
|
1074 | });
|
1075 | Object.defineProperty(exports, 'setupConfig', {
|
1076 | enumerable: true,
|
1077 | get: function () {
|
1078 | return core.setupConfig;
|
1079 | }
|
1080 | });
|
1081 | exports.CreateAnimation = CreateAnimation;
|
1082 | exports.DefaultIonLifeCycleContext = DefaultIonLifeCycleContext;
|
1083 | exports.IonActionSheet = IonActionSheet;
|
1084 | exports.IonAlert = IonAlert;
|
1085 | exports.IonApp = IonApp;
|
1086 | exports.IonAvatar = IonAvatar;
|
1087 | exports.IonBackButton = IonBackButton;
|
1088 | exports.IonBackdrop = IonBackdrop;
|
1089 | exports.IonBadge = IonBadge;
|
1090 | exports.IonButton = IonButton;
|
1091 | exports.IonButtons = IonButtons;
|
1092 | exports.IonCard = IonCard;
|
1093 | exports.IonCardContent = IonCardContent;
|
1094 | exports.IonCardHeader = IonCardHeader;
|
1095 | exports.IonCardSubtitle = IonCardSubtitle;
|
1096 | exports.IonCardTitle = IonCardTitle;
|
1097 | exports.IonCheckbox = IonCheckbox;
|
1098 | exports.IonChip = IonChip;
|
1099 | exports.IonCol = IonCol;
|
1100 | exports.IonContent = IonContent;
|
1101 | exports.IonDatetime = IonDatetime;
|
1102 | exports.IonFab = IonFab;
|
1103 | exports.IonFabButton = IonFabButton;
|
1104 | exports.IonFabList = IonFabList;
|
1105 | exports.IonFooter = IonFooter;
|
1106 | exports.IonGrid = IonGrid;
|
1107 | exports.IonHeader = IonHeader;
|
1108 | exports.IonIcon = IonIcon;
|
1109 | exports.IonImg = IonImg;
|
1110 | exports.IonInfiniteScroll = IonInfiniteScroll;
|
1111 | exports.IonInfiniteScrollContent = IonInfiniteScrollContent;
|
1112 | exports.IonInput = IonInput;
|
1113 | exports.IonItem = IonItem;
|
1114 | exports.IonItemDivider = IonItemDivider;
|
1115 | exports.IonItemGroup = IonItemGroup;
|
1116 | exports.IonItemOption = IonItemOption;
|
1117 | exports.IonItemOptions = IonItemOptions;
|
1118 | exports.IonItemSliding = IonItemSliding;
|
1119 | exports.IonLabel = IonLabel;
|
1120 | exports.IonLifeCycleContext = IonLifeCycleContext;
|
1121 | exports.IonList = IonList;
|
1122 | exports.IonListHeader = IonListHeader;
|
1123 | exports.IonLoading = IonLoading;
|
1124 | exports.IonMenu = IonMenu;
|
1125 | exports.IonMenuButton = IonMenuButton;
|
1126 | exports.IonMenuToggle = IonMenuToggle;
|
1127 | exports.IonModal = IonModal;
|
1128 | exports.IonNav = IonNav;
|
1129 | exports.IonNote = IonNote;
|
1130 | exports.IonPage = IonPage;
|
1131 | exports.IonPicker = IonPicker;
|
1132 | exports.IonPickerColumn = IonPickerColumn;
|
1133 | exports.IonPopover = IonPopover;
|
1134 | exports.IonProgressBar = IonProgressBar;
|
1135 | exports.IonRadio = IonRadio;
|
1136 | exports.IonRadioGroup = IonRadioGroup;
|
1137 | exports.IonRange = IonRange;
|
1138 | exports.IonRefresher = IonRefresher;
|
1139 | exports.IonRefresherContent = IonRefresherContent;
|
1140 | exports.IonReorder = IonReorder;
|
1141 | exports.IonReorderGroup = IonReorderGroup;
|
1142 | exports.IonRippleEffect = IonRippleEffect;
|
1143 | exports.IonRouterLink = IonRouterLink;
|
1144 | exports.IonRouterOutlet = IonRouterOutlet;
|
1145 | exports.IonRow = IonRow;
|
1146 | exports.IonSearchbar = IonSearchbar;
|
1147 | exports.IonSegment = IonSegment;
|
1148 | exports.IonSegmentButton = IonSegmentButton;
|
1149 | exports.IonSelect = IonSelect;
|
1150 | exports.IonSelectOption = IonSelectOption;
|
1151 | exports.IonSelectPopover = IonSelectPopover;
|
1152 | exports.IonSkeletonText = IonSkeletonText;
|
1153 | exports.IonSlide = IonSlide;
|
1154 | exports.IonSlides = IonSlides;
|
1155 | exports.IonSpinner = IonSpinner;
|
1156 | exports.IonSplitPane = IonSplitPane;
|
1157 | exports.IonTab = IonTab;
|
1158 | exports.IonTabBar = IonTabBar;
|
1159 | exports.IonTabButton = IonTabButton;
|
1160 | exports.IonTabs = IonTabs;
|
1161 | exports.IonTabsContext = IonTabsContext;
|
1162 | exports.IonText = IonText;
|
1163 | exports.IonTextarea = IonTextarea;
|
1164 | exports.IonThumbnail = IonThumbnail;
|
1165 | exports.IonTitle = IonTitle;
|
1166 | exports.IonToast = IonToast;
|
1167 | exports.IonToggle = IonToggle;
|
1168 | exports.IonToolbar = IonToolbar;
|
1169 | exports.IonVirtualScroll = IonVirtualScroll;
|
1170 | exports.NavContext = NavContext;
|
1171 | exports.getConfig = getConfig;
|
1172 | exports.getPlatforms = getPlatforms;
|
1173 | exports.isPlatform = isPlatform;
|
1174 | exports.useIonViewDidEnter = useIonViewDidEnter;
|
1175 | exports.useIonViewDidLeave = useIonViewDidLeave;
|
1176 | exports.useIonViewWillEnter = useIonViewWillEnter;
|
1177 | exports.useIonViewWillLeave = useIonViewWillLeave;
|
1178 | exports.withIonLifeCycle = withIonLifeCycle;
|
1179 |
|