typo3-typescript-sources 13.4.24 → 13.4.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/.last-synced-tag +1 -1
  2. package/README.md +1 -1
  3. package/backend/action-button/deferred-action.ts +0 -2
  4. package/backend/action-button/immediate-action.ts +0 -2
  5. package/backend/clipboard-panel.ts +4 -4
  6. package/backend/code-editor/element/code-mirror-element.ts +1 -1
  7. package/backend/color-picker.ts +4 -5
  8. package/backend/color-scheme-switch.ts +1 -1
  9. package/backend/column-selector-button.ts +1 -1
  10. package/backend/context-menu.ts +3 -3
  11. package/backend/copy-to-clipboard.ts +1 -1
  12. package/backend/drag-tooltip.ts +1 -1
  13. package/backend/element/alert-element.ts +2 -2
  14. package/backend/element/dispatch-modal-button.ts +1 -1
  15. package/backend/element/draggable-resizable-element.ts +1 -1
  16. package/backend/element/editable-page-title.ts +2 -2
  17. package/backend/element/icon-element.ts +2 -2
  18. package/backend/element/pagination.ts +4 -4
  19. package/backend/element/progress-bar-element.ts +2 -2
  20. package/backend/element/progress-tracker-element.ts +2 -2
  21. package/backend/element/pseudo-button.ts +1 -1
  22. package/backend/element/spinner-element.ts +1 -1
  23. package/backend/form-engine/element/extra/char-counter.ts +1 -1
  24. package/backend/form-engine/element/online-media-form-element.ts +1 -1
  25. package/backend/form-engine/element/select-tree-toolbar.ts +1 -1
  26. package/backend/form-engine/element/select-tree.ts +1 -1
  27. package/backend/form-engine/element/suggest/result-container.ts +1 -1
  28. package/backend/form-engine/element/suggest/result-item.ts +1 -1
  29. package/backend/form-engine/element/table-wizard-element.ts +1 -1
  30. package/backend/grid-editor.ts +4 -4
  31. package/backend/hotkeys/events.ts +47 -0
  32. package/backend/hotkeys/hotkey-storage.ts +3 -18
  33. package/backend/hotkeys/hotkey-struct.ts +58 -0
  34. package/backend/hotkeys/negotiator.ts +53 -0
  35. package/backend/hotkeys.ts +27 -46
  36. package/backend/image-manipulation.ts +2 -2
  37. package/backend/live-search/element/backend-search.ts +1 -1
  38. package/backend/live-search/element/hint.ts +1 -1
  39. package/backend/live-search/element/provider/default-result-item.ts +1 -1
  40. package/backend/live-search/element/provider/page-provider-result-item.ts +1 -1
  41. package/backend/live-search/element/result/item/action/action-container.ts +1 -1
  42. package/backend/live-search/element/result/item/action/action.ts +2 -2
  43. package/backend/live-search/element/result/item/item-container.ts +2 -2
  44. package/backend/live-search/element/result/item/item.ts +1 -1
  45. package/backend/live-search/element/result/result-container.ts +6 -1
  46. package/backend/live-search/element/result/result-detail-container.ts +1 -1
  47. package/backend/live-search/element/result/result-pagination.ts +1 -1
  48. package/backend/live-search/element/search-option-item.ts +1 -1
  49. package/backend/live-search/live-search-shortcut.ts +1 -14
  50. package/backend/login-refresh.ts +1 -1
  51. package/backend/modal.ts +6 -6
  52. package/backend/module/iframe.ts +1 -1
  53. package/backend/module/router.ts +1 -1
  54. package/backend/new-content-element-wizard-button.ts +1 -1
  55. package/backend/new-record-wizard.ts +1 -1
  56. package/backend/notification.ts +3 -3
  57. package/backend/pagetsconfig/pagetsconfig-includes.ts +1 -1
  58. package/backend/record-download-button.ts +1 -1
  59. package/backend/security/element/csp-reports.ts +2 -2
  60. package/backend/security/element/sudo-mode.ts +1 -1
  61. package/backend/settings/editor/editable-setting.ts +1 -1
  62. package/backend/settings/editor.ts +1 -1
  63. package/backend/settings/type/base.ts +1 -1
  64. package/backend/settings/type/bool.ts +1 -1
  65. package/backend/settings/type/color.ts +1 -1
  66. package/backend/settings/type/int.ts +2 -2
  67. package/backend/settings/type/number.ts +2 -2
  68. package/backend/settings/type/page.ts +1 -1
  69. package/backend/settings/type/string.ts +2 -2
  70. package/backend/settings/type/stringlist.ts +1 -1
  71. package/backend/switch-user.ts +1 -1
  72. package/backend/toolbar/live-search.ts +4 -2
  73. package/backend/tree/file-storage-browser.ts +1 -1
  74. package/backend/tree/file-storage-tree-container.ts +1 -1
  75. package/backend/tree/page-browser.ts +2 -2
  76. package/backend/tree/page-tree-element.ts +2 -2
  77. package/backend/tree/tree-module-state.ts +1 -1
  78. package/backend/tree/tree-node-toggle.ts +1 -1
  79. package/backend/tree/tree-toolbar.ts +1 -1
  80. package/backend/tree/tree.ts +4 -4
  81. package/backend/viewport/resizable-navigation.ts +1 -1
  82. package/core/authentication/mfa-provider/totp.ts +1 -1
  83. package/core/directive/markdown.ts +2 -2
  84. package/core/lit-helper.ts +2 -2
  85. package/dashboard/dashboard.ts +4 -4
  86. package/extensionmanager/distribution-image.ts +1 -1
  87. package/form/backend/form-editor/component/property-grid-editor.ts +4 -4
  88. package/form/backend/form-editor/core.ts +2 -1
  89. package/install/renderable/flash-message.ts +1 -1
  90. package/install/renderable/info-box.ts +1 -1
  91. package/install/renderable/language-packs.ts +3 -3
  92. package/install/renderable/offset-group.ts +1 -1
  93. package/install/renderable/wrap-group.ts +1 -1
  94. package/package.json +2 -2
  95. package/rte-ckeditor/ckeditor5.ts +3 -3
  96. package/rte-ckeditor/plugin/typo3-link.ts +1 -2
  97. package/scheduler/scheduler-editable-group-name.ts +1 -1
  98. package/styleguide/element/theme-switcher-element.ts +1 -1
  99. package/sys-note/element/delete-button.ts +1 -1
  100. package/tstemplate/template-analyzer.ts +1 -1
  101. package/workspaces/renderable/comment-view.ts +3 -3
  102. package/workspaces/renderable/diff-view.ts +3 -3
  103. package/workspaces/renderable/history-view.ts +3 -3
  104. package/workspaces/renderable/record-information.ts +2 -2
  105. package/workspaces/renderable/record-table.ts +4 -4
  106. package/workspaces/renderable/send-to-stage-form.ts +9 -1
