@dvrd/dvr-controls 1.0.39 → 1.0.40
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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dvrd/dvr-controls",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.40",
|
|
4
4
|
"description": "Custom web controls",
|
|
5
5
|
"main": "index.ts",
|
|
6
6
|
"files": [
|
|
@@ -18,34 +18,34 @@
|
|
|
18
18
|
"2": "ie >= 11"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
|
-
"react
|
|
21
|
+
"react": "18.2.0",
|
|
22
|
+
"react-dom": "18.2.0"
|
|
22
23
|
},
|
|
23
|
-
"
|
|
24
|
-
"@fortawesome/fontawesome-svg-core": "6.3.0",
|
|
25
|
-
"@fortawesome/free-brands-svg-icons": "6.3.0",
|
|
26
|
-
"@fortawesome/free-regular-svg-icons": "6.3.0",
|
|
27
|
-
"@fortawesome/free-solid-svg-icons": "6.3.0",
|
|
28
|
-
"@fortawesome/react-fontawesome": "0.2.0",
|
|
24
|
+
"devDependencies": {
|
|
29
25
|
"@types/dompurify": "2.4.0",
|
|
30
26
|
"@types/js-cookie": "3.0.3",
|
|
31
27
|
"@types/lodash": "4.14.191",
|
|
32
28
|
"@types/node": "18.14.0",
|
|
33
|
-
"@types/react": "18.
|
|
29
|
+
"@types/react": "18.2.19",
|
|
34
30
|
"@types/react-color": "3.0.6",
|
|
35
31
|
"@types/react-dom": "18.0.11",
|
|
36
|
-
"@types/react-router-dom": "5.3.3",
|
|
37
32
|
"@types/uuid": "9.0.0",
|
|
33
|
+
"typescript": "4.9.5"
|
|
34
|
+
},
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"@fortawesome/fontawesome-svg-core": "6.3.0",
|
|
37
|
+
"@fortawesome/free-brands-svg-icons": "6.3.0",
|
|
38
|
+
"@fortawesome/free-regular-svg-icons": "6.3.0",
|
|
39
|
+
"@fortawesome/free-solid-svg-icons": "6.3.0",
|
|
40
|
+
"@fortawesome/react-fontawesome": "0.2.0",
|
|
38
41
|
"classnames": "2.3.2",
|
|
39
|
-
"cross-env": "7.0.3",
|
|
40
42
|
"dompurify": "3.0.0",
|
|
41
43
|
"js-cookie": "3.0.1",
|
|
42
44
|
"lodash": "4.17.21",
|
|
43
45
|
"moment": "2.29.4",
|
|
44
|
-
"react": "18.2.0",
|
|
45
46
|
"react-color": "2.19.3",
|
|
46
|
-
"react-dom": "18.2.0",
|
|
47
47
|
"react-rnd": "10.4.1",
|
|
48
|
-
"
|
|
48
|
+
"react-router-dom": "6.15.0",
|
|
49
49
|
"uuid": "9.0.0"
|
|
50
50
|
}
|
|
51
51
|
}
|
|
@@ -10,7 +10,7 @@ import classNames from 'classnames';
|
|
|
10
10
|
import {AwesomeIcon, generateComponentId, isAbsoluteLink} from "../../../index";
|
|
11
11
|
import {ControlContext} from "../util/controlContext";
|
|
12
12
|
import {defer} from 'lodash';
|
|
13
|
-
import {
|
|
13
|
+
import {IconName} from '@fortawesome/fontawesome-svg-core';
|
|
14
14
|
|
|
15
15
|
interface Props {
|
|
16
16
|
onClickItem: (item: SidebarItem) => MouseEventHandler;
|
|
@@ -87,7 +87,7 @@ export default function SidebarMenu(props: Props) {
|
|
|
87
87
|
cls = classNames(className, mode === SideMenuMode.COMPACT ? 'side-bar-item' : 'side-bar-item-full',
|
|
88
88
|
isChild && 'child', children !== undefined && 'with-children');
|
|
89
89
|
return (
|
|
90
|
-
<div key={id} className={cls} onClick={_onClickItem(item)}>
|
|
90
|
+
<div key={id} className={cls} onClick={_onClickItem(item)} id={id}>
|
|
91
91
|
{renderIcon(isActive, isChild, label, icon)}
|
|
92
92
|
{mode === SideMenuMode.COMPACT && <div className='active-indicator'/>}
|
|
93
93
|
<span className={classNames('item-label', isActive && 'active')}>{label}</span>
|
|
@@ -165,8 +165,25 @@ export type DefaultPDFElementParams<T extends PDFElementType, O extends IndexedO
|
|
|
165
165
|
key: string;
|
|
166
166
|
linkedID?: string;
|
|
167
167
|
}>
|
|
168
|
-
export type PDFImageParams = {
|
|
169
|
-
|
|
168
|
+
export type PDFImageParams = {
|
|
169
|
+
img: File | string | null,
|
|
170
|
+
persistent: PDFElementPersist;
|
|
171
|
+
alignment?: ElementPosition;
|
|
172
|
+
display?: PDFDisplay
|
|
173
|
+
};
|
|
174
|
+
export type PDFTextParams = {
|
|
175
|
+
bold: boolean;
|
|
176
|
+
underline: boolean;
|
|
177
|
+
italic: boolean;
|
|
178
|
+
fontSize: number;
|
|
179
|
+
text: string;
|
|
180
|
+
alignment?: ElementPosition;
|
|
181
|
+
disabled?: boolean,
|
|
182
|
+
font: PdfFont,
|
|
183
|
+
color: string;
|
|
184
|
+
persistent: PDFElementPersist;
|
|
185
|
+
display?: PDFDisplay
|
|
186
|
+
};
|
|
170
187
|
export type PDFInvoiceTableParams = {
|
|
171
188
|
fontSize: number;
|
|
172
189
|
widths: number[];
|
|
@@ -177,7 +194,11 @@ export type PDFInvoiceTableParams = {
|
|
|
177
194
|
persistent: PDFElementPersist;
|
|
178
195
|
};
|
|
179
196
|
export type PDFInvoiceWidths = { name: number; price: number; quantity: number; subtotal: number }
|
|
180
|
-
export type PDFTextVariables = {
|
|
197
|
+
export type PDFTextVariables = {
|
|
198
|
+
company: IndexedObject<string>;
|
|
199
|
+
client: IndexedObject<string>;
|
|
200
|
+
invoice: IndexedObject<string>;
|
|
201
|
+
}
|
|
181
202
|
export type PDFSubmitHandler = (items: PDFElementParams<any, any>[], callback?: VoidFunction) => void;
|
|
182
203
|
export type PDFElementDimensions = { left: number; top: number; width: number; height: number };
|
|
183
204
|
|
|
@@ -61,6 +61,12 @@ export const cancelAllFetch = () => {
|
|
|
61
61
|
}
|
|
62
62
|
};
|
|
63
63
|
|
|
64
|
+
function bigIntParser(_: string, value: any) {
|
|
65
|
+
if (typeof value === 'bigint')
|
|
66
|
+
return value.toString();
|
|
67
|
+
return value;
|
|
68
|
+
}
|
|
69
|
+
|
|
64
70
|
export function sendFetch(config: FetchOptions, legacySupport: boolean = false): AbortController | null {
|
|
65
71
|
const baseUrl = config.baseUrl || window.settings.platformUrl;
|
|
66
72
|
if (!baseUrl) throw new Error('Base url is not set!');
|
|
@@ -70,7 +76,7 @@ export function sendFetch(config: FetchOptions, legacySupport: boolean = false):
|
|
|
70
76
|
const options: { [index: string]: any } = {
|
|
71
77
|
headers,
|
|
72
78
|
method,
|
|
73
|
-
body: config.stringifyData === false ? data : JSON.stringify(data),
|
|
79
|
+
body: config.stringifyData === false ? data : JSON.stringify(data, bigIntParser),
|
|
74
80
|
cache: 'no-store',
|
|
75
81
|
};
|
|
76
82
|
const abortController = getAbortController();
|