@arquimedes.co/eureka-forms 1.1.5 → 1.1.8-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 CHANGED
@@ -65,6 +65,7 @@ import FormComponent from './FormComponents/Form/Form';
65
65
  import StepTypes from './constants/FormStepTypes';
66
66
  import axiosInstance from './AxiosAPI';
67
67
  import widgetInstance from './AxiosWidget';
68
+ import LogRocket from 'logrocket';
68
69
  function App(_a) {
69
70
  var _this = this;
70
71
  var _b, _c, _d, _e;
@@ -119,6 +120,22 @@ function App(_a) {
119
120
  setOrganizationInfo(null);
120
121
  }
121
122
  }, []);
123
+ useEffect(function () {
124
+ if (organizationInfo && form !== undefined) {
125
+ if (process.env.NODE_ENV === 'production' &&
126
+ apiKey !== 'rCgWiEfOSN1TlUmHO28Y0' &&
127
+ !internal &&
128
+ !postview &&
129
+ !preview) {
130
+ LogRocket.init('63mg8a/forms-uv0gd');
131
+ LogRocket.identify(organizationInfo.idOrganization + '/' + apiKey, {
132
+ name: organizationInfo.name +
133
+ '/' +
134
+ (form ? form === null || form === void 0 ? void 0 : form.name : '404'),
135
+ });
136
+ }
137
+ }
138
+ }, [organizationInfo, form]);
122
139
  var containerRef = useRef();
