@redhat-cloud-services/frontend-components 3.9.3 → 3.9.6
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.
- package/BulkSelect/BulkSelect.d.ts +1 -1
- package/BulkSelect/bulk-select.scss +13 -13
- package/ConditionalFilter/conditional-filter.scss +78 -87
- package/CullingInfo/CullingInformation.scss +4 -4
- package/DownloadButton/DownloadButton.spec.ct.d.ts +1 -0
- package/DownloadButton/DownloadButton.spec.ct.js +24 -0
- package/EmptyTable/EmptyTable.scss +7 -7
- package/ErrorState/error-state.scss +3 -3
- package/FilterChips/filter-chips.scss +9 -10
- package/FilterHooks/tagFilterHook.scss +15 -16
- package/InsightsLabel/labels.scss +14 -12
- package/InvalidObject/icon-404.scss +5 -9
- package/LongTextTooltip/index.d.ts +1 -1
- package/LongTextTooltip/index.js +2 -2
- package/Main/Main.d.ts +8 -0
- package/Main/main.scss +1 -1
- package/Maintenance/maintenance.scss +5 -5
- package/NotAuthorized/NotAuthorized.scss +5 -5
- package/Ouia/WithOuia.d.ts +1 -1
- package/Ouia/useOuia.d.ts +1 -1
- package/PageHeader/page-header.scss +5 -5
- package/Pagination/pagination.scss +5 -6
- package/PrimaryToolbar/PrimaryToolbar.d.ts +1 -1
- package/PrimaryToolbar/primary-toolbar.scss +40 -51
- package/Reboot/reboot.scss +7 -7
- package/SimpleTableFilter/simple-table-filter.scss +10 -10
- package/Skeleton/skeleton.scss +16 -16
- package/SkeletonTable/SkeletonTable.scss +1 -1
- package/Spinner/spinner.scss +15 -17
- package/TableToolbar/TableToolbar.scss +9 -9
- package/TagCount/tagCount.scss +4 -4
- package/TagModal/tagModal.scss +1 -1
- package/Unavailable/Unavailable.scss +1 -1
- package/cypress/cypress.webpack.config.js +37 -0
- package/cypress/fixtures/example.json +5 -0
- package/cypress/plugins/index.js +30 -0
- package/cypress/support/commands.js +25 -0
- package/cypress/support/index.js +21 -0
- package/cypress.json +9 -0
- package/esm/BulkSelect/BulkSelect.js +2 -2
- package/esm/BulkSelect/bulk-select.scss +13 -13
- package/esm/ConditionalFilter/CheckboxFilter.js +1 -1
- package/esm/ConditionalFilter/ConditionalFilter.js +2 -2
- package/esm/ConditionalFilter/GroupFilter.js +3 -3
- package/esm/ConditionalFilter/RadioFilter.js +1 -1
- package/esm/ConditionalFilter/TextFilter.js +1 -1
- package/esm/ConditionalFilter/conditional-filter.scss +78 -87
- package/esm/CullingInfo/CullingInformation.scss +4 -4
- package/esm/DownloadButton/DownloadButton.spec.ct.js +19 -0
- package/esm/EmptyTable/EmptyTable.scss +7 -7
- package/esm/ErrorState/ErrorState.js +1 -1
- package/esm/ErrorState/error-state.scss +3 -3
- package/esm/FilterChips/FilterChips.js +1 -1
- package/esm/FilterChips/filter-chips.scss +9 -10
- package/esm/FilterHooks/tagFilterHook.js +1 -1
- package/esm/FilterHooks/tagFilterHook.scss +15 -16
- package/esm/Filters/FilterInput.js +1 -1
- package/esm/InsightsLabel/labels.scss +14 -12
- package/esm/InvalidObject/InvalidObject.js +1 -1
- package/esm/InvalidObject/icon-404.scss +5 -9
- package/esm/LongTextTooltip/index.js +1 -1
- package/esm/Main/main.scss +1 -1
- package/esm/Maintenance/Maintenance.js +1 -1
- package/esm/Maintenance/maintenance.scss +5 -5
- package/esm/NotAuthorized/NotAuthorized.js +1 -1
- package/esm/NotAuthorized/NotAuthorized.scss +5 -5
- package/esm/NotConnected/NotConnected.js +1 -1
- package/esm/PageHeader/page-header.scss +5 -5
- package/esm/Pagination/PaginationNav.js +1 -1
- package/esm/Pagination/pagination.scss +5 -6
- package/esm/PrimaryToolbar/Actions.js +1 -1
- package/esm/PrimaryToolbar/PrimaryToolbar.js +1 -1
- package/esm/PrimaryToolbar/primary-toolbar.scss +40 -51
- package/esm/Reboot/reboot.scss +7 -7
- package/esm/SimpleTableFilter/SimpleTableFilter.js +1 -1
- package/esm/SimpleTableFilter/simple-table-filter.scss +10 -10
- package/esm/Skeleton/skeleton.scss +16 -16
- package/esm/SkeletonTable/SkeletonTable.js +1 -1
- package/esm/SkeletonTable/SkeletonTable.scss +1 -1
- package/esm/Spinner/spinner.scss +15 -17
- package/esm/TableToolbar/TableToolbar.scss +9 -9
- package/esm/TagCount/tagCount.scss +4 -4
- package/esm/TagModal/TableWithFilter.js +2 -2
- package/esm/TagModal/TagModal.js +1 -1
- package/esm/TagModal/tagModal.scss +1 -1
- package/esm/Unavailable/Unavailable.js +1 -1
- package/esm/Unavailable/Unavailable.scss +1 -1
- package/esm/usePendoFeedback/usePendoFeedback.js +1 -5
- package/index.d.ts +0 -8
- package/package.json +11 -3
- package/useChrome/useChrome.d.ts +1 -1
- package/usePendoFeedback/usePendoFeedback.d.ts +1 -1
- package/usePendoFeedback/usePendoFeedback.js +1 -5
package/Reboot/reboot.scss
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
@import '~@redhat-cloud-services/frontend-components-utilities/styles/_all.scss';
|
|
2
2
|
|
|
3
3
|
.ins-c-reboot {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
span {
|
|
5
|
+
// 4px because the battery icon is 1px bigger than the reboot icon
|
|
6
|
+
@include rem('margin-left', 4px);
|
|
7
|
+
}
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
&.ins-m-red {
|
|
10
|
+
span, svg { color: var(--pf-global--danger-color--100); }
|
|
11
|
+
}
|
|
12
12
|
}
|
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
@import '~@redhat-cloud-services/frontend-components-utilities/styles/_all.scss';
|
|
6
6
|
|
|
7
7
|
.pf-c-input-group.ins-c-filter {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
8
|
+
&.ins-u-no-title input {
|
|
9
|
+
@include rem('padding-right', 35px);
|
|
10
|
+
@include rem('margin-right', -23px);
|
|
11
|
+
}
|
|
12
|
+
.ins-c-search-icon {
|
|
13
|
+
color: var(--pf-global--secondary-color--100);
|
|
14
|
+
position: relative;
|
|
15
|
+
@include rem('left', -5px);
|
|
16
|
+
@include rem('top', 8px);
|
|
17
|
+
}
|
|
18
18
|
}
|
package/Skeleton/skeleton.scss
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
.ins-c-skeleton {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
2
|
+
&__xs { width: 16% !important; }
|
|
3
|
+
&__sm { width: 33% !important; }
|
|
4
|
+
&__md { width: 66% !important; }
|
|
5
|
+
&__lg { width: 100% !important; }
|
|
6
|
+
&.ins-m-dark {
|
|
7
|
+
--pf-c-skeleton--BackgroundColor: var(--pf-global--palette--black-600);
|
|
8
|
+
--pf-c-skeleton--after--LinearGradientColorStop1: var(
|
|
9
|
+
--pf-global--palette--black-600
|
|
10
|
+
);
|
|
11
|
+
--pf-c-skeleton--after--LinearGradientColorStop2: var(
|
|
12
|
+
--pf-global--palette--black-500
|
|
13
|
+
);
|
|
14
|
+
--pf-c-skeleton--after--LinearGradientColorStop3: var(
|
|
15
|
+
--pf-global--palette--black-600
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
18
|
}
|
package/Spinner/spinner.scss
CHANGED
|
@@ -1,24 +1,22 @@
|
|
|
1
1
|
@import '~@redhat-cloud-services/frontend-components-utilities/styles/_all.scss';
|
|
2
2
|
|
|
3
3
|
@keyframes spinner {
|
|
4
|
-
|
|
4
|
+
to { transform: rotate(360deg); }
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.ins-c-spinner {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
animation: spinner 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
23
|
-
}
|
|
8
|
+
display: inline-flex;
|
|
9
|
+
&.ins-m-center {
|
|
10
|
+
display: flex;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
}
|
|
13
|
+
&:before {
|
|
14
|
+
content: '';
|
|
15
|
+
@include rem('width', 30px);
|
|
16
|
+
@include rem('height', 30px);
|
|
17
|
+
border-radius: 50%;
|
|
18
|
+
border: 3px solid var(--pf-global--active-color--200);
|
|
19
|
+
border-top-color: var(--pf-global--active-color--100);
|
|
20
|
+
animation: spinner 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
|
|
21
|
+
}
|
|
24
22
|
}
|
|
@@ -6,9 +6,9 @@
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
.ins-c-table__toolbar, .ins-c-table__toolbar-results {
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
background: var(--pf-global--Color--light-100);
|
|
10
|
+
border-bottom: 1px solid var(--pf-global--BorderColor--light-200);
|
|
11
|
+
padding: var(--ins-c-table-toolbar--PaddingVertical) var(--ins-c-table-toolbar--PaddingHorizontal);
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.ins-c-table__toolbar.ins-m-footer { border-top: 1px solid var(--pf-global--BorderColor--light-200); }
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
.ins-c-table__toolbar-results { color: var(--pf-global--Color--200); }
|
|
17
17
|
|
|
18
18
|
.ins-c-table__toolbar-results-count + .ins-c-table__toolbar-results-selected {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
@include rem('margin-left', 15px);
|
|
20
|
+
@include rem('padding-left', 15px);
|
|
21
|
+
border-left: 2px solid var(--pf-global--BorderColor--light);
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
@media only screen and (max-width: 768px) {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
.ins-c-table__toolbar, .ins-c-table__toolbar-results {
|
|
26
|
+
padding: 0 0;
|
|
27
|
+
}
|
|
28
28
|
}
|
package/TagCount/tagCount.scss
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
button.ins-c-tag-count {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
color: var(--pf-global--icon--Color--light);
|
|
3
|
+
display: flex;
|
|
4
|
+
align-content: center;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
.ins-c-tag__text {
|
|
8
|
-
|
|
8
|
+
margin-left: 10px;
|
|
9
9
|
}
|
package/TagModal/tagModal.scss
CHANGED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
|
|
3
|
+
module.exports = {
|
|
4
|
+
entry: '../src/index.ts',
|
|
5
|
+
module: {
|
|
6
|
+
rules: [
|
|
7
|
+
{
|
|
8
|
+
test: /\.tsx?$/,
|
|
9
|
+
use: 'ts-loader',
|
|
10
|
+
exclude: /node_modules/
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
test: /\.jsx?$/,
|
|
14
|
+
exclude: /node_modules/,
|
|
15
|
+
use: 'babel-loader',
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
test: /\.s?[ac]ss$/,
|
|
19
|
+
use: ['style-loader', 'css-loader', 'sass-loader'],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
test: /\.(jpe?g|png|gif|svg|woff2?)$/i,
|
|
23
|
+
use: 'file-loader',
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
resolve: {
|
|
28
|
+
extensions: ['.tsx', '.ts', '.js']
|
|
29
|
+
},
|
|
30
|
+
output: {
|
|
31
|
+
filename: 'bundle.js',
|
|
32
|
+
path: path.resolve(__dirname, 'dist'),
|
|
33
|
+
},
|
|
34
|
+
stats: {
|
|
35
|
+
errorDetails: true
|
|
36
|
+
}
|
|
37
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/// <reference types="cypress" />
|
|
2
|
+
// ***********************************************************
|
|
3
|
+
// This example plugins/index.js can be used to load plugins
|
|
4
|
+
//
|
|
5
|
+
// You can change the location of this file or turn off loading
|
|
6
|
+
// the plugins file with the 'pluginsFile' configuration option.
|
|
7
|
+
//
|
|
8
|
+
// You can read more here:
|
|
9
|
+
// https://on.cypress.io/plugins-guide
|
|
10
|
+
// ***********************************************************
|
|
11
|
+
|
|
12
|
+
// This function is called when a project is opened or re-opened (e.g. due to
|
|
13
|
+
// the project's config changing)
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* @type {Cypress.PluginConfig}
|
|
17
|
+
*/
|
|
18
|
+
// eslint-disable-next-line no-unused-vars
|
|
19
|
+
module.exports = (on, config) => {
|
|
20
|
+
// `on` is used to hook into various events Cypress emits
|
|
21
|
+
// `config` is the resolved Cypress config
|
|
22
|
+
if (config.testingType === 'component') {
|
|
23
|
+
const { startDevServer } = require('@cypress/webpack-dev-server');
|
|
24
|
+
|
|
25
|
+
// Your project's Webpack configuration
|
|
26
|
+
const webpackConfig = require('../cypress.webpack.config.js')
|
|
27
|
+
|
|
28
|
+
on('dev-server:start', (options) => startDevServer({options, webpackConfig}));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// ***********************************************
|
|
2
|
+
// This example commands.js shows you how to
|
|
3
|
+
// create various custom commands and overwrite
|
|
4
|
+
// existing commands.
|
|
5
|
+
//
|
|
6
|
+
// For more comprehensive examples of custom
|
|
7
|
+
// commands please read more here:
|
|
8
|
+
// https://on.cypress.io/custom-commands
|
|
9
|
+
// ***********************************************
|
|
10
|
+
//
|
|
11
|
+
//
|
|
12
|
+
// -- This is a parent command --
|
|
13
|
+
// Cypress.Commands.add('login', (email, password) => { ... })
|
|
14
|
+
//
|
|
15
|
+
//
|
|
16
|
+
// -- This is a child command --
|
|
17
|
+
// Cypress.Commands.add('drag', { prevSubject: 'element'}, (subject, options) => { ... })
|
|
18
|
+
//
|
|
19
|
+
//
|
|
20
|
+
// -- This is a dual command --
|
|
21
|
+
// Cypress.Commands.add('dismiss', { prevSubject: 'optional'}, (subject, options) => { ... })
|
|
22
|
+
//
|
|
23
|
+
//
|
|
24
|
+
// -- This will overwrite an existing command --
|
|
25
|
+
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// ***********************************************************
|
|
2
|
+
// This example support/index.js is processed and
|
|
3
|
+
// loaded automatically before your test files.
|
|
4
|
+
//
|
|
5
|
+
// This is a great place to put global configuration and
|
|
6
|
+
// behavior that modifies Cypress.
|
|
7
|
+
//
|
|
8
|
+
// You can change the location of this file or turn off
|
|
9
|
+
// automatically serving support files with the
|
|
10
|
+
// 'supportFile' configuration option.
|
|
11
|
+
//
|
|
12
|
+
// You can read more here:
|
|
13
|
+
// https://on.cypress.io/configuration
|
|
14
|
+
// ***********************************************************
|
|
15
|
+
|
|
16
|
+
// Import commands.js using ES2015 syntax:
|
|
17
|
+
import './commands'
|
|
18
|
+
import '@patternfly/patternfly/patternfly.css';
|
|
19
|
+
|
|
20
|
+
// Alternatively you can use CommonJS syntax:
|
|
21
|
+
// require('./commands')
|
package/cypress.json
ADDED
|
@@ -29,9 +29,9 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
29
29
|
}
|
|
30
30
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
31
|
};
|
|
32
|
-
import React, {
|
|
32
|
+
import React, { Fragment, useRef, useState } from 'react';
|
|
33
33
|
import classnames from 'classnames';
|
|
34
|
-
import { Dropdown, DropdownItem, DropdownToggle, DropdownToggleCheckbox,
|
|
34
|
+
import { Checkbox, Dropdown, DropdownItem, DropdownToggle, DropdownToggleCheckbox, } from '@patternfly/react-core';
|
|
35
35
|
import { getDefaultOUIAId } from '@patternfly/react-core/';
|
|
36
36
|
import '../BulkSelect/bulk-select.css';
|
|
37
37
|
var BulkSelect = function (_a) {
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
.ins-c-bulk-select {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
.pf-c-dropdown__toggle-check span.pf-c-dropdown__toggle-text {
|
|
3
|
+
display: initial;
|
|
4
|
+
}
|
|
5
|
+
.ins-c-bulk-select__selected {
|
|
6
|
+
display: none;
|
|
7
|
+
}
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
@media only screen and (max-width: 768px) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
}
|
|
11
|
+
.ins-c-bulk-select {
|
|
12
|
+
.pf-c-dropdown__toggle-check span.pf-c-dropdown__toggle-text {
|
|
13
|
+
display: none;
|
|
14
|
+
}
|
|
15
|
+
.ins-c-bulk-select__selected {
|
|
16
|
+
display: initial;
|
|
18
17
|
}
|
|
18
|
+
}
|
|
19
19
|
}
|
|
@@ -29,7 +29,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
29
29
|
}
|
|
30
30
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
31
|
};
|
|
32
|
-
import React, { Fragment, useEffect,
|
|
32
|
+
import React, { Fragment, useEffect, useRef, useState } from 'react';
|
|
33
33
|
import { Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
34
34
|
import isEqual from 'lodash/isEqual';
|
|
35
35
|
import omit from 'lodash/omit';
|
|
@@ -9,10 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import React, { Fragment, useEffect,
|
|
12
|
+
import React, { Fragment, useEffect, useRef, useState } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
14
|
import globalBreakpointMd from '@patternfly/react-tokens/dist/js/global_breakpoint_md';
|
|
15
|
-
import { Dropdown, DropdownItem, DropdownToggle, SplitItem,
|
|
15
|
+
import { Dropdown, DropdownItem, DropdownToggle, Split, SplitItem, ToolbarGroup, ToolbarItem, ToolbarToggleGroup } from '@patternfly/react-core';
|
|
16
16
|
import { FilterIcon } from '@patternfly/react-icons';
|
|
17
17
|
import TextFilter from './TextFilter';
|
|
18
18
|
import { conditionalFilterType, typeMapper } from './conditionalFilterConstants';
|
|
@@ -9,10 +9,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
-
import React, {
|
|
12
|
+
import React, { useEffect, useRef, useState } from 'react';
|
|
13
13
|
import classNames from 'classnames';
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
14
|
+
import { Button, Checkbox, Menu, MenuContent, MenuGroup, MenuItem, MenuList, MenuToggle, Popper, Radio, TextInput, TreeView, } from '@patternfly/react-core';
|
|
15
|
+
import { calculateSelected, convertTreeItem, getGroupMenuItems, getMenuItems, isChecked, mapTree, onTreeCheck } from './groupFilterConstants';
|
|
16
16
|
import groupType from './groupType';
|
|
17
17
|
import '../ConditionalFilter/group-filter.css';
|
|
18
18
|
var GroupFilter = function (_a) {
|
|
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
21
21
|
return t;
|
|
22
22
|
};
|
|
23
23
|
import React, { Fragment, useState } from 'react';
|
|
24
|
-
import { Select, SelectOption, SelectVariant
|
|
24
|
+
import { Radio, Select, SelectOption, SelectVariant } from '@patternfly/react-core';
|
|
25
25
|
import TextFilter, { isFilterValue } from './TextFilter';
|
|
26
26
|
var RadioFilter = function (_a) {
|
|
27
27
|
var _b = _a.items, items = _b === void 0 ? [] : _b, _c = _a.onChange, onChange = _c === void 0 ? function () { return undefined; } : _c, _d = _a.isDisabled, isDisabled = _d === void 0 ? false : _d, props = __rest(_a, ["items", "onChange", "isDisabled"]);
|
|
@@ -9,7 +9,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
9
9
|
}
|
|
10
10
|
return t;
|
|
11
11
|
};
|
|
12
|
-
import React, {
|
|
12
|
+
import React, { Fragment, useState } from 'react';
|
|
13
13
|
import { TextInput } from '@patternfly/react-core';
|
|
14
14
|
import { SearchIcon } from '@patternfly/react-icons';
|
|
15
15
|
import '../ConditionalFilter/conditional-filter.css';
|
|
@@ -1,110 +1,101 @@
|
|
|
1
1
|
@import '~@redhat-cloud-services/frontend-components-utilities/styles/_all.scss';
|
|
2
2
|
|
|
3
3
|
.ins-c-conditional-filter {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
.
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
& > svg {
|
|
18
|
-
margin-right: var(--pf-global--spacer--xs);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
.ins-c-conditional-filter__no-label .pf-c-dropdown__toggle-text {
|
|
23
|
-
width: auto;
|
|
4
|
+
&.mobile {
|
|
5
|
+
display: none !important;
|
|
6
|
+
visibility: hidden !important;
|
|
7
|
+
}
|
|
8
|
+
.pf-c-select__toggle-wrapper .pf-c-select__toggle-text {
|
|
9
|
+
@include rem('max-width', 150px);
|
|
10
|
+
}
|
|
11
|
+
.ins-c-conditional-filter__group {
|
|
12
|
+
.pf-c-dropdown__toggle-text {
|
|
13
|
+
width: auto;
|
|
14
|
+
text-align: left;
|
|
15
|
+
& > svg {
|
|
16
|
+
margin-right: var(--pf-global--spacer--xs);
|
|
24
17
|
}
|
|
18
|
+
}
|
|
19
|
+
.ins-c-conditional-filter__no-label .pf-c-dropdown__toggle-text {
|
|
20
|
+
width: auto;
|
|
25
21
|
}
|
|
22
|
+
}
|
|
26
23
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
padding: 0;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
.pf-c-select__option-button {
|
|
37
|
-
padding: 0;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
.pf-c-select__menu-item-icon {
|
|
41
|
-
display: none;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
input.ins-c-conditional-filter[type="text"] {
|
|
46
|
-
@include rem('padding-right', 35px);
|
|
47
|
-
@include rem('margin-right', -23px);
|
|
48
|
-
|
|
49
|
-
& + svg {
|
|
50
|
-
position: relative;
|
|
51
|
-
@include rem('left', -5px);
|
|
52
|
-
@include rem('top', 2px);
|
|
53
|
-
}
|
|
24
|
+
.pf-l-split__item {
|
|
25
|
+
.pf-c-select__menu-group {
|
|
26
|
+
.pf-c-select__menu-group-title:empty {
|
|
27
|
+
display: none;
|
|
28
|
+
}
|
|
29
|
+
padding: 0;
|
|
54
30
|
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
margin-right: 0;
|
|
31
|
+
.pf-c-select__option-button {
|
|
32
|
+
padding: 0;
|
|
58
33
|
}
|
|
59
|
-
.pf-c-
|
|
60
|
-
|
|
34
|
+
.pf-c-select__menu-item-icon {
|
|
35
|
+
display: none;
|
|
61
36
|
}
|
|
37
|
+
}
|
|
38
|
+
input.ins-c-conditional-filter[type="text"] {
|
|
39
|
+
@include rem('padding-right', 35px);
|
|
40
|
+
@include rem('margin-right', -23px);
|
|
62
41
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
42
|
+
& + svg {
|
|
43
|
+
position: relative;
|
|
44
|
+
@include rem('left', -5px);
|
|
45
|
+
@include rem('top', 2px);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
.pf-c-select__toggle-text {
|
|
49
|
+
margin-right: 0;
|
|
50
|
+
}
|
|
51
|
+
.pf-c-select__toggle-badge {
|
|
52
|
+
display: none;
|
|
53
|
+
}
|
|
54
|
+
.pf-c-menu-toggle {
|
|
55
|
+
.pf-c-menu-toggle__text {
|
|
56
|
+
flex: 1;
|
|
57
|
+
input { border: none; }
|
|
68
58
|
}
|
|
59
|
+
}
|
|
69
60
|
}
|
|
70
61
|
|
|
71
62
|
.pf-c-menu {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
63
|
+
&.ins-c-menu__scrollable {
|
|
64
|
+
max-height: 416px;
|
|
65
|
+
overflow-y: auto;
|
|
66
|
+
min-width: initial;
|
|
67
|
+
}
|
|
68
|
+
.ins-c-menu__show--more {
|
|
69
|
+
background: none;
|
|
70
|
+
.pf-c-menu__item-text{ color: var(--pf-global--active-color--100); }
|
|
71
|
+
}
|
|
81
72
|
}
|
|
82
73
|
|
|
83
74
|
@media only screen and (max-width: 768px) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
}
|
|
75
|
+
.ins-c-conditional-filter {
|
|
76
|
+
&.mobile {
|
|
77
|
+
visibility: visible !important;
|
|
78
|
+
display: grid !important;
|
|
79
|
+
}
|
|
80
|
+
&.desktop {
|
|
81
|
+
visibility: hidden;
|
|
82
|
+
display: none;
|
|
93
83
|
}
|
|
84
|
+
}
|
|
94
85
|
}
|
|
95
86
|
|
|
96
87
|
@media only screen and (max-width: 884px) {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
}
|
|
88
|
+
.ins-c-conditional-filter {
|
|
89
|
+
.ins-c-conditional-filter__group {
|
|
90
|
+
.pf-c-dropdown__toggle-text {
|
|
91
|
+
width: auto;
|
|
92
|
+
}
|
|
93
|
+
.ins-c-conditional-filter__value-selector {
|
|
94
|
+
display: none;
|
|
95
|
+
}
|
|
96
|
+
.ins-c-conditional-filter__group {
|
|
97
|
+
width: initial;
|
|
98
|
+
}
|
|
109
99
|
}
|
|
100
|
+
}
|
|
110
101
|
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
.ins-c-inventory__culling-danger { color: var(--pf-global--danger-color--100); }
|
|
4
4
|
|
|
5
5
|
.ins-c-inventory__culling-danger, .ins-c-inventory__culling-warning {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
6
|
+
font-weight: var(--pf-global--FontWeight--bold);
|
|
7
|
+
svg {
|
|
8
|
+
margin-right: var(--pf-global--spacer--sm);
|
|
9
|
+
}
|
|
10
10
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { mount } from '@cypress/react';
|
|
3
|
+
import { DownloadButton } from '..';
|
|
4
|
+
describe('DownloadButton component', function () {
|
|
5
|
+
beforeEach(function () {
|
|
6
|
+
mount(React.createElement(DownloadButton, null));
|
|
7
|
+
});
|
|
8
|
+
it('renders the dropdown', function () {
|
|
9
|
+
cy.get('.pf-c-dropdown');
|
|
10
|
+
});
|
|
11
|
+
it('on download callback fired', function () {
|
|
12
|
+
var onSelectSpy = cy.spy().as('onSelectSpy');
|
|
13
|
+
mount(React.createElement(DownloadButton, { onSelect: onSelectSpy }));
|
|
14
|
+
cy.get('div[data-ouia-component-id="Export"] > button').click();
|
|
15
|
+
cy.get('div[data-ouia-component-id="Export"] > ul > li > button[data-ouia-component-id="DownloadCSV"]').click();
|
|
16
|
+
cy.get('@onSelectSpy').should('have.been.called.with', 'csv');
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
//# sourceMappingURL=DownloadButton.spec.ct.js.map
|