@edifice.io/react 2.5.8-develop-b2school.20260129151629 → 2.5.8-develop-pedago.20260129172409

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 (103) hide show
  1. package/dist/_virtual/de_DE.js +4 -0
  2. package/dist/_virtual/de_DE2.js +4 -0
  3. package/dist/_virtual/de_DE3.js +4 -0
  4. package/dist/_virtual/de_DE4.js +4 -0
  5. package/dist/_virtual/de_DE5.js +4 -0
  6. package/dist/_virtual/de_DE6.js +4 -0
  7. package/dist/_virtual/es_ES.js +4 -0
  8. package/dist/_virtual/es_ES2.js +4 -0
  9. package/dist/_virtual/es_ES3.js +4 -0
  10. package/dist/_virtual/es_ES4.js +4 -0
  11. package/dist/_virtual/es_ES5.js +4 -0
  12. package/dist/_virtual/es_ES6.js +4 -0
  13. package/dist/_virtual/it_IT.js +4 -0
  14. package/dist/_virtual/it_IT2.js +4 -0
  15. package/dist/_virtual/it_IT3.js +4 -0
  16. package/dist/_virtual/it_IT4.js +4 -0
  17. package/dist/_virtual/it_IT5.js +4 -0
  18. package/dist/_virtual/it_IT6.js +4 -0
  19. package/dist/_virtual/pt_PT.js +4 -0
  20. package/dist/_virtual/pt_PT2.js +4 -0
  21. package/dist/_virtual/pt_PT3.js +4 -0
  22. package/dist/_virtual/pt_PT4.js +4 -0
  23. package/dist/_virtual/pt_PT5.js +4 -0
  24. package/dist/_virtual/pt_PT6.js +4 -0
  25. package/dist/components/Badge/Badge.d.ts +7 -1
  26. package/dist/components/Badge/Badge.js +13 -1
  27. package/dist/components/MediaViewer/MediaViewer.d.ts +17 -0
  28. package/dist/components/MediaViewer/MediaViewer.js +36 -0
  29. package/dist/components/MediaViewer/MediaWrapper.d.ts +7 -0
  30. package/dist/components/MediaViewer/MediaWrapper.js +72 -0
  31. package/dist/components/MediaViewer/PdfViewer.d.ts +4 -0
  32. package/dist/components/MediaViewer/PdfViewer.js +26 -0
  33. package/dist/components/MediaViewer/ToolbarViewer.d.ts +7 -0
  34. package/dist/components/MediaViewer/ToolbarViewer.js +41 -0
  35. package/dist/components/MediaViewer/ToolbarZoom.d.ts +4 -0
  36. package/dist/components/MediaViewer/ToolbarZoom.js +19 -0
  37. package/dist/components/MediaViewer/index.d.ts +2 -0
  38. package/dist/components/PromotionCard/PromotionCard.d.ts +74 -0
  39. package/dist/components/PromotionCard/PromotionCard.js +31 -0
  40. package/dist/components/PromotionCard/PromotionCardBody.d.ts +10 -0
  41. package/dist/components/PromotionCard/PromotionCardBody.js +15 -0
  42. package/dist/components/PromotionCard/PromotionCardDescription.d.ts +9 -0
  43. package/dist/components/PromotionCard/PromotionCardDescription.js +12 -0
  44. package/dist/components/PromotionCard/PromotionCardFooter.d.ts +9 -0
  45. package/dist/components/PromotionCard/PromotionCardFooter.js +12 -0
  46. package/dist/components/PromotionCard/PromotionCardHeader.d.ts +11 -0
  47. package/dist/components/PromotionCard/PromotionCardHeader.js +17 -0
  48. package/dist/components/PromotionCard/PromotionCardIcon.d.ts +10 -0
  49. package/dist/components/PromotionCard/PromotionCardIcon.js +15 -0
  50. package/dist/components/PromotionCard/PromotionCardTitle.d.ts +9 -0
  51. package/dist/components/PromotionCard/PromotionCardTitle.js +12 -0
  52. package/dist/components/PromotionCard/index.d.ts +2 -0
  53. package/dist/components/SmartEllipsis/SmartEllipsis.d.ts +5 -0
  54. package/dist/components/SmartEllipsis/SmartEllipsis.js +21 -0
  55. package/dist/components/SmartEllipsis/index.d.ts +2 -0
  56. package/dist/components/index.d.ts +2 -0
  57. package/dist/hooks/useEdificeIcons/useEdificeIcons.d.ts +1 -0
  58. package/dist/hooks/useEdificeIcons/useEdificeIcons.js +5 -0
  59. package/dist/hooks/useZoom/index.d.ts +1 -0
  60. package/dist/hooks/useZoom/useZoom.d.ts +7 -0
  61. package/dist/hooks/useZoom/useZoom.js +14 -0
  62. package/dist/icons.js +358 -352
  63. package/dist/index.js +145 -140
  64. package/dist/modules/icons/components/IconAiFill.d.ts +7 -0
  65. package/dist/modules/icons/components/IconAiFill.js +12 -0
  66. package/dist/modules/icons/components/IconExercizerAi.d.ts +7 -0
  67. package/dist/modules/icons/components/IconExercizerAi.js +14 -0
  68. package/dist/modules/icons/components/IconTeacher.d.ts +7 -0
  69. package/dist/modules/icons/components/IconTeacher.js +12 -0
  70. package/dist/modules/icons/components/index.d.ts +3 -0
  71. package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
  72. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/de_DE.js +11 -0
  73. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/es_ES.js +11 -0
  74. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/it_IT.js +11 -0
  75. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/pt_PT.js +11 -0
  76. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/de_DE.js +22 -0
  77. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/es_ES.js +22 -0
  78. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/it_IT.js +20 -0
  79. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/pt_PT.js +45 -0
  80. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/de_DE.js +145 -0
  81. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/es_ES.js +145 -0
  82. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/it_IT.js +156 -0
  83. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/pt_PT.js +158 -0
  84. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/de_DE.js +10 -0
  85. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/es_ES.js +10 -0
  86. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/it_IT.js +10 -0
  87. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/pt_PT.js +10 -0
  88. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/de_DE.js +8 -0
  89. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/es_ES.js +8 -0
  90. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/it_IT.js +8 -0
  91. package/dist/node_modules/.pnpm/antd@5.29.3_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/pt_PT.js +8 -0
  92. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/de_DE.js +21 -0
  93. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/es_ES.js +21 -0
  94. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/it_IT.js +21 -0
  95. package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/pt_PT.js +21 -0
  96. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/de_DE.js +37 -0
  97. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/es_ES.js +37 -0
  98. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/it_IT.js +37 -0
  99. package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/pt_PT.js +39 -0
  100. package/dist/providers/AntThemeProvider/AntProvider.js +13 -6
  101. package/package.json +7 -6
  102. package/dist/_virtual/fr.js +0 -4
  103. package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/locale/fr.js +0 -16
