@edifice.io/react 2.2.11-develop-enabling.20250710092201 → 2.2.11-develop-pedago.20250710120949

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 (107) hide show
  1. package/dist/components/Button/Button.d.ts +1 -1
  2. package/dist/components/Dropdown/Dropdown.d.ts +10 -4
  3. package/dist/components/Dropdown/Dropdown.js +24 -8
  4. package/dist/components/Flex/Flex.d.ts +1 -0
  5. package/dist/components/Flex/Flex.js +2 -1
  6. package/dist/components/Layout/Layout.d.ts +5 -1
  7. package/dist/components/Layout/Layout.js +5 -2
  8. package/dist/components/SearchBar/SearchBar.d.ts +9 -33
  9. package/dist/components/SearchBar/SearchBar.js +4 -30
  10. package/dist/components/Tabs/components/Tabs.d.ts +23 -3
  11. package/dist/components/Tabs/components/Tabs.js +8 -3
  12. package/dist/components/Tabs/components/TabsList.d.ts +15 -1
  13. package/dist/components/Tabs/components/TabsList.js +13 -3
  14. package/dist/components/Tabs/components/TabsPanel.d.ts +5 -1
  15. package/dist/components/Tabs/components/TabsPanel.js +7 -3
  16. package/dist/hooks/useDropdown/useDropdown.d.ts +2 -0
  17. package/dist/hooks/useDropdown/useDropdown.js +2 -0
  18. package/dist/hooks/useEdificeIcons/useEdificeIcons.js +4 -1
  19. package/dist/hooks/useLibraryUrl/useLibraryUrl.d.ts +1 -1
  20. package/dist/hooks/useLibraryUrl/useLibraryUrl.js +2 -2
  21. package/dist/icons-apps.js +164 -174
  22. package/dist/icons.js +86 -90
  23. package/dist/index.js +12 -10
  24. package/dist/modules/editor/components/Toolbar/TableToolbar.AddMenu.js +1 -1
  25. package/dist/modules/editor/components/Toolbar/TableToolbar.DelMenu.js +1 -1
  26. package/dist/modules/icons/components/{apps/IconMinibadge.d.ts → IconMegaphone.d.ts} +2 -2
  27. package/dist/modules/icons/components/IconMegaphone.js +12 -0
  28. package/dist/modules/icons/components/IconNotes.d.ts +7 -0
  29. package/dist/modules/icons/components/IconNotes.js +13 -0
  30. package/dist/modules/icons/components/apps/IconAccount.js +2 -2
  31. package/dist/modules/icons/components/apps/IconActualites.js +2 -2
  32. package/dist/modules/icons/components/apps/IconAdmin.js +2 -2
  33. package/dist/modules/icons/components/apps/IconAgenda.js +2 -3
  34. package/dist/modules/icons/components/apps/IconAppointments.js +2 -2
  35. package/dist/modules/icons/components/apps/IconArchive.js +2 -2
  36. package/dist/modules/icons/components/apps/IconBlog.js +2 -2
  37. package/dist/modules/icons/components/apps/IconCahierDeTexte.js +2 -2
  38. package/dist/modules/icons/components/apps/IconCalendar.js +2 -3
  39. package/dist/modules/icons/components/apps/IconCollaborativeWall.js +2 -2
  40. package/dist/modules/icons/components/apps/IconCommunity.js +2 -2
  41. package/dist/modules/icons/components/apps/IconConversation.js +2 -2
  42. package/dist/modules/icons/components/apps/IconDirectory.js +2 -2
  43. package/dist/modules/icons/components/apps/IconExercizer.js +2 -2
  44. package/dist/modules/icons/components/apps/IconForms.js +6 -2
  45. package/dist/modules/icons/components/apps/IconForum.js +2 -2
  46. package/dist/modules/icons/components/apps/IconLibrary.js +2 -2
  47. package/dist/modules/icons/components/apps/IconMediacentre.js +2 -2
  48. package/dist/modules/icons/components/apps/IconMindmap.js +2 -2
  49. package/dist/modules/icons/components/apps/IconMoodle.js +2 -2
  50. package/dist/modules/icons/components/apps/IconNabook.js +4 -2
  51. package/dist/modules/icons/components/apps/IconNotebook.js +2 -2
  52. package/dist/modules/icons/components/apps/IconPad.js +2 -2
  53. package/dist/modules/icons/components/apps/IconPages.js +2 -2
  54. package/dist/modules/icons/components/apps/IconParametrage.js +2 -2
  55. package/dist/modules/icons/components/apps/IconParametrages.js +2 -2
  56. package/dist/modules/icons/components/apps/IconPoll.js +2 -2
  57. package/dist/modules/icons/components/apps/IconPresences.js +6 -2
  58. package/dist/modules/icons/components/apps/IconRack.js +2 -2
  59. package/dist/modules/icons/components/apps/IconRbs.js +2 -2
  60. package/dist/modules/icons/components/apps/IconSchoolbook.js +2 -2
  61. package/dist/modules/icons/components/apps/IconScrapbook.js +2 -2
  62. package/dist/modules/icons/components/apps/IconSettingsClass.js +2 -2
  63. package/dist/modules/icons/components/apps/IconSharebigfiles.js +2 -2
  64. package/dist/modules/icons/components/apps/IconStatistics.js +2 -2
  65. package/dist/modules/icons/components/apps/IconSupport.js +2 -2
  66. package/dist/modules/icons/components/apps/IconTimeline.js +2 -2
  67. package/dist/modules/icons/components/apps/IconTimelinegenerator.js +2 -2
  68. package/dist/modules/icons/components/apps/IconUserbook.js +2 -2
  69. package/dist/modules/icons/components/apps/IconVisioconf.js +2 -2
  70. package/dist/modules/icons/components/apps/IconWebsite.js +2 -2
  71. package/dist/modules/icons/components/apps/IconWiki.js +3 -3
  72. package/dist/modules/icons/components/apps/IconWorkspace.js +2 -2
  73. package/dist/modules/icons/components/apps/index.d.ts +0 -5
  74. package/dist/modules/icons/components/index.d.ts +2 -4
  75. package/dist/modules/modals/OnboardingModal/OnboardingModal.d.ts +4 -6
  76. package/dist/modules/modals/OnboardingModal/OnboardingModal.js +13 -27
  77. package/dist/modules/modals/OnboardingModal/index.d.ts +0 -1
  78. package/dist/modules/modals/OnboardingModal/useOnboardingModal.js +4 -4
  79. package/dist/modules/modals/ResourceModal/ResourceModal.d.ts +57 -2
  80. package/dist/modules/modals/ResourceModal/ResourceModal.js +20 -16
  81. package/dist/modules/multimedia/FileCard/FileCard.d.ts +13 -2
  82. package/dist/modules/multimedia/FileCard/FileCard.js +15 -5
  83. package/dist/modules/multimedia/FileCard/FileIcon.d.ts +5 -1
  84. package/dist/modules/multimedia/FileCard/FileIcon.js +2 -2
  85. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.d.ts +3 -1
  86. package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +7 -2
  87. package/dist/modules/multimedia/index.d.ts +1 -0
  88. package/dist/multimedia.js +12 -10
  89. package/package.json +6 -6
  90. package/dist/modules/icons/components/IconLibrary.d.ts +0 -7
  91. package/dist/modules/icons/components/IconLibrary.js +0 -12
  92. package/dist/modules/icons/components/IconNotification.d.ts +0 -7
  93. package/dist/modules/icons/components/IconNotification.js +0 -12
  94. package/dist/modules/icons/components/IconStar.d.ts +0 -7
  95. package/dist/modules/icons/components/IconStar.js +0 -13
  96. package/dist/modules/icons/components/IconStarFavorite.d.ts +0 -7
  97. package/dist/modules/icons/components/IconStarFull.d.ts +0 -7
  98. package/dist/modules/icons/components/IconStarFull.js +0 -13
  99. package/dist/modules/icons/components/apps/IconEdt.d.ts +0 -7
  100. package/dist/modules/icons/components/apps/IconEdt.js +0 -12
  101. package/dist/modules/icons/components/apps/IconGeogebra.d.ts +0 -7
  102. package/dist/modules/icons/components/apps/IconGeogebra.js +0 -12
  103. package/dist/modules/icons/components/apps/IconMagneto.d.ts +0 -7
  104. package/dist/modules/icons/components/apps/IconMagneto.js +0 -13
  105. package/dist/modules/icons/components/apps/IconMinetest.d.ts +0 -7
  106. package/dist/modules/icons/components/apps/IconMinetest.js +0 -12
  107. package/dist/modules/icons/components/apps/IconMinibadge.js +0 -12
