@yoobic/yobi 8.5.0-85 → 8.5.0-86
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-autocomplete-dialog.cjs.entry.js +1 -9
- package/dist/cjs/yoo-form-autocomplete.cjs.entry.js +6 -3
- package/dist/cjs/yoo-form-choice-image.cjs.entry.js +1 -1
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +6 -3
- package/dist/collection/components/form/form-autocomplete-dialog/form-autocomplete-dialog.js +19 -9
- package/dist/collection/components/form/form-choice/image/form-choice-image.js +1 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/yoo-form-autocomplete-dialog.entry.js +1 -9
- package/dist/design-system/yoo-form-autocomplete.entry.js +6 -3
- package/dist/design-system/yoo-form-choice-image.entry.js +1 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-form-autocomplete-dialog.entry.js +1 -9
- package/dist/esm/yoo-form-autocomplete.entry.js +6 -3
- package/dist/esm/yoo-form-choice-image.entry.js +1 -1
- package/dist/types/components/form/form-autocomplete-dialog/form-autocomplete-dialog.d.ts +1 -1
- package/dist/types/components.d.ts +2 -0
- package/package.json +1 -1
@@ -40,9 +40,9 @@ const YooFormAutocompleteDialogComponent = class {
|
|
40
40
|
this.modalPlacement = 'below';
|
41
41
|
this.values = [];
|
42
42
|
this.infiniteScrollDisabled = false;
|
43
|
+
this.initialValueLength = 0;
|
43
44
|
this.fullscreen = false;
|
44
45
|
this.gridIsExpanded = false;
|
45
|
-
this.initialValueLength = 0;
|
46
46
|
this.dialogTitleMap = {
|
47
47
|
defaults: ['SELECTITEM', 'SELECTITEMS'],
|
48
48
|
tags: ['SELECTTAG', 'SELECTTAGS'],
|
@@ -80,13 +80,9 @@ const YooFormAutocompleteDialogComponent = class {
|
|
80
80
|
this.selection = compact([].concat(this.value || []));
|
81
81
|
}
|
82
82
|
onValuesChanged() {
|
83
|
-
var _a;
|
84
83
|
if (!this.initialLoadComplete) {
|
85
84
|
this.initialLoadComplete = true;
|
86
85
|
}
|
87
|
-
if (!this.initialValueLength) {
|
88
|
-
this.initialValueLength = (_a = this.values) === null || _a === void 0 ? void 0 : _a.length;
|
89
|
-
}
|
90
86
|
}
|
91
87
|
onSwipingUp() {
|
92
88
|
if (!this.isFromFormModal) {
|
@@ -107,7 +103,6 @@ const YooFormAutocompleteDialogComponent = class {
|
|
107
103
|
}
|
108
104
|
}
|
109
105
|
componentWillLoad() {
|
110
|
-
var _a, _b;
|
111
106
|
this.halfDialogHeight = window.innerHeight / 2;
|
112
107
|
if ((!this.isLocal && (!this.values || (this.values && this.values.length === 0))) || isWeb(this.host)) {
|
113
108
|
this.initialLoadComplete = false;
|
@@ -115,9 +110,6 @@ const YooFormAutocompleteDialogComponent = class {
|
|
115
110
|
else {
|
116
111
|
this.initialLoadComplete = !(!isWeb(this.host) && this.isLocal && (this.values || this.values.length === 0));
|
117
112
|
}
|
118
|
-
if (((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
119
|
-
this.initialValueLength = (_b = this.values) === null || _b === void 0 ? void 0 : _b.length;
|
120
|
-
}
|
121
113
|
if (this.openFullscreen) {
|
122
114
|
this.fullscreen = true;
|
123
115
|
}
|
@@ -100,6 +100,7 @@ const YooFormAutocompleteComponent = class {
|
|
100
100
|
this.dialog.infiniteScrollDisabled = this.infiniteScrollDisabled;
|
101
101
|
this.dialog.value = this.value;
|
102
102
|
this.dialog.values = this.isLocal ? (this.storeLocalSearchValue !== undefined ? this.storeLocalValues : this.localValues) : this.values;
|
103
|
+
this.dialog.initialValueLength = this.initialValueLength;
|
103
104
|
this.dialog.style.width = isWeb(this.host) ? this.dialogWidth || `${this.host.getBoundingClientRect().width}px` : undefined;
|
104
105
|
this.dialog.addEventListener('currentPageChanged', (ev) => {
|
105
106
|
ev.stopPropagation();
|
@@ -224,6 +225,7 @@ const YooFormAutocompleteComponent = class {
|
|
224
225
|
}
|
225
226
|
if (this.dialog) {
|
226
227
|
this.dialog.values = this.dialog.isLoading && this.isLocal ? this.localValues : values;
|
228
|
+
this.dialog.initialValueLength = this.initialValueLength;
|
227
229
|
this.dialog.isLoading = false;
|
228
230
|
this.dialog.total = this.total;
|
229
231
|
const localDialogSearchValue = await ((_f = this.dialog) === null || _f === void 0 ? void 0 : _f.getLocalSearchValue());
|
@@ -549,14 +551,15 @@ const YooFormAutocompleteComponent = class {
|
|
549
551
|
else {
|
550
552
|
this.infiniteScrollDisabled = hasReachedMaxItem;
|
551
553
|
}
|
554
|
+
if (!this.initialValueLength) {
|
555
|
+
this.initialValueLength = (_b = this.values) === null || _b === void 0 ? void 0 : _b.length;
|
556
|
+
}
|
552
557
|
if (this.dialog) {
|
553
558
|
this.dialog.values = this.values;
|
559
|
+
this.dialog.initialValueLength = this.initialValueLength;
|
554
560
|
this.dialog.infiniteScrollDisabled = this.infiniteScrollDisabled;
|
555
561
|
this.dialog.isLoading = false;
|
556
562
|
}
|
557
|
-
if (!this.initialValueLength) {
|
558
|
-
this.initialValueLength = (_b = this.values) === null || _b === void 0 ? void 0 : _b.length;
|
559
|
-
}
|
560
563
|
return this.values;
|
561
564
|
}
|
562
565
|
onFetchFieldFilterData(ev) {
|
@@ -54,7 +54,7 @@ const YooFormChoiceImageComponent = class {
|
|
54
54
|
const readonly = this.readonly || this.isPdf;
|
55
55
|
const noValidation = !((_a = this.answer) === null || _a === void 0 ? void 0 : _a.length);
|
56
56
|
const isCorrect = this.answer.includes(item);
|
57
|
-
const onOpenImage = () => showSlidesMedia(this.host, { items: this.
|
57
|
+
const onOpenImage = () => showSlidesMedia(this.host, { items: this.choices.map(({ image }) => ({ value: image })), currentSlideIndex: index, showBottomContainer: false });
|
58
58
|
return (h("div", { class: "image-container", onClick: () => this.isHistory && onOpenImage(), style: this.animated ? { '--image-index': index.toString() } : {} }, h("div", { class: { content: true, 'correct-answer': this.readonly && isCorrect && !noValidation, 'wrong-answer': this.readonly && !isCorrect && !noValidation } }, h("yoo-img", { cloudinaryOptions: { pad: true }, scaledUp: this.isPdf, src: image, onClick: () => !readonly && onItemSelect(item, this) }), !readonly && [
|
59
59
|
h("yoo-form-checkbox", { value: isSelected(item, this.selection), onClick: () => onItemSelect(item, this), animated: this.animated }),
|
60
60
|
h("yoo-tag", { color: "dark-60", icon: "maximize", iconOnlyColor: "light", size: "small", onClick: () => onOpenImage() })
|
@@ -52,6 +52,7 @@ export declare class YooFormAutocompleteDialogComponent {
|
|
52
52
|
values: any[];
|
53
53
|
infiniteScrollDisabled?: boolean;
|
54
54
|
value: any;
|
55
|
+
initialValueLength?: number;
|
55
56
|
fetchData: EventEmitter<IGridSearch>;
|
56
57
|
fetchFieldFilterData: EventEmitter<IFormSearch>;
|
57
58
|
sortsAndFiltersChange: EventEmitter<ISortsAndFilters>;
|
@@ -74,7 +75,6 @@ export declare class YooFormAutocompleteDialogComponent {
|
|
74
75
|
private refresher;
|
75
76
|
private halfDialogHeight;
|
76
77
|
private wasFullScreenWhenDragginStarted;
|
77
|
-
private initialValueLength;
|
78
78
|
private dialogTitleMap;
|
79
79
|
get fullScrollHeight(): number;
|
80
80
|
private keyboardWillShowListener;
|
@@ -1907,6 +1907,7 @@ export namespace Components {
|
|
1907
1907
|
"idOnly": boolean;
|
1908
1908
|
"idOnlyInitialSelection"?: any[];
|
1909
1909
|
"infiniteScrollDisabled"?: boolean;
|
1910
|
+
"initialValueLength"?: number;
|
1910
1911
|
"isFilter": boolean;
|
1911
1912
|
"isLoading": boolean;
|
1912
1913
|
"isLocal": boolean;
|
@@ -12729,6 +12730,7 @@ declare namespace LocalJSX {
|
|
12729
12730
|
"idOnly"?: boolean;
|
12730
12731
|
"idOnlyInitialSelection"?: any[];
|
12731
12732
|
"infiniteScrollDisabled"?: boolean;
|
12733
|
+
"initialValueLength"?: number;
|
12732
12734
|
"isFilter"?: boolean;
|
12733
12735
|
"isLoading"?: boolean;
|
12734
12736
|
"isLocal"?: boolean;
|