@box/metadata-editor 1.3.5 → 1.3.7
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/chunks/utils2.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { BoxAiLogo as s } from "@box/blueprint-web-assets/icons/Logo";
|
|
2
2
|
import i from "../esm/lib/components/interactive-text/interactive-text.js";
|
|
3
|
-
import { convertISOStringtoRFC3339String as
|
|
4
|
-
import { jsxs as
|
|
5
|
-
import '../styles/utils.css';const _ = "
|
|
3
|
+
import { convertISOStringtoRFC3339String as c } from "../esm/lib/utils/convertDate.js";
|
|
4
|
+
import { jsxs as g, jsx as l } from "react/jsx-runtime";
|
|
5
|
+
import '../styles/utils.css';const _ = "_noAttributesText_fefg3_2", f = "_fieldWrapper_fefg3_6", b = "_hasSuggestion_fefg3_11", p = "_error_fefg3_20", d = "_dateField_fefg3_33", x = "_suggestionApplied_fefg3_37", m = "_comboboxContainer_fefg3_37", u = "_labelWrapper_fefg3_52", T = "_labelText_fefg3_58", h = "_labelIcon_fefg3_61", o = {
|
|
6
6
|
noAttributesText: _,
|
|
7
|
-
fieldWrapper:
|
|
7
|
+
fieldWrapper: f,
|
|
8
8
|
hasSuggestion: b,
|
|
9
|
-
error:
|
|
9
|
+
error: p,
|
|
10
10
|
dateField: d,
|
|
11
|
-
suggestionApplied:
|
|
11
|
+
suggestionApplied: x,
|
|
12
12
|
comboboxContainer: m,
|
|
13
13
|
labelWrapper: u,
|
|
14
14
|
labelText: T,
|
|
15
|
-
labelIcon:
|
|
16
|
-
},
|
|
15
|
+
labelIcon: h
|
|
16
|
+
}, F = (t, e, r = !1, n = "label") => (a) => /* @__PURE__ */ g("div", {
|
|
17
17
|
className: o.labelWrapper,
|
|
18
18
|
children: [e ? /* @__PURE__ */ l(i, {
|
|
19
19
|
as: n,
|
|
@@ -28,16 +28,16 @@ import '../styles/utils.css';const _ = "_noAttributesText_tpqxf_2", x = "_fieldW
|
|
|
28
28
|
}), r && /* @__PURE__ */ l(s, {
|
|
29
29
|
className: o.labelIcon
|
|
30
30
|
})]
|
|
31
|
-
}),
|
|
31
|
+
}), N = (t) => {
|
|
32
32
|
try {
|
|
33
|
-
const e =
|
|
33
|
+
const e = c(t), r = new Date(e);
|
|
34
34
|
return isNaN(r.getTime()) ? null : e;
|
|
35
35
|
} catch {
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
export {
|
|
40
|
-
|
|
40
|
+
F as g,
|
|
41
41
|
o as s,
|
|
42
|
-
|
|
42
|
+
N as t
|
|
43
43
|
};
|
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
import { Text as
|
|
2
|
-
import { Checkmark as
|
|
3
|
-
import { useIntl as
|
|
1
|
+
import { useBlueprintModernization as C, Text as s, IconButton as c, DropdownMenu as a } from "@box/blueprint-web";
|
|
2
|
+
import { Checkmark as p, Ellipsis as I } from "@box/blueprint-web-assets/icons/Fill";
|
|
3
|
+
import { useIntl as w, FormattedMessage as r } from "react-intl";
|
|
4
4
|
import t from "./messages.js";
|
|
5
|
-
import { formatSuggestionValue as
|
|
6
|
-
import { jsx as e, jsxs as
|
|
7
|
-
import '../../../../../../styles/ai-suggestion-field.css';const
|
|
8
|
-
wrapperGradient:
|
|
9
|
-
wrapper:
|
|
5
|
+
import { formatSuggestionValue as x } from "./utils.js";
|
|
6
|
+
import { jsx as e, jsxs as n, Fragment as u } from "react/jsx-runtime";
|
|
7
|
+
import '../../../../../../styles/ai-suggestion-field.css';const _ = "_wrapperGradient_mllxq_1", M = "_wrapper_mllxq_1", b = "_buttons_mllxq_23", v = "_selectTrigger_mllxq_27", o = {
|
|
8
|
+
wrapperGradient: _,
|
|
9
|
+
wrapper: M,
|
|
10
10
|
buttons: b,
|
|
11
|
-
selectTrigger:
|
|
11
|
+
selectTrigger: v
|
|
12
12
|
};
|
|
13
|
-
function
|
|
13
|
+
function z({
|
|
14
14
|
aiSuggestion: S,
|
|
15
|
-
onAiSuggestionAppend:
|
|
16
|
-
onAiSuggestionReplace:
|
|
17
|
-
onAiSuggestionIgnore:
|
|
18
|
-
type:
|
|
15
|
+
onAiSuggestionAppend: d,
|
|
16
|
+
onAiSuggestionReplace: g,
|
|
17
|
+
onAiSuggestionIgnore: m,
|
|
18
|
+
type: i,
|
|
19
19
|
isSameValue: h
|
|
20
20
|
}) {
|
|
21
|
-
const
|
|
21
|
+
const l = w(), {
|
|
22
|
+
enableModernizedComponents: f
|
|
23
|
+
} = C();
|
|
22
24
|
return /* @__PURE__ */ e("div", {
|
|
23
25
|
className: o.wrapperGradient,
|
|
26
|
+
"data-modern": f,
|
|
24
27
|
children: /* @__PURE__ */ e("div", {
|
|
25
28
|
className: o.wrapper,
|
|
26
|
-
children: h ? /* @__PURE__ */
|
|
27
|
-
children: [/* @__PURE__ */ e(
|
|
29
|
+
children: h ? /* @__PURE__ */ n(u, {
|
|
30
|
+
children: [/* @__PURE__ */ e(s, {
|
|
28
31
|
as: "p",
|
|
29
32
|
color: "textOnLightSecondary",
|
|
30
33
|
variant: "caption",
|
|
@@ -34,60 +37,60 @@ function N({
|
|
|
34
37
|
}), /* @__PURE__ */ e("div", {
|
|
35
38
|
className: o.buttons,
|
|
36
39
|
children: /* @__PURE__ */ e(c, {
|
|
37
|
-
"aria-label":
|
|
38
|
-
icon:
|
|
39
|
-
onClick:
|
|
40
|
+
"aria-label": l.formatMessage(t.aiSuggestionConfirm),
|
|
41
|
+
icon: p,
|
|
42
|
+
onClick: m,
|
|
40
43
|
size: "x-small",
|
|
41
44
|
"data-target-id": "IconButton-aiSuggestionConfirm"
|
|
42
45
|
})
|
|
43
46
|
})]
|
|
44
|
-
}) : /* @__PURE__ */
|
|
45
|
-
children: [/* @__PURE__ */
|
|
46
|
-
children: [/* @__PURE__ */ e(
|
|
47
|
+
}) : /* @__PURE__ */ n(u, {
|
|
48
|
+
children: [/* @__PURE__ */ n("div", {
|
|
49
|
+
children: [/* @__PURE__ */ e(s, {
|
|
47
50
|
as: "p",
|
|
48
51
|
color: "textOnLightSecondary",
|
|
49
52
|
variant: "caption",
|
|
50
53
|
children: /* @__PURE__ */ e(r, {
|
|
51
54
|
...t.aiSuggestionCaption
|
|
52
55
|
})
|
|
53
|
-
}), /* @__PURE__ */ e(
|
|
56
|
+
}), /* @__PURE__ */ e(s, {
|
|
54
57
|
as: "p",
|
|
55
|
-
children:
|
|
56
|
-
type:
|
|
57
|
-
locale:
|
|
58
|
+
children: x(S, {
|
|
59
|
+
type: i,
|
|
60
|
+
locale: l.locale
|
|
58
61
|
})
|
|
59
62
|
})]
|
|
60
|
-
}), /* @__PURE__ */
|
|
63
|
+
}), /* @__PURE__ */ n("div", {
|
|
61
64
|
className: o.buttons,
|
|
62
65
|
children: [/* @__PURE__ */ e(c, {
|
|
63
|
-
"aria-label":
|
|
64
|
-
"data-target-id":
|
|
65
|
-
icon:
|
|
66
|
-
onClick:
|
|
66
|
+
"aria-label": l.formatMessage(i === "multiSelect" ? t.aiSuggestionAppend : t.aiSuggestionClearAndReplace),
|
|
67
|
+
"data-target-id": i === "multiSelect" ? "IconButton-aiSuggestionAppend" : "IconButton-aiSuggestionClearAndReplace",
|
|
68
|
+
icon: p,
|
|
69
|
+
onClick: i === "multiSelect" ? d : g,
|
|
67
70
|
size: "x-small"
|
|
68
|
-
}), /* @__PURE__ */
|
|
71
|
+
}), /* @__PURE__ */ n(a.Root, {
|
|
69
72
|
children: [/* @__PURE__ */ e(a.Trigger, {
|
|
70
73
|
className: o.selectTrigger,
|
|
71
74
|
children: /* @__PURE__ */ e(c, {
|
|
72
|
-
"aria-label":
|
|
73
|
-
icon:
|
|
75
|
+
"aria-label": l.formatMessage(t.aiSuggestionOptions),
|
|
76
|
+
icon: I,
|
|
74
77
|
"data-target-id": "IconButton-aiSuggestionOptions"
|
|
75
78
|
})
|
|
76
|
-
}), /* @__PURE__ */
|
|
77
|
-
children: [
|
|
78
|
-
onSelect:
|
|
79
|
+
}), /* @__PURE__ */ n(a.Content, {
|
|
80
|
+
children: [i === "multiSelect" && /* @__PURE__ */ e(a.Item, {
|
|
81
|
+
onSelect: d,
|
|
79
82
|
"data-target-id": "DropdownMenu.Item-aiSuggestionAppend",
|
|
80
83
|
children: /* @__PURE__ */ e(r, {
|
|
81
84
|
...t.aiSuggestionAppend
|
|
82
85
|
})
|
|
83
86
|
}), /* @__PURE__ */ e(a.Item, {
|
|
84
|
-
onSelect:
|
|
87
|
+
onSelect: g,
|
|
85
88
|
"data-target-id": "DropdownMenu.Item-aiSuggestionClearAndReplace",
|
|
86
89
|
children: /* @__PURE__ */ e(r, {
|
|
87
90
|
...t.aiSuggestionClearAndReplace
|
|
88
91
|
})
|
|
89
92
|
}), /* @__PURE__ */ e(a.Separator, {}), /* @__PURE__ */ e(a.Item, {
|
|
90
|
-
onSelect:
|
|
93
|
+
onSelect: m,
|
|
91
94
|
"data-target-id": "DropdownMenu.Item-aiSuggestionIgnore",
|
|
92
95
|
children: /* @__PURE__ */ e(r, {
|
|
93
96
|
...t.aiSuggestionIgnore
|
|
@@ -101,5 +104,5 @@ function N({
|
|
|
101
104
|
});
|
|
102
105
|
}
|
|
103
106
|
export {
|
|
104
|
-
|
|
107
|
+
z as AiSuggestionField
|
|
105
108
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._wrapperGradient_mllxq_1{background:linear-gradient(135deg,#fe03dc,#2784fa)}._wrapperGradient_mllxq_1[data-modern=false]{border-radius:0 0 var(--radius-2) var(--radius-2)}._wrapperGradient_mllxq_1[data-modern=true]{border-radius:0 0 var(--bp-radius-06) var(--bp-radius-06)}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1{position:relative;display:flex;align-items:center;justify-content:space-between;box-sizing:border-box;padding:var(--space-2) var(--space-3);background:var(--box-blue-02);background-clip:padding-box;border:var(--border-1) solid transparent;border-radius:inherit;-webkit-user-select:none;user-select:none}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1 ._buttons_mllxq_23{display:flex;gap:var(--space-1)}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1 ._selectTrigger_mllxq_27{width:var(--size-6);height:var(--size-6)}._wrapperGradient_mllxq_1 ._wrapper_mllxq_1>div>p{overflow-wrap:anywhere}
|
package/dist/styles/utils.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._noAttributesText_fefg3_2{text-align:center}._fieldWrapper_fefg3_6{position:relative;isolation:isolate}._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>input,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>button,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div[role=group]>div,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>div,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>input{border-bottom:none!important;border-bottom-right-radius:0!important;border-bottom-left-radius:0!important}._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>input:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>button:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div[role=group]>div:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>div:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover,._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11>div>input:not(:disabled):not(:focus-visible):not(._error_fefg3_20):hover{border-bottom:none}._fieldWrapper_fefg3_6 ._hasSuggestion_fefg3_11 div[role=group]>div{margin-right:var(--border-1);margin-left:var(--border-1)}._fieldWrapper_fefg3_6 ._dateField_fefg3_33>div[role=group]>div{padding-inline:.75rem}._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>._comboboxContainer_fefg3_37,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>input,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>button,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>div[role=group]>div,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>div>div,._fieldWrapper_fefg3_6 ._suggestionApplied_fefg3_37>div>input{box-sizing:border-box!important;background-image:linear-gradient(#fff,#fff),linear-gradient(135deg,#fe03dc,#2784fa)!important;background-clip:padding-box,border-box!important;background-origin:border-box!important;border:double var(--border-1) transparent!important;border-radius:var(--radius-2);outline:none}._labelWrapper_fefg3_52{display:flex;align-items:baseline;justify-content:space-between;width:100%}._labelWrapper_fefg3_52 ._labelText_fefg3_58{flex:unset!important}._labelWrapper_fefg3_52 ._labelIcon_fefg3_61{width:var(--space-4);height:var(--space-4);margin-inline-end:var(--space-3);margin-inline-start:var(--space-3)}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-editor",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ariakit/react": "0.4.15",
|
|
6
6
|
"@box/box-ai-agent-selector": "^0.55.2",
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@ariakit/react": "0.4.15",
|
|
18
|
-
"@box/box-ai-agent-selector": "^1.3.
|
|
18
|
+
"@box/box-ai-agent-selector": "^1.3.6",
|
|
19
19
|
"@box/babel-plugin-target-attributes": "1.3.0",
|
|
20
|
-
"@box/blueprint-web": "^12.89.
|
|
20
|
+
"@box/blueprint-web": "^12.89.2",
|
|
21
21
|
"@box/blueprint-web-assets": "^4.75.0",
|
|
22
22
|
"@box/storybook-utils": "^0.14.11",
|
|
23
23
|
"@testing-library/react": "^15.0.6",
|