@sme.up/ketchup 9.1.0 → 9.2.0

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 (173) hide show
  1. package/dist/cjs/{f-button-733664a5.js → f-button-9ccadd52.js} +2 -2
  2. package/dist/cjs/{f-cell-f37757a6.js → f-cell-3130506f.js} +7 -7
  3. package/dist/cjs/{f-checkbox-556771e8.js → f-checkbox-9d2635d9.js} +1 -1
  4. package/dist/cjs/{f-chip-3349d130.js → f-chip-beb7af58.js} +3 -3
  5. package/dist/cjs/{f-image-b7a5816b.js → f-image-66a3c3c1.js} +2 -2
  6. package/dist/cjs/{f-paginator-utils-1fe1df76.js → f-paginator-utils-c475e07f.js} +3 -3
  7. package/dist/cjs/{f-text-field-8557fc3f.js → f-text-field-c74856ff.js} +2 -2
  8. package/dist/cjs/{index-4b3a5567.js → index-d8e5eb5f.js} +108 -21
  9. package/dist/cjs/index.cjs.js +11 -0
  10. package/dist/cjs/ketchup.cjs.js +3 -3
  11. package/dist/cjs/kup-accordion.cjs.entry.js +3 -3
  12. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +11 -11
  13. package/dist/cjs/kup-box.cjs.entry.js +9 -9
  14. package/dist/cjs/kup-calendar.cjs.entry.js +5061 -5028
  15. package/dist/cjs/kup-card-list.cjs.entry.js +34 -14
  16. package/dist/cjs/kup-cell.cjs.entry.js +8 -8
  17. package/dist/cjs/kup-dashboard.cjs.entry.js +6 -6
  18. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  19. package/dist/cjs/kup-echart.cjs.entry.js +2 -2
  20. package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
  21. package/dist/cjs/kup-grid.cjs.entry.js +2 -2
  22. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  23. package/dist/cjs/kup-image-list.cjs.entry.js +8 -8
  24. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  25. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  26. package/dist/cjs/{kup-manager-cb73c128.js → kup-manager-7334c396.js} +5 -4
  27. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  28. package/dist/cjs/kup-numeric-picker.cjs.entry.js +3 -3
  29. package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
  30. package/dist/cjs/kup-planner.cjs.entry.js +895 -410
  31. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  32. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
  34. package/dist/cjs/loader.cjs.js +2 -2
  35. package/dist/collection/assets/card-list.js +12 -9
  36. package/dist/collection/collection-manifest.json +2 -2
  37. package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +10 -0
  38. package/dist/collection/components/kup-card-list/kup-card-list.js +232 -12
  39. package/dist/collection/index.js +5 -0
  40. package/dist/collection/managers/kup-math/kup-math-helper.js +1 -1
  41. package/dist/collection/utils/utils.js +0 -5
  42. package/dist/components/index.js +8 -0
  43. package/dist/components/kup-accordion.js +2 -1
  44. package/dist/components/kup-autocomplete.js +1 -1
  45. package/dist/components/kup-autocomplete2.js +5 -18605
  46. package/dist/components/kup-badge.js +1 -1
  47. package/dist/components/kup-box2.js +2 -1
  48. package/dist/components/kup-button-list.js +1 -1
  49. package/dist/components/kup-button.js +1 -1
  50. package/dist/components/kup-calendar.js +5058 -5024
  51. package/dist/components/kup-card-list.js +44 -13
  52. package/dist/components/kup-card.js +1 -1
  53. package/dist/components/kup-cell.js +2 -1
  54. package/dist/components/kup-chart.js +1 -1
  55. package/dist/components/kup-checkbox.js +1 -1
  56. package/dist/components/kup-chip.js +1 -1
  57. package/dist/components/kup-color-picker.js +1 -1
  58. package/dist/components/kup-combobox.js +1 -1
  59. package/dist/components/kup-dashboard.js +2 -1
  60. package/dist/components/kup-data-table.js +1 -1
  61. package/dist/components/kup-date-picker.js +1 -1
  62. package/dist/components/kup-dialog.js +1 -1
  63. package/dist/components/kup-drawer.js +2 -1
  64. package/dist/components/kup-dropdown-button.js +1 -1
  65. package/dist/components/kup-echart2.js +2 -1
  66. package/dist/components/kup-family-tree.js +2 -1
  67. package/dist/components/kup-form.js +1 -1
  68. package/dist/components/kup-gauge.js +1 -1
  69. package/dist/components/kup-grid2.js +2 -1
  70. package/dist/components/kup-iframe.js +2 -1
  71. package/dist/components/kup-image-list.js +2 -1
  72. package/dist/components/kup-image.js +1 -1
  73. package/dist/components/kup-lazy.js +2 -1
  74. package/dist/components/kup-list.js +1 -1
  75. package/dist/components/kup-magic-box.js +2 -1
  76. package/dist/{esm/kup-manager-94b3d177.js → components/kup-manager.js} +5 -5
  77. package/dist/components/kup-nav-bar.js +2 -1
  78. package/dist/components/kup-numeric-picker.js +2 -1
  79. package/dist/components/kup-photo-frame.js +2 -1
  80. package/dist/components/kup-planner.js +894 -408
  81. package/dist/components/kup-probe.js +2 -1
  82. package/dist/components/kup-progress-bar.js +1 -1
  83. package/dist/components/kup-qlik.js +2 -1
  84. package/dist/components/kup-radio.js +1 -1
  85. package/dist/components/kup-rating.js +1 -1
  86. package/dist/components/kup-snackbar.js +2 -1
  87. package/dist/components/kup-spinner.js +1 -1
  88. package/dist/components/kup-switch.js +1 -1
  89. package/dist/components/kup-tab-bar.js +1 -1
  90. package/dist/components/kup-text-field.js +1 -1
  91. package/dist/components/kup-time-picker.js +1 -1
  92. package/dist/components/kup-tree.js +1 -1
  93. package/dist/esm/{f-button-f247ce10.js → f-button-0bce6587.js} +2 -2
  94. package/dist/esm/{f-cell-ba94f1b3.js → f-cell-88d375e1.js} +7 -7
  95. package/dist/esm/{f-checkbox-cbf7b3de.js → f-checkbox-31219c42.js} +1 -1
  96. package/dist/esm/{f-chip-104c4a64.js → f-chip-ef0d4130.js} +3 -3
  97. package/dist/esm/{f-image-d2a9603c.js → f-image-727453df.js} +2 -2
  98. package/dist/esm/{f-paginator-utils-743522fa.js → f-paginator-utils-4524e41c.js} +3 -3
  99. package/dist/esm/{f-text-field-4d91ccfc.js → f-text-field-7b4d622c.js} +2 -2
  100. package/dist/esm/{index-c161a33e.js → index-99c17b08.js} +109 -22
  101. package/dist/esm/index.js +8 -0
  102. package/dist/esm/ketchup.js +4 -4
  103. package/dist/esm/kup-accordion.entry.js +3 -3
  104. package/dist/esm/kup-autocomplete_27.entry.js +11 -11
  105. package/dist/esm/kup-box.entry.js +9 -9
  106. package/dist/esm/kup-calendar.entry.js +5061 -5028
  107. package/dist/esm/kup-card-list.entry.js +34 -14
  108. package/dist/esm/kup-cell.entry.js +8 -8
  109. package/dist/esm/kup-dashboard.entry.js +6 -6
  110. package/dist/esm/kup-drawer.entry.js +2 -2
  111. package/dist/esm/kup-echart.entry.js +2 -2
  112. package/dist/esm/kup-family-tree.entry.js +4 -4
  113. package/dist/esm/kup-grid.entry.js +2 -2
  114. package/dist/esm/kup-iframe.entry.js +2 -2
  115. package/dist/esm/kup-image-list.entry.js +8 -8
  116. package/dist/esm/kup-lazy.entry.js +2 -2
  117. package/dist/esm/kup-magic-box.entry.js +3 -3
  118. package/dist/esm/kup-manager-9a9d2dbb.js +18604 -0
  119. package/dist/esm/kup-nav-bar.entry.js +2 -2
  120. package/dist/esm/kup-numeric-picker.entry.js +3 -3
  121. package/dist/esm/kup-photo-frame.entry.js +2 -2
  122. package/dist/esm/kup-planner.entry.js +895 -410
  123. package/dist/esm/kup-probe.entry.js +2 -2
  124. package/dist/esm/kup-qlik.entry.js +2 -2
  125. package/dist/esm/kup-snackbar.entry.js +4 -4
  126. package/dist/esm/loader.js +3 -3
  127. package/dist/ketchup/index.esm.js +1 -0
  128. package/dist/ketchup/ketchup.esm.js +1 -1
  129. package/dist/ketchup/{p-eb12225c.entry.js → p-042e1ed0.entry.js} +1 -1
  130. package/dist/ketchup/{p-5cb2dbf3.entry.js → p-0dc763af.entry.js} +1 -1
  131. package/dist/ketchup/{p-5abbf31b.entry.js → p-1ae879af.entry.js} +1 -1
  132. package/dist/ketchup/p-1db0c862.entry.js +1 -0
  133. package/dist/ketchup/{p-2c47b88f.js → p-20458088.js} +3 -3
  134. package/dist/ketchup/{p-21f1b22a.entry.js → p-20c1a69f.entry.js} +1 -1
  135. package/dist/ketchup/{p-48f8b0d5.entry.js → p-267dd24a.entry.js} +3 -3
  136. package/dist/ketchup/{p-a2007880.js → p-2849af6f.js} +1 -1
  137. package/dist/ketchup/p-30938d5a.entry.js +1 -0
  138. package/dist/ketchup/{p-bb80719e.js → p-34e4a985.js} +1 -1
  139. package/dist/ketchup/p-4067c71b.js +2 -0
  140. package/dist/ketchup/{p-b0678a34.js → p-4e696daf.js} +1 -1
  141. package/dist/ketchup/p-61f71872.entry.js +1 -0
  142. package/dist/ketchup/{p-679ccbf8.js → p-6a7df3d2.js} +1 -1
  143. package/dist/ketchup/{p-d56763cf.entry.js → p-6b33f5de.entry.js} +1 -1
  144. package/dist/ketchup/{p-ba003975.js → p-7a876328.js} +1 -1
  145. package/dist/ketchup/{p-304f296e.entry.js → p-7f64b612.entry.js} +1 -1
  146. package/dist/ketchup/{p-a14ede8c.entry.js → p-90db42e6.entry.js} +1 -1
  147. package/dist/ketchup/{p-5c9b10a5.entry.js → p-9cc1c76b.entry.js} +1 -1
  148. package/dist/ketchup/{p-12e47371.js → p-9d3d8690.js} +1 -1
  149. package/dist/ketchup/{p-e7f57bee.entry.js → p-b4ba27da.entry.js} +1 -1
  150. package/dist/ketchup/{p-bf41d71f.entry.js → p-c046fd1c.entry.js} +1 -1
  151. package/dist/ketchup/p-c120043a.entry.js +1 -0
  152. package/dist/ketchup/{p-6a0ac578.entry.js → p-d520d757.entry.js} +1 -1
  153. package/dist/ketchup/{p-8e5db599.entry.js → p-e9bc0749.entry.js} +1 -1
  154. package/dist/ketchup/{p-4d7c02f4.js → p-ea56edbe.js} +1 -1
  155. package/dist/ketchup/p-edd88921.entry.js +1 -0
  156. package/dist/ketchup/{p-a2b75445.entry.js → p-f1f82eef.entry.js} +1 -1
  157. package/dist/ketchup/{p-f82db512.entry.js → p-f67ee60f.entry.js} +3 -3
  158. package/dist/ketchup/p-f6844304.entry.js +1 -0
  159. package/dist/ketchup/{p-f22abf4e.entry.js → p-f8213d22.entry.js} +1 -1
  160. package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +12 -12
  161. package/dist/types/components/kup-card-list/kup-card-list.d.ts +50 -0
  162. package/dist/types/components.d.ts +668 -0
  163. package/dist/types/index.d.ts +4 -0
  164. package/dist/types/stencil-public-runtime.d.ts +21 -0
  165. package/dist/types/utils/utils.d.ts +0 -2
  166. package/package.json +3 -3
  167. package/dist/ketchup/p-15548f51.entry.js +0 -1
  168. package/dist/ketchup/p-20e8ab84.js +0 -2
  169. package/dist/ketchup/p-4ca502ce.entry.js +0 -1
  170. package/dist/ketchup/p-87e13738.entry.js +0 -1
  171. package/dist/ketchup/p-c32e8755.entry.js +0 -1
  172. package/dist/ketchup/p-c4b1bde1.entry.js +0 -1
  173. package/dist/ketchup/p-c6b58be6.entry.js +0 -1