123
140
  var loadOrgInfo = function (domain) { return __awaiter(_this, void 0, void 0, function () {
124
141
  var response, _a, error_1;
@@ -20,6 +20,7 @@ function CheckBoxStep(_a) {
20
20
  width: widthStats.currentBreakPoint <= step.size
21
21
  ? '100%'
22
22
  : calcStepWidth(step.size, form),
23
+ maxWidth: '100%',
23
24
  minHeight: step.description || step.required ? '55px' : '43px',
24
25
  } }, { children: [_jsxs("div", __assign({ className: styles.labelCheckBoxContainer }, { children: [_jsxs("div", __assign({ className: styles.checkboxLbl }, { children: [step.label, step.required ? ' *' : '', ":"] }), void 0), _jsx(Controller, { name: step.id, control: control, defaultValue: false, rules: {
25
26
  required: step.required
@@ -51,6 +51,7 @@ function ClassifierSelector(_a) {
51
51
  width: widthStats.currentBreakPoint <= step.size
52
52
  ? '100%'
53
53
  : calcStepWidth(step.size, form),
54
+ maxWidth: '100%',
54
55
  minHeight: step.description || step.required ? '55px' : '43px',
55
56
  } }, { children: _jsxs(RoundedSelect, __assign({ fullWidth: true, value: value, cantEdit: postview, helperTextColor: formStyle.descriptionTextColor, errorColor: formStyle.errorColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, label: step.label ? step.label : classifier.name, required: step.required, containerMargin: "0px", height: '31px', onBlur: onBlur, handleUpdate: function (event) {
56
57
  onChange(event.target.value);
@@ -1,6 +1,6 @@
1
1
  .container {
2
2
  width: fit-content;
3
- max-width: calc(100% - 20px);
3
+ max-width: 100%;
4
4
  display: flex;
5
5
  padding: 10px;
6
6
  padding-bottom: 0px;
@@ -27,7 +27,7 @@ function DatePickerStep(_a) {
27
27
  : undefined,
28
28
  }, shouldUnregister: true, render: function (_a) {
29
29
  var field = _a.field;
30
- return (_jsx(RoundedDatePicker, __assign({}, field, { pickTime: step.pickTime, showIcon: step.showIcon, inputRef: field.ref, cantEdit: postview, contrastColor: formStyle.secondaryContrastColor, accentColor: formStyle.textColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, helperTextColor: formStyle.descriptionTextColor, fontWeight: 400, label: step.label, helperText: errors[step.id]
30
+ return (_jsx(RoundedDatePicker, __assign({}, field, { pickTime: step.pickTime, showIcon: step.showIcon, inputRef: field.ref, cantEdit: postview, secondaryColor: formStyle.secondaryColor, contrastColor: formStyle.secondaryContrastColor, accentColor: formStyle.textColor, focusColor: formStyle.primaryColor, outlineColor: formStyle.outlineColor, textColor: formStyle.textColor, errorColor: formStyle.errorColor, helperTextColor: formStyle.descriptionTextColor, fontWeight: 400, label: step.label, helperText: errors[step.id]
31
31
  ? errors[step.id].message
32
32
  : step.description, error: !!errors[step.id], required: step.required }), void 0));
33
33
  } }, void 0) }), void 0));
@@ -1,6 +1,6 @@
1
1
  .container {
2
2
  width: fit-content;
3
- max-width: calc(100% - 20px);
3
+ max-width: 100%;
4
4
  display: flex;
5
5
  padding: 10px;
6
6
  padding-bottom: 0px;
@@ -2,7 +2,9 @@
2
2
  font: inherit;
3
3
  font-size: 1rem;
4
4
  }
5
-
5
+ .postview-editor {
6
+ cursor: default !important;
7
+ }
6
8
  .EF-DraftContainer .DraftEditor-root {
7
9
  height: unset;
8
10
  }
@@ -33,6 +35,10 @@
33
35
  background-color: transparent;
34
36
  }
35
37
 
38
+ .postview-editor-toolbar {
39
+ pointer-events: none;
40
+ }
41
+
36
42
  .EF-DraftContainer .rdw-editor-main {
37
43
  cursor: text;
38
44
  padding-top: 12px;
@@ -20,9 +20,10 @@ import { convertFromRaw, EditorState } from 'draft-js';
20
20
  import { useState } from 'react';
21
21
  import { ClickAwayListener } from '@material-ui/core';
22
22
  function TextAreaStep(_a) {
23
+ var _b;
23
24
  var step = _a.step, errors = _a.errors, control = _a.control, postview = _a.postview, formStyle = _a.formStyle, originalValues = _a.originalValues;
24
- var _b = useState(false), hovering = _b[0], setHovering = _b[1];
25
- var _c = useState(false), focus = _c[0], setFocus = _c[1];
25
+ var _c = useState(false), hovering = _c[0], setHovering = _c[1];
26
+ var _d = useState(false), focus = _d[0], setFocus = _d[1];
26
27
  var calcStyle = function () {
27
28
  if (focus) {
28
29
  return {
@@ -38,7 +39,6 @@ function TextAreaStep(_a) {
38
39
  else {
39
40
  return {
40
41
  border: '1px solid ' + formStyle.outlineColor,
41
- pointerEvents: postview ? 'none' : 'all',
42
42
  };
43
43
  }
44
44
  };
@@ -90,9 +90,15 @@ function TextAreaStep(_a) {
90
90
  ' RichEditor-hidePlaceholder';
91
91
  }
92
92
  }
93
+ if (postview) {
94
+ editorClassName += ' postview-editor';
95
+ }
93
96
  return (_jsx(Editor, { editorRef: field.ref, onFocus: function () {
94
97
  setFocus(true);
95
- }, stripPastedStyles: true, onBlur: field.onBlur, editorState: field.value, onEditorStateChange: field.onChange, toolbarClassName: styles.toolbar, editorClassName: editorClassName, wrapperClassName: styles.wrapper, placeholder: (_b = step.description) !== null && _b !== void 0 ? _b : '', toolbar: {
98
+ }, readOnly: postview, onBlur: field.onBlur, stripPastedStyles: true, editorState: field.value, onEditorStateChange: field.onChange, toolbarClassName: styles.toolbar +
99
+ (postview
100
+ ? ' postview-editor-toolbar'
101
+ : ''), editorClassName: editorClassName, wrapperClassName: styles.wrapper, placeholder: (_b = step.description) !== null && _b !== void 0 ? _b : '', toolbar: {
96
102
  options: [
97
103
  'inline',
98
104
  'list',
@@ -117,7 +123,7 @@ function TextAreaStep(_a) {
117
123
  else {
118
124
  return (_jsx("div", __assign({ className: styles.container, style: {
119
125
  paddingBottom: step.description || !!errors[step.id] ? '0px' : '23px',
120
- } }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: "", rules: {
126
+ } }, { children: _jsx(Controller, { name: step.id, control: control, defaultValue: (_b = originalValues[step.id]) !== null && _b !== void 0 ? _b : '', rules: {
121
127
  required: step.required
122
128
  ? 'Este campo es obligatorio'
123
129
  : undefined,
@@ -1,7 +1,7 @@
1
1
  .container,
2
2
  .textEditorContainer {
3
3
  width: fit-content;
4
- max-width: calc(100% - 20px);
4
+ max-width: 100%;
5
5
  display: flex;
6
6
  padding: 10px;
7
7
  padding-bottom: 0px;
@@ -1,6 +1,6 @@
1
1
  .container {
2
2
  width: fit-content;
3
- max-width: calc(100% - 20px);
3
+ max-width: 100%;
4
4
  display: flex;
5
5
  padding: 10px;
6
6
  padding-bottom: 0px;
@@ -16,11 +16,7 @@
16
16
  white-space: nowrap;
17
17
  overflow: hidden;
18
18
  text-overflow: ellipsis;
19
- -moz-user-select: none;
20
- -khtml-user-select: none;
21
- -webkit-user-select: none;
22
- -ms-user-select: none;
23
- user-select: none;
19
+ cursor: default;
24
20
  }
25
21
 
26
22
  .descriptionPar {
@@ -28,10 +24,6 @@
28
24
  margin: 0px;
29
25
  white-space: pre-wrap;
30
26
  margin-top: 15px;
31
- -moz-user-select: none;
32
- -khtml-user-select: none;
33
- -webkit-user-select: none;
34
- -ms-user-select: none;
35
- user-select: none;
36
27
  margin-bottom: 10px;
28
+ cursor: default;
37
29
  }
@@ -12,6 +12,8 @@ interface StyleProps {
12
12
  outlineColor?: string;
13
13
  /** The backgroundColor of the input */
14
14
  backgroundColor?: string;
15
+ /** The secondary color of the dialog */
16
+ secondaryColor?: string;
15
17
  /** The contrastColor of the input */
16
18
  contrastColor?: string;
17
19
  /** The accent color of the input */
@@ -176,7 +176,7 @@ var useDatePickerDialogStyles = function (props) {
176
176
  backgroundColor: props.contrastColor,
177
177
  },
178
178
  '& .EF-MuiPickersClockNumber-clockNumber': {
179
- color: 'var(--accent)',
179
+ color: props.accentColor,
180
180
  },
181
181
  '& .EF-MuiPickersClockNumber-clockNumberSelected': {
182
182
  color: props.backgroundColor,
@@ -196,7 +196,7 @@ var useDatePickerDialogStyles = function (props) {
196
196
  },
197
197
  '& .EF-MuiPickersDay-current': {
198
198
  color: props.backgroundColor,
199
- backgroundColor: 'var(--secondary2)',
199
+ backgroundColor: props.secondaryColor,
200
200
  },
201
201
  '& .EF-MuiPickersDay-hidden': {
202
202
  opacity: 0.4,
@@ -210,7 +210,7 @@ var useDatePickerDialogStyles = function (props) {
210
210
  }); });
211
211
  };
212
212
  function CustomDatePicker(_a) {
213
- var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.outlineColor, outlineColor = _c === void 0 ? '#0000003b' : _c, _d = _a.backgroundColor, backgroundColor = _d === void 0 ? 'white' : _d, innerBackgroundColor = _a.innerBackgroundColor, _e = _a.textColor, textColor = _e === void 0 ? '#293241' : _e, _f = _a.contrastColor, contrastColor = _f === void 0 ? '#ee6c4d' : _f, _g = _a.accentColor, accentColor = _g === void 0 ? '#293241' : _g, _h = _a.errorColor, errorColor = _h === void 0 ? '#cc2936' : _h, _j = _a.borderRadius, borderRadius = _j === void 0 ? 10 : _j, _k = _a.padding, padding = _k === void 0 ? '6px 0px 6px 12px' : _k, _l = _a.fontSize, fontSize = _l === void 0 ? '1rem' : _l, _m = _a.shrunkenFontSize, shrunkenFontSize = _m === void 0 ? '1rem' : _m, _o = _a.helperTextColor, helperTextColor = _o === void 0 ? '#989898' : _o, _p = _a.fontWeight, fontWeight = _p === void 0 ? '300' : _p, _q = _a.showIcon, showIcon = _q === void 0 ? true : _q, _r = _a.cantEdit, cantEdit = _r === void 0 ? false : _r, _s = _a.pickTime, pickTime = _s === void 0 ? false : _s, onChange = _a.onChange, required = _a.required, others = __rest(_a, ["focusColor", "outlineColor", "backgroundColor", "innerBackgroundColor", "textColor", "contrastColor", "accentColor", "errorColor", "borderRadius", "padding", "fontSize", "shrunkenFontSize", "helperTextColor", "fontWeight", "showIcon", "cantEdit", "pickTime", "onChange", "required"]);
213
+ var _b = _a.focusColor, focusColor = _b === void 0 ? '#3d5a7f' : _b, _c = _a.secondaryColor, secondaryColor = _c === void 0 ? '#98c1d9' : _c, _d = _a.outlineColor, outlineColor = _d === void 0 ? '#0000003b' : _d, _e = _a.backgroundColor, backgroundColor = _e === void 0 ? 'white' : _e, innerBackgroundColor = _a.innerBackgroundColor, _f = _a.textColor, textColor = _f === void 0 ? '#293241' : _f, _g = _a.contrastColor, contrastColor = _g === void 0 ? '#ee6c4d' : _g, _h = _a.accentColor, accentColor = _h === void 0 ? '#293241' : _h, _j = _a.errorColor, errorColor = _j === void 0 ? '#cc2936' : _j, _k = _a.borderRadius, borderRadius = _k === void 0 ? 10 : _k, _l = _a.padding, padding = _l === void 0 ? '6px 0px 6px 12px' : _l, _m = _a.fontSize, fontSize = _m === void 0 ? '1rem' : _m, _o = _a.shrunkenFontSize, shrunkenFontSize = _o === void 0 ? '1rem' : _o, _p = _a.helperTextColor, helperTextColor = _p === void 0 ? '#989898' : _p, _q = _a.fontWeight, fontWeight = _q === void 0 ? '300' : _q, _r = _a.showIcon, showIcon = _r === void 0 ? true : _r, _s = _a.cantEdit, cantEdit = _s === void 0 ? false : _s, _t = _a.pickTime, pickTime = _t === void 0 ? false : _t, onChange = _a.onChange, required = _a.required, others = __rest(_a, ["focusColor", "secondaryColor", "outlineColor", "backgroundColor", "innerBackgroundColor", "textColor", "contrastColor", "accentColor", "errorColor", "borderRadius", "padding", "fontSize", "shrunkenFontSize", "helperTextColor", "fontWeight", "showIcon", "cantEdit", "pickTime", "onChange", "required"]);
214
214
  var classes = useDatePickerStyles({
215
215
  padding: padding,
216
216
  cantEdit: cantEdit,
@@ -247,6 +247,7 @@ function CustomDatePicker(_a) {
247
247
  padding: padding,
248
248
  cantEdit: cantEdit,
249
249
  textColor: textColor,
250
+ secondaryColor: secondaryColor,
250
251
  accentColor: accentColor,
251
252
  contrastColor: contrastColor,
252
253
  focusColor: focusColor,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arquimedes.co/eureka-forms",
3
3
  "repository": "git://github.com/Arquimede5/Eureka-Forms.git",
4
- "version": "1.1.5",
4
+ "version":"1.1.8-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",
@@ -72,7 +72,9 @@
72
72
  "draft-js": "^0.11.x",
73
73
  "react-draft-wysiwyg": "^1.14.x",
74
74
  "react-hook-form": "^7.6.4",
75
- "react-router-dom": "^5.2.0"
75
+ "react-router-dom": "^5.2.0",
76
+ "babel-plugin-add-react-displayname": "0.0.x",
77
+ "logrocket": "^2.x.x"
76
78
  },
77
79
  "publishConfig": {
78
80
  "access": "public"