@box/unified-share-modal 1.16.1 → 1.16.3
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/shared-link-settings-modal/download-section.js +25 -0
- package/dist/esm/lib/components/shared-link-settings-modal/expiration-section.js +47 -0
- package/dist/esm/lib/components/shared-link-settings-modal/password-section.js +51 -0
- package/dist/esm/lib/components/shared-link-settings-modal/shared-link-settings-modal.js +129 -164
- package/dist/esm/lib/components/shared-link-settings-modal/vanity-section.js +48 -0
- package/dist/types/lib/components/shared-link-settings-modal/download-section.d.ts +8 -0
- package/dist/types/lib/components/shared-link-settings-modal/expiration-section.d.ts +11 -0
- package/dist/types/lib/components/shared-link-settings-modal/password-section.d.ts +14 -0
- package/dist/types/lib/components/shared-link-settings-modal/vanity-section.d.ts +12 -0
- package/package.json +3 -3
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useIntl as l } from "react-intl";
|
|
2
|
+
import { Switch as s } from "@box/blueprint-web";
|
|
3
|
+
import m from "./messages.js";
|
|
4
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
5
|
+
function u({
|
|
6
|
+
canChange: e,
|
|
7
|
+
isAvailable: o,
|
|
8
|
+
isChecked: t,
|
|
9
|
+
isDisabled: n,
|
|
10
|
+
onToggle: r
|
|
11
|
+
}) {
|
|
12
|
+
const {
|
|
13
|
+
formatMessage: i
|
|
14
|
+
} = l();
|
|
15
|
+
return o ? /* @__PURE__ */ a(s.Item, {
|
|
16
|
+
checked: t,
|
|
17
|
+
disabled: n || !e,
|
|
18
|
+
label: i(m.downloadSettingsToggleText),
|
|
19
|
+
onCheckedChange: r,
|
|
20
|
+
value: "download-link-settings"
|
|
21
|
+
}) : null;
|
|
22
|
+
}
|
|
23
|
+
export {
|
|
24
|
+
u as DownloadSection
|
|
25
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { useIntl as b } from "react-intl";
|
|
2
|
+
import { Switch as x, DateI18nProvider as c, DatePicker as d } from "@box/blueprint-web";
|
|
3
|
+
import a from "./messages.js";
|
|
4
|
+
import { jsxs as s, Fragment as k, jsx as r } from "react/jsx-runtime";
|
|
5
|
+
import { formatTomorrowDateToCalendarDate as L } from "../../utils/date.js";
|
|
6
|
+
function f({
|
|
7
|
+
canChange: i,
|
|
8
|
+
error: t,
|
|
9
|
+
expiration: l,
|
|
10
|
+
isChecked: n,
|
|
11
|
+
isDisabled: o,
|
|
12
|
+
onChange: p,
|
|
13
|
+
onToggle: m
|
|
14
|
+
}) {
|
|
15
|
+
const {
|
|
16
|
+
formatMessage: e
|
|
17
|
+
} = b();
|
|
18
|
+
return /* @__PURE__ */ s(k, {
|
|
19
|
+
children: [/* @__PURE__ */ r(x.Item, {
|
|
20
|
+
checked: n,
|
|
21
|
+
disabled: o || !i,
|
|
22
|
+
label: e(a.linkExpirationToggleText),
|
|
23
|
+
onCheckedChange: m,
|
|
24
|
+
value: "link-expiration-settings"
|
|
25
|
+
}), n && // Get the locale from the user's operating system settings
|
|
26
|
+
/* @__PURE__ */ r(c, {
|
|
27
|
+
locale: navigator.language || "en-US",
|
|
28
|
+
children: /* @__PURE__ */ r(d, {
|
|
29
|
+
calendarAriaLabel: e(a.linkExpirationCalendarAriaLabel),
|
|
30
|
+
clearDatePickerAriaLabel: e(a.linkExpirationClearDatePickerAriaLabel),
|
|
31
|
+
error: t,
|
|
32
|
+
hideLabel: !0,
|
|
33
|
+
isDisabled: o || !i,
|
|
34
|
+
label: e(a.linkExpirationDatePickerLabel),
|
|
35
|
+
minValue: L(),
|
|
36
|
+
nextMonthAriaLabel: e(a.linkExpirationNextMonthAriaLabel),
|
|
37
|
+
onChange: p,
|
|
38
|
+
openCalendarDropdownAriaLabel: e(a.linkExpirationOpenCalendarDropdownAriaLabel),
|
|
39
|
+
previousMonthAriaLabel: e(a.linkExpirationPreviousMonthAriaLabel),
|
|
40
|
+
value: l
|
|
41
|
+
})
|
|
42
|
+
})]
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
export {
|
|
46
|
+
f as ExpirationSection
|
|
47
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useIntl as f } from "react-intl";
|
|
2
|
+
import { Switch as h, InlineNotice as x, TextInput as I } from "@box/blueprint-web";
|
|
3
|
+
import r from "./messages.js";
|
|
4
|
+
import { jsxs as s, Fragment as l, jsx as t } from "react/jsx-runtime";
|
|
5
|
+
const b = "••••••••";
|
|
6
|
+
function L({
|
|
7
|
+
canChange: o,
|
|
8
|
+
error: i,
|
|
9
|
+
isAvailable: d,
|
|
10
|
+
isChecked: a,
|
|
11
|
+
isDefaultChecked: p,
|
|
12
|
+
isDisabled: n,
|
|
13
|
+
onBlur: c,
|
|
14
|
+
onChange: m,
|
|
15
|
+
onFocus: g,
|
|
16
|
+
onToggle: u,
|
|
17
|
+
password: w
|
|
18
|
+
}) {
|
|
19
|
+
const {
|
|
20
|
+
formatMessage: e
|
|
21
|
+
} = f();
|
|
22
|
+
return d ? /* @__PURE__ */ s(l, {
|
|
23
|
+
children: [/* @__PURE__ */ t(h.Item, {
|
|
24
|
+
checked: a,
|
|
25
|
+
disabled: n || !o,
|
|
26
|
+
label: e(r.passwordToggleText),
|
|
27
|
+
onCheckedChange: u,
|
|
28
|
+
value: "password-settings"
|
|
29
|
+
}), a && /* @__PURE__ */ s(l, {
|
|
30
|
+
children: [o && /* @__PURE__ */ t(x, {
|
|
31
|
+
variant: "warning",
|
|
32
|
+
variantIconAriaLabel: e(r.warningNoticeIconAriaLabel),
|
|
33
|
+
children: e(r.passwordWarningText)
|
|
34
|
+
}), /* @__PURE__ */ t(I, {
|
|
35
|
+
disabled: n || !o,
|
|
36
|
+
error: i,
|
|
37
|
+
hideLabel: !0,
|
|
38
|
+
label: e(r.passwordToggleText),
|
|
39
|
+
onBlur: c,
|
|
40
|
+
onChange: m,
|
|
41
|
+
onFocus: g,
|
|
42
|
+
placeholder: p ? b : e(r.passwordInputPlaceholder),
|
|
43
|
+
type: "password",
|
|
44
|
+
value: w
|
|
45
|
+
})]
|
|
46
|
+
})]
|
|
47
|
+
}) : null;
|
|
48
|
+
}
|
|
49
|
+
export {
|
|
50
|
+
L as PasswordSection
|
|
51
|
+
};
|
|
@@ -1,191 +1,156 @@
|
|
|
1
|
-
import { useMemo as
|
|
2
|
-
import { useIntl as
|
|
3
|
-
import { Modal as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { useMemo as U } from "react";
|
|
2
|
+
import { useIntl as H } from "react-intl";
|
|
3
|
+
import { Modal as i, Text as R, Link as q } from "@box/blueprint-web";
|
|
4
|
+
import { DownloadSection as G } from "./download-section.js";
|
|
5
|
+
import { ExpirationSection as J } from "./expiration-section.js";
|
|
6
|
+
import { PasswordSection as K } from "./password-section.js";
|
|
7
|
+
import { VanitySection as Q } from "./vanity-section.js";
|
|
8
|
+
import d from "./messages.js";
|
|
9
|
+
import { jsx as a, jsxs as b } from "react/jsx-runtime";
|
|
10
|
+
import { useAccessLevels as W } from "../../hooks/use-access-levels.js";
|
|
11
|
+
import { formatDateFromTimestampToCalendarDate as X } from "../../utils/date.js";
|
|
12
|
+
import { useLinkSettingsForm as Y } from "../../hooks/use-link-settings-form.js";
|
|
13
|
+
import { useUnifiedShareModalContext as Z } from "../../contexts/unified-share-modal-context.js";
|
|
14
|
+
import '../../../../styles/shared-link-settings-modal.css';const $ = "_content_149ez_1", ee = "_body_149ez_5", C = {
|
|
15
|
+
content: $,
|
|
16
|
+
body: ee
|
|
17
|
+
};
|
|
18
|
+
function pe({
|
|
19
|
+
isOpen: f,
|
|
16
20
|
onOpenChange: u
|
|
17
21
|
}) {
|
|
18
22
|
const {
|
|
19
|
-
formatMessage:
|
|
20
|
-
} =
|
|
21
|
-
eventService:
|
|
22
|
-
isSubmitting:
|
|
23
|
-
sharedLink:
|
|
24
|
-
} =
|
|
23
|
+
formatMessage: t
|
|
24
|
+
} = H(), {
|
|
25
|
+
eventService: S,
|
|
26
|
+
isSubmitting: E,
|
|
27
|
+
sharedLink: x
|
|
28
|
+
} = Z(), {
|
|
25
29
|
expiresAt: c = 0,
|
|
26
|
-
settings:
|
|
27
|
-
vanityDomain:
|
|
28
|
-
vanityName:
|
|
29
|
-
} =
|
|
30
|
+
settings: n = {},
|
|
31
|
+
vanityDomain: k = "",
|
|
32
|
+
vanityName: m = ""
|
|
33
|
+
} = x, {
|
|
30
34
|
onSharedLinkSettingsClose: w
|
|
31
|
-
} =
|
|
32
|
-
selectedAccess:
|
|
33
|
-
} =
|
|
34
|
-
expiration: c ?
|
|
35
|
-
isDownloadEnabled: !!
|
|
35
|
+
} = S, {
|
|
36
|
+
selectedAccess: g
|
|
37
|
+
} = W(), h = U(() => ({
|
|
38
|
+
expiration: c ? X(c) : null,
|
|
39
|
+
isDownloadEnabled: !!n.isDownloadEnabled,
|
|
36
40
|
isExpirationEnabled: !!c,
|
|
37
|
-
isPasswordEnabled: !!
|
|
38
|
-
isVanityNameEnabled: !!
|
|
41
|
+
isPasswordEnabled: !!n.isPasswordEnabled,
|
|
42
|
+
isVanityNameEnabled: !!m,
|
|
39
43
|
password: "",
|
|
40
|
-
vanityName:
|
|
41
|
-
}), [c,
|
|
44
|
+
vanityName: m
|
|
45
|
+
}), [c, n, m]), {
|
|
42
46
|
errors: p,
|
|
43
|
-
formData:
|
|
44
|
-
handleFormReset:
|
|
45
|
-
handleFormSubmit:
|
|
46
|
-
isUpdating:
|
|
47
|
-
setErrors:
|
|
48
|
-
setFieldError:
|
|
49
|
-
setFieldValue:
|
|
50
|
-
validatePassword:
|
|
51
|
-
} =
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
await
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
},
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
},
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
var
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
},
|
|
74
|
-
return /* @__PURE__ */
|
|
47
|
+
formData: o,
|
|
48
|
+
handleFormReset: D,
|
|
49
|
+
handleFormSubmit: L,
|
|
50
|
+
isUpdating: N,
|
|
51
|
+
setErrors: P,
|
|
52
|
+
setFieldError: s,
|
|
53
|
+
setFieldValue: r,
|
|
54
|
+
validatePassword: F
|
|
55
|
+
} = Y(h), v = () => {
|
|
56
|
+
D(), w && w(), u(!1);
|
|
57
|
+
}, T = async () => {
|
|
58
|
+
await L() || (P({}), u(!1));
|
|
59
|
+
}, B = (e) => {
|
|
60
|
+
s("expiration", void 0), r("isExpirationEnabled", e);
|
|
61
|
+
}, V = (e) => {
|
|
62
|
+
s("expiration", void 0), r("expiration", e);
|
|
63
|
+
}, A = (e) => {
|
|
64
|
+
s("vanityName", void 0), r("isVanityNameEnabled", e);
|
|
65
|
+
}, M = (e) => {
|
|
66
|
+
s("vanityName", void 0), r("vanityName", e.target.value);
|
|
67
|
+
}, _ = (e) => {
|
|
68
|
+
s("password", void 0), r("isPasswordEnabled", e);
|
|
69
|
+
}, z = (e) => {
|
|
70
|
+
s("password", void 0), r("password", e.target.value);
|
|
71
|
+
}, I = (e) => {
|
|
72
|
+
r("isDownloadEnabled", e);
|
|
73
|
+
}, j = (e) => {
|
|
74
|
+
var y;
|
|
75
|
+
const O = (y = document.getElementById("usm-SharedLinkSettingsModal-primaryButton")) == null ? void 0 : y.contains(e.relatedTarget);
|
|
76
|
+
h.isPasswordEnabled && !o.password || O || F(o.password);
|
|
77
|
+
}, l = E || N;
|
|
78
|
+
return /* @__PURE__ */ a(i, {
|
|
75
79
|
onOpenChange: v,
|
|
76
|
-
open:
|
|
77
|
-
children: /* @__PURE__ */
|
|
78
|
-
className:
|
|
80
|
+
open: f,
|
|
81
|
+
children: /* @__PURE__ */ b(i.Content, {
|
|
82
|
+
className: C.content,
|
|
79
83
|
size: "medium",
|
|
80
|
-
children: [/* @__PURE__ */
|
|
81
|
-
children:
|
|
82
|
-
}), /* @__PURE__ */
|
|
83
|
-
className:
|
|
84
|
-
children: [/* @__PURE__ */
|
|
84
|
+
children: [/* @__PURE__ */ a(i.Header, {
|
|
85
|
+
children: t(d.title)
|
|
86
|
+
}), /* @__PURE__ */ b(i.Body, {
|
|
87
|
+
className: C.body,
|
|
88
|
+
children: [/* @__PURE__ */ a(R, {
|
|
85
89
|
as: "p",
|
|
86
90
|
color: "textOnLightSecondary",
|
|
87
|
-
children:
|
|
88
|
-
learnSharedLinkSettingsLink: /* @__PURE__ */
|
|
91
|
+
children: t(d.subtitle, {
|
|
92
|
+
learnSharedLinkSettingsLink: /* @__PURE__ */ a(q, {
|
|
89
93
|
href: "https://support.box.com/hc/en-us/articles/360043697554-Configuring-Individual-Shared-Link-Settings",
|
|
90
94
|
rel: "noreferrer",
|
|
91
95
|
target: "_blank",
|
|
92
|
-
children:
|
|
96
|
+
children: t(d.learnSharedLinkSettingsLink)
|
|
93
97
|
})
|
|
94
98
|
})
|
|
95
|
-
}), /* @__PURE__ */
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
error: p.password,
|
|
132
|
-
hideLabel: !0,
|
|
133
|
-
label: a(e.passwordToggleText),
|
|
134
|
-
onBlur: $,
|
|
135
|
-
onChange: W,
|
|
136
|
-
onFocus: () => l("password", void 0),
|
|
137
|
-
placeholder: b.isPasswordEnabled ? oa : a(e.passwordInputPlaceholder),
|
|
138
|
-
type: "password",
|
|
139
|
-
value: t.password
|
|
140
|
-
})]
|
|
141
|
-
}), i.isVanityNameAvailable && /* @__PURE__ */ n(h.Item, {
|
|
142
|
-
checked: t.isVanityNameEnabled,
|
|
143
|
-
disabled: !i.canChangeVanityName,
|
|
144
|
-
label: a(e.vanityNameToggleText),
|
|
145
|
-
onCheckedChange: U,
|
|
146
|
-
value: "vanity-domain-settings"
|
|
147
|
-
}), t.isVanityNameEnabled && /* @__PURE__ */ d(L, {
|
|
148
|
-
children: [i.canChangeVanityName && /* @__PURE__ */ n(E, {
|
|
149
|
-
variant: "warning",
|
|
150
|
-
variantIconAriaLabel: a(e.warningNoticeIconAriaLabel),
|
|
151
|
-
children: a(e.vanityDomainSettingsWarningText)
|
|
152
|
-
}), /* @__PURE__ */ n(k, {
|
|
153
|
-
disabled: !i.canChangeVanityName,
|
|
154
|
-
error: p.vanityName,
|
|
155
|
-
hideLabel: !0,
|
|
156
|
-
label: a(e.vanityNameInputLabel),
|
|
157
|
-
onChange: z,
|
|
158
|
-
placeholder: a(e.vanityNameInputPlaceholder),
|
|
159
|
-
value: t.vanityName
|
|
160
|
-
}), i.canChangeVanityName && /* @__PURE__ */ n(y, {
|
|
161
|
-
as: "p",
|
|
162
|
-
children: `${T}${t.vanityName}`
|
|
163
|
-
})]
|
|
164
|
-
}), i.isDownloadAvailable && /* @__PURE__ */ n(h.Item, {
|
|
165
|
-
checked: t.isDownloadEnabled,
|
|
166
|
-
disabled: !i.canChangeDownload,
|
|
167
|
-
label: a(e.downloadSettingsToggleText),
|
|
168
|
-
onCheckedChange: j,
|
|
169
|
-
value: "download-link-settings"
|
|
99
|
+
}), /* @__PURE__ */ a(J, {
|
|
100
|
+
canChange: !!n.canChangeExpiration,
|
|
101
|
+
error: p.expiration,
|
|
102
|
+
expiration: o.expiration,
|
|
103
|
+
isChecked: o.isExpirationEnabled,
|
|
104
|
+
isDisabled: l,
|
|
105
|
+
onChange: V,
|
|
106
|
+
onToggle: B
|
|
107
|
+
}), /* @__PURE__ */ a(K, {
|
|
108
|
+
canChange: !!n.canChangePassword,
|
|
109
|
+
error: p.password,
|
|
110
|
+
isAvailable: n.isPasswordAvailable && (g == null ? void 0 : g.id) === "open",
|
|
111
|
+
isChecked: o.isPasswordEnabled,
|
|
112
|
+
isDefaultChecked: h.isPasswordEnabled,
|
|
113
|
+
isDisabled: l,
|
|
114
|
+
onBlur: j,
|
|
115
|
+
onChange: z,
|
|
116
|
+
onFocus: () => s("password", void 0),
|
|
117
|
+
onToggle: _,
|
|
118
|
+
password: o.password
|
|
119
|
+
}), /* @__PURE__ */ a(Q, {
|
|
120
|
+
canChange: !!n.canChangeVanityName,
|
|
121
|
+
error: p.vanityName,
|
|
122
|
+
isAvailable: !!n.isVanityNameAvailable,
|
|
123
|
+
isChecked: o.isVanityNameEnabled,
|
|
124
|
+
isDisabled: l,
|
|
125
|
+
onChange: M,
|
|
126
|
+
onToggle: A,
|
|
127
|
+
vanityDomain: k,
|
|
128
|
+
vanityName: o.vanityName
|
|
129
|
+
}), /* @__PURE__ */ a(G, {
|
|
130
|
+
canChange: !!n.canChangeDownload,
|
|
131
|
+
isAvailable: !!n.isDownloadAvailable,
|
|
132
|
+
isChecked: o.isDownloadEnabled,
|
|
133
|
+
isDisabled: l,
|
|
134
|
+
onToggle: I
|
|
170
135
|
})]
|
|
171
|
-
}), /* @__PURE__ */
|
|
172
|
-
children: [/* @__PURE__ */
|
|
173
|
-
disabled:
|
|
136
|
+
}), /* @__PURE__ */ b(i.Footer, {
|
|
137
|
+
children: [/* @__PURE__ */ a(i.Footer.SecondaryButton, {
|
|
138
|
+
disabled: l,
|
|
174
139
|
onClick: v,
|
|
175
|
-
children:
|
|
176
|
-
}), /* @__PURE__ */
|
|
140
|
+
children: t(d.cancelButton)
|
|
141
|
+
}), /* @__PURE__ */ a(i.Footer.PrimaryButton, {
|
|
177
142
|
id: "usm-SharedLinkSettingsModal-primaryButton",
|
|
178
|
-
loading:
|
|
179
|
-
loadingAriaLabel:
|
|
180
|
-
onClick:
|
|
181
|
-
children:
|
|
143
|
+
loading: l,
|
|
144
|
+
loadingAriaLabel: t(d.loadingLabel),
|
|
145
|
+
onClick: T,
|
|
146
|
+
children: t(d.saveButton)
|
|
182
147
|
})]
|
|
183
|
-
}), /* @__PURE__ */
|
|
184
|
-
"aria-label":
|
|
148
|
+
}), /* @__PURE__ */ a(i.Close, {
|
|
149
|
+
"aria-label": t(d.closeButton)
|
|
185
150
|
})]
|
|
186
151
|
})
|
|
187
152
|
});
|
|
188
153
|
}
|
|
189
154
|
export {
|
|
190
|
-
|
|
155
|
+
pe as SharedLinkSettingsModal
|
|
191
156
|
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { useIntl as g } from "react-intl";
|
|
2
|
+
import { Switch as v, InlineNotice as I, TextInput as b, Text as f } from "@box/blueprint-web";
|
|
3
|
+
import t from "./messages.js";
|
|
4
|
+
import { jsxs as o, Fragment as m, jsx as i } from "react/jsx-runtime";
|
|
5
|
+
function L({
|
|
6
|
+
canChange: n,
|
|
7
|
+
error: c,
|
|
8
|
+
isAvailable: s,
|
|
9
|
+
isChecked: a,
|
|
10
|
+
isDisabled: r,
|
|
11
|
+
onChange: d,
|
|
12
|
+
onToggle: u,
|
|
13
|
+
vanityDomain: p,
|
|
14
|
+
vanityName: l
|
|
15
|
+
}) {
|
|
16
|
+
const {
|
|
17
|
+
formatMessage: e
|
|
18
|
+
} = g();
|
|
19
|
+
return s ? /* @__PURE__ */ o(m, {
|
|
20
|
+
children: [/* @__PURE__ */ i(v.Item, {
|
|
21
|
+
checked: a,
|
|
22
|
+
disabled: r || !n,
|
|
23
|
+
label: e(t.vanityNameToggleText),
|
|
24
|
+
onCheckedChange: u,
|
|
25
|
+
value: "vanity-domain-settings"
|
|
26
|
+
}), a && /* @__PURE__ */ o(m, {
|
|
27
|
+
children: [n && /* @__PURE__ */ i(I, {
|
|
28
|
+
variant: "warning",
|
|
29
|
+
variantIconAriaLabel: e(t.warningNoticeIconAriaLabel),
|
|
30
|
+
children: e(t.vanityDomainSettingsWarningText)
|
|
31
|
+
}), /* @__PURE__ */ i(b, {
|
|
32
|
+
disabled: r || !n,
|
|
33
|
+
error: c,
|
|
34
|
+
hideLabel: !0,
|
|
35
|
+
label: e(t.vanityNameInputLabel),
|
|
36
|
+
onChange: d,
|
|
37
|
+
placeholder: e(t.vanityNameInputPlaceholder),
|
|
38
|
+
value: l
|
|
39
|
+
}), n && /* @__PURE__ */ i(f, {
|
|
40
|
+
as: "p",
|
|
41
|
+
children: `${p}${l}`
|
|
42
|
+
})]
|
|
43
|
+
})]
|
|
44
|
+
}) : null;
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
L as VanitySection
|
|
48
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface DownloadSectionProps {
|
|
2
|
+
canChange: boolean;
|
|
3
|
+
isAvailable: boolean;
|
|
4
|
+
isChecked: boolean;
|
|
5
|
+
isDisabled: boolean;
|
|
6
|
+
onToggle: (checked: boolean) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function DownloadSection({ canChange, isAvailable, isChecked, isDisabled, onToggle }: DownloadSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DateValue } from '../../types';
|
|
2
|
+
export interface ExpirationSectionProps {
|
|
3
|
+
canChange: boolean;
|
|
4
|
+
error?: string;
|
|
5
|
+
expiration: DateValue | null;
|
|
6
|
+
isChecked: boolean;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
onChange: (value: DateValue) => void;
|
|
9
|
+
onToggle: (checked: boolean) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare function ExpirationSection({ canChange, error, expiration, isChecked, isDisabled, onChange, onToggle, }: ExpirationSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export interface PasswordSectionProps {
|
|
2
|
+
canChange: boolean;
|
|
3
|
+
error?: string;
|
|
4
|
+
isAvailable: boolean;
|
|
5
|
+
isChecked: boolean;
|
|
6
|
+
isDefaultChecked: boolean;
|
|
7
|
+
isDisabled: boolean;
|
|
8
|
+
onBlur: (event: React.FocusEvent<HTMLInputElement>) => void;
|
|
9
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
10
|
+
onFocus: () => void;
|
|
11
|
+
onToggle: (checked: boolean) => void;
|
|
12
|
+
password: string;
|
|
13
|
+
}
|
|
14
|
+
export declare function PasswordSection({ canChange, error, isAvailable, isChecked, isDefaultChecked, isDisabled, onBlur, onChange, onFocus, onToggle, password, }: PasswordSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface VanitySectionProps {
|
|
2
|
+
canChange: boolean;
|
|
3
|
+
error?: string;
|
|
4
|
+
isAvailable: boolean;
|
|
5
|
+
isChecked: boolean;
|
|
6
|
+
isDisabled: boolean;
|
|
7
|
+
onChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
8
|
+
onToggle: (checked: boolean) => void;
|
|
9
|
+
vanityDomain: string;
|
|
10
|
+
vanityName: string;
|
|
11
|
+
}
|
|
12
|
+
export declare function VanitySection({ canChange, error, isAvailable, isChecked, isDisabled, onChange, onToggle, vanityDomain, vanityName, }: VanitySectionProps): import("react/jsx-runtime").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/unified-share-modal",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"@box/blueprint-web": "^9.18.13",
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"react-intl": "^6.4.2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
|
-
"@box/blueprint-web": "^12.
|
|
16
|
+
"@box/blueprint-web": "^12.103.0",
|
|
17
17
|
"@box/blueprint-web-assets": "^4.85.0",
|
|
18
|
-
"@box/copy-input": "^1.15.
|
|
18
|
+
"@box/copy-input": "^1.15.2",
|
|
19
19
|
"@box/storybook-utils": "0.14.22",
|
|
20
20
|
"@box/eslint-plugin-blueprint": "1.0.5",
|
|
21
21
|
"react-intl": "^6.4.2"
|