@yoobic/yobi 8.5.0-67 → 8.5.0-68

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.
Files changed (49) hide show
  1. package/dist/cjs/yoo-card-inbox.cjs.entry.js +1 -2
  2. package/dist/cjs/yoo-chat-message.cjs.entry.js +1 -1
  3. package/dist/cjs/yoo-chat.cjs.entry.js +3 -1
  4. package/dist/cjs/yoo-form-carousel.cjs.entry.js +6 -6
  5. package/dist/cjs/yoo-form-choice-chat.cjs.entry.js +1 -1
  6. package/dist/cjs/yoo-form-stripe-card.cjs.entry.js +1 -1
  7. package/dist/cjs/yoo-form-text-editor.cjs.entry.js +5 -0
  8. package/dist/cjs/yoo-grid.cjs.entry.js +8 -5
  9. package/dist/cjs/yoo-photo-editor.cjs.entry.js +1 -2
  10. package/dist/cjs/yoo-scratch-card.cjs.entry.js +4 -7
  11. package/dist/cjs/yoo-slides-media.cjs.entry.js +3 -2
  12. package/dist/collection/components/3.organisms/photo-editor/photo-editor.js +1 -21
  13. package/dist/collection/components/form/form-carousel/form-carousel.js +6 -6
  14. package/dist/collection/components/form/form-choice/chat/form-choice-chat.js +1 -1
  15. package/dist/collection/components/form/form-text-editor/form-text-editor.js +5 -0
  16. package/dist/collection/components/form/scratch-card/scratch-card.js +4 -7
  17. package/dist/collection/components/form/slides-media/slides-media.js +3 -2
  18. package/dist/collection/components/grid/grid/grid.css +1 -1
  19. package/dist/collection/components/grid/grid/grid.js +7 -4
  20. package/dist/collection/feature-communicate/chat/chat/chat.js +4 -2
  21. package/dist/collection/feature-communicate/chat/chat-message/chat-message.css +9 -9
  22. package/dist/collection/feature-operate/mission/card-inbox/card-inbox.js +1 -2
  23. package/dist/design-system/yoo-card-inbox.entry.js +1 -2
  24. package/dist/design-system/yoo-chat-message.entry.js +1 -1
  25. package/dist/design-system/yoo-chat.entry.js +4 -2
  26. package/dist/design-system/yoo-form-carousel.entry.js +6 -6
  27. package/dist/design-system/yoo-form-choice-chat.entry.js +1 -1
  28. package/dist/design-system/yoo-form-stripe-card.entry.js +1 -1
  29. package/dist/design-system/yoo-form-text-editor.entry.js +5 -0
  30. package/dist/design-system/yoo-grid.entry.js +8 -5
  31. package/dist/design-system/yoo-photo-editor.entry.js +1 -2
  32. package/dist/design-system/yoo-scratch-card.entry.js +4 -7
  33. package/dist/design-system/yoo-slides-media.entry.js +3 -2
  34. package/dist/esm/yoo-card-inbox.entry.js +1 -2
  35. package/dist/esm/yoo-chat-message.entry.js +1 -1
  36. package/dist/esm/yoo-chat.entry.js +4 -2
  37. package/dist/esm/yoo-form-carousel.entry.js +6 -6
  38. package/dist/esm/yoo-form-choice-chat.entry.js +1 -1
  39. package/dist/esm/yoo-form-stripe-card.entry.js +1 -1
  40. package/dist/esm/yoo-form-text-editor.entry.js +5 -0
  41. package/dist/esm/yoo-grid.entry.js +8 -5
  42. package/dist/esm/yoo-photo-editor.entry.js +1 -2
  43. package/dist/esm/yoo-scratch-card.entry.js +4 -7
  44. package/dist/esm/yoo-slides-media.entry.js +3 -2
  45. package/dist/types/components/3.organisms/photo-editor/photo-editor.d.ts +0 -4
  46. package/dist/types/components/form/form-text-editor/form-text-editor.d.ts +1 -0
  47. package/dist/types/components/grid/grid/grid.d.ts +1 -0
  48. package/dist/types/components.d.ts +0 -4
  49. package/package.json +1 -1
