@umbraco-cms/backoffice 14.0.0--preview004-49507162 → 14.0.0--preview004-14ef63c3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -260,7 +260,12 @@ export const data = [
260
260
  parentId: null,
261
261
  propertyEditorAlias: 'Umbraco.EmailAddress',
262
262
  propertyEditorUiAlias: 'Umb.PropertyEditorUi.Email',
263
- values: [],
263
+ values: [
264
+ {
265
+ alias: 'inputMode',
266
+ value: 'email',
267
+ },
268
+ ],
264
269
  },
265
270
  {
266
271
  type: 'data-type',
@@ -4,10 +4,11 @@ import type { UmbPropertyEditorConfigCollection } from '../../index.js';
4
4
  export declare class UmbPropertyEditorUITextBoxElement extends UmbLitElement implements UmbPropertyEditorExtensionElement {
5
5
  #private;
6
6
  value: string;
7
- private _type?;
7
+ private _type;
8
+ private _inputMode?;
8
9
  private _maxChars?;
9
10
  set config(config: UmbPropertyEditorConfigCollection | undefined);
10
- private onInput;
11
+ private onChange;
11
12
  render(): import("lit-html").TemplateResult<1>;
12
13
  static styles: import("@lit/reactive-element/css-tag").CSSResult[];
13
14
  }
@@ -5,29 +5,32 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { css, html, customElement, property, state, ifDefined } from '../../../../../external/lit/index.js';
8
- import { UmbTextStyles } from "../../../../../shared/style/index.js";
8
+ import { UmbTextStyles } from '../../../../../shared/style/index.js';
9
9
  import { UmbLitElement } from '../../../../../shared/lit-element/index.js';
10
10
  export let UmbPropertyEditorUITextBoxElement = class UmbPropertyEditorUITextBoxElement extends UmbLitElement {
11
11
  constructor() {
12
12
  super(...arguments);
13
13
  this.#defaultType = 'text';
14
14
  this.value = '';
15
+ this._type = this.#defaultType;
15
16
  }
16
17
  #defaultType;
17
18
  set config(config) {
18
19
  this._type = config?.getValueByAlias('inputType') ?? this.#defaultType;
20
+ this._inputMode = config?.getValueByAlias('inputMode');
19
21
  this._maxChars = config?.getValueByAlias('maxChars');
20
22
  }
21
- onInput(e) {
23
+ onChange(e) {
22
24
  this.value = e.target.value;
23
25
  this.dispatchEvent(new CustomEvent('property-value-change'));
24
26
  }
25
27
  render() {
26
28
  return html `<uui-input
27
29
  .value=${this.value ?? ''}
28
- type="${this._type}"
29
- maxlength="${ifDefined(this._maxChars)}"
30
- @input=${this.onInput}></uui-input>`;
30
+ .type=${this._type}
31
+ inputMode=${ifDefined(this._inputMode)}
32
+ maxlength=${ifDefined(this._maxChars)}
33
+ @change=${this.onChange}></uui-input>`;
31
34
  }
32
35
  static { this.styles = [
33
36
  UmbTextStyles,
@@ -44,6 +47,9 @@ __decorate([
44
47
  __decorate([
45
48
  state()
46
49
  ], UmbPropertyEditorUITextBoxElement.prototype, "_type", void 0);
50
+ __decorate([
51
+ state()
52
+ ], UmbPropertyEditorUITextBoxElement.prototype, "_inputMode", void 0);
47
53
  __decorate([
48
54
  state()
49
55
  ], UmbPropertyEditorUITextBoxElement.prototype, "_maxChars", void 0);