@yoobic/yobi 8.5.0-63 → 8.5.0-65
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/{form-choice-helpers-b3d03d83.js → form-choice-helpers-7911fdac.js} +1 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/yoo-chart.cjs.entry.js +618 -15
- package/dist/cjs/yoo-chat.cjs.entry.js +7 -13
- package/dist/cjs/yoo-entity-query-builder.cjs.entry.js +5 -10
- package/dist/cjs/yoo-form-autocomplete-dialog.cjs.entry.js +1 -0
- package/dist/cjs/yoo-form-autocomplete.cjs.entry.js +7 -7
- package/dist/cjs/yoo-form-choice-button.cjs.entry.js +5 -6
- package/dist/cjs/yoo-form-choice-card.cjs.entry.js +1 -2
- package/dist/cjs/yoo-form-choice-chat.cjs.entry.js +1 -2
- package/dist/cjs/yoo-form-choice-image.cjs.entry.js +1 -2
- package/dist/cjs/yoo-form-choice-radio.cjs.entry.js +1 -2
- package/dist/cjs/yoo-grid-calendar.cjs.entry.js +1 -2
- package/dist/cjs/yoo-grid.cjs.entry.js +12 -29
- package/dist/cjs/yoo-photo-editor.cjs.entry.js +11 -5
- package/dist/cjs/yoo-slides-media.cjs.entry.js +5 -8
- package/dist/collection/components/3.organisms/photo-editor/components/menu.js +3 -3
- package/dist/collection/components/3.organisms/photo-editor/photo-editor.js +27 -2
- package/dist/collection/components/entities/entity-query-builder/entity-query-builder.js +5 -10
- package/dist/collection/components/form/form-autocomplete/form-autocomplete.js +9 -9
- package/dist/collection/components/form/form-autocomplete-dialog/form-autocomplete-dialog.js +11 -5
- package/dist/collection/components/form/form-choice/button/form-choice-button.js +1 -1
- package/dist/collection/components/form/form-choice/readonly-card/readonly-card.js +1 -1
- package/dist/collection/components/form/slides-media/slides-media.css +1 -0
- package/dist/collection/components/form/slides-media/slides-media.js +4 -7
- package/dist/collection/components/grid/grid/grid.js +22 -34
- package/dist/collection/components/grid/grid-calendar/grid-calendar.js +1 -2
- package/dist/collection/feature-communicate/chat/chat/chat.js +8 -14
- package/dist/collection/interfaces/ui/index.js +0 -1
- package/dist/design-system/design-system.esm.js +1 -1
- package/dist/{esm/form-choice-helpers-47f8f7a0.js → design-system/form-choice-helpers-a204024f.js} +2 -3
- package/dist/design-system/yoo-chart.entry.js +604 -1
- package/dist/design-system/yoo-chat.entry.js +8 -14
- package/dist/design-system/yoo-entity-query-builder.entry.js +5 -10
- package/dist/design-system/yoo-form-autocomplete-dialog.entry.js +1 -0
- package/dist/design-system/yoo-form-autocomplete.entry.js +8 -8
- package/dist/design-system/yoo-form-choice-button.entry.js +5 -6
- package/dist/design-system/yoo-form-choice-card.entry.js +1 -2
- package/dist/design-system/yoo-form-choice-chat.entry.js +1 -2
- package/dist/design-system/yoo-form-choice-image.entry.js +1 -2
- package/dist/design-system/yoo-form-choice-radio.entry.js +1 -2
- package/dist/design-system/yoo-grid-calendar.entry.js +2 -3
- package/dist/design-system/yoo-grid.entry.js +13 -30
- package/dist/design-system/yoo-photo-editor.entry.js +11 -5
- package/dist/design-system/yoo-slides-media.entry.js +5 -8
- package/dist/esm/design-system.js +1 -1
- package/dist/{design-system/form-choice-helpers-47f8f7a0.js → esm/form-choice-helpers-a204024f.js} +2 -3
- package/dist/esm/loader.js +1 -1
- package/dist/esm/yoo-chart.entry.js +604 -1
- package/dist/esm/yoo-chat.entry.js +8 -14
- package/dist/esm/yoo-entity-query-builder.entry.js +5 -10
- package/dist/esm/yoo-form-autocomplete-dialog.entry.js +1 -0
- package/dist/esm/yoo-form-autocomplete.entry.js +8 -8
- package/dist/esm/yoo-form-choice-button.entry.js +5 -6
- package/dist/esm/yoo-form-choice-card.entry.js +1 -2
- package/dist/esm/yoo-form-choice-chat.entry.js +1 -2
- package/dist/esm/yoo-form-choice-image.entry.js +1 -2
- package/dist/esm/yoo-form-choice-radio.entry.js +1 -2
- package/dist/esm/yoo-grid-calendar.entry.js +2 -3
- package/dist/esm/yoo-grid.entry.js +13 -30
- package/dist/esm/yoo-photo-editor.entry.js +11 -5
- package/dist/esm/yoo-slides-media.entry.js +5 -8
- package/dist/types/components/3.organisms/photo-editor/photo-editor.d.ts +4 -0
- package/dist/types/components/form/form-autocomplete/form-autocomplete.d.ts +1 -1
- package/dist/types/components/form/form-autocomplete-dialog/form-autocomplete-dialog.d.ts +1 -1
- package/dist/types/components/grid/grid/grid.d.ts +2 -3
- package/dist/types/components.d.ts +8 -4
- package/dist/types/feature-communicate/chat/chat/chat.d.ts +2 -3
- package/dist/types/interfaces/ui/index.d.ts +0 -1
- package/package.json +1 -1
- package/dist/cjs/highcharts-874d9bd2.js +0 -609
- package/dist/collection/interfaces/ui/form-filter.interface.js +0 -1
- package/dist/design-system/highcharts-c1be7540.js +0 -607
- package/dist/esm/highcharts-c1be7540.js +0 -607
- package/dist/types/components/form/image-cropper-dialog/pintura/pintura.d.ts +0 -1236
- package/dist/types/interfaces/ui/form-filter.interface.d.ts +0 -5
@@ -86,14 +86,8 @@ export class YooEntityQueryBuilderComponent {
|
|
86
86
|
return ((_b = (_a = this.values) === null || _a === void 0 ? void 0 : _a.filters) === null || _b === void 0 ? void 0 : _b.length) > 0 || ((_d = (_c = this.values) === null || _c === void 0 ? void 0 : _c.advancedFilters) === null || _d === void 0 ? void 0 : _d.length) > 0;
|
87
87
|
}
|
88
88
|
getActiveFiltersCount() {
|
89
|
-
|
90
|
-
|
91
|
-
return sum(this.values.advancedFilters.map((f) => (f === null || f === void 0 ? void 0 : f.length) || 0));
|
92
|
-
}
|
93
|
-
else if (((_d = (_c = this.values) === null || _c === void 0 ? void 0 : _c.filters) === null || _d === void 0 ? void 0 : _d.length) > 0) {
|
94
|
-
return this.values.filters.length;
|
95
|
-
}
|
96
|
-
return 0;
|
89
|
+
const { advancedFilters, filters } = this.values || {};
|
90
|
+
return ((advancedFilters === null || advancedFilters === void 0 ? void 0 : advancedFilters.length) ? sum(advancedFilters.map((filter) => (filter === null || filter === void 0 ? void 0 : filter.length) || 0)) : filters === null || filters === void 0 ? void 0 : filters.length) || 0;
|
97
91
|
}
|
98
92
|
isFilterField(f) {
|
99
93
|
return filterIsRadio(f) || filterIsAutocomplete(f) || filterIsSegement(f) || filterIsAutocompleteLocal(f) || filterIsBoolean(f) || filterIsDate(f) || filterIsText(f) || filterIsNumber(f);
|
@@ -168,6 +162,7 @@ export class YooEntityQueryBuilderComponent {
|
|
168
162
|
if (values.length > 0 || (values && field.type === FormFieldType.missionfield)) {
|
169
163
|
this.values.filters.push(filterFromFormField(field, values, this.filterAutocompleteOperator));
|
170
164
|
}
|
165
|
+
this.values = cloneDeep(this.values);
|
171
166
|
this.onEmitValues();
|
172
167
|
}
|
173
168
|
onAutocompleteChangeAdvanced(ev, index) {
|
@@ -303,7 +298,7 @@ export class YooEntityQueryBuilderComponent {
|
|
303
298
|
}
|
304
299
|
renderFiltersHeader() {
|
305
300
|
const count = this.getActiveFiltersCount();
|
306
|
-
return h("div", { class: "filters-header" }, h("div", { class: "counter" }, translate('YOOBICFILTERSAPPLIED', { smart_count: count })), h("div", { class: "clear-all" },
|
301
|
+
return h("div", { class: "filters-header" }, h("div", { class: "counter" }, translate('YOOBICFILTERSAPPLIED', { smart_count: count })), h("div", { class: "clear-all" }, h("yoo-button", { size: this.size, color: "app-color", disabled: !count, fill: "transparent", onClick: () => this.onClear() }, translate('CLEARALL'))));
|
307
302
|
}
|
308
303
|
renderFilters() {
|
309
304
|
var _a, _b;
|
@@ -387,7 +382,7 @@ export class YooEntityQueryBuilderComponent {
|
|
387
382
|
const count = this.getActiveFiltersCount();
|
388
383
|
return [
|
389
384
|
(customViewsButtons === null || customViewsButtons === void 0 ? void 0 : customViewsButtons.length) > 0 && (h("yoo-context-menu", { contentButtons: customViewsButtons, placement: "right", class: "customview-menu width-unset" }, h("div", { class: "header width-auto" }, h("div", { class: { title: true, 'app-color': !!this.customView } }, translate('SAVEDFILTERS')), h("yoo-icon", { name: "right-web", color: "stable", size: "medium" })))),
|
390
|
-
h("div", { class: "header" }, h("div", { class: "title" }, translate('FILTERS', { count })), h("yoo-button", { size: this.size, color:
|
385
|
+
h("div", { class: "header" }, h("div", { class: "title" }, translate('FILTERS', { count })), h("yoo-button", { size: this.size, color: "app-color", fill: "transparent", disabled: !count, onClick: () => this.onClear() }, translate('CLEARALL')))
|
391
386
|
];
|
392
387
|
}
|
393
388
|
renderDialogFooter() {
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import { FormFieldType } from '@shared/interfaces';
|
1
|
+
import { FormFieldType, FormFilterAutocompleteOperator } from '@shared/interfaces';
|
2
2
|
import { findParent, getAsyncExtraData, getModalAnimation, getRandomFileName, groupsResolver, isImage, isIonic, isNullOrUndefined, isPresent, isValid, isWeb, MONGODB_ID_REGEX, resizeImage, showAlert, showModal, translate, translateMulti } from '@shared/utils';
|
3
3
|
import { h, Host } from '@stencil/core';
|
4
4
|
import { compact, isArray, isNumber, isString, uniq } from 'lodash-es';
|
@@ -204,6 +204,7 @@ export class YooFormAutocompleteComponent {
|
|
204
204
|
}
|
205
205
|
componentWillLoad() {
|
206
206
|
var _a, _b;
|
207
|
+
this.isFilter && !this.filterOperator && this.selectFilterOperator(FormFilterAutocompleteOperator.is);
|
207
208
|
this.updateSelection(true);
|
208
209
|
if (this.showDropdownOnLoad) {
|
209
210
|
this.showDropdownContent = this.showDropdownOnLoad;
|
@@ -629,7 +630,7 @@ export class YooFormAutocompleteComponent {
|
|
629
630
|
});
|
630
631
|
this.dialog.addEventListener('filterRadioToggled', (ev) => {
|
631
632
|
ev.stopPropagation();
|
632
|
-
this.
|
633
|
+
this.selectFilterOperator(ev.detail);
|
633
634
|
});
|
634
635
|
let modalOptions = { half: !isWeb(this.host) };
|
635
636
|
if (isExpanding) {
|
@@ -683,7 +684,8 @@ export class YooFormAutocompleteComponent {
|
|
683
684
|
this.currentSelectedTags = ev.detail;
|
684
685
|
await this.fetch();
|
685
686
|
}
|
686
|
-
|
687
|
+
selectFilterOperator(operator) {
|
688
|
+
this.filterOperator = operator;
|
687
689
|
this.extraDataChanged.emit(operator);
|
688
690
|
}
|
689
691
|
async onFileChanges(ev) {
|
@@ -892,7 +894,6 @@ export class YooFormAutocompleteComponent {
|
|
892
894
|
var _a, _b, _c, _d, _e, _f, _g;
|
893
895
|
const isPopulatedQuery = isArray(this.value) ? ((_a = this.value.find((v) => v === null || v === void 0 ? void 0 : v.total)) === null || _a === void 0 ? void 0 : _a.total) > 0 : ((_b = this.value) === null || _b === void 0 ? void 0 : _b.total) > 0;
|
894
896
|
const valueTotal = isArray(this.value) ? (_c = this.value.find((v) => v === null || v === void 0 ? void 0 : v.total)) === null || _c === void 0 ? void 0 : _c.total : (_d = this.value) === null || _d === void 0 ? void 0 : _d.total;
|
895
|
-
const selectedOperator = this.filterOperator || 'in';
|
896
897
|
if (this.idOnly && ((_e = this.value) === null || _e === void 0 ? void 0 : _e.length) > 0 && isString(this.value[0]) && !this.idOnlyInitialSelection) {
|
897
898
|
this.forceSelectedContentIdOnlyReload = true;
|
898
899
|
}
|
@@ -904,7 +905,7 @@ export class YooFormAutocompleteComponent {
|
|
904
905
|
if (this.entityType === 'groups' && !this.returnQuery) {
|
905
906
|
groupSelection = (_f = this.selection) === null || _f === void 0 ? void 0 : _f.filter((value) => { var _a, _b; return (value === null || value === void 0 ? void 0 : value.title) ? !((_a = value === null || value === void 0 ? void 0 : value.title) === null || _a === void 0 ? void 0 : _a.match(MONGODB_ID_REGEX)) : (value === null || value === void 0 ? void 0 : value._id) && !(value === null || value === void 0 ? void 0 : value.title) ? !((_b = value === null || value === void 0 ? void 0 : value._id) === null || _b === void 0 ? void 0 : _b.match(MONGODB_ID_REGEX)) : !(value === null || value === void 0 ? void 0 : value.match(MONGODB_ID_REGEX)); });
|
906
907
|
}
|
907
|
-
return (h("div", { class: { 'entity-content': true, selected: true, 'icon-prefix': hasIconPrefix } }, `${this.isFilter ?
|
908
|
+
return (h("div", { class: { 'entity-content': true, selected: true, 'icon-prefix': hasIconPrefix } }, `${this.isFilter ? this.filterOperator : ''} ${this.entityType !== 'groups' ? (_g = this.selection) === null || _g === void 0 ? void 0 : _g.length : groupSelection === null || groupSelection === void 0 ? void 0 : groupSelection.length} ${translate(this.setPrefixedEntityType(entityType).toUpperCase())} ${translate(this.multipleSelectionSuffix)}`));
|
908
909
|
}
|
909
910
|
renderUnselectedEntites(entityType, hasIconPrefix) {
|
910
911
|
const filesPlaceholder = isWeb(this.host) ? translate('FORMFIELDDEFINITIONDOCUMENTPLACEHOLDER') : translate('SELECTFILES');
|
@@ -922,7 +923,6 @@ export class YooFormAutocompleteComponent {
|
|
922
923
|
}
|
923
924
|
renderEntities(hasIconPrefix, cardTagSingle = false) {
|
924
925
|
var _a;
|
925
|
-
const selectedOperator = this.filterOperator || 'in';
|
926
926
|
return (h("div", { class: { 'entity-container': true, empty: !this.selection || this.selection.length <= 0, prefix: hasIconPrefix } }, (_a = this.selection) === null || _a === void 0 ? void 0 : _a.map((selection, i) => {
|
927
927
|
var _a, _b;
|
928
928
|
let entitySelection = selection;
|
@@ -944,7 +944,7 @@ export class YooFormAutocompleteComponent {
|
|
944
944
|
}
|
945
945
|
const title = (entitySelection === null || entitySelection === void 0 ? void 0 : entitySelection.title) || entitySelection;
|
946
946
|
return (entitySelection && [
|
947
|
-
h("div", { class: { 'single-entity-container': this.isFilter } }, h("div", { class: "operator-container" }, `${this.isFilter ?
|
947
|
+
h("div", { class: { 'single-entity-container': this.isFilter } }, h("div", { class: "operator-container" }, `${this.isFilter ? this.filterOperator : ''}`), h("yoo-entity", { class: {
|
948
948
|
'autocomplete autocomplete-selected': true,
|
949
949
|
last: i === this.selection.length - 1,
|
950
950
|
bold: this.color === 'transparent',
|
@@ -989,7 +989,7 @@ export class YooFormAutocompleteComponent {
|
|
989
989
|
await this.fetch(ev.detail);
|
990
990
|
}, onFieldFetchData: (ev) => this.onFetchFieldFilterData(ev), onSortsAndFiltersChange: (ev) => this.onSortsAndFiltersChange(ev), onCurrentPageChanged: (ev) => this.onCurrentPageChange(ev === null || ev === void 0 ? void 0 : ev.detail), hideHeader: isNullOrUndefined(this.hideHeader) ? false : this.hideHeader, showSearch: !this.forceHideSearch && (this.initialValueLength > minValuesForSearch || this.allowCustomTag || this.allowCustomValue || this.entityType === 'googlemaps'), isLocal: this.isLocal, onGridExpanded: () => this.onExpandGrid(), useTranslate: this.useTranslate, initialSelection: this.returnQuery ? null : [].concat(isPresent(this.value) ? this.value : []), idOnly: this.idOnly || this.allowCustomTag, idAttributeName: this.idAttributeName || '_id', emptyState: this.emptyState, allowCustomTag: (this.allowCustomTag || this.tag || this.allowCustomValue) && !this.forceDisableCustomTags, searchBarPlaceholder: (this.allowCustomTag || this.allowCustomValue) && !this.forceDisableCustomTags
|
991
991
|
? translate(this.isLocal ? 'AUTOCOMPLETESEARCHADD' : 'SEARCHORADD')
|
992
|
-
: translate('SEARCH'), tags: this.tags, forceHideSearch: this.forceHideSearch, maxSelectionNumber: this.max, customModel: this.customModel, addNewTagText: this.entityType === 'emails' ? translate('ADDNEWEMAIL') : this.searchText, model: this.model, hideAdvancedFilters: !this.model, hideRefreshButton: true, showFilters: false, onTagsSelect: (ev) => this.onTagsSelect(ev), isCollapsible: false, onAddNewTagPressed: (ev) => this.onCustomTagCreated(ev), disableSingleDeselection: this.disableSingleDeselection, idOnlyInitialSelection: this.idOnlyInitialSelection, isLoading: this.isLoading, valuesColor: this.valuesColor, total: this.total, returnQuery: this.returnQuery, showSelectAll: this.returnQuery, initialQuery: this.returnQuery ? this.value : null, sortsAndFilters: this.returnQuery ? (_c = this.value) === null || _c === void 0 ? void 0 : _c.sortsAndFilters : null, onFileUpload: () => { var _a; return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.click(); }, isUploading: this.isUploading, showFormRadio: this.isFilter, selectedFilterOperator: this.filterOperator, onFormRadioToggled: (ev) => this.
|
992
|
+
: translate('SEARCH'), tags: this.tags, forceHideSearch: this.forceHideSearch, maxSelectionNumber: this.max, customModel: this.customModel, addNewTagText: this.entityType === 'emails' ? translate('ADDNEWEMAIL') : this.searchText, model: this.model, hideAdvancedFilters: !this.model, hideRefreshButton: true, showFilters: false, onTagsSelect: (ev) => this.onTagsSelect(ev), isCollapsible: false, onAddNewTagPressed: (ev) => this.onCustomTagCreated(ev), disableSingleDeselection: this.disableSingleDeselection, idOnlyInitialSelection: this.idOnlyInitialSelection, isLoading: this.isLoading, valuesColor: this.valuesColor, total: this.total, returnQuery: this.returnQuery, showSelectAll: this.returnQuery, initialQuery: this.returnQuery ? this.value : null, sortsAndFilters: this.returnQuery ? (_c = this.value) === null || _c === void 0 ? void 0 : _c.sortsAndFilters : null, onFileUpload: () => { var _a; return (_a = this.inputElement) === null || _a === void 0 ? void 0 : _a.click(); }, isUploading: this.isUploading, showFormRadio: this.isFilter, selectedFilterOperator: this.filterOperator, onFormRadioToggled: (ev) => this.selectFilterOperator(ev.detail), onMaxPageCountChanged: (ev) => (this.maxPage = Math.max(ev.detail, this.maxPage)), onSearchedItemSelected: (ev) => this.updateSearchedItemSelection(ev), onValidityChanged: (ev) => this.onValidityChanged(ev), infiniteScrollDisabled: this.infiniteScrollDisabled }))))))));
|
993
993
|
}
|
994
994
|
renderReadonly() {
|
995
995
|
if (this.selection && this.selection.length > 0) {
|
@@ -1900,7 +1900,7 @@ export class YooFormAutocompleteComponent {
|
|
1900
1900
|
},
|
1901
1901
|
"filterOperator": {
|
1902
1902
|
"type": "string",
|
1903
|
-
"mutable":
|
1903
|
+
"mutable": true,
|
1904
1904
|
"complexType": {
|
1905
1905
|
"original": "FormFilterAutocompleteOperator",
|
1906
1906
|
"resolved": "FormFilterAutocompleteOperator.is | FormFilterAutocompleteOperator.isNot",
|
package/dist/collection/components/form/form-autocomplete-dialog/form-autocomplete-dialog.js
CHANGED
@@ -257,6 +257,7 @@ export class YooFormAutocompleteDialogComponent {
|
|
257
257
|
}
|
258
258
|
onFilterRadioToggled(ev) {
|
259
259
|
ev.stopPropagation();
|
260
|
+
this.selectedFilterOperator = ev.detail;
|
260
261
|
this.filterRadioToggled.emit(ev.detail);
|
261
262
|
}
|
262
263
|
getEntityType() {
|
@@ -667,14 +668,19 @@ export class YooFormAutocompleteDialogComponent {
|
|
667
668
|
},
|
668
669
|
"selectedFilterOperator": {
|
669
670
|
"type": "string",
|
670
|
-
"mutable":
|
671
|
+
"mutable": true,
|
671
672
|
"complexType": {
|
672
|
-
"original": "
|
673
|
-
"resolved": "
|
674
|
-
"references": {
|
673
|
+
"original": "FormFilterAutocompleteOperator",
|
674
|
+
"resolved": "FormFilterAutocompleteOperator.is | FormFilterAutocompleteOperator.isNot",
|
675
|
+
"references": {
|
676
|
+
"FormFilterAutocompleteOperator": {
|
677
|
+
"location": "import",
|
678
|
+
"path": "@shared/interfaces"
|
679
|
+
}
|
680
|
+
}
|
675
681
|
},
|
676
682
|
"required": false,
|
677
|
-
"optional":
|
683
|
+
"optional": true,
|
678
684
|
"docs": {
|
679
685
|
"tags": [],
|
680
686
|
"text": ""
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { translate, translateMulti } from '@shared/utils';
|
2
2
|
import { h, Host } from '@stencil/core';
|
3
|
-
import { isString } from '
|
3
|
+
import { isString } from 'lodash-es';
|
4
4
|
import { getColor, hasWarnings, isSelected, onItemSelect, prepareChoice, updateValue, updateValues } from '../form-choice-helpers';
|
5
5
|
import { ReadonlyCard } from '../readonly-card/readonly-card';
|
6
6
|
export class YooFormChoiceButtonComponent {
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { translateMulti } from '@shared/utils';
|
2
2
|
import { h } from '@stencil/core';
|
3
|
-
import { isString } from '
|
3
|
+
import { isString } from 'lodash-es';
|
4
4
|
export const ReadonlyCard = ({ value, values, answer, valuesColor, classNames }) => {
|
5
5
|
var _a;
|
6
6
|
const classes = typeof classNames === 'string' ? classNames : Object.keys(classNames).join(' ');
|
@@ -406,10 +406,9 @@ export class YooSlidesMediaComponent {
|
|
406
406
|
.filter((item) => (item.isVisible ? item.isVisible(this.currentIndex) : true))
|
407
407
|
.map((item) => {
|
408
408
|
return (h("yoo-icon", { onClick: (ev) => {
|
409
|
+
var _a;
|
409
410
|
ev.stopPropagation();
|
410
|
-
|
411
|
-
item.handler(this.currentIndex);
|
412
|
-
}
|
411
|
+
(_a = item === null || item === void 0 ? void 0 : item.handler) === null || _a === void 0 ? void 0 : _a.call(item, this.currentIndex);
|
413
412
|
}, name: item.icon, color: "light" }));
|
414
413
|
})));
|
415
414
|
}
|
@@ -453,14 +452,12 @@ export class YooSlidesMediaComponent {
|
|
453
452
|
return h("yoo-videoplayer-core", { class: "video", onClick: () => this.onItemClicked(), ref: (el) => (this.videoPlayerElement = el), ...attrs });
|
454
453
|
}
|
455
454
|
renderPhotoEditor(item, index) {
|
456
|
-
var _a, _b, _c, _d;
|
457
|
-
const extraActions = (this.secondaryActions || [])
|
458
|
-
.filter((item) => (item.isVisible ? item.isVisible(index) : true));
|
455
|
+
var _a, _b, _c, _d, _e;
|
459
456
|
return (h("yoo-photo-editor", { id: `${index}`, class: {
|
460
457
|
current: index === this.currentIndex,
|
461
458
|
light: this.isLight,
|
462
459
|
[item === null || item === void 0 ? void 0 : item.extraClass]: !!(item === null || item === void 0 ? void 0 : item.extraClass)
|
463
|
-
}, editable: this.canAnnotate, zoomable: true, ref: (el) =>
|
460
|
+
}, editable: this.canAnnotate, zoomable: true, ref: (el) => this.photoEditorElements[index] = el, onZoomClicked: () => this.onItemClicked(), isReadonly: true, src: this.getPhotoSrc(item), animated: item.animated, display: item.display, cloudinaryOptions: item.cloudinaryOptions, submitView: item.submitView, extraActions: !this.displayType && ((_a = this.secondaryActions) === null || _a === void 0 ? void 0 : _a.filter((item) => { var _a; return ((_a = item === null || item === void 0 ? void 0 : item.isVisible) === null || _a === void 0 ? void 0 : _a.call(item, index)) || true; })), drawings: (_d = (_c = (item.drawings || ((_b = item.photoEditorParams) === null || _b === void 0 ? void 0 : _b.drawings) || '')) !== null && _c !== void 0 ? _c : item.edit) !== null && _d !== void 0 ? _d : item.svgData, annotations: item.annotations || ((_e = item.photoEditorParams) === null || _e === void 0 ? void 0 : _e.annotations) || item.texts, submitButton: this.submitPhotoEditorButton, onImageZoomed: (ev) => this.hideContainer = ev === null || ev === void 0 ? void 0 : ev.detail, onImageClicked: () => !isWeb(this.host) && this.showPhotoDetailView(), onExtraActionClicked: (ev) => { var _a, _b; return (_b = (_a = ev === null || ev === void 0 ? void 0 : ev.detail) === null || _a === void 0 ? void 0 : _a.handler) === null || _b === void 0 ? void 0 : _b.call(_a, this.currentIndex); }, onSaveChanges: (ev) => {
|
464
461
|
if (ev === null || ev === void 0 ? void 0 : ev.detail) {
|
465
462
|
const { drawings, annotations } = ev.detail;
|
466
463
|
this.items[index] = { ...this.items[index], drawings, annotations };
|
@@ -90,16 +90,6 @@ export class YooGridComponent {
|
|
90
90
|
}, 500);
|
91
91
|
this.itemsHaveBeenReordered = false;
|
92
92
|
this.filtersUpdated = false;
|
93
|
-
this.filterOptions = [
|
94
|
-
{
|
95
|
-
type: FormFilterAutocompleteOperator.is,
|
96
|
-
active: true
|
97
|
-
},
|
98
|
-
{
|
99
|
-
type: FormFilterAutocompleteOperator.isNot,
|
100
|
-
active: false
|
101
|
-
}
|
102
|
-
];
|
103
93
|
this.renderVirtualItem = (item, index) => {
|
104
94
|
if (this.hasSecondaryActions || (this.keepSelection && isWeb(this.host))) {
|
105
95
|
if (this.showActionsAsMore) {
|
@@ -510,6 +500,7 @@ export class YooGridComponent {
|
|
510
500
|
if (this.isFormField) {
|
511
501
|
setValidator(this);
|
512
502
|
}
|
503
|
+
this.showFormRadio && !this.selectedFilterOperator && this.selectFilterOperator(FormFilterAutocompleteOperator.is);
|
513
504
|
this.isSelectionMode = this.multiple && !this.blockSelectionMode;
|
514
505
|
this.areItemsDisabled = (_a = this.extraClass) === null || _a === void 0 ? void 0 : _a.includes('item-disabled');
|
515
506
|
this.searchText = this.search || '';
|
@@ -1395,18 +1386,6 @@ export class YooGridComponent {
|
|
1395
1386
|
}
|
1396
1387
|
return false;
|
1397
1388
|
}
|
1398
|
-
onToggleFormRadio(ev) {
|
1399
|
-
var _a;
|
1400
|
-
const selectedOption = (_a = this.filterOptions) === null || _a === void 0 ? void 0 : _a.find((option) => (option === null || option === void 0 ? void 0 : option.type) === (ev === null || ev === void 0 ? void 0 : ev.detail));
|
1401
|
-
if (selectedOption) {
|
1402
|
-
selectedOption.active = true;
|
1403
|
-
}
|
1404
|
-
if (!selectedOption) {
|
1405
|
-
this.formRadioToggled.emit(null);
|
1406
|
-
return;
|
1407
|
-
}
|
1408
|
-
this.formRadioToggled.emit(selectedOption.type);
|
1409
|
-
}
|
1410
1389
|
updateSelectAll(selectAll) {
|
1411
1390
|
this.isSelectAll = selectAll;
|
1412
1391
|
if (!this.isSelectAll && this.isAgGrid() && this.gridApi) {
|
@@ -1893,12 +1872,16 @@ export class YooGridComponent {
|
|
1893
1872
|
}
|
1894
1873
|
return 0;
|
1895
1874
|
}
|
1875
|
+
selectFilterOperator(operator) {
|
1876
|
+
this.selectedFilterOperator = operator;
|
1877
|
+
this.formRadioToggled.emit(operator);
|
1878
|
+
}
|
1896
1879
|
renderDropdownFormRadio() {
|
1897
|
-
|
1898
|
-
|
1899
|
-
|
1900
|
-
|
1901
|
-
|
1880
|
+
const operators = [FormFilterAutocompleteOperator.is, FormFilterAutocompleteOperator.isNot];
|
1881
|
+
return (h("div", { class: "form-radio-container" }, h("yoo-form-radio", { options: operators, flow: "column", size: "medium", value: this.selectedFilterOperator, onInputChanged: (event) => {
|
1882
|
+
event.stopPropagation();
|
1883
|
+
this.selectFilterOperator(event.detail);
|
1884
|
+
} }, operators.map((operator, index) => h("span", { slot: index.toString() }, operator)))));
|
1902
1885
|
}
|
1903
1886
|
renderSearchInput() {
|
1904
1887
|
var _a, _b, _c;
|
@@ -3063,14 +3046,14 @@ export class YooGridComponent {
|
|
3063
3046
|
return (this.mainProgressValue >= 0 && (h("div", { class: "grid-progress" }, h("yoo-progress-bar", { animated: this.animated, metric: "percentage", percentValueColorScheme: false, value: this.total > 0 ? (this.mainProgressValue * 100) / this.total : 0 }))));
|
3064
3047
|
}
|
3065
3048
|
renderBase() {
|
3066
|
-
var _a, _b, _c, _d, _e;
|
3049
|
+
var _a, _b, _c, _d, _e, _f;
|
3067
3050
|
const renderEntityTags = (!isWeb(this.host) || (this.gridIsExpanded && (((_a = this.tags) === null || _a === void 0 ? void 0 : _a.length) > 0 || ((_c = (_b = this.model) === null || _b === void 0 ? void 0 : _b.fields) === null || _c === void 0 ? void 0 : _c.length) > 0))) &&
|
3068
3051
|
this.isTagsVisible() &&
|
3069
3052
|
((this.items && this.items.length > 0) || this.hasSortsAndFilters() || this.alwaysRenderTagsAndFilters() || this.isAgGrid()) &&
|
3070
3053
|
!this.host.classList.contains('learning-manager') && !this.host.classList.contains('course-info');
|
3071
3054
|
return [
|
3072
3055
|
this.showProgress && this.progressHandler && this.renderProgress(),
|
3073
|
-
h("div", { ref: (el) => (this.containerBase = el), class: this.getClassList() }, this.showAutocompleteHeader ? (h("div", { class: { 'dropdown-header': true, 'no-tags': !renderEntityTags || ((_d = this.tags) === null || _d === void 0 ? void 0 : _d.length) === 0, 'form-radio-operators': this.showFormRadio } }, this.showFormRadio && this.renderDropdownFormRadio(), this.renderHeader(renderEntityTags), this.renderDynamicOrderingHeader(), this.renderFilesIcons())) : ([this.renderHeader(renderEntityTags), this.renderFilesIcons()]), this.isKanban() && h("slot", { name: "header" }), (((
|
3056
|
+
h("div", { ref: (el) => (this.containerBase = el), class: this.getClassList() }, this.showAutocompleteHeader ? (h("div", { class: { 'dropdown-header': true, 'no-tags': !renderEntityTags || ((_d = this.tags) === null || _d === void 0 ? void 0 : _d.length) === 0, 'form-radio-operators': this.showFormRadio } }, this.showFormRadio && isWeb(this.host) && !!((_e = this.items) === null || _e === void 0 ? void 0 : _e.length) && this.renderDropdownFormRadio(), this.renderHeader(renderEntityTags), this.renderDynamicOrderingHeader(), this.renderFilesIcons())) : ([this.renderHeader(renderEntityTags), this.renderFilesIcons()]), this.isKanban() && h("slot", { name: "header" }), (((_f = this.columns) === null || _f === void 0 ? void 0 : _f.length) || this.mainColumnHeader) && !this.isAgGrid() && !this.isCalendar() && isWeb(this.host) && !this.isMap() ? (h("div", { class: "horizontal-scroll-parent" }, h("div", { class: "horizontal-scroll", ref: (el) => (this.horizontalScroll = el) }, h("div", { class: { 'horizontal-content': true, 'with-header': this.hasColumnsHeader() } }, this.renderColumnsHeader(), this.renderBaseContent())))) : (this.renderBaseContent())),
|
3074
3057
|
isWeb(this.host) && this.showGlobalActions && this.isSelectionMode && this.renderGlobalActions()
|
3075
3058
|
];
|
3076
3059
|
}
|
@@ -3994,14 +3977,19 @@ export class YooGridComponent {
|
|
3994
3977
|
},
|
3995
3978
|
"selectedFilterOperator": {
|
3996
3979
|
"type": "string",
|
3997
|
-
"mutable":
|
3980
|
+
"mutable": true,
|
3998
3981
|
"complexType": {
|
3999
|
-
"original": "
|
4000
|
-
"resolved": "
|
4001
|
-
"references": {
|
3982
|
+
"original": "FormFilterAutocompleteOperator",
|
3983
|
+
"resolved": "FormFilterAutocompleteOperator.is | FormFilterAutocompleteOperator.isNot",
|
3984
|
+
"references": {
|
3985
|
+
"FormFilterAutocompleteOperator": {
|
3986
|
+
"location": "import",
|
3987
|
+
"path": "@shared/interfaces"
|
3988
|
+
}
|
3989
|
+
}
|
4002
3990
|
},
|
4003
3991
|
"required": false,
|
4004
|
-
"optional":
|
3992
|
+
"optional": true,
|
4005
3993
|
"docs": {
|
4006
3994
|
"tags": [],
|
4007
3995
|
"text": ""
|
@@ -1,8 +1,7 @@
|
|
1
1
|
import { ATTENDANCE_TRANSLATIONS, CALENDAR_TRANSLATIONS, QuickviewModaNoTopClass, WaitlistAPIDateFormat } from '@shared/interfaces';
|
2
2
|
import { dateAdd, dateDiff, dateFormat, getAsyncExtraData, getCalendarParticipantStatusColor, getCssColor, getCurrentLanguage, getEventStatusInfo, getEventTypeColor, getRecurrences, getStartDayOfWeek, getUrlParameterByName, isWeb, toMinutes, translate } from '@shared/utils';
|
3
3
|
import { forceUpdate, h, Host } from '@stencil/core';
|
4
|
-
import { isArray } from '
|
5
|
-
import { assign, compact, flatten, get, remove, sumBy } from 'lodash-es';
|
4
|
+
import { assign, compact, flatten, get, isArray, remove, sumBy } from 'lodash-es';
|
6
5
|
import tippy from 'tippy.js';
|
7
6
|
import { getMissionColor } from '../../../feature-operate/campaign/helpers/operation-helpers';
|
8
7
|
import { getAppContext } from '../../../utils/helpers/common-helpers';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { BroadcastType, MessageType } from '@shared/interfaces';
|
2
|
-
import { cancelRequestInterval, closeModal, dateFormat, disableKeyboardResize, dispatchCustomEvent, downloadFile, enableKeyboardResize,
|
2
|
+
import { cancelRequestInterval, closeModal, dateFormat, disableKeyboardResize, dispatchCustomEvent, downloadFile, enableKeyboardResize, floatingIconAnimation, getAsyncExtraData, getFormattedCountDownToDisplay, getSession, getUserDisplayName, isGif, isImage, isIOS, isIphoneX, isNativeMobile, isNotificationMessage, isNullOrUndefined, isRichContentMessage, isVideo, isWeb, requestInterval, showAlert, translate } from '@shared/utils';
|
3
3
|
import { h, Host } from '@stencil/core';
|
4
4
|
import { isFinite } from 'lodash-es';
|
5
5
|
import { getButton } from '../../../utils/button.factory';
|
@@ -72,7 +72,7 @@ export class YooChatComponent {
|
|
72
72
|
const findIndex = mediaMessages.findIndex(m => (m === null || m === void 0 ? void 0 : m.timetoken) === ev.detail.timetoken);
|
73
73
|
const items = parseMediaMessageForSlidesMedia(mediaMessages);
|
74
74
|
const { message, item } = this.getCurrentItemAndMessage(findIndex, items, mediaMessages) || {};
|
75
|
-
const secondaryActions = this.getMediaSecondaryActions(
|
75
|
+
const secondaryActions = this.getMediaSecondaryActions(items, mediaMessages);
|
76
76
|
showSlidesMedia(this.host, {
|
77
77
|
items,
|
78
78
|
currentSlideIndex: findIndex,
|
@@ -338,29 +338,23 @@ export class YooChatComponent {
|
|
338
338
|
this.scroll.scrollByPoint(0, scrollDistance, 300);
|
339
339
|
}
|
340
340
|
}
|
341
|
-
getMediaSecondaryActions(
|
341
|
+
getMediaSecondaryActions(items, mediaMessages) {
|
342
342
|
return [
|
343
343
|
{
|
344
344
|
icon: 'photo-annotated',
|
345
|
-
isVisible: (
|
346
|
-
if (
|
345
|
+
isVisible: (currentIndex) => {
|
346
|
+
if (currentIndex < 0) {
|
347
347
|
return true;
|
348
348
|
}
|
349
|
-
const { item } = this.getCurrentItemAndMessage(
|
349
|
+
const { item } = this.getCurrentItemAndMessage(currentIndex, items, mediaMessages) || {};
|
350
350
|
return item && !(isVideo(item.value) || isGif(item.value));
|
351
|
-
},
|
352
|
-
handler: (event) => {
|
353
|
-
if (event === null || event === void 0 ? void 0 : event.target) {
|
354
|
-
const photoEditor = findParent(event === null || event === void 0 ? void 0 : event.target, 'yoo-photo-editor');
|
355
|
-
photoEditor.isReadonly = false;
|
356
|
-
}
|
357
351
|
}
|
358
352
|
},
|
359
353
|
{
|
360
354
|
icon: 'download',
|
361
355
|
isVisible: () => true,
|
362
|
-
handler: () => {
|
363
|
-
const { message, item } = this.getCurrentItemAndMessage(
|
356
|
+
handler: (currentIndex) => {
|
357
|
+
const { message, item } = this.getCurrentItemAndMessage(currentIndex, items, mediaMessages) || {};
|
364
358
|
if (!message || !item) {
|
365
359
|
return;
|
366
360
|
}
|
@@ -3,7 +3,6 @@ export * from './card-video.interface';
|
|
3
3
|
export * from './draggable.interface';
|
4
4
|
export * from './form-creator.interface';
|
5
5
|
export * from './form-daterange.interface';
|
6
|
-
export * from './form-filter.interface';
|
7
6
|
export * from './form-reorder.interface';
|
8
7
|
export * from './map.interface';
|
9
8
|
export * from './modal.interface';
|