@yoobic/yobi 7.7.98 → 7.7.102
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/{grid-renderers-dacdc474.js → grid-renderers-450b84ec.js} +38 -8
- package/dist/cjs/{image-helpers-ea15b526.js → image-helpers-3385fd6f.js} +2 -2
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/yoo-action-sheet-controller_15.cjs.entry.js +1 -1
- package/dist/cjs/yoo-ag-grid_96.cjs.entry.js +3 -2
- package/dist/cjs/yoo-avatar_5.cjs.entry.js +1 -1
- package/dist/cjs/yoo-card-header.cjs.entry.js +1 -1
- package/dist/cjs/yoo-card-list-image_12.cjs.entry.js +2 -2
- package/dist/cjs/yoo-form-text-editor.cjs.entry.js +1 -1
- package/dist/cjs/yoo-gridstack.cjs.entry.js +17 -2
- package/dist/cjs/yoo-mission-results.cjs.entry.js +1 -1
- package/dist/cjs/yoo-podium.cjs.entry.js +1 -1
- package/dist/cjs/yoo-walkthrough.cjs.entry.js +1 -1
- package/dist/collection/components/app-operations/mission-results/mission-results.js +1 -1
- package/dist/collection/components/form/form-text-editor/form-text-editor.js +1 -1
- package/dist/collection/components/grid/ag-grid/grid-renderers.js +38 -8
- package/dist/collection/components/grid/grid/grid.js +1 -0
- package/dist/collection/components/grid/gridstack/gridstack.js +18 -3
- package/dist/collection/utils/helpers/image-helpers.js +2 -2
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/index.esm.js +1 -1
- package/dist/design-system/{p-83aa89ad.entry.js → p-0cd448c7.entry.js} +1 -1
- package/dist/design-system/{p-4ef0efa6.entry.js → p-20a39c64.entry.js} +2 -2
- package/dist/design-system/p-2752aa83.js +1 -0
- package/dist/design-system/{p-e70980f6.entry.js → p-2d017575.entry.js} +1 -1
- package/dist/design-system/{p-7fcd0596.entry.js → p-405c25ba.entry.js} +1 -1
- package/dist/design-system/{p-af4cfea4.entry.js → p-4ae66a1f.entry.js} +1 -1
- package/dist/design-system/p-be2ae101.entry.js +1 -0
- package/dist/design-system/{p-cb9c30a3.entry.js → p-c4f7294a.entry.js} +1 -1
- package/dist/design-system/p-cdfab8ed.js +1 -0
- package/dist/design-system/{p-6470e707.entry.js → p-cf343c67.entry.js} +1 -1
- package/dist/design-system/{p-59f99c7c.entry.js → p-d35b0a54.entry.js} +1 -1
- package/dist/design-system/{p-d74f2bbf.entry.js → p-e89f690e.entry.js} +1 -1
- package/dist/esm/{grid-renderers-f81f061f.js → grid-renderers-725cb52a.js} +38 -8
- package/dist/esm/{image-helpers-6b281c05.js → image-helpers-2f8f9d5d.js} +2 -2
- package/dist/esm/index.js +1 -1
- package/dist/esm/yoo-action-sheet-controller_15.entry.js +1 -1
- package/dist/esm/yoo-ag-grid_96.entry.js +3 -2
- package/dist/esm/yoo-avatar_5.entry.js +1 -1
- package/dist/esm/yoo-card-header.entry.js +1 -1
- package/dist/esm/yoo-card-list-image_12.entry.js +2 -2
- package/dist/esm/yoo-form-text-editor.entry.js +1 -1
- package/dist/esm/yoo-gridstack.entry.js +17 -2
- package/dist/esm/yoo-mission-results.entry.js +1 -1
- package/dist/esm/yoo-podium.entry.js +1 -1
- package/dist/esm/yoo-walkthrough.entry.js +1 -1
- 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 -1
- package/package.json +1 -1
- package/dist/design-system/p-486e9464.js +0 -1
- package/dist/design-system/p-6871e6b7.entry.js +0 -1
- package/dist/design-system/p-6cfa75b3.js +0 -1
|
@@ -24,6 +24,9 @@ const imageStyle = {
|
|
|
24
24
|
height: '2rem'
|
|
25
25
|
};
|
|
26
26
|
const roundedImageStyle = Object.assign(Object.assign({}, imageStyle), { border: `1px solid ${rrule.getCssColor('stable-40')}`, 'border-radius': '50%' });
|
|
27
|
+
function isCSVOrExcel(params) {
|
|
28
|
+
return (params === null || params === void 0 ? void 0 : params.type) === 'excel' || (params === null || params === void 0 ? void 0 : params.type) === 'csv';
|
|
29
|
+
}
|
|
27
30
|
function defaultRenderer(params) {
|
|
28
31
|
var _a;
|
|
29
32
|
let retVal = params.value || '';
|
|
@@ -400,7 +403,7 @@ function photoRenderer(params) {
|
|
|
400
403
|
return '';
|
|
401
404
|
}
|
|
402
405
|
function multiphotoRenderer(params) {
|
|
403
|
-
const photos = params.value;
|
|
406
|
+
const photos = rrule.compact([].concat(params.value));
|
|
404
407
|
if (photos && rrule.isArray(photos) && photos.length > 0) {
|
|
405
408
|
//return photos.map((photo) => `<yoo-img style="${getStyle(roundedImageStyle)}" src="${photo || ''}" />`).join(' ');
|
|
406
409
|
const container = document.createElement('div');
|
|
@@ -421,6 +424,27 @@ function multiphotoRenderer(params) {
|
|
|
421
424
|
}
|
|
422
425
|
return '';
|
|
423
426
|
}
|
|
427
|
+
function imageRenderer(params) {
|
|
428
|
+
var _a, _b, _c;
|
|
429
|
+
let photos = [];
|
|
430
|
+
const colDef = (_a = params.column) === null || _a === void 0 ? void 0 : _a.getColDef();
|
|
431
|
+
photos = rrule.compact([].concat((_c = (_b = colDef) === null || _b === void 0 ? void 0 : _b.fieldDefinition) === null || _c === void 0 ? void 0 : _c.imagesCarousel));
|
|
432
|
+
if (photos && rrule.isArray(photos) && photos.length > 0) {
|
|
433
|
+
//return photos.map((photo) => `<yoo-img style="${getStyle(roundedImageStyle)}" src="${photo || ''}" />`).join(' ');
|
|
434
|
+
const container = document.createElement('div');
|
|
435
|
+
container.style.display = 'inherit';
|
|
436
|
+
photos.forEach((photo) => {
|
|
437
|
+
const img = document.createElement('yoo-img');
|
|
438
|
+
keys.keys(roundedImageStyle).forEach((k) => {
|
|
439
|
+
img.style[k] = roundedImageStyle[k];
|
|
440
|
+
});
|
|
441
|
+
img.src = photo;
|
|
442
|
+
container.appendChild(img);
|
|
443
|
+
});
|
|
444
|
+
return container;
|
|
445
|
+
}
|
|
446
|
+
return '';
|
|
447
|
+
}
|
|
424
448
|
function videoRenderer(params) {
|
|
425
449
|
return '<video class="ag-cell-image video" [src]="' + params.value + '"></video>';
|
|
426
450
|
}
|
|
@@ -594,13 +618,16 @@ function catalogRenderer(params) {
|
|
|
594
618
|
return formCatalog;
|
|
595
619
|
}
|
|
596
620
|
function documentRenderer(params) {
|
|
621
|
+
var _a, _b, _c;
|
|
597
622
|
let documents = [];
|
|
598
|
-
|
|
599
|
-
|
|
623
|
+
const colDef = (_a = params.column) === null || _a === void 0 ? void 0 : _a.getColDef();
|
|
624
|
+
if (((_c = (_b = colDef) === null || _b === void 0 ? void 0 : _b.fieldDefinition) === null || _c === void 0 ? void 0 : _c.type) === inputBar_interface.FormFieldType.document) {
|
|
625
|
+
documents = rrule.compact([].concat(colDef.fieldDefinition.document));
|
|
600
626
|
}
|
|
601
627
|
else {
|
|
602
628
|
documents = rrule.compact([].concat(params.value));
|
|
603
629
|
}
|
|
630
|
+
documents = documents.filter((d) => !!d._downloadURL);
|
|
604
631
|
const wrapper = document.createElement('div');
|
|
605
632
|
wrapper.classList.add('col');
|
|
606
633
|
if (documents.length > 0) {
|
|
@@ -612,8 +639,9 @@ function documentRenderer(params) {
|
|
|
612
639
|
formDocument.showActionSheet = false;
|
|
613
640
|
wrapper.appendChild(formDocument);
|
|
614
641
|
});
|
|
642
|
+
return isCSVOrExcel(params) ? documents.map((d) => d._downloadURL).join(',') : wrapper;
|
|
615
643
|
}
|
|
616
|
-
return
|
|
644
|
+
return '';
|
|
617
645
|
}
|
|
618
646
|
function pricecheckRenderer(params) {
|
|
619
647
|
const value = params.value;
|
|
@@ -636,7 +664,7 @@ function buttonRenderer(params) {
|
|
|
636
664
|
return '';
|
|
637
665
|
}
|
|
638
666
|
function missionValidationRenderer(params) {
|
|
639
|
-
var _a, _b
|
|
667
|
+
var _a, _b;
|
|
640
668
|
const value = params.value;
|
|
641
669
|
let status = '';
|
|
642
670
|
if (params.node && params.node.data) {
|
|
@@ -655,10 +683,10 @@ function missionValidationRenderer(params) {
|
|
|
655
683
|
if (((_a = params === null || params === void 0 ? void 0 : params.node) === null || _a === void 0 ? void 0 : _a.group) && ((_b = params === null || params === void 0 ? void 0 : params.colDef) === null || _b === void 0 ? void 0 : _b.cellRenderer) === 'group') {
|
|
656
684
|
retVal = `<yoo-tag color="stable">${rrule.translate('N/A')}</yoo-tag>`;
|
|
657
685
|
}
|
|
658
|
-
return (
|
|
686
|
+
return isCSVOrExcel(params) ? stripHtml(retVal) : retVal;
|
|
659
687
|
}
|
|
660
688
|
function missionStatusRenderer(params) {
|
|
661
|
-
var _a, _b, _c
|
|
689
|
+
var _a, _b, _c;
|
|
662
690
|
let tag;
|
|
663
691
|
let retVal = '';
|
|
664
692
|
if ((_a = params.data) === null || _a === void 0 ? void 0 : _a.hasWorkflow) {
|
|
@@ -688,7 +716,7 @@ function missionStatusRenderer(params) {
|
|
|
688
716
|
retVal = `<div class="not-center-container"><yoo-tag color="accent">${rrule.translate('AVAILABLE')}</yoo-tag></div>`;
|
|
689
717
|
}
|
|
690
718
|
retVal = retVal ? retVal : value ? value.toString() : retVal || '';
|
|
691
|
-
return (
|
|
719
|
+
return isCSVOrExcel(params) ? stripHtml(retVal) : retVal;
|
|
692
720
|
}
|
|
693
721
|
function salesAIQuantityRenderer(params) {
|
|
694
722
|
const value = params.value;
|
|
@@ -1130,6 +1158,8 @@ function getRenderer(renderer) {
|
|
|
1130
1158
|
return photoRenderer;
|
|
1131
1159
|
case 'multiphotoRenderer':
|
|
1132
1160
|
return multiphotoRenderer;
|
|
1161
|
+
case 'imageRenderer':
|
|
1162
|
+
return imageRenderer;
|
|
1133
1163
|
case 'videoRenderer':
|
|
1134
1164
|
return videoRenderer;
|
|
1135
1165
|
case 'starratingRenderer':
|
|
@@ -6,11 +6,11 @@ const index = require('./index-e2b47ee9.js');
|
|
|
6
6
|
|
|
7
7
|
async function getImageSize(src, onErr) {
|
|
8
8
|
const img = new Image();
|
|
9
|
-
if (src
|
|
9
|
+
if (src) {
|
|
10
10
|
img.src = rrule.isCloudinaryLink(src) ? new rrule.Cloudinary(src).quality('low').getUrl() : src;
|
|
11
11
|
await new Promise((resolve, reject) => {
|
|
12
12
|
img.onload = () => resolve(img.width);
|
|
13
|
-
img.onerror = () => reject(onErr === null || onErr === void 0 ? void 0 : onErr());
|
|
13
|
+
img.onerror = () => index.isImageUrl(src) || index.isBase64(src) && reject(onErr === null || onErr === void 0 ? void 0 : onErr());
|
|
14
14
|
});
|
|
15
15
|
}
|
|
16
16
|
return {
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -22,7 +22,7 @@ const formHelpers = require('./form-helpers-ec3c2d29.js');
|
|
|
22
22
|
const formInputHelpers = require('./form-input-helpers-9e98c0e6.js');
|
|
23
23
|
const formTextAreaHelpers = require('./form-text-area-helpers-01944f5d.js');
|
|
24
24
|
const geolocationHelpers = require('./geolocation-helpers-0f3560f5.js');
|
|
25
|
-
const imageHelpers = require('./image-helpers-
|
|
25
|
+
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
26
26
|
const incentiveHelpers = require('./incentive-helpers-99fce167.js');
|
|
27
27
|
const mapHelpers = require('./map-helpers-021bd715.js');
|
|
28
28
|
const observerHelpers = require('./observer-helpers-b02f15af.js');
|
|
@@ -28,7 +28,7 @@ const isString = require('./isString-ecd0cbf4.js');
|
|
|
28
28
|
const _createAggregator = require('./_createAggregator-c627b114.js');
|
|
29
29
|
const get = require('./get-91c14783.js');
|
|
30
30
|
const formInputHelpers = require('./form-input-helpers-9e98c0e6.js');
|
|
31
|
-
const gridRenderers = require('./grid-renderers-
|
|
31
|
+
const gridRenderers = require('./grid-renderers-450b84ec.js');
|
|
32
32
|
const localForage = require('./localForage-82b6f557.js');
|
|
33
33
|
const dimensionsHelpers = require('./dimensions-helpers-54685523.js');
|
|
34
34
|
require('./isUndefined-8f9cfd10.js');
|
|
@@ -7,7 +7,7 @@ const rrule = require('./rrule-f8e7fec2.js');
|
|
|
7
7
|
const inputBar_interface = require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
const ResizeObserver_es = require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
9
|
const commonHelpers = require('./common-helpers-797be2a6.js');
|
|
10
|
-
const gridRenderers = require('./grid-renderers-
|
|
10
|
+
const gridRenderers = require('./grid-renderers-450b84ec.js');
|
|
11
11
|
const identity$4 = require('./identity-8189b2e1.js');
|
|
12
12
|
const isNumber$1 = require('./isNumber-4c1ace60.js');
|
|
13
13
|
const formHelpers = require('./form-helpers-ec3c2d29.js');
|
|
@@ -67,7 +67,7 @@ const sortable_esm = require('./sortable.esm-71f9713d.js');
|
|
|
67
67
|
const map$1 = require('./map-363505c4.js');
|
|
68
68
|
const isBoolean = require('./isBoolean-d41e779d.js');
|
|
69
69
|
const theme = require('./theme-e757b365.js');
|
|
70
|
-
const imageHelpers = require('./image-helpers-
|
|
70
|
+
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
71
71
|
const annotationsHelpers = require('./annotations-helpers-558ceb1e.js');
|
|
72
72
|
const draggableDotsHelpers = require('./draggable-dots-helpers-9650a4b7.js');
|
|
73
73
|
const inRange = require('./inRange-009d0389.js');
|
|
@@ -130180,6 +130180,7 @@ const YooGridComponent = class {
|
|
|
130180
130180
|
setTimeout(() => this.updateGridSelectAllState(), 500);
|
|
130181
130181
|
}
|
|
130182
130182
|
else {
|
|
130183
|
+
this.isFirstLoadAfterDisconnect = false;
|
|
130183
130184
|
this.fetchData.emit({
|
|
130184
130185
|
search: this.searchText,
|
|
130185
130186
|
currentPage,
|
|
@@ -10,7 +10,7 @@ const index$1 = require('./index-e2b47ee9.js');
|
|
|
10
10
|
const localForage = require('./localForage-82b6f557.js');
|
|
11
11
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
12
12
|
const commonHelpers = require('./common-helpers-797be2a6.js');
|
|
13
|
-
const imageHelpers = require('./image-helpers-
|
|
13
|
+
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
14
14
|
const observerHelpers = require('./observer-helpers-b02f15af.js');
|
|
15
15
|
const colorHelpers = require('./color-helpers-9f67677e.js');
|
|
16
16
|
require('./toInteger-31800ffe.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-fd52e687.js');
|
|
|
6
6
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
|
-
const imageHelpers = require('./image-helpers-
|
|
9
|
+
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
10
10
|
require('./isUndefined-8f9cfd10.js');
|
|
11
11
|
require('./isNumber-4c1ace60.js');
|
|
12
12
|
require('./index-e2b47ee9.js');
|
|
@@ -15,8 +15,8 @@ const formInputHelpers = require('./form-input-helpers-9e98c0e6.js');
|
|
|
15
15
|
const get = require('./get-91c14783.js');
|
|
16
16
|
const annotationsHelpers = require('./annotations-helpers-558ceb1e.js');
|
|
17
17
|
const dimensionsHelpers = require('./dimensions-helpers-54685523.js');
|
|
18
|
-
const imageHelpers = require('./image-helpers-
|
|
19
|
-
const gridRenderers = require('./grid-renderers-
|
|
18
|
+
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
19
|
+
const gridRenderers = require('./grid-renderers-450b84ec.js');
|
|
20
20
|
const debounce = require('./debounce-fda84c7b.js');
|
|
21
21
|
const cloneDeep = require('./cloneDeep-e00dc6ae.js');
|
|
22
22
|
const assign = require('./assign-bc4598ad.js');
|
|
@@ -7155,7 +7155,7 @@ const YooFormTextEditorComponent = class {
|
|
|
7155
7155
|
const baseUploadURL = await rrule.getAsyncExtraData({ type: 'upload-api' });
|
|
7156
7156
|
try {
|
|
7157
7157
|
this.editor = new froala_editor_min(this.containerEl, {
|
|
7158
|
-
key: '
|
|
7158
|
+
key: 'vYA6mB4F4H5B3H4A10dNSWXf1h1MDb1CF1PLPFf1C1EESFKVlA3C11A8D6D2C4E4G2C3H3==',
|
|
7159
7159
|
theme: rrule.isDarkTheme() ? 'dark' : 'royal',
|
|
7160
7160
|
toolbarSticky: false,
|
|
7161
7161
|
requestHeaders: {
|
|
@@ -4801,9 +4801,11 @@ const YooGridstackComponent = class {
|
|
|
4801
4801
|
}
|
|
4802
4802
|
delete this.containerEl.gridstack;
|
|
4803
4803
|
this.grid = gridstack.GridStack.init({
|
|
4804
|
+
auto: false,
|
|
4804
4805
|
column: this.column || 12,
|
|
4805
4806
|
animate: true,
|
|
4806
4807
|
disableOneColumnMode: this.forceOneColumn !== true,
|
|
4808
|
+
oneColumnModeDomSort: false,
|
|
4807
4809
|
cellHeight: this.cellHeight || 'auto',
|
|
4808
4810
|
margin: this.itemMargin,
|
|
4809
4811
|
acceptWidgets: '.ui-draggable',
|
|
@@ -4867,10 +4869,23 @@ const YooGridstackComponent = class {
|
|
|
4867
4869
|
}
|
|
4868
4870
|
}
|
|
4869
4871
|
renderConfig() {
|
|
4870
|
-
var _a;
|
|
4871
4872
|
this.grid.removeAll(true);
|
|
4872
4873
|
this.grid.batchUpdate();
|
|
4873
|
-
|
|
4874
|
+
let finalConfig = this.config;
|
|
4875
|
+
if (this.column === 1 && (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.length) > 0) {
|
|
4876
|
+
finalConfig = gridstack.Utils.sort(this.config, 1, this.column);
|
|
4877
|
+
finalConfig.forEach((v, i) => {
|
|
4878
|
+
if (i === 0) {
|
|
4879
|
+
v.y = 0;
|
|
4880
|
+
v.x = 0;
|
|
4881
|
+
}
|
|
4882
|
+
else {
|
|
4883
|
+
v.x = 0;
|
|
4884
|
+
v.y = finalConfig[i - 1].y + finalConfig[i - 1].h;
|
|
4885
|
+
}
|
|
4886
|
+
});
|
|
4887
|
+
}
|
|
4888
|
+
finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.forEach((item) => {
|
|
4874
4889
|
const isHidden = !!this.hiddenWidgets.find((i) => i.id === item.id);
|
|
4875
4890
|
const el = this.grid.addWidget(this.getItemTemplate(item, isHidden), cloneDeep.cloneDeep(item));
|
|
4876
4891
|
if (isHidden) {
|
|
@@ -126,7 +126,7 @@ const YooMissionResultsComponent = class {
|
|
|
126
126
|
return this.mission ? (index.h("div", { class: Object.assign({ 'mission-results': true, pdf: this.isPdf }, commonHelpers.getAppContext(this.host)) }, this.isPdf && (index.h("div", { class: "header-photo-container" }, ((_h = (_g = this.mission) === null || _g === void 0 ? void 0 : _g.description) === null || _h === void 0 ? void 0 : _h.pdfHeaderPhoto) && index.h("yoo-img", { class: "header-photo", src: this.mission.description.pdfHeaderPhoto }), index.h("div", { class: "header-content" }, index.h("div", { class: "title" }, rrule.translateMulti((_j = this.mission) === null || _j === void 0 ? void 0 : _j.title)), index.h("div", { class: "subtitle" }, (_k = this.mission) === null || _k === void 0 ? void 0 : _k.address), index.h("div", { class: "tag-container" }, showInformation &&
|
|
127
127
|
(tags === null || tags === void 0 ? void 0 : tags.map((tag) => {
|
|
128
128
|
return index.h("yoo-tag", { color: tag.color, customColor: tag.customColor, innerHTML: tag.innerHTML });
|
|
129
|
-
})))))), index.h("div", { class: "content" }, !this.isPdf && showInformation && index.h("yoo-mission-heading", { isPdf: this.isPdf, mission: this.mission }), index.h("ul", { class: { menu: true, pdf: this.isPdf } }, !this.isPdf && !isStoreManager && (this.mission.location || this.mission.address) ? this.renderMissionLocation() : null, ((_m = (_l = this.mission) === null || _l === void 0 ? void 0 : _l.aisle) === null || _m === void 0 ? void 0 : _m.title) ? this.renderMissionAisle() : null, showInformation && this.mission.ownerDisplayName ? this.renderMissionOwner() : null, !showInformation || this.mission.skipValidation ? null : this.renderMissionValidator(), showInformation && this.renderPriority(), this.mission.type === 'visit' && this.mission.visitType ? this.renderVisitType() : null, this.mission.type === 'visit' ? this.renderVisitDescription() : null, !rrule.getSession().isExternal && this.mission.workflowHistory && ((_q = (_p = (_o = this.mission) === null || _o === void 0 ? void 0 : _o.description) === null || _p === void 0 ? void 0 : _p.workflow) === null || _q === void 0 ? void 0 : _q.steps) && this.renderWorkflowHistory(), this.renderUnvalidatedReason(), showAudit && this.renderAudit()), showScore && index.h("yoo-mission-score", { isPdf: this.isPdf, charts: this.charts, networkScore: this.networkScore })))) : null;
|
|
129
|
+
})))))), index.h("div", { class: "content" }, !this.isPdf && showInformation && index.h("yoo-mission-heading", { isPdf: this.isPdf, mission: this.mission }), index.h("ul", { class: { menu: true, pdf: this.isPdf } }, !this.isPdf && !isStoreManager && (this.mission.location || this.mission.address) ? this.renderMissionLocation() : null, ((_m = (_l = this.mission) === null || _l === void 0 ? void 0 : _l.aisle) === null || _m === void 0 ? void 0 : _m.title) ? this.renderMissionAisle() : null, showInformation && this.mission.ownerDisplayName ? this.renderMissionOwner() : null, !showInformation || this.mission.skipValidation ? null : this.renderMissionValidator(), showInformation && this.renderPriority(), this.mission.type === 'visit' && this.mission.visitType ? this.renderVisitType() : null, this.mission.type === 'visit' ? this.renderVisitDescription() : null, !rrule.getSession().isExternal && this.mission.workflowHistory && ((_q = (_p = (_o = this.mission) === null || _o === void 0 ? void 0 : _o.description) === null || _p === void 0 ? void 0 : _p.workflow) === null || _q === void 0 ? void 0 : _q.steps) && this.renderWorkflowHistory(), showInformation && this.renderUnvalidatedReason(), showAudit && this.renderAudit()), showScore && index.h("yoo-mission-score", { isPdf: this.isPdf, charts: this.charts, networkScore: this.networkScore })))) : null;
|
|
130
130
|
}
|
|
131
131
|
get host() { return index.getElement(this); }
|
|
132
132
|
};
|
|
@@ -7,7 +7,7 @@ const rrule = require('./rrule-f8e7fec2.js');
|
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
9
|
const commonHelpers = require('./common-helpers-797be2a6.js');
|
|
10
|
-
const imageHelpers = require('./image-helpers-
|
|
10
|
+
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
11
11
|
const isNumber = require('./isNumber-4c1ace60.js');
|
|
12
12
|
const get = require('./get-91c14783.js');
|
|
13
13
|
require('./isUndefined-8f9cfd10.js');
|
|
@@ -6,7 +6,7 @@ const index = require('./index-fd52e687.js');
|
|
|
6
6
|
const rrule = require('./rrule-f8e7fec2.js');
|
|
7
7
|
require('./input-bar.interface-b96b7107.js');
|
|
8
8
|
require('./ResizeObserver.es-2edf4ecd.js');
|
|
9
|
-
const imageHelpers = require('./image-helpers-
|
|
9
|
+
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
10
10
|
require('./isUndefined-8f9cfd10.js');
|
|
11
11
|
require('./isNumber-4c1ace60.js');
|
|
12
12
|
require('./index-e2b47ee9.js');
|
|
@@ -214,7 +214,7 @@ export class YooMissionResultsComponent {
|
|
|
214
214
|
this.mission.type === 'visit' && this.mission.visitType ? this.renderVisitType() : null,
|
|
215
215
|
this.mission.type === 'visit' ? this.renderVisitDescription() : null,
|
|
216
216
|
!getSession().isExternal && this.mission.workflowHistory && ((_q = (_p = (_o = this.mission) === null || _o === void 0 ? void 0 : _o.description) === null || _p === void 0 ? void 0 : _p.workflow) === null || _q === void 0 ? void 0 : _q.steps) && this.renderWorkflowHistory(),
|
|
217
|
-
this.renderUnvalidatedReason(),
|
|
217
|
+
showInformation && this.renderUnvalidatedReason(),
|
|
218
218
|
showAudit && this.renderAudit()),
|
|
219
219
|
showScore && h("yoo-mission-score", { isPdf: this.isPdf, charts: this.charts, networkScore: this.networkScore })))) : null;
|
|
220
220
|
}
|
|
@@ -133,7 +133,7 @@ export class YooFormTextEditorComponent {
|
|
|
133
133
|
const baseUploadURL = await getAsyncExtraData({ type: 'upload-api' });
|
|
134
134
|
try {
|
|
135
135
|
this.editor = new FroalaEditor(this.containerEl, {
|
|
136
|
-
key: '
|
|
136
|
+
key: 'vYA6mB4F4H5B3H4A10dNSWXf1h1MDb1CF1PLPFf1C1EESFKVlA3C11A8D6D2C4E4G2C3H3==',
|
|
137
137
|
theme: isDarkTheme() ? 'dark' : 'royal',
|
|
138
138
|
toolbarSticky: false,
|
|
139
139
|
requestHeaders: {
|
|
@@ -7,6 +7,9 @@ const imageStyle = {
|
|
|
7
7
|
height: '2rem'
|
|
8
8
|
};
|
|
9
9
|
const roundedImageStyle = Object.assign(Object.assign({}, imageStyle), { border: `1px solid ${getCssColor('stable-40')}`, 'border-radius': '50%' });
|
|
10
|
+
function isCSVOrExcel(params) {
|
|
11
|
+
return (params === null || params === void 0 ? void 0 : params.type) === 'excel' || (params === null || params === void 0 ? void 0 : params.type) === 'csv';
|
|
12
|
+
}
|
|
10
13
|
function defaultRenderer(params) {
|
|
11
14
|
var _a;
|
|
12
15
|
let retVal = params.value || '';
|
|
@@ -383,7 +386,7 @@ function photoRenderer(params) {
|
|
|
383
386
|
return '';
|
|
384
387
|
}
|
|
385
388
|
function multiphotoRenderer(params) {
|
|
386
|
-
const photos = params.value;
|
|
389
|
+
const photos = compact([].concat(params.value));
|
|
387
390
|
if (photos && isArray(photos) && photos.length > 0) {
|
|
388
391
|
//return photos.map((photo) => `<yoo-img style="${getStyle(roundedImageStyle)}" src="${photo || ''}" />`).join(' ');
|
|
389
392
|
const container = document.createElement('div');
|
|
@@ -404,6 +407,27 @@ function multiphotoRenderer(params) {
|
|
|
404
407
|
}
|
|
405
408
|
return '';
|
|
406
409
|
}
|
|
410
|
+
function imageRenderer(params) {
|
|
411
|
+
var _a, _b, _c;
|
|
412
|
+
let photos = [];
|
|
413
|
+
const colDef = (_a = params.column) === null || _a === void 0 ? void 0 : _a.getColDef();
|
|
414
|
+
photos = compact([].concat((_c = (_b = colDef) === null || _b === void 0 ? void 0 : _b.fieldDefinition) === null || _c === void 0 ? void 0 : _c.imagesCarousel));
|
|
415
|
+
if (photos && isArray(photos) && photos.length > 0) {
|
|
416
|
+
//return photos.map((photo) => `<yoo-img style="${getStyle(roundedImageStyle)}" src="${photo || ''}" />`).join(' ');
|
|
417
|
+
const container = document.createElement('div');
|
|
418
|
+
container.style.display = 'inherit';
|
|
419
|
+
photos.forEach((photo) => {
|
|
420
|
+
const img = document.createElement('yoo-img');
|
|
421
|
+
keys(roundedImageStyle).forEach((k) => {
|
|
422
|
+
img.style[k] = roundedImageStyle[k];
|
|
423
|
+
});
|
|
424
|
+
img.src = photo;
|
|
425
|
+
container.appendChild(img);
|
|
426
|
+
});
|
|
427
|
+
return container;
|
|
428
|
+
}
|
|
429
|
+
return '';
|
|
430
|
+
}
|
|
407
431
|
function videoRenderer(params) {
|
|
408
432
|
return '<video class="ag-cell-image video" [src]="' + params.value + '"></video>';
|
|
409
433
|
}
|
|
@@ -577,13 +601,16 @@ function catalogRenderer(params) {
|
|
|
577
601
|
return formCatalog;
|
|
578
602
|
}
|
|
579
603
|
function documentRenderer(params) {
|
|
604
|
+
var _a, _b, _c;
|
|
580
605
|
let documents = [];
|
|
581
|
-
|
|
582
|
-
|
|
606
|
+
const colDef = (_a = params.column) === null || _a === void 0 ? void 0 : _a.getColDef();
|
|
607
|
+
if (((_c = (_b = colDef) === null || _b === void 0 ? void 0 : _b.fieldDefinition) === null || _c === void 0 ? void 0 : _c.type) === FormFieldType.document) {
|
|
608
|
+
documents = compact([].concat(colDef.fieldDefinition.document));
|
|
583
609
|
}
|
|
584
610
|
else {
|
|
585
611
|
documents = compact([].concat(params.value));
|
|
586
612
|
}
|
|
613
|
+
documents = documents.filter((d) => !!d._downloadURL);
|
|
587
614
|
const wrapper = document.createElement('div');
|
|
588
615
|
wrapper.classList.add('col');
|
|
589
616
|
if (documents.length > 0) {
|
|
@@ -595,8 +622,9 @@ function documentRenderer(params) {
|
|
|
595
622
|
formDocument.showActionSheet = false;
|
|
596
623
|
wrapper.appendChild(formDocument);
|
|
597
624
|
});
|
|
625
|
+
return isCSVOrExcel(params) ? documents.map((d) => d._downloadURL).join(',') : wrapper;
|
|
598
626
|
}
|
|
599
|
-
return
|
|
627
|
+
return '';
|
|
600
628
|
}
|
|
601
629
|
function pricecheckRenderer(params) {
|
|
602
630
|
const value = params.value;
|
|
@@ -619,7 +647,7 @@ function buttonRenderer(params) {
|
|
|
619
647
|
return '';
|
|
620
648
|
}
|
|
621
649
|
function missionValidationRenderer(params) {
|
|
622
|
-
var _a, _b
|
|
650
|
+
var _a, _b;
|
|
623
651
|
const value = params.value;
|
|
624
652
|
let status = '';
|
|
625
653
|
if (params.node && params.node.data) {
|
|
@@ -638,10 +666,10 @@ function missionValidationRenderer(params) {
|
|
|
638
666
|
if (((_a = params === null || params === void 0 ? void 0 : params.node) === null || _a === void 0 ? void 0 : _a.group) && ((_b = params === null || params === void 0 ? void 0 : params.colDef) === null || _b === void 0 ? void 0 : _b.cellRenderer) === 'group') {
|
|
639
667
|
retVal = `<yoo-tag color="stable">${translate('N/A')}</yoo-tag>`;
|
|
640
668
|
}
|
|
641
|
-
return (
|
|
669
|
+
return isCSVOrExcel(params) ? stripHtml(retVal) : retVal;
|
|
642
670
|
}
|
|
643
671
|
function missionStatusRenderer(params) {
|
|
644
|
-
var _a, _b, _c
|
|
672
|
+
var _a, _b, _c;
|
|
645
673
|
let tag;
|
|
646
674
|
let retVal = '';
|
|
647
675
|
if ((_a = params.data) === null || _a === void 0 ? void 0 : _a.hasWorkflow) {
|
|
@@ -671,7 +699,7 @@ function missionStatusRenderer(params) {
|
|
|
671
699
|
retVal = `<div class="not-center-container"><yoo-tag color="accent">${translate('AVAILABLE')}</yoo-tag></div>`;
|
|
672
700
|
}
|
|
673
701
|
retVal = retVal ? retVal : value ? value.toString() : retVal || '';
|
|
674
|
-
return (
|
|
702
|
+
return isCSVOrExcel(params) ? stripHtml(retVal) : retVal;
|
|
675
703
|
}
|
|
676
704
|
function salesAIQuantityRenderer(params) {
|
|
677
705
|
const value = params.value;
|
|
@@ -1113,6 +1141,8 @@ export function getRenderer(renderer) {
|
|
|
1113
1141
|
return photoRenderer;
|
|
1114
1142
|
case 'multiphotoRenderer':
|
|
1115
1143
|
return multiphotoRenderer;
|
|
1144
|
+
case 'imageRenderer':
|
|
1145
|
+
return imageRenderer;
|
|
1116
1146
|
case 'videoRenderer':
|
|
1117
1147
|
return videoRenderer;
|
|
1118
1148
|
case 'starratingRenderer':
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import 'gridstack/dist/h5/gridstack-dd-native';
|
|
2
2
|
import { debounce } from '@shared/utils';
|
|
3
3
|
import { Component, Element, Event, h, Host, Method, Prop, State, Watch } from '@stencil/core';
|
|
4
|
-
import { GridStack } from 'gridstack';
|
|
4
|
+
import { GridStack, Utils } from 'gridstack';
|
|
5
5
|
import { DDResizable } from 'gridstack/dist/h5/dd-resizable';
|
|
6
6
|
import { assign, cloneDeep, isEqual, isFunction, pick, sortBy } from 'lodash-es';
|
|
7
7
|
DDResizable.prototype._resizeStopOriginal = DDResizable.prototype._resizeStop;
|
|
@@ -189,9 +189,11 @@ export class YooGridstackComponent {
|
|
|
189
189
|
}
|
|
190
190
|
delete this.containerEl.gridstack;
|
|
191
191
|
this.grid = GridStack.init({
|
|
192
|
+
auto: false,
|
|
192
193
|
column: this.column || 12,
|
|
193
194
|
animate: true,
|
|
194
195
|
disableOneColumnMode: this.forceOneColumn !== true,
|
|
196
|
+
oneColumnModeDomSort: false,
|
|
195
197
|
cellHeight: this.cellHeight || 'auto',
|
|
196
198
|
margin: this.itemMargin,
|
|
197
199
|
acceptWidgets: '.ui-draggable',
|
|
@@ -255,10 +257,23 @@ export class YooGridstackComponent {
|
|
|
255
257
|
}
|
|
256
258
|
}
|
|
257
259
|
renderConfig() {
|
|
258
|
-
var _a;
|
|
259
260
|
this.grid.removeAll(true);
|
|
260
261
|
this.grid.batchUpdate();
|
|
261
|
-
|
|
262
|
+
let finalConfig = this.config;
|
|
263
|
+
if (this.column === 1 && (finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.length) > 0) {
|
|
264
|
+
finalConfig = Utils.sort(this.config, 1, this.column);
|
|
265
|
+
finalConfig.forEach((v, i) => {
|
|
266
|
+
if (i === 0) {
|
|
267
|
+
v.y = 0;
|
|
268
|
+
v.x = 0;
|
|
269
|
+
}
|
|
270
|
+
else {
|
|
271
|
+
v.x = 0;
|
|
272
|
+
v.y = finalConfig[i - 1].y + finalConfig[i - 1].h;
|
|
273
|
+
}
|
|
274
|
+
});
|
|
275
|
+
}
|
|
276
|
+
finalConfig === null || finalConfig === void 0 ? void 0 : finalConfig.forEach((item) => {
|
|
262
277
|
const isHidden = !!this.hiddenWidgets.find((i) => i.id === item.id);
|
|
263
278
|
const el = this.grid.addWidget(this.getItemTemplate(item, isHidden), cloneDeep(item));
|
|
264
279
|
if (isHidden) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { cleanupWKWebViewImagePath, Cloudinary, getCssColor, isBase64, isCloudinaryLink, isImageUrl } from '@shared/utils';
|
|
2
2
|
export async function getImageSize(src, onErr) {
|
|
3
3
|
const img = new Image();
|
|
4
|
-
if (src
|
|
4
|
+
if (src) {
|
|
5
5
|
img.src = isCloudinaryLink(src) ? new Cloudinary(src).quality('low').getUrl() : src;
|
|
6
6
|
await new Promise((resolve, reject) => {
|
|
7
7
|
img.onload = () => resolve(img.width);
|
|
8
|
-
img.onerror = () => reject(onErr === null || onErr === void 0 ? void 0 : onErr());
|
|
8
|
+
img.onerror = () => isImageUrl(src) || isBase64(src) && reject(onErr === null || onErr === void 0 ? void 0 : onErr());
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
11
|
return {
|