@yungu-fed/question-editor 0.8.1 → 0.8.2

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.mjs CHANGED
@@ -2178,6 +2178,7 @@ var Za = {
2178
2178
  audio: "\u97f3\u9891",
2179
2179
  video: "\u89c6\u9891",
2180
2180
  playVideo: "\u64ad\u653e\u89c6\u9891",
2181
+ playAudio: "\u64ad\u653e\u97f3\u9891",
2181
2182
  close: "\u5173\u95ed",
2182
2183
  add: "\u4e0a\u4f20\u97f3\u89c6\u9891",
2183
2184
  uploadHint: "\u70b9\u51fb\u9009\u62e9\u6587\u4ef6\uff0c\u652f\u6301\u540c\u65f6\u4e0a\u4f20\u591a\u4e2a\u97f3\u9891\u6216\u89c6\u9891",
@@ -2193,6 +2194,7 @@ var Za = {
2193
2194
  audio: "Audio",
2194
2195
  video: "Video",
2195
2196
  playVideo: "Play video",
2197
+ playAudio: "Play audio",
2196
2198
  close: "Close",
2197
2199
  add: "Upload audio/video",
2198
2200
  uploadHint: "Click to select files \u00b7 Multiple audio and video files supported",
@@ -5141,89 +5143,35 @@ function Ps() {
5141
5143
  });
5142
5144
  }
5143
5145
  var Fs = {
5144
- media: "_media_1yuwz_1",
5145
- file: "_file_1yuwz_8",
5146
- "video-trigger": "_video-trigger_1yuwz_28",
5147
- "video-dialog": "_video-dialog_1yuwz_53",
5148
- "dialog-content": "_dialog-content_1yuwz_70",
5149
- "dialog-header": "_dialog-header_1yuwz_75",
5150
- "dialog-close": "_dialog-close_1yuwz_85",
5151
- "dialog-video": "_dialog-video_1yuwz_97",
5152
- "dialog-error": "_dialog-error_1yuwz_105",
5153
- "video-playback-area": "_video-playback-area_1yuwz_117"
5154
- }, Is = {
5155
- list: "_list_8zavn_1",
5156
- file: "_file_8zavn_7",
5157
- "video-trigger": "_video-trigger_8zavn_22",
5158
- visual: "_visual_8zavn_35",
5159
- "audio-visual": "_audio-visual_8zavn_36",
5160
- waveform: "_waveform_8zavn_58",
5161
- caption: "_caption_8zavn_63",
5162
- badge: "_badge_8zavn_74",
5163
- filename: "_filename_8zavn_83"
5146
+ media: "_media_1yvsi_1",
5147
+ file: "_file_1yvsi_8",
5148
+ "video-trigger": "_video-trigger_1yvsi_28",
5149
+ "video-dialog": "_video-dialog_1yvsi_53",
5150
+ "dialog-content": "_dialog-content_1yvsi_70",
5151
+ "dialog-header": "_dialog-header_1yvsi_75",
5152
+ "dialog-close": "_dialog-close_1yvsi_85",
5153
+ "dialog-video": "_dialog-video_1yvsi_97",
5154
+ "dialog-error": "_dialog-error_1yvsi_105",
5155
+ "video-playback-area": "_video-playback-area_1yvsi_117",
5156
+ "audio-dialog": "_audio-dialog_1yvsi_161",
5157
+ "dialog-audio": "_dialog-audio_1yvsi_165"
5158
+ }, H = {
5159
+ list: "_list_ndlif_1",
5160
+ file: "_file_ndlif_7",
5161
+ "video-trigger": "_video-trigger_ndlif_23",
5162
+ visual: "_visual_ndlif_36",
5163
+ "audio-visual": "_audio-visual_ndlif_37",
5164
+ overlay: "_overlay_ndlif_58",
5165
+ waveform: "_waveform_ndlif_91",
5166
+ caption: "_caption_ndlif_99",
5167
+ badge: "_badge_ndlif_110",
5168
+ filename: "_filename_ndlif_124",
5169
+ editable: "_editable_ndlif_141",
5170
+ actions: "_actions_ndlif_145"
5164
5171
  };
5165
5172
  //#endregion
