@box/metadata-editor 0.91.2 → 0.92.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/chunks/metadata-instance-form-card-wrapper.js +34 -32
- package/esm/index.js +18 -17
- package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.js +43 -23
- package/esm/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.js +12 -0
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/metadata-instance-form.js +76 -72
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.js +3 -11
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.js +33 -42
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.js +22 -0
- package/esm/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.js +46 -0
- package/esm/lib/utils/autofill-context.js +19 -18
- package/i18n/bn-IN.js +10 -3
- package/i18n/da-DK.js +10 -3
- package/i18n/de-DE.js +10 -3
- package/i18n/en-AU.js +10 -3
- package/i18n/en-CA.js +10 -3
- package/i18n/en-GB.js +10 -3
- package/i18n/en-US.js +7 -2
- package/i18n/en-US.properties +14 -4
- package/i18n/en-x-pseudo.js +10 -3
- package/i18n/es-419.js +10 -3
- package/i18n/es-ES.js +10 -3
- package/i18n/fi-FI.js +10 -3
- package/i18n/fr-CA.js +10 -3
- package/i18n/fr-FR.js +10 -3
- package/i18n/hi-IN.js +10 -3
- package/i18n/it-IT.js +10 -3
- package/i18n/ja-JP.js +10 -3
- package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.json +1 -1
- package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.json +1 -1
- package/i18n/json/src/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.json +1 -0
- package/i18n/ko-KR.js +10 -3
- package/i18n/nb-NO.js +10 -3
- package/i18n/nl-NL.js +10 -3
- package/i18n/pl-PL.js +10 -3
- package/i18n/pt-BR.js +10 -3
- package/i18n/ru-RU.js +10 -3
- package/i18n/sv-SE.js +10 -3
- package/i18n/tr-TR.js +10 -3
- package/i18n/zh-CN.js +10 -3
- package/i18n/zh-TW.js +10 -3
- package/package.json +3 -3
- package/styles/autofill-overlay.css +1 -1
- package/styles/metadata-instance-form-inline-notice.css +1 -0
- package/types/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/autofill-overlay.d.ts +3 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.d.ts +15 -0
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form/types.d.ts +3 -2
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/messages.d.ts +0 -10
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/metadata-instance-form-header.d.ts +1 -1
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-header/types.d.ts +1 -0
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/messages.d.ts +23 -0
- package/types/lib/components/metadata-instance-editor/subcomponents/metadata-instance-form-inline-notice/metadata-instance-form-inline-notice.d.ts +5 -0
- package/types/lib/utils/autofill-context.d.ts +1 -0
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
._autofillOverlay_vvkb0_1{position:absolute;top:0;left:0;right:0;bottom:0;background-color:#ffffffe6;z-index:2;display:flex;align-items:center;flex-direction:column;padding:var(--space-15) var(--space-4) 0 var(--space-4)}._autofillOverlayTitle_vvkb0_15{margin-top:var(--space-4);text-align:center}._dismissButton_vvkb0_20{margin-top:var(--space-4)}._loadingIcon_vvkb0_24{display:block;position:relative}._testContainerStyle_vvkb0_29{padding:var(--space-4);position:relative;width:380px;height:600px;border:1px solid #000}
|
@@ -0,0 +1 @@
|
|
1
|
+
._inlineNotice_j1wao_1{padding-top:var(--space-4)}
|
@@ -1,5 +1,7 @@
|
|
1
|
+
import { errorCodeTypes } from '../metadata-instance-form/types';
|
1
2
|
export type AutofillOverlayProps = {
|
3
|
+
errorCode: errorCodeTypes;
|
2
4
|
isFetchingSuggestions: boolean;
|
3
5
|
isLongLoading: boolean;
|
4
6
|
};
|
5
|
-
export declare const AutofillOverlay: ({ isFetchingSuggestions, isLongLoading }: AutofillOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
7
|
+
export declare const AutofillOverlay: ({ errorCode, isFetchingSuggestions, isLongLoading }: AutofillOverlayProps) => import("react/jsx-runtime").JSX.Element;
|
package/types/lib/components/metadata-instance-editor/subcomponents/autofill-overlay/messages.d.ts
CHANGED
@@ -4,6 +4,21 @@ declare const messages: {
|
|
4
4
|
description: string;
|
5
5
|
id: string;
|
6
6
|
};
|
7
|
+
dismissButton: {
|
8
|
+
defaultMessage: string;
|
9
|
+
description: string;
|
10
|
+
id: string;
|
11
|
+
};
|
12
|
+
errorTitle: {
|
13
|
+
defaultMessage: string;
|
14
|
+
description: string;
|
15
|
+
id: string;
|
16
|
+
};
|
17
|
+
errorDescription: {
|
18
|
+
defaultMessage: string;
|
19
|
+
description: string;
|
20
|
+
id: string;
|
21
|
+
};
|
7
22
|
loadingAriaLabel: {
|
8
23
|
defaultMessage: string;
|
9
24
|
description: string;
|
@@ -2,13 +2,14 @@ import { AutofillSuggestions, MetadataFormFieldValue, MetadataTemplateField, Met
|
|
2
2
|
import { TaxonomyOptionsFetcher } from '../../../metadata-editor-fields/components/metadata-taxonomy-field/types';
|
3
3
|
import { FormValues } from '../../types';
|
4
4
|
import { ERROR_CODE_METADATA_AUTOFILL_TIMEOUT, ERROR_CODE_METADATA_PRECONDITION_FAILED, ERROR_CODE_UNKNOWN } from './constants';
|
5
|
-
type errorCodeTypes = typeof ERROR_CODE_METADATA_AUTOFILL_TIMEOUT | typeof ERROR_CODE_METADATA_PRECONDITION_FAILED | typeof ERROR_CODE_UNKNOWN;
|
5
|
+
export type errorCodeTypes = typeof ERROR_CODE_METADATA_AUTOFILL_TIMEOUT | typeof ERROR_CODE_METADATA_PRECONDITION_FAILED | typeof ERROR_CODE_UNKNOWN;
|
6
6
|
export type MetadataInstanceFormProps = {
|
7
7
|
areAiSuggestionsAvailable: boolean;
|
8
8
|
errorCode?: errorCodeTypes;
|
9
9
|
isAiSuggestionsFeatureEnabled: boolean;
|
10
10
|
isBetaLanguageEnabled: boolean;
|
11
11
|
isDeleteButtonDisabled: boolean;
|
12
|
+
isLargeFile: boolean;
|
12
13
|
isUnsavedChangesModalOpen: boolean;
|
13
14
|
selectedTemplateInstance: MetadataTemplateInstance | null;
|
14
15
|
onCancel: () => void;
|
@@ -27,6 +28,7 @@ export type MetadataInstanceFormWrapperProps<T> = {
|
|
27
28
|
formValues: FormValues;
|
28
29
|
isAiSuggestionsFeatureEnabled: boolean;
|
29
30
|
isBetaLanguageEnabled: boolean;
|
31
|
+
isLargeFile: boolean;
|
30
32
|
isDeleteButtonDisabled: boolean;
|
31
33
|
isFetchingSuggestions: boolean;
|
32
34
|
isFormDirty: boolean;
|
@@ -54,4 +56,3 @@ export type JSONPatchOperation = {
|
|
54
56
|
value?: MetadataFormFieldValue;
|
55
57
|
};
|
56
58
|
export type JSONPatchOperations = JSONPatchOperation[];
|
57
|
-
export {};
|
@@ -4,15 +4,5 @@ declare const messages: {
|
|
4
4
|
description: string;
|
5
5
|
id: string;
|
6
6
|
};
|
7
|
-
aiSuggestionNoticeHeader: {
|
8
|
-
defaultMessage: string;
|
9
|
-
description: string;
|
10
|
-
id: string;
|
11
|
-
};
|
12
|
-
aiSuggestionNoticeBody: {
|
13
|
-
defaultMessage: string;
|
14
|
-
description: string;
|
15
|
-
id: string;
|
16
|
-
};
|
17
7
|
};
|
18
8
|
export default messages;
|
@@ -1,2 +1,2 @@
|
|
1
1
|
import { MetadataInstanceFormHeaderProps } from './types';
|
2
|
-
export declare const MetadataInstanceFormHeader: ({ areAiSuggestionsAvailable, hasSuggestions, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, isLoading, templateName, onAutofill, }: MetadataInstanceFormHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
2
|
+
export declare const MetadataInstanceFormHeader: ({ areAiSuggestionsAvailable, hasSuggestions, isAiSuggestionsFeatureEnabled, isBetaLanguageEnabled, isLargeFile, isLoading, templateName, onAutofill, }: MetadataInstanceFormHeaderProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -4,6 +4,7 @@ export type MetadataInstanceFormHeaderProps = {
|
|
4
4
|
hasSuggestions: boolean;
|
5
5
|
isAiSuggestionsFeatureEnabled: boolean;
|
6
6
|
isBetaLanguageEnabled: boolean;
|
7
|
+
isLargeFile: boolean;
|
7
8
|
isLoading: boolean;
|
8
9
|
onAutofill?: (templateKey: MetadataTemplateInstance['templateKey'], scope: MetadataTemplateInstance['scope']) => Promise<MetadataTemplateField[]>;
|
9
10
|
templateName?: string;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
declare const messages: {
|
2
|
+
autofillInBetaNoticeHeader: {
|
3
|
+
defaultMessage: string;
|
4
|
+
description: string;
|
5
|
+
id: string;
|
6
|
+
};
|
7
|
+
autofillInBetaNoticeBody: {
|
8
|
+
defaultMessage: string;
|
9
|
+
description: string;
|
10
|
+
id: string;
|
11
|
+
};
|
12
|
+
largeFileNoticeHeader: {
|
13
|
+
defaultMessage: string;
|
14
|
+
description: string;
|
15
|
+
id: string;
|
16
|
+
};
|
17
|
+
largeFileNoticeBody: {
|
18
|
+
defaultMessage: string;
|
19
|
+
description: string;
|
20
|
+
id: string;
|
21
|
+
};
|
22
|
+
};
|
23
|
+
export default messages;
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export type MetadataInstanceFormInlineNoticeProps = {
|
2
|
+
isBetaLanguageEnabled: boolean;
|
3
|
+
isLargeFile: boolean;
|
4
|
+
};
|
5
|
+
export declare const MetadataInstanceFormInlineNotice: ({ isLargeFile, isBetaLanguageEnabled, }: MetadataInstanceFormInlineNoticeProps) => import("react/jsx-runtime").JSX.Element;
|
@@ -13,6 +13,7 @@ export interface AutofillContextProviderProps {
|
|
13
13
|
isAiSuggestionsFeatureEnabled: boolean;
|
14
14
|
fetchSuggestions: (templateKey: MetadataTemplateInstance['templateKey'], scope: MetadataTemplateInstance['scope']) => Promise<MetadataTemplateField[]>;
|
15
15
|
}
|
16
|
+
export declare const TIMEOUT_10_SECONDS = 10000;
|
16
17
|
export declare const AutofillContext: React.Context<AutofillContextType>;
|
17
18
|
export declare const AutofillContextProvider: ({ children, isAiSuggestionsFeatureEnabled, fetchSuggestions, }: AutofillContextProviderProps) => React.ReactElement;
|
18
19
|
export declare const useAutofill: () => AutofillContextType;
|