1 line
40 KiB
Plaintext
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","focusEl","focus","placeholder","hasValue","labelId","parseValue","displayValue","addPlaceholderClass","selectText","selectTextClasses","textPart","displayLabel","part","id","ref","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;;;AAAA;AAAA;AAAA;AAAA;;;AAAA;AAAA;A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IAAd,EAAoB,KAAK6F,MAAL,KAAgB7F,SAAhB,IAA6B,6DAAE,iBAAF,EAAqB,IAArB,EAA2B,KAAK6F,MAAhC,CAAjD,EAA0F,CAAC,KAAKC,SAAL,KAAmB9F,SAAnB,IAAgC,KAAK+F,OAAL,KAAiB/F,SAAlD,KACrI,6DAAE,UAAF,EAAc,IAAd,EAAoB,6DAAE,WAAF,EAAe;AAAE,uBAAO;AAAT,aAAf,EAA2C,KAAK8F,SAAL,KAAmB9F,SAAnB,IAAgC,6DAAE,IAAF,EAAQ,IAAR,EAAc,KAAK8F,SAAnB,CAA3E,EAA0G,KAAKC,OAAL,KAAiB/F,SAAjB,IAA8B,6DAAE,GAAF,EAAO,IAAP,EAAa,KAAK+F,OAAlB,CAAxI,CAApB,CAD2C,EAC+I,6DAAE,iBAAF,EAAqB;AAAEvF,mBAAK,EAAE0I;AAAT,aAArB,EAA8C,KAAKjJ,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,CAD/I,CAArC,CAAR;AAED;AAjBgB;;AAAA;AAAA,SAAnB;;AAmBAyH,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-e806d1f6.js';\nimport { b as getIonMode } from './ionic-global-9d5c8ee3.js';\nimport { f as findItemLabel, c as getAriaLabel, d as renderHiddenInput } from './helpers-90f46169.js';\nimport './hardware-back-button-389954a0.js';\nimport { c as popoverController, b as actionSheetController, a as alertController, s as safeCall } from './overlays-7a1610a2.js';\nimport { h as hostContext, g as getClassMap } from './theme-ff3fc52f.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)}label{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;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{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}.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:-2px;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)}label{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;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;opacity:0}[dir=rtl] label,:host-context([dir=rtl]) label{left:unset;right:unset;right:0}label::-moz-focus-inner{border:0}button{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}.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:-2px;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:10px;--padding-start:16px}.select-icon{width:19px;height:19px}:host-context(.item-label-floating) .select-icon{-webkit-transform:translate3d(0, -9px, 0);transform:translate3d(0, -9px, 0)}\";\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.focusEl) {\n this.focusEl.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 { disabled, el, inputId, isExpanded, name, placeholder, value } = this;\n const mode = getIonMode(this);\n const { labelText, labelId } = getAriaLabel(el, inputId);\n renderHiddenInput(true, el, name, parseValue(value), disabled);\n const displayValue = this.getText();\n let addPlaceholderClass = false;\n let selectText = displayValue;\n if (selectText === '' && placeholder != null) {\n selectText = placeholder;\n addPlaceholderClass = true;\n }\n const selectTextClasses = {\n 'select-text': true,\n 'select-placeholder': addPlaceholderClass\n };\n const textPart = addPlaceholderClass ? 'placeholder' : 'text';\n // If there is a label then we need to concatenate it with the\n // current value (or placeholder) and a comma so it separates\n // nicely when the screen reader announces it, otherwise just\n // announce the value / placeholder\n const displayLabel = labelText !== undefined\n ? (selectText !== '' ? `${selectText}, ${labelText}` : labelText)\n : selectText;\n return (h(Host, { onClick: this.onClick, role: \"button\", \"aria-haspopup\": \"listbox\", \"aria-disabled\": disabled ? 'true' : null, \"aria-label\": displayLabel, class: {\n [mode]: true,\n 'in-item': hostContext('ion-item', el),\n 'select-disabled': disabled,\n } }, h(\"div\", { \"aria-hidden\": \"true\", class: selectTextClasses, part: textPart }, selectText), h(\"div\", { class: \"select-icon\", role: \"presentation\", part: \"icon\" }, h(\"div\", { class: \"select-icon-inner\" })), h(\"label\", { id: labelId }, displayLabel), h(\"button\", { type: \"button\", disabled: disabled, id: inputId, \"aria-labelledby\": labelId, \"aria-haspopup\": \"listbox\", \"aria-expanded\": `${isExpanded}`, onFocus: this.onFocus, onBlur: this.onBlur, ref: (focusEl => this.focusEl = focusEl) })));\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"]} |