@box/unified-share-modal 2.12.11 → 2.12.12
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.
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { createContext as E,
|
|
1
|
+
import { createContext as E, useState as F, useMemo as x, useContext as C } from "react";
|
|
2
2
|
import { useUnifiedShareModalContext as g } from "./unified-share-modal-context.js";
|
|
3
3
|
import { jsx as k } from "react/jsx-runtime";
|
|
4
4
|
import { formatDateFromTimestampToCalendarDate as L } from "../utils/date.js";
|
|
5
5
|
import { useLinkSettingsForm as v } from "../hooks/use-link-settings-form.js";
|
|
6
6
|
const f = /* @__PURE__ */ E(null), M = () => {
|
|
7
|
-
const e =
|
|
7
|
+
const e = C(f);
|
|
8
8
|
if (!e)
|
|
9
9
|
throw new Error("useSharedLinkSettingsContext must be used with SharedLinkSettingsProvider");
|
|
10
10
|
return e;
|
|
@@ -20,7 +20,7 @@ const f = /* @__PURE__ */ E(null), M = () => {
|
|
|
20
20
|
} = h, {
|
|
21
21
|
isDownloadEnabled: r,
|
|
22
22
|
isPasswordEnabled: s
|
|
23
|
-
} = p, [i, b] =
|
|
23
|
+
} = p, [i, b] = F(null), o = x(() => ({
|
|
24
24
|
expiration: t ? L(t) : null,
|
|
25
25
|
isDownloadEnabled: !!r,
|
|
26
26
|
isExpirationEnabled: !!t,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createContext as A,
|
|
1
|
+
import { createContext as A, useState as e, useRef as g, useCallback as D, useEffect as k, useMemo as E, useContext as L } from "react";
|
|
2
2
|
import { useUnifiedShareModalContext as j } from "./unified-share-modal-context.js";
|
|
3
3
|
import { jsx as q } from "react/jsx-runtime";
|
|
4
4
|
const M = /* @__PURE__ */ A(null), G = () => {
|
|
5
|
-
const t =
|
|
5
|
+
const t = L(M);
|
|
6
6
|
if (!t)
|
|
7
7
|
throw new Error("useUnifiedShareFormContext must be used with UnifiedShareFormProvider");
|
|
8
8
|
return t;
|
|
@@ -13,7 +13,7 @@ const M = /* @__PURE__ */ A(null), G = () => {
|
|
|
13
13
|
initialContacts: n,
|
|
14
14
|
isOpen: a,
|
|
15
15
|
view: l
|
|
16
|
-
} = j(), [o, c] = e("default"), [f, u] = e(!1), [s, d] = e(!1), [m, O] = e(null), [C, h] = e(n), [S, x] = e(""), [R, p] = e(""), [F, U] = e(), [b, v] = e({}), V = g(!1), w = g(!1), I =
|
|
16
|
+
} = j(), [o, c] = e("default"), [f, u] = e(!1), [s, d] = e(!1), [m, O] = e(null), [C, h] = e(n), [S, x] = e(""), [R, p] = e(""), [F, U] = e(), [b, v] = e({}), V = g(!1), w = g(!1), I = D((r) => {
|
|
17
17
|
v((i) => ({
|
|
18
18
|
...i,
|
|
19
19
|
...r
|
|
@@ -25,7 +25,7 @@ const M = /* @__PURE__ */ A(null), G = () => {
|
|
|
25
25
|
const r = l === "unified-share-form", i = o === "default";
|
|
26
26
|
s || (!r || !i) && d(!0);
|
|
27
27
|
}, [s, l, o]);
|
|
28
|
-
const P =
|
|
28
|
+
const P = E(() => ({
|
|
29
29
|
collaborationRole: F,
|
|
30
30
|
contactValue: S,
|
|
31
31
|
containerRef: m,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { createContext as V,
|
|
1
|
+
import { createContext as V, useState as t, useEffect as b, useMemo as j, useContext as A } from "react";
|
|
2
2
|
import { DEFAULT_CONFIGURATION as D } from "../constants.js";
|
|
3
3
|
import { jsx as F } from "react/jsx-runtime";
|
|
4
4
|
const L = /* @__PURE__ */ V(null), _ = () => {
|
|
5
|
-
const e =
|
|
5
|
+
const e = A(L);
|
|
6
6
|
if (!e)
|
|
7
7
|
throw new Error("useUnifiedShareModalContext must be used with UnifiedShareModalContext.Provider");
|
|
8
8
|
return e;
|
|
@@ -27,10 +27,10 @@ const L = /* @__PURE__ */ V(null), _ = () => {
|
|
|
27
27
|
variant: M
|
|
28
28
|
}) => {
|
|
29
29
|
const [S, P] = t(null), [w, v] = t(!1), [E, I] = t("unified-share-form");
|
|
30
|
-
|
|
30
|
+
b(() => {
|
|
31
31
|
o || (v(!1), I("unified-share-form"));
|
|
32
32
|
}, [o]);
|
|
33
|
-
const T =
|
|
33
|
+
const T = j(() => ({
|
|
34
34
|
collaborationAccess: r,
|
|
35
35
|
collaborationNotices: n,
|
|
36
36
|
collaborationRoles: s ?? [],
|
package/package.json
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/unified-share-modal",
|
|
3
|
-
"version": "2.12.
|
|
3
|
+
"version": "2.12.12",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
|
-
"@box/blueprint-web": "^14.4.
|
|
7
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
8
|
-
"@box/copy-input": "^1.40.
|
|
9
|
-
"@box/user-selector": "^1.74.
|
|
6
|
+
"@box/blueprint-web": "^14.4.2",
|
|
7
|
+
"@box/blueprint-web-assets": "^4.111.25",
|
|
8
|
+
"@box/copy-input": "^1.40.29",
|
|
9
|
+
"@box/user-selector": "^1.74.30",
|
|
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": "^14.4.
|
|
17
|
-
"@box/blueprint-web-assets": "^4.111.
|
|
18
|
-
"@box/copy-input": "^1.40.
|
|
19
|
-
"@box/eslint-plugin-blueprint": "1.1.
|
|
20
|
-
"@box/storybook-utils": "0.17.
|
|
16
|
+
"@box/blueprint-web": "^14.4.2",
|
|
17
|
+
"@box/blueprint-web-assets": "^4.111.25",
|
|
18
|
+
"@box/copy-input": "^1.40.29",
|
|
19
|
+
"@box/eslint-plugin-blueprint": "1.1.10",
|
|
20
|
+
"@box/storybook-utils": "0.17.25",
|
|
21
21
|
"react-intl": "^6.4.2"
|
|
22
22
|
},
|
|
23
23
|
"publishConfig": {
|