@arquimedes.co/eureka-forms 0.1.2 → 0.2.5

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.
Files changed (117) hide show
  1. package/dist/@Types/@Types.d.ts +1 -1
  2. package/dist/@Types/@Types.js +1 -1
  3. package/dist/@Types/Form.d.ts +63 -63
  4. package/dist/@Types/Form.js +1 -1
  5. package/dist/@Types/FormStep.d.ts +105 -105
  6. package/dist/@Types/FormStep.js +1 -1
  7. package/dist/@Types/Organization.d.ts +16 -16
  8. package/dist/@Types/Organization.js +1 -1
  9. package/dist/App.d.ts +34 -32
  10. package/dist/App.js +262 -261
  11. package/dist/App.module.css +21 -0
  12. package/dist/FormComponents/Form/ColumnForm/ColumnForm.d.ts +4 -4
  13. package/dist/FormComponents/Form/ColumnForm/ColumnForm.js +232 -232
  14. package/dist/FormComponents/Form/ColumnForm/ColumnForm.module.css +46 -0
  15. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.d.ts +12 -12
  16. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.js +33 -33
  17. package/dist/FormComponents/Form/ConfirmationDialog/ConfirmationDialog.module.css +48 -0
  18. package/dist/FormComponents/Form/Form.d.ts +24 -23
  19. package/dist/FormComponents/Form/Form.js +116 -116
  20. package/dist/FormComponents/Form/Form.module.css +39 -0
  21. package/dist/FormComponents/Form/StepperForm/StepperForm.d.ts +4 -4
  22. package/dist/FormComponents/Form/StepperForm/StepperForm.js +6 -6
  23. package/dist/FormComponents/Form/StepperForm/StepperForm.module.css +0 -0
  24. package/dist/FormComponents/Section/MaterialSection/MaterialSection.d.ts +4 -4
  25. package/dist/FormComponents/Section/MaterialSection/MaterialSection.js +42 -42
  26. package/dist/FormComponents/Section/MaterialSection/MaterialSection.module.css +8 -0
  27. package/dist/FormComponents/Section/Section.d.ts +24 -23
  28. package/dist/FormComponents/Section/Section.js +25 -25
  29. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.d.ts +9 -9
  30. package/dist/FormComponents/Step/ClassifierSelectorStep/ClassifierSelectorStep.js +37 -37
  31. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.d.ts +4 -4
  32. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.js +105 -105
  33. package/dist/FormComponents/Step/ClassifierSelectorStep/MaterialClassifierSelectorStep/MaterialClassifierSelectorStep.module.css +25 -0
  34. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.d.ts +9 -9
  35. package/dist/FormComponents/Step/DatePickerStep/DatePickerStep.js +25 -25
  36. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.d.ts +4 -4
  37. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.js +35 -35
  38. package/dist/FormComponents/Step/DatePickerStep/MaterialDatePickerStep/MaterialDatePickerStep.module.css +9 -0
  39. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.d.ts +9 -9
  40. package/dist/FormComponents/Step/FileUploadStep/FileUploadStep.js +25 -25
  41. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.d.ts +11 -11
  42. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.js +110 -110
  43. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/FileComponent/FileComponent.module.css +52 -0
  44. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.d.ts +13 -13
  45. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.js +165 -165
  46. package/dist/FormComponents/Step/FileUploadStep/MaterialFileUploadStep/MaterialFileUploadStep.module.css +45 -0
  47. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.d.ts +4 -4
  48. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.js +99 -99
  49. package/dist/FormComponents/Step/SelectorStep/MaterialSelectorStep/MaterialSelectorStep.module.css +25 -0
  50. package/dist/FormComponents/Step/SelectorStep/SelectorStep.d.ts +9 -9
  51. package/dist/FormComponents/Step/SelectorStep/SelectorStep.js +37 -37
  52. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.d.ts +4 -4
  53. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.js +11 -11
  54. package/dist/FormComponents/Step/SeparatorStep/MaterialSeparatorStep/MaterialSeparatorStep.module.css +7 -0
  55. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.d.ts +9 -9
  56. package/dist/FormComponents/Step/SeparatorStep/SeparatorStep.js +37 -37
  57. package/dist/FormComponents/Step/Step.d.ts +10 -10
  58. package/dist/FormComponents/Step/Step.js +73 -64
  59. package/dist/FormComponents/Step/StepFunctions.d.ts +5 -5
  60. package/dist/FormComponents/Step/StepFunctions.js +51 -51
  61. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/DraftEditor.css +35 -0
  62. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.d.ts +6 -6
  63. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.js +112 -112
  64. package/dist/FormComponents/Step/TextAreaStep/MaterialTextAreaStep/MaterialTextAreaStep.module.css +58 -0
  65. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.d.ts +9 -9
  66. package/dist/FormComponents/Step/TextAreaStep/TextAreaStep.js +25 -25
  67. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.d.ts +4 -4
  68. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.js +43 -43
  69. package/dist/FormComponents/Step/TextInputStep/MaterialTextInputStep/MaterialTextInputStep.module.css +9 -0
  70. package/dist/FormComponents/Step/TextInputStep/TextInputStep.d.ts +9 -9
  71. package/dist/FormComponents/Step/TextInputStep/TextInputStep.js +25 -25
  72. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.d.ts +4 -4
  73. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.js +18 -18
  74. package/dist/FormComponents/Step/TitleStep/MaterialTitleStep/MaterialTitleStep.module.css +35 -0
  75. package/dist/FormComponents/Step/TitleStep/TitleStep.d.ts +9 -9
  76. package/dist/FormComponents/Step/TitleStep/TitleStep.js +37 -37
  77. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.d.ts +4 -4
  78. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.js +77 -77
  79. package/dist/FormComponents/Term/MaterialTerm/MaterialTerm.module.css +73 -0
  80. package/dist/FormComponents/Term/Term.d.ts +15 -15
  81. package/dist/FormComponents/Term/Term.js +25 -25
  82. package/dist/Widget.d.ts +1 -1
  83. package/dist/Widget.js +39 -56
  84. package/dist/constants/Files/FileExtensions.d.ts +3 -3
  85. package/dist/constants/Files/FileExtensions.js +65 -65
  86. package/dist/constants/Files/FileMaxSize.d.ts +2 -2
  87. package/dist/constants/Files/FileMaxSize.js +2 -2
  88. package/dist/constants/FormStepTypes.d.ts +33 -33
  89. package/dist/constants/FormStepTypes.js +39 -39
  90. package/dist/constants/InternalFormStyle.d.ts +3 -3
  91. package/dist/constants/InternalFormStyle.js +12 -12
  92. package/dist/constants/MaterialClassNameSeed.d.ts +1 -1
  93. package/dist/constants/MaterialClassNameSeed.js +1 -1
  94. package/dist/controllers/FileService.d.ts +5 -5
  95. package/dist/controllers/FileService.js +89 -89
  96. package/dist/index.d.ts +1 -2
  97. package/dist/index.js +16 -17
  98. package/dist/index.lib.d.ts +3 -0
  99. package/dist/index.lib.js +3 -0
  100. package/dist/index.module.css +14 -0
  101. package/dist/shared/Loader/Loader.d.ts +18 -18
  102. package/dist/shared/Loader/Loader.js +26 -26
  103. package/dist/shared/Loader/Loader.module.css +12 -0
  104. package/dist/shared/Navbar/Navbar.d.ts +9 -9
  105. package/dist/shared/Navbar/Navbar.js +18 -18
  106. package/dist/shared/Navbar/Navbar.module.css +18 -0
  107. package/dist/shared/RoundedButton/RoundedButton.d.ts +30 -30
  108. package/dist/shared/RoundedButton/RoundedButton.js +45 -45
  109. package/dist/shared/RoundedCheckBox/RoundedCheckBox.d.ts +24 -24
  110. package/dist/shared/RoundedCheckBox/RoundedCheckBox.js +101 -101
  111. package/dist/shared/RoundedDatePicker/RoundedDatePicker.d.ts +40 -40
  112. package/dist/shared/RoundedDatePicker/RoundedDatePicker.js +246 -246
  113. package/dist/shared/RoundedSelect/RoundedSelect.d.ts +42 -42
  114. package/dist/shared/RoundedSelect/RoundedSelect.js +171 -171
  115. package/dist/shared/RoundedTextField/RoundedTextField.d.ts +41 -41
  116. package/dist/shared/RoundedTextField/RoundedTextField.js +138 -138
  117. package/package.json +2 -2
