@sme.up/ketchup 4.2.0-SNAPSHOT → 4.3.0-SNAPSHOT

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 (104) hide show
  1. package/dist/cjs/{cell-utils-1d44a3f0.js → cell-utils-dc0884a3.js} +2 -2
  2. package/dist/cjs/{f-button-a5788453.js → f-button-2ba74fb5.js} +1 -1
  3. package/dist/cjs/{f-cell-eba6f39e.js → f-cell-fe60a08d.js} +31 -27
  4. package/dist/cjs/{f-chip-ce69b7d2.js → f-chip-90d95d22.js} +2 -2
  5. package/dist/cjs/{f-image-e03842eb.js → f-image-d3bd4e08.js} +1 -1
  6. package/dist/cjs/ketchup.cjs.js +1 -1
  7. package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
  8. package/dist/cjs/kup-autocomplete_28.cjs.entry.js +1024 -633
  9. package/dist/cjs/kup-calendar.cjs.entry.js +6 -6
  10. package/dist/cjs/kup-cell.cjs.entry.js +6 -6
  11. package/dist/cjs/kup-dash-list.cjs.entry.js +3 -3
  12. package/dist/cjs/kup-dash_2.cjs.entry.js +2 -2
  13. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  14. package/dist/cjs/kup-field.cjs.entry.js +1 -1
  15. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  16. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  17. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  18. package/dist/cjs/{kup-manager-75f1a2cd.js → kup-manager-1a2688ca.js} +20 -1
  19. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  20. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
  23. package/dist/cjs/loader.cjs.js +1 -1
  24. package/dist/cjs/{utils-b3ec89fe.js → utils-0cc466b9.js} +1 -59
  25. package/dist/collection/components/kup-card/builtin/kup-card-builtin.js +20 -0
  26. package/dist/collection/components/kup-card/builtin/kup-card-calendar.js +458 -0
  27. package/dist/collection/components/kup-card/builtin/kup-card-clock.js +321 -0
  28. package/dist/collection/components/kup-card/free/kup-card-free.js +13 -0
  29. package/dist/collection/components/kup-card/kup-card-declarations.js +19 -0
  30. package/dist/collection/components/kup-card/kup-card.css +502 -3
  31. package/dist/collection/components/kup-card/kup-card.js +18 -9
  32. package/dist/collection/components/kup-data-table/kup-data-table.css +0 -38
  33. package/dist/collection/components/kup-data-table/kup-data-table.js +21 -10
  34. package/dist/collection/components/kup-date-picker/kup-date-picker.css +0 -82
  35. package/dist/collection/components/kup-date-picker/kup-date-picker.js +35 -309
  36. package/dist/collection/components/kup-text-field/kup-text-field.css +1 -0
  37. package/dist/collection/components/kup-time-picker/kup-time-picker.css +1 -0
  38. package/dist/collection/components/kup-time-picker/kup-time-picker.js +51 -241
  39. package/dist/collection/f-components/f-cell/f-cell.js +26 -22
  40. package/dist/collection/utils/kup-search/kup-search.js +0 -1
  41. package/dist/esm/{cell-utils-9a2914fc.js → cell-utils-8f512ea9.js} +2 -2
  42. package/dist/esm/{f-button-55a9ed88.js → f-button-30dbcaa9.js} +1 -1
  43. package/dist/esm/{f-cell-ac520cb2.js → f-cell-95c186c6.js} +31 -27
  44. package/dist/esm/{f-chip-babf1740.js → f-chip-c0e9c0ff.js} +2 -2
  45. package/dist/esm/{f-image-70ca9dfe.js → f-image-3bc8b24f.js} +1 -1
  46. package/dist/esm/ketchup.js +1 -1
  47. package/dist/esm/kup-accordion.entry.js +3 -3
  48. package/dist/esm/kup-autocomplete_28.entry.js +1053 -662
  49. package/dist/esm/kup-calendar.entry.js +6 -6
  50. package/dist/esm/kup-cell.entry.js +6 -6
  51. package/dist/esm/kup-dash-list.entry.js +3 -3
  52. package/dist/esm/kup-dash_2.entry.js +2 -2
  53. package/dist/esm/kup-drawer.entry.js +2 -2
  54. package/dist/esm/kup-field.entry.js +1 -1
  55. package/dist/esm/kup-iframe.entry.js +2 -2
  56. package/dist/esm/kup-lazy.entry.js +2 -2
  57. package/dist/esm/kup-magic-box.entry.js +3 -3
  58. package/dist/esm/{kup-manager-bba32828.js → kup-manager-7fc234da.js} +21 -2
  59. package/dist/esm/kup-nav-bar.entry.js +2 -2
  60. package/dist/esm/kup-probe.entry.js +1 -1
  61. package/dist/esm/kup-qlik.entry.js +1 -1
  62. package/dist/esm/kup-snackbar.entry.js +4 -4
  63. package/dist/esm/loader.js +1 -1
  64. package/dist/esm/{utils-cfcbe33f.js → utils-6c73709d.js} +2 -58
  65. package/dist/ketchup/ketchup.esm.js +1 -1
  66. package/dist/ketchup/{p-1ce9a037.js → p-15321eae.js} +1 -1
  67. package/dist/ketchup/{p-daf03877.entry.js → p-1baf1205.entry.js} +1 -1
  68. package/dist/ketchup/p-1c6178e4.entry.js +1 -0
  69. package/dist/ketchup/{p-52038ccb.js → p-44375e49.js} +1 -1
  70. package/dist/ketchup/{p-d58dbf0e.js → p-5a5f2a53.js} +1 -1
  71. package/dist/ketchup/{p-4748be4b.js → p-61faaa38.js} +2 -2
  72. package/dist/ketchup/{p-69a705ae.entry.js → p-62816d0b.entry.js} +1 -1
  73. package/dist/ketchup/{p-ff7d590e.entry.js → p-65adc15b.entry.js} +1 -1
  74. package/dist/ketchup/p-7e23ea7c.entry.js +1 -0
  75. package/dist/ketchup/{p-5faf7715.entry.js → p-a378ba56.entry.js} +1 -1
  76. package/dist/ketchup/{p-74259992.entry.js → p-a878016f.entry.js} +1 -1
  77. package/dist/ketchup/{p-d6ce1ac6.entry.js → p-a96e6e32.entry.js} +1 -1
  78. package/dist/ketchup/{p-6cc8264d.entry.js → p-ad32821e.entry.js} +1 -1
  79. package/dist/ketchup/{p-03ae1be9.entry.js → p-af4a6191.entry.js} +1 -1
  80. package/dist/ketchup/{p-a7687c0e.entry.js → p-c18c7bb0.entry.js} +5 -5
  81. package/dist/ketchup/{p-62208488.entry.js → p-ca0ca27f.entry.js} +1 -1
  82. package/dist/ketchup/{p-e90934b5.entry.js → p-ccda584a.entry.js} +1 -1
  83. package/dist/ketchup/p-d4aa4922.js +1 -0
  84. package/dist/ketchup/{p-40df35de.entry.js → p-dbb6998b.entry.js} +1 -1
  85. package/dist/ketchup/{p-06c209a5.js → p-de83f2f6.js} +1 -1
  86. package/dist/ketchup/p-ec3a3db9.js +1 -0
  87. package/dist/ketchup/p-ecccb3a4.entry.js +45 -0
  88. package/dist/types/components/kup-card/builtin/kup-card-builtin.d.ts +14 -0
  89. package/dist/types/components/kup-card/builtin/kup-card-calendar.d.ts +2 -0
  90. package/dist/types/components/kup-card/builtin/kup-card-clock.d.ts +2 -0
  91. package/dist/types/components/kup-card/free/kup-card-free.d.ts +8 -0
  92. package/dist/types/components/kup-card/kup-card-declarations.d.ts +74 -0
  93. package/dist/types/components/kup-card/kup-card.d.ts +3 -3
  94. package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +0 -5
  95. package/dist/types/components/kup-data-table/kup-data-table.d.ts +1 -2
  96. package/dist/types/components/kup-date-picker/kup-date-picker.d.ts +0 -10
  97. package/dist/types/components/kup-time-picker/kup-time-picker.d.ts +2 -9
  98. package/dist/types/components.d.ts +2 -2
  99. package/package.json +1 -1
  100. package/dist/ketchup/p-1e2c3497.js +0 -1
  101. package/dist/ketchup/p-5db41fae.entry.js +0 -45
  102. package/dist/ketchup/p-756aa8b1.entry.js +0 -1
  103. package/dist/ketchup/p-ea387b49.entry.js +0 -1
  104. package/dist/ketchup/p-f6bff949.js +0 -1
