calcite-input-text.js 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395
  1. /*!
  2. * All material copyright ESRI, All Rights Reserved, unless otherwise specified.
  3. * See https://github.com/Esri/calcite-components/blob/master/LICENSE.md for details.
  4. * v1.0.0-beta.97
  5. */
  6. import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client/index.js';
  7. import { T as TEXT$1, b as getSlotted, s as setRequestedIcon, g as getElementProp, c as getElementDir, C as CSS_UTILITY } from './dom.js';
  8. import { c as connectLabel, d as disconnectLabel, g as getLabelText } from './label2.js';
  9. import { s as submitForm, c as connectForm, d as disconnectForm, H as HiddenFormInputSlot } from './form.js';
  10. import { c as createObserver } from './observers.js';
  11. import { u as updateHostInteraction } from './interactive.js';
  12. import { d as defineCustomElement$3 } from './icon.js';
  13. import { d as defineCustomElement$2 } from './progress.js';
  14. const CSS = {
  15. loader: "loader",
  16. clearButton: "clear-button",
  17. editingEnabled: "editing-enabled",
  18. inlineChild: "inline-child",
  19. inputIcon: "icon",
  20. prefix: "prefix",
  21. suffix: "suffix",
  22. wrapper: "element-wrapper",
  23. inputWrapper: "wrapper",
  24. actionWrapper: "action-wrapper",
  25. resizeIconWrapper: "resize-icon-wrapper"
  26. };
  27. const SLOTS = {
  28. action: "action"
  29. };
  30. const TEXT = {
  31. clear: "Clear value"
  32. };
  33. const inputTextCss = "@keyframes in{0%{opacity:0}100%{opacity:1}}@keyframes in-down{0%{opacity:0;transform:translate3D(0, -5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-up{0%{opacity:0;transform:translate3D(0, 5px, 0)}100%{opacity:1;transform:translate3D(0, 0, 0)}}@keyframes in-scale{0%{opacity:0;transform:scale3D(0.95, 0.95, 1)}100%{opacity:1;transform:scale3D(1, 1, 1)}}:root{--calcite-animation-timing:calc(150ms * var(--calcite-internal-duration-factor));--calcite-internal-duration-factor:var(--calcite-duration-factor, 1);--calcite-internal-animation-timing-fast:calc(100ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-medium:calc(200ms * var(--calcite-internal-duration-factor));--calcite-internal-animation-timing-slow:calc(300ms * var(--calcite-internal-duration-factor))}.calcite-animate{opacity:0;animation-fill-mode:both;animation-duration:var(--calcite-animation-timing)}.calcite-animate__in{animation-name:in}.calcite-animate__in-down{animation-name:in-down}.calcite-animate__in-up{animation-name:in-up}.calcite-animate__in-scale{animation-name:in-scale}@media (prefers-reduced-motion: reduce){:root{--calcite-internal-duration-factor:0.01}}:root{--calcite-floating-ui-transition:var(--calcite-animation-timing)}:host([hidden]){display:none}:host([disabled]){pointer-events:none;cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-ui-opacity-disabled)}:host{display:block}:host([scale=s]) input,:host([scale=s]) .prefix,:host([scale=s]) .suffix{block-size:1.5rem;padding-inline:0.5rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=s]) .action-wrapper calcite-button,:host([scale=s]) .action-wrapper calcite-button button{block-size:1.5rem}:host([scale=s]) .clear-button{min-block-size:1.5rem;min-inline-size:1.5rem}:host([scale=m]) input,:host([scale=m]) .prefix,:host([scale=m]) .suffix{block-size:2rem;padding-inline:0.75rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=m]) .action-wrapper calcite-button,:host([scale=m]) .action-wrapper calcite-button button{block-size:2rem}:host([scale=m]) .clear-button{min-block-size:2rem;min-inline-size:2rem}:host([scale=l]) input,:host([scale=l]) .prefix,:host([scale=l]) .suffix{block-size:2.75rem;padding-inline:1rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host([scale=l]) .action-wrapper calcite-button,:host([scale=l]) .action-wrapper calcite-button button{block-size:2.75rem}:host([scale=l]) .clear-button{min-block-size:2.75rem;min-inline-size:2.75rem}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}input{transition:var(--calcite-animation-timing), block-size 0, outline-offset 0s;-webkit-appearance:none;position:relative;margin:0px;box-sizing:border-box;display:flex;max-block-size:100%;inline-size:100%;max-inline-size:100%;flex:1 1 0%;border-radius:0px;background-color:var(--calcite-ui-foreground-1);font-family:inherit;font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-1)}:host input{border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);color:var(--calcite-ui-text-1)}:host input::placeholder,:host input:-ms-input-placeholder,:host input::-ms-input-placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-ui-text-3)}:host input:focus{border-color:var(--calcite-ui-brand);color:var(--calcite-ui-text-1)}:host input[readonly]{background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium)}:host input[readonly]:focus{color:var(--calcite-ui-text-1)}:host calcite-icon{color:var(--calcite-ui-text-3)}input{outline-color:transparent}input:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}:host([status=invalid]) input{border-color:var(--calcite-ui-danger)}:host([status=invalid]) input:focus{outline:2px solid var(--calcite-ui-danger);outline-offset:-2px}:host([scale=s]) .icon{inset-inline-start:0.5rem}:host([scale=m]) .icon{inset-inline-start:0.75rem}:host([scale=l]) .icon{inset-inline-start:1rem}:host([icon][scale=s]) input{padding-inline-start:2rem}:host([icon][scale=m]) input{padding-inline-start:2.5rem}:host([icon][scale=l]) input{padding-inline-start:3rem}.element-wrapper{position:relative;order:3;display:inline-flex;flex:1 1 0%;align-items:center}.icon{pointer-events:none;position:absolute;z-index:1;display:block;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}input[type=text]::-ms-clear,input[type=text]::-ms-reveal{display:none;block-size:0px;inline-size:0px}.clear-button{pointer-events:initial;order:4;margin:0px;box-sizing:border-box;display:flex;min-block-size:100%;cursor:pointer;align-items:center;justify-content:center;align-self:stretch;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-foreground-1);outline-color:transparent;border-inline-start-width:0px}.clear-button:hover{background-color:var(--calcite-ui-foreground-2);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:hover calcite-icon{color:var(--calcite-ui-text-1);transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.clear-button:active{background-color:var(--calcite-ui-foreground-3)}.clear-button:active calcite-icon{color:var(--calcite-ui-text-1)}.clear-button:focus{outline:2px solid var(--calcite-ui-brand);outline-offset:-2px}.clear-button:disabled{opacity:var(--calcite-ui-opacity-disabled)}.loader{inset-block-start:1px;inset-inline:1px;pointer-events:none;position:absolute;display:block}.action-wrapper{order:7;display:flex}.prefix,.suffix{box-sizing:border-box;display:flex;block-size:auto;min-block-size:100%;-webkit-user-select:none;user-select:none;align-content:center;align-items:center;overflow-wrap:break-word;border-width:1px;border-style:solid;border-color:var(--calcite-ui-border-input);background-color:var(--calcite-ui-background);font-weight:var(--calcite-font-weight-medium);line-height:1;color:var(--calcite-ui-text-2)}.prefix{order:2;border-inline-end-width:0px}.suffix{order:5;border-inline-start-width:0px}:host([alignment=start]) input{text-align:start}:host([alignment=end]) input{text-align:end}.wrapper{position:relative;display:flex;flex-direction:row;align-items:center}:host(.no-bottom-border) input{border-block-end-width:0px}:host(.border-top-color-one) input{border-block-start-color:var(--calcite-ui-border-1)}.inline-child{background-color:transparent;transition:all var(--calcite-animation-timing) ease-in-out 0s, outline 0s, outline-offset 0s}.inline-child .editing-enabled{background-color:inherit}.inline-child:not(.editing-enabled){display:flex;cursor:pointer;border-color:transparent;padding-inline-start:0}::slotted(input[slot=hidden-form-input]){margin:0 !important;opacity:0 !important;outline:none !important;padding:0 !important;position:absolute !important;inset:0 !important;transform:none !important;-webkit-appearance:none !important;z-index:-1 !important}";
  34. const InputText = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
  35. constructor() {
  36. super();
  37. this.__registerHost();
  38. this.__attachShadow();
  39. this.calciteInternalInputTextFocus = createEvent(this, "calciteInternalInputTextFocus", 7);
  40. this.calciteInternalInputTextBlur = createEvent(this, "calciteInternalInputTextBlur", 7);
  41. this.calciteInputTextInput = createEvent(this, "calciteInputTextInput", 7);
  42. this.calciteInputTextChange = createEvent(this, "calciteInputTextChange", 7);
  43. //--------------------------------------------------------------------------
  44. //
  45. // Properties
  46. //
  47. //--------------------------------------------------------------------------
  48. /** Specifies the text alignment of the component's value. */
  49. this.alignment = "start";
  50. /**
  51. * When `true`, the component is focused on page load.
  52. *
  53. * @mdn [autofocus](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/autofocus)
  54. */
  55. this.autofocus = false;
  56. /**
  57. * When `true`, a clear button is displayed when the component has a value.
  58. */
  59. this.clearable = false;
  60. /**
  61. * When `true`, interaction is prevented and the component is displayed with lower opacity.
  62. *
  63. * @mdn [disabled](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/disabled)
  64. */
  65. this.disabled = false;
  66. /**
  67. * When `true`, the component will not be visible.
  68. *
  69. * @mdn [hidden](https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/hidden)
  70. */
  71. this.hidden = false;
  72. /**
  73. * Accessible name that will appear while loading.
  74. *
  75. * @default "Loading"
  76. */
  77. this.intlLoading = TEXT$1.loading;
  78. /** When `true`, the icon will be flipped when the element direction is right-to-left (`"rtl"`). */
  79. this.iconFlipRtl = false;
  80. /** When `true`, the component is in the loading state and `calcite-progress` is displayed. */
  81. this.loading = false;
  82. /**
  83. * When `true`, the component's value can be read, but cannot be modified.
  84. *
  85. * @mdn [readOnly](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/readonly)
  86. */
  87. this.readOnly = false;
  88. /** When `true`, the component must have a value in order for the form to submit. */
  89. this.required = false;
  90. /** Specifies the size of the component. */
  91. this.scale = "m";
  92. /** Specifies the status of the input field, which determines message and icons. */
  93. this.status = "idle";
  94. /**
  95. * @internal
  96. */
  97. this.editingEnabled = false;
  98. /** The component's value. */
  99. this.value = "";
  100. this.previousValueOrigin = "initial";
  101. this.mutationObserver = createObserver("mutation", () => this.setDisabledAction());
  102. this.userChangedValue = false;
  103. //--------------------------------------------------------------------------
  104. //
  105. // Private Methods
  106. //
  107. //--------------------------------------------------------------------------
  108. this.keyDownHandler = (event) => {
  109. if (this.readOnly || this.disabled) {
  110. return;
  111. }
  112. if (this.isClearable && event.key === "Escape") {
  113. this.clearInputTextValue(event);
  114. event.preventDefault();
  115. }
  116. if (event.key === "Enter" && !event.defaultPrevented) {
  117. if (submitForm(this)) {
  118. event.preventDefault();
  119. }
  120. }
  121. };
  122. this.clearInputTextValue = (nativeEvent) => {
  123. this.setValue({
  124. committing: true,
  125. nativeEvent,
  126. origin: "user",
  127. value: ""
  128. });
  129. };
  130. this.emitChangeIfUserModified = () => {
  131. if (this.previousValueOrigin === "user" && this.value !== this.previousEmittedValue) {
  132. this.calciteInputTextChange.emit();
  133. }
  134. this.previousEmittedValue = this.value;
  135. };
  136. this.inputTextBlurHandler = () => {
  137. this.calciteInternalInputTextBlur.emit({
  138. element: this.childEl,
  139. value: this.value
  140. });
  141. this.emitChangeIfUserModified();
  142. };
  143. this.inputTextFocusHandler = (event) => {
  144. const slottedActionEl = getSlotted(this.el, "action");
  145. if (event.target !== slottedActionEl) {
  146. this.setFocus();
  147. }
  148. this.calciteInternalInputTextFocus.emit({
  149. element: this.childEl,
  150. value: this.value
  151. });
  152. };
  153. this.inputTextInputHandler = (nativeEvent) => {
  154. if (this.disabled || this.readOnly) {
  155. return;
  156. }
  157. this.setValue({
  158. nativeEvent,
  159. origin: "user",
  160. value: nativeEvent.target.value
  161. });
  162. };
  163. this.inputTextKeyDownHandler = (event) => {
  164. if (this.disabled || this.readOnly) {
  165. return;
  166. }
  167. if (event.key === "Enter") {
  168. this.emitChangeIfUserModified();
  169. }
  170. };
  171. this.hiddenInputChangeHandler = (event) => {
  172. if (event.target.name === this.name) {
  173. this.setValue({
  174. value: event.target.value,
  175. origin: "direct"
  176. });
  177. }
  178. event.stopPropagation();
  179. };
  180. this.setChildElRef = (el) => {
  181. this.childEl = el;
  182. };
  183. this.setInputValue = (newInputValue) => {
  184. if (!this.childEl) {
  185. return;
  186. }
  187. this.childEl.value = newInputValue;
  188. };
  189. this.setPreviousEmittedValue = (newPreviousEmittedValue) => {
  190. this.previousEmittedValue = newPreviousEmittedValue;
  191. };
  192. this.setPreviousValue = (newPreviousValue) => {
  193. this.previousValue = newPreviousValue;
  194. };
  195. this.setValue = ({ committing = false, nativeEvent, origin, previousValue, value }) => {
  196. this.setPreviousValue(previousValue || this.value);
  197. this.previousValueOrigin = origin;
  198. this.userChangedValue = origin === "user" && value !== this.value;
  199. this.value = value;
  200. if (origin === "direct") {
  201. this.setInputValue(value);
  202. }
  203. if (nativeEvent) {
  204. const calciteInputTextInputEvent = this.calciteInputTextInput.emit({
  205. element: this.childEl,
  206. nativeEvent,
  207. value: this.value
  208. });
  209. if (calciteInputTextInputEvent.defaultPrevented) {
  210. this.value = this.previousValue;
  211. }
  212. else if (committing) {
  213. this.emitChangeIfUserModified();
  214. }
  215. }
  216. };
  217. }
  218. disabledWatcher() {
  219. this.setDisabledAction();
  220. }
  221. valueWatcher(newValue, previousValue) {
  222. if (!this.userChangedValue) {
  223. this.setValue({
  224. origin: "direct",
  225. previousValue,
  226. value: !newValue ? "" : newValue
  227. });
  228. }
  229. this.userChangedValue = false;
  230. }
  231. updateRequestedIcon() {
  232. this.requestedIcon = setRequestedIcon({}, this.icon, "text");
  233. }
  234. get isClearable() {
  235. return this.clearable && this.value.length > 0;
  236. }
  237. //--------------------------------------------------------------------------
  238. //
  239. // Lifecycle
  240. //
  241. //--------------------------------------------------------------------------
  242. connectedCallback() {
  243. var _a;
  244. this.scale = getElementProp(this.el, "scale", this.scale);
  245. this.status = getElementProp(this.el, "status", this.status);
  246. this.inlineEditableEl = this.el.closest("calcite-inline-editable");
  247. if (this.inlineEditableEl) {
  248. this.editingEnabled = this.inlineEditableEl.editingEnabled || false;
  249. }
  250. this.setPreviousEmittedValue(this.value);
  251. this.setPreviousValue(this.value);
  252. connectLabel(this);
  253. connectForm(this);
  254. (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.observe(this.el, { childList: true });
  255. this.setDisabledAction();
  256. this.el.addEventListener("calciteInternalHiddenInputChange", this.hiddenInputChangeHandler);
  257. }
  258. disconnectedCallback() {
  259. var _a;
  260. disconnectLabel(this);
  261. disconnectForm(this);
  262. (_a = this.mutationObserver) === null || _a === void 0 ? void 0 : _a.disconnect();
  263. this.el.removeEventListener("calciteInternalHiddenInputChange", this.hiddenInputChangeHandler);
  264. }
  265. componentWillLoad() {
  266. this.requestedIcon = setRequestedIcon({}, this.icon, "text");
  267. }
  268. componentDidRender() {
  269. updateHostInteraction(this);
  270. }
  271. //--------------------------------------------------------------------------
  272. //
  273. // Public Methods
  274. //
  275. //--------------------------------------------------------------------------
  276. /** Sets focus on the component. */
  277. async setFocus() {
  278. var _a;
  279. (_a = this.childEl) === null || _a === void 0 ? void 0 : _a.focus();
  280. }
  281. /** Selects all text of the component's `value`. */
  282. async selectText() {
  283. var _a;
  284. (_a = this.childEl) === null || _a === void 0 ? void 0 : _a.select();
  285. }
  286. onLabelClick() {
  287. this.setFocus();
  288. }
  289. onFormReset() {
  290. this.setValue({
  291. origin: "reset",
  292. value: this.defaultValue
  293. });
  294. }
  295. syncHiddenFormInput(input) {
  296. if (this.minLength != null) {
  297. input.minLength = this.minLength;
  298. }
  299. if (this.maxLength != null) {
  300. input.maxLength = this.maxLength;
  301. }
  302. }
  303. setDisabledAction() {
  304. const slottedActionEl = getSlotted(this.el, "action");
  305. if (!slottedActionEl) {
  306. return;
  307. }
  308. this.disabled
  309. ? slottedActionEl.setAttribute("disabled", "")
  310. : slottedActionEl.removeAttribute("disabled");
  311. }
  312. // --------------------------------------------------------------------------
  313. //
  314. // Render Methods
  315. //
  316. // --------------------------------------------------------------------------
  317. render() {
  318. const dir = getElementDir(this.el);
  319. const loader = (h("div", { class: CSS.loader }, h("calcite-progress", { label: this.intlLoading, type: "indeterminate" })));
  320. const inputClearButton = (h("button", { "aria-label": this.intlClear || TEXT.clear, class: CSS.clearButton, disabled: this.disabled || this.readOnly, onClick: this.clearInputTextValue, tabIndex: -1, type: "button" }, h("calcite-icon", { icon: "x", scale: "s" })));
  321. const iconEl = (h("calcite-icon", { class: CSS.inputIcon, flipRtl: this.iconFlipRtl, icon: this.requestedIcon, scale: "s" }));
  322. const prefixText = h("div", { class: CSS.prefix }, this.prefixText);
  323. const suffixText = h("div", { class: CSS.suffix }, this.suffixText);
  324. const childEl = (h("input", { "aria-label": getLabelText(this), autofocus: this.autofocus ? true : null, class: {
  325. [CSS.editingEnabled]: this.editingEnabled,
  326. [CSS.inlineChild]: !!this.inlineEditableEl
  327. }, defaultValue: this.defaultValue, disabled: this.disabled ? true : null, enterKeyHint: this.el.enterKeyHint, inputMode: this.el.inputMode, maxLength: this.maxLength, minLength: this.minLength, name: this.name, onBlur: this.inputTextBlurHandler, onFocus: this.inputTextFocusHandler, onInput: this.inputTextInputHandler, onKeyDown: this.inputTextKeyDownHandler, placeholder: this.placeholder || "", readOnly: this.readOnly, ref: this.setChildElRef, required: this.required ? true : null, tabIndex: this.disabled || (this.inlineEditableEl && !this.editingEnabled) ? -1 : null, type: "text", value: this.value }));
  328. return (h(Host, { onClick: this.inputTextFocusHandler, onKeyDown: this.keyDownHandler }, h("div", { class: { [CSS.inputWrapper]: true, [CSS_UTILITY.rtl]: dir === "rtl" } }, this.prefixText ? prefixText : null, h("div", { class: CSS.wrapper }, childEl, this.isClearable ? inputClearButton : null, this.requestedIcon ? iconEl : null, this.loading ? loader : null), h("div", { class: CSS.actionWrapper }, h("slot", { name: SLOTS.action })), this.suffixText ? suffixText : null, h(HiddenFormInputSlot, { component: this }))));
  329. }
  330. get el() { return this; }
  331. static get watchers() { return {
  332. "disabled": ["disabledWatcher"],
  333. "value": ["valueWatcher"],
  334. "icon": ["updateRequestedIcon"]
  335. }; }
  336. static get style() { return inputTextCss; }
  337. }, [1, "calcite-input-text", {
  338. "alignment": [513],
  339. "autofocus": [516],
  340. "clearable": [516],
  341. "disabled": [516],
  342. "hidden": [516],
  343. "icon": [520],
  344. "intlClear": [1, "intl-clear"],
  345. "intlLoading": [1, "intl-loading"],
  346. "iconFlipRtl": [516, "icon-flip-rtl"],
  347. "label": [1],
  348. "loading": [516],
  349. "maxLength": [514, "max-length"],
  350. "minLength": [514, "min-length"],
  351. "name": [513],
  352. "placeholder": [1],
  353. "prefixText": [1, "prefix-text"],
  354. "readOnly": [516, "read-only"],
  355. "required": [516],
  356. "scale": [1537],
  357. "status": [1537],
  358. "suffixText": [1, "suffix-text"],
  359. "editingEnabled": [1540, "editing-enabled"],
  360. "value": [1025],
  361. "setFocus": [64],
  362. "selectText": [64]
  363. }]);
  364. function defineCustomElement$1() {
  365. if (typeof customElements === "undefined") {
  366. return;
  367. }
  368. const components = ["calcite-input-text", "calcite-icon", "calcite-progress"];
  369. components.forEach(tagName => { switch (tagName) {
  370. case "calcite-input-text":
  371. if (!customElements.get(tagName)) {
  372. customElements.define(tagName, InputText);
  373. }
  374. break;
  375. case "calcite-icon":
  376. if (!customElements.get(tagName)) {
  377. defineCustomElement$3();
  378. }
  379. break;
  380. case "calcite-progress":
  381. if (!customElements.get(tagName)) {
  382. defineCustomElement$2();
  383. }
  384. break;
  385. } });
  386. }
  387. defineCustomElement$1();
  388. const CalciteInputText = InputText;
  389. const defineCustomElement = defineCustomElement$1;
  390. export { CalciteInputText, defineCustomElement };