@@ -0,0 +1,11 @@
1
+ export interface PromotionCardHeaderProps {
2
+ children: React.ReactNode;
3
+ backgroundColor?: string;
4
+ textColor?: string;
5
+ className?: string;
6
+ }
7
+ declare const PromotionCardHeader: {
8
+ ({ backgroundColor, textColor, children, className, }: PromotionCardHeaderProps): import("react/jsx-runtime").JSX.Element;
9
+ displayName: string;
10
+ };
11
+ export default PromotionCardHeader;
@@ -0,0 +1,17 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ const PromotionCardHeader = ({
4
+ backgroundColor,
5
+ textColor,
6
+ children,
7
+ className
8
+ }) => {
9
+ const classNames = clsx("promotion-card-header", className);
10
+ return /* @__PURE__ */ jsx("div", { className: classNames, style: {
11
+ backgroundColor,
12
+ color: textColor
13
+ }, children });
14
+ };
15
+ export {
16
+ PromotionCardHeader as default
17
+ };
@@ -0,0 +1,10 @@
1
+ export interface PromotionCardIconProps {
2
+ icon: React.ReactNode;
3
+ backgroundColor?: string;
4
+ className?: string;
5
+ }
6
+ declare const PromotionCardIcon: {
7
+ ({ icon, backgroundColor, className, }: PromotionCardIconProps): import("react/jsx-runtime").JSX.Element;
8
+ displayName: string;
9
+ };
10
+ export default PromotionCardIcon;
@@ -0,0 +1,15 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { clsx } from "clsx";
3
+ const PromotionCardIcon = ({
4
+ icon,
5
+ backgroundColor,
6
+ className
7
+ }) => {
8
+ const classNames = clsx("promotion-card-icon", className);
9
+ return /* @__PURE__ */ jsx("div", { className: classNames, style: {
10
+ backgroundColor
11
+ }, children: icon });
12
+ };
13
+ export {
14
+ PromotionCardIcon as default
15
+ };
@@ -0,0 +1,9 @@
1
+ export interface PromotionCardTitleProps {
2
+ children: React.ReactNode;
3
+ className?: string;
4
+ }
5
+ declare const PromotionCardTitle: {
6
+ ({ children, className, }: PromotionCardTitleProps): import("react/jsx-runtime").JSX.Element;
7
+ displayName: string;
8
+ };
9
+ export default PromotionCardTitle;
@@ -0,0 +1,12 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import clsx from "clsx";
3
+ const PromotionCardTitle = ({
4
+ children,
5
+ className
6
+ }) => {
7
+ const classNames = clsx("promotion-card-title", className);
8
+ return /* @__PURE__ */ jsx("h3", { className: classNames, children });
9
+ };
10
+ export {
11
+ PromotionCardTitle as default
12
+ };
@@ -0,0 +1,2 @@
1
+ export { default as PromotionCard } from './PromotionCard';
2
+ export * from './PromotionCard';
@@ -0,0 +1,5 @@
1
+ interface SmartEllipsisProps {
2
+ text: string;
3
+ }
4
+ export default function SmartEllipsis({ text }: SmartEllipsisProps): import("react/jsx-runtime").JSX.Element;
5
+ export {};
@@ -0,0 +1,21 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useRef, useState, useEffect } from "react";
3
+ function SmartEllipsis({
4
+ text
5
+ }) {
6
+ const ref = useRef(null), [displayText, setDisplayText] = useState(text), updateText = () => {
7
+ const el = ref.current;
8
+ if (el)
9
+ if (el.textContent = text, el.scrollWidth > el.clientWidth) {
10
+ let startText = text.slice(0, Math.ceil(text.length / 2)), endText = text.slice(Math.ceil(text.length / 2));
11
+ for (; startText.length > 1 && endText.length > 1 && el.scrollWidth > el.clientWidth; )
12
+ startText = startText.slice(0, -1), endText = endText.slice(1), el.textContent = `${startText}…${endText}`;
13
+ setDisplayText(el.textContent);
14
+ } else
15
+ setDisplayText(text);
16
+ };
17
+ return useEffect(() => (updateText(), window.addEventListener("resize", updateText), () => window.removeEventListener("resize", updateText)), [text]), /* @__PURE__ */ jsx("span", { ref, className: "smart-ellipsis", children: displayText });
18
+ }
19
+ export {
20
+ SmartEllipsis as default
21
+ };
@@ -0,0 +1,2 @@
1
+ export * from './SmartEllipsis';
2
+ export { default as SmartEllipsis } from './SmartEllipsis';
@@ -29,10 +29,12 @@ export * from './List';
29
29
  export * from './Loading';
