diff --git a/package-lock.json b/package-lock.json index 0ae8497c42..b68f330347 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13955,9 +13955,9 @@ } }, "superdesk-ui-framework": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-4.0.3.tgz", - "integrity": "sha512-LUNR1u3sK4Ayiq74hXZ5fqp7k9OK/MJogsEXJfeaJQyBWzRdbzwyYjljIXh7gJJExtDEBokLxU33IpjuXuITJA==", + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-4.0.4.tgz", + "integrity": "sha512-mm36orxkDHDYM3ID36q6fB9ImHwV2CvgEIAXmZD0BOpfy+4Yc0+7GLfuur0Zf1Vs7LIutcoe4ljsSQ0RdB9KDQ==", "requires": { "@popperjs/core": "^2.4.0", "@superdesk/common": "0.0.28", diff --git a/package.json b/package.json index 027178dcaf..80cb7d73cc 100644 --- a/package.json +++ b/package.json @@ -123,7 +123,7 @@ "sass-loader": "6.0.6", "shortid": "2.2.8", "style-loader": "0.20.2", - "superdesk-ui-framework": "4.0.3", + "superdesk-ui-framework": "^4.0.4", "ts-loader": "3.5.0", "typescript": "4.9.5", "uuid": "8.3.1", diff --git a/scripts/apps/authoring-react/authoring-react.tsx b/scripts/apps/authoring-react/authoring-react.tsx index c3ef60bfcd..c8ac2a6328 100644 --- a/scripts/apps/authoring-react/authoring-react.tsx +++ b/scripts/apps/authoring-react/authoring-react.tsx @@ -1451,7 +1451,7 @@ export class AuthoringReact extends React.PureCo {this.props.headerToolbar != null && ( )} @@ -1477,26 +1477,28 @@ export class AuthoringReact extends React.PureCo )} > - { - this.reinitialize(state, item); - }} - language={getLanguage(state.itemWithChanges)} - userPreferencesForFields={state.userPreferencesForFields} - setUserPreferencesForFields={this.setUserPreferences} - getVocabularyItems={this.getVocabularyItems} - toggledFields={state.toggledFields} - toggleField={this.toggleField} - readOnly={readOnly} - validationErrors={state.validationErrors} - item={state.itemWithChanges} - computeLatestEntity={this.computeLatestEntity} - /> + {state.profile.content.count() < 1 ? null : ( + { + this.reinitialize(state, item); + }} + language={getLanguage(state.itemWithChanges)} + userPreferencesForFields={state.userPreferencesForFields} + setUserPreferencesForFields={this.setUserPreferences} + getVocabularyItems={this.getVocabularyItems} + toggledFields={state.toggledFields} + toggleField={this.toggleField} + readOnly={readOnly} + validationErrors={state.validationErrors} + item={state.itemWithChanges} + computeLatestEntity={this.computeLatestEntity} + /> + )} )} sideOverlay={!isPinned && OpenWidgetComponent != null && OpenWidgetComponent} diff --git a/scripts/apps/authoring-react/fields/datetime/editor.tsx b/scripts/apps/authoring-react/fields/datetime/editor.tsx index 7b3a02c66e..42a67ce528 100644 --- a/scripts/apps/authoring-react/fields/datetime/editor.tsx +++ b/scripts/apps/authoring-react/fields/datetime/editor.tsx @@ -19,7 +19,10 @@ export class Editor extends React.PureComponent { { this.props.onChange(value); }} diff --git a/scripts/core/menu/authoring-switch.ts b/scripts/core/menu/authoring-switch.ts index 4a655c6a0b..e1404474e9 100644 --- a/scripts/core/menu/authoring-switch.ts +++ b/scripts/core/menu/authoring-switch.ts @@ -22,7 +22,6 @@ export const setupAuthoringReact = (url: string) => { const isNavigatingToAnExtensionPage = extensionUrls.find( (extensionUrl) => extensionUrl.startsWith(trimStartExact(parsedPath.hash, '#')), ) != null; - const isNavigatingToPlanning = parsedPath.hash.startsWith('#/planning'); const action: 'register' | 'deregister' = (() => {