@@ -3,9 +3,9 @@ const SvgIconUserbook = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M6 44.5v-39h39v6.94h-4.25v3.71H45v6.94h-4.25v3.82H45v6.91h-4.25v3.74H45v6.94zm7.5-11.11h19.68v-6.05L25.89 23a5.5 5.5 0 0 0 2.26-2.11 6 6 0 0 0 .86-3A5.47 5.47 0 0 0 27.37 14a5.4 5.4 0 0 0-4-1.68 5.25 5.25 0 0 0-4 1.68 5.63 5.63 0 0 0-1.64 3.94 5.3 5.3 0 0 0 .86 3A6.2 6.2 0 0 0 20.86 23l-7.36 4.34z" })
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M0 24.58V.53h24.05v4.28h-2.62V7.1h2.62v4.28h-2.62v2.35h2.62V18h-2.62v2.3h2.62v4.29H0zm4.64-6.85h12.12V14l-4.5-2.67q.9-.46 1.4-1.3t.53-1.85q0-1.4-1.01-2.43T10.7 4.72 8.25 5.75 7.24 8.18q0 1.03.53 1.85t1.4 1.3L4.63 14v3.73z" })
9
9
  ] });
10
10
  export {
11
11
  SvgIconUserbook as default
@@ -3,9 +3,9 @@ const SvgIconVisioconf = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M17.385 9.223c.146 0 .264.28.264.624V38.29c0 .345-.118.624-.264.624-.145 0-.263-.279-.263-.624V9.847c0-.345.118-.624.263-.624m.163 10.256v.024c0 .14-.112.253-.251.253H5.83a.25.25 0 0 1-.252-.253v-.024c0-.14.113-.252.252-.252h11.467c.139 0 .251.113.251.252m-.231 9.512v.024c0 .139-.113.252-.252.252H5.598a.25.25 0 0 1-.252-.252v-.024c0-.14.113-.253.252-.253h11.467c.139 0 .252.113.252.253m-9.562 8.688c.019-.145.034-.292.06-.436.195-1.056.745-1.881 1.618-2.503.604.574 1.315.876 2.146.875.828 0 1.538-.3 2.148-.878.121.096.248.187.365.29a3.8 3.8 0 0 1 1.286 2.453l.027.2v.239H7.753q.002-.12.002-.24m4.005-7.43c.151.03.305.05.451.091a2.3 2.3 0 0 1-.456 4.505 2.296 2.296 0 0 1-2.433-1.89 2.296 2.296 0 0 1 1.779-2.655c.099-.023.2-.035.3-.051zm9.098 6.348c.052-.385.091-.773.159-1.154.517-2.793 1.972-4.977 4.281-6.622 1.597 1.518 3.48 2.319 5.678 2.315 2.19 0 4.068-.793 5.68-2.322.321.253.657.495.965.768 1.946 1.732 3.092 3.892 3.404 6.488.02.174.048.352.072.527v.634H20.855q.004-.317.003-.634M31.454 16.94c.4.079.806.13 1.194.241 2.372.662 4.127 2.767 4.372 5.227a6.086 6.086 0 0 1-5.578 6.69c-3.08.257-5.915-1.942-6.436-4.997-.562-3.266 1.474-6.31 4.704-7.027.261-.059.53-.09.795-.134zM7.74 28.49c.019-.145.034-.292.06-.436.195-1.056.745-1.881 1.618-2.503.604.574 1.315.876 2.146.875.828 0 1.538-.3 2.148-.878.121.096.248.187.365.29a3.8 3.8 0 0 1 1.287 2.453q.011.1.026.2v.239H7.738q.002-.12.002-.24m4.005-7.43c.151.03.305.05.451.091a2.3 2.3 0 0 1-.456 4.505 2.296 2.296 0 0 1-2.433-1.89 2.296 2.296 0 0 1 1.779-2.655c.099-.023.2-.035.3-.051zm-3.99-2.049c.019-.145.034-.292.06-.436.195-1.056.745-1.881 1.618-2.503.604.574 1.315.876 2.146.875.828 0 1.538-.3 2.148-.878.121.096.248.187.365.29a3.8 3.8 0 0 1 1.286 2.453l.027.2v.239H7.753q.002-.12.002-.24m4.005-7.43c.151.03.305.049.451.09a2.3 2.3 0 0 1-.456 4.505 2.296 2.296 0 0 1-2.433-1.888 2.296 2.296 0 0 1 1.779-2.657c.099-.022.2-.034.3-.05zM47 11.447v24.994c0 2.023-1.652 3.679-3.664 3.679H30.868c0 1.95 1.463 3.606 1.463 4.407A1.48 1.48 0 0 1 30.868 46H19.132a1.48 1.48 0 0 1-1.469-1.472c0-.85 1.469-2.412 1.469-4.413l-12.468.006C4.646 40.121 3 38.465 3 36.442V11.448a3.676 3.676 0 0 1 3.664-3.673h36.672A3.68 3.68 0 0 1 47 11.448M44.067 36.06V11.654c0-.5-.343-.94-.731-.94H6.664c-.388 0-.731.44-.731.94v24.405c0 .5.343.94.731.94h36.672c.388 0 .731-.44.731-.94M24.997 7.024a2.01 2.01 0 0 0 2.006-2.012A2.01 2.01 0 0 0 24.996 3a2.01 2.01 0 0 0-2.007 2.012 2.01 2.01 0 0 0 2.007 2.012m.009-3.564a.155.155 0 0 1 0 .31.155.155 0 0 1 0-.31m-.01.623a.928.928 0 0 1 0 1.858.928.928 0 0 1 0-1.858m0 1.393a.465.465 0 0 0 0-.928.465.465 0 0 0 0 .928m1.339 1.429c-.378.27-.842.429-1.339.429s-.96-.158-1.338-.43l-.366.577a.309.309 0 0 0 .26.475h2.89c.242 0 .39-.27.259-.475z" })
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M7.85 4.15c.08 0 .14.15.14.34v15.5c0 .18-.06.34-.14.34s-.14-.16-.14-.34V4.49c0-.19.06-.34.14-.34m.09 5.59v.01a.14.14 0 0 1-.14.14H1.54a.14.14 0 0 1-.14-.14v-.01c0-.08.07-.14.14-.14H7.8c.08 0 .14.06.14.14m-.13 5.18v.01a.14.14 0 0 1-.13.14H1.4a.14.14 0 0 1-.13-.14v-.01c0-.08.06-.14.13-.14h6.27c.07 0 .13.06.13.14zM2.6 19.65l.03-.24a2.1 2.1 0 0 1 .89-1.36c.33.31.72.48 1.17.48s.84-.17 1.17-.48l.2.16c.4.35.64.8.7 1.33l.02.11v.13H2.6zm2.19-4.05.24.05a1.25 1.25 0 1 1-1.57 1.43 1.25 1.25 0 0 1 .97-1.45l.16-.03zm4.97 3.46.08-.63a5.52 5.52 0 0 1 2.34-3.6c.87.82 1.9 1.26 3.1 1.26s2.22-.43 3.1-1.27c.18.14.36.27.53.42a5.46 5.46 0 0 1 1.86 3.54l.04.28v.35H9.74v-.35zm5.78-10.7c.22.04.44.07.66.13a3.32 3.32 0 0 1 2.38 2.84 3.31 3.31 0 0 1-6.56.93 3.31 3.31 0 0 1 2.57-3.83l.43-.08h.52zM2.58 14.64l.04-.24a2.1 2.1 0 0 1 .88-1.36c.33.3.72.47 1.17.47q.675 0 1.17-.48l.2.16c.4.36.64.8.7 1.34l.02.1v.14H2.58zm2.19-4.05.25.05a1.25 1.25 0 1 1-1.58 1.42 1.25 1.25 0 0 1 .97-1.44c.05-.02.1-.02.16-.03zM2.59 9.48l.03-.24a2.1 2.1 0 0 1 .89-1.36c.33.31.72.48 1.17.48s.84-.17 1.17-.48l.2.16c.4.35.64.8.7 1.33l.02.11v.13H2.6v-.13zm2.19-4.05.25.05a1.25 1.25 0 1 1-1.58 1.43 1.25 1.25 0 0 1 .97-1.45l.16-.03zm19.24-.07v13.62a2.01 2.01 0 0 1-2 2h-6.8c0 1.07.8 1.97.8 2.4a.8.8 0 0 1-.8.8H8.8a.8.8 0 0 1-.8-.8c0-.46.8-1.31.8-2.4H2a2 2 0 0 1-2-2V5.36c0-1.1.9-2 2-2h20.02a2 2 0 0 1 2 2m-1.6 13.41V5.47c0-.27-.19-.5-.4-.5H2c-.22 0-.4.23-.4.5v13.3c0 .27.18.51.4.51h20.02c.21 0 .4-.24.4-.51M12.01 2.95a1.1 1.1 0 1 0 0-2.2 1.1 1.1 0 0 0 0 2.2m0-1.94c.05 0 .09.04.09.08s-.04.09-.09.09c-.04 0-.08-.04-.08-.09s.04-.08.08-.08m0 .34a.5.5 0 1 1 0 1.01.5.5 0 0 1 0-1.01m0 .76c.14 0 .25-.12.25-.26a.25.25 0 1 0-.25.26m.73.78a1.26 1.26 0 0 1-1.46 0l-.2.3a.17.17 0 0 0 .14.27h1.58a.17.17 0 0 0 .14-.26z" })
9
9
  ] });
