@edifice.io/react 2.0.5-develop-pedago.20250212101617 → 2.0.5-develop-pedago.20250212125104

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.
@@ -27,6 +27,10 @@ const AudioRecorder = /* @__PURE__ */ forwardRef(({
27
27
  } = useAudioRecorder(onSaveSuccess, onRecordUpdated, hideSaveAction, visibility, "media-library"), {
28
28
  t
29
29
  } = useTranslation();
30
+ function getDefaultDate() {
31
+ const d = /* @__PURE__ */ new Date();
32
+ return `${d.getFullYear()}-${String(d.getMonth() + 1).padStart(2, "0")}-${String(d.getDate()).padStart(2, "0")} ${String(d.getHours()).padStart(2, "0")}h${String(d.getMinutes()).padStart(2, "0")} ` + t("bbm.audio.recorder.defaultName");
33
+ }
30
34
  useImperativeHandle(ref, () => ({
31
35
  save: handleSave
32
36
  }));
@@ -37,7 +41,7 @@ const AudioRecorder = /* @__PURE__ */ forwardRef(({
37
41
  setAudioTime(event.target.currentTime);
38
42
  };
39
43
  return /* @__PURE__ */ jsxs("div", { className: "audio-recorder m-auto d-flex flex-column", children: [
40
- /* @__PURE__ */ jsx(FormControl, { id: "recordName", className: "mb-32", isRequired: !0, isReadOnly: recordState === "SAVED" || recordState === "SAVING", children: /* @__PURE__ */ jsx(Input, { type: "text", size: "sm", placeholder: t("bbm.audio.recorder.name"), ref: audioNameRef, defaultValue: t("bbm.audio.recorder.defaultName") + (/* @__PURE__ */ new Date()).toLocaleDateString() }) }),
44
+ /* @__PURE__ */ jsx(FormControl, { id: "recordName", className: "mb-32", isRequired: !0, isReadOnly: recordState === "SAVED" || recordState === "SAVING", children: /* @__PURE__ */ jsx(Input, { type: "text", size: "sm", placeholder: t("bbm.audio.recorder.name"), ref: audioNameRef, defaultValue: getDefaultDate() }) }),
41
45
  /* @__PURE__ */ jsx("div", { className: "audio-recorder-icon mx-auto", children: /* @__PURE__ */ jsx(SvgIconMic, { width: 64, height: 64, className: classColor }) }),
42
46
  /* @__PURE__ */ jsx(AudioRecorderTimer, { recordState, playState, recordTime, audioTime, maxDuration }),
43
47
  /* @__PURE__ */ jsx("audio", { ref: audioRef, onEnded: handlePlayEnded, onTimeUpdate: handleTimeUpdate, children: /* @__PURE__ */ jsx("track", { default: !0, kind: "captions", srcLang: "fr", src: "" }) }),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edifice.io/react",
3
- "version": "2.0.5-develop-pedago.20250212101617",
3
+ "version": "2.0.5-develop-pedago.20250212125104",
4
4
  "description": "Edifice React Library",
5
5
  "keywords": [
6
6
  "react",
@@ -118,9 +118,9 @@
118
118
  "react-slugify": "^3.0.3",
119
119
  "swiper": "^10.1.0",
120
120
  "ua-parser-js": "^1.0.36",
121
- "@edifice.io/bootstrap": "2.0.5-develop-pedago.20250212101617",
122
- "@edifice.io/tiptap-extensions": "2.0.5-develop-pedago.20250212101617",
123
- "@edifice.io/utilities": "2.0.5-develop-pedago.20250212101617"
121
+ "@edifice.io/bootstrap": "2.0.5-develop-pedago.20250212125104",
122
+ "@edifice.io/tiptap-extensions": "2.0.5-develop-pedago.20250212125104",
123
+ "@edifice.io/utilities": "2.0.5-develop-pedago.20250212125104"
124
124
  },
125
125
  "devDependencies": {
126
126
  "@babel/plugin-transform-react-pure-annotations": "^7.23.3",
@@ -148,8 +148,8 @@
148
148
  "vite": "^5.4.11",
149
149
  "vite-plugin-dts": "^4.1.0",
150
150
  "vite-tsconfig-paths": "^5.0.1",
151
- "@edifice.io/client": "2.0.5-develop-pedago.20250212101617",
152
- "@edifice.io/config": "2.0.5-develop-pedago.20250212101617"
151
+ "@edifice.io/client": "2.0.5-develop-pedago.20250212125104",
152
+ "@edifice.io/config": "2.0.5-develop-pedago.20250212125104"
153
153
  },
154
154
  "peerDependencies": {
155
155
  "@react-spring/web": "^9.7.5",