30
30
  export * from './LoadingScreen';
31
31
  export * from './Logo';
32
+ export * from './MediaViewer';
32
33
  export * from './Menu';
33
34
  export * from './Modal';
34
35
  export * from './Popover';
35
36
  export * from './PreventPropagation';
37
+ export * from './PromotionCard';
36
38
  export * from './Radio';
37
39
  export * from './RadioCard';
38
40
  export * from './SearchBar';
@@ -3,6 +3,7 @@ export default function useEdificeIcons(): {
3
3
  getIconClass: (app: IWebApp | string) => string;
4
4
  getBackgroundIconClass: (app: IWebApp | string) => string;
5
5
  getBackgroundLightIconClass: (app: IWebApp | string) => string;
6
+ getBorderIconClass: (app: IWebApp | string) => string;
6
7
  getIconCode: (app: IWebApp | string | undefined) => string;
7
8
  getWidgetIconClass: (widget: IWidget) => string;
8
9
  isIconUrl: (icon: string) => string | boolean;
@@ -78,6 +78,10 @@ function useEdificeIcons() {
78
78
  const appCode = getIconCode(app);
79
79
  return appCode ? `bg-light-${appCode}` : "bg-light-placeholder";
80
80
  }
81
+ function getBorderIconClass(app) {
82
+ const appCode = getIconCode(app);
83
+ return appCode ? `border-app-${appCode}` : "border-app-placeholder";
84
+ }
81
85
  function getWidgetIconClass(widget) {
82
86
  return iconOfWidget[widget.platformConf.name];
83
87
  }
@@ -85,6 +89,7 @@ function useEdificeIcons() {
85
89
  getIconClass,
86
90
  getBackgroundIconClass,
87
91
  getBackgroundLightIconClass,
92
+ getBorderIconClass,
88
93
  getIconCode,
89
94
  getWidgetIconClass,
90
95
  isIconUrl
@@ -0,0 +1 @@
1
+ export { default as useZoom } from './useZoom';
@@ -0,0 +1,7 @@
1
+ export default function useZoom(initialScale?: number, maxScale?: number, minScale?: number, step?: number): {
2
+ scale: number;
3
+ zoomIn: () => void;
4
+ zoomOut: () => void;
5
+ resetZoom: () => void;
6
+ setScale: import('react').Dispatch<import('react').SetStateAction<number>>;
7
+ };
@@ -0,0 +1,14 @@
1
+ import { useState } from "react";
2
+ function useZoom(initialScale = 1, maxScale = 2, minScale = 0.5, step = 0.5) {
3
+ const [scale, setScale] = useState(initialScale);
4
+ return {
5
+ scale,
6
+ zoomIn: () => setScale((prev) => Math.min(prev + step, maxScale)),
7
+ zoomOut: () => setScale((prev) => Math.max(prev - step, minScale)),
8
+ resetZoom: () => setScale(initialScale),
9
+ setScale
10
+ };
11
+ }
12
+ export {
13
+ useZoom as default
14
+ };