@yoobic/yobi 8.2.0-31 → 8.2.0-34
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/{filters-helpers-4a3a446e.js → filters-helpers-5aa63586.js} +2 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/yoo-context-menu-dialog.cjs.entry.js +2 -2
- package/dist/cjs/yoo-entity-query-builder.cjs.entry.js +1 -1
- package/dist/cjs/yoo-entity-search-filters.cjs.entry.js +1 -1
- package/dist/cjs/yoo-form-capture.cjs.entry.js +11 -11
- package/dist/cjs/yoo-form-choice-card.cjs.entry.js +4 -11
- package/dist/cjs/yoo-form-creator-page-card-list.cjs.entry.js +0 -1
- package/dist/cjs/yoo-form-creator.cjs.entry.js +21 -7
- package/dist/cjs/yoo-grid.cjs.entry.js +1 -1
- package/dist/cjs/yoo-lesson-question-result.cjs.entry.js +1 -1
- package/dist/cjs/yoo-profile-list.cjs.entry.js +2 -1
- package/dist/cjs/yoo-truncate.cjs.entry.js +2 -1
- package/dist/collection/components/1.atoms/truncate/truncate.js +25 -5
- package/dist/collection/components/2.molecules/context-menu-dialog/context-menu-dialog.js +2 -2
- package/dist/collection/components/2.molecules/profile-list/profile-list.js +2 -1
- package/dist/collection/components/form/form-capture/form-capture.js +12 -12
- package/dist/collection/components/form/form-choice/card/form-choice-card.js +6 -16
- package/dist/collection/components/form-creator/form-creator/form-creator.js +21 -7
- package/dist/collection/components/form-creator/form-creator-card-list/page/form-creator-page-card-list.js +0 -1
- package/dist/collection/feature-learn/learning/lesson-question-result/lesson-question-result.css +0 -1
- package/dist/collection/utils/helpers/filters-helpers.js +2 -0
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/design-system/{filters-helpers-e37fa627.js → filters-helpers-d4fc3be5.js} +2 -0
- package/dist/design-system/yoo-context-menu-dialog.entry.js +2 -2
- package/dist/design-system/yoo-entity-query-builder.entry.js +1 -1
- package/dist/design-system/yoo-entity-search-filters.entry.js +1 -1
- package/dist/design-system/yoo-form-capture.entry.js +11 -11
- package/dist/design-system/yoo-form-choice-card.entry.js +5 -12
- package/dist/design-system/yoo-form-creator-page-card-list.entry.js +0 -1
- package/dist/design-system/yoo-form-creator.entry.js +21 -7
- package/dist/design-system/yoo-grid.entry.js +1 -1
- package/dist/design-system/yoo-lesson-question-result.entry.js +1 -1
- package/dist/design-system/yoo-profile-list.entry.js +2 -1
- package/dist/design-system/yoo-truncate.entry.js +2 -1
- package/dist/esm/design-system.js +1 -1
- package/dist/esm/{filters-helpers-e37fa627.js → filters-helpers-d4fc3be5.js} +2 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-context-menu-dialog.entry.js +2 -2
- package/dist/esm/yoo-entity-query-builder.entry.js +1 -1
- package/dist/esm/yoo-entity-search-filters.entry.js +1 -1
- package/dist/esm/yoo-form-capture.entry.js +11 -11
- package/dist/esm/yoo-form-choice-card.entry.js +5 -12
- package/dist/esm/yoo-form-creator-page-card-list.entry.js +0 -1
- package/dist/esm/yoo-form-creator.entry.js +21 -7
- package/dist/esm/yoo-grid.entry.js +1 -1
- package/dist/esm/yoo-lesson-question-result.entry.js +1 -1
- package/dist/esm/yoo-profile-list.entry.js +2 -1
- package/dist/esm/yoo-truncate.entry.js +2 -1
- package/dist/types/components/1.atoms/truncate/truncate.d.ts +6 -0
- package/dist/types/components/form/form-capture/form-capture.d.ts +1 -1
- package/dist/types/components/form/form-choice/card/form-choice-card.d.ts +0 -2
- package/dist/types/components/form-creator/form-creator/form-creator.d.ts +4 -1
- package/dist/types/components.d.ts +2 -0
- package/package.json +1 -1
|
@@ -136,12 +136,12 @@ const YooContextMenuDialogComponent = class {
|
|
|
136
136
|
]) : (index.h("span", { innerHTML: index$1.translateMulti(textContent) })));
|
|
137
137
|
}
|
|
138
138
|
renderRightActions(item) {
|
|
139
|
-
const { subMenu, isToggle, selectedFn, selected, handler, actionableIcon, actionableIcons
|
|
139
|
+
const { subMenu, isToggle, selectedFn, selected, handler, actionableIcon, actionableIcons } = item;
|
|
140
140
|
return [
|
|
141
141
|
!!(subMenu === null || subMenu === void 0 ? void 0 : subMenu.length) && index.h("yoo-icon", { class: "arrows", name: `arrow-${this.openSubMenuOnLeft ? 'left' : 'right'}` }),
|
|
142
142
|
isToggle && index.h("yoo-form-toggle", { size: "medium", value: (selectedFn === null || selectedFn === void 0 ? void 0 : selectedFn()) || selected, onInputChanged: () => handler === null || handler === void 0 ? void 0 : handler() }),
|
|
143
143
|
actionableIcon && index.h("yoo-icon", { size: (actionableIcon === null || actionableIcon === void 0 ? void 0 : actionableIcon.iconSize) || 'medium', class: "right-aligned", name: actionableIcon.icon, color: actionableIcon.iconColor, onClick: (ev) => this.onActionableIconClick(ev, actionableIcon) }),
|
|
144
|
-
actionableIcons === null || actionableIcons === void 0 ? void 0 : actionableIcons.map((action) => index.h("yoo-icon", { size: action.iconSize || 'medium', class: "right-aligned", name: icon, color: iconColor, onClick: (ev) => this.onActionableIconClick(ev, action) }))
|
|
144
|
+
actionableIcons === null || actionableIcons === void 0 ? void 0 : actionableIcons.map((action) => index.h("yoo-icon", { size: action.iconSize || 'medium', class: "right-aligned", name: action.icon, color: action.iconColor, onClick: (ev) => this.onActionableIconClick(ev, action) }))
|
|
145
145
|
];
|
|
146
146
|
}
|
|
147
147
|
renderItemContent(item) {
|
|
@@ -6,7 +6,7 @@ const index = require('./index-c8609d4f.js');
|
|
|
6
6
|
const index$1 = require('./index-ea29129a.js');
|
|
7
7
|
const index$2 = require('./index-bc221b8a.js');
|
|
8
8
|
const lodash = require('./lodash-597bda6d.js');
|
|
9
|
-
const filtersHelpers = require('./filters-helpers-
|
|
9
|
+
const filtersHelpers = require('./filters-helpers-5aa63586.js');
|
|
10
10
|
require('./_commonjsHelpers-94df2ea7.js');
|
|
11
11
|
|
|
12
12
|
const entityQueryBuilderCss = ".container{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;margin-left:0}.container.expanded{margin-bottom:var(--spacing-16, 1rem)}.container .flex{-ms-flex:1;flex:1}.container yoo-button.margin-left{margin-left:var(--spacing-16, 1rem)}.container yoo-tooltip{margin-left:var(--spacing-08, 0.5rem)}.container .toggle-selected{margin-left:var(--spacing-16, 1rem)}.container .sorts{width:8.5rem;margin-right:var(--spacing-08, 0.5rem);margin-left:var(--spacing-08, 0.5rem)}yoo-banner{margin-bottom:var(--spacing-08, 0.5rem)}.filters-container{display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;padding:0}.filters-container.disabled yoo-button,.filters-container.disabled yoo-form-dynamic{opacity:0.2 !important;pointer-events:none}.filters-container:not(.open){display:none}.filters-container.advanced yoo-form-input-container{padding-bottom:0.75rem}.filters-container.advanced yoo-button{padding-bottom:var(--spacing-04, 0.25rem)}.filters-container.advanced yoo-button yoo-icon.add{color:var(--stable, #adadad)}.filters-container.advanced yoo-button.add-filter{margin-right:var(--spacing-16, 1rem)}.filters-container.advanced yoo-button.margin-right{margin-right:var(--spacing-08, 0.5rem);margin-left:0}.filters-container.advanced yoo-form-input-container.operator{margin:calc(var(--spacing-04, 0.25rem) * -1) var(--spacing-04, 0.25rem) 0 calc(var(--spacing-08, 0.5rem) * -1);padding:0 0.5rem;padding-bottom:0;text-align:center}.filters-container yoo-form-dynamic.fill-width:not(.web){width:100%}:host(.no-padding) yoo-button.filters.margin-left{margin-left:0}:host(.floating) ::slotted(.search-container-inner[slot=before]){width:100%}:host(.floating) .container.expanded{margin-bottom:0}:host(.floating) yoo-context-menu{width:100%}:host(.floating) .header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;width:100%;padding:var(--spacing-08, 0.5rem) var(--spacing-16, 1rem) 0}:host(.floating) .header.width-auto{width:auto;cursor:pointer}:host(.floating) .header .title{-ms-flex:1;flex:1;font-weight:bold;font-size:var(--font-size-14, 0.875rem)}:host(.floating) .header .title.app-color{color:var(--app-color, #5a30f4)}:host(.floating) .footer{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end;width:100%;padding:var(--spacing-16, 1rem);-webkit-column-gap:var(--spacing-16, 1rem);-moz-column-gap:var(--spacing-16, 1rem);column-gap:var(--spacing-16, 1rem);border-top:var(--border-width-01, 0.0625rem) solid var(--stable-light, #f1f1f1)}:host(.floating) .footer .flex{-ms-flex:1;flex:1}:host(.floating) .footer yoo-button{max-width:6rem}:host(.floating) .subfooter{width:100%;padding:var(--spacing-08, 0.5rem);font-size:var(--font-size-12, 0.75rem);text-align:center;border-top:var(--border-width-01, 0.0625rem) solid var(--stable-light, #f1f1f1);cursor:pointer}:host(.floating) .filters-container.open{position:absolute;left:21rem;width:15rem;padding:0;background:var(--light, #ffffff);border:var(--border-width-01, 0.0625rem) solid var(--stable-light, #f1f1f1);-webkit-box-shadow:var(--shadow-01, 0 0.0625rem 0.25rem 0 rgba(0, 0, 0, 0.1));box-shadow:var(--shadow-01, 0 0.0625rem 0.25rem 0 rgba(0, 0, 0, 0.1))}:host(.floating) .filters-container.open yoo-form-dynamic{width:100%;max-height:calc(100vh - 30.25rem);margin:auto;overflow-y:auto;}:host(.floating) .filters-container.open yoo-form-dynamic::-webkit-scrollbar{width:var(--spacing-04, 0.25rem);height:var(--spacing-04, 0.25rem)}:host(.floating) .filters-container.open yoo-form-dynamic::-webkit-scrollbar-track{background-color:transparent;border-radius:var(--border-radius-04, 0.25rem)}:host(.floating) .filters-container.open yoo-form-dynamic::-webkit-scrollbar-thumb{background-color:transparent;border-radius:var(--border-radius-04, 0.25rem)}";
|
|
@@ -7,7 +7,7 @@ const index$1 = require('./index-ea29129a.js');
|
|
|
7
7
|
const index$2 = require('./index-bc221b8a.js');
|
|
8
8
|
const lodash = require('./lodash-597bda6d.js');
|
|
9
9
|
const commonHelpers = require('./common-helpers-70f1fa4b.js');
|
|
10
|
-
const filtersHelpers = require('./filters-helpers-
|
|
10
|
+
const filtersHelpers = require('./filters-helpers-5aa63586.js');
|
|
11
11
|
require('./_commonjsHelpers-94df2ea7.js');
|
|
12
12
|
|
|
13
13
|
const entitySearchFiltersCss = ":host .outer-container{padding:1rem 1rem 0 1rem}:host .outer-container .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;height:1.3125rem;margin-top:var(--spacing-08, 0.5rem);font-weight:var(--font-weight-700, 700);font-size:var(--font-size-18, 1.125rem)}:host .outer-container .menu-title{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between;margin-top:1.2rem;font-size:var(--font-size-16, 1rem)}:host .outer-container .menu{margin:0;padding:0;font-size:100%;vertical-align:baseline;list-style:none outside none;background:none repeat scroll 0 0 transparent;border:0 none;outline:0 none;-webkit-tap-highlight-color:transparent;margin:0;padding:0 0 0.3125rem;list-style:none}:host .outer-container .menu .menu-item{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between;height:100%;min-height:2.75rem;padding:0 1rem 0 0;font-weight:var(--font-weight-400, 400)}:host .outer-container .menu .menu-item div{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-item-align:center;align-self:center}:host .outer-container .menu .menu-item div .menu-item-title{width:100%;margin-left:var(--spacing-08, 0.5rem)}:host .outer-container .menu .border{width:100%;height:0;border-top:var(--border-width-01, 0.0625rem) solid var(--stable-light, #f1f1f1)}:host .outer-container .menu{margin:0 0.5rem}:host .outer-container .menu .menu-item{padding:0;cursor:pointer}:host .outer-container .menu .menu-item .menu-item-title{width:100%}:host .outer-container .menu .menu-item yoo-form-checkbox{padding-right:var(--spacing-04, 0.25rem)}:host .outer-container yoo-form-input-container{margin-top:0.8rem}:host .outer-container yoo-form-dynamic.margin-top{margin-top:0.8rem}:host .outer-container .filter-container.flex{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin-top:0.8rem}:host .outer-container .filter-container.flex .menu-title{-ms-flex:1;flex:1;margin-top:0}:host .outer-container .filter-container.flex .menu{margin:0;padding-bottom:0}:host(.web) .outer-container{width:80%;max-width:500px;margin:auto}";
|
|
@@ -41,7 +41,7 @@ const YooFormCaptureComponent = class {
|
|
|
41
41
|
this.min = 1;
|
|
42
42
|
this.max = 1;
|
|
43
43
|
this.validators = [];
|
|
44
|
-
this.
|
|
44
|
+
this.isProcessingPhoto = true;
|
|
45
45
|
this.isSelectorMode = false;
|
|
46
46
|
this.selectedIndex = [];
|
|
47
47
|
this.overflowOffset = 4;
|
|
@@ -76,15 +76,7 @@ const YooFormCaptureComponent = class {
|
|
|
76
76
|
this.emitOnUpdated = false;
|
|
77
77
|
}
|
|
78
78
|
async onPhotoUploadComplete() {
|
|
79
|
-
this.isUploadingPhoto = false;
|
|
80
79
|
this.currentUploadingStatus = index$1.translate('RECOGNIZINGIMAGES');
|
|
81
|
-
if (this.progressBarRef && this.progressBarRef.length > 0) {
|
|
82
|
-
this.progressBarRef.forEach((ref) => {
|
|
83
|
-
if (ref) {
|
|
84
|
-
ref.value = 100;
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
}
|
|
88
80
|
}
|
|
89
81
|
async onPhotoUploadProgressUpdate(progress, index) {
|
|
90
82
|
if (this.progressBarRef && this.progressBarRef[index]) {
|
|
@@ -105,6 +97,14 @@ const YooFormCaptureComponent = class {
|
|
|
105
97
|
});
|
|
106
98
|
}
|
|
107
99
|
async processImageRecognitionResults(imageRecognitionResults, priceRecognitionResults) {
|
|
100
|
+
this.isProcessingPhoto = false;
|
|
101
|
+
if (this.progressBarRef && this.progressBarRef.length > 0) {
|
|
102
|
+
this.progressBarRef.forEach((ref) => {
|
|
103
|
+
if (ref) {
|
|
104
|
+
ref.value = 100;
|
|
105
|
+
}
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
108
|
if (!this.imageRecoCancelled) {
|
|
109
109
|
if (this.progressBarMainRef) {
|
|
110
110
|
this.progressBarMainRef.progressAnimationDuration = 0.5;
|
|
@@ -1014,7 +1014,7 @@ const YooFormCaptureComponent = class {
|
|
|
1014
1014
|
return;
|
|
1015
1015
|
}
|
|
1016
1016
|
this.imageRecoCancelled = false;
|
|
1017
|
-
this.
|
|
1017
|
+
this.isProcessingPhoto = true;
|
|
1018
1018
|
if (this.isValueValid() && this.algorithm && !this.isProcessing) {
|
|
1019
1019
|
// emit image recognition event
|
|
1020
1020
|
this.currentUploadingStatus = index$1.translate('UPLOADINGPHOTOS');
|
|
@@ -1548,7 +1548,7 @@ const YooFormCaptureComponent = class {
|
|
|
1548
1548
|
return (index.h("div", { class: "progressbar-wrapper" }, mainProgress
|
|
1549
1549
|
? [
|
|
1550
1550
|
this.currentUploadingStatus && (lodash.isUndefined(index$1) || !this.multiple) && index.h("div", { class: "text app-color" }, this.currentUploadingStatus),
|
|
1551
|
-
!this.
|
|
1551
|
+
!this.isProcessingPhoto && (index.h("div", { class: "main-wrapper" }, index.h("yoo-progress-bar", { value: 100, hideProgressValue: true, listenToProgress: true, listenToCompleteProgress: true, disableBackProgressAnimation: true, progressAnimationDuration: this.progressTime, onValueChanged: (ev) => onProgressUpdating(ev), onProgressFinished: (ev) => onProgressFinished(ev), ref: (el) => (this.progressBarMainRef = el) })))
|
|
1552
1552
|
]
|
|
1553
1553
|
: [
|
|
1554
1554
|
index.h("yoo-progress-bar", { class: "photo-progress app-color", value: 0, hideProgressValue: true, progressAnimationDuration: 0.5, ref: (el) => {
|
|
@@ -31,12 +31,6 @@ const YooFormChoiceCardComponent = class {
|
|
|
31
31
|
this.imgElements = [];
|
|
32
32
|
this.choices = [];
|
|
33
33
|
}
|
|
34
|
-
onValuesChanged(newValues, oldValues) {
|
|
35
|
-
formChoiceHelpers.updateValues(newValues, oldValues, this);
|
|
36
|
-
}
|
|
37
|
-
onValueChanged(newValue, oldValue) {
|
|
38
|
-
formChoiceHelpers.updateValue(newValue, oldValue, this);
|
|
39
|
-
}
|
|
40
34
|
componentWillLoad() {
|
|
41
35
|
var _a;
|
|
42
36
|
formChoiceHelpers.prepareChoice(this);
|
|
@@ -78,7 +72,10 @@ const YooFormChoiceCardComponent = class {
|
|
|
78
72
|
return index.h("yoo-icon", { name: "check" });
|
|
79
73
|
}
|
|
80
74
|
renderSelect(item, index$1) {
|
|
81
|
-
const selected = formChoiceHelpers.isSelected(
|
|
75
|
+
const selected = ((formChoiceHelpers.isSelected('true', this.selection) && index$1 === 0) ||
|
|
76
|
+
(formChoiceHelpers.isSelected('false', this.selection) && index$1 === 0) ||
|
|
77
|
+
formChoiceHelpers.isSelected(item.value || item.title, this.selection) ||
|
|
78
|
+
formChoiceHelpers.isSelected(item || item.title, this.selection));
|
|
82
79
|
return (index.h("div", { class: { 'select': true, selected }, style: { ...(this.maxWidth > 0 && { maxWidth: `${this.maxWidth}px` }) }, onClick: () => formChoiceHelpers.onItemSelect(item.value || item.title, this) }, this.renderCardContent(item, selected, index$1), !item.image &&
|
|
83
80
|
!item.lottie &&
|
|
84
81
|
!item.hideCheckbox &&
|
|
@@ -100,10 +97,6 @@ const YooFormChoiceCardComponent = class {
|
|
|
100
97
|
]));
|
|
101
98
|
}
|
|
102
99
|
get host() { return index.getElement(this); }
|
|
103
|
-
static get watchers() { return {
|
|
104
|
-
"values": ["onValuesChanged"],
|
|
105
|
-
"value": ["onValueChanged"]
|
|
106
|
-
}; }
|
|
107
100
|
};
|
|
108
101
|
YooFormChoiceCardComponent.style = formChoiceCardCss;
|
|
109
102
|
|
|
@@ -124,7 +124,6 @@ const YooFormCreatorPageCardListComponent = class {
|
|
|
124
124
|
const indexSlideTo = sortEvent.indexTo - 1 >= 0 ? sortEvent.indexTo - 1 : 0;
|
|
125
125
|
this.pageOrderChanged.emit(sortEvent);
|
|
126
126
|
this.pageCardsParentEl.slideTo(indexSlideTo);
|
|
127
|
-
this.pageClicked.emit(sortEvent.indexTo);
|
|
128
127
|
};
|
|
129
128
|
}
|
|
130
129
|
renderPageCards() {
|
|
@@ -157,6 +157,7 @@ const YooFormCreatorComponent = class {
|
|
|
157
157
|
this.restrictionConditionSelectedTab = 0;
|
|
158
158
|
this.expandedConditions = [];
|
|
159
159
|
this.isPageReordering = false;
|
|
160
|
+
this.pagesReordered = false;
|
|
160
161
|
this.onInsertPageAfterClicked = (event) => {
|
|
161
162
|
if (event) {
|
|
162
163
|
this.onAddNewPage(event.detail + 1);
|
|
@@ -175,12 +176,14 @@ const YooFormCreatorComponent = class {
|
|
|
175
176
|
this.removeOverlays();
|
|
176
177
|
}
|
|
177
178
|
else {
|
|
178
|
-
this.
|
|
179
|
-
this.
|
|
180
|
-
this.hasPageChanged = event.detail;
|
|
181
|
-
this.resetExpandableBlockReferences();
|
|
179
|
+
this.selectPage(event.detail);
|
|
180
|
+
this.pagesReordered = false;
|
|
182
181
|
}
|
|
183
182
|
};
|
|
183
|
+
this.onPageOrderChanged = (event) => {
|
|
184
|
+
this.selectPage(event.detail.indexTo);
|
|
185
|
+
this.pagesReordered = true;
|
|
186
|
+
};
|
|
184
187
|
this.onDuplicatePageClicked = (event) => {
|
|
185
188
|
var _a, _b, _c, _d;
|
|
186
189
|
if (event) {
|
|
@@ -424,7 +427,12 @@ const YooFormCreatorComponent = class {
|
|
|
424
427
|
});
|
|
425
428
|
this.currentExpandedBlockLocation = { slideIndex, itemIndex };
|
|
426
429
|
this.expandedFieldName = event.detail.name || this.expandedFieldName;
|
|
427
|
-
this.
|
|
430
|
+
if (!this.pagesReordered) {
|
|
431
|
+
this.scrollToField(itemIndex);
|
|
432
|
+
}
|
|
433
|
+
else {
|
|
434
|
+
this.pagesReordered = false;
|
|
435
|
+
}
|
|
428
436
|
}
|
|
429
437
|
else if (!event.detail.expanded && this.currentExpandedBlockLocation && itemIndex === this.currentExpandedBlockLocation.itemIndex) {
|
|
430
438
|
this.currentExpandedBlockLocation = null;
|
|
@@ -1016,6 +1024,12 @@ const YooFormCreatorComponent = class {
|
|
|
1016
1024
|
}
|
|
1017
1025
|
this.shouldRenderLeftSelectionContent = true;
|
|
1018
1026
|
}
|
|
1027
|
+
selectPage(pageIndex) {
|
|
1028
|
+
this.selectedPageIndex = pageIndex;
|
|
1029
|
+
this.pageHeaderClicked.emit(pageIndex);
|
|
1030
|
+
this.hasPageChanged = pageIndex;
|
|
1031
|
+
this.resetExpandableBlockReferences();
|
|
1032
|
+
}
|
|
1019
1033
|
updateGlobalActions() {
|
|
1020
1034
|
this.selectedMoveActions = index$3.setBlockSelection(this.itemList, null, (slideIndex, _itemIndex, itemId) => this.moveSelectedFields(itemId, slideIndex), {
|
|
1021
1035
|
extraStartingItems: [
|
|
@@ -2166,7 +2180,7 @@ const YooFormCreatorComponent = class {
|
|
|
2166
2180
|
selected: this.isPagesAccordionOpen,
|
|
2167
2181
|
actionButtons
|
|
2168
2182
|
}
|
|
2169
|
-
], iconPairLeft: index$5.ARROW_PAIR, showBottomBorder: true, forceEntryUpdate: true, allowMultipleSelection: true, onAccordionSelected: (event) => this.onPagesAccordionSelected(event) }, index.h("div", { slot: "PAGES" }, index.h("yoo-form-creator-page-card-list", { scoringMode: index$3.isScoring(this.selectedLeftMenuOption) ? this.selectedScoring : null, missionSlides: this.currentSlides, selectedPageIndex: this.selectedPageIndex, onPageClicked: this.onPageClicked, onDuplicatePageClicked: this.onDuplicatePageClicked, onInsertPageAfterClicked: this.onInsertPageAfterClicked, onDeletePageClicked: this.onDeletePageClicked, onEditPageClicked: this.onEditPageClicked, onAddSiteTagRestrictionClicked: this.onAddSiteTagRestrictionClicked, onAddUserGroupRestrictionClicked: this.onAddUserGroupRestrictionClicked, onReorderEnded: () => {
|
|
2183
|
+
], iconPairLeft: index$5.ARROW_PAIR, showBottomBorder: true, forceEntryUpdate: true, allowMultipleSelection: true, onAccordionSelected: (event) => this.onPagesAccordionSelected(event) }, index.h("div", { slot: "PAGES" }, index.h("yoo-form-creator-page-card-list", { scoringMode: index$3.isScoring(this.selectedLeftMenuOption) ? this.selectedScoring : null, missionSlides: this.currentSlides, selectedPageIndex: this.selectedPageIndex, onPageClicked: this.onPageClicked, onDuplicatePageClicked: this.onDuplicatePageClicked, onInsertPageAfterClicked: this.onInsertPageAfterClicked, onDeletePageClicked: this.onDeletePageClicked, onEditPageClicked: this.onEditPageClicked, onAddSiteTagRestrictionClicked: this.onAddSiteTagRestrictionClicked, onAddUserGroupRestrictionClicked: this.onAddUserGroupRestrictionClicked, onPageOrderChanged: this.onPageOrderChanged, onReorderEnded: () => {
|
|
2170
2184
|
this.isPageReordering = false;
|
|
2171
2185
|
}, onReorderStarted: () => {
|
|
2172
2186
|
this.isPageReordering = true;
|
|
@@ -2348,7 +2362,7 @@ const YooFormCreatorComponent = class {
|
|
|
2348
2362
|
}
|
|
2349
2363
|
renderLivePreview() {
|
|
2350
2364
|
var _a;
|
|
2351
|
-
return (index.h("yoo-form-creator-live-preview", { ref: (el) => (this.livePreviewElement = el), mode: "panel", showShare: this.showShare, onShared: (ev) => { ev.stopPropagation(); this.shared.emit(); }, hidden: this.isLivePreviewHidden, showDevices: false, missionDescriptionTitle: this.missDescDisplayTitle, onVisibilityToggled: () => (this.isLivePreviewHidden = !this.isLivePreviewHidden), availableLanguages: ((_a = this.translations) === null || _a === void 0 ? void 0 : _a.length) ? [...this.selectedLanguages, this.baseLanguage] : [], selectedLanguage: this.baseLanguage, onLanguageChanged: (ev) => this.onDisplayLanguageChanged(ev) }, index.h("div", { class: "slot-container", slot: "livePreview" }, index.h("slot", { name: "livePreview" }))));
|
|
2365
|
+
return (index.h("yoo-form-creator-live-preview", { ref: (el) => (this.livePreviewElement = el), mode: "panel", showShare: this.showShare, onShared: (ev) => { ev.stopPropagation(); this.shared.emit(); }, hidden: this.isLivePreviewHidden, showDevices: false, missionDescriptionTitle: this.missDescDisplayTitle, onVisibilityToggled: () => (this.isLivePreviewHidden = !this.isLivePreviewHidden), availableLanguages: ((_a = this.translations) === null || _a === void 0 ? void 0 : _a.length) ? [...this.selectedLanguages, this.baseLanguage] : [], selectedLanguage: this.displayLanguage ? this.displayLanguage : this.baseLanguage, onLanguageChanged: (ev) => this.onDisplayLanguageChanged(ev) }, index.h("div", { class: "slot-container", slot: "livePreview" }, index.h("slot", { name: "livePreview" }))));
|
|
2352
2366
|
}
|
|
2353
2367
|
renderFormDynamic() {
|
|
2354
2368
|
var _a;
|
|
@@ -11,7 +11,7 @@ require('./index-95f4734e.js');
|
|
|
11
11
|
const button_factory = require('./button.factory-a7d8ad16.js');
|
|
12
12
|
const index$3 = require('./index-50a1dcc7.js');
|
|
13
13
|
const commonHelpers = require('./common-helpers-70f1fa4b.js');
|
|
14
|
-
const filtersHelpers = require('./filters-helpers-
|
|
14
|
+
const filtersHelpers = require('./filters-helpers-5aa63586.js');
|
|
15
15
|
const formInputHelpers = require('./form-input-helpers-7dae7a64.js');
|
|
16
16
|
const gridRenderers = require('./grid-renderers-dbe0d15d.js');
|
|
17
17
|
const itemSliding_interface = require('./item-sliding.interface-7206925b.js');
|
|
@@ -8,7 +8,7 @@ const lodash = require('./lodash-597bda6d.js');
|
|
|
8
8
|
require('./_commonjsHelpers-94df2ea7.js');
|
|
9
9
|
require('./index-ea29129a.js');
|
|
10
10
|
|
|
11
|
-
const lessonQuestionResultCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--light, #ffffff)}:host yoo-navbar{background-color:var(--stable-light, #f1f1f1)}:host yoo-ion-scroll{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;width:100%}:host yoo-ion-scroll .result-title{margin:var(--spacing-08, 0.5rem) 0 var(--spacing-16, 1rem) 0;color:var(--app-color, #5a30f4);text-align:center}:host yoo-ion-scroll .result-text{margin:0 var(--spacing-64, 4rem);padding-bottom:var(--spacing-08, 0.5rem);color:var(--text-color, #807f83);line-height:1.5625rem;text-align:center}:host yoo-ion-scroll .result-explanation{margin:var(--spacing-08, 0.5rem) var(--spacing-64, 4rem);text-align:center}:host yoo-ion-scroll .result-explanation .explanation-value{color:var(--text-color, #807f83);line-height:1.5625rem}:host yoo-ion-scroll .result-explanation .explanation-title{padding-bottom:var(--spacing-08, 0.5rem);font-weight:bold}:host yoo-ion-scroll .separator{width:90%;border-bottom:var(--border-width-01, 0.0625rem) solid var(--stable-alt, #d0d0d0)}:host yoo-ion-scroll .result-document{margin:var(--spacing-16, 1rem)}:host yoo-ion-scroll .result-document .document-title{padding-bottom:var(--spacing-08, 0.5rem);font-weight:bold;font-size:var(--font-size-16, 1rem);text-align:center}:host yoo-ion-scroll .result-tag{padding:var(--spacing-08, 0.5rem);text-align:center}:host yoo-ion-scroll .result-tag span{color:var(--dark, #000000);font-size:var(--font-size-16, 1rem)}:host yoo-ion-scroll .result-tag span.action{color:var(--stable, #adadad);font-size:var(--font-size-14, 0.875rem);cursor:pointer}:host yoo-ion-scroll .result-tag .tag{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;margin:auto;font-size:var(--font-size-12, 0.75rem)}:host yoo-ion-scroll .result-tag .tag .tag-title{text-align:center}:host yoo-ion-scroll .result-tag .tags{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}:host yoo-ion-scroll .result-tag .tags .badge-container{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;
|
|
11
|
+
const lessonQuestionResultCss = ":host{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;height:100%;background-color:var(--light, #ffffff)}:host yoo-navbar{background-color:var(--stable-light, #f1f1f1)}:host yoo-ion-scroll{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;width:100%}:host yoo-ion-scroll .result-title{margin:var(--spacing-08, 0.5rem) 0 var(--spacing-16, 1rem) 0;color:var(--app-color, #5a30f4);text-align:center}:host yoo-ion-scroll .result-text{margin:0 var(--spacing-64, 4rem);padding-bottom:var(--spacing-08, 0.5rem);color:var(--text-color, #807f83);line-height:1.5625rem;text-align:center}:host yoo-ion-scroll .result-explanation{margin:var(--spacing-08, 0.5rem) var(--spacing-64, 4rem);text-align:center}:host yoo-ion-scroll .result-explanation .explanation-value{color:var(--text-color, #807f83);line-height:1.5625rem}:host yoo-ion-scroll .result-explanation .explanation-title{padding-bottom:var(--spacing-08, 0.5rem);font-weight:bold}:host yoo-ion-scroll .separator{width:90%;border-bottom:var(--border-width-01, 0.0625rem) solid var(--stable-alt, #d0d0d0)}:host yoo-ion-scroll .result-document{margin:var(--spacing-16, 1rem)}:host yoo-ion-scroll .result-document .document-title{padding-bottom:var(--spacing-08, 0.5rem);font-weight:bold;font-size:var(--font-size-16, 1rem);text-align:center}:host yoo-ion-scroll .result-tag{padding:var(--spacing-08, 0.5rem);text-align:center}:host yoo-ion-scroll .result-tag span{color:var(--dark, #000000);font-size:var(--font-size-16, 1rem)}:host yoo-ion-scroll .result-tag span.action{color:var(--stable, #adadad);font-size:var(--font-size-14, 0.875rem);cursor:pointer}:host yoo-ion-scroll .result-tag .tag{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;margin:auto;font-size:var(--font-size-12, 0.75rem)}:host yoo-ion-scroll .result-tag .tag .tag-title{text-align:center}:host yoo-ion-scroll .result-tag .tags{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}:host yoo-ion-scroll .result-tag .tags .badge-container{position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;margin:var(--spacing-08, 0.5rem) 0;font-size:var(--font-size-12, 0.75rem)}:host yoo-ion-scroll .result-tag .tags .badge-container yoo-tag{padding:var(--spacing-04, 0.25rem);background:var(--light, #ffffff);border-radius:var(--spacing-40, 2.5rem)}:host yoo-ion-scroll .document-image{display:-ms-flexbox;display:flex;-ms-flex-negative:0;flex-shrink:0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:var(--spacing-16, 1rem);overflow:hidden;--border-radius:var(--border-radius-08, 0.5rem)}:host yoo-ion-scroll yoo-progress-recap,:host yoo-ion-scroll yoo-points-recap{display:block;width:calc(100% - 2rem);max-width:30rem;margin:0 auto;padding:var(--spacing-08, 0.5rem)}:host .wall{position:absolute;width:100%;height:16rem;background-image:-webkit-gradient(linear, left bottom, left top, from(var(--light, #ffffff)), to(var(--stable-light, #f1f1f1)));background-image:linear-gradient(to top, var(--light, #ffffff), var(--stable-light, #f1f1f1));mix-blend-mode:multiply}:host yoo-lottie{height:12.5rem}:host yoo-tag{display:block;margin:0 auto}:host main{width:100%;padding-top:calc(var(--safe-area-inset-top) + var(--spacing-32, 2rem))}:host .answers{width:100%;padding-bottom:var(--spacing-16, 1rem)}:host .answers .title{padding:var(--spacing-08, 0.5rem) var(--spacing-16, 1rem);font-size:var(--font-size-24, 1.5rem)}";
|
|
12
12
|
|
|
13
13
|
const YooLessonQuestionResultComponent = class {
|
|
14
14
|
constructor(hostRef) {
|
|
@@ -113,7 +113,8 @@ const YooProfileListComponent = class {
|
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
115
|
renderTruncate(content, icon) {
|
|
116
|
-
|
|
116
|
+
const charLength = index$1.isWeb(this.host) ? 83 : 38;
|
|
117
|
+
return (index.h("div", { class: "user-info-list" }, index.h("div", { class: "start-container" }, index.h("yoo-icon", { name: icon, color: "dark" }), index.h("yoo-truncate", { content: content, maxLength: charLength, showEllipsisIcon: true, ellipsisIconSize: "medium" }))));
|
|
117
118
|
}
|
|
118
119
|
renderCollapsible(header, content) {
|
|
119
120
|
return (index.h("yoo-collapsible", { hasArrowIcon: !!content.length, icon: "tag", iconColor: "dark", iconSize: "medium", slotHeader: true }, index.h("div", { slot: "title" }, header === null || header === void 0 ? void 0 : header.map(tag => {
|
|
@@ -43,6 +43,7 @@ const YooTruncateComponent = class {
|
|
|
43
43
|
* Used more icon instead of text as ellipsis button.
|
|
44
44
|
*/
|
|
45
45
|
this.showEllipsisIcon = false;
|
|
46
|
+
this.ellipsisIconSize = 'small';
|
|
46
47
|
/**
|
|
47
48
|
* Alters how the <br> tag is handled for markdown
|
|
48
49
|
*/
|
|
@@ -64,7 +65,7 @@ const YooTruncateComponent = class {
|
|
|
64
65
|
return `<span class="more-button"> ${this.collapsed ? `... ${index$1.translate('MORE2')}` : index$1.translate('VIEWLESS')}</span>`;
|
|
65
66
|
};
|
|
66
67
|
this.getMoreIconHtml = () => {
|
|
67
|
-
return `<span><span>${this.collapsed ? '...' : ''}</span><yoo-icon class="more-button" name=${this.collapsed ? 'arrow-down' : 'arrow-up'} size="
|
|
68
|
+
return `<span><span>${this.collapsed ? '...' : ''}</span><yoo-icon class="more-button" name=${this.collapsed ? 'arrow-down' : 'arrow-up'} size="${this.ellipsisIconSize}" /></span>`;
|
|
68
69
|
};
|
|
69
70
|
}
|
|
70
71
|
onShowEllipsisButtonChanged() {
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @name: Truncate
|
|
3
|
-
* @author: Romain Panaget
|
|
4
|
-
*/
|
|
5
1
|
import { debounce, parseMarkDown, translate, truncateMarkdown } from '@shared/utils';
|
|
6
2
|
import { Component, Element, Event, h, Host, Prop, State, Watch } from '@stencil/core';
|
|
7
3
|
import { querySelectorDeep } from '../../../utils/helpers/common-helpers';
|
|
@@ -35,6 +31,7 @@ export class YooTruncateComponent {
|
|
|
35
31
|
* Used more icon instead of text as ellipsis button.
|
|
36
32
|
*/
|
|
37
33
|
this.showEllipsisIcon = false;
|
|
34
|
+
this.ellipsisIconSize = 'small';
|
|
38
35
|
/**
|
|
39
36
|
* Alters how the <br> tag is handled for markdown
|
|
40
37
|
*/
|
|
@@ -56,7 +53,7 @@ export class YooTruncateComponent {
|
|
|
56
53
|
return `<span class="more-button"> ${this.collapsed ? `... ${translate('MORE2')}` : translate('VIEWLESS')}</span>`;
|
|
57
54
|
};
|
|
58
55
|
this.getMoreIconHtml = () => {
|
|
59
|
-
return `<span><span>${this.collapsed ? '...' : ''}</span><yoo-icon class="more-button" name=${this.collapsed ? 'arrow-down' : 'arrow-up'} size="
|
|
56
|
+
return `<span><span>${this.collapsed ? '...' : ''}</span><yoo-icon class="more-button" name=${this.collapsed ? 'arrow-down' : 'arrow-up'} size="${this.ellipsisIconSize}" /></span>`;
|
|
60
57
|
};
|
|
61
58
|
}
|
|
62
59
|
onShowEllipsisButtonChanged() {
|
|
@@ -253,6 +250,29 @@ export class YooTruncateComponent {
|
|
|
253
250
|
"reflect": true,
|
|
254
251
|
"defaultValue": "false"
|
|
255
252
|
},
|
|
253
|
+
"ellipsisIconSize": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"mutable": false,
|
|
256
|
+
"complexType": {
|
|
257
|
+
"original": "TSize",
|
|
258
|
+
"resolved": "\"extra-extra-large\" | \"extra-large\" | \"extra-small\" | \"large\" | \"medium\" | \"small\"",
|
|
259
|
+
"references": {
|
|
260
|
+
"TSize": {
|
|
261
|
+
"location": "import",
|
|
262
|
+
"path": "@shared/interfaces"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"required": false,
|
|
267
|
+
"optional": false,
|
|
268
|
+
"docs": {
|
|
269
|
+
"tags": [],
|
|
270
|
+
"text": ""
|
|
271
|
+
},
|
|
272
|
+
"attribute": "ellipsis-icon-size",
|
|
273
|
+
"reflect": false,
|
|
274
|
+
"defaultValue": "'small'"
|
|
275
|
+
},
|
|
256
276
|
"content": {
|
|
257
277
|
"type": "string",
|
|
258
278
|
"mutable": false,
|
|
@@ -126,12 +126,12 @@ export class YooContextMenuDialogComponent {
|
|
|
126
126
|
]) : (h("span", { innerHTML: translateMulti(textContent) })));
|
|
127
127
|
}
|
|
128
128
|
renderRightActions(item) {
|
|
129
|
-
const { subMenu, isToggle, selectedFn, selected, handler, actionableIcon, actionableIcons
|
|
129
|
+
const { subMenu, isToggle, selectedFn, selected, handler, actionableIcon, actionableIcons } = item;
|
|
130
130
|
return [
|
|
131
131
|
!!(subMenu === null || subMenu === void 0 ? void 0 : subMenu.length) && h("yoo-icon", { class: "arrows", name: `arrow-${this.openSubMenuOnLeft ? 'left' : 'right'}` }),
|
|
132
132
|
isToggle && h("yoo-form-toggle", { size: "medium", value: (selectedFn === null || selectedFn === void 0 ? void 0 : selectedFn()) || selected, onInputChanged: () => handler === null || handler === void 0 ? void 0 : handler() }),
|
|
133
133
|
actionableIcon && h("yoo-icon", { size: (actionableIcon === null || actionableIcon === void 0 ? void 0 : actionableIcon.iconSize) || 'medium', class: "right-aligned", name: actionableIcon.icon, color: actionableIcon.iconColor, onClick: (ev) => this.onActionableIconClick(ev, actionableIcon) }),
|
|
134
|
-
actionableIcons === null || actionableIcons === void 0 ? void 0 : actionableIcons.map((action) => h("yoo-icon", { size: action.iconSize || 'medium', class: "right-aligned", name: icon, color: iconColor, onClick: (ev) => this.onActionableIconClick(ev, action) }))
|
|
134
|
+
actionableIcons === null || actionableIcons === void 0 ? void 0 : actionableIcons.map((action) => h("yoo-icon", { size: action.iconSize || 'medium', class: "right-aligned", name: action.icon, color: action.iconColor, onClick: (ev) => this.onActionableIconClick(ev, action) }))
|
|
135
135
|
];
|
|
136
136
|
}
|
|
137
137
|
renderItemContent(item) {
|
|
@@ -121,10 +121,11 @@ export class YooProfileListComponent {
|
|
|
121
121
|
}
|
|
122
122
|
}
|
|
123
123
|
renderTruncate(content, icon) {
|
|
124
|
+
const charLength = isWeb(this.host) ? 83 : 38;
|
|
124
125
|
return (h("div", { class: "user-info-list" },
|
|
125
126
|
h("div", { class: "start-container" },
|
|
126
127
|
h("yoo-icon", { name: icon, color: "dark" }),
|
|
127
|
-
h("yoo-
|
|
128
|
+
h("yoo-truncate", { content: content, maxLength: charLength, showEllipsisIcon: true, ellipsisIconSize: "medium" }))));
|
|
128
129
|
}
|
|
129
130
|
renderCollapsible(header, content) {
|
|
130
131
|
return (h("yoo-collapsible", { hasArrowIcon: !!content.length, icon: "tag", iconColor: "dark", iconSize: "medium", slotHeader: true },
|
|
@@ -17,7 +17,7 @@ export class YooFormCaptureComponent {
|
|
|
17
17
|
this.min = 1;
|
|
18
18
|
this.max = 1;
|
|
19
19
|
this.validators = [];
|
|
20
|
-
this.
|
|
20
|
+
this.isProcessingPhoto = true;
|
|
21
21
|
this.isSelectorMode = false;
|
|
22
22
|
this.selectedIndex = [];
|
|
23
23
|
this.overflowOffset = 4;
|
|
@@ -52,15 +52,7 @@ export class YooFormCaptureComponent {
|
|
|
52
52
|
this.emitOnUpdated = false;
|
|
53
53
|
}
|
|
54
54
|
async onPhotoUploadComplete() {
|
|
55
|
-
this.isUploadingPhoto = false;
|
|
56
55
|
this.currentUploadingStatus = translate('RECOGNIZINGIMAGES');
|
|
57
|
-
if (this.progressBarRef && this.progressBarRef.length > 0) {
|
|
58
|
-
this.progressBarRef.forEach((ref) => {
|
|
59
|
-
if (ref) {
|
|
60
|
-
ref.value = 100;
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
56
|
}
|
|
65
57
|
async onPhotoUploadProgressUpdate(progress, index) {
|
|
66
58
|
if (this.progressBarRef && this.progressBarRef[index]) {
|
|
@@ -81,6 +73,14 @@ export class YooFormCaptureComponent {
|
|
|
81
73
|
});
|
|
82
74
|
}
|
|
83
75
|
async processImageRecognitionResults(imageRecognitionResults, priceRecognitionResults) {
|
|
76
|
+
this.isProcessingPhoto = false;
|
|
77
|
+
if (this.progressBarRef && this.progressBarRef.length > 0) {
|
|
78
|
+
this.progressBarRef.forEach((ref) => {
|
|
79
|
+
if (ref) {
|
|
80
|
+
ref.value = 100;
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
84
|
if (!this.imageRecoCancelled) {
|
|
85
85
|
if (this.progressBarMainRef) {
|
|
86
86
|
this.progressBarMainRef.progressAnimationDuration = 0.5;
|
|
@@ -990,7 +990,7 @@ export class YooFormCaptureComponent {
|
|
|
990
990
|
return;
|
|
991
991
|
}
|
|
992
992
|
this.imageRecoCancelled = false;
|
|
993
|
-
this.
|
|
993
|
+
this.isProcessingPhoto = true;
|
|
994
994
|
if (this.isValueValid() && this.algorithm && !this.isProcessing) {
|
|
995
995
|
// emit image recognition event
|
|
996
996
|
this.currentUploadingStatus = translate('UPLOADINGPHOTOS');
|
|
@@ -1562,7 +1562,7 @@ export class YooFormCaptureComponent {
|
|
|
1562
1562
|
return (h("div", { class: "progressbar-wrapper" }, mainProgress
|
|
1563
1563
|
? [
|
|
1564
1564
|
this.currentUploadingStatus && (isUndefined(index) || !this.multiple) && h("div", { class: "text app-color" }, this.currentUploadingStatus),
|
|
1565
|
-
!this.
|
|
1565
|
+
!this.isProcessingPhoto && (h("div", { class: "main-wrapper" },
|
|
1566
1566
|
h("yoo-progress-bar", { value: 100, hideProgressValue: true, listenToProgress: true, listenToCompleteProgress: true, disableBackProgressAnimation: true, progressAnimationDuration: this.progressTime, onValueChanged: (ev) => onProgressUpdating(ev), onProgressFinished: (ev) => onProgressFinished(ev), ref: (el) => (this.progressBarMainRef = el) })))
|
|
1567
1567
|
]
|
|
1568
1568
|
: [
|
|
@@ -2581,7 +2581,7 @@ export class YooFormCaptureComponent {
|
|
|
2581
2581
|
static get states() { return {
|
|
2582
2582
|
"validity": {},
|
|
2583
2583
|
"isProcessing": {},
|
|
2584
|
-
"
|
|
2584
|
+
"isProcessingPhoto": {},
|
|
2585
2585
|
"showImageLoader": {},
|
|
2586
2586
|
"imageRecognitionResults": {},
|
|
2587
2587
|
"isSelectorMode": {},
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { isChromatic, translate, translateMulti } from '@shared/utils';
|
|
2
|
-
import { Component, Element, Event, h, Host, Prop, State
|
|
2
|
+
import { Component, Element, Event, h, Host, Prop, State } from '@stencil/core';
|
|
3
3
|
import { setColorSVG } from '../../../../utils/helpers/common-helpers';
|
|
4
|
-
import { hasWarnings, isSelected, onItemSelect, prepareChoice
|
|
4
|
+
import { hasWarnings, isSelected, onItemSelect, prepareChoice } from '../form-choice-helpers';
|
|
5
5
|
import { ReadonlyCard } from '../readonly-card/readonly-card';
|
|
6
6
|
export class YooFormChoiceCardComponent {
|
|
7
7
|
constructor() {
|
|
@@ -13,12 +13,6 @@ export class YooFormChoiceCardComponent {
|
|
|
13
13
|
this.imgElements = [];
|
|
14
14
|
this.choices = [];
|
|
15
15
|
}
|
|
16
|
-
onValuesChanged(newValues, oldValues) {
|
|
17
|
-
updateValues(newValues, oldValues, this);
|
|
18
|
-
}
|
|
19
|
-
onValueChanged(newValue, oldValue) {
|
|
20
|
-
updateValue(newValue, oldValue, this);
|
|
21
|
-
}
|
|
22
16
|
componentWillLoad() {
|
|
23
17
|
var _a;
|
|
24
18
|
prepareChoice(this);
|
|
@@ -60,7 +54,10 @@ export class YooFormChoiceCardComponent {
|
|
|
60
54
|
return h("yoo-icon", { name: "check" });
|
|
61
55
|
}
|
|
62
56
|
renderSelect(item, index) {
|
|
63
|
-
const selected = isSelected(
|
|
57
|
+
const selected = ((isSelected('true', this.selection) && index === 0) ||
|
|
58
|
+
(isSelected('false', this.selection) && index === 0) ||
|
|
59
|
+
isSelected(item.value || item.title, this.selection) ||
|
|
60
|
+
isSelected(item || item.title, this.selection));
|
|
64
61
|
return (h("div", { class: { 'select': true, selected }, style: { ...(this.maxWidth > 0 && { maxWidth: `${this.maxWidth}px` }) }, onClick: () => onItemSelect(item.value || item.title, this) },
|
|
65
62
|
this.renderCardContent(item, selected, index),
|
|
66
63
|
!item.image &&
|
|
@@ -424,11 +421,4 @@ export class YooFormChoiceCardComponent {
|
|
|
424
421
|
}
|
|
425
422
|
}]; }
|
|
426
423
|
static get elementRef() { return "host"; }
|
|
427
|
-
static get watchers() { return [{
|
|
428
|
-
"propName": "values",
|
|
429
|
-
"methodName": "onValuesChanged"
|
|
430
|
-
}, {
|
|
431
|
-
"propName": "value",
|
|
432
|
-
"methodName": "onValueChanged"
|
|
433
|
-
}]; }
|
|
434
424
|
}
|
|
@@ -86,6 +86,7 @@ export class YooFormCreatorComponent {
|
|
|
86
86
|
this.restrictionConditionSelectedTab = 0;
|
|
87
87
|
this.expandedConditions = [];
|
|
88
88
|
this.isPageReordering = false;
|
|
89
|
+
this.pagesReordered = false;
|
|
89
90
|
this.onInsertPageAfterClicked = (event) => {
|
|
90
91
|
if (event) {
|
|
91
92
|
this.onAddNewPage(event.detail + 1);
|
|
@@ -104,12 +105,14 @@ export class YooFormCreatorComponent {
|
|
|
104
105
|
this.removeOverlays();
|
|
105
106
|
}
|
|
106
107
|
else {
|
|
107
|
-
this.
|
|
108
|
-
this.
|
|
109
|
-
this.hasPageChanged = event.detail;
|
|
110
|
-
this.resetExpandableBlockReferences();
|
|
108
|
+
this.selectPage(event.detail);
|
|
109
|
+
this.pagesReordered = false;
|
|
111
110
|
}
|
|
112
111
|
};
|
|
112
|
+
this.onPageOrderChanged = (event) => {
|
|
113
|
+
this.selectPage(event.detail.indexTo);
|
|
114
|
+
this.pagesReordered = true;
|
|
115
|
+
};
|
|
113
116
|
this.onDuplicatePageClicked = (event) => {
|
|
114
117
|
var _a, _b, _c, _d;
|
|
115
118
|
if (event) {
|
|
@@ -353,7 +356,12 @@ export class YooFormCreatorComponent {
|
|
|
353
356
|
});
|
|
354
357
|
this.currentExpandedBlockLocation = { slideIndex, itemIndex };
|
|
355
358
|
this.expandedFieldName = event.detail.name || this.expandedFieldName;
|
|
356
|
-
this.
|
|
359
|
+
if (!this.pagesReordered) {
|
|
360
|
+
this.scrollToField(itemIndex);
|
|
361
|
+
}
|
|
362
|
+
else {
|
|
363
|
+
this.pagesReordered = false;
|
|
364
|
+
}
|
|
357
365
|
}
|
|
358
366
|
else if (!event.detail.expanded && this.currentExpandedBlockLocation && itemIndex === this.currentExpandedBlockLocation.itemIndex) {
|
|
359
367
|
this.currentExpandedBlockLocation = null;
|
|
@@ -945,6 +953,12 @@ export class YooFormCreatorComponent {
|
|
|
945
953
|
}
|
|
946
954
|
this.shouldRenderLeftSelectionContent = true;
|
|
947
955
|
}
|
|
956
|
+
selectPage(pageIndex) {
|
|
957
|
+
this.selectedPageIndex = pageIndex;
|
|
958
|
+
this.pageHeaderClicked.emit(pageIndex);
|
|
959
|
+
this.hasPageChanged = pageIndex;
|
|
960
|
+
this.resetExpandableBlockReferences();
|
|
961
|
+
}
|
|
948
962
|
updateGlobalActions() {
|
|
949
963
|
this.selectedMoveActions = setBlockSelection(this.itemList, null, (slideIndex, _itemIndex, itemId) => this.moveSelectedFields(itemId, slideIndex), {
|
|
950
964
|
extraStartingItems: [
|
|
@@ -2126,7 +2140,7 @@ export class YooFormCreatorComponent {
|
|
|
2126
2140
|
}
|
|
2127
2141
|
], iconPairLeft: ARROW_PAIR, showBottomBorder: true, forceEntryUpdate: true, allowMultipleSelection: true, onAccordionSelected: (event) => this.onPagesAccordionSelected(event) },
|
|
2128
2142
|
h("div", { slot: "PAGES" },
|
|
2129
|
-
h("yoo-form-creator-page-card-list", { scoringMode: isScoring(this.selectedLeftMenuOption) ? this.selectedScoring : null, missionSlides: this.currentSlides, selectedPageIndex: this.selectedPageIndex, onPageClicked: this.onPageClicked, onDuplicatePageClicked: this.onDuplicatePageClicked, onInsertPageAfterClicked: this.onInsertPageAfterClicked, onDeletePageClicked: this.onDeletePageClicked, onEditPageClicked: this.onEditPageClicked, onAddSiteTagRestrictionClicked: this.onAddSiteTagRestrictionClicked, onAddUserGroupRestrictionClicked: this.onAddUserGroupRestrictionClicked, onReorderEnded: () => {
|
|
2143
|
+
h("yoo-form-creator-page-card-list", { scoringMode: isScoring(this.selectedLeftMenuOption) ? this.selectedScoring : null, missionSlides: this.currentSlides, selectedPageIndex: this.selectedPageIndex, onPageClicked: this.onPageClicked, onDuplicatePageClicked: this.onDuplicatePageClicked, onInsertPageAfterClicked: this.onInsertPageAfterClicked, onDeletePageClicked: this.onDeletePageClicked, onEditPageClicked: this.onEditPageClicked, onAddSiteTagRestrictionClicked: this.onAddSiteTagRestrictionClicked, onAddUserGroupRestrictionClicked: this.onAddUserGroupRestrictionClicked, onPageOrderChanged: this.onPageOrderChanged, onReorderEnded: () => {
|
|
2130
2144
|
this.isPageReordering = false;
|
|
2131
2145
|
}, onReorderStarted: () => {
|
|
2132
2146
|
this.isPageReordering = true;
|
|
@@ -2324,7 +2338,7 @@ export class YooFormCreatorComponent {
|
|
|
2324
2338
|
}
|
|
2325
2339
|
renderLivePreview() {
|
|
2326
2340
|
var _a;
|
|
2327
|
-
return (h("yoo-form-creator-live-preview", { ref: (el) => (this.livePreviewElement = el), mode: "panel", showShare: this.showShare, onShared: (ev) => { ev.stopPropagation(); this.shared.emit(); }, hidden: this.isLivePreviewHidden, showDevices: false, missionDescriptionTitle: this.missDescDisplayTitle, onVisibilityToggled: () => (this.isLivePreviewHidden = !this.isLivePreviewHidden), availableLanguages: ((_a = this.translations) === null || _a === void 0 ? void 0 : _a.length) ? [...this.selectedLanguages, this.baseLanguage] : [], selectedLanguage: this.baseLanguage, onLanguageChanged: (ev) => this.onDisplayLanguageChanged(ev) },
|
|
2341
|
+
return (h("yoo-form-creator-live-preview", { ref: (el) => (this.livePreviewElement = el), mode: "panel", showShare: this.showShare, onShared: (ev) => { ev.stopPropagation(); this.shared.emit(); }, hidden: this.isLivePreviewHidden, showDevices: false, missionDescriptionTitle: this.missDescDisplayTitle, onVisibilityToggled: () => (this.isLivePreviewHidden = !this.isLivePreviewHidden), availableLanguages: ((_a = this.translations) === null || _a === void 0 ? void 0 : _a.length) ? [...this.selectedLanguages, this.baseLanguage] : [], selectedLanguage: this.displayLanguage ? this.displayLanguage : this.baseLanguage, onLanguageChanged: (ev) => this.onDisplayLanguageChanged(ev) },
|
|
2328
2342
|
h("div", { class: "slot-container", slot: "livePreview" },
|
|
2329
2343
|
h("slot", { name: "livePreview" }))));
|
|
2330
2344
|
}
|
|
@@ -101,7 +101,6 @@ export class YooFormCreatorPageCardListComponent {
|
|
|
101
101
|
const indexSlideTo = sortEvent.indexTo - 1 >= 0 ? sortEvent.indexTo - 1 : 0;
|
|
102
102
|
this.pageOrderChanged.emit(sortEvent);
|
|
103
103
|
this.pageCardsParentEl.slideTo(indexSlideTo);
|
|
104
|
-
this.pageClicked.emit(sortEvent.indexTo);
|
|
105
104
|
};
|
|
106
105
|
}
|
|
107
106
|
renderPageCards() {
|
package/dist/collection/feature-learn/learning/lesson-question-result/lesson-question-result.css
CHANGED
|
@@ -287,7 +287,6 @@ null: CSS defaults to use the ltr css, and adds [dir=rtl] selectors to override
|
|
|
287
287
|
display: flex;
|
|
288
288
|
flex-direction: column;
|
|
289
289
|
align-items: center;
|
|
290
|
-
width: var(--spacing-56, 3.5rem);
|
|
291
290
|
margin: var(--spacing-08, 0.5rem) 0;
|
|
292
291
|
font-size: var(--font-size-12, 0.75rem);
|
|
293
292
|
}
|
|
@@ -241,6 +241,7 @@ export function mapCustomViewToButton(c, currentCustomView, session, authenticat
|
|
|
241
241
|
? {
|
|
242
242
|
icon: 'pen',
|
|
243
243
|
iconColor: 'stable',
|
|
244
|
+
iconSize: 'small',
|
|
244
245
|
handler: () => customViewSaved(c)
|
|
245
246
|
}
|
|
246
247
|
: null,
|
|
@@ -248,6 +249,7 @@ export function mapCustomViewToButton(c, currentCustomView, session, authenticat
|
|
|
248
249
|
? {
|
|
249
250
|
icon: 'delete',
|
|
250
251
|
iconColor: 'stable',
|
|
252
|
+
iconSize: 'small',
|
|
251
253
|
handler: () => customViewRemoved(c)
|
|
252
254
|
}
|
|
253
255
|
: null
|