@box/unified-share-modal 1.24.1 → 1.25.1
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/esm/lib/components/unified-share-form-modal/collaborators-view/collaborators-view.js
CHANGED
|
@@ -1,85 +1,88 @@
|
|
|
1
|
-
import { createPortal as
|
|
1
|
+
import { createPortal as C } from "react-dom";
|
|
2
2
|
import { useIntl as p } from "react-intl";
|
|
3
|
-
import { Link as
|
|
4
|
-
import { CollaboratorListItem as
|
|
3
|
+
import { TextButton as B, Link as k, Table as v, TableHeader as x, Column as c, TableBody as A, Modal as l } from "@box/blueprint-web";
|
|
4
|
+
import { CollaboratorListItem as F } from "./collaborator-list-item.js";
|
|
5
5
|
import r from "./messages.js";
|
|
6
|
-
import { jsxs as
|
|
7
|
-
import { useUnifiedShareModalContext as
|
|
6
|
+
import { jsxs as t, jsx as e, Fragment as L } from "react/jsx-runtime";
|
|
7
|
+
import { useUnifiedShareModalContext as y } from "../../../contexts/unified-share-modal-context.js";
|
|
8
8
|
import { useUnifiedShareFormContext as M } from "../../../contexts/unified-share-form-context.js";
|
|
9
|
-
import '../../../../../styles/collaborators-view.css';const S = "
|
|
10
|
-
manage:
|
|
11
|
-
|
|
9
|
+
import '../../../../../styles/collaborators-view.css';const N = "_manage_8rmie_1", S = "_manageAllButton_8rmie_6", T = "_list_8rmie_13", H = "_scroll_8rmie_30", w = "_header_8rmie_36", a = {
|
|
10
|
+
manage: N,
|
|
11
|
+
manageAllButton: S,
|
|
12
|
+
list: T,
|
|
12
13
|
scroll: H,
|
|
13
|
-
header:
|
|
14
|
+
header: w
|
|
14
15
|
};
|
|
15
|
-
function
|
|
16
|
+
function z() {
|
|
16
17
|
const {
|
|
17
18
|
formatMessage: o
|
|
18
19
|
} = p(), {
|
|
19
|
-
collaborators:
|
|
20
|
+
collaborators: d,
|
|
20
21
|
config: n,
|
|
21
22
|
eventService: h,
|
|
22
23
|
isFetching: i,
|
|
23
24
|
item: u
|
|
24
|
-
} =
|
|
25
|
-
id:
|
|
26
|
-
type:
|
|
25
|
+
} = y(), {
|
|
26
|
+
id: g,
|
|
27
|
+
type: _
|
|
27
28
|
} = u, {
|
|
28
|
-
|
|
29
|
+
onCollaboratorsManagementClick: s
|
|
29
30
|
} = h, {
|
|
30
|
-
container:
|
|
31
|
-
onShareViewChange:
|
|
31
|
+
container: m,
|
|
32
|
+
onShareViewChange: f
|
|
32
33
|
} = M();
|
|
33
|
-
return /* @__PURE__ */
|
|
34
|
+
return /* @__PURE__ */ t("div", {
|
|
34
35
|
inert: i ? "" : null,
|
|
35
36
|
children: [n.collaboratorsManagement && /* @__PURE__ */ e("div", {
|
|
36
|
-
className:
|
|
37
|
-
children: /* @__PURE__ */ e(
|
|
38
|
-
|
|
37
|
+
className: a.manage,
|
|
38
|
+
children: s ? /* @__PURE__ */ e(B, {
|
|
39
|
+
className: a.manageAllButton,
|
|
40
|
+
inheritFont: !0,
|
|
41
|
+
onClick: s,
|
|
42
|
+
children: o(r.manageAllLink)
|
|
43
|
+
}) : /* @__PURE__ */ e(k, {
|
|
44
|
+
href: `/${_}/${g}/collaborators`,
|
|
39
45
|
rel: "noopener",
|
|
40
46
|
target: "_blank",
|
|
41
47
|
variant: "standalone",
|
|
42
|
-
...s && {
|
|
43
|
-
onClick: s
|
|
44
|
-
},
|
|
45
48
|
children: o(r.manageAllLink)
|
|
46
49
|
})
|
|
47
50
|
}), /* @__PURE__ */ e("div", {
|
|
48
|
-
className:
|
|
51
|
+
className: a.list,
|
|
49
52
|
children: /* @__PURE__ */ e("div", {
|
|
50
|
-
className:
|
|
51
|
-
children: /* @__PURE__ */
|
|
53
|
+
className: a.scroll,
|
|
54
|
+
children: /* @__PURE__ */ t(v, {
|
|
52
55
|
"aria-label": o(r.listLabel),
|
|
53
|
-
children: [/* @__PURE__ */
|
|
54
|
-
className:
|
|
55
|
-
children: [/* @__PURE__ */ e(
|
|
56
|
+
children: [/* @__PURE__ */ t(x, {
|
|
57
|
+
className: a.header,
|
|
58
|
+
children: [/* @__PURE__ */ e(c, {
|
|
56
59
|
hideHeader: !0,
|
|
57
60
|
isRowHeader: !0,
|
|
58
61
|
children: o(r.nameColumn)
|
|
59
|
-
}), /* @__PURE__ */ e(
|
|
62
|
+
}), /* @__PURE__ */ e(c, {
|
|
60
63
|
hideHeader: !0,
|
|
61
64
|
children: o(r.roleColumn)
|
|
62
65
|
})]
|
|
63
|
-
}), /* @__PURE__ */ e(
|
|
64
|
-
items:
|
|
65
|
-
children: (
|
|
66
|
-
collaborator:
|
|
66
|
+
}), /* @__PURE__ */ e(A, {
|
|
67
|
+
items: d.slice(0, n.collaboratorsLimit),
|
|
68
|
+
children: (b) => /* @__PURE__ */ e(F, {
|
|
69
|
+
collaborator: b
|
|
67
70
|
})
|
|
68
71
|
})]
|
|
69
72
|
})
|
|
70
73
|
})
|
|
71
|
-
}),
|
|
72
|
-
children: [!i && /* @__PURE__ */ e(
|
|
73
|
-
children: /* @__PURE__ */ e(
|
|
74
|
-
onClick: () =>
|
|
74
|
+
}), m && /* @__PURE__ */ C(/* @__PURE__ */ t(L, {
|
|
75
|
+
children: [!i && /* @__PURE__ */ e(l.Footer, {
|
|
76
|
+
children: /* @__PURE__ */ e(l.Footer.SecondaryButton, {
|
|
77
|
+
onClick: () => f("default"),
|
|
75
78
|
children: o(r.doneButton)
|
|
76
79
|
})
|
|
77
|
-
}), /* @__PURE__ */ e(
|
|
80
|
+
}), /* @__PURE__ */ e(l.Close, {
|
|
78
81
|
"aria-label": o(r.closeButton)
|
|
79
82
|
})]
|
|
80
|
-
}),
|
|
83
|
+
}), m)]
|
|
81
84
|
});
|
|
82
85
|
}
|
|
83
86
|
export {
|
|
84
|
-
|
|
87
|
+
z as CollaboratorsView
|
|
85
88
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._manage_8rmie_1{display:flex;flex-direction:row-reverse;padding:var(--space-3) .625rem}._manage_8rmie_1 ._manageAllButton_8rmie_6{font-size:var(--link-default-font-size);font-family:var(--link-default-font-family);line-height:var(--link-default-line-height);letter-spacing:var(--link-default-letter-spacing)}._list_8rmie_13{position:relative}._list_8rmie_13:after{position:absolute;inset:0;z-index:1000;border:var(--border-1) solid var(--border-divider-border);border-radius:var(--radius-4);box-shadow:var(--innershadow-1);content:"";pointer-events:none}._scroll_8rmie_30{height:240px;overflow-y:auto;border-radius:var(--radius-4)}._header_8rmie_36{visibility:collapse}
|
|
@@ -24,6 +24,7 @@ export declare const mockItemPermissions: {
|
|
|
24
24
|
};
|
|
25
25
|
export declare const mockBoxFile: Item;
|
|
26
26
|
export declare const mockBoxFolder: Item;
|
|
27
|
+
export declare const mockWorkflow: Item;
|
|
27
28
|
export declare const mockSharedLinkSettings: SharedLinkSettings;
|
|
28
29
|
export declare const mockSharedLink: SharedLink;
|
|
29
30
|
export declare const useMockSharedLink: (sharedLinkArg: any) => {
|
|
@@ -48,7 +48,7 @@ export type PermissionLevelType = 'can_edit' | 'can_download' | 'can_preview';
|
|
|
48
48
|
/**
|
|
49
49
|
* Supported item types in the Unified Share Modal.
|
|
50
50
|
*/
|
|
51
|
-
export type ItemType = 'file' | 'folder' | 'hubs' | 'web_link';
|
|
51
|
+
export type ItemType = 'file' | 'folder' | 'hubs' | 'web_link' | 'workflow';
|
|
52
52
|
export interface Item {
|
|
53
53
|
/**
|
|
54
54
|
* The classification of the item.
|
|
@@ -336,7 +336,15 @@ export interface CollaborationRole {
|
|
|
336
336
|
}
|
|
337
337
|
export interface EventService {
|
|
338
338
|
onCollaboratorsClick?: () => void;
|
|
339
|
-
|
|
339
|
+
/**
|
|
340
|
+
* Custom handler to replace the default "Manage All" link behavior.
|
|
341
|
+
*
|
|
342
|
+
* When provided, prevents the default navigation and calls this handler instead.
|
|
343
|
+
* Useful for opening a CollaboratorsModal or custom dialog without leaving the page.
|
|
344
|
+
*
|
|
345
|
+
* Use this when you want to override the default navigation behavior.
|
|
346
|
+
*/
|
|
347
|
+
onCollaboratorsManagementClick?: () => void;
|
|
340
348
|
onSharedLinkSettingsClick?: () => void;
|
|
341
349
|
onSharedLinkSettingsClose?: () => void;
|
|
342
350
|
onSharedLinkSettingsLoad?: () => void;
|
|
@@ -371,7 +379,7 @@ export interface SharingService {
|
|
|
371
379
|
/**
|
|
372
380
|
* Function to remove an existing collaborator on the item.
|
|
373
381
|
*
|
|
374
|
-
* Called when the user clicks "Remove" on a collaborator
|
|
382
|
+
* Called when the user clicks the "Remove" icon button on a collaborator.
|
|
375
383
|
*/
|
|
376
384
|
removeCollaborator?: (collaborator: Collaborator) => Promise<SharingResponse | void>;
|
|
377
385
|
/**
|
package/package.json
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/unified-share-modal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.1",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^12.108.
|
|
7
|
-
"@box/blueprint-web-assets": "^4.89.
|
|
8
|
-
"@box/copy-input": "^1.19.
|
|
9
|
-
"@box/user-selector": "^1.51.
|
|
6
|
+
"@box/blueprint-web": "^12.108.2",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.89.1",
|
|
8
|
+
"@box/copy-input": "^1.19.2",
|
|
9
|
+
"@box/user-selector": "^1.51.2",
|
|
10
10
|
"lodash": "^4.17.15",
|
|
11
11
|
"react": "^18.0.0",
|
|
12
12
|
"react-dom": "^18.0.0",
|
|
13
13
|
"react-intl": "^6.4.2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@box/blueprint-web": "^12.108.
|
|
17
|
-
"@box/blueprint-web-assets": "^4.89.
|
|
18
|
-
"@box/copy-input": "^1.19.
|
|
19
|
-
"@box/storybook-utils": "0.14.
|
|
16
|
+
"@box/blueprint-web": "^12.108.2",
|
|
17
|
+
"@box/blueprint-web-assets": "^4.89.1",
|
|
18
|
+
"@box/copy-input": "^1.19.2",
|
|
19
|
+
"@box/storybook-utils": "0.14.35",
|
|
20
20
|
"@box/eslint-plugin-blueprint": "1.0.5",
|
|
21
21
|
"react-intl": "^6.4.2"
|
|
22
22
|
},
|