Skip to content

Commit

Permalink
feat(metadata-editor): Update blueprint and pass down node fetcher
Browse files Browse the repository at this point in the history
  • Loading branch information
JChan106 committed Oct 25, 2024
1 parent 96be0ee commit 019eb86
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
"@babel/preset-typescript": "^7.24.7",
"@babel/template": "^7.24.7",
"@babel/types": "^7.24.7",
"@box/blueprint-web": "^7.30.1",
"@box/blueprint-web": "^7.36.3",
"@box/blueprint-web-assets": "^4.21.0",
"@box/box-ai-content-answers": "^0.57.1",
"@box/cldr-data": "^34.2.0",
Expand Down
6 changes: 5 additions & 1 deletion src/elements/content-sidebar/MetadataSidebarRedesign.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ import './MetadataSidebarRedesign.scss';
import MetadataInstanceEditor from './MetadataInstanceEditor';
import { convertTemplateToTemplateInstance } from './utils/convertTemplateToTemplateInstance';
import { isExtensionSupportedForMetadataSuggestions } from './utils/isExtensionSupportedForMetadataSuggestions';
import { metadataTaxonomyFetcher } from './fetchers/metadataTaxonomyFetcher';
import { metadataTaxonomyFetcher, metadataTaxonomyNodeAncestorsFetcher } from './fetchers/metadataTaxonomyFetcher';

const MARK_NAME_JS_READY = `${ORIGIN_METADATA_SIDEBAR_REDESIGN}_${EVENT_JS_READY}`;

Expand Down Expand Up @@ -179,6 +179,9 @@ function MetadataSidebarRedesign({ api, elementId, fileId, onError, isFeatureEna
options: PaginationQueryInput,
) => metadataTaxonomyFetcher(api, fileId, scope, templateKey, fieldKey, level, options);

const taxonomyNodeFetcher = async (scope: string, taxonomyKey: string, nodeID: string) =>
metadataTaxonomyNodeAncestorsFetcher(api, fileId, scope, taxonomyKey, nodeID);

return (
<SidebarContent
actions={metadataDropdown}
Expand Down Expand Up @@ -221,6 +224,7 @@ function MetadataSidebarRedesign({ api, elementId, fileId, onError, isFeatureEna
setIsDeleteButtonDisabled(false);
}}
templateInstances={templateInstances}
taxonomyNodeFetcher={taxonomyNodeFetcher}
/>
)}
</AutofillContextProvider>
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1503,19 +1503,19 @@
resolved "https://registry.yarnpkg.com/@box/blueprint-web-assets/-/blueprint-web-assets-4.21.0.tgz#204707eebd44447c02f3fa2b7e14d7f2aa5a00f1"
integrity sha512-ulzyPit8sMFQfYdkSU7vX/XUxALE8U8TkHDHdA+yPtJNHcxndjkd7Nf0hcCt48lMigLQjHYM2f39ZfSRmqmH5Q==

"@box/blueprint-web-assets@^4.25.0":
version "4.25.0"
resolved "https://registry.yarnpkg.com/@box/blueprint-web-assets/-/blueprint-web-assets-4.25.0.tgz#fd9c3aa8d37d41704e97575225d963dc18509e1b"
integrity sha512-Wm2lIb0+hxlRYl6fKNlzxht10HF0EYafJQt0uXEjoJ7KzyuDu7dxTNqSdenMSxLSu34bESxKnE3G+oEV2kJjeA==
"@box/blueprint-web-assets@^4.28.0":
version "4.28.0"
resolved "https://registry.yarnpkg.com/@box/blueprint-web-assets/-/blueprint-web-assets-4.28.0.tgz#c0ef88156ff2697e63de9ac12b6fc17b2bd7c981"
integrity sha512-udRZAvhNbPIAPrNIPg8awV5lfU3g3LzAloaAAFdBiwCmPQxaU4JvuwJambOOXUqdftV6pCD6NmJvE90NxTcwmg==

"@box/blueprint-web@^7.30.1":
version "7.30.1"
resolved "https://registry.yarnpkg.com/@box/blueprint-web/-/blueprint-web-7.30.1.tgz#f710aae380cabe226e83afd13e224bccd565679e"
integrity sha512-rgwYsXGiAolAvZpD5KhHLlQ3X+IfXvNYlWEepupi+iMQ5AM/WVn6GZrHl9SRUoWSlsYuo57ii6MusHhVT79DNQ==
"@box/blueprint-web@^7.36.3":
version "7.36.3"
resolved "https://registry.yarnpkg.com/@box/blueprint-web/-/blueprint-web-7.36.3.tgz#22c655820f2e6cfb8d6dc55d21662f2161605396"
integrity sha512-lPSViEw1EYFi4DBcFR7q0KECJnGYRRTgMRtzjwMBME13XBWTSVnfeuodbhAQ9K+IZzvSNGTvh867XY+siQJxgA==
dependencies:
"@ariakit/react" "0.4.5"
"@ariakit/react-core" "0.4.5"
"@box/blueprint-web-assets" "^4.25.0"
"@box/blueprint-web-assets" "^4.28.0"
"@internationalized/date" "^3.5.4"
"@radix-ui/react-accordion" "1.1.2"
"@radix-ui/react-checkbox" "1.0.4"
Expand Down

0 comments on commit 019eb86

Please sign in to comment.