@sme.up/ketchup 6.9.0-SNAPSHOT → 7.1.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.
- package/dist/cjs/{f-button-e48df7ac.js → f-button-40953600.js} +1 -1
- package/dist/cjs/{f-cell-73b2fd86.js → f-cell-e603ae4f.js} +11 -8
- package/dist/cjs/{f-chip-1d499dc9.js → f-chip-01efabde.js} +2 -2
- package/dist/cjs/{f-image-9be73458.js → f-image-f741cb4c.js} +1 -1
- package/dist/cjs/{f-paginator-utils-b1f44f04.js → f-paginator-utils-35a6a848.js} +15 -12
- package/dist/cjs/{f-text-field-43439612.js → f-text-field-60a2f24c.js} +1 -1
- package/dist/cjs/ketchup.cjs.js +1 -1
- package/dist/cjs/kup-accordion.cjs.entry.js +2 -2
- package/dist/cjs/kup-autocomplete_26.cjs.entry.js +237 -35
- package/dist/cjs/kup-box.cjs.entry.js +7 -7
- package/dist/cjs/kup-calendar.cjs.entry.js +4 -4
- package/dist/cjs/kup-cell.cjs.entry.js +5 -5
- package/dist/cjs/kup-dash-list.cjs.entry.js +1 -1
- package/dist/cjs/kup-dash_2.cjs.entry.js +1 -1
- package/dist/cjs/kup-dashboard.cjs.entry.js +4 -4
- package/dist/cjs/kup-drawer.cjs.entry.js +1 -1
- package/dist/cjs/kup-echart.cjs.entry.js +6 -4
- package/dist/cjs/kup-family-tree.cjs.entry.js +3 -3
- package/dist/cjs/kup-iframe.cjs.entry.js +1 -1
- package/dist/cjs/kup-image-list.cjs.entry.js +6 -6
- package/dist/cjs/kup-lazy.cjs.entry.js +1 -1
- package/dist/cjs/kup-magic-box.cjs.entry.js +2 -2
- package/dist/cjs/{kup-manager-58ba55f4.js → kup-manager-6f05ebe1.js} +7 -2
- package/dist/cjs/kup-nav-bar.cjs.entry.js +1 -1
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +2 -2
- package/dist/cjs/kup-photo-frame.cjs.entry.js +1 -1
- package/dist/cjs/kup-probe.cjs.entry.js +1 -1
- package/dist/cjs/kup-qlik.cjs.entry.js +1 -1
- package/dist/cjs/kup-snackbar.cjs.entry.js +3 -3
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/assets/card.js +9 -2
- package/dist/collection/assets/data-table.js +4 -1
- package/dist/collection/components/kup-card/box/kup-card-box.js +114 -5
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +7 -2
- package/dist/collection/components/kup-card/kup-card.css +171 -21
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +1 -0
- package/dist/collection/components/kup-data-table/kup-data-table-helper.js +11 -9
- package/dist/collection/components/kup-data-table/kup-data-table.css +2 -1
- package/dist/collection/components/kup-data-table/kup-data-table.js +94 -14
- package/dist/collection/components/kup-echart/kup-echart.js +5 -3
- package/dist/collection/components/kup-form/kup-form-declarations.js +3 -0
- package/dist/collection/components/kup-form/kup-form.js +57 -4
- package/dist/collection/f-components/f-button/f-button.js +0 -1
- package/dist/collection/f-components/f-cell/f-cell-declarations.js +2 -0
- package/dist/collection/f-components/f-cell/f-cell.js +7 -4
- package/dist/collection/managers/kup-data/kup-data.js +3 -1
- package/dist/collection/utils/filters/filters-rows.js +2 -1
- package/dist/components/kup-autocomplete2.js +259 -44
- package/dist/components/kup-echart2.js +5 -3
- package/dist/esm/{f-button-b902ad65.js → f-button-9aec1bc5.js} +1 -1
- package/dist/esm/{f-cell-b11d0d5d.js → f-cell-556937d0.js} +11 -8
- package/dist/esm/{f-chip-6b8cd306.js → f-chip-677db32a.js} +2 -2
- package/dist/esm/{f-image-983805af.js → f-image-52bb5950.js} +1 -1
- package/dist/esm/{f-paginator-utils-b22bec1f.js → f-paginator-utils-d472e336.js} +15 -12
- package/dist/esm/{f-text-field-3f9a7ba7.js → f-text-field-88f92118.js} +1 -1
- package/dist/esm/ketchup.js +1 -1
- package/dist/esm/kup-accordion.entry.js +2 -2
- package/dist/esm/kup-autocomplete_26.entry.js +237 -35
- package/dist/esm/kup-box.entry.js +7 -7
- package/dist/esm/kup-calendar.entry.js +4 -4
- package/dist/esm/kup-cell.entry.js +5 -5
- package/dist/esm/kup-dash-list.entry.js +1 -1
- package/dist/esm/kup-dash_2.entry.js +1 -1
- package/dist/esm/kup-dashboard.entry.js +4 -4
- package/dist/esm/kup-drawer.entry.js +1 -1
- package/dist/esm/kup-echart.entry.js +6 -4
- package/dist/esm/kup-family-tree.entry.js +3 -3
- package/dist/esm/kup-iframe.entry.js +1 -1
- package/dist/esm/kup-image-list.entry.js +6 -6
- package/dist/esm/kup-lazy.entry.js +1 -1
- package/dist/esm/kup-magic-box.entry.js +2 -2
- package/dist/esm/{kup-manager-a1976c1f.js → kup-manager-12e99c22.js} +7 -2
- package/dist/esm/kup-nav-bar.entry.js +1 -1
- package/dist/esm/kup-numeric-picker.entry.js +2 -2
- package/dist/esm/kup-photo-frame.entry.js +1 -1
- package/dist/esm/kup-probe.entry.js +1 -1
- package/dist/esm/kup-qlik.entry.js +1 -1
- package/dist/esm/kup-snackbar.entry.js +3 -3
- package/dist/esm/loader.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-b8de542a.entry.js → p-053824eb.entry.js} +1 -1
- package/dist/ketchup/{p-fc1f1a63.entry.js → p-1c371df3.entry.js} +2 -2
- package/dist/ketchup/{p-59a78bb2.js → p-25617855.js} +1 -1
- package/dist/ketchup/p-278188bf.js +1 -0
- package/dist/ketchup/{p-6686f614.entry.js → p-3a7a05a7.entry.js} +1 -1
- package/dist/ketchup/{p-bb172702.entry.js → p-4021d751.entry.js} +1 -1
- package/dist/ketchup/{p-c1d3332f.entry.js → p-485883cb.entry.js} +1 -1
- package/dist/ketchup/{p-751a87a6.js → p-4f7302a9.js} +1 -1
- package/dist/ketchup/{p-2f274bd1.entry.js → p-52f19c4f.entry.js} +1 -1
- package/dist/ketchup/{p-1df3f4b3.js → p-5483f20e.js} +1 -1
- package/dist/ketchup/{p-0e34943f.entry.js → p-584369be.entry.js} +1 -1
- package/dist/ketchup/{p-913d78b8.entry.js → p-60609877.entry.js} +1 -1
- package/dist/ketchup/{p-ca42bab6.entry.js → p-6a6c3e69.entry.js} +1 -1
- package/dist/ketchup/p-751b5708.js +1 -0
- package/dist/ketchup/{p-a4c30e9a.entry.js → p-775e0d34.entry.js} +1 -1
- package/dist/ketchup/{p-fe4d6234.entry.js → p-7e013c24.entry.js} +1 -1
- package/dist/ketchup/{p-f08ba5cd.js → p-85c7a3a4.js} +1 -1
- package/dist/ketchup/{p-b2bb0feb.entry.js → p-88adddcf.entry.js} +1 -1
- package/dist/ketchup/{p-5c6798dc.entry.js → p-94290b09.entry.js} +1 -1
- package/dist/ketchup/{p-34fb0757.js → p-9570ebfa.js} +1 -1
- package/dist/ketchup/{p-67c86b4a.entry.js → p-ac33139e.entry.js} +1 -1
- package/dist/ketchup/{p-1f1c3e90.entry.js → p-ad3e7b2b.entry.js} +1 -1
- package/dist/ketchup/p-b0f22298.entry.js +9 -0
- package/dist/ketchup/{p-9003c78d.entry.js → p-c59e6bc7.entry.js} +1 -1
- package/dist/ketchup/{p-7d223413.entry.js → p-ce1da4a8.entry.js} +1 -1
- package/dist/ketchup/{p-8bed854e.entry.js → p-e0135ce0.entry.js} +1 -1
- package/dist/ketchup/{p-6154123c.entry.js → p-e094ebb8.entry.js} +1 -1
- package/dist/ketchup/{p-ca723973.entry.js → p-f44aba79.entry.js} +1 -1
- package/dist/types/adoptedStyleSheet-shim.d.ts +3 -3
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +9 -9
- package/dist/types/components/kup-card/box/kup-card-box.d.ts +24 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +3 -1
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +4 -0
- package/dist/types/components/kup-form/kup-form-declarations.d.ts +4 -1
- package/dist/types/components/kup-form/kup-form.d.ts +11 -1
- package/dist/types/components.d.ts +25 -1
- package/dist/types/f-components/f-cell/f-cell-declarations.d.ts +2 -1
- package/package.json +1 -1
- package/dist/ketchup/p-43d52a62.js +0 -1
- package/dist/ketchup/p-5d4503ff.entry.js +0 -9
- package/dist/ketchup/p-657eb6db.js +0 -1
|
@@ -77,22 +77,23 @@ export function create3(component) {
|
|
|
77
77
|
* @returns {VNode} 4th box layout virtual node.
|
|
78
78
|
*/
|
|
79
79
|
export function create4(component) {
|
|
80
|
+
var _a;
|
|
80
81
|
const cells = component.data.cell;
|
|
81
82
|
const columns = component.data.columns;
|
|
82
83
|
let image = null;
|
|
83
84
|
let value = null;
|
|
84
85
|
for (let index = 0; index < cells.length; index++) {
|
|
85
86
|
const cell = cells[index];
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
87
|
+
const isImage = dom.ketchup.objects.isImage(cell.obj) ||
|
|
88
|
+
dom.ketchup.objects.isIcon(cell.obj) ||
|
|
89
|
+
((_a = cell.shape) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === FCellShapes.IMAGE;
|
|
90
|
+
if (!image && isImage) {
|
|
90
91
|
image = index;
|
|
91
92
|
if (!cell.data) {
|
|
92
93
|
cell.data = { resource: cell.value };
|
|
93
94
|
}
|
|
94
95
|
}
|
|
95
|
-
if (!value && !
|
|
96
|
+
if (!value && !isImage) {
|
|
96
97
|
value = index;
|
|
97
98
|
}
|
|
98
99
|
}
|
|
@@ -116,3 +117,111 @@ export function create4(component) {
|
|
|
116
117
|
};
|
|
117
118
|
return (h("div", { class: `box-layout-${component.layoutNumber}` }, h("div", { class: "container" }, h("div", { class: "image" }, h(FCell, Object.assign({}, imageProps))), h("div", { class: "value" }, h(FCell, Object.assign({}, valueProps))))));
|
|
118
119
|
}
|
|
120
|
+
/**
|
|
121
|
+
* 5th box card layout, image on the left and rows of text.
|
|
122
|
+
* @param {KupCard} component - Card component.
|
|
123
|
+
* @returns {VNode} 5th box layout virtual node.
|
|
124
|
+
*/
|
|
125
|
+
export function create5(component) {
|
|
126
|
+
var _a;
|
|
127
|
+
const cells = component.data.cell;
|
|
128
|
+
const columns = component.data.columns;
|
|
129
|
+
const rows = [];
|
|
130
|
+
let imageProps = null;
|
|
131
|
+
for (let index = 0; index < cells.length; index++) {
|
|
132
|
+
const cell = cells[index];
|
|
133
|
+
const column = component.data.columns[index];
|
|
134
|
+
const isImage = dom.ketchup.objects.isImage(cell.obj) ||
|
|
135
|
+
dom.ketchup.objects.isIcon(cell.obj) ||
|
|
136
|
+
((_a = cell.shape) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === FCellShapes.IMAGE;
|
|
137
|
+
if (!imageProps && isImage) {
|
|
138
|
+
imageProps = {
|
|
139
|
+
cell: cells[index],
|
|
140
|
+
column: columns[index],
|
|
141
|
+
component: component,
|
|
142
|
+
density: FCellPadding.NONE,
|
|
143
|
+
renderKup: true,
|
|
144
|
+
row: { cells: { [columns[index].name]: cells[index] } },
|
|
145
|
+
wrapperClass: 'c-centered',
|
|
146
|
+
};
|
|
147
|
+
if (!cell.data) {
|
|
148
|
+
cell.data = { resource: cell.value };
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
else {
|
|
152
|
+
const props = {
|
|
153
|
+
cell: cell,
|
|
154
|
+
column: column,
|
|
155
|
+
component: component,
|
|
156
|
+
density: FCellPadding.NONE,
|
|
157
|
+
renderKup: true,
|
|
158
|
+
row: { cells: { [column.name]: cell } },
|
|
159
|
+
};
|
|
160
|
+
rows.push(h("tr", null, h("td", { class: "label" }, column.title), h("td", { class: `value` }, h(FCell, Object.assign({}, props)))));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return (h("div", { class: `box-layout-${component.layoutNumber}` }, h("div", { class: "container" }, imageProps ? (h("div", { class: "image" }, h(FCell, Object.assign({}, imageProps)))) : null, h("div", { class: "table" }, h("table", null, rows)))));
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* 6th box card layout, image on the left and vertical list of text.
|
|
167
|
+
* @param {KupCard} component - Card component.
|
|
168
|
+
* @returns {VNode} 6th box layout virtual node.
|
|
169
|
+
*/
|
|
170
|
+
export function create6(component) {
|
|
171
|
+
var _a;
|
|
172
|
+
const cells = component.data.cell;
|
|
173
|
+
const columns = component.data.columns;
|
|
174
|
+
const rows = [];
|
|
175
|
+
let image = null;
|
|
176
|
+
for (let index = 0; index < cells.length; index++) {
|
|
177
|
+
const cell = cells[index];
|
|
178
|
+
const column = component.data.columns[index];
|
|
179
|
+
const isImage = dom.ketchup.objects.isImage(cell.obj) ||
|
|
180
|
+
dom.ketchup.objects.isIcon(cell.obj) ||
|
|
181
|
+
((_a = cell.shape) === null || _a === void 0 ? void 0 : _a.toUpperCase()) === FCellShapes.IMAGE;
|
|
182
|
+
if (!image && isImage) {
|
|
183
|
+
image = index;
|
|
184
|
+
if (!cell.data) {
|
|
185
|
+
cell.data = { resource: cell.value };
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
else {
|
|
189
|
+
const props = {
|
|
190
|
+
cell: cell,
|
|
191
|
+
column: column,
|
|
192
|
+
component: component,
|
|
193
|
+
density: FCellPadding.NONE,
|
|
194
|
+
renderKup: true,
|
|
195
|
+
row: { cells: { [column.name]: cell } },
|
|
196
|
+
};
|
|
197
|
+
rows.push(h("tr", null, h("td", { class: "label" }, column.title)));
|
|
198
|
+
rows.push(h("tr", null, h("td", { class: `value` }, h(FCell, Object.assign({}, props)))));
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const imageProps = {
|
|
202
|
+
cell: cells[image],
|
|
203
|
+
column: columns[image],
|
|
204
|
+
component: component,
|
|
205
|
+
density: FCellPadding.NONE,
|
|
206
|
+
renderKup: true,
|
|
207
|
+
row: { cells: { [columns[image].name]: cells[image] } },
|
|
208
|
+
wrapperClass: 'c-centered',
|
|
209
|
+
};
|
|
210
|
+
return (h("div", { class: `box-layout-${component.layoutNumber}` }, h("div", { class: "container" }, h("div", { class: "image" }, h(FCell, Object.assign({}, imageProps))), h("div", { class: "table" }, h("table", null, rows)))));
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* 7th box card layout, image above and rows of text.
|
|
214
|
+
* @param {KupCard} component - Card component.
|
|
215
|
+
* @returns {VNode} 7th box layout virtual node.
|
|
216
|
+
*/
|
|
217
|
+
export function create7(component) {
|
|
218
|
+
return create5(component);
|
|
219
|
+
}
|
|
220
|
+
/**
|
|
221
|
+
* 8th box card layout, image above and vertical list of text.
|
|
222
|
+
* @param {KupCard} component - Card component.
|
|
223
|
+
* @returns {VNode} 8th box layout virtual node.
|
|
224
|
+
*/
|
|
225
|
+
export function create8(component) {
|
|
226
|
+
return create6(component);
|
|
227
|
+
}
|
|
@@ -15,10 +15,12 @@ export function prepareCalendar(component) {
|
|
|
15
15
|
el.kupData = {};
|
|
16
16
|
const obj = opts.initialValue;
|
|
17
17
|
if (opts.initialValue) {
|
|
18
|
-
if (obj && obj.k)
|
|
18
|
+
if (obj && obj.k) {
|
|
19
19
|
setValue(component, new Date(obj.k));
|
|
20
|
-
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
21
22
|
setValue(component, new Date(opts.initialValue));
|
|
23
|
+
}
|
|
22
24
|
}
|
|
23
25
|
if (opts.firstDayIndex)
|
|
24
26
|
el.kupData.firstDayIndex = opts.firstDayIndex;
|
|
@@ -73,6 +75,9 @@ export function prepareCalendar(component) {
|
|
|
73
75
|
return (h("div", { id: component.rootElement.id + '_calendar' }, h("div", { class: "section-1" }, h("div", { class: "sub-1 nav" }, prevButtonComp, h(FButton, Object.assign({}, changeViewButtonProp)), nextButtonComp)), h("div", { class: "section-2" }, createCalendar(component))));
|
|
74
76
|
}
|
|
75
77
|
function setValue(component, value) {
|
|
78
|
+
if (!!(value instanceof Date)) {
|
|
79
|
+
value = new Date();
|
|
80
|
+
}
|
|
76
81
|
const el = component.rootElement;
|
|
77
82
|
el.kupData.value = value;
|
|
78
83
|
el.kupData.day = el.kupData.value.getDate();
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
width: 50%;
|
|
15
15
|
}
|
|
16
16
|
.box-layout-1 .value {
|
|
17
|
-
padding: 0.5em;
|
|
18
17
|
font-weight: bold;
|
|
18
|
+
padding: 0.5em;
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
.box-layout-2 {
|
|
@@ -54,6 +54,14 @@
|
|
|
54
54
|
.box-layout-3 .flex-container {
|
|
55
55
|
align-items: center;
|
|
56
56
|
display: flex;
|
|
57
|
+
justify-content: center;
|
|
58
|
+
width: 100%;
|
|
59
|
+
}
|
|
60
|
+
.box-layout-3 .flex-container:first-child {
|
|
61
|
+
justify-content: flex-start;
|
|
62
|
+
}
|
|
63
|
+
.box-layout-3 .flex-container:last-child {
|
|
64
|
+
justify-content: flex-end;
|
|
57
65
|
}
|
|
58
66
|
.box-layout-3 .label {
|
|
59
67
|
overflow: hidden;
|
|
@@ -88,14 +96,175 @@
|
|
|
88
96
|
width: 64px;
|
|
89
97
|
}
|
|
90
98
|
.box-layout-4 .value {
|
|
91
|
-
padding: 0.5em;
|
|
92
99
|
font-weight: bold;
|
|
100
|
+
padding-top: 0.5em;
|
|
93
101
|
}
|
|
94
102
|
.box-layout-4 .f-cell.c-centered .f-cell__content img,
|
|
95
103
|
.box-layout-4 .f-cell.c-centered .f-cell__content .f-image {
|
|
96
104
|
margin: 0;
|
|
97
105
|
}
|
|
98
106
|
|
|
107
|
+
.box-layout-5 {
|
|
108
|
+
background-color: var(--kup-background-color);
|
|
109
|
+
color: var(--kup-text-color);
|
|
110
|
+
display: flex;
|
|
111
|
+
font-size: var(--kup-font-size);
|
|
112
|
+
height: 100%;
|
|
113
|
+
padding: 1em 0.5em;
|
|
114
|
+
}
|
|
115
|
+
.box-layout-5 .container {
|
|
116
|
+
display: flex;
|
|
117
|
+
height: 100%;
|
|
118
|
+
margin: auto;
|
|
119
|
+
width: 100%;
|
|
120
|
+
}
|
|
121
|
+
.box-layout-5 .image {
|
|
122
|
+
display: flex;
|
|
123
|
+
height: 100%;
|
|
124
|
+
margin: auto;
|
|
125
|
+
width: 50%;
|
|
126
|
+
}
|
|
127
|
+
.box-layout-5 .label,
|
|
128
|
+
.box-layout-5 .value {
|
|
129
|
+
padding: 0.5em;
|
|
130
|
+
}
|
|
131
|
+
.box-layout-5 .label {
|
|
132
|
+
overflow: hidden;
|
|
133
|
+
text-align: right;
|
|
134
|
+
text-overflow: ellipsis;
|
|
135
|
+
white-space: nowrap;
|
|
136
|
+
}
|
|
137
|
+
.box-layout-5 .value {
|
|
138
|
+
font-weight: bold;
|
|
139
|
+
}
|
|
140
|
+
.box-layout-5 .table {
|
|
141
|
+
box-sizing: border-box;
|
|
142
|
+
padding: 1.25em;
|
|
143
|
+
}
|
|
144
|
+
.box-layout-5 .table,
|
|
145
|
+
.box-layout-5 table {
|
|
146
|
+
width: 100%;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.box-layout-6 {
|
|
150
|
+
background-color: var(--kup-background-color);
|
|
151
|
+
color: var(--kup-text-color);
|
|
152
|
+
display: flex;
|
|
153
|
+
font-size: var(--kup-font-size);
|
|
154
|
+
height: 100%;
|
|
155
|
+
padding: 1em 0.5em;
|
|
156
|
+
}
|
|
157
|
+
.box-layout-6 .container {
|
|
158
|
+
display: flex;
|
|
159
|
+
height: 100%;
|
|
160
|
+
margin: auto;
|
|
161
|
+
width: 100%;
|
|
162
|
+
}
|
|
163
|
+
.box-layout-6 .image {
|
|
164
|
+
display: flex;
|
|
165
|
+
height: 100%;
|
|
166
|
+
margin: auto;
|
|
167
|
+
width: 50%;
|
|
168
|
+
}
|
|
169
|
+
.box-layout-6 .label {
|
|
170
|
+
padding-bottom: 0.25em;
|
|
171
|
+
}
|
|
172
|
+
.box-layout-6 .value {
|
|
173
|
+
font-weight: bold;
|
|
174
|
+
padding-bottom: 1.25em;
|
|
175
|
+
}
|
|
176
|
+
.box-layout-6 tr:last-child .value {
|
|
177
|
+
padding-bottom: 0;
|
|
178
|
+
}
|
|
179
|
+
.box-layout-6 .table {
|
|
180
|
+
box-sizing: border-box;
|
|
181
|
+
display: flex;
|
|
182
|
+
height: max-content;
|
|
183
|
+
margin: auto;
|
|
184
|
+
padding: 1.25em;
|
|
185
|
+
}
|
|
186
|
+
.box-layout-6 .table,
|
|
187
|
+
.box-layout-6 table {
|
|
188
|
+
width: 100%;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.box-layout-7 {
|
|
192
|
+
background-color: var(--kup-background-color);
|
|
193
|
+
color: var(--kup-text-color);
|
|
194
|
+
display: flex;
|
|
195
|
+
font-size: var(--kup-font-size);
|
|
196
|
+
height: 100%;
|
|
197
|
+
padding: 1em 0.5em;
|
|
198
|
+
}
|
|
199
|
+
.box-layout-7 .container {
|
|
200
|
+
height: 100%;
|
|
201
|
+
margin: auto;
|
|
202
|
+
width: 100%;
|
|
203
|
+
}
|
|
204
|
+
.box-layout-7 .image {
|
|
205
|
+
width: 100%;
|
|
206
|
+
}
|
|
207
|
+
.box-layout-7 .label,
|
|
208
|
+
.box-layout-7 .value {
|
|
209
|
+
padding: 0.25em;
|
|
210
|
+
}
|
|
211
|
+
.box-layout-7 .label {
|
|
212
|
+
overflow: hidden;
|
|
213
|
+
text-overflow: ellipsis;
|
|
214
|
+
white-space: nowrap;
|
|
215
|
+
}
|
|
216
|
+
.box-layout-7 .value {
|
|
217
|
+
font-weight: bold;
|
|
218
|
+
}
|
|
219
|
+
.box-layout-7 .table {
|
|
220
|
+
box-sizing: border-box;
|
|
221
|
+
padding: 1.25em;
|
|
222
|
+
padding-bottom: 0;
|
|
223
|
+
}
|
|
224
|
+
.box-layout-7 .table,
|
|
225
|
+
.box-layout-7 table {
|
|
226
|
+
width: 100%;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.box-layout-8 {
|
|
230
|
+
background-color: var(--kup-background-color);
|
|
231
|
+
color: var(--kup-text-color);
|
|
232
|
+
display: flex;
|
|
233
|
+
font-size: var(--kup-font-size);
|
|
234
|
+
height: 100%;
|
|
235
|
+
padding: 1em 0.5em;
|
|
236
|
+
}
|
|
237
|
+
.box-layout-8 .container {
|
|
238
|
+
height: 100%;
|
|
239
|
+
margin: auto;
|
|
240
|
+
width: 100%;
|
|
241
|
+
}
|
|
242
|
+
.box-layout-8 .image {
|
|
243
|
+
width: 100%;
|
|
244
|
+
}
|
|
245
|
+
.box-layout-8 .label {
|
|
246
|
+
overflow: hidden;
|
|
247
|
+
padding-bottom: 0.25em;
|
|
248
|
+
text-overflow: ellipsis;
|
|
249
|
+
white-space: nowrap;
|
|
250
|
+
}
|
|
251
|
+
.box-layout-8 .value {
|
|
252
|
+
font-weight: bold;
|
|
253
|
+
padding-bottom: 1.25em;
|
|
254
|
+
}
|
|
255
|
+
.box-layout-8 tr:last-child .value {
|
|
256
|
+
padding-bottom: 0;
|
|
257
|
+
}
|
|
258
|
+
.box-layout-8 .table {
|
|
259
|
+
box-sizing: border-box;
|
|
260
|
+
padding: 1.25em;
|
|
261
|
+
padding-bottom: 0;
|
|
262
|
+
}
|
|
263
|
+
.box-layout-8 .table,
|
|
264
|
+
.box-layout-8 table {
|
|
265
|
+
width: 100%;
|
|
266
|
+
}
|
|
267
|
+
|
|
99
268
|
.built-in-layout-1 {
|
|
100
269
|
background-color: var(--kup-background-color);
|
|
101
270
|
border-radius: 4px;
|
|
@@ -2738,23 +2907,4 @@
|
|
|
2738
2907
|
}
|
|
2739
2908
|
.card-view.visible {
|
|
2740
2909
|
display: block;
|
|
2741
|
-
}
|
|
2742
|
-
|
|
2743
|
-
.dialog-layout-7 {
|
|
2744
|
-
background-color: var(--kup-background-color);
|
|
2745
|
-
box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12);
|
|
2746
|
-
display: flex;
|
|
2747
|
-
flex-direction: column;
|
|
2748
|
-
height: 100%;
|
|
2749
|
-
max-height: 95vh;
|
|
2750
|
-
max-width: 95vw;
|
|
2751
|
-
width: 100%;
|
|
2752
|
-
}
|
|
2753
|
-
.dialog-layout-7 .section-1 {
|
|
2754
|
-
max-height: 40vh;
|
|
2755
|
-
overflow: auto;
|
|
2756
|
-
}
|
|
2757
|
-
.dialog-layout-7 .section-2 {
|
|
2758
|
-
display: flex;
|
|
2759
|
-
justify-content: center;
|
|
2760
2910
|
}
|
|
@@ -42,6 +42,7 @@ export var KupDataTableProps;
|
|
|
42
42
|
KupDataTableProps["rowsPerPage"] = "Sets the number of rows per page to display.";
|
|
43
43
|
KupDataTableProps["scrollOnHover"] = "Activates the scroll on hover function.";
|
|
44
44
|
KupDataTableProps["showCustomization"] = "If set to true, displays the button to open the customization panel.";
|
|
45
|
+
KupDataTableProps["selection"] = "Set the type of the rows selection.";
|
|
45
46
|
KupDataTableProps["showDeleteButton"] = "Enables the delete row button.";
|
|
46
47
|
KupDataTableProps["showFilters"] = "When set to true enables the column filters.";
|
|
47
48
|
KupDataTableProps["showFooter"] = "When set to true shows the footer.";
|
|
@@ -768,15 +768,17 @@ function cloneRow(row) {
|
|
|
768
768
|
if (row == null) {
|
|
769
769
|
return null;
|
|
770
770
|
}
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
771
|
+
else {
|
|
772
|
+
return {
|
|
773
|
+
id: row.id,
|
|
774
|
+
cells: Object.assign({}, row.cells),
|
|
775
|
+
actions: row.actions ? [...row.actions] : null,
|
|
776
|
+
group: cloneRowGroup(row.group),
|
|
777
|
+
clonedFrom: row,
|
|
778
|
+
readOnly: row.readOnly,
|
|
779
|
+
cssClass: row.cssClass,
|
|
780
|
+
};
|
|
781
|
+
}
|
|
780
782
|
}
|
|
781
783
|
function cloneRows(rows) {
|
|
782
784
|
if (rows == null) {
|
|
@@ -480,7 +480,11 @@ export class KupDataTable {
|
|
|
480
480
|
for (let index = 0; index < currentRows.length; index++) {
|
|
481
481
|
const row = currentRows[index];
|
|
482
482
|
if (ids.includes(row.id)) {
|
|
483
|
-
|
|
483
|
+
const r = row.clonedFrom ? row.clonedFrom : row;
|
|
484
|
+
deletedRows.push(r);
|
|
485
|
+
if (this.selectedRows.includes(row)) {
|
|
486
|
+
this.selectedRows.splice(this.selectedRows.indexOf(row), 1);
|
|
487
|
+
}
|
|
484
488
|
}
|
|
485
489
|
else {
|
|
486
490
|
newRows.push(row);
|
|
@@ -569,7 +573,16 @@ export class KupDataTable {
|
|
|
569
573
|
* This method will get the selected rows of the component.
|
|
570
574
|
*/
|
|
571
575
|
async getSelectedRows() {
|
|
572
|
-
|
|
576
|
+
const selRows = [];
|
|
577
|
+
this.selectedRows.forEach((row) => {
|
|
578
|
+
if (row.clonedFrom) {
|
|
579
|
+
selRows.push(row.clonedFrom);
|
|
580
|
+
}
|
|
581
|
+
else {
|
|
582
|
+
selRows.push(row);
|
|
583
|
+
}
|
|
584
|
+
});
|
|
585
|
+
return selRows;
|
|
573
586
|
}
|
|
574
587
|
/**
|
|
575
588
|
* Hides the given column.
|
|
@@ -647,7 +660,7 @@ export class KupDataTable {
|
|
|
647
660
|
*/
|
|
648
661
|
async refresh(recalcRows) {
|
|
649
662
|
if (recalcRows) {
|
|
650
|
-
this.
|
|
663
|
+
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_initRows).call(this);
|
|
651
664
|
}
|
|
652
665
|
forceUpdate(this);
|
|
653
666
|
}
|
|
@@ -766,12 +779,15 @@ export class KupDataTable {
|
|
|
766
779
|
//this.identifyAndInitRows();
|
|
767
780
|
identify(this.getRows());
|
|
768
781
|
this.expandGroupsHandler();
|
|
769
|
-
if (document.
|
|
770
|
-
__classPrivateFieldSet(this, _KupDataTable_navBarHeight, document.
|
|
782
|
+
if (document.querySelector('.header')) {
|
|
783
|
+
__classPrivateFieldSet(this, _KupDataTable_navBarHeight, document.querySelector('.header').clientHeight, "f");
|
|
771
784
|
}
|
|
772
785
|
else {
|
|
773
786
|
__classPrivateFieldSet(this, _KupDataTable_navBarHeight, 0, "f");
|
|
774
787
|
}
|
|
788
|
+
if (document.querySelector('.topbar')) {
|
|
789
|
+
__classPrivateFieldSet(this, _KupDataTable_navBarHeight, __classPrivateFieldGet(this, _KupDataTable_navBarHeight, "f") + document.querySelector('.topbar').clientHeight, "f");
|
|
790
|
+
}
|
|
775
791
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_setObserver).call(this);
|
|
776
792
|
//this.recalculateRows();
|
|
777
793
|
// Detects is the browser is Safari. If needed, this function can be moved into an external file and then imported into components
|
|
@@ -1189,7 +1205,24 @@ export class KupDataTable {
|
|
|
1189
1205
|
if (this.tableHeight !== undefined || this.tableWidth !== undefined) {
|
|
1190
1206
|
belowClass += ' custom-size';
|
|
1191
1207
|
}
|
|
1192
|
-
const
|
|
1208
|
+
const autoselectOnAction = (e) => {
|
|
1209
|
+
if (e && e.detail && e.detail.row) {
|
|
1210
|
+
const row = e.detail.row;
|
|
1211
|
+
if (!this.selectedRows.includes(row)) {
|
|
1212
|
+
if (this.selection === SelectionMode.MULTIPLE_CHECKBOX ||
|
|
1213
|
+
this.selection === SelectionMode.MULTIPLE) {
|
|
1214
|
+
this.selectedRows.push(row);
|
|
1215
|
+
}
|
|
1216
|
+
else {
|
|
1217
|
+
this.selectedRows = [row];
|
|
1218
|
+
}
|
|
1219
|
+
}
|
|
1220
|
+
if (e.type === 'kup-cell-input') {
|
|
1221
|
+
this.refresh();
|
|
1222
|
+
}
|
|
1223
|
+
}
|
|
1224
|
+
};
|
|
1225
|
+
const compCreated = (h(Host, { "onKup-cell-input": autoselectOnAction, "onKup-cell-update": autoselectOnAction }, h("style", null, __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").theme.setKupStyle(this.rootElement)), h("div", { id: componentWrapperId }, h("div", { class: "above-wrapper" }, this.globalFilter ? (h("div", { id: "global-filter" }, h(FTextField, { fullWidth: true, icon: KupThemeIconValues.SEARCH, label: __classPrivateFieldGet(this, _KupDataTable_kupManager, "f").language.translate(KupLanguageSearch.SEARCH), value: this.globalFilterValue, onInput: (event) => {
|
|
1193
1226
|
const t = event.target;
|
|
1194
1227
|
window.clearTimeout(__classPrivateFieldGet(this, _KupDataTable_globalFilterTimeout, "f"));
|
|
1195
1228
|
__classPrivateFieldSet(this, _KupDataTable_globalFilterTimeout, window.setTimeout(() => __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_onGlobalFilterChange).call(this, t), 600, t), "f");
|
|
@@ -1211,14 +1244,22 @@ export class KupDataTable {
|
|
|
1211
1244
|
value: '',
|
|
1212
1245
|
};
|
|
1213
1246
|
}
|
|
1214
|
-
|
|
1247
|
+
const row = {
|
|
1215
1248
|
cells,
|
|
1216
1249
|
id: __classPrivateFieldGet(this, _KupDataTable_INSERT_PREFIX, "f") +
|
|
1217
1250
|
__classPrivateFieldGet(this, _KupDataTable_insertCount, "f"),
|
|
1218
|
-
}
|
|
1251
|
+
};
|
|
1252
|
+
this.data.rows.unshift(row);
|
|
1219
1253
|
await this.refresh(true);
|
|
1220
1254
|
}
|
|
1221
|
-
}, styling: FButtonStyling.OUTLINED, title: "Insert row", wrapperClass: "insert-button" })) : null, this.
|
|
1255
|
+
}, styling: FButtonStyling.OUTLINED, title: "Insert row", wrapperClass: "insert-button" })) : null, this.insertMode !== '' &&
|
|
1256
|
+
this.selectedRows.length > 0 ? (h(FButton, { icon: "save", onClick: () => {
|
|
1257
|
+
this.kupSave.emit({
|
|
1258
|
+
comp: this,
|
|
1259
|
+
id: this.rootElement.id,
|
|
1260
|
+
selectedRows: this.selectedRows,
|
|
1261
|
+
});
|
|
1262
|
+
}, styling: FButtonStyling.OUTLINED, title: "Save", wrapperClass: "save-button" })) : null, this.showDeleteButton &&
|
|
1222
1263
|
this.selectedRows.length > 0 ? (h(FButton, { icon: "delete", onClick: () => {
|
|
1223
1264
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_rowsDelete).call(this);
|
|
1224
1265
|
}, styling: FButtonStyling.OUTLINED, title: "Delete selected rows", wrapperClass: "delete-button" })) : null), h("div", { class: "droparea", ref: (el) => (__classPrivateFieldSet(this, _KupDataTable_dropareaRef, el, "f")) }, this.showGroups ? __classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_columnGroupArea).call(this) : null, this.removableColumns
|
|
@@ -2624,6 +2665,26 @@ export class KupDataTable {
|
|
|
2624
2665
|
}
|
|
2625
2666
|
}
|
|
2626
2667
|
}
|
|
2668
|
+
}, {
|
|
2669
|
+
"method": "kupSave",
|
|
2670
|
+
"name": "kup-datatable-save",
|
|
2671
|
+
"bubbles": true,
|
|
2672
|
+
"cancelable": false,
|
|
2673
|
+
"composed": true,
|
|
2674
|
+
"docs": {
|
|
2675
|
+
"tags": [],
|
|
2676
|
+
"text": "Event fired when the save button is pressed."
|
|
2677
|
+
},
|
|
2678
|
+
"complexType": {
|
|
2679
|
+
"original": "KupDatatableInsertRowEventPayload",
|
|
2680
|
+
"resolved": "KupDatatableInsertRowEventPayload",
|
|
2681
|
+
"references": {
|
|
2682
|
+
"KupDatatableInsertRowEventPayload": {
|
|
2683
|
+
"location": "import",
|
|
2684
|
+
"path": "./kup-data-table-declarations"
|
|
2685
|
+
}
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2627
2688
|
}, {
|
|
2628
2689
|
"method": "kupInsertRow",
|
|
2629
2690
|
"name": "kup-datatable-insert-row",
|
|
@@ -3322,12 +3383,27 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
3322
3383
|
__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_setTransposedData).call(this);
|
|
3323
3384
|
}
|
|
3324
3385
|
}, _KupDataTable_getRow = function _KupDataTable_getRow(id) {
|
|
3325
|
-
|
|
3326
|
-
|
|
3386
|
+
let row = null;
|
|
3387
|
+
const search = (rows) => {
|
|
3388
|
+
if (rows && rows.length > 0 && !row) {
|
|
3389
|
+
test(rows);
|
|
3390
|
+
}
|
|
3391
|
+
};
|
|
3392
|
+
const test = (rows) => {
|
|
3393
|
+
if (typeof id === 'number') {
|
|
3394
|
+
row = rows[id];
|
|
3395
|
+
}
|
|
3396
|
+
else {
|
|
3397
|
+
row = rows.find((row) => row.id === id);
|
|
3398
|
+
}
|
|
3399
|
+
};
|
|
3400
|
+
if (__classPrivateFieldGet(this, _KupDataTable_instances, "m", _KupDataTable_isGrouping).call(this) && typeof id === 'string') {
|
|
3401
|
+
__classPrivateFieldGet(this, _KupDataTable_paginatedRows, "f").forEach((row) => search(row.group.children));
|
|
3327
3402
|
}
|
|
3328
3403
|
else {
|
|
3329
|
-
|
|
3404
|
+
test(__classPrivateFieldGet(this, _KupDataTable_rows, "f"));
|
|
3330
3405
|
}
|
|
3406
|
+
return row;
|
|
3331
3407
|
}, _KupDataTable_getTransposedData = function _KupDataTable_getTransposedData(column) {
|
|
3332
3408
|
if (column) {
|
|
3333
3409
|
this.filters = {};
|
|
@@ -3464,13 +3540,17 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
3464
3540
|
delete column.icon;
|
|
3465
3541
|
}
|
|
3466
3542
|
}, _KupDataTable_updateStickyHeaderSize = function _KupDataTable_updateStickyHeaderSize() {
|
|
3467
|
-
const navBar = document.
|
|
3543
|
+
const navBar = document.querySelector('.header');
|
|
3544
|
+
const topBar = document.querySelector('.topbar');
|
|
3468
3545
|
if (navBar) {
|
|
3469
3546
|
__classPrivateFieldSet(this, _KupDataTable_navBarHeight, navBar.clientHeight, "f");
|
|
3470
3547
|
}
|
|
3471
3548
|
else {
|
|
3472
3549
|
__classPrivateFieldSet(this, _KupDataTable_navBarHeight, 0, "f");
|
|
3473
3550
|
}
|
|
3551
|
+
if (topBar) {
|
|
3552
|
+
__classPrivateFieldSet(this, _KupDataTable_navBarHeight, __classPrivateFieldGet(this, _KupDataTable_navBarHeight, "f") + topBar.clientHeight, "f");
|
|
3553
|
+
}
|
|
3474
3554
|
if (__classPrivateFieldGet(this, _KupDataTable_stickyTheadRef, "f")) {
|
|
3475
3555
|
__classPrivateFieldGet(this, _KupDataTable_stickyTheadRef, "f").style.top = __classPrivateFieldGet(this, _KupDataTable_navBarHeight, "f") + 'px';
|
|
3476
3556
|
const widthTable = __classPrivateFieldGet(this, _KupDataTable_tableAreaRef, "f").offsetWidth;
|
|
@@ -4071,7 +4151,7 @@ _KupDataTable_initialized = new WeakMap(), _KupDataTable_rows = new WeakMap(), _
|
|
|
4071
4151
|
this.kupInsertRow.emit({
|
|
4072
4152
|
comp: this,
|
|
4073
4153
|
id: this.rootElement.id,
|
|
4074
|
-
|
|
4154
|
+
selectedRows: [row],
|
|
4075
4155
|
});
|
|
4076
4156
|
});
|
|
4077
4157
|
buttonWrapper.append(cancel);
|
|
@@ -835,11 +835,13 @@ _KupEchart_chartContainer = new WeakMap(), _KupEchart_chartEl = new WeakMap(), _
|
|
|
835
835
|
let objKey;
|
|
836
836
|
if (this.axis) {
|
|
837
837
|
for (const row of this.data.rows) {
|
|
838
|
-
objKey = row.cells[this.axis].value;
|
|
839
|
-
y[objKey]
|
|
838
|
+
objKey = row.cells[this.axis].value.trim();
|
|
839
|
+
if (!y[objKey]) {
|
|
840
|
+
y[objKey] = [];
|
|
841
|
+
}
|
|
840
842
|
for (const key of Object.keys(row.cells)) {
|
|
841
843
|
const cell = row.cells[key];
|
|
842
|
-
const value = cell.value;
|
|
844
|
+
const value = cell.value.trim();
|
|
843
845
|
if (!this.axis.includes(key)) {
|
|
844
846
|
if (this.series &&
|
|
845
847
|
this.series.length > 0 &&
|
|
@@ -7,7 +7,9 @@ export var KupFormProps;
|
|
|
7
7
|
KupFormProps["customStyle"] = "Custom style of the component.";
|
|
8
8
|
KupFormProps["data"] = "Actual data of the form.";
|
|
9
9
|
KupFormProps["hiddenSubmitButton"] = "Creates a hidden submit button in order to submit the form with enter.";
|
|
10
|
+
KupFormProps["labelPlacement"] = "Sets the label placement for 'all' fields in form";
|
|
10
11
|
KupFormProps["layout"] = "How the form will arrange its content.";
|
|
12
|
+
KupFormProps["submitCb"] = "Sets the callback function on submit form";
|
|
11
13
|
})(KupFormProps || (KupFormProps = {}));
|
|
12
14
|
export var KupFormLabelAlignment;
|
|
13
15
|
(function (KupFormLabelAlignment) {
|
|
@@ -21,6 +23,7 @@ export var KupFormLabelPlacement;
|
|
|
21
23
|
KupFormLabelPlacement["LEFT"] = "left";
|
|
22
24
|
KupFormLabelPlacement["HIDDEN"] = "hidden";
|
|
23
25
|
KupFormLabelPlacement["PLACEHOLDER"] = "placeholder";
|
|
26
|
+
KupFormLabelPlacement["WATERMARK"] = "watermark";
|
|
24
27
|
KupFormLabelPlacement["RIGHT"] = "right";
|
|
25
28
|
KupFormLabelPlacement["TOP"] = "top";
|
|
26
29
|
})(KupFormLabelPlacement || (KupFormLabelPlacement = {}));
|