@yoobic/yobi 7.7.99 → 7.7.100
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-374ca7e9.js} +7 -3
- package/dist/cjs/yoo-action-sheet-controller_15.cjs.entry.js +1 -1
- package/dist/cjs/yoo-ag-grid_96.cjs.entry.js +1 -1
- package/dist/cjs/yoo-card-list-image_12.cjs.entry.js +1 -1
- 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/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 +7 -3
- package/dist/collection/components/grid/gridstack/gridstack.js +18 -3
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{p-753e7b0d.entry.js → p-0d6af448.entry.js} +1 -1
- package/dist/design-system/{p-7fcd0596.entry.js → p-405c25ba.entry.js} +1 -1
- package/dist/design-system/{p-dd2d4ef6.entry.js → p-43b3420c.entry.js} +1 -1
- package/dist/design-system/{p-af4cfea4.entry.js → p-4ae66a1f.entry.js} +1 -1
- package/dist/design-system/{p-d74f2bbf.entry.js → p-52465658.entry.js} +1 -1
- package/dist/design-system/p-be2ae101.entry.js +1 -0
- package/dist/design-system/p-f28ca7cf.js +1 -0
- package/dist/esm/{grid-renderers-f81f061f.js → grid-renderers-f71fdcd7.js} +7 -3
- package/dist/esm/yoo-action-sheet-controller_15.entry.js +1 -1
- package/dist/esm/yoo-ag-grid_96.entry.js +1 -1
- package/dist/esm/yoo-card-list-image_12.entry.js +1 -1
- 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/package.json +1 -1
- package/dist/design-system/p-6871e6b7.entry.js +0 -1
- package/dist/design-system/p-6cfa75b3.js +0 -1
|
@@ -594,13 +594,16 @@ function catalogRenderer(params) {
|
|
|
594
594
|
return formCatalog;
|
|
595
595
|
}
|
|
596
596
|
function documentRenderer(params) {
|
|
597
|
+
var _a, _b, _c, _d;
|
|
597
598
|
let documents = [];
|
|
598
|
-
|
|
599
|
-
|
|
599
|
+
const colDef = (_a = params.column) === null || _a === void 0 ? void 0 : _a.getColDef();
|
|
600
|
+
if (((_c = (_b = colDef) === null || _b === void 0 ? void 0 : _b.fieldDefinition) === null || _c === void 0 ? void 0 : _c.type) === inputBar_interface.FormFieldType.document) {
|
|
601
|
+
documents = rrule.compact([].concat(colDef.fieldDefinition.document));
|
|
600
602
|
}
|
|
601
603
|
else {
|
|
602
604
|
documents = rrule.compact([].concat(params.value));
|
|
603
605
|
}
|
|
606
|
+
documents = documents.filter((d) => !!d._downloadURL);
|
|
604
607
|
const wrapper = document.createElement('div');
|
|
605
608
|
wrapper.classList.add('col');
|
|
606
609
|
if (documents.length > 0) {
|
|
@@ -612,8 +615,9 @@ function documentRenderer(params) {
|
|
|
612
615
|
formDocument.showActionSheet = false;
|
|
613
616
|
wrapper.appendChild(formDocument);
|
|
614
617
|
});
|
|
618
|
+
return ((_d = params) === null || _d === void 0 ? void 0 : _d.type) === 'excel' ? documents.map((d) => d._downloadURL).join(',') : wrapper;
|
|
615
619
|
}
|
|
616
|
-
return
|
|
620
|
+
return '';
|
|
617
621
|
}
|
|
618
622
|
function pricecheckRenderer(params) {
|
|
619
623
|
const value = params.value;
|
|
@@ -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-374ca7e9.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-374ca7e9.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');
|
|
@@ -16,7 +16,7 @@ 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
18
|
const imageHelpers = require('./image-helpers-3385fd6f.js');
|
|
19
|
-
const gridRenderers = require('./grid-renderers-
|
|
19
|
+
const gridRenderers = require('./grid-renderers-374ca7e9.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
|
};
|
|
@@ -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: {
|
|
@@ -577,13 +577,16 @@ function catalogRenderer(params) {
|
|
|
577
577
|
return formCatalog;
|
|
578
578
|
}
|
|
579
579
|
function documentRenderer(params) {
|
|
580
|
+
var _a, _b, _c, _d;
|
|
580
581
|
let documents = [];
|
|
581
|
-
|
|
582
|
-
|
|
582
|
+
const colDef = (_a = params.column) === null || _a === void 0 ? void 0 : _a.getColDef();
|
|
583
|
+
if (((_c = (_b = colDef) === null || _b === void 0 ? void 0 : _b.fieldDefinition) === null || _c === void 0 ? void 0 : _c.type) === FormFieldType.document) {
|
|
584
|
+
documents = compact([].concat(colDef.fieldDefinition.document));
|
|
583
585
|
}
|
|
584
586
|
else {
|
|
585
587
|
documents = compact([].concat(params.value));
|
|
586
588
|
}
|
|
589
|
+
documents = documents.filter((d) => !!d._downloadURL);
|
|
587
590
|
const wrapper = document.createElement('div');
|
|
588
591
|
wrapper.classList.add('col');
|
|
589
592
|
if (documents.length > 0) {
|
|
@@ -595,8 +598,9 @@ function documentRenderer(params) {
|
|
|
595
598
|
formDocument.showActionSheet = false;
|
|
596
599
|
wrapper.appendChild(formDocument);
|
|
597
600
|
});
|
|
601
|
+
return ((_d = params) === null || _d === void 0 ? void 0 : _d.type) === 'excel' ? documents.map((d) => d._downloadURL).join(',') : wrapper;
|
|
598
602
|
}
|
|
599
|
-
return
|
|
603
|
+
return '';
|
|
600
604
|
}
|
|
601
605
|
function pricecheckRenderer(params) {
|
|
602
606
|
const value = params.value;
|
|
@@ -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) {
|