@box/metadata-editor 1.32.2 → 1.34.0
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/types.js +5 -2
- package/dist/esm/index.js +38 -37
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +49 -48
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +38 -35
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +92 -90
- package/dist/esm/lib/components/metadata-instance-list/metadata-instance-list.js +13 -11
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +27 -25
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +11 -9
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.js +9 -7
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +19 -17
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.js +21 -19
- package/dist/esm/lib/utils/confidence-score/format-confidence-score-percent.js +6 -0
- package/dist/esm/lib/utils/confidence-score/get-confidence-score-tooltip.js +25 -0
- package/dist/esm/lib/utils/confidence-score/get-fields-needing-review.js +7 -0
- package/dist/esm/lib/utils/confidence-score/messages.js +18 -0
- package/dist/i18n/bn-IN.js +4 -1
- package/dist/i18n/bn-IN.properties +1 -1
- package/dist/i18n/da-DK.js +4 -1
- package/dist/i18n/da-DK.properties +1 -1
- package/dist/i18n/de-DE.js +4 -1
- package/dist/i18n/de-DE.properties +1 -1
- package/dist/i18n/en-AU.js +3 -0
- package/dist/i18n/en-CA.js +3 -0
- package/dist/i18n/en-GB.js +3 -0
- package/dist/i18n/en-US.js +3 -0
- package/dist/i18n/en-US.properties +6 -0
- package/dist/i18n/en-x-pseudo.js +133 -130
- package/dist/i18n/en-x-pseudo.properties +130 -130
- package/dist/i18n/es-419.js +4 -1
- package/dist/i18n/es-419.properties +1 -1
- package/dist/i18n/es-ES.js +4 -1
- package/dist/i18n/es-ES.properties +1 -1
- package/dist/i18n/fi-FI.js +4 -1
- package/dist/i18n/fi-FI.properties +1 -1
- package/dist/i18n/fr-CA.js +4 -1
- package/dist/i18n/fr-CA.properties +1 -1
- package/dist/i18n/fr-FR.js +4 -1
- package/dist/i18n/fr-FR.properties +1 -1
- package/dist/i18n/hi-IN.js +4 -1
- package/dist/i18n/hi-IN.properties +1 -1
- package/dist/i18n/it-IT.js +4 -1
- package/dist/i18n/it-IT.properties +1 -1
- package/dist/i18n/ja-JP.js +4 -1
- package/dist/i18n/ja-JP.properties +1 -1
- package/dist/i18n/json/src/lib/utils/confidence-score/messages.json +1 -0
- package/dist/i18n/ko-KR.js +4 -1
- package/dist/i18n/ko-KR.properties +1 -1
- package/dist/i18n/nb-NO.js +4 -1
- package/dist/i18n/nb-NO.properties +1 -1
- package/dist/i18n/nl-NL.js +4 -1
- package/dist/i18n/nl-NL.properties +1 -1
- package/dist/i18n/pl-PL.js +4 -1
- package/dist/i18n/pl-PL.properties +1 -1
- package/dist/i18n/pt-BR.js +4 -1
- package/dist/i18n/pt-BR.properties +1 -1
- package/dist/i18n/ru-RU.js +4 -1
- package/dist/i18n/ru-RU.properties +1 -1
- package/dist/i18n/sv-SE.js +4 -1
- package/dist/i18n/sv-SE.properties +1 -1
- package/dist/i18n/tr-TR.js +4 -1
- package/dist/i18n/tr-TR.properties +1 -1
- package/dist/i18n/zh-CN.js +4 -1
- package/dist/i18n/zh-CN.properties +1 -1
- package/dist/i18n/zh-TW.js +4 -1
- package/dist/i18n/zh-TW.properties +1 -1
- package/dist/types/lib/components/metadata-editor-fields/types.d.ts +2 -0
- package/dist/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +2 -0
- package/dist/types/lib/components/metadata-instance-list/metadata-instance-list.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance/types.d.ts +1 -0
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/types.d.ts +1 -0
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.d.ts +1 -1
- package/dist/types/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/types.d.ts +3 -0
- package/dist/types/lib/components/metadata-instance-list/types.d.ts +1 -0
- package/dist/types/lib/types.d.ts +16 -0
- package/dist/types/lib/utils/confidence-score/format-confidence-score-percent.d.ts +13 -0
- package/dist/types/lib/utils/confidence-score/get-confidence-score-tooltip.d.ts +10 -0
- package/dist/types/lib/utils/confidence-score/get-fields-needing-review.d.ts +7 -0
- package/dist/types/lib/utils/confidence-score/messages.d.ts +18 -0
- package/package.json +4 -4
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Formats a confidence score value (0-1) as a percentage string.
|
|
3
|
+
* Uses Math.floor() to be conservative - never inflates confidence artificially.
|
|
4
|
+
* This prevents UX confusion when score is just below threshold (e.g., 89.9% shows as 89%, not 90%)
|
|
5
|
+
*
|
|
6
|
+
* @param value - Confidence score from 0 to 1 (e.g., 0.95)
|
|
7
|
+
* @returns Formatted percentage string (e.g., "95%")
|
|
8
|
+
*
|
|
9
|
+
* @example
|
|
10
|
+
* formatConfidenceScorePercent(0.899) // "89%" (not "90%")
|
|
11
|
+
* formatConfidenceScorePercent(0.95) // "95%"
|
|
12
|
+
*/
|
|
13
|
+
export declare function formatConfidenceScorePercent(value: number): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IntlShape } from 'react-intl';
|
|
2
|
+
import { ConfidenceScoreStatus } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Returns appropriate tooltip text based on confidence score status
|
|
5
|
+
* @param formatMessage - IntlShape formatMessage function
|
|
6
|
+
* @param status - Confidence score status
|
|
7
|
+
* @param scoreValue - Confidence score value (0-1)
|
|
8
|
+
* @returns Tooltip text for the field, or null if status is unknown
|
|
9
|
+
*/
|
|
10
|
+
export declare function getConfidenceScoreTooltip(formatMessage: IntlShape['formatMessage'], status: ConfidenceScoreStatus, scoreValue: number): string | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { MetadataTemplateField } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns fields that need review (confidence score below threshold)
|
|
4
|
+
* @param fields - Array of metadata template fields
|
|
5
|
+
* @returns Array of visible fields with status 'review_is_needed'
|
|
6
|
+
*/
|
|
7
|
+
export declare function getFieldsNeedingReview(fields: MetadataTemplateField[]): MetadataTemplateField[];
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
declare const messages: {
|
|
2
|
+
tooltipLowConfidence: {
|
|
3
|
+
defaultMessage: string;
|
|
4
|
+
description: string;
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
tooltipReviewedAndAccepted: {
|
|
8
|
+
defaultMessage: string;
|
|
9
|
+
description: string;
|
|
10
|
+
id: string;
|
|
11
|
+
};
|
|
12
|
+
tooltipHighConfidence: {
|
|
13
|
+
defaultMessage: string;
|
|
14
|
+
description: string;
|
|
15
|
+
id: string;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
export default messages;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@box/metadata-editor",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.34.0",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@ariakit/react": "0.4.15",
|
|
6
|
-
"@box/box-ai-agent-selector": "^1.
|
|
6
|
+
"@box/box-ai-agent-selector": "^1.29.0",
|
|
7
7
|
"@box/blueprint-web": "^12.134.0",
|
|
8
8
|
"@box/blueprint-web-assets": "^4.99.9",
|
|
9
|
-
"@box/combobox-with-api": "^1.
|
|
9
|
+
"@box/combobox-with-api": "^1.31.0",
|
|
10
10
|
"formik": "^2.0.3",
|
|
11
11
|
"lodash": "^4.17.15",
|
|
12
12
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@ariakit/react": "0.4.15",
|
|
18
|
-
"@box/box-ai-agent-selector": "^1.
|
|
18
|
+
"@box/box-ai-agent-selector": "^1.29.0",
|
|
19
19
|
"@box/babel-plugin-target-attributes": "1.4.0",
|
|
20
20
|
"@box/blueprint-web": "^12.134.0",
|
|
21
21
|
"@box/blueprint-web-assets": "^4.99.9",
|