@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.
- package/dist/cjs/design-system.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/yoo-form-input.cjs.entry.js +3 -2
- package/dist/cjs/yoo-form-number-picker.cjs.entry.js +1 -4
- package/dist/collection/components/form/form-input/form-input.js +19 -2
- package/dist/collection/components/form/form-number-picker/form-number-picker.js +2 -6
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/yoo-form-input.entry.js +3 -2
- package/dist/design-system/yoo-form-number-picker.entry.js +2 -5
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-form-input.entry.js +3 -2
- package/dist/esm/yoo-form-number-picker.entry.js +2 -5
- package/dist/types/components/form/form-input/form-input.d.ts +3 -0
- package/dist/types/components.d.ts +2 -0
- package/package.json +1 -1
@@ -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,
|
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() {
|
@@ -55,6 +55,9 @@ export declare class YooFormInputComponent implements IFormInputBase<string | nu
|
|
55
55
|
fireInputChangeEvent: boolean;
|
56
56
|
allowDecimals: boolean;
|
57
57
|
format: 'input' | 'contenteditable';
|
58
|
+
contentEventListeners: {
|
59
|
+
[key: string]: (event: any) => void;
|
60
|
+
};
|
58
61
|
validityChanged: EventEmitter<boolean>;
|
59
62
|
inputBlurred: EventEmitter<any>;
|
60
63
|
inputFocused: EventEmitter<any>;
|
@@ -3635,6 +3635,7 @@ export namespace Components {
|
|
3635
3635
|
"clear": () => Promise<void>;
|
3636
3636
|
"clearable": boolean;
|
3637
3637
|
"columnDefinition"?: IColumnDefinition;
|
3638
|
+
"contentEventListeners": { [key: string]: (event: any) => void };
|
3638
3639
|
"copyToClipboard"?: boolean;
|
3639
3640
|
"debounce": number;
|
3640
3641
|
"disableFocus": boolean;
|
@@ -15387,6 +15388,7 @@ declare namespace LocalJSX {
|
|
15387
15388
|
"buttonsPrefix"?: IButton[];
|
15388
15389
|
"clearable"?: boolean;
|
15389
15390
|
"columnDefinition"?: IColumnDefinition;
|
15391
|
+
"contentEventListeners"?: { [key: string]: (event: any) => void };
|
15390
15392
|
"copyToClipboard"?: boolean;
|
15391
15393
|
"debounce"?: number;
|
15392
15394
|
"disableFocus"?: boolean;
|