@@ -1,13 +1,13 @@
1
1
  import { Component, Element, Event, forceUpdate, h, Host, Listen, Method, Prop, State, Watch, } from '@stencil/core';
2
2
  import { kupManagerInstance, } from '../../utils/kup-manager/kup-manager';
3
3
  import { isValidFormattedStringTime, formattedStringToCustomUnformattedStringTime, unformattedStringToFormattedStringTime, formatTime, getProps, setProps, } from '../../utils/utils';
4
- import { FButtonStyling } from '../../f-components/f-button/f-button-declarations';
5
4
  import { KupTimePickerProps, } from './kup-time-picker-declarations';
6
5
  import { KupDebugCategory } from '../../utils/kup-debug/kup-debug-declarations';
7
6
  import { componentWrapperId } from '../../variables/GenericVariables';
8
7
  import { KupDatesFormats } from '../../utils/kup-dates/kup-dates-declarations';
9
8
  import { FTextField } from '../../f-components/f-text-field/f-text-field';
10
9
  import { FTextFieldMDC } from '../../f-components/f-text-field/f-text-field-mdc';
10
+ import { KupDynamicPositionPlacement } from '../../utils/kup-dynamic-position/kup-dynamic-position-declarations';
11
11
  export class KupTimePicker {
12
12
  constructor() {
13
13
  /*-------------------------------------------------*/
@@ -69,10 +69,9 @@ export class KupTimePicker {
69
69
  this.hoursActive = true;
70
70
  this.minutesActive = false;
71
71
  this.secondsActive = false;
72
+ this.textFieldContainerEl = undefined;
72
73
  this.textfieldEl = undefined;
73
- this.pickerContainerEl = undefined;
74
- this.pickerEl = undefined;
75
- this.pickerOpened = false;
74
+ this.pickerKupEl = undefined;
76
75
  this.clickCb = null;
77
76
  }
78
77
  onKupTimePickerItemClick(e, value) {
@@ -92,6 +91,7 @@ export class KupTimePicker {
92
91
  id: this.rootElement.id,
93
92
  value: this.value,
94
93
  });
94
+ this.setFocus();
95
95
  }
96
96
  onKupClearIconClick() {
97
97
  this.setPickerValueSelected('');
@@ -213,7 +213,7 @@ export class KupTimePicker {
213
213
  */
214
214
  async setFocus() {
215
215
  if (this.textfieldEl != null) {
216
- this.textfieldEl.setFocus();
216
+ this.textfieldEl.focus();
217
217
  }
218
218
  }
219
219
  /**
@@ -274,61 +274,61 @@ export class KupTimePicker {
274
274
  return this.value;
275
275
  }
276
276
  openPicker() {
277
- let textfieldEl = this.textfieldEl;
278
- let containerEl = this.pickerContainerEl;
279
- this.pickerOpened = true;
280
- this.setClockViewActive(true, false, false);
281
- if (textfieldEl != null) {
282
- textfieldEl.classList.add('toggled');
277
+ const elStyle = this.pickerKupEl.style;
278
+ elStyle.height = 'auto';
279
+ elStyle.minWidth = this.textFieldContainerEl.clientWidth + 'px';
280
+ this.pickerKupEl.menuVisible = true;
281
+ if (this.textfieldEl != null) {
282
+ this.textfieldEl.classList.add('toggled');
283
+ }
284
+ if (this.kupManager.dynamicPosition.isRegistered(this.pickerKupEl)) {
285
+ this.kupManager.dynamicPosition.changeAnchor(this.pickerKupEl, this.textFieldContainerEl);
283
286
  }
284
- if (containerEl != null) {
285
- containerEl.classList.add('visible');
286
- const elStyle = containerEl.style;
287
- elStyle.height = 'auto';
288
- elStyle.minWidth = textfieldEl.clientWidth + 'px';
287
+ else {
288
+ this.kupManager.dynamicPosition.register(this.pickerKupEl, this.textFieldContainerEl, 0, KupDynamicPositionPlacement.AUTO, true);
289
289
  }
290
+ this.kupManager.dynamicPosition.start(this.pickerKupEl);
290
291
  if (!this.clickCb) {
291
292
  this.clickCb = {
292
293
  cb: () => {
293
294
  this.closePicker();
294
295
  },
295
- el: this.pickerContainerEl,
296
+ el: this.pickerKupEl,
296
297
  };
297
298
  }
298
299
  this.kupManager.addClickCallback(this.clickCb, true);
299
- this.refresh();
300
300
  }
301
301
  closePicker() {
302
+ this.pickerKupEl.menuVisible = false;
303
+ this.kupManager.removeClickCallback(this.clickCb);
302
304
  let textfieldEl = this.textfieldEl;
303
- let containerEl = this.pickerContainerEl;
304
- this.pickerOpened = false;
305
305
  if (textfieldEl != null) {
306
306
  textfieldEl.classList.remove('toggled');
307
- textfieldEl.emitSubmitEventOnEnter = true;
308
- }
309
- if (containerEl != null) {
310
- containerEl.classList.remove('visible');
311
307
  }
308
+ this.pickerKupEl.menuVisible = false;
309
+ this.kupManager.dynamicPosition.stop(this.pickerKupEl);
312
310
  this.kupManager.removeClickCallback(this.clickCb);
313
311
  }
314
312
  isPickerOpened() {
315
- return this.pickerOpened;
313
+ return this.pickerKupEl.menuVisible == true;
316
314
  }
317
315
  getTextFieldId() {
318
316
  return this.textfieldEl.id;
319
317
  }
320
318
  getPickerElId() {
321
- return this.pickerEl.id;
319
+ return this.pickerKupEl.id;
322
320
  }
323
321
  prepTextfield(initialValue) {
324
- let textfieldData = Object.assign({}, this.data['kup-text-field']);
325
- if (!textfieldData['icon']) {
326
- textfieldData['icon'] = 'access_time';
322
+ const fullHeight = this.rootElement.classList.contains('kup-full-height');
323
+ const fullWidth = this.rootElement.classList.contains('kup-full-width');
324
+ const textfieldData = Object.assign({}, this.data['kup-text-field']);
325
+ if (!textfieldData.icon) {
326
+ textfieldData.icon = 'access_time';
327
327
  }
328
- if (textfieldData['icon']) {
329
- textfieldData['trailingIcon'] = true;
328
+ if (textfieldData.icon) {
329
+ textfieldData.trailingIcon = true;
330
330
  }
331
- let comp = (h(FTextField, Object.assign({}, textfieldData, { disabled: this.disabled, id: this.rootElement.id + '_text-field', value: initialValue, onChange: (e) => this.onKupChange(e), onClick: () => this.onKupClick(), onFocus: () => this.onKupFocus(), onInput: (e) => this.onKupInput(e), onIconClick: () => this.onKupIconClick(), onKeyDown: (e) => this.onKupTextFieldSubmit(e), onClearIconClick: () => this.onKupClearIconClick() }), this.prepTimePicker()));
331
+ let comp = (h(FTextField, Object.assign({}, textfieldData, { disabled: this.disabled, fullHeight: fullHeight, fullWidth: fullWidth, id: this.rootElement.id + '_text-field', value: initialValue, onChange: (e) => this.onKupChange(e), onClick: () => this.onKupClick(), onFocus: () => this.onKupFocus(), onInput: (e) => this.onKupInput(e), onIconClick: () => this.onKupIconClick(), onKeyDown: (e) => this.onKupTextFieldSubmit(e), onClearIconClick: () => this.onKupClearIconClick() }), this.prepTimePicker()));
332
332
  return comp;
333
333
  }
334
334
  isRelatedTargetInThisComponent(e) {
@@ -348,196 +348,25 @@ export class KupTimePicker {
348
348
  let idConc = '#time-picker-div#confirm#';
349
349
  return idConc.indexOf('#' + id + '#') >= 0;
350
350
  }
351
- setTimeFromClock(e) {
352
- let text = this.hoursEl.innerText + ':' + this.minutesEl.innerText;
353
- if (this.manageSeconds) {
354
- text += ':' + this.secondsEl.innerText;
355
- }
356
- this.onKupTimePickerItemClick(e, text);
357
- }
358
- createClock() {
359
- let selectedTime;
360
- if (this.value) {
361
- selectedTime = this.kupManager.dates.toDate(this.value, this.manageSeconds
362
- ? KupDatesFormats.ISO_TIME
363
- : KupDatesFormats.ISO_TIME_WITHOUT_SECONDS);
364
- }
365
- else {
366
- selectedTime = new Date();
367
- }
368
- let hh = selectedTime.getHours().toString();
369
- let mm = selectedTime.getMinutes().toString();
370
- if (hh.length === 1) {
371
- hh = '0' + hh;
372
- }
373
- if (mm.length === 1) {
374
- mm = '0' + mm;
375
- }
376
- let ss = '';
377
- if (this.manageSeconds) {
378
- ss = selectedTime.getSeconds().toString();
379
- if (ss.length === 1) {
380
- ss = '0' + ss;
381
- }
382
- }
383
- let seconds;
384
- let time = [
385
- h("span", { class: "h", ref: (el) => (this.hoursEl = el), onClick: () => {
386
- this.setClockViewActive(true, false, false);
387
- this.switchView(this.hoursEl, this.hoursCircleEl);
388
- }, innerHTML: hh }),
389
- ':',
390
- h("span", { class: "m", ref: (el) => (this.minutesEl = el), onClick: () => {
391
- this.setClockViewActive(false, true, false);
392
- this.switchView(this.minutesEl, this.minutesCircleEl);
393
- }, innerHTML: mm }),
394
- ];
395
- if (this.manageSeconds) {
396
- seconds = (h("div", { class: "circle seconds", ref: (el) => (this.secondsCircleEl = el) },
397
- this.buildClock(60, 101, 115, 115, 'sec unit', 0, 5, ss),
398
- h("div", { class: "mid" })));
399
- time.push(':', h("span", { class: "s", ref: (el) => (this.secondsEl = el), onClick: () => {
400
- this.setClockViewActive(false, false, true);
401
- this.switchView(this.secondsEl, this.secondsCircleEl);
402
- }, innerHTML: ss }));
403
- }
404
- return (h("div", { class: "clock", id: this.rootElement.id + '_clock', ref: (el) => (this.pickerEl = el) },
405
- h("div", { class: "top" }, time),
406
- h("div", { class: "circle hours", ref: (el) => (this.hoursCircleEl = el) },
407
- this.buildClock(12, 101, 105, 105, 'hour', 0, 1, hh),
408
- this.buildClock(12, 64, 110, 110, 'hour2', 12, 1, hh),
409
- h("div", { class: "mid" })),
410
- h("div", { class: "circle minutes", ref: (el) => (this.minutesCircleEl = el) },
411
- this.buildClock(60, 101, 115, 115, 'min unit', 0, 5, mm),
412
- h("div", { class: "mid" })),
413
- seconds,
414
- h("div", { class: "actions" },
415
- h("kup-button", { "onkup-button-click": (e) => {
416
- this.setTimeFromClock(e);
417
- }, id: "confirm", styling: FButtonStyling.FLAT, label: "Ok" }))));
418
- }
419
- switchView(el, elCircle) {
420
- this.hoursEl.classList.remove('active');
421
- this.hoursCircleEl.classList.remove('active');
422
- this.minutesEl.classList.remove('active');
423
- this.minutesCircleEl.classList.remove('active');
424
- if (this.secondsEl) {
425
- this.secondsEl.classList.remove('active');
426
- this.secondsCircleEl.classList.remove('active');
427
- }
428
- el.classList.add('active');
429
- elCircle.classList.add('active');
430
- }
431
- setClockViewActive(hoursActive, minutesActive, secondsActive) {
432
- this.hoursActive = hoursActive;
433
- this.minutesActive = minutesActive;
434
- this.secondsActive = secondsActive;
435
- }
436
- buildClock(num, radius, offsetX, offsetY, className, add, separator, selectedValue) {
437
- let x, y;
438
- let divsArray = [];
439
- for (var n = 0; n < num; n++) {
440
- x = radius * Math.cos((n / num) * 2 * Math.PI);
441
- y = radius * Math.sin((n / num) * 2 * Math.PI);
442
- let text;
443
- let dataValue = {};
444
- let style = {};
445
- if (separator == 1) {
446
- if (n + 3 > 12) {
447
- text = n + 3 - 12 + add + '';
448
- }
449
- else {
450
- let calc = n + 3 + add;
451
- if (calc !== 24) {
452
- text = n + 3 + add + '';
453
- }
454
- else {
455
- text = '00';
456
- }
457
- }
458
- dataValue['data-value'] = text;
459
- }
460
- else {
461
- if (n % separator == 0) {
462
- if (n + 15 >= 60) {
463
- dataValue['data-value'] = n + 15 - 60 + '';
464
- text = n + 15 - 60 + add + '';
465
- }
466
- else {
467
- dataValue['data-value'] = n + 15 + '';
468
- text = n + 15 + add + '';
469
- }
470
- }
471
- else {
472
- if (n + 15 >= 60) {
473
- dataValue['data-value'] = n + 15 - 60 + '';
474
- text = '⋅';
475
- }
476
- else {
477
- dataValue['data-value'] = n + 15 + '';
478
- text = '\u00B7';
479
- }
480
- }
481
- }
482
- style['left'] = x + offsetX + 'px';
483
- style['top'] = y + offsetY + 'px';
484
- if (dataValue['data-value'].length === 1) {
485
- dataValue['data-value'] = '0' + dataValue['data-value'];
486
- }
487
- let elClass = className;
488
- if (dataValue['data-value'] === selectedValue) {
489
- elClass += ' selected';
490
- }
491
- let div = (h("div", Object.assign({ class: elClass, style: style }, dataValue, { onClick: (e) => this.setClockTime(e) }), text));
492
- divsArray.push(div);
493
- }
494
- return divsArray;
495
- }
496
- setClockTime(e) {
497
- let time = e.target.getAttribute('data-value');
498
- if (this.hoursActive) {
499
- this.hoursEl.innerText = time;
500
- this.hoursCircleEl
501
- .querySelector('.selected')
502
- .classList.remove('selected');
503
- this.setClockViewActive(false, true, false);
504
- this.switchView(this.minutesEl, this.minutesCircleEl);
505
- }
506
- else if (this.minutesActive) {
507
- this.minutesEl.innerText = time;
508
- this.minutesCircleEl
509
- .querySelector('.selected')
510
- .classList.remove('selected');
511
- if (this.manageSeconds) {
512
- this.setClockViewActive(false, false, true);
513
- this.switchView(this.secondsEl, this.secondsCircleEl);
514
- }
515
- else {
516
- this.setTimeFromClock(e);
517
- }
518
- }
519
- else {
520
- this.secondsEl.innerText = time;
521
- this.secondsCircleEl
522
- .querySelector('.selected')
523
- .classList.remove('selected');
524
- this.setTimeFromClock(e);
525
- }
526
- e.target.classList.add('selected');
527
- }
528
351
  prepTimePicker() {
529
- let widget = undefined;
530
352
  if (this.clockVariant) {
531
- widget = this.createClock();
353
+ const data = {
354
+ options: {
355
+ initialValue: this.value,
356
+ manageSeconds: this.manageSeconds,
357
+ hoursActive: this.hoursActive,
358
+ minutesActive: this.minutesActive,
359
+ secondsActive: this.secondsActive,
360
+ },
361
+ };
362
+ return (h("kup-card", { ref: (el) => (this.pickerKupEl = el), data: data, "layout-family": "builtin", "layout-number": "2", "size-x": "300px", "size-y": "450px", "is-menu": true, "onkup-card-click": (ev) => {
363
+ if (ev.detail.value != null && ev.detail.value != '')
364
+ this.onKupTimePickerItemClick(ev, ev.detail.value);
365
+ } }));
532
366
  }
533
367
  else {
534
- widget = (h("kup-list", { data: this.createTimeListData(this.value), "is-menu": true, "menu-visible": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.value), id: this.rootElement.id + '_list', ref: (el) => (this.pickerEl = el) }));
368
+ return (h("kup-list", { ref: (el) => (this.pickerKupEl = el), data: this.createTimeListData(this.value), "is-menu": true, "onkup-list-click": (e) => this.onKupTimePickerItemClick(e, e.detail.selected.value), id: this.rootElement.id + '_list' }));
535
369
  }
536
- return (h("div", { id: "time-picker-div", ref: (el) => (this.pickerContainerEl = el), onBlur: (e) => {
537
- if (!this.isRelatedTargetInThisComponent(e)) {
538
- this.onKupBlur();
539
- }
540
- } }, widget));
541
370
  }
542
371
  createTimeListData(value) {
543
372
  let listData = [];
@@ -607,42 +436,23 @@ export class KupTimePicker {
607
436
  if (root) {
608
437
  const f = root.querySelector('.f-text-field');
609
438
  if (f) {
439
+ this.textFieldContainerEl = f;
610
440
  this.textfieldEl = f.querySelector('input');
611
441
  FTextFieldMDC(f);
612
442
  }
613
443
  }
614
- if (this.clockVariant) {
615
- if (this.hoursActive) {
616
- this.switchView(this.hoursEl, this.hoursCircleEl);
617
- }
618
- else if (this.minutesActive) {
619
- this.switchView(this.minutesEl, this.minutesCircleEl);
620
- }
621
- else if (this.secondsActive) {
622
- this.switchView(this.secondsEl, this.secondsCircleEl);
623
- }
624
- }
625
444
  this.kupManager.debug.logRender(this, true);
626
445
  }
627
446
  render() {
628
- let hostClass = {};
629
- if (this.data &&
630
- this.data['kup-text-field'] &&
631
- this.data['kup-text-field']['className'] &&
632
- this.data['kup-text-field']['className'].indexOf('kup-full-height') > -1) {
633
- hostClass['kup-full-height'] = true;
634
- }
635
- if (this.data &&
636
- this.data['kup-text-field'] &&
637
- this.data['kup-text-field']['fullWidth']) {
638
- hostClass['kup-full-width'] = true;
639
- }
640
- return (h(Host, { class: hostClass },
447
+ return (h(Host, null,
641
448
  h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)),
642
449
  h("div", { id: componentWrapperId }, this.prepTextfield(this.getTimeForOutput()))));
643
450
  }
644
451
  disconnectedCallback() {
645
452
  this.kupManager.theme.unregister(this);
453
+ if (this.pickerKupEl) {
454
+ this.pickerKupEl.remove();
455
+ }
646
456
  }
647
457
  static get is() { return "kup-time-picker"; }
648
458
  static get encapsulation() { return "shadow"; }
@@ -217,6 +217,7 @@ function setEditableCell(cellType, classObj, cell, column, props) {
217
217
  case FCellTypes.TIME:
218
218
  return (h("kup-time-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: "kup-full-width", "onkup-timepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-timepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
219
219
  case FCellTypes.NUMBER:
220
+ classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
220
221
  case FCellTypes.STRING:
221
222
  return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: true, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
222
223
  ? stringToNumber(cell.value).toString()
@@ -421,33 +422,36 @@ function cellEvent(e, props, cellType, cellEventName) {
421
422
  let value = isInputEvent
422
423
  ? e.target.value
423
424
  : e.detail.value;
424
- switch (cellType) {
425
- case FCellTypes.AUTOCOMPLETE:
426
- case FCellTypes.COMBOBOX:
427
- case FCellTypes.DATE:
428
- case FCellTypes.TIME:
429
- if (cell.data) {
430
- cell.data['initialValue'] = value;
431
- }
432
- break;
433
- case FCellTypes.CHECKBOX:
434
- value = value === 'on' ? '0' : '1';
435
- if (cell.data) {
436
- cell.data.checked =
437
- value === '0' ? false : true;
438
- }
439
- break;
440
- }
441
- if (cell.obj) {
442
- cell.obj.k = value;
425
+ if (cellEventName === FCellEvents.UPDATE) {
426
+ switch (cellType) {
427
+ case FCellTypes.AUTOCOMPLETE:
428
+ case FCellTypes.COMBOBOX:
429
+ case FCellTypes.DATE:
430
+ case FCellTypes.TIME:
431
+ if (cell.data) {
432
+ cell.data['initialValue'] = value;
433
+ }
434
+ break;
435
+ case FCellTypes.CHECKBOX:
436
+ value = value === 'on' ? '0' : '1';
437
+ if (cell.data) {
438
+ cell.data.checked =
439
+ value === '0' ? false : true;
440
+ }
441
+ break;
442
+ }
443
+ if (cell.obj) {
444
+ cell.obj.k = value;
445
+ }
446
+ cell.value = value;
447
+ cell.displayedValue = null;
448
+ cell.displayedValue = getCellValueForDisplay(column, cell);
443
449
  }
444
- cell.value = value;
445
- cell.displayedValue = null;
446
- cell.displayedValue = getCellValueForDisplay(column, cell);
447
450
  if (comp && comp.rootElement) {
448
451
  const updateEvent = new CustomEvent(cellEventName, {
449
452
  bubbles: true,
450
453
  cancelable: true,
454
+ composed: true,
451
455
  detail: {
452
456
  comp: comp,
453
457
  id: comp.rootElement.id,
@@ -1,6 +1,5 @@
1
1
  import { KupCardFamily, } from '../../components/kup-card/kup-card-declarations';
2
2
  import { searchStartEvent, } from './kup-search-declarations';
3
- const dom = document.documentElement;
4
3
  /**
5
4
  * Handles operations and formatting of dates.
6
5
  * @module KupSearch
@@ -1,5 +1,5 @@
1
- import { q as unformattedStringToFormattedStringNumber, t as unformattedStringToFormattedStringTime, v as unformattedStringToFormattedStringTimestamp, n as numeral, d as stringToNumber } from './utils-cfcbe33f.js';
2
- import { c as KupDatesFormats } from './kup-manager-bba32828.js';
1
+ import { o as unformattedStringToFormattedStringNumber, q as unformattedStringToFormattedStringTime, r as unformattedStringToFormattedStringTimestamp, n as numeral, d as stringToNumber } from './utils-6c73709d.js';
2
+ import { c as KupDatesFormats } from './kup-manager-7fc234da.js';
3
3
 
4
4
  const dom = document.documentElement;
5
5
  // -------------
@@ -1,6 +1,6 @@
1
1
  import { h } from './index-e0e67c23.js';
2
2
  import { F as FButtonStyling } from './f-button-declarations-fd4965d1.js';
3
- import { F as FImage } from './f-image-70ca9dfe.js';
3
+ import { F as FImage } from './f-image-3bc8b24f.js';
4
4
 
5
5
  /*-------------------------------------------------*/
6
6
  /* C o m p o n e n t */
@@ -1,9 +1,9 @@
1
1
  import { h, a as getAssetPath } from './index-e0e67c23.js';
2
- import { b as getCellValueForDisplay } from './cell-utils-9a2914fc.js';
3
- import { a as KupThemeIconValues, b as KupThemeColorValues } from './kup-manager-bba32828.js';
4
- import { d as stringToNumber } from './utils-cfcbe33f.js';
5
- import { F as FImage } from './f-image-70ca9dfe.js';
6
- import { F as FChip } from './f-chip-babf1740.js';
2
+ import { b as getCellValueForDisplay } from './cell-utils-8f512ea9.js';
3
+ import { a as KupThemeIconValues, b as KupThemeColorValues } from './kup-manager-7fc234da.js';
4
+ import { d as stringToNumber } from './utils-6c73709d.js';
5
+ import { F as FImage } from './f-image-3bc8b24f.js';
6
+ import { F as FChip } from './f-chip-c0e9c0ff.js';
7
7
 
8
8
  /*-------------------------------------------------*/
9
9
  /* C o m p o n e n t */
@@ -471,6 +471,7 @@ function setEditableCell(cellType, classObj, cell, column, props) {
471
471
  case FCellTypes.TIME:
472
472
  return (h("kup-time-picker", Object.assign({ initialValue: cell.value }, cell.data, { class: "kup-full-width", "onkup-timepicker-change": (e) => cellEvent(e, props, cellType, FCellEvents.UPDATE), "onkup-timepicker-input": (e) => cellEvent(e, props, cellType, FCellEvents.INPUT) })));
473
473
  case FCellTypes.NUMBER:
474
+ classObj[FCellClasses.C_RIGHT_ALIGNED] = true;
474
475
  case FCellTypes.STRING:
475
476
  return (h(FTextField, Object.assign({}, cell.data, { icon: cell.icon ? cell.icon : column.icon ? column.icon : null, fullWidth: true, inputType: cellType === FCellTypes.NUMBER ? 'number' : null, value: cellType === FCellTypes.NUMBER
476
477
  ? stringToNumber(cell.value).toString()
@@ -675,33 +676,36 @@ function cellEvent(e, props, cellType, cellEventName) {
675
676
  let value = isInputEvent
676
677
  ? e.target.value
677
678
  : e.detail.value;
678
- switch (cellType) {
679
- case FCellTypes.AUTOCOMPLETE:
680
- case FCellTypes.COMBOBOX:
681
- case FCellTypes.DATE:
682
- case FCellTypes.TIME:
683
- if (cell.data) {
684
- cell.data['initialValue'] = value;
685
- }
686
- break;
687
- case FCellTypes.CHECKBOX:
688
- value = value === 'on' ? '0' : '1';
689
- if (cell.data) {
690
- cell.data.checked =
691
- value === '0' ? false : true;
692
- }
693
- break;
694
- }
695
- if (cell.obj) {
696
- cell.obj.k = value;
679
+ if (cellEventName === FCellEvents.UPDATE) {
680
+ switch (cellType) {
681
+ case FCellTypes.AUTOCOMPLETE:
682
+ case FCellTypes.COMBOBOX:
683
+ case FCellTypes.DATE:
684
+ case FCellTypes.TIME:
685
+ if (cell.data) {
686
+ cell.data['initialValue'] = value;
687
+ }
688
+ break;
689
+ case FCellTypes.CHECKBOX:
690
+ value = value === 'on' ? '0' : '1';
691
+ if (cell.data) {
692
+ cell.data.checked =
693
+ value === '0' ? false : true;
694
+ }
695
+ break;
696
+ }
697
+ if (cell.obj) {
698
+ cell.obj.k = value;
699
+ }
700
+ cell.value = value;
701
+ cell.displayedValue = null;
702
+ cell.displayedValue = getCellValueForDisplay(column, cell);
697
703
  }
698
- cell.value = value;
699
- cell.displayedValue = null;
700
- cell.displayedValue = getCellValueForDisplay(column, cell);
701
704
  if (comp && comp.rootElement) {
702
705
  const updateEvent = new CustomEvent(cellEventName, {
703
706
  bubbles: true,
704
707
  cancelable: true,
708
+ composed: true,
705
709
  detail: {
706
710
  comp: comp,
707
711
  id: comp.rootElement.id,
@@ -1,6 +1,6 @@
1
1
  import { h } from './index-e0e67c23.js';
2
- import { F as FImage } from './f-image-70ca9dfe.js';
3
- import { a as KupThemeIconValues, f as KupDebugCategory, b as KupThemeColorValues } from './kup-manager-bba32828.js';
2
+ import { F as FImage } from './f-image-3bc8b24f.js';
3
+ import { a as KupThemeIconValues, f as KupDebugCategory, b as KupThemeColorValues } from './kup-manager-7fc234da.js';
4
4
 
5
5
  /**
6
6
  * Types of the f-chip component.
@@ -1,5 +1,5 @@
1
1
  import { h, a as getAssetPath } from './index-e0e67c23.js';
2
- import { b as KupThemeColorValues } from './kup-manager-bba32828.js';
2
+ import { b as KupThemeColorValues } from './kup-manager-7fc234da.js';
3
3
 
4
4
  /**
5
5
  * The type of a CSS step in CSS-drawing mode.