@redhat-cloud-services/frontend-components-utilities 3.2.19 → 3.2.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { Dispatch, AnyAction } from 'redux';
1
+ import { AnyAction, Dispatch } from 'redux';
2
2
  export declare type Listener<T = any> = {
3
3
  callback: (data: {
4
4
  data: T;
package/RBAC/RBAC.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Access } from '@redhat-cloud-services/rbac-client';
2
- import { ChromeAPI } from '@redhat-cloud-services/types';
2
+ import type { ChromeAPI } from '@redhat-cloud-services/types';
3
3
  declare global {
4
4
  interface Window {
5
5
  insights: {
@@ -1,4 +1,4 @@
1
- import { compose, ActionCreator, Store, Reducer, Middleware } from 'redux';
1
+ import { ActionCreator, Middleware, Reducer, Store, compose } from 'redux';
2
2
  export declare function applyReducerHash(reducerHash: any, initialState?: Record<string, unknown>): (state: Record<string, unknown> | undefined, action: {
3
3
  type: PropertyKey;
4
4
  }) => any;
@@ -1,4 +1,6 @@
1
- export function registryDecorator(): (target: any) => void;
2
- export function getRegistry(initialState: {} | undefined, middleware: any[] | undefined, composeEnhancersDefault: any): any;
3
- export let registry: any;
1
+ import { Middleware, compose } from 'redux';
2
+ import ReducerRegistry from '../ReducerRegistry';
3
+ export declare let registry: ReducerRegistry<any>;
4
+ export declare function registryDecorator(): (target: React.ComponentClass) => void;
5
+ export declare function getRegistry<T extends Record<string, unknown>>(initialState?: T, middleware?: Middleware[], composeEnhancersDefault?: typeof compose): ReducerRegistry<any>;
4
6
  export default registryDecorator;
@@ -45,8 +45,8 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { useState, useEffect } from 'react';
49
- import { getRBAC, doesHavePermissions, hasAllPermissions } from '../RBAC';
48
+ import { useEffect, useState } from 'react';
49
+ import { doesHavePermissions, getRBAC, hasAllPermissions } from '../RBAC';
50
50
  export function usePermissions(appName, permissionsList, disableCache, checkAll) {
51
51
  var _this = this;
52
52
  var _a = useState({
@@ -9,7 +9,7 @@ var __assign = (this && this.__assign) || function () {
9
9
  };
10
10
  return __assign.apply(this, arguments);
11
11
  };
12
- import { applyMiddleware, combineReducers, createStore, compose } from 'redux';
12
+ import { applyMiddleware, combineReducers, compose, createStore } from 'redux';
13
13
  export function applyReducerHash(reducerHash, initialState) {
14
14
  if (initialState === void 0) { initialState = {}; }
15
15
  return function (state, action) {
@@ -37,7 +37,7 @@ var __rest = (this && this.__rest) || function (s, e) {
37
37
  };
38
38
  import React from 'react';
39
39
  import PropTypes from 'prop-types';
40
- import { withRouter, matchPath } from 'react-router-dom';
40
+ import { matchPath, withRouter } from 'react-router-dom';
41
41
  import { connect } from 'react-redux';
42
42
  import isEqual from 'lodash/isEqual';
43
43
  var RouterParams = (function (_super) {
@@ -61,7 +61,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
61
61
  }
62
62
  };
63
63
  import axios from 'axios';
64
- import { configureScope, captureException } from '@sentry/browser';
64
+ import { captureException, configureScope } from '@sentry/browser';
65
65
  var HttpError = (function (_super) {
66
66
  __extends(HttpError, _super);
67
67
  function HttpError(description) {
@@ -1,4 +1,4 @@
1
- import { Badge, Bullseye, Button, Checkbox, ClipboardCopy, Dropdown, DropdownItem, DropdownPosition, DropdownToggle, DropdownToggleCheckbox, TextInput, Grid, GridItem, Tab, Tabs, Switch, Form, FormGroup, FormSelect, FormSelectOption, Label, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, Select, SelectOption, SelectVariant, SelectGroup, Radio, ChipGroup, Chip, Title, Split, SplitItem, Spinner, Flex, FlexItem, Pagination, PaginationVariant, Tooltip, Modal, Stack, StackItem, Level, LevelItem, KebabToggle, Toolbar, ToolbarItem, ToolbarContent, ToolbarGroup, Drawer, DrawerPanelContent, DrawerContent, DrawerContentBody, DrawerPanelBody, DrawerActions, DrawerHead, DrawerCloseButton, } from '@patternfly/react-core';
1
+ import { Badge, Bullseye, Button, Checkbox, Chip, ChipGroup, ClipboardCopy, Drawer, DrawerActions, DrawerCloseButton, DrawerContent, DrawerContentBody, DrawerHead, DrawerPanelBody, DrawerPanelContent, Dropdown, DropdownItem, DropdownPosition, DropdownToggle, DropdownToggleCheckbox, EmptyState, EmptyStateBody, EmptyStateIcon, EmptyStateVariant, Flex, FlexItem, Form, FormGroup, FormSelect, FormSelectOption, Grid, GridItem, KebabToggle, Label, Level, LevelItem, Modal, Pagination, PaginationVariant, Radio, Select, SelectGroup, SelectOption, SelectVariant, Spinner, Split, SplitItem, Stack, StackItem, Switch, Tab, Tabs, TextInput, Title, Toolbar, ToolbarContent, ToolbarGroup, ToolbarItem, Tooltip, } from '@patternfly/react-core';
2
2
  import { CubesIcon, ExclamationTriangleIcon } from '@patternfly/react-icons';
3
3
  export var reactIcons = {
4
4
  CubesIcon: CubesIcon,
@@ -45,9 +45,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
45
45
  if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
46
46
  }
47
47
  };
48
- import { useState, useEffect } from 'react';
48
+ import { useEffect, useState } from 'react';
49
49
  import * as reactRouterDom from 'react-router-dom';
50
- import { Table as PfTable, TableBody, TableHeader, TableGridBreakpoint, cellWidth, TableVariant, sortable, expandable, SortByDirection, } from '@patternfly/react-table';
50
+ import { Table as PfTable, SortByDirection, TableBody, TableGridBreakpoint, TableHeader, TableVariant, cellWidth, expandable, sortable, } from '@patternfly/react-table';
51
51
  console.error('"useInventory" hook is deprecated and will be removed in v4. Please use Chrome 2.0 compatible Inventory version.');
52
52
  export var useInventory = function (_a) {
53
53
  var store = _a.store, tableReducer = _a.tableReducer, detailReducer = _a.detailReducer, getRegistry = _a.getRegistry;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redhat-cloud-services/frontend-components-utilities",
3
- "version": "3.2.19",
3
+ "version": "3.2.22",
4
4
  "description": "Util functions for RedHat Cloud Services project.",
5
5
  "main": "index.js",
6
6
  "module": "esm/index.js",
@@ -37,7 +37,7 @@
37
37
  },
38
38
  "dependencies": {
39
39
  "@sentry/browser": "^5.4.0",
40
- "@redhat-cloud-services/types": "0.0.1",
40
+ "@redhat-cloud-services/types": "^0.0.5",
41
41
  "awesome-debounce-promise": "^2.1.0",
42
42
  "axios": "^0.25.0",
43
43
  "commander": ">=2.20.0",