@box/metadata-editor 0.78.4 → 0.78.6
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,16 +1,16 @@
|
|
1
1
|
import "../../../../styles/filter-instances-dropdown.css";
|
2
|
-
import { TriggerButton as v, Text as C, ScrollableContainer as N, Divider as
|
3
|
-
import { useIntl as
|
4
|
-
import { SelectProvider as
|
5
|
-
import { Space1 as
|
6
|
-
import { useEffect as
|
7
|
-
import
|
2
|
+
import { TriggerButton as v, Text as C, ScrollableContainer as N, Divider as x } from "@box/blueprint-web";
|
3
|
+
import { useIntl as B } from "react-intl";
|
4
|
+
import { SelectProvider as b, Select as I, SelectPopover as k, SelectItem as g, SelectItemCheck as M } from "@ariakit/react";
|
5
|
+
import { Space1 as S } from "@box/blueprint-web-assets/tokens/px-tokens";
|
6
|
+
import { useEffect as y } from "react";
|
7
|
+
import D from "clsx";
|
8
8
|
import { Checkmark as p } from "@box/blueprint-web-assets/icons/Fill";
|
9
|
-
import { getVisibleTemplates as
|
9
|
+
import { getVisibleTemplates as j, getTemplateDisplayName as _ } from "../../utils/utils.js";
|
10
10
|
import s from "./messages.js";
|
11
11
|
import { jsxs as o, jsx as e } from "react/jsx-runtime";
|
12
|
-
const
|
13
|
-
details:
|
12
|
+
const w = "_details_19fcm_1", F = "_triggerContainer_19fcm_5", O = "_triggerButton_19fcm_10", P = "_popover_19fcm_16", L = "_divider_19fcm_33", V = "_scrollableContainer_19fcm_36", z = "_item_19fcm_40", E = "_indicator_19fcm_67", G = "_indicatorIcon_19fcm_76", R = "_testContainer_19fcm_80", t = {
|
13
|
+
details: w,
|
14
14
|
triggerContainer: F,
|
15
15
|
triggerButton: O,
|
16
16
|
popover: P,
|
@@ -20,26 +20,26 @@ const j = "_details_w5gf4_1", F = "_triggerContainer_w5gf4_5", O = "_triggerButt
|
|
20
20
|
indicator: E,
|
21
21
|
indicatorIcon: G,
|
22
22
|
testContainer: R
|
23
|
-
}, q = parseInt(
|
23
|
+
}, q = parseInt(S, 10);
|
24
24
|
function tt({
|
25
25
|
appliedTemplates: f,
|
26
26
|
selectedTemplates: c,
|
27
27
|
setSelectedTemplates: l
|
28
28
|
}) {
|
29
|
-
const a =
|
29
|
+
const a = B(), d = a.formatMessage(s.customMetadataName), n = j(f), i = c.length, m = n.length, u = i === 0 ? a.formatMessage(s.allTemplatesTriggerButtonText) : a.formatMessage(s.selectedTemplatesTriggerButtonText, {
|
30
30
|
selectedTemplatesNumber: i,
|
31
31
|
visibleTemplatesNumber: m
|
32
32
|
}), h = () => {
|
33
33
|
l([]);
|
34
34
|
};
|
35
|
-
return
|
35
|
+
return y(() => {
|
36
36
|
i === m && l([]);
|
37
|
-
}, [i, m]), /* @__PURE__ */ o(
|
37
|
+
}, [i, m]), /* @__PURE__ */ o(b, {
|
38
38
|
setValue: l,
|
39
39
|
value: c,
|
40
40
|
children: [/* @__PURE__ */ o("div", {
|
41
41
|
className: t.triggerContainer,
|
42
|
-
children: [/* @__PURE__ */ e(
|
42
|
+
children: [/* @__PURE__ */ e(I, {
|
43
43
|
render: /* @__PURE__ */ e(v, {
|
44
44
|
caretDirection: "down",
|
45
45
|
className: t.triggerButton,
|
@@ -54,28 +54,28 @@ function tt({
|
|
54
54
|
color: "textOnLightSecondary",
|
55
55
|
"data-testid": "detailsList",
|
56
56
|
variant: "caption",
|
57
|
-
children: n.filter((r) => c.some((T) => T === r.id)).map((r) => _(r,
|
57
|
+
children: n.filter((r) => c.some((T) => T === r.id)).map((r) => _(r, d)).join(", ")
|
58
58
|
})]
|
59
|
-
}), /* @__PURE__ */ e(
|
59
|
+
}), /* @__PURE__ */ e(k, {
|
60
60
|
className: t.popover,
|
61
61
|
gutter: q,
|
62
62
|
children: /* @__PURE__ */ o(N, {
|
63
63
|
className: t.scrollableContainer,
|
64
|
-
children: [/* @__PURE__ */ o(
|
64
|
+
children: [/* @__PURE__ */ o(g, {
|
65
65
|
autoFocus: i === 0,
|
66
66
|
className: t.item,
|
67
67
|
hideOnClick: !0,
|
68
68
|
onClick: h,
|
69
69
|
children: [i === 0 && /* @__PURE__ */ e(p, {
|
70
|
-
className:
|
70
|
+
className: D(t.indicator, t.indicatorIcon)
|
71
71
|
}), a.formatMessage(s.allTemplatesTriggerButtonText)]
|
72
|
-
}), /* @__PURE__ */ e(
|
72
|
+
}), /* @__PURE__ */ e(x, {
|
73
73
|
className: t.divider
|
74
|
-
}), n.map((r) => /* @__PURE__ */ o(
|
74
|
+
}), n.map((r) => /* @__PURE__ */ o(g, {
|
75
75
|
className: t.item,
|
76
76
|
hideOnClick: !0,
|
77
77
|
value: r.id,
|
78
|
-
children: [/* @__PURE__ */ e(
|
78
|
+
children: [/* @__PURE__ */ e(M, {
|
79
79
|
className: t.indicator,
|
80
80
|
style: {
|
81
81
|
width: "none",
|
@@ -84,7 +84,7 @@ function tt({
|
|
84
84
|
children: /* @__PURE__ */ e(p, {
|
85
85
|
className: t.indicatorIcon
|
86
86
|
})
|
87
|
-
}), _(r,
|
87
|
+
}), _(r, d)]
|
88
88
|
}, r.id))]
|
89
89
|
})
|
90
90
|
})]
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@box/metadata-editor",
|
3
|
-
"version": "0.78.
|
3
|
+
"version": "0.78.6",
|
4
4
|
"peerDependencies": {
|
5
5
|
"@ariakit/react": "0.4.14",
|
6
6
|
"@box/blueprint-web": "^7.30.3",
|
@@ -14,7 +14,7 @@
|
|
14
14
|
"devDependencies": {
|
15
15
|
"@ariakit/react": "0.4.14",
|
16
16
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
17
|
-
"@box/blueprint-web": "^9.1.
|
17
|
+
"@box/blueprint-web": "^9.1.2",
|
18
18
|
"@box/blueprint-web-assets": "^4.30.0",
|
19
19
|
"@box/storybook-utils": "^0.7.0",
|
20
20
|
"@testing-library/react": "^15.0.6",
|
@@ -53,5 +53,5 @@
|
|
53
53
|
"**/*.css"
|
54
54
|
],
|
55
55
|
"license": "SEE LICENSE IN LICENSE",
|
56
|
-
"gitHead": "
|
56
|
+
"gitHead": "a5f9b84b4eb842559e9bbabdf08368e74f0e6a3f"
|
57
57
|
}
|
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._details_19fcm_1{padding-inline:var(--size-1)}._triggerContainer_19fcm_5{display:flex;flex-direction:column}._triggerButton_19fcm_10{min-height:var(--size-6)!important;max-width:max-content;padding:0 var(--space-1)!important}._popover_19fcm_16{font-weight:400;font-size:.875rem;font-family:Lato,-apple-system,BlinkMacSystemFont,San Francisco,Segoe UI,Roboto,Helvetica Neue,sans-serif;line-height:1.25rem;letter-spacing:.01875rem;text-transform:none;text-decoration:none;z-index:var(--z-index-popover);box-sizing:border-box;max-width:17.75rem;padding:0;background-color:var(--surface-menu-surface);border:var(--border-1) solid var(--border-card-border);border-radius:var(--radius-3);box-shadow:var(--dropshadow-3)}._popover_19fcm_16 ._divider_19fcm_33{margin-block:var(--space-2)}._popover_19fcm_16 ._scrollableContainer_19fcm_36{padding:var(--space-3);max-height:22.5rem}._popover_19fcm_16 ._item_19fcm_40{position:relative;align-items:center;padding:var(--border-8) var(--space-2) var(--border-8) var(--space-10);border:var(--border-2) solid transparent;border-radius:var(--radius-3);outline:none;-webkit-user-select:none;user-select:none;cursor:pointer;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}._popover_19fcm_16 ._item_19fcm_40[aria-disabled]{color:var(--gray-65);pointer-events:none}._popover_19fcm_16 ._item_19fcm_40[data-active-item]:not(:hover),._popover_19fcm_16 ._item_19fcm_40[data-highlighted]:not(:hover){background-color:var(--surface-menu-surface-hover);border:var(--border-2) solid var(--border-input-border-focus)}._popover_19fcm_16 ._item_19fcm_40[data-state=open],._popover_19fcm_16 ._item_19fcm_40:hover{background-color:var(--surface-menu-surface-hover)}._popover_19fcm_16 ._indicator_19fcm_67{position:absolute;top:0;left:var(--space-2);display:flex;align-items:center;justify-content:center;height:var(--size-9)}._popover_19fcm_16 ._indicatorIcon_19fcm_76 path{fill:var(--icon-icon-on-light)}._testContainer_19fcm_80{border:2px #9f3fed dashed;height:56px;width:340px;display:flex;align-items:center}
|