@@ -200,7 +200,6 @@ const YooPhotoEditorComponent = class {
200
200
  this.imageZoomed = createEvent(this, "imageZoomed", 7);
201
201
  this.switchFromEditable = createEvent(this, "switchFromEditable", 7);
202
202
  this.blockMoves = createEvent(this, "blockMoves", 7);
203
- this.extraActionClicked = createEvent(this, "extraActionClicked", 7);
204
203
  this.saveChanges = createEvent(this, "saveChanges", 7);
205
204
  /**
206
205
  * Set to true wether the image in a readonly mode can be
@@ -1164,7 +1163,7 @@ const YooPhotoEditorComponent = class {
1164
1163
  this.isReadonly = false;
1165
1164
  }
1166
1165
  else {
1167
- this.extraActionClicked.emit(extraAction);
1166
+ extraAction.handler(ev);
1168
1167
  }
1169
1168
  }
1170
1169
  if (extraAction === null || extraAction === void 0 ? void 0 : extraAction['subActions']) {
@@ -28,8 +28,7 @@ const YooScratchCardComponent = class {
28
28
  await this.initCanvas();
29
29
  }
30
30
  async onVisibilityChanged() {
31
- !this.isCanvasLoaded && await this.initCanvas();
32
- this.validity && await this.cleanCanvas();
31
+ this.isVisible && await this.initCanvas();
33
32
  }
34
33
  async cleanCanvas() {
35
34
  await this.clearCanvasRect();
@@ -78,14 +77,13 @@ const YooScratchCardComponent = class {
78
77
  image.src = this.canvasSrc;
79
78
  this.isCanvasLoaded = await new Promise((resolve, reject) => {
80
79
  image.onload = () => {
81
- var _a;
82
80
  const { width } = this.hostBounds;
83
81
  const hasBounding = !!width;
84
82
  if (hasBounding) {
85
83
  Object.assign(this.canvasElement, { width, height: width });
86
84
  this.canvasContext.drawImage(image, 0, 0, width, width);
87
85
  this.canvasElement.removeAttribute('fade-out');
88
- (_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.removeAttribute('visible');
86
+ this.buttonElement.removeAttribute('visible');
89
87
  }
90
88
  resolve(hasBounding);
91
89
  };
@@ -120,7 +118,6 @@ const YooScratchCardComponent = class {
120
118
  }
121
119
  };
122
120
  const draw = async (event) => {
123
- var _a;
124
121
  event.stopPropagation();
125
122
  event.preventDefault();
126
123
  if (this.isDrawing) {
@@ -129,7 +126,7 @@ const YooScratchCardComponent = class {
129
126
  if (this.shouldRevealImage) {
130
127
  this.canvasElement.setAttribute('fade-out', 'true');
131
128
  await this.clearCanvasRect();
132
- (_a = this.buttonElement) === null || _a === void 0 ? void 0 : _a.setAttribute('visible', 'true');
129
+ this.buttonElement.setAttribute('visible', 'true');
133
130
  }
134
131
  }
135
132
  };
@@ -205,7 +202,7 @@ const YooScratchCardComponent = class {
205
202
  return h("div", { class: "content-card" }, mode === 'TEXT' && !image ? this.renderText(text, bgColor) : this.renderImage(image));
206
203
  }
207
204
  renderButton() {
208
- return !this.validity && h("yoo-button", { ref: (el) => (this.buttonElement = el), shape: "circular", color: "light", size: "large", onClick: () => this.resetCanvas() }, h("yoo-icon", { name: "restart", color: "app-color", size: "medium" }));
205
+ return h("yoo-button", { ref: (el) => (this.buttonElement = el), shape: "circular", color: "light", size: "large", onClick: () => this.resetCanvas() }, h("yoo-icon", { name: "restart", color: "app-color", size: "medium" }));
209
206
  }
210
207
  renderLoader(show) {
211
208
  return show && h("yoo-loader", { class: "absolute", size: "large" });
@@ -423,7 +423,7 @@ const YooSlidesMediaComponent = class {
423
423
  return (h("yoo-icon", { onClick: (ev) => {
424
424
  var _a;
425
425
  ev.stopPropagation();
426
- (_a = item === null || item === void 0 ? void 0 : item.handler) === null || _a === void 0 ? void 0 : _a.call(item, this.currentIndex);
426
+ (_a = item === null || item === void 0 ? void 0 : item.handler) === null || _a === void 0 ? void 0 : _a.call(item, ev);
427
427
  }, name: item.icon, color: "light" }));
428
428
  })));
429
429
  }
@@ -468,11 +468,12 @@ const YooSlidesMediaComponent = class {
468
468
  }
469
469
  renderPhotoEditor(item, index) {
470
470
  var _a, _b, _c, _d, _e;
471
+ const extraActions = (_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; });
471
472
  return (h("yoo-photo-editor", { id: `${index}`, class: {
472
473
  current: index === this.currentIndex,
473
474
  light: this.isLight,
474
475
  [item === null || item === void 0 ? void 0 : item.extraClass]: !!(item === null || item === void 0 ? void 0 : item.extraClass)
475
- }, 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) => {
476
+ }, 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 && extraActions, 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(), onSaveChanges: (ev) => {
476
477
  if (ev === null || ev === void 0 ? void 0 : ev.detail) {
477
478
  const { drawings, annotations } = ev.detail;
478
479
  this.items[index] = { ...this.items[index], drawings, annotations };
@@ -112,10 +112,6 @@ export declare class YooPhotoEditorComponent implements ComponentInterface {
112
112
  * Emitted to block the swiping action of the slides when drag and dropping an annotation
113
113
  */
114
114
  blockMoves: EventEmitter<boolean>;
115
- /**
116
- * Emitted to block the swiping action of the slides when drag and dropping an annotation
117
- */
118
- extraActionClicked: EventEmitter<IButton>;
119
115
  /**
120
116
  * Emitted when the annotations changes are being saved
121
117
  */
@@ -119,6 +119,7 @@ export declare class YooFormTextEditorComponent {
119
119
  componentWillLoad(): void;
120
120
  componentDidLoad(): void;
121
121
  componentDidRender(): void;
122
+ connectedCallback(): void;
122
123
  disconnectedCallback(): void;
123
124
  destroyEditor(): void;
124
125
  setLocalValue(forceRerender?: boolean): void;
@@ -319,6 +319,7 @@ export declare class YooGridComponent {
319
319
  private fileInput;
320
320
  private filteredItems;
321
321
  private calendarEl;
322
+ private get isFilesAutocomplete();
322
323
  private get canSelectAll();
323
324
  private get isShowAdvancedFiltersDisplayedIntoSearch();
324
325
  get hasSecondaryActions(): boolean;
@@ -17770,10 +17770,6 @@ declare namespace LocalJSX {
17770
17770
  * Emitted to block the swiping action of the slides when drag and dropping an annotation
17771
17771
  */
17772
17772
  "onBlockMoves"?: (event: YooPhotoEditorCustomEvent<boolean>) => void;
17773
- /**
17774
- * Emitted to block the swiping action of the slides when drag and dropping an annotation
17775
- */
17776
- "onExtraActionClicked"?: (event: YooPhotoEditorCustomEvent<IButton>) => void;
17777
17773
  /**
17778
17774
  * Emitted when the image is being clicked (in a readonly mode only)
17779
17775
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yoobic/yobi",
3
- "version": "8.5.0-67",
3
+ "version": "8.5.0-68",
4
4
  "description": "Yobi - Yoobic Design System",
5
5
  "module": "dist/index.js",
6
6
  "main": "dist/index.cjs.js",