Add yet-another-react-lightbox package and update .gitignore to exclude node_modules

This commit is contained in:
IGNY8 VPS (Salman)
2025-11-12 18:50:30 +00:00
parent bd2a5570a9
commit c92f4a5edd
9304 changed files with 29 additions and 2008667 deletions

View File

@@ -1,20 +0,0 @@
name: Mark stale issues and pull requests
on:
schedule:
- cron: '21 14 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v9
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-issue-label: 'no-issue-activity'
stale-pr-label: 'no-pr-activity'
exempt-issue-labels: 'bug,high-priority'
operations-per-run: 100

View File

@@ -1,21 +0,0 @@
The MIT License (MIT)
Copyright (c) 2018 ApexCharts
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.

View File

@@ -1,171 +0,0 @@
<p align="center"><img src="https://apexcharts.com/media/react-apexcharts.png"></p>
<p align="center">
<a href="https://github.com/apexcharts/react-apexcharts/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-brightgreen.svg" alt="License"></a>
<a href="https://travis-ci.com/apexcharts/react-apexcharts"><img src="https://api.travis-ci.com/apexcharts/react-apexcharts.svg?branch=master" alt="build" /></a>
<a href="https://www.npmjs.com/package/react-apexcharts"><img src="https://img.shields.io/npm/v/react-apexcharts.svg" alt="ver"></a>
</p>
<p align="center">
<a href="https://twitter.com/intent/tweet?text=React-ApexCharts%20A%20React.js%20Chart%20library%20built%20on%20ApexCharts.js&url=https://www.apexcharts.com&hashtags=javascript,charts,react.js,react,apexcharts"><img src="https://img.shields.io/twitter/url/http/shields.io.svg?style=social"> </a>
</p>
<p align="center">React.js wrapper for <a href="https://github.com/apexcharts/apexcharts.js">ApexCharts</a> to build interactive visualizations in react.</p>
<p align="center"><a href="https://apexcharts.com/react-chart-demos/"><img src="https://apexcharts.com/media/apexcharts-banner.png"></a></p>
## Download and Installation
##### Installing via npm
```bash
npm install react-apexcharts apexcharts
```
## Usage
```js
import Chart from 'react-apexcharts'
```
To create a basic bar chart with minimal configuration, write as follows:
```javascript
class App extends Component {
constructor(props) {
super(props);
this.state = {
options: {
chart: {
id: 'apexchart-example'
},
xaxis: {
categories: [1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999]
}
},
series: [{
name: 'series-1',
data: [30, 40, 35, 50, 49, 60, 70, 91, 125]
}]
}
}
render() {
return (
<Chart options={this.state.options} series={this.state.series} type="bar" width={500} height={320} />
)
}
}
```
This will render the following chart
<p align="center"><a href="https://apexcharts.com/javascript-chart-demos/column-charts/"><img src="https://apexcharts.com/media/first-bar-chart.svg"></a></p>
### How do I update the chart?
Simple! Just change the `series` or any `option` and it will automatically re-render the chart.
<p align="center"><a href="https://codesandbox.io/s/mzzq3yqjqj"><img src="https://apexcharts.com/media/react-chart-updation.gif"></a></p>
View this example on <a href="https://codesandbox.io/s/mzzq3yqjqj">codesandbox</a>
**Important:** While updating the options, make sure to update the outermost property even when you need to update the nested property.
✅ Do this
```javascript
this.setState({
options: {
...this.state.options,
xaxis: {
...this.state.options.xaxis,
categories: ['X1', 'X2', 'X3']
}
}
})
```
❌ Not this
```javascript
this.setState({
options.xaxis.categories: ['X1', 'X2', 'X3']
})
```
## Props
| Prop | Type | Description |
| ------------- |-------------| -----|
| **series** | `Array` | The series is a set of data. To know more about the format of the data, checkout [Series docs](https://apexcharts.com/docs/series/) on the website. |
| **type** | `String` | `line`, `area`, `bar`, `pie`, `donut`, `scatter`, `bubble`, `heatmap`, `radialBar` |
| **width** | `Number or String` | Possible values for width can be `100%`, `400px` or `400` (by default is `100%`) |
| **height** | `Number or String` | Possible values for height can be `100%`, `300px` or `300` (by default is `auto`) |
| **options** | `Object` | The configuration object, see options on [API (Reference)](https://apexcharts.com/docs/options/chart/type/) |
## How to call methods of ApexCharts programmatically?
Sometimes, you may want to call other methods of the core ApexCharts library, and you can do so on `ApexCharts` global variable directly
Example
```js
ApexCharts.exec('reactchart-example', 'updateSeries', [{
data: [40, 55, 65, 11, 23, 44, 54, 33]
}])
```
More info on the `.exec()` method can be found <a href="https://apexcharts.com/docs/methods/#exec">here</a>
All other methods of ApexCharts can be called this way
## What's included
The repository includes the following files and directories.
```
react-apexcharts/
├── dist/
│ ├── react-apexcharts.min.js
│ └── react-apexcharts.js
└── example/
│ ├── src/
│ ├── public/
│ ├── package.json
│ └── README.md
└── src/
└── react-apexcharts.jsx
```
## Development
#### Install dependencies
```bash
npm install
```
## Running the example
Basic example including update is included to show how to get started using ApexCharts with React easily.
To run the examples,
```bash
cd example
npm install
npm run start
```
#### Bundling
##### To build for Development
```bash
npm run dev-build
```
##### To build for Production
```bash
npm run build
```
## License
React-ApexCharts is released under MIT license. You are free to use, modify and distribute this software, as long as the copyright header is left intact.

View File

@@ -1,33 +0,0 @@
/// <reference types="react"/>
import { ApexOptions } from "apexcharts";
import React from "react";
/**
* Basic type definitions from https://apexcharts.com/docs/react-charts/#props
*/
declare module "react-apexcharts" {
export interface Props {
type?:
| "line"
| "area"
| "bar"
| "pie"
| "donut"
| "radialBar"
| "scatter"
| "bubble"
| "heatmap"
| "candlestick"
| "boxPlot"
| "radar"
| "polarArea"
| "rangeBar"
| "rangeArea"
| "treemap";
series?: ApexOptions["series"];
width?: string | number;
height?: string | number;
options?: ApexOptions;
[key: string]: any;
}
export default class ReactApexChart extends React.Component<Props> {}
}

View File

@@ -1 +0,0 @@
var ReactApexChart=function(e,r,t){"use strict";function n(e,r,t){return(r=function(e){var r=function(e,r){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,r||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===r?String:Number)(e)}(e,"string");return"symbol"==typeof r?r:r+""}(r))in e?Object.defineProperty(e,r,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[r]=t,e}function o(){return o=Object.assign?Object.assign.bind():function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var n in t)({}).hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e},o.apply(null,arguments)}function i(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function u(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?i(Object(t),!0).forEach((function(r){n(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):i(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}var f=["type","width","height","series","options"];function s(e,r){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:new WeakSet;if(e===r)return!0;if("object"!==c(e)||null===e||"object"!==c(r)||null===r)return!1;if(t.has(e)||t.has(r))return!0;t.add(e),t.add(r);var n=Object.keys(e),o=Object.keys(r);if(n.length!==o.length)return!1;for(var i=0,u=n;i<u.length;i++){var f=u[i];if(!o.includes(f)||!s(e[f],r[f],t))return!1}return!0}function a(t){var i=t.type,p=void 0===i?"line":i,l=t.width,y=void 0===l?"100%":l,b=t.height,h=void 0===b?"auto":b,v=t.series,O=t.options,d=function(e,r){if(null==e)return{};var t,n,o=function(e,r){if(null==e)return{};var t={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(r.includes(n))continue;t[n]=e[n]}return t}(e,r);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)t=i[n],r.includes(t)||{}.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}(t,f),g=e.useRef(null),j=e.useRef(null),m=e.useRef();e.useEffect((function(){m.current=O;var e=g.current;return j.current=new r(e,E()),j.current.render(),function(){j.current&&"function"==typeof j.current.destroy&&j.current.destroy()}}),[]),e.useEffect((function(){var e=!s(j.current.w.config.series,v),r=!s(m.current,O)||h!==j.current.opts.chart.height||y!==j.current.opts.chart.width;(e||r)&&(e?r?j.current.updateOptions(E()):j.current.updateSeries(v):j.current.updateOptions(E())),m.current=O}),[O,v,h,y]);var w,P,S,E=function(){return k(O,{chart:{type:p,height:h,width:y},series:v})},R=function(e){return e&&"object"===c(e)&&!Array.isArray(e)},k=function(e,r){var t=u({},e);return R(e)&&R(r)&&Object.keys(r).forEach((function(o){R(r[o])&&o in e?t[o]=k(e[o],r[o]):Object.assign(t,n({},o,r[o]))})),t},T=(w=d,P=Object.keys(a.propTypes),S=u({},w),P.forEach((function(e){delete S[e]})),S);return e.createElement("div",o({ref:g},T))}return a.propTypes={type:t.string.isRequired,series:t.array.isRequired,options:t.object.isRequired,width:t.oneOfType([t.string,t.number]),height:t.oneOfType([t.string,t.number])},a}(React,ApexCharts,PropTypes);

File diff suppressed because one or more lines are too long

View File

@@ -1,59 +0,0 @@
{
"name": "react-apexcharts",
"version": "1.7.0",
"description": "React.js wrapper for ApexCharts",
"main": "dist/react-apexcharts.min.js",
"types": "types/react-apexcharts.d.ts",
"scripts": {
"build": "concurrently \"rollup -c rollup.config.js\" \"gulp\"",
"dev-build": "concurrently \"rollup -c rollup.config.js\" \"gulp devBuild\"",
"test": "jest"
},
"keywords": [
"react-charts",
"react",
"charts",
"graphs",
"apexcharts",
"data-visualization"
],
"author": {
"name": "Juned Chhipa",
"email": "juned.chhipa@gmail.com"
},
"bugs": {
"url": "https://github.com/apexcharts/react-apexcharts/issues"
},
"license": "MIT",
"dependencies": {
"prop-types": "^15.8.1"
},
"peerDependencies": {
"apexcharts": ">=4.0.0",
"react": ">=0.13"
},
"devDependencies": {
"@babel/core": "^7.25.8",
"@babel/plugin-proposal-object-rest-spread": "^7.20.7",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@rollup/plugin-babel": "^6.0.4",
"@rollup/plugin-node-resolve": "^15.3.0",
"@rollup/plugin-terser": "^0.4.4",
"@types/react": "^18.3.11",
"concurrently": "^9.0.1",
"eslint": "^9.12.0",
"eslint-plugin-react": "^7.37.1",
"gulp": "^5.0.0",
"gulp-babel": "^8.0.0",
"gulp-concat": "^2.6.1",
"gulp-uglify": "^3.0.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react-test-renderer": "^18.3.1",
"rollup": "4.24.0",
"rollup-plugin-postcss": "^4.0.2"
}
}

View File

@@ -1,33 +0,0 @@
/// <reference types="react"/>
import { ApexOptions } from "apexcharts";
import React from "react";
/**
* Basic type definitions from https://apexcharts.com/docs/react-charts/#props
*/
declare module "react-apexcharts" {
export interface Props {
type?:
| "line"
| "area"
| "bar"
| "pie"
| "donut"
| "radialBar"
| "scatter"
| "bubble"
| "heatmap"
| "candlestick"
| "boxPlot"
| "radar"
| "polarArea"
| "rangeBar"
| "rangeArea"
| "treemap";
series?: ApexOptions["series"];
width?: string | number;
height?: string | number;
options?: ApexOptions;
[key: string]: any;
}
export default class ReactApexChart extends React.Component<Props> {}
}