update -- photo valdate ai
This commit is contained in:
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1033],{71033:(I,o,e)=>{e.r(o),e.d(o,{ion_img:()=>s});var i=e(71308),n=e(35179),r=e(35730);const s=class{constructor(t){(0,i.r)(this,t),this.ionImgWillLoad=(0,i.e)(this,"ionImgWillLoad",7),this.ionImgDidLoad=(0,i.e)(this,"ionImgDidLoad",7),this.ionError=(0,i.e)(this,"ionError",7),this.inheritedAttributes={},this.onLoad=()=>{this.ionImgDidLoad.emit()},this.onError=()=>{this.ionError.emit()}}srcChanged(){this.addIO()}componentWillLoad(){this.inheritedAttributes=(0,r.j)(this.el,["draggable"])}componentDidLoad(){this.addIO()}addIO(){void 0!==this.src&&(typeof window<"u"&&"IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"isIntersecting"in window.IntersectionObserverEntry.prototype?(this.removeIO(),this.io=new IntersectionObserver(t=>{t[t.length-1].isIntersecting&&(this.load(),this.removeIO())}),this.io.observe(this.el)):setTimeout(()=>this.load(),200))}load(){this.loadError=this.onError,this.loadSrc=this.src,this.ionImgWillLoad.emit()}removeIO(){this.io&&(this.io.disconnect(),this.io=void 0)}render(){const{loadSrc:t,alt:a,onLoad:c,loadError:l,inheritedAttributes:g}=this,{draggable:m}=g;return(0,i.h)(i.H,{class:(0,n.b)(this)},(0,i.h)("img",{decoding:"async",src:t,alt:a,onLoad:c,onError:l,part:"image",draggable:h(m)}))}get el(){return(0,i.i)(this)}static get watchers(){return{src:["srcChanged"]}}},h=t=>{switch(t){case"true":return!0;case"false":return!1;default:return}};s.style=":host{display:block;-o-object-fit:contain;object-fit:contain}img{display:block;width:100%;height:100%;-o-object-fit:inherit;object-fit:inherit;-o-object-position:inherit;object-position:inherit}"}}]);
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,553 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[1321],{
|
|
||||||
|
|
||||||
/***/ 81321:
|
|
||||||
/*!*******************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/input-shims-8459e7d9.js ***!
|
|
||||||
\*******************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "startInputShims": () => (/* binding */ startInputShims)
|
|
||||||
/* 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_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index-e6d1a8be.js */ 24311);
|
|
||||||
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
||||||
/* harmony import */ var _index_c4b11676_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./index-c4b11676.js */ 99273);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const cloneMap = new WeakMap();
|
|
||||||
|
|
||||||
const relocateInput = (componentEl, inputEl, shouldRelocate, inputRelativeY = 0, disabledClonedInput = false) => {
|
|
||||||
if (cloneMap.has(componentEl) === shouldRelocate) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldRelocate) {
|
|
||||||
addClone(componentEl, inputEl, inputRelativeY, disabledClonedInput);
|
|
||||||
} else {
|
|
||||||
removeClone(componentEl, inputEl);
|
|
||||||
}
|
|
||||||
}; // TODO(FW-2832): type
|
|
||||||
|
|
||||||
|
|
||||||
const isFocused = input => {
|
|
||||||
return input === input.getRootNode().activeElement;
|
|
||||||
};
|
|
||||||
|
|
||||||
const addClone = (componentEl, inputEl, inputRelativeY, disabledClonedInput = false) => {
|
|
||||||
// this allows for the actual input to receive the focus from
|
|
||||||
// the user's touch event, but before it receives focus, it
|
|
||||||
// moves the actual input to a location that will not screw
|
|
||||||
// up the app's layout, and does not allow the native browser
|
|
||||||
// to attempt to scroll the input into place (messing up headers/footers)
|
|
||||||
// the cloned input fills the area of where native input should be
|
|
||||||
// while the native input fakes out the browser by relocating itself
|
|
||||||
// before it receives the actual focus event
|
|
||||||
// We hide the focused input (with the visible caret) invisible by making it scale(0),
|
|
||||||
const parentEl = inputEl.parentNode; // DOM WRITES
|
|
||||||
|
|
||||||
const clonedEl = inputEl.cloneNode(false);
|
|
||||||
clonedEl.classList.add('cloned-input');
|
|
||||||
clonedEl.tabIndex = -1;
|
|
||||||
/**
|
|
||||||
* Making the cloned input disabled prevents
|
|
||||||
* Chrome for Android from still scrolling
|
|
||||||
* the entire page since this cloned input
|
|
||||||
* will briefly be hidden by the keyboard
|
|
||||||
* even though it is not focused.
|
|
||||||
*
|
|
||||||
* This is not needed on iOS. While this
|
|
||||||
* does not cause functional issues on iOS,
|
|
||||||
* the input still appears slightly dimmed even
|
|
||||||
* if we set opacity: 1.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (disabledClonedInput) {
|
|
||||||
clonedEl.disabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
parentEl.appendChild(clonedEl);
|
|
||||||
cloneMap.set(componentEl, clonedEl);
|
|
||||||
const doc = componentEl.ownerDocument;
|
|
||||||
const tx = doc.dir === 'rtl' ? 9999 : -9999;
|
|
||||||
componentEl.style.pointerEvents = 'none';
|
|
||||||
inputEl.style.transform = `translate3d(${tx}px,${inputRelativeY}px,0) scale(0)`;
|
|
||||||
};
|
|
||||||
|
|
||||||
const removeClone = (componentEl, inputEl) => {
|
|
||||||
const clone = cloneMap.get(componentEl);
|
|
||||||
|
|
||||||
if (clone) {
|
|
||||||
cloneMap.delete(componentEl);
|
|
||||||
clone.remove();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentEl.style.pointerEvents = '';
|
|
||||||
inputEl.style.transform = '';
|
|
||||||
};
|
|
||||||
|
|
||||||
const enableHideCaretOnScroll = (componentEl, inputEl, scrollEl) => {
|
|
||||||
if (!scrollEl || !inputEl) {
|
|
||||||
return () => {
|
|
||||||
return;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const scrollHideCaret = shouldHideCaret => {
|
|
||||||
if (isFocused(inputEl)) {
|
|
||||||
relocateInput(componentEl, inputEl, shouldHideCaret);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const onBlur = () => relocateInput(componentEl, inputEl, false);
|
|
||||||
|
|
||||||
const hideCaret = () => scrollHideCaret(true);
|
|
||||||
|
|
||||||
const showCaret = () => scrollHideCaret(false);
|
|
||||||
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.a)(scrollEl, 'ionScrollStart', hideCaret);
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.a)(scrollEl, 'ionScrollEnd', showCaret);
|
|
||||||
inputEl.addEventListener('blur', onBlur);
|
|
||||||
return () => {
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.b)(scrollEl, 'ionScrollStart', hideCaret);
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.b)(scrollEl, 'ionScrollEnd', showCaret);
|
|
||||||
inputEl.removeEventListener('blur', onBlur);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const SKIP_SELECTOR = 'input, textarea, [no-blur], [contenteditable]';
|
|
||||||
|
|
||||||
const enableInputBlurring = () => {
|
|
||||||
let focused = true;
|
|
||||||
let didScroll = false;
|
|
||||||
const doc = document;
|
|
||||||
|
|
||||||
const onScroll = () => {
|
|
||||||
didScroll = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onFocusin = () => {
|
|
||||||
focused = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onTouchend = ev => {
|
|
||||||
// if app did scroll return early
|
|
||||||
if (didScroll) {
|
|
||||||
didScroll = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const active = doc.activeElement;
|
|
||||||
|
|
||||||
if (!active) {
|
|
||||||
return;
|
|
||||||
} // only blur if the active element is a text-input or a textarea
|
|
||||||
|
|
||||||
|
|
||||||
if (active.matches(SKIP_SELECTOR)) {
|
|
||||||
return;
|
|
||||||
} // if the selected target is the active element, do not blur
|
|
||||||
|
|
||||||
|
|
||||||
const tapped = ev.target;
|
|
||||||
|
|
||||||
if (tapped === active) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tapped.matches(SKIP_SELECTOR) || tapped.closest(SKIP_SELECTOR)) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
focused = false; // TODO FW-2796: find a better way, why 50ms?
|
|
||||||
|
|
||||||
setTimeout(() => {
|
|
||||||
if (!focused) {
|
|
||||||
active.blur();
|
|
||||||
}
|
|
||||||
}, 50);
|
|
||||||
};
|
|
||||||
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.a)(doc, 'ionScrollStart', onScroll);
|
|
||||||
doc.addEventListener('focusin', onFocusin, true);
|
|
||||||
doc.addEventListener('touchend', onTouchend, false);
|
|
||||||
return () => {
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.b)(doc, 'ionScrollStart', onScroll, true);
|
|
||||||
doc.removeEventListener('focusin', onFocusin, true);
|
|
||||||
doc.removeEventListener('touchend', onTouchend, false);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const SCROLL_ASSIST_SPEED = 0.3;
|
|
||||||
|
|
||||||
const getScrollData = (componentEl, contentEl, keyboardHeight) => {
|
|
||||||
var _a;
|
|
||||||
|
|
||||||
const itemEl = (_a = componentEl.closest('ion-item,[ion-item]')) !== null && _a !== void 0 ? _a : componentEl;
|
|
||||||
return calcScrollData(itemEl.getBoundingClientRect(), contentEl.getBoundingClientRect(), keyboardHeight, componentEl.ownerDocument.defaultView.innerHeight // TODO(FW-2832): type
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const calcScrollData = (inputRect, contentRect, keyboardHeight, platformHeight) => {
|
|
||||||
// compute input's Y values relative to the body
|
|
||||||
const inputTop = inputRect.top;
|
|
||||||
const inputBottom = inputRect.bottom; // compute visible area
|
|
||||||
|
|
||||||
const visibleAreaTop = contentRect.top;
|
|
||||||
const visibleAreaBottom = Math.min(contentRect.bottom, platformHeight - keyboardHeight); // compute safe area
|
|
||||||
|
|
||||||
const safeAreaTop = visibleAreaTop + 15;
|
|
||||||
const safeAreaBottom = visibleAreaBottom * 0.75; // figure out if each edge of the input is within the safe area
|
|
||||||
|
|
||||||
const distanceToBottom = safeAreaBottom - inputBottom;
|
|
||||||
const distanceToTop = safeAreaTop - inputTop; // desiredScrollAmount is the negated distance to the safe area according to our calculations.
|
|
||||||
|
|
||||||
const desiredScrollAmount = Math.round(distanceToBottom < 0 ? -distanceToBottom : distanceToTop > 0 ? -distanceToTop : 0); // our calculations make some assumptions that aren't always true, like the keyboard being closed when an input
|
|
||||||
// gets focus, so make sure we don't scroll the input above the visible area
|
|
||||||
|
|
||||||
const scrollAmount = Math.min(desiredScrollAmount, inputTop - visibleAreaTop);
|
|
||||||
const distance = Math.abs(scrollAmount);
|
|
||||||
const duration = distance / SCROLL_ASSIST_SPEED;
|
|
||||||
const scrollDuration = Math.min(400, Math.max(150, duration));
|
|
||||||
return {
|
|
||||||
scrollAmount,
|
|
||||||
scrollDuration,
|
|
||||||
scrollPadding: keyboardHeight,
|
|
||||||
inputSafeY: -(inputTop - safeAreaTop) + 4
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const enableScrollAssist = (componentEl, inputEl, contentEl, footerEl, keyboardHeight, disableClonedInput = false) => {
|
|
||||||
let coord;
|
|
||||||
|
|
||||||
const touchStart = ev => {
|
|
||||||
coord = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.p)(ev);
|
|
||||||
};
|
|
||||||
|
|
||||||
const touchEnd = ev => {
|
|
||||||
// input cover touchend/mouseup
|
|
||||||
if (!coord) {
|
|
||||||
return;
|
|
||||||
} // get where the touchend/mouseup ended
|
|
||||||
|
|
||||||
|
|
||||||
const endCoord = (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.p)(ev); // focus this input if the pointer hasn't moved XX pixels
|
|
||||||
// and the input doesn't already have focus
|
|
||||||
|
|
||||||
if (!hasPointerMoved(6, coord, endCoord) && !isFocused(inputEl)) {
|
|
||||||
// begin the input focus process
|
|
||||||
jsSetFocus(componentEl, inputEl, contentEl, footerEl, keyboardHeight, disableClonedInput);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
componentEl.addEventListener('touchstart', touchStart, {
|
|
||||||
capture: true,
|
|
||||||
passive: true
|
|
||||||
});
|
|
||||||
componentEl.addEventListener('touchend', touchEnd, true);
|
|
||||||
return () => {
|
|
||||||
componentEl.removeEventListener('touchstart', touchStart, true);
|
|
||||||
componentEl.removeEventListener('touchend', touchEnd, true);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const jsSetFocus = /*#__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* (componentEl, inputEl, contentEl, footerEl, keyboardHeight, disableClonedInput = false) {
|
|
||||||
if (!contentEl && !footerEl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const scrollData = getScrollData(componentEl, contentEl || footerEl, keyboardHeight);
|
|
||||||
|
|
||||||
if (contentEl && Math.abs(scrollData.scrollAmount) < 4) {
|
|
||||||
// the text input is in a safe position that doesn't
|
|
||||||
// require it to be scrolled into view, just set focus now
|
|
||||||
inputEl.focus();
|
|
||||||
return;
|
|
||||||
} // temporarily move the focus to the focus holder so the browser
|
|
||||||
// doesn't freak out while it's trying to get the input in place
|
|
||||||
// at this point the native text input still does not have focus
|
|
||||||
|
|
||||||
|
|
||||||
relocateInput(componentEl, inputEl, true, scrollData.inputSafeY, disableClonedInput);
|
|
||||||
inputEl.focus();
|
|
||||||
/**
|
|
||||||
* Relocating/Focusing input causes the
|
|
||||||
* click event to be cancelled, so
|
|
||||||
* manually fire one here.
|
|
||||||
*/
|
|
||||||
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.r)(() => componentEl.click());
|
|
||||||
|
|
||||||
if (typeof window !== 'undefined') {
|
|
||||||
let scrollContentTimeout;
|
|
||||||
|
|
||||||
const _scrollContent = /*#__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* () {
|
|
||||||
// clean up listeners and timeouts
|
|
||||||
if (scrollContentTimeout !== undefined) {
|
|
||||||
clearTimeout(scrollContentTimeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
|
|
||||||
window.removeEventListener('ionKeyboardDidShow', _scrollContent); // scroll the input into place
|
|
||||||
|
|
||||||
if (contentEl) {
|
|
||||||
yield (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_1__.c)(contentEl, 0, scrollData.scrollAmount, scrollData.scrollDuration);
|
|
||||||
} // the scroll view is in the correct position now
|
|
||||||
// give the native text input focus
|
|
||||||
|
|
||||||
|
|
||||||
relocateInput(componentEl, inputEl, false, scrollData.inputSafeY); // ensure this is the focused input
|
|
||||||
|
|
||||||
inputEl.focus();
|
|
||||||
});
|
|
||||||
|
|
||||||
return function scrollContent() {
|
|
||||||
return _ref2.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
const doubleKeyboardEventListener = () => {
|
|
||||||
window.removeEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
|
|
||||||
window.addEventListener('ionKeyboardDidShow', _scrollContent);
|
|
||||||
};
|
|
||||||
|
|
||||||
if (contentEl) {
|
|
||||||
const scrollEl = yield (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_1__.g)(contentEl);
|
|
||||||
/**
|
|
||||||
* scrollData will only consider the amount we need
|
|
||||||
* to scroll in order to properly bring the input
|
|
||||||
* into view. It will not consider the amount
|
|
||||||
* we can scroll in the content element.
|
|
||||||
* As a result, scrollData may request a greater
|
|
||||||
* scroll position than is currently available
|
|
||||||
* in the DOM. If this is the case, we need to
|
|
||||||
* wait for the webview to resize/the keyboard
|
|
||||||
* to show in order for additional scroll
|
|
||||||
* bandwidth to become available.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const totalScrollAmount = scrollEl.scrollHeight - scrollEl.clientHeight;
|
|
||||||
|
|
||||||
if (scrollData.scrollAmount > totalScrollAmount - scrollEl.scrollTop) {
|
|
||||||
/**
|
|
||||||
* On iOS devices, the system will show a "Passwords" bar above the keyboard
|
|
||||||
* after the initial keyboard is shown. This prevents the webview from resizing
|
|
||||||
* until the "Passwords" bar is shown, so we need to wait for that to happen first.
|
|
||||||
*/
|
|
||||||
if (inputEl.type === 'password') {
|
|
||||||
// Add 50px to account for the "Passwords" bar
|
|
||||||
scrollData.scrollAmount += 50;
|
|
||||||
window.addEventListener('ionKeyboardDidShow', doubleKeyboardEventListener);
|
|
||||||
} else {
|
|
||||||
window.addEventListener('ionKeyboardDidShow', _scrollContent);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This should only fire in 2 instances:
|
|
||||||
* 1. The app is very slow.
|
|
||||||
* 2. The app is running in a browser on an old OS
|
|
||||||
* that does not support Ionic Keyboard Events
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
scrollContentTimeout = setTimeout(_scrollContent, 1000);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_scrollContent();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return function jsSetFocus(_x, _x2, _x3, _x4, _x5) {
|
|
||||||
return _ref.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
const hasPointerMoved = (threshold, startCoord, endCoord) => {
|
|
||||||
if (startCoord && endCoord) {
|
|
||||||
const deltaX = startCoord.x - endCoord.x;
|
|
||||||
const deltaY = startCoord.y - endCoord.y;
|
|
||||||
const distance = deltaX * deltaX + deltaY * deltaY;
|
|
||||||
return distance > threshold * threshold;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
const PADDING_TIMER_KEY = '$ionPaddingTimer';
|
|
||||||
|
|
||||||
const enableScrollPadding = keyboardHeight => {
|
|
||||||
const doc = document; // TODO(FW-2832): types
|
|
||||||
|
|
||||||
const onFocusin = ev => {
|
|
||||||
setScrollPadding(ev.target, keyboardHeight);
|
|
||||||
};
|
|
||||||
|
|
||||||
const onFocusout = ev => {
|
|
||||||
setScrollPadding(ev.target, 0);
|
|
||||||
};
|
|
||||||
|
|
||||||
doc.addEventListener('focusin', onFocusin);
|
|
||||||
doc.addEventListener('focusout', onFocusout);
|
|
||||||
return () => {
|
|
||||||
doc.removeEventListener('focusin', onFocusin);
|
|
||||||
doc.removeEventListener('focusout', onFocusout);
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const setScrollPadding = (input, keyboardHeight) => {
|
|
||||||
var _a, _b;
|
|
||||||
|
|
||||||
if (input.tagName !== 'INPUT') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (input.parentElement && input.parentElement.tagName === 'ION-INPUT') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (((_b = (_a = input.parentElement) === null || _a === void 0 ? void 0 : _a.parentElement) === null || _b === void 0 ? void 0 : _b.tagName) === 'ION-SEARCHBAR') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const el = (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_1__.f)(input);
|
|
||||||
|
|
||||||
if (el === null) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const timer = el[PADDING_TIMER_KEY];
|
|
||||||
|
|
||||||
if (timer) {
|
|
||||||
clearTimeout(timer);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (keyboardHeight > 0) {
|
|
||||||
el.style.setProperty('--keyboard-offset', `${keyboardHeight}px`);
|
|
||||||
} else {
|
|
||||||
el[PADDING_TIMER_KEY] = setTimeout(() => {
|
|
||||||
el.style.setProperty('--keyboard-offset', '0px');
|
|
||||||
}, 120);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const INPUT_BLURRING = true;
|
|
||||||
const SCROLL_PADDING = true;
|
|
||||||
|
|
||||||
const startInputShims = (config, platform) => {
|
|
||||||
const doc = document;
|
|
||||||
const isIOS = platform === 'ios';
|
|
||||||
const isAndroid = platform === 'android';
|
|
||||||
/**
|
|
||||||
* Hide Caret and Input Blurring are needed on iOS.
|
|
||||||
* Scroll Assist and Scroll Padding are needed on iOS and Android
|
|
||||||
* with Chrome web browser (not Chrome webview).
|
|
||||||
*/
|
|
||||||
|
|
||||||
const keyboardHeight = config.getNumber('keyboardHeight', 290);
|
|
||||||
const scrollAssist = config.getBoolean('scrollAssist', true);
|
|
||||||
const hideCaret = config.getBoolean('hideCaretOnScroll', isIOS);
|
|
||||||
const inputBlurring = config.getBoolean('inputBlurring', isIOS);
|
|
||||||
const scrollPadding = config.getBoolean('scrollPadding', true);
|
|
||||||
const inputs = Array.from(doc.querySelectorAll('ion-input, ion-textarea'));
|
|
||||||
const hideCaretMap = new WeakMap();
|
|
||||||
const scrollAssistMap = new WeakMap();
|
|
||||||
|
|
||||||
const registerInput = /*#__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* (componentEl) {
|
|
||||||
yield new Promise(resolve => (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.c)(componentEl, resolve));
|
|
||||||
const inputRoot = componentEl.shadowRoot || componentEl;
|
|
||||||
const inputEl = inputRoot.querySelector('input') || inputRoot.querySelector('textarea');
|
|
||||||
const scrollEl = (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_1__.f)(componentEl);
|
|
||||||
const footerEl = !scrollEl ? componentEl.closest('ion-footer') : null;
|
|
||||||
|
|
||||||
if (!inputEl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!!scrollEl && hideCaret && !hideCaretMap.has(componentEl)) {
|
|
||||||
const rmFn = enableHideCaretOnScroll(componentEl, inputEl, scrollEl);
|
|
||||||
hideCaretMap.set(componentEl, rmFn);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* date/datetime-locale inputs on mobile devices show date picker
|
|
||||||
* overlays instead of keyboards. As a result, scroll assist is
|
|
||||||
* not needed. This also works around a bug in iOS <16 where
|
|
||||||
* scroll assist causes the browser to lock up. See FW-1997.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const isDateInput = inputEl.type === 'date' || inputEl.type === 'datetime-local';
|
|
||||||
|
|
||||||
if (!isDateInput && (!!scrollEl || !!footerEl) && scrollAssist && !scrollAssistMap.has(componentEl)) {
|
|
||||||
const rmFn = enableScrollAssist(componentEl, inputEl, scrollEl, footerEl, keyboardHeight, isAndroid);
|
|
||||||
scrollAssistMap.set(componentEl, rmFn);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return function registerInput(_x6) {
|
|
||||||
return _ref3.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
const unregisterInput = componentEl => {
|
|
||||||
if (hideCaret) {
|
|
||||||
const fn = hideCaretMap.get(componentEl);
|
|
||||||
|
|
||||||
if (fn) {
|
|
||||||
fn();
|
|
||||||
}
|
|
||||||
|
|
||||||
hideCaretMap.delete(componentEl);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (scrollAssist) {
|
|
||||||
const fn = scrollAssistMap.get(componentEl);
|
|
||||||
|
|
||||||
if (fn) {
|
|
||||||
fn();
|
|
||||||
}
|
|
||||||
|
|
||||||
scrollAssistMap.delete(componentEl);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (inputBlurring && INPUT_BLURRING) {
|
|
||||||
enableInputBlurring();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (scrollPadding && SCROLL_PADDING) {
|
|
||||||
enableScrollPadding(keyboardHeight);
|
|
||||||
} // Input might be already loaded in the DOM before ion-device-hacks did.
|
|
||||||
// At this point we need to look for all of the inputs not registered yet
|
|
||||||
// and register them.
|
|
||||||
|
|
||||||
|
|
||||||
for (const input of inputs) {
|
|
||||||
registerInput(input);
|
|
||||||
} // TODO(FW-2832): types
|
|
||||||
|
|
||||||
|
|
||||||
doc.addEventListener('ionInputDidLoad', ev => {
|
|
||||||
registerInput(ev.detail);
|
|
||||||
});
|
|
||||||
doc.addEventListener('ionInputDidUnload', ev => {
|
|
||||||
unregisterInput(ev.detail);
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=1321.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,351 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[1624],{
|
|
||||||
|
|
||||||
/***/ 61624:
|
|
||||||
/*!****************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/ion-spinner.entry.js ***!
|
|
||||||
\****************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "ion_spinner": () => (/* binding */ Spinner)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-8e692445.js */ 91559);
|
|
||||||
/* harmony import */ var _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-c74e4951.js */ 95823);
|
|
||||||
/* harmony import */ var _theme_7670341c_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./theme-7670341c.js */ 50320);
|
|
||||||
/* harmony import */ var _spinner_configs_5d6b6fe7_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./spinner-configs-5d6b6fe7.js */ 43844);
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const spinnerCss = ":host{display:inline-block;position:relative;width:28px;height:28px;color:var(--color);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}:host(.ion-color){color:var(--ion-color-base)}svg{-webkit-transform-origin:center;transform-origin:center;position:absolute;top:0;left:0;width:100%;height:100%;-webkit-transform:translateZ(0);transform:translateZ(0)}[dir=rtl] svg,:host-context([dir=rtl]) svg{-webkit-transform-origin:calc(100% - center);transform-origin:calc(100% - center)}:host(.spinner-lines) line,:host(.spinner-lines-small) line{stroke-width:7px}:host(.spinner-lines-sharp) line,:host(.spinner-lines-sharp-small) line{stroke-width:4px}:host(.spinner-lines) line,:host(.spinner-lines-small) line,:host(.spinner-lines-sharp) line,:host(.spinner-lines-sharp-small) line{stroke-linecap:round;stroke:currentColor}:host(.spinner-lines) svg,:host(.spinner-lines-small) svg,:host(.spinner-lines-sharp) svg,:host(.spinner-lines-sharp-small) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite}:host(.spinner-bubbles) svg{-webkit-animation:spinner-scale-out 1s linear infinite;animation:spinner-scale-out 1s linear infinite;fill:currentColor}:host(.spinner-circles) svg{-webkit-animation:spinner-fade-out 1s linear infinite;animation:spinner-fade-out 1s linear infinite;fill:currentColor}:host(.spinner-crescent) circle{fill:transparent;stroke-width:4px;stroke-dasharray:128px;stroke-dashoffset:82px;stroke:currentColor}:host(.spinner-crescent) svg{-webkit-animation:spinner-rotate 1s linear infinite;animation:spinner-rotate 1s linear infinite}:host(.spinner-dots) circle{stroke-width:0;fill:currentColor}:host(.spinner-dots) svg{-webkit-animation:spinner-dots 1s linear infinite;animation:spinner-dots 1s linear infinite}:host(.spinner-circular) svg{-webkit-animation:spinner-circular linear infinite;animation:spinner-circular linear infinite}:host(.spinner-circular) circle{-webkit-animation:spinner-circular-inner ease-in-out infinite;animation:spinner-circular-inner ease-in-out infinite;stroke:currentColor;stroke-dasharray:80px, 200px;stroke-dashoffset:0px;stroke-width:5.6;fill:none}:host(.spinner-paused),:host(.spinner-paused) svg,:host(.spinner-paused) circle{-webkit-animation-play-state:paused;animation-play-state:paused}@-webkit-keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@keyframes spinner-fade-out{0%{opacity:1}100%{opacity:0}}@-webkit-keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@keyframes spinner-scale-out{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1)}100%{-webkit-transform:scale(0, 0);transform:scale(0, 0)}}@-webkit-keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-rotate{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@keyframes spinner-dots{0%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}50%{-webkit-transform:scale(0.4, 0.4);transform:scale(0.4, 0.4);opacity:0.3}100%{-webkit-transform:scale(1, 1);transform:scale(1, 1);opacity:0.9}}@-webkit-keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes spinner-circular{100%{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@-webkit-keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}@keyframes spinner-circular-inner{0%{stroke-dasharray:1px, 200px;stroke-dashoffset:0px}50%{stroke-dasharray:100px, 200px;stroke-dashoffset:-15px}100%{stroke-dasharray:100px, 200px;stroke-dashoffset:-125px}}";
|
|
||||||
const Spinner = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.r)(this, hostRef);
|
|
||||||
/**
|
|
||||||
* If `true`, the spinner's animation will be paused.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.paused = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
getName() {
|
|
||||||
const spinnerName = this.name || _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_1__.c.get('spinner');
|
|
||||||
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_1__.b)(this);
|
|
||||||
|
|
||||||
if (spinnerName) {
|
|
||||||
return spinnerName;
|
|
||||||
}
|
|
||||||
|
|
||||||
return mode === 'ios' ? 'lines' : 'circular';
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
var _a;
|
|
||||||
|
|
||||||
const self = this;
|
|
||||||
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_1__.b)(self);
|
|
||||||
const spinnerName = self.getName();
|
|
||||||
const spinner = (_a = _spinner_configs_5d6b6fe7_js__WEBPACK_IMPORTED_MODULE_3__.S[spinnerName]) !== null && _a !== void 0 ? _a : _spinner_configs_5d6b6fe7_js__WEBPACK_IMPORTED_MODULE_3__.S.lines;
|
|
||||||
const duration = typeof self.duration === 'number' && self.duration > 10 ? self.duration : spinner.dur;
|
|
||||||
const svgs = []; // TODO(FW-2832): type
|
|
||||||
|
|
||||||
if (spinner.circles !== undefined) {
|
|
||||||
for (let i = 0; i < spinner.circles; i++) {
|
|
||||||
svgs.push(buildCircle(spinner, duration, i, spinner.circles));
|
|
||||||
}
|
|
||||||
} else if (spinner.lines !== undefined) {
|
|
||||||
for (let i = 0; i < spinner.lines; i++) {
|
|
||||||
svgs.push(buildLine(spinner, duration, i, spinner.lines));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.H, {
|
|
||||||
class: (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_2__.c)(self.color, {
|
|
||||||
[mode]: true,
|
|
||||||
[`spinner-${spinnerName}`]: true,
|
|
||||||
'spinner-paused': self.paused || _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_1__.c.getBoolean('_testing')
|
|
||||||
}),
|
|
||||||
role: "progressbar",
|
|
||||||
style: spinner.elmDuration ? {
|
|
||||||
animationDuration: duration + 'ms'
|
|
||||||
} : {}
|
|
||||||
}, svgs);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
const buildCircle = (spinner, duration, index, total) => {
|
|
||||||
const data = spinner.fn(duration, index, total);
|
|
||||||
data.style['animation-duration'] = duration + 'ms';
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.h)("svg", {
|
|
||||||
viewBox: data.viewBox || '0 0 64 64',
|
|
||||||
style: data.style
|
|
||||||
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.h)("circle", {
|
|
||||||
transform: data.transform || 'translate(32,32)',
|
|
||||||
cx: data.cx,
|
|
||||||
cy: data.cy,
|
|
||||||
r: data.r,
|
|
||||||
style: spinner.elmDuration ? {
|
|
||||||
animationDuration: duration + 'ms'
|
|
||||||
} : {}
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
const buildLine = (spinner, duration, index, total) => {
|
|
||||||
const data = spinner.fn(duration, index, total);
|
|
||||||
data.style['animation-duration'] = duration + 'ms';
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.h)("svg", {
|
|
||||||
viewBox: data.viewBox || '0 0 64 64',
|
|
||||||
style: data.style
|
|
||||||
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.h)("line", {
|
|
||||||
transform: "translate(32,32)",
|
|
||||||
y1: data.y1,
|
|
||||||
y2: data.y2
|
|
||||||
}));
|
|
||||||
};
|
|
||||||
|
|
||||||
Spinner.style = spinnerCss;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 43844:
|
|
||||||
/*!***********************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/spinner-configs-5d6b6fe7.js ***!
|
|
||||||
\***********************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "S": () => (/* binding */ SPINNERS)
|
|
||||||
/* harmony export */ });
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
const spinners = {
|
|
||||||
bubbles: {
|
|
||||||
dur: 1000,
|
|
||||||
circles: 9,
|
|
||||||
fn: (dur, index, total) => {
|
|
||||||
const animationDelay = `${dur * index / total - dur}ms`;
|
|
||||||
const angle = 2 * Math.PI * index / total;
|
|
||||||
return {
|
|
||||||
r: 5,
|
|
||||||
style: {
|
|
||||||
top: `${9 * Math.sin(angle)}px`,
|
|
||||||
left: `${9 * Math.cos(angle)}px`,
|
|
||||||
'animation-delay': animationDelay
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
circles: {
|
|
||||||
dur: 1000,
|
|
||||||
circles: 8,
|
|
||||||
fn: (dur, index, total) => {
|
|
||||||
const step = index / total;
|
|
||||||
const animationDelay = `${dur * step - dur}ms`;
|
|
||||||
const angle = 2 * Math.PI * step;
|
|
||||||
return {
|
|
||||||
r: 5,
|
|
||||||
style: {
|
|
||||||
top: `${9 * Math.sin(angle)}px`,
|
|
||||||
left: `${9 * Math.cos(angle)}px`,
|
|
||||||
'animation-delay': animationDelay
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
circular: {
|
|
||||||
dur: 1400,
|
|
||||||
elmDuration: true,
|
|
||||||
circles: 1,
|
|
||||||
fn: () => {
|
|
||||||
return {
|
|
||||||
r: 20,
|
|
||||||
cx: 48,
|
|
||||||
cy: 48,
|
|
||||||
fill: 'none',
|
|
||||||
viewBox: '24 24 48 48',
|
|
||||||
transform: 'translate(0,0)',
|
|
||||||
style: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
crescent: {
|
|
||||||
dur: 750,
|
|
||||||
circles: 1,
|
|
||||||
fn: () => {
|
|
||||||
return {
|
|
||||||
r: 26,
|
|
||||||
style: {}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dots: {
|
|
||||||
dur: 750,
|
|
||||||
circles: 3,
|
|
||||||
fn: (_, index) => {
|
|
||||||
const animationDelay = -(110 * index) + 'ms';
|
|
||||||
return {
|
|
||||||
r: 6,
|
|
||||||
style: {
|
|
||||||
left: `${9 - 9 * index}px`,
|
|
||||||
'animation-delay': animationDelay
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
lines: {
|
|
||||||
dur: 1000,
|
|
||||||
lines: 8,
|
|
||||||
fn: (dur, index, total) => {
|
|
||||||
const transform = `rotate(${360 / total * index + (index < total / 2 ? 180 : -180)}deg)`;
|
|
||||||
const animationDelay = `${dur * index / total - dur}ms`;
|
|
||||||
return {
|
|
||||||
y1: 14,
|
|
||||||
y2: 26,
|
|
||||||
style: {
|
|
||||||
transform: transform,
|
|
||||||
'animation-delay': animationDelay
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'lines-small': {
|
|
||||||
dur: 1000,
|
|
||||||
lines: 8,
|
|
||||||
fn: (dur, index, total) => {
|
|
||||||
const transform = `rotate(${360 / total * index + (index < total / 2 ? 180 : -180)}deg)`;
|
|
||||||
const animationDelay = `${dur * index / total - dur}ms`;
|
|
||||||
return {
|
|
||||||
y1: 12,
|
|
||||||
y2: 20,
|
|
||||||
style: {
|
|
||||||
transform: transform,
|
|
||||||
'animation-delay': animationDelay
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'lines-sharp': {
|
|
||||||
dur: 1000,
|
|
||||||
lines: 12,
|
|
||||||
fn: (dur, index, total) => {
|
|
||||||
const transform = `rotate(${30 * index + (index < 6 ? 180 : -180)}deg)`;
|
|
||||||
const animationDelay = `${dur * index / total - dur}ms`;
|
|
||||||
return {
|
|
||||||
y1: 17,
|
|
||||||
y2: 29,
|
|
||||||
style: {
|
|
||||||
transform: transform,
|
|
||||||
'animation-delay': animationDelay
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
},
|
|
||||||
'lines-sharp-small': {
|
|
||||||
dur: 1000,
|
|
||||||
lines: 12,
|
|
||||||
fn: (dur, index, total) => {
|
|
||||||
const transform = `rotate(${30 * index + (index < 6 ? 180 : -180)}deg)`;
|
|
||||||
const animationDelay = `${dur * index / total - dur}ms`;
|
|
||||||
return {
|
|
||||||
y1: 12,
|
|
||||||
y2: 20,
|
|
||||||
style: {
|
|
||||||
transform: transform,
|
|
||||||
'animation-delay': animationDelay
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const SPINNERS = spinners;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 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=1624.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[1821],{1821:(c,d,t)=>{t.r(d),t.d(d,{WcModule:()=>u});var l=t(61380);const e=[{path:"start/:locator",loadChildren:()=>t.e(2307).then(t.bind(t,42307)).then(o=>o.StartPageModule)}];var n=t(45449);let u=(()=>{class o{}return o.\u0275fac=function(a){return new(a||o)},o.\u0275mod=n.\u0275\u0275defineNgModule({type:o}),o.\u0275inj=n.\u0275\u0275defineInjector({imports:[l.RouterModule.forChild(e),l.RouterModule]}),o})()}}]);
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,514 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[199],{
|
|
||||||
|
|
||||||
/***/ 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
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 70199:
|
|
||||||
/*!**************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/ion-tab_2.entry.js ***!
|
|
||||||
\**************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "ion_tab": () => (/* binding */ Tab),
|
|
||||||
/* harmony export */ "ion_tabs": () => (/* binding */ Tabs)
|
|
||||||
/* 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 _framework_delegate_c3305a28_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./framework-delegate-c3305a28.js */ 90539);
|
|
||||||
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const tabCss = ":host(.tab-hidden){display:none !important}";
|
|
||||||
const Tab = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
||||||
this.loaded = false;
|
|
||||||
/** @internal */
|
|
||||||
|
|
||||||
this.active = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillLoad() {
|
|
||||||
var _this = 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.active) {
|
|
||||||
yield _this.setActive();
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
/** Set the active component for the tab */
|
|
||||||
|
|
||||||
|
|
||||||
setActive() {
|
|
||||||
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* () {
|
|
||||||
yield _this2.prepareLazyLoaded();
|
|
||||||
_this2.active = true;
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
changeActive(isActive) {
|
|
||||||
if (isActive) {
|
|
||||||
this.prepareLazyLoaded();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
prepareLazyLoaded() {
|
|
||||||
if (!this.loaded && this.component != null) {
|
|
||||||
this.loaded = true;
|
|
||||||
|
|
||||||
try {
|
|
||||||
return (0,_framework_delegate_c3305a28_js__WEBPACK_IMPORTED_MODULE_2__.a)(this.delegate, this.el, this.component, ['ion-page']);
|
|
||||||
} catch (e) {
|
|
||||||
console.error(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.resolve(undefined);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
tab,
|
|
||||||
active,
|
|
||||||
component
|
|
||||||
} = this;
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
||||||
role: "tabpanel",
|
|
||||||
"aria-hidden": !active ? 'true' : null,
|
|
||||||
"aria-labelledby": `tab-button-${tab}`,
|
|
||||||
class: {
|
|
||||||
'ion-page': component === undefined,
|
|
||||||
'tab-hidden': !active
|
|
||||||
}
|
|
||||||
}, (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 {
|
|
||||||
"active": ["changeActive"]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
Tab.style = tabCss;
|
|
||||||
const tabsCss = ":host{left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:absolute;-ms-flex-direction:column;flex-direction:column;width:100%;height:100%;contain:layout size style;z-index:0}.tabs-inner{position:relative;-ms-flex:1;flex:1;contain:layout size style}";
|
|
||||||
const Tabs = 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.ionTabsWillChange = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionTabsWillChange", 3);
|
|
||||||
this.ionTabsDidChange = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionTabsDidChange", 3);
|
|
||||||
this.transitioning = false;
|
|
||||||
/** @internal */
|
|
||||||
|
|
||||||
this.useRouter = false;
|
|
||||||
|
|
||||||
this.onTabClicked = ev => {
|
|
||||||
const {
|
|
||||||
href,
|
|
||||||
tab
|
|
||||||
} = ev.detail;
|
|
||||||
|
|
||||||
if (this.useRouter && href !== undefined) {
|
|
||||||
const router = document.querySelector('ion-router');
|
|
||||||
|
|
||||||
if (router) {
|
|
||||||
router.push(href);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.select(tab);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillLoad() {
|
|
||||||
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 (!_this3.useRouter) {
|
|
||||||
_this3.useRouter = !!document.querySelector('ion-router') && !_this3.el.closest('[no-router]');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!_this3.useRouter) {
|
|
||||||
const tabs = _this3.tabs;
|
|
||||||
|
|
||||||
if (tabs.length > 0) {
|
|
||||||
yield _this3.select(tabs[0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
_this3.ionNavWillLoad.emit();
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillRender() {
|
|
||||||
const tabBar = this.el.querySelector('ion-tab-bar');
|
|
||||||
|
|
||||||
if (tabBar) {
|
|
||||||
const tab = this.selectedTab ? this.selectedTab.tab : undefined;
|
|
||||||
tabBar.selectedTab = tab;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Select a tab by the value of its `tab` property or an element reference.
|
|
||||||
*
|
|
||||||
* @param tab The tab instance to select. If passed a string, it should be the value of the tab's `tab` property.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
select(tab) {
|
|
||||||
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* () {
|
|
||||||
const selectedTab = getTab(_this4.tabs, tab);
|
|
||||||
|
|
||||||
if (!_this4.shouldSwitch(selectedTab)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
yield _this4.setActive(selectedTab);
|
|
||||||
yield _this4.notifyRouter();
|
|
||||||
|
|
||||||
_this4.tabSwitch();
|
|
||||||
|
|
||||||
return true;
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get a specific tab by the value of its `tab` property or an element reference.
|
|
||||||
*
|
|
||||||
* @param tab The tab instance to select. If passed a string, it should be the value of the tab's `tab` property.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
getTab(tab) {
|
|
||||||
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* () {
|
|
||||||
return getTab(_this5.tabs, tab);
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Get the currently selected tab.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
getSelected() {
|
|
||||||
return Promise.resolve(this.selectedTab ? this.selectedTab.tab : undefined);
|
|
||||||
}
|
|
||||||
/** @internal */
|
|
||||||
|
|
||||||
|
|
||||||
setRouteId(id) {
|
|
||||||
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 selectedTab = getTab(_this6.tabs, id);
|
|
||||||
|
|
||||||
if (!_this6.shouldSwitch(selectedTab)) {
|
|
||||||
return {
|
|
||||||
changed: false,
|
|
||||||
element: _this6.selectedTab
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
yield _this6.setActive(selectedTab);
|
|
||||||
return {
|
|
||||||
changed: true,
|
|
||||||
element: _this6.selectedTab,
|
|
||||||
markVisible: () => _this6.tabSwitch()
|
|
||||||
};
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
/** @internal */
|
|
||||||
|
|
||||||
|
|
||||||
getRouteId() {
|
|
||||||
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* () {
|
|
||||||
var _a;
|
|
||||||
|
|
||||||
const tabId = (_a = _this7.selectedTab) === null || _a === void 0 ? void 0 : _a.tab;
|
|
||||||
return tabId !== undefined ? {
|
|
||||||
id: tabId,
|
|
||||||
element: _this7.selectedTab
|
|
||||||
} : undefined;
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
setActive(selectedTab) {
|
|
||||||
if (this.transitioning) {
|
|
||||||
return Promise.reject('transitioning already happening');
|
|
||||||
}
|
|
||||||
|
|
||||||
this.transitioning = true;
|
|
||||||
this.leavingTab = this.selectedTab;
|
|
||||||
this.selectedTab = selectedTab;
|
|
||||||
this.ionTabsWillChange.emit({
|
|
||||||
tab: selectedTab.tab
|
|
||||||
});
|
|
||||||
selectedTab.active = true;
|
|
||||||
return Promise.resolve();
|
|
||||||
}
|
|
||||||
|
|
||||||
tabSwitch() {
|
|
||||||
const selectedTab = this.selectedTab;
|
|
||||||
const leavingTab = this.leavingTab;
|
|
||||||
this.leavingTab = undefined;
|
|
||||||
this.transitioning = false;
|
|
||||||
|
|
||||||
if (!selectedTab) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (leavingTab !== selectedTab) {
|
|
||||||
if (leavingTab) {
|
|
||||||
leavingTab.active = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.ionTabsDidChange.emit({
|
|
||||||
tab: selectedTab.tab
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
notifyRouter() {
|
|
||||||
if (this.useRouter) {
|
|
||||||
const router = document.querySelector('ion-router');
|
|
||||||
|
|
||||||
if (router) {
|
|
||||||
return router.navChanged('forward');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return Promise.resolve(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
shouldSwitch(selectedTab) {
|
|
||||||
const leavingTab = this.selectedTab;
|
|
||||||
return selectedTab !== undefined && selectedTab !== leavingTab && !this.transitioning;
|
|
||||||
}
|
|
||||||
|
|
||||||
get tabs() {
|
|
||||||
return Array.from(this.el.querySelectorAll('ion-tab'));
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
||||||
onIonTabButtonClick: this.onTabClicked
|
|
||||||
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", {
|
|
||||||
name: "top"
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "tabs-inner"
|
|
||||||
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null)), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", {
|
|
||||||
name: "bottom"
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
get el() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
const getTab = (tabs, tab) => {
|
|
||||||
const tabEl = typeof tab === 'string' ? tabs.find(t => t.tab === tab) : tab;
|
|
||||||
|
|
||||||
if (!tabEl) {
|
|
||||||
console.error(`tab with id: "${tabEl}" does not exist`);
|
|
||||||
}
|
|
||||||
|
|
||||||
return tabEl;
|
|
||||||
};
|
|
||||||
|
|
||||||
Tabs.style = tabsCss;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=199.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,383 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2121],{
|
|
||||||
|
|
||||||
/***/ 62121:
|
|
||||||
/*!************************************************************************************************!*\
|
|
||||||
!*** ./src/app/register/identity-validator-birth-date/identity-validator-birth-date.module.ts ***!
|
|
||||||
\************************************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "IdentityValidatorBirthDatePageModule": () => (/* binding */ IdentityValidatorBirthDatePageModule)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ 90944);
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_0__);
|
|
||||||
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @angular/forms */ 2508);
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/router */ 61380);
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_1__);
|
|
||||||
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic/angular */ 93819);
|
|
||||||
/* harmony import */ var _identity_validator_birth_date_page__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./identity-validator-birth-date.page */ 53384);
|
|
||||||
/* harmony import */ var _shared_directives__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @shared/directives */ 94221);
|
|
||||||
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_5__);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const routes = [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: _identity_validator_birth_date_page__WEBPACK_IMPORTED_MODULE_2__.IdentityValidatorBirthDatePage
|
|
||||||
}
|
|
||||||
];
|
|
||||||
class IdentityValidatorBirthDatePageModule {
|
|
||||||
}
|
|
||||||
IdentityValidatorBirthDatePageModule.ɵfac = function IdentityValidatorBirthDatePageModule_Factory(t) { return new (t || IdentityValidatorBirthDatePageModule)(); };
|
|
||||||
IdentityValidatorBirthDatePageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineNgModule"]({ type: IdentityValidatorBirthDatePageModule });
|
|
||||||
IdentityValidatorBirthDatePageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_4__.SharedModuleModule,
|
|
||||||
_angular_common__WEBPACK_IMPORTED_MODULE_0__.CommonModule,
|
|
||||||
_angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormsModule,
|
|
||||||
_angular_forms__WEBPACK_IMPORTED_MODULE_6__.ReactiveFormsModule,
|
|
||||||
_ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonicModule,
|
|
||||||
_angular_router__WEBPACK_IMPORTED_MODULE_1__.RouterModule.forChild(routes)] });
|
|
||||||
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_5__["ɵɵsetNgModuleScope"](IdentityValidatorBirthDatePageModule, { declarations: [_shared_directives__WEBPACK_IMPORTED_MODULE_3__.BirthDateDirectiveDirective, _identity_validator_birth_date_page__WEBPACK_IMPORTED_MODULE_2__.IdentityValidatorBirthDatePage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_4__.SharedModuleModule,
|
|
||||||
_angular_common__WEBPACK_IMPORTED_MODULE_0__.CommonModule,
|
|
||||||
_angular_forms__WEBPACK_IMPORTED_MODULE_6__.FormsModule,
|
|
||||||
_angular_forms__WEBPACK_IMPORTED_MODULE_6__.ReactiveFormsModule,
|
|
||||||
_ionic_angular__WEBPACK_IMPORTED_MODULE_7__.IonicModule, _angular_router__WEBPACK_IMPORTED_MODULE_1__.RouterModule], exports: [_shared_directives__WEBPACK_IMPORTED_MODULE_3__.BirthDateDirectiveDirective] }); })();
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 53384:
|
|
||||||
/*!**********************************************************************************************!*\
|
|
||||||
!*** ./src/app/register/identity-validator-birth-date/identity-validator-birth-date.page.ts ***!
|
|
||||||
\**********************************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "IdentityValidatorBirthDatePage": () => (/* binding */ IdentityValidatorBirthDatePage)
|
|
||||||
/* 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 _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
||||||
/* harmony import */ var _angular_forms__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @angular/forms */ 2508);
|
|
||||||
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @shared/services */ 17253);
|
|
||||||
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ionic/angular */ 93819);
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 61380);
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_3__);
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/common */ 90944);
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_4__);
|
|
||||||
/* harmony import */ var _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../shared/components/full-logo/full-logo.component */ 33159);
|
|
||||||
/* harmony import */ var _shared_components_privacy_footer_privacy_footer_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../shared/components/privacy-footer/privacy-footer.component */ 71237);
|
|
||||||
/* harmony import */ var _shared_directives__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @shared/directives */ 94221);
|
|
||||||
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @ngx-translate/core */ 38699);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const _c0 = function (a0) {
|
|
||||||
return {
|
|
||||||
"min-height": a0,
|
|
||||||
"position": "relative"
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class IdentityValidatorBirthDatePage {
|
|
||||||
constructor(formBuilder, api, navController, activatedRoute, notificatorService, sendVerificationEmailModalService, warnConflictModalService, loadingService, keyboardService, ngZoneService, deviceInfoService, translateConfigService, showToastModalErroCodeZero) {
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
this.formBuilder = formBuilder;
|
|
||||||
this.api = api;
|
|
||||||
this.navController = navController;
|
|
||||||
this.activatedRoute = activatedRoute;
|
|
||||||
this.notificatorService = notificatorService;
|
|
||||||
this.sendVerificationEmailModalService = sendVerificationEmailModalService;
|
|
||||||
this.warnConflictModalService = warnConflictModalService;
|
|
||||||
this.loadingService = loadingService;
|
|
||||||
this.keyboardService = keyboardService;
|
|
||||||
this.ngZoneService = ngZoneService;
|
|
||||||
this.deviceInfoService = deviceInfoService;
|
|
||||||
this.translateConfigService = translateConfigService;
|
|
||||||
this.showToastModalErroCodeZero = showToastModalErroCodeZero;
|
|
||||||
|
|
||||||
this.onSendVerificationEmailModalStateChange = /*#__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* (state) {
|
|
||||||
console.log('current state:', state);
|
|
||||||
yield _this.ngZoneService.run(() => {
|
|
||||||
_this.showSendVerificationEmailModal = state.show;
|
|
||||||
_this.emailSendVerificationEmailModal = state.email;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return function (_x) {
|
|
||||||
return _ref.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
this.onWarnConflictModalStateChange = /*#__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* (state) {
|
|
||||||
console.log('current state:', state);
|
|
||||||
yield _this.ngZoneService.run(() => {
|
|
||||||
_this.showWarnConflictModal = state.show;
|
|
||||||
_this.emailWarnConflictModal = state.email;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return function (_x2) {
|
|
||||||
return _ref2.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
this.onSubmit = () => {
|
|
||||||
const birthDate = this.birthDateForm.controls.birthDate.value;
|
|
||||||
|
|
||||||
if (!this.validateInput(birthDate)) {
|
|
||||||
const notification = {
|
|
||||||
title: this.translateConfigService.translate('TOAST_INVALID_DATA_TITLE'),
|
|
||||||
message: this.translateConfigService.translate('TOAST_INVALID_DATA_NESSAGE'),
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
} else {
|
|
||||||
let onHideSubscription = null;
|
|
||||||
|
|
||||||
const onKeyboardHideCallback = () => {
|
|
||||||
if (onHideSubscription) {
|
|
||||||
onHideSubscription.unsubscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadingService.show(this.translateConfigService.translate('LOADING_PROCESSING_DATA'), 'identity-validator-birth-date-show');
|
|
||||||
const birthDay = this.getDay(birthDate);
|
|
||||||
const birthMonth = this.getMonth(birthDate);
|
|
||||||
/* this.api
|
|
||||||
.verifyBirthDate(this.document, birthDay, birthMonth)
|
|
||||||
.subscribe(this.verifyBirthDateSuccessResponse, this.verifyBirthDateErrorResponse);*/
|
|
||||||
};
|
|
||||||
|
|
||||||
onHideSubscription = this.keyboardService.onHideObservable?.subscribe(onKeyboardHideCallback);
|
|
||||||
|
|
||||||
if (!this.keyboardService.isVisible()) {
|
|
||||||
onKeyboardHideCallback();
|
|
||||||
} else {
|
|
||||||
this.keyboardService.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.validateInput = data => {
|
|
||||||
const day = this.getDay(data);
|
|
||||||
const month = this.getMonth(data);
|
|
||||||
return !!(day && month);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getDay = data => {
|
|
||||||
if (typeof data === 'string') {
|
|
||||||
const day = data.split('/')[0];
|
|
||||||
|
|
||||||
if (day && day.length !== 0) {
|
|
||||||
return day;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getMonth = data => {
|
|
||||||
if (typeof data === 'string') {
|
|
||||||
let month = data.split('/')[1];
|
|
||||||
|
|
||||||
if (month && month.length !== 0) {
|
|
||||||
if (month.length > 2) {
|
|
||||||
month = month.slice(0, 2);
|
|
||||||
}
|
|
||||||
|
|
||||||
return month;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
this.verifyBirthDateSuccessResponse = response => {
|
|
||||||
this.loadingService.hide(null, 'identity-validator-birth-date-success-hide').then(() => {
|
|
||||||
if (this.verifyIfMatch(response)) {// this.goToNextStep();
|
|
||||||
} else {
|
|
||||||
const notification = {
|
|
||||||
title: this.translateConfigService.translate('TOAST_INVALID_DATA_TITLE'),
|
|
||||||
message: this.translateConfigService.translate('TOAST_INVALID_DATA_NESSAGE'),
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.verifyIfMatch = data => data.matched;
|
|
||||||
|
|
||||||
this.verifyBirthDateErrorResponse = response => {
|
|
||||||
this.loadingService.hide(null, 'identity-validator-birth-date-error-hide').then(() => {
|
|
||||||
if (response?.status === 0) {
|
|
||||||
this.showToastModalErroCodeZero.showToast();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response.status === 400) {
|
|
||||||
// Por favor, verifique os dados e tente novamente.
|
|
||||||
const notification = {
|
|
||||||
title: this.translateConfigService.translate('TOAST_TITLE_ERROR_IN_REQUEST'),
|
|
||||||
message: `${this.translateConfigService.translate('TOAST_INVALID_DATA_NESSAGE')} (cod. 400)`,
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
} else if (response.status === 404) {// this.goToNextStep();
|
|
||||||
} else {
|
|
||||||
const {
|
|
||||||
title,
|
|
||||||
message
|
|
||||||
} = this.getTitleAndMessage(response);
|
|
||||||
this.toastNotificationError(title, message, response?.status === 0 ? 10000 : 5000);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.stepBack = () => {
|
|
||||||
const uuid = this.uuid;
|
|
||||||
const document = this.document;
|
|
||||||
const firstName = this.firstName;
|
|
||||||
const lastName = this.lastName;
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
uuid,
|
|
||||||
document,
|
|
||||||
firstName,
|
|
||||||
lastName
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.navController.navigateBack(['/identity-validator-full-name'], navigationOptions);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.activatedRoute.queryParams.subscribe(params => {
|
|
||||||
this.uuid = params.uuid ? params.uuid : '';
|
|
||||||
this.document = params.document ? params.document : '';
|
|
||||||
this.firstName = params.firstName ? params.firstName : '';
|
|
||||||
this.lastName = params.lastName ? params.lastName : '';
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
this.birthDateForm = this.formBuilder.group({
|
|
||||||
birthDate: ['']
|
|
||||||
});
|
|
||||||
this.sendVerificationEmailModalService.observable.subscribe(this.onSendVerificationEmailModalStateChange);
|
|
||||||
this.warnConflictModalService.observable.subscribe(this.onWarnConflictModalStateChange);
|
|
||||||
}
|
|
||||||
|
|
||||||
getTitleAndMessage(response) {
|
|
||||||
let title = '';
|
|
||||||
let message = '';
|
|
||||||
const codStatus = response?.status ? `(cod. ${response.status})` : '';
|
|
||||||
const status = response?.status;
|
|
||||||
message = `${this.translateConfigService.translate('TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE')} ${codStatus}`;
|
|
||||||
title = this.translateConfigService.translate('PG_IDENTIFY_FOREIGN_TOAST_SERVICE_ERROR_TITLE');
|
|
||||||
return {
|
|
||||||
title,
|
|
||||||
message
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
toastNotificationError(title, message, timeout) {
|
|
||||||
const notification = {
|
|
||||||
title,
|
|
||||||
message,
|
|
||||||
type: 'error',
|
|
||||||
timeout
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
IdentityValidatorBirthDatePage.ɵfac = function IdentityValidatorBirthDatePage_Factory(t) {
|
|
||||||
return new (t || IdentityValidatorBirthDatePage)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_8__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.ApiService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_9__.NavController), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_3__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.SendVerificationEmailModalService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.WarnConflictModalService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.LoadingService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.KeyboardService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NgZoneService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.DeviceInfoService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.ShowToastAndModalErroCodeZeroService));
|
|
||||||
};
|
|
||||||
|
|
||||||
IdentityValidatorBirthDatePage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
|
|
||||||
type: IdentityValidatorBirthDatePage,
|
|
||||||
selectors: [["app-identity-validator-birth-date"]],
|
|
||||||
decls: 22,
|
|
||||||
vars: 16,
|
|
||||||
consts: [[3, "ngStyle"], [1, "ion-margin-vertical"], [3, "formGroup", "ngSubmit"], [1, "input-holder"], ["for", "birthDate"], ["id", "birthDate", "type", "tel", "pattern", "\\d*", "formControlName", "birthDate", "appBirthDateDirective", "", 3, "placeholder"], [1, "button-holder"], ["type", "button", 1, "back", 3, "click"], ["type", "submit"]],
|
|
||||||
template: function IdentityValidatorBirthDatePage_Template(rf, ctx) {
|
|
||||||
if (rf & 1) {
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](0, "ion-content")(1, "ion-grid", 0)(2, "ion-row")(3, "ion-col", 1);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](4, "app-full-logo");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](5, "ion-row")(6, "ion-col", 1)(7, "form", 2);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("ngSubmit", function IdentityValidatorBirthDatePage_Template_form_ngSubmit_7_listener() {
|
|
||||||
return ctx.onSubmit();
|
|
||||||
});
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](8, "div", 3)(9, "label", 4);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](10);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](11, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](12, "input", 5);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](13, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](14, "div", 6)(15, "button", 7);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityValidatorBirthDatePage_Template_button_click_15_listener() {
|
|
||||||
return ctx.stepBack();
|
|
||||||
});
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](16);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](17, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](18, "button", 8);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](19);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](20, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()()();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](21, "app-privacy-footer");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rf & 2) {
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](1);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngStyle", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpureFunction1"](14, _c0, ctx.deviceInfoService.getDeviceHeight() + "px"));
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](6);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("formGroup", ctx.birthDateForm);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](11, 6, "PG_BITH_TEXT_BIRTHDATE"), " ");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("placeholder", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](13, 8, "PG_BITH_TEXT_INPUT"));
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](4);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](17, 10, "BTN_BACK"), " ");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](20, 12, "BTN_NEXT"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_4__.NgStyle, _ionic_angular__WEBPACK_IMPORTED_MODULE_9__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_9__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_9__.IonGrid, _ionic_angular__WEBPACK_IMPORTED_MODULE_9__.IonRow, _angular_forms__WEBPACK_IMPORTED_MODULE_8__["ɵNgNoValidate"], _angular_forms__WEBPACK_IMPORTED_MODULE_8__.DefaultValueAccessor, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.NgControlStatus, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.NgControlStatusGroup, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.PatternValidator, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.FormGroupDirective, _angular_forms__WEBPACK_IMPORTED_MODULE_8__.FormControlName, _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_5__.FullLogoComponent, _shared_components_privacy_footer_privacy_footer_component__WEBPACK_IMPORTED_MODULE_6__.PrivacyFooterComponent, _shared_directives__WEBPACK_IMPORTED_MODULE_7__.BirthDateDirectiveDirective, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_10__.TranslatePipe],
|
|
||||||
styles: ["\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsImZpbGUiOiJpZGVudGl0eS12YWxpZGF0b3ItYmlydGgtZGF0ZS5wYWdlLnNjc3MifQ== */"]
|
|
||||||
});
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2121.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,35 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2177],{
|
|
||||||
|
|
||||||
/***/ 12177:
|
|
||||||
/*!***************************************************************!*\
|
|
||||||
!*** ./node_modules/@capacitor/splash-screen/dist/esm/web.js ***!
|
|
||||||
\***************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "SplashScreenWeb": () => (/* binding */ SplashScreenWeb)
|
|
||||||
/* 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 _capacitor_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @capacitor/core */ 26549);
|
|
||||||
|
|
||||||
|
|
||||||
class SplashScreenWeb extends _capacitor_core__WEBPACK_IMPORTED_MODULE_1__.WebPlugin {
|
|
||||||
show(_options) {
|
|
||||||
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* () {
|
|
||||||
return undefined;
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
hide(_options) {
|
|
||||||
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* () {
|
|
||||||
return undefined;
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2177.js.map
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"2177.js","mappings":";;;;;;;;;;;;;;;AAAA;AACO,MAAMC,eAAN,SAA8BD,sDAA9B,CAAwC;EACrCE,IAAI,CAACC,QAAD,EAAW;IAAA;MACjB,OAAOC,SAAP;IADiB;EAEpB;;EACKC,IAAI,CAACF,QAAD,EAAW;IAAA;MACjB,OAAOC,SAAP;IADiB;EAEpB;;AAN0C,C","sources":["./node_modules/@capacitor/splash-screen/dist/esm/web.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class SplashScreenWeb extends WebPlugin {\n async show(_options) {\n return undefined;\n }\n async hide(_options) {\n return undefined;\n }\n}\n"],"names":["WebPlugin","SplashScreenWeb","show","_options","undefined","hide"],"sourceRoot":"webpack:///","x_google_ignoreList":[0]}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,995 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2268],{
|
|
||||||
|
|
||||||
/***/ 24140:
|
|
||||||
/*!****************************************************************************************************************!*\
|
|
||||||
!*** ./src/app/register/has-company/identity-email-confirmation/identity-email-confirmation-routing.module.ts ***!
|
|
||||||
\****************************************************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "IdentityEmailConfirmationPageRoutingModule": () => (/* binding */ IdentityEmailConfirmationPageRoutingModule)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/router */ 61380);
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_0__);
|
|
||||||
/* harmony import */ var _identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity-email-confirmation.page */ 17243);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_2__);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const routes = [
|
|
||||||
{
|
|
||||||
path: '',
|
|
||||||
component: _identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_1__.IdentityEmailConfirmationPage
|
|
||||||
}
|
|
||||||
];
|
|
||||||
class IdentityEmailConfirmationPageRoutingModule {
|
|
||||||
}
|
|
||||||
IdentityEmailConfirmationPageRoutingModule.ɵfac = function IdentityEmailConfirmationPageRoutingModule_Factory(t) { return new (t || IdentityEmailConfirmationPageRoutingModule)(); };
|
|
||||||
IdentityEmailConfirmationPageRoutingModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineNgModule"]({ type: IdentityEmailConfirmationPageRoutingModule });
|
|
||||||
IdentityEmailConfirmationPageRoutingModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵdefineInjector"]({ imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule.forChild(routes), _angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] });
|
|
||||||
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_2__["ɵɵsetNgModuleScope"](IdentityEmailConfirmationPageRoutingModule, { imports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule], exports: [_angular_router__WEBPACK_IMPORTED_MODULE_0__.RouterModule] }); })();
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 12268:
|
|
||||||
/*!********************************************************************************************************!*\
|
|
||||||
!*** ./src/app/register/has-company/identity-email-confirmation/identity-email-confirmation.module.ts ***!
|
|
||||||
\********************************************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "IdentityEmailConfirmationPageModule": () => (/* binding */ IdentityEmailConfirmationPageModule)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/common */ 90944);
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_0__);
|
|
||||||
/* harmony import */ var _identity_email_confirmation_routing_module__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./identity-email-confirmation-routing.module */ 24140);
|
|
||||||
/* harmony import */ var src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! src/app/shared-module/shared-module.module */ 69270);
|
|
||||||
/* harmony import */ var _identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./identity-email-confirmation.page */ 17243);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_4__);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class IdentityEmailConfirmationPageModule {
|
|
||||||
}
|
|
||||||
IdentityEmailConfirmationPageModule.ɵfac = function IdentityEmailConfirmationPageModule_Factory(t) { return new (t || IdentityEmailConfirmationPageModule)(); };
|
|
||||||
IdentityEmailConfirmationPageModule.ɵmod = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineNgModule"]({ type: IdentityEmailConfirmationPageModule });
|
|
||||||
IdentityEmailConfirmationPageModule.ɵinj = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵdefineInjector"]({ imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _angular_common__WEBPACK_IMPORTED_MODULE_0__.CommonModule, _identity_email_confirmation_routing_module__WEBPACK_IMPORTED_MODULE_1__.IdentityEmailConfirmationPageRoutingModule] });
|
|
||||||
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && _angular_core__WEBPACK_IMPORTED_MODULE_4__["ɵɵsetNgModuleScope"](IdentityEmailConfirmationPageModule, { declarations: [_identity_email_confirmation_page__WEBPACK_IMPORTED_MODULE_3__.IdentityEmailConfirmationPage], imports: [src_app_shared_module_shared_module_module__WEBPACK_IMPORTED_MODULE_2__.SharedModuleModule, _angular_common__WEBPACK_IMPORTED_MODULE_0__.CommonModule, _identity_email_confirmation_routing_module__WEBPACK_IMPORTED_MODULE_1__.IdentityEmailConfirmationPageRoutingModule] }); })();
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 17243:
|
|
||||||
/*!******************************************************************************************************!*\
|
|
||||||
!*** ./src/app/register/has-company/identity-email-confirmation/identity-email-confirmation.page.ts ***!
|
|
||||||
\******************************************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "IdentityEmailConfirmationPage": () => (/* binding */ IdentityEmailConfirmationPage)
|
|
||||||
/* 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 _angular_forms__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @angular/forms */ 2508);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
||||||
/* harmony import */ var _shared_services__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @shared/services */ 17253);
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @angular/router */ 61380);
|
|
||||||
/* harmony import */ var _angular_router__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_angular_router__WEBPACK_IMPORTED_MODULE_3__);
|
|
||||||
/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @ionic/angular */ 93819);
|
|
||||||
/* harmony import */ var _shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @shared/services/init.register.has-company.storage.service */ 91056);
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @angular/common */ 90944);
|
|
||||||
/* harmony import */ var _angular_common__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_angular_common__WEBPACK_IMPORTED_MODULE_5__);
|
|
||||||
/* harmony import */ var _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../../shared/components/full-logo/full-logo.component */ 33159);
|
|
||||||
/* harmony import */ var _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @ngx-translate/core */ 38699);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const _c0 = function (a0) {
|
|
||||||
return {
|
|
||||||
"min-height": a0,
|
|
||||||
"position": "relative"
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
class IdentityEmailConfirmationPage {
|
|
||||||
constructor(formBuilder, api, activatedRoute, notificatorService, loadingService, keyboardService, sendVerificationEmailModalService, warnConflictModalService, ngZoneService, deviceInfoService, navigationService, logService, translateConfigService, authService, storageService, deviceUuidService, platform, saveFlowStorageResetKeyService, utilsService, showToastModalErroCodeZero, initRegisterHasCompanyStorageService) {
|
|
||||||
var _this = this;
|
|
||||||
|
|
||||||
this.formBuilder = formBuilder;
|
|
||||||
this.api = api;
|
|
||||||
this.activatedRoute = activatedRoute;
|
|
||||||
this.notificatorService = notificatorService;
|
|
||||||
this.loadingService = loadingService;
|
|
||||||
this.keyboardService = keyboardService;
|
|
||||||
this.sendVerificationEmailModalService = sendVerificationEmailModalService;
|
|
||||||
this.warnConflictModalService = warnConflictModalService;
|
|
||||||
this.ngZoneService = ngZoneService;
|
|
||||||
this.deviceInfoService = deviceInfoService;
|
|
||||||
this.navigationService = navigationService;
|
|
||||||
this.logService = logService;
|
|
||||||
this.translateConfigService = translateConfigService;
|
|
||||||
this.authService = authService;
|
|
||||||
this.storageService = storageService;
|
|
||||||
this.deviceUuidService = deviceUuidService;
|
|
||||||
this.platform = platform;
|
|
||||||
this.saveFlowStorageResetKeyService = saveFlowStorageResetKeyService;
|
|
||||||
this.utilsService = utilsService;
|
|
||||||
this.showToastModalErroCodeZero = showToastModalErroCodeZero;
|
|
||||||
this.initRegisterHasCompanyStorageService = initRegisterHasCompanyStorageService;
|
|
||||||
this.obfuscatedEmail = undefined;
|
|
||||||
this.fullDataParans = {};
|
|
||||||
|
|
||||||
this.onSendVerificationEmailModalStateChange = /*#__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* (state) {
|
|
||||||
yield _this.ngZoneService.run(() => {
|
|
||||||
_this.showSendVerificationEmailModal = state.show;
|
|
||||||
_this.emailSendVerificationEmailModal = state.email;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return function (_x) {
|
|
||||||
return _ref.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
this.onWarnConflictModalStateChange = /*#__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* (state) {
|
|
||||||
yield _this.ngZoneService.run(() => {
|
|
||||||
_this.showWarnConflictModal = state.show;
|
|
||||||
_this.emailWarnConflictModal = state.email;
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
return function (_x2) {
|
|
||||||
return _ref2.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
this.onSubmit = /*#__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* () {
|
|
||||||
let uuidStorage = null;
|
|
||||||
uuidStorage = yield _this.getUniqueDeviceId();
|
|
||||||
_this.uuid = uuidStorage ?? '';
|
|
||||||
|
|
||||||
if (!_this.uuid || _this.uuid === null || _this.uuid === undefined || _this.uuid.length <= 0) {
|
|
||||||
_this.logService.logEvent('UUIID::in_Submit', 'Null UUID - Methodo Submit');
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const validationResult = _this.validateForm(_this.fullNameForm);
|
|
||||||
|
|
||||||
if (!validationResult) {
|
|
||||||
_this.logService.logError('user::register-full-name');
|
|
||||||
|
|
||||||
const notification = {
|
|
||||||
title: _this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_INVALID_DATA_TITLE'),
|
|
||||||
message: _this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_INVALID_DATA_MESSAGE'),
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
|
|
||||||
_this.notificatorService.notify(notification);
|
|
||||||
} else {
|
|
||||||
let onHideSubscription = null;
|
|
||||||
|
|
||||||
const onKeyboardHideCallback = () => {
|
|
||||||
if (onHideSubscription) {
|
|
||||||
onHideSubscription.unsubscribe();
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.loadingService.show(_this.translateConfigService.translate('LOADING_PROCESSING_DATA'), 'identity-validator-full-name');
|
|
||||||
|
|
||||||
const firstName = _this.getFirstName();
|
|
||||||
|
|
||||||
const lastName = _this.getLastName();
|
|
||||||
|
|
||||||
if (_this.foreign) {
|
|
||||||
const documentUppercase = _this.utilsService.convertToUppercase(_this.document);
|
|
||||||
|
|
||||||
_this.api.verifyForeignFullName(documentUppercase, firstName, lastName, _this.foreign).subscribe(_this.verifyFullNameSuccessResponse, _this.verifyFullNameErrorResponse);
|
|
||||||
} else {
|
|
||||||
_this.api.verifyFullName(_this.document, firstName, lastName, _this.foreign).subscribe(_this.verifyFullNameSuccessResponse, _this.verifyFullNameErrorResponse);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
onHideSubscription = _this.keyboardService.onHideObservable?.subscribe(onKeyboardHideCallback);
|
|
||||||
|
|
||||||
if (!_this.keyboardService.isVisible()) {
|
|
||||||
onKeyboardHideCallback();
|
|
||||||
} else {
|
|
||||||
_this.keyboardService.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.getFirstName = () => {
|
|
||||||
let fullName = this.fullNameForm.controls.fullName.value;
|
|
||||||
fullName = fullName.trim();
|
|
||||||
fullName = fullName.split(' ');
|
|
||||||
return fullName[0] ? fullName[0] : '';
|
|
||||||
};
|
|
||||||
|
|
||||||
this.getLastName = () => {
|
|
||||||
let fullName = this.fullNameForm.controls.fullName.value;
|
|
||||||
fullName = fullName.trim();
|
|
||||||
fullName = fullName.split(' ');
|
|
||||||
fullName = fullName.filter((namePiece, i) => i !== 0);
|
|
||||||
return fullName.join(' ');
|
|
||||||
};
|
|
||||||
|
|
||||||
this.validateForm = form => {
|
|
||||||
const firstName = this.getFirstName();
|
|
||||||
const lastName = this.getLastName();
|
|
||||||
|
|
||||||
if (firstName && lastName) {
|
|
||||||
const firstNameLength = firstName.length;
|
|
||||||
const lastNameLength = lastName.length;
|
|
||||||
return firstNameLength + lastNameLength > 2 && firstNameLength + lastNameLength < 255;
|
|
||||||
} else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.verifyFullNameForeignSuccessResponse = response => {
|
|
||||||
this.checkAccount();
|
|
||||||
};
|
|
||||||
|
|
||||||
this.verifyFullNameSuccessResponse = response => {
|
|
||||||
if (this.verifyIfMatch(response)) {
|
|
||||||
this.checkAccount();
|
|
||||||
} else {
|
|
||||||
this.logService.logEvent('user::register-full-name-no-match');
|
|
||||||
this.showErroNoMatchNameDocument(response);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.verifyFullNameErrorResponse = response => {
|
|
||||||
this.logService.logError('http::register-full-name', '', response);
|
|
||||||
|
|
||||||
if (response && response?.error && response?.error?.errorKey && response?.error.status === 400) {
|
|
||||||
const match = response?.error?.errorKey === 'notmatched' ? false : true;
|
|
||||||
|
|
||||||
if (this.verifyIfMatch({
|
|
||||||
matched: match
|
|
||||||
})) {
|
|
||||||
this.checkAccount();
|
|
||||||
} else {
|
|
||||||
this.showErroNoMatchNameDocument(response);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
||||||
if (response?.status === 0) {
|
|
||||||
this.showToastModalErroCodeZero.showToast();
|
|
||||||
this.logService.logError('http::register-full-name', 'Unknown error', response);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (response.status === 400) {
|
|
||||||
const notification = {
|
|
||||||
title: this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_ERROR_REQUEST_TITLE'),
|
|
||||||
message: `${this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_ERROR_REQUEST_MESSAGE')} (cod. 400)`,
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
return this.notificatorService.notify(notification);
|
|
||||||
} else if (response.status === 404) {
|
|
||||||
this.checkAccount();
|
|
||||||
} else {
|
|
||||||
let message;
|
|
||||||
|
|
||||||
if (this.foreign) {
|
|
||||||
message = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NOT_FOUND_MESSAGE');
|
|
||||||
}
|
|
||||||
|
|
||||||
const notification = {
|
|
||||||
title: this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_SERVICE_ERROR_TITLE'),
|
|
||||||
message,
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.checkAccount = () => {
|
|
||||||
const uuid = this.uuid;
|
|
||||||
const document = this.document;
|
|
||||||
const foreign = this.foreign;
|
|
||||||
const documentUppercase = foreign ? this.utilsService.convertToUppercase(document) : document;
|
|
||||||
this.api.accountCheck(uuid, documentUppercase, foreign).subscribe(this.accountCheckSuccessResponse, this.accountCheckErrorResponse);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.accountCheckSuccessResponse = response => {
|
|
||||||
const hasAnyCompany = response && response.hasAnyCompany;
|
|
||||||
const activated = response && response.activated;
|
|
||||||
const obfuscatedEmail = response && response.obfuscatedEmail ? response.obfuscatedEmail : '';
|
|
||||||
|
|
||||||
if (!this.context && hasAnyCompany && activated) {
|
|
||||||
this.context = 'has-company';
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
||||||
if (this.context === 'forgot-pin' || this.context === 'has-company') {
|
|
||||||
this.onSendVerificationEmail(obfuscatedEmail, response);
|
|
||||||
} else {
|
|
||||||
this.goToCompanyCodeStep(response);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.goToCompanyCodeStep = response => {
|
|
||||||
const activated = response.activated ? response.activated : false;
|
|
||||||
const email = response.obfuscatedEmail ? response.obfuscatedEmail : '';
|
|
||||||
const uuid = this.uuid;
|
|
||||||
const document = this.document;
|
|
||||||
const firstName = this.getFirstName();
|
|
||||||
const lastName = this.getLastName();
|
|
||||||
const conflict = false;
|
|
||||||
const foreign = this.foreign;
|
|
||||||
const documentUppercase = foreign ? this.utilsService.convertToUppercase(document) : document;
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
uuid,
|
|
||||||
document: documentUppercase,
|
|
||||||
firstName,
|
|
||||||
lastName,
|
|
||||||
email,
|
|
||||||
conflict,
|
|
||||||
activated,
|
|
||||||
foreign
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.accountCheckErrorResponse = response => {
|
|
||||||
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
||||||
if (response.status === 404) {
|
|
||||||
const uuid = this.uuid;
|
|
||||||
const document = this.document;
|
|
||||||
const firstName = this.getFirstName();
|
|
||||||
const lastName = this.getLastName();
|
|
||||||
const foreign = this.foreign;
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
uuid,
|
|
||||||
document,
|
|
||||||
firstName,
|
|
||||||
lastName,
|
|
||||||
foreign
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
||||||
} else if (response.status === 409) {
|
|
||||||
if (response.error.conflictType === 'notFound') {
|
|
||||||
// "notFound" achou alguém com o deviceId mas não tem uma conta para esse documento
|
|
||||||
const uuid = this.uuid;
|
|
||||||
const document = this.document;
|
|
||||||
const firstName = this.getFirstName();
|
|
||||||
const lastName = this.getLastName();
|
|
||||||
const conflict = 'notFound';
|
|
||||||
const foreign = this.foreign;
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
uuid,
|
|
||||||
document,
|
|
||||||
firstName,
|
|
||||||
lastName,
|
|
||||||
conflict,
|
|
||||||
foreign
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
||||||
} else if (response.error.conflictType === 'found') {
|
|
||||||
// "found" achou ou não achou alguém com o deviceId mas tem uma conta com esse documento
|
|
||||||
const hasAnyCompany = response && response.error.hasAnyCompany;
|
|
||||||
const activated = response && response.error.activated;
|
|
||||||
|
|
||||||
if (!this.context && hasAnyCompany && activated) {
|
|
||||||
this.context = 'has-company';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.context === 'has-company') {
|
|
||||||
this.onSendVerificationEmail(response.error.params || null);
|
|
||||||
} else {
|
|
||||||
const email = response.error.params;
|
|
||||||
const uuid = this.uuid;
|
|
||||||
const document = this.document;
|
|
||||||
const firstName = this.getFirstName();
|
|
||||||
const lastName = this.getLastName();
|
|
||||||
const conflict = 'found';
|
|
||||||
const foreign = this.foreign;
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
uuid,
|
|
||||||
document,
|
|
||||||
firstName,
|
|
||||||
lastName,
|
|
||||||
email,
|
|
||||||
conflict,
|
|
||||||
foreign
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.navigationService.forward(['/identity-validator-company-code'], navigationOptions);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.logService.logError('http::account-check', '', response);
|
|
||||||
const notification = {
|
|
||||||
title: this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_SERVICE_ERROR_TITLE'),
|
|
||||||
message: `${this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_CHECKING_DATA_ERROR_MESSAGE')} (cod. ${response.status})`,
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
this.stepBack = () => {
|
|
||||||
const document = this.document;
|
|
||||||
const uuid = this.uuid;
|
|
||||||
const foreign = this.foreign;
|
|
||||||
const context = this.context;
|
|
||||||
|
|
||||||
if (foreign) {
|
|
||||||
const documentUppercase = this.utilsService.convertToUppercase(document);
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
document: documentUppercase,
|
|
||||||
uuid,
|
|
||||||
foreign,
|
|
||||||
context
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.navigationService.back(['/foreign-document'], navigationOptions);
|
|
||||||
} else {
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
document,
|
|
||||||
uuid,
|
|
||||||
foreign,
|
|
||||||
context
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.navigationService.back(['/identity-validator'], navigationOptions);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.onSendVerificationEmailModalBack = () => {
|
|
||||||
this.sendVerificationEmailModalService.hideModal();
|
|
||||||
};
|
|
||||||
|
|
||||||
this.onSendVerificationEmail = /*#__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* (obfuscatedEmail = null, response) {
|
|
||||||
const uuid = _this.uuid;
|
|
||||||
const document = _this.document;
|
|
||||||
const foreign = _this.foreign;
|
|
||||||
const firstName = _this.firstName;
|
|
||||||
const lastName = _this.lastName;
|
|
||||||
const documentUppercase = foreign ? _this.utilsService.convertToUppercase(document) : document;
|
|
||||||
|
|
||||||
_this.loadingService.show(_this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_LOADING_SEND_MAIL'), 'send-email-verification');
|
|
||||||
|
|
||||||
const isInitForgot = yield _this.saveFlowStorageResetKeyService.getInitForgot();
|
|
||||||
|
|
||||||
if (response && isInitForgot && isInitForgot?.isInitiatedForgotten || _this.context === 'forgot-pin') {
|
|
||||||
const currentLangKey = _this.translateConfigService.getCurrentLang() === 'pt' ? 'pt-Br' : _this.translateConfigService.getCurrentLang(); // TODO: pegar do storage essas informações abaixo. (email, firstname, refid, document)
|
|
||||||
|
|
||||||
const email = response?.email ?? '';
|
|
||||||
const langKey = currentLangKey;
|
|
||||||
const refId = (yield _this.authService.getRefId()) ?? null;
|
|
||||||
const resetKey = '';
|
|
||||||
|
|
||||||
_this.saveFlowStorageResetKeyService.setDataResetKeyInit({
|
|
||||||
refId,
|
|
||||||
firstName,
|
|
||||||
email,
|
|
||||||
obfuscatedEmail,
|
|
||||||
langKey,
|
|
||||||
document,
|
|
||||||
resetKey
|
|
||||||
});
|
|
||||||
|
|
||||||
const documentUppercase = foreign ? _this.utilsService.convertToUppercase(document) : document;
|
|
||||||
|
|
||||||
_this.api.accountDeviceResetInit(uuid, documentUppercase, foreign, {
|
|
||||||
refId,
|
|
||||||
firstName,
|
|
||||||
email,
|
|
||||||
langKey,
|
|
||||||
resetKey
|
|
||||||
}).subscribe(() => _this.accountDeviceResetInitSuccessResponse(obfuscatedEmail), error => _this.accountDeviceResetInitErrorResponse(error));
|
|
||||||
} else {
|
|
||||||
_this.api.accountDeviceResetInit(uuid, documentUppercase, foreign, null).subscribe(() => _this.accountDeviceResetInitSuccessResponse(obfuscatedEmail), error => _this.accountDeviceResetInitErrorResponse(error));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.onWarnConflictModalBack = () => {
|
|
||||||
this.warnConflictModalService.hideModal();
|
|
||||||
};
|
|
||||||
|
|
||||||
this.onWarnConflictModalAccept = () => {
|
|
||||||
const email = this.email;
|
|
||||||
this.warnConflictModalService.hideModal();
|
|
||||||
this.sendVerificationEmailModalService.showModal(email);
|
|
||||||
};
|
|
||||||
|
|
||||||
this.accountDeviceResetInitSuccessResponse = /*#__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* (obfuscatedEmail = null) {
|
|
||||||
yield _this.loadingService.hide(null, 'send-email-verification');
|
|
||||||
const uuid = _this.uuid;
|
|
||||||
const document = _this.document;
|
|
||||||
const firstName = _this.firstName;
|
|
||||||
const lastName = _this.lastName;
|
|
||||||
const email = _this.email;
|
|
||||||
const context = _this.context;
|
|
||||||
const foreign = _this.foreign;
|
|
||||||
const documentUppercase = foreign ? _this.utilsService.convertToUppercase(document) : document;
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
uuid,
|
|
||||||
document: documentUppercase,
|
|
||||||
firstName,
|
|
||||||
lastName,
|
|
||||||
email,
|
|
||||||
context,
|
|
||||||
foreign,
|
|
||||||
obfuscatedEmail
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
_this.sendVerificationEmailModalService.hideModal();
|
|
||||||
|
|
||||||
if (_this.context === 'forgot-pin') {
|
|
||||||
_this.navigationService.forward(['/identity-insert-password'], navigationOptions);
|
|
||||||
} else {
|
|
||||||
const data = _this.initRegisterHasCompanyStorageService.get();
|
|
||||||
|
|
||||||
if (data) {
|
|
||||||
console.log('data', data);
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.navigationService.forward(['has-company/identity-validator-code']);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.accountDeviceResetInitErrorResponse = /*#__PURE__*/function () {
|
|
||||||
var _ref6 = (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* (response) {
|
|
||||||
console.log('accountCheckErrorResponse');
|
|
||||||
console.log('response:', response);
|
|
||||||
|
|
||||||
_this.logService.logError('http::account-device-reset-init', '', response);
|
|
||||||
|
|
||||||
yield _this.loadingService.hide(null, 'send-email-verification');
|
|
||||||
|
|
||||||
if (response?.status === 0) {
|
|
||||||
_this.showToastModalErroCodeZero.showToast();
|
|
||||||
|
|
||||||
_this.logService.logError('http::account-device-reset-init', 'Unknown error', response);
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const {
|
|
||||||
title,
|
|
||||||
message
|
|
||||||
} = _this.getTitleAndMessage(response);
|
|
||||||
|
|
||||||
_this.toastNotificationError(title, message, 1000);
|
|
||||||
});
|
|
||||||
|
|
||||||
return function (_x3) {
|
|
||||||
return _ref6.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
this.getUniqueDeviceId = /*#__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* () {
|
|
||||||
let uuidStorage = '';
|
|
||||||
const storageIsReady = yield _this.storageService.ready();
|
|
||||||
|
|
||||||
if (storageIsReady) {
|
|
||||||
uuidStorage = yield _this.authService.getUUID();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!uuidStorage || uuidStorage === undefined || uuidStorage === null) {
|
|
||||||
return _this.deviceUuidService.getUUID().then(_this.onGetUniqueDeviceIdSuccessResponse).catch(_this.onGetUniqueDeviceIdErrorResponse);
|
|
||||||
} else {
|
|
||||||
_this.uuid = uuidStorage;
|
|
||||||
return _this.uuid;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.onGetUniqueDeviceIdSuccessResponse = /*#__PURE__*/function () {
|
|
||||||
var _ref8 = (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* (uuid) {
|
|
||||||
try {
|
|
||||||
const saveUUID = yield _this.saveUUIDStorage(uuid);
|
|
||||||
_this.uuid = saveUUID.uuid;
|
|
||||||
return saveUUID.uuid;
|
|
||||||
} catch (error) {
|
|
||||||
return error;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
return function (_x4) {
|
|
||||||
return _ref8.apply(this, arguments);
|
|
||||||
};
|
|
||||||
}();
|
|
||||||
|
|
||||||
this.onGetUniqueDeviceIdErrorResponse = error => {
|
|
||||||
const message = this.translateConfigService.translate('PG_START_TOAST_AUTHORIZE');
|
|
||||||
const title = this.translateConfigService.translate('PG_START_TOAST_NOTICE_TITLE');
|
|
||||||
const notification = {
|
|
||||||
title,
|
|
||||||
message,
|
|
||||||
type: 'error'
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
}; // this.activatedRoute.queryParams.subscribe(params => {
|
|
||||||
// this.document = params.document ? params.document : '';
|
|
||||||
// this.context = params.context ? params.context : '';
|
|
||||||
// this.obfuscatedEmail = params?.obfuscatedEmail ?? '';
|
|
||||||
// this.foreign = params?.foreign === 'true';
|
|
||||||
// this.uuid = params?.uuid ?? null;
|
|
||||||
// this.firstName = params?.firstName ?? '';
|
|
||||||
// this.lastName = params?.lastName ?? '';
|
|
||||||
// this.email = params.email ? params.email : '';
|
|
||||||
// this.conflict = params.conflict ? params.conflict : '';
|
|
||||||
// this.fullDataParans = params;
|
|
||||||
// console.log(this.fullDataParans);
|
|
||||||
// });
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
ionViewWillEnter() {
|
|
||||||
const data = this.getDataRegisterHasCompanyStorageService();
|
|
||||||
|
|
||||||
if (data) {
|
|
||||||
this.document = data?.document ?? '';
|
|
||||||
this.context = data?.context ?? '';
|
|
||||||
this.obfuscatedEmail = data?.obfuscatedEmail ?? '';
|
|
||||||
this.foreign = data?.foreign === 'true' || data?.foreign === true;
|
|
||||||
this.uuid = data?.uuid ?? null;
|
|
||||||
this.firstName = data?.firstName ?? '';
|
|
||||||
this.lastName = data?.lastName ?? '';
|
|
||||||
this.email = data?.email ?? '';
|
|
||||||
this.conflict = data?.conflict ?? '';
|
|
||||||
console.log('onViewWillEnter page-main-confirmation', data);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
|
||||||
console.log('onInit');
|
|
||||||
this.fullNameForm = this.formBuilder.group({
|
|
||||||
fullName: ['', [_angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.required, _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.minLength(3), _angular_forms__WEBPACK_IMPORTED_MODULE_7__.Validators.maxLength(5)]]
|
|
||||||
});
|
|
||||||
this.sendVerificationEmailModalService.observable.subscribe(this.onSendVerificationEmailModalStateChange);
|
|
||||||
this.warnConflictModalService.observable.subscribe(this.onWarnConflictModalStateChange);
|
|
||||||
}
|
|
||||||
|
|
||||||
getDataRegisterHasCompanyStorageService() {
|
|
||||||
return this.initRegisterHasCompanyStorageService.get();
|
|
||||||
}
|
|
||||||
|
|
||||||
verifyIfMatch(data) {
|
|
||||||
return data.matched;
|
|
||||||
}
|
|
||||||
|
|
||||||
onHasEmailAccess(obfuscatedEmail) {
|
|
||||||
this.onSendVerificationEmail(obfuscatedEmail);
|
|
||||||
}
|
|
||||||
|
|
||||||
notHasEmailAccess(obfuscatedEmail) {
|
|
||||||
const data = this.initRegisterHasCompanyStorageService.get();
|
|
||||||
|
|
||||||
if (data) {
|
|
||||||
const activated = data?.activated;
|
|
||||||
const hasAnyCompany = data?.hasAnyCompany;
|
|
||||||
const uuid = data?.uuid;
|
|
||||||
const document = data?.document;
|
|
||||||
const foreign = data?.foreign;
|
|
||||||
const firstName = data?.firstName;
|
|
||||||
const lastName = data?.lastName;
|
|
||||||
const context = data?.context;
|
|
||||||
const conflict = data?.conflict;
|
|
||||||
const email = data?.email;
|
|
||||||
const documentUppercase = this.utilsService.convertToUppercase(document);
|
|
||||||
const navigationOptions = {
|
|
||||||
queryParams: {
|
|
||||||
document: documentUppercase,
|
|
||||||
uuid,
|
|
||||||
foreign,
|
|
||||||
firstName,
|
|
||||||
lastName,
|
|
||||||
conflict,
|
|
||||||
context
|
|
||||||
}
|
|
||||||
};
|
|
||||||
this.initRegisterHasCompanyStorageService.set({ ...data
|
|
||||||
});
|
|
||||||
|
|
||||||
if (this.context === 'forgot-pin') {
|
|
||||||
this.navigationService.forward(['/identity-insert-password'], navigationOptions);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.navigationService.forward(['has-company/identity-validator-code-company']);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
back() {
|
|
||||||
this.navigationService.back(['/identity-validator-full-name']);
|
|
||||||
}
|
|
||||||
|
|
||||||
getTitleAndMessage(response) {
|
|
||||||
const title = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_SERVICE_ERROR_TITLE');
|
|
||||||
const message = `${this.translateConfigService.translate('TOAST_SERVICE_TEMPORARILY_UNAVAILABLE_MESSAGE')} (cod. ${response.status})`;
|
|
||||||
return {
|
|
||||||
title,
|
|
||||||
message
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
toastNotificationError(title, message, timeout) {
|
|
||||||
const notification = {
|
|
||||||
title,
|
|
||||||
message,
|
|
||||||
type: 'error',
|
|
||||||
timeout
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
}
|
|
||||||
|
|
||||||
saveUUIDStorage(uuid) {
|
|
||||||
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* () {
|
|
||||||
let resUUID = {
|
|
||||||
uuid: '',
|
|
||||||
success: false
|
|
||||||
};
|
|
||||||
|
|
||||||
try {
|
|
||||||
yield _this2.platform.ready();
|
|
||||||
|
|
||||||
try {
|
|
||||||
const storageIsReady = yield _this2.storageService.ready();
|
|
||||||
|
|
||||||
if (storageIsReady) {
|
|
||||||
try {
|
|
||||||
yield _this2.authService.setUUID(uuid);
|
|
||||||
resUUID = {
|
|
||||||
uuid,
|
|
||||||
success: true
|
|
||||||
};
|
|
||||||
|
|
||||||
_this2.logService.logEvent('setUUIDIdentityValidadeFullName::', 'Success save UUID in storage', resUUID);
|
|
||||||
|
|
||||||
return resUUID;
|
|
||||||
} catch (error) {
|
|
||||||
resUUID = { ...error,
|
|
||||||
uuid: null,
|
|
||||||
success: false
|
|
||||||
};
|
|
||||||
|
|
||||||
_this2.logService.logError('ErrorSetUUIDIdentityValidadeFullName::', 'erro save UUID in storage', resUUID);
|
|
||||||
|
|
||||||
throw resUUID;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
_this2.logService.logError('ErrorstorageIdentityValidadeFullName::', 'not avaliable storage ready', error);
|
|
||||||
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
_this2.logService.logError('platformReadyStartPage::', 'not avaliable platform ready', error);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
showErroNoMatchNameDocument(response) {
|
|
||||||
this.logService.logError('NoMatchNameDocument', '', {
|
|
||||||
data: response
|
|
||||||
});
|
|
||||||
this.loadingService.hide(null, 'identity-validator-full-name').then(() => {
|
|
||||||
let message;
|
|
||||||
let title;
|
|
||||||
|
|
||||||
if (this.foreign) {
|
|
||||||
title = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_FOREIGN_TITLE');
|
|
||||||
message = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_FOREIGN_MESSAGE');
|
|
||||||
} else {
|
|
||||||
title = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_TITLE');
|
|
||||||
message = this.translateConfigService.translate('PG_IDENTIFY_FULLNAME_TOAST_NO_MATCH_MESSAGE');
|
|
||||||
}
|
|
||||||
|
|
||||||
const notification = {
|
|
||||||
title,
|
|
||||||
message,
|
|
||||||
type: 'error',
|
|
||||||
timeout: 8000
|
|
||||||
};
|
|
||||||
this.notificatorService.notify(notification);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
IdentityEmailConfirmationPage.ɵfac = function IdentityEmailConfirmationPage_Factory(t) {
|
|
||||||
return new (t || IdentityEmailConfirmationPage)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_forms__WEBPACK_IMPORTED_MODULE_7__.UntypedFormBuilder), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.ApiService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_angular_router__WEBPACK_IMPORTED_MODULE_3__.ActivatedRoute), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NotificatorService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.LoadingService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.KeyboardService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.SendVerificationEmailModalService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.WarnConflictModalService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NgZoneService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.DeviceInfoService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.NavigationService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.LogService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.TranslateConfigService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.AuthService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.StorageService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.DeviceUuidService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_ionic_angular__WEBPACK_IMPORTED_MODULE_8__.Platform), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.SaveFlowStorageResetKeyService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.UtilsService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services__WEBPACK_IMPORTED_MODULE_2__.ShowToastAndModalErroCodeZeroService), _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdirectiveInject"](_shared_services_init_register_has_company_storage_service__WEBPACK_IMPORTED_MODULE_4__.InitRegisterHasCompanyStorageService));
|
|
||||||
};
|
|
||||||
|
|
||||||
IdentityEmailConfirmationPage.ɵcmp = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineComponent"]({
|
|
||||||
type: IdentityEmailConfirmationPage,
|
|
||||||
selectors: [["app-identity-email-confirmation"]],
|
|
||||||
decls: 24,
|
|
||||||
vars: 16,
|
|
||||||
consts: [[1, "ion-no-border", 2, "height", "0"], [3, "ngStyle"], [1, "ion-margin-vertical"], [1, "flex-auto"], ["size", "12"], [1, "hasEmail"], [1, "button-holder", "btns"], [1, "btn_default", 3, "click"], [1, "button-holder", "footer"], [1, "back", 3, "click"]],
|
|
||||||
template: function IdentityEmailConfirmationPage_Template(rf, ctx) {
|
|
||||||
if (rf & 1) {
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](0, "ion-header", 0);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](1, "ion-content")(2, "ion-grid", 1)(3, "ion-row")(4, "ion-col", 2);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](5, "app-full-logo");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](6, "ion-row", 3)(7, "ion-col", 4)(8, "div", 5);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](9);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](10, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelement"](11, "br");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](12);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](13, "div", 6)(14, "button", 7);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityEmailConfirmationPage_Template_button_click_14_listener() {
|
|
||||||
return ctx.onHasEmailAccess(ctx.obfuscatedEmail);
|
|
||||||
});
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](15);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](16, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](17, "button", 7);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityEmailConfirmationPage_Template_button_click_17_listener() {
|
|
||||||
return ctx.notHasEmailAccess(ctx.obfuscatedEmail);
|
|
||||||
});
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](18);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](19, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()();
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementStart"](20, "div", 8)(21, "button", 9);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵlistener"]("click", function IdentityEmailConfirmationPage_Template_button_click_21_listener() {
|
|
||||||
return ctx.back();
|
|
||||||
});
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtext"](22);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipe"](23, "translate");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵelementEnd"]()()()();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (rf & 2) {
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](2);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵproperty"]("ngStyle", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpureFunction1"](14, _c0, ctx.deviceInfoService.getDeviceHeight() + "px"));
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](7);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](10, 6, "HAS_COMPANY_REGISTER.EMAIL_CONFIRMATION_EMAIL.DO_YOU_STILL_HAVE_ACCESS_TO_THE_EMAIL"), " ");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", ctx.obfuscatedEmail, "? ");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](16, 8, "TEXT_YES"), " ");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](3);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate1"](" ", _angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](19, 10, "TEXT_NOT"), " ");
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵadvance"](4);
|
|
||||||
_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵtextInterpolate"](_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵpipeBind1"](23, 12, "BTN_BACK"));
|
|
||||||
}
|
|
||||||
},
|
|
||||||
dependencies: [_angular_common__WEBPACK_IMPORTED_MODULE_5__.NgStyle, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonCol, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonContent, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonGrid, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonHeader, _ionic_angular__WEBPACK_IMPORTED_MODULE_8__.IonRow, _shared_components_full_logo_full_logo_component__WEBPACK_IMPORTED_MODULE_6__.FullLogoComponent, _ngx_translate_core__WEBPACK_IMPORTED_MODULE_9__.TranslatePipe],
|
|
||||||
styles: [".hasEmail[_ngcontent-%COMP%] {\n display: flex;\n position: relative;\n justify-content: space-around;\n align-items: center;\n text-align: center;\n margin: 3em 0 6em 0;\n font-size: 1.1em;\n width: 100%;\n}\n\n.button-holder.footer[_ngcontent-%COMP%] {\n display: flex;\n justify-content: center;\n margin: 0 auto;\n padding-bottom: 2em;\n}\n\n.btn_default[_ngcontent-%COMP%] {\n width: 40%;\n font-weight: 800;\n}\n/*# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImlkZW50aXR5LWVtYWlsLWNvbmZpcm1hdGlvbi5wYWdlLnNjc3MiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUE7RUFDRSxhQUFBO0VBQ0Esa0JBQUE7RUFDQSw2QkFBQTtFQUNBLG1CQUFBO0VBQ0Esa0JBQUE7RUFDQSxtQkFBQTtFQUNBLGdCQUFBO0VBQ0EsV0FBQTtBQUNGOztBQUVBO0VBQ0UsYUFBQTtFQUNBLHVCQUFBO0VBQ0EsY0FBQTtFQUNBLG1CQUFBO0FBQ0Y7O0FBRUE7RUFDRSxVQUFBO0VBQ0EsZ0JBQUE7QUFDRiIsImZpbGUiOiJpZGVudGl0eS1lbWFpbC1jb25maXJtYXRpb24ucGFnZS5zY3NzIiwic291cmNlc0NvbnRlbnQiOlsiLmhhc0VtYWlsIHtcbiAgZGlzcGxheTogZmxleDtcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBqdXN0aWZ5LWNvbnRlbnQ6IHNwYWNlLWFyb3VuZDtcbiAgYWxpZ24taXRlbXM6IGNlbnRlcjtcbiAgdGV4dC1hbGlnbjogY2VudGVyO1xuICBtYXJnaW46IDNlbSAwIDZlbSAwO1xuICBmb250LXNpemU6IDEuMWVtO1xuICB3aWR0aDogMTAwJTtcbn1cblxuLmJ1dHRvbi1ob2xkZXIuZm9vdGVyIHtcbiAgZGlzcGxheTogZmxleDtcbiAganVzdGlmeS1jb250ZW50OiBjZW50ZXI7XG4gIG1hcmdpbjogMCBhdXRvO1xuICBwYWRkaW5nLWJvdHRvbTogMmVtO1xufVxuXG4uYnRuX2RlZmF1bHQge1xuICB3aWR0aDogNDAlO1xuICBmb250LXdlaWdodDogODAwO1xufVxuIl19 */"]
|
|
||||||
});
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 91056:
|
|
||||||
/*!******************************************************************************!*\
|
|
||||||
!*** ./src/app/shared/services/init.register.has-company.storage.service.ts ***!
|
|
||||||
\******************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "InitRegisterHasCompanyStorageService": () => (/* binding */ InitRegisterHasCompanyStorageService)
|
|
||||||
/* 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 _angular_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_1__);
|
|
||||||
/* harmony import */ var _simple_storage_service__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./simple.storage.service */ 19725);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class InitRegisterHasCompanyStorageService {
|
|
||||||
constructor(simpleStorageService) {
|
|
||||||
this.simpleStorageService = simpleStorageService;
|
|
||||||
this.KEY = 'REGISTER_HAS_COMPANY';
|
|
||||||
this.cache = null; // Cache em memória opcional
|
|
||||||
}
|
|
||||||
|
|
||||||
set(data) {
|
|
||||||
this.simpleStorageService.set(this.KEY, data);
|
|
||||||
this.cache = data; // Atualiza o cache
|
|
||||||
}
|
|
||||||
|
|
||||||
get() {
|
|
||||||
const data = this.simpleStorageService.get(this.KEY);
|
|
||||||
this.cache = data; // Atualiza o cache
|
|
||||||
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
|
|
||||||
remove() {
|
|
||||||
var _this = 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* () {
|
|
||||||
_this.simpleStorageService.remove(_this.KEY);
|
|
||||||
|
|
||||||
_this.cache = null; // Limpa o cache
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
InitRegisterHasCompanyStorageService.ɵfac = function InitRegisterHasCompanyStorageService_Factory(t) {
|
|
||||||
return new (t || InitRegisterHasCompanyStorageService)(_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵinject"](_simple_storage_service__WEBPACK_IMPORTED_MODULE_2__.SimpleStorageService));
|
|
||||||
};
|
|
||||||
|
|
||||||
InitRegisterHasCompanyStorageService.ɵprov = /*@__PURE__*/_angular_core__WEBPACK_IMPORTED_MODULE_1__["ɵɵdefineInjectable"]({
|
|
||||||
token: InitRegisterHasCompanyStorageService,
|
|
||||||
factory: InitRegisterHasCompanyStorageService.ɵfac,
|
|
||||||
providedIn: 'root'
|
|
||||||
});
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 19725:
|
|
||||||
/*!***********************************************************!*\
|
|
||||||
!*** ./src/app/shared/services/simple.storage.service.ts ***!
|
|
||||||
\***********************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "SimpleStorageService": () => (/* binding */ SimpleStorageService)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @angular/core */ 45449);
|
|
||||||
/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_angular_core__WEBPACK_IMPORTED_MODULE_0__);
|
|
||||||
|
|
||||||
class SimpleStorageService {
|
|
||||||
constructor() { }
|
|
||||||
set(key, value) {
|
|
||||||
localStorage.setItem(key, JSON.stringify(value));
|
|
||||||
}
|
|
||||||
get(key) {
|
|
||||||
const item = JSON.parse(localStorage.getItem(key));
|
|
||||||
return item ?? null;
|
|
||||||
}
|
|
||||||
remove(key) {
|
|
||||||
localStorage.removeItem(key);
|
|
||||||
}
|
|
||||||
clear() {
|
|
||||||
localStorage.clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
SimpleStorageService.ɵfac = function SimpleStorageService_Factory(t) { return new (t || SimpleStorageService)(); };
|
|
||||||
SimpleStorageService.ɵprov = /*@__PURE__*/ _angular_core__WEBPACK_IMPORTED_MODULE_0__["ɵɵdefineInjectable"]({ token: SimpleStorageService, factory: SimpleStorageService.ɵfac, providedIn: 'root' });
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2268.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,635 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2275],{
|
|
||||||
|
|
||||||
/***/ 32275:
|
|
||||||
/*!************************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/ion-picker-internal.entry.js ***!
|
|
||||||
\************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "ion_picker_internal": () => (/* binding */ PickerInternal)
|
|
||||||
/* 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 _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const pickerInternalIosCss = ":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{left:0;top:0;height:83px}:host-context([dir=rtl]){left:unset;right:unset;right:0}:host .picker-after{left:0;top:116px;height:84px}:host-context([dir=rtl]){left:unset;right:unset;right:0}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:-1}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .picker-highlight{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(20%, var(--background, var(--ion-background-color, #fff))), to(rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0.8) 100%)}:host .picker-highlight{background:var(--ion-color-step-150, #eeeeef)}";
|
|
||||||
const pickerInternalMdCss = ":host{display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:200px;direction:ltr;z-index:0}:host .picker-before,:host .picker-after{position:absolute;width:100%;-webkit-transform:translateZ(0);transform:translateZ(0);z-index:1;pointer-events:none}:host .picker-before{left:0;top:0;height:83px}:host-context([dir=rtl]){left:unset;right:unset;right:0}:host .picker-after{left:0;top:116px;height:84px}:host-context([dir=rtl]){left:unset;right:unset;right:0}:host .picker-highlight{border-radius:8px;left:0;right:0;top:50%;bottom:0;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;position:absolute;width:calc(100% - 16px);height:34px;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:-1}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host .picker-highlight{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}:host input{position:absolute;top:0;left:0;right:0;bottom:0;width:100%;height:100%;margin:0;padding:0;border:0;outline:0;clip:rect(0 0 0 0);opacity:0;overflow:hidden;-webkit-appearance:none;-moz-appearance:none}:host ::slotted(ion-picker-column-internal:first-of-type){text-align:start}:host ::slotted(ion-picker-column-internal:last-of-type){text-align:end}:host ::slotted(ion-picker-column-internal:only-child){text-align:center}:host .picker-before{background:-webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--background, var(--ion-background-color, #fff))), color-stop(90%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0)));background:linear-gradient(to bottom, var(--background, var(--ion-background-color, #fff)) 20%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0) 90%)}:host .picker-after{background:-webkit-gradient(linear, left bottom, left top, color-stop(30%, var(--background, var(--ion-background-color, #fff))), color-stop(90%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0)));background:linear-gradient(to top, var(--background, var(--ion-background-color, #fff)) 30%, rgba(var(--background-rgb, var(--ion-background-color-rgb, 255, 255, 255)), 0) 90%)}";
|
|
||||||
const PickerInternal = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
||||||
this.ionInputModeChange = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionInputModeChange", 7);
|
|
||||||
this.useInputMode = false;
|
|
||||||
|
|
||||||
this.isInHighlightBounds = ev => {
|
|
||||||
const {
|
|
||||||
highlightEl
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (!highlightEl) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const bbox = highlightEl.getBoundingClientRect();
|
|
||||||
/**
|
|
||||||
* Check to see if the user clicked
|
|
||||||
* outside the bounds of the highlight.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const outsideX = ev.clientX < bbox.left || ev.clientX > bbox.right;
|
|
||||||
const outsideY = ev.clientY < bbox.top || ev.clientY > bbox.bottom;
|
|
||||||
|
|
||||||
if (outsideX || outsideY) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* If we are no longer focused
|
|
||||||
* on a picker column, then we should
|
|
||||||
* exit input mode. An exception is made
|
|
||||||
* for the input in the picker since having
|
|
||||||
* that focused means we are still in input mode.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.onFocusOut = ev => {
|
|
||||||
// TODO(FW-2832): type
|
|
||||||
const {
|
|
||||||
relatedTarget
|
|
||||||
} = ev;
|
|
||||||
|
|
||||||
if (!relatedTarget || relatedTarget.tagName !== 'ION-PICKER-COLUMN-INTERNAL' && relatedTarget !== this.inputEl) {
|
|
||||||
this.exitInputMode();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* When picker columns receive focus
|
|
||||||
* the parent picker needs to determine
|
|
||||||
* whether to enter/exit input mode.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.onFocusIn = ev => {
|
|
||||||
// TODO(FW-2832): type
|
|
||||||
const {
|
|
||||||
target
|
|
||||||
} = ev;
|
|
||||||
/**
|
|
||||||
* Due to browser differences in how/when focus
|
|
||||||
* is dispatched on certain elements, we need to
|
|
||||||
* make sure that this function only ever runs when
|
|
||||||
* focusing a picker column.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (target.tagName !== 'ION-PICKER-COLUMN-INTERNAL') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* If we have actionOnClick
|
|
||||||
* then this means the user focused
|
|
||||||
* a picker column via mouse or
|
|
||||||
* touch (i.e. a PointerEvent). As a result,
|
|
||||||
* we should not enter/exit input mode
|
|
||||||
* until the click event has fired, which happens
|
|
||||||
* after the `focusin` event.
|
|
||||||
*
|
|
||||||
* Otherwise, the user likely focused
|
|
||||||
* the column using their keyboard and
|
|
||||||
* we should enter/exit input mode automatically.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
if (!this.actionOnClick) {
|
|
||||||
const columnEl = target;
|
|
||||||
const allowInput = columnEl.numericInput;
|
|
||||||
|
|
||||||
if (allowInput) {
|
|
||||||
this.enterInputMode(columnEl, false);
|
|
||||||
} else {
|
|
||||||
this.exitInputMode();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* On click we need to run an actionOnClick
|
|
||||||
* function that has been set in onPointerDown
|
|
||||||
* so that we enter/exit input mode correctly.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.onClick = () => {
|
|
||||||
const {
|
|
||||||
actionOnClick
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (actionOnClick) {
|
|
||||||
actionOnClick();
|
|
||||||
this.actionOnClick = undefined;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Clicking a column also focuses the column on
|
|
||||||
* certain browsers, so we use onPointerDown
|
|
||||||
* to tell the onFocusIn function that users
|
|
||||||
* are trying to click the column rather than
|
|
||||||
* focus the column using the keyboard. When the
|
|
||||||
* user completes the click, the onClick function
|
|
||||||
* runs and runs the actionOnClick callback.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.onPointerDown = ev => {
|
|
||||||
const {
|
|
||||||
useInputMode,
|
|
||||||
inputModeColumn,
|
|
||||||
el
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (this.isInHighlightBounds(ev)) {
|
|
||||||
/**
|
|
||||||
* If we were already in
|
|
||||||
* input mode, then we should determine
|
|
||||||
* if we tapped a particular column and
|
|
||||||
* should switch to input mode for
|
|
||||||
* that specific column.
|
|
||||||
*/
|
|
||||||
if (useInputMode) {
|
|
||||||
/**
|
|
||||||
* If we tapped a picker column
|
|
||||||
* then we should either switch to input
|
|
||||||
* mode for that column or all columns.
|
|
||||||
* Otherwise we should exit input mode
|
|
||||||
* since we just tapped the highlight and
|
|
||||||
* not a column.
|
|
||||||
*/
|
|
||||||
if (ev.target.tagName === 'ION-PICKER-COLUMN-INTERNAL') {
|
|
||||||
/**
|
|
||||||
* If user taps 2 different columns
|
|
||||||
* then we should just switch to input mode
|
|
||||||
* for the new column rather than switching to
|
|
||||||
* input mode for all columns.
|
|
||||||
*/
|
|
||||||
if (inputModeColumn && inputModeColumn === ev.target) {
|
|
||||||
this.actionOnClick = () => {
|
|
||||||
this.enterInputMode();
|
|
||||||
};
|
|
||||||
} else {
|
|
||||||
this.actionOnClick = () => {
|
|
||||||
this.enterInputMode(ev.target);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
this.actionOnClick = () => {
|
|
||||||
this.exitInputMode();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* If we were not already in
|
|
||||||
* input mode, then we should
|
|
||||||
* enter input mode for all columns.
|
|
||||||
*/
|
|
||||||
|
|
||||||
} else {
|
|
||||||
/**
|
|
||||||
* If there is only 1 numeric input column
|
|
||||||
* then we should skip multi column input.
|
|
||||||
*/
|
|
||||||
const columns = el.querySelectorAll('ion-picker-column-internal.picker-column-numeric-input');
|
|
||||||
const columnEl = columns.length === 1 ? ev.target : undefined;
|
|
||||||
|
|
||||||
this.actionOnClick = () => {
|
|
||||||
this.enterInputMode(columnEl);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.actionOnClick = () => {
|
|
||||||
this.exitInputMode();
|
|
||||||
};
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Enters input mode to allow
|
|
||||||
* for text entry of numeric values.
|
|
||||||
* If on mobile, we focus a hidden input
|
|
||||||
* field so that the on screen keyboard
|
|
||||||
* is brought up. When tabbing using a
|
|
||||||
* keyboard, picker columns receive an outline
|
|
||||||
* to indicate they are focused. As a result,
|
|
||||||
* we should not focus the hidden input as it
|
|
||||||
* would cause the outline to go away, preventing
|
|
||||||
* users from having any visual indication of which
|
|
||||||
* column is focused.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.enterInputMode = (columnEl, focusInput = true) => {
|
|
||||||
const {
|
|
||||||
inputEl,
|
|
||||||
el
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (!inputEl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Only active input mode if there is at
|
|
||||||
* least one column that accepts numeric input.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const hasInputColumn = el.querySelector('ion-picker-column-internal.picker-column-numeric-input');
|
|
||||||
|
|
||||||
if (!hasInputColumn) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* If columnEl is undefined then
|
|
||||||
* it is assumed that all numeric pickers
|
|
||||||
* are eligible for text entry.
|
|
||||||
* (i.e. hour and minute columns)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.useInputMode = true;
|
|
||||||
this.inputModeColumn = columnEl;
|
|
||||||
/**
|
|
||||||
* Users with a keyboard and mouse can
|
|
||||||
* activate input mode where the input is
|
|
||||||
* focused as well as when it is not focused,
|
|
||||||
* so we need to make sure we clean up any
|
|
||||||
* old listeners.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (focusInput) {
|
|
||||||
if (this.destroyKeypressListener) {
|
|
||||||
this.destroyKeypressListener();
|
|
||||||
this.destroyKeypressListener = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
inputEl.focus();
|
|
||||||
} else {
|
|
||||||
el.addEventListener('keypress', this.onKeyPress);
|
|
||||||
|
|
||||||
this.destroyKeypressListener = () => {
|
|
||||||
el.removeEventListener('keypress', this.onKeyPress);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
this.emitInputModeChange();
|
|
||||||
};
|
|
||||||
|
|
||||||
this.onKeyPress = ev => {
|
|
||||||
const {
|
|
||||||
inputEl
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (!inputEl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const parsedValue = parseInt(ev.key, 10);
|
|
||||||
/**
|
|
||||||
* Only numbers should be allowed
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (!Number.isNaN(parsedValue)) {
|
|
||||||
inputEl.value += ev.key;
|
|
||||||
this.onInputChange();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.selectSingleColumn = () => {
|
|
||||||
const {
|
|
||||||
inputEl,
|
|
||||||
inputModeColumn,
|
|
||||||
singleColumnSearchTimeout
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (!inputEl || !inputModeColumn) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const values = inputModeColumn.items.filter(item => item.disabled !== true);
|
|
||||||
/**
|
|
||||||
* If users pause for a bit, the search
|
|
||||||
* value should be reset similar to how a
|
|
||||||
* <select> behaves. So typing "34", waiting,
|
|
||||||
* then typing "5" should select "05".
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (singleColumnSearchTimeout) {
|
|
||||||
clearTimeout(singleColumnSearchTimeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.singleColumnSearchTimeout = setTimeout(() => {
|
|
||||||
inputEl.value = '';
|
|
||||||
this.singleColumnSearchTimeout = undefined;
|
|
||||||
}, 1000);
|
|
||||||
/**
|
|
||||||
* For values that are longer than 2 digits long
|
|
||||||
* we should shift the value over 1 character
|
|
||||||
* to the left. So typing "456" would result in "56".
|
|
||||||
* TODO: If we want to support more than just
|
|
||||||
* time entry, we should update this value to be
|
|
||||||
* the max length of all of the picker items.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (inputEl.value.length >= 3) {
|
|
||||||
const startIndex = inputEl.value.length - 2;
|
|
||||||
const newString = inputEl.value.substring(startIndex);
|
|
||||||
inputEl.value = newString;
|
|
||||||
this.selectSingleColumn();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Checking the value of the input gets priority
|
|
||||||
* first. For example, if the value of the input
|
|
||||||
* is "1" and we entered "2", then the complete value
|
|
||||||
* is "12" and we should select hour 12.
|
|
||||||
*
|
|
||||||
* Regex removes any leading zeros from values like "02",
|
|
||||||
* but it keeps a single zero if there are only zeros in the string.
|
|
||||||
* 0+(?=[1-9]) --> Match 1 or more zeros that are followed by 1-9
|
|
||||||
* 0+(?=0$) --> Match 1 or more zeros that must be followed by one 0 and end.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const findItemFromCompleteValue = values.find(({
|
|
||||||
text
|
|
||||||
}) => {
|
|
||||||
const parsedText = text.replace(/^0+(?=[1-9])|0+(?=0$)/, '');
|
|
||||||
return parsedText === inputEl.value;
|
|
||||||
});
|
|
||||||
|
|
||||||
if (findItemFromCompleteValue) {
|
|
||||||
inputModeColumn.setValue(findItemFromCompleteValue.value);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* If we typed "56" to get minute 56, then typed "7",
|
|
||||||
* we should select "07" as "567" is not a valid minute.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
if (inputEl.value.length === 2) {
|
|
||||||
const changedCharacter = inputEl.value.substring(inputEl.value.length - 1);
|
|
||||||
inputEl.value = changedCharacter;
|
|
||||||
this.selectSingleColumn();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Searches a list of column items for a particular
|
|
||||||
* value. This is currently used for numeric values.
|
|
||||||
* The zeroBehavior can be set to account for leading
|
|
||||||
* or trailing zeros when looking at the item text.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.searchColumn = (colEl, value, zeroBehavior = 'start') => {
|
|
||||||
const behavior = zeroBehavior === 'start' ? /^0+/ : /0$/;
|
|
||||||
const item = colEl.items.find(({
|
|
||||||
text,
|
|
||||||
disabled
|
|
||||||
}) => disabled !== true && text.replace(behavior, '') === value);
|
|
||||||
|
|
||||||
if (item) {
|
|
||||||
colEl.setValue(item.value);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
this.selectMultiColumn = () => {
|
|
||||||
const {
|
|
||||||
inputEl,
|
|
||||||
el
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (!inputEl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const numericPickers = Array.from(el.querySelectorAll('ion-picker-column-internal')).filter(col => col.numericInput);
|
|
||||||
const firstColumn = numericPickers[0];
|
|
||||||
const lastColumn = numericPickers[1];
|
|
||||||
let value = inputEl.value;
|
|
||||||
let minuteValue;
|
|
||||||
|
|
||||||
switch (value.length) {
|
|
||||||
case 1:
|
|
||||||
this.searchColumn(firstColumn, value);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 2:
|
|
||||||
/**
|
|
||||||
* If the first character is `0` or `1` it is
|
|
||||||
* possible that users are trying to type `09`
|
|
||||||
* or `11` into the hour field, so we should look
|
|
||||||
* at that first.
|
|
||||||
*/
|
|
||||||
const firstCharacter = inputEl.value.substring(0, 1);
|
|
||||||
value = firstCharacter === '0' || firstCharacter === '1' ? inputEl.value : firstCharacter;
|
|
||||||
this.searchColumn(firstColumn, value);
|
|
||||||
/**
|
|
||||||
* If only checked the first value,
|
|
||||||
* we can check the second value
|
|
||||||
* for a match in the minutes column
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (value.length === 1) {
|
|
||||||
minuteValue = inputEl.value.substring(inputEl.value.length - 1);
|
|
||||||
this.searchColumn(lastColumn, minuteValue, 'end');
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
/**
|
|
||||||
* If the first character is `0` or `1` it is
|
|
||||||
* possible that users are trying to type `09`
|
|
||||||
* or `11` into the hour field, so we should look
|
|
||||||
* at that first.
|
|
||||||
*/
|
|
||||||
const firstCharacterAgain = inputEl.value.substring(0, 1);
|
|
||||||
value = firstCharacterAgain === '0' || firstCharacterAgain === '1' ? inputEl.value.substring(0, 2) : firstCharacterAgain;
|
|
||||||
this.searchColumn(firstColumn, value);
|
|
||||||
/**
|
|
||||||
* If only checked the first value,
|
|
||||||
* we can check the second value
|
|
||||||
* for a match in the minutes column
|
|
||||||
*/
|
|
||||||
|
|
||||||
minuteValue = value.length === 1 ? inputEl.value.substring(1) : inputEl.value.substring(2);
|
|
||||||
this.searchColumn(lastColumn, minuteValue, 'end');
|
|
||||||
break;
|
|
||||||
|
|
||||||
case 4:
|
|
||||||
/**
|
|
||||||
* If the first character is `0` or `1` it is
|
|
||||||
* possible that users are trying to type `09`
|
|
||||||
* or `11` into the hour field, so we should look
|
|
||||||
* at that first.
|
|
||||||
*/
|
|
||||||
const firstCharacterAgainAgain = inputEl.value.substring(0, 1);
|
|
||||||
value = firstCharacterAgainAgain === '0' || firstCharacterAgainAgain === '1' ? inputEl.value.substring(0, 2) : firstCharacterAgainAgain;
|
|
||||||
this.searchColumn(firstColumn, value);
|
|
||||||
/**
|
|
||||||
* If only checked the first value,
|
|
||||||
* we can check the second value
|
|
||||||
* for a match in the minutes column
|
|
||||||
*/
|
|
||||||
|
|
||||||
const minuteValueAgain = value.length === 1 ? inputEl.value.substring(1, inputEl.value.length) : inputEl.value.substring(2, inputEl.value.length);
|
|
||||||
this.searchColumn(lastColumn, minuteValueAgain, 'end');
|
|
||||||
break;
|
|
||||||
|
|
||||||
default:
|
|
||||||
const startIndex = inputEl.value.length - 4;
|
|
||||||
const newString = inputEl.value.substring(startIndex);
|
|
||||||
inputEl.value = newString;
|
|
||||||
this.selectMultiColumn();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Searches the value of the active column
|
|
||||||
* to determine which value users are trying
|
|
||||||
* to select
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.onInputChange = () => {
|
|
||||||
const {
|
|
||||||
useInputMode,
|
|
||||||
inputEl,
|
|
||||||
inputModeColumn
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (!useInputMode || !inputEl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (inputModeColumn) {
|
|
||||||
this.selectSingleColumn();
|
|
||||||
} else {
|
|
||||||
this.selectMultiColumn();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Emit ionInputModeChange. Picker columns
|
|
||||||
* listen for this event to determine whether
|
|
||||||
* or not their column is "active" for text input.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
this.emitInputModeChange = () => {
|
|
||||||
const {
|
|
||||||
useInputMode,
|
|
||||||
inputModeColumn
|
|
||||||
} = this;
|
|
||||||
this.ionInputModeChange.emit({
|
|
||||||
useInputMode,
|
|
||||||
inputModeColumn
|
|
||||||
});
|
|
||||||
};
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* When the picker is interacted with
|
|
||||||
* we need to prevent touchstart so other
|
|
||||||
* gestures do not fire. For example,
|
|
||||||
* scrolling on the wheel picker
|
|
||||||
* in ion-datetime should not cause
|
|
||||||
* a card modal to swipe to close.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
preventTouchStartPropagation(ev) {
|
|
||||||
ev.stopPropagation();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillLoad() {
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.g)(this.el).addEventListener('focusin', this.onFocusIn);
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.g)(this.el).addEventListener('focusout', this.onFocusOut);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* @internal
|
|
||||||
* Exits text entry mode for the picker
|
|
||||||
* This method blurs the hidden input
|
|
||||||
* and cause the keyboard to dismiss.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
exitInputMode() {
|
|
||||||
var _this = 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 {
|
|
||||||
inputEl,
|
|
||||||
useInputMode
|
|
||||||
} = _this;
|
|
||||||
|
|
||||||
if (!useInputMode || !inputEl) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.useInputMode = false;
|
|
||||||
_this.inputModeColumn = undefined;
|
|
||||||
inputEl.blur();
|
|
||||||
inputEl.value = '';
|
|
||||||
|
|
||||||
if (_this.destroyKeypressListener) {
|
|
||||||
_this.destroyKeypressListener();
|
|
||||||
|
|
||||||
_this.destroyKeypressListener = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.emitInputModeChange();
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
||||||
onPointerDown: ev => this.onPointerDown(ev),
|
|
||||||
onClick: () => this.onClick()
|
|
||||||
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("input", {
|
|
||||||
"aria-hidden": "true",
|
|
||||||
tabindex: -1,
|
|
||||||
inputmode: "numeric",
|
|
||||||
type: "number",
|
|
||||||
ref: el => this.inputEl = el,
|
|
||||||
onInput: () => this.onInputChange(),
|
|
||||||
onBlur: () => this.exitInputMode()
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "picker-before"
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "picker-after"
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "picker-highlight",
|
|
||||||
ref: el => this.highlightEl = el
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null));
|
|
||||||
}
|
|
||||||
|
|
||||||
get el() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
PickerInternal.style = {
|
|
||||||
ios: pickerInternalIosCss,
|
|
||||||
md: pickerInternalMdCss
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2275.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2505],{89565:(h,a,e)=>{e.d(a,{p:()=>u});var t=e(15861),r=e(2461);const i=(0,r.fo)("App",{web:()=>e.e(6622).then(e.bind(e,6622)).then(n=>new n.AppWeb)});var c=e(47394);class u extends r.Uw{authenticate(o){var l=this;return(0,t.Z)(function*(){try{yield l.internalAuthenticate(o)}catch(s){throw s instanceof r.xz?new c.AB(s.message,s.code):s}})()}addResumeListener(o){var l=this;return(0,t.Z)(function*(){return i.addListener("appStateChange",({isActive:s})=>{s&&l.checkBiometry().then(d=>{o(d)}).catch(console.error)})})()}}},52505:(h,a,e)=>{e.r(a),e.d(a,{BiometricAuthNative:()=>c});var t=e(15861),r=e(89565),i=e(47394);class c extends r.p{constructor(n){super();const o=n;this.checkBiometry=o.checkBiometry,this.internalAuthenticate=o.internalAuthenticate}checkBiometry(){return(0,t.Z)(function*(){return Promise.resolve({isAvailable:!1,strongBiometryIsAvailable:!1,biometryType:i.dz.none,biometryTypes:[],deviceIsSecure:!1,reason:"",code:i.Ds.none,strongReason:"",strongCode:i.Ds.none})})()}internalAuthenticate(n){return(0,t.Z)(function*(){})()}setBiometryType(n){return(0,t.Z)(function*(){console.warn("setBiometryType() is web only")})()}setBiometryIsEnrolled(n){return(0,t.Z)(function*(){console.warn("setBiometryEnrolled() is web only")})()}setDeviceIsSecure(n){return(0,t.Z)(function*(){console.warn("setDeviceIsSecure() is web only")})()}}}}]);
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,930 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2666],{
|
|
||||||
|
|
||||||
/***/ 12815:
|
|
||||||
/*!**************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/haptic-029a46f6.js ***!
|
|
||||||
\**************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "a": () => (/* binding */ hapticSelectionStart),
|
|
||||||
/* harmony export */ "b": () => (/* binding */ hapticSelectionChanged),
|
|
||||||
/* harmony export */ "c": () => (/* binding */ hapticSelection),
|
|
||||||
/* harmony export */ "d": () => (/* binding */ hapticImpact),
|
|
||||||
/* harmony export */ "h": () => (/* binding */ hapticSelectionEnd)
|
|
||||||
/* harmony export */ });
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
const HapticEngine = {
|
|
||||||
getEngine() {
|
|
||||||
var _a;
|
|
||||||
|
|
||||||
const win = window;
|
|
||||||
return win.TapticEngine || ((_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.isPluginAvailable('Haptics')) && win.Capacitor.Plugins.Haptics;
|
|
||||||
},
|
|
||||||
|
|
||||||
available() {
|
|
||||||
var _a;
|
|
||||||
|
|
||||||
const win = window;
|
|
||||||
const engine = this.getEngine();
|
|
||||||
|
|
||||||
if (!engine) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Developers can manually import the
|
|
||||||
* Haptics plugin in their app which will cause
|
|
||||||
* getEngine to return the Haptics engine. However,
|
|
||||||
* the Haptics engine will throw an error if
|
|
||||||
* used in a web browser that does not support
|
|
||||||
* the Vibrate API. This check avoids that error
|
|
||||||
* if the browser does not support the Vibrate API.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
if (((_a = win.Capacitor) === null || _a === void 0 ? void 0 : _a.getPlatform()) === 'web') {
|
|
||||||
return typeof navigator !== 'undefined' && navigator.vibrate !== undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
|
|
||||||
isCordova() {
|
|
||||||
return !!window.TapticEngine;
|
|
||||||
},
|
|
||||||
|
|
||||||
isCapacitor() {
|
|
||||||
const win = window;
|
|
||||||
return !!win.Capacitor;
|
|
||||||
},
|
|
||||||
|
|
||||||
impact(options) {
|
|
||||||
const engine = this.getEngine();
|
|
||||||
|
|
||||||
if (!engine) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;
|
|
||||||
engine.impact({
|
|
||||||
style
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
notification(options) {
|
|
||||||
const engine = this.getEngine();
|
|
||||||
|
|
||||||
if (!engine) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const style = this.isCapacitor() ? options.style.toUpperCase() : options.style;
|
|
||||||
engine.notification({
|
|
||||||
style
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
selection() {
|
|
||||||
this.impact({
|
|
||||||
style: 'light'
|
|
||||||
});
|
|
||||||
},
|
|
||||||
|
|
||||||
selectionStart() {
|
|
||||||
const engine = this.getEngine();
|
|
||||||
|
|
||||||
if (!engine) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isCapacitor()) {
|
|
||||||
engine.selectionStart();
|
|
||||||
} else {
|
|
||||||
engine.gestureSelectionStart();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
selectionChanged() {
|
|
||||||
const engine = this.getEngine();
|
|
||||||
|
|
||||||
if (!engine) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isCapacitor()) {
|
|
||||||
engine.selectionChanged();
|
|
||||||
} else {
|
|
||||||
engine.gestureSelectionChanged();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
selectionEnd() {
|
|
||||||
const engine = this.getEngine();
|
|
||||||
|
|
||||||
if (!engine) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.isCapacitor()) {
|
|
||||||
engine.selectionEnd();
|
|
||||||
} else {
|
|
||||||
engine.gestureSelectionEnd();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Check to see if the Haptic Plugin is available
|
|
||||||
* @return Returns `true` or false if the plugin is available
|
|
||||||
*/
|
|
||||||
|
|
||||||
const hapticAvailable = () => {
|
|
||||||
return HapticEngine.available();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Trigger a selection changed haptic event. Good for one-time events
|
|
||||||
* (not for gestures)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const hapticSelection = () => {
|
|
||||||
hapticAvailable() && HapticEngine.selection();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Tell the haptic engine that a gesture for a selection change is starting.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const hapticSelectionStart = () => {
|
|
||||||
hapticAvailable() && HapticEngine.selectionStart();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Tell the haptic engine that a selection changed during a gesture.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const hapticSelectionChanged = () => {
|
|
||||||
hapticAvailable() && HapticEngine.selectionChanged();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Tell the haptic engine we are done with a gesture. This needs to be
|
|
||||||
* called lest resources are not properly recycled.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const hapticSelectionEnd = () => {
|
|
||||||
hapticAvailable() && HapticEngine.selectionEnd();
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Use this to indicate success/failure/warning to the user.
|
|
||||||
* options should be of the type `{ style: 'light' }` (or `medium`/`heavy`)
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const hapticImpact = options => {
|
|
||||||
hapticAvailable() && HapticEngine.impact(options);
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 7309:
|
|
||||||
/*!*************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/index-2bcb741c.js ***!
|
|
||||||
\*************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "a": () => (/* binding */ arrowBackSharp),
|
|
||||||
/* harmony export */ "b": () => (/* binding */ closeCircle),
|
|
||||||
/* harmony export */ "c": () => (/* binding */ chevronBack),
|
|
||||||
/* harmony export */ "d": () => (/* binding */ closeSharp),
|
|
||||||
/* harmony export */ "e": () => (/* binding */ searchSharp),
|
|
||||||
/* harmony export */ "f": () => (/* binding */ checkmarkOutline),
|
|
||||||
/* harmony export */ "g": () => (/* binding */ ellipseOutline),
|
|
||||||
/* harmony export */ "h": () => (/* binding */ caretBackSharp),
|
|
||||||
/* harmony export */ "i": () => (/* binding */ arrowDown),
|
|
||||||
/* harmony export */ "j": () => (/* binding */ reorderThreeOutline),
|
|
||||||
/* harmony export */ "k": () => (/* binding */ reorderTwoSharp),
|
|
||||||
/* harmony export */ "l": () => (/* binding */ chevronDown),
|
|
||||||
/* harmony export */ "m": () => (/* binding */ chevronForwardOutline),
|
|
||||||
/* harmony export */ "n": () => (/* binding */ ellipsisHorizontal),
|
|
||||||
/* harmony export */ "o": () => (/* binding */ chevronForward),
|
|
||||||
/* harmony export */ "p": () => (/* binding */ caretUpSharp),
|
|
||||||
/* harmony export */ "q": () => (/* binding */ caretDownSharp),
|
|
||||||
/* harmony export */ "r": () => (/* binding */ removeOutline),
|
|
||||||
/* harmony export */ "s": () => (/* binding */ searchOutline),
|
|
||||||
/* harmony export */ "t": () => (/* binding */ close),
|
|
||||||
/* harmony export */ "u": () => (/* binding */ menuOutline),
|
|
||||||
/* harmony export */ "v": () => (/* binding */ menuSharp)
|
|
||||||
/* harmony export */ });
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Ionicons v6.1.3, ES Modules */
|
|
||||||
const arrowBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='square' stroke-miterlimit='10' stroke-width='48' d='M244 400L100 256l144-144M120 256h292' class='ionicon-fill-none'/></svg>";
|
|
||||||
const arrowDown = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 268l144 144 144-144M256 392V100' class='ionicon-fill-none'/></svg>";
|
|
||||||
const caretBackSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M368 64L144 256l224 192V64z'/></svg>";
|
|
||||||
const caretDownSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M64 144l192 224 192-224H64z'/></svg>";
|
|
||||||
const caretUpSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M448 368L256 144 64 368h384z'/></svg>";
|
|
||||||
const checkmarkOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' d='M416 128L192 384l-96-96' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
|
|
||||||
const chevronBack = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M328 112L184 256l144 144' class='ionicon-fill-none'/></svg>";
|
|
||||||
const chevronDown = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M112 184l144 144 144-144' class='ionicon-fill-none'/></svg>";
|
|
||||||
const chevronForward = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M184 112l144 144-144 144' class='ionicon-fill-none'/></svg>";
|
|
||||||
const chevronForwardOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' stroke-width='48' d='M184 112l144 144-144 144' class='ionicon-fill-none'/></svg>";
|
|
||||||
const close = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M289.94 256l95-95A24 24 0 00351 127l-95 95-95-95a24 24 0 00-34 34l95 95-95 95a24 24 0 1034 34l95-95 95 95a24 24 0 0034-34z'/></svg>";
|
|
||||||
const closeCircle = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M256 48C141.31 48 48 141.31 48 256s93.31 208 208 208 208-93.31 208-208S370.69 48 256 48zm75.31 260.69a16 16 0 11-22.62 22.62L256 278.63l-52.69 52.68a16 16 0 01-22.62-22.62L233.37 256l-52.68-52.69a16 16 0 0122.62-22.62L256 233.37l52.69-52.68a16 16 0 0122.62 22.62L278.63 256z'/></svg>";
|
|
||||||
const closeSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M400 145.49L366.51 112 256 222.51 145.49 112 112 145.49 222.51 256 112 366.51 145.49 400 256 289.49 366.51 400 400 366.51 289.49 256 400 145.49z'/></svg>";
|
|
||||||
const ellipseOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><circle cx='256' cy='256' r='192' stroke-linecap='round' stroke-linejoin='round' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
|
|
||||||
const ellipsisHorizontal = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><circle cx='256' cy='256' r='48'/><circle cx='416' cy='256' r='48'/><circle cx='96' cy='256' r='48'/></svg>";
|
|
||||||
const menuOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-miterlimit='10' d='M80 160h352M80 256h352M80 352h352' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
|
|
||||||
const menuSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M64 384h384v-42.67H64zm0-106.67h384v-42.66H64zM64 128v42.67h384V128z'/></svg>";
|
|
||||||
const removeOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' d='M400 256H112' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
|
|
||||||
const reorderThreeOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='round' stroke-linejoin='round' d='M96 256h320M96 176h320M96 336h320' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
|
|
||||||
const reorderTwoSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path stroke-linecap='square' stroke-linejoin='round' stroke-width='44' d='M118 304h276M118 208h276' class='ionicon-fill-none'/></svg>";
|
|
||||||
const searchOutline = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M221.09 64a157.09 157.09 0 10157.09 157.09A157.1 157.1 0 00221.09 64z' stroke-miterlimit='10' class='ionicon-fill-none ionicon-stroke-width'/><path stroke-linecap='round' stroke-miterlimit='10' d='M338.29 338.29L448 448' class='ionicon-fill-none ionicon-stroke-width'/></svg>";
|
|
||||||
const searchSharp = "data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' class='ionicon' viewBox='0 0 512 512'><path d='M464 428L339.92 303.9a160.48 160.48 0 0030.72-94.58C370.64 120.37 298.27 48 209.32 48S48 120.37 48 209.32s72.37 161.32 161.32 161.32a160.48 160.48 0 0094.58-30.72L428 464zM209.32 319.69a110.38 110.38 0 11110.37-110.37 110.5 110.5 0 01-110.37 110.37z'/></svg>";
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 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');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 92666:
|
|
||||||
/*!******************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/ion-reorder_2.entry.js ***!
|
|
||||||
\******************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "ion_reorder": () => (/* binding */ Reorder),
|
|
||||||
/* harmony export */ "ion_reorder_group": () => (/* binding */ ReorderGroup)
|
|
||||||
/* 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 _index_2bcb741c_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index-2bcb741c.js */ 7309);
|
|
||||||
/* harmony import */ var _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ionic-global-c74e4951.js */ 95823);
|
|
||||||
/* harmony import */ var _index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./index-e6d1a8be.js */ 24311);
|
|
||||||
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
||||||
/* harmony import */ var _haptic_029a46f6_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./haptic-029a46f6.js */ 12815);
|
|
||||||
/* harmony import */ var _index_c4b11676_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./index-c4b11676.js */ 99273);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const reorderIosCss = ":host([slot]){display:none;line-height:0;z-index:100}.reorder-icon{display:block;font-size:22px}.reorder-icon{font-size:34px;opacity:0.4}";
|
|
||||||
const reorderMdCss = ":host([slot]){display:none;line-height:0;z-index:100}.reorder-icon{display:block;font-size:22px}.reorder-icon{font-size:31px;opacity:0.3}";
|
|
||||||
const Reorder = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
||||||
}
|
|
||||||
|
|
||||||
onClick(ev) {
|
|
||||||
const reorderGroup = this.el.closest('ion-reorder-group');
|
|
||||||
ev.preventDefault(); // Only stop event propagation if the reorder is inside of an enabled
|
|
||||||
// reorder group. This allows interaction with clickable children components.
|
|
||||||
|
|
||||||
if (!reorderGroup || !reorderGroup.disabled) {
|
|
||||||
ev.stopImmediatePropagation();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_3__.b)(this);
|
|
||||||
const reorderIcon = mode === 'ios' ? _index_2bcb741c_js__WEBPACK_IMPORTED_MODULE_2__.j : _index_2bcb741c_js__WEBPACK_IMPORTED_MODULE_2__.k;
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
||||||
class: mode
|
|
||||||
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("slot", null, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("ion-icon", {
|
|
||||||
icon: reorderIcon,
|
|
||||||
lazy: false,
|
|
||||||
class: "reorder-icon",
|
|
||||||
part: "icon"
|
|
||||||
})));
|
|
||||||
}
|
|
||||||
|
|
||||||
get el() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
Reorder.style = {
|
|
||||||
ios: reorderIosCss,
|
|
||||||
md: reorderMdCss
|
|
||||||
};
|
|
||||||
const reorderGroupCss = ".reorder-list-active>*{display:block;-webkit-transition:-webkit-transform 300ms;transition:-webkit-transform 300ms;transition:transform 300ms;transition:transform 300ms, -webkit-transform 300ms;will-change:transform}.reorder-enabled{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.reorder-enabled ion-reorder{display:block;cursor:-webkit-grab;cursor:grab;pointer-events:all;-ms-touch-action:none;touch-action:none}.reorder-selected,.reorder-selected ion-reorder{cursor:-webkit-grabbing;cursor:grabbing}.reorder-selected{position:relative;-webkit-transition:none !important;transition:none !important;-webkit-box-shadow:0 0 10px rgba(0, 0, 0, 0.4);box-shadow:0 0 10px rgba(0, 0, 0, 0.4);opacity:0.8;z-index:100}.reorder-visible ion-reorder .reorder-icon{-webkit-transform:translate3d(0, 0, 0);transform:translate3d(0, 0, 0)}";
|
|
||||||
const ReorderGroup = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
||||||
this.ionItemReorder = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionItemReorder", 7);
|
|
||||||
this.lastToIndex = -1;
|
|
||||||
this.cachedHeights = [];
|
|
||||||
this.scrollElTop = 0;
|
|
||||||
this.scrollElBottom = 0;
|
|
||||||
this.scrollElInitial = 0;
|
|
||||||
this.containerTop = 0;
|
|
||||||
this.containerBottom = 0;
|
|
||||||
this.state = 0
|
|
||||||
/* ReorderGroupState.Idle */
|
|
||||||
;
|
|
||||||
/**
|
|
||||||
* If `true`, the reorder will be hidden.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.disabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
disabledChanged() {
|
|
||||||
if (this.gesture) {
|
|
||||||
this.gesture.enable(!this.disabled);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
connectedCallback() {
|
|
||||||
var _this = 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 contentEl = (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_4__.f)(_this.el);
|
|
||||||
|
|
||||||
if (contentEl) {
|
|
||||||
_this.scrollEl = yield (0,_index_e6d1a8be_js__WEBPACK_IMPORTED_MODULE_4__.g)(contentEl);
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.gesture = (yield Promise.resolve(/*! import() */).then(__webpack_require__.bind(__webpack_require__, /*! ./index-422b6e83.js */ 36366))).createGesture({
|
|
||||||
el: _this.el,
|
|
||||||
gestureName: 'reorder',
|
|
||||||
gesturePriority: 110,
|
|
||||||
threshold: 0,
|
|
||||||
direction: 'y',
|
|
||||||
passive: false,
|
|
||||||
canStart: detail => _this.canStart(detail),
|
|
||||||
onStart: ev => _this.onStart(ev),
|
|
||||||
onMove: ev => _this.onMove(ev),
|
|
||||||
onEnd: () => _this.onEnd()
|
|
||||||
});
|
|
||||||
|
|
||||||
_this.disabledChanged();
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
disconnectedCallback() {
|
|
||||||
this.onEnd();
|
|
||||||
|
|
||||||
if (this.gesture) {
|
|
||||||
this.gesture.destroy();
|
|
||||||
this.gesture = undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Completes the reorder operation. Must be called by the `ionItemReorder` event.
|
|
||||||
*
|
|
||||||
* If a list of items is passed, the list will be reordered and returned in the
|
|
||||||
* proper order.
|
|
||||||
*
|
|
||||||
* If no parameters are passed or if `true` is passed in, the reorder will complete
|
|
||||||
* and the item will remain in the position it was dragged to. If `false` is passed,
|
|
||||||
* the reorder will complete and the item will bounce back to its original position.
|
|
||||||
*
|
|
||||||
* @param listOrReorder A list of items to be sorted and returned in the new order or a
|
|
||||||
* boolean of whether or not the reorder should reposition the item.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
complete(listOrReorder) {
|
|
||||||
return Promise.resolve(this.completeReorder(listOrReorder));
|
|
||||||
}
|
|
||||||
|
|
||||||
canStart(ev) {
|
|
||||||
if (this.selectedItemEl || this.state !== 0
|
|
||||||
/* ReorderGroupState.Idle */
|
|
||||||
) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const target = ev.event.target;
|
|
||||||
const reorderEl = target.closest('ion-reorder');
|
|
||||||
|
|
||||||
if (!reorderEl) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
const item = findReorderItem(reorderEl, this.el);
|
|
||||||
|
|
||||||
if (!item) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
ev.data = item;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
onStart(ev) {
|
|
||||||
ev.event.preventDefault();
|
|
||||||
const item = this.selectedItemEl = ev.data;
|
|
||||||
const heights = this.cachedHeights;
|
|
||||||
heights.length = 0;
|
|
||||||
const el = this.el;
|
|
||||||
const children = el.children;
|
|
||||||
|
|
||||||
if (!children || children.length === 0) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let sum = 0;
|
|
||||||
|
|
||||||
for (let i = 0; i < children.length; i++) {
|
|
||||||
const child = children[i];
|
|
||||||
sum += child.offsetHeight;
|
|
||||||
heights.push(sum);
|
|
||||||
child.$ionIndex = i;
|
|
||||||
}
|
|
||||||
|
|
||||||
const box = el.getBoundingClientRect();
|
|
||||||
this.containerTop = box.top;
|
|
||||||
this.containerBottom = box.bottom;
|
|
||||||
|
|
||||||
if (this.scrollEl) {
|
|
||||||
const scrollBox = this.scrollEl.getBoundingClientRect();
|
|
||||||
this.scrollElInitial = this.scrollEl.scrollTop;
|
|
||||||
this.scrollElTop = scrollBox.top + AUTO_SCROLL_MARGIN;
|
|
||||||
this.scrollElBottom = scrollBox.bottom - AUTO_SCROLL_MARGIN;
|
|
||||||
} else {
|
|
||||||
this.scrollElInitial = 0;
|
|
||||||
this.scrollElTop = 0;
|
|
||||||
this.scrollElBottom = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.lastToIndex = indexForItem(item);
|
|
||||||
this.selectedItemHeight = item.offsetHeight;
|
|
||||||
this.state = 1
|
|
||||||
/* ReorderGroupState.Active */
|
|
||||||
;
|
|
||||||
item.classList.add(ITEM_REORDER_SELECTED);
|
|
||||||
(0,_haptic_029a46f6_js__WEBPACK_IMPORTED_MODULE_6__.a)();
|
|
||||||
}
|
|
||||||
|
|
||||||
onMove(ev) {
|
|
||||||
const selectedItem = this.selectedItemEl;
|
|
||||||
|
|
||||||
if (!selectedItem) {
|
|
||||||
return;
|
|
||||||
} // Scroll if we reach the scroll margins
|
|
||||||
|
|
||||||
|
|
||||||
const scroll = this.autoscroll(ev.currentY); // // Get coordinate
|
|
||||||
|
|
||||||
const top = this.containerTop - scroll;
|
|
||||||
const bottom = this.containerBottom - scroll;
|
|
||||||
const currentY = Math.max(top, Math.min(ev.currentY, bottom));
|
|
||||||
const deltaY = scroll + currentY - ev.startY;
|
|
||||||
const normalizedY = currentY - top;
|
|
||||||
const toIndex = this.itemIndexForTop(normalizedY);
|
|
||||||
|
|
||||||
if (toIndex !== this.lastToIndex) {
|
|
||||||
const fromIndex = indexForItem(selectedItem);
|
|
||||||
this.lastToIndex = toIndex;
|
|
||||||
(0,_haptic_029a46f6_js__WEBPACK_IMPORTED_MODULE_6__.b)();
|
|
||||||
this.reorderMove(fromIndex, toIndex);
|
|
||||||
} // Update selected item position
|
|
||||||
|
|
||||||
|
|
||||||
selectedItem.style.transform = `translateY(${deltaY}px)`;
|
|
||||||
}
|
|
||||||
|
|
||||||
onEnd() {
|
|
||||||
const selectedItemEl = this.selectedItemEl;
|
|
||||||
this.state = 2
|
|
||||||
/* ReorderGroupState.Complete */
|
|
||||||
;
|
|
||||||
|
|
||||||
if (!selectedItemEl) {
|
|
||||||
this.state = 0
|
|
||||||
/* ReorderGroupState.Idle */
|
|
||||||
;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const toIndex = this.lastToIndex;
|
|
||||||
const fromIndex = indexForItem(selectedItemEl);
|
|
||||||
|
|
||||||
if (toIndex === fromIndex) {
|
|
||||||
this.completeReorder();
|
|
||||||
} else {
|
|
||||||
this.ionItemReorder.emit({
|
|
||||||
from: fromIndex,
|
|
||||||
to: toIndex,
|
|
||||||
complete: this.completeReorder.bind(this)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
(0,_haptic_029a46f6_js__WEBPACK_IMPORTED_MODULE_6__.h)();
|
|
||||||
}
|
|
||||||
|
|
||||||
completeReorder(listOrReorder) {
|
|
||||||
const selectedItemEl = this.selectedItemEl;
|
|
||||||
|
|
||||||
if (selectedItemEl && this.state === 2
|
|
||||||
/* ReorderGroupState.Complete */
|
|
||||||
) {
|
|
||||||
const children = this.el.children;
|
|
||||||
const len = children.length;
|
|
||||||
const toIndex = this.lastToIndex;
|
|
||||||
const fromIndex = indexForItem(selectedItemEl);
|
|
||||||
/**
|
|
||||||
* insertBefore and setting the transform
|
|
||||||
* needs to happen in the same frame otherwise
|
|
||||||
* there will be a duplicate transition. This primarily
|
|
||||||
* impacts Firefox where insertBefore and transform operations
|
|
||||||
* are happening in two separate frames.
|
|
||||||
*/
|
|
||||||
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_5__.r)(() => {
|
|
||||||
if (toIndex !== fromIndex && (listOrReorder === undefined || listOrReorder === true)) {
|
|
||||||
const ref = fromIndex < toIndex ? children[toIndex + 1] : children[toIndex];
|
|
||||||
this.el.insertBefore(selectedItemEl, ref);
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < len; i++) {
|
|
||||||
children[i].style['transform'] = '';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
if (Array.isArray(listOrReorder)) {
|
|
||||||
listOrReorder = reorderArray(listOrReorder, fromIndex, toIndex);
|
|
||||||
}
|
|
||||||
|
|
||||||
selectedItemEl.style.transition = '';
|
|
||||||
selectedItemEl.classList.remove(ITEM_REORDER_SELECTED);
|
|
||||||
this.selectedItemEl = undefined;
|
|
||||||
this.state = 0
|
|
||||||
/* ReorderGroupState.Idle */
|
|
||||||
;
|
|
||||||
}
|
|
||||||
|
|
||||||
return listOrReorder;
|
|
||||||
}
|
|
||||||
|
|
||||||
itemIndexForTop(deltaY) {
|
|
||||||
const heights = this.cachedHeights;
|
|
||||||
|
|
||||||
for (let i = 0; i < heights.length; i++) {
|
|
||||||
if (heights[i] > deltaY) {
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return heights.length - 1;
|
|
||||||
}
|
|
||||||
/********* DOM WRITE ********* */
|
|
||||||
|
|
||||||
|
|
||||||
reorderMove(fromIndex, toIndex) {
|
|
||||||
const itemHeight = this.selectedItemHeight;
|
|
||||||
const children = this.el.children;
|
|
||||||
|
|
||||||
for (let i = 0; i < children.length; i++) {
|
|
||||||
const style = children[i].style;
|
|
||||||
let value = '';
|
|
||||||
|
|
||||||
if (i > fromIndex && i <= toIndex) {
|
|
||||||
value = `translateY(${-itemHeight}px)`;
|
|
||||||
} else if (i < fromIndex && i >= toIndex) {
|
|
||||||
value = `translateY(${itemHeight}px)`;
|
|
||||||
}
|
|
||||||
|
|
||||||
style['transform'] = value;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
autoscroll(posY) {
|
|
||||||
if (!this.scrollEl) {
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
let amount = 0;
|
|
||||||
|
|
||||||
if (posY < this.scrollElTop) {
|
|
||||||
amount = -SCROLL_JUMP;
|
|
||||||
} else if (posY > this.scrollElBottom) {
|
|
||||||
amount = SCROLL_JUMP;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (amount !== 0) {
|
|
||||||
this.scrollEl.scrollBy(0, amount);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.scrollEl.scrollTop - this.scrollElInitial;
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_3__.b)(this);
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
||||||
class: {
|
|
||||||
[mode]: true,
|
|
||||||
'reorder-enabled': !this.disabled,
|
|
||||||
'reorder-list-active': this.state !== 0
|
|
||||||
/* ReorderGroupState.Idle */
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
get el() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
static get watchers() {
|
|
||||||
return {
|
|
||||||
"disabled": ["disabledChanged"]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
const indexForItem = element => {
|
|
||||||
return element['$ionIndex'];
|
|
||||||
};
|
|
||||||
|
|
||||||
const findReorderItem = (node, container) => {
|
|
||||||
let parent;
|
|
||||||
|
|
||||||
while (node) {
|
|
||||||
parent = node.parentElement;
|
|
||||||
|
|
||||||
if (parent === container) {
|
|
||||||
return node;
|
|
||||||
}
|
|
||||||
|
|
||||||
node = parent;
|
|
||||||
}
|
|
||||||
|
|
||||||
return undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
const AUTO_SCROLL_MARGIN = 60;
|
|
||||||
const SCROLL_JUMP = 10;
|
|
||||||
const ITEM_REORDER_SELECTED = 'reorder-selected';
|
|
||||||
|
|
||||||
const reorderArray = (array, from, to) => {
|
|
||||||
const element = array[from];
|
|
||||||
array.splice(from, 1);
|
|
||||||
array.splice(to, 0, element);
|
|
||||||
return array.slice();
|
|
||||||
};
|
|
||||||
|
|
||||||
ReorderGroup.style = reorderGroupCss;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2666.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[2680],{92680:(u,n,e)=>{e.r(n),e.d(n,{SplashScreenWeb:()=>s});var _=e(15861),o=e(47423);class s extends o.Uw{show(r){return(0,_.Z)(function*(){})()}hide(r){return(0,_.Z)(function*(){})()}}}}]);
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,39 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2723],{
|
|
||||||
|
|
||||||
/***/ 52723:
|
|
||||||
/*!**************************************************************************!*\
|
|
||||||
!*** ./node_modules/@capacitor-community/privacy-screen/dist/esm/web.js ***!
|
|
||||||
\**************************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "PrivacyScreenWeb": () => (/* binding */ PrivacyScreenWeb)
|
|
||||||
/* 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 _capacitor_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @capacitor/core */ 26549);
|
|
||||||
|
|
||||||
|
|
||||||
class PrivacyScreenWeb extends _capacitor_core__WEBPACK_IMPORTED_MODULE_1__.WebPlugin {
|
|
||||||
enable() {
|
|
||||||
var _this = 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* () {
|
|
||||||
throw _this.unimplemented('Not implemented on web.');
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
disable() {
|
|
||||||
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* () {
|
|
||||||
throw _this2.unimplemented('Not implemented on web.');
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2723.js.map
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"2723.js","mappings":";;;;;;;;;;;;;;;AAAA;AACO,MAAMC,gBAAN,SAA+BD,sDAA/B,CAAyC;EACtCE,MAAM,GAAG;IAAA;;IAAA;MACX,MAAM,KAAI,CAACC,aAAL,CAAmB,yBAAnB,CAAN;IADW;EAEd;;EACKC,OAAO,GAAG;IAAA;;IAAA;MACZ,MAAM,MAAI,CAACD,aAAL,CAAmB,yBAAnB,CAAN;IADY;EAEf;;AAN2C,C","sources":["./node_modules/@capacitor-community/privacy-screen/dist/esm/web.js"],"sourcesContent":["import { WebPlugin } from '@capacitor/core';\nexport class PrivacyScreenWeb extends WebPlugin {\n async enable() {\n throw this.unimplemented('Not implemented on web.');\n }\n async disable() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\n"],"names":["WebPlugin","PrivacyScreenWeb","enable","unimplemented","disable"],"sourceRoot":"webpack:///","x_google_ignoreList":[0]}
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,393 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2855],{
|
|
||||||
|
|
||||||
/***/ 22855:
|
|
||||||
/*!****************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/ion-loading.entry.js ***!
|
|
||||||
\****************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "ion_loading": () => (/* binding */ Loading)
|
|
||||||
/* 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 _config_d4f612d2_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./config-d4f612d2.js */ 75656);
|
|
||||||
/* harmony import */ var _overlays_58fa8e4d_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./overlays-58fa8e4d.js */ 6605);
|
|
||||||
/* harmony import */ var _theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./theme-7670341c.js */ 50320);
|
|
||||||
/* harmony import */ var _animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./animation-4ff3f603.js */ 15933);
|
|
||||||
/* harmony import */ var _hardware_back_button_490df115_js__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./hardware-back-button-490df115.js */ 70159);
|
|
||||||
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
||||||
/* harmony import */ var _index_33ffec25_js__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./index-33ffec25.js */ 42286);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* iOS Loading Enter Animation
|
|
||||||
*/
|
|
||||||
|
|
||||||
const iosEnterAnimation = baseEl => {
|
|
||||||
const baseAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const backdropAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const wrapperAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
|
||||||
'pointer-events': 'none'
|
|
||||||
}).afterClearStyles(['pointer-events']);
|
|
||||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([{
|
|
||||||
offset: 0,
|
|
||||||
opacity: 0.01,
|
|
||||||
transform: 'scale(1.1)'
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
opacity: 1,
|
|
||||||
transform: 'scale(1)'
|
|
||||||
}]);
|
|
||||||
return baseAnimation.addElement(baseEl).easing('ease-in-out').duration(200).addAnimation([backdropAnimation, wrapperAnimation]);
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* iOS Loading Leave Animation
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const iosLeaveAnimation = baseEl => {
|
|
||||||
const baseAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const backdropAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const wrapperAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
|
||||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([{
|
|
||||||
offset: 0,
|
|
||||||
opacity: 0.99,
|
|
||||||
transform: 'scale(1)'
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
opacity: 0,
|
|
||||||
transform: 'scale(0.9)'
|
|
||||||
}]);
|
|
||||||
return baseAnimation.addElement(baseEl).easing('ease-in-out').duration(200).addAnimation([backdropAnimation, wrapperAnimation]);
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Md Loading Enter Animation
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const mdEnterAnimation = baseEl => {
|
|
||||||
const baseAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const backdropAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const wrapperAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 0.01, 'var(--backdrop-opacity)').beforeStyles({
|
|
||||||
'pointer-events': 'none'
|
|
||||||
}).afterClearStyles(['pointer-events']);
|
|
||||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([{
|
|
||||||
offset: 0,
|
|
||||||
opacity: 0.01,
|
|
||||||
transform: 'scale(1.1)'
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
opacity: 1,
|
|
||||||
transform: 'scale(1)'
|
|
||||||
}]);
|
|
||||||
return baseAnimation.addElement(baseEl).easing('ease-in-out').duration(200).addAnimation([backdropAnimation, wrapperAnimation]);
|
|
||||||
};
|
|
||||||
/**
|
|
||||||
* Md Loading Leave Animation
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const mdLeaveAnimation = baseEl => {
|
|
||||||
const baseAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const backdropAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
const wrapperAnimation = (0,_animation_4ff3f603_js__WEBPACK_IMPORTED_MODULE_6__.c)();
|
|
||||||
backdropAnimation.addElement(baseEl.querySelector('ion-backdrop')).fromTo('opacity', 'var(--backdrop-opacity)', 0);
|
|
||||||
wrapperAnimation.addElement(baseEl.querySelector('.loading-wrapper')).keyframes([{
|
|
||||||
offset: 0,
|
|
||||||
opacity: 0.99,
|
|
||||||
transform: 'scale(1)'
|
|
||||||
}, {
|
|
||||||
offset: 1,
|
|
||||||
opacity: 0,
|
|
||||||
transform: 'scale(0.9)'
|
|
||||||
}]);
|
|
||||||
return baseAnimation.addElement(baseEl).easing('ease-in-out').duration(200).addAnimation([backdropAnimation, wrapperAnimation]);
|
|
||||||
};
|
|
||||||
|
|
||||||
const loadingIosCss = ".sc-ion-loading-ios-h{--min-width:auto;--width:auto;--min-height:auto;--height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-loading-ios-h{display:none}.loading-wrapper.sc-ion-loading-ios{display:-ms-flexbox;display:flex;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);opacity:0;z-index:10}ion-spinner.sc-ion-loading-ios{color:var(--spinner-color)}.sc-ion-loading-ios-h{--background:var(--ion-overlay-background-color, var(--ion-color-step-100, #f9f9f9));--max-width:270px;--max-height:90%;--spinner-color:var(--ion-color-step-600, #666666);--backdrop-opacity:var(--ion-backdrop-opacity, 0.3);color:var(--ion-text-color, #000);font-size:14px}.loading-wrapper.sc-ion-loading-ios{border-radius:8px;padding-left:34px;padding-right:34px;padding-top:24px;padding-bottom:24px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-wrapper.sc-ion-loading-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:34px;padding-inline-start:34px;-webkit-padding-end:34px;padding-inline-end:34px}}@supports ((-webkit-backdrop-filter: blur(0)) or (backdrop-filter: blur(0))){.loading-translucent.sc-ion-loading-ios-h .loading-wrapper.sc-ion-loading-ios{background-color:rgba(var(--ion-background-color-rgb, 255, 255, 255), 0.8);-webkit-backdrop-filter:saturate(180%) blur(20px);backdrop-filter:saturate(180%) blur(20px)}}.loading-content.sc-ion-loading-ios{font-weight:bold}.loading-spinner.sc-ion-loading-ios+.loading-content.sc-ion-loading-ios{margin-left:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-spinner.sc-ion-loading-ios+.loading-content.sc-ion-loading-ios{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}";
|
|
||||||
const loadingMdCss = ".sc-ion-loading-md-h{--min-width:auto;--width:auto;--min-height:auto;--height:auto;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:-ms-flexbox;display:flex;position:fixed;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;outline:none;font-family:var(--ion-font-family, inherit);contain:strict;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-loading-md-h{display:none}.loading-wrapper.sc-ion-loading-md{display:-ms-flexbox;display:flex;-ms-flex-align:inherit;align-items:inherit;-ms-flex-pack:inherit;justify-content:inherit;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);background:var(--background);opacity:0;z-index:10}ion-spinner.sc-ion-loading-md{color:var(--spinner-color)}.sc-ion-loading-md-h{--background:var(--ion-color-step-50, #f2f2f2);--max-width:280px;--max-height:90%;--spinner-color:var(--ion-color-primary, #3880ff);--backdrop-opacity:var(--ion-backdrop-opacity, 0.32);color:var(--ion-color-step-850, #262626);font-size:14px}.loading-wrapper.sc-ion-loading-md{border-radius:2px;padding-left:24px;padding-right:24px;padding-top:24px;padding-bottom:24px;-webkit-box-shadow:0 16px 20px rgba(0, 0, 0, 0.4);box-shadow:0 16px 20px rgba(0, 0, 0, 0.4)}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-wrapper.sc-ion-loading-md{padding-left:unset;padding-right:unset;-webkit-padding-start:24px;padding-inline-start:24px;-webkit-padding-end:24px;padding-inline-end:24px}}.loading-spinner.sc-ion-loading-md+.loading-content.sc-ion-loading-md{margin-left:16px}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){.loading-spinner.sc-ion-loading-md+.loading-content.sc-ion-loading-md{margin-left:unset;-webkit-margin-start:16px;margin-inline-start:16px}}";
|
|
||||||
const Loading = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
||||||
this.didPresent = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionLoadingDidPresent", 7);
|
|
||||||
this.willPresent = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionLoadingWillPresent", 7);
|
|
||||||
this.willDismiss = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionLoadingWillDismiss", 7);
|
|
||||||
this.didDismiss = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.e)(this, "ionLoadingDidDismiss", 7);
|
|
||||||
this.customHTMLEnabled = _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.get('innerHTMLTemplatesEnabled', _config_d4f612d2_js__WEBPACK_IMPORTED_MODULE_3__.E);
|
|
||||||
this.presented = false;
|
|
||||||
/**
|
|
||||||
* If `true`, the keyboard will be automatically dismissed when the overlay is presented.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.keyboardClose = true;
|
|
||||||
/**
|
|
||||||
* Number of milliseconds to wait before dismissing the loading indicator.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.duration = 0;
|
|
||||||
/**
|
|
||||||
* If `true`, the loading indicator will be dismissed when the backdrop is clicked.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.backdropDismiss = false;
|
|
||||||
/**
|
|
||||||
* If `true`, a backdrop will be displayed behind the loading indicator.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.showBackdrop = true;
|
|
||||||
/**
|
|
||||||
* If `true`, the loading indicator 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).
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.translucent = false;
|
|
||||||
/**
|
|
||||||
* If `true`, the loading indicator will animate.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.animated = true;
|
|
||||||
|
|
||||||
this.onBackdropTap = () => {
|
|
||||||
this.dismiss(undefined, _overlays_58fa8e4d_js__WEBPACK_IMPORTED_MODULE_4__.B);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
connectedCallback() {
|
|
||||||
(0,_overlays_58fa8e4d_js__WEBPACK_IMPORTED_MODULE_4__.e)(this.el);
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillLoad() {
|
|
||||||
if (this.spinner === undefined) {
|
|
||||||
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
||||||
this.spinner = _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.get('loadingSpinner', _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.c.get('spinner', mode === 'ios' ? 'lines' : 'crescent'));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Present the loading overlay after it has been created.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
present() {
|
|
||||||
var _this = 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* () {
|
|
||||||
yield (0,_overlays_58fa8e4d_js__WEBPACK_IMPORTED_MODULE_4__.d)(_this, 'loadingEnter', iosEnterAnimation, mdEnterAnimation);
|
|
||||||
|
|
||||||
if (_this.duration > 0) {
|
|
||||||
_this.durationTimeout = setTimeout(() => _this.dismiss(), _this.duration + 10);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Dismiss the loading overlay after it has been presented.
|
|
||||||
*
|
|
||||||
* @param data Any data to emit in the dismiss events.
|
|
||||||
* @param role The role of the element that is dismissing the loading.
|
|
||||||
* This can be useful in a button handler for determining which button was
|
|
||||||
* clicked to dismiss the loading.
|
|
||||||
* Some examples include: ``"cancel"`, `"destructive"`, "selected"`, and `"backdrop"`.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
dismiss(data, role) {
|
|
||||||
if (this.durationTimeout) {
|
|
||||||
clearTimeout(this.durationTimeout);
|
|
||||||
}
|
|
||||||
|
|
||||||
return (0,_overlays_58fa8e4d_js__WEBPACK_IMPORTED_MODULE_4__.f)(this, data, role, 'loadingLeave', iosLeaveAnimation, mdLeaveAnimation);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns a promise that resolves when the loading did dismiss.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
onDidDismiss() {
|
|
||||||
return (0,_overlays_58fa8e4d_js__WEBPACK_IMPORTED_MODULE_4__.g)(this.el, 'ionLoadingDidDismiss');
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns a promise that resolves when the loading will dismiss.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
onWillDismiss() {
|
|
||||||
return (0,_overlays_58fa8e4d_js__WEBPACK_IMPORTED_MODULE_4__.g)(this.el, 'ionLoadingWillDismiss');
|
|
||||||
}
|
|
||||||
|
|
||||||
renderLoadingMessage(msgId) {
|
|
||||||
const {
|
|
||||||
customHTMLEnabled,
|
|
||||||
message
|
|
||||||
} = this;
|
|
||||||
|
|
||||||
if (customHTMLEnabled) {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "loading-content",
|
|
||||||
id: msgId,
|
|
||||||
innerHTML: (0,_config_d4f612d2_js__WEBPACK_IMPORTED_MODULE_3__.a)(message)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "loading-content",
|
|
||||||
id: msgId
|
|
||||||
}, message);
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const {
|
|
||||||
message,
|
|
||||||
spinner,
|
|
||||||
htmlAttributes,
|
|
||||||
overlayIndex
|
|
||||||
} = this;
|
|
||||||
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_2__.b)(this);
|
|
||||||
const msgId = `loading-${overlayIndex}-msg`;
|
|
||||||
/**
|
|
||||||
* If the message is defined, use that as the label.
|
|
||||||
* Otherwise, don't set aria-labelledby.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const ariaLabelledBy = message !== undefined ? msgId : null;
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, Object.assign({
|
|
||||||
role: "dialog",
|
|
||||||
"aria-modal": "true",
|
|
||||||
"aria-labelledby": ariaLabelledBy,
|
|
||||||
tabindex: "-1"
|
|
||||||
}, htmlAttributes, {
|
|
||||||
style: {
|
|
||||||
zIndex: `${40000 + this.overlayIndex}`
|
|
||||||
},
|
|
||||||
onIonBackdropTap: this.onBackdropTap,
|
|
||||||
class: Object.assign(Object.assign({}, (0,_theme_7670341c_js__WEBPACK_IMPORTED_MODULE_5__.g)(this.cssClass)), {
|
|
||||||
[mode]: true,
|
|
||||||
'overlay-hidden': true,
|
|
||||||
'loading-translucent': this.translucent
|
|
||||||
})
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("ion-backdrop", {
|
|
||||||
visible: this.showBackdrop,
|
|
||||||
tappable: this.backdropDismiss
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
tabindex: "0"
|
|
||||||
}), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "loading-wrapper ion-overlay-wrapper"
|
|
||||||
}, spinner && (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
class: "loading-spinner"
|
|
||||||
}, (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("ion-spinner", {
|
|
||||||
name: spinner,
|
|
||||||
"aria-hidden": "true"
|
|
||||||
})), message !== undefined && this.renderLoadingMessage(msgId)), (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)("div", {
|
|
||||||
tabindex: "0"
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
get el() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
Loading.style = {
|
|
||||||
ios: loadingIosCss,
|
|
||||||
md: loadingMdCss
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ }),
|
|
||||||
|
|
||||||
/***/ 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=2855.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,709 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2875],{
|
|
||||||
|
|
||||||
/***/ 32875:
|
|
||||||
/*!***********************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/ion-virtual-scroll.entry.js ***!
|
|
||||||
\***********************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "ion_virtual_scroll": () => (/* binding */ VirtualScroll)
|
|
||||||
/* 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 _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
||||||
|
|
||||||
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
const CELL_TYPE_ITEM = 'item';
|
|
||||||
const CELL_TYPE_HEADER = 'header';
|
|
||||||
const CELL_TYPE_FOOTER = 'footer';
|
|
||||||
const NODE_CHANGE_NONE = 0;
|
|
||||||
const NODE_CHANGE_POSITION = 1;
|
|
||||||
const NODE_CHANGE_CELL = 2;
|
|
||||||
const MIN_READS = 2;
|
|
||||||
|
|
||||||
const updateVDom = (dom, heightIndex, cells, range) => {
|
|
||||||
// reset dom
|
|
||||||
for (const node of dom) {
|
|
||||||
node.change = NODE_CHANGE_NONE;
|
|
||||||
node.d = true;
|
|
||||||
} // try to match into exisiting dom
|
|
||||||
|
|
||||||
|
|
||||||
const toMutate = [];
|
|
||||||
const end = range.offset + range.length;
|
|
||||||
|
|
||||||
for (let i = range.offset; i < end; i++) {
|
|
||||||
const cell = cells[i];
|
|
||||||
const node = dom.find(n => n.d && n.cell === cell);
|
|
||||||
|
|
||||||
if (node) {
|
|
||||||
const top = heightIndex[i];
|
|
||||||
|
|
||||||
if (top !== node.top) {
|
|
||||||
node.top = top;
|
|
||||||
node.change = NODE_CHANGE_POSITION;
|
|
||||||
}
|
|
||||||
|
|
||||||
node.d = false;
|
|
||||||
} else {
|
|
||||||
toMutate.push(cell);
|
|
||||||
}
|
|
||||||
} // needs to append
|
|
||||||
|
|
||||||
|
|
||||||
const pool = dom.filter(n => n.d);
|
|
||||||
|
|
||||||
for (const cell of toMutate) {
|
|
||||||
const node = pool.find(n => n.d && n.cell.type === cell.type);
|
|
||||||
const index = cell.i;
|
|
||||||
|
|
||||||
if (node) {
|
|
||||||
node.d = false;
|
|
||||||
node.change = NODE_CHANGE_CELL;
|
|
||||||
node.cell = cell;
|
|
||||||
node.top = heightIndex[index];
|
|
||||||
} else {
|
|
||||||
dom.push({
|
|
||||||
d: false,
|
|
||||||
cell,
|
|
||||||
visible: true,
|
|
||||||
change: NODE_CHANGE_CELL,
|
|
||||||
top: heightIndex[index]
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dom.filter(n => n.d && n.top !== -9999).forEach(n => {
|
|
||||||
n.change = NODE_CHANGE_POSITION;
|
|
||||||
n.top = -9999;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
const doRender = (el, nodeRender, dom, updateCellHeight) => {
|
|
||||||
var _a;
|
|
||||||
|
|
||||||
const children = Array.from(el.children).filter(n => n.tagName !== 'TEMPLATE');
|
|
||||||
const childrenNu = children.length;
|
|
||||||
let child;
|
|
||||||
|
|
||||||
for (let i = 0; i < dom.length; i++) {
|
|
||||||
const node = dom[i];
|
|
||||||
const cell = node.cell; // the cell change, the content must be updated
|
|
||||||
|
|
||||||
if (node.change === NODE_CHANGE_CELL) {
|
|
||||||
if (i < childrenNu) {
|
|
||||||
child = children[i];
|
|
||||||
nodeRender(child, cell, i);
|
|
||||||
} else {
|
|
||||||
const newChild = createNode(el, cell.type);
|
|
||||||
child = (_a = nodeRender(newChild, cell, i)) !== null && _a !== void 0 ? _a : newChild;
|
|
||||||
child.classList.add('virtual-item');
|
|
||||||
el.appendChild(child);
|
|
||||||
}
|
|
||||||
|
|
||||||
child['$ionCell'] = cell;
|
|
||||||
} else {
|
|
||||||
child = children[i];
|
|
||||||
} // only update position when it changes
|
|
||||||
|
|
||||||
|
|
||||||
if (node.change !== NODE_CHANGE_NONE) {
|
|
||||||
child.style.transform = `translate3d(0,${node.top}px,0)`;
|
|
||||||
} // update visibility
|
|
||||||
|
|
||||||
|
|
||||||
const visible = cell.visible;
|
|
||||||
|
|
||||||
if (node.visible !== visible) {
|
|
||||||
if (visible) {
|
|
||||||
child.classList.remove('virtual-loading');
|
|
||||||
} else {
|
|
||||||
child.classList.add('virtual-loading');
|
|
||||||
}
|
|
||||||
|
|
||||||
node.visible = visible;
|
|
||||||
} // dynamic height
|
|
||||||
|
|
||||||
|
|
||||||
if (cell.reads > 0) {
|
|
||||||
updateCellHeight(cell, child);
|
|
||||||
cell.reads--;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const createNode = (el, type) => {
|
|
||||||
const template = getTemplate(el, type);
|
|
||||||
|
|
||||||
if (template && el.ownerDocument !== null) {
|
|
||||||
return el.ownerDocument.importNode(template.content, true).children[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
return null;
|
|
||||||
};
|
|
||||||
|
|
||||||
const getTemplate = (el, type) => {
|
|
||||||
switch (type) {
|
|
||||||
case CELL_TYPE_ITEM:
|
|
||||||
return el.querySelector('template:not([name])');
|
|
||||||
|
|
||||||
case CELL_TYPE_HEADER:
|
|
||||||
return el.querySelector('template[name=header]');
|
|
||||||
|
|
||||||
case CELL_TYPE_FOOTER:
|
|
||||||
return el.querySelector('template[name=footer]');
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const getViewport = (scrollTop, vierportHeight, margin) => {
|
|
||||||
return {
|
|
||||||
top: Math.max(scrollTop - margin, 0),
|
|
||||||
bottom: scrollTop + vierportHeight + margin
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const getRange = (heightIndex, viewport, buffer) => {
|
|
||||||
const topPos = viewport.top;
|
|
||||||
const bottomPos = viewport.bottom; // find top index
|
|
||||||
|
|
||||||
let i = 0;
|
|
||||||
|
|
||||||
for (; i < heightIndex.length; i++) {
|
|
||||||
if (heightIndex[i] > topPos) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const offset = Math.max(i - buffer - 1, 0); // find bottom index
|
|
||||||
|
|
||||||
for (; i < heightIndex.length; i++) {
|
|
||||||
if (heightIndex[i] >= bottomPos) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const end = Math.min(i + buffer, heightIndex.length);
|
|
||||||
const length = end - offset;
|
|
||||||
return {
|
|
||||||
offset,
|
|
||||||
length
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
const getShouldUpdate = (dirtyIndex, currentRange, range) => {
|
|
||||||
const end = range.offset + range.length;
|
|
||||||
return dirtyIndex <= end || currentRange.offset !== range.offset || currentRange.length !== range.length;
|
|
||||||
};
|
|
||||||
|
|
||||||
const findCellIndex = (cells, index) => {
|
|
||||||
const max = cells.length > 0 ? cells[cells.length - 1].index : 0;
|
|
||||||
|
|
||||||
if (index === 0) {
|
|
||||||
return 0;
|
|
||||||
} else if (index === max + 1) {
|
|
||||||
return cells.length;
|
|
||||||
} else {
|
|
||||||
return cells.findIndex(c => c.index === index);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const inplaceUpdate = (dst, src, offset) => {
|
|
||||||
if (offset === 0 && src.length >= dst.length) {
|
|
||||||
return src;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (let i = 0; i < src.length; i++) {
|
|
||||||
dst[i + offset] = src[i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return dst;
|
|
||||||
};
|
|
||||||
|
|
||||||
const calcCells = (items, itemHeight, headerHeight, footerHeight, headerFn, footerFn, approxHeaderHeight, approxFooterHeight, approxItemHeight, j, offset, len) => {
|
|
||||||
const cells = [];
|
|
||||||
const end = len + offset;
|
|
||||||
|
|
||||||
for (let i = offset; i < end; i++) {
|
|
||||||
const item = items[i];
|
|
||||||
|
|
||||||
if (headerFn) {
|
|
||||||
const value = headerFn(item, i, items);
|
|
||||||
|
|
||||||
if (value != null) {
|
|
||||||
cells.push({
|
|
||||||
i: j++,
|
|
||||||
type: CELL_TYPE_HEADER,
|
|
||||||
value,
|
|
||||||
index: i,
|
|
||||||
height: headerHeight ? headerHeight(value, i) : approxHeaderHeight,
|
|
||||||
reads: headerHeight ? 0 : MIN_READS,
|
|
||||||
visible: !!headerHeight
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
cells.push({
|
|
||||||
i: j++,
|
|
||||||
type: CELL_TYPE_ITEM,
|
|
||||||
value: item,
|
|
||||||
index: i,
|
|
||||||
height: itemHeight ? itemHeight(item, i) : approxItemHeight,
|
|
||||||
reads: itemHeight ? 0 : MIN_READS,
|
|
||||||
visible: !!itemHeight
|
|
||||||
});
|
|
||||||
|
|
||||||
if (footerFn) {
|
|
||||||
const value = footerFn(item, i, items);
|
|
||||||
|
|
||||||
if (value != null) {
|
|
||||||
cells.push({
|
|
||||||
i: j++,
|
|
||||||
type: CELL_TYPE_FOOTER,
|
|
||||||
value,
|
|
||||||
index: i,
|
|
||||||
height: footerHeight ? footerHeight(value, i) : approxFooterHeight,
|
|
||||||
reads: footerHeight ? 0 : MIN_READS,
|
|
||||||
visible: !!footerHeight
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return cells;
|
|
||||||
};
|
|
||||||
|
|
||||||
const calcHeightIndex = (buf, cells, index) => {
|
|
||||||
let acum = buf[index];
|
|
||||||
|
|
||||||
for (let i = index; i < buf.length; i++) {
|
|
||||||
buf[i] = acum;
|
|
||||||
acum += cells[i].height;
|
|
||||||
}
|
|
||||||
|
|
||||||
return acum;
|
|
||||||
};
|
|
||||||
|
|
||||||
const resizeBuffer = (buf, len) => {
|
|
||||||
if (!buf) {
|
|
||||||
return new Uint32Array(len);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (buf.length === len) {
|
|
||||||
return buf;
|
|
||||||
} else if (len > buf.length) {
|
|
||||||
const newBuf = new Uint32Array(len);
|
|
||||||
newBuf.set(buf);
|
|
||||||
return newBuf;
|
|
||||||
} else {
|
|
||||||
return buf.subarray(0, len);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const positionForIndex = (index, cells, heightIndex) => {
|
|
||||||
const cell = cells.find(c => c.type === CELL_TYPE_ITEM && c.index === index);
|
|
||||||
|
|
||||||
if (cell) {
|
|
||||||
return heightIndex[cell.i];
|
|
||||||
}
|
|
||||||
|
|
||||||
return -1;
|
|
||||||
};
|
|
||||||
|
|
||||||
const virtualScrollCss = "ion-virtual-scroll{display:block;position:relative;width:100%;contain:strict;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}ion-virtual-scroll>.virtual-loading{opacity:0}ion-virtual-scroll>.virtual-item{position:absolute !important;top:0 !important;right:0 !important;left:0 !important;-webkit-transition-duration:0ms;transition-duration:0ms;will-change:transform}";
|
|
||||||
const VirtualScroll = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.r)(this, hostRef);
|
|
||||||
this.range = {
|
|
||||||
offset: 0,
|
|
||||||
length: 0
|
|
||||||
};
|
|
||||||
this.viewportHeight = 0;
|
|
||||||
this.cells = [];
|
|
||||||
this.virtualDom = [];
|
|
||||||
this.isEnabled = false;
|
|
||||||
this.viewportOffset = 0;
|
|
||||||
this.currentScrollTop = 0;
|
|
||||||
this.indexDirty = 0;
|
|
||||||
this.lastItemLen = 0;
|
|
||||||
this.totalHeight = 0;
|
|
||||||
/**
|
|
||||||
* It is important to provide this
|
|
||||||
* if virtual item height will be significantly larger than the default
|
|
||||||
* The approximate height of each virtual item template's cell.
|
|
||||||
* This dimension is used to help determine how many cells should
|
|
||||||
* be created when initialized, and to help calculate the height of
|
|
||||||
* the scrollable area. This height value can only use `px` units.
|
|
||||||
* Note that the actual rendered size of each cell comes from the
|
|
||||||
* app's CSS, whereas this approximation is used to help calculate
|
|
||||||
* initial dimensions before the item has been rendered.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.approxItemHeight = 45;
|
|
||||||
/**
|
|
||||||
* The approximate height of each header template's cell.
|
|
||||||
* This dimension is used to help determine how many cells should
|
|
||||||
* be created when initialized, and to help calculate the height of
|
|
||||||
* the scrollable area. This height value can only use `px` units.
|
|
||||||
* Note that the actual rendered size of each cell comes from the
|
|
||||||
* app's CSS, whereas this approximation is used to help calculate
|
|
||||||
* initial dimensions before the item has been rendered.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.approxHeaderHeight = 30;
|
|
||||||
/**
|
|
||||||
* The approximate width of each footer template's cell.
|
|
||||||
* This dimension is used to help determine how many cells should
|
|
||||||
* be created when initialized, and to help calculate the height of
|
|
||||||
* the scrollable area. This height value can only use `px` units.
|
|
||||||
* Note that the actual rendered size of each cell comes from the
|
|
||||||
* app's CSS, whereas this approximation is used to help calculate
|
|
||||||
* initial dimensions before the item has been rendered.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.approxFooterHeight = 30;
|
|
||||||
|
|
||||||
this.onScroll = () => {
|
|
||||||
this.updateVirtualScroll();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
itemsChanged() {
|
|
||||||
this.calcCells();
|
|
||||||
this.updateVirtualScroll();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentWillLoad() {
|
|
||||||
console.warn(`[Deprecation Warning]: ion-virtual-scroll has been deprecated and will be removed in Ionic Framework v7.0. See https://ionicframework.com/docs/angular/virtual-scroll for migration steps.`);
|
|
||||||
}
|
|
||||||
|
|
||||||
connectedCallback() {
|
|
||||||
var _this = 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 contentEl = _this.el.closest('ion-content');
|
|
||||||
|
|
||||||
if (!contentEl) {
|
|
||||||
console.error('<ion-virtual-scroll> must be used inside an <ion-content>');
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
_this.scrollEl = yield contentEl.getScrollElement();
|
|
||||||
_this.contentEl = contentEl;
|
|
||||||
|
|
||||||
_this.calcCells();
|
|
||||||
|
|
||||||
_this.updateState();
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
componentDidUpdate() {
|
|
||||||
this.updateState();
|
|
||||||
}
|
|
||||||
|
|
||||||
disconnectedCallback() {
|
|
||||||
this.scrollEl = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
onResize() {
|
|
||||||
this.calcCells();
|
|
||||||
this.updateVirtualScroll();
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* Returns the position of the virtual item at the given index.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
positionForItem(index) {
|
|
||||||
return Promise.resolve(positionForIndex(index, this.cells, this.getHeightIndex()));
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This method marks a subset of items as dirty, so they can be re-rendered. Items should be marked as
|
|
||||||
* dirty any time the content or their style changes.
|
|
||||||
*
|
|
||||||
* The subset of items to be updated can are specifying by an offset and a length.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
checkRange(_x) {
|
|
||||||
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* (offset, len = -1) {
|
|
||||||
// TODO: kind of hacky how we do in-place updated of the cells
|
|
||||||
// array. this part needs a complete refactor
|
|
||||||
if (!_this2.items) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const length = len === -1 ? _this2.items.length - offset : len;
|
|
||||||
const cellIndex = findCellIndex(_this2.cells, offset);
|
|
||||||
const cells = calcCells(_this2.items, _this2.itemHeight, _this2.headerHeight, _this2.footerHeight, _this2.headerFn, _this2.footerFn, _this2.approxHeaderHeight, _this2.approxFooterHeight, _this2.approxItemHeight, cellIndex, offset, length);
|
|
||||||
_this2.cells = inplaceUpdate(_this2.cells, cells, cellIndex);
|
|
||||||
_this2.lastItemLen = _this2.items.length;
|
|
||||||
_this2.indexDirty = Math.max(offset - 1, 0);
|
|
||||||
|
|
||||||
_this2.scheduleUpdate();
|
|
||||||
}).apply(this, arguments);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This method marks the tail the items array as dirty, so they can be re-rendered.
|
|
||||||
*
|
|
||||||
* It's equivalent to calling:
|
|
||||||
*
|
|
||||||
* ```js
|
|
||||||
* virtualScroll.checkRange(lastItemLen);
|
|
||||||
* ```
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
checkEnd() {
|
|
||||||
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 (_this3.items) {
|
|
||||||
_this3.checkRange(_this3.lastItemLen);
|
|
||||||
}
|
|
||||||
})();
|
|
||||||
}
|
|
||||||
|
|
||||||
updateVirtualScroll() {
|
|
||||||
// do nothing if virtual-scroll is disabled
|
|
||||||
if (!this.isEnabled || !this.scrollEl) {
|
|
||||||
return;
|
|
||||||
} // unschedule future updates
|
|
||||||
|
|
||||||
|
|
||||||
if (this.timerUpdate) {
|
|
||||||
clearTimeout(this.timerUpdate);
|
|
||||||
this.timerUpdate = undefined;
|
|
||||||
} // schedule DOM operations into the stencil queue
|
|
||||||
|
|
||||||
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.f)(this.readVS.bind(this));
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.c)(this.writeVS.bind(this));
|
|
||||||
}
|
|
||||||
|
|
||||||
readVS() {
|
|
||||||
const {
|
|
||||||
contentEl,
|
|
||||||
scrollEl,
|
|
||||||
el
|
|
||||||
} = this;
|
|
||||||
let topOffset = 0;
|
|
||||||
let node = el;
|
|
||||||
|
|
||||||
while (node !== null && node !== contentEl) {
|
|
||||||
topOffset += node.offsetTop;
|
|
||||||
node = node.offsetParent;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.viewportOffset = topOffset;
|
|
||||||
|
|
||||||
if (scrollEl) {
|
|
||||||
this.viewportHeight = scrollEl.offsetHeight;
|
|
||||||
this.currentScrollTop = scrollEl.scrollTop;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
writeVS() {
|
|
||||||
const dirtyIndex = this.indexDirty; // get visible viewport
|
|
||||||
|
|
||||||
const scrollTop = this.currentScrollTop - this.viewportOffset;
|
|
||||||
const viewport = getViewport(scrollTop, this.viewportHeight, 100); // compute lazily the height index
|
|
||||||
|
|
||||||
const heightIndex = this.getHeightIndex(); // get array bounds of visible cells base in the viewport
|
|
||||||
|
|
||||||
const range = getRange(heightIndex, viewport, 2); // fast path, do nothing
|
|
||||||
|
|
||||||
const shouldUpdate = getShouldUpdate(dirtyIndex, this.range, range);
|
|
||||||
|
|
||||||
if (!shouldUpdate) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.range = range; // in place mutation of the virtual DOM
|
|
||||||
|
|
||||||
updateVDom(this.virtualDom, heightIndex, this.cells, range); // Write DOM
|
|
||||||
// Different code paths taken depending of the render API used
|
|
||||||
|
|
||||||
if (this.nodeRender) {
|
|
||||||
doRender(this.el, this.nodeRender, this.virtualDom, this.updateCellHeight.bind(this));
|
|
||||||
} else if (this.domRender) {
|
|
||||||
this.domRender(this.virtualDom);
|
|
||||||
} else if (this.renderItem) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.j)(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
updateCellHeight(cell, node) {
|
|
||||||
const update = () => {
|
|
||||||
if (node['$ionCell'] === cell) {
|
|
||||||
const style = window.getComputedStyle(node);
|
|
||||||
const height = node.offsetHeight + parseFloat(style.getPropertyValue('margin-bottom'));
|
|
||||||
this.setCellHeight(cell, height);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
if (node) {
|
|
||||||
(0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_2__.c)(node, update);
|
|
||||||
} else {
|
|
||||||
update();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
setCellHeight(cell, height) {
|
|
||||||
const index = cell.i; // the cell might changed since the height update was scheduled
|
|
||||||
|
|
||||||
if (cell !== this.cells[index]) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cell.height !== height || cell.visible !== true) {
|
|
||||||
cell.visible = true;
|
|
||||||
cell.height = height;
|
|
||||||
this.indexDirty = Math.min(this.indexDirty, index);
|
|
||||||
this.scheduleUpdate();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
scheduleUpdate() {
|
|
||||||
clearTimeout(this.timerUpdate);
|
|
||||||
this.timerUpdate = setTimeout(() => this.updateVirtualScroll(), 100);
|
|
||||||
}
|
|
||||||
|
|
||||||
updateState() {
|
|
||||||
const shouldEnable = !!(this.scrollEl && this.cells.length > 0);
|
|
||||||
|
|
||||||
if (shouldEnable !== this.isEnabled) {
|
|
||||||
this.enableScrollEvents(shouldEnable);
|
|
||||||
|
|
||||||
if (shouldEnable) {
|
|
||||||
this.updateVirtualScroll();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
calcCells() {
|
|
||||||
if (!this.items) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.lastItemLen = this.items.length;
|
|
||||||
this.cells = calcCells(this.items, this.itemHeight, this.headerHeight, this.footerHeight, this.headerFn, this.footerFn, this.approxHeaderHeight, this.approxFooterHeight, this.approxItemHeight, 0, 0, this.lastItemLen);
|
|
||||||
this.indexDirty = 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
getHeightIndex() {
|
|
||||||
if (this.indexDirty !== Infinity) {
|
|
||||||
this.calcHeightIndex(this.indexDirty);
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.heightIndex;
|
|
||||||
}
|
|
||||||
|
|
||||||
calcHeightIndex(index = 0) {
|
|
||||||
// TODO: optimize, we don't need to calculate all the cells
|
|
||||||
this.heightIndex = resizeBuffer(this.heightIndex, this.cells.length);
|
|
||||||
this.totalHeight = calcHeightIndex(this.heightIndex, this.cells, index);
|
|
||||||
this.indexDirty = Infinity;
|
|
||||||
}
|
|
||||||
|
|
||||||
enableScrollEvents(shouldListen) {
|
|
||||||
if (this.rmEvent) {
|
|
||||||
this.rmEvent();
|
|
||||||
this.rmEvent = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
const scrollEl = this.scrollEl;
|
|
||||||
|
|
||||||
if (scrollEl) {
|
|
||||||
this.isEnabled = shouldListen;
|
|
||||||
scrollEl.addEventListener('scroll', this.onScroll);
|
|
||||||
|
|
||||||
this.rmEvent = () => {
|
|
||||||
scrollEl.removeEventListener('scroll', this.onScroll);
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
renderVirtualNode(node) {
|
|
||||||
const {
|
|
||||||
type,
|
|
||||||
value,
|
|
||||||
index
|
|
||||||
} = node.cell;
|
|
||||||
|
|
||||||
switch (type) {
|
|
||||||
case CELL_TYPE_ITEM:
|
|
||||||
return this.renderItem(value, index);
|
|
||||||
|
|
||||||
case CELL_TYPE_HEADER:
|
|
||||||
return this.renderHeader(value, index);
|
|
||||||
|
|
||||||
case CELL_TYPE_FOOTER:
|
|
||||||
return this.renderFooter(value, index);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.H, {
|
|
||||||
style: {
|
|
||||||
height: `${this.totalHeight}px`
|
|
||||||
}
|
|
||||||
}, this.renderItem && (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.h)(VirtualProxy, {
|
|
||||||
dom: this.virtualDom
|
|
||||||
}, this.virtualDom.map(node => this.renderVirtualNode(node))));
|
|
||||||
}
|
|
||||||
|
|
||||||
get el() {
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_1__.i)(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
static get watchers() {
|
|
||||||
return {
|
|
||||||
"itemHeight": ["itemsChanged"],
|
|
||||||
"headerHeight": ["itemsChanged"],
|
|
||||||
"footerHeight": ["itemsChanged"],
|
|
||||||
"items": ["itemsChanged"]
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
|
|
||||||
const VirtualProxy = ({
|
|
||||||
dom
|
|
||||||
}, children, utils) => {
|
|
||||||
return utils.map(children, (child, i) => {
|
|
||||||
const node = dom[i];
|
|
||||||
const vattrs = child.vattrs || {};
|
|
||||||
let classes = vattrs.class || '';
|
|
||||||
classes += 'virtual-item ';
|
|
||||||
|
|
||||||
if (!node.visible) {
|
|
||||||
classes += 'virtual-loading';
|
|
||||||
}
|
|
||||||
|
|
||||||
return Object.assign(Object.assign({}, child), {
|
|
||||||
vattrs: Object.assign(Object.assign({}, vattrs), {
|
|
||||||
class: classes,
|
|
||||||
style: Object.assign(Object.assign({}, vattrs.style), {
|
|
||||||
transform: `translate3d(0,${node.top}px,0)`
|
|
||||||
})
|
|
||||||
})
|
|
||||||
});
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
VirtualScroll.style = virtualScrollCss;
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2875.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[288],{10288:(m,i,o)=>{o.r(i),o.d(i,{FirebaseCrashlyticsWeb:()=>r});var t=o(15861),s=o(47423);class r extends s.Uw{crash(){var e=this;return(0,t.Z)(function*(){throw e.unimplemented("Not implemented on web.")})()}setCustomKey(e){var n=this;return(0,t.Z)(function*(){throw n.unimplemented("Not implemented on web.")})()}setUserId(e){var n=this;return(0,t.Z)(function*(){throw n.unimplemented("Not implemented on web.")})()}log(e){var n=this;return(0,t.Z)(function*(){throw n.unimplemented("Not implemented on web.")})()}setEnabled(e){var n=this;return(0,t.Z)(function*(){throw n.unimplemented("Not implemented on web.")})()}isEnabled(){var e=this;return(0,t.Z)(function*(){throw e.unimplemented("Not implemented on web.")})()}didCrashOnPreviousExecution(){var e=this;return(0,t.Z)(function*(){throw e.unimplemented("Not implemented on web.")})()}sendUnsentReports(){var e=this;return(0,t.Z)(function*(){throw e.unimplemented("Not implemented on web.")})()}deleteUnsentReports(){var e=this;return(0,t.Z)(function*(){throw e.unimplemented("Not implemented on web.")})()}recordException(e){var n=this;return(0,t.Z)(function*(){throw n.unimplemented("Not implemented on web.")})()}}}}]);
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,109 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[2938],{
|
|
||||||
|
|
||||||
/***/ 35861:
|
|
||||||
/*!******************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/swipe-back-e35bd7d6.js ***!
|
|
||||||
\******************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "createSwipeBackGesture": () => (/* binding */ createSwipeBackGesture)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var _helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers-3b390e48.js */ 29259);
|
|
||||||
/* harmony import */ var _dir_e8b767a8_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dir-e8b767a8.js */ 17481);
|
|
||||||
/* harmony import */ var _index_422b6e83_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./index-422b6e83.js */ 36366);
|
|
||||||
/* harmony import */ var _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./gesture-controller-17060b7c.js */ 56379);
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {
|
|
||||||
const win = el.ownerDocument.defaultView;
|
|
||||||
let rtl = (0,_dir_e8b767a8_js__WEBPACK_IMPORTED_MODULE_1__.i)(el);
|
|
||||||
/**
|
|
||||||
* Determine if a gesture is near the edge
|
|
||||||
* of the screen. If true, then the swipe
|
|
||||||
* to go back gesture should proceed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
const isAtEdge = detail => {
|
|
||||||
const threshold = 50;
|
|
||||||
const {
|
|
||||||
startX
|
|
||||||
} = detail;
|
|
||||||
|
|
||||||
if (rtl) {
|
|
||||||
return startX >= win.innerWidth - threshold;
|
|
||||||
}
|
|
||||||
|
|
||||||
return startX <= threshold;
|
|
||||||
};
|
|
||||||
|
|
||||||
const getDeltaX = detail => {
|
|
||||||
return rtl ? -detail.deltaX : detail.deltaX;
|
|
||||||
};
|
|
||||||
|
|
||||||
const getVelocityX = detail => {
|
|
||||||
return rtl ? -detail.velocityX : detail.velocityX;
|
|
||||||
};
|
|
||||||
|
|
||||||
const canStart = detail => {
|
|
||||||
/**
|
|
||||||
* The user's locale can change mid-session,
|
|
||||||
* so we need to check text direction at
|
|
||||||
* the beginning of every gesture.
|
|
||||||
*/
|
|
||||||
rtl = (0,_dir_e8b767a8_js__WEBPACK_IMPORTED_MODULE_1__.i)(el);
|
|
||||||
return isAtEdge(detail) && canStartHandler();
|
|
||||||
};
|
|
||||||
|
|
||||||
const onMove = detail => {
|
|
||||||
// set the transition animation's progress
|
|
||||||
const delta = getDeltaX(detail);
|
|
||||||
const stepValue = delta / win.innerWidth;
|
|
||||||
onMoveHandler(stepValue);
|
|
||||||
};
|
|
||||||
|
|
||||||
const onEnd = detail => {
|
|
||||||
// the swipe back gesture has ended
|
|
||||||
const delta = getDeltaX(detail);
|
|
||||||
const width = win.innerWidth;
|
|
||||||
const stepValue = delta / width;
|
|
||||||
const velocity = getVelocityX(detail);
|
|
||||||
const z = width / 2.0;
|
|
||||||
const shouldComplete = velocity >= 0 && (velocity > 0.2 || delta > z);
|
|
||||||
const missing = shouldComplete ? 1 - stepValue : stepValue;
|
|
||||||
const missingDistance = missing * width;
|
|
||||||
let realDur = 0;
|
|
||||||
|
|
||||||
if (missingDistance > 5) {
|
|
||||||
const dur = missingDistance / Math.abs(velocity);
|
|
||||||
realDur = Math.min(dur, 540);
|
|
||||||
}
|
|
||||||
|
|
||||||
onEndHandler(shouldComplete, stepValue <= 0 ? 0.01 : (0,_helpers_3b390e48_js__WEBPACK_IMPORTED_MODULE_0__.l)(0, stepValue, 0.9999), realDur);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (0,_index_422b6e83_js__WEBPACK_IMPORTED_MODULE_2__.createGesture)({
|
|
||||||
el,
|
|
||||||
gestureName: 'goback-swipe',
|
|
||||||
gesturePriority: 40,
|
|
||||||
threshold: 10,
|
|
||||||
canStart,
|
|
||||||
onStart: onStartHandler,
|
|
||||||
onMove,
|
|
||||||
onEnd
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=2938.js.map
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -1,96 +0,0 @@
|
|||||||
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([[3059],{
|
|
||||||
|
|
||||||
/***/ 13059:
|
|
||||||
/*!*****************************************************************!*\
|
|
||||||
!*** ./node_modules/@ionic/core/dist/esm/ion-backdrop.entry.js ***!
|
|
||||||
\*****************************************************************/
|
|
||||||
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
||||||
|
|
||||||
__webpack_require__.r(__webpack_exports__);
|
|
||||||
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
||||||
/* harmony export */ "ion_backdrop": () => (/* binding */ Backdrop)
|
|
||||||
/* harmony export */ });
|
|
||||||
/* harmony import */ var _index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./index-8e692445.js */ 91559);
|
|
||||||
/* harmony import */ var _ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ionic-global-c74e4951.js */ 95823);
|
|
||||||
/* harmony import */ var _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gesture-controller-17060b7c.js */ 56379);
|
|
||||||
/*!
|
|
||||||
* (C) Ionic http://ionicframework.com - MIT License
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const backdropIosCss = ":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";
|
|
||||||
const backdropMdCss = ":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}";
|
|
||||||
const Backdrop = class {
|
|
||||||
constructor(hostRef) {
|
|
||||||
(0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.r)(this, hostRef);
|
|
||||||
this.ionBackdropTap = (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.e)(this, "ionBackdropTap", 7);
|
|
||||||
this.blocker = _gesture_controller_17060b7c_js__WEBPACK_IMPORTED_MODULE_2__.G.createBlocker({
|
|
||||||
disableScroll: true
|
|
||||||
});
|
|
||||||
/**
|
|
||||||
* If `true`, the backdrop will be visible.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.visible = true;
|
|
||||||
/**
|
|
||||||
* If `true`, the backdrop will can be clicked and will emit the `ionBackdropTap` event.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.tappable = true;
|
|
||||||
/**
|
|
||||||
* If `true`, the backdrop will stop propagation on tap.
|
|
||||||
*/
|
|
||||||
|
|
||||||
this.stopPropagation = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
connectedCallback() {
|
|
||||||
if (this.stopPropagation) {
|
|
||||||
this.blocker.block();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
disconnectedCallback() {
|
|
||||||
this.blocker.unblock();
|
|
||||||
}
|
|
||||||
|
|
||||||
onMouseDown(ev) {
|
|
||||||
this.emitTap(ev);
|
|
||||||
}
|
|
||||||
|
|
||||||
emitTap(ev) {
|
|
||||||
if (this.stopPropagation) {
|
|
||||||
ev.preventDefault();
|
|
||||||
ev.stopPropagation();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.tappable) {
|
|
||||||
this.ionBackdropTap.emit();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
render() {
|
|
||||||
const mode = (0,_ionic_global_c74e4951_js__WEBPACK_IMPORTED_MODULE_1__.b)(this);
|
|
||||||
return (0,_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.h)(_index_8e692445_js__WEBPACK_IMPORTED_MODULE_0__.H, {
|
|
||||||
tabindex: "-1",
|
|
||||||
"aria-hidden": "true",
|
|
||||||
class: {
|
|
||||||
[mode]: true,
|
|
||||||
'backdrop-hide': !this.visible,
|
|
||||||
'backdrop-no-tappable': !this.tappable
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
};
|
|
||||||
Backdrop.style = {
|
|
||||||
ios: backdropIosCss,
|
|
||||||
md: backdropMdCss
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
/***/ })
|
|
||||||
|
|
||||||
}])
|
|
||||||
//# sourceMappingURL=3059.js.map
|
|
||||||
@@ -1 +0,0 @@
|
|||||||
{"version":3,"file":"3059.js","mappings":";;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA,MAAMW,cAAc,GAAG,wWAAvB;AAEA,MAAMC,aAAa,GAAG,wWAAtB;AAEA,MAAMC,QAAQ,GAAG,MAAM;EACrBC,WAAW,CAACC,OAAD,EAAU;IACnBd,qDAAgB,CAAC,IAAD,EAAOc,OAAP,CAAhB;IACA,KAAKC,cAAL,GAAsBb,qDAAW,CAAC,IAAD,EAAO,gBAAP,EAAyB,CAAzB,CAAjC;IACA,KAAKc,OAAL,GAAeP,4EAAA,CAAiC;MAC9CS,aAAa,EAAE;IAD+B,CAAjC,CAAf;IAGA;AACJ;AACA;;IACI,KAAKC,OAAL,GAAe,IAAf;IACA;AACJ;AACA;;IACI,KAAKC,QAAL,GAAgB,IAAhB;IACA;AACJ;AACA;;IACI,KAAKC,eAAL,GAAuB,IAAvB;EACD;;EACDC,iBAAiB,GAAG;IAClB,IAAI,KAAKD,eAAT,EAA0B;MACxB,KAAKL,OAAL,CAAaO,KAAb;IACD;EACF;;EACDC,oBAAoB,GAAG;IACrB,KAAKR,OAAL,CAAaS,OAAb;EACD;;EACDC,WAAW,CAACC,EAAD,EAAK;IACd,KAAKC,OAAL,CAAaD,EAAb;EACD;;EACDC,OAAO,CAACD,EAAD,EAAK;IACV,IAAI,KAAKN,eAAT,EAA0B;MACxBM,EAAE,CAACE,cAAH;MACAF,EAAE,CAACN,eAAH;IACD;;IACD,IAAI,KAAKD,QAAT,EAAmB;MACjB,KAAKL,cAAL,CAAoBe,IAApB;IACD;EACF;;EACDC,MAAM,GAAG;IACP,MAAMC,IAAI,GAAGzB,4DAAU,CAAC,IAAD,CAAvB;IACA,OAAQJ,qDAAC,CAACE,iDAAD,EAAO;MAAE4B,QAAQ,EAAE,IAAZ;MAAkB,eAAe,MAAjC;MAAyCC,KAAK,EAAE;QAC5D,CAACF,IAAD,GAAQ,IADoD;QAE5D,iBAAiB,CAAC,KAAKb,OAFqC;QAG5D,wBAAwB,CAAC,KAAKC;MAH8B;IAAhD,CAAP,CAAT;EAKD;;AA/CoB,CAAvB;AAiDAR,QAAQ,CAACuB,KAAT,GAAiB;EACfC,GAAG,EAAE1B,cADU;EAEf2B,EAAE,EAAE1B;AAFW,CAAjB","sources":["./node_modules/@ionic/core/dist/esm/ion-backdrop.entry.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { r as registerInstance, e as createEvent, h, H as Host } from './index-8e692445.js';\nimport { b as getIonMode } from './ionic-global-c74e4951.js';\nimport { G as GESTURE_CONTROLLER } from './gesture-controller-17060b7c.js';\n\nconst backdropIosCss = \":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}\";\n\nconst backdropMdCss = \":host{left:0;right:0;top:0;bottom:0;display:block;position:absolute;-webkit-transform:translateZ(0);transform:translateZ(0);contain:strict;cursor:pointer;opacity:0.01;-ms-touch-action:none;touch-action:none;z-index:2}:host(.backdrop-hide){background:transparent}:host(.backdrop-no-tappable){cursor:auto}:host{background-color:var(--ion-backdrop-color, #000)}\";\n\nconst Backdrop = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionBackdropTap = createEvent(this, \"ionBackdropTap\", 7);\n this.blocker = GESTURE_CONTROLLER.createBlocker({\n disableScroll: true,\n });\n /**\n * If `true`, the backdrop will be visible.\n */\n this.visible = true;\n /**\n * If `true`, the backdrop will can be clicked and will emit the `ionBackdropTap` event.\n */\n this.tappable = true;\n /**\n * If `true`, the backdrop will stop propagation on tap.\n */\n this.stopPropagation = true;\n }\n connectedCallback() {\n if (this.stopPropagation) {\n this.blocker.block();\n }\n }\n disconnectedCallback() {\n this.blocker.unblock();\n }\n onMouseDown(ev) {\n this.emitTap(ev);\n }\n emitTap(ev) {\n if (this.stopPropagation) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n if (this.tappable) {\n this.ionBackdropTap.emit();\n }\n }\n render() {\n const mode = getIonMode(this);\n return (h(Host, { tabindex: \"-1\", \"aria-hidden\": \"true\", class: {\n [mode]: true,\n 'backdrop-hide': !this.visible,\n 'backdrop-no-tappable': !this.tappable,\n } }));\n }\n};\nBackdrop.style = {\n ios: backdropIosCss,\n md: backdropMdCss\n};\n\nexport { Backdrop as ion_backdrop };\n"],"names":["r","registerInstance","e","createEvent","h","H","Host","b","getIonMode","G","GESTURE_CONTROLLER","backdropIosCss","backdropMdCss","Backdrop","constructor","hostRef","ionBackdropTap","blocker","createBlocker","disableScroll","visible","tappable","stopPropagation","connectedCallback","block","disconnectedCallback","unblock","onMouseDown","ev","emitTap","preventDefault","emit","render","mode","tabindex","class","style","ios","md","ion_backdrop"],"sourceRoot":"webpack:///","x_google_ignoreList":[0]}
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1 @@
|
|||||||
|
(self.webpackChunkapp=self.webpackChunkapp||[]).push([[3109,6659],{75062:(E,o,e)=>{e.d(o,{i:()=>a});const a=s=>s&&""!==s.dir?"rtl"===s.dir.toLowerCase():"rtl"===document?.dir.toLowerCase()},56659:(E,o,e)=>{e.r(o),e.d(o,{createSwipeBackGesture:()=>g});var a=e(35730),s=e(75062),M=e(81898);e(34349);const g=(r,v,p,C,P)=>{const u=r.ownerDocument.defaultView;let c=(0,s.i)(r);const _=t=>c?-t.deltaX:t.deltaX;return(0,M.createGesture)({el:r,gestureName:"goback-swipe",gesturePriority:40,threshold:10,canStart:t=>(c=(0,s.i)(r),(t=>{const{startX:n}=t;return c?n>=u.innerWidth-50:n<=50})(t)&&v()),onStart:p,onMove:t=>{const n=_(t)/u.innerWidth;C(n)},onEnd:t=>{const i=_(t),n=u.innerWidth,d=i/n,l=(t=>c?-t.velocityX:t.velocityX)(t),h=l>=0&&(l>.2||i>n/2),m=(h?1-d:d)*n;let D=0;if(m>5){const B=m/Math.abs(l);D=Math.min(B,540)}P(h,d<=0?.01:(0,a.l)(0,d,.9999),D)}})}}}]);
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user