10
10
  export {
11
11
  SvgIconVisioconf as default
@@ -3,9 +3,9 @@ const SvgIconWebsite = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M34.216 29.344c0 1.68.478 2.35 1.728 2.35 2.786 0 4.56-3.55 4.56-9.454 0-9.024-6.576-13.344-14.786-13.344-8.446 0-16.128 5.664-16.128 16.368 0 10.224 6.72 15.792 17.04 15.792 3.504 0 5.856-.384 9.454-1.584l.772 3.214c-3.552 1.154-7.348 1.488-10.274 1.488-13.536 0-20.786-7.44-20.786-18.912 0-11.568 8.402-19.44 19.97-19.44 12.048 0 18.43 7.2 18.43 16.032 0 7.488-2.35 13.2-9.742 13.2-3.362 0-5.568-1.344-5.856-4.322-.864 3.312-3.168 4.322-6.29 4.322-4.176 0-7.68-3.218-7.68-9.696 0-6.528 3.074-10.56 8.594-10.56 2.928 0 4.752 1.152 5.564 2.976l1.394-2.544h4.032v14.114zm-5.902-6.336c0-2.638-1.97-3.744-3.602-3.744-1.776 0-3.742 1.438-3.742 5.664 0 3.36 1.488 5.232 3.742 5.232 1.584 0 3.602-1.008 3.602-3.792z" })
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M17.55 14.61c0 1.01.28 1.41 1.03 1.41 1.68 0 2.74-2.13 2.74-5.67 0-5.43-3.94-8.02-8.88-8.02-5.07 0-9.68 3.4-9.68 9.83 0 6.14 4.03 9.49 10.23 9.49 2.1 0 3.52-.23 5.68-.95l.46 1.93c-2.13.69-4.41.89-6.17.89C4.83 23.52.48 19.05.48 12.16.48 5.21 5.52.5 12.48.5c7.23 0 11.06 4.32 11.06 9.62 0 4.5-1.41 7.93-5.85 7.93-2.02 0-3.34-.8-3.52-2.6-.51 2-1.9 2.6-3.77 2.6-2.51 0-4.62-1.93-4.62-5.82 0-3.92 1.85-6.34 5.17-6.34 1.75 0 2.85.69 3.34 1.78l.83-1.52h2.43v8.47zM14 10.81a2.12 2.12 0 0 0-2.16-2.25c-1.07 0-2.25.86-2.25 3.4 0 2.02.9 3.14 2.25 3.14.95 0 2.16-.6 2.16-2.27V10.8z" })
9
9
  ] });
