@yoobic/yobi 8.6.42 → 8.6.43

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.
@@ -102,6 +102,7 @@ const YooFormInputComponent = class {
102
102
  this.fireInputChangeEvent = true;
103
103
  this.allowDecimals = true;
104
104
  this.format = 'input';
105
+ this.contentEventListeners = {};
105
106
  this.inputType = undefined;
106
107
  this.remainingCharacters = undefined;
107
108
  this.checkboxParams = null;
@@ -465,12 +466,12 @@ const YooFormInputComponent = class {
465
466
  placeholderlabel: this.placeholdertolabel,
466
467
  valid: this.uiValidation.valid && this.validity,
467
468
  invalid: this.uiValidation.invalid && this.validity === false && !this.inputReloaded
468
- } }, this.finalIconPrefix && this.hasIconPrefix && (h("div", { class: "icon-prefix", onClick: () => (this.inputElement && this.inputElement.focus ? this.inputElement.focus() : null) }, h("yoo-icon", { name: this.finalIconPrefix, size: this.getIconSize(), color: this.iconPrefixColor }))), (_a = this.buttonsPrefix) === null || _a === void 0 ? void 0 :
469
+ } }, this.finalIconPrefix && this.hasIconPrefix && (h("div", { class: "icon-prefix", onClick: () => (this.inputElement && this.inputElement.focus ? this.inputElement.focus() : null), ...this.contentEventListeners }, h("yoo-icon", { name: this.finalIconPrefix, size: this.getIconSize(), color: this.iconPrefixColor }))), (_a = this.buttonsPrefix) === null || _a === void 0 ? void 0 :
469
470
  _a.map((button) => (button && h("div", { class: "icon-prefix", onClick: () => button.handler() }, h("yoo-icon", { name: button.icon, size: this.getIconSize() })))), h("input", { type: this.inputType, readOnly: this.disableInputTyping, name: this.name, tabindex: this.inputTabIndex, ref: (el) => (this.inputElement = el), autocapitalize: this.autocapitalize, autocorrect: this.autocorrect, autoComplete: ['username', 'password'].includes(this.name) ? this.name : undefined, inputmode: this.inputmode ? this.inputmode : undefined, placeholder: !this.placeholdertolabel && this.internalPlaceholder ? translate(this.internalPlaceholder) : '', required: this.required, onBlur: (ev) => onInputBlurred(ev, this, '.input-container', this.type, this.uiValidation), onChange: (ev) => ev === null || ev === void 0 ? void 0 : ev.stopPropagation(), onInput: (ev) => (this.fireInputChangeEvent ? this.onInputChanged(ev) : ev === null || ev === void 0 ? void 0 : ev.stopPropagation()), onFocus: () => !this.disableFocus && onInputFocused(this, '.input-container'), onKeyDown: (ev) => this.onKeyPress(ev), onWheel: this.onWheel, min: this.min, max: this.max, pattern: this.getPattern(), step: this.step, class: {
470
471
  last: !((hasValue && this.clearable) || (this.type === 'password' && this.showPasswordToggle) || (this.uiValidation.invalid && this.validity === false)),
471
472
  'hide-value': (_b = this.checkboxParams) === null || _b === void 0 ? void 0 : _b.value,
472
473
  'has-icon-prefix': this.finalIconPrefix && this.hasIconPrefix
473
- }, disabled: this.disabled, value: this.localValue }), this.maxCharacters && this.renderMaxCharacterCounter(), this.host.classList.contains('warning') && h("div", { class: "warning-icon" }), (hasValue && !isNil(this.validity) && this.uiValidation && this.uiValidation.valid && this.validity) ||
474
+ }, disabled: this.disabled, value: this.localValue, ...this.contentEventListeners }), this.maxCharacters && this.renderMaxCharacterCounter(), this.host.classList.contains('warning') && h("div", { class: "warning-icon" }), (hasValue && !isNil(this.validity) && this.uiValidation && this.uiValidation.valid && this.validity) ||
474
475
  (this.uiValidation.invalid && this.validity === false && !this.inputReloaded && (h("div", { class: 'valid-icon ' + (this.validity ? 'valid' : 'invalid' + (this.clearable && hasValue && this.type === 'password' && this.showPasswordToggle ? '' : ' last')) }, h("yoo-icon", { color: this.validity ? 'app-color' : 'danger', name: this.validity ? 'check' : 'rejected', size: this.getIconSize() })))), this.type === 'password' && this.showPasswordToggle && (h("div", { class: 'icon-suffix-focus' + (this.clearable && hasValue ? '' : ' last'), onClick: this.onShowPassword.bind(this) }, hasValue && h("yoo-icon", { size: this.getIconSize(), name: "eye", color: this.inputType === 'password' ? 'stable-alt' : 'light' }))), this.clearable && !((_c = this.checkboxParams) === null || _c === void 0 ? void 0 : _c.value) && (h("div", { class: { 'icon-suffix-focus last icon-close': true }, style: { display: hasValue ? undefined : 'none' }, onClick: () => (hasValue ? this.clearInput() : null) }, h("yoo-icon", { size: this.getIconSize(), name: "cross" }))), this.iconSuffix && (h("div", { class: "icon-suffix-focus", onClick: () => (this.inputElement && this.inputElement.focus ? this.inputElement.focus() : null) }, h("yoo-icon", { name: this.iconSuffix, size: this.getIconSize() }))), (_d = this.inlineActions) === null || _d === void 0 ? void 0 :
