@kupola/kupola 1.4.2 → 1.4.3

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 (63) hide show
  1. package/README.md +3 -3
  2. package/css/kupola.css +3 -2
  3. package/css/table.css +74 -0
  4. package/dist/css/kupola.css +12 -1
  5. package/dist/css/kupola.min.css +1 -1
  6. package/dist/kupola.cjs.js +1800 -3609
  7. package/dist/kupola.cjs.js.map +1 -1
  8. package/dist/kupola.css +100 -3
  9. package/dist/kupola.esm.js +1791 -3610
  10. package/dist/kupola.esm.js.map +1 -1
  11. package/dist/kupola.min.css +1 -1
  12. package/dist/kupola.min.js +1 -1
  13. package/dist/kupola.min.js.map +1 -1
  14. package/dist/kupola.umd.js +1800 -3609
  15. package/dist/kupola.umd.js.map +1 -1
  16. package/dist/types/kupola.d.ts +41 -25
  17. package/js/calendar.js +3 -10
  18. package/js/carousel.js +3 -10
  19. package/js/collapse.js +3 -10
  20. package/js/color-picker.js +5 -16
  21. package/js/component.js +4 -18
  22. package/js/countdown.js +3 -10
  23. package/js/data-bind.js +56 -36
  24. package/js/datepicker.js +16 -24
  25. package/js/depends.js +27 -16
  26. package/js/dialog.js +1 -5
  27. package/js/drawer.js +3 -11
  28. package/js/dropdown.js +11 -18
  29. package/js/dynamic-tags.js +3 -10
  30. package/js/fileupload.js +10 -12
  31. package/js/form.js +26 -20
  32. package/js/global-events.js +1 -14
  33. package/js/heatmap.js +3 -12
  34. package/js/i18n.js +1 -14
  35. package/js/icons.js +2 -2
  36. package/js/image-preview.js +1 -7
  37. package/js/initializer.js +0 -43
  38. package/js/kupola-core.js +1 -13
  39. package/js/kupola-lifecycle.js +1 -9
  40. package/js/message.js +1 -6
  41. package/js/modal.js +22 -20
  42. package/js/notification.js +1 -6
  43. package/js/numberinput.js +3 -10
  44. package/js/pagination.js +0 -5
  45. package/js/registry.js +0 -4
  46. package/js/select.js +5 -16
  47. package/js/slide-captcha.js +8 -21
  48. package/js/slider.js +3 -10
  49. package/js/statcard.js +3 -11
  50. package/js/table.js +240 -262
  51. package/js/tag.js +3 -10
  52. package/js/theme.js +1 -12
  53. package/js/timepicker.js +6 -19
  54. package/js/tooltip.js +3 -10
  55. package/js/utils.js +281 -1439
  56. package/js/validation.js +2 -7
  57. package/js/virtual-list.js +13 -38
  58. package/js/web-components.js +0 -9
  59. package/package.json +10 -5
  60. package/scripts/build-css.cjs +3 -2
  61. package/types/kupola.d.ts +41 -25
  62. package/version.json +10 -0
  63. /package/css/{colors_and_type.css → colors-and-type.css} +0 -0
package/js/timepicker.js CHANGED
@@ -1,3 +1,6 @@
1
+ import { globalEvents } from './global-events.js';
2
+ import { kupolaInitializer } from './initializer.js';
3
+
1
4
  class Timepicker {
2
5
  constructor(element, options = {}) {
3
6
  this.element = element;
@@ -55,15 +58,8 @@ class Timepicker {
55
58
 
56
59
  this.inputWrap.addEventListener('click', this._inputWrapClickHandler);
57
60
 
58
- if (window.globalEvents) {
59
- this._documentClickListener = window.globalEvents.on(document, 'click', (e) => this.hideTimepicker(e), { scope: this.scope });
60
- this._resizeListener = window.globalEvents.on(window, 'resize', () => this.resizeHandler(), { scope: this.scope });
61
- } else {
62
- document.addEventListener('click', (e) => this.hideTimepicker(e));
63
- window.addEventListener('resize', () => this.resizeHandler());
64
- this._documentClickHandler = (e) => this.hideTimepicker(e);
65
- this._resizeHandler = () => this.resizeHandler();
66
- }
61
+ this._documentClickListener = globalEvents.on(document, 'click', (e) => this.hideTimepicker(e), { scope: this.scope });
62
+ this._resizeListener = globalEvents.on(window, 'resize', () => this.resizeHandler(), { scope: this.scope });
67
63
 
68
64
  this._keydownHandler = (e) => {
69
65
  if (e.key === 'Escape' && this.panelEl && this.panelEl.style.display === 'block') {
@@ -495,13 +491,4 @@ function cleanupTimepicker(element) {
495
491
 
496
492
  export { Timepicker, initTimepicker, initTimepickers, cleanupTimepicker };
497
493
 
498
- if (typeof window !== 'undefined') {
499
- window.Timepicker = Timepicker;
500
- window.initTimepicker = initTimepicker;
501
- window.initTimepickers = initTimepickers;
502
- window.cleanupTimepicker = cleanupTimepicker;
503
-
504
- if (window.kupolaInitializer) {
505
- window.kupolaInitializer.register('timepicker', initTimepicker, cleanupTimepicker);
506
- }
507
- }
494
+ kupolaInitializer.register('timepicker', initTimepicker, cleanupTimepicker);
package/js/tooltip.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { kupolaInitializer } from './initializer.js';
2
+
1
3
  class Tooltip {
2
4
  constructor(element, options = {}) {
3
5
  this.element = element;
@@ -341,13 +343,4 @@ function cleanupTooltip(element) {
341
343
 
342
344
  export { Tooltip, initTooltip, initTooltips, cleanupTooltip };
343
345
 
344
- if (typeof window !== 'undefined') {
345
- window.Tooltip = Tooltip;
346
- window.initTooltip = initTooltip;
347
- window.initTooltips = initTooltips;
348
- window.cleanupTooltip = cleanupTooltip;
349
-
350
- if (window.kupolaInitializer) {
351
- window.kupolaInitializer.register('tooltip', initTooltip, cleanupTooltip);
352
- }
353
- }
346
+ kupolaInitializer.register('tooltip', initTooltip, cleanupTooltip);