@edifice.io/react 2.5.9-develop-b2school.20260212120233 → 2.5.9-develop-enabling.20260212131111
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_virtual/common.js +4 -0
- package/dist/_virtual/de_DE.js +4 -0
- package/dist/_virtual/de_DE2.js +4 -0
- package/dist/_virtual/de_DE3.js +4 -0
- package/dist/_virtual/de_DE4.js +4 -0
- package/dist/_virtual/de_DE5.js +4 -0
- package/dist/_virtual/de_DE6.js +4 -0
- package/dist/_virtual/defineProperty.js +4 -0
- package/dist/_virtual/es_ES.js +4 -0
- package/dist/_virtual/es_ES2.js +4 -0
- package/dist/_virtual/es_ES3.js +4 -0
- package/dist/_virtual/es_ES4.js +4 -0
- package/dist/_virtual/es_ES5.js +4 -0
- package/dist/_virtual/es_ES6.js +4 -0
- package/dist/_virtual/fr_FR.js +4 -0
- package/dist/_virtual/fr_FR2.js +4 -0
- package/dist/_virtual/fr_FR3.js +4 -0
- package/dist/_virtual/fr_FR4.js +4 -0
- package/dist/_virtual/fr_FR5.js +4 -0
- package/dist/_virtual/fr_FR6.js +4 -0
- package/dist/_virtual/interopRequireDefault.js +4 -0
- package/dist/_virtual/it_IT.js +4 -0
- package/dist/_virtual/it_IT2.js +4 -0
- package/dist/_virtual/it_IT3.js +4 -0
- package/dist/_virtual/it_IT4.js +4 -0
- package/dist/_virtual/it_IT5.js +4 -0
- package/dist/_virtual/it_IT6.js +4 -0
- package/dist/_virtual/objectSpread2.js +4 -0
- package/dist/_virtual/pt_PT.js +4 -0
- package/dist/_virtual/pt_PT2.js +4 -0
- package/dist/_virtual/pt_PT3.js +4 -0
- package/dist/_virtual/pt_PT4.js +4 -0
- package/dist/_virtual/pt_PT5.js +4 -0
- package/dist/_virtual/pt_PT6.js +4 -0
- package/dist/_virtual/toPrimitive.js +4 -0
- package/dist/_virtual/toPropertyKey.js +4 -0
- package/dist/_virtual/typeof.js +4 -0
- package/dist/components/Badge/Badge.js +0 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Combobox/Combobox.js +1 -1
- package/dist/components/Dropdown/Dropdown.js +1 -1
- package/dist/components/Form/FormControl.js +1 -1
- package/dist/components/Layout/components/WidgetApps.js +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/PreventPropagation/PreventPropagation.js +1 -1
- package/dist/components/PromotionCard/PromotionCard.js +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +2 -2
- package/dist/components/Table/components/Table.js +1 -1
- package/dist/hooks/useDropdown/useDropdown.js +2 -0
- package/dist/hooks/useThumbnail/useThumbnail.d.ts +1 -1
- package/dist/hooks/useThumbnail/useThumbnail.js +5 -1
- package/dist/hooks/useUpload/useUpload.js +2 -5
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.d.ts +12 -0
- package/dist/hooks/useWorkspaceFolders/useWorkspaceFolders.js +1 -1
- package/dist/modules/editor/components/Editor/EditorPreview.js +1 -1
- package/dist/modules/modals/ShareModal/ShareResources.d.ts +3 -52
- package/dist/modules/modals/ShareModal/hooks/useShareBookmark.js +2 -1
- package/dist/modules/multimedia/MediaLibrary/MediaLibrary.js +1 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/defineProperty.js +18 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/interopRequireDefault.js +13 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/objectSpread2.js +31 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/toPrimitive.js +20 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/toPropertyKey.js +15 -0
- package/dist/node_modules/.pnpm/@babel_runtime@7.28.6/node_modules/@babel/runtime/helpers/typeof.js +16 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/de_DE.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/es_ES.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/fr_FR.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/it_IT.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/calendar/locale/pt_PT.js +11 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/de_DE.js +22 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/es_ES.js +22 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/fr_FR.js +27 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/it_IT.js +20 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/date-picker/locale/pt_PT.js +45 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/de_DE.js +145 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/es_ES.js +145 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/fr_FR.js +144 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/it_IT.js +156 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/locale/pt_PT.js +158 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/de_DE.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/es_ES.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/fr_FR.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/it_IT.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/lib/time-picker/locale/pt_PT.js +10 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/de_DE.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/es_ES.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/fr_FR.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/it_IT.js +8 -0
- package/dist/node_modules/.pnpm/antd@5.29.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/antd/locale/pt_PT.js +8 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/de_DE.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/es_ES.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/fr_FR.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/it_IT.js +21 -0
- package/dist/node_modules/.pnpm/rc-pagination@5.1.0_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-pagination/lib/locale/pt_PT.js +21 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/common.js +14 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/de_DE.js +37 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/es_ES.js +37 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/fr_FR.js +38 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/it_IT.js +37 -0
- package/dist/node_modules/.pnpm/rc-picker@4.11.3_dayjs@1.11.19_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/rc-picker/lib/locale/pt_PT.js +39 -0
- package/dist/providers/AntThemeProvider/AntProvider.js +5 -5
- package/package.json +50 -50
|
@@ -21,7 +21,6 @@ const Badge = /* @__PURE__ */ forwardRef(({
|
|
|
21
21
|
const colorAppClassName = getIconClass(variant.app), backgroundLightAppClassName = getBackgroundLightIconClass(variant.app), borderAppClassName = getBorderIconClass(variant.app);
|
|
22
22
|
badgeColorClassName = `${colorAppClassName} ${backgroundLightAppClassName} ${borderAppClassName}`;
|
|
23
23
|
}
|
|
24
|
-
console.log(badgeColorClassName);
|
|
25
24
|
const classes = clsx("badge rounded-pill", (variant.type === "content" || variant.type === "user") && "background" in variant ? "bg-gray-200" : (variant.type === "content" || variant.type === "user") && !("background" in variant) ? "border border-0" : "", variant.type === "content" && `text-${variant.level}`, variant.type === "notification" && `badge-notification bg-${variant.level} text-light border border-0`, variant.type === "user" && `badge-profile-${variant.profile.toLowerCase()}`, variant.type === "link" && "badge-link border border-0", variant.type === "chip" && "bg-gray-200", variant.type === "beta" && badgeColorClassName, className);
|
|
26
25
|
return /* @__PURE__ */ jsxs("span", { ref, className: classes, style: (() => {
|
|
27
26
|
if (variant.type !== "beta") return;
|
|
@@ -39,7 +39,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
39
39
|
/* @__PURE__ */ jsx(Card.Header, {}),
|
|
40
40
|
typeof children == "function" ? children(appCode) : children
|
|
41
41
|
] }) });
|
|
42
|
-
}), Card =
|
|
42
|
+
}), Card = Object.assign(Root, {
|
|
43
43
|
Title: CardTitle,
|
|
44
44
|
Text: CardText,
|
|
45
45
|
Image: CardImage,
|
|
@@ -53,7 +53,7 @@ const ComboboxComponent = /* @__PURE__ */ forwardRef(({
|
|
|
53
53
|
}, value, variant, renderInputGroup, renderSelectedItems, hasDefault: !!options.length, onFocus, onBlur, inputRef }),
|
|
54
54
|
/* @__PURE__ */ jsx(Dropdown.Menu, { "data-testid": "combobox-search-menu", children: renderContent() })
|
|
55
55
|
] });
|
|
56
|
-
}), Combobox =
|
|
56
|
+
}), Combobox = Object.assign(ComboboxComponent, {
|
|
57
57
|
Trigger: ComboboxTrigger
|
|
58
58
|
});
|
|
59
59
|
export {
|
|
@@ -67,7 +67,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
67
67
|
return useEffect(() => {
|
|
68
68
|
onToggle == null || onToggle(visible);
|
|
69
69
|
}, [visible]), /* @__PURE__ */ jsx(DropdownContext.Provider, { value, children: /* @__PURE__ */ jsx("div", { ref, className: dropdown, children: typeof children == "function" ? children(triggerProps, itemRefs, setVisible) : children }) });
|
|
70
|
-
}), Dropdown =
|
|
70
|
+
}), Dropdown = Object.assign(Root, {
|
|
71
71
|
Trigger: DropdownTrigger,
|
|
72
72
|
Menu: DropdownMenu,
|
|
73
73
|
Item: DropdownItem,
|
|
@@ -22,7 +22,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
22
22
|
status
|
|
23
23
|
}), [id, isOptional, isReadOnly, isRequired, status]);
|
|
24
24
|
return /* @__PURE__ */ jsx(Context.Provider, { value: values, children: /* @__PURE__ */ jsx("div", { ref, className, ...restProps, children }) });
|
|
25
|
-
}), FormControl =
|
|
25
|
+
}), FormControl = Object.assign(Root, {
|
|
26
26
|
Label,
|
|
27
27
|
Input,
|
|
28
28
|
Text: FormText
|
|
@@ -14,7 +14,7 @@ const WidgetAppsFooter = () => {
|
|
|
14
14
|
} = useTranslation();
|
|
15
15
|
return /* @__PURE__ */ jsxs("div", { className: "widget-body d-flex flex-wrap", children: [
|
|
16
16
|
!bookmarkedApps.length && /* @__PURE__ */ jsx("div", { className: "text-dark", children: t("navbar.myapps.more") }),
|
|
17
|
-
bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", target: appToOpenOnBlank.includes(app.name) || app.isExternal || app.
|
|
17
|
+
bookmarkedApps.slice(0, 6).map((app, index) => /* @__PURE__ */ jsx("a", { href: app.address, className: "bookmarked-app", target: appToOpenOnBlank.includes(app.name) || app.isExternal || app.target === "_blank" ? "_blank" : void 0, rel: appToOpenOnBlank.includes(app.name) || app.isExternal || app.target === "_blank" ? "noopener noreferrer" : void 0, children: /* @__PURE__ */ jsx(AppIcon, { app, size: "32" }) }, index))
|
|
18
18
|
] });
|
|
19
19
|
};
|
|
20
20
|
export {
|
|
@@ -3,7 +3,7 @@ const Root = ({
|
|
|
3
3
|
children
|
|
4
4
|
}) => /* @__PURE__ */ jsx("div", { onClick: (e) => {
|
|
5
5
|
e.stopPropagation();
|
|
6
|
-
}, children }), PreventPropagation =
|
|
6
|
+
}, children }), PreventPropagation = Object.assign(Root, {});
|
|
7
7
|
export {
|
|
8
8
|
PreventPropagation as default
|
|
9
9
|
};
|
|
@@ -17,7 +17,7 @@ const Root = ({
|
|
|
17
17
|
borderColor,
|
|
18
18
|
backgroundColor
|
|
19
19
|
}, children });
|
|
20
|
-
}, PromotionCard =
|
|
20
|
+
}, PromotionCard = Object.assign(Root, {
|
|
21
21
|
Header: PromotionCardHeader,
|
|
22
22
|
Body: PromotionCardBody,
|
|
23
23
|
Icon: PromotionCardIcon,
|
|
@@ -3,7 +3,7 @@ import { Size } from '../../types';
|
|
|
3
3
|
/**
|
|
4
4
|
* Base props shared by both SearchBar variants
|
|
5
5
|
*/
|
|
6
|
-
|
|
6
|
+
interface BaseProps extends Omit<React.ComponentPropsWithoutRef<'input'>, 'size'> {
|
|
7
7
|
/**
|
|
8
8
|
* String or template literal key for i18next translation
|
|
9
9
|
*/
|
|
@@ -67,7 +67,7 @@ type DynamicSearchBar = {
|
|
|
67
67
|
/**
|
|
68
68
|
* Props for the SearchBar component
|
|
69
69
|
*/
|
|
70
|
-
|
|
70
|
+
type Props = DefaultSearchBar | DynamicSearchBar;
|
|
71
71
|
export type SearchBarProps = BaseProps & Props;
|
|
72
72
|
/**
|
|
73
73
|
* SearchBar component to handle dynamic or static search input
|
|
@@ -13,7 +13,7 @@ const Root = /* @__PURE__ */ forwardRef(({
|
|
|
13
13
|
overflowY: "auto"
|
|
14
14
|
} : {}, children: /* @__PURE__ */ jsx("table", { ref, className: "table align-middle mb-0", style: {
|
|
15
15
|
overflow: maxHeight ? "visible" : "hidden"
|
|
16
|
-
}, children }) })), Table =
|
|
16
|
+
}, children }) })), Table = Object.assign(Root, {
|
|
17
17
|
Thead: TableThead,
|
|
18
18
|
Th: TableTh,
|
|
19
19
|
Tbody: TableTbody,
|
|
@@ -10,5 +10,5 @@ type LazyLoadOptions = {
|
|
|
10
10
|
* with respect to the [`intersectionOptions`](https://github.com/thebuilder/react-intersection-observer/tree/dceba7f52aebea4d62d539bc55a1db129226bb6c?tab=readme-ov-file#options)
|
|
11
11
|
* @return `true` if `src` is available, or false otherwise, or `null` while not tested.
|
|
12
12
|
*/
|
|
13
|
-
export default function useThumbnail(src: string, options?: LazyLoadOptions): boolean | null;
|
|
13
|
+
export default function useThumbnail(src: string | null | undefined, options?: LazyLoadOptions): boolean | null;
|
|
14
14
|
export {};
|
|
@@ -13,6 +13,10 @@ function useThumbnail(src, options) {
|
|
|
13
13
|
(_a = options == null ? void 0 : options.ref) != null && _a.current && (inViewRef == null || inViewRef(options.ref.current));
|
|
14
14
|
}, [options == null ? void 0 : options.ref, inViewRef]), useEffect(() => {
|
|
15
15
|
if ((options == null ? void 0 : options.ref) === void 0 || inView) {
|
|
16
|
+
if (!src) {
|
|
17
|
+
setStatus(!1);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
16
20
|
const img = new Image();
|
|
17
21
|
return img.src = src, img.onload = () => {
|
|
18
22
|
setStatus(!0);
|
|
@@ -22,7 +26,7 @@ function useThumbnail(src, options) {
|
|
|
22
26
|
img.onload = null, img.onerror = null, setStatus(null);
|
|
23
27
|
};
|
|
24
28
|
}
|
|
25
|
-
}, [inView]), status;
|
|
29
|
+
}, [inView, src]), status;
|
|
26
30
|
}
|
|
27
31
|
export {
|
|
28
32
|
useThumbnail as default
|
|
@@ -87,11 +87,8 @@ const useUpload = (visibility, application = "media-library") => {
|
|
|
87
87
|
children: [],
|
|
88
88
|
created: /* @__PURE__ */ new Date(),
|
|
89
89
|
_shared: [],
|
|
90
|
-
|
|
91
|
-
owner:
|
|
92
|
-
userId: "",
|
|
93
|
-
displayName: ""
|
|
94
|
-
}
|
|
90
|
+
isShared: !1,
|
|
91
|
+
owner: ""
|
|
95
92
|
};
|
|
96
93
|
throw uploadResponse.state === "error" ? new Error(uploadResponse.code || "Error while uploading video") : new Error("Video encoding is still running");
|
|
97
94
|
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WorkspaceElement } from '@edifice.io/client';
|
|
2
|
+
export interface CreateFolderParams {
|
|
3
|
+
folderName: string;
|
|
4
|
+
folderParentId?: string;
|
|
5
|
+
}
|
|
6
|
+
declare function useWorkspaceFolders(): {
|
|
7
|
+
folders: WorkspaceElement[];
|
|
8
|
+
createFolderMutation: import('../../node_modules/@tanstack/react-query').UseMutationResult<any, Error, CreateFolderParams, unknown>;
|
|
9
|
+
canCopyFileIntoFolder: (folderId: string) => boolean;
|
|
10
|
+
isLoading: boolean;
|
|
11
|
+
};
|
|
12
|
+
export default useWorkspaceFolders;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { odeServices } from "@edifice.io/client";
|
|
2
2
|
import { useQueryClient, useQuery, useMutation } from "@tanstack/react-query";
|
|
3
3
|
import { useMemo, useCallback } from "react";
|
|
4
|
-
import { useEdificeClient } from "../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
5
4
|
import { useTranslation } from "react-i18next";
|
|
5
|
+
import { useEdificeClient } from "../../providers/EdificeClientProvider/EdificeClientProvider.hook.js";
|
|
6
6
|
import useToast from "../useToast/useToast.js";
|
|
7
7
|
function useWorkspaceFolders() {
|
|
8
8
|
const queryClient = useQueryClient(), {
|
|
@@ -118,21 +118,11 @@ interface ShareResourceProps {
|
|
|
118
118
|
classNameSearchInput?: string;
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* Ref interface exposed by ShareResources component
|
|
121
|
+
* Ref interface exposed by ShareResources component.
|
|
122
|
+
* Use useRef with this type and call ref.current?.handleShare() to trigger share programmatically.
|
|
122
123
|
*
|
|
123
124
|
* @interface ShareResourcesRef
|
|
124
125
|
* @property {() => void} handleShare - Method to trigger the share operation
|
|
125
|
-
*
|
|
126
|
-
* @example
|
|
127
|
-
* ```tsx
|
|
128
|
-
* const ref = useRef<ShareResourcesRef>(null);
|
|
129
|
-
*
|
|
130
|
-
* // Trigger share programmatically
|
|
131
|
-
* ref.current?.handleShare();
|
|
132
|
-
*
|
|
133
|
-
* // Check sharing status
|
|
134
|
-
* const sharing = ref.current?.isSharing();
|
|
135
|
-
* ```
|
|
136
126
|
*/
|
|
137
127
|
export interface ShareResourcesRef {
|
|
138
128
|
handleShare: (notify?: boolean) => void;
|
|
@@ -142,46 +132,7 @@ export interface ShareResourcesRef {
|
|
|
142
132
|
*
|
|
143
133
|
* A component for managing resource sharing permissions with users and groups.
|
|
144
134
|
* Provides search functionality, bookmark management, and granular rights control.
|
|
145
|
-
*
|
|
146
|
-
* @example
|
|
147
|
-
* ```tsx
|
|
148
|
-
* import { useRef } from 'react';
|
|
149
|
-
* import ShareResources, { ShareResourcesRef, ShareOptions } from './ShareResources';
|
|
150
|
-
*
|
|
151
|
-
* function MyComponent() {
|
|
152
|
-
* const shareRef = useRef<ShareResourcesRef>(null);
|
|
153
|
-
*
|
|
154
|
-
* const shareOptions: ShareOptions = {
|
|
155
|
-
* resourceId: '123',
|
|
156
|
-
* resourceRights: [],
|
|
157
|
-
* resourceCreatorId: 'user-456',
|
|
158
|
-
* filteredActions: ['read', 'contrib'],
|
|
159
|
-
* urls: {
|
|
160
|
-
* getResourceRights: '/api/share/rights',
|
|
161
|
-
* putResourceRights: '/api/share/update'
|
|
162
|
-
* }
|
|
163
|
-
* };
|
|
164
|
-
*
|
|
165
|
-
* const handleSave = () => {
|
|
166
|
-
* if (shareRef.current) {
|
|
167
|
-
* shareRef.current.handleShare();
|
|
168
|
-
* }
|
|
169
|
-
* };
|
|
170
|
-
*
|
|
171
|
-
* return (
|
|
172
|
-
* <>
|
|
173
|
-
* <ShareResources
|
|
174
|
-
* ref={shareRef}
|
|
175
|
-
* shareOptions={shareOptions}
|
|
176
|
-
* onSuccess={() => console.log('Shared successfully')}
|
|
177
|
-
* onChange={(rights, isDirty) => console.log('Rights changed:', isDirty)}
|
|
178
|
-
* onSubmit={(isSubmitting) => console.log('Submitting share...', isSubmitting)}
|
|
179
|
-
* />
|
|
180
|
-
* <button onClick={handleSave}>Save Changes</button>
|
|
181
|
-
* </>
|
|
182
|
-
* );
|
|
183
|
-
* }
|
|
184
|
-
* ```
|
|
135
|
+
* Use forwardRef to get a ref with handleShare(). See ShareResourcesRef interface.
|
|
185
136
|
*
|
|
186
137
|
* @component
|
|
187
138
|
* @forwardRef
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __module as defineProperty } from "../../../../../../../_virtual/defineProperty.js";
|
|
2
|
+
import { t as toPropertyKeyExports } from "./toPropertyKey.js";
|
|
3
|
+
(function(module) {
|
|
4
|
+
var toPropertyKey = toPropertyKeyExports;
|
|
5
|
+
function _defineProperty(e, r, t) {
|
|
6
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
7
|
+
value: t,
|
|
8
|
+
enumerable: !0,
|
|
9
|
+
configurable: !0,
|
|
10
|
+
writable: !0
|
|
11
|
+
}) : e[r] = t, e;
|
|
12
|
+
}
|
|
13
|
+
module.exports = _defineProperty, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
14
|
+
})(defineProperty);
|
|
15
|
+
var definePropertyExports = defineProperty.exports;
|
|
16
|
+
export {
|
|
17
|
+
definePropertyExports as d
|
|
18
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { __module as interopRequireDefault } from "../../../../../../../_virtual/interopRequireDefault.js";
|
|
2
|
+
(function(module) {
|
|
3
|
+
function _interopRequireDefault(e) {
|
|
4
|
+
return e && e.__esModule ? e : {
|
|
5
|
+
default: e
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
module.exports = _interopRequireDefault, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
9
|
+
})(interopRequireDefault);
|
|
10
|
+
var interopRequireDefaultExports = interopRequireDefault.exports;
|
|
11
|
+
export {
|
|
12
|
+
interopRequireDefaultExports as i
|
|
13
|
+
};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { __module as objectSpread2 } from "../../../../../../../_virtual/objectSpread2.js";
|
|
2
|
+
import { d as definePropertyExports } from "./defineProperty.js";
|
|
3
|
+
(function(module) {
|
|
4
|
+
var defineProperty = definePropertyExports;
|
|
5
|
+
function ownKeys(e, r) {
|
|
6
|
+
var t = Object.keys(e);
|
|
7
|
+
if (Object.getOwnPropertySymbols) {
|
|
8
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
9
|
+
r && (o = o.filter(function(r2) {
|
|
10
|
+
return Object.getOwnPropertyDescriptor(e, r2).enumerable;
|
|
11
|
+
})), t.push.apply(t, o);
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
}
|
|
15
|
+
function _objectSpread2(e) {
|
|
16
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
17
|
+
var t = arguments[r] != null ? arguments[r] : {};
|
|
18
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r2) {
|
|
19
|
+
defineProperty(e, r2, t[r2]);
|
|
20
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r2) {
|
|
21
|
+
Object.defineProperty(e, r2, Object.getOwnPropertyDescriptor(t, r2));
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
return e;
|
|
25
|
+
}
|
|
26
|
+
module.exports = _objectSpread2, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
27
|
+
})(objectSpread2);
|
|
28
|
+
var objectSpread2Exports = objectSpread2.exports;
|
|
29
|
+
export {
|
|
30
|
+
objectSpread2Exports as o
|
|
31
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { __module as toPrimitive } from "../../../../../../../_virtual/toPrimitive.js";
|
|
2
|
+
import { _ as _typeofExports } from "./typeof.js";
|
|
3
|
+
(function(module) {
|
|
4
|
+
var _typeof = _typeofExports.default;
|
|
5
|
+
function toPrimitive2(t, r) {
|
|
6
|
+
if (_typeof(t) != "object" || !t) return t;
|
|
7
|
+
var e = t[Symbol.toPrimitive];
|
|
8
|
+
if (e !== void 0) {
|
|
9
|
+
var i = e.call(t, r || "default");
|
|
10
|
+
if (_typeof(i) != "object") return i;
|
|
11
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
12
|
+
}
|
|
13
|
+
return (r === "string" ? String : Number)(t);
|
|
14
|
+
}
|
|
15
|
+
module.exports = toPrimitive2, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
16
|
+
})(toPrimitive);
|
|
17
|
+
var toPrimitiveExports = toPrimitive.exports;
|
|
18
|
+
export {
|
|
19
|
+
toPrimitiveExports as t
|
|
20
|
+
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { __module as toPropertyKey } from "../../../../../../../_virtual/toPropertyKey.js";
|
|
2
|
+
import { _ as _typeofExports } from "./typeof.js";
|
|
3
|
+
import { t as toPrimitiveExports } from "./toPrimitive.js";
|
|
4
|
+
(function(module) {
|
|
5
|
+
var _typeof = _typeofExports.default, toPrimitive = toPrimitiveExports;
|
|
6
|
+
function toPropertyKey2(t) {
|
|
7
|
+
var i = toPrimitive(t, "string");
|
|
8
|
+
return _typeof(i) == "symbol" ? i : i + "";
|
|
9
|
+
}
|
|
10
|
+
module.exports = toPropertyKey2, module.exports.__esModule = !0, module.exports.default = module.exports;
|
|
11
|
+
})(toPropertyKey);
|
|
12
|
+
var toPropertyKeyExports = toPropertyKey.exports;
|
|
13
|
+
export {
|
|
14
|
+
toPropertyKeyExports as t
|
|
15
|
+
};
|