@yoobic/yobi 8.3.1-4 → 8.3.1-5
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-dynamic.cjs.entry.js +2 -1
- package/dist/cjs/yoo-form-input-container.cjs.entry.js +32 -43
- package/dist/cjs/yoo-form-input.cjs.entry.js +7 -7
- package/dist/cjs/yoo-rating.cjs.entry.js +1 -1
- package/dist/cjs/yoo-reset-password.cjs.entry.js +8 -6
- package/dist/collection/components/2.molecules/rating/rating.js +1 -1
- package/dist/collection/components/form/form-dynamic/form-dynamic.js +2 -1
- package/dist/collection/components/form/form-input/form-input.css +9 -9
- package/dist/collection/components/form/form-input/form-input.js +30 -8
- package/dist/collection/components/form/form-input-container/form-input-container.js +60 -54
- package/dist/collection/feature-platform/login/reset-password/reset-password.css +4 -1
- package/dist/collection/feature-platform/login/reset-password/reset-password.js +9 -7
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/yoo-form-dynamic.entry.js +2 -1
- package/dist/design-system/yoo-form-input-container.entry.js +32 -43
- package/dist/design-system/yoo-form-input.entry.js +7 -7
- package/dist/design-system/yoo-rating.entry.js +1 -1
- package/dist/design-system/yoo-reset-password.entry.js +8 -6
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-form-dynamic.entry.js +2 -1
- package/dist/esm/yoo-form-input-container.entry.js +32 -43
- package/dist/esm/yoo-form-input.entry.js +7 -7
- package/dist/esm/yoo-rating.entry.js +1 -1
- package/dist/esm/yoo-reset-password.entry.js +8 -6
- package/dist/types/components/form/form-input/form-input.d.ts +2 -1
- package/dist/types/components/form/form-input-container/form-input-container.d.ts +1 -0
- package/dist/types/components.d.ts +6 -2
- package/dist/types/home/runner/work/yoobic-ng-6/yoobic-ng-6/design-system/stencil/.stencil/shared/interfaces/src/entities/form-field/form-field.interface.d.ts +1 -0
- package/package.json +1 -1
|
@@ -200,7 +200,7 @@ export class YooFormInputComponent {
|
|
|
200
200
|
el.value = this.localValue + '.';
|
|
201
201
|
}
|
|
202
202
|
if (!isNumberInput || el.value || ev.data !== '-') {
|
|
203
|
-
if (!(isNumberInput &&
|
|
203
|
+
if (!(isNumberInput && el.value.length === 1 && el.value[0] === '-')) {
|
|
204
204
|
if (isNumberInput && ['e', '+'].includes(ev.data)) {
|
|
205
205
|
el.value = this.value;
|
|
206
206
|
}
|
|
@@ -384,8 +384,8 @@ export class YooFormInputComponent {
|
|
|
384
384
|
}
|
|
385
385
|
return [
|
|
386
386
|
this.copyToClipboard && h("yoo-icon", { onClick: () => this.onCopyToClipboard(copyText), class: "float-left", name: "duplicate", size: this.getIconSize() }),
|
|
387
|
-
this.type !== 'email' && h("p", { class: {
|
|
388
|
-
this.type === 'email' && h("a", { href: `mailto:${value}`, class: {
|
|
387
|
+
this.type !== 'email' && h("p", { class: { truncate: this.copyToClipboard }, innerHTML: innerHTML, onClick: () => this.copyToClipboard && this.onCopyToClipboard(copyText) }),
|
|
388
|
+
this.type === 'email' && (h("a", { href: `mailto:${value}`, class: { truncate: this.copyToClipboard }, innerHTML: innerHTML, onClick: () => this.copyToClipboard && this.onCopyToClipboard(copyText) }))
|
|
389
389
|
];
|
|
390
390
|
}
|
|
391
391
|
renderMaxCharacterCounter() {
|
|
@@ -406,8 +406,8 @@ export class YooFormInputComponent {
|
|
|
406
406
|
invalid: this.uiValidation.invalid && this.validity === false && !this.inputReloaded
|
|
407
407
|
} },
|
|
408
408
|
this.finalIconPrefix && this.hasIconPrefix && (h("div", { class: "icon-prefix", onClick: () => (this.inputElement && this.inputElement.focus ? this.inputElement.focus() : null) },
|
|
409
|
-
h("yoo-icon", { name: this.finalIconPrefix, size: this.getIconSize() }))),
|
|
410
|
-
h("input", { type: this.inputType, 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) => this.fireInputChangeEvent ? this.onInputChanged(ev) : ev === null || ev === void 0 ? void 0 : ev.stopPropagation(), onInput: (ev) => this.onInputChanged(ev), onFocus: () => 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: {
|
|
409
|
+
h("yoo-icon", { name: this.finalIconPrefix, size: this.getIconSize(), color: this.iconPrefixColor }))),
|
|
410
|
+
h("input", { type: this.inputType, 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) => (this.fireInputChangeEvent ? this.onInputChanged(ev) : ev === null || ev === void 0 ? void 0 : ev.stopPropagation()), onInput: (ev) => this.onInputChanged(ev), onFocus: () => 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: {
|
|
411
411
|
last: !((hasValue && this.clearable) || (this.type === 'password' && this.showPasswordToggle) || (this.uiValidation.invalid && this.validity === false)),
|
|
412
412
|
'hide-value': (_a = this.checkboxParams) === null || _a === void 0 ? void 0 : _a.value,
|
|
413
413
|
'has-icon-prefix': this.finalIconPrefix && this.hasIconPrefix
|
|
@@ -429,7 +429,7 @@ export class YooFormInputComponent {
|
|
|
429
429
|
this.tooltip && (h("div", { class: { 'icon-suffix-focus last icon-close': true } },
|
|
430
430
|
h("yoo-tooltip", { content: this.tooltip },
|
|
431
431
|
h("yoo-icon", { size: "medium", name: "help" })))),
|
|
432
|
-
this.uiValidation.invalid && h("div", { class: { 'invalid-message': true, invalid:
|
|
432
|
+
this.uiValidation.invalid && h("div", { class: { 'invalid-message': true, invalid: this.validity === false && !this.inputReloaded } }, translate(invalidMessageKey))
|
|
433
433
|
];
|
|
434
434
|
}
|
|
435
435
|
contentEditableInputBlurred(ev) {
|
|
@@ -487,9 +487,9 @@ export class YooFormInputComponent {
|
|
|
487
487
|
this.renderAction('confirm')));
|
|
488
488
|
}
|
|
489
489
|
renderAction(type) {
|
|
490
|
-
return h("div", { class: type },
|
|
490
|
+
return (h("div", { class: type },
|
|
491
491
|
h("yoo-button", { disabled: !this.modified || this.disabled, size: this.size, customColor: "stable-alt", onClick: () => this[type]() },
|
|
492
|
-
h("yoo-icon", { size: this.getIconSize(), name: type === 'cancel' ? 'close' : 'tick' })));
|
|
492
|
+
h("yoo-icon", { size: this.getIconSize(), name: type === 'cancel' ? 'close' : 'tick' }))));
|
|
493
493
|
}
|
|
494
494
|
render() {
|
|
495
495
|
return (h(Host, { class: {
|
|
@@ -776,6 +776,28 @@ export class YooFormInputComponent {
|
|
|
776
776
|
"attribute": "icon-prefix",
|
|
777
777
|
"reflect": false
|
|
778
778
|
},
|
|
779
|
+
"iconPrefixColor": {
|
|
780
|
+
"type": "string",
|
|
781
|
+
"mutable": false,
|
|
782
|
+
"complexType": {
|
|
783
|
+
"original": "TColor",
|
|
784
|
+
"resolved": "\"accent\" | \"anthracite\" | \"app-color\" | \"danger\" | \"dark\" | \"energized\" | \"info\" | \"light\" | \"stable\" | \"stable-alt\" | \"stable-light\" | \"stable-ultralight\" | \"success\" | \"text-color\" | \"warning\" | \"wood\" | \"accent-10\" | \"accent-20\" | \"accent-40\" | \"accent-60\" | \"accent-80\" | \"anthracite-10\" | \"anthracite-20\" | \"anthracite-40\" | \"anthracite-60\" | \"anthracite-80\" | \"app-color-10\" | \"app-color-20\" | \"app-color-40\" | \"app-color-60\" | \"app-color-80\" | \"danger-10\" | \"danger-20\" | \"danger-40\" | \"danger-60\" | \"danger-80\" | \"dark-10\" | \"dark-20\" | \"dark-40\" | \"dark-60\" | \"dark-80\" | \"energized-10\" | \"energized-20\" | \"energized-40\" | \"energized-60\" | \"energized-80\" | \"info-10\" | \"info-20\" | \"info-40\" | \"info-60\" | \"info-80\" | \"light-10\" | \"light-20\" | \"light-40\" | \"light-60\" | \"light-80\" | \"stable-10\" | \"stable-20\" | \"stable-40\" | \"stable-60\" | \"stable-80\" | \"stable-alt-10\" | \"stable-alt-20\" | \"stable-alt-40\" | \"stable-alt-60\" | \"stable-alt-80\" | \"stable-light-10\" | \"stable-light-20\" | \"stable-light-40\" | \"stable-light-60\" | \"stable-light-80\" | \"stable-ultralight-10\" | \"stable-ultralight-20\" | \"stable-ultralight-40\" | \"stable-ultralight-60\" | \"stable-ultralight-80\" | \"success-10\" | \"success-20\" | \"success-40\" | \"success-60\" | \"success-80\" | \"text-color-10\" | \"text-color-20\" | \"text-color-40\" | \"text-color-60\" | \"text-color-80\" | \"warning-10\" | \"warning-20\" | \"warning-40\" | \"warning-60\" | \"warning-80\" | \"wood-10\" | \"wood-20\" | \"wood-40\" | \"wood-60\" | \"wood-80\" | \"transparent\"",
|
|
785
|
+
"references": {
|
|
786
|
+
"TColor": {
|
|
787
|
+
"location": "import",
|
|
788
|
+
"path": "@shared/interfaces"
|
|
789
|
+
}
|
|
790
|
+
}
|
|
791
|
+
},
|
|
792
|
+
"required": false,
|
|
793
|
+
"optional": true,
|
|
794
|
+
"docs": {
|
|
795
|
+
"tags": [],
|
|
796
|
+
"text": ""
|
|
797
|
+
},
|
|
798
|
+
"attribute": "icon-prefix-color",
|
|
799
|
+
"reflect": false
|
|
800
|
+
},
|
|
779
801
|
"iconSuffix": {
|
|
780
802
|
"type": "string",
|
|
781
803
|
"mutable": false,
|
|
@@ -98,24 +98,18 @@ export class YooFormInputContainerComponent {
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
initShowDescription(showDescriptionAndTitle, field, readOnly, forceReadOnly, forceDescription) {
|
|
101
|
-
return (field === null || field === void 0 ? void 0 : field.description) &&
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
(field.type === FormFieldType.formula && forceReadOnly) ||
|
|
105
|
-
forceDescription ||
|
|
106
|
-
showDescriptionAndTitle);
|
|
101
|
+
return ((field === null || field === void 0 ? void 0 : field.description) &&
|
|
102
|
+
!field.hideLabel &&
|
|
103
|
+
(!readOnly || this.isCheckboxOrToggle(field.type) || (field.type === FormFieldType.formula && forceReadOnly) || forceDescription || showDescriptionAndTitle));
|
|
107
104
|
}
|
|
108
105
|
initShowLabel(showDescription, showDescriptionAndTitle, field, readOnly) {
|
|
109
106
|
const hasLabel = field.title || field.name;
|
|
110
|
-
return hasLabel &&
|
|
111
|
-
(!showDescription || showDescriptionAndTitle) &&
|
|
112
|
-
(!field.hideLabel || (readOnly && field.placeholder)) &&
|
|
113
|
-
!this.isCheckboxOrToggle(field.type);
|
|
107
|
+
return hasLabel && (!showDescription || showDescriptionAndTitle) && (!field.hideLabel || (readOnly && field.placeholder)) && !this.isCheckboxOrToggle(field.type);
|
|
114
108
|
}
|
|
115
109
|
initShouldShowDefaultInstructions(showDefaultInstructions, fieldType, readOnly) {
|
|
116
110
|
const NO_INSTRUCTIONS = [FormFieldType.selectmulti, FormFieldType.number, FormFieldType.feedback];
|
|
117
111
|
const ALWAYS_SHOW = [FormFieldType.plan];
|
|
118
|
-
return !readOnly && (ALWAYS_SHOW.includes(fieldType) || showDefaultInstructions && NO_INSTRUCTIONS.includes(fieldType));
|
|
112
|
+
return !readOnly && (ALWAYS_SHOW.includes(fieldType) || (showDefaultInstructions && NO_INSTRUCTIONS.includes(fieldType)));
|
|
119
113
|
}
|
|
120
114
|
shouldShowComments() {
|
|
121
115
|
return (this.showComments || (this.readonly && this.comments));
|
|
@@ -124,10 +118,11 @@ export class YooFormInputContainerComponent {
|
|
|
124
118
|
return fieldType === FormFieldType.toggle || fieldType === FormFieldType.checkbox;
|
|
125
119
|
}
|
|
126
120
|
isMedia(excludeVideo) {
|
|
127
|
-
return this.field &&
|
|
128
|
-
this.field.type === FormFieldType.
|
|
129
|
-
|
|
130
|
-
|
|
121
|
+
return (this.field &&
|
|
122
|
+
((excludeVideo ? false : this.field.type === FormFieldType.video) ||
|
|
123
|
+
this.field.type === FormFieldType.image ||
|
|
124
|
+
this.field.type === FormFieldType.document ||
|
|
125
|
+
this.field.type === FormFieldType.videoplayer));
|
|
131
126
|
}
|
|
132
127
|
getComponentDescriptionExtraClass() {
|
|
133
128
|
let extraClass = '';
|
|
@@ -147,7 +142,8 @@ export class YooFormInputContainerComponent {
|
|
|
147
142
|
return extraClass;
|
|
148
143
|
}
|
|
149
144
|
getFieldTitle() {
|
|
150
|
-
|
|
145
|
+
let fieldTitle = this.field.title || (this.field.name && !this.host.classList.contains('lesson-live-preview')) ? translateMulti(this.field.title || this.field.name.toUpperCase()) : '';
|
|
146
|
+
this.useUppercaseLabel && this.field.title && (fieldTitle = fieldTitle.toUpperCase());
|
|
151
147
|
return this.isLesson && this.readonly
|
|
152
148
|
? translateMulti(this.field.description) || (this.shouldShowDefaultInstructions && this.getFieldDefaultInstructions()) || fieldTitle
|
|
153
149
|
: fieldTitle;
|
|
@@ -219,8 +215,7 @@ export class YooFormInputContainerComponent {
|
|
|
219
215
|
}
|
|
220
216
|
animateContent() {
|
|
221
217
|
var _a, _b;
|
|
222
|
-
const isAnimatedField = this.animated && (((_a = this.field) === null || _a === void 0 ? void 0 : _a.type) === FormFieldType.number ||
|
|
223
|
-
((_b = this.field) === null || _b === void 0 ? void 0 : _b.type) === FormFieldType.selectimage);
|
|
218
|
+
const isAnimatedField = this.animated && (((_a = this.field) === null || _a === void 0 ? void 0 : _a.type) === FormFieldType.number || ((_b = this.field) === null || _b === void 0 ? void 0 : _b.type) === FormFieldType.selectimage);
|
|
224
219
|
if (this.isLesson && isAnimatedField) {
|
|
225
220
|
resizeObserve(this.host, this.onResize);
|
|
226
221
|
}
|
|
@@ -291,19 +286,22 @@ export class YooFormInputContainerComponent {
|
|
|
291
286
|
const hasRightSide = this.markAsInvalid || this.time || fieldhelp || !!this.host.querySelector('[slot="right-side"]');
|
|
292
287
|
return (hasRightSide && (h("div", { class: "right-side" },
|
|
293
288
|
h("slot", { name: "right-side" }),
|
|
294
|
-
this.markAsInvalid && h("yoo-tag", { size: "extra-small", class: "not-compliant", color: "danger" }, translate('NOTSATISFACTORY')),
|
|
289
|
+
this.markAsInvalid && (h("yoo-tag", { size: "extra-small", class: "not-compliant", color: "danger" }, translate('NOTSATISFACTORY'))),
|
|
295
290
|
this.time && (h("yoo-tooltip", { hoverable: isWeb(this.host), content: translate('LASTEDIT') + ': ' + pipes.dateFormat.transform(this.time, 'L LT'), placement: "top-end" },
|
|
296
291
|
h("yoo-icon", { size: isWeb(this.host) ? 'small' : 'medium', class: "recent", name: "recent" }))),
|
|
297
292
|
fieldhelp && !this.field.hideTooltip && !hideTooltip && (h("yoo-tooltip", { hoverable: isWeb(this.host), content: this.getHelpContent(fieldhelp), placement: "top-end" },
|
|
298
293
|
h("yoo-icon", { size: this.field.tooltipSize ? this.field.tooltipSize : isWeb(this.host) ? 'small' : 'medium', name: "help", color: this.field.tooltipColor ? this.field.tooltipColor : 'stable' }))))));
|
|
299
294
|
}
|
|
300
295
|
renderOriginalMarkAsInvalid() {
|
|
301
|
-
return !this.markAsInvalid &&
|
|
302
|
-
|
|
296
|
+
return (!this.markAsInvalid &&
|
|
297
|
+
!this.hideComplianceTags &&
|
|
298
|
+
this.originalMarkAsInvalid && (h("yoo-tag", { size: "extra-small", class: "original-invalid", color: "danger" }, translate('ORIGINALMARKASINVALID'))));
|
|
303
299
|
}
|
|
304
300
|
renderOriginalMarkAsModified() {
|
|
305
|
-
return !this.markAsInvalid &&
|
|
306
|
-
|
|
301
|
+
return (!this.markAsInvalid &&
|
|
302
|
+
!this.hideComplianceTags &&
|
|
303
|
+
!this.originalMarkAsInvalid &&
|
|
304
|
+
this.markAsModified && (h("yoo-tag", { size: "extra-small", class: "original-modified", color: "danger" }, translate('ORIGINALMARKASMODIFIED'))));
|
|
307
305
|
}
|
|
308
306
|
renderLabel() {
|
|
309
307
|
var _a, _b, _c;
|
|
@@ -329,11 +327,7 @@ export class YooFormInputContainerComponent {
|
|
|
329
327
|
}, onClick: () => this.headerClicked.emit(), ref: (el) => (this.instructionElement = el) }, this.getFieldDefaultInstructions()));
|
|
330
328
|
}
|
|
331
329
|
renderTopText() {
|
|
332
|
-
return [
|
|
333
|
-
this.showLabel && this.renderLabel(),
|
|
334
|
-
this.showDescription && this.renderDescription(),
|
|
335
|
-
this.shouldShowDefaultInstructions && this.renderDefaultInstructions()
|
|
336
|
-
];
|
|
330
|
+
return [this.showLabel && this.renderLabel(), this.showDescription && this.renderDescription(), this.shouldShowDefaultInstructions && this.renderDefaultInstructions()];
|
|
337
331
|
}
|
|
338
332
|
renderInnerContent() {
|
|
339
333
|
var _a, _b, _c;
|
|
@@ -344,11 +338,12 @@ export class YooFormInputContainerComponent {
|
|
|
344
338
|
'no-margin': this.field.allowTask,
|
|
345
339
|
'no-padding': ((_a = this.field) === null || _a === void 0 ? void 0 : _a.type) === FormFieldType.multiinput
|
|
346
340
|
} },
|
|
347
|
-
this.slotInputConfig &&
|
|
348
|
-
|
|
349
|
-
(
|
|
350
|
-
|
|
351
|
-
|
|
341
|
+
this.slotInputConfig &&
|
|
342
|
+
((_b = this.slotInputConfig) === null || _b === void 0 ? void 0 : _b.inputFn([
|
|
343
|
+
h("div", { class: "title-wrapper", slot: "image-title" },
|
|
344
|
+
((_c = this.slotInputConfig) === null || _c === void 0 ? void 0 : _c.slideTitle) && this.slotInputConfig.slideTitle(),
|
|
345
|
+
this.renderTopText())
|
|
346
|
+
])),
|
|
352
347
|
h("slot", null),
|
|
353
348
|
this.renderRemovable()));
|
|
354
349
|
}
|
|
@@ -363,18 +358,15 @@ export class YooFormInputContainerComponent {
|
|
|
363
358
|
this.renderInnerContent()));
|
|
364
359
|
}
|
|
365
360
|
renderRemovable() {
|
|
366
|
-
return (this.field.removable && (h("div", { class: "removable", onClick: () => this.onRemove() }, isWeb(this.host) ?
|
|
367
|
-
h("yoo-
|
|
368
|
-
h("yoo-icon", { size: this.size || 'medium', color: "danger", name: "cross" }))
|
|
369
|
-
: h("yoo-icon", { size: this.size || 'medium', color: "danger", name: "cross" }))));
|
|
361
|
+
return (this.field.removable && (h("div", { class: "removable", onClick: () => this.onRemove() }, isWeb(this.host) ? (h("yoo-tooltip", { content: translate('REMOVEFIELD'), placement: "top-end" },
|
|
362
|
+
h("yoo-icon", { size: this.size || 'medium', color: "danger", name: "cross" }))) : (h("yoo-icon", { size: this.size || 'medium', color: "danger", name: "cross" })))));
|
|
370
363
|
}
|
|
371
364
|
renderHint() {
|
|
372
365
|
return h("div", { class: "hint-container", innerHTML: this.field.hint });
|
|
373
366
|
}
|
|
374
367
|
renderFooter() {
|
|
375
368
|
return [
|
|
376
|
-
(
|
|
377
|
-
!this.readonly) && (h("div", { class: "footer-container" },
|
|
369
|
+
(this.field.allowComments || this.field.allowTask || this.field.shareToFeed) && !this.readonly && (h("div", { class: "footer-container" },
|
|
378
370
|
this.field.allowComments && (h("span", { class: "comment-container", onClick: () => this.onToggleComments() },
|
|
379
371
|
h("yoo-icon", { name: "comment", color: "text-color" }))),
|
|
380
372
|
this.field.shareToFeed && (h("span", { class: "feed-container" },
|
|
@@ -388,24 +380,21 @@ export class YooFormInputContainerComponent {
|
|
|
388
380
|
renderValidationFooter() {
|
|
389
381
|
const isMobile = !isWeb(this.host);
|
|
390
382
|
// the layout is not the same on web and mobile, so need to render the validations comments according to the platform
|
|
391
|
-
return (this.displayValidationFooter &&
|
|
392
|
-
h("
|
|
393
|
-
h("
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
h("
|
|
399
|
-
h("yoo-form-checkbox", { animated: this.animated, value: this.markAsInvalid, class: "danger web", size: "large", header: translate('MARKFIELDASINVALID'), onInputChanged: (ev) => this.onValidationMarkAsInvalid(ev.detail) }))));
|
|
383
|
+
return (this.displayValidationFooter && (h("div", { class: { 'footer-container': true, validation: true, mobile: isMobile } },
|
|
384
|
+
h("span", { class: "comment-container", onClick: () => this.onToggleValidationComments() },
|
|
385
|
+
h("yoo-icon", { name: "comment", size: "medium", color: "text-color" }),
|
|
386
|
+
" ",
|
|
387
|
+
translate(this.validationComments ? 'EDITCOMMENTS' : 'ADDCOMMENTS')),
|
|
388
|
+
isMobile && this.renderValidationComments(),
|
|
389
|
+
h("span", { class: "validation-container" },
|
|
390
|
+
h("yoo-form-checkbox", { animated: this.animated, value: this.markAsInvalid, class: "danger web", size: "large", header: translate('MARKFIELDASINVALID'), onInputChanged: (ev) => this.onValidationMarkAsInvalid(ev.detail) })))));
|
|
400
391
|
}
|
|
401
392
|
renderComments() {
|
|
402
|
-
return (this.shouldShowComments() &&
|
|
403
|
-
h("yoo-form-input-comments", { class: { 'with-border-bottom': this.displayValidationComments }, readonly: this.readonly, user: this.commentsUser, comments: this.comments, onInputChanged: (ev) => this.onCommentsChange(ev), onInputFocused: (ev) => this.onCommentFocused(ev) }));
|
|
393
|
+
return (this.shouldShowComments() && (h("yoo-form-input-comments", { class: { 'with-border-bottom': this.displayValidationComments }, readonly: this.readonly, user: this.commentsUser, comments: this.comments, onInputChanged: (ev) => this.onCommentsChange(ev), onInputFocused: (ev) => this.onCommentFocused(ev) })));
|
|
404
394
|
}
|
|
405
395
|
renderValidationComments() {
|
|
406
396
|
const readonly = !this.allowFieldValidation || !this.showValidationComments;
|
|
407
|
-
return (this.displayValidationComments &&
|
|
408
|
-
h("yoo-form-input-comments", { readonly: readonly, user: this.validationCommentsUser, comments: this.validationComments, onInputChanged: (ev) => this.onValidationCommentsChange(ev), onInputFocused: (ev) => this.onCommentFocused(ev), onCommentsToggled: () => this.onToggleValidationComments() }));
|
|
397
|
+
return (this.displayValidationComments && (h("yoo-form-input-comments", { readonly: readonly, user: this.validationCommentsUser, comments: this.validationComments, onInputChanged: (ev) => this.onValidationCommentsChange(ev), onInputFocused: (ev) => this.onCommentFocused(ev), onCommentsToggled: () => this.onToggleValidationComments() })));
|
|
409
398
|
}
|
|
410
399
|
render() {
|
|
411
400
|
var _a;
|
|
@@ -415,7 +404,7 @@ export class YooFormInputContainerComponent {
|
|
|
415
404
|
line: this.isCheckboxOrToggle((_a = this.field) === null || _a === void 0 ? void 0 : _a.type) && this.forceReadonly,
|
|
416
405
|
media: this.isMedia(),
|
|
417
406
|
invalid: this.markAsInvalid
|
|
418
|
-
}, ...getConfig().isE2E ? this.getE2EAttributes() : {} }, this.field && [
|
|
407
|
+
}, ...(getConfig().isE2E ? this.getE2EAttributes() : {}) }, this.field && [
|
|
419
408
|
this.renderContent(),
|
|
420
409
|
this.field.hint && this.renderHint(),
|
|
421
410
|
this.renderFooter(),
|
|
@@ -840,6 +829,23 @@ export class YooFormInputContainerComponent {
|
|
|
840
829
|
"attribute": "hide-compliance-tags",
|
|
841
830
|
"reflect": false
|
|
842
831
|
},
|
|
832
|
+
"useUppercaseLabel": {
|
|
833
|
+
"type": "boolean",
|
|
834
|
+
"mutable": false,
|
|
835
|
+
"complexType": {
|
|
836
|
+
"original": "boolean",
|
|
837
|
+
"resolved": "boolean",
|
|
838
|
+
"references": {}
|
|
839
|
+
},
|
|
840
|
+
"required": false,
|
|
841
|
+
"optional": true,
|
|
842
|
+
"docs": {
|
|
843
|
+
"tags": [],
|
|
844
|
+
"text": ""
|
|
845
|
+
},
|
|
846
|
+
"attribute": "use-uppercase-label",
|
|
847
|
+
"reflect": false
|
|
848
|
+
},
|
|
843
849
|
"fullscreen": {
|
|
844
850
|
"type": "boolean",
|
|
845
851
|
"mutable": false,
|
|
@@ -862,7 +868,7 @@ export class YooFormInputContainerComponent {
|
|
|
862
868
|
"type": "unknown",
|
|
863
869
|
"mutable": false,
|
|
864
870
|
"complexType": {
|
|
865
|
-
"original": "{ inputFn: (slots: HTMLElement[]) => any
|
|
871
|
+
"original": "{ inputFn: (slots: HTMLElement[]) => any; slideTitle: any }",
|
|
866
872
|
"resolved": "{ inputFn: (slots: HTMLElement[]) => any; slideTitle: any; }",
|
|
867
873
|
"references": {
|
|
868
874
|
"HTMLElement": {
|
|
@@ -225,8 +225,11 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
225
225
|
height: 15rem;
|
|
226
226
|
margin-top: var(--spacing-08, 0.5rem);
|
|
227
227
|
}
|
|
228
|
-
:host yoo-form-input {
|
|
228
|
+
:host yoo-form-input-container {
|
|
229
229
|
display: block;
|
|
230
230
|
max-width: 18.75rem;
|
|
231
231
|
margin: auto;
|
|
232
|
+
}
|
|
233
|
+
:host yoo-form-input-container.web {
|
|
234
|
+
font-size: var(--font-size-12, 0.75rem);
|
|
232
235
|
}
|
|
@@ -52,13 +52,13 @@ export class YooResetPasswordComponent {
|
|
|
52
52
|
}
|
|
53
53
|
renderRequest() {
|
|
54
54
|
return [
|
|
55
|
-
!!this.instruction && h("p",
|
|
55
|
+
!!this.instruction && h("p", { style: { maxWidth: '350px', margin: '0 auto' } }, this.instruction),
|
|
56
56
|
h("yoo-empty-state", { ref: (el) => (this.emptyState = el), type: this.isMagicLink ? 'magic-link' : 'password' }),
|
|
57
|
-
h("yoo-form-input-container", { field: { title:
|
|
58
|
-
h("yoo-form-input", { ref: (el) => (this.emailInput = el), validators: [{ name: 'required' }], type: "email", uiValidation: { valid: false, invalid: false }, onInputChanged: (event) => this.onInputChanged(event), placeholder: translate('YOOBICUSERNAMEENTER'),
|
|
59
|
-
//! Do not set up onInputBlur without confirming on mobile device
|
|
57
|
+
h("yoo-form-input-container", { field: { title: 'YOOBICUSERNAME' }, hideOptional: true, useUppercaseLabel: true },
|
|
58
|
+
h("yoo-form-input", { ref: (el) => (this.emailInput = el), iconPrefixColor: 'app-color', validators: [{ name: 'required' }], type: "email", uiValidation: { valid: false, invalid: false }, onInputChanged: (event) => this.onInputChanged(event), placeholder: translate('YOOBICUSERNAMEENTER'),
|
|
59
|
+
//! Do not set up onInputBlur without confirming on mobile device. We don't want to have to press submit more than once
|
|
60
60
|
size: isWeb(this.host) ? 'medium' : 'large' })),
|
|
61
|
-
h("yoo-button", { ref: (el) => (this.submitButton = el), size: isWeb(this.host) ? 'medium' : 'large', color: "app-color", disabled: !this.validity, class: "expanded", onClick: () => this.onSubmit() }, translate('
|
|
61
|
+
h("yoo-button", { ref: (el) => (this.submitButton = el), size: isWeb(this.host) ? 'medium' : 'large', color: "app-color", disabled: !this.validity, class: "expanded", onClick: () => this.onSubmit() }, this.isMagicLink ? translate('YOOBICMAGICLINK') : translate('YOOBICRESETPASSWORD'))
|
|
62
62
|
];
|
|
63
63
|
}
|
|
64
64
|
renderResetForm() {
|
|
@@ -80,6 +80,7 @@ export class YooResetPasswordComponent {
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
type: FormFieldType.password,
|
|
83
|
+
iconPrefixColor: 'app-color',
|
|
83
84
|
name: 'newpassword',
|
|
84
85
|
placeholder: 'NEWPASSWORD',
|
|
85
86
|
required: true,
|
|
@@ -88,6 +89,7 @@ export class YooResetPasswordComponent {
|
|
|
88
89
|
},
|
|
89
90
|
{
|
|
90
91
|
type: FormFieldType.password,
|
|
92
|
+
iconPrefixColor: 'app-color',
|
|
91
93
|
name: 'verify',
|
|
92
94
|
placeholder: 'CONFIRMPASSWORD',
|
|
93
95
|
required: true,
|
|
@@ -97,9 +99,9 @@ export class YooResetPasswordComponent {
|
|
|
97
99
|
]
|
|
98
100
|
}
|
|
99
101
|
];
|
|
100
|
-
return h("yoo-form-dynamic", { class: "margin-top", animated: false, slides: slides, showRecap: false, showSave: true, skipValidation: true, onDataChanged: (ev) => this.onDataChanged(ev), onFormValidityChanged: (ev) => this.onValidityChanged(ev), onSave: () => this.onSubmit() },
|
|
102
|
+
return (h("yoo-form-dynamic", { class: "margin-top", animated: false, slides: slides, showRecap: false, showSave: true, skipValidation: true, onDataChanged: (ev) => this.onDataChanged(ev), onFormValidityChanged: (ev) => this.onValidityChanged(ev), onSave: () => this.onSubmit() },
|
|
101
103
|
h("div", { slot: "footer" },
|
|
102
|
-
h("yoo-button", { size: isWeb(this.host) ? 'medium' : 'large', color: "app-color", disabled: !this.validity, onClick: () => this.onSubmit() }, translate('SUBMIT'))));
|
|
104
|
+
h("yoo-button", { size: isWeb(this.host) ? 'medium' : 'large', color: "app-color", disabled: !this.validity, onClick: () => this.onSubmit() }, translate('SUBMIT')))));
|
|
103
105
|
}
|
|
104
106
|
render() {
|
|
105
107
|
return h("div", null, this.token ? this.renderResetForm() : this.renderRequest());
|