mirror of
https://github.com/shlinkio/shlink-web-client.git
synced 2025-01-10 02:07:26 +03:00
Removed no longer used dependencies
This commit is contained in:
parent
d4094e66b3
commit
3cec2efbbd
5 changed files with 6 additions and 53 deletions
43
package-lock.json
generated
43
package-lock.json
generated
|
@ -14441,11 +14441,6 @@
|
||||||
"object.assign": "^4.1.0"
|
"object.assign": "^4.1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"just-curry-it": {
|
|
||||||
"version": "3.1.0",
|
|
||||||
"resolved": "https://registry.yarnpkg.com/just-curry-it/-/just-curry-it-3.1.0.tgz",
|
|
||||||
"integrity": "sha1-q1na7TCKWLhHraFm7dCi1Adm+8U="
|
|
||||||
},
|
|
||||||
"killable": {
|
"killable": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/killable/-/killable-1.0.1.tgz",
|
||||||
|
@ -18717,11 +18712,6 @@
|
||||||
"strip-indent": "^1.0.1"
|
"strip-indent": "^1.0.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"reduce-reducers": {
|
|
||||||
"version": "0.4.3",
|
|
||||||
"resolved": "https://registry.yarnpkg.com/reduce-reducers/-/reduce-reducers-0.4.3.tgz",
|
|
||||||
"integrity": "sha1-jgUmGIAc2PwnFLSRWtqok3621mw="
|
|
||||||
},
|
|
||||||
"redux": {
|
"redux": {
|
||||||
"version": "4.0.4",
|
"version": "4.0.4",
|
||||||
"resolved": "https://registry.npmjs.org/redux/-/redux-4.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/redux/-/redux-4.0.4.tgz",
|
||||||
|
@ -18731,18 +18721,6 @@
|
||||||
"symbol-observable": "^1.2.0"
|
"symbol-observable": "^1.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"redux-actions": {
|
|
||||||
"version": "2.6.5",
|
|
||||||
"resolved": "https://registry.yarnpkg.com/redux-actions/-/redux-actions-2.6.5.tgz",
|
|
||||||
"integrity": "sha1-vcpUh2jumYMqY5EMJ23vheghon4=",
|
|
||||||
"requires": {
|
|
||||||
"invariant": "^2.2.4",
|
|
||||||
"just-curry-it": "^3.1.0",
|
|
||||||
"loose-envify": "^1.4.0",
|
|
||||||
"reduce-reducers": "^0.4.3",
|
|
||||||
"to-camel-case": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"redux-localstorage-simple": {
|
"redux-localstorage-simple": {
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/redux-localstorage-simple/-/redux-localstorage-simple-2.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/redux-localstorage-simple/-/redux-localstorage-simple-2.2.0.tgz",
|
||||||
|
@ -22007,25 +21985,12 @@
|
||||||
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
|
"integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"to-camel-case": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/to-camel-case/-/to-camel-case-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-GlYFSy+daWKYzmamCJcyK29CPkY=",
|
|
||||||
"requires": {
|
|
||||||
"to-space-case": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"to-fast-properties": {
|
"to-fast-properties": {
|
||||||
"version": "2.0.0",
|
"version": "2.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz",
|
||||||
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
|
"integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"to-no-case": {
|
|
||||||
"version": "1.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/to-no-case/-/to-no-case-1.0.2.tgz",
|
|
||||||
"integrity": "sha1-xyKQcWTvaxeBMsjmmTAhLRtKoWo="
|
|
||||||
},
|
|
||||||
"to-object-path": {
|
"to-object-path": {
|
||||||
"version": "0.3.0",
|
"version": "0.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz",
|
||||||
|
@ -22088,14 +22053,6 @@
|
||||||
"repeat-string": "^1.6.1"
|
"repeat-string": "^1.6.1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"to-space-case": {
|
|
||||||
"version": "1.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/to-space-case/-/to-space-case-1.0.0.tgz",
|
|
||||||
"integrity": "sha1-sFLar7Gysp3HcM6gFj5ewOvJ/Bc=",
|
|
||||||
"requires": {
|
|
||||||
"to-no-case": "^1.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"toggle-selection": {
|
"toggle-selection": {
|
||||||
"version": "1.0.6",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/toggle-selection/-/toggle-selection-1.0.6.tgz",
|
||||||
|
|
|
@ -42,7 +42,6 @@
|
||||||
"leaflet": "^1.5.1",
|
"leaflet": "^1.5.1",
|
||||||
"moment": "^2.24.0",
|
"moment": "^2.24.0",
|
||||||
"promise": "^8.0.3",
|
"promise": "^8.0.3",
|
||||||
"prop-types": "^15.7.2",
|
|
||||||
"qs": "^6.9.0",
|
"qs": "^6.9.0",
|
||||||
"ramda": "^0.26.1",
|
"ramda": "^0.26.1",
|
||||||
"react": "^16.13.1",
|
"react": "^16.13.1",
|
||||||
|
@ -61,7 +60,6 @@
|
||||||
"react-tagsinput": "^3.19.0",
|
"react-tagsinput": "^3.19.0",
|
||||||
"reactstrap": "^8.0.1",
|
"reactstrap": "^8.0.1",
|
||||||
"redux": "^4.0.4",
|
"redux": "^4.0.4",
|
||||||
"redux-actions": "^2.6.5",
|
|
||||||
"redux-localstorage-simple": "^2.2.0",
|
"redux-localstorage-simple": "^2.2.0",
|
||||||
"redux-thunk": "^2.3.0",
|
"redux-thunk": "^2.3.0",
|
||||||
"uuid": "^3.3.3"
|
"uuid": "^3.3.3"
|
||||||
|
|
|
@ -2,7 +2,7 @@ import qs from 'qs';
|
||||||
import { isEmpty, isNil, reject } from 'ramda';
|
import { isEmpty, isNil, reject } from 'ramda';
|
||||||
import { AxiosInstance, AxiosResponse, Method } from 'axios';
|
import { AxiosInstance, AxiosResponse, Method } from 'axios';
|
||||||
import { ShortUrlsListParams } from '../../short-urls/reducers/shortUrlsListParams';
|
import { ShortUrlsListParams } from '../../short-urls/reducers/shortUrlsListParams';
|
||||||
import { ShortUrl } from '../../short-urls/data';
|
import { ShortUrl, ShortUrlData } from '../../short-urls/data';
|
||||||
import { OptionalString } from '../utils';
|
import { OptionalString } from '../utils';
|
||||||
import {
|
import {
|
||||||
ShlinkHealth,
|
ShlinkHealth,
|
||||||
|
@ -33,8 +33,8 @@ export default class ShlinkApiClient {
|
||||||
this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', params)
|
this.performRequest<{ shortUrls: ShlinkShortUrlsResponse }>('/short-urls', 'GET', params)
|
||||||
.then(({ data }) => data.shortUrls);
|
.then(({ data }) => data.shortUrls);
|
||||||
|
|
||||||
public readonly createShortUrl = async (options: any): Promise<ShortUrl> => { // TODO CreateShortUrl interface
|
public readonly createShortUrl = async (options: ShortUrlData): Promise<ShortUrl> => {
|
||||||
const filteredOptions = reject((value) => isEmpty(value) || isNil(value), options);
|
const filteredOptions = reject((value) => isEmpty(value) || isNil(value), options as any);
|
||||||
|
|
||||||
return this.performRequest<ShortUrl>('/short-urls', 'POST', {}, filteredOptions)
|
return this.performRequest<ShortUrl>('/short-urls', 'POST', {}, filteredOptions)
|
||||||
.then((resp) => resp.data);
|
.then((resp) => resp.data);
|
||||||
|
|
|
@ -25,12 +25,12 @@ interface ShlinkTagsStats {
|
||||||
|
|
||||||
export interface ShlinkTags {
|
export interface ShlinkTags {
|
||||||
tags: string[];
|
tags: string[];
|
||||||
stats?: ShlinkTagsStats[]; // TODO Is only optional in old versions
|
stats?: ShlinkTagsStats[]; // Is only optional in old Shlink versions
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ShlinkTagsResponse {
|
export interface ShlinkTagsResponse {
|
||||||
data: string[];
|
data: string[];
|
||||||
stats?: ShlinkTagsStats[]; // TODO Is only optional in old versions
|
stats?: ShlinkTagsStats[]; // Is only optional in old Shlink versions
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ShlinkPaginator {
|
export interface ShlinkPaginator {
|
||||||
|
@ -40,7 +40,7 @@ export interface ShlinkPaginator {
|
||||||
|
|
||||||
export interface ShlinkVisits {
|
export interface ShlinkVisits {
|
||||||
data: Visit[];
|
data: Visit[];
|
||||||
pagination?: ShlinkPaginator; // TODO Is only optional in old versions
|
pagination?: ShlinkPaginator; // Is only optional in old Shlink versions
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ShlinkVisitsParams {
|
export interface ShlinkVisitsParams {
|
||||||
|
|
|
@ -68,7 +68,6 @@ const determineHeight = (isBarChart: boolean, labels: string[]): number | undefi
|
||||||
return isBarChart && labels.length > 20 ? labels.length * 8 : undefined;
|
return isBarChart && labels.length > 20 ? labels.length * 8 : undefined;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* eslint-disable react/prop-types */
|
|
||||||
const renderPieChartLegend = ({ config }: Chart) => {
|
const renderPieChartLegend = ({ config }: Chart) => {
|
||||||
const { labels = [], datasets = [] } = config.data ?? {};
|
const { labels = [], datasets = [] } = config.data ?? {};
|
||||||
const { defaultColor } = config.options ?? {} as any;
|
const { defaultColor } = config.options ?? {} as any;
|
||||||
|
@ -88,7 +87,6 @@ const renderPieChartLegend = ({ config }: Chart) => {
|
||||||
</ul>
|
</ul>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
/* eslint-enable react/prop-types */
|
|
||||||
|
|
||||||
const chartElementAtEvent = (onClick?: (label: string) => void) => ([ chart ]: [{ _index: number; _chart: Chart }]) => {
|
const chartElementAtEvent = (onClick?: (label: string) => void) => ([ chart ]: [{ _index: number; _chart: Chart }]) => {
|
||||||
if (!onClick || !chart) {
|
if (!onClick || !chart) {
|
||||||
|
|
Loading…
Reference in a new issue