Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

plutchik-reactjs-components

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

plutchik-reactjs-components - npm Package Compare versions

Comparing version 1.2.2 to 1.2.3

10

dist/cjs/charts.d.ts

@@ -27,7 +27,7 @@ import React from 'react';

get value(): number;
onWheel(event: any): void;
onBarClick(event: any): void;
onPointerMouseDown(event: any): void;
onMouseLeave(event: any): void;
onMouseMove(event: any): void;
private onWheel;
private onBarClick;
private onPointerMouseDown;
private onMouseLeave;
private onMouseMove;
render(): React.ReactNode;

@@ -34,0 +34,0 @@ }

import Flower from './flower';
import Formula from './formula';
import { Charts, Chart } from './charts';
import Toasts, { Toast, ToastType } from './toast';
import Toaster, { ToastType } from './toast';
import { Emotion, ComplexEmotion, EmotionVector } from './types';

@@ -9,2 +9,2 @@ import { IEmotionVector } from './types';

import './index.css';
export { IEmotionVector, Emotion, ComplexEmotion, EmotionVector, Flower, Formula, Charts, Chart, Pending, Toast, Toasts, ToastType, };
export { IEmotionVector, Emotion, ComplexEmotion, EmotionVector, Flower, Formula, Charts, Chart, Pending, Toaster, ToastType, };
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ToastType = exports.Toasts = exports.Toast = exports.Pending = exports.Chart = exports.Charts = exports.Formula = exports.Flower = exports.EmotionVector = exports.ComplexEmotion = exports.Emotion = void 0;
exports.ToastType = exports.Toaster = exports.Pending = exports.Chart = exports.Charts = exports.Formula = exports.Flower = exports.EmotionVector = exports.ComplexEmotion = exports.Emotion = void 0;
const tslib_1 = require("tslib");

@@ -13,4 +13,3 @@ const flower_1 = tslib_1.__importDefault(require("./flower"));

const toast_1 = tslib_1.__importStar(require("./toast"));
exports.Toasts = toast_1.default;
Object.defineProperty(exports, "Toast", { enumerable: true, get: function () { return toast_1.Toast; } });
exports.Toaster = toast_1.default;
Object.defineProperty(exports, "ToastType", { enumerable: true, get: function () { return toast_1.ToastType; } });

@@ -17,0 +16,0 @@ const types_1 = require("./types");

import React from 'react';
import './pending.css';
/** Pending component's properties interface*/
export interface IPendingProps {
}
/** Pending component's state interface */
export interface IPendingState {
/** Internal counter of the use*/
useCount: number;
}
/**Pending ReactJS component class
*
* Pending control shows to user that internal process is to be countinued and user's input is unaccessable. Pending component has two methods incUse and decUse which increase or decrease internal count of use. If internal count of use is equal zero then component hides any its visible elements. If the internal count is positive then Pending control cover all accessable to it area of page from user input and shows the animation with plutchik wheel */
export default class Pending extends React.Component<IPendingProps, IPendingState> {
state: IPendingState;
/** Increase use counter. If internal counter of useness is more zero, then pending control is visible
*
* No parameters
*/
incUse(): void;
/** Decrease internal use counter. If internal counter of useness is equal zero, then pending control is invisible
*
* No parameters
*/
decUse(): void;
render(): React.ReactNode;
}

@@ -7,2 +7,5 @@ "use strict";