10
10
  export {
11
11
  SvgIconWebsite as default
@@ -3,10 +3,10 @@ const SvgIconWiki = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 24 24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M15.503 29.741c-1.76 0-3.292.195-4.539.435a1.252 1.252 0 1 1-.473-2.46 26.5 26.5 0 0 1 5.012-.479c1.979 0 3.706.214 5.105.479a1.252 1.252 0 0 1-.466 2.46 25 25 0 0 0-4.639-.435M10.964 20.18a24 24 0 0 1 4.539-.435c1.798 0 3.367.195 4.639.435a1.252 1.252 0 0 0 .466-2.46 27.5 27.5 0 0 0-5.105-.48c-1.945 0-3.637.215-5.012.48a1.252 1.252 0 0 0 .473 2.46" }),
9
- /* @__PURE__ */ jsx("path", { fill: "currentColor", fillRule: "evenodd", d: "M34.73 6.45a39.6 39.6 0 0 1 10.395 1.331c.564.15.957.661.957 1.245v3.085h.697c.674 0 1.221.547 1.221 1.221V42.78a1.22 1.22 0 0 1-1.524 1.183 42.4 42.4 0 0 0-10.908-1.297h-.002a43 43 0 0 0-10.164 1.298c-.166.042-.34.048-.51.019a62.6 62.6 0 0 0-10.18-.92 63.4 63.4 0 0 0-11.283.92A1.22 1.22 0 0 1 2 42.78V13.333c0-.675.547-1.222 1.221-1.222h.841V9.026c0-.594.406-1.11.983-1.252a43 43 0 0 1 9.747-1.215 42.5 42.5 0 0 1 10.26 1.139A39.7 39.7 0 0 1 34.73 6.45m-10.952 3.6a40 40 0 0 0-8.958-.915h-.002c-3.2.03-5.973.437-8.18.916v28.861a47 47 0 0 1 8.15-.813c3.62-.05 6.517.325 8.99.808zm2.577 28.776a40 40 0 0 1 8.455-1.003c3.457-.03 6.416.44 8.696.992V10.03a37 37 0 0 0-3.307-.63v11.703a.918.918 0 0 1-1.323.83l-2.707-1.31a.88.88 0 0 0-.83.011l-2.273 1.215a.927.927 0 0 1-1.36-.818V9.168a37 37 0 0 0-5.351.861z", clipRule: "evenodd" })
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M7.64 14.568c-.82 0-1.533.09-2.114.202a.583.583 0 1 1-.22-1.145 12.3 12.3 0 0 1 2.334-.224c.922 0 1.726.1 2.377.223a.583.583 0 0 1-.216 1.146 11.6 11.6 0 0 0-2.161-.202m-2.114-4.454c.58-.112 1.294-.202 2.114-.202.837 0 1.568.09 2.16.203a.583.583 0 0 0 .217-1.146 13 13 0 0 0-2.377-.223c-.906 0-1.694.1-2.334.223a.583.583 0 1 0 .22 1.145" }),
9
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M16.595 3.72a18.4 18.4 0 0 1 4.841.62.6.6 0 0 1 .446.58v1.437h.324c.314 0 .569.254.569.568V20.64a.57.57 0 0 1-.71.551 19.8 19.8 0 0 0-5.08-.604h-.001a20 20 0 0 0-4.734.604.6.6 0 0 1-.237.01 29 29 0 0 0-4.742-.43 29.5 29.5 0 0 0-5.254.43.57.57 0 0 1-.666-.561V6.925c0-.314.255-.568.569-.568h.392V4.92a.6.6 0 0 1 .458-.583 20 20 0 0 1 4.539-.566c1.93-.022 3.562.243 4.778.53a18.5 18.5 0 0 1 4.508-.58Zm-5.101 1.677a18.6 18.6 0 0 0-4.172-.426h-.001a18.8 18.8 0 0 0-3.81.426V18.84c1.073-.203 2.35-.36 3.796-.379a20 20 0 0 1 4.187.376zm1.2 13.402a18.6 18.6 0 0 1 3.938-.468c1.61-.014 2.988.206 4.05.463V5.387c-.455-.108-.97-.21-1.54-.293v5.45c0 .32-.33.527-.617.387l-1.26-.61a.41.41 0 0 0-.387.005l-1.059.566a.432.432 0 0 1-.633-.381V4.986c-.956.083-1.795.235-2.492.4V18.8Z" })
10
10
  ] });
11
11
  export {
12
12
  SvgIconWiki as default
@@ -3,9 +3,9 @@ const SvgIconWorkspace = ({
3
3
  title,
4
4
  titleId,
5
5
  ...props
6
- }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", fill: "none", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
6
+ }) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 23 24", width: "24", height: "24", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
7
7
  title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
8
- /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M45.6 20.46v17.43a5.6 5.6 0 0 1-5.54 5.54H9.94A5.3 5.3 0 0 1 6 41.79a5.3 5.3 0 0 1-1.64-3.9V14.11A5.3 5.3 0 0 1 6 10.21a5.3 5.3 0 0 1 3.9-1.64h7.94a5.3 5.3 0 0 1 3.9 1.64 5.3 5.3 0 0 1 1.65 3.9v.8h16.67a5.6 5.6 0 0 1 5.54 5.55" })
8
+ /* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M22.34 8.68v9.45q0 1.23-.89 2.12t-2.12.89H3.01q-1.23 0-2.12-.89T0 18.13V5.25q0-1.23.9-2.12t2.12-.9h4.3q1.23 0 2.12.9t.89 2.12v.43h9.01q1.23 0 2.12.89t.89 2.11z" })
9
9
  ] });
10
10
  export {
11
11
  SvgIconWorkspace as default
@@ -33,7 +33,6 @@ export { default as IconConnecteurGenerique1 } from './IconConnecteurGenerique1'
33
33
  export { default as IconConnecteurGenerique2 } from './IconConnecteurGenerique2';
34
34
  export { default as IconConversation } from './IconConversation';
35
35
  export { default as IconDirectory } from './IconDirectory';
36
- export { default as IconEdt } from './IconEdt';
37
36
  export { default as IconEducagri } from './IconEducagri';
38
37
  export { default as IconEdumedia } from './IconEdumedia';
39
38
  export { default as IconEdumoov } from './IconEdumoov';
@@ -45,7 +44,6 @@ export { default as IconEuropress } from './IconEuropress';
45
44
  export { default as IconExercizer } from './IconExercizer';
46
45
  export { default as IconForms } from './IconForms';
47
46
  export { default as IconForum } from './IconForum';
48
- export { default as IconGeogebra } from './IconGeogebra';
49
47
  export { default as IconGepi } from './IconGepi';
50
48
  export { default as IconGlpi } from './IconGlpi';
51
49
  export { default as IconHiboutheque } from './IconHiboutheque';
@@ -57,13 +55,10 @@ export { default as IconLesechos } from './IconLesechos';
57
55
  export { default as IconLibrary } from './IconLibrary';
58
56
  export { default as IconLsu } from './IconLsu';
59
57
  export { default as IconMadmagz } from './IconMadmagz';
60
- export { default as IconMagneto } from './IconMagneto';
61
58
  export { default as IconMatholycee } from './IconMatholycee';
62
59
  export { default as IconMaxicours } from './IconMaxicours';
63
60
  export { default as IconMediacentre } from './IconMediacentre';
64
61
  export { default as IconMindmap } from './IconMindmap';
65
- export { default as IconMinetest } from './IconMinetest';
66
- export { default as IconMinibadge } from './IconMinibadge';
67
62
  export { default as IconMonorientationenligne } from './IconMonorientationenligne';
68
63
  export { default as IconMonstageenligne } from './IconMonstageenligne';
69
64
  export { default as IconMoodle } from './IconMoodle';
@@ -68,13 +68,13 @@ export { default as IconInbox } from './IconInbox';
68
68
  export { default as IconInfoCircle } from './IconInfoCircle';
69
69
  export { default as IconInfoRectangle } from './IconInfoRectangle';
70
70
  export { default as IconLandscape } from './IconLandscape';
71
- export { default as IconLibrary } from './IconLibrary';
72
71
  export { default as IconLink } from './IconLink';
73
72
  export { default as IconListOrder } from './IconListOrder';
74
73
  export { default as IconLoader } from './IconLoader';
75
74
  export { default as IconLock } from './IconLock';
76
75
  export { default as IconMailRecall } from './IconMailRecall';
77
76
  export { default as IconMail } from './IconMail';
77
+ export { default as IconMegaphone } from './IconMegaphone';
78
78
  export { default as IconMergeCells } from './IconMergeCells';
79
79
  export { default as IconMessageInfo } from './IconMessageInfo';
80
80
  export { default as IconMicOff } from './IconMicOff';
@@ -82,7 +82,7 @@ export { default as IconMic } from './IconMic';
82
82
  export { default as IconMinus } from './IconMinus';
83
83
  export { default as IconMove } from './IconMove';
84
84
  export { default as IconNoColors } from './IconNoColors';
85
- export { default as IconNotification } from './IconNotification';
85
+ export { default as IconNotes } from './IconNotes';
86
86
  export { default as IconOptions } from './IconOptions';
87
87
  export { default as IconOrderedList } from './IconOrderedList';
88
88
  export { default as IconPaperclip } from './IconPaperclip';
@@ -130,8 +130,6 @@ export { default as IconSortTime } from './IconSortTime';
130
130
  export { default as IconSpeechToText } from './IconSpeechToText';
131
131
  export { default as IconSplitCells } from './IconSplitCells';
132
132
  export { default as IconSquareRoot } from './IconSquareRoot';
133
- export { default as IconStarFull } from './IconStarFull';
134
- export { default as IconStar } from './IconStar';
135
133
  export { default as IconSubscript } from './IconSubscript';
136
134
  export { default as IconSuccessFill } from './IconSuccessFill';
137
135
  export { default as IconSuccessOutline } from './IconSuccessOutline';
@@ -34,15 +34,13 @@ interface ModalOptionsProps {
34
34
  */
