@arquimedes.co/eureka-forms 1.9.65-test → 1.9.67-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.
@@ -36,6 +36,7 @@ interface TermLink {
36
36
  export interface Classifier {
37
37
  _id: string;
38
38
  name: string;
39
+ clientName?: string;
39
40
  children: string[];
40
41
  }
41
42
  export type FormStyle = MaterialStyle;
package/dist/App.js CHANGED
@@ -273,7 +273,7 @@ function App(_a) {
273
273
  if (handleConfirmed) {
274
274
  handleConfirmed();
275
275
  }
276
- }, editable: editable, postview: postview === true, partial: partial === true, internal: internal === true, apiKey: apiKey, domain: domain, customSend: customSend, originalValues: originalValues, containerRef: containerRef, organization: organizationInfo !== null && organizationInfo !== void 0 ? organizationInfo : { idOrganization: domain }, customSteps: customSteps !== null && customSteps !== void 0 ? customSteps : {}, isWidget: isWidget === true })) })));
276
+ }, editable: editable, postview: postview === true, preview: preview === true, partial: partial === true, internal: internal === true, apiKey: apiKey, domain: domain, customSend: customSend, originalValues: originalValues, containerRef: containerRef, organization: organizationInfo !== null && organizationInfo !== void 0 ? organizationInfo : { idOrganization: domain }, customSteps: customSteps !== null && customSteps !== void 0 ? customSteps : {}, isWidget: isWidget === true })) })));
277
277
  }
278
278
  }
279
279
  export default App;
@@ -324,6 +324,9 @@ function calcDependencies(steps, originalValues, allSteps, dependencies) {
324
324
  if (depStep && dependencies[idDep] === undefined) {
325
325
  dependencies[idDep] = calcStepDependencyValue(depStep, originalValues);
326
326
  }
327
+ else if (dependencies[idDep] === undefined) {
328
+ dependencies[idDep] = originalValues[idDep];
329
+ }
327
330
  }
328
331
  }
329
332
  if (step.type === Types.MAPPER) {
@@ -20,6 +20,7 @@ export interface FormComponentProps {
20
20
  reload: Function;
21
21
  partial: boolean;
22
22
  postview: boolean;
23
+ preview: boolean;
23
24
  formStyle: FormStyle;
24
25
  domain?: string;
25
26
  apiKey: string | undefined;
@@ -36,14 +36,7 @@ function MaterialSection(_a) {
36
36
  : 'normal',
37
37
  } }, { children: (_b = section.steps) === null || _b === void 0 ? void 0 : _b.map(function (idStep) {
38
38
  var step = form.steps[idStep];
39
- //If partial is active only display steps with originalValues
40
- if (step) {
41
- return (_createElement(StepComponent, __assign({}, others, { globalEditable: others.editable, widthStats: widthStats, form: form, step: step, key: idStep, level: 0 })));
42
- }
43
- else {
44
- console.error('Step not found:', idStep);
45
- return _jsx("div", {}, idStep);
46
- }
39
+ return (_createElement(StepComponent, __assign({}, others, { globalEditable: others.editable, widthStats: widthStats, form: form, step: step, key: idStep, level: 0 })));
47
40
  }) })));
48
41
  }
49
42
  export default MaterialSection;
@@ -11,6 +11,7 @@ export interface RecursiveData {
11
11
  formStyle: FormStyle;
12
12
  /** If the formsteps can be edited (For internal) */
13
13
  editable: boolean;
14
+ preview: boolean;
14
15
  postview: boolean;
15
16
  partial: boolean;
16
17
  domain?: string;
@@ -50,7 +50,12 @@ function ClassifierSelector(_a) {
50
50
  }).map(function (idClassifier) {
51
51
  var _a;
52
52
  var classifier = (_a = form.classifiers) === null || _a === void 0 ? void 0 : _a[idClassifier];
53
- return { value: classifier === null || classifier === void 0 ? void 0 : classifier._id, label: classifier === null || classifier === void 0 ? void 0 : classifier.name };
53
+ return {
54
+ value: classifier === null || classifier === void 0 ? void 0 : classifier._id,
55
+ label: (classifier === null || classifier === void 0 ? void 0 : classifier.clientName) && others.preview
56
+ ? classifier.clientName
57
+ : classifier === null || classifier === void 0 ? void 0 : classifier.name,
58
+ };
54
59
  });
55
60
  var sizeChange = function () {
56
61
  handleSizeChange === null || handleSizeChange === void 0 ? void 0 : handleSizeChange();
@@ -32,8 +32,6 @@ function MapperElementComponent(_a) {
32
32
  return (_jsx(PillElementContainer, __assign({ handleDelete: handleDelete }, others, { step: step, size: form.size }, { children: step.rootSteps.map(function (idSubStep) {
33
33
  var _a;
34
34
  var subStep = form.steps[element.ids[idSubStep]];
35
- if (!subStep)
36
- return _jsx("div", {});
37
35
  return (_createElement(StepComponent, __assign({}, others, { globalEditable: others.editable ? (_a = step.editable) !== null && _a !== void 0 ? _a : true : false, form: form, step: subStep, key: idSubStep, level: level + 1 })));
38
36
  }) })));
39
37
  }
@@ -161,7 +161,9 @@ function SmartSelect(_a) {
161
161
  return __generator(this, function (_a) {
162
162
  if (step.dependencies) {
163
163
  invalids = calcInvalidDeps(step, dependencyStore);
164
- setError(calcDepError === null || calcDepError === void 0 ? void 0 : calcDepError(invalids.map(function (idDep) { return form.steps[idDep]; })));
164
+ setError(calcDepError === null || calcDepError === void 0 ? void 0 : calcDepError(invalids
165
+ .map(function (idDep) { return form.steps[idDep]; })
166
+ .filter(function (idDep) { return idDep !== undefined; })));
165
167
  if (!value) {
166
168
  if (invalids.length > 0) {
167
169
  setFocus(invalids[0]);
@@ -40,6 +40,10 @@ import CollapsibleStep from './CollapsibleStep/CollapsibleStep';
40
40
  function StepComponent(_a) {
41
41
  var _b, _c;
42
42
  var step = _a.step, props = __rest(_a, ["step"]);
43
+ if (!step) {
44
+ console.error('Step not found!');
45
+ return _jsx("div", {});
46
+ }
43
47
  var customStep = props.customSteps[step.type];
44
48
  var editable = props.globalEditable ? (_b = step.editable) !== null && _b !== void 0 ? _b : true : false;
45
49
  if (customStep) {
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.9.65-test",
4
+ "version":"1.9.67-test",
5
5
  "scripts": {
6
6
  "start": "react-scripts start",
7
7
  "build": "react-scripts build",