@edifice.io/react 2.5.16-develop-integration.20260423140443 → 2.5.16-develop-pedago.20260506110000
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/Dropdown/Dropdown.d.ts +3 -7
- package/dist/components/Dropdown/Dropdown.js +6 -21
- package/dist/components/Dropdown/DropdownCheckboxItem.d.ts +1 -6
- package/dist/components/Dropdown/DropdownCheckboxItem.js +6 -11
- package/dist/components/Dropdown/DropdownContext.d.ts +0 -5
- package/dist/components/Dropdown/DropdownItem.d.ts +1 -6
- package/dist/components/Dropdown/DropdownItem.js +5 -10
- package/dist/components/Dropdown/DropdownRadioItem.d.ts +1 -6
- package/dist/components/Dropdown/DropdownRadioItem.js +6 -11
- package/dist/components/Layout/components/Header.js +7 -0
- package/dist/components/Layout/hooks/useHeader.js +3 -2
- package/dist/components/UserRightsList/UserRightsBookmarkRow.js +1 -1
- package/dist/components/UserRightsList/UserRightsItem.js +1 -1
- package/dist/components/UserRightsList/UserRightsList.js +1 -1
- package/dist/components/UserRightsList/types/types.d.ts +6 -1
- package/dist/components/index.d.ts +0 -1
- package/dist/hooks/useDropdown/useDropdown.js +9 -14
- package/dist/hooks/useZendeskGuide/useZendeskGuide.js +1 -1
- package/dist/icons-apps.js +136 -134
- package/dist/index.js +0 -2
- package/dist/modules/icons/components/apps/IconLivretScolaire.d.ts +7 -0
- package/dist/modules/icons/components/apps/IconLivretScolaire.js +13 -0
- package/dist/modules/icons/components/apps/index.d.ts +1 -0
- package/dist/modules/icons/components/nav/IconCommunities.js +1 -1
- package/dist/modules/multimedia/ImageEditor/effects/blur.js +7 -9
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.d.ts +7 -1
- package/dist/modules/multimedia/Linker/InternalLinker/InternalLinker.js +12 -5
- package/dist/modules/multimedia/LinkerCard/LinkerCard.d.ts +8 -5
- package/dist/modules/multimedia/LinkerCard/LinkerCard.js +2 -6
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isSameOrAfter.js +1 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/isToday.js +1 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/localeData.js +1 -1
- package/dist/node_modules/.pnpm/dayjs@1.11.19/node_modules/dayjs/plugin/weekday.js +1 -1
- package/package.json +6 -6
- package/dist/components/Dropdown/DropdownItemHidden.d.ts +0 -12
- package/dist/components/Dropdown/DropdownItemHidden.js +0 -19
- package/dist/components/Dropdown/DropdownSearchInput.d.ts +0 -20
- package/dist/components/Dropdown/DropdownSearchInput.js +0 -25
- package/dist/components/Dropdown/useDropdownItemFilter.d.ts +0 -12
- package/dist/components/Dropdown/useDropdownItemFilter.js +0 -19
- package/dist/components/Pagination/Pagination.d.ts +0 -17
- package/dist/components/Pagination/Pagination.js +0 -14
- package/dist/components/Pagination/index.d.ts +0 -1
|
@@ -81,7 +81,7 @@ declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps
|
|
|
81
81
|
Trigger: import('react').ForwardRefExoticComponent<Omit<import('./DropdownTrigger').DropdownTriggerProps, "ref"> & import('react').RefAttributes<HTMLButtonElement>>;
|
|
82
82
|
Menu: import('react').ForwardRefExoticComponent<Omit<import('./DropdownMenu').DropdownMenuProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
83
83
|
Item: {
|
|
84
|
-
({ type, icon, onClick, children, className, minWidth, disabled,
|
|
84
|
+
({ type, icon, onClick, children, className, minWidth, disabled, ...restProps }: import('./DropdownItem').DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
85
85
|
displayName: string;
|
|
86
86
|
};
|
|
87
87
|
Separator: {
|
|
@@ -89,17 +89,13 @@ declare const Dropdown: import('react').ForwardRefExoticComponent<DropdownProps
|
|
|
89
89
|
displayName: string;
|
|
90
90
|
};
|
|
91
91
|
CheckboxItem: {
|
|
92
|
-
({ children, value, model, onChange,
|
|
92
|
+
({ children, value, model, onChange, }: DropdownCheckboxItem): import("react/jsx-runtime").JSX.Element;
|
|
93
93
|
displayName: string;
|
|
94
94
|
};
|
|
95
95
|
RadioItem: {
|
|
96
|
-
({ children, value, model, onChange,
|
|
96
|
+
({ children, value, model, onChange, }: import('./DropdownRadioItem').DropdownRadioItemProps): import("react/jsx-runtime").JSX.Element;
|
|
97
97
|
displayName: string;
|
|
98
98
|
};
|
|
99
99
|
MenuGroup: import('react').ForwardRefExoticComponent<import('./DropdownMenuGroup').DropdownMenuGroupProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
100
|
-
SearchInput: {
|
|
101
|
-
({ placeholder, noResultsLabel, onSearch, }: import('./DropdownSearchInput').DropdownSearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
102
|
-
displayName: string;
|
|
103
|
-
};
|
|
104
100
|
};
|
|
105
101
|
export default Dropdown;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef,
|
|
2
|
+
import { forwardRef, useImperativeHandle, useMemo, useEffect } from "react";
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import useDropdown from "../../hooks/useDropdown/useDropdown.js";
|
|
5
5
|
import DropdownCheckboxItem from "./DropdownCheckboxItem.js";
|
|
@@ -8,7 +8,6 @@ import DropdownItem from "./DropdownItem.js";
|
|
|
8
8
|
import DropdownMenu from "./DropdownMenu.js";
|
|
9
9
|
import DropdownMenuGroup from "./DropdownMenuGroup.js";
|
|
10
10
|
import DropdownRadioItem from "./DropdownRadioItem.js";
|
|
11
|
-
import DropdownSearchInput from "./DropdownSearchInput.js";
|
|
12
11
|
import DropdownSeparator from "./DropdownSeparator.js";
|
|
13
12
|
import DropdownTrigger from "./DropdownTrigger.js";
|
|
14
13
|
import useClickOutside from "../../hooks/useClickOutside/useClickOutside.js";
|
|
@@ -25,15 +24,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
25
24
|
openOnSpace = !0,
|
|
26
25
|
focusOnMouseEnter = !0
|
|
27
26
|
}, refDropdown) => {
|
|
28
|
-
const
|
|
29
|
-
matchMapRef.current.set(id, isMatch);
|
|
30
|
-
const next = [...matchMapRef.current.values()].some(Boolean);
|
|
31
|
-
setHasMatches((prev) => prev !== next ? next : prev);
|
|
32
|
-
}, []), unregisterMatch = useCallback((id) => {
|
|
33
|
-
matchMapRef.current.delete(id);
|
|
34
|
-
const next = matchMapRef.current.size === 0 || [...matchMapRef.current.values()].some(Boolean);
|
|
35
|
-
setHasMatches((prev) => prev !== next ? next : prev);
|
|
36
|
-
}, []), {
|
|
27
|
+
const {
|
|
37
28
|
visible,
|
|
38
29
|
isFocused,
|
|
39
30
|
triggerProps,
|
|
@@ -67,19 +58,14 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
67
58
|
block,
|
|
68
59
|
setVisible,
|
|
69
60
|
openDropdown,
|
|
70
|
-
closeDropdown
|
|
71
|
-
|
|
72
|
-
setSearchQuery,
|
|
73
|
-
hasMatches,
|
|
74
|
-
reportMatch,
|
|
75
|
-
unregisterMatch
|
|
76
|
-
}), [visible, isFocused, triggerProps, menuProps, itemProps, itemRefs, block, setVisible, openDropdown, closeDropdown, searchQuery, hasMatches, reportMatch, unregisterMatch]), dropdown = clsx("dropdown", {
|
|
61
|
+
closeDropdown
|
|
62
|
+
}), [visible, isFocused, triggerProps, menuProps, itemProps, itemRefs, block, setVisible, openDropdown, closeDropdown]), dropdown = clsx("dropdown", {
|
|
77
63
|
"w-100": block,
|
|
78
64
|
"dropdown-nowrap": noWrap,
|
|
79
65
|
overflow
|
|
80
66
|
});
|
|
81
67
|
return useEffect(() => {
|
|
82
|
-
onToggle == null || onToggle(visible)
|
|
68
|
+
onToggle == null || onToggle(visible);
|
|
83
69
|
}, [visible]), /* @__PURE__ */ jsx(DropdownContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: dropdown, children: typeof children == "function" ? children(triggerProps, itemRefs, setVisible) : children }) });
|
|
84
70
|
}), Dropdown = /* @__PURE__ */ Object.assign(Root, {
|
|
85
71
|
Trigger: DropdownTrigger,
|
|
@@ -88,8 +74,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
88
74
|
Separator: DropdownSeparator,
|
|
89
75
|
CheckboxItem: DropdownCheckboxItem,
|
|
90
76
|
RadioItem: DropdownRadioItem,
|
|
91
|
-
MenuGroup: DropdownMenuGroup
|
|
92
|
-
SearchInput: DropdownSearchInput
|
|
77
|
+
MenuGroup: DropdownMenuGroup
|
|
93
78
|
});
|
|
94
79
|
export {
|
|
95
80
|
Dropdown as default
|
|
@@ -16,14 +16,9 @@ interface DropdownCheckboxItem {
|
|
|
16
16
|
* OnKeyDown handler
|
|
17
17
|
*/
|
|
18
18
|
onChange: (value: string | number) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Value used to filter this item when `Dropdown.SearchInput` is present.
|
|
21
|
-
* If provided, the item is hidden when the search query doesn't match.
|
|
22
|
-
*/
|
|
23
|
-
searchValue?: string;
|
|
24
19
|
}
|
|
25
20
|
declare const DropdownCheckboxItem: {
|
|
26
|
-
({ children, value, model, onChange,
|
|
21
|
+
({ children, value, model, onChange, }: DropdownCheckboxItem): import("react/jsx-runtime").JSX.Element;
|
|
27
22
|
displayName: string;
|
|
28
23
|
};
|
|
29
24
|
export default DropdownCheckboxItem;
|
|
@@ -1,38 +1,33 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import clsx from "clsx";
|
|
3
4
|
import { useDropdownContext } from "./DropdownContext.js";
|
|
4
|
-
import { useDropdownItemFilter } from "./useDropdownItemFilter.js";
|
|
5
|
-
import DropdownItemHidden from "./DropdownItemHidden.js";
|
|
6
5
|
import Checkbox from "../Checkbox/Checkbox.js";
|
|
7
6
|
const DropdownCheckboxItem = ({
|
|
8
7
|
children,
|
|
9
8
|
value,
|
|
10
9
|
model,
|
|
11
|
-
onChange
|
|
12
|
-
searchValue
|
|
10
|
+
onChange
|
|
13
11
|
}) => {
|
|
14
12
|
const {
|
|
15
13
|
itemProps,
|
|
16
14
|
itemRefs,
|
|
17
15
|
isFocused
|
|
18
16
|
} = useDropdownContext(), {
|
|
19
|
-
id,
|
|
20
|
-
isFiltered
|
|
21
|
-
} = useDropdownItemFilter(searchValue), {
|
|
22
17
|
onMenuItemKeyDown,
|
|
23
18
|
onMenuItemMouseEnter
|
|
24
|
-
} = itemProps, checked = model.includes(value), checkboxProps = {
|
|
19
|
+
} = itemProps, id = useId(), checked = model.includes(value), checkboxProps = {
|
|
25
20
|
value,
|
|
26
21
|
model,
|
|
27
22
|
checked,
|
|
28
23
|
readOnly: !0
|
|
29
24
|
}, dropdownCheckboxItem = clsx("dropdown-item c-pointer", {
|
|
30
25
|
focus: isFocused === id
|
|
31
|
-
})
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ jsx("div", { id, ref: (el) => itemRefs.current[id] = el, role: "menuitemcheckbox", "aria-checked": checked, onMouseUp: () => onChange(value), onKeyDown: (event) => onMenuItemKeyDown(event, () => onChange(value)), onMouseEnter: onMenuItemMouseEnter, tabIndex: checked ? 0 : -1, className: dropdownCheckboxItem, children: /* @__PURE__ */ jsxs("div", { className: "d-flex gap-8 align-items-center justify-content-between position-relative", children: [
|
|
32
28
|
children,
|
|
33
29
|
/* @__PURE__ */ jsx(Checkbox, { ...checkboxProps })
|
|
34
|
-
] });
|
|
35
|
-
return isFiltered ? /* @__PURE__ */ jsx(DropdownItemHidden, { collapse: !0, children: content }) : /* @__PURE__ */ jsx("div", { id, ref: (el) => itemRefs.current[id] = el, role: "menuitemcheckbox", "aria-checked": checked, onMouseUp: () => onChange(value), onKeyDown: (event) => onMenuItemKeyDown(event, () => onChange(value)), onMouseEnter: onMenuItemMouseEnter, tabIndex: checked ? 0 : -1, className: dropdownCheckboxItem, children: content });
|
|
30
|
+
] }) });
|
|
36
31
|
};
|
|
37
32
|
export {
|
|
38
33
|
DropdownCheckboxItem as default
|
|
@@ -2,11 +2,6 @@ import { UseDropdownProps } from '../../hooks/useDropdown/useDropdown';
|
|
|
2
2
|
type OmittedProps = Omit<UseDropdownProps, 'triggerRef' | 'menuRef'>;
|
|
3
3
|
export interface DropdownContextProps extends OmittedProps {
|
|
4
4
|
block?: boolean;
|
|
5
|
-
searchQuery: string;
|
|
6
|
-
setSearchQuery: (query: string) => void;
|
|
7
|
-
hasMatches: boolean;
|
|
8
|
-
reportMatch: (id: string, isMatch: boolean) => void;
|
|
9
|
-
unregisterMatch: (id: string) => void;
|
|
10
5
|
}
|
|
11
6
|
export declare const DropdownContext: import('react').Context<DropdownContextProps | null>;
|
|
12
7
|
export declare const useDropdownContext: () => DropdownContextProps;
|
|
@@ -29,14 +29,9 @@ export interface DropdownItemProps {
|
|
|
29
29
|
* Disabled status
|
|
30
30
|
*/
|
|
31
31
|
disabled?: boolean;
|
|
32
|
-
/**
|
|
33
|
-
* Value used to filter this item when `Dropdown.SearchInput` is present.
|
|
34
|
-
* If provided, the item is hidden when the search query doesn't match.
|
|
35
|
-
*/
|
|
36
|
-
searchValue?: string;
|
|
37
32
|
}
|
|
38
33
|
declare const DropdownItem: {
|
|
39
|
-
({ type, icon, onClick, children, className, minWidth, disabled,
|
|
34
|
+
({ type, icon, onClick, children, className, minWidth, disabled, ...restProps }: DropdownItemProps): import("react/jsx-runtime").JSX.Element;
|
|
40
35
|
displayName: string;
|
|
41
36
|
};
|
|
42
37
|
export default DropdownItem;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import clsx from "clsx";
|
|
3
4
|
import { useDropdownContext } from "./DropdownContext.js";
|
|
4
|
-
import { useDropdownItemFilter } from "./useDropdownItemFilter.js";
|
|
5
|
-
import DropdownItemHidden from "./DropdownItemHidden.js";
|
|
6
5
|
const DropdownItem = ({
|
|
7
6
|
type = "action",
|
|
8
7
|
icon,
|
|
@@ -11,7 +10,6 @@ const DropdownItem = ({
|
|
|
11
10
|
className,
|
|
12
11
|
minWidth,
|
|
13
12
|
disabled,
|
|
14
|
-
searchValue,
|
|
15
13
|
...restProps
|
|
16
14
|
}) => {
|
|
17
15
|
const {
|
|
@@ -19,15 +17,12 @@ const DropdownItem = ({
|
|
|
19
17
|
itemRefs,
|
|
20
18
|
isFocused
|
|
21
19
|
} = useDropdownContext(), {
|
|
22
|
-
id,
|
|
23
|
-
isFiltered
|
|
24
|
-
} = useDropdownItemFilter(searchValue), {
|
|
25
20
|
onMenuItemKeyDown,
|
|
26
21
|
onMenuItemMouseEnter,
|
|
27
22
|
onMenuItemClick
|
|
28
23
|
} = itemProps, handleOnClick = (event) => {
|
|
29
24
|
disabled || (onClick == null || onClick(event), type === "action" && (onMenuItemClick(), event.stopPropagation()));
|
|
30
|
-
}, dropdownItem = clsx("dropdown-item", {
|
|
25
|
+
}, id = useId(), dropdownItem = clsx("dropdown-item", {
|
|
31
26
|
focus: isFocused === id
|
|
32
27
|
}, {
|
|
33
28
|
"text-gray-600": disabled
|
|
@@ -35,11 +30,11 @@ const DropdownItem = ({
|
|
|
35
30
|
...minWidth && {
|
|
36
31
|
minWidth: `${minWidth}px`
|
|
37
32
|
}
|
|
38
|
-
}
|
|
33
|
+
};
|
|
34
|
+
return /* @__PURE__ */ jsx("div", { id, role: "menuitem", style, ref: (el) => itemRefs.current[id] = el, tabIndex: isFocused === id ? 0 : -1, className: dropdownItem, "aria-current": isFocused === id, onClick: handleOnClick, onMouseEnter: onMenuItemMouseEnter, onKeyDown: (event) => onMenuItemKeyDown(event, onClick), ...restProps, children: /* @__PURE__ */ jsxs("div", { className: "d-flex gap-8 align-items-center", children: [
|
|
39
35
|
icon,
|
|
40
36
|
children
|
|
41
|
-
] });
|
|
42
|
-
return isFiltered ? /* @__PURE__ */ jsx(DropdownItemHidden, { children: content }) : /* @__PURE__ */ jsx("div", { id, role: "menuitem", style, ref: (el) => itemRefs.current[id] = el, tabIndex: isFocused === id ? 0 : -1, className: dropdownItem, "aria-current": isFocused === id, onClick: handleOnClick, onMouseEnter: onMenuItemMouseEnter, onKeyDown: (event) => onMenuItemKeyDown(event, onClick), ...restProps, children: content });
|
|
37
|
+
] }) });
|
|
43
38
|
};
|
|
44
39
|
export {
|
|
45
40
|
DropdownItem as default
|
|
@@ -16,14 +16,9 @@ export interface DropdownRadioItemProps {
|
|
|
16
16
|
* onKeyDown, onMouseUp handlers
|
|
17
17
|
*/
|
|
18
18
|
onChange: (value: string) => void;
|
|
19
|
-
/**
|
|
20
|
-
* Value used to filter this item when `Dropdown.SearchInput` is present.
|
|
21
|
-
* If provided, the item is hidden when the search query doesn't match.
|
|
22
|
-
*/
|
|
23
|
-
searchValue?: string;
|
|
24
19
|
}
|
|
25
20
|
declare const DropdownRadioItem: {
|
|
26
|
-
({ children, value, model, onChange,
|
|
21
|
+
({ children, value, model, onChange, }: DropdownRadioItemProps): import("react/jsx-runtime").JSX.Element;
|
|
27
22
|
displayName: string;
|
|
28
23
|
};
|
|
29
24
|
export default DropdownRadioItem;
|
|
@@ -1,38 +1,33 @@
|
|
|
1
1
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
2
3
|
import clsx from "clsx";
|
|
3
4
|
import { useDropdownContext } from "./DropdownContext.js";
|
|
4
|
-
import { useDropdownItemFilter } from "./useDropdownItemFilter.js";
|
|
5
|
-
import DropdownItemHidden from "./DropdownItemHidden.js";
|
|
6
5
|
import Radio from "../Radio/Radio.js";
|
|
7
6
|
const DropdownRadioItem = ({
|
|
8
7
|
children,
|
|
9
8
|
value,
|
|
10
9
|
model,
|
|
11
|
-
onChange
|
|
12
|
-
searchValue
|
|
10
|
+
onChange
|
|
13
11
|
}) => {
|
|
14
12
|
const {
|
|
15
13
|
itemProps,
|
|
16
14
|
itemRefs,
|
|
17
15
|
isFocused
|
|
18
16
|
} = useDropdownContext(), {
|
|
19
|
-
id,
|
|
20
|
-
isFiltered
|
|
21
|
-
} = useDropdownItemFilter(searchValue), {
|
|
22
17
|
onMenuItemKeyDown,
|
|
23
18
|
onMenuItemMouseEnter
|
|
24
|
-
} = itemProps, radioProps = {
|
|
19
|
+
} = itemProps, id = useId(), radioProps = {
|
|
25
20
|
value,
|
|
26
21
|
model,
|
|
27
22
|
checked: value === model,
|
|
28
23
|
readOnly: !0
|
|
29
24
|
}, dropdownRadioItem = clsx("dropdown-item c-pointer", {
|
|
30
25
|
focus: isFocused === id
|
|
31
|
-
})
|
|
26
|
+
});
|
|
27
|
+
return /* @__PURE__ */ jsx("div", { id, ref: (el) => itemRefs.current[id] = el, role: "menuitemradio", "aria-checked": value === model, onMouseUp: () => onChange(value), onKeyDown: (event) => onMenuItemKeyDown(event, () => onChange(value)), onMouseEnter: onMenuItemMouseEnter, tabIndex: value === model ? 0 : -1, className: dropdownRadioItem, children: /* @__PURE__ */ jsxs("div", { className: "d-flex gap-8 align-items-center justify-content-between position-relative", children: [
|
|
32
28
|
children,
|
|
33
29
|
/* @__PURE__ */ jsx(Radio, { ...radioProps, className: "position-absolute start-0 end-0 top-0 bottom-0 opacity-0" })
|
|
34
|
-
] });
|
|
35
|
-
return isFiltered ? /* @__PURE__ */ jsx(DropdownItemHidden, { children: content }) : /* @__PURE__ */ jsx("div", { id, ref: (el) => itemRefs.current[id] = el, role: "menuitemradio", "aria-checked": value === model, onMouseUp: () => onChange(value), onKeyDown: (event) => onMenuItemKeyDown(event, () => onChange(value)), onMouseEnter: onMenuItemMouseEnter, tabIndex: value === model ? 0 : -1, className: dropdownRadioItem, children: content });
|
|
30
|
+
] }) });
|
|
36
31
|
};
|
|
37
32
|
export {
|
|
38
33
|
DropdownRadioItem as default
|
|
@@ -4,6 +4,7 @@ import { useTranslation } from "react-i18next";
|
|
|
4
4
|
import { useEdificeClient } from "../../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
5
5
|
import { useEdificeTheme } from "../../../providers/EdificeThemeProvider/EdificeThemeProvider.hook.js";
|
|
6
6
|
import SvgIconRafterDown from "../../../modules/icons/components/IconRafterDown.js";
|
|
7
|
+
import SvgIconCommunities from "../../../modules/icons/components/nav/IconCommunities.js";
|
|
7
8
|
import SvgIconCommunity from "../../../modules/icons/components/nav/IconCommunity.js";
|
|
8
9
|
import SvgIconDisconnect from "../../../modules/icons/components/nav/IconDisconnect.js";
|
|
9
10
|
import SvgIconHome from "../../../modules/icons/components/nav/IconHome.js";
|
|
@@ -67,6 +68,7 @@ const Header = ({
|
|
|
67
68
|
userName,
|
|
68
69
|
welcomeUser,
|
|
69
70
|
communityWorkflow,
|
|
71
|
+
communitiesWorkflow,
|
|
70
72
|
conversationWorflow,
|
|
71
73
|
searchWorkflow,
|
|
72
74
|
isCollapsed,
|
|
@@ -97,6 +99,7 @@ const Header = ({
|
|
|
97
99
|
/* @__PURE__ */ jsx(SvgIconOneMessaging, { className: "icon notification" }),
|
|
98
100
|
/* @__PURE__ */ jsx(VisuallyHidden, { children: t("navbar.messages") })
|
|
99
101
|
] }) }),
|
|
102
|
+
communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/communities", translate: t("navbar.community"), children: /* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities text-purple-500" }) }) }),
|
|
100
103
|
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsx(NavLink, { link: "/userbook/mon-compte", className: "dropdown-item", translate: t("navbar.myaccount"), children: /* @__PURE__ */ jsx(SvgIconOneProfile, { className: "icon user" }) }) }),
|
|
101
104
|
currentLanguage === "fr" && hasOldHelpEnableWorkflow ? /* @__PURE__ */ jsxs(NavItem, { children: [
|
|
102
105
|
/* @__PURE__ */ jsxs("button", { className: "nav-link", onClick: () => {
|
|
@@ -177,6 +180,10 @@ const Header = ({
|
|
|
177
180
|
/* @__PURE__ */ jsx(SvgIconCommunity, { className: "icon community" }),
|
|
178
181
|
/* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
|
|
179
182
|
] }) }),
|
|
183
|
+
communitiesWorkflow && /* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/communities", className: "nav-link dropdown-item", children: [
|
|
184
|
+
/* @__PURE__ */ jsx(SvgIconCommunities, { className: "icon communities" }),
|
|
185
|
+
/* @__PURE__ */ jsx("span", { className: "nav-text", children: t("navbar.community") })
|
|
186
|
+
] }) }),
|
|
180
187
|
searchWorkflow ? /* @__PURE__ */ jsx(SearchEngine, {}) : null,
|
|
181
188
|
/* @__PURE__ */ jsx(NavItem, { children: /* @__PURE__ */ jsxs("a", { href: "/userbook/mon-compte", className: "nav-link dropdown-item", children: [
|
|
182
189
|
/* @__PURE__ */ jsx(Avatar, { alt: userName, size: "sm", src: userAvatar, variant: "circle", className: "bg-white", width: "32", height: "32" }),
|
|
@@ -14,7 +14,7 @@ function useHeader({
|
|
|
14
14
|
t
|
|
15
15
|
} = useTranslation(), title = t(appCode), [isCollapsed, setIsCollapsed] = useState(!0), [appsRef, isAppsHovered] = useHover(), popoverAppsId = useId(), popoverSearchId = useId(), userAvatar = avatar, userName = user == null ? void 0 : user.username, welcomeUser = t("welcome", {
|
|
16
16
|
username: user == null ? void 0 : user.firstName
|
|
17
|
-
}), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
|
|
17
|
+
}), bookmarkedApps = useBookmark(), communityWorkflow = useHasWorkflow("net.atos.entng.community.controllers.CommunityController|view"), communitiesWorkflow = useHasWorkflow("community.access"), conversationWorflow = useHasWorkflow("org.entcore.conversation.controllers.ConversationController|view"), searchWorkflow = useHasWorkflow("fr.openent.searchengine.controllers.SearchEngineController|view"), toggleCollapsedNav = useCallback(() => {
|
|
18
18
|
setIsCollapsed(!isCollapsed);
|
|
19
19
|
}, [isCollapsed]);
|
|
20
20
|
return useMemo(() => ({
|
|
@@ -28,11 +28,12 @@ function useHeader({
|
|
|
28
28
|
userName,
|
|
29
29
|
welcomeUser,
|
|
30
30
|
communityWorkflow,
|
|
31
|
+
communitiesWorkflow,
|
|
31
32
|
conversationWorflow,
|
|
32
33
|
searchWorkflow,
|
|
33
34
|
isCollapsed,
|
|
34
35
|
toggleCollapsedNav
|
|
35
|
-
}), [appsRef, bookmarkedApps, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
|
|
36
|
+
}), [appsRef, bookmarkedApps, communitiesWorkflow, communityWorkflow, conversationWorflow, isAppsHovered, isCollapsed, popoverAppsId, popoverSearchId, searchWorkflow, title, toggleCollapsedNav, userAvatar, userName, welcomeUser]);
|
|
36
37
|
}
|
|
37
38
|
export {
|
|
38
39
|
useHeader as default
|
|
@@ -21,7 +21,7 @@ const UserRightsBookmarkRow = ({
|
|
|
21
21
|
return /* @__PURE__ */ jsxs("tr", { "data-testid": "user-rights-list-bookmark-row", children: [
|
|
22
22
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(SvgIconBookmark, {}) }),
|
|
23
23
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Button, { color: "tertiary", variant: "ghost", className: "fw-normal ps-0", "aria-expanded": bookmark.isExpanded, rightIcon: /* @__PURE__ */ jsx(SvgIconRafterDown, { title: bookmark.isExpanded ? t("hide") : t("show"), className: "w-16 min-w-0", style: getRotateTransitionStyle(bookmark.isExpanded) }), onClick: () => onToggleExpand(bookmark.id), children: bookmark.name }) }),
|
|
24
|
-
Object.entries(resourceRights).map(([rightName]) => /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Checkbox, { checked: bookmark.permission.includes(rightName), onChange: () => onToggleRight(bookmark.id, rightName), disabled: isReadOnly, "aria-label": `${bookmark.name} - ${rightName}`, "data-testid": `user-rights-list-bookmark-${rightName}-checkbox` }) }, rightName)),
|
|
24
|
+
Object.entries(resourceRights).map(([rightName, rightDef]) => /* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Checkbox, { checked: bookmark.permission.includes(rightName), onChange: () => onToggleRight(bookmark.id, rightName), disabled: isReadOnly || rightDef.isReadOnlyCheckbox, "aria-label": `${bookmark.name} - ${rightName}`, "data-testid": `user-rights-list-bookmark-${rightName}-checkbox` }) }, rightName)),
|
|
25
25
|
/* @__PURE__ */ jsx("td", { children: !isReadOnly && /* @__PURE__ */ jsx(IconButton, { "data-testid": "user-rights-list-bookmark-close-button", color: "tertiary", onClick: () => onDelete(bookmark.id), icon: /* @__PURE__ */ jsx(SvgIconClose, {}), title: `${t("close")} ${bookmark.name}`, variant: "ghost" }) })
|
|
26
26
|
] });
|
|
27
27
|
};
|
|
@@ -27,7 +27,7 @@ const UserRightsItem = ({
|
|
|
27
27
|
return /* @__PURE__ */ jsxs("tr", { "data-testid": "user-rights-list-item-row", className: rowClassName, "aria-label": bookmarkName ? `${item.displayName} - ${bookmarkName}` : void 0, children: [
|
|
28
28
|
/* @__PURE__ */ jsx("td", { children: /* @__PURE__ */ jsx(Avatar, { src: getAvatarURL(item.recipientId, item.recipientType), size: "xs", alt: item.displayName, variant: "circle" }) }),
|
|
29
29
|
/* @__PURE__ */ jsx("td", { children: item.displayName }),
|
|
30
|
-
Object.entries(resourceRights).map(([rightName]) => /* @__PURE__ */ jsx("td", { "data-testid": `user-rights-list-item-${rightName}-checkbox`, children: /* @__PURE__ */ jsx(Checkbox, { checked: item.permission.includes(rightName), onChange: () => handleChange(rightName), disabled: isReadOnly, "aria-label": `${item.displayName} - ${rightName}` }) }, rightName)),
|
|
30
|
+
Object.entries(resourceRights).map(([rightName, rightDef]) => /* @__PURE__ */ jsx("td", { "data-testid": `user-rights-list-item-${rightName}-checkbox`, children: /* @__PURE__ */ jsx(Checkbox, { checked: item.permission.includes(rightName), onChange: isReadOnly || rightDef.isReadOnlyCheckbox ? void 0 : () => handleChange(rightName), disabled: isReadOnly || rightDef.isReadOnlyCheckbox, "aria-label": `${item.displayName} - ${rightName}` }) }, rightName)),
|
|
31
31
|
/* @__PURE__ */ jsx("td", { children: !isReadOnly && isDeletable && /* @__PURE__ */ jsx(IconButton, { "data-testid": "user-rights-list-close-button", color: "tertiary", onClick: () => handleDeleteItem(), icon: /* @__PURE__ */ jsx(SvgIconClose, {}), title: `${t("close")} ${item.displayName}`, variant: "ghost", type: "button" }) })
|
|
32
32
|
] });
|
|
33
33
|
};
|
|
@@ -68,7 +68,7 @@ const UserRightsList = /* @__PURE__ */ forwardRef(({
|
|
|
68
68
|
/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsxs("tr", { children: [
|
|
69
69
|
/* @__PURE__ */ jsx("th", { scope: "col", className: "w-32", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("explorer.modal.share.avatar.shared.alt") }) }),
|
|
70
70
|
/* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("explorer.modal.share.search.placeholder") }) }),
|
|
71
|
-
Object.entries(resourceRights).map(([rightName]) => /* @__PURE__ */ jsx("th", { children: rightName }, rightName)),
|
|
71
|
+
Object.entries(resourceRights).map(([rightName, rightDef]) => /* @__PURE__ */ jsx("th", { children: rightDef.displayName ?? rightName }, rightName)),
|
|
72
72
|
!isReadOnly && /* @__PURE__ */ jsx("th", { scope: "col", children: /* @__PURE__ */ jsx(VisuallyHidden, { children: t("close") }) })
|
|
73
73
|
] }) }),
|
|
74
74
|
/* @__PURE__ */ jsxs("tbody", { children: [
|
|
@@ -6,8 +6,13 @@ export type ResourceRightDefinition = {
|
|
|
6
6
|
default: boolean;
|
|
7
7
|
requires: ResourceRightName[];
|
|
8
8
|
excludes: ResourceRightName[];
|
|
9
|
+
displayName?: string;
|
|
10
|
+
isReadOnlyCheckbox?: boolean;
|
|
9
11
|
};
|
|
10
|
-
|
|
12
|
+
type AtLeastOne<T extends object> = Partial<T> & {
|
|
13
|
+
[K in keyof T]: Pick<T, K>;
|
|
14
|
+
}[keyof T];
|
|
15
|
+
export type ResourceRights = AtLeastOne<Record<ResourceRightName, ResourceRightDefinition>>;
|
|
11
16
|
export interface BookmarkUser {
|
|
12
17
|
id: string;
|
|
13
18
|
displayName: string;
|
|
@@ -47,17 +47,17 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
}, [activeIndex]);
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
50
|
+
const nextItem = () => {
|
|
51
|
+
const itemCount = Object.values(itemRefs.current).length;
|
|
52
|
+
setActiveIndex((prevIndex) => (prevIndex + 1) % itemCount);
|
|
53
53
|
}, previousItem = () => {
|
|
54
|
-
const
|
|
55
|
-
|
|
54
|
+
const itemCount = Object.values(itemRefs.current).length;
|
|
55
|
+
setActiveIndex((prevIndex) => (prevIndex - 1 + itemCount) % itemCount);
|
|
56
56
|
}, firstItem = () => {
|
|
57
57
|
setActiveIndex(0);
|
|
58
58
|
}, lastItem = () => {
|
|
59
|
-
const
|
|
60
|
-
|
|
59
|
+
const itemCount = Object.values(itemRefs.current).length;
|
|
60
|
+
setActiveIndex(itemCount - 1);
|
|
61
61
|
}, openDropdown = useCallback(() => {
|
|
62
62
|
setVisible(!0);
|
|
63
63
|
}, []), closeDropdown = useCallback(() => {
|
|
@@ -90,7 +90,7 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
|
|
|
90
90
|
extraTriggerKeyDownHandler == null || extraTriggerKeyDownHandler(event), stopEvents(flag, event);
|
|
91
91
|
}, [closeDropdown, openDropdown]), onMenuItemMouseEnter = (event) => {
|
|
92
92
|
if (focusOnMouseEnter) {
|
|
93
|
-
const index = Object.values(itemRefs.current).
|
|
93
|
+
const index = Object.values(itemRefs.current).findIndex((item) => item.id === event.currentTarget.getAttribute("id"));
|
|
94
94
|
setActiveIndex(index);
|
|
95
95
|
}
|
|
96
96
|
}, onMenuItemKeyDown = useCallback((event, onSuccess) => {
|
|
@@ -104,12 +104,7 @@ const useDropdown = (placement, extraTriggerKeyDownHandler, isTriggerHovered = !
|
|
|
104
104
|
break;
|
|
105
105
|
case " ":
|
|
106
106
|
case "Enter":
|
|
107
|
-
|
|
108
|
-
const currentItem = getVisibleItems()[activeIndex];
|
|
109
|
-
if (!currentItem) break;
|
|
110
|
-
currentItem.getAttribute("role") === "menuitem" && triggerRef.current && (triggerRef.current.focus(), setVisible(!1)), onSuccess == null || onSuccess();
|
|
111
|
-
}
|
|
112
|
-
flag = !0;
|
|
107
|
+
activeIndex !== -1 && (Object.values(itemRefs.current)[activeIndex].getAttribute("role") === "menuitem" && triggerRef.current && (triggerRef.current.focus(), setVisible(!1)), onSuccess == null || onSuccess()), flag = !0;
|
|
113
108
|
break;
|
|
114
109
|
case "ArrowDown":
|
|
115
110
|
case "Down":
|
package/dist/icons-apps.js
CHANGED
|
@@ -57,73 +57,74 @@ import { default as default57 } from "./modules/icons/components/apps/IconLeSite
|
|
|
57
57
|
import { default as default58 } from "./modules/icons/components/apps/IconLemonde.js";
|
|
58
58
|
import { default as default59 } from "./modules/icons/components/apps/IconLesechos.js";
|
|
59
59
|
import { default as default60 } from "./modules/icons/components/apps/IconLibrary.js";
|
|
60
|
-
import { default as default61 } from "./modules/icons/components/apps/
|
|
61
|
-
import { default as default62 } from "./modules/icons/components/apps/
|
|
62
|
-
import { default as default63 } from "./modules/icons/components/apps/
|
|
63
|
-
import { default as default64 } from "./modules/icons/components/apps/
|
|
64
|
-
import { default as default65 } from "./modules/icons/components/apps/
|
|
65
|
-
import { default as default66 } from "./modules/icons/components/apps/
|
|
66
|
-
import { default as default67 } from "./modules/icons/components/apps/
|
|
67
|
-
import { default as default68 } from "./modules/icons/components/apps/
|
|
68
|
-
import { default as default69 } from "./modules/icons/components/apps/
|
|
69
|
-
import { default as default70 } from "./modules/icons/components/apps/
|
|
70
|
-
import { default as default71 } from "./modules/icons/components/apps/
|
|
71
|
-
import { default as default72 } from "./modules/icons/components/apps/
|
|
72
|
-
import { default as default73 } from "./modules/icons/components/apps/
|
|
73
|
-
import { default as default74 } from "./modules/icons/components/apps/
|
|
74
|
-
import { default as default75 } from "./modules/icons/components/apps/
|
|
75
|
-
import { default as default76 } from "./modules/icons/components/apps/
|
|
76
|
-
import { default as default77 } from "./modules/icons/components/apps/
|
|
77
|
-
import { default as default78 } from "./modules/icons/components/apps/
|
|
78
|
-
import { default as default79 } from "./modules/icons/components/apps/
|
|
79
|
-
import { default as default80 } from "./modules/icons/components/apps/
|
|
80
|
-
import { default as default81 } from "./modules/icons/components/apps/
|
|
81
|
-
import { default as default82 } from "./modules/icons/components/apps/
|
|
82
|
-
import { default as default83 } from "./modules/icons/components/apps/
|
|
83
|
-
import { default as default84 } from "./modules/icons/components/apps/
|
|
84
|
-
import { default as default85 } from "./modules/icons/components/apps/
|
|
85
|
-
import { default as default86 } from "./modules/icons/components/apps/
|
|
86
|
-
import { default as default87 } from "./modules/icons/components/apps/
|
|
87
|
-
import { default as default88 } from "./modules/icons/components/apps/
|
|
88
|
-
import { default as default89 } from "./modules/icons/components/apps/
|
|
89
|
-
import { default as default90 } from "./modules/icons/components/apps/
|
|
90
|
-
import { default as default91 } from "./modules/icons/components/apps/
|
|
91
|
-
import { default as default92 } from "./modules/icons/components/apps/
|
|
92
|
-
import { default as default93 } from "./modules/icons/components/apps/
|
|
93
|
-
import { default as default94 } from "./modules/icons/components/apps/
|
|
94
|
-
import { default as default95 } from "./modules/icons/components/apps/
|
|
95
|
-
import { default as default96 } from "./modules/icons/components/apps/
|
|
96
|
-
import { default as default97 } from "./modules/icons/components/apps/
|
|
97
|
-
import { default as default98 } from "./modules/icons/components/apps/
|
|
98
|
-
import { default as default99 } from "./modules/icons/components/apps/
|
|
99
|
-
import { default as default100 } from "./modules/icons/components/apps/
|
|
100
|
-
import { default as default101 } from "./modules/icons/components/apps/
|
|
101
|
-
import { default as default102 } from "./modules/icons/components/apps/
|
|
102
|
-
import { default as default103 } from "./modules/icons/components/apps/
|
|
103
|
-
import { default as default104 } from "./modules/icons/components/apps/
|
|
104
|
-
import { default as default105 } from "./modules/icons/components/apps/
|
|
105
|
-
import { default as default106 } from "./modules/icons/components/apps/
|
|
106
|
-
import { default as default107 } from "./modules/icons/components/apps/
|
|
107
|
-
import { default as default108 } from "./modules/icons/components/apps/
|
|
108
|
-
import { default as default109 } from "./modules/icons/components/apps/
|
|
109
|
-
import { default as default110 } from "./modules/icons/components/apps/
|
|
110
|
-
import { default as default111 } from "./modules/icons/components/apps/
|
|
111
|
-
import { default as default112 } from "./modules/icons/components/apps/
|
|
112
|
-
import { default as default113 } from "./modules/icons/components/apps/
|
|
113
|
-
import { default as default114 } from "./modules/icons/components/apps/
|
|
114
|
-
import { default as default115 } from "./modules/icons/components/apps/
|
|
115
|
-
import { default as default116 } from "./modules/icons/components/apps/
|
|
116
|
-
import { default as default117 } from "./modules/icons/components/apps/
|
|
117
|
-
import { default as default118 } from "./modules/icons/components/apps/
|
|
118
|
-
import { default as default119 } from "./modules/icons/components/apps/
|
|
119
|
-
import { default as default120 } from "./modules/icons/components/apps/
|
|
120
|
-
import { default as default121 } from "./modules/icons/components/apps/
|
|
121
|
-
import { default as default122 } from "./modules/icons/components/apps/
|
|
122
|
-
import { default as default123 } from "./modules/icons/components/apps/
|
|
123
|
-
import { default as default124 } from "./modules/icons/components/apps/
|
|
124
|
-
import { default as default125 } from "./modules/icons/components/apps/
|
|
125
|
-
import { default as default126 } from "./modules/icons/components/apps/
|
|
126
|
-
import { default as default127 } from "./modules/icons/components/apps/
|
|
60
|
+
import { default as default61 } from "./modules/icons/components/apps/IconLivretScolaire.js";
|
|
61
|
+
import { default as default62 } from "./modules/icons/components/apps/IconLool.js";
|
|
62
|
+
import { default as default63 } from "./modules/icons/components/apps/IconLsu.js";
|
|
63
|
+
import { default as default64 } from "./modules/icons/components/apps/IconMadmagz.js";
|
|
64
|
+
import { default as default65 } from "./modules/icons/components/apps/IconMagneto.js";
|
|
65
|
+
import { default as default66 } from "./modules/icons/components/apps/IconMatholycee.js";
|
|
66
|
+
import { default as default67 } from "./modules/icons/components/apps/IconMaxicours.js";
|
|
67
|
+
import { default as default68 } from "./modules/icons/components/apps/IconMediacentre.js";
|
|
68
|
+
import { default as default69 } from "./modules/icons/components/apps/IconMindmap.js";
|
|
69
|
+
import { default as default70 } from "./modules/icons/components/apps/IconMinetest.js";
|
|
70
|
+
import { default as default71 } from "./modules/icons/components/apps/IconMinibadge.js";
|
|
71
|
+
import { default as default72 } from "./modules/icons/components/apps/IconMonorientationenligne.js";
|
|
72
|
+
import { default as default73 } from "./modules/icons/components/apps/IconMonstageenligne.js";
|
|
73
|
+
import { default as default74 } from "./modules/icons/components/apps/IconMoodle.js";
|
|
74
|
+
import { default as default75 } from "./modules/icons/components/apps/IconMuseefrancaisphoto.js";
|
|
75
|
+
import { default as default76 } from "./modules/icons/components/apps/IconMyNetwork.js";
|
|
76
|
+
import { default as default77 } from "./modules/icons/components/apps/IconNabook.js";
|
|
77
|
+
import { default as default78 } from "./modules/icons/components/apps/IconNetvibes.js";
|
|
78
|
+
import { default as default79 } from "./modules/icons/components/apps/IconNote.js";
|
|
79
|
+
import { default as default80 } from "./modules/icons/components/apps/IconNotebook.js";
|
|
80
|
+
import { default as default81 } from "./modules/icons/components/apps/IconNotes.js";
|
|
81
|
+
import { default as default82 } from "./modules/icons/components/apps/IconOnisep.js";
|
|
82
|
+
import { default as default83 } from "./modules/icons/components/apps/IconOnisep2.js";
|
|
83
|
+
import { default as default84 } from "./modules/icons/components/apps/IconPad.js";
|
|
84
|
+
import { default as default85 } from "./modules/icons/components/apps/IconPages.js";
|
|
85
|
+
import { default as default86 } from "./modules/icons/components/apps/IconParametrage.js";
|
|
86
|
+
import { default as default87 } from "./modules/icons/components/apps/IconParametrages.js";
|
|
87
|
+
import { default as default88 } from "./modules/icons/components/apps/IconParaschool.js";
|
|
88
|
+
import { default as default89 } from "./modules/icons/components/apps/IconParcours.js";
|
|
89
|
+
import { default as default90 } from "./modules/icons/components/apps/IconPearltrees.js";
|
|
90
|
+
import { default as default91 } from "./modules/icons/components/apps/IconPicardieCursus.js";
|
|
91
|
+
import { default as default92 } from "./modules/icons/components/apps/IconPlaceholder.js";
|
|
92
|
+
import { default as default93 } from "./modules/icons/components/apps/IconPoll.js";
|
|
93
|
+
import { default as default94 } from "./modules/icons/components/apps/IconPresences.js";
|
|
94
|
+
import { default as default95 } from "./modules/icons/components/apps/IconProeps.js";
|
|
95
|
+
import { default as default96 } from "./modules/icons/components/apps/IconPronote.js";
|
|
96
|
+
import { default as default97 } from "./modules/icons/components/apps/IconPublic.js";
|
|
97
|
+
import { default as default98 } from "./modules/icons/components/apps/IconQwantJunior.js";
|
|
98
|
+
import { default as default99 } from "./modules/icons/components/apps/IconQwant.js";
|
|
99
|
+
import { default as default100 } from "./modules/icons/components/apps/IconRack.js";
|
|
100
|
+
import { default as default101 } from "./modules/icons/components/apps/IconRbs.js";
|
|
101
|
+
import { default as default102 } from "./modules/icons/components/apps/IconResidenceArtiste.js";
|
|
102
|
+
import { default as default103 } from "./modules/icons/components/apps/IconRessourcesdepartementale91.js";
|
|
103
|
+
import { default as default104 } from "./modules/icons/components/apps/IconSacoche.js";
|
|
104
|
+
import { default as default105 } from "./modules/icons/components/apps/IconSchoolbook.js";
|
|
105
|
+
import { default as default106 } from "./modules/icons/components/apps/IconScolinfo.js";
|
|
106
|
+
import { default as default107 } from "./modules/icons/components/apps/IconScrapbook.js";
|
|
107
|
+
import { default as default108 } from "./modules/icons/components/apps/IconSearchengine.js";
|
|
108
|
+
import { default as default109 } from "./modules/icons/components/apps/IconSettingsClass.js";
|
|
109
|
+
import { default as default110 } from "./modules/icons/components/apps/IconSharebigfiles.js";
|
|
110
|
+
import { default as default111 } from "./modules/icons/components/apps/IconStatistics.js";
|
|
111
|
+
import { default as default112 } from "./modules/icons/components/apps/IconStats.js";
|
|
112
|
+
import { default as default113 } from "./modules/icons/components/apps/IconSuitcase.js";
|
|
113
|
+
import { default as default114 } from "./modules/icons/components/apps/IconSupport.js";
|
|
114
|
+
import { default as default115 } from "./modules/icons/components/apps/IconTimeline.js";
|
|
115
|
+
import { default as default116 } from "./modules/icons/components/apps/IconTimelinegenerator.js";
|
|
116
|
+
import { default as default117 } from "./modules/icons/components/apps/IconTurboself.js";
|
|
117
|
+
import { default as default118 } from "./modules/icons/components/apps/IconUniversalis.js";
|
|
118
|
+
import { default as default119 } from "./modules/icons/components/apps/IconUnstagepourtous.js";
|
|
119
|
+
import { default as default120 } from "./modules/icons/components/apps/IconUserbook.js";
|
|
120
|
+
import { default as default121 } from "./modules/icons/components/apps/IconVideo.js";
|
|
121
|
+
import { default as default122 } from "./modules/icons/components/apps/IconVieScolaire.js";
|
|
122
|
+
import { default as default123 } from "./modules/icons/components/apps/IconVisioconf.js";
|
|
123
|
+
import { default as default124 } from "./modules/icons/components/apps/IconVotil.js";
|
|
124
|
+
import { default as default125 } from "./modules/icons/components/apps/IconWebclasseur.js";
|
|
125
|
+
import { default as default126 } from "./modules/icons/components/apps/IconWebsite.js";
|
|
126
|
+
import { default as default127 } from "./modules/icons/components/apps/IconWiki.js";
|
|
127
|
+
import { default as default128 } from "./modules/icons/components/apps/IconWorkspace.js";
|
|
127
128
|
export {
|
|
128
129
|
default2 as IconAccount,
|
|
129
130
|
default3 as IconActualites,
|
|
@@ -184,71 +185,72 @@ export {
|
|
|
184
185
|
default58 as IconLemonde,
|
|
185
186
|
default59 as IconLesechos,
|
|
186
187
|
default60 as IconLibrary,
|
|
187
|
-
default61 as
|
|
188
|
-
default62 as
|
|
189
|
-
default63 as
|
|
190
|
-
default64 as
|
|
191
|
-
default65 as
|
|
192
|
-
default66 as
|
|
193
|
-
default67 as
|
|
194
|
-
default68 as
|
|
195
|
-
default69 as
|
|
196
|
-
default70 as
|
|
197
|
-
default71 as
|
|
198
|
-
default72 as
|
|
199
|
-
default73 as
|
|
200
|
-
default74 as
|
|
201
|
-
default75 as
|
|
202
|
-
default76 as
|
|
203
|
-
default77 as
|
|
204
|
-
default78 as
|
|
205
|
-
default79 as
|
|
206
|
-
default80 as
|
|
207
|
-
default81 as
|
|
208
|
-
default82 as
|
|
209
|
-
default83 as
|
|
210
|
-
default84 as
|
|
211
|
-
default85 as
|
|
212
|
-
default86 as
|
|
213
|
-
default87 as
|
|
214
|
-
default88 as
|
|
215
|
-
default89 as
|
|
216
|
-
default90 as
|
|
217
|
-
default91 as
|
|
218
|
-
default92 as
|
|
219
|
-
default93 as
|
|
220
|
-
default94 as
|
|
221
|
-
default95 as
|
|
222
|
-
default96 as
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
default100 as
|
|
227
|
-
default101 as
|
|
228
|
-
default102 as
|
|
229
|
-
default103 as
|
|
230
|
-
default104 as
|
|
231
|
-
default105 as
|
|
232
|
-
default106 as
|
|
233
|
-
default107 as
|
|
234
|
-
default108 as
|
|
235
|
-
default109 as
|
|
236
|
-
default110 as
|
|
237
|
-
default111 as
|
|
238
|
-
default112 as
|
|
239
|
-
default113 as
|
|
240
|
-
default114 as
|
|
241
|
-
default115 as
|
|
242
|
-
default116 as
|
|
243
|
-
default117 as
|
|
244
|
-
default118 as
|
|
245
|
-
default119 as
|
|
246
|
-
default120 as
|
|
247
|
-
default121 as
|
|
248
|
-
default122 as
|
|
249
|
-
default123 as
|
|
250
|
-
default124 as
|
|
251
|
-
default125 as
|
|
252
|
-
default126 as
|
|
253
|
-
default127 as
|
|
188
|
+
default61 as IconLivretScolaire,
|
|
189
|
+
default62 as IconLool,
|
|
190
|
+
default63 as IconLsu,
|
|
191
|
+
default64 as IconMadmagz,
|
|
192
|
+
default65 as IconMagneto,
|
|
193
|
+
default66 as IconMatholycee,
|
|
194
|
+
default67 as IconMaxicours,
|
|
195
|
+
default68 as IconMediacentre,
|
|
196
|
+
default69 as IconMindmap,
|
|
197
|
+
default70 as IconMinetest,
|
|
198
|
+
default71 as IconMinibadge,
|
|
199
|
+
default72 as IconMonorientationenligne,
|
|
200
|
+
default73 as IconMonstageenligne,
|
|
201
|
+
default74 as IconMoodle,
|
|
202
|
+
default75 as IconMuseefrancaisphoto,
|
|
203
|
+
default76 as IconMyNetwork,
|
|
204
|
+
default77 as IconNabook,
|
|
205
|
+
default78 as IconNetvibes,
|
|
206
|
+
default79 as IconNote,
|
|
207
|
+
default80 as IconNotebook,
|
|
208
|
+
default81 as IconNotes,
|
|
209
|
+
default82 as IconOnisep,
|
|
210
|
+
default83 as IconOnisep2,
|
|
211
|
+
default84 as IconPad,
|
|
212
|
+
default85 as IconPages,
|
|
213
|
+
default86 as IconParametrage,
|
|
214
|
+
default87 as IconParametrages,
|
|
215
|
+
default88 as IconParaschool,
|
|
216
|
+
default89 as IconParcours,
|
|
217
|
+
default90 as IconPearltrees,
|
|
218
|
+
default91 as IconPicardieCursus,
|
|
219
|
+
default92 as IconPlaceholder,
|
|
220
|
+
default93 as IconPoll,
|
|
221
|
+
default94 as IconPresences,
|
|
222
|
+
default95 as IconProeps,
|
|
223
|
+
default96 as IconPronote,
|
|
224
|
+
default97 as IconPublic,
|
|
225
|
+
default99 as IconQwant,
|
|
226
|
+
default98 as IconQwantJunior,
|
|
227
|
+
default100 as IconRack,
|
|
228
|
+
default101 as IconRbs,
|
|
229
|
+
default102 as IconResidenceArtiste,
|
|
230
|
+
default103 as IconRessourcesdepartementale91,
|
|
231
|
+
default104 as IconSacoche,
|
|
232
|
+
default105 as IconSchoolbook,
|
|
233
|
+
default106 as IconScolinfo,
|
|
234
|
+
default107 as IconScrapbook,
|
|
235
|
+
default108 as IconSearchengine,
|
|
236
|
+
default109 as IconSettingsClass,
|
|
237
|
+
default110 as IconSharebigfiles,
|
|
238
|
+
default111 as IconStatistics,
|
|
239
|
+
default112 as IconStats,
|
|
240
|
+
default113 as IconSuitcase,
|
|
241
|
+
default114 as IconSupport,
|
|
242
|
+
default115 as IconTimeline,
|
|
243
|
+
default116 as IconTimelinegenerator,
|
|
244
|
+
default117 as IconTurboself,
|
|
245
|
+
default118 as IconUniversalis,
|
|
246
|
+
default119 as IconUnstagepourtous,
|
|
247
|
+
default120 as IconUserbook,
|
|
248
|
+
default121 as IconVideo,
|
|
249
|
+
default122 as IconVieScolaire,
|
|
250
|
+
default123 as IconVisioconf,
|
|
251
|
+
default124 as IconVotil,
|
|
252
|
+
default125 as IconWebclasseur,
|
|
253
|
+
default126 as IconWebsite,
|
|
254
|
+
default127 as IconWiki,
|
|
255
|
+
default128 as IconWorkspace
|
|
254
256
|
};
|
package/dist/index.js
CHANGED
|
@@ -126,7 +126,6 @@ import { Layout } from "./components/Layout/Layout.js";
|
|
|
126
126
|
import { List } from "./components/List/List.js";
|
|
127
127
|
import { Menu } from "./components/Menu/components/Menu.js";
|
|
128
128
|
import { MockedProvider } from "./providers/MockedProvider/MockedProvider.js";
|
|
129
|
-
import { Pagination } from "./components/Pagination/Pagination.js";
|
|
130
129
|
import { Popover, PopoverBody, PopoverFooter, PopoverHeader } from "./components/Popover/Popover.js";
|
|
131
130
|
import { ResourceModal } from "./modules/modals/ResourceModal/ResourceModal.js";
|
|
132
131
|
import { Tabs } from "./components/Tabs/components/Tabs.js";
|
|
@@ -211,7 +210,6 @@ export {
|
|
|
211
210
|
MockedProvider,
|
|
212
211
|
default43 as Modal,
|
|
213
212
|
default44 as OnboardingModal,
|
|
214
|
-
Pagination,
|
|
215
213
|
Popover,
|
|
216
214
|
PopoverBody,
|
|
217
215
|
PopoverFooter,
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SVGProps } from 'react';
|
|
2
|
+
interface SVGRProps {
|
|
3
|
+
title?: string;
|
|
4
|
+
titleId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare const SvgIconLivretScolaire: ({ title, titleId, ...props }: SVGProps<SVGSVGElement> & SVGRProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default SvgIconLivretScolaire;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
+
const SvgIconLivretScolaire = ({
|
|
3
|
+
title,
|
|
4
|
+
titleId,
|
|
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: [
|
|
7
|
+
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "#000", d: "M19.503 30.62a1.76 1.76 0 0 0-2.489-.035l-1.979 1.926-1.926-1.979a1.76 1.76 0 0 0-2.489-.035 1.763 1.763 0 0 0-.035 2.49l1.926 1.978-1.979 1.926a1.763 1.763 0 0 0-.035 2.489c.343.356.805.532 1.262.532a1.74 1.74 0 0 0 1.227-.497l1.979-1.926 1.926 1.979c.343.356.805.532 1.262.532a1.74 1.74 0 0 0 1.227-.497c.695-.677.712-1.79.035-2.489l-1.926-1.979 1.979-1.926c.695-.677.712-1.79.035-2.489M30.497 19.38c.343.356.805.532 1.262.532a1.74 1.74 0 0 0 1.227-.497l1.979-1.926 1.926 1.979c.343.356.805.532 1.262.532a1.74 1.74 0 0 0 1.227-.497c.695-.677.712-1.79.035-2.489l-1.926-1.979 1.979-1.926c.694-.677.712-1.79.035-2.489a1.76 1.76 0 0 0-2.489-.035l-1.979 1.926-1.926-1.979a1.76 1.76 0 0 0-2.489-.035 1.763 1.763 0 0 0-.035 2.49l1.926 1.978-1.979 1.926a1.763 1.763 0 0 0-.035 2.489" }),
|
|
9
|
+
/* @__PURE__ */ jsx("path", { fill: "#000", d: "M44.222 4H5.778C4.796 4 4 4.796 4 5.778v38.444C4 45.204 4.796 46 5.778 46h38.444c.982 0 1.778-.796 1.778-1.778V5.778C46 4.796 45.204 4 44.222 4m-1.778 19.222H26.778V7.556h15.666zM7.556 7.556h15.666v15.666H7.556zm0 19.222h15.666v15.666H7.556zm34.888 15.666H26.778V26.778h15.666z" })
|
|
10
|
+
] });
|
|
11
|
+
export {
|
|
12
|
+
SvgIconLivretScolaire as default
|
|
13
|
+
};
|
|
@@ -57,6 +57,7 @@ export { default as IconLeSiteTv } from './IconLeSiteTv';
|
|
|
57
57
|
export { default as IconLemonde } from './IconLemonde';
|
|
58
58
|
export { default as IconLesechos } from './IconLesechos';
|
|
59
59
|
export { default as IconLibrary } from './IconLibrary';
|
|
60
|
+
export { default as IconLivretScolaire } from './IconLivretScolaire';
|
|
60
61
|
export { default as IconLool } from './IconLool';
|
|
61
62
|
export { default as IconLsu } from './IconLsu';
|
|
62
63
|
export { default as IconMadmagz } from './IconMadmagz';
|
|
@@ -5,7 +5,7 @@ const SvgIconCommunities = ({
|
|
|
5
5
|
...props
|
|
6
6
|
}) => /* @__PURE__ */ jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 50 50", "aria-hidden": "true", "aria-labelledby": titleId, ...props, children: [
|
|
7
7
|
title ? /* @__PURE__ */ jsx("title", { id: titleId, children: title }) : null,
|
|
8
|
-
/* @__PURE__ */ jsx("path", { d: "M25.807 33.165c4.726.17 8 3.997 8 8.5 0 .984-.795 1.775-1.775 1.775H18.977a1.774 1.774 0 0 1-1.776-1.775v-.201h-.004a8.303 8.303 0 0 1 8.61-8.299M8.61 24.451c4.726.17 8.001 3.997 8.001 8.5 0 .984-.796 1.776-1.775 1.776H1.776A1.774 1.774 0 0 1 0 32.95v-.201a8.303 8.303 0 0 1 8.61-8.299M41.61 24.006c4.499.162 8.001 3.996 8.001 8.5 0 .984-.796 1.775-1.775 1.775H34.779a1.774 1.774 0 0 1-1.775-1.775v-.201H33a8.303 8.303 0 0 1 8.61-8.3M25.142 20a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285M8.308 11.627a5.141 5.141 0 1 1 0 10.282 5.141 5.141 0 0 1 0-10.282M41.691 11.627a5.142 5.142 0 1 1 .001 10.284 5.142 5.142 0 0 1 0-10.284M24.997 5.557a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285" })
|
|
8
|
+
/* @__PURE__ */ jsx("path", { fill: "currentColor", d: "M25.807 33.165c4.726.17 8 3.997 8 8.5 0 .984-.795 1.775-1.775 1.775H18.977a1.774 1.774 0 0 1-1.776-1.775v-.201h-.004a8.303 8.303 0 0 1 8.61-8.299M8.61 24.451c4.726.17 8.001 3.997 8.001 8.5 0 .984-.796 1.776-1.775 1.776H1.776A1.774 1.774 0 0 1 0 32.95v-.201a8.303 8.303 0 0 1 8.61-8.299M41.61 24.006c4.499.162 8.001 3.996 8.001 8.5 0 .984-.796 1.775-1.775 1.775H34.779a1.774 1.774 0 0 1-1.775-1.775v-.201H33a8.303 8.303 0 0 1 8.61-8.3M25.142 20a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285M8.308 11.627a5.141 5.141 0 1 1 0 10.282 5.141 5.141 0 0 1 0-10.282M41.691 11.627a5.142 5.142 0 1 1 .001 10.284 5.142 5.142 0 0 1 0-10.284M24.997 5.557a5.143 5.143 0 1 1 0 10.285 5.143 5.143 0 0 1 0-10.285" })
|
|
9
9
|
] });
|
|
10
10
|
export {
|
|
11
11
|
SvgIconCommunities as default
|
|
@@ -15,16 +15,14 @@ function drawBlurListener(application, {
|
|
|
15
15
|
const child = application.stage.getChildByName(spriteName), scale = getApplicationScale(application);
|
|
16
16
|
if (child == null) return;
|
|
17
17
|
const newSprite = new PIXI.Sprite(child.texture);
|
|
18
|
-
newSprite.filters = [
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
Math.min(scale, 1)
|
|
25
|
-
)
|
|
18
|
+
newSprite.filters = [new PIXI.BlurFilter(
|
|
19
|
+
8,
|
|
20
|
+
// PIXI Default value for strength of the blur effect
|
|
21
|
+
4,
|
|
22
|
+
// Quality of the blur effect depending on the scale (4 is the PIXI default value)
|
|
23
|
+
Math.min(scale, 1)
|
|
26
24
|
// Resolution of the blur effect depending on the scale
|
|
27
|
-
], newSprite.width = child.width, newSprite.height = child.height, newSprite.scale = new PIXI.Point(1, 1), newSprite.anchor = child.anchor, newSprite.mask = drawBrush(points, scale), child.addChild(newSprite);
|
|
25
|
+
)], newSprite.width = child.width, newSprite.height = child.height, newSprite.scale = new PIXI.Point(1, 1), newSprite.anchor = child.anchor, newSprite.mask = drawBrush(points, scale), child.addChild(newSprite);
|
|
28
26
|
});
|
|
29
27
|
}
|
|
30
28
|
function drawCursor(application) {
|
|
@@ -36,6 +36,12 @@ export interface InternalLinkerProps {
|
|
|
36
36
|
disableApplicationSelector?: boolean;
|
|
37
37
|
/** Optional callback to filter resources after loading. Applied in addition to search filters. */
|
|
38
38
|
resourceFilter?: (resource: ILinkedResource) => boolean;
|
|
39
|
+
/** When true, a "load more" button is shown. The caller controls this flag. */
|
|
40
|
+
hasMoreResources?: boolean;
|
|
41
|
+
/** Called when the user clicks the "load more" button. */
|
|
42
|
+
onLoadMore?: () => void;
|
|
43
|
+
/** Label for the "load more" button. Defaults to the `bbm.linker.see.more` i18n key. */
|
|
44
|
+
loadMoreLabel?: string;
|
|
39
45
|
}
|
|
40
|
-
export declare const InternalLinker: ({ appCode, defaultAppCode, defaultResourceId, onChange, onSelect, multiple, resourceList, applicationList, showApplicationSelector, disableApplicationSelector, resourceFilter, }: InternalLinkerProps) => import("react/jsx-runtime").JSX.Element;
|
|
46
|
+
export declare const InternalLinker: ({ appCode, defaultAppCode, defaultResourceId, onChange, onSelect, multiple, resourceList, applicationList, showApplicationSelector, disableApplicationSelector, resourceFilter, hasMoreResources, onLoadMore, loadMoreLabel, }: InternalLinkerProps) => import("react/jsx-runtime").JSX.Element;
|
|
41
47
|
export default InternalLinker;
|
|
@@ -10,6 +10,7 @@ import { useResourceSearch } from "../../../../hooks/useResourceSearch/useResour
|
|
|
10
10
|
import AppIcon from "../../../../components/AppIcon/AppIcon.js";
|
|
11
11
|
import Dropdown from "../../../../components/Dropdown/Dropdown.js";
|
|
12
12
|
import SearchBar from "../../../../components/SearchBar/SearchBar.js";
|
|
13
|
+
import Button from "../../../../components/Button/Button.js";
|
|
13
14
|
import EmptyScreen from "../../../../components/EmptyScreen/EmptyScreen.js";
|
|
14
15
|
import { emptyScreenMapping } from "../../../../utilities/emptyscreen-mapping/emptyscreen-mapping.js";
|
|
15
16
|
const InternalLinker = ({
|
|
@@ -23,7 +24,10 @@ const InternalLinker = ({
|
|
|
23
24
|
applicationList,
|
|
24
25
|
showApplicationSelector = !0,
|
|
25
26
|
disableApplicationSelector = !1,
|
|
26
|
-
resourceFilter
|
|
27
|
+
resourceFilter,
|
|
28
|
+
hasMoreResources,
|
|
29
|
+
onLoadMore,
|
|
30
|
+
loadMoreLabel
|
|
27
31
|
}) => {
|
|
28
32
|
const {
|
|
29
33
|
t
|
|
@@ -121,10 +125,13 @@ const InternalLinker = ({
|
|
|
121
125
|
/* @__PURE__ */ jsx("div", { className: "flex-grow-1 align-self-center", children: /* @__PURE__ */ jsx("form", { className: "gap-16 d-flex w-100 align-items-center px-16 py-8", onSubmit: handleSubmit, children: /* @__PURE__ */ jsx(SearchBar, { isVariant: !0, placeholder: t("search"), size: "lg", className: "w-100", disabled: !selectedApplication, onChange: handleSearchChange }) }) })
|
|
122
126
|
] }),
|
|
123
127
|
/* @__PURE__ */ jsxs("div", { className: "internal-linker flex-grow-1 w-100 rounded-bottom border gap-0 overflow-auto", children: [
|
|
124
|
-
selectedApplication && resources && resources.length > 0 && /* @__PURE__ */
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
+
selectedApplication && resources && resources.length > 0 && /* @__PURE__ */ jsxs("div", { children: [
|
|
129
|
+
resources.map((resource) => {
|
|
130
|
+
const isSelected = selectedDocuments.findIndex((doc) => doc.assetId === resource.assetId) >= 0;
|
|
131
|
+
return /* @__PURE__ */ jsx(LinkerCard, { doc: resource, isSelected, onClick: () => toggleResourceSelection(resource) }, resource.path);
|
|
132
|
+
}),
|
|
133
|
+
hasMoreResources && /* @__PURE__ */ jsx("div", { className: "d-grid gap-2 col-4 mx-auto my-24", children: /* @__PURE__ */ jsx(Button, { type: "button", color: "secondary", variant: "filled", onClick: onLoadMore, children: loadMoreLabel ?? t("bbm.linker.see.more") }) })
|
|
134
|
+
] }),
|
|
128
135
|
selectedApplication && resources && resources.length <= 0 && /* @__PURE__ */ jsx("div", { className: "d-flex justify-content-center mt-16", children: /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: emptyScreenMapping[(theme == null ? void 0 : theme.bootstrapVersion) ?? "one"][selectedApplication == null ? void 0 : selectedApplication.application], text: t("bbm.linker.int.notfound"), className: "mt-16" }) }),
|
|
129
136
|
!selectedApplication && /* @__PURE__ */ jsx("div", { className: "d-flex justify-content-center mt-32", children: /* @__PURE__ */ jsx(EmptyScreen, { imageSrc: emptyScreenMapping[(theme == null ? void 0 : theme.bootstrapVersion) ?? "one"].empty, text: t("bbm.linker.int.empty"), className: "mt-32" }) })
|
|
130
137
|
] })
|
|
@@ -1,10 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ILinkedResource } from '@edifice.io/client';
|
|
2
2
|
import { CardProps } from '../../../components';
|
|
3
|
+
/** Augments ILinkedResource with an optional pre-computed date string. */
|
|
4
|
+
export interface ILinkedResourceWithDate extends ILinkedResource {
|
|
5
|
+
/** When provided, displayed as-is instead of computing fromNow(modifiedAt). */
|
|
6
|
+
fromDate?: string;
|
|
7
|
+
}
|
|
3
8
|
export interface LinkerCardProps extends CardProps {
|
|
4
|
-
/**
|
|
5
|
-
|
|
6
|
-
* */
|
|
7
|
-
doc: IResource;
|
|
9
|
+
/** Resource to render as a card */
|
|
10
|
+
doc: ILinkedResourceWithDate;
|
|
8
11
|
}
|
|
9
12
|
declare const LinkerCard: {
|
|
10
13
|
({ doc, isClickable, isSelectable, isSelected, onClick, className, }: LinkerCardProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -16,11 +16,7 @@ const LinkerCard = ({
|
|
|
16
16
|
}) => {
|
|
17
17
|
const {
|
|
18
18
|
fromNow
|
|
19
|
-
} = useDate(),
|
|
20
|
-
fromDate
|
|
21
|
-
} = useMemo(() => ({
|
|
22
|
-
fromDate: fromNow(doc.modifiedAt)
|
|
23
|
-
}), [fromNow, doc]);
|
|
19
|
+
} = useDate(), displayDate = useMemo(() => doc.fromDate ?? fromNow(doc.modifiedAt), [doc.fromDate, doc.modifiedAt, fromNow]);
|
|
24
20
|
return /* @__PURE__ */ jsx(Card, { className: clsx("card-linker shadow-none", className), isClickable, isSelectable, isSelected, onClick, children: /* @__PURE__ */ jsxs(Card.Body, { space: "8", children: [
|
|
25
21
|
/* @__PURE__ */ jsx("div", { className: "card-image ps-8 pe-4", children: doc.thumbnail && doc.thumbnail.length > 0 ? /* @__PURE__ */ jsx(Image, { alt: "", height: 48, width: 48, src: doc.thumbnail, objectFit: "cover", className: "rounded h-full", style: {
|
|
26
22
|
aspectRatio: 1 / 1
|
|
@@ -29,7 +25,7 @@ const LinkerCard = ({
|
|
|
29
25
|
/* @__PURE__ */ jsx(Card.Text, { children: doc.name }),
|
|
30
26
|
/* @__PURE__ */ jsx(Card.Text, { className: "text-black-50", children: doc == null ? void 0 : doc.creatorName })
|
|
31
27
|
] }),
|
|
32
|
-
/* @__PURE__ */ jsx("div", { className: "d-none d-md-block text-black-50 ps-4 pe-8", children: /* @__PURE__ */ jsx(Card.Text, { children:
|
|
28
|
+
/* @__PURE__ */ jsx("div", { className: "d-none d-md-block text-black-50 ps-4 pe-8", children: /* @__PURE__ */ jsx(Card.Text, { children: displayDate }) }),
|
|
33
29
|
doc.shared && /* @__PURE__ */ jsx("div", { className: "ps-4 pe-8", children: /* @__PURE__ */ jsx(SvgIconUsers, { width: "20", height: "20" }) })
|
|
34
30
|
] }) });
|
|
35
31
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __module as isSameOrAfter$1 } from "../../../../../../_virtual/isSameOrAfter.js";
|
|
3
|
-
(function(module, exports
|
|
3
|
+
(function(module, exports) {
|
|
4
4
|
(function(e, t) {
|
|
5
5
|
module.exports = t();
|
|
6
6
|
})(commonjsGlobal, function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __module as isToday$1 } from "../../../../../../_virtual/isToday.js";
|
|
3
|
-
(function(module, exports
|
|
3
|
+
(function(module, exports) {
|
|
4
4
|
(function(e, o) {
|
|
5
5
|
module.exports = o();
|
|
6
6
|
})(commonjsGlobal, function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __module as localeData$1 } from "../../../../../../_virtual/localeData.js";
|
|
3
|
-
(function(module, exports
|
|
3
|
+
(function(module, exports) {
|
|
4
4
|
(function(n, e) {
|
|
5
5
|
module.exports = e();
|
|
6
6
|
})(commonjsGlobal, function() {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { commonjsGlobal, getDefaultExportFromCjs } from "../../../../../../_virtual/_commonjsHelpers.js";
|
|
2
2
|
import { __module as weekday$1 } from "../../../../../../_virtual/weekday.js";
|
|
3
|
-
(function(module, exports
|
|
3
|
+
(function(module, exports) {
|
|
4
4
|
(function(e, t) {
|
|
5
5
|
module.exports = t();
|
|
6
6
|
})(commonjsGlobal, function() {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@edifice.io/react",
|
|
3
|
-
"version": "2.5.16-develop-
|
|
3
|
+
"version": "2.5.16-develop-pedago.20260506110000",
|
|
4
4
|
"description": "Edifice React Library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -135,9 +135,9 @@
|
|
|
135
135
|
"swiper": "^10.1.0",
|
|
136
136
|
"ua-parser-js": "^1.0.36",
|
|
137
137
|
"react-pdf": "10.2.0",
|
|
138
|
-
"@edifice.io/bootstrap": "2.5.16-develop-
|
|
139
|
-
"@edifice.io/tiptap-extensions": "2.5.16-develop-
|
|
140
|
-
"@edifice.io/utilities": "2.5.16-develop-
|
|
138
|
+
"@edifice.io/bootstrap": "2.5.16-develop-pedago.20260506110000",
|
|
139
|
+
"@edifice.io/tiptap-extensions": "2.5.16-develop-pedago.20260506110000",
|
|
140
|
+
"@edifice.io/utilities": "2.5.16-develop-pedago.20260506110000"
|
|
141
141
|
},
|
|
142
142
|
"devDependencies": {
|
|
143
143
|
"@babel/plugin-transform-react-pure-annotations": "^7.23.3",
|
|
@@ -168,8 +168,8 @@
|
|
|
168
168
|
"vite": "^5.4.11",
|
|
169
169
|
"vite-plugin-dts": "^4.1.0",
|
|
170
170
|
"vite-tsconfig-paths": "^5.0.1",
|
|
171
|
-
"@edifice.io/client": "2.5.16-develop-
|
|
172
|
-
"@edifice.io/config": "2.5.16-develop-
|
|
171
|
+
"@edifice.io/client": "2.5.16-develop-pedago.20260506110000",
|
|
172
|
+
"@edifice.io/config": "2.5.16-develop-pedago.20260506110000"
|
|
173
173
|
},
|
|
174
174
|
"peerDependencies": {
|
|
175
175
|
"@react-spring/web": "^9.7.5",
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
interface DropdownItemHiddenProps {
|
|
3
|
-
children: ReactNode;
|
|
4
|
-
/**
|
|
5
|
-
* When true, collapses height to 0 while keeping the item in the flow.
|
|
6
|
-
* Use this when the container width must stay stable during search filtering.
|
|
7
|
-
* Defaults to false (display: none).
|
|
8
|
-
*/
|
|
9
|
-
collapse?: boolean;
|
|
10
|
-
}
|
|
11
|
-
declare const DropdownItemHidden: ({ children, collapse, }: DropdownItemHiddenProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
-
export default DropdownItemHidden;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
const DropdownItemHidden = ({
|
|
3
|
-
children,
|
|
4
|
-
collapse
|
|
5
|
-
}) => /* @__PURE__ */ jsx("div", { "aria-hidden": "true", style: collapse ? {
|
|
6
|
-
height: 0,
|
|
7
|
-
overflow: "hidden",
|
|
8
|
-
margin: 0,
|
|
9
|
-
pointerEvents: "none",
|
|
10
|
-
width: "100%",
|
|
11
|
-
maxWidth: "max-content"
|
|
12
|
-
} : {
|
|
13
|
-
display: "none",
|
|
14
|
-
width: "100%",
|
|
15
|
-
maxWidth: "max-content"
|
|
16
|
-
}, children });
|
|
17
|
-
export {
|
|
18
|
-
DropdownItemHidden as default
|
|
19
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
export interface DropdownSearchInputProps {
|
|
2
|
-
/**
|
|
3
|
-
* Placeholder text for the search input
|
|
4
|
-
*/
|
|
5
|
-
placeholder?: string;
|
|
6
|
-
/**
|
|
7
|
-
* Label shown when no items match the search query
|
|
8
|
-
*/
|
|
9
|
-
noResultsLabel?: string;
|
|
10
|
-
/**
|
|
11
|
-
* Called whenever the search query changes.
|
|
12
|
-
* Useful to track the current query outside the Dropdown context.
|
|
13
|
-
*/
|
|
14
|
-
onSearch?: (query: string) => void;
|
|
15
|
-
}
|
|
16
|
-
declare const DropdownSearchInput: {
|
|
17
|
-
({ placeholder, noResultsLabel, onSearch, }: DropdownSearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
displayName: string;
|
|
19
|
-
};
|
|
20
|
-
export default DropdownSearchInput;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { useDropdownContext } from "./DropdownContext.js";
|
|
3
|
-
import SearchBar from "../SearchBar/SearchBar.js";
|
|
4
|
-
const DropdownSearchInput = ({
|
|
5
|
-
placeholder = "Rechercher...",
|
|
6
|
-
noResultsLabel = "Pas de résultat",
|
|
7
|
-
onSearch
|
|
8
|
-
}) => {
|
|
9
|
-
const {
|
|
10
|
-
searchQuery,
|
|
11
|
-
setSearchQuery,
|
|
12
|
-
hasMatches
|
|
13
|
-
} = useDropdownContext();
|
|
14
|
-
return /* @__PURE__ */ jsxs("div", { className: "px-8 pb-8", children: [
|
|
15
|
-
/* @__PURE__ */ jsx(SearchBar, { isVariant: !0, clearable: !0, size: "md", placeholder, value: searchQuery, onChange: (e) => {
|
|
16
|
-
setSearchQuery(e.target.value), onSearch == null || onSearch(e.target.value);
|
|
17
|
-
}, onKeyDown: (e) => {
|
|
18
|
-
["ArrowUp", "ArrowDown", "Enter", " "].includes(e.key) && e.stopPropagation();
|
|
19
|
-
} }),
|
|
20
|
-
searchQuery && !hasMatches && /* @__PURE__ */ jsx("p", { className: "body-2 text-gray-700 text-center mt-8 mb-0", children: noResultsLabel })
|
|
21
|
-
] });
|
|
22
|
-
};
|
|
23
|
-
export {
|
|
24
|
-
DropdownSearchInput as default
|
|
25
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared filtering logic for Dropdown item components.
|
|
3
|
-
* Computes whether the item is hidden by the current search query,
|
|
4
|
-
* and keeps the match registry in sync via reportMatch/unregisterMatch.
|
|
5
|
-
*
|
|
6
|
-
* @returns `id` – stable element id to spread on the DOM node and itemRefs
|
|
7
|
-
* @returns `isFiltered` – true when the item should be hidden
|
|
8
|
-
*/
|
|
9
|
-
export declare const useDropdownItemFilter: (searchValue: string | undefined) => {
|
|
10
|
-
id: string;
|
|
11
|
-
isFiltered: boolean;
|
|
12
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { useId, useLayoutEffect } from "react";
|
|
2
|
-
import { useDropdownContext } from "./DropdownContext.js";
|
|
3
|
-
const useDropdownItemFilter = (searchValue) => {
|
|
4
|
-
const {
|
|
5
|
-
searchQuery,
|
|
6
|
-
reportMatch,
|
|
7
|
-
unregisterMatch
|
|
8
|
-
} = useDropdownContext(), id = useId(), isFiltered = searchValue !== void 0 && searchQuery !== "" && !searchValue.toLowerCase().includes(searchQuery.toLowerCase());
|
|
9
|
-
return useLayoutEffect(() => {
|
|
10
|
-
if (searchValue !== void 0)
|
|
11
|
-
return reportMatch(id, !isFiltered), () => unregisterMatch(id);
|
|
12
|
-
}, [id, isFiltered, searchValue, reportMatch, unregisterMatch]), {
|
|
13
|
-
id,
|
|
14
|
-
isFiltered
|
|
15
|
-
};
|
|
16
|
-
};
|
|
17
|
-
export {
|
|
18
|
-
useDropdownItemFilter
|
|
19
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export interface PaginationProps {
|
|
2
|
-
/** Current page (1-based) */
|
|
3
|
-
current: number;
|
|
4
|
-
/** Total number of items */
|
|
5
|
-
total: number;
|
|
6
|
-
/** Number of items per page */
|
|
7
|
-
pageSize: number;
|
|
8
|
-
/** Called when the page changes */
|
|
9
|
-
onChange: (page: number) => void;
|
|
10
|
-
/** Optional class for styling purpose */
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
/**
|
|
14
|
-
* Pagination component for navigating through pages of results.
|
|
15
|
-
* Wraps antd Pagination with a simplified, stable API.
|
|
16
|
-
*/
|
|
17
|
-
export declare function Pagination({ current, total, pageSize, onChange, className, }: PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Pagination as Pagination$1 } from "antd";
|
|
3
|
-
function Pagination({
|
|
4
|
-
current,
|
|
5
|
-
total,
|
|
6
|
-
pageSize,
|
|
7
|
-
onChange,
|
|
8
|
-
className
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ jsx(Pagination$1, { align: "center", showSizeChanger: !1, current, total, pageSize, onChange, className });
|
|
11
|
-
}
|
|
12
|
-
export {
|
|
13
|
-
Pagination
|
|
14
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './Pagination';
|