35
35
  closeText?: string;
36
36
  }
37
- export interface OnboardingModalRef {
38
- setIsOpen: (isOpen: boolean) => void;
39
- handleSavePreference: () => void;
40
- }
41
37
  interface OnboardingProps {
42
38
  id: string;
43
39
  items: ModalItemsProps[];
44
40
  modalOptions?: ModalOptionsProps;
45
- isOnboardingChange?: (isOnboarding: boolean) => void;
46
41
  }
47
- declare const OnboardingModal: import('react').ForwardRefExoticComponent<OnboardingProps & import('react').RefAttributes<OnboardingModalRef>>;
42
+ declare const OnboardingModal: {
43
+ ({ id, items, modalOptions }: OnboardingProps): import('react').ReactPortal | null;
44
+ displayName: string;
45
+ };
48
46
  export default OnboardingModal;
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from "react/jsx-runtime";
2
- import { forwardRef, useState, useImperativeHandle, useEffect } from "react";
2
+ import { useState, useEffect } from "react";
3
3
  import { createPortal } from "react-dom";
4
4
  import { useTranslation } from "react-i18next";
5
5
  import { Pagination } from "swiper/modules";
@@ -8,12 +8,11 @@ import { useOnboardingModal } from "./useOnboardingModal.js";
8
8
  import Modal from "../../../components/Modal/Modal.js";
9
9
  import Image from "../../../components/Image/Image.js";
10
10
  import Button from "../../../components/Button/Button.js";
11
- const OnboardingModal = /* @__PURE__ */ forwardRef(({
11
+ const OnboardingModal = ({
12
12
  id,
13
13
  items,
14
- modalOptions = {},
15
- isOnboardingChange
16
- }, ref) => {
14
+ modalOptions = {}
15
+ }) => {
17
16
  var _a;
18
17
  const [swiperInstance, setSwiperInstance] = useState(), [swiperProgress, setSwiperprogress] = useState(0), {
19
18
  isOpen,
@@ -21,12 +20,7 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
21
20
  setIsOpen,
22
21
  handleSavePreference
23
22
  } = useOnboardingModal(id);
24
- useImperativeHandle(ref, () => ({
25
- setIsOpen,
26
- handleSavePreference
27
- })), useEffect(() => {
28
- isOnboardingChange && isOnboardingChange(isOnboarding);
29
- }, [isOnboarding, isOnboardingChange]), useEffect(() => {
23
+ useEffect(() => {
30
24
  const link = document.createElement("link");
31
25
  return link.href = "https://cdn.jsdelivr.net/npm/swiper@11/swiper-bundle.min.css", link.rel = "stylesheet", link.type = "text/css", document.head.appendChild(link), () => {
32
26
  document.head.removeChild(link);
@@ -39,13 +33,9 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
39
33
  prevText,
40
34
  closeText,
41
35
  nextText
42
- } = modalOptions, currentTitle = (swiperInstance == null ? void 0 : swiperInstance.activeIndex) != null && ((_a = items[swiperInstance == null ? void 0 : swiperInstance.activeIndex]) != null && _a.title) ? items[swiperInstance.activeIndex].title : title, handleCloseWithPreference = () => {
43
- handleSavePreference(), setSwiperprogress(0);
44
- }, handleCloseWithoutPreference = () => {
45
- setIsOpen(!1), setSwiperprogress(0);
46
- };
47
- return /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", size: "md", isOpen, focusId: "nextButtonId", onModalClose: handleCloseWithoutPreference, children: [
48
- /* @__PURE__ */ jsx(Modal.Header, { onModalClose: handleCloseWithoutPreference, children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
36
+ } = modalOptions, currentTitle = (swiperInstance == null ? void 0 : swiperInstance.activeIndex) != null && ((_a = items[swiperInstance == null ? void 0 : swiperInstance.activeIndex]) != null && _a.title) ? items[swiperInstance.activeIndex].title : title;
37
+ return isOnboarding ? /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: "onboarding-modal", size: "md", isOpen, focusId: "nextButtonId", onModalClose: () => setIsOpen(!1), children: [
38
+ /* @__PURE__ */ jsx(Modal.Header, { onModalClose: () => setIsOpen(!1), children: t(currentTitle || "explorer.modal.onboarding.trash.title") }),
49
39
  /* @__PURE__ */ jsx(Modal.Body, { children: /* @__PURE__ */ jsx(Swiper, { modules: [Pagination], onSwiper: (swiper) => {
50
40
  setSwiperInstance(swiper);
51
41
  }, onSlideChange: (swiper) => {
@@ -54,20 +44,16 @@ const OnboardingModal = /* @__PURE__ */ forwardRef(({
54
44
  clickable: !0
55
45
  }, children: items.map((item, index) => /* @__PURE__ */ jsxs(SwiperSlide, { children: [
56
46
  /* @__PURE__ */ jsx(Image, { width: "270", height: "140", className: "mx-auto my-12", loading: "lazy", src: item.src, alt: t(item.alt) }),
57
- /* @__PURE__ */ jsx("p", { className: "text-center", dangerouslySetInnerHTML: {
58
- __html: t(item.text)
59
- } })
47
+ /* @__PURE__ */ jsx("p", { className: "text-center", children: t(item.text) })
60
48
  ] }, index)) }) }),
61
49
  /* @__PURE__ */ jsxs(Modal.Footer, { children: [
62
- /* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: handleCloseWithoutPreference, children: t("explorer.modal.onboarding.trash.later") }),
50
+ /* @__PURE__ */ jsx(Button, { type: "button", color: "tertiary", variant: "ghost", onClick: () => setIsOpen(!1), children: t("explorer.modal.onboarding.trash.later") }),
63
51
  swiperProgress > 0 && /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "outline", onClick: () => swiperInstance.slidePrev(), children: t(prevText || "explorer.modal.onboarding.trash.prev") }),
64
52
  swiperProgress < 1 && /* @__PURE__ */ jsx(Button, { id: "nextButtonId", type: "button", color: "primary", variant: "filled", onClick: () => swiperInstance.slideNext(), children: t(nextText || "explorer.modal.onboarding.trash.next") }),
65
- swiperProgress === 1 && /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "filled", onClick: () => {
66
- isOnboarding ? handleCloseWithPreference() : handleCloseWithoutPreference();
67
- }, children: t(closeText || "explorer.modal.onboarding.trash.close") })
53
+ swiperProgress === 1 && /* @__PURE__ */ jsx(Button, { type: "button", color: "primary", variant: "filled", onClick: handleSavePreference, children: t(closeText || "explorer.modal.onboarding.trash.close") })
68
54
  ] })
69
- ] }), document.getElementById("portal"));
70
- });
55
+ ] }), document.getElementById("portal")) : null;
56
+ };
71
57
  export {
72
58
  OnboardingModal as default
73
59
  };
