@secondstaxorg/sscomp 1.5.83 → 1.5.95

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. package/dist/index.es.js +130 -40
  2. package/dist/index.es.js.map +1 -1
  3. package/dist/index.js +1619 -1474
  4. package/dist/index.js.map +1 -1
  5. package/dist/index.min.js +128 -38
  6. package/dist/index.min.js.map +1 -1
  7. package/package.json +1 -1
  8. package/types/components/AppActionsTable/AppActionsTable.d.ts +1 -1
  9. package/types/components/AppFormsTable/AppFormsTable.d.ts +1 -1
  10. package/types/components/AppModulesTable/AppModulesTable.d.ts +1 -1
  11. package/types/components/CurrencyPairs/CurrencyPairsTable.d.ts +1 -1
  12. package/types/components/LPRequestTable/LPRequestTable.d.ts +1 -1
  13. package/types/components/SDataTable/helpers.d.ts +6 -0
  14. package/types/components/SDataTable/index.d.ts +1 -0
  15. package/types/components/SDataTable/style.d.ts +1 -0
  16. package/types/components/SDataTable/table.d.ts +4 -0
  17. package/types/components/SDataTable/type.d.ts +71 -0
  18. package/types/components/SystemConfigTable/SystemConfigTable.d.ts +1 -1
  19. package/types/components/TableAlternative/index.d.ts +7 -0
  20. package/types/components/TableAlternative/style.d.ts +1 -0
  21. package/types/components/TableAlternative/type.d.ts +11 -0
  22. package/types/components/TablePrimary/helpers.d.ts +1 -0
  23. package/types/components/TablePrimary/index.d.ts +7 -0
  24. package/types/components/TablePrimary/style.d.ts +2 -0
  25. package/types/components/TablePrimary/type.d.ts +11 -0
  26. package/types/components/UserRolesTable/UserRolesTable.d.ts +1 -1
  27. package/types/components/UsersTable/UsersTable.d.ts +1 -1
  28. package/types/components/index.d.ts +3 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@secondstaxorg/sscomp",
3
- "version": "1.5.83",
3
+ "version": "1.5.95",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/"
6
6
  },
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AppActionsProps } from "./type";
3
3
  /**
4
- * Table view of App Actions on Code Maintenance in LP Application
4
+ * SDataTable view of App Actions on Code Maintenance in LP Application
5
5
  */
6
6
  declare const AppActionsTable: (props: AppActionsProps) => JSX.Element;
7
7
  export default AppActionsTable;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AppFormsProps } from "./type";
3
3
  /**
4
- * Table view of App Actions on Code Maintenance in LP Application
4
+ * SDataTable view of App Actions on Code Maintenance in LP Application
5
5
  */
6
6
  declare const AppFormsTable: (props: AppFormsProps) => JSX.Element;
7
7
  export default AppFormsTable;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { AppModulesProps } from "./type";
3
3
  /**
4
- * Table view of App Modules in Code Maintenance in LP Application
4
+ * SDataTable view of App Modules in Code Maintenance in LP Application
5
5
  */
6
6
  declare const AppModulesTable: (props: AppModulesProps) => JSX.Element;
7
7
  export default AppModulesTable;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { CurrencyPairsProps } from "./type";
3
3
  /**
4
- * Table with a list of all currency pairs in the LP platform
4
+ * SDataTable with a list of all currency pairs in the LP platform
5
5
  */
6
6
  declare const CurrencyPairsTable: (props: CurrencyPairsProps) => JSX.Element;
7
7
  export default CurrencyPairsTable;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { RequestsProps } from "./type";
3
3
  /**
4
- * Table for displaying a history of LP requests in the LP app
4
+ * SDataTable for displaying a history of LP requests in the LP app
5
5
  */
6
6
  declare const LPRequestTable: (props: RequestsProps) => JSX.Element;
7
7
  export default LPRequestTable;