475
476
  _d.map((action) => {
476
477
  const { handler, iconColor, icon, tooltip } = action || {};
@@ -1,5 +1,5 @@
1
1
  import { r as registerInstance, i as createEvent, h, g as getElement } from './index-2cf5b950.js';
2
- import { H as getCssColor, y as isWeb, x as showModal, b as isNativeMobile, aN as Keyboard, t as translate } from './index-c8528bb9.js';
2
+ import { H as getCssColor, y as isWeb, x as showModal, t as translate } from './index-c8528bb9.js';
3
3
  import { a as isFinite, a8 as range } from './lodash-cd4a9ba3.js';
4
4
  import './_commonjsHelpers-f4d11124.js';
5
5
  import './index-ee2b347f.js';
@@ -154,9 +154,6 @@ const YooFormNumberPickerComponent = class {
154
154
  ev.stopPropagation();
155
155
  ev.preventDefault();
156
156
  this.updateValidity();
157
- if (isNativeMobile()) {
158
- Keyboard.hide();
159
- }
160
157
  this.showContainerDialog();
161
158
  }
162
159
  onInputBlurred() {
@@ -207,7 +204,7 @@ const YooFormNumberPickerComponent = class {
207
204
  ];
208
205
  }
209
206
  else {
210
- return (h("div", { class: "outer-container" }, h("yoo-form-input", { step: this.stepAmount, size: this.size, disabled: this.disabled, type: "number", forceValueUpdate: true, value: this.selection ? this.selection : this.value, clearable: this.clearable && !this.disabled, required: this.required, readonly: this.readonly, validity: this.validity, onIconClicked: (ev) => this.onClearIconClicked(ev), onInputFocused: (ev) => this.onInputFocused(ev), onValidityChanged: (ev) => ev.stopPropagation() })));
207
+ return (h("div", { class: "outer-container" }, h("yoo-form-input", { step: this.stepAmount, size: this.size, disabled: this.disabled, type: "number", forceValueUpdate: true, value: this.selection ? this.selection : this.value, clearable: this.clearable && !this.disabled, required: this.required, readonly: this.readonly, validity: this.validity, onIconClicked: (ev) => this.onClearIconClicked(ev), disableFocus: !isWeb(this.host), onInputFocused: (ev) => this.onInputFocused(ev), contentEventListeners: isWeb(this.host) ? {} : { onTouchStart: (ev) => this.onInputFocused(ev) }, onValidityChanged: (ev) => ev.stopPropagation() })));
211
208
  }
212
209
  }
213
210
  render() {