@@ -11,8 +11,10 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import HotkeyStorage, { type ScopedHotkeyMap, type HotkeyStruct, type Options, type HotkeySetup } from '@typo3/backend/hotkeys/hotkey-storage';
14
+ import HotkeyStorage, { type ScopedHotkeyMap, type Options, type HotkeySetup } from '@typo3/backend/hotkeys/hotkey-storage';
15
15
  import RegularEvent from '@typo3/core/event/regular-event';
16
+ import { HotkeyStruct } from '@typo3/backend/hotkeys/hotkey-struct';
17
+ import { HotkeyDispatchedEvent, HotkeyRequestedEvent } from '@typo3/backend/hotkeys/events';
16
18
 
17
19
  export enum ModifierKeys {
18
20
  META = 'meta',
@@ -70,10 +72,9 @@ class Hotkeys {
70
72
  this.scopedHotkeyMap.set(mergedConfiguration.scope, new Map());
71
73
  }
72
74
 
73
- let ariaKeyShortcut = this.composeAriaKeyShortcut(hotkey);
74
75
  const hotkeyMap = this.scopedHotkeyMap.get(mergedConfiguration.scope);
75
- const hotkeyStruct = this.createHotkeyStructFromTrigger(hotkey);
76
- const encodedHotkeyStruct = JSON.stringify(hotkeyStruct);
76
+ const hotkeyStruct = HotkeyStruct.fromHotkey(hotkey);
77
+ const encodedHotkeyStruct = hotkeyStruct.toString();
77
78
 
78
79
  if (hotkeyMap.has(encodedHotkeyStruct)) {
79
80
  const setup = hotkeyMap.get(encodedHotkeyStruct);
@@ -87,6 +88,7 @@ class Hotkeys {
87
88
 
88
89
  if (mergedConfiguration.bindElement instanceof Element) {
89
90
  const existingAriaAttribute = mergedConfiguration.bindElement.getAttribute('aria-keyshortcuts');
91
+ let ariaKeyShortcut = this.composeAriaKeyShortcut(hotkey);
90
92
  if (existingAriaAttribute !== null && !existingAriaAttribute.includes(ariaKeyShortcut)) {
91
93
  // Element already has `aria-keyshortcuts`, append composed shortcut
92
94
  ariaKeyShortcut = existingAriaAttribute + ' ' + ariaKeyShortcut;
@@ -97,31 +99,39 @@ class Hotkeys {
97
99
 
98
100
  private registerEventHandler(): void {
99
101
  new RegularEvent('keydown', (e: KeyboardEvent): void => {
100
- const hotkeySetup = this.findHotkeySetup(e);
101
- if (hotkeySetup === null) {
102
- return;
102
+ const hotkeyStruct = HotkeyStruct.fromEvent(e);
103
+ if (hotkeyStruct.hasAnyModifier()) {
104
+ top.document.dispatchEvent(new HotkeyRequestedEvent(e));
103
105
  }
106
+ }).bindTo(document);
104
107
 
105
- if (e.repeat && !hotkeySetup.options.allowRepeat) {
106
- return;
107
- }
108
+ new RegularEvent(HotkeyDispatchedEvent.eventName, (e: HotkeyDispatchedEvent): void => {
109
+ const { keyboardEvent } = e;
110
+ const hotkeySetup = this.findHotkeySetup(keyboardEvent);
111
+ if (hotkeySetup !== null) {
112
+ e.preventDefault();
108
113
 
109
- if (!hotkeySetup.options.allowOnEditables) {
110
- const target = e.target as HTMLElement;
111
- if (target.isContentEditable || (['INPUT', 'TEXTAREA', 'SELECT'].includes(target.tagName) && !(e.target as HTMLInputElement|HTMLTextAreaElement).readOnly)) {
114
+ if (keyboardEvent.repeat && !hotkeySetup.options.allowRepeat) {
112
115
  return;
113
116
  }
114
- }
115
117
 
116
- hotkeySetup.handler(e);
118
+ if (!hotkeySetup.options.allowOnEditables) {
119
+ const target = keyboardEvent.target as HTMLElement;
120
+ if (target.isContentEditable || (['INPUT', 'TEXTAREA', 'SELECT'].includes(target.tagName) && !(keyboardEvent.target as HTMLInputElement|HTMLTextAreaElement).readOnly)) {
121
+ return;
122
+ }
123
+ }
124
+
125
+ hotkeySetup.handler(keyboardEvent);
126
+ }
117
127
  }).bindTo(document);
118
128
  }
119
129
 
120
130
  private findHotkeySetup(e: KeyboardEvent): HotkeySetup|undefined {
121
131
  // We always consider the global "all" scope first to avoid overriding global hotkeys
122
132
  const scopes: string[] = [...new Set(['all', HotkeyStorage.activeScope])];
123
- const hotkeyStruct = this.createHotkeyStructFromEvent(e);
124
- const encodedHotkeyStruct = JSON.stringify(hotkeyStruct);
133
+ const hotkeyStruct = HotkeyStruct.fromEvent(e);
134
+ const encodedHotkeyStruct = hotkeyStruct.toString();
125
135
 
126
136
  for (const scope of scopes) {
127
137
  const hotkeyMap = this.scopedHotkeyMap.get(scope);
@@ -133,35 +143,6 @@ class Hotkeys {
133
143
  return null;
134
144
  }
135
145
 
136
- private createHotkeyStructFromTrigger(hotkey: Hotkey): HotkeyStruct {
137
- const nonModifierCodes = hotkey.filter((hotkeyPart: string) => !Object.values<string>(ModifierKeys).includes(hotkeyPart));
138
- if (nonModifierCodes.length > 1) {
139
- throw new Error('Cannot register hotkey with more than one non-modifier key, "' + nonModifierCodes.join('+') + '" given.');
140
- }
141
-
142
- return {
143
- modifiers: {
144
- meta: hotkey.includes(ModifierKeys.META),
145
- ctrl: hotkey.includes(ModifierKeys.CTRL),
146
- shift: hotkey.includes(ModifierKeys.SHIFT),
147
- alt: hotkey.includes(ModifierKeys.ALT),
148
- },
149
- key: nonModifierCodes[0].toLowerCase(),
150
- };
151
- }
152
-
153
- private createHotkeyStructFromEvent(e: KeyboardEvent): HotkeyStruct {
154
- return {
155
- modifiers: {
156
- meta: e.metaKey,
157
- ctrl: e.ctrlKey,
158
- shift: e.shiftKey,
159
- alt: e.altKey,
160
- },
161
- key: e.key?.toLowerCase(),
162
- };
163
- }
164
-
165
146
  /**
166
147
  * Composes a string for use with `aria-keyshortcuts`
167
148
  * @see https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Attributes/aria-keyshortcuts
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  import { html, type TemplateResult } from 'lit';
15
- import { unsafeHTML } from 'lit/directives/unsafe-html';
16
- import { styleMap } from 'lit/directives/style-map';
15
+ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
16
+ import { styleMap } from 'lit/directives/style-map.js';
17
17
  import type { AjaxResponse } from '@typo3/core/ajax/ajax-response';
18
18
  import AjaxRequest from '@typo3/core/ajax/ajax-request';
19
19
  import RegularEvent from '@typo3/core/event/regular-event';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement } from 'lit/decorators';
14
+ import { customElement } from 'lit/decorators.js';
15
15
  import { LitElement } from 'lit';
16
16
 
17
17
  /**
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
16
16
  import { markdown } from '@typo3/core/directive/markdown';
17
17
  import '@typo3/backend/element/icon-element';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
16
16
  import '@typo3/backend/element/icon-element';
17
17
  import { lll } from '@typo3/core/lit-helper';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
16
16
  import '@typo3/backend/element/icon-element';
17
17
  import { lll } from '@typo3/core/lit-helper';
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import DocumentService from '@typo3/core/document-service';
15
- import { customElement, property } from 'lit/decorators';
15
+ import { customElement, property } from 'lit/decorators.js';
16
16
  import { css, html, LitElement, type TemplateResult } from 'lit';
17
17
  import { type Action } from './action';
18
18
  import type { ResultItemActionInterface, ResultItemInterface } from '../item';
@@ -11,8 +11,8 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
15
- import { ifDefined } from 'lit/directives/if-defined';
14
+ import { customElement, property } from 'lit/decorators.js';
15
+ import { ifDefined } from 'lit/directives/if-defined.js';
16
16
  import { html, LitElement, type TemplateResult } from 'lit';
17
17
  import '@typo3/backend/element/icon-element';
18
18
  import type { ResultItemActionInterface, ResultItemInterface } from '../item';
@@ -14,8 +14,8 @@
14
14
  import '@typo3/backend/element/spinner-element';
15
15
  import LiveSearchConfigurator from '@typo3/backend/live-search/live-search-configurator';
16
16
  import { css, html, LitElement, type TemplateResult } from 'lit';
17
- import { customElement, property } from 'lit/decorators';
18
- import { until } from 'lit/directives/until';
17
+ import { customElement, property } from 'lit/decorators.js';
18
+ import { until } from 'lit/directives/until.js';
19
19
  import '../../provider/default-result-item';
20
20
  import { type Item, type ResultItemActionInterface, type ResultItemInterface } from './item';
21
21
  import type { InvokeActionEventData, RequestActionsEventData } from '@typo3/backend/live-search/element/result/result-container';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, LitElement, type TemplateResult } from 'lit';
16
16
  import '@typo3/backend/element/icon-element';
17
17
 
@@ -13,7 +13,7 @@
13
13
 
14
14
  import LiveSearchConfigurator from '@typo3/backend/live-search/live-search-configurator';
15
15
  import Viewport from '@typo3/backend/viewport';
16
- import { customElement, property, query } from 'lit/decorators';
16
+ import { customElement, property, query } from 'lit/decorators.js';
17
17
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
18
18
  import { lll } from '@typo3/core/lit-helper';
19
19
  import { type ItemContainer } from './item/item-container';
@@ -35,6 +35,7 @@ export const componentName = 'typo3-backend-live-search-result-container';
35
35
  @customElement('typo3-backend-live-search-result-container')
36
36
  export class ResultContainer extends LitElement {
37
37
  @property({ type: Object }) results: ResultItemInterface[] | null = null;
38
+ @property({ type: Boolean, attribute: false }) hasErrors: boolean = false;
38
39
  @property({ type: Boolean, attribute: false }) loading: boolean = false;
39
40
 
40
41
  @query('typo3-backend-live-search-result-item-container') itemContainer: ItemContainer;
@@ -64,6 +65,10 @@ export class ResultContainer extends LitElement {
64
65
  return html`<div class="d-flex flex-fill align-items-center justify-content-center"><typo3-backend-spinner size="large"></typo3-backend-spinner></div>`;
65
66
  }
66
67
 
68
+ if (this.hasErrors) {
69
+ return html`<div class="alert alert-danger">${lll('liveSearch_hasErrors')}</div>`;
70
+ }
71
+
67
72
  if (this.results === null) {
68
73
  return nothing;
69
74
  }
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
16
16
  import './item/action/action-container';
17
17
  import type { ResultItemInterface } from './item/item';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
16
16
  import '@typo3/backend/element/icon-element';
17
17
  import type { SelectPageEventData } from '@typo3/backend/toolbar/live-search';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, LitElement, type TemplateResult } from 'lit';
16
16
  import BrowserSession from '@typo3/backend/storage/browser-session';
17
17
  import type { InvokeOptionEventData } from '@typo3/backend/toolbar/live-search';
@@ -1,6 +1,3 @@
1
- import { BroadcastMessage } from '@typo3/backend/broadcast-message';
2
- import BroadcastService from '@typo3/backend/broadcast-service';
3
- import Modal from '../modal';
4
1
  import Hotkeys from '@typo3/backend/hotkeys';
5
2
  import DocumentService from '@typo3/core/document-service';
6
3
 
@@ -8,19 +5,9 @@ class LiveSearchShortcut {
8
5
  public constructor() {
9
6
  DocumentService.ready().then((): void => {
10
7
  Hotkeys.register([Hotkeys.normalizedCtrlModifierKey, 'k'], (e: KeyboardEvent): void => {
11
- if (Modal.currentModal) {
12
- // A modal window is already active, keep default behavior of browser
13
- return;
14
- }
15
-
16
8
  e.preventDefault();
17
9
 
18
- document.dispatchEvent(new CustomEvent('typo3:live-search:trigger-open'));
19
- BroadcastService.post(new BroadcastMessage(
20
- 'live-search',
21
- 'trigger-open',
22
- {}
23
- ));
10
+ top.document.dispatchEvent(new CustomEvent('typo3:live-search:trigger-open'));
24
11
  }, { allowOnEditables: true /* @todo: bindElement cannot be used at the moment as the suitable element exists twice! */ });
25
12
  });
26
13
  }
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, LitElement, type TemplateResult } from 'lit';
15
- import { customElement, state } from 'lit/decorators';
15
+ import { customElement, state } from 'lit/decorators.js';
16
16
  import Modal, { type ModalElement, Styles, Sizes } from '@typo3/backend/modal';
17
17
  import { SeverityEnum } from './enum/severity';
18
18
  import AjaxRequest from '@typo3/core/ajax/ajax-request';
package/backend/modal.ts CHANGED
@@ -13,11 +13,11 @@
13
13
 
14
14
  import { Modal as BootstrapModal } from 'bootstrap';
15
15
  import { html, nothing, LitElement, type TemplateResult, type PropertyValues } from 'lit';
16
- import { customElement, property, state } from 'lit/decorators';
17
- import { unsafeHTML } from 'lit/directives/unsafe-html';
18
- import { classMap, type ClassInfo } from 'lit/directives/class-map';
19
- import { styleMap, type StyleInfo } from 'lit/directives/style-map';
20
- import { ifDefined } from 'lit/directives/if-defined';
16
+ import { customElement, property, state } from 'lit/decorators.js';
17
+ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
18
+ import { classMap, type ClassInfo } from 'lit/directives/class-map.js';
19
+ import { styleMap, type StyleInfo } from 'lit/directives/style-map.js';
20
+ import { ifDefined } from 'lit/directives/if-defined.js';
21
21
  import { classesArrayToClassInfo } from '@typo3/core/lit-helper';
22
22
  import RegularEvent from '@typo3/core/event/regular-event';
23
23
  import type { AjaxResponse } from '@typo3/core/ajax/ajax-response';
@@ -173,7 +173,7 @@ export class ModalElement extends LitElement {
173
173
  ${this.hideCloseButton ? nothing : html`
174
174
  <button class="t3js-modal-close close" @click=${() => this.bootstrapModal.hide()}>
175
175
  <typo3-backend-icon identifier="actions-close" size="small"></typo3-backend-icon>
176
- <span class="visually-hidden">${TYPO3?.lang?.['button.close'] || 'Close'} ${this.modalTitle}</span>
176
+ <span class="visually-hidden">${(TYPO3?.lang?.['button.close'] || 'Close') + ' ' + this.modalTitle}</span>
177
177
  </button>
178
178
  `}
179
179
  </div>
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
15
- import { customElement, property, query } from 'lit/decorators';
15
+ import { customElement, property, query } from 'lit/decorators.js';
16
16
  import { lll } from '@typo3/core/lit-helper';
17
17
  import type { ModuleState } from '../module';
18
18
 
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, css, LitElement, type TemplateResult, type HasChanged } from 'lit';
15
- import { customElement, property, query } from 'lit/decorators';
15
+ import { customElement, property, query } from 'lit/decorators.js';
16
16
  import { ModuleUtility, type ModuleState } from '@typo3/backend/module';
17
17
 
18
18
  const IFRAME_COMPONENT = '@typo3/backend/module/iframe';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { PseudoButtonLitElement } from '@typo3/backend/element/pseudo-button';
16
16
  import Modal from '@typo3/backend/modal';
17
17
  import { SeverityEnum } from '@typo3/backend/enum/severity';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { html, css, LitElement, type CSSResult, type TemplateResult, nothing } from 'lit';
16
16
  import Modal from '@typo3/backend/modal';
17
17
  import '@typo3/backend/element/icon-element';
@@ -12,9 +12,9 @@
12
12
  */
13
13
 
14
14
  import { LitElement, html, type TemplateResult } from 'lit';
15
- import { customElement, property, state } from 'lit/decorators';
16
- import { classMap } from 'lit/directives/class-map';
17
- import { ifDefined } from 'lit/directives/if-defined';
15
+ import { customElement, property, state } from 'lit/decorators.js';
16
+ import { classMap } from 'lit/directives/class-map.js';
17
+ import { ifDefined } from 'lit/directives/if-defined.js';
18
18
  import type { AbstractAction } from './action-button/abstract-action';
19
19
  import { SeverityEnum } from './enum/severity';
20
20
  import Severity from './severity';
@@ -15,7 +15,7 @@ import DocumentService from '@typo3/core/document-service';
15
15
  import { default as Modal } from '@typo3/backend/modal';
16
16
  import { topLevelModuleImport } from '@typo3/backend/utility/top-level-module-import';
17
17
  import { html, type TemplateResult } from 'lit';
18
- import { until } from 'lit/directives/until';
18
+ import { until } from 'lit/directives/until.js';
19
19
  import AjaxRequest from '@typo3/core/ajax/ajax-request';
20
20
  import type { AjaxResponse } from '@typo3/core/ajax/ajax-response';
21
21
  import type { JavaScriptItemPayload } from '@typo3/core/java-script-item-processor';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property } from 'lit/decorators';
14
+ import { customElement, property } from 'lit/decorators.js';
15
15
  import { PseudoButtonLitElement } from '@typo3/backend/element/pseudo-button';
16
16
  import { SeverityEnum } from '@typo3/backend/enum/severity';
17
17
  import Severity from '@typo3/backend/severity';
@@ -11,9 +11,9 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property, state } from 'lit/decorators';
14
+ import { customElement, property, state } from 'lit/decorators.js';
15
15
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
16
- import { classMap } from 'lit/directives/class-map';
16
+ import { classMap } from 'lit/directives/class-map.js';
17
17
  import AjaxRequest from '@typo3/core/ajax/ajax-request';
18
18
  import RegularEvent from '@typo3/core/event/regular-event';
19
19
  import { lll } from '@typo3/core/lit-helper';
@@ -11,7 +11,7 @@
11
11
  * The TYPO3 project - inspiring people to share!
12
12
  */
13
13
 
14
- import { customElement, property, query, state } from 'lit/decorators';
14
+ import { customElement, property, query, state } from 'lit/decorators.js';
15
15
  import { html, LitElement, nothing, type PropertyValues, type TemplateResult } from 'lit';
16
16
  import AjaxRequest from '@typo3/core/ajax/ajax-request';
17
17
  import { AjaxResponse } from '@typo3/core/ajax/ajax-response';
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, LitElement, type TemplateResult, nothing } from 'lit';
15
- import { customElement, property, state } from 'lit/decorators';
15
+ import { customElement, property, state } from 'lit/decorators.js';
16
16
  import { until } from 'lit/directives/until.js';
17
17
  import '@typo3/backend/element/icon-element';
18
18
  import { copyToClipboard } from '@typo3/backend/copy-to-clipboard';
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, LitElement, type TemplateResult, nothing, type PropertyValues } from 'lit';
15
- import { customElement, property, state } from 'lit/decorators';
15
+ import { customElement, property, state } from 'lit/decorators.js';
16
16
  import { live } from 'lit/directives/live.js';