@@ -0,0 +1,6 @@
1
+ import { TableRow } from './type';
2
+ export declare function setHeader(arr: string): string;
3
+ export declare function getData(data: any, config: {
4
+ [key: string]: any;
5
+ }): Promise<any>;
6
+ export declare function sortData(data: TableRow[], sort: string, order: string): TableRow[];
@@ -0,0 +1 @@
1
+ export { default as SDatatable } from './table';
@@ -0,0 +1 @@
1
+ export declare const TableStyled: import("styled-components").StyledComponent<"table", any, {}, never>;
@@ -0,0 +1,4 @@
1
+ /// <reference types="react" />
2
+ import { TableProps } from "./type";
3
+ declare const Table: (props: TableProps) => JSX.Element;
4
+ export default Table;
@@ -0,0 +1,71 @@
1
+ /// <reference types="react" />
2
+ export interface TableProps {
3
+ title?: string;
4
+ data: TableRow[] | string;
5
+ columns?: TableColumn[];
6
+ loading?: boolean;
7
+ onRowClick?: (row: TableRow) => void;
8
+ onRowDoubleClick?: (row: TableRow) => void;
9
+ onRowContextMenu?: (row: TableRow) => void;
10
+ onRowMouseEnter?: (row: TableRow) => void;
11
+ onRowMouseLeave?: (row: TableRow) => void;
12
+ onRowMouseOver?: (row: TableRow) => void;
13
+ onRowMouseOut?: (row: TableRow) => void;
14
+ onRowMouseMove?: (row: TableRow) => void;
15
+ onRowExpand?: (row: TableRow) => void;
16
+ onRowCollapse?: (row: TableRow) => void;
17
+ /**
18
+ *
19
+ */
20
+ onColumnClick?: (column: TableColumn) => void;
21
+ onColumnDoubleClick?: (column: TableColumn) => void;
22
+ /**
23
+ *
24
+ */
25
+ onActionClick?: (action: TableAction) => void;
26
+ /**
27
+ * This is the component that you want to show to the user when the row is expanded
28
+ * @param TableRow the row that is being expanded
29
+ */
30
+ onRowExpandComponent?: (row: TableRow) => React.ReactElement<TableRow>;
31
+ actionOptions?: ActionOptions;
32
+ actionColumn?: boolean;
33
+ columnSort?: boolean;
34
+ config: {
35
+ [key: string]: any;
36
+ };
37
+ rowExpand?: boolean;
38
+ itemsPerPage?: number;
39
+ hasSearch?: boolean;
40
+ formatData?: (data: any) => any;
41
+ }
42
+ export interface ActionOptions {
43
+ edit: boolean;
44
+ delete: boolean;
45
+ add: boolean;
46
+ view: boolean;
47
+ custom: (row: TableRow) => void;
48
+ export: boolean;
49
+ }
50
+ export interface TableColumn {
51
+ title: string;
52
+ field: string;
53
+ type?: "text" | "number" | "date" | "datetime" | "time" | "checkbox" | "select" | "action";
54
+ format?: string;
55
+ width?: string;
56
+ align?: "left" | "center" | "right";
57
+ sortable?: boolean | Array<string>;
58
+ editable?: boolean;
59
+ options?: any[];
60
+ custom?: (row: any) => any;
61
+ render?: (row: any) => any;
62
+ }
63
+ export interface TableRow {
64
+ id: string | number;
65
+ [key: string]: any;
66
+ }
67
+ export interface TableAction {
68
+ title: string;
69
+ icon: string;
70
+ onClick: (row: TableRow) => void;
71
+ }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { SystemConfigProps } from "./type";
3
3
  /**
4
- * Table displaying the configurations of the system in the LP application
4
+ * SDataTable displaying the configurations of the system in the LP application
5
5
  */
6
6
  declare const SystemConfigTable: (props: SystemConfigProps) => JSX.Element;
7
7
  export default SystemConfigTable;
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ import { TableAlternativeProps } from "./type";
3
+ /**
4
+ * Alternative to the default SSX table component
5
+ */
6
+ declare const TableAlternative: React.ForwardRefExoticComponent<TableAlternativeProps & React.RefAttributes<HTMLTableElement>>;
7
+ export default TableAlternative;
@@ -0,0 +1 @@
1
+ export declare const TableContainer: import("styled-components").StyledComponent<"table", any, {}, never>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface TableAlternativeProps extends React.TableHTMLAttributes<HTMLTableElement> {
3
+ /**
4
+ * array of columns that should be displayed in the table head
5
+ * */
6
+ thead: string[];
7
+ /**
8
+ * &lt;tr&gt;&lt;td&gt; content that should go between the <tbody> tag of the table
9
+ * */
10
+ children: React.ReactNode;
11
+ }
@@ -0,0 +1 @@
1
+ export declare function moneyfy(number: number | bigint, currency: string): string;
@@ -0,0 +1,7 @@
1
+ /// <reference types="react" />
2
+ import { RequestsProps } from "./type";
3
+ /**
4
+ * Default SSX table component
5
+ */
6
+ declare const TablePrimary: (props: RequestsProps) => JSX.Element;
7
+ export default TablePrimary;
@@ -0,0 +1,2 @@
1
+ export declare const TableContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
2
+ export declare const Table: import("styled-components").StyledComponent<"table", any, {}, never>;
@@ -0,0 +1,11 @@
1
+ import React from "react";
2
+ export interface RequestsProps {
3
+ /**
4
+ * array of columns that should be displayed in the table head
5
+ * */
6
+ thead: string[];
7
+ /**
8
+ * &lt;tr&gt;&lt;td&gt; content that should go between the <tbody> tag of the table
9
+ * */
10
+ children: React.ReactNode;
11
+ }
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { UserRolesProps } from "./type";
3
3
  /**
4
- * Table listing the user roles that can be assigned to users in the LP application
4
+ * SDataTable listing the user roles that can be assigned to users in the LP application
5
5
  */
6
6
  declare const UserRolesTable: (props: UserRolesProps) => JSX.Element;
7
7
  export default UserRolesTable;
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { UserTableType } from "./type";
3
3
  /**
4
- * Table displaying all users in the LP application
4
+ * SDataTable displaying all users in the LP application
5
5
  */
6
6
  declare const UsersTable: (props: UserTableType) => JSX.Element;
7
7
  export default UsersTable;
@@ -50,7 +50,7 @@ export { default as StatusBadge } from './StatusBadge/StatusBadge';
50
50
  export { default as StocksTicker } from './StocksTicker/StocksTicker';
51
51
  export { default as SystemConfigTable } from './SystemConfigTable/SystemConfigTable';
52
52
  export { default as Tab } from './Tab/Tab';
53
- export { SDatatable as Table } from './Table';
53
+ export { SDatatable as Table } from './SDataTable';
54
54
  export { default as TextArea } from './TextArea/TextArea';
55
55
  export { default as TextField } from './TextField/TextField';
56
56
  export { default as TransactionDetails } from './TransactionDetails/TransactionDetails';
@@ -62,3 +62,5 @@ export { default as UsersTable } from './UsersTable/UsersTable';
62
62
  export { default as WidgetTitle } from './WidgetTitle/WidgetTitle';
63
63
  export { default as SSXBar } from './SSXBar/SSXBar';
64
64
  export { default as BidsCards } from './BidsCards/BidsCard';
65
+ export { default as TablePrimary } from './TablePrimary';
66
+ export { default as TableAlternative } from './TableAlternative';