@@ -1,2 +1 @@
1
1
  export { default as OnboardingModal } from './OnboardingModal';
2
- export type { OnboardingModalRef } from './OnboardingModal';
@@ -3,7 +3,7 @@ import { odeServices } from "@edifice.io/client";
3
3
  const getOnboardingTrash = async (key) => await odeServices.conf().getPreference(key), saveOnboardingTrash = async (key) => await odeServices.conf().savePreference(key, JSON.stringify({
4
4
  key: !1
5
5
  })), useOnboardingModal = (id) => {
6
- const [isOpen, setIsOpen] = useState(!1), [isOnboarding, setIsOnboarding] = useState(!1);
6
+ const [isOpen, setIsOpen] = useState(!0), [isOnboarding, setIsOnboarding] = useState(!1);
7
7
  return useEffect(() => {
8
8
  (async () => {
9
9
  const response = await getOnboardingTrash(id);
@@ -11,17 +11,17 @@ const getOnboardingTrash = async (key) => await odeServices.conf().getPreference
11
11
  const {
12
12
  key
13
13
  } = response;
14
- key === !0 && setIsOpen(!0), setIsOnboarding(key);
14
+ setIsOnboarding(key);
15
15
  return;
16
16
  }
17
- setIsOnboarding(!0), setIsOpen(!0);
17
+ setIsOnboarding(!0);
18
18
  })();
19
19
  }, [id]), {
20
20
  isOpen,
21
21
  setIsOpen,
22
22
  isOnboarding,
23
23
  handleSavePreference: async () => {
24
- await saveOnboardingTrash(id), setIsOpen(!1), setIsOnboarding(!1);
24
+ await saveOnboardingTrash(id), setIsOpen(!1);
25
25
  }
26
26
  };
27
27
  };
@@ -7,13 +7,53 @@ export interface FormInputs {
7
7
  enablePublic: boolean;
8
8
  formSlug: string;
9
9
  }
10
+ /**
11
+ * Custom translations interface for overriding default translations
12
+ */
13
+ export interface ResourceModalTranslations {
14
+ title?: string;
15
+ description?: string;
16
+ cancel?: string;
17
+ create?: string;
18
+ save?: string;
19
+ header?: {
20
+ create?: string;
21
+ edit?: string;
22
+ };
23
+ heading?: {
24
+ general?: string;
25
+ access?: string;
26
+ };
27
+ placeholder?: {
28
+ title?: string;
29
+ description?: string;
30
+ };
31
+ imagepicker?: {
32
+ add?: string;
33
+ delete?: string;
34
+ };
35
+ success?: {
36
+ created?: string;
37
+ updated?: string;
38
+ };
39
+ }
10
40
  interface BaseProps {
41
+ /** Controls modal visibility */
11
42
  isOpen: boolean;
43
+ /** Custom content to be displayed after the form fields */
12
44
  children?: ReactNode | ((...props: any) => ReactNode);
45
+ /** Maximum length for the title input */
13
46
  inputMaxLength?: number;
47
+ /** Maximum length for the description textarea */
14
48
  textareaMaxLength?: number;
15
- onSuccess: () => void;
49
+ /** Callback when operation succeeds, with operation result as parameter */
50
+ onSuccess: (result: CreateResult | UpdateResult) => void;
51
+ /** Callback when operation is cancelled */
16
52
  onCancel: () => void;
53
+ /** Override application code (uses EdificeClient context by default) */
54
+ appCode?: string;
55
+ /** Custom translations for the modal */
56
+ translations?: ResourceModalTranslations;
17
57
  }