17
17
  import '@typo3/backend/element/spinner-element';
18
18
  import '@typo3/backend/element/icon-element';
@@ -16,7 +16,7 @@
16
16
 
17
17
  import { LitElement, type PropertyDeclaration, type ReactiveElement } from 'lit';
18
18
  import { defaultConverter } from '@lit/reactive-element';
19
- import { property } from 'lit/decorators';
19
+ import { property } from 'lit/decorators.js';
20
20
 
21
21
  export const internals = Symbol('internals');
22
22
  const privateInternals = Symbol('privateInternals');
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, type TemplateResult } from 'lit';
15
- import { customElement, property } from 'lit/decorators';
15
+ import { customElement, property } from 'lit/decorators.js';
16
16
  import { BaseElement } from './base';
17
17
 
18
18
  export const componentName = 'typo3-backend-settings-type-bool';
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, type TemplateResult } from 'lit';
15
- import { customElement, property } from 'lit/decorators';
15
+ import { customElement, property } from 'lit/decorators.js';
16
16
  import { BaseElement } from './base';
17
17
  import '@typo3/backend/color-picker';
18
18
  import RegularEvent from '@typo3/core/event/regular-event';
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  import { html, nothing, type TemplateResult } from 'lit';
15
- import { customElement, property } from 'lit/decorators';
16
- import { live } from 'lit/directives/live';
15
+ import { customElement, property } from 'lit/decorators.js';
16
+ import { live } from 'lit/directives/live.js';
17
17
  import { BaseElement } from './base';
18
18
 
19
19
  export const componentName = 'typo3-backend-settings-type-int';
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  import { html, nothing, type TemplateResult } from 'lit';
15
- import { customElement, property } from 'lit/decorators';
16
- import { live } from 'lit/directives/live';
15
+ import { customElement, property } from 'lit/decorators.js';
16
+ import { live } from 'lit/directives/live.js';
17
17
  import { BaseElement } from './base';
18
18
 
19
19
  export const componentName = 'typo3-backend-settings-type-number';
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, nothing, type TemplateResult } from 'lit';
15
- import { customElement, property } from 'lit/decorators';
15
+ import { customElement, property } from 'lit/decorators.js';
16
16
  import { lll } from '@typo3/core/lit-helper';
17
17
  import { MessageUtility } from '@typo3/backend/utility/message-utility';
18
18
  import { BaseElement } from './base';
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  import { html, nothing, type TemplateResult } from 'lit';
15
- import { customElement, property } from 'lit/decorators';
16
- import { live } from 'lit/directives/live';
15
+ import { customElement, property } from 'lit/decorators.js';
16
+ import { live } from 'lit/directives/live.js';
17
17
  import { BaseElement } from './base';
18
18
 
19
19
  export const componentName = 'typo3-backend-settings-type-string';
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, type TemplateResult } from 'lit';
15
- import { customElement, property } from 'lit/decorators';
15
+ import { customElement, property } from 'lit/decorators.js';
16
16
  import { BaseElement } from './base';
