From fd182e7e24d29836ce8736563f20264581063ce8 Mon Sep 17 00:00:00 2001 From: Maik Schneider Date: Wed, 12 Oct 2022 19:38:48 +0200 Subject: [PATCH 1/3] feat: set branch as commit input in release step --- .github/workflows/build-and-test.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index 7447f6c..05c8a83 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -118,4 +118,5 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} tag: "v${{needs.version-check.outputs.typo3-ext-version}}" + commit: 9.x From 5521c78a944af10710a0a4de6284abaeaa4a070a Mon Sep 17 00:00:00 2001 From: Maik Schneider Date: Wed, 12 Oct 2022 19:38:57 +0200 Subject: [PATCH 2/3] chore: raise version --- ext_emconf.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext_emconf.php b/ext_emconf.php index e98f19e..7a1e36d 100644 --- a/ext_emconf.php +++ b/ext_emconf.php @@ -12,7 +12,7 @@ 'uploadfolder' => 0, 'createDirs' => '', 'clearCacheOnLoad' => 0, - 'version' => '9.0.9', + 'version' => '9.0.10', 'constraints' => [ 'depends' => [ 'typo3' => '9.0.0-9.99.99', From 1ada2877428b9d7bac752241a4a998880daeeaa9 Mon Sep 17 00:00:00 2001 From: maikschneider Date: Wed, 12 Oct 2022 17:39:58 +0000 Subject: [PATCH 3/3] build: 9.0.10 --- .ddev/config.yaml | 206 -- .editorconfig | 89 - .github/workflows/build-and-test.yml | 122 - .gitignore | 8 - .phpstorm.meta.php | 90 - Configuration/php-cs-fixer.php | 96 - Resources/Public/JavaScript/MailCatcher.js | 1 + config/sites/main/config.yaml | 17 - package-lock.json | 3052 ----------------- package.json | 21 - phpstan-baseline.neon | 41 - phpstan.neon | 19 - tsconfig.json | 46 - .../Public/TypeScript/AjaxDataHandler.ts | 261 -- .../AjaxDataHandler/MessageInterface.ts | 18 - .../AjaxDataHandler/ResponseInterface.ts | 20 - .../Public/TypeScript/BackendException.ts | 22 - .../Public/TypeScript/ColorPicker.ts | 67 - .../Public/TypeScript/ContextHelp.ts | 175 - .../Public/TypeScript/ContextMenu.ts | 352 -- .../Public/TypeScript/ContextMenuActions.ts | 357 -- .../Public/TypeScript/DateTimePicker.ts | 176 - .../Public/TypeScript/DebugConsole.ts | 257 -- .../Public/TypeScript/DocumentHeader.ts | 114 - .../Public/TypeScript/DragUploader.ts | 771 ----- .../Public/TypeScript/Enum/KeyTypes.ts | 17 - .../Public/TypeScript/Enum/Severity.ts | 20 - .../Enum/Viewport/ScaffoldIdentifier.ts | 24 - .../Enum/Viewport/TopbarIdentifiers.ts | 16 - .../Public/TypeScript/Event/ClientRequest.ts | 25 - .../Public/TypeScript/Event/Consumable.ts | 20 - .../Public/TypeScript/Event/ConsumerScope.ts | 55 - .../TypeScript/Event/InteractionRequest.ts | 47 - .../Event/InteractionRequestAssignment.ts | 22 - .../TypeScript/Event/InteractionRequestMap.ts | 75 - .../Public/TypeScript/Event/TriggerRequest.ts | 50 - .../FormEngine/Element/SlugElement.ts | 222 -- .../FormEngine/FieldControl/AddRecord.ts | 40 - .../FieldControl/InsertClipboard.ts | 50 - .../FormEngine/FieldControl/ListModule.ts | 40 - .../FormEngine/FieldControl/ResetSelection.ts | 48 - .../FormEngine/FieldControl/TableWizard.ts | 40 - .../FormEngine/FieldWizard/ValueSlider.ts | 80 - .../FlexForm/FlexFormElementOptions.ts | 29 - .../Public/TypeScript/FormEngineFlexForm.ts | 282 -- .../Public/TypeScript/FormEngineReview.ts | 163 - .../Public/TypeScript/FormEngineSuggest.ts | 138 - .../Resources/Public/TypeScript/GridEditor.ts | 934 ----- .../Resources/Public/TypeScript/Icons.ts | 188 - .../Public/TypeScript/ImageManipulation.ts | 977 ------ .../Resources/Public/TypeScript/InfoWindow.ts | 42 - .../TypeScript/LayoutModule/DragDrop.ts | 272 -- .../Public/TypeScript/LayoutModule/Paste.ts | 185 - .../Resources/Public/TypeScript/LiveSearch.ts | 202 -- .../Public/TypeScript/Localization.ts | 356 -- .../Resources/Public/TypeScript/Login.ts | 212 -- .../Public/TypeScript/LoginRefresh.ts | 527 --- .../Resources/Public/TypeScript/Modal.ts | 502 --- .../Resources/Public/TypeScript/ModuleMenu.ts | 422 --- .../Public/TypeScript/NewMultiplePages.ts | 73 - .../Public/TypeScript/Notification.ts | 201 -- .../Public/TypeScript/OnlineMedia.ts | 137 - .../Public/TypeScript/PageActions.ts | 240 -- .../Resources/Public/TypeScript/Popover.ts | 127 - .../Resources/Public/TypeScript/RenameFile.ts | 95 - .../Resources/Public/TypeScript/Severity.ts | 90 - .../Public/TypeScript/SplitButtons.ts | 114 - .../Resources/Public/TypeScript/Storage.ts | 126 - .../Public/TypeScript/Storage/Client.ts | 115 - .../Public/TypeScript/Storage/Persistent.ts | 220 -- .../Resources/Public/TypeScript/Tabs.ts | 86 - .../Public/TypeScript/ToggleSearchToolbox.ts | 54 - .../Resources/Public/TypeScript/Toolbar.ts | 55 - .../TypeScript/Toolbar/ClearCacheMenu.ts | 90 - .../Public/TypeScript/Toolbar/ShortcutMenu.ts | 216 -- .../Toolbar/SystemInformationMenu.ts | 124 - .../Resources/Public/TypeScript/Tooltip.ts | 62 - .../Public/TypeScript/UserPassLogin.ts | 113 - .../Resources/Public/TypeScript/Utility.ts | 84 - .../Resources/Public/TypeScript/Viewport.ts | 58 - .../TypeScript/Viewport/AbstractContainer.ts | 22 - .../TypeScript/Viewport/ContentContainer.ts | 111 - .../Public/TypeScript/Viewport/Loader.ts | 28 - .../Viewport/NavigationComponentInterface.ts | 25 - .../Viewport/NavigationContainer.ts | 127 - .../Public/TypeScript/Viewport/PageTree.ts | 48 - .../Public/TypeScript/Viewport/Topbar.ts | 35 - .../TypeScript/Wizard/NewContentElement.ts | 37 - .../backend/action-button/abstract-action.ts | 22 - .../backend/action-button/deferred-action.ts | 35 - .../backend/action-button/immediate-action.ts | 31 - .../TypeScript/backend/action-dispatcher.ts | 116 - .../TypeScript/backend/ajax-data-handler.ts | 291 -- .../ajax-data-handler/message-interface.ts | 18 - .../ajax-data-handler/response-interface.ts | 20 - .../TypeScript/backend/backend-exception.ts | 22 - .../TypeScript/backend/broadcast-message.ts | 48 - .../TypeScript/backend/broadcast-service.ts | 53 - .../TypeScript/backend/clipboard-panel.ts | 234 -- typo3_src/TypeScript/backend/color-picker.ts | 74 - .../backend/column-selector-button.ts | 304 -- typo3_src/TypeScript/backend/context-help.ts | 67 - .../backend/context-menu-actions.ts | 394 --- typo3_src/TypeScript/backend/context-menu.ts | 468 --- .../TypeScript/backend/copy-to-clipboard.ts | 74 - .../TypeScript/backend/date-time-picker.ts | 226 -- typo3_src/TypeScript/backend/debug-console.ts | 258 -- .../TypeScript/backend/document-header.ts | 78 - .../backend/document-save-actions.ts | 123 - typo3_src/TypeScript/backend/drag-uploader.ts | 890 ----- .../backend/element/icon-element.ts | 158 - .../element/immediate-action-element.ts | 89 - .../backend/element/spinner-element.ts | 93 - .../backend/element/table-wizard-element.ts | 438 --- .../TypeScript/backend/enum/icon-types.ts | 30 - .../TypeScript/backend/enum/key-types.ts | 25 - typo3_src/TypeScript/backend/enum/severity.ts | 20 - .../enum/viewport/scaffold-identifier.ts | 25 - .../backend/event/client-request.ts | 25 - .../TypeScript/backend/event/consumable.ts | 20 - .../backend/event/consumer-scope.ts | 55 - .../backend/event/event-dispatcher.ts | 26 - .../event/interaction-request-assignment.ts | 22 - .../backend/event/interaction-request-map.ts | 75 - .../backend/event/interaction-request.ts | 47 - .../backend/event/trigger-request.ts | 50 - .../form-engine-link-browser-adapter.ts | 124 - .../TypeScript/backend/form-engine-review.ts | 164 - .../TypeScript/backend/form-engine-suggest.ts | 138 - .../backend/form-engine-validation.ts | 991 ------ typo3_src/TypeScript/backend/form-engine.ts | 1236 ------- .../flex-form-container-container.ts | 160 - .../container/flex-form-section-container.ts | 216 -- .../container/inline-control-container.ts | 1225 ------- .../container/site-language-container.ts | 581 ---- .../element/abstract-sortable-select-items.ts | 144 - .../form-engine/element/category-element.ts | 168 - .../form-engine/element/color-element.ts | 59 - .../form-engine/element/datetime-element.ts | 59 - .../element/extra/select-box-filter.ts | 84 - .../form-engine/element/folder-element.ts | 54 - .../form-engine/element/group-element.ts | 44 - .../form-engine/element/link-element.ts | 92 - .../form-engine/element/mfa-info-element.ts | 167 - .../form-engine/element/modifier/resizable.ts | 27 - .../form-engine/element/modifier/tabbable.ts | 29 - .../element/select-check-box-element.ts | 93 - .../select-multiple-side-by-side-element.ts | 62 - .../element/select-single-element.ts | 79 - .../element/select-tree-element.ts | 159 - .../element/select-tree-toolbar.ts | 121 - .../form-engine/element/select-tree.ts | 277 -- .../form-engine/element/slug-element.ts | 239 -- .../form-engine/element/text-element.ts | 45 - .../form-engine/element/text-table-element.ts | 31 - .../form-engine/field-control/add-record.ts | 40 - .../form-engine/field-control/edit-popup.ts | 64 - .../field-control/insert-clipboard.ts | 50 - .../form-engine/field-control/link-popup.ts | 50 - .../form-engine/field-control/list-module.ts | 40 - .../field-control/reset-selection.ts | 48 - .../form-engine/field-control/table-wizard.ts | 40 - .../localization-state-selector.ts | 67 - .../form-engine/field-wizard/value-picker.ts | 70 - .../form-engine/field-wizard/value-slider.ts | 79 - .../inline-relation/ajax-dispatcher.ts | 144 - .../inline-response-interface.ts | 42 - .../backend/form-engine/request-update.ts | 53 - .../backend/global-event-handler.ts | 172 - typo3_src/TypeScript/backend/grid-editor.ts | 953 ----- typo3_src/TypeScript/backend/hashing/md5.ts | 253 -- typo3_src/TypeScript/backend/icons.ts | 174 - .../TypeScript/backend/image-manipulation.ts | 947 ----- typo3_src/TypeScript/backend/info-window.ts | 46 - .../TypeScript/backend/input/clearable.ts | 104 - typo3_src/TypeScript/backend/input/index.d.ts | 8 - ...java-script-module-import-event-handler.ts | 19 - .../backend/layout-module/drag-drop.ts | 284 -- .../TypeScript/backend/layout-module/paste.ts | 178 - typo3_src/TypeScript/backend/localization.ts | 382 --- typo3_src/TypeScript/backend/login-refresh.ts | 494 --- typo3_src/TypeScript/backend/login.ts | 226 -- .../TypeScript/backend/modal-interface.ts | 19 - typo3_src/TypeScript/backend/modal.ts | 610 ---- typo3_src/TypeScript/backend/module-menu.ts | 502 --- typo3_src/TypeScript/backend/module.ts | 84 - typo3_src/TypeScript/backend/module/iframe.ts | 120 - typo3_src/TypeScript/backend/module/router.ts | 217 -- .../backend/multi-record-selection-action.ts | 26 - .../backend/multi-record-selection.ts | 451 --- .../TypeScript/backend/multi-step-wizard.ts | 574 ---- .../new-content-element-wizard-button.ts | 68 - .../backend/new-content-element-wizard.ts | 198 -- .../TypeScript/backend/new-multiple-pages.ts | 73 - typo3_src/TypeScript/backend/notification.ts | 279 -- typo3_src/TypeScript/backend/online-media.ts | 143 - typo3_src/TypeScript/backend/page-actions.ts | 220 -- .../backend/page-tree/page-tree-element.ts | 1077 ------ .../TypeScript/backend/page-tree/page-tree.ts | 125 - typo3_src/TypeScript/backend/popover.ts | 175 - typo3_src/TypeScript/backend/severity.ts | 90 - .../TypeScript/backend/site-inline-actions.ts | 32 - .../storage/abstract-client-storage.ts | 63 - .../backend/storage/browser-session.ts | 28 - .../TypeScript/backend/storage/client.ts | 28 - .../backend/storage/module-state-storage.ts | 112 - .../TypeScript/backend/storage/persistent.ts | 221 -- typo3_src/TypeScript/backend/svg-tree.ts | 1485 -------- typo3_src/TypeScript/backend/switch-user.ts | 85 - typo3_src/TypeScript/backend/tabs.ts | 69 - .../backend/tests/backend-exception-test.ts | 26 - .../element/immediate-action-element-test.ts | 102 - .../tests/form-engine-validation-test.ts | 379 -- .../backend/tests/grid-editor-test.ts | 27 - .../backend/tests/hashing/md5Test.ts | 26 - .../TypeScript/backend/tests/icons-test.ts | 65 - .../backend/tests/notification-test.ts | 143 - .../TypeScript/backend/tests/popover-test.ts | 77 - typo3_src/TypeScript/backend/toolbar.ts | 42 - .../backend/toolbar/clear-cache-menu.ts | 86 - .../TypeScript/backend/toolbar/live-search.ts | 220 -- .../backend/toolbar/shortcut-menu.ts | 211 -- .../toolbar/system-information-menu.ts | 119 - typo3_src/TypeScript/backend/tooltip.ts | 108 - .../TypeScript/backend/tree/drag-drop.ts | 251 -- .../backend/tree/file-storage-browser.ts | 178 - .../tree/file-storage-tree-container.ts | 477 --- .../backend/tree/file-storage-tree.ts | 86 - .../TypeScript/backend/tree/page-browser.ts | 297 -- .../TypeScript/backend/tree/tree-node.ts | 80 - .../TypeScript/backend/user-pass-login.ts | 122 - typo3_src/TypeScript/backend/utility.ts | 176 - .../backend/utility/message-utility.ts | 45 - .../utility/top-level-module-import.ts | 32 - typo3_src/TypeScript/backend/viewport.ts | 44 - .../backend/viewport/abstract-container.ts | 22 - .../backend/viewport/content-container.ts | 117 - .../TypeScript/backend/viewport/loader.ts | 28 - .../backend/viewport/navigation-container.ts | 143 - .../backend/viewport/resizable-navigation.ts | 151 - .../TypeScript/backend/viewport/toolbar.ts | 24 - .../TypeScript/backend/viewport/topbar.ts | 39 - .../TypeScript/backend/window-manager.ts | 65 - typo3_src/TypeScript/backend/wizard.ts | 326 -- .../Public/TypeScript/Ajax/AjaxRequest.ts | 193 -- .../Public/TypeScript/Ajax/AjaxResponse.ts | 58 - .../TypeScript/Ajax/InputTransformer.ts | 93 - .../Public/TypeScript/Ajax/ResponseError.ts | 24 - .../Ajax/SimpleResponseInterface.ts | 6 - .../Authentication/MfaProvider/Totp.ts | 65 - .../BackwardCompat/JQueryNativePromises.ts | 58 - .../TypeScript/BackwardCompat/index.d.ts | 8 - .../Public/TypeScript/DocumentService.ts | 60 - .../Public/TypeScript/Event/DebounceEvent.ts | 53 - .../Public/TypeScript/Event/EventInterface.ts | 25 - .../Public/TypeScript/Event/RegularEvent.ts | 49 - .../Event/RequestAnimationFrameEvent.ts | 46 - .../Public/TypeScript/Event/ThrottleEvent.ts | 48 - .../Public/TypeScript/SecurityUtility.ts | 90 - .../Resources/Public/TypeScript/lit-helper.ts | 43 - .../TypeScript/core/ajax/ajax-request.ts | 189 - .../TypeScript/core/ajax/ajax-response.ts | 57 - .../TypeScript/core/ajax/input-transformer.ts | 92 - .../core/ajax/simple-response-interface.ts | 5 - .../core/authentication/mfa-provider/totp.ts | 65 - typo3_src/TypeScript/core/document-service.ts | 59 - .../TypeScript/core/event/debounce-event.ts | 52 - .../TypeScript/core/event/event-interface.ts | 24 - .../TypeScript/core/event/regular-event.ts | 48 - .../event/request-animation-frame-event.ts | 45 - .../TypeScript/core/event/throttle-event.ts | 47 - .../core/java-script-item-handler.ts | 31 - .../core/java-script-item-processor.ts | 200 -- typo3_src/TypeScript/core/lit-helper.ts | 42 - .../core/require-jsconfig-handler.ts | 25 - typo3_src/TypeScript/core/security-utility.ts | 89 - .../core/tests/ajax/ajax-request-test.ts | 254 -- .../core/tests/ajax/input-transformer-test.ts | 62 - .../core/tests/security-utility-test.ts | 48 - webpack.js | 33 - 280 files changed, 1 insertion(+), 46465 deletions(-) delete mode 100644 .ddev/config.yaml delete mode 100644 .editorconfig delete mode 100644 .github/workflows/build-and-test.yml delete mode 100644 .gitignore delete mode 100644 .phpstorm.meta.php delete mode 100644 Configuration/php-cs-fixer.php create mode 100644 Resources/Public/JavaScript/MailCatcher.js delete mode 100644 config/sites/main/config.yaml delete mode 100644 package-lock.json delete mode 100644 package.json delete mode 100644 phpstan-baseline.neon delete mode 100644 phpstan.neon delete mode 100644 tsconfig.json delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/AjaxDataHandler.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/AjaxDataHandler/MessageInterface.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/AjaxDataHandler/ResponseInterface.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/BackendException.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/ColorPicker.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/ContextHelp.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/ContextMenu.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/ContextMenuActions.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/DateTimePicker.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/DebugConsole.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/DocumentHeader.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/DragUploader.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Enum/KeyTypes.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Enum/Severity.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Enum/Viewport/ScaffoldIdentifier.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Enum/Viewport/TopbarIdentifiers.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Event/ClientRequest.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Event/Consumable.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Event/ConsumerScope.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Event/InteractionRequest.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Event/InteractionRequestAssignment.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Event/InteractionRequestMap.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Event/TriggerRequest.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/Element/SlugElement.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/FieldControl/AddRecord.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/FieldControl/InsertClipboard.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/FieldControl/ListModule.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/FieldControl/ResetSelection.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/FieldControl/TableWizard.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/FieldWizard/ValueSlider.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngine/FlexForm/FlexFormElementOptions.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngineFlexForm.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngineReview.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/FormEngineSuggest.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/GridEditor.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Icons.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/ImageManipulation.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/InfoWindow.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/LayoutModule/DragDrop.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/LayoutModule/Paste.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/LiveSearch.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Localization.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Login.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/LoginRefresh.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Modal.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/ModuleMenu.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/NewMultiplePages.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Notification.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/OnlineMedia.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/PageActions.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Popover.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/RenameFile.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Severity.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/SplitButtons.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Storage.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Storage/Client.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Storage/Persistent.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Tabs.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/ToggleSearchToolbox.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Toolbar.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Toolbar/ClearCacheMenu.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Toolbar/ShortcutMenu.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Toolbar/SystemInformationMenu.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Tooltip.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/UserPassLogin.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Utility.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport/AbstractContainer.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport/ContentContainer.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport/Loader.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport/NavigationComponentInterface.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport/NavigationContainer.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport/PageTree.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Viewport/Topbar.ts delete mode 100644 typo3_src/TypeScript/backend/Resources/Public/TypeScript/Wizard/NewContentElement.ts delete mode 100644 typo3_src/TypeScript/backend/action-button/abstract-action.ts delete mode 100644 typo3_src/TypeScript/backend/action-button/deferred-action.ts delete mode 100644 typo3_src/TypeScript/backend/action-button/immediate-action.ts delete mode 100644 typo3_src/TypeScript/backend/action-dispatcher.ts delete mode 100644 typo3_src/TypeScript/backend/ajax-data-handler.ts delete mode 100644 typo3_src/TypeScript/backend/ajax-data-handler/message-interface.ts delete mode 100644 typo3_src/TypeScript/backend/ajax-data-handler/response-interface.ts delete mode 100644 typo3_src/TypeScript/backend/backend-exception.ts delete mode 100644 typo3_src/TypeScript/backend/broadcast-message.ts delete mode 100644 typo3_src/TypeScript/backend/broadcast-service.ts delete mode 100644 typo3_src/TypeScript/backend/clipboard-panel.ts delete mode 100644 typo3_src/TypeScript/backend/color-picker.ts delete mode 100644 typo3_src/TypeScript/backend/column-selector-button.ts delete mode 100644 typo3_src/TypeScript/backend/context-help.ts delete mode 100644 typo3_src/TypeScript/backend/context-menu-actions.ts delete mode 100644 typo3_src/TypeScript/backend/context-menu.ts delete mode 100644 typo3_src/TypeScript/backend/copy-to-clipboard.ts delete mode 100644 typo3_src/TypeScript/backend/date-time-picker.ts delete mode 100644 typo3_src/TypeScript/backend/debug-console.ts delete mode 100644 typo3_src/TypeScript/backend/document-header.ts delete mode 100644 typo3_src/TypeScript/backend/document-save-actions.ts delete mode 100644 typo3_src/TypeScript/backend/drag-uploader.ts delete mode 100644 typo3_src/TypeScript/backend/element/icon-element.ts delete mode 100644 typo3_src/TypeScript/backend/element/immediate-action-element.ts delete mode 100644 typo3_src/TypeScript/backend/element/spinner-element.ts delete mode 100644 typo3_src/TypeScript/backend/element/table-wizard-element.ts delete mode 100644 typo3_src/TypeScript/backend/enum/icon-types.ts delete mode 100644 typo3_src/TypeScript/backend/enum/key-types.ts delete mode 100644 typo3_src/TypeScript/backend/enum/severity.ts delete mode 100644 typo3_src/TypeScript/backend/enum/viewport/scaffold-identifier.ts delete mode 100644 typo3_src/TypeScript/backend/event/client-request.ts delete mode 100644 typo3_src/TypeScript/backend/event/consumable.ts delete mode 100644 typo3_src/TypeScript/backend/event/consumer-scope.ts delete mode 100644 typo3_src/TypeScript/backend/event/event-dispatcher.ts delete mode 100644 typo3_src/TypeScript/backend/event/interaction-request-assignment.ts delete mode 100644 typo3_src/TypeScript/backend/event/interaction-request-map.ts delete mode 100644 typo3_src/TypeScript/backend/event/interaction-request.ts delete mode 100644 typo3_src/TypeScript/backend/event/trigger-request.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine-link-browser-adapter.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine-review.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine-suggest.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine-validation.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/container/flex-form-container-container.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/container/flex-form-section-container.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/container/inline-control-container.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/container/site-language-container.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/abstract-sortable-select-items.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/category-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/color-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/datetime-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/extra/select-box-filter.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/folder-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/group-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/link-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/mfa-info-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/modifier/resizable.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/modifier/tabbable.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/select-check-box-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/select-multiple-side-by-side-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/select-single-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/select-tree-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/select-tree-toolbar.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/select-tree.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/slug-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/text-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/element/text-table-element.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-control/add-record.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-control/edit-popup.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-control/insert-clipboard.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-control/link-popup.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-control/list-module.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-control/reset-selection.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-control/table-wizard.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-wizard/localization-state-selector.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-wizard/value-picker.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/field-wizard/value-slider.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/inline-relation/ajax-dispatcher.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/inline-relation/inline-response-interface.ts delete mode 100644 typo3_src/TypeScript/backend/form-engine/request-update.ts delete mode 100644 typo3_src/TypeScript/backend/global-event-handler.ts delete mode 100644 typo3_src/TypeScript/backend/grid-editor.ts delete mode 100644 typo3_src/TypeScript/backend/hashing/md5.ts delete mode 100644 typo3_src/TypeScript/backend/icons.ts delete mode 100644 typo3_src/TypeScript/backend/image-manipulation.ts delete mode 100644 typo3_src/TypeScript/backend/info-window.ts delete mode 100644 typo3_src/TypeScript/backend/input/clearable.ts delete mode 100644 typo3_src/TypeScript/backend/input/index.d.ts delete mode 100644 typo3_src/TypeScript/backend/java-script-module-import-event-handler.ts delete mode 100644 typo3_src/TypeScript/backend/layout-module/drag-drop.ts delete mode 100644 typo3_src/TypeScript/backend/layout-module/paste.ts delete mode 100644 typo3_src/TypeScript/backend/localization.ts delete mode 100644 typo3_src/TypeScript/backend/login-refresh.ts delete mode 100644 typo3_src/TypeScript/backend/login.ts delete mode 100644 typo3_src/TypeScript/backend/modal-interface.ts delete mode 100644 typo3_src/TypeScript/backend/modal.ts delete mode 100644 typo3_src/TypeScript/backend/module-menu.ts delete mode 100644 typo3_src/TypeScript/backend/module.ts delete mode 100644 typo3_src/TypeScript/backend/module/iframe.ts delete mode 100644 typo3_src/TypeScript/backend/module/router.ts delete mode 100644 typo3_src/TypeScript/backend/multi-record-selection-action.ts delete mode 100644 typo3_src/TypeScript/backend/multi-record-selection.ts delete mode 100644 typo3_src/TypeScript/backend/multi-step-wizard.ts delete mode 100644 typo3_src/TypeScript/backend/new-content-element-wizard-button.ts delete mode 100644 typo3_src/TypeScript/backend/new-content-element-wizard.ts delete mode 100644 typo3_src/TypeScript/backend/new-multiple-pages.ts delete mode 100644 typo3_src/TypeScript/backend/notification.ts delete mode 100644 typo3_src/TypeScript/backend/online-media.ts delete mode 100644 typo3_src/TypeScript/backend/page-actions.ts delete mode 100644 typo3_src/TypeScript/backend/page-tree/page-tree-element.ts delete mode 100644 typo3_src/TypeScript/backend/page-tree/page-tree.ts delete mode 100644 typo3_src/TypeScript/backend/popover.ts delete mode 100644 typo3_src/TypeScript/backend/severity.ts delete mode 100644 typo3_src/TypeScript/backend/site-inline-actions.ts delete mode 100644 typo3_src/TypeScript/backend/storage/abstract-client-storage.ts delete mode 100644 typo3_src/TypeScript/backend/storage/browser-session.ts delete mode 100644 typo3_src/TypeScript/backend/storage/client.ts delete mode 100644 typo3_src/TypeScript/backend/storage/module-state-storage.ts delete mode 100644 typo3_src/TypeScript/backend/storage/persistent.ts delete mode 100644 typo3_src/TypeScript/backend/svg-tree.ts delete mode 100644 typo3_src/TypeScript/backend/switch-user.ts delete mode 100644 typo3_src/TypeScript/backend/tabs.ts delete mode 100644 typo3_src/TypeScript/backend/tests/backend-exception-test.ts delete mode 100644 typo3_src/TypeScript/backend/tests/element/immediate-action-element-test.ts delete mode 100644 typo3_src/TypeScript/backend/tests/form-engine-validation-test.ts delete mode 100644 typo3_src/TypeScript/backend/tests/grid-editor-test.ts delete mode 100644 typo3_src/TypeScript/backend/tests/hashing/md5Test.ts delete mode 100644 typo3_src/TypeScript/backend/tests/icons-test.ts delete mode 100644 typo3_src/TypeScript/backend/tests/notification-test.ts delete mode 100644 typo3_src/TypeScript/backend/tests/popover-test.ts delete mode 100644 typo3_src/TypeScript/backend/toolbar.ts delete mode 100644 typo3_src/TypeScript/backend/toolbar/clear-cache-menu.ts delete mode 100644 typo3_src/TypeScript/backend/toolbar/live-search.ts delete mode 100644 typo3_src/TypeScript/backend/toolbar/shortcut-menu.ts delete mode 100644 typo3_src/TypeScript/backend/toolbar/system-information-menu.ts delete mode 100644 typo3_src/TypeScript/backend/tooltip.ts delete mode 100644 typo3_src/TypeScript/backend/tree/drag-drop.ts delete mode 100644 typo3_src/TypeScript/backend/tree/file-storage-browser.ts delete mode 100644 typo3_src/TypeScript/backend/tree/file-storage-tree-container.ts delete mode 100644 typo3_src/TypeScript/backend/tree/file-storage-tree.ts delete mode 100644 typo3_src/TypeScript/backend/tree/page-browser.ts delete mode 100644 typo3_src/TypeScript/backend/tree/tree-node.ts delete mode 100644 typo3_src/TypeScript/backend/user-pass-login.ts delete mode 100644 typo3_src/TypeScript/backend/utility.ts delete mode 100644 typo3_src/TypeScript/backend/utility/message-utility.ts delete mode 100644 typo3_src/TypeScript/backend/utility/top-level-module-import.ts delete mode 100644 typo3_src/TypeScript/backend/viewport.ts delete mode 100644 typo3_src/TypeScript/backend/viewport/abstract-container.ts delete mode 100644 typo3_src/TypeScript/backend/viewport/content-container.ts delete mode 100644 typo3_src/TypeScript/backend/viewport/loader.ts delete mode 100644 typo3_src/TypeScript/backend/viewport/navigation-container.ts delete mode 100644 typo3_src/TypeScript/backend/viewport/resizable-navigation.ts delete mode 100644 typo3_src/TypeScript/backend/viewport/toolbar.ts delete mode 100644 typo3_src/TypeScript/backend/viewport/topbar.ts delete mode 100644 typo3_src/TypeScript/backend/window-manager.ts delete mode 100644 typo3_src/TypeScript/backend/wizard.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Ajax/AjaxRequest.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Ajax/AjaxResponse.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Ajax/InputTransformer.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Ajax/ResponseError.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Ajax/SimpleResponseInterface.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Authentication/MfaProvider/Totp.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/BackwardCompat/JQueryNativePromises.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/BackwardCompat/index.d.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/DocumentService.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Event/DebounceEvent.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Event/EventInterface.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Event/RegularEvent.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Event/RequestAnimationFrameEvent.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/Event/ThrottleEvent.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/SecurityUtility.ts delete mode 100644 typo3_src/TypeScript/core/Resources/Public/TypeScript/lit-helper.ts delete mode 100644 typo3_src/TypeScript/core/ajax/ajax-request.ts delete mode 100644 typo3_src/TypeScript/core/ajax/ajax-response.ts delete mode 100644 typo3_src/TypeScript/core/ajax/input-transformer.ts delete mode 100644 typo3_src/TypeScript/core/ajax/simple-response-interface.ts delete mode 100644 typo3_src/TypeScript/core/authentication/mfa-provider/totp.ts delete mode 100644 typo3_src/TypeScript/core/document-service.ts delete mode 100644 typo3_src/TypeScript/core/event/debounce-event.ts delete mode 100644 typo3_src/TypeScript/core/event/event-interface.ts delete mode 100644 typo3_src/TypeScript/core/event/regular-event.ts delete mode 100644 typo3_src/TypeScript/core/event/request-animation-frame-event.ts delete mode 100644 typo3_src/TypeScript/core/event/throttle-event.ts delete mode 100644 typo3_src/TypeScript/core/java-script-item-handler.ts delete mode 100644 typo3_src/TypeScript/core/java-script-item-processor.ts delete mode 100644 typo3_src/TypeScript/core/lit-helper.ts delete mode 100644 typo3_src/TypeScript/core/require-jsconfig-handler.ts delete mode 100644 typo3_src/TypeScript/core/security-utility.ts delete mode 100644 typo3_src/TypeScript/core/tests/ajax/ajax-request-test.ts delete mode 100644 typo3_src/TypeScript/core/tests/ajax/input-transformer-test.ts delete mode 100644 typo3_src/TypeScript/core/tests/security-utility-test.ts delete mode 100644 webpack.js diff --git a/.ddev/config.yaml b/.ddev/config.yaml deleted file mode 100644 index 1b80b3e..0000000 --- a/.ddev/config.yaml +++ /dev/null @@ -1,206 +0,0 @@ -name: xm-mail-catcher -type: typo3 -docroot: public -php_version: "7.2" -webserver_type: nginx-fpm -router_http_port: "80" -router_https_port: "443" -xdebug_enabled: false -additional_hostnames: [] -additional_fqdns: [] -database: - type: mariadb - version: "10.3" -nfs_mount_enabled: false -mutagen_enabled: false -use_dns_when_possible: true -composer_version: "2" -web_environment: [] -nodejs_version: "16" - -# Key features of ddev's config.yaml: - -# name: # Name of the project, automatically provides -# http://projectname.ddev.site and https://projectname.ddev.site - -# type: # drupal6/7/8, backdrop, typo3, wordpress, php - -# docroot: # Relative path to the directory containing index.php. - -# php_version: "7.4" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1" - -# You can explicitly specify the webimage but this -# is not recommended, as the images are often closely tied to ddev's' behavior, -# so this can break upgrades. - -# webimage: # nginx/php docker image. - -# database: -# type: # mysql, mariadb -# version: # database version, like "10.3" or "8.0" -# Note that mariadb_version or mysql_version from v1.18 and earlier -# will automatically be converted to this notation with just a "ddev config --auto" - -# router_http_port: # Port to be used for http (defaults to port 80) -# router_https_port: # Port for https (defaults to 443) - -# xdebug_enabled: false # Set to true to enable xdebug and "ddev start" or "ddev restart" -# Note that for most people the commands -# "ddev xdebug" to enable xdebug and "ddev xdebug off" to disable it work better, -# as leaving xdebug enabled all the time is a big performance hit. - -# xhprof_enabled: false # Set to true to enable xhprof and "ddev start" or "ddev restart" -# Note that for most people the commands -# "ddev xhprof" to enable xhprof and "ddev xhprof off" to disable it work better, -# as leaving xhprof enabled all the time is a big performance hit. - -# webserver_type: nginx-fpm # or apache-fpm - -# timezone: Europe/Berlin -# This is the timezone used in the containers and by PHP; -# it can be set to any valid timezone, -# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones -# For example Europe/Dublin or MST7MDT - -# composer_root: -# Relative path to the composer root directory from the project root. This is -# the directory which contains the composer.json and where all Composer related -# commands are executed. - -# composer_version: "2" -# if composer_version:"2" it will use the most recent composer v2 -# It can also be set to "1", to get most recent composer v1 -# or "" for the default v2 created at release time. -# It can be set to any existing specific composer version. -# After first project 'ddev start' this will not be updated until it changes - -# nodejs_version: "16" -# change from the default system Node.js version to another supported version, like 12, 14, 17. -# Note that you can use 'ddev nvm' or nvm inside the web container to provide nearly any -# Node.js version, including v6, etc. - -# additional_hostnames: -# - somename -# - someothername -# would provide http and https URLs for "somename.ddev.site" -# and "someothername.ddev.site". - -# additional_fqdns: -# - example.com -# - sub1.example.com -# would provide http and https URLs for "example.com" and "sub1.example.com" -# Please take care with this because it can cause great confusion. - -# upload_dir: custom/upload/dir -# would set the destination path for ddev import-files to /custom/upload/dir - -# working_dir: -# web: /var/www/html -# db: /home -# would set the default working directory for the web and db services. -# These values specify the destination directory for ddev ssh and the -# directory in which commands passed into ddev exec are run. - -# omit_containers: [db, dba, ddev-ssh-agent] -# Currently only these containers are supported. Some containers can also be -# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit -# the "db" container, several standard features of ddev that access the -# database container will be unusable. In the global configuration it is also -# possible to omit ddev-router, but not here. - -# nfs_mount_enabled: false -# Great performance improvement but requires host configuration first. -# See https://ddev.readthedocs.io/en/stable/users/performance/#using-nfs-to-mount-the-project-into-the-container - -# mutagen_enabled: false -# Experimental performance improvement using mutagen asynchronous updates. -# See https://ddev.readthedocs.io/en/latest/users/performance/#using-mutagen - -# fail_on_hook_fail: False -# Decide whether 'ddev start' should be interrupted by a failing hook - -# host_https_port: "59002" -# The host port binding for https can be explicitly specified. It is -# dynamic unless otherwise specified. -# This is not used by most people, most people use the *router* instead -# of the localhost port. - -# host_webserver_port: "59001" -# The host port binding for the ddev-webserver can be explicitly specified. It is -# dynamic unless otherwise specified. -# This is not used by most people, most people use the *router* instead -# of the localhost port. - -# host_db_port: "59002" -# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic -# unless explicitly specified. - -# phpmyadmin_port: "8036" -# phpmyadmin_https_port: "8037" -# The PHPMyAdmin ports can be changed from the default 8036 and 8037 - -# host_phpmyadmin_port: "8036" -# The phpmyadmin (dba) port is not normally bound on the host at all, instead being routed -# through ddev-router, but it can be specified and bound. - -# mailhog_port: "8025" -# mailhog_https_port: "8026" -# The MailHog ports can be changed from the default 8025 and 8026 - -# host_mailhog_port: "8025" -# The mailhog port is not normally bound on the host at all, instead being routed -# through ddev-router, but it can be bound directly to localhost if specified here. - -# webimage_extra_packages: [php7.4-tidy, php-bcmath] -# Extra Debian packages that are needed in the webimage can be added here - -# dbimage_extra_packages: [telnet,netcat] -# Extra Debian packages that are needed in the dbimage can be added here - -# use_dns_when_possible: true -# If the host has internet access and the domain configured can -# successfully be looked up, DNS will be used for hostname resolution -# instead of editing /etc/hosts -# Defaults to true - -# project_tld: ddev.site -# The top-level domain used for project URLs -# The default "ddev.site" allows DNS lookup via a wildcard -# If you prefer you can change this to "ddev.local" to preserve -# pre-v1.9 behavior. - -# ngrok_args: --subdomain mysite --auth username:pass -# Provide extra flags to the "ngrok http" command, see -# https://ngrok.com/docs#http or run "ngrok http -h" - -# disable_settings_management: false -# If true, ddev will not create CMS-specific settings files like -# Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php -# In this case the user must provide all such settings. - -# You can inject environment variables into the web container with: -# web_environment: -# - SOMEENV=somevalue -# - SOMEOTHERENV=someothervalue - -# no_project_mount: false -# (Experimental) If true, ddev will not mount the project into the web container; -# the user is responsible for mounting it manually or via a script. -# This is to enable experimentation with alternate file mounting strategies. -# For advanced users only! - -# bind_all_interfaces: false -# If true, host ports will be bound on all network interfaces, -# not just the localhost interface. This means that ports -# will be available on the local network if the host firewall -# allows it. - -# Many ddev commands can be extended to run tasks before or after the -# ddev command is executed, for example "post-start", "post-import-db", -# "pre-composer", "post-composer" -# See https://ddev.readthedocs.io/en/stable/users/extending-commands/ for more -# information on the commands that can be extended and the tasks you can define -# for them. Example: -#hooks: -# post-start: -# - exec: composer install -d /var/www/html diff --git a/.editorconfig b/.editorconfig deleted file mode 100644 index f9c6334..0000000 --- a/.editorconfig +++ /dev/null @@ -1,89 +0,0 @@ -# EditorConfig is awesome: http://EditorConfig.org - -# top-most EditorConfig file -root = true - -# Unix-style newlines with a newline ending every file -[*] -charset = utf-8 -end_of_line = lf -insert_final_newline = true -trim_trailing_whitespace = true - -# CSS-Files -[*.css] -indent_style = tab -indent_size = 4 - -# HTML-Files -[*.html] -indent_style = tab -indent_size = 2 - -# TMPL-Files -[*.tmpl] -indent_style = tab -indent_size = 4 - -# SCSS-Files -[*.scss] -indent_style = space -indent_size = 4 - -# TS/JS-Files -[*.ts] -indent_style = space -indent_size = 2 -[*.js] -indent_style = space -indent_size = 2 - -# JSON-Files -[*.json] -indent_style = tab -indent_size = 4 - -# PHP-Files -[*.php] -indent_style = space -indent_size = 4 - -# ReST-Files -[*.rst] -indent_style = space -indent_size = 3 - -# MD-Files -[*.md] -indent_style = space -indent_size = 4 - -# YAML-Files -[{*.yaml,*.yml}] -indent_style = space -indent_size = 2 - -# package.json -# .travis.yml -# bower.json -[{package.json,.travis.yml,bower.json}] -indent_style = space -indent_size = 2 - -# TypoScript -[*.typoscript] -indent_style = space -indent_size = 2 -[*.tsconfig] -indent_style = space -indent_size = 2 - -# XLF-Files -[*.xlf] -indent_style = tab -indent_size = 4 - -# SQL-Files -[*.sql] -indent_style = tab -indent_size = 2 \ No newline at end of file diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml deleted file mode 100644 index 05c8a83..0000000 --- a/.github/workflows/build-and-test.yml +++ /dev/null @@ -1,122 +0,0 @@ -name: build-and-test -on: - push: - branches: - - 9.x-dev - -jobs: - build-assets: - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - name: Install dependencies - uses: actions/setup-node@v3 - with: - node-version: '16' - - run: npm install - - run: npm run build - - name: Archive production artifacts - uses: actions/upload-artifact@v3 - with: - name: assets - path: Resources/Public/JavaScript - - php-lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - uses: shivammathur/setup-php@v2 - with: - php-version: 7.4 - - run: composer install - - run: composer run ci:php:lint - - php-fixer: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - uses: shivammathur/setup-php@v2 - with: - php-version: 7.4 - - run: composer install - - run: composer run ci:php:fixer - - php-stan: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - uses: shivammathur/setup-php@v2 - with: - php-version: 7.4 - - run: composer install - - run: composer run ci:php:stan - - version-check: - runs-on: ubuntu-latest - needs: - - build-assets - - php-lint - - php-fixer - - php-stan - outputs: - latest-version: ${{ steps.main.outputs.latest-version }} - typo3-ext-version: ${{ steps.dev.outputs.typo3-ext-version }} - steps: - - uses: actions/checkout@v3 - - id: dev - run: | - TYPO3_EXT_VERSION=$(cat ext_emconf.php | grep "version*" | grep -Po "(\d+\.)+\d+") - echo "::set-output name=typo3-ext-version::$(echo ${TYPO3_EXT_VERSION})" - - uses: actions/checkout@v3 - with: - ref: 9.x - - run: git fetch --prune --unshallow --tags - - id: main - run: | - LATEST_TAG=$(git describe --abbrev=0 --tags | grep -Po "(\d+\.)+\d+") - echo "::set-output name=latest-version::$(echo ${LATEST_TAG})" - - release: - runs-on: ubuntu-latest - needs: - - version-check - if: ${{ needs.version-check.outputs.latest-version != needs.version-check.outputs.typo3-ext-version }} - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - run: git checkout -b release-${{needs.version-check.outputs.typo3-ext-version}} 9.x-dev - - name: Download assets - uses: actions/download-artifact@v3 - with: - name: assets - path: Resources/Public/JavaScript - - name: Clean up - run: rm -rf .ddev .github config Configuration/php-cs-fixer.php node_modules public var vendor typo3_src .editorconfig .gitignore .phpstorm.meta.php package.json package-lock.json phpstan.neon phpstan-baseline.neon tsconfig.json webpack.js - - uses: EndBug/add-and-commit@v9 - id: commit - with: - add: '.' - committer_name: GitHub Actions - committer_email: actions@github.com - message: 'build: ${{needs.version-check.outputs.typo3-ext-version}}' - new_branch: release-${{needs.version-check.outputs.typo3-ext-version}} - - name: Create PR - id: pr - run: | - echo "PR_URL=$(gh pr create --title="Release ${{needs.version-check.outputs.typo3-ext-version}}" --body 'build ${{ steps.commit.commit_sha }}' --base 9.x --head release-${{needs.version-check.outputs.typo3-ext-version}})" >> $GITHUB_ENV - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Merge PR - run: gh pr merge ${{ env.PR_URL }} -d --merge - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - uses: ncipollo/release-action@v1 - with: - token: ${{ secrets.GITHUB_TOKEN }} - tag: "v${{needs.version-check.outputs.typo3-ext-version}}" - commit: 9.x - diff --git a/.gitignore b/.gitignore deleted file mode 100644 index c9966d4..0000000 --- a/.gitignore +++ /dev/null @@ -1,8 +0,0 @@ - -public -node_modules -!Resources/Public -!typo3_src/TypeScript/*/Resources/Public -Resources/Public/JavaScript -var -vendor diff --git a/.phpstorm.meta.php b/.phpstorm.meta.php deleted file mode 100644 index a35099e..0000000 --- a/.phpstorm.meta.php +++ /dev/null @@ -1,90 +0,0 @@ - \TYPO3\CMS\Core\Context\DateTimeAspect::class, - 'visibility' => \TYPO3\CMS\Core\Context\VisibilityAspect::class, - 'backend.user' => \TYPO3\CMS\Core\Context\UserAspect::class, - 'frontend.user' => \TYPO3\CMS\Core\Context\UserAspect::class, - 'workspace' => \TYPO3\CMS\Core\Context\WorkspaceAspect::class, - 'language' => \TYPO3\CMS\Core\Context\LanguageAspect::class, - 'typoscript' => \TYPO3\CMS\Core\Context\TypoScriptAspect::class, - ])); - - expectedArguments( - \TYPO3\CMS\Core\Context\DateTimeAspect::get(), - 0, - 'timestamp', - 'iso', - 'timezone', - 'full', - 'accessTime' - ); - - expectedArguments( - \TYPO3\CMS\Core\Context\VisibilityAspect::get(), - 0, - 'includeHiddenPages', - 'includeHiddenContent', - 'includeDeletedRecords' - ); - - expectedArguments( - \TYPO3\CMS\Core\Context\UserAspect::get(), - 0, - 'id', - 'username', - 'isLoggedIn', - 'isAdmin', - 'groupIds', - 'groupNames' - ); - - expectedArguments( - \TYPO3\CMS\Core\Context\WorkspaceAspect::get(), - 0, - 'id', - 'isLive', - 'isOffline' - ); - - expectedArguments( - \TYPO3\CMS\Core\Context\LanguageAspect::get(), - 0, - 'id', - 'contentId', - 'fallbackChain', - 'overlayType', - 'legacyLanguageMode', - 'legacyOverlayType' - ); - - expectedArguments( - \TYPO3\CMS\Core\Context\TypoScriptAspect::get(), - 0, - 'forcedTemplateParsing' - ); -} diff --git a/Configuration/php-cs-fixer.php b/Configuration/php-cs-fixer.php deleted file mode 100644 index 0b167ea..0000000 --- a/Configuration/php-cs-fixer.php +++ /dev/null @@ -1,96 +0,0 @@ -ignoreVCSIgnored(true) - ->in(realpath(__DIR__ . '/../')); -// Return a Code Sniffing configuration using -// all sniffers needed for PSR-2 -// and additionally: -// - Remove leading slashes in use clauses. -// - PHP single-line arrays should not have trailing comma. -// - Single-line whitespace before closing semicolon are prohibited. -// - Remove unused use statements in the PHP source code -// - Ensure Concatenation to have at least one whitespace around -// - Remove trailing whitespace at the end of blank lines. -return (new \PhpCsFixer\Config()) - ->setRiskyAllowed(true) - ->setRules([ - '@DoctrineAnnotation' => true, - '@PSR2' => true, - 'array_syntax' => ['syntax' => 'short'], - 'blank_line_after_opening_tag' => true, - 'braces' => ['allow_single_line_closure' => true], - 'cast_spaces' => ['space' => 'none'], - 'compact_nullable_typehint' => true, - 'concat_space' => ['spacing' => 'one'], - 'declare_equal_normalize' => ['space' => 'none'], - 'dir_constant' => true, - 'function_typehint_space' => true, - 'lowercase_cast' => true, - 'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], - 'modernize_types_casting' => true, - 'native_function_casing' => true, - 'new_with_braces' => true, - 'no_alias_functions' => true, - 'no_blank_lines_after_phpdoc' => true, - 'no_empty_phpdoc' => true, - 'no_empty_statement' => true, - 'no_extra_blank_lines' => true, - 'no_leading_import_slash' => true, - 'no_leading_namespace_whitespace' => true, - 'no_null_property_initialization' => true, - 'no_short_bool_cast' => true, - 'no_singleline_whitespace_before_semicolons' => true, - 'no_superfluous_elseif' => true, - 'no_trailing_comma_in_singleline_array' => true, - 'no_unneeded_control_parentheses' => true, - 'no_unused_imports' => true, - 'no_useless_else' => true, - 'no_whitespace_in_blank_line' => true, - 'ordered_imports' => true, - 'php_unit_construct' => ['assertions' => ['assertEquals', 'assertSame', 'assertNotEquals', 'assertNotSame']], - 'php_unit_mock_short_will_return' => true, - 'php_unit_test_case_static_method_calls' => ['call_type' => 'self'], - 'phpdoc_no_access' => true, - 'phpdoc_no_empty_return' => true, - 'phpdoc_no_package' => true, - 'phpdoc_scalar' => true, - 'phpdoc_trim' => true, - 'phpdoc_types' => true, - 'phpdoc_types_order' => ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none'], - 'return_type_declaration' => ['space_before' => 'none'], - 'single_quote' => true, - 'single_line_comment_style' => ['comment_types' => ['hash']], - 'single_trait_insert_per_statement' => true, - 'trailing_comma_in_multiline' => ['elements' => ['arrays']], - 'whitespace_after_comma_in_array' => true, - ]) - ->setFinder($finder); diff --git a/Resources/Public/JavaScript/MailCatcher.js b/Resources/Public/JavaScript/MailCatcher.js new file mode 100644 index 0000000..2b395e7 --- /dev/null +++ b/Resources/Public/JavaScript/MailCatcher.js @@ -0,0 +1 @@ +define("TYPO3/CMS/XmMailCatcher/MailCatcher",["TYPO3/CMS/Backend/Modal","TYPO3/CMS/Backend/Severity","jquery"],((e,t,a)=>{return s={735:(e,t,a)=>{var s,n;s=[a,t,a(404),a(580),a(339)],n=function(e,t,a,s,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.XmMailCatcher=void 0,t.XmMailCatcher=new class{constructor(){this.bindListener()}bindListener(){a(".content-type-switches a").on("click",this.onContentTypeSwitchClick.bind(this)),a("button[data-delete]").on("click",this.onDeleteButtonClick.bind(this)),a("#delete-all-messages").on("click",this.onDeleteAllMessagesClick.bind(this)),a(".panel.panel-default .form-irre-header-body").on("click",this.onPanelClick.bind(this))}onPanelClick(e){e.preventDefault(),e.stopPropagation();const t=a(e.currentTarget).closest(".panel").find(".panel-collapse");t.hasClass("collapse")?t.removeClass("collapse"):t.addClass("collapse");const s="true"===a(e.currentTarget).attr("data-html-loaded");if(a(e.currentTarget).closest(".panel").find('.content-type-switches a[data-content-type="html"]:only-child').length&&!s){const t=a(e.currentTarget).closest(".panel").attr("data-message-file");this.loadHtmlMail(t)}}onDeleteAllMessagesClick(e){e.preventDefault();const t=this;s.confirm("Delete Messages","Are you sure, you want to delete all messages?",n.warning,[{text:"Yes, delete",btnClass:"btn-danger",trigger:function(){t.deleteAllMessages(),s.dismiss()}},{text:"No, abort",btnClass:"primary-outline",active:!0,trigger:function(){s.dismiss()}}])}deleteAllMessages(){const e=this,t=a(".panel[data-message-file]");a.ajax({url:TYPO3.settings.ajaxUrls.mailcatcher_delete_all}).done((function(a){if(a.success)return t.remove(),e.refreshMessageCount(),void top.TYPO3.Notification.success("Success","All messages have been deleted",3);top.TYPO3.Notification.error("Error","Could not delete messages",3)}))}refreshMessageCount(){const e=a(".panel[data-message-file]").length;a("*[data-message-count]").attr("data-message-count",e),a(".message-count").html(e.toString())}onDeleteButtonClick(e){e.preventDefault();const t=a(e.currentTarget).closest(".panel"),s=t.attr("data-message-file"),n=this,r=TYPO3.settings.ajaxUrls.mailcatcher_delete+"&"+a.param({messageFile:s});a.ajax({url:r}).done((function(e){if(e.success)return t.remove(),void n.refreshMessageCount();top.TYPO3.Notification.error("Error","Could not delete message",3)}))}onContentTypeSwitchClick(e){e.preventDefault();const t=a(e.currentTarget).attr("data-content-type"),s=a(e.currentTarget).attr("data-m-id");a('.content-type-switches a[data-m-id="'+s+'"]').addClass("btn-default").removeClass("btn-primary"),a('.content-type-switches a[data-m-id="'+s+'"][data-content-type="'+t+'"]').removeClass("btn-default").addClass("btn-primary"),a('.form-section[data-m-id="'+s+'"]').addClass("hidden"),a('.form-section[data-m-id="'+s+'"][data-content-type="'+t+'"]').removeClass("hidden");const n=a(e.currentTarget).closest(".panel");"false"===n.attr("data-html-loaded")&&this.loadHtmlMail(n.attr("data-message-file"))}loadHtmlMail(e){const t=TYPO3.settings.ajaxUrls.mailcatcher_html+"&"+a.param({messageFile:e});a.ajax({url:t}).done((function(t){const s=a(" - `; - } - - public attributeChangedCallback(name: string, old: string, value: string) { - super.attributeChangedCallback(name, old, value); - - if (name === 'endpoint' && value === old) { - // Trigger explicit reload if value has been reset to current value, - // lit doesn't re-set the attribute in this case. - this.iframe.setAttribute('src', value); - } - } - - public connectedCallback(): void { - super.connectedCallback(); - if (this.endpoint) { - this.dispatch('typo3-iframe-load', { url: this.endpoint, title: null }); - } - } - - private registerUnloadHandler(iframe: HTMLIFrameElement): void { - try { - iframe.contentWindow.addEventListener('unload', (e: Event) => this._unload(e, iframe), { once: true}); - } catch (e) { - console.error('Failed to access contentWindow of module iframe – using a foreign origin?'); - throw e; - } - } - - private retrieveModuleStateFromIFrame(iframe: HTMLIFrameElement): ModuleState { - try { - return { - url: iframe.contentWindow.location.href, - title: iframe.contentDocument.title, - module: iframe.contentDocument.body.querySelector('.module[data-module-name]')?.getAttribute('data-module-name') - }; - } catch (e) { - console.error('Failed to access contentWindow of module iframe – using a foreign origin?'); - return { url: this.endpoint, title: null }; - } - } - - private _loaded({target}: Event) { - const iframe = target; - - // The event handler for the "unload" event needs to be attached - // after every iframe load (for the current iframes's contentWindow). - this.registerUnloadHandler(iframe); - - const state = this.retrieveModuleStateFromIFrame(iframe); - this.dispatch('typo3-iframe-loaded', state); - } - - private _unload(e: Event, iframe: HTMLIFrameElement) { - // Asynchronous execution needed because the URL changes immediately after - // the `unload` event is dispatched, but has not been changed right now. - new Promise((resolve) => window.setTimeout(resolve, 0)).then(() => { - if (iframe.contentWindow !== null) { - this.dispatch('typo3-iframe-load', { url: iframe.contentWindow.location.href, title: null }); - } - }); - } - - private dispatch(type: 'typo3-iframe-load' | 'typo3-iframe-loaded', state: ModuleState) { - this.dispatchEvent( - new CustomEvent(type, { detail: state, bubbles: true, composed: true }) - ); - } -} diff --git a/typo3_src/TypeScript/backend/module/router.ts b/typo3_src/TypeScript/backend/module/router.ts deleted file mode 100644 index 0474122..0000000 --- a/typo3_src/TypeScript/backend/module/router.ts +++ /dev/null @@ -1,217 +0,0 @@ -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -import {html, css, LitElement, TemplateResult} from 'lit'; -import {customElement, property, query} from 'lit/decorators'; -import {getRecordFromName, Module, ModuleState} from '../module'; - -const IFRAME_COMPONENT = '@typo3/backend/module/iframe'; - -interface DecoratedModuleState { - slotName: string; - detail: ModuleState; -} - -// Trigger a render cycle, even if property has been reset to -// the current value (this is to trigger a module refresh). -const alwaysUpdate = (newVal: string, oldVal: string) => true; - -/** - * Module: @typo3/backend/module/router - */ -@customElement('typo3-backend-module-router') -export class ModuleRouter extends LitElement { - - @property({type: String, hasChanged: alwaysUpdate}) module: string = ''; - - @property({type: String, hasChanged: alwaysUpdate}) endpoint: string = ''; - - @property({type: String, attribute: 'state-tracker'}) stateTrackerUrl: string; - - @property({type: String, attribute: 'sitename'}) sitename: string; - - @property({type: Boolean, attribute: 'sitename-first'}) sitenameFirst: boolean; - - @query('slot', true) slotElement: HTMLSlotElement; - - public static styles = css` - :host { - width: 100%; - min-height: 100%; - flex: 1 0 auto; - display: flex; - flex-direction: row; - } - ::slotted(*) { - min-height: 100%; - width: 100%; - } - `; - - constructor() { - super(); - - this.addEventListener('typo3-module-load', ({target, detail}: CustomEvent) => { - const slotName = (target as HTMLElement).getAttribute('slot'); - this.pushState({ slotName, detail }); - }); - - this.addEventListener('typo3-module-loaded', ({detail}: CustomEvent) => { - this.updateBrowserState(detail); - }); - - this.addEventListener('typo3-iframe-load', ({detail}: CustomEvent) => { - let state: DecoratedModuleState = { - slotName: IFRAME_COMPONENT, - detail: detail - }; - - if (state.detail.url.includes(this.stateTrackerUrl + '?state=')) { - const parts = state.detail.url.split('?state='); - state = JSON.parse(decodeURIComponent(parts[1] || '{}')); - } - - /* - * Event came frame , that means it may have been triggered by an - * a) explicit iframe src attribute change or by - * b) browser history backwards or forward navigation - * - * In case of b), the following code block manually synchronizes the slot attribute - */ - if (this.slotElement.getAttribute('name') !== state.slotName) { - // The "name" attribute of gets of out sync - // due to browser history backwards or forward navigation. - // Synchronize to the state as advertised by the iframe event. - this.slotElement.setAttribute('name', state.slotName) - } - - // Mark active and sync endpoint attribute for modules. - // Do not reset endpoint for iframe modules as the URL has already been - // updated and a reset would trigger a reload and another event cycle. - this.markActive( - state.slotName, - this.slotElement.getAttribute('name') === IFRAME_COMPONENT ? null : state.detail.url, - false - ); - - this.updateBrowserState(state.detail); - - // Send load event (e.g. to be handled by ModuleMenu). - // Dispated via parent element to prevent routers own event handlers to be invoked. - // @todo: Introduce a separate event (name) to prevent the parentElement workaround? - this.parentElement.dispatchEvent(new CustomEvent('typo3-module-load', { - bubbles: true, - composed: true, - detail: state.detail - })); - }); - - this.addEventListener('typo3-iframe-loaded', ({detail}: CustomEvent) => { - this.updateBrowserState(detail); - this.parentElement.dispatchEvent(new CustomEvent('typo3-module-loaded', { - bubbles: true, - composed: true, - detail - })); - }); - } - - public render(): TemplateResult { - const moduleData = getRecordFromName(this.module); - const jsModule = moduleData.component || IFRAME_COMPONENT; - - return html``; - } - - protected updated(): void { - const moduleData = getRecordFromName(this.module); - const jsModule = moduleData.component || IFRAME_COMPONENT; - - this.markActive(jsModule, this.endpoint); - } - - private async markActive(jsModule: string, endpoint: string|null, forceEndpointReset: boolean = true): Promise { - const element = await this.getModuleElement(jsModule); - if (endpoint && (forceEndpointReset || element.getAttribute('endpoint') !== endpoint)) { - element.setAttribute('endpoint', endpoint); - } - if (!element.hasAttribute('active')) { - element.setAttribute('active', ''); - } - for (let previous = element.previousElementSibling; previous !== null; previous = previous.previousElementSibling) { - previous.removeAttribute('active'); - } - for (let next = element.nextElementSibling; next !== null; next = next.nextElementSibling) { - next.removeAttribute('active'); - } - } - - private async getModuleElement(moduleName: string): Promise { - let element = this.querySelector(`*[slot="${moduleName}"]`); - if (element !== null) { - return element; - } - - try { - const module = await import(moduleName + '.js'); - // @todo: Check if .componentName exists - element = document.createElement(module.componentName); - } catch (e) { - console.error({msg: `Error importing ${moduleName} as backend module`, err: e}) - throw e; - } - - element.setAttribute('slot', moduleName); - this.appendChild(element); - return element; - } - - private async pushState(state: DecoratedModuleState): Promise { - const url = this.stateTrackerUrl + '?state=' + encodeURIComponent(JSON.stringify(state)); - // push dummy route to iframe. to trigger an implicit browser state update - const component = await this.getModuleElement(IFRAME_COMPONENT); - component.setAttribute('endpoint', url); - } - - private updateBrowserState(state: ModuleState): void { - const url = new URL(state.url || '', window.location.origin); - const params = new URLSearchParams(url.search); - - const title = 'title' in state ? state.title : ''; - // update/reset document.title if state.title is not null - // (state.title === null indicates "keep current title") - if (title !== null) { - const titleComponents = [ this.sitename ]; - if (title !== '') { - titleComponents.unshift(title); - } - if (this.sitenameFirst) { - titleComponents.reverse(); - } - document.title = titleComponents.join(' · '); - } - - if (!params.has('token')) { - // non token-urls (e.g. backend install tool) cannot be mapped by - // the main backend controller right now - return; - } - - params.delete('token'); - url.search = params.toString(); - - const niceUrl = url.toString(); - window.history.replaceState(state, '', niceUrl); - } - -} diff --git a/typo3_src/TypeScript/backend/multi-record-selection-action.ts b/typo3_src/TypeScript/backend/multi-record-selection-action.ts deleted file mode 100644 index 4f4b974..0000000 --- a/typo3_src/TypeScript/backend/multi-record-selection-action.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -/** - * Module: @typo3/backend/multi-record-selection-action - */ - -export interface ActionConfiguration { - idField: string; -} - -export interface ActionEventDetails { - identifier: string, - checkboxes: NodeListOf, - configuration: any -} diff --git a/typo3_src/TypeScript/backend/multi-record-selection.ts b/typo3_src/TypeScript/backend/multi-record-selection.ts deleted file mode 100644 index 2c3b812..0000000 --- a/typo3_src/TypeScript/backend/multi-record-selection.ts +++ /dev/null @@ -1,451 +0,0 @@ -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -import Notification from '@typo3/backend/notification'; -import DocumentService from '@typo3/core/document-service'; -import RegularEvent from '@typo3/core/event/regular-event'; -import {ActionConfiguration, ActionEventDetails} from '@typo3/backend/multi-record-selection-action'; - -enum Selectors { - actionsSelector = '.t3js-multi-record-selection-actions', - checkboxSelector = '.t3js-multi-record-selection-check', - checkboxActionsSelector = '.t3js-multi-record-selection-check-actions', - checkboxActionsToggleSelector = '.t3js-multi-record-selection-check-actions-toggle', - rowSelectionSelector = '[data-multi-record-selection-row-selection] tr' -} - -enum Buttons { - actionButton = 'button[data-multi-record-selection-action]', - checkboxActionButton = 'button[data-multi-record-selection-check-action]', -} - -enum CheckboxActions { - checkAll = 'check-all', - checkNone = 'check-none', - toggle = 'toggle' -} - -enum CheckboxState { - any = '', - checked = ':checked', - unchecked = ':not(:checked)' -} - -/** - * Module: @typo3/backend/multi-record-selection - */ -class MultiRecordSelection { - private lastChecked: HTMLInputElement = null; - - private static getCheckboxes(state: CheckboxState = CheckboxState.any, identifier: string = ''): NodeListOf { - return document.querySelectorAll(MultiRecordSelection.getCombinedSelector(Selectors.checkboxSelector + state, identifier)); - } - - private static getCombinedSelector(selector: string, identifier: string): string { - return identifier !== '' ? ['[data-multi-record-selection-identifier="' + identifier + '"]', selector].join (' ') : selector; - } - - private static getIdentifier(element: HTMLElement): string { - return (element.closest('[data-multi-record-selection-identifier]') as HTMLElement)?.dataset.multiRecordSelectionIdentifier || ''; - } - - private static changeCheckboxState(checkbox: HTMLInputElement, check: boolean): void { - if (checkbox.checked === check || checkbox.dataset.manuallyChanged) { - // Return in case state did not change or another component has already changed it - return; - } - checkbox.checked = check; - checkbox.dispatchEvent(new CustomEvent('multiRecordSelection:checkbox:state:changed',{ - detail: { identifier: MultiRecordSelection.getIdentifier(checkbox) }, bubbles: true, cancelable: false - })); - } - - /** - * This restores (initializes) a temporary state, which is required in case - * the user returns to the listing using the browsers' history back feature, - * which will not result in a new request. - */ - private static restoreTemporaryState(): void { - const checked: NodeListOf = MultiRecordSelection.getCheckboxes(CheckboxState.checked); - // In case nothing is checked we don't have to do anything here - if (!checked.length) { - return; - } - // Highlight each checked checkbox and toggle the corresponding actions. Since - // the evaluation for toggling actions does a lot of things, we don't want to - // perform this for every checked checkbox. Therefore we store the identifiers, - // which were already evaluated and do not call the evaluation for them again. - let actionsToggled: boolean = false; - let identifiers: Array = []; - checked.forEach((checkbox: HTMLInputElement) => { - checkbox.closest('tr').classList.add('success'); - const identifier: string = MultiRecordSelection.getIdentifier(checkbox); - if (identifier !== '' && !identifiers.includes(identifier)) { - identifiers.push(identifier); - actionsToggled = true; - MultiRecordSelection.toggleActionsState(identifier); - } - }); - // If none of the checked checkboxes contain an identifier, call the toggling one time anyways. - if (!actionsToggled) { - MultiRecordSelection.toggleActionsState(); - } - } - - /** - * Toggles the state of the actions, depending on the - * currently selected elements and their nature. - */ - private static toggleActionsState(identifier: string = ''): void { - const actionContainers: NodeListOf = document.querySelectorAll( - MultiRecordSelection.getCombinedSelector(Selectors.actionsSelector, identifier) - ); - - if (!actionContainers.length) { - // Early return in case no action containers are defined - return; - } - - if (!MultiRecordSelection.getCheckboxes(CheckboxState.checked, identifier).length) { - // In case no checkbox is checked, hide all action containers and return - actionContainers.forEach((container: HTMLElement): void => MultiRecordSelection.changeActionContainerVisibility(container, false)); - return; - } - - // Remove hidden state of all action containers, since checked checkboxes exist - actionContainers.forEach((container: HTMLElement): void => MultiRecordSelection.changeActionContainerVisibility(container)); - - const actions: NodeListOf = document.querySelectorAll( - [MultiRecordSelection.getCombinedSelector(Selectors.actionsSelector, identifier), Buttons.actionButton].join(' ') - ); - - if (!actions.length) { - // Early return in case no action is defined - return; - } - - actions.forEach((action: HTMLButtonElement): void => { - if (!action.dataset.multiRecordSelectionActionConfig) { - // In case the action does not define any configuration, no toggling is possible - return; - } - const configuration: ActionConfiguration = JSON.parse(action.dataset.multiRecordSelectionActionConfig); - if (!configuration.idField) { - // Return in case the idField (where to find the id on selected elements) is not defined - return; - } - // Start the evaluation by disabling the action - action.classList.add('disabled'); - // Get all currently checked elements - const checked: NodeListOf = MultiRecordSelection.getCheckboxes(CheckboxState.checked, identifier); - for (let i=0; i < checked.length; i++) { - // Evaluate each checked element if it contains the specified idField - if (checked[i].closest('tr').dataset[configuration.idField]) { - // If a checked element contains the idField, remove the "disabled" - // state and end the search since the action can be performed. - action.classList.remove('disabled'); - break; - } - } - }); - } - - /** - * This primarily just adds/removes the "hidden" class of the container. In case - * the container is in a panel, it also toggles the other panel heading elements. - * Note: This only works in case the container is not in the wrapper class, which - * should only be used for containers, outside of a panel. - * - * @param {HTMLElement} container The container to change the visibility for - * @param {boolean} visible Whether the container should be visible or not - */ - private static changeActionContainerVisibility(container: HTMLElement, visible: boolean = true): void { - const panelElements: HTMLCollection = container.closest('.multi-record-selection-panel')?.children; - if (visible) { - if (panelElements) { - for (let i=0; i < panelElements.length; i++) { panelElements[i].classList.add('hidden') } - } - container.classList.remove('hidden'); - } else { - if (panelElements) { - for (let i=0; i < panelElements.length; i++) { panelElements[i].classList.remove('hidden') } - } - container.classList.add('hidden'); - } - } - - /** - * The manually changed attribute can be set by components, using - * this module while implementing custom logic to change checkbox - * state. To not cancel each others action, all actions in this - * module respect this attribute before changing checkbox state. - * Therefore, this method is called prior to every action in - * this module, which changes checkbox states. Otherwise old - * state would may led to misbehaviour. - */ - private static unsetManuallyChangedAttribute(identifier: string): void { - MultiRecordSelection.getCheckboxes(CheckboxState.any, identifier).forEach((checkbox: HTMLInputElement): void => { - checkbox.removeAttribute('data-manually-changed'); - }); - } - - constructor() { - DocumentService.ready().then((): void => { - MultiRecordSelection.restoreTemporaryState(); - this.registerActions(); - this.registerActionsEventHandlers(); - this.registerCheckboxActions(); - this.registerCheckboxKeyboardActions(); - this.registerCheckboxTableRowSelectionAction(); - this.registerToggleCheckboxActions(); - this.registerDispatchCheckboxStateChangedEvent(); - this.registerCheckboxStateChangedEventHandler(); - }); - } - - private registerActions(): void { - new RegularEvent('click', (e: Event, target: HTMLButtonElement): void => { - if (!target.dataset.multiRecordSelectionAction) { - // Return if we don't deal with a valid action - } - - const identifier: string = MultiRecordSelection.getIdentifier(target); - const configuration: any = JSON.parse((target.dataset.multiRecordSelectionActionConfig || '{}')); - const checked: NodeListOf = MultiRecordSelection.getCheckboxes(CheckboxState.checked, identifier); - - if (!checked.length) { - // Return in case there is currently no element checked to perform the action on. - return; - } - - // This component does not implement any specific action itself, but just dispatches - // an event so the implementing components can react on the triggered action. To decrease - // selections in those components, most of the information are passed within the custom event. - // Those are e.g. the checked checkboxes, the instance identifier and the action configuration. - target.dispatchEvent(new CustomEvent( - 'multiRecordSelection:action:' + target.dataset.multiRecordSelectionAction, - { - detail: { identifier: identifier, checkboxes: checked, configuration: configuration }, - bubbles: true, - cancelable: false - } - )); - }).delegateTo(document, [Selectors.actionsSelector, Buttons.actionButton].join(' ')); - } - - /** - * Other components can dispatch the "multiRecordSelection:actions" - * events to influence the display depending on their custom logic. - */ - private registerActionsEventHandlers(): void { - new RegularEvent('multiRecordSelection:actions:show', (e: CustomEvent): void => { - const identifier: string = e.detail?.identifier || ''; - const actionContainers: NodeListOf = document.querySelectorAll(MultiRecordSelection.getCombinedSelector(Selectors.actionsSelector, identifier)); - actionContainers.length && actionContainers.forEach((container: HTMLElement): void => MultiRecordSelection.changeActionContainerVisibility(container)); - }).bindTo(document); - new RegularEvent('multiRecordSelection:actions:hide', (e: CustomEvent): void => { - const identifier: string = e.detail?.identifier || ''; - const actionContainers: NodeListOf = document.querySelectorAll(MultiRecordSelection.getCombinedSelector(Selectors.actionsSelector, identifier)); - actionContainers.length && actionContainers.forEach((container: HTMLElement): void => MultiRecordSelection.changeActionContainerVisibility(container, false)); - }).bindTo(document); - } - - private registerCheckboxActions(): void { - new RegularEvent('click', (e: Event, target: HTMLButtonElement): void => { - e.preventDefault(); - - if (!target.dataset.multiRecordSelectionCheckAction) { - // Return if we don't deal with a valid action - return; - } - - const identifier: string = MultiRecordSelection.getIdentifier(target); - const checkboxes: NodeListOf = MultiRecordSelection.getCheckboxes(CheckboxState.any, identifier); - - if (!checkboxes.length) { - // Return in case there are no checkboxes (elements) to perform the action on. - return; - } - - // Unset manually changed attribute so we can be sure, in case this is - // set on a checkbox, while executing the requested action, the checkbox - // was already changed by another component. - MultiRecordSelection.unsetManuallyChangedAttribute(identifier); - - // Perform requested action - switch (target.dataset.multiRecordSelectionCheckAction) { - case CheckboxActions.checkAll: - checkboxes.forEach((checkbox: HTMLInputElement) => { - MultiRecordSelection.changeCheckboxState(checkbox, true); - }); - break; - case CheckboxActions.checkNone: - checkboxes.forEach((checkbox: HTMLInputElement) => { - MultiRecordSelection.changeCheckboxState(checkbox, false); - }); - break; - case CheckboxActions.toggle: - checkboxes.forEach((checkbox: HTMLInputElement) => { - MultiRecordSelection.changeCheckboxState(checkbox, !checkbox.checked); - }); - break; - default: - // Unknown action - Notification.warning('Unknown checkbox action'); - } - - // To prevent possible side effects we simply clean up and unset the attribute here again - MultiRecordSelection.unsetManuallyChangedAttribute(identifier); - }).delegateTo(document, [Selectors.checkboxActionsSelector, Buttons.checkboxActionButton].join(' ')); - } - - private registerCheckboxKeyboardActions(): void { - new RegularEvent('click', (e: PointerEvent, target: HTMLInputElement): void => this.handleCheckboxKeyboardActions(e, target)) - .delegateTo(document, Selectors.checkboxSelector); - } - - private registerCheckboxTableRowSelectionAction(): void { - new RegularEvent('click', (e: PointerEvent, target: HTMLElement): void => { - const eventTargetTagName: string = (e.target as HTMLElement).tagName; - if (eventTargetTagName !== 'TH' && eventTargetTagName !== 'TD') { - // Only change checkbox state if the target is the row itself - return; - } - const checkbox: HTMLInputElement = target.querySelector(Selectors.checkboxSelector); - if (checkbox === null) { - // Return in case the table row does not contain a checkbox, handled by this component - return; - } - // Note: Since we only change the state of one checkbox, we don't have to unset the - // manually changed flag and also do not need to evaluate any instance identifier. - MultiRecordSelection.changeCheckboxState(checkbox, !checkbox.checked); - // After changing the target checkbox state, let's check if a keyboard action - // should be performed as well. We also prevent the keyboard actions from unsetting - // any state, e.g. the "manually changed flag", as this might have been set by any - // component triggered by the above checkbox state change operation. - this.handleCheckboxKeyboardActions(e, checkbox, false) - }).delegateTo(document, Selectors.rowSelectionSelector); - - // In case row selection is enabled and a keyboard "shortcut" is used, prevent text selection on the rows - new RegularEvent('mousedown', (e: PointerEvent): void => (e.shiftKey || e.altKey || e.ctrlKey) && e.preventDefault()) - .delegateTo(document, Selectors.rowSelectionSelector); - } - - private registerDispatchCheckboxStateChangedEvent(): void { - new RegularEvent('change', (e: Event, target: HTMLInputElement): void => { - target.dispatchEvent(new CustomEvent('multiRecordSelection:checkbox:state:changed',{ - detail: { identifier: MultiRecordSelection.getIdentifier(target) }, bubbles: true, cancelable: false - })); - }).delegateTo(document, Selectors.checkboxSelector); - } - - private registerCheckboxStateChangedEventHandler(): void { - new RegularEvent('multiRecordSelection:checkbox:state:changed', (e: CustomEvent): void => { - const checkbox: HTMLInputElement = e.target; - const identifier: string = e.detail?.identifier || ''; - - if (checkbox.checked) { - checkbox.closest('tr').classList.add('success'); - } else { - checkbox.closest('tr').classList.remove('success'); - } - - // Toggle actions for changed checkbox state - MultiRecordSelection.toggleActionsState(identifier); - }).bindTo(document); - } - - private registerToggleCheckboxActions(): void { - new RegularEvent('click', (e: Event, target: HTMLButtonElement): void => { - const identifier: string = MultiRecordSelection.getIdentifier(target); - - const checkAll: HTMLButtonElement = document.querySelector([ - MultiRecordSelection.getCombinedSelector(Selectors.checkboxActionsSelector, identifier), - 'button[data-multi-record-selection-check-action="' + CheckboxActions.checkAll + '"]' - ].join(' ')); - - if (checkAll !== null) { - checkAll.classList.toggle('disabled', !MultiRecordSelection.getCheckboxes(CheckboxState.unchecked, identifier).length) - } - - const checkNone: HTMLButtonElement = document.querySelector([ - MultiRecordSelection.getCombinedSelector(Selectors.checkboxActionsSelector, identifier), - 'button[data-multi-record-selection-check-action="' + CheckboxActions.checkNone + '"]' - ].join(' ')); - - if (checkNone !== null) { - checkNone.classList.toggle('disabled', !MultiRecordSelection.getCheckboxes(CheckboxState.checked, identifier).length); - } - }).delegateTo(document, Selectors.checkboxActionsToggleSelector); - } - - private handleCheckboxKeyboardActions(e: PointerEvent, target: HTMLInputElement, cleanUpState: boolean = true): void { - const identifier: string = MultiRecordSelection.getIdentifier(target); - - // If lastChecked is not set, does no longer exist in visible DOM (e.g. because the list is paginated - // and lastChecked is on a prev/next page), is not in the same table as current target (according to - // the identifier) or no shortcut is used at all, add the current target as lastChecked and return. - if (!this.lastChecked - || !document.body.contains(this.lastChecked) - || MultiRecordSelection.getIdentifier(this.lastChecked) !== identifier - || (!e.shiftKey && !e.altKey && !e.ctrlKey) - ) { - this.lastChecked = target; - return; - } - - if (cleanUpState) { - // In case clean up is *NOT* prevented, unset manually changed attribute. - // Usually clean up will be prevented by actions, which have already - // performed checkbox change operations. - MultiRecordSelection.unsetManuallyChangedAttribute(identifier); - } - - // With the shift key, it's possible to check / uncheck a range of checkboxes - if (e.shiftKey) { - // To easily calculate the start and end position we need checkboxes as an array - const checkboxes: Array = Array.from(MultiRecordSelection.getCheckboxes(CheckboxState.any, identifier)); - // The current target is the start position - const start = checkboxes.indexOf(target); - // The last manually clicked / checked checkbox is the end - const end = checkboxes.indexOf(this.lastChecked); - // Get the checkboxes which should be changed (we use min() and max() to allow ranges in both directions) - const checkboxesToChange = checkboxes.slice(Math.min(start, end), Math.max(start, end) + 1); - checkboxesToChange.forEach((checkbox: HTMLInputElement): void => { - // Change the state of each checkbox in question. Do not change the current target since we - // use it's current checked state, making both "check all" and "uncheck all" possible. - if (checkbox !== target) { - MultiRecordSelection.changeCheckboxState(checkbox, target.checked); - } - }); - } - - // We can now store the current target as lastChecked so it can be used in the next run - this.lastChecked = target; - - // With the alt or ctrl key, it's possible to toggle the current selection - if (e.altKey || e.ctrlKey) { - MultiRecordSelection.getCheckboxes(CheckboxState.any, identifier).forEach((checkbox: HTMLInputElement): void => { - // Toggle all checkboxes except the current target as this was already done by clicking on it - if (checkbox !== target) { - MultiRecordSelection.changeCheckboxState(checkbox, !checkbox.checked); - } - }) - } - - // To prevent possible side effects we simply clean up and unset the attribute here again - MultiRecordSelection.unsetManuallyChangedAttribute(identifier); - } -} - -export default new MultiRecordSelection(); diff --git a/typo3_src/TypeScript/backend/multi-step-wizard.ts b/typo3_src/TypeScript/backend/multi-step-wizard.ts deleted file mode 100644 index a698b58..0000000 --- a/typo3_src/TypeScript/backend/multi-step-wizard.ts +++ /dev/null @@ -1,574 +0,0 @@ -/* - * This file is part of the TYPO3 CMS project. - * - * It is free software; you can redistribute it and/or modify it under - * the terms of the GNU General Public License, either version 2 - * of the License, or any later version. - * - * For the full copyright and license information, please read the - * LICENSE.txt file that was distributed with this source code. - * - * The TYPO3 project - inspiring people to share! - */ - -import {SeverityEnum} from './enum/severity'; -import $ from 'jquery'; -import Modal from './modal'; -import Severity from './severity'; -import Icons from './icons'; - - -interface MultiStepWizardSettings { - [key: string]: any; -} - -interface MultiStepWizardSetup { - slides: Array; - settings: MultiStepWizardSettings; - forceSelection: boolean; - $carousel: JQuery; -} - -interface Slide { - identifier: string; - title: string; - progressBarTitle: string; - content: string|JQuery; - severity: SeverityEnum; - callback?: Function; -} - -/** - * Module: @typo3/backend/multi-step-wizard - * Multi step wizard within a modal - * @exports @typo3/backend/multi-step-wizard - */ -class MultiStepWizard { - private setup: MultiStepWizardSetup; - private readonly originalSetup: MultiStepWizardSetup; - - constructor() { - this.setup = { - slides: [], - settings: {}, - forceSelection: true, - $carousel: null, - }; - this.originalSetup = $.extend(true, {}, this.setup); - } - - /** - * @param {string} key - * @param {any} value - * @returns {MultiStepWizard} - */ - public set(key: string, value: any): MultiStepWizard { - this.setup.settings[key] = value; - return this; - } - - /** - * Add a slide item to carousel as an additional step - * - * @param {string} identifier - * @param {string} title - * @param {string} progressBarTitle - * @param {string} content - * @param {SeverityEnum} severity - * @param {Function} callback - * @returns {MultiStepWizard} - */ - public addSlide( - identifier: string, - title: string, - content: string = '', - severity: SeverityEnum = SeverityEnum.info, - progressBarTitle: string, - callback?: Function, - ): MultiStepWizard { - const slide: Slide = { - identifier: identifier, - title: title, - content: content, - severity: severity, - progressBarTitle: progressBarTitle, - callback: callback, - }; - this.setup.slides.push(slide); - return this; - } - - /** - * Add the final processing slide as the last step - * - * @param {Function} callback - * @returns {Promise} - */ - public addFinalProcessingSlide(callback?: Function): Promise { - if (!callback) { - callback = (): void => { - this.dismiss(); - }; - } - - return Icons.getIcon('spinner-circle', Icons.sizes.default, null, null).then((markup: string) => { - let $processingSlide = $('
', {class: 'text-center'}).append(markup); - this.addSlide( - 'final-processing-slide', top.TYPO3.lang['wizard.processing.title'], - $processingSlide[0].outerHTML, - Severity.info, - null, - callback, - ); - }); - } - - /** - * Create wizard with modal, buttons, progress bar and carousel - */ - public show(): void { - let $slides = this.generateSlides(); - let firstSlide = this.setup.slides[0]; - - Modal.confirm( - firstSlide.title, - $slides, - firstSlide.severity, - [{ - text: top.TYPO3.lang['wizard.button.cancel'], - active: true, - btnClass: 'btn-default pull-left', - name: 'cancel', - trigger: (): void => { - this.getComponent().trigger('wizard-dismiss'); - }, - }, { - text: top.TYPO3.lang['wizard.button.prev'], - btnClass: 'btn-' + Severity.getCssClass(firstSlide.severity), - name: 'prev', - }, { - text: top.TYPO3.lang['wizard.button.next'], - btnClass: 'btn-' + Severity.getCssClass(firstSlide.severity), - name: 'next', - }], - ['modal-multi-step-wizard'], - ); - - this.addButtonContainer(); - this.addProgressBar(); - this.initializeEvents(); - - this.getComponent().on('wizard-visible', (): void => { - this.runSlideCallback(firstSlide, this.setup.$carousel.find('.carousel-item').first()); - }).on('wizard-dismissed', (): void => { - this.setup = $.extend(true, {}, this.originalSetup); - }); - } - - /** - * @returns {JQuery} - */ - public getComponent(): JQuery { - if (this.setup.$carousel === null) { - this.generateSlides(); - } - return this.setup.$carousel; - } - - /** - * Close the modal / wizard - */ - public dismiss(): void { - Modal.dismiss(); - } - - /** - * Lock the button for the next step - * - * @returns {JQuery} - */ - public lockNextStep(): JQuery { - let $button = this.setup.$carousel.closest('.modal').find('button[name="next"]'); - $button.prop('disabled', true); - return $button; - } - - /** - * Unlock the button for the next step - * - * @returns {JQuery} - */ - public unlockNextStep(): JQuery { - let $button = this.setup.$carousel.closest('.modal').find('button[name="next"]'); - $button.prop('disabled', false); - return $button; - } - - /** - * Lock the button for the prev step - * - * @returns {JQuery} - */ - public lockPrevStep(): JQuery { - let $button = this.setup.$carousel.closest('.modal').find('button[name="prev"]'); - $button.prop('disabled', true); - return $button; - } - - /** - * Unlock the button for the prev step - * - * @returns {JQuery} - */ - public unlockPrevStep(): JQuery { - let $button = this.setup.$carousel.closest('.modal').find('button[name="prev"]'); - $button.prop('disabled', false); - return $button; - } - - /** - * Trigger a step button (prev or next) - * - * @param {string} direction - * @returns {JQuery} - */ - public triggerStepButton(direction: string): JQuery { - let $button = this.setup.$carousel.closest('.modal').find('button[name="' + direction + '"]'); - if ($button.length > 0 && $button.prop('disabled') !== true) { - $button.trigger('click'); - } - return $button; - } - - /** - * Blur the button for the cancel step - * - * @returns {JQuery} - */ - public blurCancelStep(): JQuery { - let $button = this.setup.$carousel.closest('.modal').find('button[name="cancel"]'); - $button.trigger('blur'); - return $button; - } - - /** - * Register all events - * - * @private - */ - private initializeEvents(): void { - let $modal = this.setup.$carousel.closest('.modal'); - this.initializeSlideNextEvent($modal); - this.initializeSlidePrevEvent($modal); - - // Event fires when the slide transition is invoked - this.setup.$carousel.on('slide.bs.carousel', (evt: any): void => { - if (evt.direction === 'left') { - this.nextSlideChanges($modal); - } else { - this.prevSlideChanges($modal); - } - }) - // Event is fired when the carousel has completed its slide transition - .on('slid.bs.carousel', (evt: JQueryEventObject): void => { - let currentIndex = this.setup.$carousel.data('currentIndex'); - let slide = this.setup.slides[currentIndex]; - - this.runSlideCallback(slide, $(evt.relatedTarget)); - - if (this.setup.forceSelection) { - this.lockNextStep(); - } - }); - - // Custom event, closes the wizard - let cmp = this.getComponent(); - cmp.on('wizard-dismiss', this.dismiss); - - Modal.currentModal.on('hidden.bs.modal', (): void => { - cmp.trigger('wizard-dismissed'); - }).on('shown.bs.modal', (): void => { - cmp.trigger('wizard-visible'); - }); - } - - private initializeSlideNextEvent($modal: JQuery) { - let $modalFooter = $modal.find('.modal-footer'); - let $nextButton = $modalFooter.find('button[name="next"]'); - $nextButton.off().on('click', (): void => { - this.setup.$carousel.carousel('next'); - }); - } - - private initializeSlidePrevEvent($modal: JQuery) { - let $modalFooter = $modal.find('.modal-footer'); - let $prevButton = $modalFooter.find('button[name="prev"]'); - $prevButton.off().on('click', (): void => { - this.setup.$carousel.carousel('prev'); - }); - } - - /** - * All changes after applying the next-button - * - * @param {JQuery} $modal - * @private - */ - private nextSlideChanges($modal: JQuery): void { - this.initializeSlideNextEvent($modal); - - const $modalTitle = $modal.find('.modal-title'); - const $modalFooter = $modal.find('.modal-footer'); - const nextSlideNumber = this.setup.$carousel.data('currentSlide') + 1; - const currentIndex = this.setup.$carousel.data('currentIndex'); - const nextIndex = currentIndex + 1; - - $modalTitle.text(this.setup.slides[nextIndex].title); - - this.setup.$carousel.data('currentSlide', nextSlideNumber); - this.setup.$carousel.data('currentIndex', nextIndex); - - const progressBars = $modalFooter.find('.progress-bar'); - - // Hide current progress bar section - progressBars - .eq(currentIndex) - .width('0%'); - - // Increase size of next progress bar section - progressBars - .eq(nextIndex) - .width(this.setup.$carousel.data('initialStep') * nextSlideNumber + '%') - .removeClass('inactive'); - - this.updateCurrentSeverity($modal, currentIndex, nextIndex); - } - - /** - * All changes after applying the prev-button - * - * @param {JQuery} $modal - * @private - */ - private prevSlideChanges($modal: JQuery): void { - this.initializeSlidePrevEvent($modal); - - const $modalTitle = $modal.find('.modal-title'); - const $modalFooter = $modal.find('.modal-footer'); - const $nextButton = $modalFooter.find('button[name="next"]'); - const nextSlideNumber = this.setup.$carousel.data('currentSlide') - 1; - const currentIndex = this.setup.$carousel.data('currentIndex'); - const nextIndex = currentIndex - 1; - - this.setup.$carousel.data('currentSlide', nextSlideNumber); - this.setup.$carousel.data('currentIndex', nextIndex); - - $modalTitle.text(this.setup.slides[nextIndex].title); - - $modalFooter.find('.progress-bar.last-step') - .width(this.setup.$carousel.data('initialStep') + '%') - .text(this.getProgressBarTitle(this.setup.$carousel.data('slideCount') - 1)); - - $nextButton.text(top.TYPO3.lang['wizard.button.next']); - - const progressBars = $modalFooter.find('.progress-bar'); - - // Reset size of current progress bar - progressBars - .eq(currentIndex) - .width(this.setup.$carousel.data('initialStep') + '%') - .addClass('inactive'); - - // Enable next (previous) progress bar again - progressBars - .eq(nextIndex) - .width(this.setup.$carousel.data('initialStep') * nextSlideNumber + '%') - .removeClass('inactive'); - - this.updateCurrentSeverity($modal, currentIndex, nextIndex); - } - - /** - * Update severity of modal and buttons when changing slides. - * - * @param $modal - * @param currentIndex - * @param nextIndex - * @private - */ - private updateCurrentSeverity($modal: JQuery, currentIndex: number, nextIndex: number): void { - const $modalFooter = $modal.find('.modal-footer'); - const $nextButton = $modalFooter.find('button[name="next"]'); - - $nextButton - .removeClass('btn-' + Severity.getCssClass(this.setup.slides[currentIndex].severity)) - .addClass('btn-' + Severity.getCssClass(this.setup.slides[nextIndex].severity)); - - $modal - .removeClass('modal-severity-' + Severity.getCssClass(this.setup.slides[currentIndex].severity)) - .addClass('modal-severity-' + Severity.getCssClass(this.setup.slides[nextIndex].severity)); - } - - /** - * get custom progress bar label of current slide - * or fallback label - * - * @private - */ - private getProgressBarTitle(slideIndex: number): string { - let progessBarTitle; - - if (this.setup.slides[slideIndex].progressBarTitle === null) { - if (slideIndex === 0) { - progessBarTitle = top.TYPO3.lang['wizard.progressStep.start']; - } else if (slideIndex >= this.setup.$carousel.data('slideCount') - 1) { - progessBarTitle = top.TYPO3.lang['wizard.progressStep.finish']; - } else { - progessBarTitle = top.TYPO3.lang['wizard.progressStep'] + String(slideIndex + 1); - } - } else { - progessBarTitle = this.setup.slides[slideIndex].progressBarTitle; - } - - return progessBarTitle; - } - - /** - * @param {Slide} slide - * @param {JQuery} $slide - * @private - */ - private runSlideCallback(slide: Slide, $slide: JQuery): void { - if (typeof slide.callback === 'function') { - slide.callback($slide, this.setup.settings, slide.identifier); - } - } - - /** - * Create the progress bar within the modal footer - * - * @private - */ - private addProgressBar(): void { - let realSlideCount = this.setup.$carousel.find('.carousel-item').length; - let slideCount = Math.max(1, realSlideCount); - let initialStep; - let $modal = this.setup.$carousel.closest('.modal'); - let $modalFooter = $modal.find('.modal-footer'); - - initialStep = Math.round(100 / slideCount); - - this.setup.$carousel - .data('initialStep', initialStep) - .data('slideCount', slideCount) - .data('realSlideCount', realSlideCount) - .data('currentIndex', 0) - .data('currentSlide', 1); - - // Append progress bar to modal footer - if (slideCount > 1) { - $modalFooter.prepend($('
', {class: 'progress'})); - for (let i = 0; i < this.setup.slides.length; ++i) { - let classes; - if (i === 0) { - classes = 'progress-bar first-step'; - } else if (i === this.setup.$carousel.data('slideCount') - 1) { - classes = 'progress-bar last-step inactive'; - } else { - classes = 'progress-bar step inactive'; - } - $modalFooter.find('.progress') - .append( - $('
', { - role: 'progressbar', - class: classes, - 'aria-valuemin': 0, - 'aria-valuenow': initialStep, - 'aria-valuemax': 100, - }) - .width(initialStep + '%') - .text(this.getProgressBarTitle(i)) - ); - } - } - } - - /** - * Wrap all the buttons of modal footer - * - * @private - */ - private addButtonContainer(): void { - let $modal = this.setup.$carousel.closest('.modal'); - let $modalFooterButtons = $modal.find('.modal-footer .btn'); - - $modalFooterButtons.wrapAll('