typo3-typescript-sources 13.4.27 → 13.4.28
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 +1 -1
- package/README.md +1 -1
- package/backend/color-picker.ts +41 -33
- package/dashboard/dashboard.ts +0 -3
- package/package.json +2 -2
package/.last-synced-tag
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
v13.4.
|
|
1
|
+
v13.4.28
|
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.
|
|
19
|
+
- **Current TYPO3 Version:** `v13.4.28`
|
|
20
20
|
|
|
21
21
|
## 🌿 Branches
|
|
22
22
|
|
package/backend/color-picker.ts
CHANGED
|
@@ -67,42 +67,50 @@ export class Typo3BackendColorPicker extends LitElement {
|
|
|
67
67
|
await DocumentService.ready();
|
|
68
68
|
|
|
69
69
|
const inputElement = this.getInputElement();
|
|
70
|
-
if (inputElement) {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
} else {
|
|
74
|
-
this.color = inputElement.value;
|
|
75
|
-
}
|
|
70
|
+
if (!inputElement) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
76
73
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
74
|
+
if (!inputElement.value && this.color) {
|
|
75
|
+
inputElement.value = this.color;
|
|
76
|
+
} else {
|
|
77
|
+
this.color = inputElement.value;
|
|
78
|
+
}
|
|
80
79
|
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
format: 'hex',
|
|
84
|
-
opacity: this.opacity,
|
|
85
|
-
swatches: this.swatches,
|
|
86
|
-
preset: false,
|
|
87
|
-
color: this.color,
|
|
88
|
-
});
|
|
89
|
-
|
|
90
|
-
alwan.on('color', (e): void => {
|
|
91
|
-
this.color = e.hex;
|
|
92
|
-
inputElement.value = this.color;
|
|
93
|
-
inputElement.dispatchEvent(new Event('blur'));
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
// input: react on user input
|
|
97
|
-
// change: react on indirect changes, e.g. a value picker
|
|
98
|
-
['input', 'change'].forEach((eventName: string): void => {
|
|
99
|
-
new RegularEvent(eventName, (e: Event): void => {
|
|
100
|
-
const input = (e.target as HTMLInputElement);
|
|
101
|
-
this.color = input.value;
|
|
102
|
-
alwan.setColor(this.color);
|
|
103
|
-
}).bindTo(inputElement);
|
|
104
|
-
});
|
|
80
|
+
if (inputElement.disabled || inputElement.readOnly) {
|
|
81
|
+
return;
|
|
105
82
|
}
|
|
83
|
+
|
|
84
|
+
const alwan = new Alwan(inputElement, {
|
|
85
|
+
position: 'bottom-start',
|
|
86
|
+
format: 'hex',
|
|
87
|
+
opacity: this.opacity,
|
|
88
|
+
swatches: this.swatches,
|
|
89
|
+
preset: false,
|
|
90
|
+
color: this.color,
|
|
91
|
+
});
|
|
92
|
+
|
|
93
|
+
// When the color picker opens, the input loses focus, making value changes difficult.
|
|
94
|
+
// Restore focus to the input after the picker is opened.
|
|
95
|
+
alwan.on('open', (): void => {
|
|
96
|
+
inputElement.focus();
|
|
97
|
+
});
|
|
98
|
+
|
|
99
|
+
alwan.on('color', (e): void => {
|
|
100
|
+
this.color = e.hex;
|
|
101
|
+
inputElement.value = this.color;
|
|
102
|
+
inputElement.dispatchEvent(new Event('blur'));
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// input: react on user input
|
|
106
|
+
// change: react on indirect changes, e.g. a value picker
|
|
107
|
+
['input', 'change'].forEach((eventName: string): void => {
|
|
108
|
+
new RegularEvent(eventName, (e: Event): void => {
|
|
109
|
+
const input = (e.target as HTMLInputElement);
|
|
110
|
+
this.color = input.value;
|
|
111
|
+
alwan.setColor(this.color);
|
|
112
|
+
}).bindTo(inputElement);
|
|
113
|
+
});
|
|
106
114
|
}
|
|
107
115
|
|
|
108
116
|
protected override render(): TemplateResult {
|
package/dashboard/dashboard.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "typo3-typescript-sources",
|
|
3
|
-
"version": "13.4.
|
|
3
|
+
"version": "13.4.28",
|
|
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.
|
|
31
|
+
"sourceTag": "v13.4.28",
|
|
32
32
|
"sourcePath": "Build/Sources/TypeScript"
|
|
33
33
|
}
|
|
34
34
|
}
|