@sme.up/ketchup 11.0.0-SNAPSHOT-20241023082921 → 11.0.0-SNAPSHOT-20241023092659

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 (164) hide show
  1. package/dist/cjs/index-4e97f23f.js +4 -0
  2. package/dist/cjs/ketchup.cjs.js +1 -1
  3. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +38 -38
  4. package/dist/cjs/kup-custom-task-list-header_4.cjs.entry.js +7 -7
  5. package/dist/cjs/kup-gantt_10.cjs.entry.js +23 -23
  6. package/dist/cjs/kup-htm.cjs.entry.js +100 -0
  7. package/dist/cjs/kup-htm.cjs.entry.js.map +1 -0
  8. package/dist/cjs/kup-image-list.cjs.entry.js +3 -3
  9. package/dist/cjs/kup-input-panel.cjs.entry.js +1 -1
  10. package/dist/cjs/kup-lazy.cjs.entry.js +11 -11
  11. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  12. package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
  13. package/dist/cjs/kup-numeric-picker.cjs.entry.js +1 -1
  14. package/dist/cjs/kup-pdf.cjs.entry.js +1 -1
  15. package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
  16. package/dist/cjs/kup-planner-renderer.cjs.entry.js +2 -2
  17. package/dist/cjs/kup-planner.cjs.entry.js +1 -1
  18. package/dist/cjs/kup-probe.cjs.entry.js +1 -1
  19. package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
  20. package/dist/cjs/kup-snackbar.cjs.entry.js +1 -1
  21. package/dist/cjs/kup-typography-list.cjs.entry.js +1 -1
  22. package/dist/cjs/kup-typography.cjs.entry.js +1 -1
  23. package/dist/cjs/loader.cjs.js +1 -1
  24. package/dist/collection/assets/htm.js +20 -0
  25. package/dist/collection/assets/index.js +4 -0
  26. package/dist/collection/collection-manifest.json +1 -0
  27. package/dist/collection/components/kup-htm/kup-htm-declarations.js +9 -0
  28. package/dist/collection/components/kup-htm/kup-htm-declarations.js.map +1 -0
  29. package/dist/collection/components/kup-htm/kup-htm.css +147 -0
  30. package/dist/collection/components/kup-htm/kup-htm.js +225 -0
  31. package/dist/collection/components/kup-htm/kup-htm.js.map +1 -0
  32. package/dist/collection/components/kup-image-list/kup-image-list.js +3 -3
  33. package/dist/collection/components/kup-input-panel/kup-input-panel.js +1 -1
  34. package/dist/collection/components/kup-lazy/kup-lazy.js +11 -11
  35. package/dist/collection/components/kup-magic-box/kup-magic-box.js +3 -3
  36. package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +1 -1
  37. package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +1 -1
  38. package/dist/collection/components/kup-pdf/kup-pdf.js +1 -1
  39. package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +2 -2
  40. package/dist/collection/components/kup-planner/kup-planner.js +1 -1
  41. package/dist/collection/components/kup-planner/utils/custom-task-list-header.js +2 -2
  42. package/dist/collection/components/kup-planner/utils/kup-gantt/kup-gantt.js +2 -2
  43. package/dist/collection/components/kup-planner/utils/kup-gantt-calendar/kup-gantt-calendar.js +2 -2
  44. package/dist/collection/components/kup-planner/utils/kup-grid-renderer/kup-grid-renderer.js +3 -3
  45. package/dist/collection/components/kup-planner/utils/kup-horizontal-scroll/kup-horizontal-scroll.js +5 -5
  46. package/dist/collection/components/kup-planner/utils/kup-planner-renderer.js +2 -2
  47. package/dist/collection/components/kup-planner/utils/kup-switcher/kup-switcher.js +1 -1
  48. package/dist/collection/components/kup-planner/utils/kup-task-gantt/kup-task-gantt.js +2 -2
  49. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-header.js +7 -7
  50. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list-table.js +1 -1
  51. package/dist/collection/components/kup-planner/utils/kup-task-list/kup-task-list.js +1 -1
  52. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-standard-tooltip.js +1 -1
  53. package/dist/collection/components/kup-planner/utils/kup-tooltip/kup-tooltip.js +1 -1
  54. package/dist/collection/components/kup-planner/utils/kup-vertical-scroll/kup-vertical-scroll.js +2 -2
  55. package/dist/collection/components/kup-probe/kup-probe.js +1 -1
  56. package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +1 -1
  57. package/dist/collection/components/kup-qlik/kup-qlik.js +1 -1
  58. package/dist/collection/components/kup-rating/kup-rating.js +1 -1
  59. package/dist/collection/components/kup-snackbar/kup-snackbar.js +1 -1
  60. package/dist/collection/components/kup-spinner/kup-spinner.js +34 -34
  61. package/dist/collection/components/kup-switch/kup-switch.js +1 -1
  62. package/dist/collection/components/kup-time-picker/kup-time-picker.js +1 -1
  63. package/dist/collection/components/kup-typography/kup-typography.js +1 -1
  64. package/dist/collection/components/kup-typography-list/kup-typography-list.js +1 -1
  65. package/dist/components/custom-task-list-header.js +2 -2
  66. package/dist/components/kup-autocomplete2.js +38 -38
  67. package/dist/components/kup-gantt-calendar2.js +2 -2
  68. package/dist/components/kup-gantt2.js +2 -2
  69. package/dist/components/kup-grid-renderer2.js +3 -3
  70. package/dist/components/kup-horizontal-scroll2.js +5 -5
  71. package/dist/components/kup-htm.d.ts +11 -0
  72. package/dist/components/kup-htm.js +253 -0
  73. package/dist/components/kup-htm.js.map +1 -0
  74. package/dist/components/kup-image-list.js +3 -3
  75. package/dist/components/kup-input-panel.js +1 -1
  76. package/dist/components/kup-lazy.js +11 -11
  77. package/dist/components/kup-magic-box.js +3 -3
  78. package/dist/components/kup-nav-bar.js +1 -1
  79. package/dist/components/kup-numeric-picker.js +1 -1
  80. package/dist/components/kup-pdf.js +1 -1
  81. package/dist/components/kup-photo-frame.js +2 -2
  82. package/dist/components/kup-planner-renderer2.js +2 -2
  83. package/dist/components/kup-planner.js +1 -1
  84. package/dist/components/kup-probe.js +1 -1
  85. package/dist/components/kup-qlik.js +1 -1
  86. package/dist/components/kup-snackbar.js +1 -1
  87. package/dist/components/kup-standard-tooltip2.js +1 -1
  88. package/dist/components/kup-switcher2.js +1 -1
  89. package/dist/components/kup-task-gantt2.js +2 -2
  90. package/dist/components/kup-task-list-header2.js +7 -7
  91. package/dist/components/kup-task-list-table2.js +1 -1
  92. package/dist/components/kup-task-list2.js +1 -1
  93. package/dist/components/kup-tooltip2.js +1 -1
  94. package/dist/components/kup-typography-list.js +1 -1
  95. package/dist/components/kup-typography.js +1 -1
  96. package/dist/components/kup-vertical-scroll2.js +2 -2
  97. package/dist/esm/index-191ee7cb.js +4 -0
  98. package/dist/esm/ketchup.js +1 -1
  99. package/dist/esm/kup-autocomplete_27.entry.js +38 -38
  100. package/dist/esm/kup-custom-task-list-header_4.entry.js +7 -7
  101. package/dist/esm/kup-gantt_10.entry.js +23 -23
  102. package/dist/esm/kup-htm.entry.js +96 -0
  103. package/dist/esm/kup-htm.entry.js.map +1 -0
  104. package/dist/esm/kup-image-list.entry.js +3 -3
  105. package/dist/esm/kup-input-panel.entry.js +1 -1
  106. package/dist/esm/kup-lazy.entry.js +11 -11
  107. package/dist/esm/kup-magic-box.entry.js +3 -3
  108. package/dist/esm/kup-nav-bar.entry.js +1 -1
  109. package/dist/esm/kup-numeric-picker.entry.js +1 -1
  110. package/dist/esm/kup-pdf.entry.js +1 -1
  111. package/dist/esm/kup-photo-frame.entry.js +2 -2
  112. package/dist/esm/kup-planner-renderer.entry.js +2 -2
  113. package/dist/esm/kup-planner.entry.js +1 -1
  114. package/dist/esm/kup-probe.entry.js +1 -1
  115. package/dist/esm/kup-qlik.entry.js +1 -1
  116. package/dist/esm/kup-snackbar.entry.js +1 -1
  117. package/dist/esm/kup-typography-list.entry.js +1 -1
  118. package/dist/esm/kup-typography.entry.js +1 -1
  119. package/dist/esm/loader.js +1 -1
  120. package/dist/ketchup/ketchup.esm.js +1 -1
  121. package/dist/ketchup/ketchup.esm.js.map +1 -1
  122. package/dist/ketchup/{p-b3c7cbd9.entry.js → p-20c22a22.entry.js} +2 -2
  123. package/dist/ketchup/{p-e921b455.entry.js → p-26efe39b.entry.js} +2 -2
  124. package/dist/ketchup/{p-18229ac3.entry.js → p-2c8d07af.entry.js} +2 -2
  125. package/dist/ketchup/{p-f4a6652e.entry.js → p-362a8b69.entry.js} +2 -2
  126. package/dist/ketchup/{p-45db3eae.entry.js → p-3a8f5a76.entry.js} +2 -2
  127. package/dist/ketchup/{p-39fa8da7.entry.js → p-3edff8e7.entry.js} +2 -2
  128. package/dist/ketchup/{p-9d9bb8a9.entry.js → p-422e1c5d.entry.js} +2 -2
  129. package/dist/ketchup/{p-9788df0b.entry.js → p-44b6390c.entry.js} +2 -2
  130. package/dist/ketchup/{p-fedd9482.entry.js → p-4b14b67b.entry.js} +2 -2
  131. package/dist/ketchup/p-5e889cbc.entry.js +2 -0
  132. package/dist/ketchup/p-5e889cbc.entry.js.map +1 -0
  133. package/dist/ketchup/{p-203cb58a.entry.js → p-94099e24.entry.js} +3 -3
  134. package/dist/ketchup/{p-8a77b0b2.entry.js → p-9fa6808d.entry.js} +2 -2
  135. package/dist/ketchup/{p-188ed514.entry.js → p-a33ea26d.entry.js} +2 -2
  136. package/dist/ketchup/{p-674a4d20.entry.js → p-b46a4d95.entry.js} +2 -2
  137. package/dist/ketchup/{p-246e4816.entry.js → p-b849ae30.entry.js} +2 -2
  138. package/dist/ketchup/p-bb4e26cb.entry.js +2 -0
  139. package/dist/ketchup/{p-e32ad7e4.entry.js.map → p-bb4e26cb.entry.js.map} +1 -1
  140. package/dist/ketchup/{p-7b5bef8e.entry.js → p-c7dfed3a.entry.js} +2 -2
  141. package/dist/ketchup/{p-992647ed.entry.js → p-ce5a86e1.entry.js} +2 -2
  142. package/dist/ketchup/{p-5d738584.entry.js → p-e8c292e9.entry.js} +2 -2
  143. package/dist/types/components/kup-htm/kup-htm-declarations.d.ts +7 -0
  144. package/dist/types/components/kup-htm/kup-htm.d.ts +40 -0
  145. package/dist/types/components.d.ts +57 -0
  146. package/package.json +1 -1
  147. package/dist/ketchup/p-e32ad7e4.entry.js +0 -2
  148. /package/dist/ketchup/{p-b3c7cbd9.entry.js.map → p-20c22a22.entry.js.map} +0 -0
  149. /package/dist/ketchup/{p-e921b455.entry.js.map → p-26efe39b.entry.js.map} +0 -0
  150. /package/dist/ketchup/{p-18229ac3.entry.js.map → p-2c8d07af.entry.js.map} +0 -0
  151. /package/dist/ketchup/{p-f4a6652e.entry.js.map → p-362a8b69.entry.js.map} +0 -0
  152. /package/dist/ketchup/{p-45db3eae.entry.js.map → p-3a8f5a76.entry.js.map} +0 -0
  153. /package/dist/ketchup/{p-39fa8da7.entry.js.map → p-3edff8e7.entry.js.map} +0 -0
  154. /package/dist/ketchup/{p-9d9bb8a9.entry.js.map → p-422e1c5d.entry.js.map} +0 -0
  155. /package/dist/ketchup/{p-9788df0b.entry.js.map → p-44b6390c.entry.js.map} +0 -0
  156. /package/dist/ketchup/{p-fedd9482.entry.js.map → p-4b14b67b.entry.js.map} +0 -0
  157. /package/dist/ketchup/{p-203cb58a.entry.js.map → p-94099e24.entry.js.map} +0 -0
  158. /package/dist/ketchup/{p-8a77b0b2.entry.js.map → p-9fa6808d.entry.js.map} +0 -0
  159. /package/dist/ketchup/{p-188ed514.entry.js.map → p-a33ea26d.entry.js.map} +0 -0
  160. /package/dist/ketchup/{p-674a4d20.entry.js.map → p-b46a4d95.entry.js.map} +0 -0
  161. /package/dist/ketchup/{p-246e4816.entry.js.map → p-b849ae30.entry.js.map} +0 -0
  162. /package/dist/ketchup/{p-7b5bef8e.entry.js.map → p-c7dfed3a.entry.js.map} +0 -0
  163. /package/dist/ketchup/{p-992647ed.entry.js.map → p-ce5a86e1.entry.js.map} +0 -0
  164. /package/dist/ketchup/{p-5d738584.entry.js.map → p-e8c292e9.entry.js.map} +0 -0
