@sme.up/ketchup 8.3.3 → 9.0.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 (184) hide show
  1. package/dist/cjs/{component-24811409.js → component-cb3b32f5.js} +7 -2
  2. package/dist/cjs/{f-button-7687085a.js → f-button-b2cfce1c.js} +2 -2
  3. package/dist/cjs/{f-cell-37ef6f00.js → f-cell-75fca92b.js} +24 -17
  4. package/dist/cjs/{f-checkbox-758d1d34.js → f-checkbox-48d7af02.js} +1 -1
  5. package/dist/cjs/{f-chip-cf59bdb3.js → f-chip-3e504f3e.js} +3 -3
  6. package/dist/cjs/{f-image-1245b0cf.js → f-image-270d39ae.js} +2 -2
  7. package/dist/cjs/{f-paginator-utils-b1af2a8f.js → f-paginator-utils-6d0c4678.js} +3 -3
  8. package/dist/cjs/{f-text-field-9c745112.js → f-text-field-bbcd2143.js} +2 -2
  9. package/dist/cjs/{f-text-field-mdc-b1fa6fd6.js → f-text-field-mdc-4fda9705.js} +1 -1
  10. package/dist/cjs/{index-eac07680.js → index-c3d10561.js} +86 -8
  11. package/dist/cjs/ketchup.cjs.js +3 -3
  12. package/dist/cjs/kup-accordion.cjs.entry.js +4 -4
  13. package/dist/cjs/kup-autocomplete_27.cjs.entry.js +148 -153
  14. package/dist/cjs/kup-box.cjs.entry.js +11 -11
  15. package/dist/cjs/kup-calendar.cjs.entry.js +6 -6
  16. package/dist/cjs/kup-card-list.cjs.entry.js +244 -0
  17. package/dist/cjs/kup-cell.cjs.entry.js +7 -7
  18. package/dist/cjs/kup-dashboard.cjs.entry.js +8 -8
  19. package/dist/cjs/kup-drawer.cjs.entry.js +2 -2
  20. package/dist/cjs/kup-echart.cjs.entry.js +4579 -4431
  21. package/dist/cjs/kup-family-tree.cjs.entry.js +4 -4
  22. package/dist/cjs/kup-grid.cjs.entry.js +109 -0
  23. package/dist/cjs/kup-iframe.cjs.entry.js +2 -2
  24. package/dist/cjs/kup-image-list.cjs.entry.js +9 -9
  25. package/dist/cjs/kup-lazy.cjs.entry.js +2 -2
  26. package/dist/cjs/kup-magic-box.cjs.entry.js +3 -3
  27. package/dist/cjs/{kup-manager-38caaef3.js → kup-manager-130bbd9d.js} +7 -7
  28. package/dist/cjs/kup-nav-bar.cjs.entry.js +2 -2
  29. package/dist/cjs/kup-numeric-picker.cjs.entry.js +5 -5
  30. package/dist/cjs/kup-photo-frame.cjs.entry.js +2 -2
  31. package/dist/cjs/kup-planner.cjs.entry.js +5 -5
  32. package/dist/cjs/kup-probe.cjs.entry.js +2 -2
  33. package/dist/cjs/kup-qlik.cjs.entry.js +2 -2
  34. package/dist/cjs/kup-snackbar.cjs.entry.js +4 -4
  35. package/dist/cjs/loader.cjs.js +2 -2
  36. package/dist/collection/assets/card-list.js +709 -0
  37. package/dist/collection/assets/data-table-performance.js +6 -0
  38. package/dist/collection/assets/data-table.js +44 -0
  39. package/dist/collection/assets/image-list.js +2 -12
  40. package/dist/collection/assets/index.js +4 -4
  41. package/dist/collection/collection-manifest.json +2 -3
  42. package/dist/collection/components/kup-calendar/kup-calendar-declarations.js +1 -1
  43. package/dist/collection/components/kup-card/kup-card.css +20 -7
  44. package/dist/collection/components/kup-card/kup-card.js +25 -22
  45. package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +45 -54
  46. package/dist/collection/components/kup-card-list/kup-card-list-declarations.js +13 -0
  47. package/dist/collection/components/kup-card-list/kup-card-list.css +34 -0
  48. package/dist/collection/components/kup-card-list/kup-card-list.js +481 -0
  49. package/dist/collection/components/kup-data-table/kup-data-table-state.js +1 -1
  50. package/dist/collection/components/kup-echart/kup-echart.js +0 -2
  51. package/dist/collection/components/kup-grid/kup-grid.css +10 -0
  52. package/dist/collection/f-components/f-cell/f-cell-declarations.js +1 -0
  53. package/dist/collection/f-components/f-cell/f-cell.js +19 -12
  54. package/dist/collection/managers/kup-math/kup-math.js +1 -1
  55. package/dist/collection/types/GenericTypes.js +1 -2
  56. package/dist/components/kup-autocomplete2.js +392 -385
  57. package/dist/components/kup-calendar.js +1 -1
  58. package/dist/components/{kup-dash-list.d.ts → kup-card-list.d.ts} +4 -4
  59. package/dist/components/kup-card-list.js +408 -0
  60. package/dist/components/kup-cell.js +1 -1
  61. package/dist/components/kup-chart.js +1 -1
  62. package/dist/components/kup-checkbox.js +1 -1
  63. package/dist/components/kup-chip.js +1 -1
  64. package/dist/components/kup-color-picker.js +1 -1
  65. package/dist/components/kup-combobox.js +1 -1
  66. package/dist/components/kup-dashboard.js +1 -1
  67. package/dist/components/kup-data-table.js +1 -1
  68. package/dist/components/kup-date-picker.js +1 -1
  69. package/dist/components/kup-dialog.js +1 -1
  70. package/dist/components/kup-dropdown-button.js +1 -1
  71. package/dist/components/kup-echart2.js +4578 -4430
  72. package/dist/components/kup-family-tree.js +1 -1
  73. package/dist/components/kup-form.js +1 -1
  74. package/dist/components/kup-gauge.js +1 -1
  75. package/dist/components/kup-grid2.js +1 -1
  76. package/dist/components/kup-image-list.js +1 -1
  77. package/dist/components/kup-image.js +1 -1
  78. package/dist/components/kup-list.js +1 -1
  79. package/dist/components/kup-magic-box.js +1 -1
  80. package/dist/components/kup-numeric-picker.js +1 -1
  81. package/dist/components/kup-planner.js +1 -1
  82. package/dist/esm/{component-cc25b031.js → component-879e99bf.js} +7 -2
  83. package/dist/esm/{f-button-e54ce8d5.js → f-button-baa419dc.js} +2 -2
  84. package/dist/esm/{f-cell-4149a05d.js → f-cell-18ee3afa.js} +24 -17
  85. package/dist/esm/{f-checkbox-7b113dd8.js → f-checkbox-00a1e020.js} +1 -1
  86. package/dist/esm/{f-chip-c3c86f7b.js → f-chip-311500f4.js} +3 -3
  87. package/dist/esm/{f-image-adceee49.js → f-image-da03494c.js} +2 -2
  88. package/dist/esm/{f-paginator-utils-e559dac8.js → f-paginator-utils-d63a195e.js} +3 -3
  89. package/dist/esm/{f-text-field-aa4497a8.js → f-text-field-e5f1f1fd.js} +2 -2
  90. package/dist/esm/{f-text-field-mdc-32a1ffd9.js → f-text-field-mdc-1143cf21.js} +1 -1
  91. package/dist/esm/{index-d413187a.js → index-3336c3b1.js} +86 -8
  92. package/dist/esm/ketchup.js +4 -4
  93. package/dist/esm/kup-accordion.entry.js +4 -4
  94. package/dist/esm/kup-autocomplete_27.entry.js +148 -153
  95. package/dist/esm/kup-box.entry.js +11 -11
  96. package/dist/esm/kup-calendar.entry.js +6 -6
  97. package/dist/esm/kup-card-list.entry.js +240 -0
  98. package/dist/esm/kup-cell.entry.js +7 -7
  99. package/dist/esm/kup-dashboard.entry.js +8 -8
  100. package/dist/esm/kup-drawer.entry.js +2 -2
  101. package/dist/esm/kup-echart.entry.js +4579 -4431
  102. package/dist/esm/kup-family-tree.entry.js +4 -4
  103. package/dist/esm/kup-grid.entry.js +105 -0
  104. package/dist/esm/kup-iframe.entry.js +2 -2
  105. package/dist/esm/kup-image-list.entry.js +9 -9
  106. package/dist/esm/kup-lazy.entry.js +2 -2
  107. package/dist/esm/kup-magic-box.entry.js +3 -3
  108. package/dist/esm/{kup-manager-a4153fb2.js → kup-manager-c8d5c94d.js} +7 -7
  109. package/dist/esm/kup-nav-bar.entry.js +2 -2
  110. package/dist/esm/kup-numeric-picker.entry.js +5 -5
  111. package/dist/esm/kup-photo-frame.entry.js +2 -2
  112. package/dist/esm/kup-planner.entry.js +5 -5
  113. package/dist/esm/kup-probe.entry.js +2 -2
  114. package/dist/esm/kup-qlik.entry.js +2 -2
  115. package/dist/esm/kup-snackbar.entry.js +4 -4
  116. package/dist/esm/loader.js +3 -3
  117. package/dist/ketchup/ketchup.esm.js +1 -1
  118. package/dist/ketchup/{p-d680bdde.js → p-008ad26c.js} +1 -1
  119. package/dist/ketchup/{p-c0878519.entry.js → p-07707cd1.entry.js} +1 -1
  120. package/dist/ketchup/p-0c19d485.entry.js +9 -0
  121. package/dist/ketchup/{p-44b5c573.entry.js → p-13eac183.entry.js} +1 -1
  122. package/dist/ketchup/{p-e76b646c.js → p-25de68e5.js} +1 -1
  123. package/dist/ketchup/{p-c39ddeae.entry.js → p-2a2a18bf.entry.js} +1 -1
  124. package/dist/ketchup/{p-3bbcae45.entry.js → p-2d192def.entry.js} +1 -1
  125. package/dist/ketchup/p-2d42477d.js +2 -0
  126. package/dist/ketchup/{p-b623c774.entry.js → p-2dab9c4f.entry.js} +1 -1
  127. package/dist/ketchup/{p-2f0798d3.js → p-39602629.js} +1 -1
  128. package/dist/ketchup/{p-7360a410.js → p-4597f25d.js} +1 -1
  129. package/dist/ketchup/{p-e917200c.entry.js → p-51aa248f.entry.js} +1 -1
  130. package/dist/ketchup/{p-b415fe84.entry.js → p-55fd3f46.entry.js} +1 -1
  131. package/dist/ketchup/p-5c15661d.entry.js +1 -0
  132. package/dist/ketchup/{p-283ca113.entry.js → p-5cfaa673.entry.js} +1 -1
  133. package/dist/ketchup/{p-b8fcbcc9.entry.js → p-5f583257.entry.js} +1 -1
  134. package/dist/ketchup/{p-698442ed.js → p-7555c10d.js} +1 -1
  135. package/dist/ketchup/{p-3d671241.entry.js → p-76130e83.entry.js} +1 -1
  136. package/dist/ketchup/{p-3081ed82.entry.js → p-7bf649f0.entry.js} +1 -1
  137. package/dist/ketchup/{p-23d54fb2.entry.js → p-7e1c8fc0.entry.js} +1 -1
  138. package/dist/ketchup/p-80699a95.js +1 -0
  139. package/dist/ketchup/{p-3c44e838.entry.js → p-81debebe.entry.js} +1 -1
  140. package/dist/ketchup/{p-47752f3b.js → p-8281c9e5.js} +1 -1
  141. package/dist/ketchup/{p-2739b7ac.entry.js → p-a0f59b05.entry.js} +1 -1
  142. package/dist/ketchup/{p-eec864dd.entry.js → p-a8a39b08.entry.js} +1 -1
  143. package/dist/ketchup/{p-0848391f.entry.js → p-bb854cf5.entry.js} +1 -1
  144. package/dist/ketchup/{p-6d9ffb32.js → p-cd2af1a6.js} +1 -1
  145. package/dist/ketchup/{p-124f3f42.js → p-d4a879fc.js} +1 -1
  146. package/dist/ketchup/{p-f3c8c1da.entry.js → p-d6a7498b.entry.js} +1 -1
  147. package/dist/ketchup/p-d8384990.entry.js +1 -0
  148. package/dist/ketchup/p-da58f8ab.entry.js +39 -0
  149. package/dist/ketchup/p-ecb9fe91.entry.js +1 -0
  150. package/dist/ketchup/{p-d817be2a.js → p-f729449f.js} +1 -1
  151. package/dist/types/components/kup-calendar/kup-calendar-declarations.d.ts +1 -1
  152. package/dist/types/components/kup-calendar/kup-calendar.d.ts +1 -1
  153. package/dist/types/components/kup-card/kup-card.d.ts +3 -3
  154. package/dist/types/components/kup-card-list/kup-card-list-declarations.d.ts +35 -0
  155. package/dist/types/components/kup-card-list/kup-card-list.d.ts +62 -0
  156. package/dist/types/components/kup-data-table/kup-data-table-state.d.ts +1 -1
  157. package/dist/types/components.d.ts +97 -92
  158. package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +1 -0
  159. package/dist/types/managers/kup-math/kup-math.d.ts +1 -1
  160. package/dist/types/stencil-public-runtime.d.ts +11 -1
  161. package/dist/types/types/GenericTypes.d.ts +1 -2
  162. package/package.json +5 -2
  163. package/dist/cjs/kup-dash-list.cjs.entry.js +0 -116
  164. package/dist/cjs/kup-dash_2.cjs.entry.js +0 -179
  165. package/dist/collection/assets/dash-list.js +0 -474
  166. package/dist/collection/components/kup-dash/kup-dash.css +0 -136
  167. package/dist/collection/components/kup-dash/kup-dash.js +0 -171
  168. package/dist/collection/components/kup-dash-list/kup-dash-list.css +0 -10
  169. package/dist/collection/components/kup-dash-list/kup-dash-list.js +0 -331
  170. package/dist/components/kup-dash-list.js +0 -288
  171. package/dist/components/kup-dash.d.ts +0 -11
  172. package/dist/components/kup-dash.js +0 -6
  173. package/dist/components/kup-dash2.js +0 -228
  174. package/dist/esm/kup-dash-list.entry.js +0 -112
  175. package/dist/esm/kup-dash_2.entry.js +0 -174
  176. package/dist/ketchup/p-25d45dc9.entry.js +0 -1
  177. package/dist/ketchup/p-384137d7.entry.js +0 -39
  178. package/dist/ketchup/p-3972b97c.entry.js +0 -1
  179. package/dist/ketchup/p-5ce0e645.entry.js +0 -1
  180. package/dist/ketchup/p-be864593.entry.js +0 -9
  181. package/dist/ketchup/p-f79d544a.js +0 -1
  182. package/dist/ketchup/p-fd75d5bf.js +0 -2
  183. package/dist/types/components/kup-dash/kup-dash.d.ts +0 -33
  184. package/dist/types/components/kup-dash-list/kup-dash-list.d.ts +0 -22
@@ -1,116 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-eac07680.js');
6
- const kupManager = require('./kup-manager-38caaef3.js');
7
-
8
- const kupDashListCss = ".horizontal{display:inline-block;min-width:300px;max-width:100%;overflow:visible;white-space:nowrap;border:solid;border-width:1px;margin:2px}";
9
-
10
- const KupDashList = class {
11
- constructor(hostRef) {
12
- index.registerInstance(this, hostRef);
13
- this.dashClick = index.createEvent(this, "kup-dash-click", 7);
14
- /*-------------------------------------------------*/
15
- /* I n t e r n a l V a r i a b l e s */
16
- /*-------------------------------------------------*/
17
- /**
18
- * Instance of the KupManager class.
19
- */
20
- this.kupManager = kupManager.kupManagerInstance();
21
- this.layout = '1';
22
- this.fontsize = '';
23
- this.active = false;
24
- this.columnsNumber = 1;
25
- this.fullWidth = true;
26
- this.horizontal = false;
27
- this.iconColor = [];
28
- this.valueColor = [];
29
- this.textColor = [];
30
- this.data = undefined;
31
- }
32
- render() {
33
- let rows = [];
34
- var count = 0;
35
- this.data.rows.forEach((r) => {
36
- let icon = '';
37
- let unit = '';
38
- let descr = '';
39
- let value = '';
40
- let valueInt = '';
41
- let valueDec = '';
42
- let iconColor = {
43
- color: this.iconColor[count]
44
- ? this.kupManager.theme.colorCheck(this.iconColor[count])
45
- .hexColor
46
- : null,
47
- };
48
- let textColor = {
49
- color: this.textColor[count]
50
- ? this.kupManager.theme.colorCheck(this.textColor[count])
51
- .hexColor
52
- : null,
53
- };
54
- let valueColor = {
55
- color: this.valueColor[count]
56
- ? this.kupManager.theme.colorCheck(this.valueColor[count])
57
- .hexColor
58
- : null,
59
- };
60
- if (this.data.columns[0]) {
61
- icon = (index.h("div", { slot: "icon" }, index.h("icon", { class: r.cells[this.data.columns[0].name].obj.k, style: iconColor })));
62
- }
63
- else {
64
- icon = index.h("div", { slot: "icon" });
65
- }
66
- if (this.data.columns[1]) {
67
- unit = (index.h("div", { slot: "unit", style: valueColor }, r.cells[this.data.columns[1].name].obj.k, ' '));
68
- }
69
- else {
70
- unit = index.h("div", { slot: "unit" });
71
- }
72
- if (this.data.columns[2]) {
73
- descr = (index.h("div", { slot: "descr", style: textColor }, r.cells[this.data.columns[2].name].obj.k));
74
- }
75
- else {
76
- descr = index.h("div", { slot: "descr" });
77
- }
78
- if (this.data.columns[3]) {
79
- let col = this.data.columns[3];
80
- col.obj = r.cells[this.data.columns[3].name].obj;
81
- let newValue = kupManager.getCellValueForDisplay(col, r.cells[this.data.columns[3].name]);
82
- value = (index.h("div", { slot: "value", style: valueColor }, newValue));
83
- }
84
- else {
85
- value = index.h("div", { slot: "value" });
86
- }
87
- if (this.data.columns[5]) {
88
- let col = this.data.columns[5];
89
- col.obj = r.cells[this.data.columns[5].name].obj;
90
- let newValue = kupManager.getCellValueForDisplay(col, r.cells[this.data.columns[5].name]);
91
- if (this.data.columns[6] &&
92
- r.cells[this.data.columns[6].name].obj.k) {
93
- newValue =
94
- newValue + this.kupManager.math.decimalSeparator();
95
- }
96
- valueInt = (index.h("div", { slot: "value-int", style: valueColor }, newValue));
97
- }
98
- else {
99
- valueInt = index.h("div", { slot: "value-int" });
100
- }
101
- if (this.data.columns[6]) {
102
- valueDec = (index.h("div", { slot: "value-dec", style: valueColor }, r.cells[this.data.columns[6].name].obj.k));
103
- }
104
- else {
105
- valueDec = index.h("div", { slot: "value-dec" });
106
- }
107
- const row = (index.h("kup-dash", { layout: this.layout, fontsize: this.fontsize, index: count, active: this.active, slot: String(count) }, icon, unit, descr, value, valueInt, valueDec));
108
- rows.push(row);
109
- count++;
110
- });
111
- return (index.h("div", null, index.h("link", { href: "https://cdn.materialdesignicons.com/4.5.95/css/materialdesignicons.min.css", rel: "stylesheet", type: "text/css" }), index.h("kup-grid", { columns: this.columnsNumber, singleLine: this.horizontal, class: `${this.fullWidth ? 'kup-full-width' : ''}` }, rows)));
112
- }
113
- };
114
- KupDashList.style = kupDashListCss;
115
-
116
- exports.kup_dash_list = KupDashList;
@@ -1,179 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-eac07680.js');
6
- const kupManager = require('./kup-manager-38caaef3.js');
7
- const GenericVariables = require('./GenericVariables-1d52ba57.js');
8
-
9
- const kupDashCss = "#dash{color:var(--kup-text-color);font-size:2vw;display:flex;align-items:center;justify-content:center;position:relative;text-align:center;position:relative;word-break:normal}#dash.with-dyn{cursor:pointer}#dash #content .icon{margin:auto;font-size:90%}#dash #content.layout-1,#dash #content.layout-3{text-align:center}#dash #content.layout-1 .descr,#dash #content.layout-3 .descr{font-size:70%;width:100%}#dash #content.layout-1 .value,#dash #content.layout-3 .value{font-size:220%}#dash #content.layout-2>div{display:flex}#dash #content.layout-2>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-2>div .value-int{font-size:250%}#dash #content.layout-2>div .value-dec,#dash #content.layout-2>div .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-2>div .value-dec{margin-left:2%}#dash #content.layout-2>div .unit{margin-left:4%}#dash #content.layout-4>div{display:grid;grid-template-columns:2fr 5fr}#dash #content.layout-4>div .icon{margin:auto;font-size:150%;margin-right:5%}#dash #content.layout-4>div .value-and-unit{display:flex}#dash #content.layout-4>div .value-and-unit .value-int{font-size:250%}#dash #content.layout-4>div .value-and-unit .value-dec,#dash #content.layout-4>div .value-and-unit .unit{font-size:130%;margin-top:auto;margin-bottom:7%}#dash #content.layout-4>div .value-and-unit .value-dec{margin-left:2%}#dash #content.layout-4>div .value-and-unit .unit{margin-left:4%}#dash #content.layout-4>div .descr{margin-left:4%;text-align:left;font-size:80%;width:100%;min-width:max-content}#dash #content.layout-5>div,#dash #content.layout-7>div{display:flex}#dash #content.layout-5>div .icon,#dash #content.layout-7>div .icon{font-size:150%;margin:auto;margin-left:10%}#dash #content.layout-5>div .value,#dash #content.layout-7>div .value{font-size:200%}#dash #content.layout-5>div .descr,#dash #content.layout-7>div .descr{text-align:right;font-size:65%;width:100%;min-width:max-content}#dash #content.layout-6>div{display:flex;justify-content:space-between}#dash #content.layout-6>div .icon{font-size:150%;margin-right:10%}#dash #content.layout-6>div .value{font-size:220%;text-align:right}#dash #content.layout-6>div .descr{font-size:80%;text-align:right;width:100%;min-width:max-content}#dash #content.layout-8>div{display:flex;align-items:center}#dash #content.layout-8>div .icon{margin-right:4%;font-size:75%}#dash #content.layout-8>div .value{margin:0 10%;font-size:250%}#dash #content.layout-8>div .descr{font-size:60%;text-align:left}";
10
-
11
- const KupDash = class {
12
- constructor(hostRef) {
13
- index.registerInstance(this, hostRef);
14
- this.dashClick = index.createEvent(this, "kup-dash-click", 6);
15
- /**
16
- * Instance of the KupManager class.
17
- */
18
- this.kupManager = kupManager.kupManagerInstance();
19
- this.active = false;
20
- this.fontsize = '';
21
- this.layout = '1';
22
- this.index = 0;
23
- }
24
- onDshClickHandler() {
25
- this.dashClick.emit({
26
- id: this.index,
27
- });
28
- }
29
- //---- Lifecycle hooks ----
30
- componentWillLoad() {
31
- this.kupManager.debug.logLoad(this, false);
32
- }
33
- componentDidLoad() {
34
- this.kupManager.debug.logLoad(this, true);
35
- }
36
- componentWillRender() {
37
- this.kupManager.debug.logRender(this, false);
38
- }
39
- componentDidRender() {
40
- this.kupManager.debug.logRender(this, true);
41
- }
42
- render() {
43
- let content = null;
44
- switch (this.layout) {
45
- case '2':
46
- content = (index.h("div", null, index.h("div", { class: "icon" }, index.h("slot", { name: "icon" })), index.h("div", { class: "value-int" }, index.h("slot", { name: "value-int" })), index.h("div", { class: "value-dec" }, index.h("slot", { name: "value-dec" })), index.h("div", { class: "unit" }, index.h("slot", { name: "unit" }))));
47
- break;
48
- case '3':
49
- content = (index.h("div", null, index.h("div", { class: "value" }, index.h("slot", { name: "value" })), index.h("div", { class: "descr" }, index.h("slot", { name: "descr" }))));
50
- break;
51
- case '4':
52
- content = (index.h("div", null, index.h("div", { class: "icon" }, index.h("slot", { name: "icon" })), index.h("div", { class: "value-and-unit" }, index.h("div", { class: "value-int" }, index.h("slot", { name: "value-int" })), index.h("div", { class: "value-dec" }, index.h("slot", { name: "value-dec" })), index.h("div", { class: "unit" }, index.h("slot", { name: "unit" }))), index.h("div", null), index.h("div", { class: "descr" }, index.h("slot", { name: "descr" }))));
53
- break;
54
- case '5':
55
- content = (index.h("div", null, index.h("div", null, index.h("div", { class: "descr" }, index.h("slot", { name: "descr" })), index.h("div", { class: "value" }, index.h("slot", { name: "value" }))), index.h("div", { class: "icon" }, index.h("slot", { name: "icon" }))));
56
- break;
57
- case '6':
58
- content = (index.h("div", null, index.h("div", { class: "icon" }, index.h("slot", { name: "icon" })), index.h("div", null, index.h("div", { class: "value" }, index.h("slot", { name: "value" })), index.h("div", { class: "descr" }, index.h("slot", { name: "descr" })))));
59
- break;
60
- case '7':
61
- content = (index.h("div", null, index.h("div", null, index.h("div", { class: "value" }, index.h("slot", { name: "value" })), index.h("div", { class: "descr" }, index.h("slot", { name: "descr" }))), index.h("div", { class: "icon" }, index.h("slot", { name: "icon" }))));
62
- break;
63
- case '8':
64
- content = (index.h("div", null, index.h("div", { class: "icon" }, index.h("slot", { name: "icon" })), index.h("div", { class: "value" }, index.h("slot", { name: "value" })), index.h("div", { class: "descr" }, index.h("slot", { name: "descr" }))));
65
- break;
66
- default:
67
- // layout 1
68
- content = (index.h("div", null, index.h("div", { class: "descr" }, index.h("slot", { name: "descr" })), index.h("div", { class: "value" }, index.h("slot", { name: "value" }))));
69
- break;
70
- }
71
- const style = { fontSize: this.fontsize };
72
- return (index.h("div", { id: "dash", class: `${this.active ? 'with-dyn' : ''}`, style: style, onClick: () => this.onDshClickHandler() }, index.h("div", { id: "content", class: `layout-${this.layout} ` }, content)));
73
- }
74
- get rootElement() { return index.getElement(this); }
75
- };
76
- KupDash.style = kupDashCss;
77
-
78
- /**
79
- * Props of the kup-grid component.
80
- * Used to export every prop in an object.
81
- */
82
- var KupGridProps;
83
- (function (KupGridProps) {
84
- KupGridProps["columns"] = "The number of columns displayed by the grid, the default behavior is 12.";
85
- KupGridProps["customStyle"] = "Custom style of the component. For more information: https://ketchup.smeup.com/ketchup-showcase/#/customization";
86
- KupGridProps["singleLine"] = "When set to true, forces the content on a single line.";
87
- })(KupGridProps || (KupGridProps = {}));
88
-
89
- const kupGridCss = ":host{--kup_grid_font_size:var(--kup-grid-font-size, var(--kup-font-size));--kup_grid_gap:var(--kup-grid-gap, 24px);--kup_grid_gap_mobile:var(--kup-grid-gap-mobile, 16px);--kup_grid_padding:var(--kup-grid-padding, 24px);font-size:var(--kup_grid_font_size);height:100%;width:100%}#kup-component{height:100%;width:100%}.layout-grid{box-sizing:border-box;margin:0px auto;padding:var(--kup_grid_padding)}.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap);grid-template-columns:repeat(var(--kup_grid_columns, 12), minmax(0px, 1fr))}.layout-grid .layout-grid__inner .layout-grid__cell{box-sizing:border-box;display:flex;justify-content:center;margin:0px;width:auto}.layout-grid__cell--span-1{grid-column-end:span 1}.layout-grid__cell--span-2{grid-column-end:span 2}.layout-grid__cell--span-3{grid-column-end:span 3}.layout-grid__cell--span-4{grid-column-end:span 4}.layout-grid__cell--span-5{grid-column-end:span 5}.layout-grid__cell--span-6{grid-column-end:span 6}.layout-grid__cell--span-7{grid-column-end:span 7}.layout-grid__cell--span-8{grid-column-end:span 8}.layout-grid__cell--span-9{grid-column-end:span 9}.layout-grid__cell--span-10{grid-column-end:span 10}.layout-grid__cell--span-11{grid-column-end:span 11}.layout-grid__cell--span-12{grid-column-end:span 12}.layout-grid__cell--span-13{grid-column-end:span 13}.layout-grid__cell--span-14{grid-column-end:span 14}.layout-grid__cell--span-15{grid-column-end:span 15}.layout-grid__cell--span-16{grid-column-end:span 16}.layout-grid__cell--span-17{grid-column-end:span 17}.layout-grid__cell--span-18{grid-column-end:span 18}.layout-grid__cell--span-19{grid-column-end:span 19}.layout-grid__cell--span-20{grid-column-end:span 20}.layout-grid__cell--span-21{grid-column-end:span 21}.layout-grid__cell--span-22{grid-column-end:span 22}.layout-grid__cell--span-23{grid-column-end:span 23}.layout-grid__cell--span-24{grid-column-end:span 24}.flex-layout,.flex-layout__inner{height:100%;align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap}.flex-layout__inner{width:auto}.flex-layout__inner *{display:block;margin:0 1.5em}.flex-layout__inner .flex-layout__cell{display:flex}.flex-layout__inner .flex-layout__cell *{justify-content:center;margin:auto}@media (min-width: 600px) and (max-width: 839px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 8), minmax(0px, 1fr))}}@media (max-width: 599px){.layout-grid .layout-grid__inner{display:grid;margin:0px;grid-gap:var(--kup_grid_gap_mobile);grid-template-columns:repeat(var(--kup_grid_columns, 4), minmax(0px, 1fr))}}:host(.kup-full-width) .flex-layout__inner{width:100%}:host(.kup-full-width) .flex-layout__inner *{margin:auto}";
90
-
91
- const KupGrid = class {
92
- constructor(hostRef) {
93
- index.registerInstance(this, hostRef);
94
- /*-------------------------------------------------*/
95
- /* I n t e r n a l V a r i a b l e s */
96
- /*-------------------------------------------------*/
97
- /**
98
- * Instance of the KupManager class.
99
- */
100
- this.kupManager = kupManager.kupManagerInstance();
101
- this.columns = 12;
102
- this.customStyle = '';
103
- this.singleLine = false;
104
- }
105
- /*-------------------------------------------------*/
106
- /* P u b l i c M e t h o d s */
107
- /*-------------------------------------------------*/
108
- /**
109
- * Used to retrieve component's props values.
110
- * @param {boolean} descriptions - When provided and true, the result will be the list of props with their description.
111
- * @returns {Promise<GenericObject>} List of props as object, each key will be a prop.
112
- */
113
- async getProps(descriptions) {
114
- return kupManager.getProps(this, KupGridProps, descriptions);
115
- }
116
- /**
117
- * This method is used to trigger a new render of the component.
118
- */
119
- async refresh() {
120
- index.forceUpdate(this);
121
- }
122
- /**
123
- * Sets the props to the component.
124
- * @param {GenericObject} props - Object containing props that will be set to the component.
125
- */
126
- async setProps(props) {
127
- kupManager.setProps(this, KupGridProps, props);
128
- }
129
- /*-------------------------------------------------*/
130
- /* L i f e c y c l e H o o k s */
131
- /*-------------------------------------------------*/
132
- componentWillLoad() {
133
- this.kupManager.debug.logLoad(this, false);
134
- this.kupManager.theme.register(this);
135
- }
136
- componentDidLoad() {
137
- this.kupManager.debug.logLoad(this, true);
138
- }
139
- componentWillRender() {
140
- this.kupManager.debug.logRender(this, false);
141
- }
142
- componentDidRender() {
143
- this.kupManager.debug.logRender(this, true);
144
- }
145
- render() {
146
- const slots = this.rootElement.children;
147
- if (!slots || slots.length === 0) {
148
- this.kupManager.debug.logMessage(this, 'Missing slots, not rendering!', kupManager.KupDebugCategory.WARNING);
149
- return;
150
- }
151
- const content = [];
152
- for (let i = 0; i < slots.length; i++) {
153
- let el = null;
154
- if (this.singleLine) {
155
- el = index.h("slot", { name: `${i}` });
156
- }
157
- else {
158
- const span = slots[i]['span'] || slots[i].getAttribute('span') || 1;
159
- el = (index.h("div", { class: `layout-grid__cell layout-grid__cell--span-${span}` }, index.h("slot", { name: `${i}` })));
160
- }
161
- content.push(el);
162
- }
163
- const style = {};
164
- if (this.columns && this.columns !== 12) {
165
- style['--kup_grid_columns'] = this.columns;
166
- }
167
- return (index.h(index.Host, { style: style }, index.h("style", null, this.kupManager.theme.setKupStyle(this.rootElement)), index.h("div", { id: GenericVariables.componentWrapperId }, index.h("div", { class: this.singleLine ? 'flex-layout' : 'layout-grid' }, index.h("div", { class: this.singleLine
168
- ? 'flex-layout__inner'
169
- : 'layout-grid__inner' }, content)))));
170
- }
171
- disconnectedCallback() {
172
- this.kupManager.theme.unregister(this);
173
- }
174
- get rootElement() { return index.getElement(this); }
175
- };
176
- KupGrid.style = kupGridCss;
177
-
178
- exports.kup_dash = KupDash;
179
- exports.kup_grid = KupGrid;