@@ -301,28 +301,6 @@ const profilesMenuVisible = ref(false);
301301const profileBBlocks = ref ({});
302302const refBBlock = ref (null );
303303
304- watch (() => props .language , () => {
305- showTransformDetails .value = false ;
306- transformOutputView .value = transformOutputIsHtml .value ? ' web' : ' code' ;
307- profilesMenuVisible .value = false ;
308- });
309-
310- watch (transformOutputGeoJson, (geoJson ) => {
311- if (geoJson && transformOutputView .value === ' code' ) {
312- transformOutputView .value = ' map' ;
313- }
314- });
315-
316- watch (() => props .language ? .transformEntry ? .profilesValidation , async (pv ) => {
317- if (! pv) return ;
318- const bblocks = await bblockService .getBBlocks (true );
319- const result = {};
320- for (const profileId of Object .keys (pv)) {
321- result[profileId] = bblocks[profileId] || null ;
322- }
323- profileBBlocks .value = result;
324- }, { immediate: true });
325-
326304const isMapView = computed (() => props .language ? .id === ' map-view' );
327305const isWebView = computed (() => props .language ? .id === ' web-view' );
328306const isTransformView = computed (() => props .language ? .isTransform === true );
@@ -352,13 +330,6 @@ const currentSnippetRemote = computed(() => {
352330 return !! ref && / ^ https? :\/\/ / .test (ref) && ! (props .sourceFilesUrl && ref .startsWith (props .sourceFilesUrl ));
353331});
354332
355- watch (currentSnippet, async (snippet ) => {
356- refBBlock .value = null ;
357- if (snippet? .ref ) {
358- refBBlock .value = await bblockService .findResource (snippet .ref ) ?? null ;
359- }
360- }, { immediate: true });
361-
362333const showContentSidebar = computed (() =>
363334 props .example .content ? .trim () || currentSnippetRemote .value
364335);
@@ -416,6 +387,35 @@ const profilesValidationPassed = computed(() => {
416387 return Object .values (profilesValidation .value ).every (v => v .result );
417388});
418389
390+ watch (() => props .language , () => {
391+ showTransformDetails .value = false ;
392+ transformOutputView .value = transformOutputIsHtml .value ? ' web' : ' code' ;
393+ profilesMenuVisible .value = false ;
394+ });
395+
396+ watch (transformOutputGeoJson, (geoJson ) => {
397+ if (geoJson && transformOutputView .value === ' code' ) {
398+ transformOutputView .value = ' map' ;
399+ }
400+ });
401+
402+ watch (() => props .language ? .transformEntry ? .profilesValidation , async (pv ) => {
403+ if (! pv) return ;
404+ const bblocks = await bblockService .getBBlocks (true );
405+ const result = {};
406+ for (const profileId of Object .keys (pv)) {
407+ result[profileId] = bblocks[profileId] || null ;
408+ }
409+ profileBBlocks .value = result;
410+ }, { immediate: true });
411+
412+ watch (currentSnippet, async (snippet ) => {
413+ refBBlock .value = null ;
414+ if (snippet? .ref ) {
415+ refBBlock .value = await bblockService .findResource (snippet .ref ) ?? null ;
416+ }
417+ }, { immediate: true });
418+
419419
420420function canOpenProfile (profileId ) {
421421 const bblock = profileBBlocks .value [profileId];
0 commit comments