x4js 1.4.4 → 1.4.7

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 (85) hide show
  1. package/lib/application.d.ts +96 -0
  2. package/lib/application.js +146 -0
  3. package/lib/base64.d.ts +31 -0
  4. package/lib/base64.js +139 -0
  5. package/lib/base_component.d.ts +64 -0
  6. package/lib/base_component.js +81 -0
  7. package/lib/button.d.ts +145 -0
  8. package/lib/button.js +241 -0
  9. package/lib/calendar.d.ts +77 -0
  10. package/lib/calendar.js +241 -0
  11. package/lib/canvas.d.ts +88 -0
  12. package/lib/canvas.js +358 -0
  13. package/lib/cardview.d.ts +83 -0
  14. package/lib/cardview.js +156 -0
  15. package/lib/checkbox.d.ts +72 -0
  16. package/lib/checkbox.js +130 -0
  17. package/lib/color.d.ts +144 -0
  18. package/lib/color.js +588 -0
  19. package/lib/colorpicker.js +86 -80
  20. package/lib/combobox.js +26 -22
  21. package/lib/component.d.ts +572 -0
  22. package/lib/component.js +1729 -0
  23. package/lib/datastore.js +29 -20
  24. package/lib/dialog.js +41 -36
  25. package/lib/dom_events.d.ts +284 -0
  26. package/lib/dom_events.js +14 -0
  27. package/lib/drag_manager.js +4 -1
  28. package/lib/drawtext.js +9 -5
  29. package/lib/fileupload.js +19 -12
  30. package/lib/form.js +29 -25
  31. package/lib/formatters.js +19 -10
  32. package/lib/gridview.js +40 -35
  33. package/lib/hosts/host.d.ts +44 -0
  34. package/lib/hosts/host.js +73 -0
  35. package/lib/i18n.d.ts +67 -0
  36. package/lib/i18n.js +175 -0
  37. package/lib/icon.d.ts +56 -0
  38. package/lib/icon.js +178 -0
  39. package/lib/image.js +7 -3
  40. package/lib/index.js +71 -55
  41. package/lib/input.d.ts +86 -0
  42. package/lib/input.js +176 -0
  43. package/lib/label.d.ts +54 -0
  44. package/lib/label.js +90 -0
  45. package/lib/layout.d.ts +77 -0
  46. package/lib/layout.js +271 -0
  47. package/lib/link.js +9 -5
  48. package/lib/listview.js +34 -27
  49. package/lib/md5.js +5 -1
  50. package/lib/menu.d.ts +122 -0
  51. package/lib/menu.js +284 -0
  52. package/lib/messagebox.js +22 -17
  53. package/lib/panel.js +13 -9
  54. package/lib/popup.d.ts +71 -0
  55. package/lib/popup.js +378 -0
  56. package/lib/property_editor.js +20 -16
  57. package/lib/radiobtn.js +13 -9
  58. package/lib/rating.js +13 -9
  59. package/lib/request.js +16 -9
  60. package/lib/router.js +5 -1
  61. package/lib/settings.d.ts +33 -0
  62. package/lib/settings.js +67 -0
  63. package/lib/sidebarview.js +12 -8
  64. package/lib/smartedit.js +16 -11
  65. package/lib/spreadsheet.js +35 -31
  66. package/lib/styles.d.ts +81 -0
  67. package/lib/styles.js +268 -0
  68. package/lib/svgcomponent.js +8 -3
  69. package/lib/tabbar.js +10 -6
  70. package/lib/tabview.js +10 -6
  71. package/lib/textarea.js +10 -6
  72. package/lib/textedit.js +39 -35
  73. package/lib/texthiliter.js +8 -4
  74. package/lib/toaster.js +8 -4
  75. package/lib/tools.d.ts +382 -0
  76. package/lib/tools.js +1142 -0
  77. package/lib/tooltips.js +14 -9
  78. package/lib/treeview.js +30 -26
  79. package/lib/x4_events.d.ts +253 -0
  80. package/lib/x4_events.js +375 -0
  81. package/package.json +1 -1
  82. package/src/application.ts +9 -4
  83. package/src/x4.less +143 -107
  84. package/tsconfig.json +1 -1
  85. package/x4.css +1541 -0