18
58
  interface CreateProps extends BaseProps {
19
59
  mode: 'create';
@@ -26,5 +66,20 @@ interface UpdateProps extends BaseProps {
26
66
  resourceId: ID;
27
67
  }
28
68
  type Props = CreateProps | UpdateProps;
29
- export declare const ResourceModal: ({ isOpen, onCancel, onSuccess, children, inputMaxLength, textareaMaxLength, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
69
+ /**
70
+ * ResourceModal component for creating or updating resources
71
+ *
72
+ * @component
73
+ * @example
74
+ * ```tsx
75
+ * <ResourceModal
76
+ * mode="create"
77
+ * isOpen={true}
78
+ * onCancel={() => setOpen(false)}
79
+ * onSuccess={(result) => console.log('Resource created:', result)}
80
+ * currentFolder={{ id: 'default' }}
81
+ * />
82
+ * ```
83
+ */
84
+ export declare const ResourceModal: ({ isOpen, onCancel, onSuccess, children, appCode: customAppCode, translations: customT, inputMaxLength, textareaMaxLength, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
30
85
  export default ResourceModal;
@@ -25,14 +25,17 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
25
25
  onCancel,
26
26
  onSuccess,
27
27
  children,
28
+ appCode: customAppCode,
29
+ translations: customT = {},
28
30
  inputMaxLength = DEFAULT_INPUT_MAX_LENGTH,
29
31
  textareaMaxLength = DEFAULT_TEXTAREA_MAX_LENGTH,
30
32
  ...props
31
33
  }) => {
34
+ var _a, _b, _c, _d, _e, _f;
32
35
  const {
33
- appCode: application,
36
+ appCode: contextAppCode,
34
37
  currentApp
35
- } = useEdificeClient(), {
38
+ } = useEdificeClient(), application = customAppCode || contextAppCode, {
36
39
  t
37
40
  } = useTranslation(), {
38
41
  mode
@@ -65,7 +68,7 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
65
68
  isUpdating,
66
69
  selectedResource: isUpdating ? resource : void 0
67
70
  }), watchedDescription = watch("description"), onSubmit = async function(formData) {
68
- var _a, _b;
71
+ var _a2, _b2;
69
72
  try {
70
73
  const data = {
71
74
  description: formData.description || "",
@@ -74,21 +77,22 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
74
77
  slug: formData.enablePublic && formData.formSlug || "",
75
78
  thumbnail
76
79
  };
80
+ let result;
77
81
  if (isCreating) {
78
82
  const createParams = {
79
83
  ...data,
80
84
  folder: props.currentFolder === void 0 || // Fix #WB2-1296: when searching, currentFolder is undefined
81
- ((_a = props.currentFolder) == null ? void 0 : _a.id) === "default" ? void 0 : parseInt(((_b = props.currentFolder) == null ? void 0 : _b.id) || ""),
85
+ ((_a2 = props.currentFolder) == null ? void 0 : _a2.id) === "default" ? void 0 : parseInt(((_b2 = props.currentFolder) == null ? void 0 : _b2.id) || ""),
82
86
  application
83
87
  };
84
- props.createResource ? await props.createResource.mutateAsync(createParams) : await odeServices.resource(application).create(createParams);
88
+ props.createResource ? result = await props.createResource.mutateAsync(createParams) : result = await odeServices.resource(application).create(createParams);
85
89
  } else {
86
90
  const updateParams = {
87
91
  ...data,
88
92
  entId: resource.assetId,
89
93
  trashed: resource.trashed
90
94
  };
91
- props.updateResource ? await props.updateResource.mutateAsync(updateParams) : await odeServices.resource(application).update(updateParams);
95
+ props.updateResource ? result = await props.updateResource.mutateAsync(updateParams) : result = await odeServices.resource(application).update(updateParams);
92
96
  }
93
97
  toast.success(/* @__PURE__ */ jsxs(Fragment, { children: [
94
98
  /* @__PURE__ */ jsx("strong", { children: t(isCreating ? "explorer.resource.created" : "explorer.resource.updated") }),
@@ -106,21 +110,21 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
106
110
  "Public:",
107
111
  formData.enablePublic ? t("explorer.enable.public.yes") : t("explorer.enable.public.no")
108
112
  ] })
109
- ] })), onSuccess();
113
+ ] })), onSuccess(result);
110
114
  } catch (e) {
111
115
  console.error(e);
112
116
  }
113
117
  };
114
118
  return isUpdating && !resource ? /* @__PURE__ */ jsx(LoadingScreen, {}) : /* @__PURE__ */ createPortal(/* @__PURE__ */ jsxs(Modal, { id: `${mode}-resource`, size: "lg", isOpen, onModalClose: onCancel, children: [
115
- /* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: t(`explorer.resource.editModal.header.${isCreating ? "create" : "edit"}`) }),
119
+ /* @__PURE__ */ jsx(Modal.Header, { onModalClose: onCancel, children: ((_a = customT.header) == null ? void 0 : _a[isCreating ? "create" : "edit"]) ?? t(`explorer.resource.editModal.header.${isCreating ? "create" : "edit"}`) }),
116
120
  /* @__PURE__ */ jsxs(Modal.Body, { children: [
117
- /* @__PURE__ */ jsx(Heading, { headingStyle: "h4", level: "h3", className: "mb-16", children: t("explorer.resource.editModal.heading.general") }),
121
+ /* @__PURE__ */ jsx(Heading, { headingStyle: "h4", level: "h3", className: "mb-16", children: ((_b = customT.heading) == null ? void 0 : _b.general) ?? t("explorer.resource.editModal.heading.general") }),
118
122
  /* @__PURE__ */ jsxs("form", { id: formId, onSubmit: handleSubmit(onSubmit), children: [
119
123
  /* @__PURE__ */ jsxs("div", { className: "d-block d-md-flex gap-16 mb-24", children: [
120
- /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ImagePicker, { app: currentApp, src: isUpdating && (resource == null ? void 0 : resource.thumbnail) || "", addButtonLabel: t("explorer.imagepicker.button.add"), deleteButtonLabel: t("explorer.imagepicker.button.delete"), onUploadImage: handleUploadImage, onDeleteImage: handleDeleteImage, className: "align-self-center mt-8", libraryMedia, mediaLibraryRef }) }),
124
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(ImagePicker, { app: currentApp, src: isUpdating && (resource == null ? void 0 : resource.thumbnail) || "", addButtonLabel: ((_c = customT.imagepicker) == null ? void 0 : _c.add) ?? t("explorer.imagepicker.button.add"), deleteButtonLabel: ((_d = customT.imagepicker) == null ? void 0 : _d.delete) ?? t("explorer.imagepicker.button.delete"), onUploadImage: handleUploadImage, onDeleteImage: handleDeleteImage, className: "align-self-center mt-8", libraryMedia, mediaLibraryRef }) }),
121
125
  /* @__PURE__ */ jsxs("div", { className: "col", children: [
122
126
  /* @__PURE__ */ jsxs(FormControl, { id: "title", className: "mb-16", isRequired: !0, children: [
123
- /* @__PURE__ */ jsx(Label, { children: t("title") }),
127
+ /* @__PURE__ */ jsx(Label, { children: customT.title ?? t("title") }),
124
128
  /* @__PURE__ */ jsx(Input, { type: "text", defaultValue: isUpdating ? resource == null ? void 0 : resource.name : "", ...register("title", {
125
129
  required: !0,
126
130
  maxLength: inputMaxLength,
@@ -128,14 +132,14 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
128
132
  value: /[^ ]/,
129
133
  message: "invalid title"
130
134
  }
131
- }), placeholder: t("explorer.resource.editModal.title.placeholder"), size: "md", "aria-required": !0, maxLength: inputMaxLength })
135
+ }), placeholder: ((_e = customT.placeholder) == null ? void 0 : _e.title) ?? t("explorer.resource.editModal.title.placeholder"), size: "md", "aria-required": !0, maxLength: inputMaxLength })
132
136
  ] }),
133
137
  /* @__PURE__ */ jsxs(FormControl, { id: "description", isOptional: !0, children: [
134
- /* @__PURE__ */ jsx(Label, { children: t("description") }),
138
+ /* @__PURE__ */ jsx(Label, { children: customT.description ?? t("description") }),
135
139
  /* @__PURE__ */ jsx(TextArea, { defaultValue: (resource == null ? void 0 : resource.description) || "", ...register("description", {
136
140
  required: !1,
137
141
  maxLength: textareaMaxLength
138
- }), placeholder: t("explorer.resource.editModal.description.placeholder"), size: "md", maxLength: textareaMaxLength }),
142
+ }), placeholder: ((_f = customT.placeholder) == null ? void 0 : _f.description) ?? t("explorer.resource.editModal.description.placeholder"), size: "md", maxLength: textareaMaxLength }),
139
143
  watchedDescription && /* @__PURE__ */ jsx(TextareaCounter, { content: watchedDescription, maxLength: textareaMaxLength })
140
144
  ] })
141
145
  ] })
@@ -144,8 +148,8 @@ const DEFAULT_INPUT_MAX_LENGTH = 60, DEFAULT_TEXTAREA_MAX_LENGTH = 400, Resource
144
148
  ] })
