x4js 1.6.0 → 1.6.1
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/lib/cjs/x4js.js +5 -5
- package/lib/cjs/x4js.js.map +3 -3
- package/lib/esm/x4js.mjs +16 -10
- package/lib/esm/x4js.mjs.map +2 -2
- package/lib/src/application.ts +2 -2
- package/lib/src/calendar.ts +1 -1
- package/lib/src/canvas.ts +8 -3
- package/lib/src/cardview.ts +8 -7
- package/lib/src/color.ts +3 -3
- package/lib/src/colorpicker.ts +17 -7
- package/lib/src/combobox.ts +6 -6
- package/lib/src/component.ts +44 -40
- package/lib/src/dialog.ts +1 -1
- package/lib/src/drag_manager.ts +3 -3
- package/lib/src/fileupload.ts +3 -3
- package/lib/src/form.ts +1 -1
- package/lib/src/svgcomponent.ts +12 -7
- package/lib/src/version.ts +1 -1
- package/lib/src/x4events.ts +9 -9
- package/package.json +1 -1
- package/changelog.txt +0 -23
package/lib/src/x4events.ts
CHANGED
|
@@ -85,7 +85,7 @@ export function BasicEvent<T extends BasicEvent = BasicEvent>(params: any): T {
|
|
|
85
85
|
export interface EvClick extends BasicEvent {
|
|
86
86
|
}
|
|
87
87
|
|
|
88
|
-
export function EvClick( context = null ) {
|
|
88
|
+
export function EvClick( context: any = null ) {
|
|
89
89
|
return BasicEvent<EvClick>({ context });
|
|
90
90
|
}
|
|
91
91
|
|
|
@@ -99,7 +99,7 @@ export interface EvChange extends BasicEvent {
|
|
|
99
99
|
readonly value: any;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
|
-
export function EvChange(value: unknown, context = null ) {
|
|
102
|
+
export function EvChange(value: unknown, context: any = null ) {
|
|
103
103
|
return BasicEvent<EvChange>({ value, context });
|
|
104
104
|
}
|
|
105
105
|
|
|
@@ -115,7 +115,7 @@ export interface EvSelectionChange extends BasicEvent {
|
|
|
115
115
|
readonly selection: X4Selection;
|
|
116
116
|
}
|
|
117
117
|
|
|
118
|
-
export function EvSelectionChange( selection: X4Selection, context = null ) {
|
|
118
|
+
export function EvSelectionChange( selection: X4Selection, context: any = null ) {
|
|
119
119
|
return BasicEvent<EvSelectionChange>( { selection, context } );
|
|
120
120
|
}
|
|
121
121
|
|
|
@@ -127,7 +127,7 @@ export interface EvContextMenu extends BasicEvent {
|
|
|
127
127
|
uievent: UIEvent; // UI event that fire this event
|
|
128
128
|
}
|
|
129
129
|
|
|
130
|
-
export function EvContextMenu( uievent: UIEvent, context = null ) {
|
|
130
|
+
export function EvContextMenu( uievent: UIEvent, context: any = null ) {
|
|
131
131
|
return BasicEvent<EvContextMenu>( { uievent, context } );
|
|
132
132
|
}
|
|
133
133
|
|
|
@@ -141,7 +141,7 @@ export interface EvTimer extends BasicEvent {
|
|
|
141
141
|
time: number;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
export function EvTimer( timer: string, time = 0, context = null ) {
|
|
144
|
+
export function EvTimer( timer: string, time = 0, context: any = null ) {
|
|
145
145
|
return BasicEvent<EvTimer>( { timer, time, context });
|
|
146
146
|
}
|
|
147
147
|
|
|
@@ -411,7 +411,7 @@ export class EventSource<Q extends EventMap, T extends EventTypes = MapEvents<Q>
|
|
|
411
411
|
|
|
412
412
|
_once(eventName: string, callback: EventCallback) {
|
|
413
413
|
|
|
414
|
-
const newCallback = ( ev ) => {
|
|
414
|
+
const newCallback = ( ev: BasicEvent ) => {
|
|
415
415
|
this._off(eventName, newCallback);
|
|
416
416
|
callback( ev );
|
|
417
417
|
}
|
|
@@ -568,17 +568,17 @@ export class EventSource<Q extends EventMap, T extends EventTypes = MapEvents<Q>
|
|
|
568
568
|
* @param eventName - event name
|
|
569
569
|
*/
|
|
570
570
|
|
|
571
|
-
removeAllListeners(eventName: string
|
|
571
|
+
removeAllListeners(eventName: string ): void {
|
|
572
572
|
if (!eventName) {
|
|
573
573
|
this.m_eventRegistry = this.m_defaultHandlers = undefined;
|
|
574
574
|
}
|
|
575
575
|
else {
|
|
576
576
|
if (this.m_eventRegistry) {
|
|
577
|
-
this.m_eventRegistry
|
|
577
|
+
this.m_eventRegistry.delete( eventName );
|
|
578
578
|
}
|
|
579
579
|
|
|
580
580
|
if (this.m_defaultHandlers) {
|
|
581
|
-
this.m_defaultHandlers
|
|
581
|
+
this.m_defaultHandlers.delete( eventName );
|
|
582
582
|
}
|
|
583
583
|
}
|
|
584
584
|
}
|
package/package.json
CHANGED
package/changelog.txt
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
2023/10/20 : 1.6.0 ---------------------------------------------------------
|
|
2
|
-
restructuration
|
|
3
|
-
|
|
4
|
-
2023/05/xx : 1.5.38 --------------------------------------------------------
|
|
5
|
-
changelog working again
|
|
6
|
-
|
|
7
|
-
2022/12/xx : 1.5.7 --------------------------------------------------------
|
|
8
|
-
package.json - removed erroneous dependency to typescript
|
|
9
|
-
calendar.ts - show now has a parameter named 'at'
|
|
10
|
-
|
|
11
|
-
2022/12/08 : 1.5.6 --------------------------------------------------------
|
|
12
|
-
combobox.ts - allow editable
|
|
13
|
-
items can be a function
|
|
14
|
-
populate removed
|
|
15
|
-
|
|
16
|
-
listview.ts - focus bug on popuplistview
|
|
17
|
-
label.ts - bug: display dangerous html elements when multiline = true
|
|
18
|
-
|
|
19
|
-
2022/12/05 : 1.5.1 --------------------------------------------------------
|
|
20
|
-
icon.ts - now accepts direct <svg>..</svg> in argument (var or other)
|
|
21
|
-
|
|
22
|
-
2022/11/24 : 1.5.0 --------------------------------------------------------
|
|
23
|
-
tools.js - crc32 optimization
|