const types_1 = require("./types");
/**Pending ReactJS component class
*
* Pending control shows to user that internal process is to be countinued and user's input is unaccessable. Pending component has two methods incUse and decUse which increase or decrease internal count of use. If internal count of use is equal zero then component hides any its visible elements. If the internal count is positive then Pending control cover all accessable to it area of page from user input and shows the animation with plutchik wheel */
class Pending extends react_1.default.Component {

@@ -15,2 +18,6 @@ constructor() {

}
/** Increase use counter. If internal counter of useness is more zero, then pending control is visible
*
* No parameters
*/
incUse() {

@@ -21,2 +28,6 @@ const nState = this.state;

}
/** Decrease internal use counter. If internal counter of useness is equal zero, then pending control is invisible
*
* No parameters
*/
decUse() {

@@ -23,0 +34,0 @@ const nState = this.state;

import React from 'react';
import './toast.css';
type ToastCounter = number;
export interface IToastsProps {
/** ToastUID is type of unique identificator of the toast. It's used in events referenced with Toasts */
type ToastUID = number;
/** Properties of ReactJS component Toaster */
export interface IToasterProps {
/** The count of places to arrange the toasts. This property is the count of toasts which are visible simultaneously*/
placesCount: number;
}
/**Interface for new toast creation */
interface IToast {
/** One of three types: info, warning, or error*/
type: ToastType;
/**Reserved for future use */
code?: number;
/**Main message of toast. It's always visible if the toast is visible */
message: string;
/**Extra message. If description is defined then Toast has ∴ button. User can see the description if ∴ button clicked by user. */
description?: string;
/**Count of seconds when the toast will be dissapeared without the user interaction. If autohide is undefined and the type of Toast is info, then Toaster set the 3 seconds to autohide as default */
autohide?: number;
/**If this parameter is set true then the Toast won't be deleted from Toaster on hide event. It will be marked as shown and will be saved in the Toaster for future use */
saveInHistory?: boolean;
/**If Toaster has at least one not shown modal Toast then Toaster covers all accessible area and prohibit interaction with other elements on page. Use modal parameter if you want stop user interaction while user reads the message and close the Toast */
modal?: boolean;
}
/** Added extra properties for queue in Toaster */
interface IToastExtProps extends IToast {
shown: boolean;
uid: ToastCounter;
uid: ToastUID;
}
export interface IToastsState {
export interface IToasterState {
toasts: Array<IToastExtProps>;

@@ -28,12 +40,12 @@ }

}
export default class Toasts extends React.Component<IToastsProps, IToastsState> {
export default class Toaster extends React.Component<IToasterProps, IToasterState> {
private toastCounter;
state: IToastsState;
state: IToasterState;
addToast(toast: IToast): void;
onHide(uidToast: ToastCounter): void;
onHide(uidToast: ToastUID): void;
render(): React.ReactNode;
}
export interface IToastProps extends IToast {
onHide?: (uid: ToastCounter) => void;
uid: ToastCounter;
onHide?: (uid: ToastUID) => void;
uid: ToastUID;
}

@@ -40,0 +52,0 @@ export interface IToastState {

@@ -13,3 +13,3 @@ "use strict";

})(ToastType || (exports.ToastType = ToastType = {}));
class Toasts extends react_1.default.Component {
class Toaster extends react_1.default.Component {
constructor() {

@@ -60,3 +60,3 @@ super(...arguments);

}
exports.default = Toasts;
exports.default = Toaster;
class Toast extends react_1.default.Component {

@@ -63,0 +63,0 @@ constructor() {

@@ -0,1 +1,2 @@

/**List of emotions by Plutchik */
export declare enum Emotion {

@@ -11,2 +12,3 @@ joy = "joy",

}
/**List of complex emotions */
export declare enum ComplexEmotion {

@@ -40,2 +42,3 @@ love = "love",

export type ComplexEmotionType = keyof typeof ComplexEmotion;
/**Emotional vector interface*/
export interface IEmotionVector {

@@ -51,2 +54,6 @@ joy: number;

}
/**
* Emotional vector class can add vectors and scalar multiple
* @constructor dkjd
*/
export declare class EmotionVector implements IEmotionVector {

@@ -61,5 +68,14 @@ joy: number;

anticipation: number;
/**
* Creates new instance of emotional vector class
*
* @param [av] - IEmotionVector structure
*/
constructor(ev?: IEmotionVector);
/**Scalar multiplication of the emotional vector
*
* @a scalar number to mult every coord of vector
*/
mult(a: number): void;
add(av: IEmotionVector): void;
}
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EmotionVector = exports.ComplexEmotion = exports.Emotion = void 0;
/**List of emotions by Plutchik */
var Emotion;

@@ -15,2 +16,3 @@ (function (Emotion) {

})(Emotion || (exports.Emotion = Emotion = {}));
/**List of complex emotions */
var ComplexEmotion;

@@ -43,3 +45,12 @@ (function (ComplexEmotion) {

})(ComplexEmotion || (exports.ComplexEmotion = ComplexEmotion = {}));
/**
* Emotional vector class can add vectors and scalar multiple
* @constructor dkjd
*/
class EmotionVector {
/**
* Creates new instance of emotional vector class
*
* @param [av] - IEmotionVector structure
*/
constructor(ev) {

@@ -57,2 +68,6 @@ this.joy = 0;

}
/**Scalar multiplication of the emotional vector
*
* @a scalar number to mult every coord of vector
*/
mult(a) {

@@ -59,0 +74,0 @@ const v = Object.entries(this);

@@ -27,7 +27,7 @@ import React from 'react';

get value(): number;
onWheel(event: any): void;
onBarClick(event: any): void;
onPointerMouseDown(event: any): void;
onMouseLeave(event: any): void;
onMouseMove(event: any): void;
private onWheel;
private onBarClick;
private onPointerMouseDown;
private onMouseLeave;
private onMouseMove;
render(): React.ReactNode;

@@ -34,0 +34,0 @@ }

import Flower from './flower';
import Formula from './formula';
import { Charts, Chart } from './charts';
import Toasts, { Toast, ToastType } from './toast';
import Toaster, { ToastType } from './toast';
import { Emotion, ComplexEmotion, EmotionVector } from './types';

@@ -9,2 +9,2 @@ import { IEmotionVector } from './types';

import './index.css';
export { IEmotionVector, Emotion, ComplexEmotion, EmotionVector, Flower, Formula, Charts, Chart, Pending, Toast, Toasts, ToastType, };
export { IEmotionVector, Emotion, ComplexEmotion, EmotionVector, Flower, Formula, Charts, Chart, Pending, Toaster, ToastType, };
import Flower from './flower';
import Formula from './formula';
import { Charts, Chart } from './charts';
import Toasts, { Toast, ToastType } from './toast';
import Toaster, { ToastType } from './toast';
import { Emotion, ComplexEmotion, EmotionVector } from './types';
import Pending from './pending';
import './index.css';
export { Emotion, ComplexEmotion, EmotionVector, Flower, Formula, Charts, Chart, Pending, Toast, Toasts, ToastType, };
export { Emotion, ComplexEmotion, EmotionVector, Flower, Formula, Charts, Chart, Pending, Toaster, ToastType, };
import React from 'react';
import './pending.css';
/** Pending component's properties interface*/
export interface IPendingProps {
}
/** Pending component's state interface */
export interface IPendingState {
/** Internal counter of the use*/
useCount: number;
}
/**Pending ReactJS component class
*
* Pending control shows to user that internal process is to be countinued and user's input is unaccessable. Pending component has two methods incUse and decUse which increase or decrease internal count of use. If internal count of use is equal zero then component hides any its visible elements. If the internal count is positive then Pending control cover all accessable to it area of page from user input and shows the animation with plutchik wheel */
export default class Pending extends React.Component<IPendingProps, IPendingState> {
state: IPendingState;
/** Increase use counter. If internal counter of useness is more zero, then pending control is visible
*
* No parameters
*/
incUse(): void;
/** Decrease internal use counter. If internal counter of useness is equal zero, then pending control is invisible
*
* No parameters
*/
decUse(): void;
render(): React.ReactNode;
}
import React from 'react';
import './pending.css';
import { Emotion } from './types';
/**Pending ReactJS component class
*
* Pending control shows to user that internal process is to be countinued and user's input is unaccessable. Pending component has two methods incUse and decUse which increase or decrease internal count of use. If internal count of use is equal zero then component hides any its visible elements. If the internal count is positive then Pending control cover all accessable to it area of page from user input and shows the animation with plutchik wheel */
export default class Pending extends React.Component {

@@ -11,2 +14,6 @@ constructor() {

}
/** Increase use counter. If internal counter of useness is more zero, then pending control is visible
*
* No parameters
*/
incUse() {

@@ -17,2 +24,6 @@ const nState = this.state;

}
/** Decrease internal use counter. If internal counter of useness is equal zero, then pending control is invisible
*
* No parameters
*/
decUse() {

@@ -19,0 +30,0 @@ const nState = this.state;

import React from 'react';
import './toast.css';
type ToastCounter = number;
export interface IToastsProps {
/** ToastUID is type of unique identificator of the toast. It's used in events referenced with Toasts */
type ToastUID = number;
/** Properties of ReactJS component Toaster */
export interface IToasterProps {
/** The count of places to arrange the toasts. This property is the count of toasts which are visible simultaneously*/
placesCount: number;
}
/**Interface for new toast creation */
interface IToast {
/** One of three types: info, warning, or error*/
type: ToastType;
/**Reserved for future use */
code?: number;
/**Main message of toast. It's always visible if the toast is visible */
message: string;
/**Extra message. If description is defined then Toast has ∴ button. User can see the description if ∴ button clicked by user. */
description?: string;
/**Count of seconds when the toast will be dissapeared without the user interaction. If autohide is undefined and the type of Toast is info, then Toaster set the 3 seconds to autohide as default */
autohide?: number;
/**If this parameter is set true then the Toast won't be deleted from Toaster on hide event. It will be marked as shown and will be saved in the Toaster for future use */
saveInHistory?: boolean;
/**If Toaster has at least one not shown modal Toast then Toaster covers all accessible area and prohibit interaction with other elements on page. Use modal parameter if you want stop user interaction while user reads the message and close the Toast */
modal?: boolean;
}
/** Added extra properties for queue in Toaster */
interface IToastExtProps extends IToast {
shown: boolean;
uid: ToastCounter;
uid: ToastUID;
}
export interface IToastsState {
export interface IToasterState {
toasts: Array<IToastExtProps>;

@@ -28,12 +40,12 @@ }

}
export default class Toasts extends React.Component<IToastsProps, IToastsState> {
export default class Toaster extends React.Component<IToasterProps, IToasterState> {
private toastCounter;
state: IToastsState;
state: IToasterState;
addToast(toast: IToast): void;
onHide(uidToast: ToastCounter): void;
onHide(uidToast: ToastUID): void;
render(): React.ReactNode;
}
export interface IToastProps extends IToast {
onHide?: (uid: ToastCounter) => void;
uid: ToastCounter;
onHide?: (uid: ToastUID) => void;
uid: ToastUID;
}

@@ -40,0 +52,0 @@ export interface IToastState {

@@ -9,3 +9,3 @@ import React from 'react';

})(ToastType || (ToastType = {}));
export default class Toasts extends React.Component {
export default class Toaster extends React.Component {
constructor() {

@@ -12,0 +12,0 @@ super(...arguments);

@@ -0,1 +1,2 @@

/**List of emotions by Plutchik */
export declare enum Emotion {

@@ -11,2 +12,3 @@ joy = "joy",

}
/**List of complex emotions */
export declare enum ComplexEmotion {

@@ -40,2 +42,3 @@ love = "love",

export type ComplexEmotionType = keyof typeof ComplexEmotion;
/**Emotional vector interface*/
export interface IEmotionVector {

@@ -51,2 +54,6 @@ joy: number;

}
/**
* Emotional vector class can add vectors and scalar multiple
* @constructor dkjd
*/
export declare class EmotionVector implements IEmotionVector {

@@ -61,5 +68,14 @@ joy: number;

anticipation: number;
/**
* Creates new instance of emotional vector class
*
* @param [av] - IEmotionVector structure
*/
constructor(ev?: IEmotionVector);
/**Scalar multiplication of the emotional vector
*
* @a scalar number to mult every coord of vector
*/
mult(a: number): void;
add(av: IEmotionVector): void;
}

@@ -0,1 +1,2 @@

/**List of emotions by Plutchik */
export var Emotion;

@@ -12,2 +13,3 @@ (function (Emotion) {

})(Emotion || (Emotion = {}));
/**List of complex emotions */
export var ComplexEmotion;

@@ -40,3 +42,12 @@ (function (ComplexEmotion) {

})(ComplexEmotion || (ComplexEmotion = {}));
/**
* Emotional vector class can add vectors and scalar multiple
* @constructor dkjd
*/
export class EmotionVector {
/**
* Creates new instance of emotional vector class
*
* @param [av] - IEmotionVector structure
*/
constructor(ev) {

@@ -54,2 +65,6 @@ this.joy = 0;

}
/**Scalar multiplication of the emotional vector
*
* @a scalar number to mult every coord of vector
*/
mult(a) {

@@ -56,0 +71,0 @@ const v = Object.entries(this);

{
"name": "plutchik-reactjs-components",
"version": "1.2.2",
"version": "1.2.3",
"description": "Plutchik emotional azimuth",

@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc