typo3-typescript-sources 14.3.7 → 14.3.9
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.
- package/.github/workflows/sync-and-publish.yml +240 -191
- package/.last-synced-tag +1 -1
- package/README.md +13 -5
- package/adminpanel/admin-panel.ts +22 -22
- package/adminpanel/modules/cache.ts +3 -3
- package/backend/action-dispatcher.ts +8 -3
- package/backend/bookmark/bookmark-store.ts +5 -5
- package/backend/clipboard-panel.ts +2 -2
- package/backend/code-editor/element/code-mirror-element.ts +1 -1
- package/backend/code-editor/language/typoscript.ts +3 -3
- package/backend/code-editor/stream-parser/typoscript.ts +2 -2
- package/backend/color-picker.ts +2 -2
- package/backend/column-selector-button.ts +11 -8
- package/backend/context-help.ts +3 -3
- package/backend/context-menu.ts +8 -3
- package/backend/drag-tooltip.ts +9 -4
- package/backend/drag-uploader.ts +81 -89
- package/backend/element/draggable-resizable-element.ts +18 -12
- package/backend/element/icon-element.ts +2 -2
- package/backend/element/thumbnail-element.ts +2 -2
- package/backend/element-browser.ts +1 -1
- package/backend/event/consumer-scope.ts +2 -2
- package/backend/event/interaction-request-assignment.ts +1 -1
- package/backend/event/interaction-request-map.ts +3 -3
- package/backend/form-engine/container/flex-form-container-container.ts +2 -2
- package/backend/form-engine/container/flex-form-section-container.ts +1 -1
- package/backend/form-engine/container/inline-control-container.ts +14 -14
- package/backend/form-engine/element/abstract-sortable-select-items.ts +3 -3
- package/backend/form-engine/element/color-element.ts +1 -1
- package/backend/form-engine/element/datetime-element.ts +1 -1
- package/backend/form-engine/element/extra/char-counter.ts +2 -2
- package/backend/form-engine/element/extra/select-box-filter.ts +1 -1
- package/backend/form-engine/element/mfa-info-element.ts +2 -2
- package/backend/form-engine/element/online-media-form-element.ts +8 -4
- package/backend/form-engine/element/select-multiple-side-by-side-element.ts +2 -2
- package/backend/form-engine/element/select-tree.ts +3 -3
- package/backend/form-engine/element/slug-element.ts +7 -7
- package/backend/form-engine/element/suggest/result-container.ts +1 -1
- package/backend/form-engine/element/table-wizard-element.ts +4 -4
- package/backend/form-engine/inline-relation/ajax-dispatcher.ts +3 -3
- package/backend/form-engine-validation.ts +11 -5
- package/backend/form-engine.ts +19 -23
- package/backend/global-event-handler.ts +1 -1
- package/backend/hotkeys/hotkey-struct.ts +1 -1
- package/backend/hotkeys.ts +3 -3
- package/backend/image-manipulation.ts +19 -19
- package/backend/layout-module/column-restriction.ts +61 -0
- package/backend/layout-module/drag-drop.ts +16 -4
- package/backend/layout-module/paste.ts +8 -1
- package/backend/live-search/element/result/item/action/action-container.ts +1 -1
- package/backend/live-search/element/result/item/item-container.ts +4 -4
- package/backend/live-search/element/result/result-container.ts +5 -0
- package/backend/live-search/element/result/result-pagination.ts +1 -1
- package/backend/live-search/live-search.ts +2 -2
- package/backend/localization/label-provider.ts +4 -4
- package/backend/localization/localization-wizard.ts +4 -4
- package/backend/localization/steps/content-record-selection-step.ts +8 -8
- package/backend/localization/steps/handler-selection-step.ts +4 -4
- package/backend/localization/steps/mode-step.ts +4 -4
- package/backend/localization/steps/source-language-step.ts +4 -4
- package/backend/localization/steps/target-language-step.ts +4 -4
- package/backend/login-refresh.ts +1 -9
- package/backend/login.ts +2 -2
- package/backend/modal.ts +38 -5
- package/backend/module/iframe.ts +10 -0
- package/backend/module/router.ts +10 -0
- package/backend/module-menu.ts +3 -3
- package/backend/multi-record-selection-action.ts +1 -1
- package/backend/multi-record-selection-delete-action.ts +1 -1
- package/backend/multi-record-selection.ts +14 -14
- package/backend/multi-step-wizard.ts +9 -2
- package/backend/new-multiple-pages.ts +2 -2
- package/backend/new-record-wizard.ts +15 -15
- package/backend/notification.ts +90 -6
- package/backend/online-media.ts +1 -3
- package/backend/page-wizard/page-wizard.ts +2 -2
- package/backend/page-wizard/steps/doktype-step.ts +5 -5
- package/backend/pagetsconfig/pagetsconfig-includes.ts +1 -1
- package/backend/popover.ts +5 -5
- package/backend/record-download-button.ts +5 -6
- package/backend/recordlist.ts +11 -6
- package/backend/security/element/csp-reports.ts +8 -8
- package/backend/setup-module.ts +2 -2
- package/backend/sortable-table.ts +10 -4
- package/backend/storage/abstract-client-storage.ts +2 -2
- package/backend/storage/module-state-storage.ts +2 -2
- package/backend/tests/backend/utility/dom-helper-test.ts +2 -2
- package/backend/tests/fixtures/modal-autofocus.html +1 -0
- package/backend/tests/form-engine/element/extra/select-box-filter-test.ts +3 -3
- package/backend/tests/form-engine-validation-test.ts +1 -1
- package/backend/tests/modal-test.ts +91 -0
- package/backend/tests/notification-test.ts +176 -0
- package/backend/tests/tree/tree-test.ts +41 -0
- package/backend/tree/file-storage-browser.ts +1 -1
- package/backend/tree/file-storage-tree-container.ts +4 -4
- package/backend/tree/page-browser.ts +1 -1
- package/backend/tree/page-position-select.ts +1 -1
- package/backend/tree/page-tree-element.ts +9 -2
- package/backend/tree/page-tree.ts +7 -1
- package/backend/tree/tree-module-state.ts +5 -5
- package/backend/tree/tree.ts +15 -8
- package/backend/user-pass-login.ts +2 -2
- package/backend/utility/collapse-state-persister.ts +1 -1
- package/backend/utility/collapse-state-search.ts +6 -6
- package/backend/utility/dom-helper.ts +3 -3
- package/backend/utility.ts +6 -6
- package/backend/viewport/content-navigation.ts +5 -0
- package/backend/viewport/navigation-container.ts +1 -1
- package/backend/viewport/toolbar.ts +3 -3
- package/backend/window-manager.ts +2 -2
- package/backend/wizard/events/auto-advance-event.ts +6 -0
- package/backend/wizard/events/before-next-step-event.ts +6 -0
- package/backend/wizard/events/step-summary-event.ts +6 -0
- package/backend/wizard/move-content-element.ts +1 -1
- package/backend/wizard/wizard.ts +8 -10
- package/belog/backend-log.ts +2 -2
- package/beuser/permissions.ts +2 -2
- package/core/ajax/ajax-response.ts +1 -1
- package/core/ajax/input-transformer.ts +1 -1
- package/core/event/debounce-event.ts +4 -4
- package/core/event/event-interface.ts +3 -3
- package/core/event/regular-event.ts +7 -7
- package/core/event/request-animation-frame-event.ts +4 -4
- package/core/event/throttle-event.ts +4 -4
- package/core/java-script-item-processor.ts +6 -0
- package/core/referrer-refresh.ts +2 -2
- package/core/security-utility.ts +1 -1
- package/dashboard/dashboard-wizard.ts +2 -2
- package/dashboard/dashboard.ts +8 -13
- package/dashboard/wizard/steps/preset-step.ts +3 -3
- package/extensionmanager/main.ts +7 -7
- package/filelist/browse-files.ts +1 -1
- package/filelist/browse-folders.ts +2 -2
- package/filelist/file-list-dragdrop.ts +5 -5
- package/filelist/file-list-rename-handler.ts +3 -6
- package/filelist/file-list-replace-handler.ts +3 -6
- package/filelist/file-list-transfer-handler.ts +2 -2
- package/filelist/file-list.ts +8 -9
- package/form/backend/form-editor/component/date-editor.ts +4 -0
- package/form/backend/form-editor/component/form-element-selector.ts +4 -0
- package/form/backend/form-editor/inspector-component.ts +6 -6
- package/form/backend/form-editor/mediator.ts +36 -36
- package/form/backend/form-editor/modals-component.ts +115 -6
- package/form/backend/form-editor/stage-component.ts +4 -4
- package/form/backend/form-editor/view-model.ts +7 -7
- package/form/backend/form-manager/view-model.ts +5 -5
- package/form/backend/form-wizard/form-wizard.ts +2 -2
- package/form/backend/form-wizard/steps/storage-step.ts +1 -1
- package/impexp/import-export.ts +1 -1
- package/info/translation-status.ts +2 -2
- package/install/ajax/ajax-queue.ts +1 -1
- package/install/module/abstract-interactable-module.ts +2 -2
- package/install/module/environment/image-processing.ts +4 -4
- package/install/module/environment/mail-test.ts +2 -2
- package/install/module/maintenance/clear-tables.ts +3 -3
- package/install/module/maintenance/clear-typo3temp-files.ts +8 -8
- package/install/module/maintenance/create-admin.ts +3 -3
- package/install/module/maintenance/database-analyzer.ts +9 -7
- package/install/module/maintenance/language-packs.ts +4 -4
- package/install/module/maintenance/reference-index.ts +1 -1
- package/install/module/settings/change-install-tool-password.ts +1 -1
- package/install/module/settings/extension-configuration.ts +5 -5
- package/install/module/settings/features.ts +1 -1
- package/install/module/settings/local-configuration.ts +5 -5
- package/install/module/settings/presets.ts +2 -2
- package/install/module/settings/system-maintainer.ts +1 -1
- package/install/module/upgrade/extension-scanner.ts +5 -5
- package/install/module/upgrade/tca-migrations-check.ts +1 -1
- package/install/module/upgrade/upgrade-docs.ts +16 -16
- package/install/module/upgrade/upgrade-wizards.ts +7 -8
- package/install/renderable/language-packs.ts +8 -2
- package/lowlevel/query-generator.ts +2 -2
- package/package.json +2 -2
- package/redirects/event-handler.ts +6 -0
- package/rte-ckeditor/ckeditor5.ts +7 -3
- package/rte-ckeditor/legacy/ckeditor5-bundle.ts +0 -1
- package/rte-ckeditor/plugin/typo3-link.ts +7 -9
- package/rte-ckeditor/rte-link-browser.ts +1 -1
- package/rte-ckeditor/tests/ckeditor5-test.ts +68 -0
- package/scheduler/form-engine/element/timing-options-element.ts +1 -1
- package/scheduler/scheduler-add-group.ts +4 -12
- package/scheduler/scheduler.ts +2 -2
- package/styleguide/checkbox-demo.ts +1 -1
- package/tstemplate/template-analyzer.ts +1 -1
- package/viewpage/main.ts +1 -1
- package/workspaces/backend.ts +5 -5
- package/workspaces/preview.ts +41 -2
- package/workspaces/renderable/record-table.ts +95 -78
- package/workspaces/renderable/send-to-stage-form.ts +1 -1
|
@@ -41,7 +41,7 @@ class FileListDragDrop {
|
|
|
41
41
|
|
|
42
42
|
const checkedItems = document.querySelectorAll(MultiRecordSelectionSelectors.checkboxSelector + ':checked') as NodeListOf<HTMLInputElement>;
|
|
43
43
|
if (checkedItems.length) {
|
|
44
|
-
checkedItems.forEach((checkbox
|
|
44
|
+
checkedItems.forEach((checkbox) => {
|
|
45
45
|
if (checkbox.checked) {
|
|
46
46
|
const element = checkbox.closest(FileListActionSelector.elementSelector) as HTMLInputElement;
|
|
47
47
|
element.dataset.filelistDragdropTransferItem = 'true';
|
|
@@ -100,8 +100,8 @@ class FileListDragDrop {
|
|
|
100
100
|
|
|
101
101
|
private getPreviewItems(selectedItems: ResourceInterface[]): DragDropThumbnail[] {
|
|
102
102
|
return selectedItems
|
|
103
|
-
.filter((item
|
|
104
|
-
.map((item
|
|
103
|
+
.filter((item): boolean => item.hasPreview)
|
|
104
|
+
.map((item) => {
|
|
105
105
|
const thumbnailUrl = new URL(top.TYPO3.settings.Resource.thumbnailUrl, window.origin);
|
|
106
106
|
thumbnailUrl.searchParams.set('identifier', item.uid.toString(10));
|
|
107
107
|
|
|
@@ -115,7 +115,7 @@ class FileListDragDrop {
|
|
|
115
115
|
|
|
116
116
|
private getPreviewLabel(selectedItems: ResourceInterface[]): string {
|
|
117
117
|
// Counter
|
|
118
|
-
const previewItems = selectedItems.filter((item
|
|
118
|
+
const previewItems = selectedItems.filter((item): boolean => item.hasPreview);
|
|
119
119
|
const count = selectedItems.length - previewItems.length;
|
|
120
120
|
if (count > 0) {
|
|
121
121
|
return (previewItems.length > 0 ? '+' : '') + count.toString();
|
|
@@ -124,7 +124,7 @@ class FileListDragDrop {
|
|
|
124
124
|
}
|
|
125
125
|
|
|
126
126
|
private reset(): void {
|
|
127
|
-
document.querySelectorAll(FileListActionSelector.elementSelector).forEach((element
|
|
127
|
+
document.querySelectorAll<HTMLElement>(FileListActionSelector.elementSelector).forEach((element) => {
|
|
128
128
|
delete element.dataset.filelistDragdropTransferItem;
|
|
129
129
|
element.classList.remove('success');
|
|
130
130
|
});
|
|
@@ -51,10 +51,7 @@ class FileListRenameHandler {
|
|
|
51
51
|
text: labels.get('file_rename.button.rename'),
|
|
52
52
|
btnClass: 'btn-primary',
|
|
53
53
|
name: 'rename',
|
|
54
|
-
|
|
55
|
-
const form: HTMLFormElement = modal.querySelector('form');
|
|
56
|
-
form?.requestSubmit();
|
|
57
|
-
},
|
|
54
|
+
form: 'file-list-rename-form',
|
|
58
55
|
},
|
|
59
56
|
],
|
|
60
57
|
callback: function (modal: ModalElement) {
|
|
@@ -119,11 +116,11 @@ class FileListRenameHandler {
|
|
|
119
116
|
labels.get('folder_rename.label') :
|
|
120
117
|
labels.get('file_rename.label');
|
|
121
118
|
return html`
|
|
122
|
-
<form>
|
|
119
|
+
<form id="file-list-rename-form">
|
|
123
120
|
<label class="form-label" for="rename_target">
|
|
124
121
|
${label}
|
|
125
122
|
</label>
|
|
126
|
-
<input id="rename_target" name="name" class="form-control" value="${resource.name}" required>
|
|
123
|
+
<input id="rename_target" name="name" class="form-control" value="${resource.name}" required autofocus>
|
|
127
124
|
</form>
|
|
128
125
|
`;
|
|
129
126
|
}
|
|
@@ -57,10 +57,7 @@ class FileListReplaceHandler {
|
|
|
57
57
|
text: labels.get('file_replace.button.replace'),
|
|
58
58
|
btnClass: 'btn-primary',
|
|
59
59
|
name: 'rename',
|
|
60
|
-
|
|
61
|
-
const form: HTMLFormElement = modal.querySelector('form');
|
|
62
|
-
form?.requestSubmit();
|
|
63
|
-
},
|
|
60
|
+
form: 'file-list-replace-form',
|
|
64
61
|
},
|
|
65
62
|
],
|
|
66
63
|
callback: function (modal: ModalElement) {
|
|
@@ -126,10 +123,10 @@ class FileListReplaceHandler {
|
|
|
126
123
|
</dl>
|
|
127
124
|
</div>
|
|
128
125
|
</div>
|
|
129
|
-
<form>
|
|
126
|
+
<form id="file-list-replace-form">
|
|
130
127
|
<div class="form-group">
|
|
131
128
|
<label class="form-label" for="file_replace">${labels.get('file_replace.new_file.label')}</label>
|
|
132
|
-
<input id="file_replace" type="file" class="form-control" name="replace_1">
|
|
129
|
+
<input id="file_replace" type="file" class="form-control" name="replace_1" autofocus>
|
|
133
130
|
</div>
|
|
134
131
|
<div class="form-check">
|
|
135
132
|
<input type="checkbox" value="1" id="keepFilename" name="keepFilename" class="form-check-input" checked>
|
|
@@ -96,7 +96,7 @@ class FileListTransferHandler {
|
|
|
96
96
|
|
|
97
97
|
private transfer(type: FileListTransferType, resources: ResourceInterface[], target: ResourceInterface): void {
|
|
98
98
|
const payload: FileListTransferOperation[] = [];
|
|
99
|
-
resources.forEach((resource
|
|
99
|
+
resources.forEach((resource) => {
|
|
100
100
|
const operation: FileListTransferOperation = {
|
|
101
101
|
data: resource.identifier,
|
|
102
102
|
target: target.identifier,
|
|
@@ -122,7 +122,7 @@ class FileListTransferHandler {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
private handleMessages(messages: Message[]): void {
|
|
125
|
-
messages.forEach((message
|
|
125
|
+
messages.forEach((message): void => {
|
|
126
126
|
Notification.showMessage(
|
|
127
127
|
message.title || '',
|
|
128
128
|
message.message || '',
|
package/filelist/file-list.ts
CHANGED
|
@@ -264,7 +264,7 @@ export default class Filelist {
|
|
|
264
264
|
return;
|
|
265
265
|
}
|
|
266
266
|
const list: Array<string> = [];
|
|
267
|
-
(eventDetails.checkboxes as NodeListOf<HTMLInputElement>).forEach((checkbox
|
|
267
|
+
(eventDetails.checkboxes as NodeListOf<HTMLInputElement>).forEach((checkbox) => {
|
|
268
268
|
const checkboxContainer: HTMLElement = checkbox.closest(MultiRecordSelectionSelectors.elementSelector);
|
|
269
269
|
if (checkboxContainer !== null && checkboxContainer.dataset[configuration.idField]) {
|
|
270
270
|
list.push(checkboxContainer.dataset[configuration.idField]);
|
|
@@ -276,7 +276,7 @@ export default class Filelist {
|
|
|
276
276
|
url.searchParams.set('edit[' + configuration.table + '][' + list.join(',') + ']', 'edit');
|
|
277
277
|
url.searchParams.set('returnUrl', Filelist.getReturnUrl(configuration.returnUrl || ''));
|
|
278
278
|
const columnsOnly = configuration.columnsOnly || [];
|
|
279
|
-
columnsOnly.forEach((column
|
|
279
|
+
columnsOnly.forEach((column, i): void => {
|
|
280
280
|
url.searchParams.set('columnsOnly[' + configuration.table + '][' + i + ']', column);
|
|
281
281
|
});
|
|
282
282
|
window.location.href = url.toString();
|
|
@@ -293,7 +293,7 @@ export default class Filelist {
|
|
|
293
293
|
const configuration: DownloadConfiguration = (eventDetails.configuration as DownloadConfiguration);
|
|
294
294
|
|
|
295
295
|
const filesAndFolders: ResourceInterface[] = [];
|
|
296
|
-
eventDetails.checkboxes.forEach((checkbox
|
|
296
|
+
eventDetails.checkboxes.forEach((checkbox) => {
|
|
297
297
|
if (checkbox.checked) {
|
|
298
298
|
const element = checkbox.closest(FileListActionSelector.elementSelector) as HTMLInputElement;
|
|
299
299
|
const resource = FileListActionUtility.getResourceForElement(element);
|
|
@@ -335,7 +335,7 @@ export default class Filelist {
|
|
|
335
335
|
const progressBar = this.getProgress();
|
|
336
336
|
progressBar.start();
|
|
337
337
|
|
|
338
|
-
const itemIdentifiers = items.map((resource
|
|
338
|
+
const itemIdentifiers = items.map((resource) => resource.identifier);
|
|
339
339
|
(new AjaxRequest(downloadUrl)).post({ items: itemIdentifiers })
|
|
340
340
|
.then(async (response: AjaxResponse): Promise<void> => {
|
|
341
341
|
let fileName = response.response.headers.get('Content-Disposition');
|
|
@@ -408,7 +408,7 @@ export default class Filelist {
|
|
|
408
408
|
}
|
|
409
409
|
|
|
410
410
|
private readonly registerPaginationEvents = (): void => {
|
|
411
|
-
document.querySelectorAll('.t3js-filelist-paging').forEach((trigger
|
|
411
|
+
document.querySelectorAll<HTMLInputElement>('.t3js-filelist-paging').forEach((trigger) => {
|
|
412
412
|
trigger.addEventListener('keyup', (e: KeyboardEvent) => {
|
|
413
413
|
e.preventDefault();
|
|
414
414
|
let value = Number(trigger.value);
|
|
@@ -422,10 +422,9 @@ export default class Filelist {
|
|
|
422
422
|
}
|
|
423
423
|
trigger.value = value.toString(10);
|
|
424
424
|
if (e.key === 'Enter' && value !== Number(trigger.dataset.currentpage)) {
|
|
425
|
-
const
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
window.location.href = submitUrl.toString();
|
|
425
|
+
const pagingUrl = new URL(trigger.dataset.pagingUrl, window.origin);
|
|
426
|
+
pagingUrl.searchParams.set('currentPage', value.toString());
|
|
427
|
+
window.location.href = pagingUrl.toString();
|
|
429
428
|
}
|
|
430
429
|
});
|
|
431
430
|
});
|
|
@@ -645,7 +645,7 @@ function setRandomIds(html: HTMLElement): void {
|
|
|
645
645
|
|
|
646
646
|
const idReplacements: Record<string, string> = {};
|
|
647
647
|
|
|
648
|
-
html.querySelectorAll<HTMLElement>(getHelper().getDomElementDataAttribute('randomId', 'bracesWithKey')).forEach(function(element
|
|
648
|
+
html.querySelectorAll<HTMLElement>(getHelper().getDomElementDataAttribute('randomId', 'bracesWithKey')).forEach(function(element) {
|
|
649
649
|
const targetAttribute = element.getAttribute(getHelper().getDomElementDataAttribute('randomIdTarget'));
|
|
650
650
|
const randomIdIndex = element.getAttribute(getHelper().getDomElementDataAttribute('randomIdIndex'));
|
|
651
651
|
|
|
@@ -1309,7 +1309,7 @@ export function renderCountrySelectEditor(
|
|
|
1309
1309
|
|
|
1310
1310
|
selectElement?.addEventListener('change', function(this: HTMLSelectElement) {
|
|
1311
1311
|
const selectValues: string[] = [];
|
|
1312
|
-
this.querySelectorAll<HTMLOptionElement>('option:checked').forEach(function(opt
|
|
1312
|
+
this.querySelectorAll<HTMLOptionElement>('option:checked').forEach(function(opt) {
|
|
1313
1313
|
selectValues.push((opt as any)._dataValue);
|
|
1314
1314
|
});
|
|
1315
1315
|
getCurrentlySelectedFormElement().set(propertyPath, selectValues);
|
|
@@ -1436,7 +1436,7 @@ export function renderMultiSelectEditor(
|
|
|
1436
1436
|
|
|
1437
1437
|
selectElement?.addEventListener('change', function(this: HTMLSelectElement) {
|
|
1438
1438
|
const selectValues: string[] = [];
|
|
1439
|
-
this.querySelectorAll<HTMLOptionElement>('option:checked').forEach(function(opt
|
|
1439
|
+
this.querySelectorAll<HTMLOptionElement>('option:checked').forEach(function(opt) {
|
|
1440
1440
|
selectValues.push((opt as any)._dataValue);
|
|
1441
1441
|
});
|
|
1442
1442
|
getCurrentlySelectedFormElement().set(propertyPath, selectValues);
|
|
@@ -1644,9 +1644,9 @@ export function renderPropertyGridEditor(
|
|
|
1644
1644
|
}));
|
|
1645
1645
|
} else if (typeof rawData === 'object') {
|
|
1646
1646
|
// Handle object case: { value: label }
|
|
1647
|
-
propertyEntries = Object.entries(rawData).map(([value, label]
|
|
1647
|
+
propertyEntries = Object.entries(rawData).map(([value, label]): PropertyGridEditorEntry => ({
|
|
1648
1648
|
id: 'fe' + Math.floor(Math.random() * 42) + Date.now(),
|
|
1649
|
-
label,
|
|
1649
|
+
label: label as string,
|
|
1650
1650
|
value,
|
|
1651
1651
|
selected: false,
|
|
1652
1652
|
}));
|
|
@@ -2178,7 +2178,7 @@ function getFormElementSelectorEntries(): FormElementSelectorEntry[] {
|
|
|
2178
2178
|
return ((): FormElementSelectorEntry[] => {
|
|
2179
2179
|
const nonCompositeNonToplevelFormElements = getFormEditorApp().getNonCompositeNonToplevelFormElements();
|
|
2180
2180
|
|
|
2181
|
-
return nonCompositeNonToplevelFormElements.map((nonCompositeNonToplevelFormElement
|
|
2181
|
+
return nonCompositeNonToplevelFormElements.map((nonCompositeNonToplevelFormElement): FormElementSelectorEntry => ({
|
|
2182
2182
|
icon: getFormElementDefinition(nonCompositeNonToplevelFormElement, 'iconIdentifier'),
|
|
2183
2183
|
label: nonCompositeNonToplevelFormElement.get('label'),
|
|
2184
2184
|
value: nonCompositeNonToplevelFormElement.get('identifier'),
|
|
@@ -109,7 +109,7 @@ function subscribeEvents(): void {
|
|
|
109
109
|
applicationState, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
110
110
|
currentStackPointer,
|
|
111
111
|
currentStackSize
|
|
112
|
-
]: [
|
|
112
|
+
]: readonly [
|
|
113
113
|
ApplicationState,
|
|
114
114
|
number,
|
|
115
115
|
number
|
|
@@ -132,7 +132,7 @@ function subscribeEvents(): void {
|
|
|
132
132
|
*/
|
|
133
133
|
getPublisherSubscriber().subscribe('core/ajax/saveFormDefinition/success', (
|
|
134
134
|
topic: string,
|
|
135
|
-
[data]: [{ status: string, formDefinition: FormElementDefinition }]
|
|
135
|
+
[data]: readonly [{ status: string, formDefinition: FormElementDefinition }]
|
|
136
136
|
): void => {
|
|
137
137
|
getFormEditorApp().setUnsavedContent(false);
|
|
138
138
|
getViewModel().setPreviewMode(false);
|
|
@@ -156,7 +156,7 @@ function subscribeEvents(): void {
|
|
|
156
156
|
*/
|
|
157
157
|
getPublisherSubscriber().subscribe('core/ajax/saveFormDefinition/error', (
|
|
158
158
|
topic: string,
|
|
159
|
-
[data]: [{ status: string, message: string, code: number }]
|
|
159
|
+
[data]: readonly [{ status: string, message: string, code: number }]
|
|
160
160
|
): void => {
|
|
161
161
|
getViewModel().showSaveButtonSaveIcon();
|
|
162
162
|
getViewModel().showSaveErrorMessage({ message: data.message });
|
|
@@ -167,7 +167,7 @@ function subscribeEvents(): void {
|
|
|
167
167
|
*/
|
|
168
168
|
getPublisherSubscriber().subscribe('core/ajax/renderFormDefinitionPage/success', (
|
|
169
169
|
topic: string,
|
|
170
|
-
[htmldata, pageIndex]: [string, number] // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
170
|
+
[htmldata, pageIndex]: readonly [string, number] // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
171
171
|
): void => {
|
|
172
172
|
getViewModel().renderPreviewStageArea(htmldata);
|
|
173
173
|
});
|
|
@@ -177,7 +177,7 @@ function subscribeEvents(): void {
|
|
|
177
177
|
*/
|
|
178
178
|
getPublisherSubscriber().subscribe('core/ajax/error', (
|
|
179
179
|
topic: string,
|
|
180
|
-
[statusText, responseBody]: [string, string]
|
|
180
|
+
[statusText, responseBody]: readonly [string, string]
|
|
181
181
|
): void => {
|
|
182
182
|
getViewModel().showErrorFlashMessage(statusText, responseBody);
|
|
183
183
|
getViewModel().renderPreviewStageArea(responseBody);
|
|
@@ -218,7 +218,7 @@ function subscribeEvents(): void {
|
|
|
218
218
|
*/
|
|
219
219
|
getPublisherSubscriber().subscribe('view/header/button/newPage/clicked', (
|
|
220
220
|
topic: string,
|
|
221
|
-
[targetEvent]: ['view/insertPages/perform']
|
|
221
|
+
[targetEvent]: readonly ['view/insertPages/perform']
|
|
222
222
|
): void => {
|
|
223
223
|
if (getFormEditorApp().isRootFormElementSelected()) {
|
|
224
224
|
getViewModel().selectPageBatch(0);
|
|
@@ -282,7 +282,7 @@ function subscribeEvents(): void {
|
|
|
282
282
|
*/
|
|
283
283
|
getPublisherSubscriber().subscribe('view/stage/element/clicked', (
|
|
284
284
|
topic: string,
|
|
285
|
-
[formElementIdentifierPath]: [string]
|
|
285
|
+
[formElementIdentifierPath]: readonly [string]
|
|
286
286
|
): void => {
|
|
287
287
|
if (getViewModel().getPreviewMode()) {
|
|
288
288
|
return;
|
|
@@ -307,7 +307,7 @@ function subscribeEvents(): void {
|
|
|
307
307
|
[
|
|
308
308
|
targetEvent,
|
|
309
309
|
modalConfiguration
|
|
310
|
-
]: [
|
|
310
|
+
]: readonly [
|
|
311
311
|
'view/insertElements/perform/before' | 'view/insertElements/perform/after' | 'view/insertElements/perform/inside',
|
|
312
312
|
InsertElementsModalConfiguration
|
|
313
313
|
]
|
|
@@ -326,7 +326,7 @@ function subscribeEvents(): void {
|
|
|
326
326
|
[
|
|
327
327
|
targetEvent,
|
|
328
328
|
modalConfiguration
|
|
329
|
-
]: [
|
|
329
|
+
]: readonly [
|
|
330
330
|
'view/insertElements/perform/bottom',
|
|
331
331
|
InsertElementsModalConfiguration?
|
|
332
332
|
]
|
|
@@ -345,7 +345,7 @@ function subscribeEvents(): void {
|
|
|
345
345
|
[
|
|
346
346
|
draggedFormElementDomElement,
|
|
347
347
|
draggedFormPlaceholderDomElement
|
|
348
|
-
]: [
|
|
348
|
+
]: readonly [
|
|
349
349
|
HTMLElement,
|
|
350
350
|
HTMLElement
|
|
351
351
|
]
|
|
@@ -361,7 +361,7 @@ function subscribeEvents(): void {
|
|
|
361
361
|
*/
|
|
362
362
|
getPublisherSubscriber().subscribe('view/stage/abstract/dnd/stop', (
|
|
363
363
|
topic: string,
|
|
364
|
-
[draggedFormElementIdentifierPath]: [string]
|
|
364
|
+
[draggedFormElementIdentifierPath]: readonly [string]
|
|
365
365
|
): void => {
|
|
366
366
|
getFormEditorApp().setCurrentlySelectedFormElement(draggedFormElementIdentifierPath);
|
|
367
367
|
getViewModel().renewStructure();
|
|
@@ -381,7 +381,7 @@ function subscribeEvents(): void {
|
|
|
381
381
|
placeholderDomElement,
|
|
382
382
|
parentFormElementIdentifierPath,
|
|
383
383
|
enclosingCompositeFormElement
|
|
384
|
-
]: [
|
|
384
|
+
]: readonly [
|
|
385
385
|
HTMLElement,
|
|
386
386
|
string,
|
|
387
387
|
FormElement
|
|
@@ -404,7 +404,7 @@ function subscribeEvents(): void {
|
|
|
404
404
|
movedFormElementIdentifierPath,
|
|
405
405
|
previousFormElementIdentifierPath,
|
|
406
406
|
nextFormElementIdentifierPath
|
|
407
|
-
]: [
|
|
407
|
+
]: readonly [
|
|
408
408
|
HTMLElement,
|
|
409
409
|
string,
|
|
410
410
|
string,
|
|
@@ -487,7 +487,7 @@ function subscribeEvents(): void {
|
|
|
487
487
|
*/
|
|
488
488
|
getPublisherSubscriber().subscribe('view/tree/node/clicked', (
|
|
489
489
|
topic: string,
|
|
490
|
-
[formElementIdentifierPath]: [string]
|
|
490
|
+
[formElementIdentifierPath]: readonly [string]
|
|
491
491
|
): void => {
|
|
492
492
|
if (getCurrentlySelectedFormElement().get('__identifierPath') !== formElementIdentifierPath) {
|
|
493
493
|
getFormEditorApp().setCurrentlySelectedFormElement(formElementIdentifierPath);
|
|
@@ -506,7 +506,7 @@ function subscribeEvents(): void {
|
|
|
506
506
|
*/
|
|
507
507
|
getPublisherSubscriber().subscribe('view/tree/node/changed', (
|
|
508
508
|
topic: string,
|
|
509
|
-
[formElementIdentifierPath, newLabel]: [string, string]
|
|
509
|
+
[formElementIdentifierPath, newLabel]: readonly [string, string]
|
|
510
510
|
): void => {
|
|
511
511
|
const formElement = getFormEditorApp().getFormElementByIdentifierPath(formElementIdentifierPath);
|
|
512
512
|
formElement.set('label', newLabel);
|
|
@@ -536,7 +536,7 @@ function subscribeEvents(): void {
|
|
|
536
536
|
*/
|
|
537
537
|
getPublisherSubscriber().subscribe('view/structure/button/newPage/clicked', (
|
|
538
538
|
topic: string,
|
|
539
|
-
[targetEvent]: ['view/insertPages/perform']
|
|
539
|
+
[targetEvent]: readonly ['view/insertPages/perform']
|
|
540
540
|
): void => {
|
|
541
541
|
if (getFormEditorApp().isRootFormElementSelected()) {
|
|
542
542
|
getViewModel().selectPageBatch(0);
|
|
@@ -549,7 +549,7 @@ function subscribeEvents(): void {
|
|
|
549
549
|
*/
|
|
550
550
|
getPublisherSubscriber().subscribe('view/tree/dnd/stop', (
|
|
551
551
|
topic: string,
|
|
552
|
-
[draggedFormElementIdentifierPath]: [string]
|
|
552
|
+
[draggedFormElementIdentifierPath]: readonly [string]
|
|
553
553
|
): void => {
|
|
554
554
|
getFormEditorApp().setCurrentlySelectedFormElement(draggedFormElementIdentifierPath);
|
|
555
555
|
getViewModel().renewStructure();
|
|
@@ -569,7 +569,7 @@ function subscribeEvents(): void {
|
|
|
569
569
|
placeholderDomElement,
|
|
570
570
|
parentFormElementIdentifierPath,
|
|
571
571
|
enclosingCompositeFormElement
|
|
572
|
-
]: [
|
|
572
|
+
]: readonly [
|
|
573
573
|
HTMLElement | null,
|
|
574
574
|
string,
|
|
575
575
|
FormElement
|
|
@@ -592,7 +592,7 @@ function subscribeEvents(): void {
|
|
|
592
592
|
movedFormElementIdentifierPath,
|
|
593
593
|
previousFormElementIdentifierPath,
|
|
594
594
|
nextFormElementIdentifierPath
|
|
595
|
-
]: [
|
|
595
|
+
]: readonly [
|
|
596
596
|
HTMLElement | null,
|
|
597
597
|
string,
|
|
598
598
|
string,
|
|
@@ -627,7 +627,7 @@ function subscribeEvents(): void {
|
|
|
627
627
|
collectionElementIdentifier,
|
|
628
628
|
collectionName,
|
|
629
629
|
formElement
|
|
630
|
-
]: [
|
|
630
|
+
]: readonly [
|
|
631
631
|
string,
|
|
632
632
|
'validators',
|
|
633
633
|
FormElement?
|
|
@@ -648,7 +648,7 @@ function subscribeEvents(): void {
|
|
|
648
648
|
[
|
|
649
649
|
collectionElementIdentifier,
|
|
650
650
|
collectionName,
|
|
651
|
-
]: [
|
|
651
|
+
]: readonly [
|
|
652
652
|
string,
|
|
653
653
|
keyof FormEditorDefinitions,
|
|
654
654
|
]
|
|
@@ -667,7 +667,7 @@ function subscribeEvents(): void {
|
|
|
667
667
|
[
|
|
668
668
|
collectionElementIdentifier,
|
|
669
669
|
collectionName,
|
|
670
|
-
]: [
|
|
670
|
+
]: readonly [
|
|
671
671
|
string,
|
|
672
672
|
keyof FormEditorDefinitions,
|
|
673
673
|
]
|
|
@@ -689,7 +689,7 @@ function subscribeEvents(): void {
|
|
|
689
689
|
previousCollectionElementIdentifier,
|
|
690
690
|
nextCollectionElementIdentifier,
|
|
691
691
|
collectionName
|
|
692
|
-
]: [
|
|
692
|
+
]: readonly [
|
|
693
693
|
string,
|
|
694
694
|
string,
|
|
695
695
|
string,
|
|
@@ -729,10 +729,10 @@ function subscribeEvents(): void {
|
|
|
729
729
|
value, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
730
730
|
oldValue, // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
731
731
|
formElementIdentifierPath
|
|
732
|
-
]: [
|
|
732
|
+
]: readonly [
|
|
733
733
|
string,
|
|
734
|
-
unknown
|
|
735
|
-
unknown
|
|
734
|
+
unknown?,
|
|
735
|
+
unknown?,
|
|
736
736
|
string?,
|
|
737
737
|
]
|
|
738
738
|
): void => {
|
|
@@ -765,7 +765,7 @@ function subscribeEvents(): void {
|
|
|
765
765
|
*/
|
|
766
766
|
getPublisherSubscriber().subscribe('view/formElement/removed', (
|
|
767
767
|
topic: string,
|
|
768
|
-
[parentFormElement]: [FormElement]
|
|
768
|
+
[parentFormElement]: readonly [FormElement]
|
|
769
769
|
): void => {
|
|
770
770
|
getFormEditorApp().setCurrentlySelectedFormElement(parentFormElement);
|
|
771
771
|
getViewModel().renewStructure();
|
|
@@ -779,7 +779,7 @@ function subscribeEvents(): void {
|
|
|
779
779
|
*/
|
|
780
780
|
getPublisherSubscriber().subscribe('view/formElement/inserted', (
|
|
781
781
|
topic: string,
|
|
782
|
-
[newFormElement]: [FormElement]
|
|
782
|
+
[newFormElement]: readonly [FormElement]
|
|
783
783
|
): void => {
|
|
784
784
|
getFormEditorApp().setCurrentlySelectedFormElement(newFormElement);
|
|
785
785
|
getViewModel().renewStructure();
|
|
@@ -814,7 +814,7 @@ function subscribeEvents(): void {
|
|
|
814
814
|
*/
|
|
815
815
|
getPublisherSubscriber().subscribe('view/insertElements/perform/bottom', (
|
|
816
816
|
topic: string,
|
|
817
|
-
[formElementType]: [string]
|
|
817
|
+
[formElementType]: readonly [string]
|
|
818
818
|
): void => {
|
|
819
819
|
const lastRenderable = getFormEditorApp().getLastTopLevelElementOnCurrentPage();
|
|
820
820
|
if (!lastRenderable) {
|
|
@@ -837,7 +837,7 @@ function subscribeEvents(): void {
|
|
|
837
837
|
*/
|
|
838
838
|
getPublisherSubscriber().subscribe('view/insertElements/perform/before', (
|
|
839
839
|
topic: string,
|
|
840
|
-
[formElementType]: [string]
|
|
840
|
+
[formElementType]: readonly [string]
|
|
841
841
|
): void => {
|
|
842
842
|
let newFormElement;
|
|
843
843
|
newFormElement = getViewModel().createAndAddFormElement(formElementType, undefined, true);
|
|
@@ -851,7 +851,7 @@ function subscribeEvents(): void {
|
|
|
851
851
|
*/
|
|
852
852
|
getPublisherSubscriber().subscribe('view/insertElements/perform/after', (
|
|
853
853
|
topic: string,
|
|
854
|
-
[formElementType]: [string]
|
|
854
|
+
[formElementType]: readonly [string]
|
|
855
855
|
): void => {
|
|
856
856
|
let newFormElement;
|
|
857
857
|
newFormElement = getViewModel().createAndAddFormElement(formElementType, undefined, true);
|
|
@@ -864,7 +864,7 @@ function subscribeEvents(): void {
|
|
|
864
864
|
*/
|
|
865
865
|
getPublisherSubscriber().subscribe('view/insertElements/perform/inside', (
|
|
866
866
|
topic: string,
|
|
867
|
-
[formElementType]: [string]
|
|
867
|
+
[formElementType]: readonly [string]
|
|
868
868
|
): void => {
|
|
869
869
|
getViewModel().createAndAddFormElement(formElementType);
|
|
870
870
|
});
|
|
@@ -874,7 +874,7 @@ function subscribeEvents(): void {
|
|
|
874
874
|
*/
|
|
875
875
|
getPublisherSubscriber().subscribe('view/insertPages/perform', (
|
|
876
876
|
topic: string,
|
|
877
|
-
[formElementType]: [string]
|
|
877
|
+
[formElementType]: readonly [string]
|
|
878
878
|
): void => {
|
|
879
879
|
getViewModel().createAndAddFormElement(formElementType);
|
|
880
880
|
});
|
|
@@ -896,7 +896,7 @@ function subscribeEvents(): void {
|
|
|
896
896
|
*/
|
|
897
897
|
getPublisherSubscriber().subscribe('view/modal/removeFormElement/perform', (
|
|
898
898
|
topic: string,
|
|
899
|
-
[formElement]: [FormElement]
|
|
899
|
+
[formElement]: readonly [FormElement]
|
|
900
900
|
): void => {
|
|
901
901
|
getViewModel().removeFormElement(formElement);
|
|
902
902
|
});
|
|
@@ -910,7 +910,7 @@ function subscribeEvents(): void {
|
|
|
910
910
|
collectionElementIdentifier,
|
|
911
911
|
collectionName,
|
|
912
912
|
formElement,
|
|
913
|
-
]: [
|
|
913
|
+
]: readonly [
|
|
914
914
|
string,
|
|
915
915
|
keyof FormEditorDefinitions,
|
|
916
916
|
FormElement
|
|
@@ -928,7 +928,7 @@ function subscribeEvents(): void {
|
|
|
928
928
|
*/
|
|
929
929
|
getPublisherSubscriber().subscribe('view/modal/validationErrors/element/clicked', (
|
|
930
930
|
topic: string,
|
|
931
|
-
[formElementIdentifierPath]: [string]
|
|
931
|
+
[formElementIdentifierPath]: readonly [string]
|
|
932
932
|
): void => {
|
|
933
933
|
if (getCurrentlySelectedFormElement().get('__identifierPath') !== formElementIdentifierPath) {
|
|
934
934
|
getFormEditorApp().setCurrentlySelectedFormElement(formElementIdentifierPath);
|