@dvrd/dvr-controls 1.1.13 → 1.1.15
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/index.ts +1 -0
- package/package.json +14 -24
- package/src/js/button/style/button.scss +5 -4
- package/src/js/button/style/closeButton.scss +0 -2
- package/src/js/button/style/dvrdButton.scss +2 -2
- package/src/js/button/style/outlinedButton.scss +5 -5
- package/src/js/button/style/simpleButton.scss +3 -5
- package/src/js/carousel/DVRCarousel.tsx +18 -16
- package/src/js/carousel/style/DVRCarousel.scss +2 -3
- package/src/js/checkbox/style/checkbox.scss +8 -7
- package/src/js/colorPicker/style/colorPicker.scss +0 -2
- package/src/js/date/dvrdDatePicker.tsx +1 -2
- package/src/js/date/style/dvrdDatePicker.scss +21 -19
- package/src/js/dialog/style/dialog.scss +15 -12
- package/src/js/fileUpload/style/fileUpload.scss +2 -2
- package/src/js/header/style/header.scss +16 -14
- package/src/js/image/style/imageUpload.scss +0 -2
- package/src/js/info/style/info.scss +3 -3
- package/src/js/input/date/dateField.tsx +38 -31
- package/src/js/input/date/dateFieldController.tsx +2 -2
- package/src/js/input/date/datePicker/style/datePicker.scss +5 -5
- package/src/js/input/date/style/dateField.scss +5 -4
- package/src/js/input/date/timePicker/style/timePicker.scss +5 -4
- package/src/js/input/password/style/passwordInput.scss +3 -3
- package/src/js/input/password/style/passwordRules.scss +4 -4
- package/src/js/input/simple/style/simpleInput.scss +2 -2
- package/src/js/input/style/input.scss +6 -5
- package/src/js/label/label.tsx +1 -2
- package/src/js/link/link.tsx +3 -1
- package/src/js/link/style/link.scss +4 -4
- package/src/js/loader/style/loader.scss +6 -5
- package/src/js/navigation/mobileNavigation.tsx +1 -2
- package/src/js/navigation/style/mobileNavigation.scss +31 -24
- package/src/js/optionsList/style/dvrdOptionsList.scss +6 -5
- package/src/js/optionsMenu/style/optionsMenu.scss +6 -5
- package/src/js/pdf/element/style/pdfElement.scss +8 -7
- package/src/js/pdf/image/pdfImage.tsx +4 -4
- package/src/js/pdf/image/style/pdfImage.scss +3 -3
- package/src/js/pdf/invoiceTable/pdfInvoiceTable.tsx +3 -3
- package/src/js/pdf/invoiceTable/style/pdfInvoiceTable.scss +2 -2
- package/src/js/pdf/settings/buttons/style/iconButton.scss +5 -5
- package/src/js/pdf/settings/image/pdfImageSettings.tsx +4 -6
- package/src/js/pdf/settings/invoiceTable/style/pdfInvoiceTableSettings.scss +4 -3
- package/src/js/pdf/settings/style/pdfElementSettings.scss +3 -3
- package/src/js/pdf/settings/text/style/pdfTextSettings.scss +5 -4
- package/src/js/pdf/style/pdfTemplateCreator.scss +12 -11
- package/src/js/pdf/text/pdfText.tsx +3 -3
- package/src/js/pdf/text/style/pdfText.scss +0 -2
- package/src/js/pdf/v2/pdfElement/pdfDraggableElement.tsx +4 -6
- package/src/js/popup/style/withBackground.scss +3 -3
- package/src/js/radio/style/dvrdRadio.scss +6 -5
- package/src/js/select/async/style/asyncSelect.scss +0 -2
- package/src/js/select/dvrdGroupedSelect.tsx +1 -2
- package/src/js/select/dvrdMultiSelect.tsx +2 -3
- package/src/js/select/dvrdSelect.tsx +12 -11
- package/src/js/select/dvrdSelectController.tsx +10 -11
- package/src/js/select/style/dvrdGroupedSelect.scss +12 -11
- package/src/js/select/style/dvrdSelect.scss +9 -8
- package/src/js/select/style/select.scss +16 -24
- package/src/js/sidebarMenu/sidebarMenu.tsx +22 -13
- package/src/js/sidebarMenu/style/sidebarMenu.scss +7 -6
- package/src/js/slider/style/DVRSlider.scss +2 -2
- package/src/js/snackbar/snackbarController.tsx +3 -5
- package/src/js/snackbar/style/snackbar.scss +7 -6
- package/src/js/switch/style/dvrdSwitch.scss +2 -2
- package/src/js/switch/style/switch.scss +8 -8
- package/src/js/textField/dvrdPasswordInput.tsx +0 -1
- package/src/js/textField/style/dvrdInput.scss +4 -4
- package/src/js/textField/style/dvrdPassword.scss +3 -3
- package/src/js/topButton/style/topButton.scss +3 -3
- package/src/js/util/controlContext.tsx +1 -2
- package/src/js/util/interfaces.ts +3 -3
- package/src/style/_colors.scss +44 -0
- package/src/style/{common-variables.scss → _common-variables.scss} +16 -62
- package/src/style/common-icons.scss +141 -142
- package/src/style/{variables.scss → main.scss} +2 -3
- package/src/js/label/style/label.scss +0 -4
- package/src/js/pdf/settings/image/style/pdfImageSettings.scss +0 -9
- /package/src/style/{display-breakpoints.scss → _display-breakpoints.scss} +0 -0
|
@@ -2,14 +2,11 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.dvrd-mobile-navigation {
|
|
8
|
-
|
|
9
|
-
display: none;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
color: $color-blue-text;
|
|
9
|
+
color: colors.$color-blue-text;
|
|
13
10
|
position: fixed;
|
|
14
11
|
z-index: 2000;
|
|
15
12
|
|
|
@@ -22,11 +19,14 @@
|
|
|
22
19
|
padding: .5rem; // For better UX, makes the touch surface bigger
|
|
23
20
|
|
|
24
21
|
.mobile-navigation-icon {
|
|
25
|
-
@include backgroundShadow2;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
22
|
+
@include commons.backgroundShadow2;
|
|
23
|
+
|
|
24
|
+
& {
|
|
25
|
+
font-size: 2rem;
|
|
26
|
+
padding: .25rem;
|
|
27
|
+
background-color: white;
|
|
28
|
+
border-radius: .5rem;
|
|
29
|
+
}
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
@@ -39,18 +39,21 @@
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
.mobile-navigation-container {
|
|
42
|
-
@include backgroundShadow3($borderRadius: 0);
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
42
|
+
@include commons.backgroundShadow3($borderRadius: 0);
|
|
43
|
+
|
|
44
|
+
& {
|
|
45
|
+
position: fixed;
|
|
46
|
+
top: 0;
|
|
47
|
+
left: 0;
|
|
48
|
+
height: 100dvh;
|
|
49
|
+
max-width: 100dvw;
|
|
50
|
+
overflow-y: auto;
|
|
51
|
+
background-color: white;
|
|
52
|
+
transform: translateX(-100%);
|
|
53
|
+
transition: transform .2s ease-in-out;
|
|
54
|
+
display: grid;
|
|
55
|
+
grid-template-rows: fit-content(100%) 1fr fit-content(100%);
|
|
56
|
+
}
|
|
54
57
|
|
|
55
58
|
.mobile-navigation-close {
|
|
56
59
|
position: sticky;
|
|
@@ -71,7 +74,7 @@
|
|
|
71
74
|
font-size: 1.1rem;
|
|
72
75
|
|
|
73
76
|
&.active {
|
|
74
|
-
color:
|
|
77
|
+
color: colors.$color-blue-1;
|
|
75
78
|
font-weight: 500;
|
|
76
79
|
}
|
|
77
80
|
}
|
|
@@ -89,4 +92,8 @@
|
|
|
89
92
|
transform: none;
|
|
90
93
|
}
|
|
91
94
|
}
|
|
95
|
+
|
|
96
|
+
@media(min-width: 750px) {
|
|
97
|
+
display: none;
|
|
98
|
+
}
|
|
92
99
|
}
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.dvrd-options-list {
|
|
8
9
|
position: relative;
|
|
9
10
|
|
|
10
11
|
.btn-container {
|
|
11
|
-
@include backgroundShadow2;
|
|
12
|
+
@include commons.backgroundShadow2;
|
|
12
13
|
border-radius: .5rem;
|
|
13
14
|
padding: .7rem 1rem;
|
|
14
15
|
display: grid;
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
.option {
|
|
44
45
|
padding: .5rem;
|
|
45
46
|
cursor: pointer;
|
|
46
|
-
border-bottom: 1px solid
|
|
47
|
+
border-bottom: 1px solid colors.$color-gray-4;
|
|
47
48
|
transition: background-color .2s ease-in-out;
|
|
48
49
|
|
|
49
50
|
.option-label {
|
|
@@ -57,7 +58,7 @@
|
|
|
57
58
|
|
|
58
59
|
&:hover {
|
|
59
60
|
&.default {
|
|
60
|
-
background-color: rgba(
|
|
61
|
+
background-color: rgba(colors.$color-blue-1, .2);
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
&.red {
|
|
@@ -69,7 +70,7 @@
|
|
|
69
70
|
|
|
70
71
|
&.open, &.hover:hover {
|
|
71
72
|
.options-container {
|
|
72
|
-
@include backgroundShadow
|
|
73
|
+
@include commons.backgroundShadow;
|
|
73
74
|
visibility: visible;
|
|
74
75
|
opacity: 1;
|
|
75
76
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.option-menu-container {
|
|
8
9
|
display: flex;
|
|
@@ -24,14 +25,14 @@
|
|
|
24
25
|
}
|
|
25
26
|
|
|
26
27
|
.menu-options-list {
|
|
27
|
-
@include backgroundShadow;
|
|
28
|
+
@include commons.backgroundShadow;
|
|
28
29
|
position: fixed;
|
|
29
30
|
display: flex;
|
|
30
31
|
flex-direction: column;
|
|
31
32
|
visibility: hidden;
|
|
32
33
|
opacity: 0;
|
|
33
34
|
transition: visibility .2s ease-in-out, opacity .2s ease-in-out;
|
|
34
|
-
z-index:
|
|
35
|
+
z-index: commons.$z-index-dialog;
|
|
35
36
|
|
|
36
37
|
.menu-option {
|
|
37
38
|
display: flex;
|
|
@@ -50,14 +51,14 @@
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
&:hover {
|
|
53
|
-
background-color:
|
|
54
|
+
background-color: colors.$color-gray-7;
|
|
54
55
|
}
|
|
55
56
|
|
|
56
57
|
&.disabled {
|
|
57
58
|
cursor: not-allowed;
|
|
58
59
|
|
|
59
60
|
.menu-option-label {
|
|
60
|
-
color:
|
|
61
|
+
color: colors.$color-gray-3;
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.pdf-draggable {
|
|
8
9
|
outline: 2px solid transparent;
|
|
@@ -14,7 +15,7 @@
|
|
|
14
15
|
left: -2px;
|
|
15
16
|
width: calc(100% + 4px);
|
|
16
17
|
transform: translateY(-100%);
|
|
17
|
-
background-color:
|
|
18
|
+
background-color: colors.$color-gray-5;
|
|
18
19
|
display: flex;
|
|
19
20
|
justify-content: space-between;
|
|
20
21
|
align-items: center;
|
|
@@ -34,7 +35,7 @@
|
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
&:hover {
|
|
37
|
-
color:
|
|
38
|
+
color: colors.$color-gray-4;
|
|
38
39
|
|
|
39
40
|
&.delete {
|
|
40
41
|
color: red;
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
align-items: center;
|
|
48
49
|
|
|
49
50
|
.action {
|
|
50
|
-
border-right: 1px solid
|
|
51
|
+
border-right: 1px solid colors.$color-gray-5;
|
|
51
52
|
|
|
52
53
|
&:last-child {
|
|
53
54
|
border-right: none;
|
|
@@ -62,7 +63,7 @@
|
|
|
62
63
|
|
|
63
64
|
.guide {
|
|
64
65
|
position: absolute;
|
|
65
|
-
background-color:
|
|
66
|
+
background-color: colors.$color-gray-4;
|
|
66
67
|
top: 0;
|
|
67
68
|
left: 0;
|
|
68
69
|
|
|
@@ -92,8 +93,8 @@
|
|
|
92
93
|
}
|
|
93
94
|
|
|
94
95
|
&:hover, &.focused {
|
|
95
|
-
outline-color:
|
|
96
|
-
z-index:
|
|
96
|
+
outline-color: colors.$color-gray-5;
|
|
97
|
+
z-index: commons.$z-index-high;
|
|
97
98
|
background-color: white;
|
|
98
99
|
|
|
99
100
|
.action-bar {
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
} from "../../util/interfaces";
|
|
10
10
|
import {PDFDraggable, PdfElement} from "../element/pdfElement";
|
|
11
11
|
import {nullify} from "../../util/miscUtil";
|
|
12
|
-
import merge from 'lodash.merge';
|
|
13
12
|
import {AwesomeIcon, directTimeout, PAGE_HEIGHT, PAGE_WIDTH} from "../../../../index";
|
|
14
13
|
|
|
15
14
|
interface Props {
|
|
@@ -42,12 +41,13 @@ export default class PdfImage extends PdfElement<Props, State> {
|
|
|
42
41
|
constructor(props: Props) {
|
|
43
42
|
super(props);
|
|
44
43
|
this.state = {
|
|
45
|
-
settings:
|
|
46
|
-
img: props.values?.default_image || '',
|
|
44
|
+
settings: {
|
|
47
45
|
persistent: PDFElementPersist.NOT_PERSISTENT,
|
|
48
46
|
alignment: undefined,
|
|
49
47
|
display: PDFDisplay.ALL_PAGES,
|
|
50
|
-
|
|
48
|
+
...props.defaultSettings,
|
|
49
|
+
img: (props.defaultSettings?.img ?? (props.values?.default_image || '')) as string,
|
|
50
|
+
},
|
|
51
51
|
dragging: false,
|
|
52
52
|
};
|
|
53
53
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.pdf-image {
|
|
8
8
|
width: 100%;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
|
|
16
16
|
.img-selector {
|
|
17
17
|
padding: 2rem;
|
|
18
|
-
border: 2px dashed
|
|
19
|
-
color:
|
|
18
|
+
border: 2px dashed colors.$color-gray-3;
|
|
19
|
+
color: colors.$color-gray-3;
|
|
20
20
|
display: flex;
|
|
21
21
|
flex-direction: column;
|
|
22
22
|
align-items: center;
|
|
@@ -9,7 +9,6 @@ import {
|
|
|
9
9
|
PDFElementParams, PDFElementPersist, PDFElementType, PdfFont, PDFInvoiceTableParams
|
|
10
10
|
} from "../../util/interfaces";
|
|
11
11
|
import {PDFDraggable, PdfElement} from "../element/pdfElement";
|
|
12
|
-
import merge from 'lodash.merge';
|
|
13
12
|
import {parsePrice, pxToPt} from "../../util/pdfUtil";
|
|
14
13
|
import {WithEvents} from "../../../../index";
|
|
15
14
|
|
|
@@ -37,7 +36,7 @@ export default class PdfInvoiceTable extends PdfElement<Props, State> {
|
|
|
37
36
|
constructor(props: Props) {
|
|
38
37
|
super(props);
|
|
39
38
|
this.state = {
|
|
40
|
-
settings:
|
|
39
|
+
settings: {
|
|
41
40
|
widths: [40, 20, 20, 20],
|
|
42
41
|
fontSize: 12,
|
|
43
42
|
font: props.mainFont,
|
|
@@ -45,7 +44,8 @@ export default class PdfInvoiceTable extends PdfElement<Props, State> {
|
|
|
45
44
|
headerColor: '#000',
|
|
46
45
|
alignment: ElementPosition.CENTER,
|
|
47
46
|
persistent: PDFElementPersist.NOT_PERSISTENT,
|
|
48
|
-
|
|
47
|
+
...props.defaultSettings
|
|
48
|
+
},
|
|
49
49
|
dragging: false,
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.pdf-invoice-table {
|
|
8
8
|
.invoice-line {
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
.light {
|
|
21
|
-
color:
|
|
21
|
+
color: colors.$color-gray-3;
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
.fl {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.icon-button {
|
|
8
8
|
display: inline-flex;
|
|
@@ -10,11 +10,11 @@
|
|
|
10
10
|
justify-content: center;
|
|
11
11
|
align-items: center;
|
|
12
12
|
cursor: pointer;
|
|
13
|
-
background-color:
|
|
13
|
+
background-color: colors.$color-gray-7;
|
|
14
14
|
width: 34px;
|
|
15
15
|
height: 34px;
|
|
16
16
|
transition: background-color .2s ease-in-out;
|
|
17
|
-
border-right: 1px solid
|
|
17
|
+
border-right: 1px solid colors.$color-gray-4;
|
|
18
18
|
|
|
19
19
|
.icon-container {
|
|
20
20
|
display: inline-flex;
|
|
@@ -37,11 +37,11 @@
|
|
|
37
37
|
}
|
|
38
38
|
|
|
39
39
|
&:hover {
|
|
40
|
-
background-color:
|
|
40
|
+
background-color: colors.$color-gray-4;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
&.active {
|
|
44
|
-
background-color:
|
|
44
|
+
background-color: colors.$color-blue-1;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
&:last-child {
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
|
-
import './style/pdfImageSettings.scss';
|
|
5
|
-
|
|
6
4
|
import React, {PureComponent} from 'react';
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import
|
|
10
|
-
import {
|
|
5
|
+
import {DvrdButton, DvrdSelect, ElementPosition, SelectItemShape} from '../../../../../index';
|
|
6
|
+
import {PDFDisplay} from '../../../util/interfaces';
|
|
7
|
+
import PdfImage from '../../image/pdfImage';
|
|
8
|
+
import IconButton, {IconButtonType} from '../buttons/iconButton';
|
|
11
9
|
|
|
12
10
|
interface Props {
|
|
13
11
|
element: PdfImage;
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../../style/display-breakpoints' as breakpoints;
|
|
6
|
+
@use '../../../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.pdf-invoice-table-settings {
|
|
8
9
|
display: grid;
|
|
@@ -24,11 +25,11 @@
|
|
|
24
25
|
grid-column-start: span 2;
|
|
25
26
|
width: 100%;
|
|
26
27
|
height: 1px;
|
|
27
|
-
background-color:
|
|
28
|
+
background-color: colors.$color-gray-4;
|
|
28
29
|
margin: .5rem 0;
|
|
29
30
|
}
|
|
30
31
|
|
|
31
|
-
@include break-lg-down {
|
|
32
|
+
@include breakpoints.break-lg-down {
|
|
32
33
|
grid-template-columns: auto;
|
|
33
34
|
grid-column-gap: 0;
|
|
34
35
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../style/colors';
|
|
6
6
|
|
|
7
7
|
.pdf-element-settings {
|
|
8
8
|
background-color: white;
|
|
9
9
|
padding: 1rem;
|
|
10
|
-
border: 1px solid
|
|
10
|
+
border: 1px solid colors.$color-gray-7;
|
|
11
11
|
border-radius: .5rem;
|
|
12
12
|
max-width: 30rem;
|
|
13
13
|
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
.divider {
|
|
23
23
|
width: 100%;
|
|
24
24
|
height: 1px;
|
|
25
|
-
background-color:
|
|
25
|
+
background-color: colors.$color-gray-4;
|
|
26
26
|
margin: .5rem 0;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.pdf-text-settings {
|
|
8
9
|
display: grid;
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
flex-direction: column;
|
|
44
45
|
|
|
45
46
|
.variables-title {
|
|
46
|
-
border-bottom: 2px solid
|
|
47
|
+
border-bottom: 2px solid colors.$color-gray-4;
|
|
47
48
|
cursor: pointer;
|
|
48
49
|
padding: .5rem .25rem;
|
|
49
50
|
font-weight: 500;
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
align-items: flex-start;
|
|
62
63
|
|
|
63
64
|
.text-variable {
|
|
64
|
-
@include backgroundShadow;
|
|
65
|
+
@include commons.backgroundShadow;
|
|
65
66
|
padding: .2rem .4rem;
|
|
66
67
|
border-radius: .5rem;
|
|
67
68
|
cursor: pointer;
|
|
@@ -76,7 +77,7 @@
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
&:hover {
|
|
79
|
-
background-color:
|
|
80
|
+
background-color: colors.$color-gray-7;
|
|
80
81
|
}
|
|
81
82
|
}
|
|
82
83
|
}
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
|
+
@use '../../../style/colors';
|
|
6
7
|
|
|
7
8
|
.pdf-creator {
|
|
8
9
|
margin: 2rem auto;
|
|
@@ -26,11 +27,11 @@
|
|
|
26
27
|
padding: 1rem;
|
|
27
28
|
position: sticky;
|
|
28
29
|
top: 4rem;
|
|
29
|
-
border: 1px solid
|
|
30
|
+
border: 1px solid colors.$color-gray-7;
|
|
30
31
|
border-radius: .5rem;
|
|
31
32
|
|
|
32
33
|
.element-button {
|
|
33
|
-
@include backgroundShadow;
|
|
34
|
+
@include commons.backgroundShadow;
|
|
34
35
|
border-radius: .5rem;
|
|
35
36
|
cursor: pointer;
|
|
36
37
|
transition: background-color .2s ease-in-out;
|
|
@@ -38,7 +39,7 @@
|
|
|
38
39
|
grid-template-columns: 2rem 1fr;
|
|
39
40
|
grid-column-gap: 1rem;
|
|
40
41
|
align-items: center;
|
|
41
|
-
color:
|
|
42
|
+
color: colors.$color-gray-5;
|
|
42
43
|
padding: .5rem;
|
|
43
44
|
|
|
44
45
|
.element-label {
|
|
@@ -50,7 +51,7 @@
|
|
|
50
51
|
}
|
|
51
52
|
|
|
52
53
|
&:hover {
|
|
53
|
-
background-color:
|
|
54
|
+
background-color: colors.$color-gray-6;
|
|
54
55
|
}
|
|
55
56
|
}
|
|
56
57
|
|
|
@@ -60,7 +61,7 @@
|
|
|
60
61
|
grid-column-gap: 1rem;
|
|
61
62
|
|
|
62
63
|
.history-button {
|
|
63
|
-
@include backgroundShadow;
|
|
64
|
+
@include commons.backgroundShadow;
|
|
64
65
|
border-radius: .5rem;
|
|
65
66
|
cursor: pointer;
|
|
66
67
|
transition: background-color .2s ease-in-out;
|
|
@@ -68,17 +69,17 @@
|
|
|
68
69
|
text-align: center;
|
|
69
70
|
|
|
70
71
|
&:hover {
|
|
71
|
-
background-color:
|
|
72
|
+
background-color: colors.$color-gray-7;
|
|
72
73
|
}
|
|
73
74
|
|
|
74
75
|
&.disabled {
|
|
75
76
|
cursor: not-allowed;
|
|
76
77
|
background-color: white !important;
|
|
77
78
|
box-shadow: none;
|
|
78
|
-
border: 1px solid
|
|
79
|
+
border: 1px solid colors.$color-gray-4;
|
|
79
80
|
|
|
80
81
|
.history-icon {
|
|
81
|
-
color:
|
|
82
|
+
color: colors.$color-gray-4;
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
@@ -91,7 +92,7 @@
|
|
|
91
92
|
}
|
|
92
93
|
|
|
93
94
|
.pdf-paper {
|
|
94
|
-
@include backgroundShadow;
|
|
95
|
+
@include commons.backgroundShadow;
|
|
95
96
|
border-radius: .5rem;
|
|
96
97
|
width: 595pt;
|
|
97
98
|
height: 842pt;
|
|
@@ -102,7 +103,7 @@
|
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
.footer-container {
|
|
105
|
-
@include backgroundShadow;
|
|
106
|
+
@include commons.backgroundShadow;
|
|
106
107
|
border-radius: .5rem;
|
|
107
108
|
grid-column: 2;
|
|
108
109
|
padding: 1rem;
|
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
} from "../../util/interfaces";
|
|
18
18
|
import {PDFDraggable, PdfElement} from "../element/pdfElement";
|
|
19
19
|
import {debug, sanitizeHtml} from "../../util/miscUtil";
|
|
20
|
-
import merge from 'lodash.merge';
|
|
21
20
|
import {PAGE_WIDTH, pxToPt, setPdfVariables, waitForFonts} from "../../util/pdfUtil";
|
|
22
21
|
import {directTimeout} from "../../util/componentUtil";
|
|
23
22
|
import {dispatchCustomEvent, showDialog} from "../../util/eventUtil";
|
|
@@ -57,7 +56,7 @@ export default class PdfText extends PdfElement<Props, State> {
|
|
|
57
56
|
constructor(props: Props) {
|
|
58
57
|
super(props);
|
|
59
58
|
this.state = {
|
|
60
|
-
settings:
|
|
59
|
+
settings: {
|
|
61
60
|
text: 'Klik hier om deze tekst aan te passen.',
|
|
62
61
|
bold: false,
|
|
63
62
|
underline: false,
|
|
@@ -68,7 +67,8 @@ export default class PdfText extends PdfElement<Props, State> {
|
|
|
68
67
|
color: '#000',
|
|
69
68
|
persistent: PDFElementPersist.NOT_PERSISTENT,
|
|
70
69
|
display: PDFDisplay.ALL_PAGES,
|
|
71
|
-
|
|
70
|
+
...props.defaultSettings
|
|
71
|
+
},
|
|
72
72
|
dragging: false,
|
|
73
73
|
focused: false,
|
|
74
74
|
}
|
|
@@ -16,8 +16,6 @@ import React, {
|
|
|
16
16
|
import {ElementPosition, PDFElementPersist, RNDDimensions} from "../../../util/interfaces";
|
|
17
17
|
import {generateComponentId} from "../../../util/componentUtil";
|
|
18
18
|
import {DraggableData, HandleStyles, Position, ResizableDelta, ResizeEnable, Rnd, RndDragCallback} from 'react-rnd';
|
|
19
|
-
import defer from 'lodash.defer';
|
|
20
|
-
import delay from 'lodash.delay';
|
|
21
19
|
import {PDFDraggableType, ResizeDirection} from "../types/pdfTemplateTypes";
|
|
22
20
|
import {PAGE_WIDTH} from "../../../util/pdfUtil";
|
|
23
21
|
import classNames from 'classnames';
|
|
@@ -95,7 +93,7 @@ function PDFDraggableElement(props: PropsWithChildren<Props>, ref: ForwardedRef<
|
|
|
95
93
|
function setSize(width: number, height: number, notifyResized: boolean = true) {
|
|
96
94
|
setDimensions({width, height});
|
|
97
95
|
if (notifyResized)
|
|
98
|
-
|
|
96
|
+
window.setTimeout(props.onResized);
|
|
99
97
|
}
|
|
100
98
|
|
|
101
99
|
function setFocus() {
|
|
@@ -104,7 +102,7 @@ function PDFDraggableElement(props: PropsWithChildren<Props>, ref: ForwardedRef<
|
|
|
104
102
|
|
|
105
103
|
function setPosition(_position: Position, callback?: VoidFunction) {
|
|
106
104
|
_setPosition(Object.assign({}, position, _position));
|
|
107
|
-
if (callback)
|
|
105
|
+
if (callback) window.setTimeout(callback);
|
|
108
106
|
}
|
|
109
107
|
|
|
110
108
|
function getPosition(): Position {
|
|
@@ -129,7 +127,7 @@ function PDFDraggableElement(props: PropsWithChildren<Props>, ref: ForwardedRef<
|
|
|
129
127
|
function onResizeStop(evt: any, direction: ResizeDirection, ref: HTMLElement, delta: ResizableDelta, position: Position) {
|
|
130
128
|
setDimensions({width: ref.style.width, height: ref.style.height});
|
|
131
129
|
_setPosition(position);
|
|
132
|
-
|
|
130
|
+
window.setTimeout(props.onResized);
|
|
133
131
|
}
|
|
134
132
|
|
|
135
133
|
function setInitialPosition() {
|
|
@@ -153,7 +151,7 @@ function PDFDraggableElement(props: PropsWithChildren<Props>, ref: ForwardedRef<
|
|
|
153
151
|
}));
|
|
154
152
|
|
|
155
153
|
useEffect(() => {
|
|
156
|
-
|
|
154
|
+
window.setTimeout(setInitialPosition, 20);
|
|
157
155
|
}, [props.alignment]);
|
|
158
156
|
|
|
159
157
|
const axis = props.alignment ? 'y' : 'both';
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* Copyright (c) 2024. Dave van Rijn Development
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
@
|
|
5
|
+
@use '../../../style/common-variables' as commons;
|
|
6
6
|
|
|
7
7
|
.with-background {
|
|
8
|
-
@include popupContainer;
|
|
8
|
+
@include commons.popupContainer;
|
|
9
9
|
display: flex;
|
|
10
10
|
justify-content: center;
|
|
11
11
|
align-items: center;
|
|
12
|
-
z-index:
|
|
12
|
+
z-index: commons.$z-index-dialog;
|
|
13
13
|
|
|
14
14
|
.content-container {
|
|
15
15
|
width: fit-content;
|