typo3-typescript-sources 13.4.34 → 13.4.36

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/.last-synced-tag CHANGED
@@ -1 +1 @@
1
- v13.4.34
1
+ v13.4.36
package/README-TYPO3.md CHANGED
@@ -75,7 +75,7 @@ with each other and with the public. Several TYPO3 teams use Slack as a
75
75
  way to communicate internally and most channels are a welcome place for
76
76
  you to join and get yourself involved.
77
77
 
78
- * Register: https://my.typo3.org/about-mytypo3org/slack
78
+ * Register: https://typo3.community/meet/slack/
79
79
  * Slack: https://typo3.slack.com/
80
80
 
81
81
  ### Exchange information, ask questions, get help
package/README.md CHANGED
@@ -16,7 +16,7 @@ npm install typo3-typescript-sources
16
16
 
17
17
  - **Original Repository:** [TYPO3/typo3](https://github.com/TYPO3/typo3)
18
18
  - **Source Path:** `Build/Sources/TypeScript/`
19
- - **Current TYPO3 Version:** `v13.4.34`
19
+ - **Current TYPO3 Version:** `v13.4.36`
20
20
 
21
21
  ## 🌿 Branches
22
22
 
@@ -103,7 +103,9 @@ export class EditablePageTree extends PageTree {
103
103
  '&data[pages][' + data.node.identifier + '][title]=' + encodeURIComponent(newData.title) +
104
104
  '&data[pages][' + data.node.identifier + '][doktype]=' + encodeURIComponent(newData.doktype);
105
105
  } else if (data.command === TreeNodeCommandEnum.EDIT) {
106
- params = '&data[pages][' + data.node.identifier + '][title]=' + encodeURIComponent(data.title);
106
+ // The tree may show nav_title instead of title, so write back to the field that is displayed
107
+ const nameSourceField = data.node.nameSourceField || 'title';
108
+ params = '&data[pages][' + data.node.identifier + '][' + nameSourceField + ']=' + encodeURIComponent(data.title);
107
109
  } else if (data.command === TreeNodeCommandEnum.DELETE) {
108
110
  // @todo currently it's "If uid of deleted record (data.uid) is still selected, randomly select the first node"
109
111
  const moduleStateStorage = ModuleStateStorage.current('web');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "typo3-typescript-sources",
3
- "version": "13.4.34",
3
+ "version": "13.4.36",
4
4
  "description": "TYPO3 Core TypeScript Sources - Extracted from TYPO3/typo3 repository",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "typo3": {
30
30
  "sourceRepository": "https://github.com/TYPO3/typo3",
31
- "sourceTag": "v13.4.34",
31
+ "sourceTag": "v13.4.36",
32
32
  "sourcePath": "Build/Sources/TypeScript"
33
33
  }
34
34
  }
@@ -12,6 +12,5 @@ export * as Widget from '@ckeditor/ckeditor5-widget';
12
12
 
13
13
  // single or prefixed exports
14
14
  export { WordCount } from '@ckeditor/ckeditor5-word-count';
15
- export { LinkUtils } from '@ckeditor/ckeditor5-link';
16
15
 
17
16
  console.warn('The module "@typo3/ckeditor5-bundle.js" has been marked as deprecated. Please use "@ckeditor/ckeditor5-*" modules directly.');
@@ -5,11 +5,9 @@ import * as Typing from '@ckeditor/ckeditor5-typing';
5
5
  import * as Widget from '@ckeditor/ckeditor5-widget';
6
6
  import * as Utils from '@ckeditor/ckeditor5-utils';
7
7
  import * as Link from '@ckeditor/ckeditor5-link';
8
- import { LinkUtils } from '@ckeditor/ckeditor5-link';
9
8
  import { default as modalObject, type ModalElement } from '@typo3/backend/modal';
10
9
  import type { ViewAttributeElement, ViewElement, ModelSchema, ModelWriter } from '@ckeditor/ckeditor5-engine';
11
- import type { GeneralHtmlSupport, DataFilter } from '@ckeditor/ckeditor5-html-support';
12
- import type { GHSViewAttributes } from '@ckeditor/ckeditor5-html-support/src/utils';
10
+ import type { GeneralHtmlSupport, DataFilter, GHSViewAttributes } from '@ckeditor/ckeditor5-html-support';
13
11
  import { IconLink, IconPencil, IconUnlink } from '@ckeditor/ckeditor5-icons';
14
12
 
15
13
  export const LINK_ALLOWED_ATTRIBUTES = ['href', 'title', 'class', 'target', 'rel'];
@@ -53,7 +51,7 @@ export class Typo3LinkCommand extends Core.Command {
53
51
 
54
52
  // A check for any integration that allows linking elements (e.g. `LinkImage`).
55
53
  // Currently, the selection reads attributes from text nodes only. See #7429 and #7465.
56
- const sourceSelection = LinkUtils.isLinkableElement(selectedElement, model.schema) ? selectedElement : selection;
54
+ const sourceSelection = Link.isLinkableElement(selectedElement, model.schema) ? selectedElement : selection;
57
55
  if (sourceSelection === selectedElement) {
58
56
  this.value = selectedElement.getAttribute('linkHref') as string;
59
57
  this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');
@@ -226,7 +224,7 @@ export class Typo3UnlinkCommand extends Core.Command {
226
224
  const selection = model.document.selection;
227
225
  const selectedElement = selection.getSelectedElement();
228
226
 
229
- if (LinkUtils.isLinkableElement(selectedElement, model.schema)) {
227
+ if (Link.isLinkableElement(selectedElement, model.schema)) {
230
228
  this.isEnabled = model.schema.checkAttribute(selectedElement, 'linkHref');
231
229
  } else {
232
230
  this.isEnabled = model.schema.checkAttributeInSelection(selection, 'linkHref');
@@ -436,7 +434,7 @@ export class Typo3LinkUI extends Core.Plugin {
436
434
  const t = editor.t;
437
435
 
438
436
  // Handle the `Ctrl+K` keystroke and show the panel.
439
- editor.keystrokes.set(LinkUtils.LINK_KEYSTROKE, (keyEvtData, cancel) => {
437
+ editor.keystrokes.set(Link._LINK_KEYSTROKE, (keyEvtData, cancel) => {
440
438
  // Prevent focusing the search bar in FF, Chrome and Edge. See https://github.com/ckeditor/ckeditor5/issues/4811.
441
439
  cancel();
442
440
  if (linkCommand.isEnabled) {
@@ -450,7 +448,7 @@ export class Typo3LinkUI extends Core.Plugin {
450
448
  linkButton.isEnabled = true;
451
449
  linkButton.label = t('Link');
452
450
  linkButton.icon = IconLink;
453
- linkButton.keystroke = LinkUtils.LINK_KEYSTROKE;
451
+ linkButton.keystroke = Link._LINK_KEYSTROKE;
454
452
  linkButton.tooltip = true;
455
453
  linkButton.isToggleable = true;
456
454
  linkButton.bind('isEnabled').to(linkCommand, 'isEnabled');
@@ -465,7 +463,7 @@ export class Typo3LinkUI extends Core.Plugin {
465
463
  const linkCommand = editor.commands.get('link');
466
464
  button.bind('isEnabled').to(linkCommand, 'value', href => !!href);
467
465
  button.bind('href').to(linkCommand, 'value', href => {
468
- return href && LinkUtils.ensureSafeUrl(href, allowedProtocols);
466
+ return href && Link._ensureSafeLinkUrl(href, allowedProtocols);
469
467
  });
470
468
 
471
469
  button.icon = undefined;
@@ -732,7 +730,7 @@ export class Typo3LinkUI extends Core.Plugin {
732
730
  }
733
731
 
734
732
  private findLinkElementAncestor(position: any) {
735
- return position.getAncestors().find((ancestor: any) => LinkUtils.isLinkElement(ancestor));
733
+ return position.getAncestors().find((ancestor: any) => Link.isLinkElement(ancestor));
736
734
  }
737
735
 
738
736
  /**
@@ -16,7 +16,7 @@ import Modal from '@typo3/backend/modal';
16
16
  import RegularEvent from '@typo3/core/event/regular-event';
17
17
  import { type Typo3LinkDict, LINK_ALLOWED_ATTRIBUTES, addLinkPrefix } from '@typo3/rte-ckeditor/plugin/typo3-link';
18
18
  import type * as Core from '@ckeditor/ckeditor5-core';
19
- import type { ModelPosition } from '@ckeditor/ckeditor5-engine/src/model/position';
19
+ import type { ModelPosition } from '@ckeditor/ckeditor5-engine';
20
20
 
21
21
  /**
22
22
  * Module: @typo3/rte-ckeditor/rte-link-browser