@sme.up/ketchup 6.6.0 → 6.8.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/README.md +7 -1
- package/dist/cjs/{f-button-a531feb2.js → f-button-229c63fd.js} +2 -2
- package/dist/cjs/{f-cell-75cb7933.js → f-cell-dd006395.js} +22 -22
- package/dist/cjs/{f-checkbox-cd977193.js → f-checkbox-1097ca5d.js} +1 -1
- package/dist/cjs/{f-chip-9508a2e4.js → f-chip-f2c369fd.js} +3 -3
- package/dist/cjs/{f-image-c21cc616.js → f-image-847a6ddf.js} +2 -2
- package/dist/cjs/{f-paginator-utils-2b72d7e8.js → f-paginator-utils-cedc4b3e.js} +3 -3
- package/dist/cjs/{f-text-field-a5b2bd0e.js → f-text-field-fe85187d.js} +2 -2
- package/dist/cjs/{index-31125378.js → index-ffdb46f6.js} +423 -252
- package/dist/cjs/ketchup.cjs.js +3 -3
- package/dist/cjs/kup-accordion.cjs.entry.js +7 -30
- package/dist/cjs/{kup-autocomplete_25.cjs.entry.js → kup-autocomplete_26.cjs.entry.js} +3925 -4288
- package/dist/cjs/kup-box.cjs.entry.js +33 -113
- package/dist/cjs/kup-calendar.cjs.entry.js +10 -34
- package/dist/cjs/kup-cell.cjs.entry.js +10 -29
- package/dist/cjs/kup-dash-list.cjs.entry.js +10 -9
- package/dist/cjs/kup-dash_2.cjs.entry.js +7 -35
- package/dist/cjs/kup-dashboard.cjs.entry.js +10 -32
- package/dist/cjs/kup-drawer.cjs.entry.js +4 -19
- package/dist/cjs/kup-echart.cjs.entry.js +16 -77
- package/dist/cjs/kup-family-tree.cjs.entry.js +12 -48
- package/dist/cjs/kup-iframe.cjs.entry.js +5 -17
- package/dist/cjs/kup-image-list.cjs.entry.js +16 -34
- package/dist/cjs/kup-lazy.cjs.entry.js +10 -37
- package/dist/cjs/kup-magic-box.cjs.entry.js +6 -25
- package/dist/cjs/{kup-manager-8e67afec.js → kup-manager-c53468cd.js} +82 -7
- package/dist/cjs/kup-nav-bar.cjs.entry.js +4 -16
- package/dist/cjs/kup-numeric-picker.cjs.entry.js +14 -57
- package/dist/cjs/kup-photo-frame.cjs.entry.js +9 -31
- package/dist/cjs/kup-probe.cjs.entry.js +13 -33
- package/dist/cjs/kup-qlik.cjs.entry.js +6 -60
- package/dist/cjs/kup-snackbar.cjs.entry.js +7 -38
- package/dist/cjs/loader.cjs.js +3 -3
- package/dist/collection/assets/box.js +9 -6
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/kup-accordion/kup-accordion.js +243 -261
- package/dist/collection/components/kup-autocomplete/kup-autocomplete.js +560 -594
- package/dist/collection/components/kup-badge/kup-badge.js +179 -189
- package/dist/collection/components/kup-box/kup-box.js +911 -1010
- package/dist/collection/components/kup-button/kup-button.js +382 -428
- package/dist/collection/components/kup-button-list/kup-button-list.js +254 -278
- package/dist/collection/components/kup-calendar/kup-calendar.js +306 -329
- package/dist/collection/components/kup-card/box/kup-card-box.js +10 -24
- package/dist/collection/components/kup-card/built-in/kup-card-built-in.js +10 -2
- package/dist/collection/components/kup-card/built-in/kup-card-calendar.js +14 -28
- package/dist/collection/components/kup-card/built-in/kup-card-clock.js +6 -19
- package/dist/collection/components/kup-card/built-in/kup-card-column-drop-menu.js +1 -2
- package/dist/collection/components/kup-card/built-in/kup-card-form.js +11 -0
- package/dist/collection/components/kup-card/built-in/kup-card-numeric.js +9 -44
- package/dist/collection/components/kup-card/collapsible/kup-card-collapsible.js +2 -21
- package/dist/collection/components/kup-card/dialog/kup-card-dialog.js +6 -33
- package/dist/collection/components/kup-card/kup-card-helper.js +3 -8
- package/dist/collection/components/kup-card/kup-card.css +118 -12
- package/dist/collection/components/kup-card/kup-card.js +394 -385
- package/dist/collection/components/kup-card/scalable/kup-card-scalable.js +68 -81
- package/dist/collection/components/kup-card/standard/kup-card-standard.js +98 -278
- package/dist/collection/components/kup-cell/kup-cell.js +224 -238
- package/dist/collection/components/kup-chart/kup-chart.js +562 -586
- package/dist/collection/components/kup-checkbox/kup-checkbox.js +278 -304
- package/dist/collection/components/kup-chip/kup-chip.js +243 -250
- package/dist/collection/components/kup-color-picker/kup-color-picker.js +278 -299
- package/dist/collection/components/kup-combobox/kup-combobox.js +467 -482
- package/dist/collection/components/kup-dash/kup-dash.js +112 -172
- package/dist/collection/components/kup-dash-list/kup-dash-list.js +218 -220
- package/dist/collection/components/kup-dashboard/kup-dashboard.js +200 -229
- package/dist/collection/components/kup-data-table/kup-data-table-declarations.js +2 -0
- package/dist/collection/components/kup-data-table/kup-data-table.css +9 -0
- package/dist/collection/components/kup-data-table/kup-data-table.js +4700 -4452
- package/dist/collection/components/kup-date-picker/kup-date-picker.js +415 -429
- package/dist/collection/components/kup-drawer/kup-drawer.js +246 -253
- package/dist/collection/components/kup-dropdown-button/kup-dropdown-button.js +486 -527
- package/dist/collection/components/kup-echart/kup-echart.js +450 -498
- package/dist/collection/components/kup-family-tree/kup-family-tree.js +416 -465
- package/dist/collection/components/kup-form/kup-form.js +226 -248
- package/dist/collection/components/kup-gauge/kup-gauge.js +460 -521
- package/dist/collection/components/kup-grid/kup-grid.js +159 -172
- package/dist/collection/components/kup-iframe/kup-iframe.js +184 -188
- package/dist/collection/components/kup-image/canvas/kup-image-canvas.js +9 -3
- package/dist/collection/components/kup-image/kup-image.js +305 -340
- package/dist/collection/components/kup-image-list/kup-image-list.js +300 -311
- package/dist/collection/components/kup-lazy/kup-lazy.js +261 -288
- package/dist/collection/components/kup-list/kup-list.js +546 -572
- package/dist/collection/components/kup-magic-box/kup-magic-box.js +148 -167
- package/dist/collection/components/kup-nav-bar/kup-nav-bar.js +192 -198
- package/dist/collection/components/kup-numeric-picker/kup-numeric-picker.js +501 -532
- package/dist/collection/components/kup-photo-frame/kup-photo-frame.js +261 -271
- package/dist/collection/components/kup-probe/kup-probe.js +98 -114
- package/dist/collection/components/kup-progress-bar/kup-progress-bar.js +240 -276
- package/dist/collection/components/kup-qlik/kup-qlik.js +182 -228
- package/dist/collection/components/kup-radio/kup-radio.js +261 -289
- package/dist/collection/components/kup-rating/kup-rating.js +212 -224
- package/dist/collection/components/kup-snackbar/kup-snackbar.js +252 -280
- package/dist/collection/components/kup-spinner/kup-spinner.js +277 -308
- package/dist/collection/components/kup-switch/kup-switch.js +258 -280
- package/dist/collection/components/kup-tab-bar/kup-tab-bar.js +268 -247
- package/dist/collection/components/kup-text-field/kup-text-field.js +816 -920
- package/dist/collection/components/kup-time-picker/kup-time-picker.js +472 -493
- package/dist/collection/components/kup-tree/kup-tree-faker.js +3 -2
- package/dist/collection/components/kup-tree/kup-tree.js +1107 -1205
- package/dist/collection/f-components/f-button/f-button.js +11 -20
- package/dist/collection/f-components/f-cell/f-cell.js +20 -22
- package/dist/collection/f-components/f-checkbox/f-checkbox.js +1 -9
- package/dist/collection/f-components/f-chip/f-chip.js +18 -31
- package/dist/collection/f-components/f-image/f-image.js +1 -3
- package/dist/collection/f-components/f-paginator/f-paginator.js +1 -6
- package/dist/collection/f-components/f-switch/f-switch.js +1 -8
- package/dist/collection/f-components/f-text-field/f-text-field.js +18 -40
- package/dist/collection/managers/kup-debug/kup-debug.js +10 -5
- package/dist/collection/managers/kup-language/kup-language-declarations.js +6 -0
- package/dist/collection/managers/kup-scroll-on-hover/kup-scroll-on-hover.js +25 -10
- package/dist/collection/managers/kup-toolbar/kup-toolbar.js +10 -5
- package/dist/collection/managers/kup-tooltip/kup-tooltip.js +10 -5
- package/dist/collection/utils/kup-column-menu/kup-column-menu.js +0 -21
- package/dist/esm/{f-button-15719ec1.js → f-button-d1aba968.js} +2 -2
- package/dist/esm/{f-cell-692c37bf.js → f-cell-646406bb.js} +22 -22
- package/dist/esm/{f-checkbox-e06cf07b.js → f-checkbox-b721178e.js} +1 -1
- package/dist/esm/{f-chip-abab04bf.js → f-chip-d94e9e81.js} +3 -3
- package/dist/esm/{f-image-98783644.js → f-image-57c88302.js} +2 -2
- package/dist/esm/{f-paginator-utils-d12ee737.js → f-paginator-utils-2c865e9a.js} +3 -3
- package/dist/esm/{f-text-field-282025dd.js → f-text-field-b0a1fea6.js} +2 -2
- package/dist/esm/{index-e41330a5.js → index-a2197376.js} +423 -252
- package/dist/esm/ketchup.js +3 -3
- package/dist/esm/kup-accordion.entry.js +7 -30
- package/dist/esm/{kup-autocomplete_25.entry.js → kup-autocomplete_26.entry.js} +3925 -4289
- package/dist/esm/kup-box.entry.js +33 -113
- package/dist/esm/kup-calendar.entry.js +10 -34
- package/dist/esm/kup-cell.entry.js +10 -29
- package/dist/esm/kup-dash-list.entry.js +10 -9
- package/dist/esm/kup-dash_2.entry.js +7 -35
- package/dist/esm/kup-dashboard.entry.js +10 -32
- package/dist/esm/kup-drawer.entry.js +4 -19
- package/dist/esm/kup-echart.entry.js +16 -77
- package/dist/esm/kup-family-tree.entry.js +12 -48
- package/dist/esm/kup-iframe.entry.js +5 -17
- package/dist/esm/kup-image-list.entry.js +16 -34
- package/dist/esm/kup-lazy.entry.js +10 -37
- package/dist/esm/kup-magic-box.entry.js +6 -25
- package/dist/esm/{kup-manager-abbae73e.js → kup-manager-c0fbb180.js} +83 -8
- package/dist/esm/kup-nav-bar.entry.js +4 -16
- package/dist/esm/kup-numeric-picker.entry.js +14 -57
- package/dist/esm/kup-photo-frame.entry.js +9 -31
- package/dist/esm/kup-probe.entry.js +13 -33
- package/dist/esm/kup-qlik.entry.js +6 -60
- package/dist/esm/kup-snackbar.entry.js +7 -38
- package/dist/esm/loader.js +3 -3
- package/dist/esm/polyfills/css-shim.js +1 -1
- package/dist/ketchup/ketchup.esm.js +1 -1
- package/dist/ketchup/{p-eeadd688.entry.js → p-1914969e.entry.js} +1 -1
- package/dist/ketchup/{p-5552f156.js → p-23cd5a68.js} +1 -1
- package/dist/ketchup/{p-a4a30e0e.entry.js → p-250118e3.entry.js} +1 -1
- package/dist/ketchup/{p-ccef2553.entry.js → p-30766296.entry.js} +1 -1
- package/dist/ketchup/{p-5933aa02.entry.js → p-351cecba.entry.js} +1 -1
- package/dist/ketchup/p-35e16ea2.entry.js +1 -0
- package/dist/ketchup/{p-e6ebdb80.js → p-395675b8.js} +1 -1
- package/dist/ketchup/p-3cf97e3a.js +1 -0
- package/dist/ketchup/p-4fdb684f.js +2 -0
- package/dist/ketchup/{p-9419919c.entry.js → p-596bdc10.entry.js} +1 -1
- package/dist/ketchup/{p-6f3040fb.js → p-61ff1761.js} +1 -1
- package/dist/ketchup/p-72d4fa26.entry.js +1 -0
- package/dist/ketchup/{p-fd930a34.entry.js → p-738685f9.entry.js} +1 -1
- package/dist/ketchup/{p-f6409c42.entry.js → p-7c8c5444.entry.js} +1 -1
- package/dist/ketchup/p-86154e2b.js +1 -0
- package/dist/ketchup/{p-7e16265d.entry.js → p-9214ef33.entry.js} +1 -1
- package/dist/ketchup/{p-62f3ec78.entry.js → p-980ed953.entry.js} +1 -1
- package/dist/ketchup/p-991bd70d.entry.js +1 -0
- package/dist/ketchup/{p-7d37ea62.entry.js → p-a1fe329f.entry.js} +1 -1
- package/dist/ketchup/p-a740352c.js +30 -0
- package/dist/ketchup/{p-62421bcf.js → p-a992cf87.js} +1 -1
- package/dist/ketchup/{p-3760a159.entry.js → p-b1da1ba7.entry.js} +2 -2
- package/dist/ketchup/{p-5ea2a1ff.entry.js → p-cee3635a.entry.js} +1 -1
- package/dist/ketchup/p-d05ed931.entry.js +9 -0
- package/dist/ketchup/{p-a450d60a.entry.js → p-d422151a.entry.js} +2 -2
- package/dist/ketchup/p-e6f19333.entry.js +1 -0
- package/dist/ketchup/{p-1ef5d16d.entry.js → p-eb10958a.entry.js} +1 -1
- package/dist/ketchup/{p-20221a50.js → p-ecac6269.js} +1 -1
- package/dist/ketchup/p-f43b445e.entry.js +1 -0
- package/dist/ketchup/{p-725c6268.entry.js → p-fa37e92e.entry.js} +1 -1
- package/dist/loader/package.json +1 -0
- package/dist/types/components/kup-box/kup-box-declarations.d.ts +3 -0
- package/dist/types/components/kup-card/built-in/kup-card-built-in.d.ts +7 -2
- package/dist/types/components/kup-card/built-in/kup-card-form.d.ts +3 -0
- package/dist/types/components/kup-card/kup-card-declarations.d.ts +11 -1
- package/dist/types/components/kup-card/kup-card.d.ts +5 -0
- package/dist/types/components/kup-card/scalable/kup-card-scalable.d.ts +6 -0
- package/dist/types/components/kup-data-table/kup-data-table-declarations.d.ts +9 -0
- package/dist/types/components/kup-data-table/kup-data-table.d.ts +54 -201
- package/dist/types/components/kup-list/kup-list.d.ts +5 -0
- package/dist/types/components/kup-tab-bar/kup-tab-bar.d.ts +5 -0
- package/dist/types/components/kup-tree/kup-tree.d.ts +0 -1
- package/dist/types/components.d.ts +78 -2
- package/dist/types/managers/kup-data/kup-data-declarations.d.ts +1 -0
- package/dist/types/managers/kup-language/kup-language-declarations.d.ts +7 -1
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover-declarations.d.ts +1 -0
- package/dist/types/managers/kup-scroll-on-hover/kup-scroll-on-hover.d.ts +2 -1
- package/dist/types/managers/kup-theme/kup-theme-declarations.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +20 -4
- package/package.json +2 -2
- package/CHANGELOG.md +0 -5
- package/dist/cjs/kup-form.cjs.entry.js +0 -486
- package/dist/esm/kup-form.entry.js +0 -482
- package/dist/ketchup/p-1d2dea0a.entry.js +0 -1
- package/dist/ketchup/p-27538d6f.entry.js +0 -1
- package/dist/ketchup/p-29d72040.entry.js +0 -1
- package/dist/ketchup/p-3e74e1ed.js +0 -1
- package/dist/ketchup/p-680a8cb4.entry.js +0 -9
- package/dist/ketchup/p-6946b614.entry.js +0 -1
- package/dist/ketchup/p-b0b3989b.js +0 -2
- package/dist/ketchup/p-c05f2638.js +0 -30
- package/dist/ketchup/p-d7a92197.entry.js +0 -1
- package/dist/ketchup/p-d8af7ba6.entry.js +0 -1
- package/dist/ketchup/p-e07a10fb.js +0 -1
|
@@ -20,13 +20,9 @@ export function create1(component) {
|
|
|
20
20
|
renderKup: true,
|
|
21
21
|
row: { cells: { [column.name]: cell } },
|
|
22
22
|
};
|
|
23
|
-
rows.push(h("tr", null,
|
|
24
|
-
h("td", { class: "label" }, column.title),
|
|
25
|
-
h("td", { class: "value" },
|
|
26
|
-
h(FCell, Object.assign({}, props)))));
|
|
23
|
+
rows.push(h("tr", null, h("td", { class: "label" }, column.title), h("td", { class: "value" }, h(FCell, Object.assign({}, props)))));
|
|
27
24
|
}
|
|
28
|
-
return (h("div", { class: `box-layout-${component.layoutNumber}` },
|
|
29
|
-
h("table", null, rows)));
|
|
25
|
+
return (h("div", { class: `box-layout-${component.layoutNumber}` }, h("table", null, rows)));
|
|
30
26
|
}
|
|
31
27
|
/**
|
|
32
28
|
* 2nd box card layout, it can be used as a key-value grid list with text occupying the left/right edges of the box.
|
|
@@ -46,13 +42,12 @@ export function create2(component) {
|
|
|
46
42
|
renderKup: true,
|
|
47
43
|
row: { cells: { [column.name]: cell } },
|
|
48
44
|
};
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
props.cell.cssClass = props.cell.cssClass
|
|
46
|
+
? props.cell.cssClass + ' c-right-aligned'
|
|
47
|
+
: 'c-right-aligned';
|
|
48
|
+
rows.push(h("tr", null, h("td", { class: "label" }, column.title), h("td", { class: "value" }, h(FCell, Object.assign({}, props)))));
|
|
53
49
|
}
|
|
54
|
-
return (h("div", { class: `box-layout-${component.layoutNumber}` },
|
|
55
|
-
h("div", { class: "container" }, rows)));
|
|
50
|
+
return (h("div", { class: `box-layout-${component.layoutNumber}` }, h("table", null, rows)));
|
|
56
51
|
}
|
|
57
52
|
/**
|
|
58
53
|
* 3rd box card layout, it can be used as a key-value row list.
|
|
@@ -72,13 +67,9 @@ export function create3(component) {
|
|
|
72
67
|
renderKup: true,
|
|
73
68
|
row: { cells: { [column.name]: cell } },
|
|
74
69
|
};
|
|
75
|
-
rows.push(h("div", { class: "flex-container" },
|
|
76
|
-
h("div", { class: "label" }, column.title),
|
|
77
|
-
h("div", { class: "value" },
|
|
78
|
-
h(FCell, Object.assign({}, props)))));
|
|
70
|
+
rows.push(h("div", { class: "flex-container" }, h("div", { class: "label" }, column.title), h("div", { class: "value" }, h(FCell, Object.assign({}, props)))));
|
|
79
71
|
}
|
|
80
|
-
return (h("div", { class: `box-layout-${component.layoutNumber}` },
|
|
81
|
-
h("div", { class: "container" }, rows)));
|
|
72
|
+
return (h("div", { class: `box-layout-${component.layoutNumber}` }, h("div", { class: "container" }, rows)));
|
|
82
73
|
}
|
|
83
74
|
/**
|
|
84
75
|
* 4th box card layout, image and value.
|
|
@@ -123,10 +114,5 @@ export function create4(component) {
|
|
|
123
114
|
row: { cells: { [columns[value].name]: cells[value] } },
|
|
124
115
|
wrapperClass: 'c-centered',
|
|
125
116
|
};
|
|
126
|
-
return (h("div", { class: `box-layout-${component.layoutNumber}` },
|
|
127
|
-
h("div", { class: "container" },
|
|
128
|
-
h("div", { class: "image" },
|
|
129
|
-
h(FCell, Object.assign({}, imageProps))),
|
|
130
|
-
h("div", { class: "value" },
|
|
131
|
-
h(FCell, Object.assign({}, valueProps))))));
|
|
117
|
+
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))))));
|
|
132
118
|
}
|
|
@@ -3,6 +3,7 @@ import { KupCardCSSClasses } from '../kup-card-declarations';
|
|
|
3
3
|
import { prepareCalendar } from './kup-card-calendar';
|
|
4
4
|
import { prepareClock } from './kup-card-clock';
|
|
5
5
|
import { prepareColumnDropMenu } from './kup-card-column-drop-menu';
|
|
6
|
+
import { prepareForm } from './kup-card-form';
|
|
6
7
|
import { prepareNumeric } from './kup-card-numeric';
|
|
7
8
|
/**
|
|
8
9
|
* 1st built-in layout, calendar view.
|
|
@@ -39,10 +40,17 @@ export function create4(component) {
|
|
|
39
40
|
}
|
|
40
41
|
/**
|
|
41
42
|
* 5th built-in layout, numeric picker.
|
|
42
|
-
* This layout is rendered after the render cycle completes.
|
|
43
43
|
* @param {KupCard} component - Card component.
|
|
44
|
-
* @returns {VNode}
|
|
44
|
+
* @returns {VNode} 5th built-in layout virtual node.
|
|
45
45
|
*/
|
|
46
46
|
export function create5(component) {
|
|
47
47
|
return (h("div", { class: `built-in-layout-${component.layoutNumber} ${KupCardCSSClasses.BUILT_IN_CARD}` }, prepareNumeric(component)));
|
|
48
48
|
}
|
|
49
|
+
/**
|
|
50
|
+
* 6th built-in layout, form with submit button.
|
|
51
|
+
* @param {KupCard} component - Card component.
|
|
52
|
+
* @returns {VNode} 6th built-in layout virtual node.
|
|
53
|
+
*/
|
|
54
|
+
export function create6(component) {
|
|
55
|
+
return (h("div", { class: `built-in-layout-${component.layoutNumber} ${KupCardCSSClasses.BUILT_IN_CARD}` }, prepareForm(component)));
|
|
56
|
+
}
|
|
@@ -70,13 +70,7 @@ export function prepareCalendar(component) {
|
|
|
70
70
|
id: 'change-view-button',
|
|
71
71
|
};
|
|
72
72
|
//text-transform:capitalize
|
|
73
|
-
return (h("div", { id: component.rootElement.id + '_calendar' },
|
|
74
|
-
h("div", { class: "section-1" },
|
|
75
|
-
h("div", { class: "sub-1 nav" },
|
|
76
|
-
prevButtonComp,
|
|
77
|
-
h(FButton, Object.assign({}, changeViewButtonProp)),
|
|
78
|
-
nextButtonComp)),
|
|
79
|
-
h("div", { class: "section-2" }, createCalendar(component))));
|
|
73
|
+
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))));
|
|
80
74
|
}
|
|
81
75
|
function setValue(component, value) {
|
|
82
76
|
const el = component.rootElement;
|
|
@@ -159,8 +153,7 @@ function createDaysCalendar(component) {
|
|
|
159
153
|
const thead = [];
|
|
160
154
|
const tbody = [];
|
|
161
155
|
for (let index = 0; index < days.length; index++) {
|
|
162
|
-
thead.push(h("th", null,
|
|
163
|
-
h("span", { class: "item-text" }, days[index])));
|
|
156
|
+
thead.push(h("th", null, h("span", { class: "item-text" }, days[index])));
|
|
164
157
|
}
|
|
165
158
|
const firstMonthDay = new Date(selectedYear, selectedMonth, 1);
|
|
166
159
|
const lastMonthDay = new Date(selectedYear, selectedMonth + 1, 0);
|
|
@@ -197,10 +190,9 @@ function createDaysCalendar(component) {
|
|
|
197
190
|
selectedYear === selectedDate.getFullYear())) {
|
|
198
191
|
dayClass += ' selected';
|
|
199
192
|
}
|
|
200
|
-
row.push(h("td", { class: dayClass },
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
} }), dayCount)));
|
|
193
|
+
row.push(h("td", { class: dayClass }, h("span", Object.assign({}, dataIndex, { class: "item-number", onClick: () => {
|
|
194
|
+
onCalendarItemClick(component, dataIndex['data-index']);
|
|
195
|
+
} }), dayCount)));
|
|
204
196
|
dayCount++;
|
|
205
197
|
if (dayCount > lastMonthDay.getDate()) {
|
|
206
198
|
break;
|
|
@@ -212,9 +204,7 @@ function createDaysCalendar(component) {
|
|
|
212
204
|
}
|
|
213
205
|
daysForRowAdded = 0;
|
|
214
206
|
}
|
|
215
|
-
return (h("table", { class: "calendar" },
|
|
216
|
-
h("thead", null, thead),
|
|
217
|
-
h("tbody", null, tbody)));
|
|
207
|
+
return (h("table", { class: "calendar" }, h("thead", null, thead), h("tbody", null, tbody)));
|
|
218
208
|
}
|
|
219
209
|
function createMonthsCalendar(component) {
|
|
220
210
|
const months = getMonthsAsStringByLocale(DateTimeFormatOptionsMonth.SHORT);
|
|
@@ -239,10 +229,9 @@ function createMonthsCalendar(component) {
|
|
|
239
229
|
if (monthCount === selectedMonth) {
|
|
240
230
|
monthClass += ' selected';
|
|
241
231
|
}
|
|
242
|
-
row.push(h("td", { class: monthClass },
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
} }), months[monthCount])));
|
|
232
|
+
row.push(h("td", { class: monthClass }, h("span", Object.assign({}, dataIndex, { class: "item-number", onClick: () => {
|
|
233
|
+
onCalendarMonthYearItemClick(component, dataIndex['data-index']);
|
|
234
|
+
} }), months[monthCount])));
|
|
246
235
|
monthCount++;
|
|
247
236
|
}
|
|
248
237
|
if (row.length > 0) {
|
|
@@ -250,8 +239,7 @@ function createMonthsCalendar(component) {
|
|
|
250
239
|
row = [];
|
|
251
240
|
}
|
|
252
241
|
}
|
|
253
|
-
return (h("table", { class: "calendar" },
|
|
254
|
-
h("tbody", null, tbody)));
|
|
242
|
+
return (h("table", { class: "calendar" }, h("tbody", null, tbody)));
|
|
255
243
|
}
|
|
256
244
|
function createYearsCalendar(component) {
|
|
257
245
|
let selectedDay = getDay(component);
|
|
@@ -278,10 +266,9 @@ function createYearsCalendar(component) {
|
|
|
278
266
|
if (yearCount === selectedYear) {
|
|
279
267
|
yearClass += ' selected';
|
|
280
268
|
}
|
|
281
|
-
row.push(h("td", { class: yearClass },
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
} }), yearCount)));
|
|
269
|
+
row.push(h("td", { class: yearClass }, h("span", Object.assign({}, dataIndex, { class: "item-number", onClick: () => {
|
|
270
|
+
onCalendarMonthYearItemClick(component, dataIndex['data-index']);
|
|
271
|
+
} }), yearCount)));
|
|
285
272
|
yearCount++;
|
|
286
273
|
}
|
|
287
274
|
if (row.length > 0) {
|
|
@@ -289,8 +276,7 @@ function createYearsCalendar(component) {
|
|
|
289
276
|
row = [];
|
|
290
277
|
}
|
|
291
278
|
}
|
|
292
|
-
return (h("table", { class: "calendar" },
|
|
293
|
-
h("tbody", null, tbody)));
|
|
279
|
+
return (h("table", { class: "calendar" }, h("tbody", null, tbody)));
|
|
294
280
|
}
|
|
295
281
|
function getDaysOfWeekAsStringByLocale(firstDayIndex) {
|
|
296
282
|
const thisWeekDays = thisWeek(firstDayIndex);
|
|
@@ -159,9 +159,7 @@ function createClock(component) {
|
|
|
159
159
|
if (isManageSeconds(component)) {
|
|
160
160
|
seconds = (h("div", { id: KupCardBuiltInClockElements.SECONDSCIRCLE, class: `circle seconds ${getSecondsActive(component) ? KupCardCSSClasses.VISIBLE : ''}`, ref: (el) => {
|
|
161
161
|
setElement(component, el);
|
|
162
|
-
} },
|
|
163
|
-
buildClock(60, 101, 115, 115, 'sec unit', 0, 5, ss, component),
|
|
164
|
-
h("div", { class: "mid" })));
|
|
162
|
+
} }, buildClock(60, 101, 115, 115, 'sec unit', 0, 5, ss, component), h("div", { class: "mid" })));
|
|
165
163
|
time.push(':', h("span", { id: KupCardBuiltInClockElements.SECONDS, class: `s ${getSecondsActive(component) ? KupCardCSSClasses.VISIBLE : ''}`, ref: (el) => {
|
|
166
164
|
setElement(component, el);
|
|
167
165
|
}, onClick: () => {
|
|
@@ -178,22 +176,11 @@ function createClock(component) {
|
|
|
178
176
|
};
|
|
179
177
|
return (h("div", { class: "clock", id: KupCardBuiltInClockElements.CLOCK, ref: (el) => {
|
|
180
178
|
setElement(component, el);
|
|
181
|
-
} },
|
|
182
|
-
|
|
183
|
-
h("div", { id: KupCardBuiltInClockElements.
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
buildClock(12, 101, 105, 105, 'hour', 0, 1, hh, component),
|
|
187
|
-
buildClock(12, 64, 110, 110, 'hour2', 12, 1, hh, component),
|
|
188
|
-
h("div", { class: "mid" })),
|
|
189
|
-
h("div", { id: KupCardBuiltInClockElements.MINUTESCIRCLE, class: `circle minutes ${getMinutesActive(component) ? KupCardCSSClasses.VISIBLE : ''}`, ref: (el) => {
|
|
190
|
-
setElement(component, el);
|
|
191
|
-
} },
|
|
192
|
-
buildClock(60, 101, 115, 115, 'min unit', 0, 5, mm, component),
|
|
193
|
-
h("div", { class: "mid" })),
|
|
194
|
-
seconds,
|
|
195
|
-
h("div", { class: "actions" },
|
|
196
|
-
h(FButton, Object.assign({}, confirmButtonProp)))));
|
|
179
|
+
} }, h("div", { class: "top" }, time), h("div", { id: KupCardBuiltInClockElements.HOURSCIRCLE, class: `circle hours ${getHoursActive(component) ? KupCardCSSClasses.VISIBLE : ''}`, ref: (el) => {
|
|
180
|
+
setElement(component, el);
|
|
181
|
+
} }, buildClock(12, 101, 105, 105, 'hour', 0, 1, hh, component), buildClock(12, 64, 110, 110, 'hour2', 12, 1, hh, component), h("div", { class: "mid" })), h("div", { id: KupCardBuiltInClockElements.MINUTESCIRCLE, class: `circle minutes ${getMinutesActive(component) ? KupCardCSSClasses.VISIBLE : ''}`, ref: (el) => {
|
|
182
|
+
setElement(component, el);
|
|
183
|
+
} }, buildClock(60, 101, 115, 115, 'min unit', 0, 5, mm, component), h("div", { class: "mid" })), seconds, h("div", { class: "actions" }, h(FButton, Object.assign({}, confirmButtonProp)))));
|
|
197
184
|
}
|
|
198
185
|
function setClockViewActive(component, hoursAct, minutesAct, secondsAct) {
|
|
199
186
|
const el = component.rootElement;
|
|
@@ -34,8 +34,7 @@ export function prepareColumnDropMenu(component) {
|
|
|
34
34
|
combobox = prepareCombobox(options, numericalColumnsExist);
|
|
35
35
|
if (numericalColumnsExist) {
|
|
36
36
|
button = (h("kup-button", { "onKup-button-click": () => applyFormula(component), label: dom.ketchup.language.translate(KupLanguageTotals.CALCULATE), styling: FButtonStyling.OUTLINED }));
|
|
37
|
-
chipSet = (h("div", { class: "sub-chip" },
|
|
38
|
-
h("kup-chip", { data: chipData, "onKup-chip-click": (e) => typeColumn(e, component) })));
|
|
37
|
+
chipSet = (h("div", { class: "sub-chip" }, h("kup-chip", { data: chipData, "onKup-chip-click": (e) => typeColumn(e, component) })));
|
|
39
38
|
}
|
|
40
39
|
}
|
|
41
40
|
return [list, combobox, button, chipSet];
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { h } from '@stencil/core';
|
|
2
|
+
import { FButton } from '../../../f-components/f-button/f-button';
|
|
3
|
+
import { FButtonStyling } from '../../../f-components/f-button/f-button-declarations';
|
|
4
|
+
const dom = document.documentElement;
|
|
5
|
+
export function prepareForm(component) {
|
|
6
|
+
const options = component.data.options;
|
|
7
|
+
return [
|
|
8
|
+
h("kup-form", null),
|
|
9
|
+
h("div", { class: "button-wrapper" }, h(FButton, { icon: "clear", label: "Cancel", styling: FButtonStyling.FLAT }), h(FButton, { icon: "check", label: "Confirm" })),
|
|
10
|
+
];
|
|
11
|
+
}
|
|
@@ -40,50 +40,15 @@ export function prepareNumeric(component) {
|
|
|
40
40
|
onClick: () => saveValue(component),
|
|
41
41
|
};
|
|
42
42
|
const decChar = getDecimalChar();
|
|
43
|
-
return (h("table", null,
|
|
44
|
-
|
|
45
|
-
h("
|
|
46
|
-
|
|
47
|
-
h("
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
h("td", null,
|
|
53
|
-
h("div", { class: "number", onClick: () => setValue(component, '3') }, "3"))),
|
|
54
|
-
h("tr", null,
|
|
55
|
-
h("td", null,
|
|
56
|
-
h("div", { class: "number", onClick: () => setValue(component, '4') }, "4")),
|
|
57
|
-
h("td", null,
|
|
58
|
-
h("div", { class: "number", onClick: () => setValue(component, '5') }, "5")),
|
|
59
|
-
h("td", null,
|
|
60
|
-
h("div", { class: "number", onClick: () => setValue(component, '6') }, "6"))),
|
|
61
|
-
h("tr", null,
|
|
62
|
-
h("td", null,
|
|
63
|
-
h("div", { class: "number", onClick: () => setValue(component, '7') }, "7")),
|
|
64
|
-
h("td", null,
|
|
65
|
-
h("div", { class: "number", onClick: () => setValue(component, '8') }, "8")),
|
|
66
|
-
h("td", null,
|
|
67
|
-
h("div", { class: "number", onClick: () => setValue(component, '9') }, "9"))),
|
|
68
|
-
h("tr", null,
|
|
69
|
-
h("td", null, negative
|
|
70
|
-
? [
|
|
71
|
-
h("div", { class: "number", onClick: () => setSign(component) }, "-"),
|
|
72
|
-
]
|
|
73
|
-
: []),
|
|
74
|
-
h("td", null,
|
|
75
|
-
h("div", { class: "number", onClick: () => setValue(component, '0') }, "0")),
|
|
76
|
-
h("td", null, decimals
|
|
77
|
-
? [
|
|
78
|
-
h("div", { class: "number", onClick: () => setValue(component, '.') }, decChar),
|
|
79
|
-
]
|
|
80
|
-
: [])),
|
|
81
|
-
h("tr", null,
|
|
82
|
-
h("td", null),
|
|
83
|
-
h("td", null,
|
|
84
|
-
h(FButton, Object.assign({}, clearButtonProp))),
|
|
85
|
-
h("td", null,
|
|
86
|
-
h(FButton, Object.assign({}, saveButtonProp))))));
|
|
43
|
+
return (h("table", null, h("tr", null, h("td", { colSpan: 3 }, h("div", { class: "value" }, el.kupData.localeValue))), h("tr", null, h("td", null, h("div", { class: "number", onClick: () => setValue(component, '1') }, "1")), h("td", null, h("div", { class: "number", onClick: () => setValue(component, '2') }, "2")), h("td", null, h("div", { class: "number", onClick: () => setValue(component, '3') }, "3"))), h("tr", null, h("td", null, h("div", { class: "number", onClick: () => setValue(component, '4') }, "4")), h("td", null, h("div", { class: "number", onClick: () => setValue(component, '5') }, "5")), h("td", null, h("div", { class: "number", onClick: () => setValue(component, '6') }, "6"))), h("tr", null, h("td", null, h("div", { class: "number", onClick: () => setValue(component, '7') }, "7")), h("td", null, h("div", { class: "number", onClick: () => setValue(component, '8') }, "8")), h("td", null, h("div", { class: "number", onClick: () => setValue(component, '9') }, "9"))), h("tr", null, h("td", null, negative
|
|
44
|
+
? [
|
|
45
|
+
h("div", { class: "number", onClick: () => setSign(component) }, "-"),
|
|
46
|
+
]
|
|
47
|
+
: []), h("td", null, h("div", { class: "number", onClick: () => setValue(component, '0') }, "0")), h("td", null, decimals
|
|
48
|
+
? [
|
|
49
|
+
h("div", { class: "number", onClick: () => setValue(component, '.') }, decChar),
|
|
50
|
+
]
|
|
51
|
+
: [])), h("tr", null, h("td", null), h("td", null, h(FButton, Object.assign({}, clearButtonProp))), h("td", null, h(FButton, Object.assign({}, saveButtonProp))))));
|
|
87
52
|
}
|
|
88
53
|
function getOptions(component) {
|
|
89
54
|
if (component.data.options)
|
|
@@ -29,16 +29,7 @@ export function create1(component) {
|
|
|
29
29
|
? colorArray[0]
|
|
30
30
|
: `var(${KupThemeColorValues.PRIMARY})`,
|
|
31
31
|
};
|
|
32
|
-
return (h("div", { class: `collapsible-layout-${component.layoutNumber} ${KupCardCSSClasses.COLLAPSIBLE_CARD}`, style: CSSVariables },
|
|
33
|
-
h("div", { class: "section-1" }),
|
|
34
|
-
h("div", { class: "section-2" },
|
|
35
|
-
h("div", { class: "sub-1" },
|
|
36
|
-
h("div", { class: "text left" }, textArray[textIndex] ? textArray[textIndex] : ''),
|
|
37
|
-
h("div", { class: "text right" }, textArray[++textIndex] ? textArray[textIndex] : '')),
|
|
38
|
-
h("div", { class: "sub-2" },
|
|
39
|
-
h("div", { class: "text" }, textArray[++textIndex] ? textArray[textIndex] : '')),
|
|
40
|
-
h("div", { class: `sub-3 ${KupCardCSSClasses.COLLAPSIBLE_WRAPPER}` }, chipArray[0] ? (h("kup-chip", Object.assign({ class: KupCardCSSClasses.COLLAPSIBLE_ELEMENT, id: "chip1" }, chipArray[0]))) : null)),
|
|
41
|
-
collapsibleBar()));
|
|
32
|
+
return (h("div", { class: `collapsible-layout-${component.layoutNumber} ${KupCardCSSClasses.COLLAPSIBLE_CARD}`, style: CSSVariables }, h("div", { class: "section-1" }), h("div", { class: "section-2" }, h("div", { class: "sub-1" }, h("div", { class: "text left" }, textArray[textIndex] ? textArray[textIndex] : ''), h("div", { class: "text right" }, textArray[++textIndex] ? textArray[textIndex] : '')), h("div", { class: "sub-2" }, h("div", { class: "text" }, textArray[++textIndex] ? textArray[textIndex] : '')), h("div", { class: `sub-3 ${KupCardCSSClasses.COLLAPSIBLE_WRAPPER}` }, chipArray[0] ? (h("kup-chip", Object.assign({ class: KupCardCSSClasses.COLLAPSIBLE_ELEMENT, id: "chip1" }, chipArray[0]))) : null)), collapsibleBar()));
|
|
42
33
|
}
|
|
43
34
|
/**
|
|
44
35
|
* 2nd collapsible card layout, colored text and icon in top right corner.
|
|
@@ -69,15 +60,5 @@ export function create2(component) {
|
|
|
69
60
|
? colorArray[0]
|
|
70
61
|
: `var(${KupThemeColorValues.PRIMARY})`,
|
|
71
62
|
};
|
|
72
|
-
return (h("div", { class: `collapsible-layout-${component.layoutNumber} ${KupCardCSSClasses.COLLAPSIBLE_CARD}`, style: CSSVariables },
|
|
73
|
-
h("div", { class: "section-1" },
|
|
74
|
-
h("div", { class: "sub-1" },
|
|
75
|
-
h("div", { class: "text" }, textArray[textIndex] ? textArray[textIndex] : '')),
|
|
76
|
-
h("div", { class: "sub-2" },
|
|
77
|
-
h("div", { class: "text" }, textArray[++textIndex] ? textArray[textIndex] : '')),
|
|
78
|
-
h("div", { class: "sub-3" },
|
|
79
|
-
h("div", { class: "image" }, imageArray[0] ? (h(FImage, Object.assign({ id: "image1" }, imageArray[0], { sizeX: "24px", sizeY: "24px" }))) : null),
|
|
80
|
-
h("div", { class: "text" }, textArray[++textIndex] ? textArray[textIndex] : '')),
|
|
81
|
-
h("div", { class: `sub-4 ${KupCardCSSClasses.COLLAPSIBLE_WRAPPER}` }, chipArray[0] ? (h("kup-chip", Object.assign({ class: KupCardCSSClasses.COLLAPSIBLE_ELEMENT, id: "chip1" }, chipArray[0]))) : null)),
|
|
82
|
-
collapsibleBar()));
|
|
63
|
+
return (h("div", { class: `collapsible-layout-${component.layoutNumber} ${KupCardCSSClasses.COLLAPSIBLE_CARD}`, style: CSSVariables }, h("div", { class: "section-1" }, h("div", { class: "sub-1" }, h("div", { class: "text" }, textArray[textIndex] ? textArray[textIndex] : '')), h("div", { class: "sub-2" }, h("div", { class: "text" }, textArray[++textIndex] ? textArray[textIndex] : '')), h("div", { class: "sub-3" }, h("div", { class: "image" }, imageArray[0] ? (h(FImage, Object.assign({ id: "image1" }, imageArray[0], { sizeX: "24px", sizeY: "24px" }))) : null), h("div", { class: "text" }, textArray[++textIndex] ? textArray[textIndex] : '')), h("div", { class: `sub-4 ${KupCardCSSClasses.COLLAPSIBLE_WRAPPER}` }, chipArray[0] ? (h("kup-chip", Object.assign({ class: KupCardCSSClasses.COLLAPSIBLE_ELEMENT, id: "chip1" }, chipArray[0]))) : null)), collapsibleBar()));
|
|
83
64
|
}
|
|
@@ -20,9 +20,7 @@ export function create1(component) {
|
|
|
20
20
|
const isEven = index % 2 == 0;
|
|
21
21
|
divs.push(h("span", { class: `text ${!isEven ? 'label' : ''}` }, textArray[index]));
|
|
22
22
|
}
|
|
23
|
-
return (h("div", { class: `dialog-layout-${component.layoutNumber} dialog-element` },
|
|
24
|
-
dialogHeader(textArray[0]),
|
|
25
|
-
h("div", { class: "section-1" }, divs)));
|
|
23
|
+
return (h("div", { class: `dialog-layout-${component.layoutNumber} dialog-element` }, dialogHeader(textArray[0]), h("div", { class: "section-1" }, divs)));
|
|
26
24
|
}
|
|
27
25
|
/**
|
|
28
26
|
* 2nd dialog card layout, used to display information in string format and features an highlighted row on top.
|
|
@@ -40,12 +38,7 @@ export function create2(component) {
|
|
|
40
38
|
const isEven = index % 2 == 0;
|
|
41
39
|
divs.push(h("span", { class: `text ${!isEven ? 'label' : ''}` }, textArray[index]));
|
|
42
40
|
}
|
|
43
|
-
return (h("div", { class: `dialog-layout-${component.layoutNumber} dialog-element` },
|
|
44
|
-
textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''),
|
|
45
|
-
textArray[1] && textArray[2] ? (h("div", { class: "section-1" },
|
|
46
|
-
h("div", { class: "text label" }, textArray[1]),
|
|
47
|
-
h("div", { class: "text " }, textArray[2]))) : null,
|
|
48
|
-
h("div", { class: "section-2" }, divs)));
|
|
41
|
+
return (h("div", { class: `dialog-layout-${component.layoutNumber} dialog-element` }, textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''), textArray[1] && textArray[2] ? (h("div", { class: "section-1" }, h("div", { class: "text label" }, textArray[1]), h("div", { class: "text " }, textArray[2]))) : null, h("div", { class: "section-2" }, divs)));
|
|
49
42
|
}
|
|
50
43
|
/**
|
|
51
44
|
* 3rd dialog card layout, buttons and text lines, used for debug window.
|
|
@@ -67,14 +60,7 @@ export function create3(component) {
|
|
|
67
60
|
const textfieldArray = component.data['textfield']
|
|
68
61
|
? component.data['textfield']
|
|
69
62
|
: [];
|
|
70
|
-
return (h("div", { class: `dialog-layout-${component.layoutNumber} ${KupCardCSSClasses.DIALOG_UNRESIZABLE}` },
|
|
71
|
-
h("div", null,
|
|
72
|
-
buttonArray.length > 0 || textfieldArray.length > 0 ? (h("div", { class: "section-1" },
|
|
73
|
-
h(FImage, { id: KupCardIds.DRAG_HANDLE, resource: "drag_handle", sizeX: "32px", sizeY: "32px" }),
|
|
74
|
-
compList(buttonArray, 'button'),
|
|
75
|
-
compList(textfieldArray, 'textfield'),
|
|
76
|
-
compList(comboboxArray, 'combobox'))) : null,
|
|
77
|
-
slots.length > 0 ? (h("div", { class: "section-2" }, compList(slots, 'slot'))) : null)));
|
|
63
|
+
return (h("div", { class: `dialog-layout-${component.layoutNumber} ${KupCardCSSClasses.DIALOG_UNRESIZABLE}` }, h("div", null, buttonArray.length > 0 || textfieldArray.length > 0 ? (h("div", { class: "section-1" }, h(FImage, { id: KupCardIds.DRAG_HANDLE, resource: "drag_handle", sizeX: "32px", sizeY: "32px" }), compList(buttonArray, 'button'), compList(textfieldArray, 'textfield'), compList(comboboxArray, 'combobox'))) : null, slots.length > 0 ? (h("div", { class: "section-2" }, compList(slots, 'slot'))) : null)));
|
|
78
64
|
}
|
|
79
65
|
/**
|
|
80
66
|
* 4th dialog card layout, used to display information with data table.
|
|
@@ -94,13 +80,7 @@ export function create4(component) {
|
|
|
94
80
|
const datatableArray = component.data['datatable']
|
|
95
81
|
? component.data['datatable']
|
|
96
82
|
: [];
|
|
97
|
-
return (h("div", { class: `dialog-layout-${component.layoutNumber} dialog-element` },
|
|
98
|
-
textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''),
|
|
99
|
-
datatableArray[0] && buttonArray[0] && buttonArray[1] ? (h("div", { class: "section-1" },
|
|
100
|
-
h("kup-button", Object.assign({}, buttonArray[0], { id: KupCardIds.PREVIOUS_ROW, "onkup-button-click": () => prevButton(component), title: dom.ketchup.language.translate(KupLanguageRow.PREVIOUS) })),
|
|
101
|
-
h("kup-button", Object.assign({}, buttonArray[1], { id: KupCardIds.NEXT_ROW, "onkup-button-click": () => nextButton(component), title: dom.ketchup.language.translate(KupLanguageRow.NEXT) })))) : null,
|
|
102
|
-
datatableArray[0] ? (h("div", { class: "section-2" },
|
|
103
|
-
h("kup-data-table", Object.assign({ id: "datatable1" }, datatableArray[0])))) : null));
|
|
83
|
+
return (h("div", { class: `dialog-layout-${component.layoutNumber} dialog-element` }, textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''), datatableArray[0] && buttonArray[0] && buttonArray[1] ? (h("div", { class: "section-1" }, h("kup-button", Object.assign({}, buttonArray[0], { id: KupCardIds.PREVIOUS_ROW, "onkup-button-click": () => prevButton(component), title: dom.ketchup.language.translate(KupLanguageRow.PREVIOUS) })), h("kup-button", Object.assign({}, buttonArray[1], { id: KupCardIds.NEXT_ROW, "onkup-button-click": () => nextButton(component), title: dom.ketchup.language.translate(KupLanguageRow.NEXT) })))) : null, datatableArray[0] ? (h("div", { class: "section-2" }, h("kup-data-table", Object.assign({ id: "datatable1" }, datatableArray[0])))) : null));
|
|
104
84
|
}
|
|
105
85
|
/**
|
|
106
86
|
* 5th dialog card layout, buttons and text lines, used for debug window.
|
|
@@ -118,12 +98,7 @@ export function create5(component) {
|
|
|
118
98
|
const textArray = component.data['text']
|
|
119
99
|
? component.data['text']
|
|
120
100
|
: [];
|
|
121
|
-
return (h("div", { class: `dialog-layout-${component.layoutNumber} ${KupCardCSSClasses.DIALOG_UNRESIZABLE}` },
|
|
122
|
-
textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''),
|
|
123
|
-
h("div", null,
|
|
124
|
-
slots.length > 0 ? (h("div", { class: "section-1" }, compList(slots, 'slot'))) : null,
|
|
125
|
-
listArray[0] ? (h("div", { class: "section-2" },
|
|
126
|
-
h("kup-list", Object.assign({ id: "list1" }, listArray[0])))) : null)));
|
|
101
|
+
return (h("div", { class: `dialog-layout-${component.layoutNumber} ${KupCardCSSClasses.DIALOG_UNRESIZABLE}` }, textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''), h("div", null, slots.length > 0 ? (h("div", { class: "section-1" }, compList(slots, 'slot'))) : null, listArray[0] ? (h("div", { class: "section-2" }, h("kup-list", Object.assign({ id: "list1" }, listArray[0])))) : null)));
|
|
127
102
|
}
|
|
128
103
|
/**
|
|
129
104
|
* 6th dialog card layout, a datatable or a spinner in its place.
|
|
@@ -139,9 +114,7 @@ export function create6(component) {
|
|
|
139
114
|
const textArray = component.data['text']
|
|
140
115
|
? component.data['text']
|
|
141
116
|
: [];
|
|
142
|
-
return (h("div", { class: `dialog-layout-${component.layoutNumber}` },
|
|
143
|
-
textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''),
|
|
144
|
-
h("div", { class: "section-1" }, datatableArray.length > 0 ? (h("kup-data-table", Object.assign({ id: "datatable1" }, datatableArray[0]))) : (h("kup-spinner", { active: true, dimensions: "7px", layout: 14 })))));
|
|
117
|
+
return (h("div", { class: `dialog-layout-${component.layoutNumber}` }, textArray[0] ? dialogHeader(textArray[0]) : dialogHeader(''), h("div", { class: "section-1" }, datatableArray.length > 0 ? (h("kup-data-table", Object.assign({ id: "datatable1" }, datatableArray[0]))) : (h("kup-spinner", { active: true, dimensions: "7px", layout: 14 })))));
|
|
145
118
|
}
|
|
146
119
|
/**
|
|
147
120
|
* Invoked by 4th layout to switch to the previous record of the original data table.
|
|
@@ -36,9 +36,7 @@ export function compList(compArray, compType) {
|
|
|
36
36
|
list.push(h("slot", null));
|
|
37
37
|
break;
|
|
38
38
|
case 'text':
|
|
39
|
-
list.push(h("div", { class: "text" },
|
|
40
|
-
" ",
|
|
41
|
-
compArray[index]));
|
|
39
|
+
list.push(h("div", { class: "text" }, " ", compArray[index]));
|
|
42
40
|
break;
|
|
43
41
|
case 'textfield':
|
|
44
42
|
list.push(h("kup-text-field", Object.assign({}, compArray[index])));
|
|
@@ -56,17 +54,14 @@ export function compList(compArray, compType) {
|
|
|
56
54
|
* @returns {VNode} Virtual node of the dialog's header bar.
|
|
57
55
|
*/
|
|
58
56
|
export function dialogHeader(title) {
|
|
59
|
-
return (h("div", { id: KupCardIds.DRAG_HANDLE, class: KupCardCSSClasses.HEADER_BAR },
|
|
60
|
-
title ? (h("div", { class: KupCardCSSClasses.DIALOG_TITLE }, title)) : null,
|
|
61
|
-
h(FImage, { color: `var(${KupThemeColorValues.TITLE})`, sizeX: "1.25em", sizeY: "100%", resource: "clear", id: KupCardIds.DIALOG_CLOSE })));
|
|
57
|
+
return (h("div", { id: KupCardIds.DRAG_HANDLE, class: KupCardCSSClasses.HEADER_BAR }, title ? (h("div", { class: KupCardCSSClasses.DIALOG_TITLE }, title)) : null, h(FImage, { color: `var(${KupThemeColorValues.TITLE})`, sizeX: "1.25em", sizeY: "100%", resource: "clear", id: KupCardIds.DIALOG_CLOSE })));
|
|
62
58
|
}
|
|
63
59
|
/**
|
|
64
60
|
* Creates the bar used to expand/collapse the card.
|
|
65
61
|
* @returns {VNode} Expansion bar virtual node.
|
|
66
62
|
*/
|
|
67
63
|
export function collapsibleBar() {
|
|
68
|
-
return (h("div", { class: "collapsible-trigger" },
|
|
69
|
-
h("kup-button", { id: KupCardIds.EXPAND_ACTION, toggable: true, iconOff: "keyboard_arrow_down", icon: "keyboard_arrow_up" })));
|
|
64
|
+
return (h("div", { class: "collapsible-trigger" }, h("kup-button", { id: KupCardIds.EXPAND_ACTION, toggable: true, iconOff: "keyboard_arrow_down", icon: "keyboard_arrow_up" })));
|
|
70
65
|
}
|
|
71
66
|
/**
|
|
72
67
|
* Handles layout-specific actions when an event occurs.
|