@bufferapp/analyze-export-picker
Advanced tools
Comparing version 1.77.4 to 2.0.0-beta-22
@@ -1,5 +0,5 @@ | ||
import React, { useState } from "react"; | ||
import PropTypes from "prop-types"; | ||
import Select from "@bufferapp/ui/Select"; | ||
import { Can, Cant, EXPORT } from "@bufferapp/analyze-account"; | ||
import React, { useState } from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import Select from '@bufferapp/ui/Select'; | ||
import { Can, Cant, EXPORT } from '@bufferapp/analyze-account'; | ||
import { Button } from '@bufferapp/analyze-shared-components'; | ||
@@ -18,9 +18,9 @@ import UpgradeToPro from '@bufferapp/upgrade-to-pro'; | ||
{ | ||
id: "csv", | ||
title: "Export as CSV", | ||
id: 'csv', | ||
title: 'Export as CSV', | ||
onItemClick: () => exportToCSV(filename), | ||
}, | ||
{ | ||
id: "png", | ||
title: "Export as Images", | ||
id: 'png', | ||
title: 'Export as Images', | ||
onItemClick: () => exportToPNG(filename), | ||
@@ -32,8 +32,8 @@ }, | ||
<React.Fragment> | ||
<Can {...{EXPORT}}> | ||
<Can {...{ EXPORT }}> | ||
<Select | ||
onSelectClick={(selectedItem) => | ||
onSelectClick={selectedItem => | ||
selectedItem.onItemClick() | ||
} | ||
label={exporting ? "Exporting..." : "Export as..."} | ||
label={exporting ? 'Exporting...' : 'Export as...'} | ||
items={exportOptions} | ||
@@ -45,10 +45,10 @@ disabled={exporting} | ||
</Can> | ||
<Cant {...{EXPORT}}> | ||
<Button onClick={() => {setShowUpgrade(true)}}>Export as...</Button> | ||
<Cant {...{ EXPORT }}> | ||
<Button onClick={() => { setShowUpgrade(true); }}>Export as...</Button> | ||
</Cant> | ||
{showUpgrade && <UpgradeToPro | ||
hide={() => {setShowUpgrade(false)}} | ||
hide={() => { setShowUpgrade(false); }} | ||
title="Unlock Charts Export" | ||
description="Upgrade to get the most out of Buffers Analytics, and unlock PNG and CSV charts export!" | ||
cta="analyze-unlockChartsExport-exportPicker-upgrade-1" | ||
cta="unlockChartsExport-exportPicker-upgrade-1" | ||
/>} | ||
@@ -55,0 +55,0 @@ </React.Fragment> |
16
index.js
@@ -1,5 +0,5 @@ | ||
import { connect } from "react-redux"; | ||
import { actions as csvActions } from "@bufferapp/analyze-csv-export"; | ||
import { actions as pngActions } from "@bufferapp/analyze-png-export"; | ||
import ExportPicker from "./components/ExportPicker"; | ||
import { connect } from 'react-redux'; | ||
import { actions as csvActions } from '@bufferapp/analyze-csv-export'; | ||
import { actions as pngActions } from '@bufferapp/analyze-png-export'; | ||
import ExportPicker from './components/ExportPicker'; | ||
@@ -12,6 +12,6 @@ // default export = container | ||
}), | ||
(dispatch) => ({ | ||
exportToCSV: (filename) => dispatch(csvActions.exportToCSV(filename)), | ||
exportToPNG: (filename) => dispatch(pngActions.exportToPNG(filename)), | ||
}) | ||
dispatch => ({ | ||
exportToCSV: filename => dispatch(csvActions.exportToCSV(filename)), | ||
exportToPNG: filename => dispatch(pngActions.exportToPNG(filename)), | ||
}), | ||
)(ExportPicker); |
import React from 'react'; | ||
import { configure, mount } from 'enzyme'; | ||
import Adapter from 'enzyme-adapter-react-16'; | ||
import Adapter from '@wojtekmaj/enzyme-adapter-react-17'; | ||
import { Provider } from 'react-redux'; | ||
@@ -5,0 +5,0 @@ import ExportPickerContainer from './index'; |
{ | ||
"name": "@bufferapp/analyze-export-picker", | ||
"version": "1.77.4", | ||
"version": "2.0.0-beta-22", | ||
"description": "Export Dropdown", | ||
"main": "index.js", | ||
"types": "types/index.d.ts", | ||
"scripts": { | ||
@@ -13,5 +14,8 @@ "start": "start-storybook -p 9001", | ||
"dependencies": { | ||
"@bufferapp/analyze-csv-export": "^1.77.3", | ||
"@bufferapp/analyze-png-export": "^1.77.4", | ||
"@bufferapp/components": "3.2.1" | ||
"@bufferapp/analyze-account": "2.0.0-beta-7", | ||
"@bufferapp/analyze-csv-export": "2.0.0-beta-8", | ||
"@bufferapp/analyze-png-export": "2.0.0-beta-17", | ||
"@bufferapp/analyze-shared-components": "2.0.0-beta-21", | ||
"@bufferapp/components": "3.2.1", | ||
"@bufferapp/upgrade-to-pro": "2.0.0-beta-18" | ||
}, | ||
@@ -18,0 +22,0 @@ "devDependencies": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
129705
29
637
6
2
2
+ Added@bufferapp/analytics-middleware@2.0.1-beta.0(transitive)
+ Added@bufferapp/analyze-account@1.77.42.0.0-beta-7(transitive)
+ Added@bufferapp/analyze-csv-export@2.0.0-beta-8(transitive)
+ Added@bufferapp/analyze-decorators@1.56.0(transitive)
+ Added@bufferapp/analyze-png-export@2.0.0-beta-17(transitive)
+ Added@bufferapp/analyze-profile-selector@1.77.42.0.0-beta-9(transitive)
+ Added@bufferapp/analyze-shared-components@1.77.42.0.0-beta-21(transitive)
+ Added@bufferapp/nav-sidebar@2.0.0-beta-19(transitive)
+ Added@bufferapp/profile-loader@1.77.42.0.0-beta-10(transitive)
+ Added@bufferapp/upgrade-to-pro@1.77.02.0.0-beta-18(transitive)
+ Addedcurrency-symbol-map@4.0.4(transitive)
+ Addedhighcharts@6.2.0(transitive)
+ Addedimmutability-helper@2.9.1(transitive)
+ Addedinvariant@2.2.4(transitive)
+ Addedreact-highcharts@16.1.0(transitive)
- Removed@bufferapp/analyze-csv-export@1.77.3(transitive)
- Removed@bufferapp/analyze-png-export@1.77.4(transitive)