pixel-react 1.1.2 → 1.1.4
Sign up to get free protection for your applications and to get access to all the features.
- package/.yarn/install-state.gz +0 -0
- package/lib/components/AddButton/AddButton.d.ts +5 -0
- package/lib/components/AddButton/AddButton.stories.d.ts +6 -0
- package/lib/components/AddButton/index.d.ts +1 -0
- package/lib/components/AddButton/types.d.ts +4 -0
- package/lib/components/AppHeader/types.d.ts +14 -10
- package/lib/components/Paper/Paper.d.ts +4 -0
- package/lib/components/Paper/Paper.stories.d.ts +11 -0
- package/lib/components/Paper/index.d.ts +1 -0
- package/lib/components/Paper/types.d.ts +15 -0
- package/lib/components/VariableInput/VariableInput.d.ts +4 -0
- package/lib/components/VariableInput/VariableInput.stories.d.ts +6 -0
- package/lib/components/VariableInput/index.d.ts +1 -0
- package/lib/components/VariableInput/types.d.ts +53 -0
- package/lib/index.d.ts +129 -11
- package/lib/index.esm.js +6934 -977
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +6943 -976
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/utils/ffID/ffID.stories.d.ts +1 -1
- package/lib/utils/ffID/ffid.d.ts +1 -2
- package/lib/utils/findAndInsert/findAndInsert.d.ts +7 -0
- package/lib/utils/findAndInsert/findAndInsert.stories.d.ts +7 -0
- package/lib/utils/getEncryptedData/getEncryptedData.d.ts +1 -2
- package/package.json +1 -1
- package/src/assets/Themes/BaseTheme.scss +2 -0
- package/src/assets/Themes/DarkTheme.scss +2 -0
- package/src/components/AllProjectsDropdown/AllProjectsDropdown.tsx +1 -1
- package/src/components/AppHeader/AppHeader.stories.tsx +20 -10
- package/src/components/AppHeader/AppHeader.tsx +24 -17
- package/src/components/AppHeader/types.ts +17 -13
- package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.tsx +1 -1
- package/src/components/Paper/Paper.scss +13 -0
- package/src/components/Paper/Paper.stories.tsx +77 -0
- package/src/components/Paper/Paper.tsx +14 -0
- package/src/components/Paper/index.ts +1 -0
- package/src/components/Paper/types.ts +19 -0
- package/src/components/Select/components/Dropdown/Dropdown.tsx +1 -1
- package/src/components/VariableInput/VariableInput.scss +128 -0
- package/src/components/VariableInput/VariableInput.stories.tsx +32 -0
- package/src/components/VariableInput/VariableInput.tsx +352 -0
- package/src/components/VariableInput/index.ts +1 -0
- package/src/components/VariableInput/types.ts +56 -0
- package/src/index.ts +27 -2
- package/src/utils/ffID/ffID.stories.tsx +1 -1
- package/src/utils/ffID/ffid.ts +1 -3
- package/src/utils/getEncryptedData/getEncryptedData.stories.tsx +3 -3
- package/src/utils/getEncryptedData/getEncryptedData.ts +1 -3
- /package/src/utils/{find → findAndInsert}/findAndInsert.stories.tsx +0 -0
- /package/src/utils/{find → findAndInsert}/findAndInsert.ts +0 -0
package/.yarn/install-state.gz
CHANGED
Binary file
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './AddButton';
|
@@ -1,26 +1,30 @@
|
|
1
1
|
import { ReactNode } from 'react';
|
2
2
|
export interface AppHeaderProps {
|
3
3
|
logoIconName: string;
|
4
|
-
|
5
|
-
|
4
|
+
leftContent?: ReactNode;
|
5
|
+
rightContent?: ReactNode;
|
6
|
+
projectsList?: string[];
|
6
7
|
appHeaderMenuItems: appHeaderMenuItemProps[];
|
7
|
-
appHeaderHiddenMenuItems
|
8
|
+
appHeaderHiddenMenuItems?: string[];
|
8
9
|
selectedMenu: string;
|
9
|
-
selectedSubMenu
|
10
|
-
selectedQuickMenu
|
10
|
+
selectedSubMenu?: string;
|
11
|
+
selectedQuickMenu?: string;
|
11
12
|
onMenuClick?: (text: any) => void;
|
12
13
|
onSubMenuClick?: (text: any) => void;
|
13
14
|
onQuickMenuClick?: (text: any) => void;
|
14
15
|
}
|
15
16
|
export interface appHeaderMenuItemProps {
|
16
|
-
|
17
|
-
|
17
|
+
menuLabel: string;
|
18
|
+
menuName?: string;
|
19
|
+
subMenuItems?: appHeaderSubMenuItemProps[];
|
18
20
|
}
|
19
21
|
export interface appHeaderSubMenuItemProps {
|
20
|
-
|
21
|
-
|
22
|
+
subMenuLabel: string;
|
23
|
+
subMenuName?: string;
|
24
|
+
quickMenuItems?: appHeaderQuickMenuItemProps[];
|
22
25
|
}
|
23
26
|
export interface appHeaderQuickMenuItemProps {
|
24
|
-
|
27
|
+
quickMenuLabel?: string;
|
28
|
+
quickMenuName?: string;
|
25
29
|
quickMenuIconName: string;
|
26
30
|
}
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
2
|
+
import Paper from './Paper';
|
3
|
+
import './Paper.scss';
|
4
|
+
declare const meta: Meta<typeof Paper>;
|
5
|
+
type Story = StoryObj<typeof Paper>;
|
6
|
+
export declare const Default: Story;
|
7
|
+
export declare const PrimaryPaper: Story;
|
8
|
+
export declare const PaperWithLowShadow: Story;
|
9
|
+
export declare const PaperWithHighShadow: Story;
|
10
|
+
export declare const PaperWithRounded: Story;
|
11
|
+
export default meta;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './Paper';
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export interface PaperProps {
|
2
|
+
/**
|
3
|
+
* The content of the component.
|
4
|
+
*/
|
5
|
+
children?: React.ReactNode;
|
6
|
+
/**
|
7
|
+
* Override or extend the styles applied to the component.
|
8
|
+
*/
|
9
|
+
className?: string;
|
10
|
+
/**
|
11
|
+
* If `true`, rounded corners are Enabled.
|
12
|
+
* @default false
|
13
|
+
*/
|
14
|
+
rounded?: boolean;
|
15
|
+
}
|
@@ -0,0 +1,4 @@
|
|
1
|
+
import './VariableInput.scss';
|
2
|
+
import { VariableInputProps } from './types';
|
3
|
+
declare const VariableInput: ({ type, name, label, disabled, required, placeholder, value, error, className, onChange, onKeyDown, onBlur, onFocus, list, ...props }: VariableInputProps) => import("react/jsx-runtime").JSX.Element;
|
4
|
+
export default VariableInput;
|
@@ -0,0 +1 @@
|
|
1
|
+
export { default } from './VariableInput';
|
@@ -0,0 +1,53 @@
|
|
1
|
+
export interface VariableInputProps {
|
2
|
+
/**
|
3
|
+
* Name | name of the input field
|
4
|
+
*/
|
5
|
+
name: string;
|
6
|
+
/**
|
7
|
+
* Label | field label to be displayed
|
8
|
+
*/
|
9
|
+
label: string;
|
10
|
+
/**
|
11
|
+
* value | input field value
|
12
|
+
*/
|
13
|
+
value: string | null;
|
14
|
+
/**
|
15
|
+
* type to set color/style of the input field
|
16
|
+
*/
|
17
|
+
type: 'text' | 'password' | 'number' | 'email' | 'url' | 'time';
|
18
|
+
/**
|
19
|
+
* error | If true, error message will be displayed
|
20
|
+
*/
|
21
|
+
error?: boolean;
|
22
|
+
/**
|
23
|
+
* to disable the input field
|
24
|
+
*/
|
25
|
+
disabled?: boolean;
|
26
|
+
/**
|
27
|
+
* if true, input field will be mandatory
|
28
|
+
*/
|
29
|
+
required?: boolean;
|
30
|
+
/**
|
31
|
+
* placeholder for the input field
|
32
|
+
*/
|
33
|
+
placeholder?: string;
|
34
|
+
/**
|
35
|
+
* classnames to style the input field
|
36
|
+
*/
|
37
|
+
className?: string;
|
38
|
+
/**
|
39
|
+
* onChange, onKeyDown, onBlur, onFocus actions
|
40
|
+
*/
|
41
|
+
onChange?: (value: string) => void | undefined;
|
42
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
43
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
44
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
45
|
+
/**
|
46
|
+
* id to select the input field uniquely
|
47
|
+
*/
|
48
|
+
id?: string;
|
49
|
+
/**
|
50
|
+
* list of variables
|
51
|
+
*/
|
52
|
+
list?: string[];
|
53
|
+
}
|
package/lib/index.d.ts
CHANGED
@@ -1462,6 +1462,62 @@ declare const DragAndDrop: {
|
|
1462
1462
|
DNDUtilities: typeof DNDUtilities;
|
1463
1463
|
};
|
1464
1464
|
|
1465
|
+
interface VariableInputProps {
|
1466
|
+
/**
|
1467
|
+
* Name | name of the input field
|
1468
|
+
*/
|
1469
|
+
name: string;
|
1470
|
+
/**
|
1471
|
+
* Label | field label to be displayed
|
1472
|
+
*/
|
1473
|
+
label: string;
|
1474
|
+
/**
|
1475
|
+
* value | input field value
|
1476
|
+
*/
|
1477
|
+
value: string | null;
|
1478
|
+
/**
|
1479
|
+
* type to set color/style of the input field
|
1480
|
+
*/
|
1481
|
+
type: 'text' | 'password' | 'number' | 'email' | 'url' | 'time';
|
1482
|
+
/**
|
1483
|
+
* error | If true, error message will be displayed
|
1484
|
+
*/
|
1485
|
+
error?: boolean;
|
1486
|
+
/**
|
1487
|
+
* to disable the input field
|
1488
|
+
*/
|
1489
|
+
disabled?: boolean;
|
1490
|
+
/**
|
1491
|
+
* if true, input field will be mandatory
|
1492
|
+
*/
|
1493
|
+
required?: boolean;
|
1494
|
+
/**
|
1495
|
+
* placeholder for the input field
|
1496
|
+
*/
|
1497
|
+
placeholder?: string;
|
1498
|
+
/**
|
1499
|
+
* classnames to style the input field
|
1500
|
+
*/
|
1501
|
+
className?: string;
|
1502
|
+
/**
|
1503
|
+
* onChange, onKeyDown, onBlur, onFocus actions
|
1504
|
+
*/
|
1505
|
+
onChange?: (value: string) => void | undefined;
|
1506
|
+
onKeyDown?: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
1507
|
+
onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
1508
|
+
onFocus?: (event: React.FocusEvent<HTMLInputElement>) => void;
|
1509
|
+
/**
|
1510
|
+
* id to select the input field uniquely
|
1511
|
+
*/
|
1512
|
+
id?: string;
|
1513
|
+
/**
|
1514
|
+
* list of variables
|
1515
|
+
*/
|
1516
|
+
list?: string[];
|
1517
|
+
}
|
1518
|
+
|
1519
|
+
declare const VariableInput: ({ type, name, label, disabled, required, placeholder, value, error, className, onChange, onKeyDown, onBlur, onFocus, list, ...props }: VariableInputProps) => react_jsx_runtime.JSX.Element;
|
1520
|
+
|
1465
1521
|
declare const AllProjectsDropdown: () => react_jsx_runtime.JSX.Element;
|
1466
1522
|
|
1467
1523
|
interface PieChartProps {
|
@@ -1478,32 +1534,54 @@ declare const PieChart: React__default.FC<PieChartProps>;
|
|
1478
1534
|
|
1479
1535
|
interface AppHeaderProps {
|
1480
1536
|
logoIconName: string;
|
1481
|
-
|
1482
|
-
|
1537
|
+
leftContent?: ReactNode;
|
1538
|
+
rightContent?: ReactNode;
|
1539
|
+
projectsList?: string[];
|
1483
1540
|
appHeaderMenuItems: appHeaderMenuItemProps[];
|
1484
|
-
appHeaderHiddenMenuItems
|
1541
|
+
appHeaderHiddenMenuItems?: string[];
|
1485
1542
|
selectedMenu: string;
|
1486
|
-
selectedSubMenu
|
1487
|
-
selectedQuickMenu
|
1543
|
+
selectedSubMenu?: string;
|
1544
|
+
selectedQuickMenu?: string;
|
1488
1545
|
onMenuClick?: (text: any) => void;
|
1489
1546
|
onSubMenuClick?: (text: any) => void;
|
1490
1547
|
onQuickMenuClick?: (text: any) => void;
|
1491
1548
|
}
|
1492
1549
|
interface appHeaderMenuItemProps {
|
1493
|
-
|
1494
|
-
|
1550
|
+
menuLabel: string;
|
1551
|
+
menuName?: string;
|
1552
|
+
subMenuItems?: appHeaderSubMenuItemProps[];
|
1495
1553
|
}
|
1496
1554
|
interface appHeaderSubMenuItemProps {
|
1497
|
-
|
1498
|
-
|
1555
|
+
subMenuLabel: string;
|
1556
|
+
subMenuName?: string;
|
1557
|
+
quickMenuItems?: appHeaderQuickMenuItemProps[];
|
1499
1558
|
}
|
1500
1559
|
interface appHeaderQuickMenuItemProps {
|
1501
|
-
|
1560
|
+
quickMenuLabel?: string;
|
1561
|
+
quickMenuName?: string;
|
1502
1562
|
quickMenuIconName: string;
|
1503
1563
|
}
|
1504
1564
|
|
1505
1565
|
declare const AppHeader: React.FC<AppHeaderProps>;
|
1506
1566
|
|
1567
|
+
interface PaperProps {
|
1568
|
+
/**
|
1569
|
+
* The content of the component.
|
1570
|
+
*/
|
1571
|
+
children?: React.ReactNode;
|
1572
|
+
/**
|
1573
|
+
* Override or extend the styles applied to the component.
|
1574
|
+
*/
|
1575
|
+
className?: string;
|
1576
|
+
/**
|
1577
|
+
* If `true`, rounded corners are Enabled.
|
1578
|
+
* @default false
|
1579
|
+
*/
|
1580
|
+
rounded?: boolean;
|
1581
|
+
}
|
1582
|
+
|
1583
|
+
declare const Paper: ({ children, className, rounded }: PaperProps) => react_jsx_runtime.JSX.Element;
|
1584
|
+
|
1507
1585
|
type ChartItem = {
|
1508
1586
|
key: string;
|
1509
1587
|
value: number;
|
@@ -1575,4 +1653,44 @@ type valueType = File | string;
|
|
1575
1653
|
declare const getExtension: (value: valueType) => string | undefined;
|
1576
1654
|
declare const getExtensionWithPeriod: (value: valueType) => string;
|
1577
1655
|
|
1578
|
-
|
1656
|
+
type AnyObject$1 = {
|
1657
|
+
id: number;
|
1658
|
+
[key: string]: any;
|
1659
|
+
};
|
1660
|
+
declare function findAndInsert<T extends AnyObject$1>(data: T[], key: keyof T, targetId: number, newEntry: T, insertPosition: 'above' | 'below' | 'replace', childrenKey?: string): {
|
1661
|
+
updatedArray: T[];
|
1662
|
+
} | null;
|
1663
|
+
|
1664
|
+
declare const ffid: () => string;
|
1665
|
+
|
1666
|
+
type Callback$1 = (...args: any[]) => void;
|
1667
|
+
interface DebouncedFunction extends Function {
|
1668
|
+
cancel: () => void;
|
1669
|
+
}
|
1670
|
+
declare const debounce: (func: Callback$1, delay: number) => DebouncedFunction;
|
1671
|
+
|
1672
|
+
/**
|
1673
|
+
* Compare two arrays for equality.
|
1674
|
+
* This function checks if both arrays contain the same elements in the same order,
|
1675
|
+
* including nested structures.
|
1676
|
+
*
|
1677
|
+
* @param arr1 - The first array to compare.
|
1678
|
+
* @param arr2 - The second array to compare.
|
1679
|
+
* @returns - A boolean indicating if the arrays are equal.
|
1680
|
+
*/
|
1681
|
+
declare const compareArrays: (arr1: unknown[], arr2: unknown[]) => boolean;
|
1682
|
+
|
1683
|
+
type AnyObject = Record<string, unknown>;
|
1684
|
+
declare const compareObjects: (obj1: AnyObject | null, obj2: AnyObject | null) => boolean;
|
1685
|
+
|
1686
|
+
declare const getEncryptedData: (data: string, publicKey: string) => string | false;
|
1687
|
+
|
1688
|
+
type Callback = (...args: any[]) => void;
|
1689
|
+
interface ThrottledFunction extends Function {
|
1690
|
+
cancel: () => void;
|
1691
|
+
}
|
1692
|
+
declare const throttle: (func: Callback, limit: number) => ThrottledFunction;
|
1693
|
+
|
1694
|
+
declare const truncateText: (text: string, maxLength: number) => string;
|
1695
|
+
|
1696
|
+
export { Accordion, AddButton as AddResourceButton, AllProjectsDropdown, AppHeader, Button, Checkbox, Chip, Col, Container, DashboardDonutChart, CustomDatePicker as DatePicker, DonutChart, DragAndDrop, Drawer, ExpandableMenu, FileDropzone, Form, HighlightText, Icon, IconButton, Input, InputWithDropdown, MenuOption, MiniModal, Modal, MultiSelect, NlpInput as NLPInput, Paper, PieChart, RadialChart, RadioButton, RadioGroup, Recaptcha, Row, Search, Select, StateDropdown, StatusButton, Table, TableTree, Tabs, Textarea as TextArea, ThemeProvider, Toaster, Toggle, Tooltip, Typography, VariableInput, checkEmpty, compareArrays, compareObjects, debounce, ffid, findAndInsert, getEncryptedData, getExtension, getExtensionWithPeriod, throttle, truncateText, useTheme };
|