@uploadcare/file-uploader 1.3.0-alpha.3 → 1.3.0

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 (216) hide show
  1. package/README.md +4 -4
  2. package/abstract/ActivityBlock.d.ts +1 -1
  3. package/abstract/ActivityBlock.d.ts.map +1 -1
  4. package/abstract/ActivityBlock.js +0 -2
  5. package/abstract/Block.d.ts +11 -7
  6. package/abstract/Block.d.ts.map +1 -1
  7. package/abstract/Block.js +18 -52
  8. package/abstract/CTX.d.ts +7 -7
  9. package/abstract/CTX.d.ts.map +1 -1
  10. package/abstract/CTX.js +1 -1
  11. package/abstract/LocaleManager.d.ts +3 -3
  12. package/abstract/SecureUploadsManager.d.ts +2 -2
  13. package/abstract/SecureUploadsManager.d.ts.map +1 -1
  14. package/abstract/SolutionBlock.d.ts +2 -2
  15. package/abstract/SolutionBlock.d.ts.map +1 -1
  16. package/abstract/TypedCollection.d.ts +1 -1
  17. package/abstract/TypedCollection.d.ts.map +1 -1
  18. package/abstract/TypedCollection.js +4 -4
  19. package/abstract/TypedData.d.ts +2 -2
  20. package/abstract/TypedData.d.ts.map +1 -1
  21. package/abstract/TypedData.js +4 -4
  22. package/abstract/UploaderBlock.d.ts +5 -5
  23. package/abstract/UploaderBlock.d.ts.map +1 -1
  24. package/abstract/UploaderBlock.js +5 -5
  25. package/abstract/UploaderPublicApi.d.ts +21 -22
  26. package/abstract/UploaderPublicApi.d.ts.map +1 -1
  27. package/abstract/UploaderPublicApi.js +3 -3
  28. package/abstract/ValidationManager.d.ts +3 -3
  29. package/abstract/ValidationManager.d.ts.map +1 -1
  30. package/abstract/a11y.d.ts +2 -2
  31. package/abstract/a11y.d.ts.map +1 -1
  32. package/abstract/buildOutputCollectionState.d.ts +1 -1
  33. package/abstract/buildOutputCollectionState.d.ts.map +1 -1
  34. package/abstract/defineComponents.d.ts.map +1 -1
  35. package/abstract/defineComponents.js +0 -5
  36. package/abstract/l10nProcessor.d.ts.map +1 -1
  37. package/abstract/l10nProcessor.js +3 -3
  38. package/abstract/loadFileUploaderFrom.d.ts.map +1 -1
  39. package/abstract/localeRegistry.d.ts.map +1 -1
  40. package/abstract/sharedConfigKey.d.ts.map +1 -1
  41. package/abstract/uploadEntrySchema.d.ts +2 -2
  42. package/abstract/uploadEntrySchema.d.ts.map +1 -1
  43. package/abstract/uploadEntrySchema.js +1 -1
  44. package/blocks/CameraSource/CameraSource.d.ts.map +1 -1
  45. package/blocks/CameraSource/CameraSource.js +11 -12
  46. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +1 -1
  47. package/blocks/CloudImageEditor/src/CropFrame.d.ts +11 -11
  48. package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +1 -1
  49. package/blocks/CloudImageEditor/src/CropFrame.js +1 -2
  50. package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +1 -1
  51. package/blocks/CloudImageEditor/src/EditorButtonControl.js +2 -3
  52. package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +1 -1
  53. package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +1 -1
  54. package/blocks/CloudImageEditor/src/EditorFilterControl.js +8 -4
  55. package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +3 -3
  56. package/blocks/CloudImageEditor/src/EditorImageCropper.js +2 -2
  57. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +1 -1
  58. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +1 -1
  59. package/blocks/CloudImageEditor/src/EditorOperationControl.js +1 -1
  60. package/blocks/CloudImageEditor/src/EditorScroller.d.ts.map +1 -1
  61. package/blocks/CloudImageEditor/src/EditorScroller.js +1 -2
  62. package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +1 -1
  63. package/blocks/CloudImageEditor/src/EditorSlider.js +2 -3
  64. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +1 -1
  65. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +1 -1
  66. package/blocks/CloudImageEditor/src/EditorToolbar.js +14 -15
  67. package/blocks/CloudImageEditor/src/crop-utils.d.ts +14 -14
  68. package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +1 -1
  69. package/blocks/CloudImageEditor/src/css/common.css +2 -2
  70. package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +1 -1
  71. package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +5 -5
  72. package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts.map +1 -1
  73. package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +1 -2
  74. package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts.map +1 -1
  75. package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +2 -3
  76. package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +1 -1
  77. package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +2 -3
  78. package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts +15 -0
  79. package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts.map +1 -0
  80. package/blocks/CloudImageEditor/src/lib/FocusVisible.js +33 -0
  81. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +10 -0
  82. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +1 -0
  83. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.js +256 -0
  84. package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +1 -1
  85. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +3 -3
  86. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +1 -1
  87. package/blocks/CloudImageEditor/src/state.d.ts +4 -4
  88. package/blocks/CloudImageEditor/src/template.d.ts.map +1 -1
  89. package/blocks/CloudImageEditor/src/template.js +4 -5
  90. package/blocks/CloudImageEditor/src/types.d.ts +2 -2
  91. package/blocks/CloudImageEditor/src/types.d.ts.map +1 -1
  92. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +3 -3
  93. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +1 -1
  94. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +1 -2
  95. package/blocks/Config/Config.d.ts +11 -3
  96. package/blocks/Config/Config.d.ts.map +1 -1
  97. package/blocks/Config/initialConfig.d.ts +1 -1
  98. package/blocks/Config/normalizeConfigValue.d.ts.map +1 -1
  99. package/blocks/Copyright/Copyright.d.ts.map +1 -1
  100. package/blocks/Copyright/Copyright.js +1 -2
  101. package/blocks/DropArea/DropArea.d.ts +2 -2
  102. package/blocks/DropArea/DropArea.d.ts.map +1 -1
  103. package/blocks/DropArea/DropArea.js +5 -5
  104. package/blocks/DropArea/addDropzone.d.ts.map +1 -1
  105. package/blocks/DropArea/getDropItems.d.ts +2 -2
  106. package/blocks/DropArea/getDropItems.d.ts.map +1 -1
  107. package/blocks/ExternalSource/ExternalSource.d.ts +5 -5
  108. package/blocks/ExternalSource/ExternalSource.d.ts.map +1 -1
  109. package/blocks/ExternalSource/ExternalSource.js +9 -9
  110. package/blocks/ExternalSource/buildStyles.js +2 -2
  111. package/blocks/ExternalSource/query-string.d.ts.map +1 -1
  112. package/blocks/FileItem/FileItem.d.ts +3 -3
  113. package/blocks/FileItem/FileItem.d.ts.map +1 -1
  114. package/blocks/FileItem/FileItem.js +11 -12
  115. package/blocks/Icon/Icon.d.ts +1 -0
  116. package/blocks/Icon/Icon.d.ts.map +1 -1
  117. package/blocks/Icon/Icon.js +5 -3
  118. package/blocks/Img/ImgBase.js +9 -9
  119. package/blocks/Img/ImgConfig.d.ts +2 -2
  120. package/blocks/Img/ImgConfig.d.ts.map +1 -1
  121. package/blocks/Img/ImgConfig.js +3 -3
  122. package/blocks/Img/utils/parseObjectToString.js +1 -1
  123. package/blocks/Modal/Modal.d.ts.map +1 -1
  124. package/blocks/Modal/Modal.js +1 -2
  125. package/blocks/ProgressBar/ProgressBar.d.ts.map +1 -1
  126. package/blocks/ProgressBar/ProgressBar.js +1 -2
  127. package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts.map +1 -1
  128. package/blocks/ProgressBarCommon/ProgressBarCommon.js +1 -2
  129. package/blocks/Range/Range.d.ts +16 -0
  130. package/blocks/Range/Range.d.ts.map +1 -0
  131. package/blocks/Range/Range.js +44 -0
  132. package/blocks/Range/range.css +65 -0
  133. package/blocks/Select/Select.d.ts.map +1 -1
  134. package/blocks/Select/Select.js +9 -14
  135. package/blocks/SimpleBtn/SimpleBtn.d.ts +2 -2
  136. package/blocks/SimpleBtn/SimpleBtn.d.ts.map +1 -1
  137. package/blocks/SimpleBtn/SimpleBtn.js +3 -4
  138. package/blocks/SourceBtn/SourceBtn.d.ts +2 -2
  139. package/blocks/SourceBtn/SourceBtn.d.ts.map +1 -1
  140. package/blocks/SourceBtn/SourceBtn.js +4 -4
  141. package/blocks/SourceList/SourceList.d.ts.map +1 -1
  142. package/blocks/SourceList/SourceList.js +4 -5
  143. package/blocks/StartFrom/StartFrom.d.ts.map +1 -1
  144. package/blocks/StartFrom/StartFrom.js +1 -2
  145. package/blocks/UploadCtxProvider/EventEmitter.d.ts +19 -19
  146. package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +1 -1
  147. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +4 -4
  148. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +1 -1
  149. package/blocks/UploadList/UploadList.d.ts +2 -2
  150. package/blocks/UploadList/UploadList.d.ts.map +1 -1
  151. package/blocks/UploadList/UploadList.js +11 -10
  152. package/blocks/UrlSource/UrlSource.d.ts.map +1 -1
  153. package/blocks/UrlSource/UrlSource.js +6 -7
  154. package/blocks/themes/uc-basic/index.css +1 -0
  155. package/blocks/utils/debounce.d.ts +1 -3
  156. package/blocks/utils/debounce.d.ts.map +1 -1
  157. package/blocks/utils/throttle.d.ts +1 -3
  158. package/blocks/utils/throttle.d.ts.map +1 -1
  159. package/blocks/utils/userAgent.d.ts +1 -1
  160. package/blocks/utils/userAgent.d.ts.map +1 -1
  161. package/env.d.ts +1 -1
  162. package/env.js +1 -1
  163. package/index.d.ts +1 -1
  164. package/index.js +1 -1
  165. package/index.ssr.d.ts +2 -116
  166. package/index.ssr.d.ts.map +1 -1
  167. package/index.ssr.js +79 -190
  168. package/package.json +9 -13
  169. package/solutions/file-uploader/inline/FileUploaderInline.d.ts +2 -2
  170. package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +1 -1
  171. package/solutions/file-uploader/inline/FileUploaderInline.js +5 -5
  172. package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +1 -1
  173. package/solutions/file-uploader/minimal/FileUploaderMinimal.js +1 -2
  174. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +2 -2
  175. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +1 -1
  176. package/solutions/file-uploader/regular/FileUploaderRegular.js +3 -6
  177. package/types/jsx.d.ts +3 -9
  178. package/utils/getPluralForm.d.ts.map +1 -1
  179. package/utils/isSecureTokenExpired.d.ts +1 -1
  180. package/utils/memoize.d.ts.map +1 -1
  181. package/utils/mixinClass.d.ts +1 -3
  182. package/utils/mixinClass.d.ts.map +1 -1
  183. package/utils/prettyBytes.d.ts.map +1 -1
  184. package/utils/template-utils.d.ts.map +1 -1
  185. package/utils/toKebabCase.d.ts.map +1 -1
  186. package/utils/uniqueArray.d.ts.map +1 -1
  187. package/utils/validators/collection/validateCollectionUploadError.d.ts +1 -1
  188. package/utils/validators/collection/validateMultiple.d.ts +1 -1
  189. package/utils/validators/file/validateFileType.d.ts +1 -1
  190. package/utils/validators/file/validateIsImage.d.ts +1 -1
  191. package/utils/validators/file/validateMaxSizeLimit.d.ts +1 -1
  192. package/utils/validators/file/validateUploadError.d.ts +1 -1
  193. package/utils/waitForAttribute.d.ts +6 -12
  194. package/utils/waitForAttribute.d.ts.map +1 -1
  195. package/utils/waitForAttribute.js +8 -38
  196. package/utils/waitForAttribute.test.js +47 -10
  197. package/web/file-uploader.iife.min.js +4 -4
  198. package/web/file-uploader.min.js +4 -4
  199. package/web/uc-basic.min.css +1 -1
  200. package/web/uc-cloud-image-editor.min.css +1 -1
  201. package/web/uc-cloud-image-editor.min.js +4 -4
  202. package/web/uc-file-uploader-inline.min.css +1 -1
  203. package/web/uc-file-uploader-inline.min.js +4 -4
  204. package/web/uc-file-uploader-minimal.min.js +3 -3
  205. package/web/uc-file-uploader-regular.min.css +1 -1
  206. package/web/uc-file-uploader-regular.min.js +4 -4
  207. package/web/uc-img.min.js +3 -3
  208. package/abstract/bindCompatibilityFallbackProcessor.d.ts +0 -3
  209. package/abstract/bindCompatibilityFallbackProcessor.d.ts.map +0 -1
  210. package/abstract/bindCompatibilityFallbackProcessor.js +0 -16
  211. package/utils/withResolvers.d.ts +0 -7
  212. package/utils/withResolvers.d.ts.map +0 -1
  213. package/utils/withResolvers.js +0 -17
  214. package/utils/withResolvers.test.d.ts +0 -2
  215. package/utils/withResolvers.test.d.ts.map +0 -1
  216. package/utils/withResolvers.test.js +0 -27
