@uploadcare/file-uploader 1.24.4 → 1.24.6

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/index.d.ts CHANGED
@@ -107,6 +107,7 @@ declare class ModalManager {
107
107
  type CommonEventType = InternalEventKey | EventKey;
108
108
  type TelemetryState = TelemetryRequest & {
109
109
  eventTimestamp: number;
110
+ location: string;
110
111
  };
111
112
  type TelemetryEventBody = Partial<Pick<TelemetryState, 'payload' | 'config'>> & {
112
113
  modalId?: string;
@@ -138,6 +139,7 @@ declare class TelemetryManager {
138
139
  private get _timestamp();
139
140
  private get _solution();
140
141
  private get _activity();
142
+ private get _location();
141
143
  }
142
144
 
143
145
  declare class Block extends BaseComponent<any> {
package/dist/index.js CHANGED
@@ -506,7 +506,7 @@ var config = {
506
506
  secureSignature: "",
507
507
  secureExpire: "",
508
508
  secureDeliveryProxy: "",
509
- retryThrottledRequestMaxTimes: 10,
509
+ retryThrottledRequestMaxTimes: 3,
510
510
  retryNetworkErrorMaxTimes: 3,
511
511
  multipartMinFileSize: 26214400,
512
512
  multipartChunkSize: 5242880,
@@ -1217,7 +1217,7 @@ import { TelemetryAPIService } from "@uploadcare/quality-insights";
1217
1217
  import { Queue as Queue2 } from "@uploadcare/upload-client";
1218
1218
 
1219
1219
  // package.json
1220
- var version = "1.24.4";
1220
+ var version = "1.24.6";
1221
1221
 
1222
1222
  // src/env.ts
1223
1223
  var PACKAGE_NAME = "blocks";
@@ -1279,6 +1279,7 @@ var TelemetryManager = class {
1279
1279
  eventType: result.eventType ?? "",
1280
1280
  eventTimestamp: this._timestamp,
1281
1281
  payload: {
1282
+ location: this._location,
1282
1283
  ...payload
1283
1284
  }
1284
1285
  };
@@ -1378,6 +1379,9 @@ var TelemetryManager = class {
1378
1379
  }
1379
1380
  return this._block.$["*currentActivity"] ?? null;
1380
1381
  }
1382
+ get _location() {
1383
+ return location.origin;
1384
+ }
1381
1385
  };
1382
1386
 
1383
1387
  // src/abstract/sharedConfigKey.ts
@@ -5064,6 +5068,7 @@ CameraSource.template = /* HTML */
5064
5068
  type="button"
5065
5069
  class="uc-switch uc-mini-btn"
5066
5070
  set="onclick: onClickTab; @hidden: tabCameraHidden"
5071
+ data-testid="tab-photo"
5067
5072
  >
5068
5073
  <uc-icon name="camera"></uc-icon>
5069
5074
  </button>
@@ -5072,6 +5077,7 @@ CameraSource.template = /* HTML */
5072
5077
  type="button"
5073
5078
  class="uc-switch uc-mini-btn"
5074
5079
  set="onclick: onClickTab; @hidden: tabVideoHidden"
5080
+ data-testid="tab-video"
5075
5081
  >
5076
5082
  <uc-icon name="video-camera"></uc-icon>
5077
5083
  </button>
@@ -5080,6 +5086,7 @@ CameraSource.template = /* HTML */
5080
5086
  <button
5081
5087
  class="uc-secondary-btn uc-recording-timer"
5082
5088
  set="@hidden:timerHidden; onclick: onToggleRecording"
5089
+ data-testid="recording-timer"
5083
5090
  >
5084
5091
  <uc-icon set="@name: currentTimelineIcon"></uc-icon>
5085
5092
  <span ref="timer"> 00:00 </span>
@@ -5090,7 +5097,7 @@ CameraSource.template = /* HTML */
5090
5097
  class="uc-camera-actions uc-camera-action"
5091
5098
  set="@hidden: cameraActionsHidden"
5092
5099
  >
5093
- <button type="button" class="uc-secondary-btn" set="onclick: onRetake">
5100
+ <button type="button" class="uc-secondary-btn" set="onclick: onRetake" data-testid="retake">
5094
5101
  Retake
5095
5102
  </button>
5096
5103
  <button
@@ -5116,6 +5123,7 @@ CameraSource.template = /* HTML */
5116
5123
  <button
5117
5124
  class="uc-mini-btn uc-btn-microphone"
5118
5125
  set="onclick: onToggleAudio; @hidden: audioToggleMicrophoneHidden;"
5126
+ data-testid="toggle-microphone"
5119
5127
  >
5120
5128
  <uc-icon set="@name:toggleMicrophoneIcon"></uc-icon>
5121
5129
  </button>
@@ -5123,6 +5131,7 @@ CameraSource.template = /* HTML */
5123
5131
  <uc-select
5124
5132
  class="uc-audio-select"
5125
5133
  set="$.options: audioSelectOptions; onchange: onAudioSelectChange; @hidden: audioSelectHidden; @disabled: audioSelectDisabled"
5134
+ data-testid="audio-select"
5126
5135
  >
5127
5136
  </uc-select>
5128
5137
  </div>
@@ -7771,8 +7780,8 @@ EditorToolbar.template = /* HTML */
7771
7780
  <div class="uc-list-aspect-ratio" ref="list-el"></div>
7772
7781
  </div>
7773
7782
  <div class="uc-controls-row">
7774
- <uc-btn-ui theme="secondary" set="onclick: on.cancelSlider" l10n="@text:cancel"> </uc-btn-ui>
7775
- <uc-btn-ui theme="primary" set="onclick: on.applySlider" l10n="@text:apply"> </uc-btn-ui>
7783
+ <uc-btn-ui theme="secondary" set="onclick: on.cancelSlider; title-prop:cancel" l10n="@text:cancel"> </uc-btn-ui>
7784
+ <uc-btn-ui theme="primary" set="onclick: on.applySlider; title-prop:apply" l10n="@text:apply"> </uc-btn-ui>
7776
7785
  </div>
7777
7786
  </uc-presence-toggle>
7778
7787
  </div>
@@ -9689,11 +9698,14 @@ var FileItem = class _FileItem extends FileItemConfig {
9689
9698
  } else if (!isFinished && externalUrl && source && Object.values(ExternalUploadSource).includes(source)) {
9690
9699
  hint = this.l10n("waiting-for", { source: this.l10n(`src-type-${source}`) });
9691
9700
  }
9701
+ const uploadProgress = entry.getValue("uploadProgress");
9702
+ const progressValue = uploadProgress === 100 ? 100 : isQueuedForValidation || isValidationPending ? 0 : uploadProgress;
9703
+ const progressVisible = isUploading || isQueuedForUploading || isQueuedForValidation || isValidationPending;
9692
9704
  this.set$({
9693
9705
  hint,
9694
9706
  errorText,
9695
- progressVisible: isUploading || isQueuedForUploading || isQueuedForValidation || isValidationPending,
9696
- progressValue: isQueuedForValidation || isValidationPending ? 0 : entry.getValue("uploadProgress"),
9707
+ progressVisible,
9708
+ progressValue,
9697
9709
  ariaLabelStatusFile: fileName && this.l10n("a11y-file-item-status", {
9698
9710
  fileName,
9699
9711
  status: this.l10n(state?.description?.toLocaleLowerCase() ?? "").toLocaleLowerCase()
@@ -9951,6 +9963,7 @@ var FileItem = class _FileItem extends FileItemConfig {
9951
9963
  l10n="@title:file-item-edit-button;@aria-label:file-item-edit-button"
9952
9964
  class="uc-edit-btn uc-mini-btn"
9953
9965
  set="onclick: onEdit; @hidden: !isEditable"
9966
+ data-testid="edit"
9954
9967
  >
9955
9968
  <uc-icon name="edit-file"></uc-icon>
9956
9969
  </button>