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

@equinor/fusion

Package Overview
Dependencies
Maintainers
2
Versions
485
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@equinor/fusion - npm Package Compare versions

Comparing version 0.1.71 to 0.1.72

2

lib/index.d.ts

@@ -18,3 +18,3 @@ export { IAuthContainer, default as AuthContainer } from "./auth/AuthContainer";

export { useTasksContainer, useTasks, useTaskSourceSystems, useTaskTypes, useTaskPrioritySetter } from "./core/TasksContainer";
export { createPagination, applyPagination, usePagination, useAsyncPagination, Page, Pagination } from "./utils/Pagination";
export { createPagination, applyPagination, usePagination, useAsyncPagination, Page, Pagination, PaginationResult } from "./utils/Pagination";
export * from "./http/hooks/dataProxy/useHandover";

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

export declare type Pagination = {
rowCount: number;
totalCount: number;
perPage: number;

@@ -20,4 +20,4 @@ pageCount: number;

export declare const applyPagination: <T>(data: T[], { perPage, currentPage }: Pagination) => T[];
export declare const createPagination: (rowCount: number, perPage: number, currentPageIndex?: number, padding?: number) => {
rowCount: number;
export declare const createPagination: (totalCount: number, perPage: number, currentPageIndex?: number, padding?: number) => {
totalCount: number;
perPage: number;

@@ -24,0 +24,0 @@ pageCount: number;

@@ -35,4 +35,4 @@ import { useState, useEffect } from "react";

};
export const createPagination = (rowCount, perPage, currentPageIndex = 0, padding = 3) => {
const pageCount = Math.ceil(rowCount / perPage);
export const createPagination = (totalCount, perPage, currentPageIndex = 0, padding = 3) => {
const pageCount = Math.ceil(totalCount / perPage);
const pages = [];

@@ -49,3 +49,3 @@ for (let i = 0; i < pageCount; i++) {

return {
rowCount,
totalCount,
perPage,

@@ -102,4 +102,6 @@ pageCount,

useEffect(() => {
setData([]);
setPagination(createPagination(pagination.totalCount, internalPerPage, internalCurrentPageIndex, padding));
applyPaginationAsync();
}, [fetchAsync, internalCurrentPageIndex, internalPerPage]);
}, [internalCurrentPageIndex, internalPerPage]);
return {

@@ -106,0 +108,0 @@ pagination,

{
"name": "@equinor/fusion",
"version": "0.1.71",
"version": "0.1.72",
"description": "Everything a Fusion app needs to communicate with the core",

@@ -5,0 +5,0 @@ "main": "lib/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