New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

ka-table

Package Overview
Dependencies
Maintainers
1
Versions
194
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ka-table - npm Package Compare versions

Comparing version 7.8.3 to 7.8.4

9

Components/CellEditorState/CellEditorState.js

@@ -40,9 +40,10 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var enums_1 = require("../../enums");
var react_1 = __importStar(require("react"));
var actionCreators_1 = require("../../actionCreators");
var enums_1 = require("../../enums");
var DataUtils_1 = require("../../Utils/DataUtils");
var CellEditorValidation_1 = __importDefault(require("../CellEditorValidation/CellEditorValidation"));
var EffectUtils_1 = require("../../Utils/EffectUtils");
var Validation_1 = require("../../Utils/Validation");
var CellEditorValidation_1 = __importDefault(require("../CellEditorValidation/CellEditorValidation"));
var const_1 = require("../../const");
var DataUtils_1 = require("../../Utils/DataUtils");
var CellEditorState = function (props) {

@@ -54,3 +55,3 @@ var column = props.column, dispatch = props.dispatch, editingMode = props.editingMode, rowData = props.rowData, rowKeyValue = props.rowKeyValue, validation = props.validation, value = props.value;

var isCellEditingMode = editingMode === enums_1.EditingMode.Cell;
validationMessage = isCellEditingMode || validationMessage
validationMessage = rowKeyValue === const_1.newRowId || isCellEditingMode || validationMessage
? (0, Validation_1.getValidationValue)(editorValueState, rowDataState, column, validation) || ''

@@ -57,0 +58,0 @@ : validationMessage;

@@ -0,4 +1,4 @@

import { INewRowProps } from '../../props';
import React from 'react';
import { INewRowProps } from '../../props';
declare const NewRow: React.FunctionComponent<INewRowProps>;
export default NewRow;

@@ -6,10 +6,11 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
var DataRow_1 = __importDefault(require("../DataRow/DataRow"));
var enums_1 = require("../../enums");
var react_1 = __importDefault(require("react"));
var CellUtils_1 = require("../../Utils/CellUtils");
var const_1 = require("../../const");
var enums_1 = require("../../enums");
var DataRow_1 = __importDefault(require("../DataRow/DataRow"));
var NewRow = function (_a) {
var childComponents = _a.childComponents, columns = _a.columns, dispatch = _a.dispatch, editableCells = _a.editableCells, format = _a.format, groupColumnsCount = _a.groupColumnsCount, rowKeyField = _a.rowKeyField, validation = _a.validation;
return (react_1.default.createElement(DataRow_1.default, { childComponents: childComponents, columns: columns, dispatch: dispatch, format: format, editableCells: editableCells, editingMode: enums_1.EditingMode.None, groupColumnsCount: groupColumnsCount, isDetailsRowShown: false, isSelectedRow: false, rowData: {}, rowKeyField: rowKeyField, rowKeyValue: const_1.newRowId, rowReordering: false, validation: validation, selectedRows: [], rowEditableCells: editableCells }));
return (react_1.default.createElement(DataRow_1.default, { childComponents: childComponents, columns: columns, dispatch: dispatch, format: format, editableCells: editableCells, editingMode: enums_1.EditingMode.None, groupColumnsCount: groupColumnsCount, isDetailsRowShown: false, isSelectedRow: false, rowData: (0, CellUtils_1.getNewRowDataFromEditableCells)(editableCells, columns), rowKeyField: rowKeyField, rowKeyValue: const_1.newRowId, rowReordering: false, validation: validation, selectedRows: [], rowEditableCells: editableCells }));
};
exports.default = NewRow;
{
"name": "ka-table",
"version": "7.8.3",
"version": "7.8.4",
"license": "MIT",

@@ -5,0 +5,0 @@ "repository": "github:komarovalexander/ka-table",

@@ -5,2 +5,3 @@ import { EditingMode } from '../enums';

export declare const getNewRowEditableCells: (editableCells: EditableCell[]) => EditableCell[];
export declare const getNewRowDataFromEditableCells: (editableCells: EditableCell[], columns: Column[]) => {};
export declare const isEditableCell: (editingMode: EditingMode, column: Column, rowEditableCells: EditableCell[]) => boolean;

@@ -7,0 +8,0 @@ export declare const getEditableCell: (column: Column, rowEditableCells: EditableCell[]) => EditableCell | undefined;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.checkPopupPosition = exports.removeItemFromEditableCells = exports.getCellEditorDispatchHandler = exports.addItemToEditableCells = exports.getEditableCell = exports.isEditableCell = exports.getNewRowEditableCells = void 0;
exports.checkPopupPosition = exports.removeItemFromEditableCells = exports.getCellEditorDispatchHandler = exports.addItemToEditableCells = exports.getEditableCell = exports.isEditableCell = exports.getNewRowDataFromEditableCells = exports.getNewRowEditableCells = void 0;
var enums_1 = require("../enums");
var actionCreators_1 = require("../actionCreators");
var ColumnUtils_1 = require("./ColumnUtils");
var ArrayUtils_1 = require("./ArrayUtils");
var const_1 = require("../const");
var enums_1 = require("../enums");
var ArrayUtils_1 = require("./ArrayUtils");
var DataUtils_1 = require("./DataUtils");
var getNewRowEditableCells = function (editableCells) {

@@ -12,2 +14,12 @@ return editableCells && editableCells.filter(function (c) { return c.rowKeyValue === const_1.newRowId; });

exports.getNewRowEditableCells = getNewRowEditableCells;
var getNewRowDataFromEditableCells = function (editableCells, columns) {
return editableCells.reduce(function (acc, item) {
if (!item.hasOwnProperty('editorValue'))
return acc;
var column = (0, ColumnUtils_1.getColumn)(columns, item.columnKey);
acc = (0, DataUtils_1.replaceValue)(acc, column, item.editorValue);
return acc;
}, {});
};
exports.getNewRowDataFromEditableCells = getNewRowDataFromEditableCells;
var isEditableCell = function (editingMode, column, rowEditableCells) {

@@ -14,0 +26,0 @@ if (column.isEditable !== undefined) {

import { Column } from '../models';
import { Field } from '../types';
export declare const getColumn: (columns: Column[], columnKey: string) => Column;
export declare const getField: (column: Column) => Field;

@@ -4,0 +5,0 @@ export declare const getLastField: (field: Field) => Field;

@@ -6,4 +6,6 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
exports.getLastFieldParents = exports.getFieldParts = exports.getLastField = exports.getField = void 0;
exports.getLastFieldParents = exports.getFieldParts = exports.getLastField = exports.getField = exports.getColumn = void 0;
var defaultOptions_1 = __importDefault(require("../defaultOptions"));
var getColumn = function (columns, columnKey) { return columns.find(function (c) { return c.key === columnKey; }); };
exports.getColumn = getColumn;
var getField = function (column) {

@@ -10,0 +12,0 @@ return column.field || column.key;

@@ -7,3 +7,3 @@ import { Column } from '../Models/Column';

export declare const getValueByField: (rowData: any, field: Field) => any;
export declare const replaceValue: (rowData: any, column: Column, newValue: any) => void;
export declare const replaceValue: (rowData: any, column: Column, newValue: any) => any;
export declare const reorderData: (data: any[], getKey: (d: any) => any, keyValue: any, targetKeyValue: any) => any[];
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc