@arquimedes.co/eureka-forms 1.9.98-test → 1.9.100-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.d.ts +3 -2
- package/dist/App.js +59 -61
- package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +1 -1
- package/dist/FormComponents/Section/Section.d.ts +1 -0
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/Element/PillMapperElement/PillMapperElement.js +6 -5
- package/dist/FormComponents/Step/MapperStep/MaterialMapperStep/MaterialMapperStep.js +37 -32
- package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +13 -2
- package/package.json +1 -1
package/dist/App.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { Classifier, Form } from './@Types/Form';
|
|
3
|
-
import { FormStep } from './@Types/FormStep';
|
|
3
|
+
import { FormStep, Mapper } from './@Types/FormStep';
|
|
4
4
|
export interface AppProps {
|
|
5
5
|
/** If the app is currently a widget */
|
|
6
6
|
isWidget?: boolean;
|
|
@@ -49,4 +49,5 @@ export interface CustomStep {
|
|
|
49
49
|
}
|
|
50
50
|
declare function App({ apiKey, domain, preview, partial, formData, postview, editable, isWidget, internal, valuesData, customSend, customSteps, classifiers, handleConfirmed, customStepProps, ...others }: AppProps): JSX.Element;
|
|
51
51
|
export default App;
|
|
52
|
-
export declare const
|
|
52
|
+
export declare const addInitialMapper: (newValues: Record<string, any>, step: Mapper) => void;
|
|
53
|
+
export declare const mapOriginalValue: (step: FormStep, value: any, newValues: Record<string, any>, form?: Form) => any;
|
package/dist/App.js
CHANGED
|
@@ -337,84 +337,82 @@ var migrateStep = function (steps, pStep) {
|
|
|
337
337
|
return step;
|
|
338
338
|
};
|
|
339
339
|
var mapOriginalValues = function (originalValues, form) {
|
|
340
|
-
var _a;
|
|
341
340
|
var newValues = {};
|
|
342
|
-
for (var _i = 0,
|
|
343
|
-
var idValue =
|
|
341
|
+
for (var _i = 0, _a = Object.keys(originalValues); _i < _a.length; _i++) {
|
|
342
|
+
var idValue = _a[_i];
|
|
344
343
|
var step = form.steps[idValue];
|
|
345
344
|
if (step) {
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
for (var _c = 0, elements_1 = elements; _c < elements_1.length; _c++) {
|
|
350
|
-
var element = elements_1[_c];
|
|
351
|
-
var idElement = (_a = element.id) !== null && _a !== void 0 ? _a : nanoid();
|
|
352
|
-
var mappedElement = {
|
|
353
|
-
id: idElement,
|
|
354
|
-
ids: {},
|
|
355
|
-
value: element.value,
|
|
356
|
-
};
|
|
357
|
-
for (var _d = 0, _e = Object.keys(step.steps); _d < _e.length; _d++) {
|
|
358
|
-
var idStep = _e[_d];
|
|
359
|
-
var newIdStep = step.id + '-' + idStep + '-' + idElement;
|
|
360
|
-
mappedElement.ids[idStep] = newIdStep;
|
|
361
|
-
if (element[idStep] !== undefined) {
|
|
362
|
-
var value = mapOriginalValue(step.steps[idStep], element[idStep], form);
|
|
363
|
-
if (value !== undefined) {
|
|
364
|
-
newValues[newIdStep] = value;
|
|
365
|
-
}
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
mappedElements.push(mappedElement);
|
|
369
|
-
}
|
|
370
|
-
newValues[step.id] = mappedElements;
|
|
371
|
-
}
|
|
372
|
-
else {
|
|
373
|
-
var value = mapOriginalValue(step, originalValues[step.id], form);
|
|
374
|
-
if (value !== undefined) {
|
|
375
|
-
newValues[step.id] = value;
|
|
376
|
-
}
|
|
345
|
+
var value = mapOriginalValue(step, originalValues[step.id], newValues, form);
|
|
346
|
+
if (value !== undefined) {
|
|
347
|
+
newValues[step.id] = value;
|
|
377
348
|
}
|
|
378
349
|
}
|
|
379
350
|
else {
|
|
380
351
|
newValues[idValue] = originalValues[idValue];
|
|
381
352
|
}
|
|
382
353
|
}
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
return newValues;
|
|
386
|
-
};
|
|
387
|
-
var addInitialMappers = function (newValues, steps) {
|
|
388
|
-
for (var _i = 0, _a = Object.values(steps); _i < _a.length; _i++) {
|
|
389
|
-
var step = _a[_i];
|
|
354
|
+
for (var _b = 0, _c = Object.values(form.steps); _b < _c.length; _b++) {
|
|
355
|
+
var step = _c[_b];
|
|
390
356
|
if (step.type !== StepTypes.MAPPER || newValues[step.id])
|
|
391
357
|
continue;
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
358
|
+
addInitialMapper(newValues, step);
|
|
359
|
+
}
|
|
360
|
+
return newValues;
|
|
361
|
+
};
|
|
362
|
+
export var addInitialMapper = function (newValues, step) {
|
|
363
|
+
var idElement = nanoid();
|
|
364
|
+
var newElement = {
|
|
365
|
+
ids: {},
|
|
366
|
+
id: idElement,
|
|
367
|
+
};
|
|
368
|
+
var newSteps = {};
|
|
369
|
+
for (var _i = 0, _a = Object.keys(step.steps); _i < _a.length; _i++) {
|
|
370
|
+
var idStep = _a[_i];
|
|
371
|
+
var baseStep = JSON.parse(JSON.stringify(step.steps[idStep]));
|
|
372
|
+
var newIdStep = step.id + '-' + idStep + '-' + idElement;
|
|
373
|
+
baseStep.id = newIdStep;
|
|
374
|
+
newElement.ids[idStep] = newIdStep;
|
|
375
|
+
newSteps[newIdStep] = baseStep;
|
|
376
|
+
if (baseStep.type === StepTypes.MAPPER) {
|
|
377
|
+
addInitialMapper(newValues, baseStep);
|
|
405
378
|
}
|
|
406
|
-
addInitialMappers(newValues, step.steps);
|
|
407
|
-
newValues[step.id] = [newElement];
|
|
408
379
|
}
|
|
380
|
+
newValues[step.id] = [newElement];
|
|
409
381
|
};
|
|
410
|
-
export var mapOriginalValue = function (step, value, form) {
|
|
411
|
-
var _a, _b, _c, _d;
|
|
382
|
+
export var mapOriginalValue = function (step, value, newValues, form) {
|
|
383
|
+
var _a, _b, _c, _d, _e;
|
|
412
384
|
switch (step === null || step === void 0 ? void 0 : step.type) {
|
|
385
|
+
case StepTypes.MAPPER: {
|
|
386
|
+
var elements = value;
|
|
387
|
+
var mappedElements = [];
|
|
388
|
+
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
|
|
389
|
+
var element = elements_1[_i];
|
|
390
|
+
var idElement = (_a = element.id) !== null && _a !== void 0 ? _a : nanoid();
|
|
391
|
+
var mappedElement = {
|
|
392
|
+
id: idElement,
|
|
393
|
+
ids: {},
|
|
394
|
+
value: element.value,
|
|
395
|
+
};
|
|
396
|
+
for (var _f = 0, _g = Object.keys(step.steps); _f < _g.length; _f++) {
|
|
397
|
+
var idStep = _g[_f];
|
|
398
|
+
var newIdStep = step.id + '-' + idStep + '-' + idElement;
|
|
399
|
+
mappedElement.ids[idStep] = newIdStep;
|
|
400
|
+
if (element[idStep] !== undefined) {
|
|
401
|
+
var value_1 = mapOriginalValue(step.steps[idStep], element[idStep], newValues, form);
|
|
402
|
+
if (value_1 !== undefined) {
|
|
403
|
+
newValues[newIdStep] = value_1;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
mappedElements.push(mappedElement);
|
|
408
|
+
}
|
|
409
|
+
return mappedElements;
|
|
410
|
+
}
|
|
413
411
|
case StepTypes.TEXTAREA: {
|
|
414
412
|
if (step.hasTextEditor) {
|
|
415
413
|
return calcDefaultDraftValue(value);
|
|
416
414
|
}
|
|
417
|
-
return (
|
|
415
|
+
return (_b = value.value) !== null && _b !== void 0 ? _b : value;
|
|
418
416
|
}
|
|
419
417
|
case StepTypes.SELECTOR: {
|
|
420
418
|
var option = step.options.find(function (option) { return option.value == value; });
|
|
@@ -423,9 +421,9 @@ export var mapOriginalValue = function (step, value, form) {
|
|
|
423
421
|
return value;
|
|
424
422
|
}
|
|
425
423
|
case StepTypes.CLASSIFIER_SELECTOR: {
|
|
426
|
-
var stepClassifier = (
|
|
424
|
+
var stepClassifier = (_c = form === null || form === void 0 ? void 0 : form.classifiers) === null || _c === void 0 ? void 0 : _c[(_d = step.idClassifier) !== null && _d !== void 0 ? _d : ''];
|
|
427
425
|
if (stepClassifier) {
|
|
428
|
-
var classifier = (
|
|
426
|
+
var classifier = (_e = form.classifiers) === null || _e === void 0 ? void 0 : _e[value];
|
|
429
427
|
if (!(value === null || value === void 0 ? void 0 : value.value))
|
|
430
428
|
return { value: value, label: classifier === null || classifier === void 0 ? void 0 : classifier.name };
|
|
431
429
|
}
|
|
@@ -165,7 +165,7 @@ function ColumnForm(_a) {
|
|
|
165
165
|
return (_jsxs("div", __assign({ className: styles.container, style: { color: formStyle.textColor } }, { children: [loading && _jsx("div", { className: styles.curtain }), showConfirmation !== undefined && (_jsx(ConfirmationDialog, { formStyle: formStyle, confirmation: showConfirmation, onClose: function () {
|
|
166
166
|
reload();
|
|
167
167
|
setShowConfirmation(undefined);
|
|
168
|
-
} })), sections.map(function (idSection, index) { return (_jsx(SectionComponent, __assign({ form: form, sendLabel: sendLabel, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps, setDependencyStore: setDependencyStore, dependencyStore: dependencyStore, setFocus: setFocus }, others), idSection)); }), form.terms &&
|
|
168
|
+
} })), sections.map(function (idSection, index) { return (_jsx(SectionComponent, __assign({ form: form, sendLabel: sendLabel, domain: domain, postview: postview, clearErrors: clearErrors, widthStats: widthStats, control: control, getValues: getValues, originalValues: originalValues, errors: errors, index: index, setSections: setSections, section: form.sections[idSection], formStyle: formStyle, customSteps: customSteps, setDependencyStore: setDependencyStore, dependencyStore: dependencyStore, setFocus: setFocus, setValue: setValue }, others), idSection)); }), form.terms &&
|
|
169
169
|
(!internal || (internal && postview)) &&
|
|
170
170
|
(originalValues === null || originalValues === void 0 ? void 0 : originalValues['INTERNAL_CREATING_AGENT']) === undefined && (_jsx("div", __assign({ className: styles.termsContainer, style: {
|
|
171
171
|
width: (form.size.blockSize + form.size.spacingSize) *
|
|
@@ -27,6 +27,7 @@ export interface RecursiveData {
|
|
|
27
27
|
dependencyStore: Record<string, any>;
|
|
28
28
|
setDependencyStore: React.Dispatch<React.SetStateAction<Record<string, any>>>;
|
|
29
29
|
setFocus: (id: string) => void;
|
|
30
|
+
setValue: (id: string, value: any) => void;
|
|
30
31
|
}
|
|
31
32
|
export interface SectionComponentProps extends RecursiveData {
|
|
32
33
|
/** The custom send label to display */
|
|
@@ -17,14 +17,15 @@ function PillMapperElement(_a) {
|
|
|
17
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;
|
|
18
18
|
var size = form.size;
|
|
19
19
|
var calcName = (customElementModifiers !== null && customElementModifiers !== void 0 ? customElementModifiers : {}).calcName;
|
|
20
|
+
var name = calcName
|
|
21
|
+
? calcName(element)
|
|
22
|
+
: step.unitLabel
|
|
23
|
+
? step.unitLabel + ' ' + (num + 1).toString()
|
|
24
|
+
: '';
|
|
20
25
|
return (_jsx("div", __assign({ className: widthStats.isMobile ? styles.mobileContainer : styles.container }, { children: _jsxs("div", __assign({ className: styles.contentContainer, style: {
|
|
21
26
|
width: (size.blockSize + size.spacingSize) *
|
|
22
27
|
((_c = (_b = step.style) === null || _b === void 0 ? void 0 : _b.size) !== null && _c !== void 0 ? _c : size.blockNum - 1),
|
|
23
|
-
} }, { children: [_jsx("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: loading
|
|
24
|
-
? ''
|
|
25
|
-
: (calcName
|
|
26
|
-
? calcName(element)
|
|
27
|
-
: step.unitLabel + ' ' + (num + 1)) + ':' })), step.deletable !== false && (_jsx("div", __assign({ className: !editable || postview
|
|
28
|
+
} }, { children: [_jsx("div", __assign({ className: styles.titleLbl, style: { color: formStyle.textColor } }, { children: loading ? '' : name })), step.deletable !== false && (_jsx("div", __assign({ className: !editable || postview
|
|
28
29
|
? styles.disabledDeleteBtn
|
|
29
30
|
: styles.deleteBtn, style: { color: formStyle.textColor }, onClick: function () {
|
|
30
31
|
if (editable && !postview) {
|
|
@@ -30,6 +30,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
30
30
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
31
31
|
};
|
|
32
32
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
33
|
+
import { createElement as _createElement } from "react";
|
|
33
34
|
import React, { useState, useEffect, cloneElement } from 'react';
|
|
34
35
|
import styles from './MaterialMapperStep.module.css';
|
|
35
36
|
import { Controller } from 'react-hook-form';
|
|
@@ -40,46 +41,44 @@ import { calcStepDependencyValue } from '../../../Form/ColumnForm/ColumnForm';
|
|
|
40
41
|
import MapperElementComponent from './Element/MapperElement';
|
|
41
42
|
import AYFFormStepTypes from '../../../../constants/AYFFormStepTypes';
|
|
42
43
|
import CBRFormStepTypes from '../../../../constants/CBRFormStepTypes';
|
|
44
|
+
import { addInitialMapper } from '../../../../App';
|
|
43
45
|
export function ElementsComponent(_a) {
|
|
44
46
|
var _b, _c;
|
|
45
47
|
var step = _a.step, form = _a.form, errors = _a.errors, inputRef = _a.inputRef, editable = _a.editable, postview = _a.postview, elements = _a.elements, formStyle = _a.formStyle, customAdd = _a.customAdd, _d = _a.loading, loading = _d === void 0 ? false : _d, dependencyStore = _a.dependencyStore, setDependencyStore = _a.setDependencyStore, others = __rest(_a, ["step", "form", "errors", "inputRef", "editable", "postview", "elements", "formStyle", "customAdd", "loading", "dependencyStore", "setDependencyStore"]);
|
|
46
48
|
var _e = useState(true), firstRender = _e[0], setFirstRender = _e[1];
|
|
47
49
|
/** Mapper Steps to pass down */
|
|
48
|
-
var _f = useState()
|
|
49
|
-
var onChange = function (elements) {
|
|
50
|
+
var _f = useState((function () {
|
|
50
51
|
var _a;
|
|
51
|
-
var
|
|
52
|
+
var newSteps = {};
|
|
53
|
+
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
|
|
54
|
+
var element = elements_1[_i];
|
|
55
|
+
var elemSteps = {};
|
|
56
|
+
for (var _b = 0, _c = Object.keys(step.steps); _b < _c.length; _b++) {
|
|
57
|
+
var idStep = _c[_b];
|
|
58
|
+
var baseStep = JSON.parse(JSON.stringify((_a = step.steps[idStep]) !== null && _a !== void 0 ? _a : '{}'));
|
|
59
|
+
var newIdStep = element.ids[idStep];
|
|
60
|
+
baseStep.id = newIdStep;
|
|
61
|
+
elemSteps[newIdStep] = baseStep;
|
|
62
|
+
newSteps[newIdStep] = baseStep;
|
|
63
|
+
}
|
|
64
|
+
calcRecursiveData(element, elemSteps, {}, others.customSteps, others.originalValues);
|
|
65
|
+
}
|
|
66
|
+
return newSteps;
|
|
67
|
+
})()), localSteps = _f[0], setLocalSteps = _f[1];
|
|
68
|
+
var onChange = function (elements) {
|
|
52
69
|
if (dependencyStore[step.id] !== undefined && customAdd) {
|
|
53
|
-
setDependencyStore(
|
|
70
|
+
setDependencyStore(function (dependencyStore) {
|
|
71
|
+
var _a;
|
|
72
|
+
var _b;
|
|
73
|
+
return (__assign(__assign({}, dependencyStore), (_a = {}, _a[step.id] = (_b = elements.map(function (element) { return element.value; })) !== null && _b !== void 0 ? _b : null, _a)));
|
|
74
|
+
});
|
|
54
75
|
}
|
|
55
76
|
others.onChange(elements);
|
|
56
77
|
};
|
|
57
78
|
useEffect(function () {
|
|
58
|
-
var _a;
|
|
59
79
|
if (firstRender) {
|
|
60
|
-
if (elements.length
|
|
61
|
-
|
|
62
|
-
var deps = __assign({}, dependencyStore);
|
|
63
|
-
for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
|
|
64
|
-
var element = elements_1[_i];
|
|
65
|
-
var elemSteps = {};
|
|
66
|
-
for (var _b = 0, _c = Object.keys(step.steps); _b < _c.length; _b++) {
|
|
67
|
-
var idStep = _c[_b];
|
|
68
|
-
var baseStep = JSON.parse(JSON.stringify((_a = step.steps[idStep]) !== null && _a !== void 0 ? _a : '{}'));
|
|
69
|
-
var newIdStep = element.ids[idStep];
|
|
70
|
-
baseStep.id = newIdStep;
|
|
71
|
-
elemSteps[newIdStep] = baseStep;
|
|
72
|
-
newSteps[newIdStep] = baseStep;
|
|
73
|
-
}
|
|
74
|
-
calcRecursiveData(element, elemSteps, deps, others.customSteps, others.originalValues);
|
|
75
|
-
}
|
|
76
|
-
setDependencyStore(deps);
|
|
77
|
-
setLocalSteps(__assign(__assign({}, localSteps), newSteps));
|
|
78
|
-
}
|
|
79
|
-
else if (elements.length === 0 && !postview && editable) {
|
|
80
|
-
if (customAdd)
|
|
81
|
-
setLocalSteps({});
|
|
82
|
-
else
|
|
80
|
+
if (elements.length === 0 && !postview && editable) {
|
|
81
|
+
if (!customAdd)
|
|
83
82
|
handleAddElement();
|
|
84
83
|
}
|
|
85
84
|
setFirstRender(false);
|
|
@@ -96,6 +95,7 @@ export function ElementsComponent(_a) {
|
|
|
96
95
|
value: value,
|
|
97
96
|
};
|
|
98
97
|
var newSteps = {};
|
|
98
|
+
var newValues = {};
|
|
99
99
|
for (var _i = 0, _a = Object.keys(step.steps); _i < _a.length; _i++) {
|
|
100
100
|
var idStep = _a[_i];
|
|
101
101
|
var baseStep = JSON.parse(JSON.stringify(step.steps[idStep]));
|
|
@@ -103,6 +103,13 @@ export function ElementsComponent(_a) {
|
|
|
103
103
|
baseStep.id = newIdStep;
|
|
104
104
|
newElement.ids[idStep] = newIdStep;
|
|
105
105
|
newSteps[newIdStep] = baseStep;
|
|
106
|
+
if (baseStep.type === StepTypes.MAPPER) {
|
|
107
|
+
addInitialMapper(newValues, baseStep);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
for (var _b = 0, _c = Object.entries(newValues); _b < _c.length; _b++) {
|
|
111
|
+
var _d = _c[_b], key = _d[0], elems = _d[1];
|
|
112
|
+
others.setValue(key, elems);
|
|
106
113
|
}
|
|
107
114
|
var deps = __assign({}, dependencyStore);
|
|
108
115
|
calcRecursiveData(newElement, newSteps, others.customSteps, deps);
|
|
@@ -121,14 +128,12 @@ export function ElementsComponent(_a) {
|
|
|
121
128
|
}
|
|
122
129
|
};
|
|
123
130
|
var container = calcStyles().container;
|
|
124
|
-
if (!localSteps)
|
|
125
|
-
return _jsx("div", {});
|
|
126
131
|
var mapElements = function () {
|
|
127
|
-
return elements.map(function (element, index) { return (
|
|
132
|
+
return elements.map(function (element, index) { return (_createElement(MapperElementComponent, __assign({}, others, { key: element.id, num: index, loading: loading, element: element, formStyle: formStyle, step: step, errors: errors, form: __assign(__assign({}, form), { steps: __assign(__assign({}, form.steps), localSteps) }), editable: editable, postview: postview, dependencyStore: dependencyStore, setDependencyStore: setDependencyStore, handleDelete: function () {
|
|
128
133
|
var tempElements = __spreadArray([], elements, true);
|
|
129
134
|
tempElements[index].deleted = true;
|
|
130
135
|
onChange(tempElements);
|
|
131
|
-
} }
|
|
136
|
+
} }))); });
|
|
132
137
|
};
|
|
133
138
|
if (step.style.type === MapperStyleTypes.INLINE)
|
|
134
139
|
return _jsx(React.Fragment, { children: mapElements() });
|
|
@@ -9,6 +9,17 @@ var __assign = (this && this.__assign) || function () {
|
|
|
9
9
|
};
|
|
10
10
|
return __assign.apply(this, arguments);
|
|
11
11
|
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
12
23
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
13
24
|
import { Controller } from 'react-hook-form';
|
|
14
25
|
import { calcStepWidth } from '../../StepFunctions';
|
|
@@ -37,8 +48,8 @@ function TitleStep(props) {
|
|
|
37
48
|
title: props.step.title,
|
|
38
49
|
description: props.step.description,
|
|
39
50
|
}, render: function (_a) {
|
|
40
|
-
var
|
|
41
|
-
return _jsx(Title, __assign({}, props, field));
|
|
51
|
+
var _b = _a.field, ref = _b.ref, field = __rest(_b, ["ref"]);
|
|
52
|
+
return (_jsx(Title, __assign({}, props, field, { inputRef: ref })));
|
|
42
53
|
} }));
|
|
43
54
|
}
|
|
44
55
|
export default TitleStep;
|
package/package.json
CHANGED