2da0c088bc468a61a3c737ae93c5bf71513026378955460201c5a639ee9cc370.json 14 KB

1
  1. {"ast":null,"code":"/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';\nimport { d as inheritAttributes } from './helpers.js';\nimport { c as createColorClasses } from './theme.js';\nimport { b as getIonMode } from './ionic-global.js';\nconst pickerColumnOptionIosCss = \"button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) button{cursor:default}\";\nconst IonPickerColumnOptionIosStyle0 = pickerColumnOptionIosCss;\nconst pickerColumnOptionMdCss = \"button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) button{cursor:default}:host(.option-active){color:var(--ion-color-base)}\";\nconst IonPickerColumnOptionMdStyle0 = pickerColumnOptionMdCss;\nconst PickerColumnOption = /*@__PURE__*/proxyCustomElement(class PickerColumnOption extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n /**\n * We keep track of the parent picker column\n * so we can update the value of it when\n * clicking an enable option.\n */\n this.pickerColumn = null;\n this.ariaLabel = null;\n this.disabled = false;\n this.value = undefined;\n this.color = 'primary';\n }\n /**\n * The aria-label of the option has changed after the\n * first render and needs to be updated within the component.\n *\n * @param ariaLbl The new aria-label value.\n */\n onAriaLabelChange(ariaLbl) {\n this.ariaLabel = ariaLbl;\n }\n componentWillLoad() {\n const inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n /**\n * The initial value of `aria-label` needs to be set for\n * the first render.\n */\n this.ariaLabel = inheritedAttributes['aria-label'] || null;\n }\n connectedCallback() {\n this.pickerColumn = this.el.closest('ion-picker-column');\n }\n disconnectedCallback() {\n this.pickerColumn = null;\n }\n /**\n * The column options can load at any time\n * so the options needs to tell the\n * parent picker column when it is loaded\n * so the picker column can ensure it is\n * centered in the view.\n *\n * We intentionally run this for every\n * option. If we only ran this from\n * the selected option then if the newly\n * loaded options were not selected then\n * scrollActiveItemIntoView would not be called.\n */\n componentDidLoad() {\n const {\n pickerColumn\n } = this;\n if (pickerColumn !== null) {\n pickerColumn.scrollActiveItemIntoView();\n }\n }\n /**\n * When an option is clicked, update the\n * parent picker column value. This\n * component will handle centering the option\n * in the column view.\n */\n onClick() {\n const {\n pickerColumn\n } = this;\n if (pickerColumn !== null) {\n pickerColumn.setValue(this.value);\n }\n }\n render() {\n const {\n color,\n disabled,\n ariaLabel\n } = this;\n const mode = getIonMode(this);\n return h(Host, {\n key: 'c743c6ef44bb9f765cc15b3b5d2864de6520203a',\n class: createColorClasses(color, {\n [mode]: true,\n ['option-disabled']: disabled\n })\n }, h(\"button\", {\n key: '4c3d9eb245c52b2c007f727e145cfb55759bd7a9',\n tabindex: \"-1\",\n \"aria-label\": ariaLabel,\n disabled: disabled,\n onClick: () => this.onClick()\n }, h(\"slot\", {\n key: '4c907d2187cbe9d5941e27f2b12578e2b7271461'\n })));\n }\n get el() {\n return this;\n }\n static get watchers() {\n return {\n \"aria-label\": [\"onAriaLabelChange\"]\n };\n }\n static get style() {\n return {\n ios: IonPickerColumnOptionIosStyle0,\n md: IonPickerColumnOptionMdStyle0\n };\n }\n}, [33, \"ion-picker-column-option\", {\n \"disabled\": [4],\n \"value\": [8],\n \"color\": [513],\n \"ariaLabel\": [32]\n}, undefined, {\n \"aria-label\": [\"onAriaLabelChange\"]\n}]);\nfunction defineCustomElement() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-picker-column-option\"];\n components.forEach(tagName => {\n switch (tagName) {\n case \"ion-picker-column-option\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, PickerColumnOption);\n }\n break;\n }\n });\n}\nexport { PickerColumnOption as P, defineCustomElement as d };","map":{"version":3,"names":["proxyCustomElement","HTMLElement","h","Host","d","inheritAttributes","c","createColorClasses","b","getIonMode","pickerColumnOptionIosCss","IonPickerColumnOptionIosStyle0","pickerColumnOptionMdCss","IonPickerColumnOptionMdStyle0","PickerColumnOption","constructor","__registerHost","__attachShadow","pickerColumn","ariaLabel","disabled","value","undefined","color","onAriaLabelChange","ariaLbl","componentWillLoad","inheritedAttributes","el","connectedCallback","closest","disconnectedCallback","componentDidLoad","scrollActiveItemIntoView","onClick","setValue","render","mode","key","class","tabindex","watchers","style","ios","md","defineCustomElement","customElements","components","forEach","tagName","get","define","P"],"sources":["F:/workspace/202226701027/huinongbao-app/node_modules/@ionic/core/components/picker-column-option.js"],"sourcesContent":["/*!\n * (C) Ionic http://ionicframework.com - MIT License\n */\nimport { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';\nimport { d as inheritAttributes } from './helpers.js';\nimport { c as createColorClasses } from './theme.js';\nimport { b as getIonMode } from './ionic-global.js';\n\nconst pickerColumnOptionIosCss = \"button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) button{cursor:default}\";\nconst IonPickerColumnOptionIosStyle0 = pickerColumnOptionIosCss;\n\nconst pickerColumnOptionMdCss = \"button{padding-left:0;padding-right:0;padding-top:0;padding-bottom:0;margin-left:0;margin-right:0;margin-top:0;margin-bottom:0;width:100%;height:34px;border:0px;outline:none;background:transparent;color:inherit;font-family:var(--ion-font-family, inherit);font-size:inherit;line-height:34px;text-align:inherit;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;overflow:hidden}:host(.option-disabled){opacity:0.4}:host(.option-disabled) button{cursor:default}:host(.option-active){color:var(--ion-color-base)}\";\nconst IonPickerColumnOptionMdStyle0 = pickerColumnOptionMdCss;\n\nconst PickerColumnOption = /*@__PURE__*/ proxyCustomElement(class PickerColumnOption extends HTMLElement {\n constructor() {\n super();\n this.__registerHost();\n this.__attachShadow();\n /**\n * We keep track of the parent picker column\n * so we can update the value of it when\n * clicking an enable option.\n */\n this.pickerColumn = null;\n this.ariaLabel = null;\n this.disabled = false;\n this.value = undefined;\n this.color = 'primary';\n }\n /**\n * The aria-label of the option has changed after the\n * first render and needs to be updated within the component.\n *\n * @param ariaLbl The new aria-label value.\n */\n onAriaLabelChange(ariaLbl) {\n this.ariaLabel = ariaLbl;\n }\n componentWillLoad() {\n const inheritedAttributes = inheritAttributes(this.el, ['aria-label']);\n /**\n * The initial value of `aria-label` needs to be set for\n * the first render.\n \n */\n this.ariaLabel = inheritedAttributes['aria-label'] || null;\n }\n connectedCallback() {\n this.pickerColumn = this.el.closest('ion-picker-column');\n }\n disconnectedCallback() {\n this.pickerColumn = null;\n }\n /**\n * The column options can load at any time\n * so the options needs to tell the\n * parent picker column when it is loaded\n * so the picker column can ensure it is\n * centered in the view.\n *\n * We intentionally run this for every\n * option. If we only ran this from\n * the selected option then if the newly\n * loaded options were not selected then\n * scrollActiveItemIntoView would not be called.\n */\n componentDidLoad() {\n const { pickerColumn } = this;\n if (pickerColumn !== null) {\n pickerColumn.scrollActiveItemIntoView();\n }\n }\n /**\n * When an option is clicked, update the\n * parent picker column value. This\n * component will handle centering the option\n * in the column view.\n */\n onClick() {\n const { pickerColumn } = this;\n if (pickerColumn !== null) {\n pickerColumn.setValue(this.value);\n }\n }\n render() {\n const { color, disabled, ariaLabel } = this;\n const mode = getIonMode(this);\n return (h(Host, { key: 'c743c6ef44bb9f765cc15b3b5d2864de6520203a', class: createColorClasses(color, {\n [mode]: true,\n ['option-disabled']: disabled,\n }) }, h(\"button\", { key: '4c3d9eb245c52b2c007f727e145cfb55759bd7a9', tabindex: \"-1\", \"aria-label\": ariaLabel, disabled: disabled, onClick: () => this.onClick() }, h(\"slot\", { key: '4c907d2187cbe9d5941e27f2b12578e2b7271461' }))));\n }\n get el() { return this; }\n static get watchers() { return {\n \"aria-label\": [\"onAriaLabelChange\"]\n }; }\n static get style() { return {\n ios: IonPickerColumnOptionIosStyle0,\n md: IonPickerColumnOptionMdStyle0\n }; }\n}, [33, \"ion-picker-column-option\", {\n \"disabled\": [4],\n \"value\": [8],\n \"color\": [513],\n \"ariaLabel\": [32]\n }, undefined, {\n \"aria-label\": [\"onAriaLabelChange\"]\n }]);\nfunction defineCustomElement() {\n if (typeof customElements === \"undefined\") {\n return;\n }\n const components = [\"ion-picker-column-option\"];\n components.forEach(tagName => { switch (tagName) {\n case \"ion-picker-column-option\":\n if (!customElements.get(tagName)) {\n customElements.define(tagName, PickerColumnOption);\n }\n break;\n } });\n}\n\nexport { PickerColumnOption as P, defineCustomElement as d };\n"],"mappings":"AAAA;AACA;AACA;AACA,SAASA,kBAAkB,EAAEC,WAAW,EAAEC,CAAC,EAAEC,IAAI,QAAQ,+BAA+B;AACxF,SAASC,CAAC,IAAIC,iBAAiB,QAAQ,cAAc;AACrD,SAASC,CAAC,IAAIC,kBAAkB,QAAQ,YAAY;AACpD,SAASC,CAAC,IAAIC,UAAU,QAAQ,mBAAmB;AAEnD,MAAMC,wBAAwB,GAAG,kdAAkd;AACnf,MAAMC,8BAA8B,GAAGD,wBAAwB;AAE/D,MAAME,uBAAuB,GAAG,ogBAAogB;AACpiB,MAAMC,6BAA6B,GAAGD,uBAAuB;AAE7D,MAAME,kBAAkB,GAAG,aAAcd,kBAAkB,CAAC,MAAMc,kBAAkB,SAASb,WAAW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