5166
- //#region src/question/media/QuestionVideoPlayback.tsx
5167
- function Ls({ file: e, locale: t, presentation: n = "filename" }) {
5168
- let [r, s] = g(!1), c = h(null), l = Za[t];
5169
- function u() {
5170
- var e;
5171
- s(!1), (e = c.current) == null || e.focus(), requestAnimationFrame(() => {
5172
- var e;
5173
- return (e = c.current) == null ? void 0 : e.focus();
5174
- });
5175
- }
5176
- let d = /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("video", {
5177
- "aria-hidden": "true",
5178
- muted: !0,
5179
- playsInline: !0,
5180
- preload: "metadata",
5181
- src: e.src
5182
- }), /* @__PURE__ */ a("svg", {
5183
- "aria-hidden": "true",
5184
- width: "24",
5185
- height: "24",
5186
- viewBox: "0 0 24 24",
5187
- fill: "currentColor",
5188
- children: /* @__PURE__ */ a("path", { d: "M8 5v14l11-7z" })
5189
- })] });
5190
- return /* @__PURE__ */ o(i, { children: [
5191
- /* @__PURE__ */ o("button", {
5192
- className: n === "preview" ? Is["video-trigger"] : Fs["video-trigger"],
5193
- type: "button",
5194
- ref: c,
5195
- "aria-label": `${l.playVideo}: ${e.name}`,
5196
- title: `${l.playVideo}: ${e.name}`,
5197
- onClick: () => s(!0),
5198
- children: [n === "preview" && /* @__PURE__ */ a("span", {
5199
- className: `${Fs["video-playback-area"]} ${Is.visual}`,
5200
- children: d
5201
- }), n === "preview" ? /* @__PURE__ */ o("span", {
5202
- className: Is.caption,
5203
- children: [/* @__PURE__ */ a("span", {
5204
- className: Is.badge,
5205
- children: l.video
5206
- }), /* @__PURE__ */ a("span", {
5207
- className: Is.filename,
5208
- children: e.name
5209
- })]
5210
- }) : /* @__PURE__ */ a("span", { children: e.name })]
5211
- }),
5212
- n === "editor" && /* @__PURE__ */ a("button", {
5213
- className: Fs["video-playback-area"],
5214
- type: "button",
5215
- "aria-label": `${l.playVideo}: ${e.name}`,
5216
- onClick: () => s(!0),
5217
- children: d
5218
- }),
5219
- r && _(/* @__PURE__ */ a(Rs, {
5220
- file: e,
5221
- locale: t,
5222
- onClose: u
5223
- }), document.body)
5224
- ] });
5225
- }
5226
- function Rs({ file: e, locale: t, onClose: n }) {
5173
+ //#region src/question/media/QuestionMediaDialog.tsx
5174
+ function Is({ file: e, locale: t, onClose: n }) {
5227
5175
  let r = h(null), [i, s] = g(!1);
5228
5176
  f(() => {
5229
5177
  var e;
@@ -5231,7 +5179,7 @@ function Rs({ file: e, locale: t, onClose: n }) {
5231
5179
  }, []);
5232
5180
  let c = Za[t];
5233
5181
  return /* @__PURE__ */ a("dialog", {
5234
- className: Fs["video-dialog"],
5182
+ className: `${Fs["video-dialog"]} ${e.kind === "audio" ? Fs["audio-dialog"] : ""}`,
5235
5183
  ref: r,
5236
5184
  "aria-label": e.name,
5237
5185
  onCancel: (e) => {
@@ -5253,7 +5201,14 @@ function Rs({ file: e, locale: t, onClose: n }) {
5253
5201
  children: "\u00d7"
5254
5202
  })]
5255
5203
  }),
5256
- /* @__PURE__ */ a("video", {
5204
+ e.kind === "audio" ? /* @__PURE__ */ a("audio", {
5205
+ className: Fs["dialog-audio"],
5206
+ "aria-label": e.name,
5207
+ controls: !0,
5208
+ preload: "metadata",
5209
+ src: e.src,
5210
+ onError: () => s(!0)
5211
+ }) : /* @__PURE__ */ a("video", {
5257
5212
  className: Fs["dialog-video"],
5258
5213
  "aria-label": e.name,
5259
5214
  controls: !0,
@@ -5272,89 +5227,156 @@ function Rs({ file: e, locale: t, onClose: n }) {
5272
5227
  });
5273
5228
  }
5274
5229
  //#endregion
5275
- //#region src/question/media/QuestionMediaView.tsx
5276
- function zs({ file: e, locale: t }) {
5277
- let [n, r] = g(!1), s = {
5278
- "aria-label": e.name,
5279
- controls: !0,
5280
- onError: () => r(!0),
5230
+ //#region src/question/media/QuestionAudioPreview.tsx
5231
+ function Ls({ file: e, locale: t }) {
5232
+ let [n, r] = g(!1), s = h(null), c = Za[t];
5233
+ function l() {
5234
+ r(!1), requestAnimationFrame(() => {
5235
+ var e;
5236
+ return (e = s.current) == null ? void 0 : e.focus();
5237
+ });
5238
+ }
5239
+ return /* @__PURE__ */ o(i, { children: [
5240
+ /* @__PURE__ */ o("button", {
5241
+ ref: s,
5242
+ className: H["audio-visual"],
5243
+ type: "button",
5244
+ "aria-label": `${c.playAudio}: ${e.name}`,
5245
+ title: c.playAudio,
5246
+ onClick: () => r(!0),
5247
+ children: [/* @__PURE__ */ a("svg", {
5248
+ className: H.waveform,
5249
+ "aria-hidden": "true",
5250
+ width: "132",
5251
+ height: "36",
5252
+ viewBox: "0 0 132 36",
5253
+ fill: "none",
5254
+ stroke: "currentColor",
5255
+ strokeWidth: "4",
5256
+ strokeLinecap: "round",
5257
+ children: /* @__PURE__ */ a("path", { d: "M4 15v6m10-12v18m10-16v14m10-21v28m10-17v6m10-11v16m10-23v30m10-24v18m10-13v8m10-18v28m10-21v14m10-17v20m10-13v6" })
5258
+ }), /* @__PURE__ */ a("span", {
5259
+ className: H.overlay,
5260
+ children: /* @__PURE__ */ a("svg", {
5261
+ "aria-hidden": "true",
5262
+ width: "24",
5263
+ height: "24",
5264
+ viewBox: "0 0 24 24",
5265
+ fill: "currentColor",
5266
+ children: /* @__PURE__ */ a("path", { d: "M8 5v14l11-7z" })
5267
+ })
5268
+ })]
5269
+ }),
5270
+ /* @__PURE__ */ o("div", {
5271
+ className: H.caption,
5272
+ title: e.name,
5273
+ children: [/* @__PURE__ */ a("span", {
5274
+ className: H.badge,
5275
+ children: c.audio
5276
+ }), /* @__PURE__ */ a("span", {
5277
+ className: H.filename,
5278
+ children: e.name
5279
+ })]
5280
+ }),
5281
+ n && _(/* @__PURE__ */ a(Is, {
5282
+ file: e,
5283
+ locale: t,
5284
+ onClose: l
5285
+ }), document.body)
5286
+ ] });
5287
+ }
5288
+ //#endregion
5289
+ //#region src/question/media/QuestionVideoPlayback.tsx
5290
+ function Rs({ file: e, locale: t, presentation: n = "filename" }) {
5291
+ let [r, s] = g(!1), c = h(null), l = Za[t];
5292
+ function u() {
5293
+ var e;
5294
+ s(!1), (e = c.current) == null || e.focus(), requestAnimationFrame(() => {
5295
+ var e;
5296
+ return (e = c.current) == null ? void 0 : e.focus();
5297
+ });
5298
+ }
5299
+ let d = /* @__PURE__ */ a("svg", {
5300
+ "aria-hidden": "true",
5301
+ width: "24",
5302
+ height: "24",
5303
+ viewBox: "0 0 24 24",
5304
+ fill: "currentColor",
5305
+ children: /* @__PURE__ */ a("path", { d: "M8 5v14l11-7z" })
5306
+ }), f = /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a("video", {
5307
+ "aria-hidden": "true",
5308
+ muted: !0,
5309
+ playsInline: !0,
5281
5310
  preload: "metadata",
5282
5311
  src: e.src
5283
- };
5284
- return /* @__PURE__ */ o(i, { children: [e.kind === "audio" ? /* @__PURE__ */ a("audio", C({}, s)) : /* @__PURE__ */ a(Ls, {
5312
+ }), n === "preview" ? /* @__PURE__ */ a("span", {
5313
+ className: H.overlay,
5314
+ children: d
5315
+ }) : d] });
5316
+ return /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("button", {
5317
+ className: n === "preview" ? H["video-trigger"] : Fs["video-trigger"],
5318
+ type: "button",
5319
+ ref: c,
5320
+ "aria-label": `${l.playVideo}: ${e.name}`,
5321
+ title: `${l.playVideo}: ${e.name}`,
5322
+ onClick: () => s(!0),
5323
+ children: [n === "preview" && /* @__PURE__ */ a("span", {
5324
+ className: `${Fs["video-playback-area"]} ${H.visual}`,
5325
+ children: f
5326
+ }), n === "preview" ? /* @__PURE__ */ o("span", {
5327
+ className: H.caption,
5328
+ children: [/* @__PURE__ */ a("span", {
5329
+ className: H.badge,
5330
+ children: l.video
5331
+ }), /* @__PURE__ */ a("span", {
5332
+ className: H.filename,
5333
+ children: e.name
5334
+ })]
5335
+ }) : /* @__PURE__ */ a("span", { children: e.name })]
5336
+ }), r && _(/* @__PURE__ */ a(Is, {
5285
5337
  file: e,
5286
- locale: t
5287
- }), n && /* @__PURE__ */ a("p", {
5288
- role: "status",
5289
- children: Za[t].playbackFailed
5290
- })] });
5338
+ locale: t,
5339
+ onClose: u
5340
+ }), document.body)] });
5291
5341
  }
