@box/metadata-editor 2.3.9 → 2.3.10
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/add-metadata-template-dropdown-with-browser.js +1 -34
- package/dist/chunks/ai-suggestion-field.js +1 -100
- package/dist/chunks/autofill-overlay.js +1 -63
- package/dist/chunks/combobox-with-api-pagination.js +1 -161
- package/dist/chunks/custom-instance-new-field.js +1 -60
- package/dist/chunks/custom-instance.js +1 -74
- package/dist/chunks/delete-confirmation-modal.js +1 -76
- package/dist/chunks/field-action-bar.module.js +1 -7
- package/dist/chunks/filter-dropdown-menu.module.js +1 -12
- package/dist/chunks/filter-instances-dropdown.js +1 -84
- package/dist/chunks/interactive-header-text.js +1 -19
- package/dist/chunks/interactive-text.module.js +1 -5
- package/dist/chunks/metadata-editor.js +1 -9
- package/dist/chunks/metadata-instance-content.js +1 -43
- package/dist/chunks/metadata-instance-entry.js +1 -104
- package/dist/chunks/metadata-instance-footer.js +1 -25
- package/dist/chunks/metadata-instance-form-ai-disclaimer.js +1 -28
- package/dist/chunks/metadata-instance-form-autofill-button.js +1 -113
- package/dist/chunks/metadata-instance-form-card-wrapper.js +1 -54
- package/dist/chunks/metadata-instance-form-footer.js +1 -43
- package/dist/chunks/metadata-instance-form-header.js +1 -45
- package/dist/chunks/metadata-instance-header.js +1 -52
- package/dist/chunks/metadata-instance-list.js +1 -20
- package/dist/chunks/metadata-instance.js +1 -60
- package/dist/chunks/shared-field-styles.module.js +1 -6
- package/dist/chunks/taxonomy-ancestor-status-pill.js +1 -90
- package/dist/chunks/types.js +1 -8
- package/dist/chunks/update-mode-field-wrapper.js +1 -80
- package/dist/chunks/utils.js +1 -88
- package/dist/chunks/utils2.js +1 -53
- package/dist/esm/index.js +1 -25
- package/dist/esm/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown-with-browser.js +1 -2
- package/dist/esm/lib/components/add-metadata-template-dropdown/add-metadata-template-dropdown.js +1 -24
- package/dist/esm/lib/components/add-metadata-template-dropdown/index.js +1 -3
- package/dist/esm/lib/components/add-metadata-template-dropdown/messages.js +1 -20
- package/dist/esm/lib/components/add-metadata-template-dropdown/shared/dropdown-trigger.js +1 -16
- package/dist/esm/lib/components/combobox-with-api-pagination/combobox-with-api-pagination.js +1 -2
- package/dist/esm/lib/components/combobox-with-api-pagination/index.js +1 -2
- package/dist/esm/lib/components/combobox-with-api-pagination/messages.js +1 -32
- package/dist/esm/lib/components/combobox-with-api-pagination/request.js +1 -4
- package/dist/esm/lib/components/combobox-with-api-pagination/use-async-list.js +1 -118
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/is-abort-error.js +1 -11
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/use-controllable-state.js +1 -35
- package/dist/esm/lib/components/combobox-with-api-pagination/utils/use-intersection-observer.js +1 -75
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-content.js +1 -14
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-empty-state.js +1 -17
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-item.js +1 -15
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-list.js +1 -17
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-root.js +1 -14
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-search.js +1 -37
- package/dist/esm/lib/components/filter-dropdown-menu/filter-dropdown-menu-trigger.js +1 -8
- package/dist/esm/lib/components/filter-dropdown-menu/index.js +1 -17
- package/dist/esm/lib/components/filter-dropdown-menu/messages.js +1 -12
- package/dist/esm/lib/components/filter-instances-dropdown/filter-instances-dropdown.js +1 -2
- package/dist/esm/lib/components/filter-instances-dropdown/index.js +1 -2
- package/dist/esm/lib/components/filter-instances-dropdown/messages.js +1 -20
- package/dist/esm/lib/components/interactive-header-text/interactive-header-text.js +1 -2
- package/dist/esm/lib/components/interactive-text/interactive-text.js +1 -18
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-logo-badge/ai-logo-badge.js +1 -36
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-logo-badge/index.js +1 -2
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/ai-suggestion-field.js +1 -2
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/index.js +1 -2
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/messages.js +1 -52
- package/dist/esm/lib/components/metadata-editor-fields/components/ai-suggestion-field/utils.js +1 -13
- package/dist/esm/lib/components/metadata-editor-fields/components/constants.js +1 -2
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-badge/index.js +1 -2
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-badge/low-confidence-badge.js +1 -24
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-suggestion-field/index.js +1 -2
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-suggestion-field/low-confidence-suggestion-field.js +1 -68
- package/dist/esm/lib/components/metadata-editor-fields/components/low-confidence-suggestion-field/messages.js +1 -32
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-date-field/metadata-date-field.js +1 -44
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-enum-field/metadata-enum-field.js +1 -48
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-float-field/metadata-float-field.js +1 -34
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-float-field/use-float-validation.js +1 -9
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-multi-select-field/metadata-multi-select-field.js +1 -41
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-string-field/metadata-string-field.js +1 -29
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/legacy-metadata-taxonomy-field.js +1 -67
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-field.js +1 -16
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-picker-field/metadata-taxonomy-picker-field.js +1 -53
- package/dist/esm/lib/components/metadata-editor-fields/components/metadata-taxonomy-field/metadata-taxonomy-picker-field/value-mapping.js +1 -30
- package/dist/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/messages.js +1 -32
- package/dist/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/mulitple-values-utils.js +1 -8
- package/dist/esm/lib/components/metadata-editor-fields/components/update-mode-field-wrapper/update-mode-field-wrapper.js +1 -2
- package/dist/esm/lib/components/metadata-editor-fields/editor-field-types.js +1 -32
- package/dist/esm/lib/components/metadata-editor-fields/hooks/use-memoized-field-label.js +1 -12
- package/dist/esm/lib/components/metadata-editor-fields/hooks/use-review-field-filter.js +1 -36
- package/dist/esm/lib/components/metadata-editor-fields/hooks/use-view-reference-tooltip.js +1 -41
- package/dist/esm/lib/components/metadata-editor-fields/messages.js +1 -12
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-field-wrapper.js +1 -189
- package/dist/esm/lib/components/metadata-editor-fields/metadata-editor-fields.js +1 -31
- package/dist/esm/lib/components/metadata-editor-fields/utils.js +1 -2
- package/dist/esm/lib/components/metadata-empty-state/messages.js +1 -44
- package/dist/esm/lib/components/metadata-empty-state/metadata-empty-state.js +1 -47
- package/dist/esm/lib/components/metadata-instance-editor/index.js +1 -9
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.js +1 -40
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/useErrorMessaging.js +1 -23
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/custom-instance.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.js +1 -16
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/custom-instance-new-field.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance-new-field/messages.js +1 -44
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/delete-confirmation-modal.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/delete-confirmation-modal/messages.js +1 -52
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/constants.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form-card-wrapper.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +1 -136
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/utils.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-ai-disclaimer/metadata-instance-form-ai-disclaimer.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/messages.js +1 -24
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-autofill-button/metadata-instance-form-autofill-button.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/messages.js +1 -20
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-footer/metadata-instance-form-footer.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +1 -6
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +1 -2
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.js +1 -20
- package/dist/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js +1 -31
- package/dist/esm/lib/components/metadata-instance-list/index.js +1 -6
- package/dist/esm/lib/components/metadata-instance-list/metadata-instance-list.js +1 -2
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance/metadata-instance.js +1 -2
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-content/metadata-instance-content.js +1 -2
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/messages.js +1 -6
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-entry-display.js +1 -15
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/metadata-instance-entry.js +1 -2
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/messages.js +1 -24
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-ancestor-status-pill.js +1 -2
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-entry/taxonomy-entry/taxonomy-value.js +1 -25
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/messages.js +1 -12
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-footer/metadata-instance-footer.js +1 -2
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/messages.js +1 -16
- package/dist/esm/lib/components/metadata-instance-list/subcomponents/metadata-instance-header/metadata-instance-header.js +1 -2
- package/dist/esm/lib/components/metadata-instance-review-notice/messages.js +1 -32
- package/dist/esm/lib/components/metadata-instance-review-notice/metadata-instance-review-notice.js +1 -24
- package/dist/esm/lib/components/unsaved-changes-modal/index.js +1 -2
- package/dist/esm/lib/components/unsaved-changes-modal/messages.js +1 -24
- package/dist/esm/lib/components/unsaved-changes-modal/unsaved-changes-modal.js +1 -45
- package/dist/esm/lib/components/unsaved-changes-modal/utils.js +1 -4
- package/dist/esm/lib/constants.js +1 -15
- package/dist/esm/lib/defaults.js +1 -16
- package/dist/esm/lib/mappers.js +1 -23
- package/dist/esm/lib/messages.js +1 -129
- package/dist/esm/lib/metadata-editor.js +1 -2
- package/dist/esm/lib/utils/analytics/analytics-context.js +1 -11
- package/dist/esm/lib/utils/analytics/events.js +1 -9
- package/dist/esm/lib/utils/analytics/index.js +1 -4
- package/dist/esm/lib/utils/analytics/with-analytics.js +1 -11
- package/dist/esm/lib/utils/api-wrapper.js +1 -13
- package/dist/esm/lib/utils/autofill-context.js +1 -66
- package/dist/esm/lib/utils/check-if-has-bounding-boxes.js +1 -2
- package/dist/esm/lib/utils/confidence-score/format-confidence-score-percent.js +1 -4
- package/dist/esm/lib/utils/confidence-score/get-confidence-score-tooltip.js +1 -13
- package/dist/esm/lib/utils/confidence-score/get-fields-needing-review.js +1 -6
- package/dist/esm/lib/utils/confidence-score/index.js +1 -5
- package/dist/esm/lib/utils/confidence-score/is-confidence-score-needing-review.js +1 -5
- package/dist/esm/lib/utils/confidence-score/messages.js +1 -16
- package/dist/esm/lib/utils/convertDate.js +1 -24
- package/dist/esm/lib/utils/is-interactive-form-element.js +1 -2
- package/dist/esm/lib/utils/utils.js +1 -4
- package/package.json +13 -13
package/dist/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.js
CHANGED
|
@@ -1,40 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
defaultLoadingMessage: {
|
|
4
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.defaultLoadingMessage",
|
|
5
|
-
defaultMessage: "Extracting Metadata"
|
|
6
|
-
},
|
|
7
|
-
dismissButton: {
|
|
8
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.dismissButton",
|
|
9
|
-
defaultMessage: "Dismiss"
|
|
10
|
-
},
|
|
11
|
-
errorTitle: {
|
|
12
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.errorTitle",
|
|
13
|
-
defaultMessage: "Metadata extraction could not complete"
|
|
14
|
-
},
|
|
15
|
-
errorDescription: {
|
|
16
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.errorDescription",
|
|
17
|
-
defaultMessage: "Please try again in a few minutes"
|
|
18
|
-
},
|
|
19
|
-
missingPermissionsErrorTitle: {
|
|
20
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle",
|
|
21
|
-
defaultMessage: "Can’t Extract Metadata"
|
|
22
|
-
},
|
|
23
|
-
missingPermissionsErrorDescription: {
|
|
24
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription",
|
|
25
|
-
defaultMessage: "You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin."
|
|
26
|
-
},
|
|
27
|
-
loadingAriaLabel: {
|
|
28
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel",
|
|
29
|
-
defaultMessage: "Loading"
|
|
30
|
-
},
|
|
31
|
-
longLoadingTitle: {
|
|
32
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle",
|
|
33
|
-
defaultMessage: "This is taking longer than usual"
|
|
34
|
-
},
|
|
35
|
-
longLoadingDescription: {
|
|
36
|
-
id: "metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription",
|
|
37
|
-
defaultMessage: "Still working on it!"
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({defaultLoadingMessage:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.defaultLoadingMessage`,defaultMessage:`Extracting Metadata`},dismissButton:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.dismissButton`,defaultMessage:`Dismiss`},errorTitle:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.errorTitle`,defaultMessage:`Metadata extraction could not complete`},errorDescription:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.errorDescription`,defaultMessage:`Please try again in a few minutes`},missingPermissionsErrorTitle:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorTitle`,defaultMessage:`Can’t Extract Metadata`},missingPermissionsErrorDescription:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.missingPermissionsErrorDescription`,defaultMessage:`You don’t have permission to access the destination folder to extract metadata. Please contact the owner or your admin.`},loadingAriaLabel:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.loadingAriaLabel`,defaultMessage:`Loading`},longLoadingTitle:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingTitle`,defaultMessage:`This is taking longer than usual`},longLoadingDescription:{id:`metadataEditor.metadataInstanceEditor.autofillOverlay.longLoadingDescription`,defaultMessage:`Still working on it!`}});export{messages as default};
|
|
@@ -1,23 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ERROR_CODE_METADATA_AUTOFILL_TIMEOUT as t, ERROR_CODE_METADATA_PRECONDITION_FAILED as n, ERROR_CODE_MISSING_PERMISSIONS as r } from "../metadata-instance-form/constants.js";
|
|
3
|
-
import { useIntl as i } from "react-intl";
|
|
4
|
-
var a = (a) => {
|
|
5
|
-
let o = i();
|
|
6
|
-
if (!a) return {
|
|
7
|
-
title: o.formatMessage(e.errorTitle),
|
|
8
|
-
description: o.formatMessage(e.errorDescription)
|
|
9
|
-
};
|
|
10
|
-
switch (a) {
|
|
11
|
-
case r: return {
|
|
12
|
-
title: o.formatMessage(e.missingPermissionsErrorTitle),
|
|
13
|
-
description: o.formatMessage(e.missingPermissionsErrorDescription)
|
|
14
|
-
};
|
|
15
|
-
case t:
|
|
16
|
-
case n:
|
|
17
|
-
default: return {
|
|
18
|
-
title: o.formatMessage(e.errorTitle),
|
|
19
|
-
description: o.formatMessage(e.errorDescription)
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
};
|
|
23
|
-
export { a as useErrorMessaging };
|
|
1
|
+
import messages from"./messages.js";import{ERROR_CODE_METADATA_AUTOFILL_TIMEOUT,ERROR_CODE_METADATA_PRECONDITION_FAILED,ERROR_CODE_MISSING_PERMISSIONS}from"../metadata-instance-form/constants.js";import{useIntl}from"react-intl";var useErrorMessaging=errorCode=>{let intl=useIntl();if(!errorCode)return{title:intl.formatMessage(messages.errorTitle),description:intl.formatMessage(messages.errorDescription)};switch(errorCode){case ERROR_CODE_MISSING_PERMISSIONS:return{title:intl.formatMessage(messages.missingPermissionsErrorTitle),description:intl.formatMessage(messages.missingPermissionsErrorDescription)};case ERROR_CODE_METADATA_AUTOFILL_TIMEOUT:case ERROR_CODE_METADATA_PRECONDITION_FAILED:default:return{title:intl.formatMessage(messages.errorTitle),description:intl.formatMessage(messages.errorDescription)}}};export{useErrorMessaging};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as CustomInstance };
|
|
1
|
+
import{t as CustomInstance}from"../../../../../../chunks/custom-instance.js";export{CustomInstance};
|
package/dist/esm/lib/components/metadata-instance-editor/subcomponents/custom-instance/messages.js
CHANGED
|
@@ -1,16 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
addAttribute: {
|
|
4
|
-
id: "metadataEditor.metadataInstanceEditor.customInstance.addAttribute",
|
|
5
|
-
defaultMessage: "+ Add Attribute"
|
|
6
|
-
},
|
|
7
|
-
removeAttribute: {
|
|
8
|
-
id: "metadataEditor.metadataInstanceEditor.customInstance.removeAttribute",
|
|
9
|
-
defaultMessage: "Delete {fieldName} attribute"
|
|
10
|
-
},
|
|
11
|
-
setValuePlaceholder: {
|
|
12
|
-
id: "metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder",
|
|
13
|
-
defaultMessage: "Set value"
|
|
14
|
-
}
|
|
15
|
-
});
|
|
16
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({addAttribute:{id:`metadataEditor.metadataInstanceEditor.customInstance.addAttribute`,defaultMessage:`+ Add Attribute`},removeAttribute:{id:`metadataEditor.metadataInstanceEditor.customInstance.removeAttribute`,defaultMessage:`Delete {fieldName} attribute`},setValuePlaceholder:{id:`metadataEditor.metadataInstanceEditor.customInstance.setValuePlaceholder`,defaultMessage:`Set value`}});export{messages as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as CustomInstanceNewField };
|
|
1
|
+
import{t as CustomInstanceNewField}from"../../../../../../chunks/custom-instance-new-field.js";export{CustomInstanceNewField};
|
|
@@ -1,44 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
addAttributeGroupAriaLabel: {
|
|
4
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.addAttributeGroupAriaLabel",
|
|
5
|
-
defaultMessage: "Add new attribute to Custom Metadata"
|
|
6
|
-
},
|
|
7
|
-
addNewFieldCTA: {
|
|
8
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.addNewFieldCTA",
|
|
9
|
-
defaultMessage: "Add"
|
|
10
|
-
},
|
|
11
|
-
cancelCTA: {
|
|
12
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.cancelCTA",
|
|
13
|
-
defaultMessage: "Cancel"
|
|
14
|
-
},
|
|
15
|
-
customErrorInternalKey: {
|
|
16
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.customErrorInternalKey",
|
|
17
|
-
defaultMessage: "Keys cannot begin with a $."
|
|
18
|
-
},
|
|
19
|
-
customErrorDuplicateKey: {
|
|
20
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.customErrorDuplicateKey",
|
|
21
|
-
defaultMessage: "Key already exists."
|
|
22
|
-
},
|
|
23
|
-
customKeyLabel: {
|
|
24
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.attributeNameLabel",
|
|
25
|
-
defaultMessage: "Attribute Name"
|
|
26
|
-
},
|
|
27
|
-
customKeyPlaceholder: {
|
|
28
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.customKeyPlaceholder",
|
|
29
|
-
defaultMessage: "e.g. Order Number"
|
|
30
|
-
},
|
|
31
|
-
keyFieldRequiredError: {
|
|
32
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.keyFieldRequired",
|
|
33
|
-
defaultMessage: "Key is required"
|
|
34
|
-
},
|
|
35
|
-
valueLabel: {
|
|
36
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.valueLabel",
|
|
37
|
-
defaultMessage: "Value"
|
|
38
|
-
},
|
|
39
|
-
valuePlaceholder: {
|
|
40
|
-
id: "metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder",
|
|
41
|
-
defaultMessage: "e.g. 42"
|
|
42
|
-
}
|
|
43
|
-
});
|
|
44
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({addAttributeGroupAriaLabel:{id:`metadataEditor.metadataEditor.customIntanceNewField.addAttributeGroupAriaLabel`,defaultMessage:`Add new attribute to Custom Metadata`},addNewFieldCTA:{id:`metadataEditor.metadataEditor.customIntanceNewField.addNewFieldCTA`,defaultMessage:`Add`},cancelCTA:{id:`metadataEditor.metadataEditor.customIntanceNewField.cancelCTA`,defaultMessage:`Cancel`},customErrorInternalKey:{id:`metadataEditor.metadataEditor.customIntanceNewField.customErrorInternalKey`,defaultMessage:`Keys cannot begin with a $.`},customErrorDuplicateKey:{id:`metadataEditor.metadataEditor.customIntanceNewField.customErrorDuplicateKey`,defaultMessage:`Key already exists.`},customKeyLabel:{id:`metadataEditor.metadataEditor.customIntanceNewField.attributeNameLabel`,defaultMessage:`Attribute Name`},customKeyPlaceholder:{id:`metadataEditor.metadataEditor.customIntanceNewField.customKeyPlaceholder`,defaultMessage:`e.g. Order Number`},keyFieldRequiredError:{id:`metadataEditor.metadataEditor.customIntanceNewField.keyFieldRequired`,defaultMessage:`Key is required`},valueLabel:{id:`metadataEditor.metadataEditor.customIntanceNewField.valueLabel`,defaultMessage:`Value`},valuePlaceholder:{id:`metadataEditor.metadataEditor.customIntanceNewField.valuePlaceholder`,defaultMessage:`e.g. 42`}});export{messages as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as DeleteConfirmationModal };
|
|
1
|
+
import{t as DeleteConfirmationModal}from"../../../../../../chunks/delete-confirmation-modal.js";export{DeleteConfirmationModal};
|
|
@@ -1,52 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
deleteConfirmationModalCustomMetadata: {
|
|
4
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.customMedatata",
|
|
5
|
-
defaultMessage: "Custom Metadata"
|
|
6
|
-
},
|
|
7
|
-
deleteConfirmationModalHeader: {
|
|
8
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.header",
|
|
9
|
-
defaultMessage: "Delete \"{templateName}\""
|
|
10
|
-
},
|
|
11
|
-
deleteConfirmationModalHeaderAriaLabel: {
|
|
12
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.headerAriaLabel",
|
|
13
|
-
defaultMessage: "Delete Metadata Template"
|
|
14
|
-
},
|
|
15
|
-
deleteConfirmationModalBodyFirstParagraph: {
|
|
16
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.body.firstParagraph",
|
|
17
|
-
defaultMessage: "Are you sure you want to delete the \"{templateName}\" Metadata template, and all of its values from this file?"
|
|
18
|
-
},
|
|
19
|
-
deleteConfirmationModalBodyFirstParagraphCheckboxVersion: {
|
|
20
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.body.firstParagraphCheckboxVersion",
|
|
21
|
-
defaultMessage: "Are you sure you want to delete the \"{templateName}\" Metadata instance, and its values?"
|
|
22
|
-
},
|
|
23
|
-
deleteConfirmationModalBodySecondParagraph: {
|
|
24
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.body.secondParagraph",
|
|
25
|
-
defaultMessage: "Once deleted, Metadata values cannot be restored."
|
|
26
|
-
},
|
|
27
|
-
deleteConfirmationModalBodyInputFieldLabel: {
|
|
28
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.body.inputFieldLabel",
|
|
29
|
-
defaultMessage: "Type the Metadata Template’s name to confirm deletion"
|
|
30
|
-
},
|
|
31
|
-
deleteConfirmationModalBodyCheckboxLabel: {
|
|
32
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.body.checkboxLabel",
|
|
33
|
-
defaultMessage: "Confirm deletion of Metadata instance"
|
|
34
|
-
},
|
|
35
|
-
deleteConfirmationModalCancelButton: {
|
|
36
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.cancelButton",
|
|
37
|
-
defaultMessage: "Cancel"
|
|
38
|
-
},
|
|
39
|
-
deleteConfirmationModalConfirmButton: {
|
|
40
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.confirmButton",
|
|
41
|
-
defaultMessage: "Confirm"
|
|
42
|
-
},
|
|
43
|
-
deleteConfirmationModalConfirmButtonCheckboxVersion: {
|
|
44
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.confirmButtonCheckboxVersion",
|
|
45
|
-
defaultMessage: "Delete"
|
|
46
|
-
},
|
|
47
|
-
deleteConfirmationModalDismissButton: {
|
|
48
|
-
id: "metadataEditor.editInstance.deleteConfirmationModal.dismissButton",
|
|
49
|
-
defaultMessage: "Dismiss"
|
|
50
|
-
}
|
|
51
|
-
});
|
|
52
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({deleteConfirmationModalCustomMetadata:{id:`metadataEditor.editInstance.deleteConfirmationModal.customMedatata`,defaultMessage:`Custom Metadata`},deleteConfirmationModalHeader:{id:`metadataEditor.editInstance.deleteConfirmationModal.header`,defaultMessage:`Delete "{templateName}"`},deleteConfirmationModalHeaderAriaLabel:{id:`metadataEditor.editInstance.deleteConfirmationModal.headerAriaLabel`,defaultMessage:`Delete Metadata Template`},deleteConfirmationModalBodyFirstParagraph:{id:`metadataEditor.editInstance.deleteConfirmationModal.body.firstParagraph`,defaultMessage:`Are you sure you want to delete the "{templateName}" Metadata template, and all of its values from this file?`},deleteConfirmationModalBodyFirstParagraphCheckboxVersion:{id:`metadataEditor.editInstance.deleteConfirmationModal.body.firstParagraphCheckboxVersion`,defaultMessage:`Are you sure you want to delete the "{templateName}" Metadata instance, and its values?`},deleteConfirmationModalBodySecondParagraph:{id:`metadataEditor.editInstance.deleteConfirmationModal.body.secondParagraph`,defaultMessage:`Once deleted, Metadata values cannot be restored.`},deleteConfirmationModalBodyInputFieldLabel:{id:`metadataEditor.editInstance.deleteConfirmationModal.body.inputFieldLabel`,defaultMessage:`Type the Metadata Template’s name to confirm deletion`},deleteConfirmationModalBodyCheckboxLabel:{id:`metadataEditor.editInstance.deleteConfirmationModal.body.checkboxLabel`,defaultMessage:`Confirm deletion of Metadata instance`},deleteConfirmationModalCancelButton:{id:`metadataEditor.editInstance.deleteConfirmationModal.cancelButton`,defaultMessage:`Cancel`},deleteConfirmationModalConfirmButton:{id:`metadataEditor.editInstance.deleteConfirmationModal.confirmButton`,defaultMessage:`Confirm`},deleteConfirmationModalConfirmButtonCheckboxVersion:{id:`metadataEditor.editInstance.deleteConfirmationModal.confirmButtonCheckboxVersion`,defaultMessage:`Delete`},deleteConfirmationModalDismissButton:{id:`metadataEditor.editInstance.deleteConfirmationModal.dismissButton`,defaultMessage:`Dismiss`}});export{messages as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
var
|
|
2
|
-
export { e as ERROR_CODE_METADATA_AUTOFILL_TIMEOUT, t as ERROR_CODE_METADATA_PRECONDITION_FAILED, n as ERROR_CODE_MISSING_PERMISSIONS, r as ERROR_CODE_UNKNOWN };
|
|
1
|
+
var ERROR_CODE_METADATA_AUTOFILL_TIMEOUT=`metadata_autofill_timeout_error`,ERROR_CODE_METADATA_PRECONDITION_FAILED=`metadata_precondition_failed_error`,ERROR_CODE_MISSING_PERMISSIONS=`missing_permissions_error`,ERROR_CODE_UNKNOWN=`unknown_error`;export{ERROR_CODE_METADATA_AUTOFILL_TIMEOUT,ERROR_CODE_METADATA_PRECONDITION_FAILED,ERROR_CODE_MISSING_PERMISSIONS,ERROR_CODE_UNKNOWN};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceFormCardWrapper };
|
|
1
|
+
import{t as MetadataInstanceFormCardWrapper}from"../../../../../../chunks/metadata-instance-form-card-wrapper.js";export{MetadataInstanceFormCardWrapper};
|
|
@@ -1,136 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { MetadataEmptyState as t } from "../../../metadata-empty-state/metadata-empty-state.js";
|
|
3
|
-
import { useMetadataEditorAnalytics as n } from "../../../../utils/analytics/analytics-context.js";
|
|
4
|
-
import { useAutofill as r } from "../../../../utils/autofill-context.js";
|
|
5
|
-
import { TemplateInstance as i } from "../../../metadata-editor-fields/metadata-editor-fields.js";
|
|
6
|
-
import { UnsavedChangesModal as a } from "../../../unsaved-changes-modal/unsaved-changes-modal.js";
|
|
7
|
-
import { t as o } from "../../../../../../chunks/autofill-overlay.js";
|
|
8
|
-
import { t as ee } from "../../../../../../chunks/custom-instance.js";
|
|
9
|
-
import { t as te } from "../../../../../../chunks/delete-confirmation-modal.js";
|
|
10
|
-
import { t as ne } from "../../../../../../chunks/utils2.js";
|
|
11
|
-
import { n as s, t as c } from "../../../../../../chunks/metadata-instance-form-card-wrapper.js";
|
|
12
|
-
import { useEffect as l, useMemo as u, useRef as d, useState as f } from "react";
|
|
13
|
-
import { jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
14
|
-
import h from "clsx";
|
|
15
|
-
import { Form as g, Formik as _ } from "formik";
|
|
16
|
-
import v from "lodash/isEqual";
|
|
17
|
-
var y = ({ dirty: e, onChange: t, values: n }) => {
|
|
18
|
-
let r = d(n);
|
|
19
|
-
return e && !v(r.current.metadata.fields, n.metadata.fields) && (r.current = n, t(n)), null;
|
|
20
|
-
}, b = (v) => {
|
|
21
|
-
let { areAiSuggestionsAvailable: b, customRef: x, isLargeFile: S, errorCode: C, isAiSuggestionsFeatureEnabled: w, isAdvancedExtractAgentEnabled: re = !1, isBetaLanguageEnabled: ie, isDeleteButtonDisabled: ae, isDeleteConfirmationModalCheckboxEnabled: oe, isMultilevelTaxonomyFieldEnabled: T, isTaxonomyPickerEnabled: E, createTaxonomyItemsService: D, isUnsavedChangesModalOpen: O = !1, MetadataInstanceFormCustomWrapper: k, selectedTemplateInstance: A, onCancel: j, onChange: M, onDelete: N, onDiscardUnsavedChanges: P, onSubmit: F, onToggleReviewFilter: I, setIsUnsavedChangesModalOpen: L, shouldShowOnlyReviewFields: R = !1, taxonomyOptionsFetcher: z, isConfidenceScoreReviewEnabled: B = !1, isBoundingBoxEnabled: V = !1, onSelectMetadataField: H, selectedMetadataFieldId: U } = v, se = V || B, W = k ?? c, [G, K] = f(!1), { isFetchingSuggestions: q, isLongLoading: J, getAiSuggestions: ce, clearState: Y, suggestions: le } = r(), { trackEvent: ue } = n();
|
|
22
|
-
l(() => () => {
|
|
23
|
-
Y();
|
|
24
|
-
}, [Y, A?.id]);
|
|
25
|
-
let X = A?.templateKey === e, de = async (e) => {
|
|
26
|
-
await F(e, ne(e, A));
|
|
27
|
-
}, Z = (e) => {
|
|
28
|
-
e ? L(!0) : j();
|
|
29
|
-
}, fe = () => {
|
|
30
|
-
K(!0);
|
|
31
|
-
}, pe = { metadata: { ...A } }, Q = d(null), [$, me] = f(null);
|
|
32
|
-
l(() => {
|
|
33
|
-
me(x ?? Q.current);
|
|
34
|
-
}, [
|
|
35
|
-
x,
|
|
36
|
-
A?.templateKey,
|
|
37
|
-
A?.scope
|
|
38
|
-
]);
|
|
39
|
-
let he = u(() => {
|
|
40
|
-
let e = A?.fields.length === 0;
|
|
41
|
-
if (X) return /* @__PURE__ */ p(ee, { isLoading: q });
|
|
42
|
-
if (e) return /* @__PURE__ */ p(t, {
|
|
43
|
-
isBoxAiSuggestionsFeatureEnabled: w,
|
|
44
|
-
level: "instance"
|
|
45
|
-
});
|
|
46
|
-
let n = !!(q || C);
|
|
47
|
-
return /* @__PURE__ */ m("div", {
|
|
48
|
-
className: h(s.metadataInstanceFormContent, n && s.showOverlay, se && s.metadataInstanceFormContentReducedGap),
|
|
49
|
-
children: [/* @__PURE__ */ p(o, {
|
|
50
|
-
errorCode: C,
|
|
51
|
-
isFetchingSuggestions: q,
|
|
52
|
-
isLongLoading: J
|
|
53
|
-
}), /* @__PURE__ */ p(i, {
|
|
54
|
-
disableForm: q,
|
|
55
|
-
isConfidenceScoreReviewEnabled: B,
|
|
56
|
-
isBoundingBoxEnabled: V,
|
|
57
|
-
isExternallyOwned: A?.isExternallyOwned,
|
|
58
|
-
isMultilevelTaxonomyFieldEnabled: T,
|
|
59
|
-
isTaxonomyPickerEnabled: E,
|
|
60
|
-
createTaxonomyItemsService: D,
|
|
61
|
-
onSelectMetadataField: H,
|
|
62
|
-
selectedMetadataFieldId: U,
|
|
63
|
-
portalElement: x ?? $,
|
|
64
|
-
shouldShowOnlyReviewFields: R,
|
|
65
|
-
taxonomyOptionsFetcher: z
|
|
66
|
-
})]
|
|
67
|
-
});
|
|
68
|
-
}, [
|
|
69
|
-
A?.fields.length,
|
|
70
|
-
A?.isExternallyOwned,
|
|
71
|
-
X,
|
|
72
|
-
q,
|
|
73
|
-
J,
|
|
74
|
-
x,
|
|
75
|
-
$,
|
|
76
|
-
z,
|
|
77
|
-
w,
|
|
78
|
-
B,
|
|
79
|
-
V,
|
|
80
|
-
T,
|
|
81
|
-
E,
|
|
82
|
-
D,
|
|
83
|
-
C,
|
|
84
|
-
R,
|
|
85
|
-
H,
|
|
86
|
-
U
|
|
87
|
-
]);
|
|
88
|
-
return /* @__PURE__ */ p(_, {
|
|
89
|
-
initialValues: pe,
|
|
90
|
-
onSubmit: de,
|
|
91
|
-
children: ({ values: e, dirty: t }) => /* @__PURE__ */ m(g, { children: [
|
|
92
|
-
/* @__PURE__ */ p(W, {
|
|
93
|
-
areAiSuggestionsAvailable: b,
|
|
94
|
-
className: s.metadataInstanceForm,
|
|
95
|
-
formRef: Q,
|
|
96
|
-
formValues: e,
|
|
97
|
-
getAiSuggestions: ce,
|
|
98
|
-
handleCancel: Z,
|
|
99
|
-
handleDelete: fe,
|
|
100
|
-
isAdvancedExtractAgentEnabled: re,
|
|
101
|
-
isAiSuggestionsFeatureEnabled: w,
|
|
102
|
-
isBetaLanguageEnabled: ie,
|
|
103
|
-
isConfidenceScoreReviewEnabled: B,
|
|
104
|
-
isBoundingBoxEnabled: V,
|
|
105
|
-
isDeleteButtonDisabled: ae,
|
|
106
|
-
isFetchingSuggestions: q,
|
|
107
|
-
isFormDirty: t,
|
|
108
|
-
isLargeFile: S,
|
|
109
|
-
onToggleReviewFilter: I,
|
|
110
|
-
selectedTemplateInstance: A,
|
|
111
|
-
shouldShowOnlyReviewFields: R,
|
|
112
|
-
suggestions: le,
|
|
113
|
-
children: A && he
|
|
114
|
-
}),
|
|
115
|
-
M && /* @__PURE__ */ p(y, {
|
|
116
|
-
dirty: t,
|
|
117
|
-
onChange: M,
|
|
118
|
-
values: e
|
|
119
|
-
}),
|
|
120
|
-
/* @__PURE__ */ p(a, {
|
|
121
|
-
onBackToEdit: () => L(!1),
|
|
122
|
-
onDiscardChanges: P,
|
|
123
|
-
open: O,
|
|
124
|
-
trackEvent: ue
|
|
125
|
-
}),
|
|
126
|
-
/* @__PURE__ */ p(te, {
|
|
127
|
-
isCheckboxEnabled: oe,
|
|
128
|
-
onConfirm: () => N(A),
|
|
129
|
-
onDismiss: () => K(!1),
|
|
130
|
-
open: G,
|
|
131
|
-
templateName: A?.displayName
|
|
132
|
-
})
|
|
133
|
-
] })
|
|
134
|
-
}, `${A?.scope}.${A?.templateKey}`);
|
|
135
|
-
};
|
|
136
|
-
export { b as MetadataInstanceForm };
|
|
1
|
+
import{TEMPLATE_CUSTOM_PROPERTIES}from"../../../../constants.js";import{MetadataEmptyState}from"../../../metadata-empty-state/metadata-empty-state.js";import{useMetadataEditorAnalytics}from"../../../../utils/analytics/analytics-context.js";import{useAutofill}from"../../../../utils/autofill-context.js";import{TemplateInstance}from"../../../metadata-editor-fields/metadata-editor-fields.js";import{UnsavedChangesModal}from"../../../unsaved-changes-modal/unsaved-changes-modal.js";import{t as AutofillOverlay}from"../../../../../../chunks/autofill-overlay.js";import{t as CustomInstance}from"../../../../../../chunks/custom-instance.js";import{t as DeleteConfirmationModal}from"../../../../../../chunks/delete-confirmation-modal.js";import{t as createJSONPatch}from"../../../../../../chunks/utils2.js";import{n as metadata_instance_form_module_default,t as MetadataInstanceFormCardWrapper}from"../../../../../../chunks/metadata-instance-form-card-wrapper.js";import{useEffect,useMemo,useRef,useState}from"react";import{jsx,jsxs}from"react/jsx-runtime";import clsx from"clsx";import{Form,Formik}from"formik";import isEqual from"lodash/isEqual";var FormikObserver=({dirty,onChange,values})=>{let prevValuesRef=useRef(values);return dirty&&!isEqual(prevValuesRef.current.metadata.fields,values.metadata.fields)&&(prevValuesRef.current=values,onChange(values)),null},MetadataInstanceForm=props=>{let{areAiSuggestionsAvailable,customRef,isLargeFile,errorCode,isAiSuggestionsFeatureEnabled,isAdvancedExtractAgentEnabled=!1,isBetaLanguageEnabled,isDeleteButtonDisabled,isDeleteConfirmationModalCheckboxEnabled,isMultilevelTaxonomyFieldEnabled,isTaxonomyPickerEnabled,createTaxonomyItemsService,isUnsavedChangesModalOpen=!1,MetadataInstanceFormCustomWrapper,selectedTemplateInstance,onCancel,onChange,onDelete,onDiscardUnsavedChanges,onSubmit,onToggleReviewFilter,setIsUnsavedChangesModalOpen,shouldShowOnlyReviewFields=!1,taxonomyOptionsFetcher,isConfidenceScoreReviewEnabled=!1,isBoundingBoxEnabled=!1,onSelectMetadataField,selectedMetadataFieldId}=props,isBoundingBoxOrConfidenceScoreReviewEnabled=isBoundingBoxEnabled||isConfidenceScoreReviewEnabled,FormWrapper=MetadataInstanceFormCustomWrapper??MetadataInstanceFormCardWrapper,[isDeleteConfirmationModalOpen,setIsDeleteConfirmationModalOpen]=useState(!1),{isFetchingSuggestions,isLongLoading,getAiSuggestions,clearState,suggestions}=useAutofill(),{trackEvent}=useMetadataEditorAnalytics();useEffect(()=>()=>{clearState()},[clearState,selectedTemplateInstance?.id]);let isCustomMetadata=selectedTemplateInstance?.templateKey===TEMPLATE_CUSTOM_PROPERTIES,handleSubmit=async values=>{await onSubmit(values,createJSONPatch(values,selectedTemplateInstance))},handleCancel=isFormDirty=>{isFormDirty?setIsUnsavedChangesModalOpen(!0):onCancel()},handleDelete=()=>{setIsDeleteConfirmationModalOpen(!0)},initialValues={metadata:{...selectedTemplateInstance}},formRef=useRef(null),[portalElement,setPortalElement]=useState(null);useEffect(()=>{setPortalElement(customRef??formRef.current)},[customRef,selectedTemplateInstance?.templateKey,selectedTemplateInstance?.scope]);let content=useMemo(()=>{let isEmpty=selectedTemplateInstance?.fields.length===0;if(isCustomMetadata)return jsx(CustomInstance,{isLoading:isFetchingSuggestions});if(isEmpty)return jsx(MetadataEmptyState,{isBoxAiSuggestionsFeatureEnabled:isAiSuggestionsFeatureEnabled,level:`instance`});let showOverlay=!!(isFetchingSuggestions||errorCode);return jsxs(`div`,{className:clsx(metadata_instance_form_module_default.metadataInstanceFormContent,showOverlay&&metadata_instance_form_module_default.showOverlay,isBoundingBoxOrConfidenceScoreReviewEnabled&&metadata_instance_form_module_default.metadataInstanceFormContentReducedGap),children:[jsx(AutofillOverlay,{errorCode,isFetchingSuggestions,isLongLoading}),jsx(TemplateInstance,{disableForm:isFetchingSuggestions,isConfidenceScoreReviewEnabled,isBoundingBoxEnabled,isExternallyOwned:selectedTemplateInstance?.isExternallyOwned,isMultilevelTaxonomyFieldEnabled,isTaxonomyPickerEnabled,createTaxonomyItemsService,onSelectMetadataField,selectedMetadataFieldId,portalElement:customRef??portalElement,shouldShowOnlyReviewFields,taxonomyOptionsFetcher})]})},[selectedTemplateInstance?.fields.length,selectedTemplateInstance?.isExternallyOwned,isCustomMetadata,isFetchingSuggestions,isLongLoading,customRef,portalElement,taxonomyOptionsFetcher,isAiSuggestionsFeatureEnabled,isConfidenceScoreReviewEnabled,isBoundingBoxEnabled,isMultilevelTaxonomyFieldEnabled,isTaxonomyPickerEnabled,createTaxonomyItemsService,errorCode,shouldShowOnlyReviewFields,onSelectMetadataField,selectedMetadataFieldId]);return jsx(Formik,{initialValues,onSubmit:handleSubmit,children:({values,dirty})=>jsxs(Form,{children:[jsx(FormWrapper,{areAiSuggestionsAvailable,className:metadata_instance_form_module_default.metadataInstanceForm,formRef,formValues:values,getAiSuggestions,handleCancel,handleDelete,isAdvancedExtractAgentEnabled,isAiSuggestionsFeatureEnabled,isBetaLanguageEnabled,isConfidenceScoreReviewEnabled,isBoundingBoxEnabled,isDeleteButtonDisabled,isFetchingSuggestions,isFormDirty:dirty,isLargeFile,onToggleReviewFilter,selectedTemplateInstance,shouldShowOnlyReviewFields,suggestions,children:selectedTemplateInstance&&content}),onChange&&jsx(FormikObserver,{dirty,onChange,values}),jsx(UnsavedChangesModal,{onBackToEdit:()=>setIsUnsavedChangesModalOpen(!1),onDiscardChanges:onDiscardUnsavedChanges,open:isUnsavedChangesModalOpen,trackEvent}),jsx(DeleteConfirmationModal,{isCheckboxEnabled:isDeleteConfirmationModalCheckboxEnabled,onConfirm:()=>onDelete(selectedTemplateInstance),onDismiss:()=>setIsDeleteConfirmationModalOpen(!1),open:isDeleteConfirmationModalOpen,templateName:selectedTemplateInstance?.displayName})]})},`${selectedTemplateInstance?.scope}.${selectedTemplateInstance?.templateKey}`)};export{MetadataInstanceForm};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { t as createJSONPatch, e as getFormatedFieldValue };
|
|
1
|
+
import{n as getFormatedFieldValue,t as createJSONPatch}from"../../../../../../chunks/utils2.js";export{createJSONPatch,getFormatedFieldValue};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceFormAiDisclaimer };
|
|
1
|
+
import{t as MetadataInstanceFormAiDisclaimer}from"../../../../../../chunks/metadata-instance-form-ai-disclaimer.js";export{MetadataInstanceFormAiDisclaimer};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
autofillButton: {
|
|
4
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButton",
|
|
5
|
-
defaultMessage: "Autofill"
|
|
6
|
-
},
|
|
7
|
-
loadingButtonAriaLabel: {
|
|
8
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.loadingButtonAriaLabel",
|
|
9
|
-
defaultMessage: "Loading..."
|
|
10
|
-
},
|
|
11
|
-
standardExtractAgent: {
|
|
12
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.standardExtractAgent",
|
|
13
|
-
defaultMessage: "Standard"
|
|
14
|
-
},
|
|
15
|
-
enhancedExtractAgent: {
|
|
16
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.enhancedExtractAgent",
|
|
17
|
-
defaultMessage: "Enhanced"
|
|
18
|
-
},
|
|
19
|
-
autofillDropdownTriggerAriaLabel: {
|
|
20
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillDropdownTriggerAriaLabel",
|
|
21
|
-
defaultMessage: "See agent options."
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({autofillButton:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillButton`,defaultMessage:`Autofill`},loadingButtonAriaLabel:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.loadingButtonAriaLabel`,defaultMessage:`Loading...`},standardExtractAgent:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.standardExtractAgent`,defaultMessage:`Standard`},enhancedExtractAgent:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.enhancedExtractAgent`,defaultMessage:`Enhanced`},autofillDropdownTriggerAriaLabel:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillDropdownTriggerAriaLabel`,defaultMessage:`See agent options.`}});export{messages as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceFormAutofillButton };
|
|
1
|
+
import{t as MetadataInstanceFormAutofillButton}from"../../../../../../chunks/metadata-instance-form-autofill-button.js";export{MetadataInstanceFormAutofillButton};
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
cancelButton: {
|
|
4
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.cancelButton",
|
|
5
|
-
defaultMessage: "Cancel"
|
|
6
|
-
},
|
|
7
|
-
deleteButton: {
|
|
8
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.deleteButton",
|
|
9
|
-
defaultMessage: "Delete"
|
|
10
|
-
},
|
|
11
|
-
loadingAriaLabel: {
|
|
12
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.loadingAriaLabel",
|
|
13
|
-
defaultMessage: "Loading..."
|
|
14
|
-
},
|
|
15
|
-
saveButton: {
|
|
16
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.saveButton",
|
|
17
|
-
defaultMessage: "Save"
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({cancelButton:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.cancelButton`,defaultMessage:`Cancel`},deleteButton:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.deleteButton`,defaultMessage:`Delete`},loadingAriaLabel:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.loadingAriaLabel`,defaultMessage:`Loading...`},saveButton:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormFooter.saveButton`,defaultMessage:`Save`}});export{messages as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceFormFooter };
|
|
1
|
+
import{t as MetadataInstanceFormFooter}from"../../../../../../chunks/metadata-instance-form-footer.js";export{MetadataInstanceFormFooter};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({ customInstanceTitle: {
|
|
3
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.customInstanceTitle",
|
|
4
|
-
defaultMessage: "Custom Metadata"
|
|
5
|
-
} });
|
|
6
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({customInstanceTitle:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.customInstanceTitle`,defaultMessage:`Custom Metadata`}});export{messages as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceFormHeader };
|
|
1
|
+
import{t as MetadataInstanceFormHeader}from"../../../../../../chunks/metadata-instance-form-header.js";export{MetadataInstanceFormHeader};
|
|
@@ -1,20 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
autofillInBetaNoticeHeader: {
|
|
4
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillInBetaNoticeHeader",
|
|
5
|
-
defaultMessage: "AI Autofill is in Beta"
|
|
6
|
-
},
|
|
7
|
-
autofillInBetaNoticeBody: {
|
|
8
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillInBetaNoticeBody",
|
|
9
|
-
defaultMessage: "Please check responses before saving."
|
|
10
|
-
},
|
|
11
|
-
largeFileNoticeHeader: {
|
|
12
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.largeFileNoticeHeader",
|
|
13
|
-
defaultMessage: "Content is too large"
|
|
14
|
-
},
|
|
15
|
-
largeFileNoticeBody: {
|
|
16
|
-
id: "metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.largeFileNoticeBody",
|
|
17
|
-
defaultMessage: "Box AI won’t be able to access the entire content, which might affect its answers."
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({autofillInBetaNoticeHeader:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillInBetaNoticeHeader`,defaultMessage:`AI Autofill is in Beta`},autofillInBetaNoticeBody:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.autofillInBetaNoticeBody`,defaultMessage:`Please check responses before saving.`},largeFileNoticeHeader:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.largeFileNoticeHeader`,defaultMessage:`Content is too large`},largeFileNoticeBody:{id:`metadataEditor.metadataInstanceEditor.metadataInstanceFormHeader.largeFileNoticeBody`,defaultMessage:`Box AI won’t be able to access the entire content, which might affect its answers.`}});export{messages as default};
|
|
@@ -1,31 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useIntl as t } from "react-intl";
|
|
3
|
-
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
-
import { InlineNotice as a, Text as o } from "@box/blueprint-web";
|
|
5
|
-
var s = ({ isLargeFile: s, isBetaLanguageEnabled: c }) => {
|
|
6
|
-
let l = t();
|
|
7
|
-
return !c && !s ? null : /* @__PURE__ */ i(n, { children: [s && /* @__PURE__ */ i(a, {
|
|
8
|
-
variant: "warning",
|
|
9
|
-
variantIconAriaLabel: l.formatMessage(e.largeFileNoticeHeader),
|
|
10
|
-
children: [/* @__PURE__ */ r(o, {
|
|
11
|
-
as: "p",
|
|
12
|
-
variant: "bodyDefaultBold",
|
|
13
|
-
children: l.formatMessage(e.largeFileNoticeHeader)
|
|
14
|
-
}), /* @__PURE__ */ i(o, {
|
|
15
|
-
as: "p",
|
|
16
|
-
children: [l.formatMessage(e.largeFileNoticeBody), " "]
|
|
17
|
-
})]
|
|
18
|
-
}), c && /* @__PURE__ */ i(a, {
|
|
19
|
-
variant: "info",
|
|
20
|
-
variantIconAriaLabel: l.formatMessage(e.autofillInBetaNoticeHeader),
|
|
21
|
-
children: [/* @__PURE__ */ r(o, {
|
|
22
|
-
as: "p",
|
|
23
|
-
variant: "bodyDefaultBold",
|
|
24
|
-
children: l.formatMessage(e.autofillInBetaNoticeHeader)
|
|
25
|
-
}), /* @__PURE__ */ i(o, {
|
|
26
|
-
as: "p",
|
|
27
|
-
children: [l.formatMessage(e.autofillInBetaNoticeBody), " "]
|
|
28
|
-
})]
|
|
29
|
-
})] });
|
|
30
|
-
};
|
|
31
|
-
export { s as MetadataInstanceFormInlineNotice };
|
|
1
|
+
import messages from"./messages.js";import{useIntl}from"react-intl";import{Fragment,jsx,jsxs}from"react/jsx-runtime";import{InlineNotice,Text}from"@box/blueprint-web";var MetadataInstanceFormInlineNotice=({isLargeFile,isBetaLanguageEnabled})=>{let intl=useIntl();return!isBetaLanguageEnabled&&!isLargeFile?null:jsxs(Fragment,{children:[isLargeFile&&jsxs(InlineNotice,{variant:`warning`,variantIconAriaLabel:intl.formatMessage(messages.largeFileNoticeHeader),children:[jsx(Text,{as:`p`,variant:`bodyDefaultBold`,children:intl.formatMessage(messages.largeFileNoticeHeader)}),jsxs(Text,{as:`p`,children:[intl.formatMessage(messages.largeFileNoticeBody),` `]})]}),isBetaLanguageEnabled&&jsxs(InlineNotice,{variant:`info`,variantIconAriaLabel:intl.formatMessage(messages.autofillInBetaNoticeHeader),children:[jsx(Text,{as:`p`,variant:`bodyDefaultBold`,children:intl.formatMessage(messages.autofillInBetaNoticeHeader)}),jsxs(Text,{as:`p`,children:[intl.formatMessage(messages.autofillInBetaNoticeBody),` `]})]})]})};export{MetadataInstanceFormInlineNotice};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { t } from "../../../../chunks/metadata-instance-list.js";
|
|
3
|
-
import { t as n } from "../../../../chunks/metadata-instance-header.js";
|
|
4
|
-
import { t as r } from "../../../../chunks/metadata-instance.js";
|
|
5
|
-
var i = e(t), a = e(r);
|
|
6
|
-
export { a as MetadataInstance, n as MetadataInstanceHeader, i as MetadataInstanceList };
|
|
1
|
+
import{withAnalytics}from"../../utils/analytics/with-analytics.js";import{t as MetadataInstanceList$1}from"../../../../chunks/metadata-instance-list.js";import{t as MetadataInstanceHeader}from"../../../../chunks/metadata-instance-header.js";import{t as MetadataInstance$1}from"../../../../chunks/metadata-instance.js";var MetadataInstanceList=withAnalytics(MetadataInstanceList$1),MetadataInstance=withAnalytics(MetadataInstance$1);export{MetadataInstance,MetadataInstanceHeader,MetadataInstanceList};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceList };
|
|
1
|
+
import{t as MetadataInstanceList}from"../../../../chunks/metadata-instance-list.js";export{MetadataInstanceList};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstance };
|
|
1
|
+
import{t as MetadataInstance}from"../../../../../../chunks/metadata-instance.js";export{MetadataInstance};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceContent };
|
|
1
|
+
import{t as MetadataInstanceContent}from"../../../../../../chunks/metadata-instance-content.js";export{MetadataInstanceContent};
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({ confidenceScoreIconAriaLabel: {
|
|
3
|
-
id: "metadataEditor.metadataInstanceEntry.confidenceScoreIconAriaLabel",
|
|
4
|
-
defaultMessage: "Low confidence score - review needed"
|
|
5
|
-
} });
|
|
6
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({confidenceScoreIconAriaLabel:{id:`metadataEditor.metadataInstanceEntry.confidenceScoreIconAriaLabel`,defaultMessage:`Low confidence score - review needed`}});export{messages as default};
|
|
@@ -1,15 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
-
import { Text as n } from "@box/blueprint-web";
|
|
4
|
-
var r = ({ type: r, formattedValue: i, value: a, taxonomyNodeFetcher: o, taxonomyKey: s, scope: c, isExternallyOwned: l }) => r === "taxonomy" ? /* @__PURE__ */ t(e, {
|
|
5
|
-
isExternallyOwned: l,
|
|
6
|
-
scope: c,
|
|
7
|
-
taxonomyKey: s,
|
|
8
|
-
taxonomyNodeFetcher: o,
|
|
9
|
-
value: a
|
|
10
|
-
}) : i && /* @__PURE__ */ t(n, {
|
|
11
|
-
as: "p",
|
|
12
|
-
variant: "bodyDefaultBold",
|
|
13
|
-
children: i
|
|
14
|
-
});
|
|
15
|
-
export { r as MetadataEntryDisplay };
|
|
1
|
+
import{TaxonomyValue}from"./taxonomy-entry/taxonomy-value.js";import{jsx}from"react/jsx-runtime";import{Text}from"@box/blueprint-web";var MetadataEntryDisplay=({type,formattedValue,value,taxonomyNodeFetcher,taxonomyKey,scope,isExternallyOwned})=>type===`taxonomy`?jsx(TaxonomyValue,{isExternallyOwned,scope,taxonomyKey,taxonomyNodeFetcher,value}):formattedValue&&jsx(Text,{as:`p`,variant:`bodyDefaultBold`,children:formattedValue});export{MetadataEntryDisplay};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as MetadataInstanceEntry };
|
|
1
|
+
import{t as MetadataInstanceEntry}from"../../../../../../chunks/metadata-instance-entry.js";export{MetadataInstanceEntry};
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
var t = e({
|
|
3
|
-
loadingResultsErrorAction: {
|
|
4
|
-
id: "taxonomyAncestorStatusPill.errorAction",
|
|
5
|
-
defaultMessage: "Reload"
|
|
6
|
-
},
|
|
7
|
-
loadingResultsErrorMessage: {
|
|
8
|
-
id: "taxonomyAncestorStatusPill.errorMessage",
|
|
9
|
-
defaultMessage: "Failed to load details"
|
|
10
|
-
},
|
|
11
|
-
loadingResultsErrorIconLabel: {
|
|
12
|
-
id: "taxonomyAncestorStatusPill.errorIconLabel",
|
|
13
|
-
defaultMessage: "Error"
|
|
14
|
-
},
|
|
15
|
-
loadingAriaLabel: {
|
|
16
|
-
id: "taxonomyAncestorStatusPill.loadingAriaLabel",
|
|
17
|
-
defaultMessage: "Loading..."
|
|
18
|
-
},
|
|
19
|
-
emptyAncestorLevelValue: {
|
|
20
|
-
id: "taxonomyAncestorStatusPill.emptyAncestorLevelValue",
|
|
21
|
-
defaultMessage: "- -"
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
export { t as default };
|
|
1
|
+
import{defineMessages}from"react-intl";var messages=defineMessages({loadingResultsErrorAction:{id:`taxonomyAncestorStatusPill.errorAction`,defaultMessage:`Reload`},loadingResultsErrorMessage:{id:`taxonomyAncestorStatusPill.errorMessage`,defaultMessage:`Failed to load details`},loadingResultsErrorIconLabel:{id:`taxonomyAncestorStatusPill.errorIconLabel`,defaultMessage:`Error`},loadingAriaLabel:{id:`taxonomyAncestorStatusPill.loadingAriaLabel`,defaultMessage:`Loading...`},emptyAncestorLevelValue:{id:`taxonomyAncestorStatusPill.emptyAncestorLevelValue`,defaultMessage:`- -`}});export{messages as default};
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
import
|
|
2
|
-
export { e as TaxonomyAncestorStatusPill };
|
|
1
|
+
import{t as TaxonomyAncestorStatusPill}from"../../../../../../../chunks/taxonomy-ancestor-status-pill.js";export{TaxonomyAncestorStatusPill};
|