Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vap

Package Overview
Dependencies
Maintainers
1
Versions
568
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vap - npm Package Compare versions

Comparing version 1.1.3 to 1.1.4

2

layouts/admin/ListModal/index.d.ts

@@ -22,2 +22,3 @@ /// <reference types="react" />

exitEditMode(record: any, save: boolean): void;
add(): void;
edit(record: any): void;

@@ -29,4 +30,3 @@ renderColumns(text: any, record: any, column: Column<T>): any;

search(pagination: any, filters: any, sorter: any): void;
add(): void;
render(): JSX.Element;
}

@@ -120,2 +120,17 @@ "use strict";

};
ListModal.prototype.add = function () {
if (this.mode === interface_1.MODE.COMMON) {
this.mode = interface_1.MODE.ADD;
var list = _.concat([], this.state.list);
var obj_1 = _.assign({ _edit: true, _add: true, }, this.props.param);
this.props.columns.map(function (column) {
if (column.options) {
obj_1[column.dataIndex] = column.options[0].value;
}
});
this.editObject = _.assign({}, obj_1);
list.unshift(_.assign({}, obj_1));
this.setState({ list: list });
}
};
ListModal.prototype.edit = function (record) {

@@ -125,3 +140,3 @@ var _this = this;

this.mode = interface_1.MODE.EDIT;
this.editObject = _.assign({}, record);
this.editObject = _.assign({}, this.props.param, record);
var list = _.concat([], this.state.list);

@@ -141,3 +156,3 @@ list.map(function (item) {

var _this = this;
if (column.readonly) {
if (column.readonly && this.mode == interface_1.MODE.EDIT) {
if (column.options) {

@@ -169,3 +184,3 @@ var val = _.find(column.options, { value: text + '' });

else {
return record._edit ? React.createElement(antd_1.Input, { size: "small", style: { padding: 0, height: 22 }, defaultValue: text, onChange: function (e) { (function (txt) { return _this.editObject[column.dataIndex] = txt; }); } }) : text;
return record._edit ? React.createElement(antd_1.Input, { size: "small", style: { padding: 0, height: 22 }, defaultValue: text, onChange: function (e) { return _this.editObject[column.dataIndex] = e.target.value; } }) : text;
}

@@ -252,20 +267,2 @@ };

};
ListModal.prototype.add = function () {
if (this.mode === interface_1.MODE.COMMON) {
this.mode = interface_1.MODE.ADD;
var list = _.concat([], this.state.list);
var obj_1 = _.assign({
_edit: true,
_add: true,
}, this.props.param);
this.props.columns.map(function (column) {
if (column.options) {
obj_1[column.dataIndex] = column.options[0].value;
}
});
this.editObject = _.assign({}, obj_1);
list.unshift(_.assign({}, obj_1));
this.setState({ list: list });
}
};
ListModal.prototype.render = function () {

@@ -272,0 +269,0 @@ var _this = this;

{
"name": "vap",
"version": "1.1.3",
"version": "1.1.4",
"description": "vap",

@@ -5,0 +5,0 @@ "main": "index.js",

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