Skip to content
Merged

10.4.10 #2818

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/ketchup-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sme.up/ketchup-react",
"version": "10.4.9",
"version": "10.4.10",
"main": "dist/components.js",
"module": "dist/components.js",
"types": "dist/components.d.ts",
Expand All @@ -22,7 +22,7 @@
"license": "Apache-2.0",
"repository": "https://github.com/smeup/ketchup",
"dependencies": {
"@sme.up/ketchup": "10.4.9",
"@sme.up/ketchup": "10.4.10",
"@stencil/react-output-target": "^0.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/ketchup-showcase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"lint": "vue-cli-service lint"
},
"dependencies": {
"@sme.up/ketchup": "^10.4.9",
"@sme.up/ketchup": "^10.4.10",
"core-js": "^3.30.2",
"vue": "^2.6.14",
"vue-router": "^3.5.1"
Expand Down
4 changes: 2 additions & 2 deletions packages/ketchup-showcase/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@
@kup-tree-nodeselected="treeClick"
></kup-tree
><div class="version"
><a href="https://github.com/smeup/ketchup/releases/tag/v10.4.9"
>v10.4.9</a
><a href="https://github.com/smeup/ketchup/releases/tag/v10.4.10"
>v10.4.10</a
></div
></div
>
Expand Down
2 changes: 1 addition & 1 deletion packages/ketchup/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sme.up/ketchup",
"version": "10.4.9",
"version": "10.4.10",
"keywords": [
"smeup",
"KetchUP",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ export function create8(component: KupCard): VNode {
const isReservedID = (id: string) => {
return (
id === KupColumnMenuIds.BUTTON_OPEN_IN_NEW ||
id === KupColumnMenuIds.BUTTON_SEARCH ||
id === KupColumnMenuIds.BUTTON_PREVIEW ||
id === KupColumnMenuIds.BUTTON_COPY_OBJ
);
};
Expand Down Expand Up @@ -377,7 +377,7 @@ export function create8(component: KupCard): VNode {
<div class="sub-1">
{textArray[0] ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_OPEN_IN_NEW) ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_SEARCH) ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_PREVIEW) ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_COPY_OBJ) ? (
<div class="top">
{textArray[0] ? (
Expand All @@ -394,7 +394,7 @@ export function create8(component: KupCard): VNode {
KupColumnMenuIds.BUTTON_OPEN_IN_NEW
) ||
buttonsIds.includes(
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
) ||
buttonsIds.includes(
KupColumnMenuIds.BUTTON_COPY_OBJ
Expand All @@ -412,13 +412,13 @@ export function create8(component: KupCard): VNode {
/>
) : null}
{buttonsIds.includes(
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
) ? (
<kup-button
{...buttonArray.find(
(x) =>
x.id ===
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
)}
/>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1094,7 +1094,7 @@ export function create14(component: KupCard): VNode {
buttonsIds.includes(
KupColumnMenuIds.BUTTON_OPEN_IN_NEW
) ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_SEARCH) ? (
buttonsIds.includes(KupColumnMenuIds.BUTTON_PREVIEW) ? (
<div class="top">
{textArray[0] ? (
<div class="title">
Expand All @@ -1110,7 +1110,7 @@ export function create14(component: KupCard): VNode {
KupColumnMenuIds.BUTTON_OPEN_IN_NEW
) ||
buttonsIds.includes(
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
) ? (
<div class="buttons">
{buttonsIds.includes(
Expand All @@ -1125,13 +1125,13 @@ export function create14(component: KupCard): VNode {
/>
) : null}
{buttonsIds.includes(
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
) ? (
<kup-button
{...buttonArray.find(
(x) =>
x.id ===
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
)}
/>
) : null}
Expand Down Expand Up @@ -1432,7 +1432,7 @@ export function create15(component: KupCard): VNode {
const isReservedID = (id: string) => {
return (
id === KupColumnMenuIds.BUTTON_OPEN_IN_NEW ||
id === KupColumnMenuIds.BUTTON_SEARCH ||
id === KupColumnMenuIds.BUTTON_PREVIEW ||
id === KupColumnMenuIds.BUTTON_COPY_OBJ
);
};
Expand Down Expand Up @@ -1491,7 +1491,7 @@ export function create15(component: KupCard): VNode {
<div class="sub-1">
{textArray[0] ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_OPEN_IN_NEW) ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_SEARCH) ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_PREVIEW) ||
buttonsIds.includes(KupColumnMenuIds.BUTTON_COPY_OBJ) ? (
<div class="top">
{textArray[0] ? (
Expand All @@ -1508,7 +1508,7 @@ export function create15(component: KupCard): VNode {
KupColumnMenuIds.BUTTON_OPEN_IN_NEW
) ||
buttonsIds.includes(
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
) ||
buttonsIds.includes(
KupColumnMenuIds.BUTTON_COPY_OBJ
Expand All @@ -1526,13 +1526,13 @@ export function create15(component: KupCard): VNode {
/>
) : null}
{buttonsIds.includes(
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
) ? (
<kup-button
{...buttonArray.find(
(x) =>
x.id ===
KupColumnMenuIds.BUTTON_SEARCH
KupColumnMenuIds.BUTTON_PREVIEW
)}
/>
) : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2113,12 +2113,28 @@ export class KupDataTable {
result: string | KupDataColumn,
afterColumn: string
) {
this.visibleColumns = this.getVisibleColumns({
includeCodVer: true,
}).map((col) => col.name);

if (typeof result !== 'string') {
if (this.visibleColumns.findIndex((c) => c === result.name) < 0) {
// Check if dataTable has visible columns
const dataTableHasVisibleColumns =
this.visibleColumns && this.visibleColumns.length > 0;

// - If dataTableHasVisibleColumns is true:
// return every col.name without filterings
// - If dataTableHasVisibleColumns is false:
// result column is filtered out because it is already inserted in the data
// and will make resultColumnIndexNotFound false, not adding the column
this.visibleColumns = this.getVisibleColumns({
includeCodVer: true,
}).map((col) => {
if (dataTableHasVisibleColumns || col.name !== result.name) {
return col.name;
}
});

const resultColumnIndexNotFound =
this.visibleColumns.findIndex((c) => c === result.name) < 0;

if (resultColumnIndexNotFound) {
this.#kupManager.debug.logMessage(
this,
'New column [' +
Expand Down
14 changes: 11 additions & 3 deletions packages/ketchup/src/f-components/f-cell/f-cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const FCell: FunctionalComponent<FCellProps> = (
content = setEditableCell(cellType, classObj, cell, column, props);
} else if (cell.data && kupTypes.includes(cellType)) {
if (props.setSizes) {
setCellSizeKup(cellType, subcomponentProps, cell);
setCellSizeKup(cellType, subcomponentProps, cell, column);
}
if (!props.renderKup) {
const lazyClass = 'cell-' + cellType + ' placeholder';
Expand Down Expand Up @@ -295,7 +295,11 @@ const handleMouseEnter = (

const handleMouseLeave = (event: MouseEvent) => {
const parent = event.currentTarget as HTMLElement;
const iconContainer = parent.querySelector('kup-image');
// only remove the action icon we added on mouse enter, not the first
// kup-image in the cell (which might be the BAR/IMAGE itself)
const iconContainer = parent.querySelector(
'kup-image.f-cell__iconfunction'
);

if (iconContainer) {
iconContainer.remove();
Expand Down Expand Up @@ -607,13 +611,17 @@ function setCellSize(
function setCellSizeKup(
cellType: string,
subcomponentProps: unknown,
cell: KupDataCell
cell: KupDataCell,
column: KupDataColumn
) {
switch (cellType) {
case FCellTypes.BAR:
if (!(subcomponentProps as FImageProps).sizeY) {
(subcomponentProps as FImageProps).sizeY = '26px';
}
if (!(subcomponentProps as FImageProps).sizeX && column.size) {
(subcomponentProps as FImageProps).sizeX = column.size;
}
break;
case FCellTypes.BUTTON:
let height: string = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -370,8 +370,9 @@ function newColumnFromMath(
...firstColumn,
name: newName,
title: title ? title : newTitle,
obj: newObj,
obj: newObj ?? { t: '', p: '', k: '' },
resultOf: formula,
visible: true,
};
dataset.columns.splice(
dataset.columns.indexOf(firstColumn) + 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export enum KupColumnMenuIds {
BUTTON_NEW = 'new',
BUTTON_OPEN_IN_NEW = 'open-in-new',
BUTTON_REMOVE = 'remove',
BUTTON_SEARCH = 'search',
BUTTON_PREVIEW = 'preview',
BUTTON_COPY_OBJ = 'copy-obj',
CHECKBOX_GLOBAL = 'global-checkbox',
SWITCH_GROUP = 'group',
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3191,7 +3191,7 @@ __metadata:
version: 0.0.0-use.local
resolution: "@sme.up/ketchup-react@workspace:packages/ketchup-react"
dependencies:
"@sme.up/ketchup": 10.4.9
"@sme.up/ketchup": 10.4.10
"@stencil/core": ^4
"@stencil/react-output-target": ^0.8
react: ^19.0.0
Expand Down Expand Up @@ -3227,7 +3227,7 @@ __metadata:
resolution: "@sme.up/ketchup-showcase@workspace:packages/ketchup-showcase"
dependencies:
"@babel/plugin-transform-private-methods": ^7.24.1
"@sme.up/ketchup": ^10.4.9
"@sme.up/ketchup": ^10.4.10
"@typescript-eslint/eslint-plugin": ^5.59.8
"@typescript-eslint/parser": ^5.59.8
"@vue/cli-plugin-babel": ~5.0.8
Expand All @@ -3251,7 +3251,7 @@ __metadata:
languageName: unknown
linkType: soft

"@sme.up/ketchup@10.4.9, @sme.up/ketchup@^10.4.9, @sme.up/ketchup@workspace:packages/ketchup":
"@sme.up/ketchup@10.4.10, @sme.up/ketchup@^10.4.10, @sme.up/ketchup@workspace:packages/ketchup":
version: 0.0.0-use.local
resolution: "@sme.up/ketchup@workspace:packages/ketchup"
dependencies:
Expand Down