@@ -1,6 +1,6 @@
1
1
  // @ts-check
2
2
 
3
- import { create, html } from '@symbiotejs/symbiote';
3
+ import { create } from '@symbiotejs/symbiote';
4
4
  import { ActivityBlock } from '../../abstract/ActivityBlock.js';
5
5
  import { UploaderBlock } from '../../abstract/UploaderBlock.js';
6
6
  import { stringToArray } from '../../utils/stringToArray.js';
@@ -87,7 +87,7 @@ export class ExternalSource extends UploaderBlock {
87
87
  this.mountIframe();
88
88
  },
89
89
  });
90
- this.sub('*currentActivityParams', () => {
90
+ this.sub('*currentActivityParams', (val) => {
91
91
  if (!this.isActivityActive) {
92
92
  return;
93
93
  }
@@ -238,29 +238,29 @@ export class ExternalSource extends UploaderBlock {
238
238
  }
239
239
  }
240
240
 
241
- ExternalSource.template = html`
241
+ ExternalSource.template = /* HTML */ `
242
242
  <uc-activity-header>
243
- <button type="button" class="uc-mini-btn" bind="onclick: *historyBack">
243
+ <button type="button" class="uc-mini-btn" set="onclick: *historyBack">
244
244
  <uc-icon name="back"></uc-icon>
245
245
  </button>
246
246
  <div>
247
- <uc-icon bind="@name: activityIcon"></uc-icon>
247
+ <uc-icon set="@name: activityIcon"></uc-icon>
248
248
  <span>{{activityCaption}}</span>
249
249
  </div>
250
- <button type="button" class="uc-mini-btn uc-close-btn" bind="onclick: *historyBack">
250
+ <button type="button" class="uc-mini-btn uc-close-btn" set="onclick: *historyBack">
251
251
  <uc-icon name="close"></uc-icon>
252
252
  </button>
253
253
  </uc-activity-header>
254
254
  <div class="uc-content">
255
255
  <div ref="iframeWrapper" class="uc-iframe-wrapper"></div>
256
256
  <div class="uc-toolbar">
257
- <button type="button" class="uc-cancel-btn uc-secondary-btn" bind="onclick: onCancel" l10n="cancel"></button>
257
+ <button type="button" class="uc-cancel-btn uc-secondary-btn" set="onclick: onCancel" l10n="cancel"></button>
258
258
  <div></div>
259
- <div bind="@hidden: !multiple" class="uc-selected-counter"><span l10n="selected-count"></span>{{counter}}</div>
259
+ <div set="@hidden: !multiple" class="uc-selected-counter"><span l10n="selected-count"></span>{{counter}}</div>
260
260
  <button
261
261
  type="button"
262
262
  class="uc-done-btn uc-primary-btn"
263
- bind="onclick: onDone; @disabled: !counter"
263
+ set="onclick: onDone; @disabled: !counter"
264
264
  l10n="done"
265
265
  ></button>
266
266
  </div>
@@ -7,9 +7,9 @@
7
7
  const styleToCss = (style) => {
8
8
  const css = Object.keys(style).reduce((acc, selector) => {
9
9
  const propertiesObj = style[selector];
10
- const propertiesStr = Object.keys(propertiesObj).reduce((innerAcc, prop) => {
10
+ const propertiesStr = Object.keys(propertiesObj).reduce((acc, prop) => {
11
11
  const value = propertiesObj[prop];
12
- return innerAcc + `${prop}: ${value};`;
12
+ return acc + `${prop}: ${value};`;
13
13
  }, '');
14
14
  return acc + `${selector}{${propertiesStr}}`;
15
15
  }, '');
@@ -1 +1 @@
1
- {"version":3,"file":"query-string.d.ts","sourceRoot":"","sources":["query-string.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH,oCAHW;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;CAAE,GAC7D,MAAM,CAWlB"}
1
+ {"version":3,"file":"query-string.d.ts","sourceRoot":"","sources":["query-string.js"],"names":[],"mappings":"AAAA;;;GAGG;AACH;;IAFa,MAAM,CAWlB"}
@@ -35,10 +35,10 @@ export class FileItem extends UploaderBlock {
35
35
  '*uploadList': never[];
36
36
  '*focusedEntry': null;
37
37
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
38
- '*collectionErrors': import("../../index.js").OutputErrorCollection[];
39
- '*collectionState': import("../../index.js").OutputCollectionState | null;
38
+ '*collectionErrors': any[];
39
+ '*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
40
40
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
41
- '*uploadTrigger': Set<string>;
41
+ '*uploadTrigger': Set<string>; /** @private */
42
42
  '*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
43
43
  '*currentActivity': null;
44
44
  '*currentActivityParams': {};
@@ -1 +1 @@
1
- {"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["FileItem.js"],"names":[],"mappings":"AAmBA;IAIE,eAAe;IACf,mBAAuB;IACvB;;;OAGG;IACH,eAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gCAA4E;IAC5E,eAAe;IACf,iCAA0E;IAE1E,eAAe;IACf,sBAAsB;IAKpB;;;;;;;;;;;;;;;;;;;;;oCA/B+B,gBAC5B;mCAGS,gBAGd;6BAEY,2BAEG;;wCAON,wCACS;;;;;;MA2Cf;IAGH,eASC;IAED;;;OAGG;IACH,0BAaC;IAED,eAAe;IACf,wBAgBC;IAED,eAAe;IACf,2BAsCC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;OAGG;IACH,uBAkDC;IAsCD,wEAAwE;IACxE,oBADY,CAAC,OAAO,aAAa,EAAE,MAAM,OAAO,aAAa,CAAC,QAsB7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAqFC;CACF;;;;;8BAla6B,iCAAiC;AAO/D;;;;;GAKG"}
1
+ {"version":3,"file":"FileItem.d.ts","sourceRoot":"","sources":["FileItem.js"],"names":[],"mappings":"AAkBA;IAIE,eAAe;IACf,mBAAuB;IACvB;;;OAGG;IACH,eAAc;IACd,eAAe;IACf,wBAAwB;IACxB,eAAe;IACf,gCAA4E;IAC5E,eAAe;IACf,iCAA0E;IAE1E,eAAe;IACf,sBAAsB;IAKpB;;;;;;;;;;;;;;;;;;;;;;;;uCAXF,eAAe;;;;;;;MA0CZ;IAGH,eASC;IAED;;;OAGG;IACH,0BAaC;IAED,eAAe;IACf,wBAgBC;IAED,eAAe;IACf,2BAsCC;IAED;;;;OAIG;IACH,kBAUC;IAED;;;OAGG;IACH,uBAkDC;IAsCD,wEAAwE;IACxE,oBADY,CAAC,oBAAoB,CAAC,CAAC,MAAM,oBAAoB,CAAC,QAsB7D;IAaC,eAAe;IACf,kBAEE;IAWJ;;;MAEC;IAED;;;OAGG;IACH,uBAEC;IAED,wBAqFC;CACF;;;;;8BAla6B,iCAAiC;AAO/D;;;;;GAKG"}
@@ -1,5 +1,4 @@
1
1
  // @ts-check
2
- import { html } from '@symbiotejs/symbiote';
3
2
  import { CancelError, uploadFile } from '@uploadcare/upload-client';
4
3
  import { shrinkFile } from '@uploadcare/image-shrink';
5
4
  import { ActivityBlock } from '../../abstract/ActivityBlock.js';
@@ -294,7 +293,7 @@ export class FileItem extends UploaderBlock {
294
293
  isFinished: state === FileItemState.FINISHED,
295
294
  progressVisible: state === FileItemState.UPLOADING,
296
295
  isEditable: this.cfg.useCloudImageEditor && this._entry?.getValue('isImage') && this._entry?.getValue('cdnUrl'),
297
- errorText: this._entry.getValue('errors')?.[0]?.message ?? '',
296
+ errorText: this._entry.getValue('errors')?.[0]?.message,
298
297
  });
299
298
  }
300
299
 
@@ -423,23 +422,23 @@ export class FileItem extends UploaderBlock {
423
422
  }
424
423
  }
425
424
 
426
- FileItem.template = html`
427
- <div class="uc-inner" bind="@finished: isFinished; @uploading: isUploading; @failed: isFailed; @focused: isFocused">
428
- <div class="uc-thumb" bind="style.backgroundImage: thumbUrl">
425
+ FileItem.template = /* HTML */ `
426
+ <div class="uc-inner" set="@finished: isFinished; @uploading: isUploading; @failed: isFailed; @focused: isFocused">
427
+ <div class="uc-thumb" set="style.backgroundImage: thumbUrl">
429
428
  <div class="uc-badge">
430
- <uc-icon bind="@name: badgeIcon"></uc-icon>
429
+ <uc-icon set="@name: badgeIcon"></uc-icon>
431
430
  </div>
432
431
  </div>
433
432
  <div class="uc-file-name-wrapper">
434
- <span class="uc-file-name" bind="@title: itemName">{{itemName}}</span>
435
- <span class="uc-file-error" bind="@hidden: !errorText">{{errorText}}</span>
433
+ <span class="uc-file-name" set="@title: itemName">{{itemName}}</span>
434
+ <span class="uc-file-error" set="@hidden: !errorText">{{errorText}}</span>
436
435
  </div>
437
436
  <div class="uc-file-actions">
438
437
  <button
439
438
  type="button"
440
439
  l10n="@title:file-item-edit-button"
441
440
  class="uc-edit-btn uc-mini-btn"
442
- bind="onclick: onEdit; @hidden: !isEditable"
441
+ set="onclick: onEdit; @hidden: !isEditable"
443
442
  >
444
443
  <uc-icon name="edit-file"></uc-icon>
445
444
  </button>
@@ -447,15 +446,15 @@ FileItem.template = html`
447
446
  type="button"
448
447
  l10n="@title:file-item-remove-button"
449
448
  class="uc-remove-btn uc-mini-btn"
450
- bind="onclick: onRemove;"
449
+ set="onclick: onRemove;"
451
450
  >
452
451
  <uc-icon name="remove-file"></uc-icon>
453
452
  </button>
454
- <button type="button" class="uc-upload-btn uc-mini-btn" bind="onclick: onUpload;">
453
+ <button type="button" class="uc-upload-btn uc-mini-btn" set="onclick: onUpload;">
455
454
  <uc-icon name="upload"></uc-icon>
456
455
  </button>
457
456
  </div>
458
- <uc-progress-bar class="uc-progress-bar" bind="value: progressValue; visible: progressVisible;"> </uc-progress-bar>
457
+ <uc-progress-bar class="uc-progress-bar" set="value: progressValue; visible: progressVisible;"> </uc-progress-bar>
459
458
  </div>
460
459
  `;
461
460
  FileItem.activeInstances = new Set();
@@ -2,6 +2,7 @@ export class Icon extends Block {
2
2
  init$: {
3
3
  name: string;
4
4
  href: string;
5
+ title: string;
5
6
  };
6
7
  }
7
8
  export namespace Icon {
@@ -1 +1 @@
1
- {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":"AAIA;IAII;;;MAIC;CAmBJ;;;;sBA7BqB,yBAAyB"}
1
+ {"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["Icon.js"],"names":[],"mappings":"AAGA;IAII;;;;MAKC;CAmBJ;;;;sBA9BqB,yBAAyB"}
@@ -1,5 +1,4 @@
1
1
  // @ts-check
2
- import { html } from '@symbiotejs/symbiote';
3
2
  import { Block } from '../../abstract/Block.js';
4
3
 
5
4
  export class Icon extends Block {
@@ -10,6 +9,7 @@ export class Icon extends Block {
10
9
  ...this.init$,
11
10
  name: '',
12
11
  href: '',
12
+ title: '',
13
13
  };
14
14
  }
15
15
 
@@ -31,12 +31,14 @@ export class Icon extends Block {
31
31
  }
32
32
  }
33
33
 
34
- Icon.template = html`
34
+ Icon.template = /* HTML */ `
35
35
  <svg ref="svg" xmlns="http://www.w3.org/2000/svg">
36
- <use bind="@href: href;"></use>
36
+ <title>{{title}}</title>
37
+ <use set="@href: href;"></use>
37
38
  </svg>
38
39
  `;
39
40
 
40
41
  Icon.bindAttributes({
41
42
  name: 'name',
43
+ title: 'title',
42
44
  });
@@ -103,8 +103,8 @@ export class ImgBase extends ImgConfig {
103
103
  createCdnUrl(
104
104
  //
105
105
  createOriginalUrl(this.$$('cdn-cname'), this.$$('uuid')),
106
- cdnModifiers,
107
- ),
106
+ cdnModifiers
107
+ )
108
108
  );
109
109
  }
110
110
 
@@ -114,8 +114,8 @@ export class ImgBase extends ImgConfig {
114
114
  createCdnUrl(
115
115
  //
116
116
  createOriginalUrl(this.$$('cdn-cname'), this.$$('uuid')),
117
- cdnModifiers,
118
- ),
117
+ cdnModifiers
118
+ )
119
119
  );
120
120
  }
121
121
 
@@ -126,8 +126,8 @@ export class ImgBase extends ImgConfig {
126
126
  //
127
127
  this.$$('proxy-cname'),
128
128
  cdnModifiers,
129
- this._fmtAbs(this.$$('src')),
130
- ),
129
+ this._fmtAbs(this.$$('src'))
130
+ )
131
131
  );
132
132
  }
133
133
 
@@ -138,8 +138,8 @@ export class ImgBase extends ImgConfig {
138
138
  //
139
139
  `https://${this.$$('pubkey')}.ucr.io/`,
140
140
  cdnModifiers,
141
- this._fmtAbs(this.$$('src')),
142
- ),
141
+ this._fmtAbs(this.$$('src'))
142
+ )
143
143
  );
144
144
  }
145
145
  }
@@ -157,7 +157,7 @@ export class ImgBase extends ImgConfig {
157
157
  return applyTemplateData(
158
158
  this.$$('secure-delivery-proxy'),
159
159
  { previewUrl: url },
160
- { transform: (value) => window.encodeURIComponent(value) },
160
+ { transform: (value) => window.encodeURIComponent(value) }
161
161
  );
162
162
  }
163
163
 
@@ -1,4 +1,4 @@
1
- export class ImgConfig extends Symbiote<any> {
1
+ export class ImgConfig extends BaseComponent<any> {
2
2
  static get observedAttributes(): string[];
3
3
  constructor();
4
4
  cssInit$: any;
@@ -27,5 +27,5 @@ export class ImgConfig extends Symbiote<any> {
27
27
  private _observed;
28
28
  attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
29
29
  }
30
- import { Symbiote } from '@symbiotejs/symbiote';
30
+ import { BaseComponent } from '@symbiotejs/symbiote';
31
31
  //# sourceMappingURL=ImgConfig.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ImgConfig.d.ts","sourceRoot":"","sources":["ImgConfig.js"],"names":[],"mappings":"AAUA;IAkFE,0CAEC;;IAnFD,cAAqB;IAErB;;;OAGG;IACH,iBAFa,GAAG,CAIf;IAED,qDAAqD;IACrD,wBAIC;IAED;;;OAGG;IACH,yBAFW,CAAC,GAAG,EAAE,GAAG,KAAK,IAAI,QAW5B;IAED,0BAEC;IAED,8BAMC;IAED;;;OAGG;IACH,qBAHW,WAAW,SACX,MAAM,IAAI,QAsBpB;IAfC,eAAe;IACf,qBAOQ;IAGN,eAAe;IACf,kBAA0B;IAoB9B,oEAIC;CACF;yBArGgC,sBAAsB"}
1
+ {"version":3,"file":"ImgConfig.d.ts","sourceRoot":"","sources":["ImgConfig.js"],"names":[],"mappings":"AAUA;IAkFE,0CAEC;IAlDgD,cACjD;IAlCA,cAAqB;IAErB;;;OAGG;IACH,iBAFa,GAAG,CAIf;IAED,qDAAqD;IACrD,wBAIC;IAED;;;OAGG;IACH,+BAFiB,GAAG,KAAK,IAAI,QAW5B;IAED,0BAEC;IAED,8BAMC;IAED;;;OAGG;IACH,qBAHW,WAAW,SACX,MAAM,IAAI,QAsBpB;IAfC,eAAe;IACf,qBAOQ;IAGN,eAAe;IACf,kBAA0B;IAoB9B,oEAIC;CACF;8BArGmC,sBAAsB"}
@@ -1,4 +1,4 @@
1
- import { Symbiote, PubSub } from '@symbiotejs/symbiote';
1
+ import { BaseComponent, Data } from '@symbiotejs/symbiote';
2
2
  import { PROPS_MAP } from './props-map.js';
3
3
  import { CSS_PREF } from './configurations.js';
4
4
  import { PACKAGE_NAME, PACKAGE_VERSION } from '../../env.js';
@@ -8,7 +8,7 @@ for (let prop in PROPS_MAP) {
8
8
  CSS_PROPS[CSS_PREF + prop] = PROPS_MAP[prop]?.default || '';
9
9
  }
10
10
 
11
- export class ImgConfig extends Symbiote {
11
+ export class ImgConfig extends BaseComponent {
12
12
  cssInit$ = CSS_PROPS;
13
13
 
14
14
  /**
@@ -87,7 +87,7 @@ export class ImgConfig extends Symbiote {
87
87
  });
88
88
  this._isnObserver = null;
89
89
  }
90
- PubSub.deleteCtx(this);
90
+ Data.deleteCtx(this);
91
91
  }
92
92
 
93
93
  static get observedAttributes() {
@@ -1,6 +1,6 @@
1
1
  export const parseObjectToString = (params) =>
2
2
  Object.entries(params)
3
- .filter(([, value]) => value !== undefined && value !== '')
3
+ .filter(([key, value]) => value !== undefined && value !== '')
4
4
  .map(([key, value]) => {
5
5
  if (key === 'cdn-operations') {
6
6
  return value;
@@ -1 +1 @@
1
- {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["Modal.js"],"names":[],"mappings":"AAIA;IAEE,kCAAoC;IAIlC;;;;MAKC;IAGH,iCAEE;IAEF,yBAEE;IAEF,+BAEE;IAEF,uBAAuB;IACvB,4BADY,KAAK,UAIf;IAFA,eAAe;IACf,yBAAgC;IAGlC,uBAAuB;IACvB,0BADY,KAAK,UAKf;IAEF,aAMC;IAED,aAMC;CAqDF;;;;sBA5GqB,yBAAyB"}
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["Modal.js"],"names":[],"mappings":"AAGA;IAEE,kCAAoC;IAIlC;;;;MAKC;IAGH,iCAEE;IAEF,yBAEE;IAEF,+BAEE;IAEF,uBAAuB;IACvB,4BADY,KAAK,UAIf;IAFA,eAAe;IACf,yBAAgC;IAGlC,uBAAuB;IACvB,0BADY,KAAK,UAKf;IAEF,aAMC;IAED,aAMC;CAqDF;;;;sBA5GqB,yBAAyB"}
@@ -1,5 +1,4 @@
1
1
  // @ts-check
2
- import { html } from '@symbiotejs/symbiote';
3
2
  import { Block } from '../../abstract/Block.js';
4
3
 
5
4
  export class Modal extends Block {
@@ -110,7 +109,7 @@ export class Modal extends Block {
110
109
  }
111
110
  }
112
111
 
113
- Modal.template = html`
112
+ Modal.template = /* HTML */ `
114
113
  <dialog ref="dialog">
115
114
  <slot></slot>
116
115
  </dialog>
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["ProgressBar.js"],"names":[],"mappings":"AAGA;IACE,qBAAqB;IACrB,eAAW;IAEX,WAIE;CAyBH;;;;sBAnCqB,yBAAyB"}
1
+ {"version":3,"file":"ProgressBar.d.ts","sourceRoot":"","sources":["ProgressBar.js"],"names":[],"mappings":"AAEA;IACE,qBAAqB;IACrB,eAAW;IAEX,WAIE;CAyBH;;;;sBAnCqB,yBAAyB"}
@@ -1,4 +1,3 @@
1
- import { html } from '@symbiotejs/symbiote';
2
1
  import { Block } from '../../abstract/Block.js';
3
2
 
4
3
  export class ProgressBar extends Block {
@@ -36,4 +35,4 @@ export class ProgressBar extends Block {
36
35
  }
37
36
  }
38
37
 
39
- ProgressBar.template = html` <div ref="line" class="uc-progress"></div> `;
38
+ ProgressBar.template = /* HTML */ ` <div ref="line" class="uc-progress"></div> `;
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBarCommon.d.ts","sourceRoot":"","sources":["ProgressBarCommon.js"],"names":[],"mappings":"AAGA;IACE,WAME;CAgCH;;;;8BAzC6B,iCAAiC"}
1
+ {"version":3,"file":"ProgressBarCommon.d.ts","sourceRoot":"","sources":["ProgressBarCommon.js"],"names":[],"mappings":"AAEA;IACE,WAME;CAgCH;;;;8BAzC6B,iCAAiC"}
@@ -1,4 +1,3 @@
1
- import { html } from '@symbiotejs/symbiote';
2
1
  import { UploaderBlock } from '../../abstract/UploaderBlock.js';
3
2
 
4
3
  export class ProgressBarCommon extends UploaderBlock {
@@ -42,4 +41,4 @@ export class ProgressBarCommon extends UploaderBlock {
42
41
  }
43
42
  }
44
43
 
45
- ProgressBarCommon.template = html` <uc-progress-bar bind="visible: visible; value: value"></uc-progress-bar> `;
44
+ ProgressBarCommon.template = /* HTML */ ` <uc-progress-bar set="visible: visible; value: value"></uc-progress-bar> `;
@@ -0,0 +1,16 @@
1
+ export class Range extends BaseComponent<any> {
2
+ constructor();
3
+ init$: {
4
+ cssLeft: string;
5
+ barActive: boolean;
6
+ value: number;
7
+ onChange: (e: any) => void;
8
+ };
9
+ /** @type {HTMLInputElement} */
10
+ _range: HTMLInputElement | undefined;
11
+ }
12
+ export namespace Range {
13
+ let template: string;
14
+ }
15
+ import { BaseComponent } from '@symbiotejs/symbiote';
16
+ //# sourceMappingURL=Range.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Range.d.ts","sourceRoot":"","sources":["Range.js"],"names":[],"mappings":"AAEA;IAqC0C,cAAgB;IApCxD;;;;;MAUE;IAIA,+BAA+B;IAC/B,qCAA4B;CAe/B;;;;8BAjC6B,sBAAsB"}
@@ -0,0 +1,44 @@
1
+ import { BaseComponent } from '@symbiotejs/symbiote';
2
+
3
+ export class Range extends BaseComponent {
4
+ init$ = {
5
+ cssLeft: '50%',
6
+ barActive: false,
7
+ value: 50,
8
+ onChange: (e) => {
9
+ e.preventDefault();
10
+ e.stopPropagation();
11
+ this.$.value = parseFloat(this._range.value);
12
+ this.dispatchEvent(new Event('change'));
13
+ },
14
+ };
15
+
16
+ initCallback() {
17
+ super.initCallback();
18
+ /** @type {HTMLInputElement} */
19
+ this._range = this.ref.range;
20
+ [...this.attributes].forEach((attr) => {
21
+ let exclude = ['style', 'ref'];
22
+ if (!exclude.includes(attr.name)) {
23
+ this.ref.range.setAttribute(attr.name, attr.value);
24
+ }
25
+ });
26
+ this.sub('value', (val) => {
27
+ let pcnt = (val / 100) * 100;
28
+ this.$.cssLeft = `${pcnt}%`;
29
+ });
30
+ this.defineAccessor('value', (val) => {
31
+ this.$.value = val;
32
+ });
33
+ }
34
+ }
35
+
36
+ Range.template = /* HTML */ `
37
+ <div class="uc-track-wrapper">
38
+ <div class="uc-track"></div>
39
+ <div class="uc-bar" set -style.width="cssLeft" -@active="barActive"></div>
40
+ <div class="uc-slider" set -style.left="cssLeft"></div>
41
+ </div>
42
+
43
+ <input type="range" ref="range" set -@value="value" -oninput="onChange" />
44
+ `;
@@ -0,0 +1,65 @@
1
+ uc-range {
2
+ position: relative;
3
+ display: inline-flex;
4
+ align-items: center;
5
+ justify-content: center;
6
+ height: var(--uc-button-size);
7
+ }
8
+
9
+ uc-range datalist {
10
+ display: none;
11
+ }
12
+
13
+ uc-range input {
14
+ width: 100%;
15
+ height: 100%;
16
+ opacity: 0;
17
+ }
18
+
19
+ uc-range .uc-track-wrapper {
20
+ position: absolute;
21
+ right: 10px;
22
+ left: 10px;
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: center;
26
+ height: 2px;
27
+ user-select: none;
28
+ pointer-events: none;
29
+ }
30
+
31
+ uc-range .uc-track {
32
+ position: absolute;
33
+ right: 0;
34
+ left: 0;
35
+ display: flex;
36
+ align-items: center;
37
+ justify-content: center;
38
+ height: 2px;
39
+ background-color: currentColor;
40
+ border-radius: 2px;
41
+ opacity: 0.5;
42
+ }
43
+
44
+ uc-range .uc-slider {
45
+ position: absolute;
46
+ width: 16px;
47
+ height: 16px;
48
+ background-color: currentColor;
49
+ border-radius: 100%;
50
+ transform: translateX(-50%);
51
+ }
52
+
53
+ uc-range .uc-bar {
54
+ position: absolute;
55
+ left: 0;
56
+ height: 100%;
57
+ background-color: currentColor;
58
+ border-radius: 2px;
59
+ }
60
+
61
+ uc-range .uc-caption {
62
+ position: absolute;
63
+ display: inline-flex;
64
+ justify-content: center;
65
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AAGA;IACE,WAeE;IAPE,WAAkC;CAyBvC;;;;sBApCqB,yBAAyB"}
1
+ {"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["Select.js"],"names":[],"mappings":"AAEA;IACE,WAeE;IAPE,WAAkC;CAqBvC;;;;sBAhCqB,yBAAyB"}
@@ -1,4 +1,3 @@
1
- import { html } from '@symbiotejs/symbiote';
2
1
  import { Block } from '../../abstract/Block.js';
3
2
 
4
3
  export class Select extends Block {
@@ -22,19 +21,15 @@ export class Select extends Block {
22
21
  initCallback() {
23
22
  super.initCallback();
24
23
 
25
- this.defineAccessor(
26
- 'options',
27
- /** @param {{ text: String; value: String }[]} options */
28
- (options) => {
29
- this.$.currentText = options?.[0]?.text || '';
30
- let htmlCode = '';
31
- options?.forEach((opt) => {
32
- htmlCode += html`<option value="${opt.value}">${opt.text}</option>`;
33
- });
34
- this.$.selectHtml = htmlCode;
35
- },
36
- );
24
+ this.sub('options', (/** @type {{ text: String; value: String }[]} */ options) => {
25
+ this.$.currentText = options?.[0]?.text || '';
26
+ let html = '';
27
+ options?.forEach((opt) => {
28
+ html += /* HTML */ `<option value="${opt.value}">${opt.text}</option>`;
29
+ });
30
+ this.$.selectHtml = html;
31
+ });
37
32
  }
38
33
  }
39
34
 
40
- Select.template = html` <select ref="select" bind="innerHTML: selectHtml; onchange: onSelect"></select> `;
35
+ Select.template = /* HTML */ ` <select ref="select" set="innerHTML: selectHtml; onchange: onSelect"></select> `;
@@ -7,8 +7,8 @@ export class SimpleBtn extends UploaderBlock {
7
7
  '*uploadList': never[];
8
8
  '*focusedEntry': null;
9
9
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
10
- '*collectionErrors': import("../../index.js").OutputErrorCollection[];
11
- '*collectionState': import("../../index.js").OutputCollectionState | null;
10
+ '*collectionErrors': any[];
11
+ '*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
12
12
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
13
13
  '*uploadTrigger': Set<string>;
14
14
  '*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
@@ -1 +1 @@
1
- {"version":3,"file":"SimpleBtn.d.ts","sourceRoot":"","sources":["SimpleBtn.js"],"names":[],"mappings":"AAKA;IAMI;;;;;;;;oCAiBgB,gBAAU;mCAGO,gBACpC;6BAGoB,2BAA2B;;wCAO5B,wCAA2B;;;;;;MAxB1C;CAoBJ;;;;8BApC6B,iCAAiC"}
1
+ {"version":3,"file":"SimpleBtn.d.ts","sourceRoot":"","sources":["SimpleBtn.js"],"names":[],"mappings":"AAIA;IAMI;;;;;;;;;;;;;;;;;;MAOC;CAoBJ;;;;8BApC6B,iCAAiC"}
@@ -1,5 +1,4 @@
1
1
  // @ts-check
2
- import { html } from '@symbiotejs/symbiote';
3
2
  import { UploaderBlock } from '../../abstract/UploaderBlock.js';
4
3
  import { asBoolean } from '../Config/normalizeConfigValue.js';
5
4
 
@@ -38,9 +37,9 @@ export class SimpleBtn extends UploaderBlock {
38
37
  }
39
38
  }
40
39
 
41
- SimpleBtn.template = html`
42
- <uc-drop-area bind="@disabled: !withDropZone">
43
- <button type="button" bind="onclick: onClick">
40
+ SimpleBtn.template = /* HTML */ `
41
+ <uc-drop-area set="@disabled: !withDropZone">
42
+ <button type="button" set="onclick: onClick">
44
43
  <uc-icon name="upload"></uc-icon>
45
44
  <span l10n="button-text"></span>
46
45
  <slot></slot>
@@ -23,8 +23,8 @@ export class SourceBtn extends UploaderBlock {
23
23
  '*uploadList': never[];
24
24
  '*focusedEntry': null;
25
25
  '*uploadQueue': import("@uploadcare/upload-client").Queue;
26
- '*collectionErrors': import("../../index.js").OutputErrorCollection[];
27
- '*collectionState': import("../../index.js").OutputCollectionState | null;
26
+ '*collectionErrors': any[];
27
+ '*collectionState': import("../../index.js").OutputCollectionState<import("../../index.js").OutputCollectionStatus, "maybe-has-group"> | null;
28
28
  '*groupInfo': import("@uploadcare/upload-client").UploadcareGroup | null;
29
29
  '*uploadTrigger': Set<string>;
30
30
  '*secureUploadsManager': import("../../abstract/SecureUploadsManager.js").SecureUploadsManager | null;
@@ -1 +1 @@
1
- {"version":3,"file":"SourceBtn.d.ts","sourceRoot":"","sources":["SourceBtn.js"],"names":[],"mappings":"AAOA;;;;;;;;;GASG;AAEH;IAEE,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACZ;IACjB;;;OAGG;IACH,yBAAsB;IAKpB;;;;;;;oCAAA,gBAAS;mCAIT,gBAEJ;6BAG0C,2BAE1C;;wCAK+B,wCAChB;;;;;;MAbV;IAGH,kBAuCC;IAkBD,kCAAkC;IAClC,yBADY,OAAO,QAGlB;IAED,2BAA2B;IAC3B,cADY,MAAM,WAGjB;IAED,iBAYC;IAED,2BAA2B;IAC3B,gBADY,MAAM,QAcjB;CACF;;;;sBA9HY;IACZ,IAAQ,EAAE,MAAM,CAAC;IACjB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,cAAkB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;8BAZ0B,iCAAiC"}
1
+ {"version":3,"file":"SourceBtn.d.ts","sourceRoot":"","sources":["SourceBtn.js"],"names":[],"mappings":"AAMA;;;;;;;;;GASG;AAEH;IAEE,iCAAiC;IACjC,MADW,MAAM,GAAG,SAAS,CACZ;IACjB;;;OAGG;IACH,yBAAsB;IAKpB;;;;;;;;;;;;;;;;;MAIC;IAGH,kBAuCC;IAkBD,kCAAkC;IAClC,yBADY,OAAO,QAGlB;IAED,2BAA2B;IAC3B,cADY,MAAM,WAGjB;IAED,iBAYC;IAED,2BAA2B;IAC3B,gBADY,MAAM,QAcjB;CACF;;;;sBA9HY;IACZ,IAAQ,EAAE,MAAM,CAAC;IACjB,QAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAY,CAAC,EAAE,MAAM,OAAO,CAAC;IAC7B,cAAkB,CAAC,EAAE,OAAO,MAAM,EAAE,OAAO,CAAC,CAAC;CAC1C;8BAb0B,iCAAiC"}
@@ -1,7 +1,6 @@
1
1
  // @ts-check
2
- import { html } from '@symbiotejs/symbiote';
3
- import { ActivityBlock } from '../../abstract/ActivityBlock.js';
4
2
  import { UploaderBlock } from '../../abstract/UploaderBlock.js';
3
+ import { ActivityBlock } from '../../abstract/ActivityBlock.js';
5
4
 
6
5
  const L10N_PREFIX = 'src-type-';
7
6
 
@@ -133,9 +132,10 @@ export class SourceBtn extends UploaderBlock {
133
132
  };
134
133
  }
135
134
  }
136
- SourceBtn.template = html`
135
+
136
+ SourceBtn.template = /* HTML */ `
137
137
  <button type="button">
138
- <uc-icon bind="@name: iconName"></uc-icon>
138
+ <uc-icon set="@name: iconName"></uc-icon>
139
139
  <div class="uc-txt" l10n="src-type"></div>
140
140
  </button>
141
141
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"SourceList.d.ts","sourceRoot":"","sources":["SourceList.js"],"names":[],"mappings":"AAIA;CAgBC;sBApBqB,yBAAyB"}
1
+ {"version":3,"file":"SourceList.d.ts","sourceRoot":"","sources":["SourceList.js"],"names":[],"mappings":"AAGA;CAgBC;sBAnBqB,yBAAyB"}
@@ -1,20 +1,19 @@
1
1
  import { Block } from '../../abstract/Block.js';
2
2
  import { stringToArray } from '../../utils/stringToArray.js';
3
- import { html } from '@symbiotejs/symbiote';
4
3
 
5
4
  export class SourceList extends Block {
6
5
  initCallback() {
7
6
  super.initCallback();
8
7
  this.subConfigValue('sourceList', (/** @type {String} */ val) => {
9
8
  let list = stringToArray(val);
10
- let htmlContent = '';
9
+ let html = '';
11
10
  list.forEach((srcName) => {
12
- htmlContent += html`<uc-source-btn type="${srcName}"></uc-source-btn>`;
11
+ html += /* HTML */ `<uc-source-btn type="${srcName}"></uc-source-btn>`;
13
12
  });
14
13
  if (this.cfg.sourceListWrap) {
15
- this.innerHTML = htmlContent;
14
+ this.innerHTML = html;
16
15
  } else {
17
- this.outerHTML = htmlContent;
16
+ this.outerHTML = html;
18
17
  }
19
18
  });
20
19
  }