@@ -1,2 +1,2 @@
1
- import{r as a,c as t,f as r,h as o,H as i,d as n}from"./p-d7c15b0e.js";import{k as e,g as p,s}from"./p-8c07fd42.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const c="nav-bar";var u;(function(a){a["customStyle"]="Custom style of the component.";a["image"]="Image displayed by the nav bar, uses the kup-image component's props.";a["label"]="Text displayed by the nav bar.";a["showMenuButton"]="When true, the menu button will be displayed on the left of the nav bar.";a["styling"]="Defines the style of the nav bar"})(u||(u={}));var b;(function(a){a["SHORT"]="short";a["STANDARD"]="standard"})(b||(b={}));const h=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_navbar_item_color:var(\n --kup-navbar-item-color,\n var(--kup-primary-color-0)\n );--kup_navbar_background_color:var(\n --kup-navbar-background-color,\n var(--kup-layer-1-inverted)\n );--kup_navbar_box_shadow:var(\n --kup-navbar-box-shadow,\n 0 2px 4px -1px rgba(128, 128, 128, 0.2),\n 0 4px 5px 0 rgba(128, 128, 128, 0.14),\n 0 1px 10px 0 rgba(128, 128, 128, 0.12)\n );--kup_navbar_position:var(--kup-navbar-position, fixed);--kup_navbar_short_border_radius:var(\n --kup-navbar-short-border-radius,\n 0px 0px 24px\n );--kup_navbar_short_box_shadow:var(\n --kup-navbar-short-box-shadow,\n rgba(128, 128, 128, 0.2) 0px 2px 4px -1px,\n rgba(128, 128, 128, 0.14) 0px 4px 5px 0px,\n rgba(128, 128, 128, 0.12) 0px 1px 10px 0px\n );--kup_navbar_short_width:var(--kup-navbar-short-width, 9em);--kup_navbar_transition:var(--kup-navbar-transition, 250ms);--kup_navbar_width:var(--kup-navbar-width, 100%);box-sizing:border-box;font-size:var(--kup-font-size);left:0;position:var(--kup_navbar_position);top:0;transition:all var(--kup_navbar_transition);width:var(--kup_navbar_width);z-index:var(--kup-navbar-zindex)}#kup-component{width:var(--kup_navbar_width)}.nav-bar{background-color:var(--kup_navbar_background_color);box-sizing:border-box;color:var(--kup_navbar_item_color);display:flex;flex-direction:column;justify-content:space-between;width:var(--kup_navbar_width);padding:0 var(--kup-space-05)}.nav-bar--short{border-radius:var(--kup_navbar_short_border_radius);box-shadow:var(--kup_navbar_short_box_shadow);width:var(--kup_navbar_short_width)}.nav-bar--short .nav-bar__section{padding:0 0.5em}.nav-bar--short section{overflow:hidden}.nav-bar ::slotted(*){--kup-button-primary-color:var(--kup_navbar_item_color);--kup-button-primary-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-primary-color-h:var(--kup_navbar_item_color-h);--kup-button-primary-color-s:var(--kup_navbar_item_color-s);--kup-button-primary-color-l:var(--kup_navbar_item_color-l);--kup-switch-label-color:var(--kup_navbar_item_color);--kup-switch-primary-color:var(--kup_navbar_item_color);--kup-switch-primary-color-rgb:var(--kup_navbar_item_color);--kup-textfield-color:var(--kup_navbar_item_color);--kup-textfield-color-rgb:var(--kup_navbar_item_color-rgb);--kup-tree-color:var(--kup_navbar_item_color);--kup-tree-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-text-color:var(--kup-primary-color-0);color:var(--kup_navbar_item_color);fill:var(--kup_navbar_item_color);margin:0}.nav-bar__row{box-sizing:border-box;display:flex;height:var(--kup-navbar-height);position:relative;width:var(--kup_navbar_width)}.nav-bar__section{align-items:center;display:inline-flex;flex:1 1 auto;min-width:0;padding:var(--kup_navbar_padding)}.nav-bar__section--align-start{flex-shrink:5;justify-content:flex-start;order:-1}.nav-bar__section--align-end{justify-content:flex-end;order:1;overflow:hidden}@media screen and (max-width: 678px){.nav-bar{padding:0 var(--kup-space-03)}}::slotted(*){--kup-button-primary-color:var(--kup_navbar_item_color);--kup-button-primary-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-primary-color-h:var(--kup_navbar_item_color-h);--kup-button-primary-color-s:var(--kup_navbar_item_color-s);--kup-button-primary-color-l:var(--kup_navbar_item_color-l);--kup-switch-label-color:var(--kup_navbar_item_color);--kup-switch-primary-color:var(--kup_navbar_item_color);--kup-switch-primary-color-rgb:var(--kup_navbar_item_color);--kup-textfield-color:var(--kup_navbar_item_color);--kup-textfield-color-rgb:var(--kup_navbar_item_color-rgb);--kup-tree-color:var(--kup_navbar_item_color);--kup-tree-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-text-color:var(--kup-primary-color-0);color:var(--kup_navbar_item_color);fill:var(--kup_navbar_item_color);margin:0}";const v=h;const _=class{constructor(r){a(this,r);this.kupNavbarReady=t(this,"kup-navbar-ready",6);this.kupNavbarResize=t(this,"kup-navbar-resize",6);this.kupManager=e();this.customStyle="";this.styling=b.STANDARD}async getProps(a){return p(this,u,a)}async refresh(){r(this)}async resizeCallback(){window.clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout((()=>{this.kupNavbarResize.emit({comp:this,id:this.rootElement.id})}),300)}async setProps(a){s(this,u,a)}content(){const a=Array.prototype.slice.call(this.rootElement.children,0);const t=[];const r=[];for(let i=0;i<a.length;i++){const n=a[i];if(n.slot==="left"){t.push(o("slot",{name:"left"}))}else{r.push(o("slot",{name:"right"}))}}return[t.length?o("section",{class:`${c}__section ${c}__section--align-start`},t):null,r.length?o("section",{class:`${c}__section ${c}__section--align-end`,role:"toolbar"},r):null]}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.kupNavbarReady.emit({comp:this,id:this.rootElement.id});this.kupManager.resize.observe(this.rootElement);this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){return o(i,{key:"b53200bbb8e99b1357a1f12747f22aa1c7e0ef38",class:"header"},o("style",{key:"c84079987ac63f9eabde7379f37c5cb35d0b3134"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"9773a5835ae5514ed277f27c1643ff2de73051b9",id:l},o("header",{key:"11afd8d7c2cbdadd3fb7f991f60d8cacdaa4647a",class:`${c} ${c}--${this.styling.toLowerCase()} `},o("div",{key:"b5724ddecf17ebeafb772a2289378d7783ac5c37",class:`${c}__row`},this.content()))))}disconnectedCallback(){this.kupManager.language.unregister(this);this.kupManager.resize.unobserve(this.rootElement);this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};_.style=v;export{_ as kup_nav_bar};
2
- //# sourceMappingURL=p-674a4d20.entry.js.map
1
+ import{r as a,c as t,f as r,h as o,H as i,d as n}from"./p-d7c15b0e.js";import{k as e,g as p,s}from"./p-8c07fd42.js";import{c as l}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const c="nav-bar";var u;(function(a){a["customStyle"]="Custom style of the component.";a["image"]="Image displayed by the nav bar, uses the kup-image component's props.";a["label"]="Text displayed by the nav bar.";a["showMenuButton"]="When true, the menu button will be displayed on the left of the nav bar.";a["styling"]="Defines the style of the nav bar"})(u||(u={}));var h;(function(a){a["SHORT"]="short";a["STANDARD"]="standard"})(h||(h={}));const b=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{--kup_navbar_item_color:var(\n --kup-navbar-item-color,\n var(--kup-primary-color-0)\n );--kup_navbar_background_color:var(\n --kup-navbar-background-color,\n var(--kup-layer-1-inverted)\n );--kup_navbar_box_shadow:var(\n --kup-navbar-box-shadow,\n 0 2px 4px -1px rgba(128, 128, 128, 0.2),\n 0 4px 5px 0 rgba(128, 128, 128, 0.14),\n 0 1px 10px 0 rgba(128, 128, 128, 0.12)\n );--kup_navbar_position:var(--kup-navbar-position, fixed);--kup_navbar_short_border_radius:var(\n --kup-navbar-short-border-radius,\n 0px 0px 24px\n );--kup_navbar_short_box_shadow:var(\n --kup-navbar-short-box-shadow,\n rgba(128, 128, 128, 0.2) 0px 2px 4px -1px,\n rgba(128, 128, 128, 0.14) 0px 4px 5px 0px,\n rgba(128, 128, 128, 0.12) 0px 1px 10px 0px\n );--kup_navbar_short_width:var(--kup-navbar-short-width, 9em);--kup_navbar_transition:var(--kup-navbar-transition, 250ms);--kup_navbar_width:var(--kup-navbar-width, 100%);box-sizing:border-box;font-size:var(--kup-font-size);left:0;position:var(--kup_navbar_position);top:0;transition:all var(--kup_navbar_transition);width:var(--kup_navbar_width);z-index:var(--kup-navbar-zindex)}#kup-component{width:var(--kup_navbar_width)}.nav-bar{background-color:var(--kup_navbar_background_color);box-sizing:border-box;color:var(--kup_navbar_item_color);display:flex;flex-direction:column;justify-content:space-between;width:var(--kup_navbar_width);padding:0 var(--kup-space-05)}.nav-bar--short{border-radius:var(--kup_navbar_short_border_radius);box-shadow:var(--kup_navbar_short_box_shadow);width:var(--kup_navbar_short_width)}.nav-bar--short .nav-bar__section{padding:0 0.5em}.nav-bar--short section{overflow:hidden}.nav-bar ::slotted(*){--kup-button-primary-color:var(--kup_navbar_item_color);--kup-button-primary-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-primary-color-h:var(--kup_navbar_item_color-h);--kup-button-primary-color-s:var(--kup_navbar_item_color-s);--kup-button-primary-color-l:var(--kup_navbar_item_color-l);--kup-switch-label-color:var(--kup_navbar_item_color);--kup-switch-primary-color:var(--kup_navbar_item_color);--kup-switch-primary-color-rgb:var(--kup_navbar_item_color);--kup-textfield-color:var(--kup_navbar_item_color);--kup-textfield-color-rgb:var(--kup_navbar_item_color-rgb);--kup-tree-color:var(--kup_navbar_item_color);--kup-tree-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-text-color:var(--kup-primary-color-0);color:var(--kup_navbar_item_color);fill:var(--kup_navbar_item_color);margin:0}.nav-bar__row{box-sizing:border-box;display:flex;height:var(--kup-navbar-height);position:relative;width:var(--kup_navbar_width)}.nav-bar__section{align-items:center;display:inline-flex;flex:1 1 auto;min-width:0;padding:var(--kup_navbar_padding)}.nav-bar__section--align-start{flex-shrink:5;justify-content:flex-start;order:-1}.nav-bar__section--align-end{justify-content:flex-end;order:1;overflow:hidden}@media screen and (max-width: 678px){.nav-bar{padding:0 var(--kup-space-03)}}::slotted(*){--kup-button-primary-color:var(--kup_navbar_item_color);--kup-button-primary-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-primary-color-h:var(--kup_navbar_item_color-h);--kup-button-primary-color-s:var(--kup_navbar_item_color-s);--kup-button-primary-color-l:var(--kup_navbar_item_color-l);--kup-switch-label-color:var(--kup_navbar_item_color);--kup-switch-primary-color:var(--kup_navbar_item_color);--kup-switch-primary-color-rgb:var(--kup_navbar_item_color);--kup-textfield-color:var(--kup_navbar_item_color);--kup-textfield-color-rgb:var(--kup_navbar_item_color-rgb);--kup-tree-color:var(--kup_navbar_item_color);--kup-tree-color-rgb:var(--kup_navbar_item_color-rgb);--kup-button-text-color:var(--kup-primary-color-0);color:var(--kup_navbar_item_color);fill:var(--kup_navbar_item_color);margin:0}";const v=b;const _=class{constructor(r){a(this,r);this.kupNavbarReady=t(this,"kup-navbar-ready",6);this.kupNavbarResize=t(this,"kup-navbar-resize",6);this.kupManager=e();this.customStyle="";this.styling=h.STANDARD}async getProps(a){return p(this,u,a)}async refresh(){r(this)}async resizeCallback(){window.clearTimeout(this.resizeTimeout);this.resizeTimeout=window.setTimeout((()=>{this.kupNavbarResize.emit({comp:this,id:this.rootElement.id})}),300)}async setProps(a){s(this,u,a)}content(){const a=Array.prototype.slice.call(this.rootElement.children,0);const t=[];const r=[];for(let i=0;i<a.length;i++){const n=a[i];if(n.slot==="left"){t.push(o("slot",{name:"left"}))}else{r.push(o("slot",{name:"right"}))}}return[t.length?o("section",{class:`${c}__section ${c}__section--align-start`},t):null,r.length?o("section",{class:`${c}__section ${c}__section--align-end`,role:"toolbar"},r):null]}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.kupNavbarReady.emit({comp:this,id:this.rootElement.id});this.kupManager.resize.observe(this.rootElement);this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){return o(i,{key:"0f66ceb53da3d4bdc00787c80ef4764a79d76af8",class:"header"},o("style",{key:"6435752fbe5f0ae68649ea4c43fee53afeb2dbca"},this.kupManager.theme.setKupStyle(this.rootElement)),o("div",{key:"607495825d0febc2dd41dcfecf0ecc78924e4679",id:l},o("header",{key:"21667d9c45e86eab6c011247e1717b757d92dfd4",class:`${c} ${c}--${this.styling.toLowerCase()} `},o("div",{key:"da92e4ddd4ff70b4fa9632233b0345d4843bee60",class:`${c}__row`},this.content()))))}disconnectedCallback(){this.kupManager.language.unregister(this);this.kupManager.resize.unobserve(this.rootElement);this.kupManager.theme.unregister(this)}get rootElement(){return n(this)}};_.style=v;export{_ as kup_nav_bar};
2
+ //# sourceMappingURL=p-b46a4d95.entry.js.map
@@ -1,2 +1,2 @@
1
- import{r as t,f as e,h as i,H as s,d as a}from"./p-d7c15b0e.js";import{k as o,g as n,s as l,h as c,e as p,ap as h,O as r,aq as f,V as u,d}from"./p-8c07fd42.js";import{a as b}from"./p-e3062c19.js";import{F as g}from"./p-2b519589.js";import{c as m}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var k;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Sets the data that will be used to display different components."})(k||(k={}));var x;(function(t){t["BOX"]="Box";t["BUTTON_LIST"]="Button List";t["CHART"]="Chart";t["CHIP"]="Chip";t["ECHART"]="Echart";t["DATATABLE"]="Datatable";t["JSON"]="JSON";t["TREE"]="Tree"})(x||(x={}));const y=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-subtle);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";const v=y;const w=class{constructor(e){t(this,e);this.dragHandler=null;this.kupManager=o();this.textArea=null;this.wrapperRef=null;this.display=x.DATATABLE;this.customStyle="";this.data=null}async getProps(t){return n(this,k,t)}async refresh(){e(this)}async setProps(t){l(this,k,t)}comboboxProps(){const t=[];for(const e in x){if(Object.prototype.hasOwnProperty.call(x,e)){t.push({id:x[e],selected:false,value:x[e]})}}return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:false,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:true,["onKup-combobox-itemclick"]:t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0);const e=[];const s={};if(this.display===x.JSON){s.initialValue=this.data?JSON.stringify(this.data,null,2):"";s.textArea=true;e.push(i("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},s,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})))}else if(!t){e.push(i("div",{class:"empty"},i(g,{sizeY:"100px",resource:"move_to_inbox"}),i("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))))}else{switch(this.display){case x.BOX:s.data=this.data;e.push(i("kup-box",Object.assign({},s)));break;case x.BUTTON_LIST:s.data=this.data;e.push(i("kup-button-list",Object.assign({},s)));break;case x.CHIP:s.data=this.data;e.push(i("kup-chip",Object.assign({},s)));break;case x.CHART:case x.ECHART:s.data=this.data;s["series"]=[];s["axis"]=null;for(let t=0;t<this.data.columns.length;t++){const e=this.data.columns[t];if(e.obj&&this.kupManager.objects.isNumber(e.obj)||s["axis"]!==null){if(this.display===x.CHART){s["series"].push({code:e.name,decode:e.title})}else{s["series"].push(e.name)}}else{s["axis"]=e.name}}if(s["series"].length===0){this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",p.WARNING)}if(!s["axis"]){this.kupManager.debug.logMessage(this,"No axis for the chart!",p.WARNING)}if(this.display===x.CHART){e.push(i("kup-chart",Object.assign({},s)))}else{e.push(i("kup-echart",Object.assign({},s)))}break;case x.DATATABLE:s.data=this.data;s["autoFillMissingCells"]=true;e.push(i("kup-data-table",Object.assign({},s)));break;case x.TREE:s.data=this.data;e.push(i("kup-tree",Object.assign({class:"kup-full-width"},s)));break;default:this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",p.ERROR);return}}return e}updateData(t){{const e=Object.assign({},this.data);const i=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null;const s=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(i&&i.name){if(!e.columns){e.columns=[i]}else{const t=this.data.columns.find((t=>t.name===i.name));if(!t){e.columns.push(i)}}}else{this.kupManager.debug.logMessage(this,"Invalid column received.",p.WARNING)}if(s){if(!e.rows){e.rows=[s]}else{e.rows.push(s)}}this.data=e;if(this.data&&this.textArea){try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(h,(t=>this.updateData(t)));this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle");this.kupManager.interact.dialogify(this.rootElement,this.dragHandler);this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${r}],[${f}]`},{dispatcher:this.rootElement,type:u.MAGICBOX});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){return i(s,{key:"f472c456d846a8db13368b9f54e5a092225f22d3"},i("style",{key:"0d90e35e265af8810a2b5873b7bef9dd48fb9bd8"},this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{key:"87cdb1e3bdcb196b71031c160aa6608dbd298c5c",id:m},i("div",{key:"c99994dc335f14d63208b0fee2b67632c0ff1161",class:"magic-box-wrapper"},i("div",{key:"b318cdac704373547ece7c0a4e770a6b83a1c784",class:"actions",id:"drag-handle"},i("kup-combobox",Object.assign({key:"77800dd052310dade4154a339e08e6e25c0d8cb7"},this.comboboxProps())),i("kup-button",{key:"ad5e58acb8806b8f9f271e9ed33aa61f5ec0d0cd",styling:b.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),i("kup-button",{key:"243a20cf6a6bbd9182290d4bdf6994386bf79d94",id:"close-dialog",customStyle:`:host{${d.PRIMARY}: var(${d.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),i("div",{key:"35cae487666a6cadd2e205971b080692a84e2d7f",class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]);this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this)}get rootElement(){return a(this)}};w.style=v;export{w as kup_magic_box};
2
- //# sourceMappingURL=p-246e4816.entry.js.map
1
+ import{r as t,f as e,h as i,H as a,d as s}from"./p-d7c15b0e.js";import{k as o,g as n,s as l,h as c,e as p,ap as h,O as f,aq as r,V as u,d}from"./p-8c07fd42.js";import{a as g}from"./p-e3062c19.js";import{F as m}from"./p-2b519589.js";import{c as k}from"./p-635bb4b3.js";import"./p-029c7cbe.js";var b;(function(t){t["customStyle"]="Custom style of the component.";t["data"]="Sets the data that will be used to display different components."})(b||(b={}));var x;(function(t){t["BOX"]="Box";t["BUTTON_LIST"]="Button List";t["CHART"]="Chart";t["CHIP"]="Chip";t["ECHART"]="Echart";t["DATATABLE"]="Datatable";t["JSON"]="JSON";t["TREE"]="Tree"})(x||(x={}));const y=".kup-body-compact-01{font-family:var(--kup-font-family);font-size:var(--kup-body-compact-01-font-size, 14px);line-height:18px;font-weight:400;letter-spacing:0.16px}.kup-body-01{font-family:var(--kup-font-family);font-size:var(--kup-body-01-font-size, 14px);line-height:20px;font-weight:400;letter-spacing:0.16px}.kup-code-01{font-family:var(--kup-font-family-monospace);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-label-01{font-family:var(--kup-font-family);font-size:12px;line-height:16px;font-weight:400;letter-spacing:0.32px}.kup-caption-02{font-family:var(--kup-font-family);font-size:12px;line-height:15px;font-weight:500;letter-spacing:1px}.kup-caption-01{font-family:var(--kup-font-family);font-size:10px;line-height:13px;font-weight:400;letter-spacing:1px}.kup-small-label-01{font-family:var(--kup-font-family);font-size:6px;line-height:9px;font-weight:400;letter-spacing:1px}.kup-heading-compact-01{font-family:var(--kup-font-family);font-size:14px;line-height:18px;font-weight:600;letter-spacing:0.16px}.kup-heading-01{font-family:var(--kup-font-family);font-size:14px;line-height:20px;font-weight:600;letter-spacing:0.16px}.kup-heading-02{font-family:var(--kup-font-family);font-size:16px;line-height:24px;font-weight:500;letter-spacing:0}.kup-heading-03{font-family:var(--kup-font-family);font-size:20px;line-height:28px;font-weight:400;letter-spacing:0}.kup-heading-04{font-family:var(--kup-font-family);font-size:28px;line-height:36px;font-weight:400;letter-spacing:0}.kup-heading-05{font-family:var(--kup-font-family);font-size:32px;line-height:40px;font-weight:300;letter-spacing:0}.kup-heading-06{font-family:var(--kup-font-family);font-size:42px;line-height:50px;font-weight:300;letter-spacing:0}.kup-heading-07{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:300;letter-spacing:0}.kup-heading-08{font-family:var(--kup-font-family);font-size:54px;line-height:64px;font-weight:600;letter-spacing:0}:host{background-color:var(--kup-background-color);color:var(--kup-text-color);display:block;height:300px;min-width:700px;width:700px}#kup-component,.magic-box-wrapper{height:100%;width:100%}.magic-box-wrapper{border:3px dashed var(--kup-border-subtle);box-sizing:border-box;display:flex;flex-direction:column}.actions{align-items:center;background-color:var(--kup-title-background-color);display:inline-flex;height:52px;justify-content:center;left:0;position:absolute;top:0;width:100%;z-index:1}.actions kup-button{margin:0.5em}.actions #comp-switcher{margin:auto 0}.actions #close-dialog{position:absolute;margin:0;top:0;right:0;background-color:var(--kup-title-background-color)}.content{box-sizing:border-box;height:100%;margin-top:52px;overflow:auto;transition:background-color 125ms ease}.empty{flex-direction:column;display:flex;text-align:center;justify-content:center;height:100%;width:100%;opacity:0.5;transition:opacity 0.25s ease-out}.empty .f-image{margin:0}.json{font-family:var(--kup-font-family-monospace);margin:0}[kup-drag-over]{background-color:rgba(var(--kup-success-color-rgb), 0.25)}";const v=y;const w=class{constructor(e){t(this,e);this.dragHandler=null;this.kupManager=o();this.textArea=null;this.wrapperRef=null;this.display=x.DATATABLE;this.customStyle="";this.data=null}async getProps(t){return n(this,b,t)}async refresh(){e(this)}async setProps(t){l(this,b,t)}comboboxProps(){const t=[];for(const e in x){if(Object.prototype.hasOwnProperty.call(x,e)){t.push({id:x[e],selected:false,value:x[e]})}}return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:false,inputType:"text",label:this.kupManager.language.translate(c.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:true,["onKup-combobox-itemclick"]:t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0);const e=[];const a={};if(this.display===x.JSON){a.initialValue=this.data?JSON.stringify(this.data,null,2):"";a.textArea=true;e.push(i("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},a,{ref:t=>this.textArea=t,"onkup-textfield-input":t=>{try{this.data=JSON.parse(t.detail.value)}catch(t){this.data={columns:[{name:"ERROR",title:"Error"}],rows:[{cells:{ERROR:{value:"Invalid JSON:"+t}}}]}}}})))}else if(!t){e.push(i("div",{class:"empty"},i(m,{sizeY:"100px",resource:"move_to_inbox"}),i("div",{class:"empty-text"},this.kupManager.language.translate(c.DROP_YOUR_DATA))))}else{switch(this.display){case x.BOX:a.data=this.data;e.push(i("kup-box",Object.assign({},a)));break;case x.BUTTON_LIST:a.data=this.data;e.push(i("kup-button-list",Object.assign({},a)));break;case x.CHIP:a.data=this.data;e.push(i("kup-chip",Object.assign({},a)));break;case x.CHART:case x.ECHART:a.data=this.data;a["series"]=[];a["axis"]=null;for(let t=0;t<this.data.columns.length;t++){const e=this.data.columns[t];if(e.obj&&this.kupManager.objects.isNumber(e.obj)||a["axis"]!==null){if(this.display===x.CHART){a["series"].push({code:e.name,decode:e.title})}else{a["series"].push(e.name)}}else{a["axis"]=e.name}}if(a["series"].length===0){this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",p.WARNING)}if(!a["axis"]){this.kupManager.debug.logMessage(this,"No axis for the chart!",p.WARNING)}if(this.display===x.CHART){e.push(i("kup-chart",Object.assign({},a)))}else{e.push(i("kup-echart",Object.assign({},a)))}break;case x.DATATABLE:a.data=this.data;a["autoFillMissingCells"]=true;e.push(i("kup-data-table",Object.assign({},a)));break;case x.TREE:a.data=this.data;e.push(i("kup-tree",Object.assign({class:"kup-full-width"},a)));break;default:this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",p.ERROR);return}}return e}updateData(t){{const e=Object.assign({},this.data);const i=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null;const a=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(i&&i.name){if(!e.columns){e.columns=[i]}else{const t=this.data.columns.find((t=>t.name===i.name));if(!t){e.columns.push(i)}}}else{this.kupManager.debug.logMessage(this,"Invalid column received.",p.WARNING)}if(a){if(!e.rows){e.rows=[a]}else{e.rows.push(a)}}this.data=e;if(this.data&&this.textArea){try{this.textArea.setValue(JSON.stringify(this.data,null,2))}catch(t){this.textArea.setValue("Invalid JSON:"+t)}}}}componentWillLoad(){this.kupManager.debug.logLoad(this,false);this.kupManager.language.register(this);this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(h,(t=>this.updateData(t)));this.dragHandler=this.rootElement.shadowRoot.querySelector("#drag-handle");this.kupManager.interact.dialogify(this.rootElement,this.dragHandler);this.kupManager.interact.dropzone(this.wrapperRef,{accept:`[${f}],[${r}]`},{dispatcher:this.rootElement,type:u.MAGICBOX});this.kupManager.debug.logLoad(this,true)}componentWillRender(){this.kupManager.debug.logRender(this,false)}componentDidRender(){this.kupManager.debug.logRender(this,true)}render(){return i(a,{key:"8f04a5029dad9d7d8f3673124a6fb954880719d5"},i("style",{key:"af43ffc44c345efb6982aecac7ffeb7469a1e1ab"},this.kupManager.theme.setKupStyle(this.rootElement)),i("div",{key:"4da32884b8cfaee501fe98de3ad61dbfd40644f1",id:k},i("div",{key:"3ae6ee9f2ee07d1ace113fe223bf45fe907eb1d2",class:"magic-box-wrapper"},i("div",{key:"7331459e7beeecbad1f94907c5dfc37e6fd77221",class:"actions",id:"drag-handle"},i("kup-combobox",Object.assign({key:"cf49975df5a5aa923c031c64ecee9a81ae4ad0bc"},this.comboboxProps())),i("kup-button",{key:"9268ce09ec663aa4e00a82ba0fadef493422d12f",styling:g.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),i("kup-button",{key:"3724463433b93aa9ae13ae19d67be8fc39c702f6",id:"close-dialog",customStyle:`:host{${d.PRIMARY}: var(${d.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),i("div",{key:"448858d039c7cd0ea8e756d9ad66af2b3baf5c52",class:"content",ref:t=>this.wrapperRef=t},this.setContent()))))}disconnectedCallback(){this.kupManager.interact.unregister([this.rootElement,this.wrapperRef]);this.kupManager.language.unregister(this);this.kupManager.theme.unregister(this)}get rootElement(){return s(this)}};w.style=v;export{w as kup_magic_box};
2
+ //# sourceMappingURL=p-b849ae30.entry.js.map
@@ -0,0 +1,2 @@
1
+ import{r as s,f as t,h as i,H as e,d as h}from"./p-d7c15b0e.js";import{k as l}from"./p-8c07fd42.js";import{c}from"./p-635bb4b3.js";import"./p-029c7cbe.js";const o=class{constructor(t){s(this,t);this.kupManager=l();this.startTime=performance.now();this.featuresStartTime=null;this.endTime=null;this.content=null;this.customStyle="";this.features={debug:false,language:false,longCycleProp:false,longCycleVar:false,objects:false,objectsFunction:false,theme:false}}async printLifecycleTime(){const s=this.endTime-this.featuresStartTime;const t=this.endTime-this.startTime;this.content="Full lifecycle of this probe ("+this.rootElement.tagName+"#"+this.rootElement.id+") took "+t+"ms, while features took "+s+"ms.";return{id:this.rootElement.id,fullTime:t,featuresTime:s}}async refresh(){t(this)}longCycleProp(){}longCycleVar(){}longCycleObjects(){for(let s=0;s<1e6;s++){this.kupManager.objects.isNumber({t:"NR",p:"",k:""})}}longCycleObjectsFunction(){}componentWillLoad(){this.featuresStartTime=performance.now();if(this.features.debug){this.kupManager.debug.logLoad(this,false)}if(this.features.language){this.kupManager.language.register(this)}if(this.features.longCycleProp){this.longCycleProp()}if(this.features.longCycleVar){this.longCycleVar()}if(this.features.objects){this.longCycleObjects()}if(this.features.objectsFunction){this.longCycleObjectsFunction()}if(this.features.theme){this.kupManager.theme.register(this)}}componentDidLoad(){if(this.features.debug){this.kupManager.debug.logLoad(this,true)}this.endTime=performance.now()}componentWillRender(){if(this.features.debug){this.kupManager.debug.logRender(this,false)}}componentDidRender(){if(this.features.debug){this.kupManager.debug.logRender(this,true)}}render(){let s=null;if(this.features.theme){s=this.kupManager.theme.setKupStyle(this.rootElement)}return i(e,{key:"8d7afacda7cc4439039c941af5d9150ed668d03f"},s?i("style",null,s):null,i("div",{key:"4a15796d3c5cc632b326bddef692c640edc1c366",id:c},this.content))}disconnectedCallback(){if(this.features.language){this.kupManager.language.unregister(this)}if(this.features.theme){this.kupManager.theme.unregister(this)}}get rootElement(){return h(this)}};export{o as kup_probe};
2
+ //# sourceMappingURL=p-bb4e26cb.entry.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["KupProbe","this","kupManager","kupManagerInstance","startTime","performance","now","featuresStartTime","endTime","debug","language","longCycleProp","longCycleVar","objects","objectsFunction","theme","printLifecycleTime","featuresTime","fullTime","content","rootElement","tagName","id","refresh","forceUpdate","longCycleObjects","index","isNumber","t","p","k","longCycleObjectsFunction","componentWillLoad","features","logLoad","register","componentDidLoad","componentWillRender","logRender","componentDidRender","render","customStyle","setKupStyle","h","Host","key","componentWrapperId","disconnectedCallback","unregister"],"sources":["src/components/kup-probe/kup-probe.tsx"],"sourcesContent":["import {\n Component,\n Element,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport { KupComponent } from '../../types/GenericTypes';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { KupObj } from '../../managers/kup-objects/kup-objects-declarations';\nimport { componentWrapperId } from '../../variables/GenericVariables';\n\n@Component({\n tag: 'kup-probe',\n shadow: true,\n})\nexport class KupProbe {\n /**\n * References the root HTML element of the component (<kup-probe>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* S t a t e s */\n /*-------------------------------------------------*/\n\n /**\n * Lifecycle time.\n * @default null\n */\n @State() content: string = null;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle: string = '';\n /**\n * Specify features to test.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() features: {\n debug: boolean;\n language: boolean;\n longCycleProp: boolean;\n longCycleVar: boolean;\n objects: boolean;\n objectsFunction: boolean;\n theme: boolean;\n } = {\n debug: false,\n language: false,\n longCycleProp: false,\n longCycleVar: false,\n objects: false,\n objectsFunction: false,\n theme: false,\n };\n /**\n * Uncomment the code below to test render times with many props (100).\n */\n /*\n @Prop({ reflect: true }) test001 = 'null';\n @Prop({ reflect: true }) test002 = 'null';\n @Prop({ reflect: true }) test003 = 'null';\n @Prop({ reflect: true }) test004 = 'null';\n @Prop({ reflect: true }) test005 = 'null';\n @Prop({ reflect: true }) test006 = 'null';\n @Prop({ reflect: true }) test007 = 'null';\n @Prop({ reflect: true }) test008 = 'null';\n @Prop({ reflect: true }) test009 = 'null';\n @Prop({ reflect: true }) test010 = 'null';\n @Prop({ reflect: true }) test011 = 'null';\n @Prop({ reflect: true }) test012 = 'null';\n @Prop({ reflect: true }) test013 = 'null';\n @Prop({ reflect: true }) test014 = 'null';\n @Prop({ reflect: true }) test015 = 'null';\n @Prop({ reflect: true }) test016 = 'null';\n @Prop({ reflect: true }) test017 = 'null';\n @Prop({ reflect: true }) test018 = 'null';\n @Prop({ reflect: true }) test019 = 'null';\n @Prop({ reflect: true }) test020 = 'null';\n @Prop({ reflect: true }) test021 = 'null';\n @Prop({ reflect: true }) test022 = 'null';\n @Prop({ reflect: true }) test023 = 'null';\n @Prop({ reflect: true }) test024 = 'null';\n @Prop({ reflect: true }) test025 = 'null';\n @Prop({ reflect: true }) test026 = 'null';\n @Prop({ reflect: true }) test027 = 'null';\n @Prop({ reflect: true }) test028 = 'null';\n @Prop({ reflect: true }) test029 = 'null';\n @Prop({ reflect: true }) test030 = 'null';\n @Prop({ reflect: true }) test031 = 'null';\n @Prop({ reflect: true }) test032 = 'null';\n @Prop({ reflect: true }) test033 = 'null';\n @Prop({ reflect: true }) test034 = 'null';\n @Prop({ reflect: true }) test035 = 'null';\n @Prop({ reflect: true }) test036 = 'null';\n @Prop({ reflect: true }) test037 = 'null';\n @Prop({ reflect: true }) test038 = 'null';\n @Prop({ reflect: true }) test039 = 'null';\n @Prop({ reflect: true }) test040 = 'null';\n @Prop({ reflect: true }) test041 = 'null';\n @Prop({ reflect: true }) test042 = 'null';\n @Prop({ reflect: true }) test043 = 'null';\n @Prop({ reflect: true }) test044 = 'null';\n @Prop({ reflect: true }) test045 = 'null';\n @Prop({ reflect: true }) test046 = 'null';\n @Prop({ reflect: true }) test047 = 'null';\n @Prop({ reflect: true }) test048 = 'null';\n @Prop({ reflect: true }) test049 = 'null';\n @Prop({ reflect: true }) test050 = 'null';\n @Prop({ reflect: true }) test051 = 'null';\n @Prop({ reflect: true }) test052 = 'null';\n @Prop({ reflect: true }) test053 = 'null';\n @Prop({ reflect: true }) test054 = 'null';\n @Prop({ reflect: true }) test055 = 'null';\n @Prop({ reflect: true }) test056 = 'null';\n @Prop({ reflect: true }) test057 = 'null';\n @Prop({ reflect: true }) test058 = 'null';\n @Prop({ reflect: true }) test059 = 'null';\n @Prop({ reflect: true }) test060 = 'null';\n @Prop({ reflect: true }) test061 = 'null';\n @Prop({ reflect: true }) test062 = 'null';\n @Prop({ reflect: true }) test063 = 'null';\n @Prop({ reflect: true }) test064 = 'null';\n @Prop({ reflect: true }) test065 = 'null';\n @Prop({ reflect: true }) test066 = 'null';\n @Prop({ reflect: true }) test067 = 'null';\n @Prop({ reflect: true }) test068 = 'null';\n @Prop({ reflect: true }) test069 = 'null';\n @Prop({ reflect: true }) test070 = 'null';\n @Prop({ reflect: true }) test071 = 'null';\n @Prop({ reflect: true }) test072 = 'null';\n @Prop({ reflect: true }) test073 = 'null';\n @Prop({ reflect: true }) test074 = 'null';\n @Prop({ reflect: true }) test075 = 'null';\n @Prop({ reflect: true }) test076 = 'null';\n @Prop({ reflect: true }) test077 = 'null';\n @Prop({ reflect: true }) test078 = 'null';\n @Prop({ reflect: true }) test079 = 'null';\n @Prop({ reflect: true }) test080 = 'null';\n @Prop({ reflect: true }) test081 = 'null';\n @Prop({ reflect: true }) test082 = 'null';\n @Prop({ reflect: true }) test083 = 'null';\n @Prop({ reflect: true }) test084 = 'null';\n @Prop({ reflect: true }) test085 = 'null';\n @Prop({ reflect: true }) test086 = 'null';\n @Prop({ reflect: true }) test087 = 'null';\n @Prop({ reflect: true }) test088 = 'null';\n @Prop({ reflect: true }) test089 = 'null';\n @Prop({ reflect: true }) test090 = 'null';\n @Prop({ reflect: true }) test091 = 'null';\n @Prop({ reflect: true }) test092 = 'null';\n @Prop({ reflect: true }) test093 = 'null';\n @Prop({ reflect: true }) test094 = 'null';\n @Prop({ reflect: true }) test095 = 'null';\n @Prop({ reflect: true }) test096 = 'null';\n @Prop({ reflect: true }) test097 = 'null';\n @Prop({ reflect: true }) test098 = 'null';\n @Prop({ reflect: true }) test099 = 'null';\n @Prop({ reflect: true }) test100 = 'null';\n */\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n /**\n * Instance of the KupManager class.\n */\n private kupManager: KupManager = kupManagerInstance();\n /**\n * Start performance.now()\n */\n private startTime: number = performance.now();\n /**\n * Start performance.now() inside componentWillLoad() lifecycle hook - to measure actual features\n */\n private featuresStartTime: number = null;\n /**\n * End performance.now()\n */\n private endTime: number = null;\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async printLifecycleTime(): Promise<{\n id: string;\n featuresTime: number;\n fullTime: number;\n }> {\n const featuresTime: number = this.endTime - this.featuresStartTime;\n const fullTime: number = this.endTime - this.startTime;\n this.content =\n 'Full lifecycle of this probe (' +\n this.rootElement.tagName +\n '#' +\n this.rootElement.id +\n ') took ' +\n fullTime +\n 'ms, while features took ' +\n featuresTime +\n 'ms.';\n return {\n id: this.rootElement.id,\n fullTime: fullTime,\n featuresTime: featuresTime,\n };\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n private longCycleProp() {\n let b: string = null;\n for (let index = 0; index < 1000000; index++) {\n b = this.customStyle;\n }\n }\n\n private longCycleVar() {\n const a: string = this.customStyle;\n let b: string = null;\n for (let index = 0; index < 1000000; index++) {\n b = a;\n }\n }\n\n private longCycleObjects() {\n let b: boolean = null;\n for (let index = 0; index < 1000000; index++) {\n b = this.kupManager.objects.isNumber({ t: 'NR', p: '', k: '' });\n }\n }\n\n private longCycleObjectsFunction() {\n let b: boolean = null;\n for (let index = 0; index < 1000000; index++) {\n b = isNumber({ t: 'NR', p: '', k: '' });\n }\n function isNumber(obj: KupObj): boolean {\n if (obj == null) return false;\n return 'NR' === obj.t;\n }\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.featuresStartTime = performance.now();\n if (this.features.debug) {\n this.kupManager.debug.logLoad(this, false);\n }\n if (this.features.language) {\n this.kupManager.language.register(this);\n }\n if (this.features.longCycleProp) {\n this.longCycleProp();\n }\n if (this.features.longCycleVar) {\n this.longCycleVar();\n }\n if (this.features.objects) {\n this.longCycleObjects();\n }\n if (this.features.objectsFunction) {\n this.longCycleObjectsFunction();\n }\n if (this.features.theme) {\n this.kupManager.theme.register(this);\n }\n }\n\n componentDidLoad() {\n if (this.features.debug) {\n this.kupManager.debug.logLoad(this, true);\n }\n this.endTime = performance.now();\n }\n\n componentWillRender() {\n if (this.features.debug) {\n this.kupManager.debug.logRender(this, false);\n }\n }\n\n componentDidRender() {\n if (this.features.debug) {\n this.kupManager.debug.logRender(this, true);\n }\n }\n\n render() {\n let customStyle: string = null;\n\n if (this.features.theme) {\n customStyle = this.kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n );\n }\n\n return (\n <Host>\n {customStyle ? <style>{customStyle}</style> : null}\n <div id={componentWrapperId}>{this.content}</div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.features.language) {\n this.kupManager.language.unregister(this);\n }\n if (this.features.theme) {\n this.kupManager.theme.unregister(this);\n }\n }\n}\n"],"mappings":"sKAsBaA,EAAQ,M,yBAgKTC,KAAAC,WAAyBC,IAIzBF,KAAAG,UAAoBC,YAAYC,MAIhCL,KAAAM,kBAA4B,KAI5BN,KAAAO,QAAkB,K,aA9JC,K,iBAWG,G,cAc1B,CACAC,MAAO,MACPC,SAAU,MACVC,cAAe,MACfC,aAAc,MACdC,QAAS,MACTC,gBAAiB,MACjBC,MAAO,M,CAwIX,wBAAMC,GAKF,MAAMC,EAAuBhB,KAAKO,QAAUP,KAAKM,kBACjD,MAAMW,EAAmBjB,KAAKO,QAAUP,KAAKG,UAC7CH,KAAKkB,QACD,iCACAlB,KAAKmB,YAAYC,QACjB,IACApB,KAAKmB,YAAYE,GACjB,UACAJ,EACA,2BACAD,EACA,MACJ,MAAO,CACHK,GAAIrB,KAAKmB,YAAYE,GACrBJ,SAAUA,EACVD,aAAcA,E,CAOtB,aAAMM,GACFC,EAAYvB,K,CAOR,aAAAU,G,CAOA,YAAAC,G,CAQA,gBAAAa,GAEJ,IAAK,IAAIC,EAAQ,EAAGA,EAAQ,IAASA,IAAS,CACtCzB,KAAKC,WAAWW,QAAQc,SAAS,CAAEC,EAAG,KAAMC,EAAG,GAAIC,EAAG,I,EAI1D,wBAAAC,G,CAeR,iBAAAC,GACI/B,KAAKM,kBAAoBF,YAAYC,MACrC,GAAIL,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAMyB,QAAQjC,KAAM,M,CAExC,GAAIA,KAAKgC,SAASvB,SAAU,CACxBT,KAAKC,WAAWQ,SAASyB,SAASlC,K,CAEtC,GAAIA,KAAKgC,SAAStB,cAAe,CAC7BV,KAAKU,e,CAET,GAAIV,KAAKgC,SAASrB,aAAc,CAC5BX,KAAKW,c,CAET,GAAIX,KAAKgC,SAASpB,QAAS,CACvBZ,KAAKwB,kB,CAET,GAAIxB,KAAKgC,SAASnB,gBAAiB,CAC/Bb,KAAK8B,0B,CAET,GAAI9B,KAAKgC,SAASlB,MAAO,CACrBd,KAAKC,WAAWa,MAAMoB,SAASlC,K,EAIvC,gBAAAmC,GACI,GAAInC,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAMyB,QAAQjC,KAAM,K,CAExCA,KAAKO,QAAUH,YAAYC,K,CAG/B,mBAAA+B,GACI,GAAIpC,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAM6B,UAAUrC,KAAM,M,EAI9C,kBAAAsC,GACI,GAAItC,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAM6B,UAAUrC,KAAM,K,EAI9C,MAAAuC,GACI,IAAIC,EAAsB,KAE1B,GAAIxC,KAAKgC,SAASlB,MAAO,CACrB0B,EAAcxC,KAAKC,WAAWa,MAAM2B,YAChCzC,KAAKmB,Y,CAIb,OACIuB,EAACC,EAAI,CAAAC,IAAA,4CACAJ,EAAcE,EAAA,aAAQF,GAAuB,KAC9CE,EAAA,OAAAE,IAAA,2CAAKvB,GAAIwB,GAAqB7C,KAAKkB,S,CAK/C,oBAAA4B,GACI,GAAI9C,KAAKgC,SAASvB,SAAU,CACxBT,KAAKC,WAAWQ,SAASsC,WAAW/C,K,CAExC,GAAIA,KAAKgC,SAASlB,MAAO,CACrBd,KAAKC,WAAWa,MAAMiC,WAAW/C,K","ignoreList":[]}
1
+ {"version":3,"names":["KupProbe","this","kupManager","kupManagerInstance","startTime","performance","now","featuresStartTime","endTime","debug","language","longCycleProp","longCycleVar","objects","objectsFunction","theme","printLifecycleTime","featuresTime","fullTime","content","rootElement","tagName","id","refresh","forceUpdate","longCycleObjects","index","isNumber","t","p","k","longCycleObjectsFunction","componentWillLoad","features","logLoad","register","componentDidLoad","componentWillRender","logRender","componentDidRender","render","customStyle","setKupStyle","h","Host","key","componentWrapperId","disconnectedCallback","unregister"],"sources":["src/components/kup-probe/kup-probe.tsx"],"sourcesContent":["import {\n Component,\n Element,\n forceUpdate,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport { KupComponent } from '../../types/GenericTypes';\nimport {\n KupManager,\n kupManagerInstance,\n} from '../../managers/kup-manager/kup-manager';\nimport { KupObj } from '../../managers/kup-objects/kup-objects-declarations';\nimport { componentWrapperId } from '../../variables/GenericVariables';\n\n@Component({\n tag: 'kup-probe',\n shadow: true,\n})\nexport class KupProbe {\n /**\n * References the root HTML element of the component (<kup-probe>).\n */\n @Element() rootElement: HTMLElement;\n\n /*-------------------------------------------------*/\n /* S t a t e s */\n /*-------------------------------------------------*/\n\n /**\n * Lifecycle time.\n * @default null\n */\n @State() content: string = null;\n\n /*-------------------------------------------------*/\n /* P r o p s */\n /*-------------------------------------------------*/\n\n /**\n * Custom style of the component.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() customStyle: string = '';\n /**\n * Specify features to test.\n * @default \"\"\n * @see https://smeup.github.io/ketchup/#/customization\n */\n @Prop() features: {\n debug: boolean;\n language: boolean;\n longCycleProp: boolean;\n longCycleVar: boolean;\n objects: boolean;\n objectsFunction: boolean;\n theme: boolean;\n } = {\n debug: false,\n language: false,\n longCycleProp: false,\n longCycleVar: false,\n objects: false,\n objectsFunction: false,\n theme: false,\n };\n /**\n * Uncomment the code below to test render times with many props (100).\n */\n /*\n @Prop({ reflect: true }) test001 = 'null';\n @Prop({ reflect: true }) test002 = 'null';\n @Prop({ reflect: true }) test003 = 'null';\n @Prop({ reflect: true }) test004 = 'null';\n @Prop({ reflect: true }) test005 = 'null';\n @Prop({ reflect: true }) test006 = 'null';\n @Prop({ reflect: true }) test007 = 'null';\n @Prop({ reflect: true }) test008 = 'null';\n @Prop({ reflect: true }) test009 = 'null';\n @Prop({ reflect: true }) test010 = 'null';\n @Prop({ reflect: true }) test011 = 'null';\n @Prop({ reflect: true }) test012 = 'null';\n @Prop({ reflect: true }) test013 = 'null';\n @Prop({ reflect: true }) test014 = 'null';\n @Prop({ reflect: true }) test015 = 'null';\n @Prop({ reflect: true }) test016 = 'null';\n @Prop({ reflect: true }) test017 = 'null';\n @Prop({ reflect: true }) test018 = 'null';\n @Prop({ reflect: true }) test019 = 'null';\n @Prop({ reflect: true }) test020 = 'null';\n @Prop({ reflect: true }) test021 = 'null';\n @Prop({ reflect: true }) test022 = 'null';\n @Prop({ reflect: true }) test023 = 'null';\n @Prop({ reflect: true }) test024 = 'null';\n @Prop({ reflect: true }) test025 = 'null';\n @Prop({ reflect: true }) test026 = 'null';\n @Prop({ reflect: true }) test027 = 'null';\n @Prop({ reflect: true }) test028 = 'null';\n @Prop({ reflect: true }) test029 = 'null';\n @Prop({ reflect: true }) test030 = 'null';\n @Prop({ reflect: true }) test031 = 'null';\n @Prop({ reflect: true }) test032 = 'null';\n @Prop({ reflect: true }) test033 = 'null';\n @Prop({ reflect: true }) test034 = 'null';\n @Prop({ reflect: true }) test035 = 'null';\n @Prop({ reflect: true }) test036 = 'null';\n @Prop({ reflect: true }) test037 = 'null';\n @Prop({ reflect: true }) test038 = 'null';\n @Prop({ reflect: true }) test039 = 'null';\n @Prop({ reflect: true }) test040 = 'null';\n @Prop({ reflect: true }) test041 = 'null';\n @Prop({ reflect: true }) test042 = 'null';\n @Prop({ reflect: true }) test043 = 'null';\n @Prop({ reflect: true }) test044 = 'null';\n @Prop({ reflect: true }) test045 = 'null';\n @Prop({ reflect: true }) test046 = 'null';\n @Prop({ reflect: true }) test047 = 'null';\n @Prop({ reflect: true }) test048 = 'null';\n @Prop({ reflect: true }) test049 = 'null';\n @Prop({ reflect: true }) test050 = 'null';\n @Prop({ reflect: true }) test051 = 'null';\n @Prop({ reflect: true }) test052 = 'null';\n @Prop({ reflect: true }) test053 = 'null';\n @Prop({ reflect: true }) test054 = 'null';\n @Prop({ reflect: true }) test055 = 'null';\n @Prop({ reflect: true }) test056 = 'null';\n @Prop({ reflect: true }) test057 = 'null';\n @Prop({ reflect: true }) test058 = 'null';\n @Prop({ reflect: true }) test059 = 'null';\n @Prop({ reflect: true }) test060 = 'null';\n @Prop({ reflect: true }) test061 = 'null';\n @Prop({ reflect: true }) test062 = 'null';\n @Prop({ reflect: true }) test063 = 'null';\n @Prop({ reflect: true }) test064 = 'null';\n @Prop({ reflect: true }) test065 = 'null';\n @Prop({ reflect: true }) test066 = 'null';\n @Prop({ reflect: true }) test067 = 'null';\n @Prop({ reflect: true }) test068 = 'null';\n @Prop({ reflect: true }) test069 = 'null';\n @Prop({ reflect: true }) test070 = 'null';\n @Prop({ reflect: true }) test071 = 'null';\n @Prop({ reflect: true }) test072 = 'null';\n @Prop({ reflect: true }) test073 = 'null';\n @Prop({ reflect: true }) test074 = 'null';\n @Prop({ reflect: true }) test075 = 'null';\n @Prop({ reflect: true }) test076 = 'null';\n @Prop({ reflect: true }) test077 = 'null';\n @Prop({ reflect: true }) test078 = 'null';\n @Prop({ reflect: true }) test079 = 'null';\n @Prop({ reflect: true }) test080 = 'null';\n @Prop({ reflect: true }) test081 = 'null';\n @Prop({ reflect: true }) test082 = 'null';\n @Prop({ reflect: true }) test083 = 'null';\n @Prop({ reflect: true }) test084 = 'null';\n @Prop({ reflect: true }) test085 = 'null';\n @Prop({ reflect: true }) test086 = 'null';\n @Prop({ reflect: true }) test087 = 'null';\n @Prop({ reflect: true }) test088 = 'null';\n @Prop({ reflect: true }) test089 = 'null';\n @Prop({ reflect: true }) test090 = 'null';\n @Prop({ reflect: true }) test091 = 'null';\n @Prop({ reflect: true }) test092 = 'null';\n @Prop({ reflect: true }) test093 = 'null';\n @Prop({ reflect: true }) test094 = 'null';\n @Prop({ reflect: true }) test095 = 'null';\n @Prop({ reflect: true }) test096 = 'null';\n @Prop({ reflect: true }) test097 = 'null';\n @Prop({ reflect: true }) test098 = 'null';\n @Prop({ reflect: true }) test099 = 'null';\n @Prop({ reflect: true }) test100 = 'null';\n */\n /*-------------------------------------------------*/\n /* I n t e r n a l V a r i a b l e s */\n /*-------------------------------------------------*/\n\n /**\n * Instance of the KupManager class.\n */\n private kupManager: KupManager = kupManagerInstance();\n /**\n * Start performance.now()\n */\n private startTime: number = performance.now();\n /**\n * Start performance.now() inside componentWillLoad() lifecycle hook - to measure actual features\n */\n private featuresStartTime: number = null;\n /**\n * End performance.now()\n */\n private endTime: number = null;\n\n /*-------------------------------------------------*/\n /* P u b l i c M e t h o d s */\n /*-------------------------------------------------*/\n\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async printLifecycleTime(): Promise<{\n id: string;\n featuresTime: number;\n fullTime: number;\n }> {\n const featuresTime: number = this.endTime - this.featuresStartTime;\n const fullTime: number = this.endTime - this.startTime;\n this.content =\n 'Full lifecycle of this probe (' +\n this.rootElement.tagName +\n '#' +\n this.rootElement.id +\n ') took ' +\n fullTime +\n 'ms, while features took ' +\n featuresTime +\n 'ms.';\n return {\n id: this.rootElement.id,\n fullTime: fullTime,\n featuresTime: featuresTime,\n };\n }\n /**\n * This method is used to trigger a new render of the component.\n */\n @Method()\n async refresh(): Promise<void> {\n forceUpdate(this);\n }\n\n /*-------------------------------------------------*/\n /* P r i v a t e M e t h o d s */\n /*-------------------------------------------------*/\n\n private longCycleProp() {\n let b: string = null;\n for (let index = 0; index < 1000000; index++) {\n b = this.customStyle;\n }\n }\n\n private longCycleVar() {\n const a: string = this.customStyle;\n let b: string = null;\n for (let index = 0; index < 1000000; index++) {\n b = a;\n }\n }\n\n private longCycleObjects() {\n let b: boolean = null;\n for (let index = 0; index < 1000000; index++) {\n b = this.kupManager.objects.isNumber({ t: 'NR', p: '', k: '' });\n }\n }\n\n private longCycleObjectsFunction() {\n let b: boolean = null;\n for (let index = 0; index < 1000000; index++) {\n b = isNumber({ t: 'NR', p: '', k: '' });\n }\n function isNumber(obj: KupObj): boolean {\n if (obj == null) return false;\n return 'NR' === obj.t;\n }\n }\n\n /*-------------------------------------------------*/\n /* L i f e c y c l e H o o k s */\n /*-------------------------------------------------*/\n\n componentWillLoad() {\n this.featuresStartTime = performance.now();\n if (this.features.debug) {\n this.kupManager.debug.logLoad(this, false);\n }\n if (this.features.language) {\n this.kupManager.language.register(this);\n }\n if (this.features.longCycleProp) {\n this.longCycleProp();\n }\n if (this.features.longCycleVar) {\n this.longCycleVar();\n }\n if (this.features.objects) {\n this.longCycleObjects();\n }\n if (this.features.objectsFunction) {\n this.longCycleObjectsFunction();\n }\n if (this.features.theme) {\n this.kupManager.theme.register(this);\n }\n }\n\n componentDidLoad() {\n if (this.features.debug) {\n this.kupManager.debug.logLoad(this, true);\n }\n this.endTime = performance.now();\n }\n\n componentWillRender() {\n if (this.features.debug) {\n this.kupManager.debug.logRender(this, false);\n }\n }\n\n componentDidRender() {\n if (this.features.debug) {\n this.kupManager.debug.logRender(this, true);\n }\n }\n\n render() {\n let customStyle: string = null;\n\n if (this.features.theme) {\n customStyle = this.kupManager.theme.setKupStyle(\n this.rootElement as KupComponent\n );\n }\n\n return (\n <Host>\n {customStyle ? <style>{customStyle}</style> : null}\n <div id={componentWrapperId}>{this.content}</div>\n </Host>\n );\n }\n\n disconnectedCallback() {\n if (this.features.language) {\n this.kupManager.language.unregister(this);\n }\n if (this.features.theme) {\n this.kupManager.theme.unregister(this);\n }\n }\n}\n"],"mappings":"iKAsBaA,EAAQ,M,yBAgKTC,KAAAC,WAAyBC,IAIzBF,KAAAG,UAAoBC,YAAYC,MAIhCL,KAAAM,kBAA4B,KAI5BN,KAAAO,QAAkB,K,aA9JC,K,iBAWG,G,cAc1B,CACAC,MAAO,MACPC,SAAU,MACVC,cAAe,MACfC,aAAc,MACdC,QAAS,MACTC,gBAAiB,MACjBC,MAAO,M,CAwIX,wBAAMC,GAKF,MAAMC,EAAuBhB,KAAKO,QAAUP,KAAKM,kBACjD,MAAMW,EAAmBjB,KAAKO,QAAUP,KAAKG,UAC7CH,KAAKkB,QACD,iCACAlB,KAAKmB,YAAYC,QACjB,IACApB,KAAKmB,YAAYE,GACjB,UACAJ,EACA,2BACAD,EACA,MACJ,MAAO,CACHK,GAAIrB,KAAKmB,YAAYE,GACrBJ,SAAUA,EACVD,aAAcA,E,CAOtB,aAAMM,GACFC,EAAYvB,K,CAOR,aAAAU,G,CAOA,YAAAC,G,CAQA,gBAAAa,GAEJ,IAAK,IAAIC,EAAQ,EAAGA,EAAQ,IAASA,IAAS,CACtCzB,KAAKC,WAAWW,QAAQc,SAAS,CAAEC,EAAG,KAAMC,EAAG,GAAIC,EAAG,I,EAI1D,wBAAAC,G,CAeR,iBAAAC,GACI/B,KAAKM,kBAAoBF,YAAYC,MACrC,GAAIL,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAMyB,QAAQjC,KAAM,M,CAExC,GAAIA,KAAKgC,SAASvB,SAAU,CACxBT,KAAKC,WAAWQ,SAASyB,SAASlC,K,CAEtC,GAAIA,KAAKgC,SAAStB,cAAe,CAC7BV,KAAKU,e,CAET,GAAIV,KAAKgC,SAASrB,aAAc,CAC5BX,KAAKW,c,CAET,GAAIX,KAAKgC,SAASpB,QAAS,CACvBZ,KAAKwB,kB,CAET,GAAIxB,KAAKgC,SAASnB,gBAAiB,CAC/Bb,KAAK8B,0B,CAET,GAAI9B,KAAKgC,SAASlB,MAAO,CACrBd,KAAKC,WAAWa,MAAMoB,SAASlC,K,EAIvC,gBAAAmC,GACI,GAAInC,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAMyB,QAAQjC,KAAM,K,CAExCA,KAAKO,QAAUH,YAAYC,K,CAG/B,mBAAA+B,GACI,GAAIpC,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAM6B,UAAUrC,KAAM,M,EAI9C,kBAAAsC,GACI,GAAItC,KAAKgC,SAASxB,MAAO,CACrBR,KAAKC,WAAWO,MAAM6B,UAAUrC,KAAM,K,EAI9C,MAAAuC,GACI,IAAIC,EAAsB,KAE1B,GAAIxC,KAAKgC,SAASlB,MAAO,CACrB0B,EAAcxC,KAAKC,WAAWa,MAAM2B,YAChCzC,KAAKmB,Y,CAIb,OACIuB,EAACC,EAAI,CAAAC,IAAA,4CACAJ,EAAcE,EAAA,aAAQF,GAAuB,KAC9CE,EAAA,OAAAE,IAAA,2CAAKvB,GAAIwB,GAAqB7C,KAAKkB,S,CAK/C,oBAAA4B,GACI,GAAI9C,KAAKgC,SAASvB,SAAU,CACxBT,KAAKC,WAAWQ,SAASsC,WAAW/C,K,CAExC,GAAIA,KAAKgC,SAASlB,MAAO,CACrBd,KAAKC,WAAWa,MAAMiC,WAAW/C,K","ignoreList":[]}