@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.
- package/dist/_virtual/de_DE.js +4 -0
- package/dist/_virtual/de_DE2.js +4 -0
- package/dist/_virtual/de_DE3.js +4 -0
- package/dist/_virtual/de_DE4.js +4 -0
- package/dist/_virtual/de_DE5.js +4 -0
- package/dist/_virtual/de_DE6.js +4 -0
- package/dist/_virtual/es_ES.js +4 -0
- package/dist/_virtual/es_ES2.js +4 -0
- package/dist/_virtual/es_ES3.js +4 -0
- package/dist/_virtual/es_ES4.js +4 -0
- package/dist/_virtual/es_ES5.js +4 -0
- package/dist/_virtual/es_ES6.js +4 -0
- package/dist/_virtual/it_IT.js +4 -0
- package/dist/_virtual/it_IT2.js +4 -0
- package/dist/_virtual/it_IT3.js +4 -0
- package/dist/_virtual/it_IT4.js +4 -0
- package/dist/_virtual/it_IT5.js +4 -0
- package/dist/_virtual/it_IT6.js +4 -0
- package/dist/_virtual/pt_PT.js +4 -0
- package/dist/_virtual/pt_PT2.js +4 -0
- package/dist/_virtual/pt_PT3.js +4 -0
- package/dist/_virtual/pt_PT4.js +4 -0
- package/dist/_virtual/pt_PT5.js +4 -0
- package/dist/_virtual/pt_PT6.js +4 -0
- package/dist/components/Badge/Badge.d.ts +7 -1
- package/dist/components/Badge/Badge.js +13 -1
- package/dist/components/MediaViewer/MediaViewer.d.ts +17 -0
- package/dist/components/MediaViewer/MediaViewer.js +36 -0
- package/dist/components/MediaViewer/MediaWrapper.d.ts +7 -0
- package/dist/components/MediaViewer/MediaWrapper.js +72 -0
- package/dist/components/MediaViewer/PdfViewer.d.ts +4 -0
- package/dist/components/MediaViewer/PdfViewer.js +26 -0
- package/dist/components/MediaViewer/ToolbarViewer.d.ts +7 -0
- package/dist/components/MediaViewer/ToolbarViewer.js +41 -0
- package/dist/components/MediaViewer/ToolbarZoom.d.ts +4 -0
- package/dist/components/MediaViewer/ToolbarZoom.js +19 -0
- package/dist/components/MediaViewer/index.d.ts +2 -0
- package/dist/components/PromotionCard/PromotionCard.d.ts +74 -0
- package/dist/components/PromotionCard/PromotionCard.js +31 -0
- package/dist/components/PromotionCard/PromotionCardBody.d.ts +10 -0
- package/dist/components/PromotionCard/PromotionCardBody.js +15 -0
- package/dist/components/PromotionCard/PromotionCardDescription.d.ts +9 -0
- package/dist/components/PromotionCard/PromotionCardDescription.js +12 -0
- package/dist/components/PromotionCard/PromotionCardFooter.d.ts +9 -0
- package/dist/components/PromotionCard/PromotionCardFooter.js +12 -0
- package/dist/components/PromotionCard/PromotionCardHeader.d.ts +11 -0
- package/dist/components/PromotionCard/PromotionCardHeader.js +17 -0
- package/dist/components/PromotionCard/PromotionCardIcon.d.ts +10 -0
- package/dist/components/PromotionCard/PromotionCardIcon.js +15 -0
- package/dist/components/PromotionCard/PromotionCardTitle.d.ts +9 -0
- package/dist/components/PromotionCard/PromotionCardTitle.js +12 -0
- package/dist/components/PromotionCard/index.d.ts +2 -0
- package/dist/components/SmartEllipsis/SmartEllipsis.d.ts +5 -0
- package/dist/components/SmartEllipsis/SmartEllipsis.js +21 -0
- package/dist/components/SmartEllipsis/index.d.ts +2 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/hooks/useEdificeIcons/useEdificeIcons.d.ts +1 -0
- package/dist/hooks/useEdificeIcons/useEdificeIcons.js +5 -0
- package/dist/hooks/useZoom/index.d.ts +1 -0
- package/dist/hooks/useZoom/useZoom.d.ts +7 -0
- package/dist/hooks/useZoom/useZoom.js +14 -0
- package/dist/icons.js +358 -352
- package/dist/index.js +145 -140
- package/dist/modules/icons/components/IconAiFill.d.ts +7 -0
- package/dist/modules/icons/components/IconAiFill.js +12 -0
- package/dist/modules/icons/components/IconExercizerAi.d.ts +7 -0
- package/dist/modules/icons/components/IconExercizerAi.js +14 -0
- package/dist/modules/icons/components/IconTeacher.d.ts +7 -0
- package/dist/modules/icons/components/IconTeacher.js +12 -0
- package/dist/modules/icons/components/index.d.ts +3 -0
- package/dist/modules/multimedia/FileCard/FileCard.js +1 -1
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/dist/providers/AntThemeProvider/AntProvider.js +13 -6
- package/package.json +7 -6
- package/dist/_virtual/fr.js +0 -4
- 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,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
|
+
};
|
|
@@ -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
|
+
};
|