@yoobic/yobi 8.2.0-12 → 8.2.0-13
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 -0
- package/dist/cjs/yoo-form-catalog.cjs.entry.js +4 -2
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +2 -0
- package/dist/collection/components/form/form-catalog/form-catalog.js +4 -2
- package/dist/design-system/yoo-form-autocomplete.entry.js +2 -0
- package/dist/design-system/yoo-form-catalog.entry.js +4 -2
- package/dist/esm/yoo-form-autocomplete.entry.js +2 -0
- package/dist/esm/yoo-form-catalog.entry.js +4 -2
- package/package.json +1 -1
|
@@ -668,6 +668,7 @@ const YooFormAutocompleteComponent = class {
|
|
|
668
668
|
this.host.classList.remove('focused');
|
|
669
669
|
this.arrowIcon = 'arrow-down';
|
|
670
670
|
this.webAutocompleteClosed.emit(this.selection);
|
|
671
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
671
672
|
});
|
|
672
673
|
this.dialog.addEventListener('filterRadioToggled', (ev) => {
|
|
673
674
|
ev.stopPropagation();
|
|
@@ -692,6 +693,7 @@ const YooFormAutocompleteComponent = class {
|
|
|
692
693
|
this.host.classList.remove('focused');
|
|
693
694
|
this.arrowIcon = 'arrow-down';
|
|
694
695
|
this.webAutocompleteClosed.emit(this.selection);
|
|
696
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
695
697
|
}
|
|
696
698
|
async onItemSelect(ev) {
|
|
697
699
|
ev.stopPropagation();
|
|
@@ -285,7 +285,7 @@ const YooFormCatalogComponent = class {
|
|
|
285
285
|
const price = product.price * quantity;
|
|
286
286
|
return [
|
|
287
287
|
index.h("div", { class: "entity" }, index.h("yoo-entity", { onClick: () => this.onOpenCatalogDialog(product), class: "catalog-display no-border", isHistory: this.isHistory, displayType: "card-list", entityType: "products", item: product }), !readonly && (index.h("div", { class: "remove", onClick: () => this.clearProduct(product) }, index.h("yoo-icon", { name: "cross" })))),
|
|
288
|
-
!this.isPresence && (index.h("div", { class: { toolbar: true, history: this.isHistory } }, index.h("div", { class: "title" }, index$1.translate('QUANTITY'), ": "), readonly ? (quantity) : (index.h("yoo-form-number-picker", { key: ref, min:
|
|
288
|
+
!this.isPresence && (index.h("div", { class: { toolbar: true, history: this.isHistory } }, index.h("div", { class: "title" }, index$1.translate('QUANTITY'), ": "), readonly ? (quantity) : (index.h("yoo-form-number-picker", { key: ref, min: 1, stepAmount: product.step, value: quantity, required: true, clearable: false, useButtons: true, invalidMessage: product.step ? 'MIN_AND_STEP_VALUES' : null, onInputChanged: (ev) => {
|
|
289
289
|
ev.stopPropagation();
|
|
290
290
|
if (lodash.isNumber(ev.detail)) {
|
|
291
291
|
this.setProduct(product, ev.detail);
|
|
@@ -300,7 +300,9 @@ const YooFormCatalogComponent = class {
|
|
|
300
300
|
ev.stopPropagation();
|
|
301
301
|
}
|
|
302
302
|
renderEditable() {
|
|
303
|
-
return (index.h("div", { class: "outer-container" }, index.h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
303
|
+
return (index.h("div", { class: "outer-container" }, index.h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
304
|
+
// value={this.selectedProducts}
|
|
305
|
+
entityType: "products", displayType: "card-list", iconPrefix: "catalogue", onFetchData: (ev) => this.onFetchData(ev), onFetchFieldFilterData: (ev) => this.onFetchFieldFilterData(ev), onInputChanged: (ev) => this.onSelect(ev), onInputBlurred: (ev) => this.onInputBlurred(ev), onInputFocused: (ev) => this.onInputFocused(ev), onValidityChanged: (ev) => this.onAutoCompleteValidityChanged(ev), onWebAutocompleteClosed: (ev) => this.onWebAutocompleteClosed(ev), placeholder: index$1.translate('ADDPRODUCTTOBASKET'), tags: this.tags, isLocal: false, model: this.model, size: this.size }), !this.disableScanner && index.h("div", { class: "or" }, index$1.translate('YOOBICOR')), !this.disableScanner && index.h("yoo-form-barcode", { onInputChanged: (ev) => this.onScanned(ev), placeholder: index$1.translate('SCANPRODUCTTOBASKET'), hideValue: true }), !this.selectorMode && this.notFoundError ? index.h("div", { class: "error", innerHTML: this.notFoundError }) : null, this.isCheck ? null : this.renderProducts(false)));
|
|
304
306
|
}
|
|
305
307
|
renderHistory() {
|
|
306
308
|
return index.h("yoo-ion-scroll", { class: "relative" }, this.renderReadonly());
|
|
@@ -648,6 +648,7 @@ export class YooFormAutocompleteComponent {
|
|
|
648
648
|
this.host.classList.remove('focused');
|
|
649
649
|
this.arrowIcon = 'arrow-down';
|
|
650
650
|
this.webAutocompleteClosed.emit(this.selection);
|
|
651
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
651
652
|
});
|
|
652
653
|
this.dialog.addEventListener('filterRadioToggled', (ev) => {
|
|
653
654
|
ev.stopPropagation();
|
|
@@ -672,6 +673,7 @@ export class YooFormAutocompleteComponent {
|
|
|
672
673
|
this.host.classList.remove('focused');
|
|
673
674
|
this.arrowIcon = 'arrow-down';
|
|
674
675
|
this.webAutocompleteClosed.emit(this.selection);
|
|
676
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
675
677
|
}
|
|
676
678
|
async onItemSelect(ev) {
|
|
677
679
|
ev.stopPropagation();
|
|
@@ -285,7 +285,7 @@ export class YooFormCatalogComponent {
|
|
|
285
285
|
h("div", { class: "title" },
|
|
286
286
|
translate('QUANTITY'),
|
|
287
287
|
": "),
|
|
288
|
-
readonly ? (quantity) : (h("yoo-form-number-picker", { key: ref, min:
|
|
288
|
+
readonly ? (quantity) : (h("yoo-form-number-picker", { key: ref, min: 1, stepAmount: product.step, value: quantity, required: true, clearable: false, useButtons: true, invalidMessage: product.step ? 'MIN_AND_STEP_VALUES' : null, onInputChanged: (ev) => {
|
|
289
289
|
ev.stopPropagation();
|
|
290
290
|
if (isNumber(ev.detail)) {
|
|
291
291
|
this.setProduct(product, ev.detail);
|
|
@@ -304,7 +304,9 @@ export class YooFormCatalogComponent {
|
|
|
304
304
|
}
|
|
305
305
|
renderEditable() {
|
|
306
306
|
return (h("div", { class: "outer-container" },
|
|
307
|
-
h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
307
|
+
h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
308
|
+
// value={this.selectedProducts}
|
|
309
|
+
entityType: "products", displayType: "card-list", iconPrefix: "catalogue", onFetchData: (ev) => this.onFetchData(ev), onFetchFieldFilterData: (ev) => this.onFetchFieldFilterData(ev), onInputChanged: (ev) => this.onSelect(ev), onInputBlurred: (ev) => this.onInputBlurred(ev), onInputFocused: (ev) => this.onInputFocused(ev), onValidityChanged: (ev) => this.onAutoCompleteValidityChanged(ev), onWebAutocompleteClosed: (ev) => this.onWebAutocompleteClosed(ev), placeholder: translate('ADDPRODUCTTOBASKET'), tags: this.tags, isLocal: false, model: this.model, size: this.size }),
|
|
308
310
|
!this.disableScanner && h("div", { class: "or" }, translate('YOOBICOR')),
|
|
309
311
|
!this.disableScanner && h("yoo-form-barcode", { onInputChanged: (ev) => this.onScanned(ev), placeholder: translate('SCANPRODUCTTOBASKET'), hideValue: true }),
|
|
310
312
|
!this.selectorMode && this.notFoundError ? h("div", { class: "error", innerHTML: this.notFoundError }) : null,
|
|
@@ -664,6 +664,7 @@ const YooFormAutocompleteComponent = class {
|
|
|
664
664
|
this.host.classList.remove('focused');
|
|
665
665
|
this.arrowIcon = 'arrow-down';
|
|
666
666
|
this.webAutocompleteClosed.emit(this.selection);
|
|
667
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
667
668
|
});
|
|
668
669
|
this.dialog.addEventListener('filterRadioToggled', (ev) => {
|
|
669
670
|
ev.stopPropagation();
|
|
@@ -688,6 +689,7 @@ const YooFormAutocompleteComponent = class {
|
|
|
688
689
|
this.host.classList.remove('focused');
|
|
689
690
|
this.arrowIcon = 'arrow-down';
|
|
690
691
|
this.webAutocompleteClosed.emit(this.selection);
|
|
692
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
691
693
|
}
|
|
692
694
|
async onItemSelect(ev) {
|
|
693
695
|
ev.stopPropagation();
|
|
@@ -281,7 +281,7 @@ const YooFormCatalogComponent = class {
|
|
|
281
281
|
const price = product.price * quantity;
|
|
282
282
|
return [
|
|
283
283
|
h("div", { class: "entity" }, h("yoo-entity", { onClick: () => this.onOpenCatalogDialog(product), class: "catalog-display no-border", isHistory: this.isHistory, displayType: "card-list", entityType: "products", item: product }), !readonly && (h("div", { class: "remove", onClick: () => this.clearProduct(product) }, h("yoo-icon", { name: "cross" })))),
|
|
284
|
-
!this.isPresence && (h("div", { class: { toolbar: true, history: this.isHistory } }, h("div", { class: "title" }, translate('QUANTITY'), ": "), readonly ? (quantity) : (h("yoo-form-number-picker", { key: ref, min:
|
|
284
|
+
!this.isPresence && (h("div", { class: { toolbar: true, history: this.isHistory } }, h("div", { class: "title" }, translate('QUANTITY'), ": "), readonly ? (quantity) : (h("yoo-form-number-picker", { key: ref, min: 1, stepAmount: product.step, value: quantity, required: true, clearable: false, useButtons: true, invalidMessage: product.step ? 'MIN_AND_STEP_VALUES' : null, onInputChanged: (ev) => {
|
|
285
285
|
ev.stopPropagation();
|
|
286
286
|
if (isNumber(ev.detail)) {
|
|
287
287
|
this.setProduct(product, ev.detail);
|
|
@@ -296,7 +296,9 @@ const YooFormCatalogComponent = class {
|
|
|
296
296
|
ev.stopPropagation();
|
|
297
297
|
}
|
|
298
298
|
renderEditable() {
|
|
299
|
-
return (h("div", { class: "outer-container" }, h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
299
|
+
return (h("div", { class: "outer-container" }, h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
300
|
+
// value={this.selectedProducts}
|
|
301
|
+
entityType: "products", displayType: "card-list", iconPrefix: "catalogue", onFetchData: (ev) => this.onFetchData(ev), onFetchFieldFilterData: (ev) => this.onFetchFieldFilterData(ev), onInputChanged: (ev) => this.onSelect(ev), onInputBlurred: (ev) => this.onInputBlurred(ev), onInputFocused: (ev) => this.onInputFocused(ev), onValidityChanged: (ev) => this.onAutoCompleteValidityChanged(ev), onWebAutocompleteClosed: (ev) => this.onWebAutocompleteClosed(ev), placeholder: translate('ADDPRODUCTTOBASKET'), tags: this.tags, isLocal: false, model: this.model, size: this.size }), !this.disableScanner && h("div", { class: "or" }, translate('YOOBICOR')), !this.disableScanner && h("yoo-form-barcode", { onInputChanged: (ev) => this.onScanned(ev), placeholder: translate('SCANPRODUCTTOBASKET'), hideValue: true }), !this.selectorMode && this.notFoundError ? h("div", { class: "error", innerHTML: this.notFoundError }) : null, this.isCheck ? null : this.renderProducts(false)));
|
|
300
302
|
}
|
|
301
303
|
renderHistory() {
|
|
302
304
|
return h("yoo-ion-scroll", { class: "relative" }, this.renderReadonly());
|
|
@@ -664,6 +664,7 @@ const YooFormAutocompleteComponent = class {
|
|
|
664
664
|
this.host.classList.remove('focused');
|
|
665
665
|
this.arrowIcon = 'arrow-down';
|
|
666
666
|
this.webAutocompleteClosed.emit(this.selection);
|
|
667
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
667
668
|
});
|
|
668
669
|
this.dialog.addEventListener('filterRadioToggled', (ev) => {
|
|
669
670
|
ev.stopPropagation();
|
|
@@ -688,6 +689,7 @@ const YooFormAutocompleteComponent = class {
|
|
|
688
689
|
this.host.classList.remove('focused');
|
|
689
690
|
this.arrowIcon = 'arrow-down';
|
|
690
691
|
this.webAutocompleteClosed.emit(this.selection);
|
|
692
|
+
this.entityType === 'products' && (this.setValue([]));
|
|
691
693
|
}
|
|
692
694
|
async onItemSelect(ev) {
|
|
693
695
|
ev.stopPropagation();
|
|
@@ -281,7 +281,7 @@ const YooFormCatalogComponent = class {
|
|
|
281
281
|
const price = product.price * quantity;
|
|
282
282
|
return [
|
|
283
283
|
h("div", { class: "entity" }, h("yoo-entity", { onClick: () => this.onOpenCatalogDialog(product), class: "catalog-display no-border", isHistory: this.isHistory, displayType: "card-list", entityType: "products", item: product }), !readonly && (h("div", { class: "remove", onClick: () => this.clearProduct(product) }, h("yoo-icon", { name: "cross" })))),
|
|
284
|
-
!this.isPresence && (h("div", { class: { toolbar: true, history: this.isHistory } }, h("div", { class: "title" }, translate('QUANTITY'), ": "), readonly ? (quantity) : (h("yoo-form-number-picker", { key: ref, min:
|
|
284
|
+
!this.isPresence && (h("div", { class: { toolbar: true, history: this.isHistory } }, h("div", { class: "title" }, translate('QUANTITY'), ": "), readonly ? (quantity) : (h("yoo-form-number-picker", { key: ref, min: 1, stepAmount: product.step, value: quantity, required: true, clearable: false, useButtons: true, invalidMessage: product.step ? 'MIN_AND_STEP_VALUES' : null, onInputChanged: (ev) => {
|
|
285
285
|
ev.stopPropagation();
|
|
286
286
|
if (isNumber(ev.detail)) {
|
|
287
287
|
this.setProduct(product, ev.detail);
|
|
@@ -296,7 +296,9 @@ const YooFormCatalogComponent = class {
|
|
|
296
296
|
ev.stopPropagation();
|
|
297
297
|
}
|
|
298
298
|
renderEditable() {
|
|
299
|
-
return (h("div", { class: "outer-container" }, h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
299
|
+
return (h("div", { class: "outer-container" }, h("yoo-form-autocomplete", { ref: (el) => (this.formAutocomplete = el), multiple: !this.isCheck,
|
|
300
|
+
// value={this.selectedProducts}
|
|
301
|
+
entityType: "products", displayType: "card-list", iconPrefix: "catalogue", onFetchData: (ev) => this.onFetchData(ev), onFetchFieldFilterData: (ev) => this.onFetchFieldFilterData(ev), onInputChanged: (ev) => this.onSelect(ev), onInputBlurred: (ev) => this.onInputBlurred(ev), onInputFocused: (ev) => this.onInputFocused(ev), onValidityChanged: (ev) => this.onAutoCompleteValidityChanged(ev), onWebAutocompleteClosed: (ev) => this.onWebAutocompleteClosed(ev), placeholder: translate('ADDPRODUCTTOBASKET'), tags: this.tags, isLocal: false, model: this.model, size: this.size }), !this.disableScanner && h("div", { class: "or" }, translate('YOOBICOR')), !this.disableScanner && h("yoo-form-barcode", { onInputChanged: (ev) => this.onScanned(ev), placeholder: translate('SCANPRODUCTTOBASKET'), hideValue: true }), !this.selectorMode && this.notFoundError ? h("div", { class: "error", innerHTML: this.notFoundError }) : null, this.isCheck ? null : this.renderProducts(false)));
|
|
300
302
|
}
|
|
301
303
|
renderHistory() {
|
|
302
304
|
return h("yoo-ion-scroll", { class: "relative" }, this.renderReadonly());
|