5292
- function Bs({ item: e, locale: t, print: n = !1 }) {
5342
+ //#endregion
5343
+ //#region src/question/media/QuestionMediaView.tsx
5344
+ function zs({ item: e, locale: t, print: n = !1, renderFileActions: r }) {
5293
5345
  return /* @__PURE__ */ a("div", {
5294
- className: `${Fs.media} ${n ? "" : Is.list}`,
5295
- children: e.files.map((e) => /* @__PURE__ */ a("div", {
5296
- className: n ? Fs.file : Is.file,
5297
- children: n ? /* @__PURE__ */ o("div", { children: [
5346
+ className: `${Fs.media} ${n ? "" : H.list}`,
5347
+ children: e.files.map((e) => /* @__PURE__ */ o("div", {
5348
+ className: `${n ? Fs.file : H.file} ${!n && r ? H.editable : ""}`,
5349
+ children: [n ? /* @__PURE__ */ o("div", { children: [
5298
5350
  Za[t][e.kind],
5299
5351
  ": ",
5300
5352
  e.name
5301
- ] }) : /* @__PURE__ */ a(Vs, {
5353
+ ] }) : /* @__PURE__ */ a(Bs, {
5302
5354
  file: e,
5303
5355
  locale: t
5304
- })
5356
+ }), !n && r && /* @__PURE__ */ a("div", {
5357
+ className: H.actions,
5358
+ children: r(e)
5359
+ })]
5305
5360
  }, e.id))
5306
5361
  });
5307
5362
  }
5308
- function Vs({ file: e, locale: t }) {
5309
- return e.kind === "video" ? /* @__PURE__ */ a(Ls, {
5363
+ function Bs({ file: e, locale: t }) {
5364
+ return e.kind === "video" ? /* @__PURE__ */ a(Rs, {
5310
5365
  file: e,
5311
5366
  locale: t,
5312
5367
  presentation: "preview"
5313
- }, e.src) : /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ o("div", {
5314
- className: Is["audio-visual"],
5315
- children: [/* @__PURE__ */ a("svg", {
5316
- className: Is.waveform,
5317
- "aria-hidden": "true",
5318
- width: "132",
5319
- height: "36",
5320
- viewBox: "0 0 132 36",
5321
- fill: "none",
5322
- stroke: "currentColor",
5323
- strokeWidth: "4",
5324
- strokeLinecap: "round",
5325
- children: /* @__PURE__ */ a("path", { d: "M4 15v6m10-12v18m10-16v14m10-21v28m10-17v6m10-11v16m10-23v30m10-24v18m10-13v8m10-18v28m10-21v14m10-17v20m10-13v6" })
5326
- }), /* @__PURE__ */ a(zs, {
5327
- file: e,
5328
- locale: t
5329
- }, e.src)]
5330
- }), /* @__PURE__ */ o("div", {
5331
- className: Is.caption,
5332
- title: e.name,
5333
- children: [/* @__PURE__ */ a("span", {
5334
- className: Is.badge,
5335
- children: Za[t].audio
5336
- }), /* @__PURE__ */ a("span", {
5337
- className: Is.filename,
5338
- children: e.name
5339
- })]
5340
- })] });
5341
- }
5342
- var H = {
5343
- editor: "_editor_5kbnx_1",
5344
- upload: "_upload_5kbnx_6",
5345
- "upload-icon": "_upload-icon_5kbnx_29",
5346
- "upload-title": "_upload-title_5kbnx_40",
5347
- hint: "_hint_5kbnx_45",
5348
- files: "_files_5kbnx_74",
5349
- file: "_file_5kbnx_74",
5350
- "file-heading": "_file-heading_5kbnx_98",
5351
- badge: "_badge_5kbnx_107",
5352
- filename: "_filename_5kbnx_116",
5353
- actions: "_actions_5kbnx_125",
5354
- status: "_status_5kbnx_136",
5355
- "action-button": "_action-button_5kbnx_148",
5356
- "audio-player": "_audio-player_5kbnx_157",
5357
- "video-heading": "_video-heading_5kbnx_164"
5368
+ }, e.src) : /* @__PURE__ */ a(Ls, {
5369
+ file: e,
5370
+ locale: t
5371
+ }, e.src);
5372
+ }
5373
+ var Vs = {
5374
+ editor: "_editor_mwfet_1",
5375
+ upload: "_upload_mwfet_6",
5376
+ "upload-icon": "_upload-icon_mwfet_29",
5377
+ "upload-title": "_upload-title_mwfet_40",
5378
+ hint: "_hint_mwfet_45",
5379
+ status: "_status_mwfet_74"
5358
5380
  };
5359
5381
  //#endregion
5360
5382
  //#region src/question/content-editor/QuestionContentMediaEditor.tsx
@@ -5431,15 +5453,15 @@ function Hs({ disabled: e, item: t, onChange: n, uploadMedia: r, locale: i }) {
5431
5453
  });
5432
5454
  }