@@ -0,0 +1,4 @@
1
+ import { KupManager } from './managers/kup-manager/kup-manager';
2
+ import { KupManagerInitialization } from './managers/kup-manager/kup-manager-declarations';
3
+ /** used for obtain a KupManager instance without a dom document (for UT) */
4
+ export declare function newKupManager(init: KupManagerInitialization): KupManager;
@@ -3,6 +3,16 @@ export interface ComponentDecorator {
3
3
  (opts?: ComponentOptions): ClassDecorator;
4
4
  }
5
5
  export interface ComponentOptions {
6
+ /**
7
+ * When set to `true` this component will be form-associated. See
8
+ * https://stenciljs.com/docs/next/form-associated documentation on how to
9
+ * build form-associated Stencil components that integrate into forms like
10
+ * native browser elements such as `<input>` and `<textarea>`.
11
+ *
12
+ * The {@link AttachInternals} decorator allows for access to the
13
+ * `ElementInternals` object to modify the associated form.
14
+ */
15
+ formAssociated?: boolean;
6
16
  /**
7
17
  * Tag name of the web component. Ideally, the tag name must be globally unique,
8
18
  * so it's recommended to choose an unique prefix for all your components within the same collection.
@@ -107,6 +117,9 @@ export interface EventOptions {
107
117
  */
108
118
  composed?: boolean;
109
119
  }