package/lib/datastore.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /**
2
3
  * ___ ___ __
3
4
  * \ \/ / / _
@@ -22,12 +23,14 @@
22
23
  *
23
24
  * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
24
25
  **/
25
- import { ajaxRequest } from './request';
26
- import { isArray, isString } from './tools';
27
- import { BasicEvent, EvChange, EventSource } from './x4_events';
28
- import { BaseComponent } from './base_component';
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.DataView = exports.EvViewChange = exports.DataStore = exports.DataProxy = exports.AutoRecord = exports.Record = exports.data = void 0;
28
+ const request_1 = require("./request");
29
+ const tools_1 = require("./tools");
30
+ const x4_events_1 = require("./x4_events");
31
+ const base_component_1 = require("./base_component");
29
32
  function EvDataChange(type, id) {
30
- return BasicEvent({ type, id });
33
+ return (0, x4_events_1.BasicEvent)({ type, id });
31
34
  }
32
35
  /**
33
36
  *
@@ -66,7 +69,7 @@ function _getMetas(obj, create = true) {
66
69
  }
67
70
  return mfld;
68
71
  }
69
- export var data;
72
+ var data;
70
73
  (function (data_1) {
71
74
  /**
72
75
  * define a record id
@@ -171,11 +174,11 @@ export var data;
171
174
  return data.field({ ...props, type: 'array', model: new ctor() });
172
175
  }
173
176
  data_1.array = array;
174
- })(data || (data = {}));
177
+ })(data = exports.data || (exports.data = {}));
175
178
  /**
176
179
  * record model
177
180
  */