145
149
  ] }),
146
150
  /* @__PURE__ */ jsxs(Modal.Footer, { children: [
147
- /* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: t("explorer.cancel") }),
148
- /* @__PURE__ */ jsx(Button, { form: formId, type: "submit", color: "primary", isLoading: isSubmitting, variant: "filled", disabled: !isValid || isSubmitting, children: t(isCreating ? "explorer.create" : "save") })
151
+ /* @__PURE__ */ jsx(Button, { color: "tertiary", onClick: onCancel, type: "button", variant: "ghost", children: customT.cancel ?? t("explorer.cancel") }),
152
+ /* @__PURE__ */ jsx(Button, { form: formId, type: "submit", color: "primary", isLoading: isSubmitting, variant: "filled", disabled: !isValid || isSubmitting, children: isCreating ? customT.create ?? t("explorer.create") : customT.save ?? t("save") })
149
153
  ] }),
150
154
  /* @__PURE__ */ jsx(MediaLibrary, { appCode: application, ref: mediaLibraryRef, multiple: !1, visibility: "protected", ...mediaLibraryHandlers })
151
155
  ] }), document.getElementById("portal"));
@@ -1,13 +1,24 @@
1
+ import { ReactNode } from 'react';
1
2
  import { WorkspaceElement } from '@edifice.io/client';
2
3
  import { CardProps } from '../../../components';
3
4
  export interface FileCardProps extends CardProps {
4
5
  /**
5
6
  * WorkspaceElement
6
- * */
7
+ */
7
8
  doc: WorkspaceElement;
9
+ /**
10
+ * Custom icon to override the default based on file type
11
+ * Can be a string or a React node
12
+ */
13
+ customIcon?: ReactNode;
14
+ /**
15
+ * Custom color class to override the default based on file type
16
+ * Example: "bg-purple-300" or any valid CSS class
17
+ */
18
+ customColor?: string;
8
19
  }
9
20
  declare const FileCard: {
10
- ({ doc, isClickable, isSelectable, isSelected, onClick, className, }: FileCardProps): import("react/jsx-runtime").JSX.Element;
21
+ ({ doc, isClickable, isSelectable, isSelected, onClick, className, onSelect, isFocused, app, customIcon, customColor, }: FileCardProps): import("react/jsx-runtime").JSX.Element;
11
22
  displayName: string;
12
23
  };
13
24
  export default FileCard;
@@ -15,11 +15,21 @@ const FileCard = ({
15
15
  isSelectable = !1,
16
16
  isSelected = !1,
17
17
  onClick,
18
- className
18
+ className,
19
+ onSelect,
20
+ isFocused,
21
+ app,
22
+ customIcon,
23
+ customColor
19
24
  }) => {
20
- var _a;
21
25
  const ref = useRef(null), type = DocumentHelper.getRole(doc);
22
26
  function getRoleMap(type2) {
27
+ if (customIcon !== void 0 || customColor !== void 0)
28
+ return {
29
+ icon: customIcon || /* @__PURE__ */ jsx(SvgIconTextPage, { width: 22, height: 22 }),
30
+ color: customColor || "bg-gray-300",
31
+ hasShadow: !1
32
+ };
23
33
  const roleMappings = {
24
34
  csv: {
25
35
  icon: ".CSV",
@@ -72,17 +82,17 @@ const FileCard = ({
72
82
  };
73
83
  return roleMappings[type2] || roleMappings.unknown;
74
84
  }
75
- const file = clsx("file position-relative rounded", ((_a = getRoleMap(type ?? "default")) == null ? void 0 : _a.color) ?? "bg-yellow-200"), mediaSrc = type === "img" || type === "video" ? odeServices.workspace().getThumbnailUrl(doc) : null, hasThumbnail = useThumbnail(mediaSrc, {
85
+ const roleMap = getRoleMap(type ?? "unknown"), file = clsx("file position-relative rounded", (roleMap == null ? void 0 : roleMap.color) ?? "bg-yellow-200"), mediaSrc = type === "img" || type === "video" ? odeServices.workspace().getThumbnailUrl(doc) : null, hasThumbnail = useThumbnail(mediaSrc, {
76
86
  ref
77
87
  }), imageStyles = hasThumbnail && {
78
88
  backgroundImage: `url(${mediaSrc})`,
79
89
  backgroundSize: "cover"
80
90
  };
81
- return /* @__PURE__ */ jsx(Card, { className: clsx("card-file", className), isClickable, isSelectable, isSelected, onClick, children: /* @__PURE__ */ jsxs(Card.Body, { space: "8", children: [
91
+ return /* @__PURE__ */ jsx(Card, { className: clsx("card-file", className), isClickable, isSelectable, isSelected, onClick, app, isFocused, onSelect, children: /* @__PURE__ */ jsxs(Card.Body, { space: "8", children: [
82
92
  /* @__PURE__ */ jsx("div", { ref, className: file, style: {
83
93
  aspectRatio: "16/10",
84
94
  ...imageStyles
85
- }, children: type !== "img" || type === "img" && !hasThumbnail ? /* @__PURE__ */ jsx(FileIcon, { type, roleMap: getRoleMap(type) }) : null }),
95
+ }, children: type !== "img" || type === "img" && !hasThumbnail ? /* @__PURE__ */ jsx(FileIcon, { type, roleMap }) : null }),
86
96
  /* @__PURE__ */ jsxs("div", { className: "mt-4", children: [
87
97
  /* @__PURE__ */ jsx(Card.Text, { children: doc.name }),
88
98
  /* @__PURE__ */ jsx(Card.Text, { className: "text-black-50", children: doc == null ? void 0 : doc.ownerName })
@@ -1,6 +1,10 @@
1
1
  import { Role } from '@edifice.io/client';
2
2
  declare const FileIcon: ({ type, roleMap, }: {
3
3
  type: Role | "unknown";
4
- roleMap?: Record<string, string | JSX.Element>;
4
+ roleMap?: {
5
+ icon: React.ReactNode | string;
6
+ color: string;
7
+ hasShadow?: boolean;
8
+ };
5
9
  }) => import("react/jsx-runtime").JSX.Element;
6
10
  export default FileIcon;
@@ -5,8 +5,8 @@ const FileIcon = ({
5
5
  type,
6
6
  roleMap
7
7
  }) => {
8
- const hasNoShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown", fileicon = clsx("position-absolute top-50 start-50 translate-middle", {
9
- "p-12 rounded-circle shadow": hasNoShadow
8
+ const hasShadow = typeof (roleMap == null ? void 0 : roleMap.icon) != "string" && type !== "unknown" && (roleMap == null ? void 0 : roleMap.hasShadow) !== !1, fileicon = clsx("position-absolute top-50 start-50 translate-middle", {
9
+ "p-12 rounded-circle shadow": hasShadow
10
10
  }, roleMap == null ? void 0 : roleMap.color);
11
11
  return /* @__PURE__ */ jsx("div", { className: fileicon, children: (roleMap == null ? void 0 : roleMap.icon) ?? /* @__PURE__ */ jsx(SvgIconPaperclip, {}) });
12
12
  };