@edifice.io/react 2.6.13-develop-b2school.20261112160554 → 2.6.13-develop-pedago.20261113140442
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/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/SearchBar/SearchBar.js +1 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/homepage.js +1 -1
- package/dist/hooks/useBackground/useBackground.d.ts +1 -1
- package/dist/hooks/useBackground/useBackground.js +1 -1
- package/dist/hooks/useUpload/useUpload.js +1 -1
- package/dist/hooks/useZendeskGuide/useZendeskGuide.d.ts +6 -2
- package/dist/hooks/useZendeskGuide/useZendeskGuide.js +1 -1
- package/dist/icons-apps.js +1 -1
- package/dist/icons.js +1 -1
- package/dist/index.js +1 -1
- package/dist/modules/HelpZone/HelpZone.js +1 -1
- package/dist/modules/HelpZone/HelpZoneContainer.js +1 -1
- package/dist/modules/homepage/components/Header/Header.js +1 -1
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.d.ts +1 -5
- package/dist/modules/homepage/components/HomeCard/HomeCardHeader.js +1 -1
- package/dist/modules/homepage/components/LastInfos/LastInfosList.js +1 -1
- package/dist/modules/homepage/components/MessageFlashList/MessageFlash.js +1 -1
- package/dist/modules/homepage/components/Notifications/NotificationList.js +1 -1
- package/dist/modules/homepage/components/Notifications/NotificationListSkeleton.js +1 -1
- package/dist/modules/homepage/components/Notifications/components/NotificationFilterModal.js +1 -1
- package/dist/modules/homepage/components/Notifications/components/ReportNotificationModal.js +1 -1
- package/dist/modules/homepage/components/Notifications/components/notificationAdapter.js +1 -1
- package/dist/modules/homepage/components/Notifications/hooks/useNotificationList.js +1 -1
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpace.js +1 -1
- package/dist/modules/homepage/components/SchoolSpace/SchoolSpaceContainer.js +1 -1
- package/dist/modules/homepage/{hooks → components/SchoolSpace}/useUserSchools.d.ts +2 -2
- package/dist/modules/homepage/components/SchoolSpace/useUserSchools.js +1 -0
- package/dist/modules/homepage/components/UsefulLinks/LinkForm.js +1 -1
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinks.js +1 -1
- package/dist/modules/homepage/components/UsefulLinks/UsefulLinksModal.js +1 -1
- package/dist/modules/homepage/components/UserSpace/UserSpace.d.ts +1 -3
- package/dist/modules/homepage/components/UserSpace/UserSpace.js +1 -1
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.d.ts +2 -4
- package/dist/modules/homepage/components/UserSpace/UserSpaceContainer.js +1 -1
- package/dist/modules/homepage/components/index.d.ts +2 -14
- package/dist/modules/icons/components/apps/IconNextcloudPoll.d.ts +7 -0
- package/dist/modules/icons/components/apps/IconNextcloudPoll.js +1 -0
- package/dist/modules/icons/components/apps/index.d.ts +1 -0
- package/dist/modules/icons/components/index.d.ts +0 -1
- package/dist/modules/icons/components/nav/IconCommunitiesBeta.js +1 -1
- package/dist/modules/icons/components/nav/IconHomeBeta.js +1 -1
- package/dist/modules/icons/components/nav/IconMessagesBeta.js +1 -1
- package/dist/modules/icons/components/nav/IconMyAppsBeta.js +1 -1
- package/dist/modules/icons/components/nav/IconNotificationBeta.js +1 -1
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.d.ts +0 -2
- package/dist/modules/multimedia/AudioRecorder/AudioRecorder.js +1 -1
- package/dist/modules/multimedia/AudioRecorder/AudioRecorderTimer.js +1 -1
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.d.ts +0 -1
- package/dist/modules/multimedia/AudioRecorder/useAudioRecorder.js +1 -1
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.d.ts +0 -6
- package/dist/modules/multimedia/VideoRecorder/VideoRecorder.js +1 -1
- package/dist/modules/multimedia/VideoRecorder/VideoRecorderToolbar.js +1 -1
- package/dist/modules/multimedia/VideoRecorder/useCameras.d.ts +0 -2
- package/dist/modules/multimedia/VideoRecorder/useCameras.js +1 -1
- package/dist/modules/multimedia/Workspace/Workspace.js +1 -1
- package/package.json +6 -7
- package/dist/components/Masonry/Masonry.d.ts +0 -40
- package/dist/components/Masonry/Masonry.js +0 -1
- package/dist/components/Masonry/index.d.ts +0 -2
- package/dist/modules/homepage/components/Agenda/Agenda.d.ts +0 -10
- package/dist/modules/homepage/components/Agenda/Agenda.js +0 -1
- package/dist/modules/homepage/components/Agenda/AgendaContainer.d.ts +0 -1
- package/dist/modules/homepage/components/Agenda/AgendaContainer.js +0 -1
- package/dist/modules/homepage/components/Agenda/AgendaEventCard.d.ts +0 -10
- package/dist/modules/homepage/components/Agenda/AgendaEventCard.js +0 -1
- package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.d.ts +0 -14
- package/dist/modules/homepage/components/Agenda/hooks/useAgendaContainer.js +0 -1
- package/dist/modules/homepage/components/Agenda/index.d.ts +0 -3
- package/dist/modules/homepage/components/Agenda/services/api/agendaService.d.ts +0 -24
- package/dist/modules/homepage/components/Agenda/services/api/agendaService.js +0 -1
- package/dist/modules/homepage/components/Agenda/services/api/index.d.ts +0 -4
- package/dist/modules/homepage/components/Agenda/services/api/index.js +0 -1
- package/dist/modules/homepage/components/Agenda/services/queries/agenda.d.ts +0 -19
- package/dist/modules/homepage/components/Agenda/services/queries/agenda.js +0 -1
- package/dist/modules/homepage/components/BriefMe/BriefMe.d.ts +0 -9
- package/dist/modules/homepage/components/BriefMe/BriefMe.js +0 -1
- package/dist/modules/homepage/components/BriefMe/BriefMeContainer.d.ts +0 -4
- package/dist/modules/homepage/components/BriefMe/BriefMeContainer.js +0 -1
- package/dist/modules/homepage/components/BriefMe/index.d.ts +0 -4
- package/dist/modules/homepage/components/BriefMe/types.d.ts +0 -17
- package/dist/modules/homepage/components/BriefMe/types.js +0 -1
- package/dist/modules/homepage/components/BriefMe/useBriefMe.d.ts +0 -31
- package/dist/modules/homepage/components/BriefMe/useBriefMe.js +0 -1
- package/dist/modules/homepage/components/Cantine/Cantine.d.ts +0 -7
- package/dist/modules/homepage/components/Cantine/Cantine.js +0 -1
- package/dist/modules/homepage/components/Cantine/CantineContainer.d.ts +0 -4
- package/dist/modules/homepage/components/Cantine/CantineContainer.js +0 -1
- package/dist/modules/homepage/components/Cantine/CantineModal.d.ts +0 -24
- package/dist/modules/homepage/components/Cantine/CantineModal.js +0 -1
- package/dist/modules/homepage/components/Cantine/CantineModalContainer.d.ts +0 -10
- package/dist/modules/homepage/components/Cantine/CantineModalContainer.js +0 -1
- package/dist/modules/homepage/components/Cantine/components/CantineLegend.d.ts +0 -5
- package/dist/modules/homepage/components/Cantine/components/CantineLegend.js +0 -1
- package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.d.ts +0 -6
- package/dist/modules/homepage/components/Cantine/components/CantineMenuSection.js +0 -1
- package/dist/modules/homepage/components/Cantine/components/cantineLabels.d.ts +0 -12
- package/dist/modules/homepage/components/Cantine/components/cantineLabels.js +0 -1
- package/dist/modules/homepage/components/Cantine/hooks/useCantine.d.ts +0 -11
- package/dist/modules/homepage/components/Cantine/hooks/useCantine.js +0 -1
- package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.d.ts +0 -24
- package/dist/modules/homepage/components/Cantine/hooks/useCantineMenu.js +0 -1
- package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.d.ts +0 -28
- package/dist/modules/homepage/components/Cantine/hooks/useCantineModal.js +0 -1
- package/dist/modules/homepage/components/Cantine/index.d.ts +0 -7
- package/dist/modules/homepage/components/Cantine/types.d.ts +0 -42
- package/dist/modules/homepage/components/Captation/CaptationAudio/CaptationAudio.d.ts +0 -7
- package/dist/modules/homepage/components/Captation/CaptationVideo/CaptationVideo.d.ts +0 -9
- package/dist/modules/homepage/components/Edumalin/Edumalin.d.ts +0 -9
- package/dist/modules/homepage/components/Edumalin/Edumalin.js +0 -1
- package/dist/modules/homepage/components/Edumalin/EdumalinContainer.d.ts +0 -4
- package/dist/modules/homepage/components/Edumalin/EdumalinContainer.js +0 -1
- package/dist/modules/homepage/components/Edumalin/EdumalinModal.d.ts +0 -8
- package/dist/modules/homepage/components/Edumalin/EdumalinModal.js +0 -1
- package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.d.ts +0 -5
- package/dist/modules/homepage/components/Edumalin/components/EdumalinBadge.js +0 -1
- package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.d.ts +0 -5
- package/dist/modules/homepage/components/Edumalin/components/EdumalinPicture.js +0 -1
- package/dist/modules/homepage/components/Edumalin/index.d.ts +0 -7
- package/dist/modules/homepage/components/Edumalin/types.d.ts +0 -24
- package/dist/modules/homepage/components/Edumalin/types.js +0 -1
- package/dist/modules/homepage/components/Edumalin/useEdumalin.d.ts +0 -16
- package/dist/modules/homepage/components/Edumalin/useEdumalin.js +0 -1
- package/dist/modules/homepage/components/Edumalin/utils.d.ts +0 -28
- package/dist/modules/homepage/components/Edumalin/utils.js +0 -1
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.d.ts +0 -16
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdf.js +0 -1
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.d.ts +0 -4
- package/dist/modules/homepage/components/GenerationHdf/GenerationHdfContainer.js +0 -1
- package/dist/modules/homepage/components/GenerationHdf/formatSolde.d.ts +0 -1
- package/dist/modules/homepage/components/GenerationHdf/formatSolde.js +0 -1
- package/dist/modules/homepage/components/GenerationHdf/index.d.ts +0 -3
- package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.d.ts +0 -10
- package/dist/modules/homepage/components/GenerationHdf/useGenerationHdf.js +0 -1
- package/dist/modules/homepage/components/Mediacentre/Mediacentre.d.ts +0 -13
- package/dist/modules/homepage/components/Mediacentre/Mediacentre.js +0 -1
- package/dist/modules/homepage/components/Mediacentre/MediacentreContainer.d.ts +0 -4
- package/dist/modules/homepage/components/Mediacentre/MediacentreContainer.js +0 -1
- package/dist/modules/homepage/components/Mediacentre/components/MediacentreUniversalisSearch.d.ts +0 -6
- package/dist/modules/homepage/components/Mediacentre/components/MediacentreUniversalisSearch.js +0 -1
- package/dist/modules/homepage/components/Mediacentre/hooks/useMediacentre.d.ts +0 -17
- package/dist/modules/homepage/components/Mediacentre/hooks/useMediacentre.js +0 -1
- package/dist/modules/homepage/components/Mediacentre/index.d.ts +0 -5
- package/dist/modules/homepage/components/Mediacentre/services/mediacentreService.d.ts +0 -24
- package/dist/modules/homepage/components/Mediacentre/services/mediacentreService.js +0 -1
- package/dist/modules/homepage/components/Mediacentre/types.d.ts +0 -8
- package/dist/modules/homepage/components/Qwant/Qwant.d.ts +0 -5
- package/dist/modules/homepage/components/Qwant/Qwant.js +0 -1
- package/dist/modules/homepage/components/Qwant/QwantContainer.d.ts +0 -2
- package/dist/modules/homepage/components/Qwant/QwantContainer.js +0 -1
- package/dist/modules/homepage/components/Qwant/index.d.ts +0 -3
- package/dist/modules/homepage/components/Rss/Rss.d.ts +0 -11
- package/dist/modules/homepage/components/Rss/Rss.js +0 -1
- package/dist/modules/homepage/components/Rss/RssContainer.d.ts +0 -1
- package/dist/modules/homepage/components/Rss/RssContainer.js +0 -1
- package/dist/modules/homepage/components/Rss/RssFeedForm.d.ts +0 -13
- package/dist/modules/homepage/components/Rss/RssFeedForm.js +0 -1
- package/dist/modules/homepage/components/Rss/RssFeedsModal.d.ts +0 -11
- package/dist/modules/homepage/components/Rss/RssFeedsModal.js +0 -1
- package/dist/modules/homepage/components/Rss/hooks/useRssContainer.d.ts +0 -25
- package/dist/modules/homepage/components/Rss/hooks/useRssContainer.js +0 -1
- package/dist/modules/homepage/components/Rss/index.d.ts +0 -6
- package/dist/modules/homepage/components/Rss/services/api/index.d.ts +0 -5
- package/dist/modules/homepage/components/Rss/services/api/index.js +0 -1
- package/dist/modules/homepage/components/Rss/services/api/rssService.d.ts +0 -38
- package/dist/modules/homepage/components/Rss/services/api/rssService.js +0 -1
- package/dist/modules/homepage/components/Rss/services/queries/rss.d.ts +0 -33
- package/dist/modules/homepage/components/Rss/services/queries/rss.js +0 -1
- package/dist/modules/homepage/components/Rss/types.d.ts +0 -25
- package/dist/modules/homepage/components/Rss/utils.d.ts +0 -7
- package/dist/modules/homepage/components/Rss/utils.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/ScreenTime.d.ts +0 -11
- package/dist/modules/homepage/components/ScreenTime/ScreenTime.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.d.ts +0 -10
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeChart.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.d.ts +0 -1
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeContainer.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.d.ts +0 -5
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeError.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.d.ts +0 -22
- package/dist/modules/homepage/components/ScreenTime/ScreenTimeModal.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.d.ts +0 -14
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeContainer.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.d.ts +0 -6
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeKids.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.d.ts +0 -31
- package/dist/modules/homepage/components/ScreenTime/hooks/useScreenTimeModal.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/index.d.ts +0 -6
- package/dist/modules/homepage/components/ScreenTime/services/api/index.d.ts +0 -4
- package/dist/modules/homepage/components/ScreenTime/services/api/index.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.d.ts +0 -28
- package/dist/modules/homepage/components/ScreenTime/services/api/screenTimeService.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.d.ts +0 -23
- package/dist/modules/homepage/components/ScreenTime/services/queries/screenTime.js +0 -1
- package/dist/modules/homepage/components/ScreenTime/types.d.ts +0 -30
- package/dist/modules/homepage/components/ScreenTime/utils.d.ts +0 -50
- package/dist/modules/homepage/components/ScreenTime/utils.js +0 -1
- package/dist/modules/homepage/components/TabsKids/components/TabsKids.d.ts +0 -43
- package/dist/modules/homepage/components/TabsKids/components/TabsKids.js +0 -1
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.d.ts +0 -34
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsItem.js +0 -1
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.d.ts +0 -14
- package/dist/modules/homepage/components/TabsKids/components/TabsKidsList.js +0 -1
- package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.d.ts +0 -20
- package/dist/modules/homepage/components/TabsKids/hooks/useTabsKidsOverflow.js +0 -1
- package/dist/modules/homepage/components/TabsKids/index.d.ts +0 -3
- package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.d.ts +0 -15
- package/dist/modules/homepage/components/TabsKids/utils/visibleTabs.js +0 -1
- package/dist/modules/homepage/components/Universalis/Universalis.d.ts +0 -9
- package/dist/modules/homepage/components/Universalis/Universalis.js +0 -1
- package/dist/modules/homepage/components/Universalis/UniversalisContainer.d.ts +0 -1
- package/dist/modules/homepage/components/Universalis/UniversalisContainer.js +0 -1
- package/dist/modules/homepage/components/Universalis/index.d.ts +0 -3
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.d.ts +0 -16
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetToggle.js +0 -1
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.d.ts +0 -21
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js +0 -1
- package/dist/modules/homepage/components/WidgetsPersonalizationPanel/index.d.ts +0 -2
- package/dist/modules/homepage/hooks/useUserSchools.js +0 -1
- package/dist/modules/icons/components/IconAddWidget.d.ts +0 -7
- package/dist/modules/icons/components/IconAddWidget.js +0 -1
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Returns how many tabs fit in the available space. The active tab is always
|
|
3
|
-
* counted, then the other tabs are added from the start until one does not
|
|
4
|
-
* fit. Never returns less than one.
|
|
5
|
-
*
|
|
6
|
-
* Tabs are laid out without gap between them. `gap` is the space between the
|
|
7
|
-
* tab list and the overflow dropdown trigger, `trigger` the width of that
|
|
8
|
-
* trigger, `corner` the room needed after the last tab for its inverted corner.
|
|
9
|
-
*/
|
|
10
|
-
export declare const getVisibleCount: (widths: number[], activeIndex: number, available: number, gap: number, trigger: number, corner: number) => number;
|
|
11
|
-
/**
|
|
12
|
-
* Returns the indexes of the visible tabs: the first `count` items, the last
|
|
13
|
-
* one being replaced by the active item when it is not among them.
|
|
14
|
-
*/
|
|
15
|
-
export declare const getVisibleIndexes: (length: number, count: number, activeIndex: number) => number[];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var getVisibleCount=(widths,activeIndex,available,gap,trigger,corner)=>{if(widths.reduce((sum,w)=>sum+w,0)+corner<=available)return widths.length;let pinned=activeIndex<0?0:activeIndex,budget=available-corner-gap-trigger,used=widths[pinned],count=1;for(let i=0;i<widths.length;i++)if(i!==pinned){if(used+widths[i]>budget)break;used+=widths[i],count++}return count},getVisibleIndexes=(length,count,activeIndex)=>{if(length===0)return[];let visibleCount=Math.max(1,Math.min(count,length)),indexes=Array.from({length:visibleCount},(_,i)=>i);return activeIndex>=visibleCount&&(indexes[visibleCount-1]=activeIndex),indexes};export{getVisibleCount,getVisibleIndexes};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { School } from '@edifice.io/client';
|
|
2
|
-
export interface UniversalisProps {
|
|
3
|
-
handleActionClick: () => void;
|
|
4
|
-
onSearch?: (query: string) => void;
|
|
5
|
-
selectedSchool?: School;
|
|
6
|
-
onSelectedSchoolChange?: (school: School) => void;
|
|
7
|
-
schools?: School[];
|
|
8
|
-
}
|
|
9
|
-
export default function Universalis({ handleActionClick, onSearch, selectedSchool, onSelectedSchoolChange, schools, }: UniversalisProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import SvgIconExternalLink from"../../../icons/components/IconExternalLink.js";import SvgIconRafterDown from"../../../icons/components/IconRafterDown.js";import Image from"../../../../components/Image/Image.js";import ButtonBeta from"../../../../components/ButtonBeta/ButtonBeta.js";import SearchBar from"../../../../components/SearchBar/SearchBar.js";import Dropdown from"../../../../components/Dropdown/Dropdown.js";import{getRotateTransitionStyle}from"../../../../utilities/rotate-transition-style/get-rotate-transition-style.js";import HomeCard from"../HomeCard/HomeCard.js";import clsx$1 from"clsx";import{useState}from"react";import{Fragment as Fragment$1,jsx,jsxs}from"react/jsx-runtime";import{useTranslation}from"react-i18next";import illuUniversalis from"@edifice.io/bootstrap/dist/images/homepage/illu-universalis.png";function Universalis({handleActionClick,onSearch,selectedSchool,onSelectedSchoolChange,schools}){let{t}=useTranslation(),[query,setQuery]=useState(``),[isExpanded,setIsExpanded]=useState(!1),hasManySchools=!!(schools&&schools.length>1),hasUai=!!selectedSchool?.UAI,searchLabel=t(hasUai?`search`:`homepage.widget.universalis.noUai`);return jsxs(HomeCard,{variant:`primary`,children:[jsxs(`div`,{className:`universalis__header`,children:[jsx(`h3`,{className:`universalis__title`,children:t(`homepage.widget.universalis.title`)}),jsx(ButtonBeta,{className:`universalis__header-button`,"data-testid":`universalis-button-open`,"aria-label":t(`homepage.widget.universalis.open`),onClick:handleActionClick,leftIcon:jsx(SvgIconExternalLink,{}),variant:`ghost`,color:`tertiary`})]}),jsx(HomeCard.Content,{children:jsxs(`div`,{className:`universalis`,children:[jsxs(`div`,{className:`universalis__intro`,children:[jsx(Image,{src:illuUniversalis,alt:`Universalis Éducation`,className:`universalis__logo`}),jsx(`p`,{className:`universalis__description`,children:t(`homepage.widget.universalis.description`)})]}),hasManySchools&&jsx(Dropdown,{placement:`bottom-start`,onToggle:setIsExpanded,children:triggerProps=>jsxs(Fragment$1,{children:[jsxs(`button`,{...triggerProps,type:`button`,"aria-expanded":isExpanded,className:clsx$1(`universalis__school-selector`,{"universalis__school-selector--open":isExpanded}),children:[jsx(`span`,{className:`universalis__school-selector-label`,children:selectedSchool?.name}),jsx(SvgIconRafterDown,{className:`universalis__school-selector-icon`,style:getRotateTransitionStyle(isExpanded,{degrees:180})})]}),jsx(Dropdown.Menu,{children:schools?.map(school=>jsx(Dropdown.Item,{onClick:()=>onSelectedSchoolChange?.(school),children:school.name},school.id))})]})}),jsx(SearchBar,{isVariant:!1,id:`universalis-search-input`,className:`universalis__search`,placeholder:searchLabel,"aria-label":searchLabel,value:query,onChange:e=>setQuery(e.target.value),onClick:()=>{query.trim()&&onSearch?.(query.trim())},disabled:!hasUai,maxLength:255,"data-testid":`universalis-search-input`})]})})]})}export{Universalis as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function UniversalisContainer(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{useUserSchools}from"../../hooks/useUserSchools.js";import Universalis from"./Universalis.js";import{jsx}from"react/jsx-runtime";import{WIDGET_NAME}from"@edifice.io/client";var UNIVERSALIS_SEARCH_URL=`https://www.universalis-edu.com/nomade/precherche/`,UNIVERSALIS_ENGINE_PARAM=`www`;function UniversalisContainer(){let{handleSelectedSchoolChange,...otherProps}=useUserSchools(WIDGET_NAME.UNIVERSALIS);return jsx(Universalis,{handleActionClick:()=>{window.open(`http://www.universalis-edu.com`,`_blank`,`noopener,noreferrer`)},onSearch:query=>{let uai=otherProps.selectedSchool?.UAI;if(!uai)return;let params=new URLSearchParams({r:UNIVERSALIS_ENGINE_PARAM,uai,q:query});window.open(`${UNIVERSALIS_SEARCH_URL}?${params.toString()}`,`_blank`,`noopener,noreferrer`)},onSelectedSchoolChange:handleSelectedSchoolChange,...otherProps})}export{UniversalisContainer};
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
export interface WidgetToggleProps extends Omit<ComponentPropsWithoutRef<'button'>, 'onClick' | 'type' | 'role' | 'aria-checked'> {
|
|
3
|
-
'checked': boolean;
|
|
4
|
-
'onChange': () => void;
|
|
5
|
-
'aria-label': string;
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Dedicated on/off control for a widget row in `WidgetsPersonalizationPanel`.
|
|
9
|
-
* The generic `Switch` component doesn't match this panel's design (size,
|
|
10
|
-
* filled-vs-outlined states), so this is a small purpose-built control
|
|
11
|
-
* rather than a `Switch` variant.
|
|
12
|
-
*/
|
|
13
|
-
export declare function WidgetToggle({ checked, onChange, disabled, ...rest }: WidgetToggleProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
export declare namespace WidgetToggle {
|
|
15
|
-
var displayName: string;
|
|
16
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import clsx$1 from"clsx";import{jsx}from"react/jsx-runtime";function WidgetToggle({checked,onChange,disabled,...rest}){return jsx(`button`,{type:`button`,role:`switch`,"aria-checked":checked,disabled,className:clsx$1(`widget-toggle`,{"widget-toggle--checked":checked}),onClick:onChange,...rest,children:jsx(`span`,{className:`widget-toggle__knob`})})}export{WidgetToggle};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
export interface WidgetPersonalizationItem {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
icon: ReactNode;
|
|
6
|
-
checked: boolean;
|
|
7
|
-
/** When true, the widget is pinned by an admin: no toggle, lock icon instead. */
|
|
8
|
-
locked?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export interface WidgetsPersonalizationPanelProps {
|
|
11
|
-
items: WidgetPersonalizationItem[];
|
|
12
|
-
isLoading?: boolean;
|
|
13
|
-
onToggle: (id: string) => void;
|
|
14
|
-
onClose: () => void;
|
|
15
|
-
title?: string;
|
|
16
|
-
description?: string;
|
|
17
|
-
}
|
|
18
|
-
export declare function WidgetsPersonalizationPanel({ items, isLoading, onToggle, onClose, title, description, }: WidgetsPersonalizationPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
-
export declare namespace WidgetsPersonalizationPanel {
|
|
20
|
-
var displayName: string;
|
|
21
|
-
}
|
package/dist/modules/homepage/components/WidgetsPersonalizationPanel/WidgetsPersonalizationPanel.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import SvgIconClose from"../../../icons/components/IconClose.js";import SvgIconLock from"../../../icons/components/IconLock.js";import IconButton from"../../../../components/Button/IconButton.js";import Heading from"../../../../components/Heading/Heading.js";import TextSkeleton from"../../../../components/Skeleton/TextSkeleton.js";import{WidgetToggle}from"./WidgetToggle.js";import clsx$1 from"clsx";import{jsx,jsxs}from"react/jsx-runtime";import{useTranslation}from"react-i18next";var SKELETON_ROWS=5;function WidgetsPersonalizationPanel({items,isLoading=!1,onToggle,onClose,title,description}){let{t}=useTranslation();return jsxs(`div`,{className:`widgets-personalization-panel`,children:[jsxs(`div`,{className:`widgets-personalization-panel__header`,children:[jsx(Heading,{level:`h2`,headingStyle:`h5`,className:`widgets-personalization-panel__title`,children:title??t(`homepage.widgetsPersonalization.title`)}),jsx(IconButton,{icon:jsx(SvgIconClose,{}),variant:`ghost`,color:`tertiary`,"aria-label":t(`close`),onClick:onClose,"data-testid":`widgetspersonalization-button-close`})]}),jsx(`p`,{className:`widgets-personalization-panel__description`,children:description??t(`homepage.widgetsPersonalization.description`)}),isLoading?jsx(`ul`,{className:`widgets-personalization-panel__list`,"aria-hidden":`true`,children:Array.from({length:SKELETON_ROWS}).map((_,index)=>jsxs(`li`,{className:`widgets-personalization-panel__item widgets-personalization-panel__item--skeleton`,children:[jsx(TextSkeleton,{className:`widgets-personalization-panel__item-icon-skeleton`}),jsx(TextSkeleton,{className:`widgets-personalization-panel__item-label-skeleton`})]},index))}):items.length===0?jsx(`div`,{className:`widgets-personalization-panel__empty`,children:jsx(`p`,{className:`widgets-personalization-panel__empty-text`,children:t(`homepage.widgetsPersonalization.empty`)})}):jsx(`ul`,{className:`widgets-personalization-panel__list`,children:items.map(item=>jsxs(`li`,{className:clsx$1(`widgets-personalization-panel__item`,{"widgets-personalization-panel__item--checked":item.checked&&!item.locked,"widgets-personalization-panel__item--locked":item.locked}),"data-testid":`widgetspersonalization-item-${item.id}`,children:[jsx(`span`,{className:`widgets-personalization-panel__item-icon`,"aria-hidden":`true`,children:item.icon}),jsx(`span`,{className:`widgets-personalization-panel__item-label`,children:item.label}),item.locked?jsx(`span`,{className:`widgets-personalization-panel__item-lock`,role:`img`,"aria-label":t(`homepage.widgetsPersonalization.locked`),"data-testid":`widgetspersonalization-lock-${item.id}`,children:jsx(SvgIconLock,{})}):jsx(WidgetToggle,{checked:item.checked,onChange:()=>onToggle(item.id),"aria-label":t(`homepage.widgetsPersonalization.toggle`,{label:item.label}),"data-testid":`widgetspersonalization-toggle-${item.id}`})]},item.id))})]})}export{WidgetsPersonalizationPanel};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import useSession from"../../../hooks/useSession/useSession.js";import useWidget from"./useWidget.js";import{useEffect,useState}from"react";import{WIDGET_NAME}from"@edifice.io/client";function useUserSchools(widgetName=WIDGET_NAME.SCHOOL){let{data:session}=useSession(),{preference,savePreference}=useWidget(widgetName),[selectedSchool,setSelectedSchool]=useState(),[schools,setSchools]=useState(session?.userDescription?.schools);return useEffect(()=>{let newSchools=session?.userDescription?.schools;setSchools(newSchools),setSelectedSchool(newSchools?.[0])},[session?.userDescription?.schools]),useEffect(()=>{if(Array.isArray(schools)){if(schools.length===1)setSelectedSchool(schools[0]);else if(preference?.schoolId){let index=schools.findIndex(school=>school.id===preference?.schoolId);setSelectedSchool(index<0||index>=schools.length?schools[0]:schools[index])}}},[preference,schools]),{schools:schools??[],selectedSchool,handleSelectedSchoolChange:school=>{setSelectedSchool(school),preference&&savePreference({...preference,schoolId:school.id})}}}export{useUserSchools};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SVGProps } from 'react';
|
|
2
|
-
interface SVGRProps {
|
|
3
|
-
title?: string;
|
|
4
|
-
titleId?: string;
|
|
5
|
-
}
|
|
6
|
-
declare const SvgIconAddWidget: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
-
export default SvgIconAddWidget;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{jsx,jsxs}from"react/jsx-runtime";var SvgIconAddWidget=({title,titleId,...props})=>jsxs(`svg`,{xmlns:`http://www.w3.org/2000/svg`,width:`24`,height:`24`,fill:`none`,viewBox:`0 0 20 20`,"aria-hidden":`true`,"aria-labelledby":titleId,...props,children:[title?jsx(`title`,{id:titleId,children:title}):null,jsx(`path`,{fill:`currentColor`,fillRule:`evenodd`,d:`M15.834 10.833c.46 0 .833.373.833.834v2.5h2.5a.833.833 0 0 1 0 1.666h-2.5v2.5a.833.833 0 0 1-1.667 0v-2.5h-2.5a.833.833 0 0 1 0-1.666H15v-2.5c0-.46.373-.834.834-.834M8.333 3.333A.833.833 0 0 0 7.5 2.5h-5a.833.833 0 0 0-.833.833v13.334c0 .46.373.833.833.833h5c.46 0 .833-.373.833-.833zM10 16.667a2.5 2.5 0 0 1-2.5 2.5h-5a2.5 2.5 0 0 1-2.5-2.5V3.333a2.5 2.5 0 0 1 2.5-2.5h5a2.5 2.5 0 0 1 2.5 2.5zM18.334 3.333A.833.833 0 0 0 17.5 2.5h-3.333a.833.833 0 0 0-.833.833v3.334c0 .46.373.833.833.833H17.5c.46 0 .834-.373.834-.833zM20 6.667a2.5 2.5 0 0 1-2.5 2.5h-3.333a2.5 2.5 0 0 1-2.5-2.5V3.333a2.5 2.5 0 0 1 2.5-2.5H17.5a2.5 2.5 0 0 1 2.5 2.5z`,clipRule:`evenodd`})]});export{SvgIconAddWidget as default};
|