95d9d2f9a8
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2241 lines
100 KiB
JavaScript
2241 lines
100 KiB
JavaScript
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[4812],{
|
|
|
|
/***/ 17481:
|
|
/*!***********************************************************!*\
|
|
!*** ./node_modules/@ionic/core/dist/esm/dir-e8b767a8.js ***!
|
|
\***********************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "i": () => (/* binding */ isRTL)
|
|
/* harmony export */ });
|
|
/*!
|
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
*/
|
|
|
|
/**
|
|
* Returns `true` if the document or host element
|
|
* has a `dir` set to `rtl`. The host value will always
|
|
* take priority over the root document value.
|
|
*/
|
|
const isRTL = hostEl => {
|
|
if (hostEl) {
|
|
if (hostEl.dir !== '') {
|
|
return hostEl.dir.toLowerCase() === 'rtl';
|
|
}
|
|
}
|
|
|
|
return (document === null || document === void 0 ? void 0 : document.dir.toLowerCase()) === 'rtl';
|
|
};
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 90539:
|
|
/*!**************************************************************************!*\
|
|
!*** ./node_modules/@ionic/core/dist/esm/framework-delegate-c3305a28.js ***!
|
|
\**************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "C": () => (/* binding */ CoreDelegate),
|
|
/* harmony export */ "a": () => (/* binding */ attachComponent),
|
|
/* harmony export */ "d": () => (/* binding */ detachComponent)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
|
|
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
|
|
|
|
/*!
|
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
*/
|
|
// TODO(FW-2832): types
|
|
|
|
const attachComponent = /*#__PURE__*/function () {
|
|
var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (delegate, container, component, cssClasses, componentProps, inline) {
|
|
var _a;
|
|
|
|
if (delegate) {
|
|
return delegate.attachViewToDom(container, component, componentProps, cssClasses);
|
|
}
|
|
|
|
if (!inline && typeof component !== 'string' && !(component instanceof HTMLElement)) {
|
|
throw new Error('framework delegate is missing');
|
|
}
|
|
|
|
const el = typeof component === 'string' ? (_a = container.ownerDocument) === null || _a === void 0 ? void 0 : _a.createElement(component) : component;
|
|
|
|
if (cssClasses) {
|
|
cssClasses.forEach(c => el.classList.add(c));
|
|
}
|
|
|
|
if (componentProps) {
|
|
Object.assign(el, componentProps);
|
|
}
|
|
|
|
container.appendChild(el);
|
|
yield new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_1__.c)(el, resolve));
|
|
return el;
|
|
});
|
|
|
|
return function attachComponent(_x, _x2, _x3, _x4, _x5, _x6) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
const detachComponent = (delegate, element) => {
|
|
if (element) {
|
|
if (delegate) {
|
|
const container = element.parentElement;
|
|
return delegate.removeViewFromDom(container, element);
|
|
}
|
|
|
|
element.remove();
|
|
}
|
|
|
|
return Promise.resolve();
|
|
};
|
|
|
|
const CoreDelegate = () => {
|
|
let BaseComponent;
|
|
let Reference;
|
|
|
|
const attachViewToDom = /*#__PURE__*/function () {
|
|
var _ref2 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (parentElement, userComponent, userComponentProps = {}, cssClasses = []) {
|
|
var _a, _b;
|
|
|
|
BaseComponent = parentElement;
|
|
/**
|
|
* If passing in a component via the `component` props
|
|
* we need to append it inside of our overlay component.
|
|
*/
|
|
|
|
if (userComponent) {
|
|
/**
|
|
* If passing in the tag name, create
|
|
* the element otherwise just get a reference
|
|
* to the component.
|
|
*/
|
|
const el = typeof userComponent === 'string' ? (_a = BaseComponent.ownerDocument) === null || _a === void 0 ? void 0 : _a.createElement(userComponent) : userComponent;
|
|
/**
|
|
* Add any css classes passed in
|
|
* via the cssClasses prop on the overlay.
|
|
*/
|
|
|
|
cssClasses.forEach(c => el.classList.add(c));
|
|
/**
|
|
* Add any props passed in
|
|
* via the componentProps prop on the overlay.
|
|
*/
|
|
|
|
Object.assign(el, userComponentProps);
|
|
/**
|
|
* Finally, append the component
|
|
* inside of the overlay component.
|
|
*/
|
|
|
|
BaseComponent.appendChild(el);
|
|
yield new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_1__.c)(el, resolve));
|
|
} else if (BaseComponent.children.length > 0) {
|
|
const root = BaseComponent.children[0];
|
|
|
|
if (!root.classList.contains('ion-delegate-host')) {
|
|
/**
|
|
* If the root element is not a delegate host, it means
|
|
* that the overlay has not been presented yet and we need
|
|
* to create the containing element with the specified classes.
|
|
*/
|
|
const el = (_b = BaseComponent.ownerDocument) === null || _b === void 0 ? void 0 : _b.createElement('div'); // Add a class to track if the root element was created by the delegate.
|
|
|
|
el.classList.add('ion-delegate-host');
|
|
cssClasses.forEach(c => el.classList.add(c)); // Move each child from the original template to the new parent element.
|
|
|
|
el.append(...BaseComponent.children); // Append the new parent element to the original parent element.
|
|
|
|
BaseComponent.appendChild(el);
|
|
}
|
|
}
|
|
/**
|
|
* Get the root of the app and
|
|
* add the overlay there.
|
|
*/
|
|
|
|
|
|
const app = document.querySelector('ion-app') || document.body;
|
|
/**
|
|
* Create a placeholder comment so that
|
|
* we can return this component to where
|
|
* it was previously.
|
|
*/
|
|
|
|
Reference = document.createComment('ionic teleport');
|
|
BaseComponent.parentNode.insertBefore(Reference, BaseComponent);
|
|
app.appendChild(BaseComponent);
|
|
return BaseComponent;
|
|
});
|
|
|
|
return function attachViewToDom(_x7, _x8) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
const removeViewFromDom = () => {
|
|
/**
|
|
* Return component to where it was previously in the DOM.
|
|
*/
|
|
if (BaseComponent && Reference) {
|
|
Reference.parentNode.insertBefore(BaseComponent, Reference);
|
|
Reference.remove();
|
|
}
|
|
|
|
return Promise.resolve();
|
|
};
|
|
|
|
return {
|
|
attachViewToDom,
|
|
removeViewFromDom
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 99273:
|
|
/*!*************************************************************!*\
|
|
!*** ./node_modules/@ionic/core/dist/esm/index-c4b11676.js ***!
|
|
\*************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "a": () => (/* binding */ printRequiredElementError),
|
|
/* harmony export */ "b": () => (/* binding */ printIonError),
|
|
/* harmony export */ "p": () => (/* binding */ printIonWarning)
|
|
/* harmony export */ });
|
|
/*!
|
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
*/
|
|
|
|
/**
|
|
* Logs a warning to the console with an Ionic prefix
|
|
* to indicate the library that is warning the developer.
|
|
*
|
|
* @param message - The string message to be logged to the console.
|
|
*/
|
|
const printIonWarning = (message, ...params) => {
|
|
return console.warn(`[Ionic Warning]: ${message}`, ...params);
|
|
};
|
|
/*
|
|
* Logs an error to the console with an Ionic prefix
|
|
* to indicate the library that is warning the developer.
|
|
*
|
|
* @param message - The string message to be logged to the console.
|
|
* @param params - Additional arguments to supply to the console.error.
|
|
*/
|
|
|
|
|
|
const printIonError = (message, ...params) => {
|
|
return console.error(`[Ionic Error]: ${message}`, ...params);
|
|
};
|
|
/**
|
|
* Prints an error informing developers that an implementation requires an element to be used
|
|
* within a specific selector.
|
|
*
|
|
* @param el The web component element this is requiring the element.
|
|
* @param targetSelectors The selector or selectors that were not found.
|
|
*/
|
|
|
|
|
|
const printRequiredElementError = (el, ...targetSelectors) => {
|
|
return console.error(`<${el.tagName.toLowerCase()}> must be used inside ${targetSelectors.join(' or ')}.`);
|
|
};
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 24311:
|
|
/*!*************************************************************!*\
|
|
!*** ./node_modules/@ionic/core/dist/esm/index-e6d1a8be.js ***!
|
|
\*************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "I": () => (/* binding */ ION_CONTENT_ELEMENT_SELECTOR),
|
|
/* harmony export */ "a": () => (/* binding */ findIonContent),
|
|
/* harmony export */ "b": () => (/* binding */ ION_CONTENT_CLASS_SELECTOR),
|
|
/* harmony export */ "c": () => (/* binding */ scrollByPoint),
|
|
/* harmony export */ "d": () => (/* binding */ disableContentScrollY),
|
|
/* harmony export */ "f": () => (/* binding */ findClosestIonContent),
|
|
/* harmony export */ "g": () => (/* binding */ getScrollElement),
|
|
/* harmony export */ "i": () => (/* binding */ isIonContent),
|
|
/* harmony export */ "p": () => (/* binding */ printIonContentErrorMsg),
|
|
/* harmony export */ "r": () => (/* binding */ resetContentScrollY),
|
|
/* harmony export */ "s": () => (/* binding */ scrollToTop)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
|
|
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
/* harmony import */ var _index_c4b11676_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index-c4b11676.js */ 99273);
|
|
|
|
|
|
/*!
|
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
*/
|
|
|
|
|
|
const ION_CONTENT_TAG_NAME = 'ION-CONTENT';
|
|
const ION_CONTENT_ELEMENT_SELECTOR = 'ion-content';
|
|
const ION_CONTENT_CLASS_SELECTOR = '.ion-content-scroll-host';
|
|
/**
|
|
* Selector used for implementations reliant on `<ion-content>` for scroll event changes.
|
|
*
|
|
* Developers should use the `.ion-content-scroll-host` selector to target the element emitting
|
|
* scroll events. With virtual scroll implementations this will be the host element for
|
|
* the scroll viewport.
|
|
*/
|
|
|
|
const ION_CONTENT_SELECTOR = `${ION_CONTENT_ELEMENT_SELECTOR}, ${ION_CONTENT_CLASS_SELECTOR}`;
|
|
|
|
const isIonContent = el => el.tagName === ION_CONTENT_TAG_NAME;
|
|
/**
|
|
* Waits for the element host fully initialize before
|
|
* returning the inner scroll element.
|
|
*
|
|
* For `ion-content` the scroll target will be the result
|
|
* of the `getScrollElement` function.
|
|
*
|
|
* For custom implementations it will be the element host
|
|
* or a selector within the host, if supplied through `scrollTarget`.
|
|
*/
|
|
|
|
|
|
const getScrollElement = /*#__PURE__*/function () {
|
|
var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (el) {
|
|
if (isIonContent(el)) {
|
|
yield new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_1__.c)(el, resolve));
|
|
return el.getScrollElement();
|
|
}
|
|
|
|
return el;
|
|
});
|
|
|
|
return function getScrollElement(_x) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
/**
|
|
* Queries the element matching the selector for IonContent.
|
|
* See ION_CONTENT_SELECTOR for the selector used.
|
|
*/
|
|
|
|
|
|
const findIonContent = el => {
|
|
/**
|
|
* First we try to query the custom scroll host selector in cases where
|
|
* the implementation is using an outer `ion-content` with an inner custom
|
|
* scroll container.
|
|
*/
|
|
const customContentHost = el.querySelector(ION_CONTENT_CLASS_SELECTOR);
|
|
|
|
if (customContentHost) {
|
|
return customContentHost;
|
|
}
|
|
|
|
return el.querySelector(ION_CONTENT_SELECTOR);
|
|
};
|
|
/**
|
|
* Queries the closest element matching the selector for IonContent.
|
|
*/
|
|
|
|
|
|
const findClosestIonContent = el => {
|
|
return el.closest(ION_CONTENT_SELECTOR);
|
|
};
|
|
/**
|
|
* Scrolls to the top of the element. If an `ion-content` is found, it will scroll
|
|
* using the public API `scrollToTop` with a duration.
|
|
*/
|
|
// TODO(FW-2832): type
|
|
|
|
|
|
const scrollToTop = (el, durationMs) => {
|
|
if (isIonContent(el)) {
|
|
const content = el;
|
|
return content.scrollToTop(durationMs);
|
|
}
|
|
|
|
return Promise.resolve(el.scrollTo({
|
|
top: 0,
|
|
left: 0,
|
|
behavior: durationMs > 0 ? 'smooth' : 'auto'
|
|
}));
|
|
};
|
|
/**
|
|
* Scrolls by a specified X/Y distance in the component. If an `ion-content` is found, it will scroll
|
|
* using the public API `scrollByPoint` with a duration.
|
|
*/
|
|
|
|
|
|
const scrollByPoint = (el, x, y, durationMs) => {
|
|
if (isIonContent(el)) {
|
|
const content = el;
|
|
return content.scrollByPoint(x, y, durationMs);
|
|
}
|
|
|
|
return Promise.resolve(el.scrollBy({
|
|
top: y,
|
|
left: x,
|
|
behavior: durationMs > 0 ? 'smooth' : 'auto'
|
|
}));
|
|
};
|
|
/**
|
|
* Prints an error informing developers that an implementation requires an element to be used
|
|
* within either the `ion-content` selector or the `.ion-content-scroll-host` class.
|
|
*/
|
|
|
|
|
|
const printIonContentErrorMsg = el => {
|
|
return (0,_index_c4b11676_js__WEBPACK_IMPORTED_MODULE_2__.a)(el, ION_CONTENT_ELEMENT_SELECTOR);
|
|
};
|
|
/**
|
|
* Several components in Ionic need to prevent scrolling
|
|
* during a gesture (card modal, range, item sliding, etc).
|
|
* Use this utility to account for ion-content and custom content hosts.
|
|
*/
|
|
|
|
|
|
const disableContentScrollY = contentEl => {
|
|
if (isIonContent(contentEl)) {
|
|
const ionContent = contentEl;
|
|
const initialScrollY = ionContent.scrollY;
|
|
ionContent.scrollY = false;
|
|
/**
|
|
* This should be passed into resetContentScrollY
|
|
* so that we can revert ion-content's scrollY to the
|
|
* correct state. For example, if scrollY = false
|
|
* initially, we do not want to enable scrolling
|
|
* when we call resetContentScrollY.
|
|
*/
|
|
|
|
return initialScrollY;
|
|
} else {
|
|
contentEl.style.setProperty('overflow', 'hidden');
|
|
return true;
|
|
}
|
|
};
|
|
|
|
const resetContentScrollY = (contentEl, initialScrollY) => {
|
|
if (isIonContent(contentEl)) {
|
|
contentEl.scrollY = initialScrollY;
|
|
} else {
|
|
contentEl.style.removeProperty('overflow');
|
|
}
|
|
};
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 4812:
|
|
/*!**************************************************************!*\
|
|
!*** ./node_modules/@ionic/core/dist/esm/ion-app_8.entry.js ***!
|
|
\**************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "ion_app": () => (/* binding */ App),
|
|
/* harmony export */ "ion_buttons": () => (/* binding */ Buttons),
|
|
/* harmony export */ "ion_content": () => (/* binding */ Content),
|
|
/* harmony export */ "ion_footer": () => (/* binding */ Footer),
|
|
/* harmony export */ "ion_header": () => (/* binding */ Header),
|
|
/* harmony export */ "ion_router_outlet": () => (/* binding */ RouterOutlet),
|
|
/* harmony export */ "ion_title": () => (/* binding */ ToolbarTitle),
|
|
/* harmony export */ "ion_toolbar": () => (/* binding */ Toolbar)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
|
|
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index-8e692445.js */ 91559);
|
|
/* harmony import */ var _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./ionic-global-c74e4951.js */ 95823);
|
|
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
/* harmony import */ var _dir_e8b767a8_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./dir-e8b767a8.js */ 17481);
|
|
/* harmony import */ var _theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./theme-7670341c.js */ 50320);
|
|
/* harmony import */ var _index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./index-e6d1a8be.js */ 24311);
|
|
/* harmony import */ var _keyboard_controller_73af62b2_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./keyboard-controller-73af62b2.js */ 23963);
|
|
/* harmony import */ var _cubic_bezier_e78d1307_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./cubic-bezier-e78d1307.js */ 31463);
|
|
/* harmony import */ var _framework_delegate_c3305a28_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./framework-delegate-c3305a28.js */ 90539);
|
|
/* harmony import */ var _index_27c7e5c4_js__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./index-27c7e5c4.js */ 60919);
|
|
/* harmony import */ var _index_c4b11676_js__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./index-c4b11676.js */ 99273);
|
|
/* harmony import */ var _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./index-33ffec25.js */ 42286);
|
|
|
|
|
|
/*!
|
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const appCss = "html.plt-mobile ion-app{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}html.plt-mobile ion-app [contenteditable]{-webkit-user-select:text;-moz-user-select:text;-ms-user-select:text;user-select:text}ion-app.force-statusbar-padding{--ion-safe-area-top:20px}";
|
|
const App = class {
|
|
constructor(hostRef) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
}
|
|
|
|
componentDidLoad() {
|
|
var _this = this;
|
|
|
|
{
|
|
rIC( /*#__PURE__*/(0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const isHybrid = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.a)(window, 'hybrid');
|
|
|
|
if (!_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.getBoolean('_testing')) {
|
|
__webpack_require__.e(/*! import() */ 3771).then(__webpack_require__.bind(__webpack_require__, /*! ./index-2061d5f6.js */ 83771)).then(module => module.startTapClick(_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c));
|
|
}
|
|
|
|
if (_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.getBoolean('statusTap', isHybrid)) {
|
|
__webpack_require__.e(/*! import() */ 3759).then(__webpack_require__.bind(__webpack_require__, /*! ./status-tap-4d4674a1.js */ 63759)).then(module => module.startStatusTap());
|
|
}
|
|
|
|
if (_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.getBoolean('inputShims', needInputShims())) {
|
|
/**
|
|
* needInputShims() ensures that only iOS and Android
|
|
* platforms proceed into this block.
|
|
*/
|
|
const platform = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.a)(window, 'ios') ? 'ios' : 'android';
|
|
__webpack_require__.e(/*! import() */ 1321).then(__webpack_require__.bind(__webpack_require__, /*! ./input-shims-8459e7d9.js */ 81321)).then(module => module.startInputShims(_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c, platform));
|
|
}
|
|
|
|
const hardwareBackButtonModule = yield Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./hardware-back-button-490df115.js */ 70159));
|
|
|
|
if (_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.getBoolean('hardwareBackButton', isHybrid)) {
|
|
hardwareBackButtonModule.startHardwareBackButton();
|
|
} else {
|
|
hardwareBackButtonModule.blockHardwareBackButton();
|
|
}
|
|
|
|
if (typeof window !== 'undefined') {
|
|
__webpack_require__.e(/*! import() */ 512).then(__webpack_require__.bind(__webpack_require__, /*! ./keyboard-282b81b8.js */ 20512)).then(module => module.startKeyboardAssist(window));
|
|
}
|
|
|
|
__webpack_require__.e(/*! import() */ 9118).then(__webpack_require__.bind(__webpack_require__, /*! ./focus-visible-bd02518b.js */ 69118)).then(module => _this.focusVisible = module.startFocusVisible());
|
|
}));
|
|
}
|
|
}
|
|
/**
|
|
* @internal
|
|
* Used to set focus on an element that uses `ion-focusable`.
|
|
* Do not use this if focusing the element as a result of a keyboard
|
|
* event as the focus utility should handle this for us. This method
|
|
* should be used when we want to programmatically focus an element as
|
|
* a result of another user action. (Ex: We focus the first element
|
|
* inside of a popover when the user presents it, but the popover is not always
|
|
* presented as a result of keyboard action.)
|
|
*/
|
|
|
|
|
|
setFocus(elements) {
|
|
var _this2 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
if (_this2.focusVisible) {
|
|
_this2.focusVisible.setFocus(elements);
|
|
}
|
|
})();
|
|
}
|
|
|
|
render() {
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
class: {
|
|
[mode]: true,
|
|
'ion-page': true,
|
|
'force-statusbar-padding': _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.getBoolean('_forceStatusbarPadding')
|
|
}
|
|
});
|
|
}
|
|
|
|
get el() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
}
|
|
|
|
};
|
|
|
|
const needInputShims = () => {
|
|
/**
|
|
* iOS always needs input shims
|
|
*/
|
|
const needsShimsIOS = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.a)(window, 'ios') && (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.a)(window, 'mobile');
|
|
|
|
if (needsShimsIOS) {
|
|
return true;
|
|
}
|
|
/**
|
|
* Android only needs input shims when running
|
|
* in the browser and only if the browser is using the
|
|
* new Chrome 108+ resize behavior: https://developer.chrome.com/blog/viewport-resize-behavior/
|
|
*/
|
|
|
|
|
|
const isAndroidMobileWeb = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.a)(window, 'android') && (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.a)(window, 'mobileweb');
|
|
|
|
if (isAndroidMobileWeb) {
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
};
|
|
|
|
const rIC = callback => {
|
|
if ('requestIdleCallback' in window) {
|
|
window.requestIdleCallback(callback);
|
|
} else {
|
|
setTimeout(callback, 32);
|
|
}
|
|
};
|
|
|
|
App.style = appCss;
|
|
const buttonsIosCss = ".sc-ion-buttons-ios-h{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:99}.sc-ion-buttons-ios-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-ios-s ion-button{--padding-start:5px;--padding-end:5px;margin-left:2px;margin-right:2px;height:32px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-buttons-ios-s ion-button{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}.sc-ion-buttons-ios-s ion-button:not(.button-round){--border-radius:4px}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button{--color:initial;--border-color:initial;--background-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-solid,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-solid{--background:var(--ion-color-contrast);--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12;--background-hover:var(--ion-color-base);--background-hover-opacity:0.45;--color:var(--ion-color-base);--color-focused:var(--ion-color-base)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-clear,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-clear{--color-activated:var(--ion-color-contrast);--color-focused:var(--ion-color-contrast)}.sc-ion-buttons-ios-h.ion-color.sc-ion-buttons-ios-s .button-outline,.ion-color .sc-ion-buttons-ios-h.sc-ion-buttons-ios-s .button-outline{--color-activated:var(--ion-color-base);--color-focused:var(--ion-color-contrast);--background-activated:var(--ion-color-contrast)}.sc-ion-buttons-ios-s .button-clear,.sc-ion-buttons-ios-s .button-outline{--background-activated:transparent;--background-focused:currentColor;--background-hover:transparent}.sc-ion-buttons-ios-s .button-solid:not(.ion-color){--background-focused:#000;--background-focused-opacity:.12;--background-activated:#000;--background-activated-opacity:.12}.sc-ion-buttons-ios-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-right:0.3em;font-size:24px;line-height:0.67}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-buttons-ios-s ion-icon[slot=start]{margin-right:unset;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}.sc-ion-buttons-ios-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-left:0.4em;font-size:24px;line-height:0.67}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-buttons-ios-s ion-icon[slot=end]{margin-left:unset;-webkit-margin-start:0.4em;margin-inline-start:0.4em}}.sc-ion-buttons-ios-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:28px;line-height:0.67}";
|
|
const buttonsMdCss = ".sc-ion-buttons-md-h{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:99}.sc-ion-buttons-md-s ion-button{--padding-top:0;--padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}.sc-ion-buttons-md-s ion-button{--padding-top:0;--padding-bottom:0;--padding-start:8px;--padding-end:8px;--box-shadow:none;margin-left:2px;margin-right:2px;height:32px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-buttons-md-s ion-button{margin-left:unset;margin-right:unset;-webkit-margin-start:2px;margin-inline-start:2px;-webkit-margin-end:2px;margin-inline-end:2px}}.sc-ion-buttons-md-s ion-button:not(.button-round){--border-radius:2px}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button{--color:initial;--color-focused:var(--ion-color-contrast);--color-hover:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-contrast);--background-hover:var(--ion-color-contrast)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-solid,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-solid{--background:var(--ion-color-contrast);--background-activated:transparent;--background-focused:var(--ion-color-shade);--background-hover:var(--ion-color-base);--color:var(--ion-color-base);--color-focused:var(--ion-color-base);--color-hover:var(--ion-color-base)}.sc-ion-buttons-md-h.ion-color.sc-ion-buttons-md-s .button-outline,.ion-color .sc-ion-buttons-md-h.sc-ion-buttons-md-s .button-outline{--border-color:var(--ion-color-contrast)}.sc-ion-buttons-md-s .button-has-icon-only.button-clear{--padding-top:12px;--padding-end:12px;--padding-bottom:12px;--padding-start:12px;--border-radius:50%;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:48px;height:48px}.sc-ion-buttons-md-s .button{--background-hover:currentColor}.sc-ion-buttons-md-s .button-solid{--color:var(--ion-toolbar-background, var(--ion-background-color, #fff));--background:var(--ion-toolbar-color, var(--ion-text-color, #424242));--background-activated:transparent;--background-focused:currentColor}.sc-ion-buttons-md-s .button-outline{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor;--border-color:currentColor}.sc-ion-buttons-md-s .button-clear{--color:initial;--background:transparent;--background-activated:transparent;--background-focused:currentColor;--background-hover:currentColor}.sc-ion-buttons-md-s ion-icon[slot=start]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-right:0.3em;font-size:1.4em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-buttons-md-s ion-icon[slot=start]{margin-right:unset;-webkit-margin-end:0.3em;margin-inline-end:0.3em}}.sc-ion-buttons-md-s ion-icon[slot=end]{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;margin-left:0.4em;font-size:1.4em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.sc-ion-buttons-md-s ion-icon[slot=end]{margin-left:unset;-webkit-margin-start:0.4em;margin-inline-start:0.4em}}.sc-ion-buttons-md-s ion-icon[slot=icon-only]{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;font-size:1.8em}";
|
|
const Buttons = class {
|
|
constructor(hostRef) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
/**
|
|
* If true, buttons will disappear when its
|
|
* parent toolbar has fully collapsed if the toolbar
|
|
* is not the first toolbar. If the toolbar is the
|
|
* first toolbar, the buttons will be hidden and will
|
|
* only be shown once all toolbars have fully collapsed.
|
|
*
|
|
* Only applies in `ios` mode with `collapse` set to
|
|
* `true` on `ion-header`.
|
|
*
|
|
* Typically used for [Collapsible Large Titles](https://ionicframework.com/docs/api/title#collapsible-large-titles)
|
|
*/
|
|
|
|
this.collapse = false;
|
|
}
|
|
|
|
render() {
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
class: {
|
|
[mode]: true,
|
|
['buttons-collapse']: this.collapse
|
|
}
|
|
});
|
|
}
|
|
|
|
};
|
|
Buttons.style = {
|
|
ios: buttonsIosCss,
|
|
md: buttonsMdCss
|
|
};
|
|
const contentCss = ":host{--background:var(--ion-background-color, #fff);--color:var(--ion-text-color, #000);--padding-top:0px;--padding-bottom:0px;--padding-start:0px;--padding-end:0px;--keyboard-offset:0px;--offset-top:0px;--offset-bottom:0px;--overflow:auto;display:block;position:relative;-ms-flex:1;flex:1;width:100%;height:100%;margin:0 !important;padding:0 !important;font-family:var(--ion-font-family, inherit);contain:size style}:host(.ion-color) .inner-scroll{background:var(--ion-color-base);color:var(--ion-color-contrast)}:host(.outer-content){--background:var(--ion-color-step-50, #f2f2f2)}#background-content{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);position:absolute;background:var(--background)}.inner-scroll{left:0px;right:0px;top:calc(var(--offset-top) * -1);bottom:calc(var(--offset-bottom) * -1);padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:calc(var(--padding-top) + var(--offset-top));padding-bottom:calc(var(--padding-bottom) + var(--keyboard-offset) + var(--offset-bottom));position:absolute;color:var(--color);-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-ms-touch-action:pan-x pan-y pinch-zoom;touch-action:pan-x pan-y pinch-zoom}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.inner-scroll{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.scroll-y,.scroll-x{-webkit-overflow-scrolling:touch;z-index:0;will-change:scroll-position}.scroll-y{overflow-y:var(--overflow);overscroll-behavior-y:contain}.scroll-x{overflow-x:var(--overflow);overscroll-behavior-x:contain}.overscroll::before,.overscroll::after{position:absolute;width:1px;height:1px;content:\"\"}.overscroll::before{bottom:-1px}.overscroll::after{top:-1px}:host(.content-sizing){display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;min-height:0;contain:none}:host(.content-sizing) .inner-scroll{position:relative;top:0;bottom:0;margin-top:calc(var(--offset-top) * -1);margin-bottom:calc(var(--offset-bottom) * -1)}.transition-effect{display:none;position:absolute;width:100%;height:100vh;opacity:0;pointer-events:none}:host(.content-ltr) .transition-effect{left:-100%;}:host(.content-rtl) .transition-effect{right:-100%;}.transition-cover{position:absolute;right:0;width:100%;height:100%;background:black;opacity:0.1}.transition-shadow{display:block;position:absolute;width:10px;height:100%;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAgCAYAAAAIXrg4AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyhpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQ1IDc5LjE2MzQ5OSwgMjAxOC8wOC8xMy0xNjo0MDoyMiAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTkgKE1hY2ludG9zaCkiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6MTE3MDgzRkQ5QTkyMTFFOUEwNzQ5MkJFREE1NUY2MjQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6MTE3MDgzRkU5QTkyMTFFOUEwNzQ5MkJFREE1NUY2MjQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxMTcwODNGQjlBOTIxMUU5QTA3NDkyQkVEQTU1RjYyNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDoxMTcwODNGQzlBOTIxMUU5QTA3NDkyQkVEQTU1RjYyNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PmePEuQAAABNSURBVHjaYvz//z8DIxAwMDAwATGMhmFmPDQuOSZks0AMmoJBaQHjkPfB0Lfg/2gQjVow+HPy/yHvg9GiYjQfjMbBqAWjFgy/4hogwADYqwdzxy5BuwAAAABJRU5ErkJggg==);background-repeat:repeat-y;background-size:10px 16px}:host(.content-ltr) .transition-shadow{right:0;}:host(.content-rtl) .transition-shadow{left:0;-webkit-transform:scaleX(-1);transform:scaleX(-1)}::slotted([slot=fixed]){position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0)}";
|
|
const Content = class {
|
|
constructor(hostRef) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
this.ionScrollStart = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionScrollStart", 7);
|
|
this.ionScroll = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionScroll", 7);
|
|
this.ionScrollEnd = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionScrollEnd", 7);
|
|
this.watchDog = null;
|
|
this.isScrolling = false;
|
|
this.lastScroll = 0;
|
|
this.queued = false;
|
|
this.cTop = -1;
|
|
this.cBottom = -1;
|
|
this.isMainContent = true;
|
|
this.resizeTimeout = null; // Detail is used in a hot loop in the scroll event, by allocating it here
|
|
// V8 will be able to inline any read/write to it since it's a monomorphic class.
|
|
// https://mrale.ph/blog/2015/01/11/whats-up-with-monomorphism.html
|
|
|
|
this.detail = {
|
|
scrollTop: 0,
|
|
scrollLeft: 0,
|
|
type: 'scroll',
|
|
event: undefined,
|
|
startX: 0,
|
|
startY: 0,
|
|
startTime: 0,
|
|
currentX: 0,
|
|
currentY: 0,
|
|
velocityX: 0,
|
|
velocityY: 0,
|
|
deltaX: 0,
|
|
deltaY: 0,
|
|
currentTime: 0,
|
|
data: undefined,
|
|
isScrolling: true
|
|
};
|
|
/**
|
|
* If `true`, the content will scroll behind the headers
|
|
* and footers. This effect can easily be seen by setting the toolbar
|
|
* to transparent.
|
|
*/
|
|
|
|
this.fullscreen = false;
|
|
/**
|
|
* If you want to enable the content scrolling in the X axis, set this property to `true`.
|
|
*/
|
|
|
|
this.scrollX = false;
|
|
/**
|
|
* If you want to disable the content scrolling in the Y axis, set this property to `false`.
|
|
*/
|
|
|
|
this.scrollY = true;
|
|
/**
|
|
* Because of performance reasons, ionScroll events are disabled by default, in order to enable them
|
|
* and start listening from (ionScroll), set this property to `true`.
|
|
*/
|
|
|
|
this.scrollEvents = false;
|
|
}
|
|
|
|
connectedCallback() {
|
|
this.isMainContent = this.el.closest('ion-menu, ion-popover, ion-modal') === null;
|
|
}
|
|
|
|
disconnectedCallback() {
|
|
this.onScrollEnd();
|
|
}
|
|
|
|
onAppLoad() {
|
|
this.resize();
|
|
}
|
|
/**
|
|
* Rotating certain devices can update
|
|
* the safe area insets. As a result,
|
|
* the fullscreen feature on ion-content
|
|
* needs to be recalculated.
|
|
*
|
|
* We listen for "resize" because we
|
|
* do not care what the orientation of
|
|
* the device is. Other APIs
|
|
* such as ScreenOrientation or
|
|
* the deviceorientation event must have
|
|
* permission from the user first whereas
|
|
* the "resize" event does not.
|
|
*
|
|
* We also throttle the callback to minimize
|
|
* thrashing when quickly resizing a window.
|
|
*/
|
|
|
|
|
|
onResize() {
|
|
if (this.resizeTimeout) {
|
|
clearTimeout(this.resizeTimeout);
|
|
this.resizeTimeout = null;
|
|
}
|
|
|
|
this.resizeTimeout = setTimeout(() => {
|
|
/**
|
|
* Resize should only happen
|
|
* if the content is visible.
|
|
* When the content is hidden
|
|
* then offsetParent will be null.
|
|
*/
|
|
if (this.el.offsetParent === null) {
|
|
return;
|
|
}
|
|
|
|
this.resize();
|
|
}, 100);
|
|
}
|
|
|
|
shouldForceOverscroll() {
|
|
const {
|
|
forceOverscroll
|
|
} = this;
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
return forceOverscroll === undefined ? mode === 'ios' && (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.a)('ios') : forceOverscroll;
|
|
}
|
|
|
|
resize() {
|
|
if (this.fullscreen) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.f)(() => this.readDimensions());
|
|
} else if (this.cTop !== 0 || this.cBottom !== 0) {
|
|
this.cTop = this.cBottom = 0;
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.j)(this);
|
|
}
|
|
}
|
|
|
|
readDimensions() {
|
|
const page = getPageElement(this.el);
|
|
const top = Math.max(this.el.offsetTop, 0);
|
|
const bottom = Math.max(page.offsetHeight - top - this.el.offsetHeight, 0);
|
|
const dirty = top !== this.cTop || bottom !== this.cBottom;
|
|
|
|
if (dirty) {
|
|
this.cTop = top;
|
|
this.cBottom = bottom;
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.j)(this);
|
|
}
|
|
}
|
|
|
|
onScroll(ev) {
|
|
const timeStamp = Date.now();
|
|
const shouldStart = !this.isScrolling;
|
|
this.lastScroll = timeStamp;
|
|
|
|
if (shouldStart) {
|
|
this.onScrollStart();
|
|
}
|
|
|
|
if (!this.queued && this.scrollEvents) {
|
|
this.queued = true;
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.f)(ts => {
|
|
this.queued = false;
|
|
this.detail.event = ev;
|
|
updateScrollDetail(this.detail, this.scrollEl, ts, shouldStart);
|
|
this.ionScroll.emit(this.detail);
|
|
});
|
|
}
|
|
}
|
|
/**
|
|
* Get the element where the actual scrolling takes place.
|
|
* This element can be used to subscribe to `scroll` events or manually modify
|
|
* `scrollTop`. However, it's recommended to use the API provided by `ion-content`:
|
|
*
|
|
* i.e. Using `ionScroll`, `ionScrollStart`, `ionScrollEnd` for scrolling events
|
|
* and `scrollToPoint()` to scroll the content into a certain point.
|
|
*/
|
|
|
|
|
|
getScrollElement() {
|
|
var _this3 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
/**
|
|
* If this gets called in certain early lifecycle hooks (ex: Vue onMounted),
|
|
* scrollEl won't be defined yet with the custom elements build, so wait for it to load in.
|
|
*/
|
|
if (!_this3.scrollEl) {
|
|
yield new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.c)(_this3.el, resolve));
|
|
}
|
|
|
|
return Promise.resolve(_this3.scrollEl);
|
|
})();
|
|
}
|
|
/**
|
|
* Returns the background content element.
|
|
* @internal
|
|
*/
|
|
|
|
|
|
getBackgroundElement() {
|
|
var _this4 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
if (!_this4.backgroundContentEl) {
|
|
yield new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.c)(_this4.el, resolve));
|
|
}
|
|
|
|
return Promise.resolve(_this4.backgroundContentEl);
|
|
})();
|
|
}
|
|
/**
|
|
* Scroll to the top of the component.
|
|
*
|
|
* @param duration The amount of time to take scrolling to the top. Defaults to `0`.
|
|
*/
|
|
|
|
|
|
scrollToTop(duration = 0) {
|
|
return this.scrollToPoint(undefined, 0, duration);
|
|
}
|
|
/**
|
|
* Scroll to the bottom of the component.
|
|
*
|
|
* @param duration The amount of time to take scrolling to the bottom. Defaults to `0`.
|
|
*/
|
|
|
|
|
|
scrollToBottom() {
|
|
var _this5 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (duration = 0) {
|
|
const scrollEl = yield _this5.getScrollElement();
|
|
const y = scrollEl.scrollHeight - scrollEl.clientHeight;
|
|
return _this5.scrollToPoint(undefined, y, duration);
|
|
}).apply(this, arguments);
|
|
}
|
|
/**
|
|
* Scroll by a specified X/Y distance in the component.
|
|
*
|
|
* @param x The amount to scroll by on the horizontal axis.
|
|
* @param y The amount to scroll by on the vertical axis.
|
|
* @param duration The amount of time to take scrolling by that amount.
|
|
*/
|
|
|
|
|
|
scrollByPoint(x, y, duration) {
|
|
var _this6 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const scrollEl = yield _this6.getScrollElement();
|
|
return _this6.scrollToPoint(x + scrollEl.scrollLeft, y + scrollEl.scrollTop, duration);
|
|
})();
|
|
}
|
|
/**
|
|
* Scroll to a specified X/Y location in the component.
|
|
*
|
|
* @param x The point to scroll to on the horizontal axis.
|
|
* @param y The point to scroll to on the vertical axis.
|
|
* @param duration The amount of time to take scrolling to that point. Defaults to `0`.
|
|
*/
|
|
|
|
|
|
scrollToPoint(_x, _x2) {
|
|
var _this7 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (x, y, duration = 0) {
|
|
const el = yield _this7.getScrollElement();
|
|
|
|
if (duration < 32) {
|
|
if (y != null) {
|
|
el.scrollTop = y;
|
|
}
|
|
|
|
if (x != null) {
|
|
el.scrollLeft = x;
|
|
}
|
|
|
|
return;
|
|
}
|
|
|
|
let resolve;
|
|
let startTime = 0;
|
|
const promise = new Promise(r => resolve = r);
|
|
const fromY = el.scrollTop;
|
|
const fromX = el.scrollLeft;
|
|
const deltaY = y != null ? y - fromY : 0;
|
|
const deltaX = x != null ? x - fromX : 0; // scroll loop
|
|
|
|
const step = timeStamp => {
|
|
const linearTime = Math.min(1, (timeStamp - startTime) / duration) - 1;
|
|
const easedT = Math.pow(linearTime, 3) + 1;
|
|
|
|
if (deltaY !== 0) {
|
|
el.scrollTop = Math.floor(easedT * deltaY + fromY);
|
|
}
|
|
|
|
if (deltaX !== 0) {
|
|
el.scrollLeft = Math.floor(easedT * deltaX + fromX);
|
|
}
|
|
|
|
if (easedT < 1) {
|
|
// do not use DomController here
|
|
// must use nativeRaf in order to fire in the next frame
|
|
requestAnimationFrame(step);
|
|
} else {
|
|
resolve();
|
|
}
|
|
}; // chill out for a frame first
|
|
|
|
|
|
requestAnimationFrame(ts => {
|
|
startTime = ts;
|
|
step(ts);
|
|
});
|
|
return promise;
|
|
}).apply(this, arguments);
|
|
}
|
|
|
|
onScrollStart() {
|
|
this.isScrolling = true;
|
|
this.ionScrollStart.emit({
|
|
isScrolling: true
|
|
});
|
|
|
|
if (this.watchDog) {
|
|
clearInterval(this.watchDog);
|
|
} // watchdog
|
|
|
|
|
|
this.watchDog = setInterval(() => {
|
|
if (this.lastScroll < Date.now() - 120) {
|
|
this.onScrollEnd();
|
|
}
|
|
}, 100);
|
|
}
|
|
|
|
onScrollEnd() {
|
|
if (this.watchDog) clearInterval(this.watchDog);
|
|
this.watchDog = null;
|
|
|
|
if (this.isScrolling) {
|
|
this.isScrolling = false;
|
|
this.ionScrollEnd.emit({
|
|
isScrolling: false
|
|
});
|
|
}
|
|
}
|
|
|
|
render() {
|
|
const {
|
|
isMainContent,
|
|
scrollX,
|
|
scrollY,
|
|
el
|
|
} = this;
|
|
const rtl = (0,_dir_e8b767a8_js__WEBPACK_IMPORTED_MODULE_4__.i)(el) ? 'rtl' : 'ltr';
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
const forceOverscroll = this.shouldForceOverscroll();
|
|
const transitionShadow = mode === 'ios';
|
|
const TagType = isMainContent ? 'main' : 'div';
|
|
this.resize();
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
class: (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__.c)(this.color, {
|
|
[mode]: true,
|
|
'content-sizing': (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__.h)('ion-popover', this.el),
|
|
overscroll: forceOverscroll,
|
|
[`content-${rtl}`]: true
|
|
}),
|
|
style: {
|
|
'--offset-top': `${this.cTop}px`,
|
|
'--offset-bottom': `${this.cBottom}px`
|
|
}
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
ref: el => this.backgroundContentEl = el,
|
|
id: "background-content",
|
|
part: "background"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(TagType, {
|
|
class: {
|
|
'inner-scroll': true,
|
|
'scroll-x': scrollX,
|
|
'scroll-y': scrollY,
|
|
overscroll: (scrollX || scrollY) && forceOverscroll
|
|
},
|
|
ref: scrollEl => this.scrollEl = scrollEl,
|
|
onScroll: this.scrollEvents ? ev => this.onScroll(ev) : undefined,
|
|
part: "scroll"
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null)), transitionShadow ? (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "transition-effect"
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "transition-cover"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "transition-shadow"
|
|
})) : null, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", {
|
|
name: "fixed"
|
|
}));
|
|
}
|
|
|
|
get el() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
}
|
|
|
|
};
|
|
|
|
const getParentElement = el => {
|
|
var _a;
|
|
|
|
if (el.parentElement) {
|
|
// normal element with a parent element
|
|
return el.parentElement;
|
|
}
|
|
|
|
if ((_a = el.parentNode) === null || _a === void 0 ? void 0 : _a.host) {
|
|
// shadow dom's document fragment
|
|
return el.parentNode.host;
|
|
}
|
|
|
|
return null;
|
|
};
|
|
|
|
const getPageElement = el => {
|
|
const tabs = el.closest('ion-tabs');
|
|
|
|
if (tabs) {
|
|
return tabs;
|
|
}
|
|
/**
|
|
* If we're in a popover, we need to use its wrapper so we can account for space
|
|
* between the popover and the edges of the screen. But if the popover contains
|
|
* its own page element, we should use that instead.
|
|
*/
|
|
|
|
|
|
const page = el.closest('ion-app, ion-page, .ion-page, page-inner, .popover-content');
|
|
|
|
if (page) {
|
|
return page;
|
|
}
|
|
|
|
return getParentElement(el);
|
|
}; // ******** DOM READ ****************
|
|
|
|
|
|
const updateScrollDetail = (detail, el, timestamp, shouldStart) => {
|
|
const prevX = detail.currentX;
|
|
const prevY = detail.currentY;
|
|
const prevT = detail.currentTime;
|
|
const currentX = el.scrollLeft;
|
|
const currentY = el.scrollTop;
|
|
const timeDelta = timestamp - prevT;
|
|
|
|
if (shouldStart) {
|
|
// remember the start positions
|
|
detail.startTime = timestamp;
|
|
detail.startX = currentX;
|
|
detail.startY = currentY;
|
|
detail.velocityX = detail.velocityY = 0;
|
|
}
|
|
|
|
detail.currentTime = timestamp;
|
|
detail.currentX = detail.scrollLeft = currentX;
|
|
detail.currentY = detail.scrollTop = currentY;
|
|
detail.deltaX = currentX - detail.startX;
|
|
detail.deltaY = currentY - detail.startY;
|
|
|
|
if (timeDelta > 0 && timeDelta < 100) {
|
|
const velocityX = (currentX - prevX) / timeDelta;
|
|
const velocityY = (currentY - prevY) / timeDelta;
|
|
detail.velocityX = velocityX * 0.7 + detail.velocityX * 0.3;
|
|
detail.velocityY = velocityY * 0.7 + detail.velocityY * 0.3;
|
|
}
|
|
};
|
|
|
|
Content.style = contentCss;
|
|
|
|
const handleFooterFade = (scrollEl, baseEl) => {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.f)(() => {
|
|
const scrollTop = scrollEl.scrollTop;
|
|
const maxScroll = scrollEl.scrollHeight - scrollEl.clientHeight;
|
|
/**
|
|
* Toolbar background will fade
|
|
* out over fadeDuration in pixels.
|
|
*/
|
|
|
|
const fadeDuration = 10;
|
|
/**
|
|
* Begin fading out maxScroll - 30px
|
|
* from the bottom of the content.
|
|
* Also determine how close we are
|
|
* to starting the fade. If we are
|
|
* before the starting point, the
|
|
* scale value will get clamped to 0.
|
|
* If we are after the maxScroll (rubber
|
|
* band scrolling), the scale value will
|
|
* get clamped to 1.
|
|
*/
|
|
|
|
const fadeStart = maxScroll - fadeDuration;
|
|
const distanceToStart = scrollTop - fadeStart;
|
|
const scale = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.l)(0, 1 - distanceToStart / fadeDuration, 1);
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(() => {
|
|
baseEl.style.setProperty('--opacity-scale', scale.toString());
|
|
});
|
|
});
|
|
};
|
|
|
|
const footerIosCss = "ion-footer{display:block;position:relative;-ms-flex-order:1;order:1;width:100%;z-index:10}ion-footer.footer-toolbar-padding ion-toolbar:last-of-type{padding-bottom:var(--ion-safe-area-bottom, 0)}.footer-ios ion-toolbar:first-of-type{--border-width:0.55px 0 0}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.footer-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.footer-translucent-ios ion-toolbar{--opacity:.8}}.footer-ios.ion-no-border ion-toolbar:first-of-type{--border-width:0}.footer-collapse-fade ion-toolbar{--opacity-scale:inherit}";
|
|
const footerMdCss = "ion-footer{display:block;position:relative;-ms-flex-order:1;order:1;width:100%;z-index:10}ion-footer.footer-toolbar-padding ion-toolbar:last-of-type{padding-bottom:var(--ion-safe-area-bottom, 0)}.footer-md::before{left:0;top:-2px;bottom:auto;background-position:left 0 top 0;position:absolute;width:100%;height:2px;background-image:url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAHBAMAAADzDtBxAAAAD1BMVEUAAAAAAAAAAAAAAAAAAABPDueNAAAABXRSTlMUCS0gBIh/TXEAAAAaSURBVAjXYxCEAgY4UIICBmMogMsgFLtAAQCNSwXZKOdPxgAAAABJRU5ErkJggg==\");background-repeat:repeat-x;content:\"\"}[dir=rtl] .footer-md::before,:host-context([dir=rtl]) .footer-md::before{left:unset;right:unset;right:0}[dir=rtl] .footer-md::before,:host-context([dir=rtl]) .footer-md::before{background-position:right 0 top 0}.footer-md.ion-no-border::before{display:none}";
|
|
const Footer = class {
|
|
constructor(hostRef) {
|
|
var _this8 = this;
|
|
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
this.keyboardCtrl = null;
|
|
this.keyboardVisible = false;
|
|
/**
|
|
* If `true`, the footer will be translucent.
|
|
* Only applies when the mode is `"ios"` and the device supports
|
|
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
|
|
*
|
|
* Note: In order to scroll content behind the footer, the `fullscreen`
|
|
* attribute needs to be set on the content.
|
|
*/
|
|
|
|
this.translucent = false;
|
|
|
|
this.checkCollapsibleFooter = () => {
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
|
|
if (mode !== 'ios') {
|
|
return;
|
|
}
|
|
|
|
const {
|
|
collapse
|
|
} = this;
|
|
const hasFade = collapse === 'fade';
|
|
this.destroyCollapsibleFooter();
|
|
|
|
if (hasFade) {
|
|
const pageEl = this.el.closest('ion-app,ion-page,.ion-page,page-inner');
|
|
const contentEl = pageEl ? (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.a)(pageEl) : null;
|
|
|
|
if (!contentEl) {
|
|
(0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.p)(this.el);
|
|
return;
|
|
}
|
|
|
|
this.setupFadeFooter(contentEl);
|
|
}
|
|
};
|
|
|
|
this.setupFadeFooter = /*#__PURE__*/function () {
|
|
var _ref2 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (contentEl) {
|
|
const scrollEl = _this8.scrollEl = yield (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.g)(contentEl);
|
|
/**
|
|
* Handle fading of toolbars on scroll
|
|
*/
|
|
|
|
_this8.contentScrollCallback = () => {
|
|
handleFooterFade(scrollEl, _this8.el);
|
|
};
|
|
|
|
scrollEl.addEventListener('scroll', _this8.contentScrollCallback);
|
|
handleFooterFade(scrollEl, _this8.el);
|
|
});
|
|
|
|
return function (_x3) {
|
|
return _ref2.apply(this, arguments);
|
|
};
|
|
}();
|
|
}
|
|
|
|
componentDidLoad() {
|
|
this.checkCollapsibleFooter();
|
|
}
|
|
|
|
componentDidUpdate() {
|
|
this.checkCollapsibleFooter();
|
|
}
|
|
|
|
connectedCallback() {
|
|
this.keyboardCtrl = (0,_keyboard_controller_73af62b2_js__WEBPACK_IMPORTED_MODULE_7__.c)(keyboardOpen => {
|
|
this.keyboardVisible = keyboardOpen; // trigger re-render by updating state
|
|
});
|
|
}
|
|
|
|
disconnectedCallback() {
|
|
if (this.keyboardCtrl) {
|
|
this.keyboardCtrl.destroy();
|
|
}
|
|
}
|
|
|
|
destroyCollapsibleFooter() {
|
|
if (this.scrollEl && this.contentScrollCallback) {
|
|
this.scrollEl.removeEventListener('scroll', this.contentScrollCallback);
|
|
this.contentScrollCallback = undefined;
|
|
}
|
|
}
|
|
|
|
render() {
|
|
const {
|
|
translucent,
|
|
collapse
|
|
} = this;
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
const tabs = this.el.closest('ion-tabs');
|
|
const tabBar = tabs === null || tabs === void 0 ? void 0 : tabs.querySelector(':scope > ion-tab-bar');
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
role: "contentinfo",
|
|
class: {
|
|
[mode]: true,
|
|
// Used internally for styling
|
|
[`footer-${mode}`]: true,
|
|
[`footer-translucent`]: translucent,
|
|
[`footer-translucent-${mode}`]: translucent,
|
|
['footer-toolbar-padding']: !this.keyboardVisible && (!tabBar || tabBar.slot !== 'bottom'),
|
|
[`footer-collapse-${collapse}`]: collapse !== undefined
|
|
}
|
|
}, mode === 'ios' && translucent && (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "footer-background"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null));
|
|
}
|
|
|
|
get el() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
}
|
|
|
|
};
|
|
Footer.style = {
|
|
ios: footerIosCss,
|
|
md: footerMdCss
|
|
};
|
|
const TRANSITION = 'all 0.2s ease-in-out';
|
|
|
|
const cloneElement = tagName => {
|
|
const getCachedEl = document.querySelector(`${tagName}.ion-cloned-element`);
|
|
|
|
if (getCachedEl !== null) {
|
|
return getCachedEl;
|
|
}
|
|
|
|
const clonedEl = document.createElement(tagName);
|
|
clonedEl.classList.add('ion-cloned-element');
|
|
clonedEl.style.setProperty('display', 'none');
|
|
document.body.appendChild(clonedEl);
|
|
return clonedEl;
|
|
};
|
|
|
|
const createHeaderIndex = headerEl => {
|
|
if (!headerEl) {
|
|
return;
|
|
}
|
|
|
|
const toolbars = headerEl.querySelectorAll('ion-toolbar');
|
|
return {
|
|
el: headerEl,
|
|
toolbars: Array.from(toolbars).map(toolbar => {
|
|
const ionTitleEl = toolbar.querySelector('ion-title');
|
|
return {
|
|
el: toolbar,
|
|
background: toolbar.shadowRoot.querySelector('.toolbar-background'),
|
|
ionTitleEl,
|
|
innerTitleEl: ionTitleEl ? ionTitleEl.shadowRoot.querySelector('.toolbar-title') : null,
|
|
ionButtonsEl: Array.from(toolbar.querySelectorAll('ion-buttons'))
|
|
};
|
|
})
|
|
};
|
|
};
|
|
|
|
const handleContentScroll = (scrollEl, scrollHeaderIndex, contentEl) => {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.f)(() => {
|
|
const scrollTop = scrollEl.scrollTop;
|
|
const scale = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.l)(1, 1 + -scrollTop / 500, 1.1); // Native refresher should not cause titles to scale
|
|
|
|
const nativeRefresher = contentEl.querySelector('ion-refresher.refresher-native');
|
|
|
|
if (nativeRefresher === null) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(() => {
|
|
scaleLargeTitles(scrollHeaderIndex.toolbars, scale);
|
|
});
|
|
}
|
|
});
|
|
};
|
|
|
|
const setToolbarBackgroundOpacity = (headerEl, opacity) => {
|
|
/**
|
|
* Fading in the backdrop opacity
|
|
* should happen after the large title
|
|
* has collapsed, so it is handled
|
|
* by handleHeaderFade()
|
|
*/
|
|
if (headerEl.collapse === 'fade') {
|
|
return;
|
|
}
|
|
|
|
if (opacity === undefined) {
|
|
headerEl.style.removeProperty('--opacity-scale');
|
|
} else {
|
|
headerEl.style.setProperty('--opacity-scale', opacity.toString());
|
|
}
|
|
};
|
|
|
|
const handleToolbarBorderIntersection = (ev, mainHeaderIndex, scrollTop) => {
|
|
if (!ev[0].isIntersecting) {
|
|
return;
|
|
}
|
|
/**
|
|
* There is a bug in Safari where overflow scrolling on a non-body element
|
|
* does not always reset the scrollTop position to 0 when letting go. It will
|
|
* set to 1 once the rubber band effect has ended. This causes the background to
|
|
* appear slightly on certain app setups.
|
|
*
|
|
* Additionally, we check if user is rubber banding (scrolling is negative)
|
|
* as this can mean they are using pull to refresh. Once the refresher starts,
|
|
* the content is transformed which can cause the intersection observer to erroneously
|
|
* fire here as well.
|
|
*/
|
|
|
|
|
|
const scale = ev[0].intersectionRatio > 0.9 || scrollTop <= 0 ? 0 : (1 - ev[0].intersectionRatio) * 100 / 75;
|
|
setToolbarBackgroundOpacity(mainHeaderIndex.el, scale === 1 ? undefined : scale);
|
|
};
|
|
/**
|
|
* If toolbars are intersecting, hide the scrollable toolbar content
|
|
* and show the primary toolbar content. If the toolbars are not intersecting,
|
|
* hide the primary toolbar content and show the scrollable toolbar content
|
|
*/
|
|
|
|
|
|
const handleToolbarIntersection = (ev, // TODO(FW-2832): type (IntersectionObserverEntry[] triggers errors which should be sorted)
|
|
mainHeaderIndex, scrollHeaderIndex, scrollEl) => {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(() => {
|
|
const scrollTop = scrollEl.scrollTop;
|
|
handleToolbarBorderIntersection(ev, mainHeaderIndex, scrollTop);
|
|
const event = ev[0];
|
|
const intersection = event.intersectionRect;
|
|
const intersectionArea = intersection.width * intersection.height;
|
|
const rootArea = event.rootBounds.width * event.rootBounds.height;
|
|
const isPageHidden = intersectionArea === 0 && rootArea === 0;
|
|
const leftDiff = Math.abs(intersection.left - event.boundingClientRect.left);
|
|
const rightDiff = Math.abs(intersection.right - event.boundingClientRect.right);
|
|
const isPageTransitioning = intersectionArea > 0 && (leftDiff >= 5 || rightDiff >= 5);
|
|
|
|
if (isPageHidden || isPageTransitioning) {
|
|
return;
|
|
}
|
|
|
|
if (event.isIntersecting) {
|
|
setHeaderActive(mainHeaderIndex, false);
|
|
setHeaderActive(scrollHeaderIndex);
|
|
} else {
|
|
/**
|
|
* There is a bug with IntersectionObserver on Safari
|
|
* where `event.isIntersecting === false` when cancelling
|
|
* a swipe to go back gesture. Checking the intersection
|
|
* x, y, width, and height provides a workaround. This bug
|
|
* does not happen when using Safari + Web Animations,
|
|
* only Safari + CSS Animations.
|
|
*/
|
|
const hasValidIntersection = intersection.x === 0 && intersection.y === 0 || intersection.width !== 0 && intersection.height !== 0;
|
|
|
|
if (hasValidIntersection && scrollTop > 0) {
|
|
setHeaderActive(mainHeaderIndex);
|
|
setHeaderActive(scrollHeaderIndex, false);
|
|
setToolbarBackgroundOpacity(mainHeaderIndex.el);
|
|
}
|
|
}
|
|
});
|
|
};
|
|
|
|
const setHeaderActive = (headerIndex, active = true) => {
|
|
const headerEl = headerIndex.el;
|
|
|
|
if (active) {
|
|
headerEl.classList.remove('header-collapse-condense-inactive');
|
|
headerEl.removeAttribute('aria-hidden');
|
|
} else {
|
|
headerEl.classList.add('header-collapse-condense-inactive');
|
|
headerEl.setAttribute('aria-hidden', 'true');
|
|
}
|
|
};
|
|
|
|
const scaleLargeTitles = (toolbars = [], scale = 1, transition = false) => {
|
|
toolbars.forEach(toolbar => {
|
|
const ionTitle = toolbar.ionTitleEl;
|
|
const titleDiv = toolbar.innerTitleEl;
|
|
|
|
if (!ionTitle || ionTitle.size !== 'large') {
|
|
return;
|
|
}
|
|
|
|
titleDiv.style.transition = transition ? TRANSITION : '';
|
|
titleDiv.style.transform = `scale3d(${scale}, ${scale}, 1)`;
|
|
});
|
|
};
|
|
|
|
const handleHeaderFade = (scrollEl, baseEl, condenseHeader) => {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.f)(() => {
|
|
const scrollTop = scrollEl.scrollTop;
|
|
const baseElHeight = baseEl.clientHeight;
|
|
const fadeStart = condenseHeader ? condenseHeader.clientHeight : 0;
|
|
/**
|
|
* If we are using fade header with a condense
|
|
* header, then the toolbar backgrounds should
|
|
* not begin to fade in until the condense
|
|
* header has fully collapsed.
|
|
*
|
|
* Additionally, the main content should not
|
|
* overflow out of the container until the
|
|
* condense header has fully collapsed. When
|
|
* using just the condense header the content
|
|
* should overflow out of the container.
|
|
*/
|
|
|
|
if (condenseHeader !== null && scrollTop < fadeStart) {
|
|
baseEl.style.setProperty('--opacity-scale', '0');
|
|
scrollEl.style.setProperty('clip-path', `inset(${baseElHeight}px 0px 0px 0px)`);
|
|
return;
|
|
}
|
|
|
|
const distanceToStart = scrollTop - fadeStart;
|
|
const fadeDuration = 10;
|
|
const scale = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.l)(0, distanceToStart / fadeDuration, 1);
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(() => {
|
|
scrollEl.style.removeProperty('clip-path');
|
|
baseEl.style.setProperty('--opacity-scale', scale.toString());
|
|
});
|
|
});
|
|
};
|
|
|
|
const headerIosCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-ios ion-toolbar:last-of-type{--border-width:0 0 0.55px}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.header-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}.header-translucent-ios ion-toolbar{--opacity:.8}.header-collapse-condense-inactive .header-background{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px)}}.header-ios.ion-no-border ion-toolbar:last-of-type{--border-width:0}.header-collapse-fade ion-toolbar{--opacity-scale:inherit}.header-collapse-condense{z-index:9}.header-collapse-condense ion-toolbar{position:-webkit-sticky;position:sticky;top:0}.header-collapse-condense ion-toolbar:first-of-type{padding-top:7px;z-index:1}.header-collapse-condense ion-toolbar{--background:var(--ion-background-color, #fff);z-index:0}.header-collapse-condense ion-toolbar:last-of-type{--border-width:0px}.header-collapse-condense ion-toolbar ion-searchbar{height:48px;padding-top:0px;padding-bottom:13px}.header-collapse-main{--opacity-scale:1}.header-collapse-main ion-toolbar{--opacity-scale:inherit}.header-collapse-main ion-toolbar.in-toolbar ion-title,.header-collapse-main ion-toolbar.in-toolbar ion-buttons{-webkit-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out}.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive:not(.header-collapse-condense) ion-toolbar.in-toolbar ion-buttons.buttons-collapse{opacity:0;pointer-events:none}.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-title,.header-collapse-condense-inactive.header-collapse-condense ion-toolbar.in-toolbar ion-buttons.buttons-collapse{visibility:hidden}";
|
|
const headerMdCss = "ion-header{display:block;position:relative;-ms-flex-order:-1;order:-1;width:100%;z-index:10}ion-header ion-toolbar:first-of-type{padding-top:var(--ion-safe-area-top, 0)}.header-md::after{left:0;bottom:-5px;background-position:left 0 top -2px;position:absolute;width:100%;height:5px;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAHBAMAAADzDtBxAAAAD1BMVEUAAAAAAAAAAAAAAAAAAABPDueNAAAABXRSTlMUCS0gBIh/TXEAAAAaSURBVAjXYxCEAgY4UIICBmMogMsgFLtAAQCNSwXZKOdPxgAAAABJRU5ErkJggg==);background-repeat:repeat-x;content:\"\"}[dir=rtl] .header-md::after,:host-context([dir=rtl]) .header-md::after{left:unset;right:unset;right:0}[dir=rtl] .header-md::after,:host-context([dir=rtl]) .header-md::after{background-position:right 0 top -2px}.header-collapse-condense{display:none}.header-md.ion-no-border::after{display:none}";
|
|
const Header = class {
|
|
constructor(hostRef) {
|
|
var _this9 = this;
|
|
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
this.inheritedAttributes = {};
|
|
/**
|
|
* If `true`, the header will be translucent.
|
|
* Only applies when the mode is `"ios"` and the device supports
|
|
* [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).
|
|
*
|
|
* Note: In order to scroll content behind the header, the `fullscreen`
|
|
* attribute needs to be set on the content.
|
|
*/
|
|
|
|
this.translucent = false;
|
|
|
|
this.setupFadeHeader = /*#__PURE__*/function () {
|
|
var _ref3 = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (contentEl, condenseHeader) {
|
|
const scrollEl = _this9.scrollEl = yield (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.g)(contentEl);
|
|
/**
|
|
* Handle fading of toolbars on scroll
|
|
*/
|
|
|
|
_this9.contentScrollCallback = () => {
|
|
handleHeaderFade(_this9.scrollEl, _this9.el, condenseHeader);
|
|
};
|
|
|
|
scrollEl.addEventListener('scroll', _this9.contentScrollCallback);
|
|
handleHeaderFade(_this9.scrollEl, _this9.el, condenseHeader);
|
|
});
|
|
|
|
return function (_x4, _x5) {
|
|
return _ref3.apply(this, arguments);
|
|
};
|
|
}();
|
|
}
|
|
|
|
componentWillLoad() {
|
|
this.inheritedAttributes = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.i)(this.el);
|
|
}
|
|
|
|
componentDidLoad() {
|
|
this.checkCollapsibleHeader();
|
|
}
|
|
|
|
componentDidUpdate() {
|
|
this.checkCollapsibleHeader();
|
|
}
|
|
|
|
disconnectedCallback() {
|
|
this.destroyCollapsibleHeader();
|
|
}
|
|
|
|
checkCollapsibleHeader() {
|
|
var _this0 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(_this0);
|
|
|
|
if (mode !== 'ios') {
|
|
return;
|
|
}
|
|
|
|
const {
|
|
collapse
|
|
} = _this0;
|
|
const hasCondense = collapse === 'condense';
|
|
const hasFade = collapse === 'fade';
|
|
|
|
_this0.destroyCollapsibleHeader();
|
|
|
|
if (hasCondense) {
|
|
const pageEl = _this0.el.closest('ion-app,ion-page,.ion-page,page-inner');
|
|
|
|
const contentEl = pageEl ? (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.a)(pageEl) : null; // Cloned elements are always needed in iOS transition
|
|
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(() => {
|
|
const title = cloneElement('ion-title');
|
|
title.size = 'large';
|
|
cloneElement('ion-back-button');
|
|
});
|
|
yield _this0.setupCondenseHeader(contentEl, pageEl);
|
|
} else if (hasFade) {
|
|
const pageEl = _this0.el.closest('ion-app,ion-page,.ion-page,page-inner');
|
|
|
|
const contentEl = pageEl ? (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.a)(pageEl) : null;
|
|
|
|
if (!contentEl) {
|
|
(0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.p)(_this0.el);
|
|
return;
|
|
}
|
|
|
|
const condenseHeader = contentEl.querySelector('ion-header[collapse="condense"]');
|
|
yield _this0.setupFadeHeader(contentEl, condenseHeader);
|
|
}
|
|
})();
|
|
}
|
|
|
|
destroyCollapsibleHeader() {
|
|
if (this.intersectionObserver) {
|
|
this.intersectionObserver.disconnect();
|
|
this.intersectionObserver = undefined;
|
|
}
|
|
|
|
if (this.scrollEl && this.contentScrollCallback) {
|
|
this.scrollEl.removeEventListener('scroll', this.contentScrollCallback);
|
|
this.contentScrollCallback = undefined;
|
|
}
|
|
|
|
if (this.collapsibleMainHeader) {
|
|
this.collapsibleMainHeader.classList.remove('header-collapse-main');
|
|
this.collapsibleMainHeader = undefined;
|
|
}
|
|
}
|
|
|
|
setupCondenseHeader(contentEl, pageEl) {
|
|
var _this1 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
if (!contentEl || !pageEl) {
|
|
(0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.p)(_this1.el);
|
|
return;
|
|
}
|
|
|
|
if (typeof IntersectionObserver === 'undefined') {
|
|
return;
|
|
}
|
|
|
|
_this1.scrollEl = yield (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_6__.g)(contentEl);
|
|
const headers = pageEl.querySelectorAll('ion-header');
|
|
_this1.collapsibleMainHeader = Array.from(headers).find(header => header.collapse !== 'condense');
|
|
|
|
if (!_this1.collapsibleMainHeader) {
|
|
return;
|
|
}
|
|
|
|
const mainHeaderIndex = createHeaderIndex(_this1.collapsibleMainHeader);
|
|
const scrollHeaderIndex = createHeaderIndex(_this1.el);
|
|
|
|
if (!mainHeaderIndex || !scrollHeaderIndex) {
|
|
return;
|
|
}
|
|
|
|
setHeaderActive(mainHeaderIndex, false);
|
|
setToolbarBackgroundOpacity(mainHeaderIndex.el, 0);
|
|
/**
|
|
* Handle interaction between toolbar collapse and
|
|
* showing/hiding content in the primary ion-header
|
|
* as well as progressively showing/hiding the main header
|
|
* border as the top-most toolbar collapses or expands.
|
|
*/
|
|
|
|
const toolbarIntersection = ev => {
|
|
handleToolbarIntersection(ev, mainHeaderIndex, scrollHeaderIndex, _this1.scrollEl);
|
|
};
|
|
|
|
_this1.intersectionObserver = new IntersectionObserver(toolbarIntersection, {
|
|
root: contentEl,
|
|
threshold: [0.25, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8, 0.9, 1]
|
|
});
|
|
|
|
_this1.intersectionObserver.observe(scrollHeaderIndex.toolbars[scrollHeaderIndex.toolbars.length - 1].el);
|
|
/**
|
|
* Handle scaling of large iOS titles and
|
|
* showing/hiding border on last toolbar
|
|
* in primary header
|
|
*/
|
|
|
|
|
|
_this1.contentScrollCallback = () => {
|
|
handleContentScroll(_this1.scrollEl, scrollHeaderIndex, contentEl);
|
|
};
|
|
|
|
_this1.scrollEl.addEventListener('scroll', _this1.contentScrollCallback);
|
|
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(() => {
|
|
if (_this1.collapsibleMainHeader !== undefined) {
|
|
_this1.collapsibleMainHeader.classList.add('header-collapse-main');
|
|
}
|
|
});
|
|
})();
|
|
}
|
|
|
|
render() {
|
|
const {
|
|
translucent,
|
|
inheritedAttributes
|
|
} = this;
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
const collapse = this.collapse || 'none'; // banner role must be at top level, so remove role if inside a menu
|
|
|
|
const roleType = (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__.h)('ion-menu', this.el) ? 'none' : 'banner';
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, Object.assign({
|
|
role: roleType,
|
|
class: {
|
|
[mode]: true,
|
|
// Used internally for styling
|
|
[`header-${mode}`]: true,
|
|
[`header-translucent`]: this.translucent,
|
|
[`header-collapse-${collapse}`]: true,
|
|
[`header-translucent-${mode}`]: this.translucent
|
|
}
|
|
}, inheritedAttributes), mode === 'ios' && translucent && (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "header-background"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null));
|
|
}
|
|
|
|
get el() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
}
|
|
|
|
};
|
|
Header.style = {
|
|
ios: headerIosCss,
|
|
md: headerMdCss
|
|
};
|
|
const routeOutletCss = ":host{left:0;right:0;top:0;bottom:0;position:absolute;contain:layout size style;overflow:hidden;z-index:0}";
|
|
const RouterOutlet = class {
|
|
constructor(hostRef) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
this.ionNavWillLoad = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionNavWillLoad", 7);
|
|
this.ionNavWillChange = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionNavWillChange", 3);
|
|
this.ionNavDidChange = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionNavDidChange", 3);
|
|
this.gestureOrAnimationInProgress = false;
|
|
/**
|
|
* The mode determines which platform styles to use.
|
|
*/
|
|
|
|
this.mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
/**
|
|
* If `true`, the router-outlet should animate the transition of components.
|
|
*/
|
|
|
|
this.animated = true;
|
|
}
|
|
|
|
swipeHandlerChanged() {
|
|
if (this.gesture) {
|
|
this.gesture.enable(this.swipeHandler !== undefined);
|
|
}
|
|
}
|
|
|
|
connectedCallback() {
|
|
var _this10 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const onStart = () => {
|
|
_this10.gestureOrAnimationInProgress = true;
|
|
|
|
if (_this10.swipeHandler) {
|
|
_this10.swipeHandler.onStart();
|
|
}
|
|
};
|
|
|
|
_this10.gesture = (yield __webpack_require__.e(/*! import() */ 2938).then(__webpack_require__.bind(__webpack_require__, /*! ./swipe-back-e35bd7d6.js */ 35861))).createSwipeBackGesture(_this10.el, () => !_this10.gestureOrAnimationInProgress && !!_this10.swipeHandler && _this10.swipeHandler.canStart(), () => onStart(), step => {
|
|
var _a;
|
|
|
|
return (_a = _this10.ani) === null || _a === void 0 ? void 0 : _a.progressStep(step);
|
|
}, (shouldComplete, step, dur) => {
|
|
if (_this10.ani) {
|
|
_this10.ani.onFinish(() => {
|
|
_this10.gestureOrAnimationInProgress = false;
|
|
|
|
if (_this10.swipeHandler) {
|
|
_this10.swipeHandler.onEnd(shouldComplete);
|
|
}
|
|
}, {
|
|
oneTimeCallback: true
|
|
}); // Account for rounding errors in JS
|
|
|
|
|
|
let newStepValue = shouldComplete ? -0.001 : 0.001;
|
|
/**
|
|
* Animation will be reversed here, so need to
|
|
* reverse the easing curve as well
|
|
*
|
|
* Additionally, we need to account for the time relative
|
|
* to the new easing curve, as `stepValue` is going to be given
|
|
* in terms of a linear curve.
|
|
*/
|
|
|
|
if (!shouldComplete) {
|
|
_this10.ani.easing('cubic-bezier(1, 0, 0.68, 0.28)');
|
|
|
|
newStepValue += (0,_cubic_bezier_e78d1307_js__WEBPACK_IMPORTED_MODULE_8__.g)([0, 0], [1, 0], [0.68, 0.28], [1, 1], step)[0];
|
|
} else {
|
|
newStepValue += (0,_cubic_bezier_e78d1307_js__WEBPACK_IMPORTED_MODULE_8__.g)([0, 0], [0.32, 0.72], [0, 1], [1, 1], step)[0];
|
|
}
|
|
|
|
_this10.ani.progressEnd(shouldComplete ? 1 : 0, newStepValue, dur);
|
|
} else {
|
|
_this10.gestureOrAnimationInProgress = false;
|
|
}
|
|
});
|
|
|
|
_this10.swipeHandlerChanged();
|
|
})();
|
|
}
|
|
|
|
componentWillLoad() {
|
|
this.ionNavWillLoad.emit();
|
|
}
|
|
|
|
disconnectedCallback() {
|
|
if (this.gesture) {
|
|
this.gesture.destroy();
|
|
this.gesture = undefined;
|
|
}
|
|
}
|
|
/** @internal */
|
|
|
|
|
|
commit(enteringEl, leavingEl, opts) {
|
|
var _this11 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const unlock = yield _this11.lock();
|
|
let changed = false;
|
|
|
|
try {
|
|
changed = yield _this11.transition(enteringEl, leavingEl, opts);
|
|
} catch (e) {
|
|
console.error(e);
|
|
}
|
|
|
|
unlock();
|
|
return changed;
|
|
})();
|
|
}
|
|
/** @internal */
|
|
|
|
|
|
setRouteId(id, params, direction, animation) {
|
|
var _this12 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const changed = yield _this12.setRoot(id, params, {
|
|
duration: direction === 'root' ? 0 : undefined,
|
|
direction: direction === 'back' ? 'back' : 'forward',
|
|
animationBuilder: animation
|
|
});
|
|
return {
|
|
changed,
|
|
element: _this12.activeEl
|
|
};
|
|
})();
|
|
}
|
|
/** @internal */
|
|
|
|
|
|
getRouteId() {
|
|
var _this13 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const active = _this13.activeEl;
|
|
return active ? {
|
|
id: active.tagName,
|
|
element: active,
|
|
params: _this13.activeParams
|
|
} : undefined;
|
|
})();
|
|
}
|
|
|
|
setRoot(component, params, opts) {
|
|
var _this14 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
if (_this14.activeComponent === component && (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__.s)(params, _this14.activeParams)) {
|
|
return false;
|
|
} // attach entering view to DOM
|
|
|
|
|
|
const leavingEl = _this14.activeEl;
|
|
const enteringEl = yield (0,_framework_delegate_c3305a28_js__WEBPACK_IMPORTED_MODULE_9__.a)(_this14.delegate, _this14.el, component, ['ion-page', 'ion-page-invisible'], params);
|
|
_this14.activeComponent = component;
|
|
_this14.activeEl = enteringEl;
|
|
_this14.activeParams = params; // commit animation
|
|
|
|
yield _this14.commit(enteringEl, leavingEl, opts);
|
|
yield (0,_framework_delegate_c3305a28_js__WEBPACK_IMPORTED_MODULE_9__.d)(_this14.delegate, leavingEl);
|
|
return true;
|
|
})();
|
|
}
|
|
|
|
transition(_x6, _x7) {
|
|
var _this15 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (enteringEl, leavingEl, opts = {}) {
|
|
if (leavingEl === enteringEl) {
|
|
return false;
|
|
} // emit nav will change event
|
|
|
|
|
|
_this15.ionNavWillChange.emit();
|
|
|
|
const {
|
|
el,
|
|
mode
|
|
} = _this15;
|
|
const animated = _this15.animated && _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.getBoolean('animated', true);
|
|
const animationBuilder = opts.animationBuilder || _this15.animation || _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.get('navAnimation');
|
|
yield (0,_index_27c7e5c4_js__WEBPACK_IMPORTED_MODULE_10__.t)(Object.assign(Object.assign({
|
|
mode,
|
|
animated,
|
|
enteringEl,
|
|
leavingEl,
|
|
baseEl: el,
|
|
progressCallback: opts.progressAnimation ? ani => {
|
|
/**
|
|
* Because this progress callback is called asynchronously
|
|
* it is possible for the gesture to start and end before
|
|
* the animation is ever set. In that scenario, we should
|
|
* immediately call progressEnd so that the transition promise
|
|
* resolves and the gesture does not get locked up.
|
|
*/
|
|
if (ani !== undefined && !_this15.gestureOrAnimationInProgress) {
|
|
_this15.gestureOrAnimationInProgress = true;
|
|
ani.onFinish(() => {
|
|
_this15.gestureOrAnimationInProgress = false;
|
|
|
|
if (_this15.swipeHandler) {
|
|
_this15.swipeHandler.onEnd(false);
|
|
}
|
|
}, {
|
|
oneTimeCallback: true
|
|
});
|
|
/**
|
|
* Playing animation to beginning
|
|
* with a duration of 0 prevents
|
|
* any flickering when the animation
|
|
* is later cleaned up.
|
|
*/
|
|
|
|
ani.progressEnd(0, 0, 0);
|
|
} else {
|
|
_this15.ani = ani;
|
|
}
|
|
} : undefined
|
|
}, opts), {
|
|
animationBuilder
|
|
})); // emit nav changed event
|
|
|
|
_this15.ionNavDidChange.emit();
|
|
|
|
return true;
|
|
}).apply(this, arguments);
|
|
}
|
|
|
|
lock() {
|
|
var _this16 = this;
|
|
|
|
return (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () {
|
|
const p = _this16.waitPromise;
|
|
let resolve;
|
|
_this16.waitPromise = new Promise(r => resolve = r);
|
|
|
|
if (p !== undefined) {
|
|
yield p;
|
|
}
|
|
|
|
return resolve;
|
|
})();
|
|
}
|
|
|
|
render() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null);
|
|
}
|
|
|
|
get el() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
}
|
|
|
|
static get watchers() {
|
|
return {
|
|
"swipeHandler": ["swipeHandlerChanged"]
|
|
};
|
|
}
|
|
|
|
};
|
|
RouterOutlet.style = routeOutletCss;
|
|
const titleIosCss = ":host{--color:initial;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{left:0;top:0;padding-left:90px;padding-right:90px;padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);position:absolute;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0);font-size:17px;font-weight:600;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;pointer-events:none}:host-context([dir=rtl]){left:unset;right:unset;right:0}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:90px;padding-inline-start:90px;-webkit-padding-end:90px;padding-inline-end:90px}}:host(.title-small){padding-left:9px;padding-right:9px;padding-top:6px;padding-bottom:16px;position:relative;font-size:13px;font-weight:normal}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.title-small){padding-left:unset;padding-right:unset;-webkit-padding-start:9px;padding-inline-start:9px;-webkit-padding-end:9px;padding-inline-end:9px}}:host(.title-large){padding-left:16px;padding-right:16px;padding-top:0;padding-bottom:0;-webkit-transform-origin:left center;transform-origin:left center;bottom:0;-ms-flex-align:end;align-items:flex-end;min-width:100%;padding-bottom:6px;font-size:34px;font-weight:700;text-align:start}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host(.title-large){padding-left:unset;padding-right:unset;-webkit-padding-start:16px;padding-inline-start:16px;-webkit-padding-end:16px;padding-inline-end:16px}}:host(.title-large.title-rtl){-webkit-transform-origin:right center;transform-origin:right center}:host(.title-large.ion-cloned-element){--color:var(--ion-text-color, #000)}:host(.title-large) .toolbar-title{-webkit-transform-origin:inherit;transform-origin:inherit}:host-context([dir=rtl]):host(.title-large) .toolbar-title,:host-context([dir=rtl]).title-large .toolbar-title{-webkit-transform-origin:calc(100% - inherit);transform-origin:calc(100% - inherit)}";
|
|
const titleMdCss = ":host{--color:initial;display:-ms-flexbox;display:flex;-ms-flex:1;flex:1;-ms-flex-align:center;align-items:center;-webkit-transform:translateZ(0);transform:translateZ(0);color:var(--color)}:host(.ion-color){color:var(--ion-color-base)}.toolbar-title{display:block;width:100%;text-overflow:ellipsis;white-space:nowrap;overflow:hidden;pointer-events:auto}:host(.title-small) .toolbar-title{white-space:normal}:host{padding-left:20px;padding-right:20px;padding-top:0;padding-bottom:0;font-size:20px;font-weight:500;letter-spacing:0.0125em}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:20px;padding-inline-start:20px;-webkit-padding-end:20px;padding-inline-end:20px}}:host(.title-small){width:100%;height:100%;font-size:15px;font-weight:normal}";
|
|
const ToolbarTitle = class {
|
|
constructor(hostRef) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
this.ionStyle = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionStyle", 7);
|
|
}
|
|
|
|
sizeChanged() {
|
|
this.emitStyle();
|
|
}
|
|
|
|
connectedCallback() {
|
|
this.emitStyle();
|
|
}
|
|
|
|
emitStyle() {
|
|
const size = this.getSize();
|
|
this.ionStyle.emit({
|
|
[`title-${size}`]: true
|
|
});
|
|
}
|
|
|
|
getSize() {
|
|
return this.size !== undefined ? this.size : 'default';
|
|
}
|
|
|
|
render() {
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
const size = this.getSize();
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
class: (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__.c)(this.color, {
|
|
[mode]: true,
|
|
[`title-${size}`]: true,
|
|
'title-rtl': document.dir === 'rtl'
|
|
})
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "toolbar-title"
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null)));
|
|
}
|
|
|
|
get el() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
}
|
|
|
|
static get watchers() {
|
|
return {
|
|
"size": ["sizeChanged"]
|
|
};
|
|
}
|
|
|
|
};
|
|
ToolbarTitle.style = {
|
|
ios: titleIosCss,
|
|
md: titleMdCss
|
|
};
|
|
const toolbarIosCss = ":host{--border-width:0;--border-style:solid;--opacity:1;--opacity-scale:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:var(--ion-safe-area-left);padding-right:var(--ion-safe-area-right);display:block;position:relative;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-safe-area-left);padding-inline-start:var(--ion-safe-area-left);-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toolbar-container{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.toolbar-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:calc(var(--opacity) * var(--opacity-scale));z-index:-1;pointer-events:none}::slotted(ion-progress-bar){left:0;right:0;bottom:0;position:absolute}:host{--background:var(--ion-toolbar-background, var(--ion-color-step-50, #f7f7f7));--color:var(--ion-toolbar-color, var(--ion-text-color, #000));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, 0.2))));--padding-top:3px;--padding-bottom:3px;--padding-start:4px;--padding-end:4px;--min-height:44px}.toolbar-content{-ms-flex:1;flex:1;-ms-flex-order:4;order:4;min-width:0}:host(.toolbar-segment) .toolbar-content{display:-ms-inline-flexbox;display:inline-flex}:host(.toolbar-searchbar) .toolbar-container{padding-top:0;padding-bottom:0}:host(.toolbar-searchbar) ::slotted(*){-ms-flex-item-align:start;align-self:start}:host(.toolbar-searchbar) ::slotted(ion-chip){margin-top:3px}:host(.toolbar-searchbar) ::slotted(ion-back-button){height:38px}::slotted(ion-buttons){min-height:38px}::slotted([slot=start]){-ms-flex-order:2;order:2}::slotted([slot=secondary]){-ms-flex-order:3;order:3}::slotted([slot=primary]){-ms-flex-order:5;order:5;text-align:end}::slotted([slot=end]){-ms-flex-order:6;order:6;text-align:end}:host(.toolbar-title-large) .toolbar-container{-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:start;align-items:flex-start}:host(.toolbar-title-large) .toolbar-content ion-title{-ms-flex:1;flex:1;-ms-flex-order:8;order:8;min-width:100%}";
|
|
const toolbarMdCss = ":host{--border-width:0;--border-style:solid;--opacity:1;--opacity-scale:1;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;padding-left:var(--ion-safe-area-left);padding-right:var(--ion-safe-area-right);display:block;position:relative;width:100%;color:var(--color);font-family:var(--ion-font-family, inherit);contain:content;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--ion-safe-area-left);padding-inline-start:var(--ion-safe-area-left);-webkit-padding-end:var(--ion-safe-area-right);padding-inline-end:var(--ion-safe-area-right)}}:host(.ion-color){color:var(--ion-color-contrast)}:host(.ion-color) .toolbar-background{background:var(--ion-color-base)}.toolbar-container{padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;width:100%;min-height:var(--min-height);contain:content;overflow:hidden;z-index:10;-webkit-box-sizing:border-box;box-sizing:border-box}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.toolbar-container{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}.toolbar-background{left:0;right:0;top:0;bottom:0;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);border-width:var(--border-width);border-style:var(--border-style);border-color:var(--border-color);background:var(--background);contain:strict;opacity:calc(var(--opacity) * var(--opacity-scale));z-index:-1;pointer-events:none}::slotted(ion-progress-bar){left:0;right:0;bottom:0;position:absolute}:host{--background:var(--ion-toolbar-background, var(--ion-background-color, #fff));--color:var(--ion-toolbar-color, var(--ion-text-color, #424242));--border-color:var(--ion-toolbar-border-color, var(--ion-border-color, var(--ion-color-step-150, #c1c4cd)));--padding-top:0;--padding-bottom:0;--padding-start:0;--padding-end:0;--min-height:56px}.toolbar-content{-ms-flex:1;flex:1;-ms-flex-order:3;order:3;min-width:0;max-width:100%}::slotted(.buttons-first-slot){margin-left:4px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted(.buttons-first-slot){margin-left:unset;-webkit-margin-start:4px;margin-inline-start:4px}}::slotted(.buttons-last-slot){margin-right:4px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){::slotted(.buttons-last-slot){margin-right:unset;-webkit-margin-end:4px;margin-inline-end:4px}}::slotted([slot=start]){-ms-flex-order:2;order:2}::slotted([slot=secondary]){-ms-flex-order:4;order:4}::slotted([slot=primary]){-ms-flex-order:5;order:5;text-align:end}::slotted([slot=end]){-ms-flex-order:6;order:6;text-align:end}";
|
|
const Toolbar = class {
|
|
constructor(hostRef) {
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
this.childrenStyles = new Map();
|
|
}
|
|
|
|
componentWillLoad() {
|
|
const buttons = Array.from(this.el.querySelectorAll('ion-buttons'));
|
|
const firstButtons = buttons.find(button => {
|
|
return button.slot === 'start';
|
|
});
|
|
|
|
if (firstButtons) {
|
|
firstButtons.classList.add('buttons-first-slot');
|
|
}
|
|
|
|
const buttonsReversed = buttons.reverse();
|
|
const lastButtons = buttonsReversed.find(button => button.slot === 'end') || buttonsReversed.find(button => button.slot === 'primary') || buttonsReversed.find(button => button.slot === 'secondary');
|
|
|
|
if (lastButtons) {
|
|
lastButtons.classList.add('buttons-last-slot');
|
|
}
|
|
}
|
|
|
|
childrenStyle(ev) {
|
|
ev.stopPropagation();
|
|
const tagName = ev.target.tagName;
|
|
const updatedStyles = ev.detail;
|
|
const newStyles = {};
|
|
const childStyles = this.childrenStyles.get(tagName) || {};
|
|
let hasStyleChange = false;
|
|
Object.keys(updatedStyles).forEach(key => {
|
|
const childKey = `toolbar-${key}`;
|
|
const newValue = updatedStyles[key];
|
|
|
|
if (newValue !== childStyles[childKey]) {
|
|
hasStyleChange = true;
|
|
}
|
|
|
|
if (newValue) {
|
|
newStyles[childKey] = true;
|
|
}
|
|
});
|
|
|
|
if (hasStyleChange) {
|
|
this.childrenStyles.set(tagName, newStyles);
|
|
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.j)(this);
|
|
}
|
|
}
|
|
|
|
render() {
|
|
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
const childStyles = {};
|
|
this.childrenStyles.forEach(value => {
|
|
Object.assign(childStyles, value);
|
|
});
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
class: Object.assign(Object.assign({}, childStyles), (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__.c)(this.color, {
|
|
[mode]: true,
|
|
'in-toolbar': (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__.h)('ion-toolbar', this.el)
|
|
}))
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "toolbar-background"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "toolbar-container"
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", {
|
|
name: "start"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", {
|
|
name: "secondary"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
class: "toolbar-content"
|
|
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null)), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", {
|
|
name: "primary"
|
|
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", {
|
|
name: "end"
|
|
})));
|
|
}
|
|
|
|
get el() {
|
|
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
}
|
|
|
|
};
|
|
Toolbar.style = {
|
|
ios: toolbarIosCss,
|
|
md: toolbarMdCss
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 23963:
|
|
/*!***************************************************************************!*\
|
|
!*** ./node_modules/@ionic/core/dist/esm/keyboard-controller-73af62b2.js ***!
|
|
\***************************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "c": () => (/* binding */ createKeyboardController)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-33ffec25.js */ 42286);
|
|
/*!
|
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
*/
|
|
|
|
/**
|
|
* Creates a controller that tracks and reacts to opening or closing the keyboard.
|
|
*
|
|
* @internal
|
|
* @param keyboardChangeCallback A function to call when the keyboard opens or closes.
|
|
*/
|
|
|
|
const createKeyboardController = keyboardChangeCallback => {
|
|
let keyboardWillShowHandler;
|
|
let keyboardWillHideHandler;
|
|
let keyboardVisible;
|
|
|
|
const init = () => {
|
|
keyboardWillShowHandler = () => {
|
|
keyboardVisible = true;
|
|
if (keyboardChangeCallback) keyboardChangeCallback(true);
|
|
};
|
|
|
|
keyboardWillHideHandler = () => {
|
|
keyboardVisible = false;
|
|
if (keyboardChangeCallback) keyboardChangeCallback(false);
|
|
};
|
|
|
|
_index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === null || _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === void 0 ? void 0 : _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w.addEventListener('keyboardWillShow', keyboardWillShowHandler);
|
|
_index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === null || _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === void 0 ? void 0 : _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w.addEventListener('keyboardWillHide', keyboardWillHideHandler);
|
|
};
|
|
|
|
const destroy = () => {
|
|
_index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === null || _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === void 0 ? void 0 : _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w.removeEventListener('keyboardWillShow', keyboardWillShowHandler);
|
|
_index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === null || _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w === void 0 ? void 0 : _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_0__.w.removeEventListener('keyboardWillHide', keyboardWillHideHandler);
|
|
keyboardWillShowHandler = keyboardWillHideHandler = undefined;
|
|
};
|
|
|
|
const isKeyboardVisible = () => keyboardVisible;
|
|
|
|
init();
|
|
return {
|
|
init,
|
|
destroy,
|
|
isKeyboardVisible
|
|
};
|
|
};
|
|
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ 50320:
|
|
/*!*************************************************************!*\
|
|
!*** ./node_modules/@ionic/core/dist/esm/theme-7670341c.js ***!
|
|
\*************************************************************/
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ "c": () => (/* binding */ createColorClasses),
|
|
/* harmony export */ "g": () => (/* binding */ getClassMap),
|
|
/* harmony export */ "h": () => (/* binding */ hostContext),
|
|
/* harmony export */ "o": () => (/* binding */ openURL)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 71670);
|
|
|
|
|
|
/*!
|
|
* (C) Ionic http://ionicframework.com - MIT License
|
|
*/
|
|
const hostContext = (selector, el) => {
|
|
return el.closest(selector) !== null;
|
|
};
|
|
/**
|
|
* Create the mode and color classes for the component based on the classes passed in
|
|
*/
|
|
|
|
|
|
const createColorClasses = (color, cssClassMap) => {
|
|
return typeof color === 'string' && color.length > 0 ? Object.assign({
|
|
'ion-color': true,
|
|
[`ion-color-${color}`]: true
|
|
}, cssClassMap) : cssClassMap;
|
|
};
|
|
|
|
const getClassList = classes => {
|
|
if (classes !== undefined) {
|
|
const array = Array.isArray(classes) ? classes : classes.split(' ');
|
|
return array.filter(c => c != null).map(c => c.trim()).filter(c => c !== '');
|
|
}
|
|
|
|
return [];
|
|
};
|
|
|
|
const getClassMap = classes => {
|
|
const map = {};
|
|
getClassList(classes).forEach(c => map[c] = true);
|
|
return map;
|
|
};
|
|
|
|
const SCHEME = /^[a-z][a-z0-9+\-.]*:/;
|
|
|
|
const openURL = /*#__PURE__*/function () {
|
|
var _ref = (0,_Volumes_case_workspace_work_APPS_KA_APP_WORK_NOW_KA_PASS_V2_2_6_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (url, ev, direction, animation) {
|
|
if (url != null && url[0] !== '#' && !SCHEME.test(url)) {
|
|
const router = document.querySelector('ion-router');
|
|
|
|
if (router) {
|
|
if (ev != null) {
|
|
ev.preventDefault();
|
|
}
|
|
|
|
return router.push(url, direction, animation);
|
|
}
|
|
}
|
|
|
|
return false;
|
|
});
|
|
|
|
return function openURL(_x, _x2, _x3, _x4) {
|
|
return _ref.apply(this, arguments);
|
|
};
|
|
}();
|
|
|
|
|
|
|
|
/***/ })
|
|
|
|
}])
|
|
//# sourceMappingURL=4812.js.map
|