5433
5455
  return /* @__PURE__ */ o("div", {
5434
- className: `${Fs.media} ${H.editor}`,
5456
+ className: `${Fs.media} ${Vs.editor}`,
5435
5457
  children: [
5436
5458
  /* @__PURE__ */ o("label", {
5437
- className: H.upload,
5459
+ className: Vs.upload,
5438
5460
  "data-disabled": v || !r,
5439
5461
  "aria-busy": s,
5440
5462
  children: [
5441
5463
  /* @__PURE__ */ a("span", {
5442
- className: H["upload-icon"],
5464
+ className: Vs["upload-icon"],
5443
5465
  "aria-hidden": "true",
5444
5466
  children: /* @__PURE__ */ a("svg", {
5445
5467
  width: "24",
@@ -5454,11 +5476,11 @@ function Hs({ disabled: e, item: t, onChange: n, uploadMedia: r, locale: i }) {
5454
5476
  })
5455
5477
  }),
5456
5478
  /* @__PURE__ */ a("span", {
5457
- className: H["upload-title"],
5479
+ className: Vs["upload-title"],
5458
5480
  children: _.add
5459
5481
  }),
5460
5482
  /* @__PURE__ */ a("span", {
5461
- className: H.hint,
5483
+ className: Vs.hint,
5462
5484
  children: _.uploadHint
5463
5485
  }),
5464
5486
  w()
@@ -5469,7 +5491,7 @@ function Hs({ disabled: e, item: t, onChange: n, uploadMedia: r, locale: i }) {
5469
5491
  children: _.missingUploader
5470
5492
  }),
5471
5493
  s && /* @__PURE__ */ a("p", {
5472
- className: H.status,
5494
+ className: Vs.status,
5473
5495
  role: "status",
5474
5496
  children: _.uploading
5475
5497
  }),
@@ -5477,46 +5499,16 @@ function Hs({ disabled: e, item: t, onChange: n, uploadMedia: r, locale: i }) {
5477
5499
  role: "alert",
5478
5500
  children: l.map((e, t) => /* @__PURE__ */ a("p", { children: e }, t))
5479
5501
  }),
5480
- /* @__PURE__ */ a("div", {
5481
- className: H.files,
5482
- children: t.files.map((e) => /* @__PURE__ */ o("div", {
5483
- className: H.file,
5484
- children: [
5485
- /* @__PURE__ */ o("div", {
5486
- className: `${H["file-heading"]} ${e.kind === "video" ? H["video-heading"] : ""}`,
5487
- children: [/* @__PURE__ */ a("span", {
5488
- className: H.badge,
5489
- children: _[e.kind]
5490
- }), e.kind === "video" ? /* @__PURE__ */ a(Ls, {
5491
- file: e,
5492
- locale: i,
5493
- presentation: "editor"
5494
- }, e.src) : /* @__PURE__ */ a("span", {
5495
- className: H.filename,
5496
- title: e.name,
5497
- children: e.name
5498
- })]
5499
- }),
5500
- e.kind === "audio" && /* @__PURE__ */ a("div", {
5501
- className: H["audio-player"],
5502
- children: /* @__PURE__ */ a(zs, {
5503
- file: e,
5504
- locale: i
5505
- }, e.src)
5506
- }),
5507
- /* @__PURE__ */ a("div", {
5508
- className: H.actions,
5509
- children: /* @__PURE__ */ a(F, {
5510
- className: H["action-button"],
5511
- "aria-label": _.remove,
5512
- title: _.remove,
5513
- disabled: v,
5514
- onClick: () => y(t.files.filter((t) => t.id !== e.id)),
5515
- children: /* @__PURE__ */ a(Ps, {})
5516
- })
5517
- })
5518
- ]
5519
- }, e.id))
5502
+ /* @__PURE__ */ a(zs, {
5503
+ item: t,
5504
+ locale: i,
5505
+ renderFileActions: (e) => /* @__PURE__ */ a(F, {
5506
+ "aria-label": _.remove,
5507
+ title: _.remove,
5508
+ disabled: v,
5509
+ onClick: () => y(t.files.filter((t) => t.id !== e.id)),
5510
+ children: /* @__PURE__ */ a(Ps, {})
5511
+ })
5520
5512
  })
5521
5513
  ]
5522
5514
  });
@@ -9501,7 +9493,7 @@ function hf({ locale: e, disabled: t, gradingResult: n, element: r, item: i, mes
9501
9493
  }
9502
9494
  }
9503
9495
  function gf(e, t) {
9504
- return e.type === "media" ? /* @__PURE__ */ a(Bs, {
9496
+ return e.type === "media" ? /* @__PURE__ */ a(zs, {
9505
9497
  item: e,
9506
9498
  locale: t
9507
9499
  }) : /* @__PURE__ */ a(J, { content: e.content });
@@ -10116,7 +10108,7 @@ function Gf({ element: e, item: t, judgementStem: n, locale: r, messages: i, sho
10116
10108
  }
10117
10109
  }
10118
10110
  function Kf(e, t, n, r, i) {
10119
- return e.type === "media" ? /* @__PURE__ */ a(Bs, {
10111
+ return e.type === "media" ? /* @__PURE__ */ a(zs, {
10120
10112
  item: e,
10121
10113
  locale: r,
10122
10114
  print: i
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionContentMediaEditor.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionContentMediaEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EACV,wBAAwB,EAExB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAWjB,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC,eAmIA"}
1
+ {"version":3,"file":"QuestionContentMediaEditor.d.ts","sourceRoot":"","sources":["../../../src/question/content-editor/QuestionContentMediaEditor.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,KAAK,EACV,wBAAwB,EAExB,qBAAqB,EACtB,MAAM,SAAS,CAAC;AAUjB,wBAAgB,0BAA0B,CAAC,EACzC,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,WAAW,EACX,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,wBAAwB,KAAK,IAAI,CAAC;IAC5D,QAAQ,CAAC,WAAW,CAAC,EAAE,qBAAqB,CAAC;IAC7C,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC,eAuHA"}
@@ -0,0 +1,7 @@
1
+ import type { QuestionMediaFile } from "../content-editor/types";
2
+ import type { QuestionLocale } from "../i18n";
3
+ export declare function QuestionAudioPreview({ file, locale }: {
4
+ readonly file: QuestionMediaFile;
5
+ readonly locale: QuestionLocale;
6
+ }): JSX.Element;
7
+ //# sourceMappingURL=QuestionAudioPreview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionAudioPreview.d.ts","sourceRoot":"","sources":["../../../src/question/media/QuestionAudioPreview.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACrD,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC,eAuBA"}
@@ -0,0 +1,8 @@
1
+ import type { QuestionMediaFile } from "../content-editor/types";
2
+ import type { QuestionLocale } from "../i18n";
3
+ export declare function QuestionMediaDialog({ file, locale, onClose }: {
4
+ readonly file: QuestionMediaFile;
5
+ readonly locale: QuestionLocale;
6
+ readonly onClose: () => void;
7
+ }): JSX.Element;
8
+ //# sourceMappingURL=QuestionMediaDialog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QuestionMediaDialog.d.ts","sourceRoot":"","sources":["../../../src/question/media/QuestionMediaDialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAK9C,wBAAgB,mBAAmB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE;IAC7D,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B,eAiBA"}
@@ -1,12 +1,10 @@
1
+ import type { ReactNode } from "react";
1
2
  import type { QuestionContentMediaItem, QuestionMediaFile } from "../content-editor/types";
2
3
  import type { QuestionLocale } from "../i18n";
3
- export declare function QuestionMediaPlayback({ file, locale, }: {
4
- readonly file: QuestionMediaFile;
5
- readonly locale: QuestionLocale;
6
- }): JSX.Element;
7
- export declare function QuestionMediaView({ item, locale, print, }: {
4
+ export declare function QuestionMediaView({ item, locale, print, renderFileActions, }: {
8
5
  readonly item: QuestionContentMediaItem;
9
6
  readonly locale: QuestionLocale;
10
7
  readonly print?: boolean;
8
+ readonly renderFileActions?: (file: QuestionMediaFile) => ReactNode;
11
9
  }): JSX.Element;
12
10
  //# sourceMappingURL=QuestionMediaView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionMediaView.d.ts","sourceRoot":"","sources":["../../../src/question/media/QuestionMediaView.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAO9C,wBAAgB,qBAAqB,CAAC,EACpC,IAAI,EACJ,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC,eAmBA;AAED,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,MAAM,EACN,KAAa,GACd,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B,eAaA"}
1
+ {"version":3,"file":"QuestionMediaView.d.ts","sourceRoot":"","sources":["../../../src/question/media/QuestionMediaView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EACV,wBAAwB,EACxB,iBAAiB,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAQ9C,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,MAAM,EACN,KAAa,EACb,iBAAiB,GAClB,EAAE;IACD,QAAQ,CAAC,IAAI,EAAE,wBAAwB,CAAC;IACxC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;IAChC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,iBAAiB,KAAK,SAAS,CAAC;CACrE,eAcA"}
@@ -1,7 +1,7 @@
1
1
  import type { QuestionMediaFile } from "../content-editor/types";
2
2
  import type { QuestionLocale } from "../i18n";
3
3
  export declare function QuestionVideoPlayback({ file, locale, presentation }: {
4
- readonly presentation?: "filename" | "editor" | "preview";
4
+ readonly presentation?: "filename" | "preview";
5
5
  readonly file: QuestionMediaFile;
6
6
  readonly locale: QuestionLocale;
7
7
  }): JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionVideoPlayback.d.ts","sourceRoot":"","sources":["../../../src/question/media/QuestionVideoPlayback.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAM9C,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAyB,EAAE,EAAE;IACjF,QAAQ,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;IAC1D,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC,eA4BA"}
1
+ {"version":3,"file":"QuestionVideoPlayback.d.ts","sourceRoot":"","sources":["../../../src/question/media/QuestionVideoPlayback.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAO9C,wBAAgB,qBAAqB,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,YAAyB,EAAE,EAAE;IACjF,QAAQ,CAAC,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC/C,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC;CACjC,eAwBA"}
@@ -3,6 +3,7 @@ export declare const mediaMessages: {
3
3
  audio: string;
4
4
  video: string;
5
5
  playVideo: string;
6
+ playAudio: string;
6
7
  close: string;
7
8
  add: string;
8
9
  uploadHint: string;
@@ -18,6 +19,7 @@ export declare const mediaMessages: {
18
19
  audio: string;
19
20
  video: string;
20
21
  playVideo: string;
22
+ playAudio: string;
21
23
  close: string;
22
24
  add: string;
23
25
  uploadHint: string;
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/question/media/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgCzB,CAAC"}
1
+ {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../../src/question/media/messages.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCzB,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@yungu-fed/question-editor",
3
3
  "private": false,
4
- "version": "0.8.1",
4
+ "version": "0.8.2",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.mjs",