From 7e12c29116000428134e9a3d72cacae68333623e Mon Sep 17 00:00:00 2001 From: dzonidoo Date: Tue, 12 Nov 2024 11:48:07 +0100 Subject: [PATCH 1/5] remove zIndex property --- package-lock.json | 6 +++--- package.json | 2 +- .../apps/archive/controllers/file-upload-error-modal.tsx | 1 - scripts/apps/archive/show-spike-dialog.tsx | 1 - .../versions-and-item-history/transmission-details.tsx | 1 - .../apps/authoring-react/authoring-angular-integration.tsx | 4 +--- .../authoring-react/compare-articles/compare-articles.tsx | 1 - .../fields/dropdown/dropdown-vocabulary/config.tsx | 1 - scripts/apps/authoring-react/multi-edit-modal.tsx | 3 --- .../authoring-react/toolbar/compare-article-versions.tsx | 1 - scripts/apps/authoring-react/toolbar/export-modal.tsx | 1 - scripts/apps/authoring-react/toolbar/highlights-modal.tsx | 1 - .../toolbar/mark-for-desks/mark-for-desks-modal.tsx | 1 - .../authoring-react/toolbar/multi-edit-toolbar-action.tsx | 2 -- .../authoring-react/toolbar/proofreading-theme-modal.tsx | 1 - scripts/apps/authoring-react/toolbar/template-modal.tsx | 1 - scripts/apps/authoring-react/toolbar/translate-modal.tsx | 1 - .../apps/authoring/attachments/AttachmentsEditorModal.tsx | 1 - .../apps/authoring/attachments/UploadAttachmentsModal.tsx | 1 - .../authoring/components/CharacterCountConfigButton.tsx | 1 - .../authoring/components/publish-warning-confirm-modal.tsx | 1 - .../authoring/components/unpublish-confirm-modal.tsx | 1 - .../authoring/authoring/services/quick-publish-modal.tsx | 1 - .../components/SetHighlightsForMultipleArticlesModal.tsx | 1 - .../apps/ingest/directives/authenticate-ingest-provider.tsx | 1 - scripts/apps/publish-preview/previewModal.tsx | 1 - scripts/apps/search/components/fields/authors.tsx | 1 - scripts/apps/search/controllers/get-bulk-actions.tsx | 1 - scripts/apps/vocabularies/components/UploadConfigModal.tsx | 1 - .../apps/workspace/content/components/new-field-select.tsx | 1 - .../content/views/FormattingOptionsMultiSelect.tsx | 1 - scripts/core/ArticlesListByQueryWithFilters.tsx | 4 ++-- scripts/core/editor3/components/toolbar/index.tsx | 1 - .../subcomponents/controlled-vocabulary-select.tsx | 2 -- .../subcomponents/publishing-target-select.tsx | 3 --- scripts/core/services/modalService.tsx | 1 - scripts/core/ui-utils.tsx | 1 - scripts/core/ui/components/IgnoreCancelSaveDialog.tsx | 1 - scripts/core/ui/components/Modal/ModalPrompt.tsx | 1 - scripts/core/ui/components/MultiSelectTreeWithTemplate.tsx | 2 -- .../generic-form/input-types/select_multiple_values.tsx | 1 - scripts/core/ui/components/modal-simple.tsx | 1 - scripts/core/ui/components/options-modal.tsx | 1 - scripts/core/ui/components/select-filterable.tsx | 4 +--- scripts/core/ui/show-confirmation-prompt.tsx | 1 - .../ai-widget/src/translations/translations-footer.tsx | 1 - .../src/ImageTaggingComponent/ImageTaggingComponent.tsx | 1 - scripts/extensions/auto-tagging-widget/src/auto-tagging.tsx | 1 - scripts/extensions/broadcasting/src/page.tsx | 5 ++--- .../src/rundown-templates/manage-rundown-templates.tsx | 1 - .../src/rundowns/create-rundown-from-template.tsx | 1 - .../broadcasting/src/shows/create-show-after-modal.tsx | 1 - .../extensions/broadcasting/src/shows/create-show-modal.tsx | 1 - .../extensions/markForUser/src/get-mark-for-user-modal.tsx | 1 - .../extensions/sams/src/components/sets/manageSetsModal.tsx | 2 +- scripts/extensions/sams/src/components/workspaceSubnav.tsx | 6 +++--- scripts/validate-instance-configuration.tsx | 1 - 57 files changed, 14 insertions(+), 75 deletions(-) diff --git a/package-lock.json b/package-lock.json index b798a3f603..f1a3e64804 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13955,9 +13955,9 @@ } }, "superdesk-ui-framework": { - "version": "3.1.28", - "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-3.1.28.tgz", - "integrity": "sha512-H/DE7gcJviHE5jR2vhuiTB2WLUxmpFstomFoEHWE5zGDqkcqGyPZUwRrwDTvtZLnMuMZXj1czeShbhJr9AxMhg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/superdesk-ui-framework/-/superdesk-ui-framework-4.0.0.tgz", + "integrity": "sha512-Wkie4yIfIKccJXEUN4Jk4ZW7TKjY3g6dxTvhwp1zk5TVg1FtRj5qPUFf6UU9pvnLSb4ziju4UTrimVIdYPgn7A==", "requires": { "@popperjs/core": "^2.4.0", "@superdesk/common": "0.0.28", diff --git a/package.json b/package.json index 4ec785dce4..073b7a67af 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": "^3.1.28", + "superdesk-ui-framework": "^4.0.0", "ts-loader": "3.5.0", "typescript": "4.9.5", "uuid": "8.3.1", diff --git a/scripts/apps/archive/controllers/file-upload-error-modal.tsx b/scripts/apps/archive/controllers/file-upload-error-modal.tsx index 7fce2bd3f6..6f2aa6af37 100644 --- a/scripts/apps/archive/controllers/file-upload-error-modal.tsx +++ b/scripts/apps/archive/controllers/file-upload-error-modal.tsx @@ -24,7 +24,6 @@ export function fileUploadErrorModal( return ( ( openModal( { showModal(({closeModal}) => ( @@ -450,9 +449,8 @@ function getInlineToolbarActions( component: () => ( <> extends React.PureComponent, return ( item.display_name} - zIndex={1050} /> ); diff --git a/scripts/apps/authoring-react/multi-edit-modal.tsx b/scripts/apps/authoring-react/multi-edit-modal.tsx index 9b822df5d9..fbc7a1a098 100644 --- a/scripts/apps/authoring-react/multi-edit-modal.tsx +++ b/scripts/apps/authoring-react/multi-edit-modal.tsx @@ -68,7 +68,6 @@ export class MultiEditModal extends React.PureComponent { priority: 0.1, component: () => ( { const leaf: IMenuItem = { @@ -205,7 +204,6 @@ export class MultiEditModal extends React.PureComponent { return ( { {availableArticles.length > 0 && (
{ const leaf: IMenuItem = { onClick: () => this.add(a._id), diff --git a/scripts/apps/authoring-react/toolbar/compare-article-versions.tsx b/scripts/apps/authoring-react/toolbar/compare-article-versions.tsx index 1344f23f9f..14adfbb14b 100644 --- a/scripts/apps/authoring-react/toolbar/compare-article-versions.tsx +++ b/scripts/apps/authoring-react/toolbar/compare-article-versions.tsx @@ -126,7 +126,6 @@ export class CompareArticleVersionsModal extends React.PureComponent diff --git a/scripts/apps/authoring-react/toolbar/export-modal.tsx b/scripts/apps/authoring-react/toolbar/export-modal.tsx index 10e3963bb1..8905ba073c 100644 --- a/scripts/apps/authoring-react/toolbar/export-modal.tsx +++ b/scripts/apps/authoring-react/toolbar/export-modal.tsx @@ -79,7 +79,6 @@ export class ExportModal extends React.PureComponent { size="medium" onHide={this.props.closeModal} visible - zIndex={1050} headerTemplate={gettext('Export')} > diff --git a/scripts/apps/authoring-react/toolbar/highlights-modal.tsx b/scripts/apps/authoring-react/toolbar/highlights-modal.tsx index a071d3658b..7029780661 100644 --- a/scripts/apps/authoring-react/toolbar/highlights-modal.tsx +++ b/scripts/apps/authoring-react/toolbar/highlights-modal.tsx @@ -69,7 +69,6 @@ export class HighlightsModal extends React.PureComponent { return ( { return ( { return ( { label="" inlineLabel labelHidden - zIndex={1050} optionLabel={(article) => getArticleLabel(article)} value={this.state.selectedArticles} onChange={(values) => { diff --git a/scripts/apps/authoring-react/toolbar/proofreading-theme-modal.tsx b/scripts/apps/authoring-react/toolbar/proofreading-theme-modal.tsx index fd2ded06d3..04ff5cb332 100644 --- a/scripts/apps/authoring-react/toolbar/proofreading-theme-modal.tsx +++ b/scripts/apps/authoring-react/toolbar/proofreading-theme-modal.tsx @@ -84,7 +84,6 @@ export class ProofreadingThemeModal extends React.Component { return ( { visible onHide={() => this.props.closeModal()} size="medium" - zIndex={1050} headerTemplate={gettext('Save as template')} > diff --git a/scripts/apps/authoring-react/toolbar/translate-modal.tsx b/scripts/apps/authoring-react/toolbar/translate-modal.tsx index 6c00d80dd0..26879b2846 100644 --- a/scripts/apps/authoring-react/toolbar/translate-modal.tsx +++ b/scripts/apps/authoring-react/toolbar/translate-modal.tsx @@ -97,7 +97,6 @@ export class TranslateModal extends React.PureComponent { visible onHide={() => this.props.closeModal()} size="small" - zIndex={1050} headerTemplate={gettext('Translate')} > diff --git a/scripts/apps/authoring/attachments/AttachmentsEditorModal.tsx b/scripts/apps/authoring/attachments/AttachmentsEditorModal.tsx index 3c64a7e7ba..03a83de2c3 100644 --- a/scripts/apps/authoring/attachments/AttachmentsEditorModal.tsx +++ b/scripts/apps/authoring/attachments/AttachmentsEditorModal.tsx @@ -35,7 +35,6 @@ export class AttachmentsEditorModal extends React.Component { return ( return ( ): Promise { return ( , deskId: { return ( { title={gettext('Authors')} placement="bottom-end" triggerSelector="#more-authors-button" - zIndex={1031} > diff --git a/scripts/apps/search/controllers/get-bulk-actions.tsx b/scripts/apps/search/controllers/get-bulk-actions.tsx index 68fe5e7f9c..f7c427aede 100644 --- a/scripts/apps/search/controllers/get-bulk-actions.tsx +++ b/scripts/apps/search/controllers/get-bulk-actions.tsx @@ -159,7 +159,6 @@ export function getBulkActions( onTrigger: () => { showModal(({closeModal}) => ( { : <>{label}; }} getLabel={({label}) => label} - zIndex={1050} getOptions={() => availableFields .map((field) => ({ value: field, diff --git a/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx b/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx index b3c8a6fa8e..c0eaef2283 100644 --- a/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx +++ b/scripts/apps/workspace/content/views/FormattingOptionsMultiSelect.tsx @@ -34,7 +34,6 @@ export class FormattingOptionsTreeSelect extends React.Component { label={gettext('Formatting options')} labelHidden inlineLabel - zIndex={1051} /> ); } diff --git a/scripts/core/ArticlesListByQueryWithFilters.tsx b/scripts/core/ArticlesListByQueryWithFilters.tsx index 9e057c4ab5..41030e3aec 100644 --- a/scripts/core/ArticlesListByQueryWithFilters.tsx +++ b/scripts/core/ArticlesListByQueryWithFilters.tsx @@ -230,7 +230,7 @@ export class ArticlesListByQueryWithFilters extends React.PureComponent {(dimensions) => ( - + {getTypeFilteringComponent(dimensions.width < COMPACT_WIDTH)} { return (
- +

{ return (
options} getLabel={(item) => item} getId={(item) => item} diff --git a/scripts/core/interactive-article-actions-panel/subcomponents/controlled-vocabulary-select.tsx b/scripts/core/interactive-article-actions-panel/subcomponents/controlled-vocabulary-select.tsx index dac3b47b53..24046f5351 100644 --- a/scripts/core/interactive-article-actions-panel/subcomponents/controlled-vocabulary-select.tsx +++ b/scripts/core/interactive-article-actions-panel/subcomponents/controlled-vocabulary-select.tsx @@ -11,7 +11,6 @@ interface IValue { } interface IProps { - zIndex?: number; required?: boolean; vocabularies: Array<{qcode: string; name: string}>; value: Array; @@ -54,7 +53,6 @@ export class ControlledVocabulariesSelect extends React.PureComponent vocabulary?.name ?? ''} diff --git a/scripts/core/interactive-article-actions-panel/subcomponents/publishing-target-select.tsx b/scripts/core/interactive-article-actions-panel/subcomponents/publishing-target-select.tsx index 7b27357ced..0f2804de2e 100644 --- a/scripts/core/interactive-article-actions-panel/subcomponents/publishing-target-select.tsx +++ b/scripts/core/interactive-article-actions-panel/subcomponents/publishing-target-select.tsx @@ -107,7 +107,6 @@ export class PublishingTargetSelect extends React.PureComponent
{ @@ -151,7 +149,6 @@ export class PublishingTargetSelect extends React.PureComponent
{ diff --git a/scripts/core/services/modalService.tsx b/scripts/core/services/modalService.tsx index 60edacf09f..70f9941c6b 100644 --- a/scripts/core/services/modalService.tsx +++ b/scripts/core/services/modalService.tsx @@ -107,7 +107,6 @@ function getErrorsModal( return ( {message} diff --git a/scripts/core/ui/components/IgnoreCancelSaveDialog.tsx b/scripts/core/ui/components/IgnoreCancelSaveDialog.tsx index d7af417221..36e56fac06 100644 --- a/scripts/core/ui/components/IgnoreCancelSaveDialog.tsx +++ b/scripts/core/ui/components/IgnoreCancelSaveDialog.tsx @@ -45,7 +45,6 @@ class IgnoreCancelSaveDialog extends React.PureComponent { return ( { return ( extends React.PureComponent ); } else if (props.kind === 'asynchronous') { @@ -90,7 +89,6 @@ export class MultiSelectTreeWithTemplate extends React.PureComponent } allowMultiple={this.props.allowMultiple} readOnly={this.props.readOnly} - zIndex={1051} /> ); } else { diff --git a/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx b/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx index f08efa1434..cc4e3f7c1b 100644 --- a/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx +++ b/scripts/core/ui/components/generic-form/input-types/select_multiple_values.tsx @@ -71,7 +71,6 @@ export class SelectMultipleValues extends React.Component { label={this.props.formField.label} inlineLabel labelHidden - zIndex={1051} data-test-id={this.props.formField.component_parameters?.dataTestId} /> diff --git a/scripts/core/ui/components/modal-simple.tsx b/scripts/core/ui/components/modal-simple.tsx index f3f4ff6e57..6842b5f580 100644 --- a/scripts/core/ui/components/modal-simple.tsx +++ b/scripts/core/ui/components/modal-simple.tsx @@ -18,7 +18,6 @@ export class ModalSimple extends React.PureComponent { return ( this.props.closeModal()} diff --git a/scripts/core/ui/components/options-modal.tsx b/scripts/core/ui/components/options-modal.tsx index 425643f2b4..2f70f81186 100644 --- a/scripts/core/ui/components/options-modal.tsx +++ b/scripts/core/ui/components/options-modal.tsx @@ -33,7 +33,6 @@ export function showOptionsModal(title: string, message: string, options: Array< return ( { required?: boolean; disabled?: boolean; - zIndex?: number; 'data-test-id'?: string; } export class SelectFilterable extends React.PureComponent> { render() { - const {items, value, getLabel, onChange, required, zIndex, disabled} = this.props; + const {items, value, getLabel, onChange, required, disabled} = this.props; return ( extends React.PureComponent> { getId={getLabel} required={required} disabled={disabled} - zIndex={zIndex} data-test-id={this.props['data-test-id']} inputWidth="100%" /> diff --git a/scripts/core/ui/show-confirmation-prompt.tsx b/scripts/core/ui/show-confirmation-prompt.tsx index f66e006927..47186f36cb 100644 --- a/scripts/core/ui/show-confirmation-prompt.tsx +++ b/scripts/core/ui/show-confirmation-prompt.tsx @@ -14,7 +14,6 @@ export function showConfirmationPrompt({title, message}: {title: string; message closeModal(); resolve(false); }} - zIndex={2001} headerTemplate={title} footerTemplate={( diff --git a/scripts/extensions/ai-widget/src/translations/translations-footer.tsx b/scripts/extensions/ai-widget/src/translations/translations-footer.tsx index 3be3b6fab6..9a1f684c40 100644 --- a/scripts/extensions/ai-widget/src/translations/translations-footer.tsx +++ b/scripts/extensions/ai-widget/src/translations/translations-footer.tsx @@ -64,7 +64,6 @@ export default class TranslationFooter extends React.Component { getId={({_id}) => _id} valueTemplate={({label}) => {gettext('To: {{ language }}', {language: label})}} getLabel={({label}) => label} - zIndex={1050} getOptions={() => availableLanguages.map((language) => ({value: language}))} kind="synchronous" onChange={(value) => { diff --git a/scripts/extensions/auto-tagging-widget/src/ImageTaggingComponent/ImageTaggingComponent.tsx b/scripts/extensions/auto-tagging-widget/src/ImageTaggingComponent/ImageTaggingComponent.tsx index 9bc3c2077b..dcea4fab15 100644 --- a/scripts/extensions/auto-tagging-widget/src/ImageTaggingComponent/ImageTaggingComponent.tsx +++ b/scripts/extensions/auto-tagging-widget/src/ImageTaggingComponent/ImageTaggingComponent.tsx @@ -293,7 +293,6 @@ export class ImageTagging extends React.PureComponent { title={gettext('Information')} placement="bottom-end" triggerSelector="#image-suggestions-info-btn" - zIndex={999} > {gettext( 'Image suggestions are based on generated tags' diff --git a/scripts/extensions/auto-tagging-widget/src/auto-tagging.tsx b/scripts/extensions/auto-tagging-widget/src/auto-tagging.tsx index d22d72a715..fe4344ecf8 100644 --- a/scripts/extensions/auto-tagging-widget/src/auto-tagging.tsx +++ b/scripts/extensions/auto-tagging-widget/src/auto-tagging.tsx @@ -103,7 +103,6 @@ function showImatricsServiceErrorModal(superdesk: ISuperdesk, errors: Array ( { - + { onHide={() => { closeModal(); }} - zIndex={1050} > @@ -296,7 +295,7 @@ export class RundownsPage extends React.PureComponent { - + this.props.closeModal(); } }} - zIndex={1050} > diff --git a/scripts/extensions/broadcasting/src/rundowns/create-rundown-from-template.tsx b/scripts/extensions/broadcasting/src/rundowns/create-rundown-from-template.tsx index 35e404bd7f..ce43fafd7b 100644 --- a/scripts/extensions/broadcasting/src/rundowns/create-rundown-from-template.tsx +++ b/scripts/extensions/broadcasting/src/rundowns/create-rundown-from-template.tsx @@ -105,7 +105,6 @@ export class CreateRundownFromTemplate extends React.PureComponent { return ( { {(form, save) => ( { > +
) : ( - +
), - 100, true, ); }; diff --git a/scripts/core/ui/components/content-create-dropdown/content-create-dropdown.tsx b/scripts/core/ui/components/content-create-dropdown/content-create-dropdown.tsx index adf1b45f75..55138a8c3e 100644 --- a/scripts/core/ui/components/content-create-dropdown/content-create-dropdown.tsx +++ b/scripts/core/ui/components/content-create-dropdown/content-create-dropdown.tsx @@ -2,10 +2,9 @@ import React from 'react'; import {IArticle} from 'superdesk-api'; -import {Button} from 'superdesk-ui-framework/react'; +import {Button, showPopup} from 'superdesk-ui-framework/react'; import ng from 'core/services/ng'; import {gettext} from 'core/utils'; -import {showPopup} from '../popupNew'; import {InitialView} from './initial-view'; import {DropZone3} from '../drop-zone-3'; import {getSuperdeskType} from 'utils/dragging'; @@ -78,7 +77,6 @@ export class ContentCreateDropdown extends React.PureComponent { onCreate={this.props.onCreate} /> ), - 1050, ); }} /> diff --git a/scripts/core/ui/components/popupNew.tsx b/scripts/core/ui/components/popupNew.tsx deleted file mode 100644 index 66b0f697f4..0000000000 --- a/scripts/core/ui/components/popupNew.tsx +++ /dev/null @@ -1,157 +0,0 @@ -import React from 'react'; -import ReactDOM from 'react-dom'; -import {throttle} from 'lodash'; -import {createPopper, Instance as PopperInstance, Placement} from '@popperjs/core/'; -import maxSize from 'popper-max-size-modifier'; -import {applyMaxSize, flipCustomModifier} from 'core/popper-utils'; - -export interface IPropsPositioner { - referenceElement: HTMLElement; - placement: Placement; - zIndex?: number; - onClose(): void; - closeOnHoverEnd?: boolean; -} - -export class PopupPositioner extends React.PureComponent { - private wrapperEl: HTMLDivElement; - private popper: PopperInstance; - - constructor(props: IPropsPositioner) { - super(props); - - this.closeOnClick = this.closeOnClick.bind(this); - this.closeOnScroll = throttle(this.closeOnScroll.bind(this), 200); - this.closeOnMouseLeave = this.closeOnMouseLeave.bind(this); - } - - closeOnClick(event: MouseEvent) { - if (this.wrapperEl == null) { - return; - } - - if ( - this.props.referenceElement.contains(event.target as Node) !== true - && this.wrapperEl.contains(event.target as Node) !== true - ) { - this.props.onClose(); - } - } - - closeOnScroll(event: MouseEvent) { - if (this.wrapperEl == null) { - return; - } - - if (this.wrapperEl.contains(event.target as Node) !== true) { - this.props.onClose(); - } - } - - closeOnMouseLeave(event: MouseEvent) { - if (this.wrapperEl == null) { - return; - } - - if (this.wrapperEl.contains(event.target as Node) !== true) { - this.props.onClose(); - } - } - - componentDidMount() { - window.addEventListener('click', this.closeOnClick, {capture: true}); - window.addEventListener('scroll', this.closeOnScroll, true); - - if (this.props.closeOnHoverEnd && this.wrapperEl != null) { - this.props.referenceElement.addEventListener('mouseleave', this.closeOnMouseLeave); - this.wrapperEl.addEventListener('mouseleave', this.closeOnMouseLeave); - } - - if (this.wrapperEl != null) { - /** - * Wait until referenceElement renders so createPopper - * can take its dimensions into account. - */ - setTimeout(() => { - this.popper = createPopper( - this.props.referenceElement, - this.wrapperEl, - { - placement: this.props.placement, - modifiers: [ - maxSize, - applyMaxSize, - flipCustomModifier, - ], - }, - ); - }, 50); - } - } - - componentWillUnmount() { - window.removeEventListener('click', this.closeOnClick); - window.removeEventListener('scroll', this.closeOnScroll, true); - - if (this.props.closeOnHoverEnd && this.wrapperEl != null) { - this.props.referenceElement.removeEventListener('mouseleave', this.closeOnMouseLeave); - this.wrapperEl.removeEventListener('mouseleave', this.closeOnMouseLeave); - } - - this.popper?.destroy?.(); - } - - render() { - return ( -
{ - this.wrapperEl = el; - }} - style={{zIndex: this.props.zIndex ?? 1, position: 'absolute', insetInlineStart: '-100vw'}} - > - {this.props.children} -
- ); - } -} - -/** - * The popup will remove itself if click/scroll events are detected outside the popup. - */ -export function showPopup( - referenceElement: HTMLElement, - placement: Placement, - Component: React.ComponentType<{closePopup(): void}>, - zIndex?: number, - closeOnHoverEnd?: boolean, - onClose?: () => void, -): {close: () => void} { - const el = document.createElement('div'); - - document.body.appendChild(el); - - const closeFn = () => { - ReactDOM.unmountComponentAtNode(el); - el.remove(); - onClose?.(); - }; - - ReactDOM.render( - ( - - - - ), - el, - ); - - return {close: closeFn}; -} diff --git a/scripts/core/ui/components/position-once.tsx b/scripts/core/ui/components/position-once.tsx index cc2120d168..731865923b 100644 --- a/scripts/core/ui/components/position-once.tsx +++ b/scripts/core/ui/components/position-once.tsx @@ -1,9 +1,13 @@ +import {Placement} from '@popperjs/core'; import React from 'react'; import ReactDOM from 'react-dom'; -import {IPropsPositioner, PopupPositioner} from './popupNew'; +import {PopupPositioner} from 'superdesk-ui-framework/react'; -interface IProps extends Omit { +interface IProps { delayed?: boolean; + placement: Placement; + onClose(): void; + closeOnHoverEnd?: boolean; } interface IState { @@ -41,7 +45,6 @@ export class PositionInline extends React.PureComponent { {this.props.children} diff --git a/scripts/core/ui/components/virtual-lists/select.tsx b/scripts/core/ui/components/virtual-lists/select.tsx index 12eb584f31..77905710d0 100644 --- a/scripts/core/ui/components/virtual-lists/select.tsx +++ b/scripts/core/ui/components/virtual-lists/select.tsx @@ -1,12 +1,11 @@ import React from 'react'; import {SuperdeskReactComponent} from 'core/SuperdeskReactComponent'; -import {showPopup} from '../popupNew'; import {IBaseRestApiResponse, IPropsSelectFromRemote, ISuperdeskQuery} from 'superdesk-api'; import {VirtualListFromQuery} from './virtual-list-from-query'; import {gettext} from 'core/utils'; import {InputLabel} from '../input-label'; import {SpacerBlock} from '../Spacer'; -import {IconButton} from 'superdesk-ui-framework'; +import {IconButton, showPopup} from 'superdesk-ui-framework/react'; interface IState { selected: 'loading' | T | null; @@ -154,7 +153,6 @@ export class SelectFromEndpoint />
), - 3000, undefined, () => { this.lastPopup = null; From 5a7f6f2269c05a671024ea81e5cdba5018824a78 Mon Sep 17 00:00:00 2001 From: dzonidoo Date: Tue, 12 Nov 2024 13:06:24 +0100 Subject: [PATCH 3/5] fix lint --- .../authoring-angular-integration.tsx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/scripts/apps/authoring-react/authoring-angular-integration.tsx b/scripts/apps/authoring-react/authoring-angular-integration.tsx index 028b21fbb9..08244e37d7 100644 --- a/scripts/apps/authoring-react/authoring-angular-integration.tsx +++ b/scripts/apps/authoring-react/authoring-angular-integration.tsx @@ -3,7 +3,17 @@ import {assertNever} from 'core/helpers/typescript-helpers'; import {DeskAndStage} from './subcomponents/desk-and-stage'; import {LockInfo} from './subcomponents/lock-info'; -import {Button, ButtonGroup, IconButton, Label, Modal, NavButton, Popover, Spacer, WithPopover} from 'superdesk-ui-framework/react'; +import { + Button, + ButtonGroup, + IconButton, + Label, + Modal, + NavButton, + Popover, + Spacer, + WithPopover, +} from 'superdesk-ui-framework/react'; import { IArticle, ITopBarWidget, From fc7402a235d8e00f5bbecb3d00e9f3664dd70e69 Mon Sep 17 00:00:00 2001 From: dzonidoo Date: Wed, 13 Nov 2024 11:31:43 +0100 Subject: [PATCH 4/5] restore the old string --- scripts/apps/authoring-react/authoring-angular-integration.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/apps/authoring-react/authoring-angular-integration.tsx b/scripts/apps/authoring-react/authoring-angular-integration.tsx index 08244e37d7..df4ab29c36 100644 --- a/scripts/apps/authoring-react/authoring-angular-integration.tsx +++ b/scripts/apps/authoring-react/authoring-angular-integration.tsx @@ -458,7 +458,7 @@ function getInlineToolbarActions( <> Date: Wed, 20 Nov 2024 12:48:22 +0100 Subject: [PATCH 5/5] fixed CI --- .../broadcasting/src/authoring-fields/subitems/editor.tsx | 1 - .../broadcasting/src/rundowns/manage-rundown-items.tsx | 2 +- scripts/extensions/broadcasting/src/rundowns/rundowns-list.tsx | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/scripts/extensions/broadcasting/src/authoring-fields/subitems/editor.tsx b/scripts/extensions/broadcasting/src/authoring-fields/subitems/editor.tsx index bdf0f40e59..5417d28477 100644 --- a/scripts/extensions/broadcasting/src/authoring-fields/subitems/editor.tsx +++ b/scripts/extensions/broadcasting/src/authoring-fields/subitems/editor.tsx @@ -73,7 +73,6 @@ export class Editor extends React.PureComponent { } ), - 1051, ); }} disabled={this.props.readOnly} diff --git a/scripts/extensions/broadcasting/src/rundowns/manage-rundown-items.tsx b/scripts/extensions/broadcasting/src/rundowns/manage-rundown-items.tsx index 2304380bba..2aef607b1f 100644 --- a/scripts/extensions/broadcasting/src/rundowns/manage-rundown-items.tsx +++ b/scripts/extensions/broadcasting/src/rundowns/manage-rundown-items.tsx @@ -135,7 +135,7 @@ export class ManageRundownItems exten } return ( - + { return (