@arquimedes.co/eureka-forms 1.9.105 → 1.9.108-test
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/dist/App.js +3 -1
- package/dist/FormComponents/Step/MapperStep/MapperStep.d.ts +3 -1
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.d.ts +1 -1
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +19 -12
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.module.css +17 -6
- package/dist/Icons/Entities/CheckListIcon.d.ts +3 -0
- package/dist/Icons/Entities/CheckListIcon.js +16 -0
- package/dist/constants/IconTypes.d.ts +1 -0
- package/dist/constants/IconTypes.js +1 -0
- package/dist/shared/InputIcon/InputIcon.js +7 -0
- package/package.json +1 -1
package/dist/App.js
CHANGED
|
@@ -353,7 +353,9 @@ var mapOriginalValues = function (originalValues, form) {
|
|
|
353
353
|
}
|
|
354
354
|
for (var _b = 0, _c = Object.values(form.steps); _b < _c.length; _b++) {
|
|
355
355
|
var step = _c[_b];
|
|
356
|
-
if (step.type !== StepTypes.MAPPER ||
|
|
356
|
+
if (step.type !== StepTypes.MAPPER ||
|
|
357
|
+
newValues[step.id] ||
|
|
358
|
+
!step.required)
|
|
357
359
|
continue;
|
|
358
360
|
addInitialMapper(newValues, step);
|
|
359
361
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { Mapper } from '../../../@Types/FormStep';
|
|
3
2
|
import { MapperElement } from './MaterialMapperStep/MaterialMapperStep';
|
|
4
3
|
import { StepProps } from '../Step';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
5
|
interface CustomMapperElementModifiers<Type> {
|
|
6
6
|
calcName?: (element: MapperElement<Type>) => string;
|
|
7
7
|
}
|
|
@@ -9,6 +9,8 @@ export interface MapperStepProps<Type> extends StepProps {
|
|
|
9
9
|
/** The MapperStep to display */
|
|
10
10
|
step: Mapper;
|
|
11
11
|
customAdd?: JSX.Element;
|
|
12
|
+
renderElementWrapper?: (element: ReactNode) => JSX.Element;
|
|
13
|
+
renderElementButtons?: (element: MapperElement<Type>, index: number) => JSX.Element;
|
|
12
14
|
customElementModifiers?: CustomMapperElementModifiers<Type>;
|
|
13
15
|
calcCustomStepProps?: (element: MapperElement<Type>, customStepProps: Record<string, any>) => Record<string, any>;
|
|
14
16
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { MapperStepProps } from '../../../MapperStep';
|
|
3
3
|
import { MapperElementComponentProps } from '../MapperElement';
|
|
4
|
-
declare function PillMapperElement<Type = any>({ step, form, num, loading, element, children, editable, postview, formStyle, handleDelete, widthStats, customElementModifiers, }: MapperStepProps<Type> & MapperElementComponentProps<Type> & {
|
|
4
|
+
declare function PillMapperElement<Type = any>({ step, form, num, loading, element, children, editable, postview, formStyle, handleDelete, widthStats, renderElementButtons, customElementModifiers, renderElementWrapper, }: MapperStepProps<Type> & MapperElementComponentProps<Type> & {
|
|
5
5
|
num: number;
|
|
6
6
|
formStyle: {
|
|
7
7
|
textColor: string;
|
|
@@ -13,8 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
13
13
|
import styles from './PillMapperElement.module.css';
|
|
14
14
|
import DeleteRoundedIcon from '@material-ui/icons/DeleteRounded';
|
|
15
15
|
function PillMapperElement(_a) {
|
|
16
|
-
var
|
|
17
|
-
var step = _a.step, form = _a.form, num = _a.num, loading = _a.loading, element = _a.element, children = _a.children, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, handleDelete = _a.handleDelete, widthStats = _a.widthStats, customElementModifiers = _a.customElementModifiers;
|
|
16
|
+
var step = _a.step, form = _a.form, num = _a.num, loading = _a.loading, element = _a.element, children = _a.children, editable = _a.editable, postview = _a.postview, formStyle = _a.formStyle, handleDelete = _a.handleDelete, widthStats = _a.widthStats, renderElementButtons = _a.renderElementButtons, customElementModifiers = _a.customElementModifiers, renderElementWrapper = _a.renderElementWrapper;
|
|
18
17
|
var size = form.size;
|
|
19
18
|
var calcName = (customElementModifiers !== null && customElementModifiers !== void 0 ? customElementModifiers : {}).calcName;
|
|
20
19
|
var name = calcName
|
|
@@ -22,15 +21,23 @@ function PillMapperElement(_a) {
|
|
|
22
21
|
: step.unitLabel
|
|
23
22
|
? step.unitLabel + ' ' + (num + 1).toString()
|
|
24
23
|
: '';
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
24
|
+
var renderElement = function () {
|
|
25
|
+
var _a, _b;
|
|
26
|
+
return (_jsx("div", __assign({ className: widthStats.isMobile
|
|
27
|
+
? styles.mobileContainer
|
|
28
|
+
: styles.container }, { children: _jsxs("div", __assign({ className: styles.contentContainer, style: {
|
|
29
|
+
width: (size.blockSize + size.spacingSize) *
|
|
30
|
+
((_b = (_a = step.style) === null || _a === void 0 ? void 0 : _a.size) !== null && _b !== void 0 ? _b : size.blockNum - 1),
|
|
31
|
+
} }, { children: [_jsx("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: loading ? '' : name })), _jsxs("div", __assign({ className: styles.btnsContainer }, { children: [renderElementButtons === null || renderElementButtons === void 0 ? void 0 : renderElementButtons(element, num), step.deletable !== false && (_jsx("div", __assign({ className: !editable || postview
|
|
32
|
+
? styles.disabledDeleteBtn
|
|
33
|
+
: styles.deleteBtn, style: { color: formStyle.textColor }, onClick: function () {
|
|
34
|
+
if (editable && !postview) {
|
|
35
|
+
handleDelete === null || handleDelete === void 0 ? void 0 : handleDelete();
|
|
36
|
+
}
|
|
37
|
+
} }, { children: _jsx(DeleteRoundedIcon, { fontSize: "inherit" }) })))] })), children] })) })));
|
|
38
|
+
};
|
|
39
|
+
return (_jsx("div", __assign({ className: styles.containerContainer }, { children: renderElementWrapper
|
|
40
|
+
? renderElementWrapper(renderElement())
|
|
41
|
+
: renderElement() })));
|
|
35
42
|
}
|
|
36
43
|
export default PillMapperElement;
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
.containerContainer {
|
|
2
|
+
margin-top: 10px;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
.container,
|
|
2
6
|
.mobileContainer {
|
|
3
7
|
background-color: #f0f0f0;
|
|
@@ -5,13 +9,11 @@
|
|
|
5
9
|
width: fit-content;
|
|
6
10
|
border-radius: 20px;
|
|
7
11
|
margin-bottom: 10px;
|
|
8
|
-
margin-top: 10px;
|
|
9
12
|
margin-left: auto;
|
|
10
13
|
margin-right: auto;
|
|
11
|
-
padding-top: 20px;
|
|
12
|
-
padding-bottom: 20px;
|
|
13
14
|
position: relative;
|
|
14
15
|
}
|
|
16
|
+
|
|
15
17
|
.container {
|
|
16
18
|
max-width: calc(100% - 112px);
|
|
17
19
|
padding-right: 55px;
|
|
@@ -45,16 +47,25 @@
|
|
|
45
47
|
max-width: 100%;
|
|
46
48
|
overflow-x: hidden;
|
|
47
49
|
overflow-y: hidden;
|
|
50
|
+
padding-top: 20px;
|
|
51
|
+
padding-bottom: 20px;
|
|
48
52
|
}
|
|
49
53
|
|
|
50
|
-
.
|
|
51
|
-
.disabledDeleteBtn {
|
|
52
|
-
font-size: 24px;
|
|
54
|
+
.btnsContainer {
|
|
53
55
|
position: absolute;
|
|
54
56
|
right: 15px;
|
|
55
57
|
top: 15px;
|
|
58
|
+
display: flex;
|
|
59
|
+
flex-direction: row;
|
|
60
|
+
gap: 5px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.deleteBtn,
|
|
64
|
+
.disabledDeleteBtn {
|
|
65
|
+
font-size: 24px;
|
|
56
66
|
}
|
|
57
67
|
|
|
58
68
|
.deleteBtn {
|
|
59
69
|
cursor: pointer;
|
|
70
|
+
height: 24px;
|
|
60
71
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
|
+
function CheckListIcon(props) {
|
|
14
|
+
return (_jsxs("svg", __assign({ fill: props.fill, className: props.class, style: props.style, height: "480pt", viewBox: "0 0 60 70", width: "480pt", xmlns: "http://www.w3.org/2000/svg" }, { children: [_jsx("path", { d: "M24.79,8.7c1.27,0,2.29-1.03,2.29-2.3c0-1.26-1.03-2.29-2.29-2.29c-1.27,0-2.3,1.03-2.3,2.29 C22.49,7.67,23.52,8.7,24.79,8.7z" }), _jsx("path", { d: "M13.61,53.84H8.14c-0.41,0-0.75,0.34-0.75,0.75v4.1c0,0.41,0.34,0.75,0.75,0.75h5.46c0.41,0,0.75-0.34,0.75-0.75v-4.1 C14.36,54.18,14.02,53.84,13.61,53.84z" }), _jsx("path", { d: "M22.88,47.19h-5.46c-0.41,0-0.75,0.34-0.75,0.75v10.75c0,0.41,0.34,0.75,0.75,0.75h5.46c0.41,0,0.75-0.34,0.75-0.75V47.94 C23.63,47.53,23.3,47.19,22.88,47.19z" }), _jsx("path", { d: "M32.16,43.19h-5.46c-0.41,0-0.75,0.34-0.75,0.75v14.75c0,0.41,0.34,0.75,0.75,0.75h5.46c0.41,0,0.75-0.34,0.75-0.75V43.94 C32.91,43.53,32.57,43.19,32.16,43.19z" }), _jsx("path", { d: "M41.43,51.06h-5.46c-0.41,0-0.75,0.34-0.75,0.75v6.89c0,0.41,0.34,0.75,0.75,0.75h5.46c0.41,0,0.75-0.34,0.75-0.75v-6.89 C42.18,51.39,41.85,51.06,41.43,51.06z" }), _jsx("path", { d: "M41.91,18.96H24.27c-0.41,0-0.75,0.34-0.75,0.75s0.34,0.75,0.75,0.75h17.64c0.41,0,0.75-0.34,0.75-0.75 S42.33,18.96,41.91,18.96z" }), _jsx("path", { d: "M9.93,27.1h5.33c1.26,0,2.29-1.03,2.29-2.29v-5.39c0-1.26-1.03-2.29-2.29-2.29H9.93c-1.26,0-2.29,1.03-2.29,2.29v5.39 C7.64,26.07,8.67,27.1,9.93,27.1z M9.14,19.42c0-0.44,0.35-0.79,0.79-0.79h5.33c0.44,0,0.79,0.35,0.79,0.79v5.39 c0,0.43-0.35,0.79-0.79,0.79H9.93c-0.43,0-0.79-0.35-0.79-0.79V19.42z" }), _jsx("path", { d: "M17.55,38.48v-5.39c0-1.26-1.03-2.29-2.29-2.29H9.93c-1.26,0-2.29,1.03-2.29,2.29v5.39c0,1.26,1.03,2.29,2.29,2.29h5.33 C16.52,40.76,17.55,39.74,17.55,38.48z M16.05,38.48c0,0.43-0.35,0.79-0.79,0.79H9.93c-0.43,0-0.79-0.35-0.79-0.79v-5.39 c0-0.43,0.35-0.79,0.79-0.79h5.33c0.44,0,0.79,0.35,0.79,0.79V38.48z" }), _jsx("path", { d: "M23.55,25.28h11.61c0.41,0,0.75-0.34,0.75-0.75s-0.34-0.75-0.75-0.75H23.55c-0.41,0-0.75,0.34-0.75,0.75 S23.13,25.28,23.55,25.28z" }), _jsx("path", { d: "M23.55,34.12h17.64c0.41,0,0.75-0.34,0.75-0.75s-0.34-0.75-0.75-0.75H23.55c-0.41,0-0.75,0.34-0.75,0.75 S23.13,34.12,23.55,34.12z" }), _jsx("path", { d: "M35.91,38.19c0-0.41-0.34-0.75-0.75-0.75H23.55c-0.41,0-0.75,0.34-0.75,0.75s0.34,0.75,0.75,0.75h11.61 C35.57,38.94,35.91,38.6,35.91,38.19z" }), _jsx("path", { d: "M11.34,23.42c0.12,0.17,0.3,0.27,0.5,0.3c0.03,0,0.07,0.01,0.1,0.01c0.17,0,0.33-0.06,0.47-0.16l2.17-1.72 c0.32-0.26,0.38-0.73,0.12-1.05c-0.26-0.32-0.73-0.38-1.05-0.12l-1.56,1.23l-0.41-0.55c-0.25-0.33-0.71-0.41-1.05-0.16 c-0.33,0.25-0.41,0.71-0.16,1.05L11.34,23.42z" }), _jsx("path", { d: "M13.65,34.33l-1.56,1.23l-0.41-0.55c-0.24-0.33-0.71-0.41-1.05-0.16c-0.33,0.24-0.41,0.71-0.16,1.05l0.87,1.18 c0.12,0.16,0.3,0.27,0.5,0.3c0.03,0,0.07,0.01,0.1,0.01c0.17,0,0.33-0.06,0.47-0.16l2.17-1.72c0.32-0.26,0.38-0.73,0.12-1.05 C14.44,34.13,13.97,34.08,13.65,34.33z" }), _jsx("path", { d: "M62.2,14.25l-1.59-0.3c-0.13-0.02-0.23-0.13-0.27-0.27c-0.28-1.01-0.68-1.98-1.19-2.88c-0.07-0.13-0.07-0.27-0.01-0.37 l0.91-1.34c0.49-0.73,0.4-1.7-0.22-2.32L58.3,5.21C57.68,4.6,56.7,4.5,55.98,5l-1.35,0.92c-0.1,0.07-0.25,0.07-0.37,0 C53.36,5.4,52.39,5,51.39,4.72c-0.12-0.03-0.25-0.12-0.28-0.26l-0.3-1.6C50.65,2,49.9,1.37,49.02,1.37h-2.19 c-0.88,0-1.63,0.63-1.8,1.49l-0.3,1.6c-0.02,0.13-0.13,0.23-0.27,0.27C43.45,5,42.49,5.4,41.58,5.91c-0.12,0.07-0.26,0.07-0.36,0 l-1.36-0.92c-0.73-0.48-1.7-0.39-2.31,0.23L36,6.76c-0.54,0.54-0.66,1.35-0.35,2.04h-0.77V8.06c0-1.14-0.93-2.08-2.08-2.08h-2.52 c-0.45-2.64-2.73-4.62-5.49-4.62c-2.75,0-5.03,1.98-5.48,4.62h-2.53c-1.14,0-2.07,0.93-2.07,2.08V8.8H7.38 c-2.8,0-5.07,2.27-5.07,5.07v45.7c0,2.79,2.27,5.07,5.07,5.07H42.2c1.72,0,3.24-0.87,4.16-2.18h1.07c0.79,0,1.47-0.56,1.62-1.34 l0.25-1.33c0.01-0.07,0.08-0.11,0.13-0.12c0.86-0.24,1.67-0.57,2.42-1c0.06-0.03,0.13-0.04,0.18-0.01l1.12,0.76 c0.65,0.44,1.53,0.36,2.09-0.19l1.29-1.29c0.56-0.56,0.64-1.44,0.2-2.09l-0.76-1.12c-0.03-0.04-0.02-0.11,0.01-0.17 c0.44-0.77,0.77-1.58,1-2.42c0.01-0.04,0.04-0.12,0.12-0.14l1.32-0.25c0.78-0.14,1.34-0.82,1.34-1.62v-1.82 c0-0.79-0.56-1.47-1.34-1.62l-1.32-0.25c-0.08-0.02-0.12-0.1-0.12-0.13c-0.23-0.85-0.57-1.67-1-2.43c-0.03-0.06-0.04-0.13-0.01-0.18 l0.76-1.12c0.44-0.65,0.36-1.53-0.2-2.09l-1.29-1.29c-0.56-0.55-1.43-0.64-2.09-0.19l-1.12,0.76c-0.04,0.03-0.12,0.03-0.17-0.01 c-0.75-0.43-1.57-0.77-2.42-1c-0.06-0.02-0.13-0.06-0.14-0.12l-0.25-1.33c-0.14-0.78-0.82-1.34-1.62-1.34h-0.16v-3.05h1.75 c0.88,0,1.64-0.63,1.8-1.49l0.3-1.59c0.03-0.15,0.16-0.24,0.27-0.27c1.02-0.28,1.99-0.68,2.88-1.19c0.13-0.07,0.28-0.07,0.38,0 l1.35,0.91c0.73,0.49,1.7,0.4,2.32-0.21l1.55-1.55c0.62-0.62,0.72-1.6,0.22-2.33l-0.91-1.34c-0.07-0.1-0.06-0.25,0-0.37 c0.52-0.91,0.92-1.88,1.19-2.88c0.02-0.07,0.09-0.24,0.26-0.27l1.59-0.3c0.86-0.16,1.49-0.92,1.49-1.8v-2.19 C63.69,15.17,63.07,14.41,62.2,14.25z M47.92,11.29c3.23,0,5.85,2.63,5.85,5.85c0,3.23-2.63,5.85-5.85,5.85 c-0.21,0-0.43-0.01-0.65-0.04v-9.09c0-0.88-0.25-1.69-0.64-2.42C47.05,11.35,47.48,11.29,47.92,11.29z M51.26,49.21 c0,2.36-1.73,4.3-3.99,4.66v-9.33C49.53,44.9,51.26,46.85,51.26,49.21z M16.2,8.06c0-0.32,0.25-0.58,0.57-0.58h3.2 c0.4,0,0.73-0.32,0.75-0.72c0.09-2.19,1.88-3.9,4.06-3.9c2.2,0,3.98,1.71,4.07,3.9c0.02,0.4,0.35,0.72,0.75,0.72h3.2 c0.32,0,0.58,0.25,0.58,0.58v3.28c0,0.31-0.26,0.57-0.58,0.57H16.77c-0.31,0-0.57-0.25-0.57-0.57V8.06z M42.2,63.13H7.38 c-1.97,0-3.57-1.6-3.57-3.57v-45.7c0-1.97,1.6-3.57,3.57-3.57h7.33v1.05c0,1.14,0.93,2.07,2.07,2.07H32.8 c1.14,0,2.08-0.93,2.08-2.07V10.3h7.33c1.97,0,3.57,1.6,3.57,3.57v45.7C45.77,61.53,44.17,63.13,42.2,63.13z" })] })));
|
|
15
|
+
}
|
|
16
|
+
export default CheckListIcon;
|
|
@@ -6,6 +6,7 @@ export var IconTypes;
|
|
|
6
6
|
IconTypes["LEAK"] = "LEAK";
|
|
7
7
|
IconTypes["DOCUMENT"] = "DOCUMENT";
|
|
8
8
|
IconTypes["HANDSHAKE"] = "HANDSHAKE";
|
|
9
|
+
IconTypes["CHECKLIST"] = "CHECKLIST";
|
|
9
10
|
IconTypes["GENERIC"] = "GENERIC";
|
|
10
11
|
})(IconTypes || (IconTypes = {}));
|
|
11
12
|
export default IconTypes;
|
|
@@ -26,6 +26,7 @@ import ProjectIcon from '../../Icons/Construction/ProjectIcon';
|
|
|
26
26
|
import PropertyIcon from '../../Icons/Construction/PropertyIcon';
|
|
27
27
|
import SpaceIcon from '../../Icons/Construction/SpaceIcon';
|
|
28
28
|
import DocumentIcon from '../../Icons/DocumentIcon';
|
|
29
|
+
import CheckListIcon from '../../Icons/Entities/CheckListIcon';
|
|
29
30
|
import GenericEntityIcon from '../../Icons/Entities/GenericEntityIcon';
|
|
30
31
|
import HandShakeIcon from '../../Icons/Entities/HandshakeIcon';
|
|
31
32
|
import IconTypes from '../../constants/IconTypes';
|
|
@@ -69,6 +70,12 @@ function InputIcon(_a) {
|
|
|
69
70
|
height: 23,
|
|
70
71
|
width: 23,
|
|
71
72
|
}, fill: fill }, others)));
|
|
73
|
+
case IconTypes.CHECKLIST:
|
|
74
|
+
return (_jsx(CheckListIcon, __assign({ style: {
|
|
75
|
+
display: 'flex',
|
|
76
|
+
height: 24,
|
|
77
|
+
width: 24,
|
|
78
|
+
}, fill: fill }, others)));
|
|
72
79
|
case IconTypes.GENERIC:
|
|
73
80
|
default:
|
|
74
81
|
return (_jsx(GenericEntityIcon, __assign({ style: {
|
package/package.json
CHANGED