17
17
  import { live } from 'lit/directives/live.js';
18
18
 
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { PseudoButtonLitElement } from '@typo3/backend/element/pseudo-button';
15
- import { customElement, property } from 'lit/decorators';
15
+ import { customElement, property } from 'lit/decorators.js';
16
16
  import AjaxRequest from '@typo3/core/ajax/ajax-request';
17
17
  import type { AjaxResponse } from '@typo3/core/ajax/ajax-response';
18
18
  import Notification from '@typo3/backend/notification';
@@ -223,7 +223,7 @@ class LiveSearch {
223
223
  const query = formData.get('query').toString();
224
224
 
225
225
  if (query === '') {
226
- this.updateSearchResults(null);
226
+ this.updateSearchResults();
227
227
  } else {
228
228
  const searchResultContainer = document.querySelector(resultContainerComponentName) as ResultContainer;
229
229
  const paginationElement: ResultPagination = document.querySelector('typo3-backend-live-search-result-pagination');
@@ -238,6 +238,7 @@ class LiveSearch {
238
238
  this.currentSearchRequest = null;
239
239
  this.updateSearchResults(json);
240
240
  } catch (err: unknown) {
241
+ this.updateSearchResults(null, true);
241
242
  if (err instanceof DOMException && err.name === 'AbortError') {
242
243
  // Request has been aborted, do not flood the error console
243
244
  return;
@@ -261,10 +262,11 @@ class LiveSearch {
261
262
  firstSearchResultItem?.focus();
262
263
  }
263
264
 
264
- private updateSearchResults(response: SearchResponse): void {
265
+ private updateSearchResults(response: SearchResponse = null, hasErrors: boolean = false): void {
265
266
  const searchResultContainer: ResultContainer = document.querySelector('typo3-backend-live-search-result-container');
266
267
  searchResultContainer.results = response?.results ?? null;
267
268
  searchResultContainer.loading = false;
269
+ searchResultContainer.hasErrors = hasErrors;
268
270
 
269
271
  this.updatePagination(response?.pagination ?? null);
270
272
  }
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, LitElement, type TemplateResult } from 'lit';
15
- import { customElement, query } from 'lit/decorators';
15
+ import { customElement, query } from 'lit/decorators.js';
16
16
  import AjaxRequest from '@typo3/core/ajax/ajax-request';
17
17
  import { type TreeToolbar } from '@typo3/backend/tree/tree-toolbar';
18
18
  import ElementBrowser from '@typo3/backend/element-browser';
@@ -12,7 +12,7 @@
12
12
  */
13
13
 
14
14
  import { html, LitElement, type TemplateResult } from 'lit';
15
- import { customElement, query } from 'lit/decorators';
15
+ import { customElement, query } from 'lit/decorators.js';
16
16
  import '@typo3/backend/element/icon-element';
17
17
  import { SeverityEnum } from '@typo3/backend/enum/severity';
18
18
  import '@typo3/backend/tree/tree-toolbar';
@@ -12,8 +12,8 @@
12
12
  */
13
13
 
14
14
  import { html, LitElement, nothing, type TemplateResult } from 'lit';
15
- import { customElement, property, query } from 'lit/decorators';
16
- import { until } from 'lit/directives/until';
15
+ import { customElement, property, query } from 'lit/decorators.js';
16
+ import { until } from 'lit/directives/until.js';
17
17
  import { lll } from '@typo3/core/lit-helper';
18
18
  import { PageTree } from '@typo3/backend/tree/page-tree';
19
19
  import AjaxRequest from '@typo3/core/ajax/ajax-request';