@box/metadata-editor 1.50.0 → 1.51.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/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +61 -50
- package/dist/styles/metadata-instance.css +1 -1
- package/dist/types/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.d.ts +1 -1
- package/dist/types/lib/components/combobox-with-api-pagination/types.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/types.d.ts +1 -1
- package/package.json +10 -10
|
@@ -1,64 +1,75 @@
|
|
|
1
|
-
import { Card as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { useAutofill as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { Card as x, Divider as v } from "@box/blueprint-web";
|
|
2
|
+
import { useState as S } from "react";
|
|
3
|
+
import { useAutofill as F } from "../../../../utils/autofill-context.js";
|
|
4
|
+
import { getFieldsNeedingReview as H } from "../../../../utils/confidence-score/get-fields-needing-review.js";
|
|
5
|
+
import { MetadataEmptyState as M } from "../../../metadata-empty-state/metadata-empty-state.js";
|
|
6
|
+
import { MetadataInstanceContent as R } from "../metadata-instance-content/metadata-instance-content.js";
|
|
7
|
+
import { MetadataInstanceFooter as b } from "../metadata-instance-footer/metadata-instance-footer.js";
|
|
8
|
+
import { MetadataInstanceHeader as C } from "../metadata-instance-header/metadata-instance-header.js";
|
|
9
|
+
import { MetadataInstanceReviewNotice as j } from "../../../metadata-instance-review-notice/metadata-instance-review-notice.js";
|
|
10
|
+
import { jsxs as d, jsx as t, Fragment as p } from "react/jsx-runtime";
|
|
11
|
+
import '../../../../../../styles/metadata-instance.css';const T = "_topDivider_1xnom_1", k = "_reviewNotice_1xnom_5", B = "_bottomDivider_1xnom_9", l = {
|
|
12
|
+
topDivider: T,
|
|
13
|
+
reviewNotice: k,
|
|
14
|
+
bottomDivider: B
|
|
15
|
+
}, X = ({
|
|
13
16
|
areAiSuggestionsAvailable: y,
|
|
14
|
-
isAiSuggestionsFeatureEnabled:
|
|
15
|
-
isBetaLanguageEnabled:
|
|
16
|
-
onEdit:
|
|
17
|
-
templateInstance:
|
|
17
|
+
isAiSuggestionsFeatureEnabled: n,
|
|
18
|
+
isBetaLanguageEnabled: f,
|
|
19
|
+
onEdit: s,
|
|
20
|
+
templateInstance: e,
|
|
18
21
|
taxonomyNodeFetcher: h,
|
|
19
|
-
isAdvancedExtractAgentEnabled:
|
|
20
|
-
isConfidenceScoreReviewEnabled:
|
|
22
|
+
isAdvancedExtractAgentEnabled: N = !1,
|
|
23
|
+
isConfidenceScoreReviewEnabled: m = !1
|
|
21
24
|
}) => {
|
|
22
|
-
const i =
|
|
23
|
-
getAiSuggestions:
|
|
24
|
-
} =
|
|
25
|
-
|
|
25
|
+
const i = e.fields, c = (o) => !o.value || Array.isArray(o.value) && o.value.length === 0, g = i.every(c), w = i.some(c), E = i.length > 0, u = H(i).length, V = m && u > 0, [r, a] = S(!0), {
|
|
26
|
+
getAiSuggestions: A
|
|
27
|
+
} = F(), D = (o) => {
|
|
28
|
+
s(e), A(e.templateKey, e.scope, o);
|
|
29
|
+
}, _ = () => {
|
|
30
|
+
s(e, !0);
|
|
26
31
|
};
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
children: [/* @__PURE__ */
|
|
32
|
+
return /* @__PURE__ */ d(x, {
|
|
33
|
+
children: [/* @__PURE__ */ t(C, {
|
|
29
34
|
areAiSuggestionsAvailable: y,
|
|
30
|
-
canEdit:
|
|
31
|
-
isAdvancedExtractAgentEnabled:
|
|
32
|
-
isAiSuggestionsFeatureEnabled:
|
|
33
|
-
isBetaLanguageEnabled:
|
|
34
|
-
onAutofill:
|
|
35
|
-
onEdit: () =>
|
|
36
|
-
templateName:
|
|
37
|
-
}), /* @__PURE__ */
|
|
38
|
-
className:
|
|
39
|
-
}),
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
canEdit: e.canEdit,
|
|
36
|
+
isAdvancedExtractAgentEnabled: N,
|
|
37
|
+
isAiSuggestionsFeatureEnabled: n,
|
|
38
|
+
isBetaLanguageEnabled: f,
|
|
39
|
+
onAutofill: D,
|
|
40
|
+
onEdit: () => s(e),
|
|
41
|
+
templateName: e?.displayName
|
|
42
|
+
}), /* @__PURE__ */ t(v, {
|
|
43
|
+
className: l.topDivider
|
|
44
|
+
}), V && /* @__PURE__ */ t("div", {
|
|
45
|
+
className: l.reviewNotice,
|
|
46
|
+
children: /* @__PURE__ */ t(j, {
|
|
47
|
+
fieldsNeedingReviewCount: u,
|
|
48
|
+
onTextToggleClick: _
|
|
49
|
+
})
|
|
50
|
+
}), r && g ? /* @__PURE__ */ t(M, {
|
|
51
|
+
isAnyEmptyValueHidden: E,
|
|
52
|
+
isBoxAiSuggestionsFeatureEnabled: n,
|
|
42
53
|
level: "instance",
|
|
43
|
-
onShowEmptyValues: () =>
|
|
44
|
-
}) : /* @__PURE__ */
|
|
45
|
-
children: [/* @__PURE__ */
|
|
46
|
-
isConfidenceScoreReviewEnabled:
|
|
47
|
-
shouldHideEmptyValues:
|
|
54
|
+
onShowEmptyValues: () => a(!1)
|
|
55
|
+
}) : /* @__PURE__ */ d(p, {
|
|
56
|
+
children: [/* @__PURE__ */ t(R, {
|
|
57
|
+
isConfidenceScoreReviewEnabled: m,
|
|
58
|
+
shouldHideEmptyValues: r,
|
|
48
59
|
taxonomyNodeFetcher: h,
|
|
49
|
-
templateInstance:
|
|
50
|
-
}),
|
|
51
|
-
children: [/* @__PURE__ */
|
|
52
|
-
className:
|
|
53
|
-
}), /* @__PURE__ */
|
|
54
|
-
isAnyEmptyValueHidden:
|
|
55
|
-
onHideEmptyValues: () =>
|
|
56
|
-
onShowEmptyValues: () =>
|
|
60
|
+
templateInstance: e
|
|
61
|
+
}), w && /* @__PURE__ */ d(p, {
|
|
62
|
+
children: [/* @__PURE__ */ t(v, {
|
|
63
|
+
className: l.bottomDivider
|
|
64
|
+
}), /* @__PURE__ */ t(b, {
|
|
65
|
+
isAnyEmptyValueHidden: r,
|
|
66
|
+
onHideEmptyValues: () => a(!0),
|
|
67
|
+
onShowEmptyValues: () => a(!1)
|
|
57
68
|
})]
|
|
58
69
|
})]
|
|
59
70
|
})]
|
|
60
71
|
});
|
|
61
72
|
};
|
|
62
73
|
export {
|
|
63
|
-
|
|
74
|
+
X as MetadataInstance
|
|
64
75
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._topDivider_1xnom_1,._reviewNotice_1xnom_5{margin-block-end:var(--bp-space-040)}._bottomDivider_1xnom_9{margin-block-start:var(--bp-space-040)}
|
package/dist/types/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.d.ts
CHANGED
|
@@ -15,4 +15,4 @@ export declare const ComboboxWithApiPagination: import('react').ForwardRefExotic
|
|
|
15
15
|
experimentalVirtualization?: boolean;
|
|
16
16
|
className?: string;
|
|
17
17
|
displaySingleSelectionAsChip?: boolean;
|
|
18
|
-
} & import('@box/blueprint-web').Labelable & import('react').RefAttributes<HTMLInputElement>>;
|
|
18
|
+
} & import('@box/blueprint-web/lib-esm/util-components/labelable/types').Labelable & import('react').RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Labelable } from '@box/blueprint-web/
|
|
1
|
+
import { Labelable } from '@box/blueprint-web/lib-esm/util-components/labelable/types';
|
|
2
2
|
import { ReactElement } from 'react';
|
|
3
3
|
export interface PaginationQueryInput {
|
|
4
4
|
marker?: string;
|
package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ export type MetadataInstanceProps = {
|
|
|
4
4
|
areAiSuggestionsAvailable: boolean;
|
|
5
5
|
isAiSuggestionsFeatureEnabled: boolean;
|
|
6
6
|
isBetaLanguageEnabled: boolean;
|
|
7
|
-
onEdit: (templateInstance: MetadataTemplateInstance) => void;
|
|
7
|
+
onEdit: (templateInstance: MetadataTemplateInstance, shouldEnableReviewFilter?: boolean) => void;
|
|
8
8
|
templateInstance: MetadataTemplateInstance;
|
|
9
9
|
taxonomyNodeFetcher: TaxonomyNodeFetcher;
|
|
10
10
|
isAdvancedExtractAgentEnabled?: boolean;
|
|
@@ -6,7 +6,7 @@ export type MetadataInstanceListProps = {
|
|
|
6
6
|
isBetaLanguageEnabled: boolean;
|
|
7
7
|
isAdvancedExtractAgentEnabled?: boolean;
|
|
8
8
|
isConfidenceScoreReviewEnabled?: boolean;
|
|
9
|
-
onEdit: (
|
|
9
|
+
onEdit: (templateInstance: MetadataTemplateInstance, shouldEnableReviewFilter?: boolean) => void;
|
|
10
10
|
templateInstances: MetadataTemplateInstance[];
|
|
11
11
|
taxonomyNodeFetcher: TaxonomyNodeFetcher;
|
|
12
12
|
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.51.1",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ariakit/react": "0.4.15",
|
|
6
|
-
"@box/box-ai-agent-selector": "^1.38.
|
|
7
|
-
"@box/blueprint-web": "^13.3.
|
|
8
|
-
"@box/blueprint-web-assets": "^4.101.
|
|
9
|
-
"@box/combobox-with-api": "^1.41.
|
|
6
|
+
"@box/box-ai-agent-selector": "^1.38.2",
|
|
7
|
+
"@box/blueprint-web": "^13.3.2",
|
|
8
|
+
"@box/blueprint-web-assets": "^4.101.16",
|
|
9
|
+
"@box/combobox-with-api": "^1.41.3",
|
|
10
10
|
"formik": "^2.0.3",
|
|
11
11
|
"lodash": "^4.17.15",
|
|
12
12
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -15,11 +15,11 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@ariakit/react": "0.4.15",
|
|
18
|
-
"@box/box-ai-agent-selector": "^1.38.
|
|
19
|
-
"@box/babel-plugin-target-attributes": "1.5.
|
|
20
|
-
"@box/blueprint-web": "^13.3.
|
|
21
|
-
"@box/blueprint-web-assets": "^4.101.
|
|
22
|
-
"@box/storybook-utils": "^0.16.
|
|
18
|
+
"@box/box-ai-agent-selector": "^1.38.2",
|
|
19
|
+
"@box/babel-plugin-target-attributes": "1.5.2",
|
|
20
|
+
"@box/blueprint-web": "^13.3.2",
|
|
21
|
+
"@box/blueprint-web-assets": "^4.101.16",
|
|
22
|
+
"@box/storybook-utils": "^0.16.53",
|
|
23
23
|
"@testing-library/react": "^15.0.6",
|
|
24
24
|
"react": "^18.3.0",
|
|
25
25
|
"react-dom": "^18.3.0",
|