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

react-bootstrap-table-nextgen-filter

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-bootstrap-table-nextgen-filter - npm Package Compare versions

Comparing version 1.5.2 to 1.5.3

11

lib/index.d.ts

@@ -27,11 +27,4 @@ import PropTypes from "prop-types";

export declare const LE = "<=";
export declare enum Comparator {
LIKE = "LIKE",
EQ = "=",
NE = "!=",
GT = ">",
GE = ">=",
LT = "<",
LE = "<="
}
export type Comparator = string;
export declare const ComparatorNumber = 7;
export type TextFilterProps<T extends object = any> = TableColumnFilterProps<string, T> & Partial<{

@@ -38,0 +31,0 @@ caseSensitive: boolean;

@@ -11,3 +11,3 @@ "use strict";

});
exports.customFilter = exports.dateFilter = exports.numberFilter = exports.multiSelectFilter = exports.selectFilter = exports.textFilter = exports.Comparator = exports.LE = exports.LT = exports.GE = exports.GT = exports.NE = exports.EQ = exports.LIKE = exports.FILTER_DELAY = exports.FILTER_TYPES = void 0;
exports.customFilter = exports.dateFilter = exports.numberFilter = exports.multiSelectFilter = exports.selectFilter = exports.textFilter = exports.ComparatorNumber = exports.LE = exports.LT = exports.GE = exports.GT = exports.NE = exports.EQ = exports.LIKE = exports.FILTER_DELAY = exports.FILTER_TYPES = void 0;
var date_1 = __importDefault(require("./src/components/date"));

@@ -38,12 +38,3 @@ var multiselect_1 = __importDefault(require("./src/components/multiselect"));

exports.LE = "<=";
var Comparator;
(function (Comparator) {
Comparator["LIKE"] = "LIKE";
Comparator["EQ"] = "=";
Comparator["NE"] = "!=";
Comparator["GT"] = ">";
Comparator["GE"] = ">=";
Comparator["LT"] = "<";
Comparator["LE"] = "<=";
})(Comparator || (exports.Comparator = Comparator = {}));
exports.ComparatorNumber = 7;
var textFilter = function textFilter() {

@@ -50,0 +41,0 @@ var props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

8

lib/src/components/date.js

@@ -56,3 +56,9 @@ "use strict";

var __1 = require("../..");
var legalComparators = [__1.EQ, __1.NE, __1.GT, __1.GE, __1.LT, __1.LE];
var EQ = "=";
var NE = "!=";
var GT = ">";
var GE = ">=";
var LT = "<";
var LE = "<=";
var legalComparators = [EQ, NE, GT, GE, LT, LE];
function dateParser(d) {

@@ -59,0 +65,0 @@ return "".concat(d.getUTCFullYear(), "-").concat(("0" + (d.getUTCMonth() + 1)).slice(-2), "-").concat(("0" + d.getUTCDate()).slice(-2));

@@ -125,5 +125,4 @@ "use strict";

value: function componentDidUpdate(prevProps) {
var _a;
var needFilter = false;
if (((_a = this.props.defaultValue) !== null && _a !== void 0 ? _a : []) !== prevProps.defaultValue) {
if (this.props.defaultValue !== prevProps.defaultValue) {
needFilter = true;

@@ -187,5 +186,7 @@ } else if (!optionsEquals(this.props.options, prevProps.options)) {

}
this.state = {
isSelected: value.length > 0
};
this.setState(function () {
return {
isSelected: value.length > 0
};
});
// TODO

@@ -192,0 +193,0 @@ // @ts-ignore

"use strict";
/* eslint jsx-a11y/no-static-element-interactions: 0 */
/* eslint react/require-default-props: 0 */
/* eslint no-return-assign: 0 */
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

@@ -53,5 +50,14 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }

});
/* eslint jsx-a11y/no-static-element-interactions: 0 */
/* eslint react/require-default-props: 0 */
/* eslint no-return-assign: 0 */
var react_1 = __importStar(require("react"));
var __1 = require("../..");
var legalComparators = [__1.EQ, __1.NE, __1.GT, __1.GE, __1.LT, __1.LE];
var EQ = "=";
var NE = "!=";
var GT = ">";
var GE = ">=";
var LT = "<";
var LE = "<=";
var legalComparators = [EQ, NE, GT, GE, LT, LE];
var NumberFilter = /*#__PURE__*/function (_react_1$Component) {

@@ -86,3 +92,3 @@ _inherits(NumberFilter, _react_1$Component);

getFilter = _this$props.getFilter;
var comparator = this.numberFilterComparator.value === "" ? __1.Comparator.EQ : this.numberFilterComparator.value;
var comparator = this.numberFilterComparator.value === "" ? EQ : this.numberFilterComparator.value;
var number = this.numberFilter.value;

@@ -89,0 +95,0 @@ if (comparator && number) {

import React, { Component } from "react";
import { TextFilterProps } from "../..";
interface TextFilterState {
value: any;
value: string;
}

@@ -11,3 +11,3 @@ declare class TextFilter extends Component<TextFilterProps, TextFilterState> {

timeout: any;
constructor(props: any);
constructor(props: TextFilterProps);
componentDidMount(): void;

@@ -14,0 +14,0 @@ componentWillUnmount(): void;

@@ -76,6 +76,7 @@ "use strict";

function getDefaultValue() {
var _a;
if (props.filterState && typeof props.filterState.filterVal !== "undefined") {
return props.filterState.filterVal;
}
return props.defaultValue;
return (_a = props.defaultValue) !== null && _a !== void 0 ? _a : "";
}

@@ -104,5 +105,7 @@ _this.state = {

getFilter(function (filterVal) {
_this2.state = {
value: filterVal
};
_this2.setState(function () {
return {
value: filterVal
};
});
// TODO

@@ -133,5 +136,7 @@ // @ts-ignore

var filterValue = e.target.value;
this.state = {
value: filterValue
};
this.setState(function () {
return {
value: filterValue
};
});
this.timeout = setTimeout(function () {

@@ -155,5 +160,7 @@ // TODO

var value = (_a = this.props.defaultValue) !== null && _a !== void 0 ? _a : "";
this.state = {
value: value
};
this.setState(function () {
return {
value: value
};
});
// TODO

@@ -166,5 +173,7 @@ // @ts-ignore

value: function applyFilter(filterText) {
this.state = {
value: filterText
};
this.setState(function () {
return {
value: filterText
};
});
// TODO

@@ -171,0 +180,0 @@ // @ts-ignore

{
"name": "react-bootstrap-table-nextgen-filter",
"version": "1.5.2",
"version": "1.5.3",
"description": "It's a column filter addon for react-bootstrap-table-nextgen",

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

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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