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

@frui.ts/data

Package Overview
Dependencies
Maintainers
5
Versions
78
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@frui.ts/data - npm Package Compare versions

Comparing version 1.0.0-alpha.8 to 1.0.0-alpha.9

8

dist/pagerHelper.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.handlePageSizeChanged = exports.pageChangedHandler = exports.handlePageChanged = exports.handlePagingChanged = void 0;
var defaultPageSize = 25;
const defaultPageSize = 25;
function handlePagingChanged(offset, limit, filter, onPageChanged) {

@@ -16,4 +16,4 @@ if (filter) {

function handlePageChanged(newPageNumber, filter, onPageChanged) {
var pageSize = (filter === null || filter === void 0 ? void 0 : filter.limit) || defaultPageSize;
var offset = (newPageNumber - 1) * pageSize;
const pageSize = (filter === null || filter === void 0 ? void 0 : filter.limit) || defaultPageSize;
const offset = (newPageNumber - 1) * pageSize;
handlePagingChanged(offset, pageSize, filter, onPageChanged);

@@ -23,3 +23,3 @@ }

function pageChangedHandler(newPageNumber, filter, onPageChanged) {
return function () { return handlePageChanged(newPageNumber, filter, onPageChanged); };
return () => handlePageChanged(newPageNumber, filter, onPageChanged);
}

@@ -26,0 +26,0 @@ exports.pageChangedHandler = pageChangedHandler;

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.addSort = exports.setSort = exports.getSortingDirection = void 0;
var sortingDirection_1 = require("./sortingDirection");
const sortingDirection_1 = require("./sortingDirection");
function getSortingDirection(filter, columnName) {
var _a, _b;
var existingIndex = (_a = filter.sorting) === null || _a === void 0 ? void 0 : _a.findIndex(function (x) { return x.column === columnName; });
const existingIndex = (_a = filter.sorting) === null || _a === void 0 ? void 0 : _a.findIndex(x => x.column === columnName);
if (existingIndex === undefined || existingIndex < 0) {

@@ -16,4 +16,4 @@ return undefined;

var _a;
var existingSort = ((_a = filter.sorting) === null || _a === void 0 ? void 0 : _a.length) ? filter.sorting[0] : undefined;
var sortDirection = direction !== null && direction !== void 0 ? direction : ((existingSort === null || existingSort === void 0 ? void 0 : existingSort.column) === columnName && existingSort.direction === sortingDirection_1.SortingDirection.Ascending
const existingSort = ((_a = filter.sorting) === null || _a === void 0 ? void 0 : _a.length) ? filter.sorting[0] : undefined;
const sortDirection = direction !== null && direction !== void 0 ? direction : ((existingSort === null || existingSort === void 0 ? void 0 : existingSort.column) === columnName && existingSort.direction === sortingDirection_1.SortingDirection.Ascending
? sortingDirection_1.SortingDirection.Descending

@@ -35,3 +35,3 @@ : sortingDirection_1.SortingDirection.Ascending);

}
var existingIndex = filter.sorting.findIndex(function (x) { return x.column === columnName; });
const existingIndex = filter.sorting.findIndex(x => x.column === columnName);
if (existingIndex === -1) {

@@ -38,0 +38,0 @@ filter.sorting.push({ column: columnName, direction: direction !== null && direction !== void 0 ? direction : sortingDirection_1.SortingDirection.Ascending });

@@ -6,3 +6,3 @@ {

},
"version": "1.0.0-alpha.8",
"version": "1.0.0-alpha.9",
"description": "Helpers and interfaces for handling paged and sorted data sets",

@@ -37,3 +37,3 @@ "keywords": [

},
"gitHead": "e774efd68e7bd49b83461fdcae0d110c2b69da90"
"gitHead": "718298c96617555dd2121f87a2dfefb3ea16d039"
}

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