aiber-martin/www/32-es5.js.map
Martin Donnelly a4b8625d0f init
2020-12-17 16:23:12 +00:00

1 line
40 KiB
Plaintext

{"version":3,"sources":["webpack:///node_modules/@ionic/core/dist/esm/ion-select_3.entry.js"],"names":["watchForOptions","containerEl","tagName","onChange","MutationObserver","mutation","mutationList","getSelectedOption","observe","childList","subtree","newOption","forEach","mut","i","addedNodes","length","findCheckedOption","el","nodeType","undefined","options","toUpperCase","Array","from","querySelectorAll","find","o","value","selectIosCss","selectMdCss","Select","hostRef","ionChange","ionCancel","ionFocus","ionBlur","ionStyle","inputId","selectIds","didInit","isExpanded","disabled","cancelText","okText","name","multiple","interfaceOptions","onClick","ev","setFocus","open","onFocus","emit","onBlur","emitStyle","updateOverlayOptions","mutationO","disconnect","event","createOverlay","overlay","onDidDismiss","then","present","selectInterface","console","warn","openPopover","openActionSheet","openAlert","childOpts","buttons","createActionSheetButtons","popover","querySelector","createPopoverOptions","inputType","inputs","createAlertInputs","data","selectValue","actionSheetButtons","map","option","getOptionValue","copyClasses","classList","filter","cls","join","optClass","OPTION_CLASS","role","isOptionSelected","compareWith","text","textContent","cssClass","handler","push","alertInputs","type","label","checked","popoverOptions","close","mode","popoverOpts","Object","assign","component","componentProps","header","subHeader","message","create","actionSheetOpts","getLabel","labelText","alertOpts","selectedValues","Promise","resolve","dismiss","getText","selectedText","generateText","buttonEl","focus","placeholder","hasValue","labelId","id","addPlaceholderClass","selectText","parseValue","selectTextClasses","textPart","part","ref","btnEl","currentValue","compareValue","isArray","some","val","compareOptions","toString","includes","opts","v","textForValue","opt","selectOpt","style","ios","md","selectOptionCss","SelectOption","selectOptionIds","selectPopoverCss","SelectPopover","target","checkedOption","checkedValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;AAAA;AAAA;;;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AE,IAAF,EAAQ,IAAR,EAAc,KAAK8F,SAAnB,CAA3E,EAA0G,KAAKC,OAAL,KAAiB/F,SAAjB,IAA8B,6DAAE,GAAF,EAAO,IAAP,EAAa,KAAK+F,OAAlB,CAAxI,CAApB,CADyC,EACiJ,6DAAE,iBAAF,EAAqB;AAAEvF,mBAAK,EAAEyI;AAAT,aAArB,EAA8C,KAAKhJ,OAAL,CAAa8D,GAAb,CAAiB,UAAAC,MAAM;AAAA,qBAAI,6DAAE,UAAF,EAAc;AAAE,yBAAO,6DAAYA,MAAM,CAACc,QAAnB;AAAT,eAAd,EAAuD,6DAAE,WAAF,EAAe,IAAf,EAAqBd,MAAM,CAACY,IAA5B,CAAvD,EAA0F,6DAAE,WAAF,EAAe;AAAEpE,qBAAK,EAAEwD,MAAM,CAACxD,KAAhB;AAAuBc,wBAAQ,EAAE0C,MAAM,CAAC1C;AAAxC,eAAf,CAA1F,CAAJ;AAAA,aAAvB,CAA9C,CADjJ,CAArC,CAAR;AAEH;AAjBc;;AAAA;AAAA,SAAnB;;AAmBAwH,mBAAa,CAACP,KAAd,GAAsBM,gBAAtB","file":"32-es5.js","sourcesContent":["import { r as registerInstance, e as createEvent, h, H as Host, i as getElement } from './index-92848855.js';\nimport { b as getIonMode } from './ionic-global-23e7365a.js';\nimport { f as findItemLabel, a as renderHiddenInput } from './helpers-5c745fbd.js';\nimport './hardware-back-button-7b6ede21.js';\nimport { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-c5d9d644.js';\nimport { h as hostContext, g as getClassMap } from './theme-5641d27f.js';\n\nconst watchForOptions = (containerEl, tagName, onChange) => {\n /* tslint:disable-next-line */\n if (typeof MutationObserver === 'undefined') {\n return;\n }\n const mutation = new MutationObserver(mutationList => {\n onChange(getSelectedOption(mutationList, tagName));\n });\n mutation.observe(containerEl, {\n childList: true,\n subtree: true\n });\n return mutation;\n};\nconst getSelectedOption = (mutationList, tagName) => {\n let newOption;\n mutationList.forEach(mut => {\n // tslint:disable-next-line: prefer-for-of\n for (let i = 0; i < mut.addedNodes.length; i++) {\n newOption = findCheckedOption(mut.addedNodes[i], tagName) || newOption;\n }\n });\n return newOption;\n};\nconst findCheckedOption = (el, tagName) => {\n if (el.nodeType !== 1) {\n return undefined;\n }\n const options = (el.tagName === tagName.toUpperCase())\n ? [el]\n : Array.from(el.querySelectorAll(tagName));\n return options.find((o) => o.value === el.value);\n};\n\nconst selectIosCss = \":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.select-icon{position:relative;opacity:0.33}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-3px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:10px;--padding-bottom:10px;--padding-start:20px}.select-icon{width:12px;height:18px}\";\n\nconst selectMdCss = \":host{--placeholder-color:currentColor;--placeholder-opacity:0.33;padding-left:var(--padding-start);padding-right:var(--padding-end);padding-top:var(--padding-top);padding-bottom:var(--padding-bottom);display:-ms-flexbox;display:flex;position:relative;-ms-flex-align:center;align-items:center;font-family:var(--ion-font-family, inherit);overflow:hidden;z-index:2}@supports ((-webkit-margin-start: 0) or (margin-inline-start: 0)) or (-webkit-margin-start: 0){:host{padding-left:unset;padding-right:unset;-webkit-padding-start:var(--padding-start);padding-inline-start:var(--padding-start);-webkit-padding-end:var(--padding-end);padding-inline-end:var(--padding-end)}}:host(.in-item){position:static;max-width:45%}:host(.select-disabled){opacity:0.4;pointer-events:none}:host(.ion-focused) button{border:2px solid #5e9ed6}.select-placeholder{color:var(--placeholder-color);opacity:var(--placeholder-opacity)}button{left:0;top:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;position:absolute;width:100%;height:100%;border:0;background:transparent;cursor:pointer;-webkit-appearance:none;-moz-appearance:none;appearance:none;outline:none}[dir=rtl] button,:host-context([dir=rtl]) button{left:unset;right:unset;right:0}button::-moz-focus-inner{border:0}.select-icon{position:relative;opacity:0.33}.select-text{-ms-flex:1;flex:1;min-width:16px;font-size:inherit;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.select-icon-inner{left:5px;top:50%;margin-top:-3px;position:absolute;width:0;height:0;border-top:5px solid;border-right:5px solid transparent;border-left:5px solid transparent;color:currentColor;pointer-events:none}[dir=rtl] .select-icon-inner,:host-context([dir=rtl]) .select-icon-inner{left:unset;right:unset;right:5px}:host{--padding-top:10px;--padding-end:0;--padding-bottom:11px;--padding-start:16px}.select-icon{width:19px;height:19px}\";\n\nconst Select = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.ionChange = createEvent(this, \"ionChange\", 7);\n this.ionCancel = createEvent(this, \"ionCancel\", 7);\n this.ionFocus = createEvent(this, \"ionFocus\", 7);\n this.ionBlur = createEvent(this, \"ionBlur\", 7);\n this.ionStyle = createEvent(this, \"ionStyle\", 7);\n this.inputId = `ion-sel-${selectIds++}`;\n this.didInit = false;\n this.isExpanded = false;\n /**\n * If `true`, the user cannot interact with the select.\n */\n this.disabled = false;\n /**\n * The text to display on the cancel button.\n */\n this.cancelText = 'Cancel';\n /**\n * The text to display on the ok button.\n */\n this.okText = 'OK';\n /**\n * The name of the control, which is submitted with the form data.\n */\n this.name = this.inputId;\n /**\n * If `true`, the select can accept multiple values.\n */\n this.multiple = false;\n /**\n * The interface the select should use: `action-sheet`, `popover` or `alert`.\n */\n this.interface = 'alert';\n /**\n * Any additional options that the `alert`, `action-sheet` or `popover` interface\n * can take. See the [ion-alert docs](../alert), the\n * [ion-action-sheet docs](../action-sheet) and the\n * [ion-popover docs](../popover) for the\n * create options for each interface.\n *\n * Note: `interfaceOptions` will not override `inputs` or `buttons` with the `alert` interface.\n */\n this.interfaceOptions = {};\n this.onClick = (ev) => {\n this.setFocus();\n this.open(ev);\n };\n this.onFocus = () => {\n this.ionFocus.emit();\n };\n this.onBlur = () => {\n this.ionBlur.emit();\n };\n }\n disabledChanged() {\n this.emitStyle();\n }\n valueChanged() {\n this.emitStyle();\n if (this.didInit) {\n this.ionChange.emit({\n value: this.value,\n });\n }\n }\n async connectedCallback() {\n this.updateOverlayOptions();\n this.emitStyle();\n this.mutationO = watchForOptions(this.el, 'ion-select-option', async () => {\n this.updateOverlayOptions();\n });\n }\n disconnectedCallback() {\n if (this.mutationO) {\n this.mutationO.disconnect();\n this.mutationO = undefined;\n }\n }\n componentDidLoad() {\n this.didInit = true;\n }\n /**\n * Open the select overlay. The overlay is either an alert, action sheet, or popover,\n * depending on the `interface` property on the `ion-select`.\n *\n * @param event The user interface event that called the open.\n */\n async open(event) {\n if (this.disabled || this.isExpanded) {\n return undefined;\n }\n const overlay = this.overlay = await this.createOverlay(event);\n this.isExpanded = true;\n overlay.onDidDismiss().then(() => {\n this.overlay = undefined;\n this.isExpanded = false;\n this.setFocus();\n });\n await overlay.present();\n return overlay;\n }\n createOverlay(ev) {\n let selectInterface = this.interface;\n if ((selectInterface === 'action-sheet' || selectInterface === 'popover') && this.multiple) {\n console.warn(`Select interface cannot be \"${selectInterface}\" with a multi-value select. Using the \"alert\" interface instead.`);\n selectInterface = 'alert';\n }\n if (selectInterface === 'popover' && !ev) {\n console.warn('Select interface cannot be a \"popover\" without passing an event. Using the \"alert\" interface instead.');\n selectInterface = 'alert';\n }\n if (selectInterface === 'popover') {\n return this.openPopover(ev);\n }\n if (selectInterface === 'action-sheet') {\n return this.openActionSheet();\n }\n return this.openAlert();\n }\n updateOverlayOptions() {\n const overlay = this.overlay;\n if (!overlay) {\n return;\n }\n const childOpts = this.childOpts;\n const value = this.value;\n switch (this.interface) {\n case 'action-sheet':\n overlay.buttons = this.createActionSheetButtons(childOpts, value);\n break;\n case 'popover':\n const popover = overlay.querySelector('ion-select-popover');\n if (popover) {\n popover.options = this.createPopoverOptions(childOpts, value);\n }\n break;\n case 'alert':\n const inputType = (this.multiple ? 'checkbox' : 'radio');\n overlay.inputs = this.createAlertInputs(childOpts, inputType, value);\n break;\n }\n }\n createActionSheetButtons(data, selectValue) {\n const actionSheetButtons = data.map(option => {\n const value = getOptionValue(option);\n // Remove hydrated before copying over classes\n const copyClasses = Array.from(option.classList).filter(cls => cls !== 'hydrated').join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n role: (isOptionSelected(value, selectValue, this.compareWith) ? 'selected' : ''),\n text: option.textContent,\n cssClass: optClass,\n handler: () => {\n this.value = value;\n }\n };\n });\n // Add \"cancel\" button\n actionSheetButtons.push({\n text: this.cancelText,\n role: 'cancel',\n handler: () => {\n this.ionCancel.emit();\n }\n });\n return actionSheetButtons;\n }\n createAlertInputs(data, inputType, selectValue) {\n const alertInputs = data.map(option => {\n const value = getOptionValue(option);\n // Remove hydrated before copying over classes\n const copyClasses = Array.from(option.classList).filter(cls => cls !== 'hydrated').join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n type: inputType,\n cssClass: optClass,\n label: option.textContent || '',\n value,\n checked: isOptionSelected(value, selectValue, this.compareWith),\n disabled: option.disabled\n };\n });\n return alertInputs;\n }\n createPopoverOptions(data, selectValue) {\n const popoverOptions = data.map(option => {\n const value = getOptionValue(option);\n // Remove hydrated before copying over classes\n const copyClasses = Array.from(option.classList).filter(cls => cls !== 'hydrated').join(' ');\n const optClass = `${OPTION_CLASS} ${copyClasses}`;\n return {\n text: option.textContent || '',\n cssClass: optClass,\n value,\n checked: isOptionSelected(value, selectValue, this.compareWith),\n disabled: option.disabled,\n handler: () => {\n this.value = value;\n this.close();\n }\n };\n });\n return popoverOptions;\n }\n async openPopover(ev) {\n const interfaceOptions = this.interfaceOptions;\n const mode = getIonMode(this);\n const value = this.value;\n const popoverOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { component: 'ion-select-popover', cssClass: ['select-popover', interfaceOptions.cssClass], event: ev, componentProps: {\n header: interfaceOptions.header,\n subHeader: interfaceOptions.subHeader,\n message: interfaceOptions.message,\n value,\n options: this.createPopoverOptions(this.childOpts, value)\n } });\n return popoverController.create(popoverOpts);\n }\n async openActionSheet() {\n const mode = getIonMode(this);\n const interfaceOptions = this.interfaceOptions;\n const actionSheetOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { buttons: this.createActionSheetButtons(this.childOpts, this.value), cssClass: ['select-action-sheet', interfaceOptions.cssClass] });\n return actionSheetController.create(actionSheetOpts);\n }\n async openAlert() {\n const label = this.getLabel();\n const labelText = (label) ? label.textContent : null;\n const interfaceOptions = this.interfaceOptions;\n const inputType = (this.multiple ? 'checkbox' : 'radio');\n const mode = getIonMode(this);\n const alertOpts = Object.assign(Object.assign({ mode }, interfaceOptions), { header: interfaceOptions.header ? interfaceOptions.header : labelText, inputs: this.createAlertInputs(this.childOpts, inputType, this.value), buttons: [\n {\n text: this.cancelText,\n role: 'cancel',\n handler: () => {\n this.ionCancel.emit();\n }\n },\n {\n text: this.okText,\n handler: (selectedValues) => {\n this.value = selectedValues;\n }\n }\n ], cssClass: ['select-alert', interfaceOptions.cssClass,\n (this.multiple ? 'multiple-select-alert' : 'single-select-alert')] });\n return alertController.create(alertOpts);\n }\n /**\n * Close the select interface.\n */\n close() {\n // TODO check !this.overlay || !this.isFocus()\n if (!this.overlay) {\n return Promise.resolve(false);\n }\n return this.overlay.dismiss();\n }\n getLabel() {\n return findItemLabel(this.el);\n }\n hasValue() {\n return this.getText() !== '';\n }\n get childOpts() {\n return Array.from(this.el.querySelectorAll('ion-select-option'));\n }\n getText() {\n const selectedText = this.selectedText;\n if (selectedText != null && selectedText !== '') {\n return selectedText;\n }\n return generateText(this.childOpts, this.value, this.compareWith);\n }\n setFocus() {\n if (this.buttonEl) {\n this.buttonEl.focus();\n }\n }\n emitStyle() {\n this.ionStyle.emit({\n 'interactive': true,\n 'select': true,\n 'has-placeholder': this.placeholder != null,\n 'has-value': this.hasValue(),\n 'interactive-disabled': this.disabled,\n 'select-disabled': this.disabled\n });\n }\n render() {\n const { placeholder, name, disabled, isExpanded, value, el } = this;\n const mode = getIonMode(this);\n const labelId = this.inputId + '-lbl';\n const label = findItemLabel(el);\n if (label) {\n label.id = labelId;\n }\n let addPlaceholderClass = false;\n let selectText = this.getText();\n if (selectText === '' && placeholder != null) {\n selectText = placeholder;\n addPlaceholderClass = true;\n }\n renderHiddenInput(true, el, name, parseValue(value), disabled);\n const selectTextClasses = {\n 'select-text': true,\n 'select-placeholder': addPlaceholderClass\n };\n const textPart = addPlaceholderClass ? 'placeholder' : 'text';\n return (h(Host, { onClick: this.onClick, role: \"listbox\", \"aria-haspopup\": \"dialog\", \"aria-disabled\": disabled ? 'true' : null, \"aria-expanded\": `${isExpanded}`, \"aria-labelledby\": labelId, class: {\n [mode]: true,\n 'in-item': hostContext('ion-item', el),\n 'select-disabled': disabled,\n } }, h(\"div\", { class: selectTextClasses, part: textPart }, selectText), h(\"div\", { class: \"select-icon\", role: \"presentation\", part: \"icon\" }, h(\"div\", { class: \"select-icon-inner\" })), h(\"button\", { type: \"button\", onFocus: this.onFocus, onBlur: this.onBlur, disabled: disabled, ref: (btnEl => this.buttonEl = btnEl) })));\n }\n get el() { return getElement(this); }\n static get watchers() { return {\n \"disabled\": [\"disabledChanged\"],\n \"placeholder\": [\"disabledChanged\"],\n \"value\": [\"valueChanged\"]\n }; }\n};\nconst isOptionSelected = (currentValue, compareValue, compareWith) => {\n if (currentValue === undefined) {\n return false;\n }\n if (Array.isArray(currentValue)) {\n return currentValue.some(val => compareOptions(val, compareValue, compareWith));\n }\n else {\n return compareOptions(currentValue, compareValue, compareWith);\n }\n};\nconst getOptionValue = (el) => {\n const value = el.value;\n return (value === undefined)\n ? el.textContent || ''\n : value;\n};\nconst parseValue = (value) => {\n if (value == null) {\n return undefined;\n }\n if (Array.isArray(value)) {\n return value.join(',');\n }\n return value.toString();\n};\nconst compareOptions = (currentValue, compareValue, compareWith) => {\n if (typeof compareWith === 'function') {\n return compareWith(currentValue, compareValue);\n }\n else if (typeof compareWith === 'string') {\n return currentValue[compareWith] === compareValue[compareWith];\n }\n else {\n return Array.isArray(compareValue) ? compareValue.includes(currentValue) : currentValue === compareValue;\n }\n};\nconst generateText = (opts, value, compareWith) => {\n if (value === undefined) {\n return '';\n }\n if (Array.isArray(value)) {\n return value\n .map(v => textForValue(opts, v, compareWith))\n .filter(opt => opt !== null)\n .join(', ');\n }\n else {\n return textForValue(opts, value, compareWith) || '';\n }\n};\nconst textForValue = (opts, value, compareWith) => {\n const selectOpt = opts.find(opt => {\n return compareOptions(getOptionValue(opt), value, compareWith);\n });\n return selectOpt\n ? selectOpt.textContent\n : null;\n};\nlet selectIds = 0;\nconst OPTION_CLASS = 'select-interface-option';\nSelect.style = {\n ios: selectIosCss,\n md: selectMdCss\n};\n\nconst selectOptionCss = \":host{display:none}\";\n\nconst SelectOption = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.inputId = `ion-selopt-${selectOptionIds++}`;\n /**\n * If `true`, the user cannot interact with the select option. This property does not apply when `interface=\"action-sheet\"` as `ion-action-sheet` does not allow for disabled buttons.\n */\n this.disabled = false;\n }\n render() {\n return (h(Host, { role: \"option\", id: this.inputId, class: getIonMode(this) }));\n }\n get el() { return getElement(this); }\n};\nlet selectOptionIds = 0;\nSelectOption.style = selectOptionCss;\n\nconst selectPopoverCss = \".sc-ion-select-popover-h ion-list.sc-ion-select-popover{margin-left:0;margin-right:0;margin-top:-1px;margin-bottom:-1px}.sc-ion-select-popover-h ion-list-header.sc-ion-select-popover,.sc-ion-select-popover-h ion-label.sc-ion-select-popover{margin-left:0;margin-right:0;margin-top:0;margin-bottom:0}\";\n\nconst SelectPopover = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n /** Array of options for the popover */\n this.options = [];\n }\n onSelect(ev) {\n const option = this.options.find(o => o.value === ev.target.value);\n if (option) {\n safeCall(option.handler);\n }\n }\n render() {\n const checkedOption = this.options.find(o => o.checked);\n const checkedValue = checkedOption ? checkedOption.value : undefined;\n return (h(Host, { class: getIonMode(this) }, h(\"ion-list\", null, this.header !== undefined && h(\"ion-list-header\", null, this.header), (this.subHeader !== undefined || this.message !== undefined) &&\n h(\"ion-item\", null, h(\"ion-label\", { class: \"ion-text-wrap\" }, this.subHeader !== undefined && h(\"h3\", null, this.subHeader), this.message !== undefined && h(\"p\", null, this.message))), h(\"ion-radio-group\", { value: checkedValue }, this.options.map(option => h(\"ion-item\", { class: getClassMap(option.cssClass) }, h(\"ion-label\", null, option.text), h(\"ion-radio\", { value: option.value, disabled: option.disabled })))))));\n }\n};\nSelectPopover.style = selectPopoverCss;\n\nexport { Select as ion_select, SelectOption as ion_select_option, SelectPopover as ion_select_popover };\n"]}