178
- export class Record {
181
+ class Record {
179
182
  constructor(data, id) {
180
183
  if (data !== undefined) {
181
184
  this.unSerialize(data, id);
@@ -287,7 +290,7 @@ export class Record {
287
290
  return typeof (input) === 'number' ? input : parseInt(input);
288
291
  }
289
292
  case 'date': {
290
- return isString(input) ? new Date(input) : input;
293
+ return (0, tools_1.isString)(input) ? new Date(input) : input;
291
294
  }
292
295
  case 'array': {
293
296
  let result = [];
@@ -369,10 +372,11 @@ export class Record {
369
372
  this.setRaw(fld.name, value);
370
373
  }
371
374
  }
375
+ exports.Record = Record;
372
376
  /**
373
377
  * by default, the field id is rhe first member or the record
374
378
  */
375
- export class AutoRecord extends Record {
379
+ class AutoRecord extends Record {
376
380
  m_data;
377
381
  m_fid;
378
382
  constructor(data) {
@@ -405,7 +409,8 @@ export class AutoRecord extends Record {
405
409
  return new AutoRecord({ ...data });
406
410
  }
407
411
  }
408
- export class DataProxy extends BaseComponent {
412
+ exports.AutoRecord = AutoRecord;
413
+ class DataProxy extends base_component_1.BaseComponent {
409
414
  constructor(props) {
410
415
  super(props);
411
416
  }
@@ -434,22 +439,23 @@ export class DataProxy extends BaseComponent {
434
439
  }
435
440
  else {
436
441
  setTimeout(() => {
437
- ajaxRequest({
442
+ (0, request_1.ajaxRequest)({
438
443
  url: this.m_props.path,
439
444
  method: 'GET',
440
445
  params: this.m_props.params,
441
446
  success: (data) => {
442
- this.emit('change', EvChange(data));
447
+ this.emit('change', (0, x4_events_1.EvChange)(data));
443
448
  }
444
449
  });
445
450
  }, delay);
446
451
  }
447
452
  }
448
453
  }
454
+ exports.DataProxy = DataProxy;
449
455
  /**
450
456
  *
451
457
  */
452
- export class DataStore extends EventSource {
458
+ class DataStore extends x4_events_1.EventSource {
453
459
  m_model;
454
460
  m_fields;
455
461
  m_records;
@@ -680,7 +686,7 @@ export class DataStore extends EventSource {
680
686
  return new Uint32Array(0);
681
687
  }
682
688
  let filterValue = filter.value;
683
- if (isString(filterValue) && !filter.caseSensitive) {
689
+ if ((0, tools_1.isString)(filterValue) && !filter.caseSensitive) {
684
690
  filterValue = filterValue.toUpperCase();
685
691
  }
686
692
  function _lt(recval) {
@@ -852,15 +858,17 @@ export class DataStore extends EventSource {
852
858
  this.emit('data_change', EvDataChange('change'));
853
859
  }
854
860
  }
855
- export function EvViewChange(action) {
856
- return BasicEvent({ action });
861
+ exports.DataStore = DataStore;
862
+ function EvViewChange(action) {
863
+ return (0, x4_events_1.BasicEvent)({ action });
857
864
  }
865
+ exports.EvViewChange = EvViewChange;
858
866
  /**
859
867
  * Dataview allow different views of the DataStore.
860
868
  * You can sort the columns & filter data
861
869
  * You can have multiple views for a single DataStore
862
870
  */
863
- export class DataView extends BaseComponent {
871
+ class DataView extends base_component_1.BaseComponent {
864
872
  m_index;
865
873
  m_store;
866
874
  m_sort;
@@ -873,10 +881,10 @@ export class DataView extends BaseComponent {
873
881
  this.m_sort = null;
874
882
  this.filter(props.filter);
875
883
  if (props.order) {
876
- if (isString(props.order)) {
884
+ if ((0, tools_1.isString)(props.order)) {
877
885
  this.sort([{ field: props.order, ascending: true }]);
878
886
  }
879
- else if (isArray(props.order)) {
887
+ else if ((0, tools_1.isArray)(props.order)) {
880
888
  this.sort(props.order);
881
889
  }
882
890
  else {
@@ -984,3 +992,4 @@ export class DataView extends BaseComponent {
984
992
  });
985
993
  }
986
994
  }
995
+ exports.DataView = DataView;
package/lib/dialog.js CHANGED
@@ -1,3 +1,4 @@
1
+ "use strict";
1
2
  /**
2
3
  * ___ ___ __
3
4
  * \ \/ / / _
@@ -22,21 +23,24 @@
22
23
  *
23
24
  * You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
24
25
  **/
25
- import { Popup, EvMove } from './popup';
26
- import { Icon } from './icon';
27
- import { HLayout } from './layout';
28
- import { Label } from './label';
29
- import { Form } from './form';
30
- import { Component, EvSize, flyWrap } from './component';
31
- import { BasicEvent } from './x4_events';
32
- import { Rect, getMousePos, isFunction, isTouchDevice } from './tools';
33
- export function EvBtnClick(button) {
34
- return BasicEvent({ button });
26
+ Object.defineProperty(exports, "__esModule", { value: true });
27
+ exports.Dialog = exports.EvBtnClick = void 0;
28
+ const popup_1 = require("./popup");
29
+ const icon_1 = require("./icon");
30
+ const layout_1 = require("./layout");
31
+ const label_1 = require("./label");
32
+ const form_1 = require("./form");
33
+ const component_1 = require("./component");
34
+ const x4_events_1 = require("./x4_events");
35
+ const tools_1 = require("./tools");
36
+ function EvBtnClick(button) {
37
+ return (0, x4_events_1.BasicEvent)({ button });
35
38
  }
39
+ exports.EvBtnClick = EvBtnClick;
36
40
  /**
37
41
  * Standard dialog class
38
42
  */
39
- export class Dialog extends Popup {
43
+ class Dialog extends popup_1.Popup {
40
44
  m_icon;
41
45
  m_title;
42
46
  m_form;
@@ -66,7 +70,7 @@ export class Dialog extends Popup {
66
70
  this.m_minFormSize = { width, height };
67
71
  this.enableMask(true);
68
72
  if (props.form) {
69
- if (!isFunction(props.form)) {
73
+ if (!(0, tools_1.isFunction)(props.form)) {
70
74
  this.m_form = props.form;
71
75
  this.m_form.on('btnClick', (e) => this._handleClick(e));
72
76
  }
@@ -75,7 +79,7 @@ export class Dialog extends Popup {
75
79
  }
76
80
  }
77
81
  else {
78
- this.m_form = new Form({
82
+ this.m_form = new form_1.Form({
79
83
  content,
80
84
  buttons: props.buttons,
81
85
  disableSuggestions: props.disableSuggestions,
@@ -142,7 +146,7 @@ export class Dialog extends Popup {
142
146
  this.addClass('@resized');
143
147
  if (this.m_props.maximized) {
144
148
  this._maximize();
145
- this.emit('size', EvSize(null));
149
+ this.emit('size', (0, component_1.EvSize)(null));
146
150
  }
147
151
  else {
148
152
  this.centerOnScreen();
@@ -163,12 +167,12 @@ export class Dialog extends Popup {
163
167
  setGeometry(geom) {
164
168
  if (geom.minimized && this.m_minimizable) {
165
169
  this._minimize(false);
166
- this.m_rc_min = new Rect(geom.left, geom.top, geom.width, geom.height);
170
+ this.m_rc_min = new tools_1.Rect(geom.left, geom.top, geom.width, geom.height);
167
171
  this.displayAt(geom.left, geom.top, 'top-left');
168
172
  }
169
173
  else if (geom.maximized && this.m_maximizable) {
170
174
  this._maximize(false);
171
- this.m_rc_max = new Rect(geom.left, geom.top, geom.width, geom.height);
175
+ this.m_rc_max = new tools_1.Rect(geom.left, geom.top, geom.width, geom.height);
172
176
  }
173
177
  else {
174
178
  this.setSize(geom.width, geom.height);
@@ -216,7 +220,7 @@ export class Dialog extends Popup {
216
220
  */
217
221
  setSize(width, height) {
218
222
  this.setStyle({ width, height });
219
- this.emit('size', EvSize({ width, height }));
223
+ this.emit('size', (0, component_1.EvSize)({ width, height }));
220
224
  }
221
225
  /** @ignore */
222
226
  render() {
@@ -228,18 +232,18 @@ export class Dialog extends Popup {
228
232
  let hasTitle = this.m_icon !== undefined || this.m_closable || this.m_title !== undefined || this.m_movable;
229
233
  this.m_el_title = null;
230
234
  if (hasTitle) {
231
- this.m_el_title = new HLayout({
235
+ this.m_el_title = new layout_1.HLayout({
232
236
  cls: 'title',
233
237
  content: [
234
- this.m_icon ? new Icon({ icon: this.m_icon }) : null,
235
- this.m_ui_title = new Label({ flex: 1, text: this.m_title }),
236
- this.m_minimizable ? new Icon({ cls: 'min-btn', icon: 'cls(far fa-window-minimize)', dom_events: { click: () => this._toggleMin() } }) : null,
237
- this.m_maximizable ? new Icon({ cls: 'max-btn', icon: 'cls(far fa-window-maximize)', dom_events: { click: () => this._toggleMax() } }) : null,
238
- this.m_closable ? new Icon({ icon: 'cls(far fa-rectangle-times)', dom_events: { click: () => this.close() } }) : null,
238
+ this.m_icon ? new icon_1.Icon({ icon: this.m_icon }) : null,
239
+ this.m_ui_title = new label_1.Label({ flex: 1, text: this.m_title }),
240
+ this.m_minimizable ? new icon_1.Icon({ cls: 'min-btn', icon: 'cls(far fa-window-minimize)', dom_events: { click: () => this._toggleMin() } }) : null,
241
+ this.m_maximizable ? new icon_1.Icon({ cls: 'max-btn', icon: 'cls(far fa-window-maximize)', dom_events: { click: () => this._toggleMax() } }) : null,
242
+ this.m_closable ? new icon_1.Icon({ icon: 'cls(far fa-rectangle-times)', dom_events: { click: () => this.close() } }) : null,
239
243
  ]
240
244
  });
241
245
  if (this.m_movable) {
242
- if (isTouchDevice()) {
246
+ if ((0, tools_1.isTouchDevice)()) {
243
247
  this.m_el_title.setDomEvent('touchstart', (e) => this._mouseDown(e));
244
248
  }
245
249
  else {
@@ -296,11 +300,11 @@ export class Dialog extends Popup {
296
300
  height: this.m_rc_max.height,
297
301
  });
298
302
  this.m_maximized = false;
299
- this.emit('size', EvSize(null, 'restore'));
303
+ this.emit('size', (0, component_1.EvSize)(null, 'restore'));
300
304
  }
301
305
  else {
302
306
  this._maximize();
303
- this.emit('size', EvSize(null, 'maximize'));
307
+ this.emit('size', (0, component_1.EvSize)(null, 'maximize'));
304
308
  }
305
309
  }
306
310
  /**
@@ -319,19 +323,19 @@ export class Dialog extends Popup {
319
323
  height: this.m_rc_min.height,
320
324
  });
321
325
  this.m_minimized = false;
322
- this.emit('size', EvSize(null, 'restore'));
326
+ this.emit('size', (0, component_1.EvSize)(null, 'restore'));
323
327
  }
324
328
  else {
325
329
  this._minimize();
326
- this.emit('size', EvSize(null, 'minimize'));
330
+ this.emit('size', (0, component_1.EvSize)(null, 'minimize'));
327
331
  }
328
332
  }
329
333
  /**
330
334
  *
331
335
  */
332
336
  _mouseDown(event) {
333
- let { x, y } = getMousePos(event, true);
334
- let wrc = flyWrap(document.body).getBoundingRect();
337
+ let { x, y } = (0, tools_1.getMousePos)(event, true);
338
+ let wrc = (0, component_1.flyWrap)(document.body).getBoundingRect();
335
339
  let rc = this.getBoundingRect(true);
336
340
  let trc = this.m_el_title.getBoundingRect();
337
341
  let dx = x - rc.left, dy = y - rc.top;
@@ -375,7 +379,7 @@ export class Dialog extends Popup {
375
379
  top: y
376
380
  });
377
381
  };
378
- Component.setCapture(this, (ev) => {
382
+ component_1.Component.setCapture(this, (ev) => {
379
383
  if (ev.type == 'mousemove') {
380
384
  let mev = ev;
381
385
  __move(mev.clientX, mev.clientY);
@@ -387,8 +391,8 @@ export class Dialog extends Popup {
387
391
  }
388
392
  }
389
393
  else if (ev.type == 'mouseup' || ev.type == 'touchend') {
390
- Component.releaseCapture();
391
- this.emit('move', EvMove(null));
394
+ component_1.Component.releaseCapture();
395
+ this.emit('move', (0, popup_1.EvMove)(null));
392
396
  }
393
397
  else if (ev.type == 'mousedown' || ev.type == 'touchstart') {
394
398
  }
@@ -402,7 +406,7 @@ export class Dialog extends Popup {
402
406
  return;
403
407
  }
404
408
  this._maximize();
405
- this.emit('size', EvSize(null));
409
+ this.emit('size', (0, component_1.EvSize)(null));
406
410
  }
407
411
  /**
408
412
  *
@@ -428,7 +432,7 @@ export class Dialog extends Popup {
428
432
  return;
429
433
  }
430
434
  this._minimize();
431
- this.emit('size', EvSize(null));
435
+ this.emit('size', (0, component_1.EvSize)(null));
432
436
  }
433
437
  /**
434
438
  *
@@ -457,7 +461,7 @@ export class Dialog extends Popup {
457
461
  }
458
462
  itemWithName(name) {
459
463
  let result = this.dom.querySelector(`[name="${name}"]`);
460
- return result ? Component.getElement(result) : null;
464
+ return result ? component_1.Component.getElement(result) : null;
461
465
  }
462
466
  getValues() {
463
467
  return this.m_form.getValues();
@@ -466,3 +470,4 @@ export class Dialog extends Popup {
466
470
  return this.m_form.validate();
467
471
  }
468
472
  }
473
+ exports.Dialog = Dialog;
@@ -0,0 +1,284 @@
1
+ /**
2
+ * ___ ___ __
3
+ * \ \/ / / _
4
+ * \ / /_| |_
5
+ * / \____ _|
6
+ * /__/\__\ |_|
7
+ *
8
+ * @file dom_events.ts
9
+ * @author Etienne Cochard
10
+ * @copyright (c) 2022 R-libre ingenierie, all rights reserved.
11
+ *
12
+ **/
13
+ export interface X4ElementEventMap extends HTMLElementEventMap {
14
+ "sizechange": Event;
15
+ "create": Event;
16
+ }
17
+ export interface IDOMEvents {
18
+ /**
19
+ * Fires when the user aborts the download.
20
+ * @param ev The event.
21
+ */
22
+ abort?: (ev: UIEvent) => any;
23
+ animationcancel?: (ev: AnimationEvent) => any;
24
+ animationend?: (ev: AnimationEvent) => any;
25
+ animationiteration?: (ev: AnimationEvent) => any;
26
+ animationstart?: (ev: AnimationEvent) => any;
27
+ auxclick?: (ev: MouseEvent) => any;
28
+ /**
29
+ * Fires when the object loses the input focus.
30
+ * @param ev The focus event.
31
+ */
32
+ blur?: (ev: FocusEvent) => any;
33
+ cancel?: (ev: Event) => any;
34
+ /**
35
+ * Occurs when playback is possible, but would require further buffering.
36
+ * @param ev The event.
37
+ */
38
+ canplay?: (ev: Event) => any;
39
+ canplaythrough?: (ev: Event) => any;
40
+ /**
41
+ * Fires when the contents of the object or selection have changed.
42
+ * @param ev The event.
43
+ */
44
+ change?: (ev: Event) => any;
45
+ /**
46
+ * Fires when the user clicks the left mouse button on the object
47
+ * @param ev The mouse event.
48
+ */
49
+ click?: (ev: MouseEvent) => any;
50
+ close?: (ev: Event) => any;
51
+ /**
52
+ * Fires when the user clicks the right mouse button in the client area, opening the context menu.
53
+ * @param ev The mouse event.
54
+ */
55
+ contextmenu?: (ev: MouseEvent) => any;
56
+ cuechange?: (ev: Event) => any;
57
+ /**
58
+ * Fires when the user double-clicks the object.
59
+ * @param ev The mouse event.
60
+ */
61
+ dblclick?: (ev: MouseEvent) => any;
62
+ /**
63
+ * Fires on the source object continuously during a drag operation.
64
+ * @param ev The event.
65
+ */
66
+ drag?: (ev: DragEvent) => any;
67
+ /**
68
+ * Fires on the source object when the user releases the mouse at the close of a drag operation.
69
+ * @param ev The event.
70
+ */
71
+ dragend?: (ev: DragEvent) => any;
72
+ /**
73
+ * Fires on the target element when the user drags the object to a valid drop target.
74
+ * @param ev The drag event.
75
+ */
76
+ dragenter?: (ev: DragEvent) => any;
77
+ dragexit?: (ev: Event) => any;
78
+ /**
79
+ * Fires on the target object when the user moves the mouse out of a valid drop target during a drag operation.
80
+ * @param ev The drag event.
81
+ */
82
+ dragleave?: (ev: DragEvent) => any;
83
+ /**
84
+ * Fires on the target element continuously while the user drags the object over a valid drop target.
85
+ * @param ev The event.
86
+ */
87
+ dragover?: (ev: DragEvent) => any;
88
+ /**
89
+ * Fires on the source object when the user starts to drag a text selection or selected object.
90
+ * @param ev The event.
91
+ */
92
+ dragstart?: (ev: DragEvent) => any;
93
+ drop?: (ev: DragEvent) => any;
94
+ /**
95
+ * Occurs when the duration attribute is updated.
96
+ * @param ev The event.
97
+ */
98
+ durationchange?: (ev: Event) => any;
99
+ /**
100
+ * Occurs when the media element is reset to its initial state.
101
+ * @param ev The event.
102
+ */
103
+ emptied?: (ev: Event) => any;
104
+ /**
105
+ * Occurs when the end of playback is reached.
106
+ * @param ev The event
107
+ */
108
+ ended?: (ev: Event) => any;
109
+ /**
110
+ * Fires when an error occurs during object loading.
111
+ * @param ev The event.
112
+ */
113
+ error?: OnErrorEventHandler;
114
+ /**
115
+ * Fires when the object receives focus.
116
+ * @param ev The event.
117
+ */
118
+ focus?: (ev: FocusEvent) => any;
119
+ gotpointercapture?: (ev: PointerEvent) => any;
120
+ input?: (ev: Event) => any;
121
+ invalid?: (ev: Event) => any;
122
+ /**
123
+ * Fires when the user presses a key.
124
+ * @param ev The keyboard event
125
+ */
126
+ keydown?: (ev: KeyboardEvent) => any;
127
+ /**
128
+ * Fires when the user presses an alphanumeric key.
129
+ * @param ev The event.
130
+ */
131
+ keypress?: (ev: KeyboardEvent) => any;
132
+ /**
133
+ * Fires when the user releases a key.
134
+ * @param ev The keyboard event
135
+ */
136
+ keyup?: (ev: KeyboardEvent) => any;
137
+ /**
138
+ * Fires immediately after the browser loads the object.
139
+ * @param ev The event.
140
+ */
141
+ load?: (ev: Event) => any;
142
+ /**
143
+ * Occurs when media data is loaded at the current playback position.
144
+ * @param ev The event.
145
+ */
146
+ loadeddata?: (ev: Event) => any;
147
+ /**
148
+ * Occurs when the duration and dimensions of the media have been determined.
149
+ * @param ev The event.
150
+ */
151
+ loadedmetadata?: (ev: Event) => any;
152
+ /**
153
+ * Occurs when Internet Explorer begins looking for media data.
154
+ * @param ev The event.
155
+ */
156
+ loadstart?: (ev: Event) => any;
157
+ lostpointercapture?: (ev: PointerEvent) => any;
158
+ /**
159
+ * Fires when the user clicks the object with either mouse button.
160
+ * @param ev The mouse event.
161
+ */
162
+ mousedown?: (ev: MouseEvent) => any;
163
+ mouseenter?: (ev: MouseEvent) => any;
164
+ mouseleave?: (ev: MouseEvent) => any;
165
+ /**
166
+ * Fires when the user moves the mouse over the object.
167
+ * @param ev The mouse event.
168
+ */
169
+ mousemove?: (ev: MouseEvent) => any;
170
+ /**
171
+ * Fires when the user moves the mouse pointer outside the boundaries of the object.
172
+ * @param ev The mouse event.
173
+ */
174
+ mouseout?: (ev: MouseEvent) => any;
175
+ /**
176
+ * Fires when the user moves the mouse pointer into the object.
177
+ * @param ev The mouse event.
178
+ */
179
+ mouseover?: (ev: MouseEvent) => any;
180
+ /**
181
+ * Fires when the user releases a mouse button while the mouse is over the object.
182
+ * @param ev The mouse event.
183
+ */
184
+ mouseup?: (ev: MouseEvent) => any;
185
+ /**
186
+ * Occurs when playback is paused.
187
+ * @param ev The event.
188
+ */
189
+ pause?: (ev: Event) => any;
190
+ /**
191
+ * Occurs when the play method is requested.
192
+ * @param ev The event.
193
+ */
194
+ play?: (ev: Event) => any;
195
+ /**
196
+ * Occurs when the audio or video has started playing.
197
+ * @param ev The event.
198
+ */
199
+ playing?: (ev: Event) => any;
200
+ pointercancel?: (ev: PointerEvent) => any;
201
+ pointerdown?: (ev: PointerEvent) => any;
202
+ pointerenter?: (ev: PointerEvent) => any;
203
+ pointerleave?: (ev: PointerEvent) => any;
204
+ pointermove?: (ev: PointerEvent) => any;
205
+ pointerout?: (ev: PointerEvent) => any;
206
+ pointerover?: (ev: PointerEvent) => any;
207
+ pointerup?: (ev: PointerEvent) => any;
208
+ /**
209
+ * Occurs to indicate progress while downloading media data.
210
+ * @param ev The event.
211
+ */
212
+ progress?: (ev: ProgressEvent) => any;
213
+ /**
214
+ * Occurs when the playback rate is increased or decreased.
215
+ * @param ev The event.
216
+ */
217
+ ratechange?: (ev: Event) => any;
218
+ /**
219
+ * Fires when the user resets a form.
220
+ * @param ev The event.
221
+ */
222
+ reset?: (ev: Event) => any;
223
+ /**
224
+ * Fires when the user repositions the scroll box in the scroll bar on the object.
225
+ * @param ev The event.
226
+ */
227
+ scroll?: (ev: Event) => any;
228
+ securitypolicyviolation?: (ev: SecurityPolicyViolationEvent) => any;
229
+ /**
230
+ * Occurs when the seek operation ends.
231
+ * @param ev The event.
232
+ */
233
+ seeked?: (ev: Event) => any;
234
+ /**
235
+ * Occurs when the current playback position is moved.
236
+ * @param ev The event.
237
+ */
238
+ seeking?: (ev: Event) => any;
239
+ /**
240
+ * Fires when the current selection changes.
241
+ * @param ev The event.
242
+ */
243
+ select?: (ev: Event) => any;
244
+ selectionchange?: (ev: Event) => any;
245
+ selectstart?: (ev: Event) => any;
246
+ /**
247
+ * Occurs when the download has stopped.
248
+ * @param ev The event.
249
+ */
250
+ stalled?: (ev: Event) => any;
251
+ submit?: (ev: Event) => any;
252
+ /**
253
+ * Occurs if the load operation has been intentionally halted.
254
+ * @param ev The event.
255
+ */
256
+ suspend?: (ev: Event) => any;
257
+ /**
258
+ * Occurs to indicate the current playback position.
259
+ * @param ev The event.
260
+ */
261
+ timeupdate?: (ev: Event) => any;
262
+ toggle?: (ev: Event) => any;
263
+ ontouchcancel?: (ev: TouchEvent) => any;
264
+ ontouchend?: (ev: TouchEvent) => any;
265
+ ontouchmove?: (ev: TouchEvent) => any;
266
+ ontouchstart?: (ev: TouchEvent) => any;
267
+ transitioncancel?: (ev: TransitionEvent) => any;
268
+ transitionend?: (ev: TransitionEvent) => any;
269
+ transitionrun?: (ev: TransitionEvent) => any;
270
+ transitionstart?: (ev: TransitionEvent) => any;
271
+ /**
272
+ * Occurs when the volume is changed, or playback is muted or unmuted.
273
+ * @param ev The event.
274
+ */
275
+ volumechange?: (ev: Event) => any;
276
+ /**
277
+ * Occurs when playback stops because the next frame of a video resource is not available.
278
+ * @param ev The event.
279
+ */
280
+ waiting?: (ev: Event) => any;
281
+ wheel?: (ev: WheelEvent) => any;
282
+ sizechange?: (ev: Event) => void;
283
+ create?: (ev: Event) => void;
284
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ /**
3
+ * ___ ___ __
4
+ * \ \/ / / _
5
+ * \ / /_| |_
6
+ * / \____ _|
7
+ * /__/\__\ |_|
8
+ *
9
+ * @file dom_events.ts
10
+ * @author Etienne Cochard
11
+ * @copyright (c) 2022 R-libre ingenierie, all rights reserved.
12
+ *
13
+ **/
14
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,3 +1,6 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.dragManager = void 0;
1
4
  const x_drag_cb = Symbol('x-drag-cb');
2
5
  /**
3
6
  *
@@ -115,4 +118,4 @@ class DragManager {
115
118
  }
116
119
  }
117
120
  }
118
- export const dragManager = new DragManager();
121
+ exports.dragManager = new DragManager();