120
+ export interface AttachInternalsDecorator {
121
+ (): PropertyDecorator;
122
+ }
110
123
  export interface ListenDecorator {
111
124
  (eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
112
125
  }
@@ -175,6 +188,12 @@ export declare const Element: ElementDecorator;
175
188
  * https://stenciljs.com/docs/events
176
189
  */
177
190
  export declare const Event: EventDecorator;
191
+ /**
192
+ * If the `formAssociated` option is set in options passed to the
193
+ * `@Component()` decorator then this decorator may be used to get access to the
194
+ * `ElementInternals` instance associated with the component.
195
+ */
196
+ export declare const AttachInternals: AttachInternalsDecorator;
178
197
  /**
179
198
  * The `Listen()` decorator is for listening DOM events, including the ones
180
199
  * dispatched from `@Events()`.
@@ -1115,11 +1134,13 @@ export declare namespace JSXBase {
1115
1134
  autocomplete?: string;
1116
1135
  }
1117
1136
  interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
1137
+ height?: number;
1118
1138
  media?: string;
1119
1139
  sizes?: string;
1120
1140
  src?: string;
1121
1141
  srcSet?: string;
1122
1142
  type?: string;
1143
+ width?: number;
1123
1144
  }
1124
1145
  interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
1125
1146
  media?: string;
@@ -1,7 +1,6 @@
1
1
  import { GenericObject } from '../types/GenericTypes';
2
2
  import { KupBoxRow } from '../components/kup-box/kup-box-declarations';
3
3
  import { KupDataRow } from '../managers/kup-data/kup-data-declarations';
4
- import { KupManager } from '../managers/kup-manager/kup-manager';
5
4
  export declare function identify(array: Array<KupBoxRow | KupDataRow>): void;
6
5
  /**
7
6
  * Fills a string with another string, eventually before
@@ -34,4 +33,3 @@ export declare function setProps(comp: any, list: GenericObject, props: GenericO
34
33
  * @returns the regular expression object
35
34
  */
36
35
  export declare function getRegExpFromString(s: string, flags?: string): RegExp;
37
- export declare function getNewKupManager(): KupManager;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sme.up/ketchup",
3
- "version": "9.1.0",
3
+ "version": "9.2.0",
4
4
  "keywords": [
5
5
  "smeup",
6
6
  "KetchUP",
@@ -62,9 +62,9 @@
62
62
  "vanilla-picker": "^2.12.1"
63
63
  },
64
64
  "devDependencies": {
65
- "@stencil/core": "^4.3.0",
65
+ "@stencil/core": "^4.4.0",
66
66
  "@stencil/react-output-target": "0.5.3",
67
- "@stencil/sass": "^3.0.5",
67
+ "@stencil/sass": "^3.0.6",
68
68
  "jest": "^27.4.5",
69
69
  "jest-cli": "^27.4.5",
70
70
  "jest-html-reporter": "^3.7.1",
@@ -1 +0,0 @@
1
- import{r as i,c as t,f as e,h as a,H as s,g as r}from"./p-20e8ab84.js";import{k as o,g as n,s as l,m,d as p}from"./p-2c47b88f.js";import{c}from"./p-635bb4b3.js";import{F as h}from"./p-bb80719e.js";import{F as g}from"./p-b0678a34.js";import{F as _}from"./p-b00f3575.js";import{F as u}from"./p-12e47371.js";import{M as d}from"./p-d4a879fc.js";import"./p-ba003975.js";import"./p-679ccbf8.js";import"./p-4d7c02f4.js";var f;!function(i){i.customStyle="Custom style of the component.",i.data="Actual data of the component",i.ripple="When enabled displays Material's ripple effect on clicked items."}(f||(f={}));class b{constructor(){this.load=!1}toDebugString(){return"image-list state"}}var k,v,w,y,x,j,C,M=function(i,t,e,a){if("a"===e&&!a)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?i!==t||!a:!t.has(i))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===e?a:"a"===e?a.call(i):a?a.value:t.get(i)};const W=class{constructor(e){i(this,e),this.kupClick=t(this,"kup-imagelist-click",6),this.kupContextMenu=t(this,"kup-imagelist-contextmenu",6),this.kupDblClick=t(this,"kup-imagelist-dblclick",6),k.add(this),this.state=new b,this.kupManager=o(),v.set(this,[]),w.set(this,o()),y.set(this,{icon:"arrow_back",onClick:()=>{this.currentNode=M(this,w,"f").data.node.getParent(this.data,this.currentNode),this.currentNode||(this.navigationBarToggled=!1)},styling:_.FLAT,wrapperClass:"navigation-bar__back"}),x.set(this,{icon:"arrow_upward",onClick:()=>{this.currentNode=null,this.navigationBarToggled=!1},styling:_.FLAT,wrapperClass:"navigation-bar__top"}),this.currentNode=null,this.navigationBarToggled=!1,this.customStyle="",this.data=[],this.ripple=!0,this.selectedNode=[],this.stateId="",this.store=void 0}initWithPersistedState(){if(this.store&&this.stateId){const i=this.store.getState(this.stateId);null!=i&&(this.currentNode=this.kupManager.data.node.findByStrTreeNodePath(this.data,i.selectedTreeNodePath))}}persistState(){if(this.store&&this.stateId){let i=!1,t=this.currentNode?this.currentNode.id:"";if(this.kupManager.objects.deepEqual(this.state.selectedTreeNodePath,t)||(this.state.selectedTreeNodePath=t,i=!0),!this.state.load)return void(this.state.load=!0);i&&this.store.persistState(this.stateId,this.state)}}onKupClick(i){i.children&&i.children.length>0&&(this.currentNode=i),this.kupClick.emit({comp:this,id:this.rootElement.id,node:i})}onKupContextMenu(i,t){i.preventDefault(),this.kupContextMenu.emit({comp:this,id:this.rootElement.id,node:t})}onKupDblClick(i){for(let i=0;i<M(this,v,"f").length;i++)clearTimeout(M(this,v,"f")[i]);(function(i,t,e,a,s){if("m"===a)throw new TypeError("Private method is not writable");if("a"===a&&!s)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?i!==t||!s:!t.has(i))throw new TypeError("Cannot write private member to an object whose class did not declare it");"a"===a?s.call(i,e):s?s.value=e:t.set(i,e)})(this,v,[],"f"),this.kupDblClick.emit({comp:this,id:this.rootElement.id,node:i})}selectNode(i){i&&0!=i.length&&(this.currentNode=this.kupManager.data.node.find(this.data,i))}async getProps(i){return n(this,f,i)}async refresh(){e(this)}async setProps(i){l(this,f,i)}componentWillLoad(){M(this,w,"f").debug.logLoad(this,!1),M(this,w,"f").language.register(this),M(this,w,"f").theme.register(this)}componentDidLoad(){M(this,w,"f").debug.logLoad(this,!0)}componentWillRender(){M(this,w,"f").debug.logRender(this,!1)}componentDidRender(){const i=this.rootElement.shadowRoot;if(i&&this.ripple){const t=i.querySelectorAll(".mdc-ripple-surface:not(.mdc-ripple-upgraded)");if(t)for(let i=0;i<t.length;i++)d.attachTo(t[i])}this.persistState(),M(this,w,"f").debug.logRender(this,!0)}render(){const i=!!this.currentNode;return a(s,null,a("style",null,M(this,w,"f").theme.setKupStyle(this.rootElement)),a("div",{id:c},a("div",{class:"navigation-bar"},i?a("div",{class:"navigation-bar__wrapper "+(this.navigationBarToggled?"navigation-bar__wrapper--active":"")},a("div",{class:"navigation-bar__title",onClick:()=>{this.navigationBarToggled=!this.navigationBarToggled}},a(h,{fit:!0,resource:this.currentNode.icon,sizeX:"1.25em",sizeY:"1.25em",wrapperClass:"navigation-bar__title__image"}),a("div",{class:"navigation-bar__title__label"},this.currentNode.value)),a(g,Object.assign({},M(this,y,"f"),{label:M(this,w,"f").language.translate(m.BACK)})),a(g,Object.assign({},M(this,x,"f"),{label:M(this,w,"f").language.translate(m.TOP)}))):null),a("div",{class:"image-list"},...M(this,k,"m",C).call(this))))}disconnectedCallback(){M(this,w,"f").language.unregister(this),M(this,w,"f").theme.unregister(this)}get rootElement(){return r(this)}static get watchers(){return{selectedNode:["selectNode"]}}};v=new WeakMap,w=new WeakMap,y=new WeakMap,x=new WeakMap,k=new WeakSet,j=function(i){const t=a(h,Object.assign({},{fit:!0,resource:i.icon,title:i.title,wrapperClass:"image-list__image"})),e=a("div",{class:"image-list__label"},i.value);return a(u,{cell:{value:i.value,icon:i.icon,obj:i.obj},column:{name:"IMAGE",title:"Image"},component:this,density:p.NONE,row:Object.assign({},i)},a("div",{class:"image-list__wrapper"},t,e))},C=function(){const i=[],t=this.currentNode?this.currentNode.children:this.data;for(let e=0;t&&e<t.length;e++){const s=t[e],r=a("div",{onClick:()=>{M(this,v,"f").push(setTimeout((()=>this.onKupClick(s)),300))},onContextMenu:i=>this.onKupContextMenu(i,s),onDblClick:()=>this.onKupDblClick(s),class:{"image-list__item":!0,"mdc-ripple-surface":!!this.ripple}},M(this,k,"m",j).call(this,s));i.push(r)}return i},W.style=":host{--kup_imagelist_background_color:var(\n --kup-imagelist-background-color,\n transparent\n );--kup_imagelist_columns:var(--kup-imagelist-columns, 4);--kup_imagelist_grid_gap:var(--kup-imagelist-grid-gap, 0.5em);--kup_imagelist_image_margin:var(--kup-imagelist-image-margin, 1em auto);--kup_imagelist_image_min_height:var(--kup-imagelist-image-min-height, 64px);--kup_imagelist_item_border_radius:var(\n --kup-imagelist-item-border-radius,\n 8px\n );--kup_imagelist_item_height:var(--kup-imagelist-item-height, auto);--kup_imagelist_item_padding:var(--kup-imagelist-item-padding, 0);--kup_imagelist_item_width:var(--kup-imagelist-item-width, auto);--kup_imagelist_label_margin:var(\n --kup-imagelist-label-margin,\n 0 auto 1em auto\n );--kup_imagelist_navbar_background_color:var(\n --kup-imagelist-navbar-background-color,\n transparent\n );--kup_imagelist_primary_color:var(\n --kup-imagelist-primary-color,\n var(--kup-primary-color)\n );--kup_imagelist_primary_color_rgb:var(\n --kup-imagelist-primary-color-rgb,\n var(--kup-primary-color-rgb)\n );--kup_imagelist_text_color:var(\n --kup-imagelist-text-color,\n var(--kup-text-color)\n );display:block}.navigation-bar{align-items:center;background-color:var(--kup_imagelist_navbar_background_color);display:flex;justify-content:center}.navigation-bar__wrapper{align-items:center;display:flex;flex-wrap:wrap;justify-content:center;max-width:100%;position:relative}.navigation-bar__wrapper--active .navigation-bar__title{background-color:rgba(var(--kup_imagelist_primary_color_rgb), 0.15);color:var(--kup_imagelist_primary_color)}.navigation-bar__back,.navigation-bar__top{--kup-button-primary-color-rgb:0}.navigation-bar__title{border-radius:16px;box-sizing:border-box;cursor:pointer;display:flex;justify-content:center;padding:0.75em 1em;user-select:none;transition:background-color 125ms, color 125ms;width:100%}.navigation-bar__title__image.f-image{margin:0}.navigation-bar__title__label{font-size:1.2em;font-weight:bold;letter-spacing:0.12em;overflow:hidden;padding:0 0.5em;text-overflow:ellipsis;text-transform:uppercase;white-space:nowrap}.image-list{background-color:var(--kup_imagelist_background_color);display:grid;grid-gap:var(--kup_imagelist_grid_gap);grid-template-columns:repeat(var(--kup_imagelist_columns, 4), minmax(0px, 1fr));margin-top:1em;width:100%}.image-list .f-cell{height:100%;width:100%}.image-list__item{border-radius:var(--kup_imagelist_item_border_radius);cursor:pointer;height:var(--kup_imagelist_item_height);padding:var(--kup_imagelist_item_padding);width:var(--kup_imagelist_item_width)}.image-list__image.f-image{margin:var(--kup_imagelist_image_margin)}.image-list__image.f-image .f-image__icon{min-height:var(--kup_imagelist_image_min_height)}.image-list__label{color:var(--kup_imagelist_text_color);letter-spacing:0.12em;margin:var(--kup_imagelist_label_margin);overflow:hidden;text-align:center;text-overflow:ellipsis}.image-list .mdc-ripple-surface{--mdc-ripple-fg-opacity:0.24}.image-list .mdc-ripple-surface:before,.image-list .mdc-ripple-surface:after{background-color:var(--kup_imagelist_primary_color)}:host(.kup-full-height){height:100%}:host(.kup-full-width){width:100%}:host(.kup-horizontal) .image-list{display:flex}:host(.kup-auto-grid) .image-list{display:flex;flex-wrap:wrap;justify-content:center}";export{W as kup_image_list}
@@ -1,2 +0,0 @@
1
- let e,n,t=!1,l=!1;const o=e=>{const n=new URL(e,re.t);return n.origin!==ie.location.origin?n.href:n.pathname},s=e=>re.t=e,i="http://www.w3.org/1999/xlink",c={},r=e=>"object"==(e=typeof e)||"function"===e;function u(e){var n,t,l;return null!==(l=null===(t=null===(n=e.head)||void 0===n?void 0:n.querySelector('meta[name="csp-nonce"]'))||void 0===t?void 0:t.getAttribute("content"))&&void 0!==l?l:void 0}const a=(e,n,...t)=>{let l=null,o=null,s=!1,i=!1;const c=[],u=n=>{for(let t=0;t<n.length;t++)l=n[t],Array.isArray(l)?u(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!r(l))&&(l+=""),s&&i?c[c.length-1].l+=l:c.push(s?f(null,l):l),i=s)};if(u(t),n){n.key&&(o=n.key);{const e=n.className||n.class;e&&(n.class="object"!=typeof e?e:Object.keys(e).filter((n=>e[n])).join(" "))}}if("function"==typeof e)return e(null===n?{}:n,c,p);const a=f(e,null);return a.o=n,c.length>0&&(a.i=c),a.u=o,a},f=(e,n)=>({p:0,v:e,l:n,h:null,i:null,o:null,u:null}),d={},p={forEach:(e,n)=>e.map(v).forEach(n),map:(e,n)=>e.map(v).map(n).map(y)},v=e=>({vattrs:e.o,vchildren:e.i,vkey:e.u,vname:e.m,vtag:e.v,vtext:e.l}),y=e=>{if("function"==typeof e.vtag){const n=Object.assign({},e.vattrs);return e.vkey&&(n.key=e.vkey),e.vname&&(n.name=e.vname),a(e.vtag,n,...e.vchildren||[])}const n=f(e.vtag,e.vtext);return n.o=e.vattrs,n.i=e.vchildren,n.u=e.vkey,n.m=e.vname,n},h=e=>Y(e).$,m=(e,n,t)=>{const l=h(e);return{emit:e=>w(l,n,{bubbles:!!(4&t),composed:!!(2&t),cancelable:!!(1&t),detail:e})}},w=(e,n,t)=>{const l=re.ce(n,t);return e.dispatchEvent(l),l},$=new WeakMap,b=e=>"sc-"+e.g,g=(e,n,t,l,o,s)=>{if(t!==l){let c=ne(e,n),u=n.toLowerCase();if("class"===n){const n=e.classList,o=k(t),s=k(l);n.remove(...o.filter((e=>e&&!s.includes(e)))),n.add(...s.filter((e=>e&&!o.includes(e))))}else if("style"===n){for(const n in t)l&&null!=l[n]||(n.includes("-")?e.style.removeProperty(n):e.style[n]="");for(const n in l)t&&l[n]===t[n]||(n.includes("-")?e.style.setProperty(n,l[n]):e.style[n]=l[n])}else if("key"===n);else if("ref"===n)l&&l(e);else if(c||"o"!==n[0]||"n"!==n[1]){const a=r(l);if((c||a&&null!==l)&&!o)try{if(e.tagName.includes("-"))e[n]=l;else{const o=null==l?"":l;"list"===n?c=!1:null!=t&&e[n]==o||(e[n]=o)}}catch(e){}let f=!1;u!==(u=u.replace(/^xlink\:?/,""))&&(n=u,f=!0),null==l||!1===l?!1===l&&""!==e.getAttribute(n)||(f?e.removeAttributeNS(i,n):e.removeAttribute(n)):(!c||4&s||o)&&!a&&(l=!0===l?"":l,f?e.setAttributeNS(i,n,l):e.setAttribute(n,l))}else n="-"===n[2]?n.slice(3):ne(ie,u)?u.slice(2):u[2]+n.slice(3),t&&re.rel(e,n,t,!1),l&&re.ael(e,n,l,!1)}},j=/\s/,k=e=>e?e.split(j):[],S=(e,n,t,l)=>{const o=11===n.h.nodeType&&n.h.host?n.h.host:n.h,s=e&&e.o||c,i=n.o||c;for(l in s)l in i||g(o,l,s[l],void 0,t,n.p);for(l in i)g(o,l,s[l],i[l],t,n.p)},O=(n,l,o)=>{const s=l.i[o];let i,c,r=0;if(null!==s.l)i=s.h=ce.createTextNode(s.l);else{if(t||(t="svg"===s.v),i=s.h=ce.createElementNS(t?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",s.v),t&&"foreignObject"===s.v&&(t=!1),S(null,s,t),null!=e&&i["s-si"]!==e&&i.classList.add(i["s-si"]=e),s.i)for(r=0;r<s.i.length;++r)c=O(n,s,r),c&&i.appendChild(c);"svg"===s.v?t=!1:"foreignObject"===i.tagName&&(t=!0)}return i},M=(e,t,l,o,s,i)=>{let c,r=e;for(r.shadowRoot&&r.tagName===n&&(r=r.shadowRoot);s<=i;++s)o[s]&&(c=O(null,l,s),c&&(o[s].h=c,r.insertBefore(c,t)))},x=(e,n,t)=>{for(let l=n;l<=t;++l){const n=e[l];if(n){const e=n.h;L(n),e&&e.remove()}}},C=(e,n)=>e.v===n.v&&e.u===n.u,P=(e,n)=>{const l=n.h=e.h,o=e.i,s=n.i,i=n.v,c=n.l;null===c?(t="svg"===i||"foreignObject"!==i&&t,"slot"===i||S(e,n,t),null!==o&&null!==s?((e,n,t,l)=>{let o,s,i=0,c=0,r=0,u=0,a=n.length-1,f=n[0],d=n[a],p=l.length-1,v=l[0],y=l[p];for(;i<=a&&c<=p;)if(null==f)f=n[++i];else if(null==d)d=n[--a];else if(null==v)v=l[++c];else if(null==y)y=l[--p];else if(C(f,v))P(f,v),f=n[++i],v=l[++c];else if(C(d,y))P(d,y),d=n[--a],y=l[--p];else if(C(f,y))P(f,y),e.insertBefore(f.h,d.h.nextSibling),f=n[++i],y=l[--p];else if(C(d,v))P(d,v),e.insertBefore(d.h,f.h),d=n[--a],v=l[++c];else{for(r=-1,u=i;u<=a;++u)if(n[u]&&null!==n[u].u&&n[u].u===v.u){r=u;break}r>=0?(s=n[r],s.v!==v.v?o=O(n&&n[c],t,r):(P(s,v),n[r]=void 0,o=s.h),v=l[++c]):(o=O(n&&n[c],t,c),v=l[++c]),o&&f.h.parentNode.insertBefore(o,f.h)}i>a?M(e,null==l[p+1]?null:l[p+1].h,t,l,c,p):c>p&&x(n,i,a)})(l,o,n,s):null!==s?(null!==e.l&&(l.textContent=""),M(l,null,n,s,0,s.length-1)):null!==o&&x(o,0,o.length-1),t&&"svg"===i&&(t=!1)):e.l!==c&&(l.data=c)},L=e=>{e.o&&e.o.ref&&e.o.ref(null),e.i&&e.i.map(L)},R=(e,n)=>{n&&!e.j&&n["s-p"]&&n["s-p"].push(new Promise((n=>e.j=n)))},U=(e,n)=>{if(e.p|=16,!(4&e.p))return R(e,e.k),me((()=>W(e,n)));e.p|=512},W=(e,n)=>{const t=e.S;let l;return n?(e.p|=256,e.O&&(e.O.map((([e,n])=>q(t,e,n))),e.O=void 0),l=q(t,"componentWillLoad")):l=q(t,"componentWillUpdate"),l=E(l,(()=>q(t,"componentWillRender"))),E(l,(()=>D(e,t,n)))},E=(e,n)=>A(e)?e.then(n):n(),A=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,D=async(e,n,t)=>{var l;const o=e.$,s=o["s-rc"];t&&(e=>{const n=e.M,t=e.$,l=n.p,o=((e,n)=>{var t;const l=b(n),o=se.get(l);if(e=11===e.nodeType?e:ce,o)if("string"==typeof o){let n,s=$.get(e=e.head||e);if(s||$.set(e,s=new Set),!s.has(l)){{n=ce.createElement("style"),n.innerHTML=o;const l=null!==(t=re.C)&&void 0!==t?t:u(ce);null!=l&&n.setAttribute("nonce",l),e.insertBefore(n,e.querySelector("link"))}s&&s.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(t.shadowRoot?t.shadowRoot:t.getRootNode(),n);10&l&&(t["s-sc"]=o,t.classList.add(o+"-h"))})(e);N(e,n,o,t),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const n=null!==(l=o["s-p"])&&void 0!==l?l:[],t=()=>T(e);0===n.length?t():(Promise.all(n).then(t),e.p|=4,n.length=0)}},N=(t,l,o,s)=>{try{l=l.render(),t.p&=-17,t.p|=2,((t,l,o=!1)=>{const s=t.$,i=t.M,c=t.P||f(null,null),r=(e=>e&&e.v===d)(l)?l:a(null,null,l);if(n=s.tagName,i.L&&(r.o=r.o||{},i.L.map((([e,n])=>r.o[n]=s[e]))),o&&r.o)for(const e of Object.keys(r.o))s.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.o[e]=s[e]);r.v=null,r.p|=4,t.P=r,r.h=c.h=s.shadowRoot||s,e=s["s-sc"],P(c,r)})(t,l,s)}catch(e){te(e,t.$)}return null},T=e=>{const n=e.$,t=e.S,l=e.k;q(t,"componentDidRender"),64&e.p?q(t,"componentDidUpdate"):(e.p|=64,V(n),q(t,"componentDidLoad"),e.R(n),l||H()),e.U(n),e.j&&(e.j(),e.j=void 0),512&e.p&&he((()=>U(e,!1))),e.p&=-517},F=e=>{{const n=Y(e),t=n.$.isConnected;return t&&2==(18&n.p)&&U(n,!1),t}},H=()=>{V(ce.documentElement),he((()=>w(ie,"appload",{detail:{namespace:"ketchup"}})))},q=(e,n,t)=>{if(e&&e[n])try{return e[n](t)}catch(e){te(e)}},V=e=>e.classList.add("hydrated"),_=(e,n,t)=>{var l;if(n.W){e.watchers&&(n.A=e.watchers);const o=Object.entries(n.W),s=e.prototype;if(o.map((([e,[l]])=>{31&l||2&t&&32&l?Object.defineProperty(s,e,{get(){return((e,n)=>Y(this).D.get(n))(0,e)},set(t){((e,n,t,l)=>{const o=Y(e),s=o.$,i=o.D.get(n),c=o.p,u=o.S;if(t=((e,n)=>null==e||r(e)?e:4&n?"false"!==e&&(""===e||!!e):2&n?parseFloat(e):1&n?e+"":e)(t,l.W[n][0]),(!(8&c)||void 0===i)&&t!==i&&(!Number.isNaN(i)||!Number.isNaN(t))&&(o.D.set(n,t),u)){if(l.A&&128&c){const e=l.A[n];e&&e.map((e=>{try{u[e](t,i,n)}catch(e){te(e,s)}}))}2==(18&c)&&U(o,!1)}})(this,e,t,n)},configurable:!0,enumerable:!0}):1&t&&64&l&&Object.defineProperty(s,e,{value(...n){const t=Y(this);return t.N.then((()=>t.S[e](...n)))}})})),1&t){const t=new Map;s.attributeChangedCallback=function(e,l,o){re.jmp((()=>{const i=t.get(e);if(this.hasOwnProperty(i))o=this[i],delete this[i];else{if(s.hasOwnProperty(i)&&"number"==typeof this[i]&&this[i]==o)return;if(null==i){const t=Y(this),s=null==t?void 0:t.p;if(!(8&s)&&128&s&&o!==l){const s=t.S,i=n.A[e];null==i||i.forEach((n=>{null!=s[n]&&s[n].call(s,o,l,e)}))}return}}this[i]=(null!==o||"boolean"!=typeof this[i])&&o}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!==(l=n.A)&&void 0!==l?l:{}),...o.filter((([e,n])=>15&n[0])).map((([e,l])=>{const o=l[1]||e;return t.set(o,e),512&l[0]&&n.L.push([e,o]),o}))]))}}return e},z=e=>{q(e,"disconnectedCallback")},B=(e,n={})=>{var t;const l=[],o=n.exclude||[],s=ie.customElements,i=ce.head,c=i.querySelector("meta[charset]"),r=ce.createElement("style"),a=[];let f,d=!0;Object.assign(re,n),re.t=new URL(n.resourcesUrl||"./",ce.baseURI).href,e.map((e=>{e[1].map((n=>{var t;const i={p:n[0],g:n[1],W:n[2],T:n[3]};i.W=n[2],i.T=n[3],i.L=[],i.A=null!==(t=n[4])&&void 0!==t?t:{};const c=i.g,r=class extends HTMLElement{constructor(e){super(e),ee(e=this,i),1&i.p&&e.attachShadow({mode:"open"})}connectedCallback(){f&&(clearTimeout(f),f=null),d?a.push(this):re.jmp((()=>(e=>{if(0==(1&re.p)){const n=Y(e),t=n.M,l=()=>{};if(1&n.p)G(e,n,t.T),(null==n?void 0:n.S)||(null==n?void 0:n.F)&&n.F.then((()=>{}));else{n.p|=1;{let t=e;for(;t=t.parentNode||t.host;)if(t["s-p"]){R(n,n.k=t);break}}t.W&&Object.entries(t.W).map((([n,[t]])=>{if(31&t&&e.hasOwnProperty(n)){const t=e[n];delete e[n],e[n]=t}})),(async(e,n,t,l,o)=>{if(0==(32&n.p)){n.p|=32;{if((o=oe(t)).then){const e=()=>{};o=await o,e()}o.isProxied||(t.A=o.watchers,_(o,t,2),o.isProxied=!0);const e=()=>{};n.p|=8;try{new o(n)}catch(e){te(e)}n.p&=-9,n.p|=128,e()}if(o.style){let e=o.style;const n=b(t);if(!se.has(n)){const l=()=>{};((e,n,t)=>{let l=se.get(e);ae&&t?(l=l||new CSSStyleSheet,"string"==typeof l?l=n:l.replaceSync(n)):l=n,se.set(e,l)})(n,e,!!(1&t.p)),l()}}}const s=n.k,i=()=>U(n,!0);s&&s["s-rc"]?s["s-rc"].push(i):i()})(0,n,t)}l()}})(this)))}disconnectedCallback(){re.jmp((()=>(async()=>{if(0==(1&re.p)){const e=Y(this);e.H&&(e.H.map((e=>e())),e.H=void 0),(null==e?void 0:e.S)?z(e.S):(null==e?void 0:e.F)&&e.F.then((()=>z(e.S)))}})()))}componentOnReady(){return Y(this).F}};i.q=e[0],o.includes(c)||s.get(c)||(l.push(c),s.define(c,_(r,i,1)))}))}));{r.innerHTML=l+"{visibility:hidden}.hydrated{visibility:inherit}",r.setAttribute("data-styles","");const e=null!==(t=re.C)&&void 0!==t?t:u(ce);null!=e&&r.setAttribute("nonce",e),i.insertBefore(r,c?c.nextSibling:i.firstChild)}d=!1,a.length?a.map((e=>e.connectedCallback())):re.jmp((()=>f=setTimeout(H,30)))},G=(e,n,t)=>{t&&t.map((([t,l,o])=>{const s=J(e,t),i=I(n,o),c=K(t);re.ael(s,l,i,c),(n.H=n.H||[]).push((()=>re.rel(s,l,i,c)))}))},I=(e,n)=>t=>{try{256&e.p?e.S[n](t):(e.O=e.O||[]).push([n,t])}catch(e){te(e)}},J=(e,n)=>4&n?ce:e,K=e=>0!=(2&e),Q=e=>re.C=e,X=new WeakMap,Y=e=>X.get(e),Z=(e,n)=>X.set(n.S=e,n),ee=(e,n)=>{const t={p:0,$:e,M:n,D:new Map};return t.N=new Promise((e=>t.U=e)),t.F=new Promise((e=>t.R=e)),e["s-p"]=[],e["s-rc"]=[],G(e,t,n.T),X.set(e,t)},ne=(e,n)=>n in e,te=(e,n)=>(0,console.error)(e,n),le=new Map,oe=e=>{const n=e.g.replace(/-/g,"_"),t=e.q,l=le.get(t);return l?l[n]:import(`./${t}.entry.js`).then((e=>(le.set(t,e),e[n])),te)
2
- /*!__STENCIL_STATIC_IMPORT_SWITCH__*/},se=new Map,ie="undefined"!=typeof window?window:{},ce=ie.document||{head:{}},re={p:0,t:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,n,t,l)=>e.addEventListener(n,t,l),rel:(e,n,t,l)=>e.removeEventListener(n,t,l),ce:(e,n)=>new CustomEvent(e,n)},ue=e=>Promise.resolve(e),ae=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),fe=[],de=[],pe=(e,n)=>t=>{e.push(t),l||(l=!0,n&&4&re.p?he(ye):re.raf(ye))},ve=e=>{for(let n=0;n<e.length;n++)try{e[n](performance.now())}catch(e){te(e)}e.length=0},ye=()=>{ve(fe),ve(de),(l=fe.length>0)&&re.raf(ye)},he=e=>ue().then(e),me=pe(de,!0);export{d as H,o as a,B as b,m as c,s as d,F as f,h as g,a as h,ue as p,Z as r,Q as s}
@@ -1 +0,0 @@
1
- import{r as t,c as e,f as a,h as s,H as i,g as r}from"./p-20e8ab84.js";import{k as c,g as o,s as h,t as l,af as n}from"./p-2c47b88f.js";import{c as d}from"./p-635bb4b3.js";var u;!function(t){t.columnsNumber="Sets the number of columns.",t.customStyle="Custom style of the component.",t.data="Actual data of the component.",t.fullWidth="Sets whether the component occupies all available width.",t.horizontal="Sets whether the cards are placed horizontally or not.",t.isClickable="Sets whether a single card is clickable or not."}(u||(u={}));var p,m=function(t,e,a,s){if("a"===a&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===a?s:"a"===a?s.call(t):s?s.value:e.get(t)};const k=class{constructor(a){t(this,a),this.kupCardListClickEvent=e(this,"kup-cardlist-click",7),p.set(this,c()),this.columnsNumber=1,this.customStyle="",this.data=null,this.fullWidth=!0,this.horizontal=!1,this.isClickable=!1}async getProps(t){return o(this,u,t)}async refresh(){a(this)}async setProps(t){h(this,u,t)}componentWillLoad(){m(this,p,"f").debug.logLoad(this,!1),m(this,p,"f").theme.register(this)}componentDidLoad(){m(this,p,"f").debug.logLoad(this,!0)}componentDidRender(){m(this,p,"f").debug.logRender(this,!0)}render(){if(!this.data||!this.data.columns||!this.data.columns.length)return;const t=[];let e,a,r,c,o,h,u,k,_,b;for(let t=0;t<this.data.columns.length;t++){const s=this.data.columns[t];if(s.cardListOption)switch(s.cardListOption){case"decvalue":e=s;break;case"descr":a=s;break;case"icon":r=s;break;case"iconcolor":c=s;break;case"intvalue":o=s;break;case"layout":h=s;break;case"measure":u=s;break;case"textcolor":k=s;break;case"value":_=s;break;case"valuecolor":b=s}}for(let i=0;i<this.data.rows.length;i++){const d=this.data.rows[i],f={color:[],image:[],text:[]},g=h&&d.cells[h.name].value?parseInt(d.cells[h.name].value):1,w=s("kup-card",{class:this.isClickable?"is-clickable":"",customStyle:"#kup-component, .scalable-card { min-height: var(--kup_cardlist_cardsminheight) }",data:f,layoutFamily:l.SCALABLE,layoutNumber:g,key:i,"onKup-card-click":()=>{this.isClickable&&this.kupCardListClickEvent.emit({comp:this,id:this.rootElement.id,index:i,row:d})},slot:i.toString()}),x=(t,e,a)=>{if(t){const s=d.cells[t.name];if(s){const i=s.value;switch(e){case"color":f[e][a]=m(this,p,"f").theme.colorCheck(i).hexColor;break;case"image":f[e][a]={resource:i};break;default:f[e][a]=n(t,s)}}}};switch(g){case 1:x(k,"color",0),x(b,"color",1),x(a,"text",0),x(_,"text",1);break;case 2:x(c,"color",0),x(b,"color",1),x(r,"image",0),x(o,"text",0),x(e,"text",1),x(u,"text",2);break;case 3:x(b,"color",0),x(k,"color",1),x(_,"text",0),x(a,"text",1);break;case 4:x(c,"color",0),x(b,"color",1),x(k,"color",2),x(r,"image",0),x(o,"text",0),x(e,"text",1),x(u,"text",2),x(a,"text",3);break;case 5:x(c,"color",0),x(k,"color",1),x(b,"color",2),x(r,"image",0),x(a,"text",0),x(_,"text",1);break;case 6:case 7:case 8:x(c,"color",0),x(b,"color",1),x(k,"color",2),x(r,"image",0),x(_,"text",0),x(a,"text",1)}t.push(w)}return s(i,null,s("style",null,m(this,p,"f").theme.setKupStyle(this.rootElement)),s("div",{id:d},s("kup-grid",{class:(this.fullWidth?"kup-full-width":"")+" scalable-cards",columns:this.columnsNumber,singleLine:this.horizontal},t)))}disconnectedCallback(){m(this,p,"f").theme.unregister(this)}get rootElement(){return r(this)}};p=new WeakMap,k.style=":host{--kup_cardlist_cards_max_height:var(--kup-cardlist-cards-max-height, unset);--kup_cardlist_cards_min_height:var(--kup-cardlist-cards-min-height, unset);--kup_cardlist_cards_max_width:var(--kup-cardlist-cards-max-width, unset);--kup_cardlist_cards_min_width:var(--kup-cardlist-cards-min-width, unset);display:block;height:100%;width:100%}#kup-component{height:100%;width:100%}kup-card{max-height:var(--kup_cardlist_cards_max_height);min-height:var(--kup_cardlist_cards_min_height);max-width:var(--kup_cardlist_cards_max_width);min-width:var(--kup_cardlist_cards_min_width)}kup-card.is-clickable{cursor:pointer}kup-grid{--kup-grid-padding:0}";export{k as kup_card_list}
@@ -1 +0,0 @@
1
- import{r as t,f as i,h as s,H as e,g as o}from"./p-20e8ab84.js";import{k as a,g as n,s as c,m as r,c as h,am as l,R as u,an as p,X as d,b}from"./p-2c47b88f.js";import{F as m}from"./p-b00f3575.js";import{F as k}from"./p-bb80719e.js";import{c as g}from"./p-635bb4b3.js";var f,x;!function(t){t.customStyle="Custom style of the component.",t.data="Sets the data that will be used to display different components."}(f||(f={})),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=class{constructor(i){t(this,i),this.dragHandler=null,this.kupManager=a(),this.textArea=null,this.wrapperRef=null,this.display=x.DATATABLE,this.customStyle="",this.data=null}async getProps(t){return n(this,f,t)}async refresh(){i(this)}async setProps(t){c(this,f,t)}comboboxProps(){const t=[];for(const i in x)Object.prototype.hasOwnProperty.call(x,i)&&t.push({id:x[i],selected:!1,value:x[i]});return{data:{"kup-list":{data:t,id:"kup-debug-theme-changer-list"},"kup-text-field":{emitSubmitEventOnEnter:!1,inputType:"text",label:this.kupManager.language.translate(r.VIEW_AS)}},id:"comp-switcher",initialValue:this.display,isSelect:!0,"onKup-combobox-itemclick":t=>{this.display=t.detail.value}}}setContent(){const t=!!(this.data&&this.data.columns&&this.data.columns.length>0),i=[],e={};if(this.display===x.JSON)e.initialValue=this.data?JSON.stringify(this.data,null,2):"",e.textArea=!0,i.push(s("kup-text-field",Object.assign({class:"kup-full-width kup-full-height"},e,{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)switch(this.display){case x.BOX:e.data=this.data,i.push(s("kup-box",Object.assign({},e)));break;case x.BUTTON_LIST:e.data=this.data,i.push(s("kup-button-list",Object.assign({},e)));break;case x.CHIP:e.data=this.data,i.push(s("kup-chip",Object.assign({},e)));break;case x.CHART:case x.ECHART:e.data=this.data,e.series=[],e.axis=null;for(let t=0;t<this.data.columns.length;t++){const i=this.data.columns[t];i.obj&&this.kupManager.objects.isNumber(i.obj)||null!==e.axis?e.series.push(this.display===x.CHART?{code:i.name,decode:i.title}:i.name):e.axis=i.name}0===e.series.length&&this.kupManager.debug.logMessage(this,"Not enough numerical columns to display a chart!",h.WARNING),e.axis||this.kupManager.debug.logMessage(this,"No axis for the chart!",h.WARNING),i.push(s(this.display===x.CHART?"kup-chart":"kup-echart",Object.assign({},e)));break;case x.DATATABLE:e.data=this.data,e.autoFillMissingCells=!0,i.push(s("kup-data-table",Object.assign({},e)));break;case x.TREE:e.data=this.data,i.push(s("kup-tree",Object.assign({class:"kup-full-width"},e)));break;default:return void this.kupManager.debug.logMessage(this,"Display mode not supported ("+this.display+")!",h.ERROR)}else i.push(s("div",{class:"empty"},s(k,{sizeY:"100px",resource:"move_to_inbox"}),s("div",{class:"empty-text"},this.kupManager.language.translate(r.DROP_YOUR_DATA))));return i}updateData(t){{const i=Object.assign({},this.data),s=t.detail.sourceElement&&t.detail.sourceElement.column?t.detail.sourceElement.column:null,e=t.detail.sourceElement&&t.detail.sourceElement.row?t.detail.sourceElement.row:null;if(s&&s.name?i.columns?this.data.columns.find((t=>t.name===s.name))||i.columns.push(s):i.columns=[s]:this.kupManager.debug.logMessage(this,"Invalid column received.",h.WARNING),e&&(i.rows?i.rows.push(e):i.rows=[e]),this.data=i,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,!1),this.kupManager.language.register(this),this.kupManager.theme.register(this)}componentDidLoad(){this.rootElement.addEventListener(l,(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:`[${u}],[${p}]`},{dispatcher:this.rootElement,type:d.MAGICBOX}),this.kupManager.debug.logLoad(this,!0)}componentWillRender(){this.kupManager.debug.logRender(this,!1)}componentDidRender(){this.kupManager.debug.logRender(this,!0)}render(){return s(e,null,s("style",null,this.kupManager.theme.setKupStyle(this.rootElement)),s("div",{id:g},s("div",{class:"magic-box-wrapper"},s("div",{class:"actions",id:"drag-handle"},s("kup-combobox",Object.assign({},this.comboboxProps())),s("kup-button",{styling:m.FLAT,icon:"delete",label:"Reset","onkup-button-click":()=>{this.data=null}}),s("kup-button",{id:"close-dialog",customStyle:`:host{${b.PRIMARY}: var(${b.TITLE});}`,icon:"clear","onkup-button-click":()=>{this.kupManager.hideMagicBox()}})),s("div",{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 o(this)}};y.style=":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-color);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)}";export{y as kup_magic_box}