@@ -0,0 +1,48 @@
1
+ .confirmationContainer {
2
+ display: flex;
3
+ flex-direction: column;
4
+ width: fit-content;
5
+ max-height: 60vh;
6
+ max-width: 80vw;
7
+ position: relative;
8
+ }
9
+
10
+ .checkContainer {
11
+ margin-left: auto;
12
+ margin-right: auto;
13
+ padding-top: 30px;
14
+ font-size: 10rem;
15
+ height: 10rem;
16
+ margin-bottom: 15px;
17
+ }
18
+
19
+ .messageContainer {
20
+ margin-top: 5px;
21
+ margin-left: 20px;
22
+ margin-right: 20px;
23
+ font-size: 1.2rem;
24
+ text-align: center;
25
+ }
26
+
27
+ .linkContainer {
28
+ margin-top: 20px;
29
+ font-size: 1.2rem;
30
+ margin-right: auto;
31
+ margin-left: 20px;
32
+ }
33
+ .url {
34
+ font-weight: bolder;
35
+ margin-left: 40px;
36
+ margin-right: 40px;
37
+ margin-top: 5px;
38
+ margin-bottom: 40px;
39
+ cursor: pointer;
40
+ font-size: 1rem;
41
+ }
42
+ .closeIcon {
43
+ right: 15px;
44
+ top: 10px;
45
+ font-size: 26px;
46
+ position: absolute;
47
+ cursor: pointer;
48
+ }
@@ -1,23 +1,24 @@
1
- /// <reference types="react" />
2
- import { Organization } from '../../@Types/@Types';
3
- import { Form, FormStyle } from '../../@Types/Form';
4
- export interface WidthStats {
5
- currentBreakPoint: number;
6
- isMobile: boolean;
7
- }
8
- export interface FormComponentProps {
9
- form: Form;
10
- originalValues: Record<string, unknown>;
11
- widthStats: WidthStats;
12
- internal: boolean;
13
- reload: Function;
14
- postview: boolean;
15
- formStyle: FormStyle;
16
- domain?: string;
17
- apiKey: string | undefined;
18
- }
19
- declare function FormComponent({ form, internal, postview, organization, containerRef, ...others }: Omit<FormComponentProps, 'widthStats' | 'formStyle'> & {
20
- containerRef: any;
21
- organization: Organization | null;
22
- }): JSX.Element;
23
- export default FormComponent;
1
+ /// <reference types="react" />
2
+ import { Organization } from '../../@Types/@Types';
3
+ import { Form, FormStyle } from '../../@Types/Form';
4
+ export interface WidthStats {
5
+ currentBreakPoint: number;
6
+ isMobile: boolean;
7
+ }
8
+ export interface FormComponentProps {
9
+ form: Form;
10
+ originalValues: Record<string, unknown>;
11
+ customSteps: Record<string, JSX.Element>;
12
+ widthStats: WidthStats;
13
+ internal: boolean;
14
+ reload: Function;
15
+ postview: boolean;
16
+ formStyle: FormStyle;
17
+ domain?: string;
18
+ apiKey: string | undefined;
19
+ }
20
+ declare function FormComponent({ form, internal, postview, organization, containerRef, ...others }: Omit<FormComponentProps, 'widthStats' | 'formStyle'> & {
21
+ containerRef: any;
22
+ organization: Organization | null;
23
+ }): JSX.Element;
24
+ export default FormComponent;
@@ -1,116 +1,116 @@
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
- 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
- };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- import React, { useEffect, useState } from 'react';
25
- import { FormStyleTypes, FormTypes } from '../../constants/FormStepTypes';
26
- import Navbar from '../../shared/Navbar/Navbar';
27
- import ColumnForm from './ColumnForm/ColumnForm';
28
- import StepperForm from './StepperForm/StepperForm';
29
- import styles from './Form.module.css';
30
- import { MuiPickersUtilsProvider } from '@material-ui/pickers';
31
- import DateFnsUtils from '@date-io/date-fns';
32
- import { createGenerateClassName, createTheme, StylesProvider, ThemeProvider, } from '@material-ui/core';
33
- import { SEED } from '../../constants/MaterialClassNameSeed';
34
- import InternalFormStyle from '../../constants/InternalFormStyle';
35
- var blockSize = 210;
36
- var spacingSize = 20;
37
- var blockNum = 4;
38
- function FormComponent(_a) {
39
- var _b;
40
- var form = _a.form, internal = _a.internal, postview = _a.postview, organization = _a.organization, containerRef = _a.containerRef, others = __rest(_a, ["form", "internal", "postview", "organization", "containerRef"]);
41
- var _c = useState(undefined), widthStats = _c[0], setWidthStats = _c[1];
42
- /** Calcs the currentBreakPoint and if is mobile */
43
- var handleResize = function () {
44
- var _a;
45
- var currentWidth = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth;
46
- if (currentWidth !== undefined) {
47
- var currentBreakPoint = blockNum;
48
- while (currentWidth <
49
- (blockSize + spacingSize) * currentBreakPoint + 40) {
50
- currentBreakPoint--;
51
- }
52
- setWidthStats({
53
- isMobile: currentWidth < (blockSize + spacingSize) * blockNum + 40,
54
- currentBreakPoint: currentBreakPoint,
55
- });
56
- }
57
- };
58
- useEffect(function () {
59
- /** On load add a resize listener to calc the currentBreakpoint */
60
- window.addEventListener('resize', handleResize);
61
- handleResize();
62
- return function () {
63
- window.removeEventListener('resize', handleResize);
64
- };
65
- }, [containerRef.current, (_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth]);
66
- //If currently displaying internal or form is standalone
67
- if ((postview || internal || !form.isStandAlone) &&
68
- widthStats !== undefined) {
69
- return (_jsx("div", __assign({ className: styles.widgetFormContainer, ref: containerRef, style: {
70
- backgroundColor: internal
71
- ? InternalFormStyle.backgroundColor
72
- : form.style.backgroundColor,
73
- } }, { children: _jsx(FormTypeComponent, __assign({}, others, { widthStats: widthStats, form: form, internal: internal, postview: postview, formStyle: internal ? InternalFormStyle : form.style }), void 0) }), void 0));
74
- }
75
- else if (organization && widthStats !== undefined) {
76
- //Standalone cant have widget
77
- return (_jsxs(React.Fragment, { children: [_jsx(Navbar, { logo: organization.completeLogoUrl, color: organization.navbarColor }, void 0), _jsx("div", __assign({ className: styles.standAloneFormContainer, ref: containerRef }, { children: _jsx("div", __assign({ className: widthStats.isMobile
78
- ? styles.fullScreenStandAloneForm
79
- : styles.standAloneFormCard, style: { backgroundColor: form.style.backgroundColor } }, { children: _jsx(FormTypeComponent, __assign({}, others, { internal: internal, postview: postview, widthStats: widthStats, form: form, formStyle: form.style }), void 0) }), void 0) }), void 0)] }, void 0));
80
- }
81
- else {
82
- return _jsx("div", {}, void 0);
83
- }
84
- }
85
- var muiTheme = createTheme({
86
- typography: {
87
- fontFamily: 'inherit',
88
- },
89
- });
90
- var generateClassName = createGenerateClassName({
91
- seed: SEED,
92
- productionPrefix: 'efjss',
93
- });
94
- function FormTypeComponent(_a) {
95
- var props = __rest(_a, []);
96
- var renderTypes = function () {
97
- switch (props.form.type) {
98
- case FormTypes.COLUMN: {
99
- return _jsx(ColumnForm, __assign({}, props), void 0);
100
- }
101
- case FormTypes.STEPPER: {
102
- return _jsx(StepperForm, __assign({}, props), void 0);
103
- }
104
- default: {
105
- return _jsx(ColumnForm, __assign({}, props), void 0);
106
- }
107
- }
108
- };
109
- switch (props.formStyle.type) {
110
- case FormStyleTypes.MATERIAL:
111
- return (_jsx(StylesProvider, __assign({ generateClassName: generateClassName }, { children: _jsx(ThemeProvider, __assign({ theme: muiTheme }, { children: _jsx(MuiPickersUtilsProvider, __assign({ utils: DateFnsUtils }, { children: renderTypes() }), void 0) }), void 0) }), void 0));
112
- default:
113
- return renderTypes();
114
- }
115
- }
116
- export default FormComponent;
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
+ 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
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import React, { useEffect, useState } from 'react';
25
+ import { FormStyleTypes, FormTypes } from '../../constants/FormStepTypes';
26
+ import Navbar from '../../shared/Navbar/Navbar';
27
+ import ColumnForm from './ColumnForm/ColumnForm';
28
+ import StepperForm from './StepperForm/StepperForm';
29
+ import styles from './Form.module.css';
30
+ import { MuiPickersUtilsProvider } from '@material-ui/pickers';
31
+ import DateFnsUtils from '@date-io/date-fns';
32
+ import { createGenerateClassName, createTheme, StylesProvider, ThemeProvider, } from '@material-ui/core';
33
+ import { SEED } from '../../constants/MaterialClassNameSeed';
34
+ import InternalFormStyle from '../../constants/InternalFormStyle';
35
+ var blockSize = 210;
36
+ var spacingSize = 20;
37
+ var blockNum = 4;
38
+ function FormComponent(_a) {
39
+ var _b;
40
+ var form = _a.form, internal = _a.internal, postview = _a.postview, organization = _a.organization, containerRef = _a.containerRef, others = __rest(_a, ["form", "internal", "postview", "organization", "containerRef"]);
41
+ var _c = useState(undefined), widthStats = _c[0], setWidthStats = _c[1];
42
+ /** Calcs the currentBreakPoint and if is mobile */
43
+ var handleResize = function () {
44
+ var _a;
45
+ var currentWidth = (_a = containerRef === null || containerRef === void 0 ? void 0 : containerRef.current) === null || _a === void 0 ? void 0 : _a.offsetWidth;
46
+ if (currentWidth !== undefined) {
47
+ var currentBreakPoint = blockNum;
48
+ while (currentWidth <
49
+ (blockSize + spacingSize) * currentBreakPoint + 40) {
50
+ currentBreakPoint--;
51
+ }
52
+ setWidthStats({
53
+ isMobile: currentWidth < (blockSize + spacingSize) * blockNum + 40,
54
+ currentBreakPoint: currentBreakPoint,
55
+ });
56
+ }
57
+ };
58
+ useEffect(function () {
59
+ /** On load add a resize listener to calc the currentBreakpoint */
60
+ window.addEventListener('resize', handleResize);
61
+ handleResize();
62
+ return function () {
63
+ window.removeEventListener('resize', handleResize);
64
+ };
65
+ }, [containerRef.current, (_b = containerRef.current) === null || _b === void 0 ? void 0 : _b.offsetWidth]);
66
+ //If currently displaying internal or form is standalone
67
+ if ((postview || internal || !form.isStandAlone) &&
68
+ widthStats !== undefined) {
69
+ return (_jsx("div", __assign({ className: styles.widgetFormContainer, ref: containerRef, style: {
70
+ backgroundColor: internal
71
+ ? InternalFormStyle.backgroundColor
72
+ : form.style.backgroundColor,
73
+ } }, { children: _jsx(FormTypeComponent, __assign({}, others, { widthStats: widthStats, form: form, internal: internal, postview: postview, formStyle: internal ? InternalFormStyle : form.style }), void 0) }), void 0));
74
+ }
75
+ else if (organization && widthStats !== undefined) {
76
+ //Standalone cant have widget
77
+ return (_jsxs(React.Fragment, { children: [_jsx(Navbar, { logo: organization.completeLogoUrl, color: organization.navbarColor }, void 0), _jsx("div", __assign({ className: styles.standAloneFormContainer, ref: containerRef }, { children: _jsx("div", __assign({ className: widthStats.isMobile
78
+ ? styles.fullScreenStandAloneForm
79
+ : styles.standAloneFormCard, style: { backgroundColor: form.style.backgroundColor } }, { children: _jsx(FormTypeComponent, __assign({}, others, { internal: internal, postview: postview, widthStats: widthStats, form: form, formStyle: form.style }), void 0) }), void 0) }), void 0)] }, void 0));
80
+ }
81
+ else {
82
+ return _jsx("div", {}, void 0);
83
+ }
84
+ }
85
+ var muiTheme = createTheme({
86
+ typography: {
87
+ fontFamily: 'inherit',
88
+ },
89
+ });
90
+ var generateClassName = createGenerateClassName({
91
+ seed: SEED,
92
+ productionPrefix: 'efjss',
93
+ });
94
+ function FormTypeComponent(_a) {
95
+ var props = __rest(_a, []);
96
+ var renderTypes = function () {
97
+ switch (props.form.type) {
98
+ case FormTypes.COLUMN: {
99
+ return _jsx(ColumnForm, __assign({}, props), void 0);
100
+ }
101
+ case FormTypes.STEPPER: {
102
+ return _jsx(StepperForm, __assign({}, props), void 0);
103
+ }
104
+ default: {
105
+ return _jsx(ColumnForm, __assign({}, props), void 0);
106
+ }
107
+ }
108
+ };
109
+ switch (props.formStyle.type) {
110
+ case FormStyleTypes.MATERIAL:
111
+ return (_jsx(StylesProvider, __assign({ generateClassName: generateClassName }, { children: _jsx(ThemeProvider, __assign({ theme: muiTheme }, { children: _jsx(MuiPickersUtilsProvider, __assign({ utils: DateFnsUtils }, { children: renderTypes() }), void 0) }), void 0) }), void 0));
112
+ default:
113
+ return renderTypes();
114
+ }
115
+ }
116
+ export default FormComponent;
@@ -0,0 +1,39 @@
1
+ .standAloneFormContainer {
2
+ width: 100%;
3
+ max-width: 100%;
4
+ overflow: hidden;
5
+ min-height: calc(100vh - 60px);
6
+ display: flex;
7
+ overflow-x: hidden;
8
+ }
9
+
10
+ .fullScreenStandAloneForm {
11
+ width: 100%;
12
+ padding: 20px;
13
+ min-height: 100%;
14
+ overflow: hidden;
15
+ }
16
+
17
+ .standAloneFormCard {
18
+ -webkit-box-shadow: -6px 0px 8px 5px rgba(0, 0, 0, 0.2);
19
+ -moz-box-shadow: -6px 0px 8px 5px rgba(0, 0, 0, 0.2);
20
+ box-shadow: -6px 0px 8px 5px rgba(0, 0, 0, 0.2);
21
+ margin-top: 30px;
22
+ margin-left: auto;
23
+ margin-right: auto;
24
+ height: fit-content;
25
+ width: fit-content;
26
+ border-radius: 15px;
27
+ padding: 20px;
28
+ margin-bottom: 30px;
29
+ }
30
+
31
+ .widgetFormContainer {
32
+ padding-top: 10px;
33
+ padding-bottom: 10px;
34
+ margin-left: auto;
35
+ margin-right: auto;
36
+ height: fit-content;
37
+ width: fit-content;
38
+ max-width: 100%;
39
+ }
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- import { FormComponentProps } from '../Form';
3
- declare function StepperForm({}: FormComponentProps): JSX.Element;
4
- export default StepperForm;
1
+ /// <reference types="react" />
2
+ import { FormComponentProps } from '../Form';
3
+ declare function StepperForm({}: FormComponentProps): JSX.Element;
4
+ export default StepperForm;
@@ -1,6 +1,6 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- // import styles from './StepperForm.module.css';
3
- function StepperForm(_a) {
4
- return _jsx("div", {}, void 0);
5
- }
6
- export default StepperForm;
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // import styles from './StepperForm.module.css';
3
+ function StepperForm(_a) {
4
+ return _jsx("div", {}, void 0);
5
+ }
6
+ export default StepperForm;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
2
- import { SectionComponentProps } from '../Section';
3
- declare function MaterialSection({ section, form, ...others }: SectionComponentProps): JSX.Element;
4
- export default MaterialSection;
1
+ /// <reference types="react" />
2
+ import { SectionComponentProps } from '../Section';
3
+ declare function MaterialSection({ section, form, ...others }: SectionComponentProps): JSX.Element;
4
+ export default MaterialSection;
@@ -1,42 +1,42 @@
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
- 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
- };
23
- import { jsx as _jsx } from "react/jsx-runtime";
24
- import { createElement as _createElement } from "react";
25
- import StepComponent from '../../Step/Step';
26
- import styles from './MaterialSection.module.css';
27
- function MaterialSection(_a) {
28
- var section = _a.section, form = _a.form, others = __rest(_a, ["section", "form"]);
29
- return (_jsx("div", __assign({ className: styles.container, style: {
30
- width: (form.blockSize + form.spacingSize) * form.blockNum,
31
- } }, { children: section.steps.map(function (idStep, index) {
32
- var step = form.steps[idStep];
33
- if (step) {
34
- return (_createElement(StepComponent, __assign({}, others, { form: form, step: step, handleSizeChange: function () { }, key: index, level: 0 })));
35
- }
36
- else {
37
- console.log('Step not found:', idStep);
38
- return _jsx("div", {}, index);
39
- }
40
- }) }), void 0));
41
- }
42
- export default MaterialSection;
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
+ 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
+ };
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+ import { createElement as _createElement } from "react";
25
+ import StepComponent from '../../Step/Step';
26
+ import styles from './MaterialSection.module.css';
27
+ function MaterialSection(_a) {
28
+ var section = _a.section, form = _a.form, others = __rest(_a, ["section", "form"]);
29
+ return (_jsx("div", __assign({ className: styles.container, style: {
30
+ width: (form.blockSize + form.spacingSize) * form.blockNum,
31
+ } }, { children: section.steps.map(function (idStep, index) {
32
+ var step = form.steps[idStep];
33
+ if (step) {
34
+ return (_createElement(StepComponent, __assign({}, others, { form: form, step: step, handleSizeChange: function () { }, key: index, level: 0 })));
35
+ }
36
+ else {
37
+ console.log('Step not found:', idStep);
38
+ return _jsx("div", {}, index);
39
+ }
40
+ }) }), void 0));
41
+ }
42
+ export default MaterialSection;
@@ -0,0 +1,8 @@
1
+ .container {
2
+ display: flex;
3
+ flex-flow: row wrap;
4
+ height: fit-content;
5
+ max-width: 100%;
6
+ overflow-x: hidden;
7
+ overflow-y: hidden;
8
+ }
@@ -1,23 +1,24 @@
1
- /// <reference types="react" />
2
- import { Control, FieldValues, UseFormGetValues } from 'react-hook-form';
3
- import { Form, FormStyle, Section } from '../../@Types/Form';
4
- import { WidthStats } from '../Form/Form';
5
- export interface RecursiveData {
6
- form: Form;
7
- control: Control<FieldValues, object>;
8
- formStyle: FormStyle;
9
- postview: boolean;
10
- domain?: string;
11
- errors: Record<string, any>;
12
- widthStats: WidthStats;
13
- clearErrors: Function;
14
- getValues: UseFormGetValues<FieldValues>;
15
- originalValues: Record<string, any>;
16
- }
17
- export interface SectionComponentProps extends RecursiveData {
18
- section: Section;
19
- setSections: Function;
20
- index: number;
21
- }
22
- declare function SectionComponent(props: SectionComponentProps): JSX.Element;
23
- export default SectionComponent;
1
+ /// <reference types="react" />
2
+ import { Control, FieldValues, UseFormGetValues } from 'react-hook-form';
3
+ import { Form, FormStyle, Section } from '../../@Types/Form';
4
+ import { WidthStats } from '../Form/Form';
5
+ export interface RecursiveData {
6
+ form: Form;
7
+ control: Control<FieldValues, object>;
8
+ formStyle: FormStyle;
9
+ postview: boolean;
10
+ domain?: string;
11
+ errors: Record<string, any>;
12
+ widthStats: WidthStats;
13
+ clearErrors: Function;
14
+ getValues: UseFormGetValues<FieldValues>;
15
+ originalValues: Record<string, any>;
16
+ customSteps: Record<string, JSX.Element>;
17
+ }
18
+ export interface SectionComponentProps extends RecursiveData {
19
+ section: Section;
20
+ setSections: Function;
21
+ index: number;
22
+ }
23
+ declare function SectionComponent(props: SectionComponentProps): JSX.Element;
24
+ export default SectionComponent;
@@ -1,25 +1,25 @@
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 } from "react/jsx-runtime";
13
- import { FormStyleTypes } from '../../constants/FormStepTypes';
14
- import MaterialSection from './MaterialSection/MaterialSection';
15
- function SectionComponent(props) {
16
- switch (props.formStyle.type) {
17
- case FormStyleTypes.MATERIAL: {
18
- return _jsx(MaterialSection, __assign({}, props), void 0);
19
- }
20
- default: {
21
- return _jsx(MaterialSection, __assign({}, props), void 0);
22
- }
23
- }
24
- }
25
- export default SectionComponent;
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 } from "react/jsx-runtime";
13
+ import { FormStyleTypes } from '../../constants/FormStepTypes';
14
+ import MaterialSection from './MaterialSection/MaterialSection';
15
+ function SectionComponent(props) {
16
+ switch (props.formStyle.type) {
17
+ case FormStyleTypes.MATERIAL: {
18
+ return _jsx(MaterialSection, __assign({}, props), void 0);
19
+ }
20
+ default: {
21
+ return _jsx(MaterialSection, __assign({}, props), void 0);
22
+ }
23
+ }
24
+ }
25
+ export default SectionComponent;
@@ -1,9 +1,9 @@
1
- /// <reference types="react" />
2
- import { ClassifierSelector } from '../../../@Types/FormStep';
3
- import { StepProps } from '../Step';
4
- export interface ClassifierSelectorStepProps extends StepProps {
5
- /** The ClassifierSelectorStep to display */
6
- step: ClassifierSelector;
7
- }
8
- declare function ClassifierSelectorStep({ formStyle, ...others }: ClassifierSelectorStepProps): JSX.Element;
9
- export default ClassifierSelectorStep;
1
+ /// <reference types="react" />
2
+ import { ClassifierSelector } from '../../../@Types/FormStep';
3
+ import { StepProps } from '../Step';
4
+ export interface ClassifierSelectorStepProps extends StepProps {
5
+ /** The ClassifierSelectorStep to display */
6
+ step: ClassifierSelector;
7
+ }
8
+ declare function ClassifierSelectorStep({ formStyle, ...others }: ClassifierSelectorStepProps): JSX.Element;
9
+ export default ClassifierSelectorStep;