@yoobic/yobi 8.5.0-71 → 8.5.0-72
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/yoo-form-autocomplete.cjs.entry.js +2 -1
- package/dist/cjs/yoo-form-dynamic.cjs.entry.js +1 -3
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +3 -2
- package/dist/collection/components/form/form-dynamic/{helpers/index.js → helpers.js} +1 -3
- package/dist/design-system/yoo-form-autocomplete.entry.js +3 -2
- package/dist/design-system/yoo-form-dynamic.entry.js +1 -3
- package/dist/esm/yoo-form-autocomplete.entry.js +3 -2
- package/dist/esm/yoo-form-dynamic.entry.js +1 -3
- package/dist/types/components/form/form-autocomplete/form-autocomplete.d.ts +1 -0
- package/dist/types/components/form/form-dynamic/{helpers/index.d.ts → helpers.d.ts} +1 -1
- package/package.json +1 -1
@@ -62,6 +62,7 @@ const YooFormAutocompleteComponent = class {
|
|
62
62
|
this.currentPage = 0;
|
63
63
|
this.maxPage = 0;
|
64
64
|
this.infiniteScrollDisabled = false;
|
65
|
+
this.onInputContainerClickedDebounce = lodash.debounce(this.onInputContainerClicked, 500, { leading: true, trailing: false }).bind(this);
|
65
66
|
}
|
66
67
|
get iconSize() {
|
67
68
|
return ['small', 'medium'].includes(this.size) ? 'small' : 'medium';
|
@@ -999,7 +1000,7 @@ const YooFormAutocompleteComponent = class {
|
|
999
1000
|
const minValuesForSearch = 4;
|
1000
1001
|
const hasValue = !index$1.isNullOrUndefined(this.value) && (!lodash.isArray(this.value) || this.value.length > 0);
|
1001
1002
|
const dynamicOrdering = this.dynamicOrdering !== false;
|
1002
|
-
return (index.h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, index.h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.
|
1003
|
+
return (index.h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, index.h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.onInputContainerClickedDebounce() }, this.renderSelectedContent()), this.allowEdit && this.collectionName && (index.h("yoo-button", { size: this.size || 'medium', onClick: () => this.onEdit(), disabled: !hasValue }, index.h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: "pen" }))), this.allowCreate && this.collectionName && (index.h("yoo-button", { size: this.size || 'medium', onClick: () => this.onCreate() }, index.h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: this.allowCreateIcon || 'plus' }))), index$1.isWeb(this.host) && (index.h("div", { ref: (el) => (this.itemsContainer = el), class: "items-container down animated fadeIn" }, index.h("div", { class: "scroll-container" }, index.h("yoo-ion-scroll", { forceOverscroll: false, onClick: (ev) => ev.stopPropagation() }, this.showDropdownContent && (index.h("yoo-grid", { ref: (el) => (this.webGrid = el), class: {
|
1003
1004
|
'no-margin no-text-break autocomplete autocomplete-selection-mode': true,
|
1004
1005
|
'empty-tags': ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) === 0 && this.allowCustomTag,
|
1005
1006
|
'expanding-grid': true,
|
@@ -142,10 +142,8 @@ function getRecapButton(host, validity, showPreview, isPreview, previewHandler,
|
|
142
142
|
});
|
143
143
|
}
|
144
144
|
else {
|
145
|
-
const startText = isPreview ? 'STARTPREVIEWING' : 'START';
|
146
|
-
const buttonText = index$1.isWeb(host) ? 'YOOBICNEXT' : startText;
|
147
145
|
buttons.push({
|
148
|
-
text: index$1.translate(
|
146
|
+
text: index$1.translate(index$1.isWeb(host) ? 'YOOBICNEXT' : isPreview ? 'STARTPREVIEWING' : 'START'),
|
149
147
|
color: 'app-color',
|
150
148
|
size: index$1.isWeb(host) ? 'medium' : 'large',
|
151
149
|
handler: () => startHandler()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { FormFieldType } from '@shared/interfaces';
|
2
2
|
import { findParent, getAsyncExtraData, getModalAnimation, getRandomFileName, groupsResolver, isImage, isIonic, isNullOrUndefined, isPresent, isValid, isWeb, MONGODB_ID_REGEX, resizeImage, showAlert, showModal, translate, translateMulti } from '@shared/utils';
|
3
3
|
import { h, Host } from '@stencil/core';
|
4
|
-
import { compact, isArray, isNumber, isString, uniq } from 'lodash-es';
|
4
|
+
import { compact, debounce, isArray, isNumber, isString, uniq } from 'lodash-es';
|
5
5
|
import { execHandlerAndStopEvent, getAppContext, showImageCropper } from '../../../utils/helpers/common-helpers';
|
6
6
|
import { getFormBottomPosition, setValidator, setValueAndValidateInput } from '../../../utils/helpers/form-input-helpers';
|
7
7
|
const AUTOCOMPLETE_DROPDOWN_HEIGHT = 272;
|
@@ -41,6 +41,7 @@ export class YooFormAutocompleteComponent {
|
|
41
41
|
this.currentPage = 0;
|
42
42
|
this.maxPage = 0;
|
43
43
|
this.infiniteScrollDisabled = false;
|
44
|
+
this.onInputContainerClickedDebounce = debounce(this.onInputContainerClicked, 500, { leading: true, trailing: false }).bind(this);
|
44
45
|
}
|
45
46
|
get iconSize() {
|
46
47
|
return ['small', 'medium'].includes(this.size) ? 'small' : 'medium';
|
@@ -978,7 +979,7 @@ export class YooFormAutocompleteComponent {
|
|
978
979
|
const minValuesForSearch = 4;
|
979
980
|
const hasValue = !isNullOrUndefined(this.value) && (!isArray(this.value) || this.value.length > 0);
|
980
981
|
const dynamicOrdering = this.dynamicOrdering !== false;
|
981
|
-
return (h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.
|
982
|
+
return (h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.onInputContainerClickedDebounce() }, this.renderSelectedContent()), this.allowEdit && this.collectionName && (h("yoo-button", { size: this.size || 'medium', onClick: () => this.onEdit(), disabled: !hasValue }, h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: "pen" }))), this.allowCreate && this.collectionName && (h("yoo-button", { size: this.size || 'medium', onClick: () => this.onCreate() }, h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: this.allowCreateIcon || 'plus' }))), isWeb(this.host) && (h("div", { ref: (el) => (this.itemsContainer = el), class: "items-container down animated fadeIn" }, h("div", { class: "scroll-container" }, h("yoo-ion-scroll", { forceOverscroll: false, onClick: (ev) => ev.stopPropagation() }, this.showDropdownContent && (h("yoo-grid", { ref: (el) => (this.webGrid = el), class: {
|
982
983
|
'no-margin no-text-break autocomplete autocomplete-selection-mode': true,
|
983
984
|
'empty-tags': ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) === 0 && this.allowCustomTag,
|
984
985
|
'expanding-grid': true,
|
@@ -130,10 +130,8 @@ export function getRecapButton(host, validity, showPreview, isPreview, previewHa
|
|
130
130
|
});
|
131
131
|
}
|
132
132
|
else {
|
133
|
-
const startText = isPreview ? 'STARTPREVIEWING' : 'START';
|
134
|
-
const buttonText = isWeb(host) ? 'YOOBICNEXT' : startText;
|
135
133
|
buttons.push({
|
136
|
-
text: translate(
|
134
|
+
text: translate(isWeb(host) ? 'YOOBICNEXT' : isPreview ? 'STARTPREVIEWING' : 'START'),
|
137
135
|
color: 'app-color',
|
138
136
|
size: isWeb(host) ? 'medium' : 'large',
|
139
137
|
handler: () => startHandler()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
|
2
2
|
import { c as FormFieldType } from './index-604330b3.js';
|
3
3
|
import './index-4c89561a.js';
|
4
|
-
import { i as isArray, n as compact, l as uniq, p as isString, a as isNumber } from './lodash-777f91de.js';
|
4
|
+
import { $ as debounce, i as isArray, n as compact, l as uniq, p as isString, a as isNumber } from './lodash-777f91de.js';
|
5
5
|
import { i as showImageCropper, h as execHandlerAndStopEvent, g as getAppContext } from './common-helpers-df7fce97.js';
|
6
6
|
import { s as setValidator, f as getFormBottomPosition, a as setValueAndValidateInput } from './form-input-helpers-4d6eb8fd.js';
|
7
7
|
import { k as isNullOrUndefined, aM as isPresent, aj as showAlert, t as translate, cC as isIonic, X as findParent, W as getAsyncExtraData, H as isWeb, G as showModal, F as getModalAnimation, f2 as isValid, am as isImage, f3 as resizeImage, f4 as getRandomFileName, eC as MONGODB_ID_REGEX, a3 as translateMulti, e3 as groupsResolver } from './index-d4f56653.js';
|
@@ -58,6 +58,7 @@ const YooFormAutocompleteComponent = class {
|
|
58
58
|
this.currentPage = 0;
|
59
59
|
this.maxPage = 0;
|
60
60
|
this.infiniteScrollDisabled = false;
|
61
|
+
this.onInputContainerClickedDebounce = debounce(this.onInputContainerClicked, 500, { leading: true, trailing: false }).bind(this);
|
61
62
|
}
|
62
63
|
get iconSize() {
|
63
64
|
return ['small', 'medium'].includes(this.size) ? 'small' : 'medium';
|
@@ -995,7 +996,7 @@ const YooFormAutocompleteComponent = class {
|
|
995
996
|
const minValuesForSearch = 4;
|
996
997
|
const hasValue = !isNullOrUndefined(this.value) && (!isArray(this.value) || this.value.length > 0);
|
997
998
|
const dynamicOrdering = this.dynamicOrdering !== false;
|
998
|
-
return (h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.
|
999
|
+
return (h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.onInputContainerClickedDebounce() }, this.renderSelectedContent()), this.allowEdit && this.collectionName && (h("yoo-button", { size: this.size || 'medium', onClick: () => this.onEdit(), disabled: !hasValue }, h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: "pen" }))), this.allowCreate && this.collectionName && (h("yoo-button", { size: this.size || 'medium', onClick: () => this.onCreate() }, h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: this.allowCreateIcon || 'plus' }))), isWeb(this.host) && (h("div", { ref: (el) => (this.itemsContainer = el), class: "items-container down animated fadeIn" }, h("div", { class: "scroll-container" }, h("yoo-ion-scroll", { forceOverscroll: false, onClick: (ev) => ev.stopPropagation() }, this.showDropdownContent && (h("yoo-grid", { ref: (el) => (this.webGrid = el), class: {
|
999
1000
|
'no-margin no-text-break autocomplete autocomplete-selection-mode': true,
|
1000
1001
|
'empty-tags': ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) === 0 && this.allowCustomTag,
|
1001
1002
|
'expanding-grid': true,
|
@@ -138,10 +138,8 @@ function getRecapButton(host, validity, showPreview, isPreview, previewHandler,
|
|
138
138
|
});
|
139
139
|
}
|
140
140
|
else {
|
141
|
-
const startText = isPreview ? 'STARTPREVIEWING' : 'START';
|
142
|
-
const buttonText = isWeb(host) ? 'YOOBICNEXT' : startText;
|
143
141
|
buttons.push({
|
144
|
-
text: translate(
|
142
|
+
text: translate(isWeb(host) ? 'YOOBICNEXT' : isPreview ? 'STARTPREVIEWING' : 'START'),
|
145
143
|
color: 'app-color',
|
146
144
|
size: isWeb(host) ? 'medium' : 'large',
|
147
145
|
handler: () => startHandler()
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, i as createEvent, h, e as Host, g as getElement } from './index-a6a92b3d.js';
|
2
2
|
import { c as FormFieldType } from './index-604330b3.js';
|
3
3
|
import './index-4c89561a.js';
|
4
|
-
import { i as isArray, n as compact, l as uniq, p as isString, a as isNumber } from './lodash-777f91de.js';
|
4
|
+
import { $ as debounce, i as isArray, n as compact, l as uniq, p as isString, a as isNumber } from './lodash-777f91de.js';
|
5
5
|
import { i as showImageCropper, h as execHandlerAndStopEvent, g as getAppContext } from './common-helpers-df7fce97.js';
|
6
6
|
import { s as setValidator, f as getFormBottomPosition, a as setValueAndValidateInput } from './form-input-helpers-4d6eb8fd.js';
|
7
7
|
import { k as isNullOrUndefined, aM as isPresent, aj as showAlert, t as translate, cC as isIonic, X as findParent, W as getAsyncExtraData, H as isWeb, G as showModal, F as getModalAnimation, f2 as isValid, am as isImage, f3 as resizeImage, f4 as getRandomFileName, eC as MONGODB_ID_REGEX, a3 as translateMulti, e3 as groupsResolver } from './index-d4f56653.js';
|
@@ -58,6 +58,7 @@ const YooFormAutocompleteComponent = class {
|
|
58
58
|
this.currentPage = 0;
|
59
59
|
this.maxPage = 0;
|
60
60
|
this.infiniteScrollDisabled = false;
|
61
|
+
this.onInputContainerClickedDebounce = debounce(this.onInputContainerClicked, 500, { leading: true, trailing: false }).bind(this);
|
61
62
|
}
|
62
63
|
get iconSize() {
|
63
64
|
return ['small', 'medium'].includes(this.size) ? 'small' : 'medium';
|
@@ -995,7 +996,7 @@ const YooFormAutocompleteComponent = class {
|
|
995
996
|
const minValuesForSearch = 4;
|
996
997
|
const hasValue = !isNullOrUndefined(this.value) && (!isArray(this.value) || this.value.length > 0);
|
997
998
|
const dynamicOrdering = this.dynamicOrdering !== false;
|
998
|
-
return (h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.
|
999
|
+
return (h("div", { class: { 'outer-container': true, columns: !!(this.allowCreate || (this.allowEdit && this.collectionName)) }, ref: (el) => (this.outerContainer = el) }, h("div", { ref: (el) => (this.inputContainer = el), class: { 'action-click input-container': true, multiple: this.isMultiple() }, onClick: () => this.onInputContainerClickedDebounce() }, this.renderSelectedContent()), this.allowEdit && this.collectionName && (h("yoo-button", { size: this.size || 'medium', onClick: () => this.onEdit(), disabled: !hasValue }, h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: "pen" }))), this.allowCreate && this.collectionName && (h("yoo-button", { size: this.size || 'medium', onClick: () => this.onCreate() }, h("yoo-icon", { size: this.size === 'large' ? 'medium' : 'small', name: this.allowCreateIcon || 'plus' }))), isWeb(this.host) && (h("div", { ref: (el) => (this.itemsContainer = el), class: "items-container down animated fadeIn" }, h("div", { class: "scroll-container" }, h("yoo-ion-scroll", { forceOverscroll: false, onClick: (ev) => ev.stopPropagation() }, this.showDropdownContent && (h("yoo-grid", { ref: (el) => (this.webGrid = el), class: {
|
999
1000
|
'no-margin no-text-break autocomplete autocomplete-selection-mode': true,
|
1000
1001
|
'empty-tags': ((_a = this.values) === null || _a === void 0 ? void 0 : _a.length) === 0 && this.allowCustomTag,
|
1001
1002
|
'expanding-grid': true,
|
@@ -138,10 +138,8 @@ function getRecapButton(host, validity, showPreview, isPreview, previewHandler,
|
|
138
138
|
});
|
139
139
|
}
|
140
140
|
else {
|
141
|
-
const startText = isPreview ? 'STARTPREVIEWING' : 'START';
|
142
|
-
const buttonText = isWeb(host) ? 'YOOBICNEXT' : startText;
|
143
141
|
buttons.push({
|
144
|
-
text: translate(
|
142
|
+
text: translate(isWeb(host) ? 'YOOBICNEXT' : isPreview ? 'STARTPREVIEWING' : 'START'),
|
145
143
|
color: 'app-color',
|
146
144
|
size: isWeb(host) ? 'medium' : 'large',
|
147
145
|
handler: () => startHandler()
|
@@ -139,6 +139,7 @@ export declare class YooFormAutocompleteComponent implements IFormAutocomplete<a
|
|
139
139
|
private fileUploader;
|
140
140
|
private fileUploaderData;
|
141
141
|
private infiniteScrollDisabled;
|
142
|
+
private onInputContainerClickedDebounce;
|
142
143
|
private get iconSize();
|
143
144
|
onWebAutocompleteOpened(): Promise<void>;
|
144
145
|
onNameChange(): Promise<void>;
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { FormFieldType, IButton, IFormField, ISlide, TBaseSize } from '@shared/interfaces';
|
2
|
-
import { IFormDynamicFieldState } from '
|
2
|
+
import { IFormDynamicFieldState } from './types';
|
3
3
|
export declare function getFieldState(field: IFormField, fieldsState: {
|
4
4
|
[key: string]: IFormDynamicFieldState;
|
5
5
|
}): IFormDynamicFieldState;
|