Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions forms-flow-web-root-config/src/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
<link rel="stylesheet" href="https://cdn.form.io/flatpickr-formio/4.6.13-formio.3/flatpickr.min.css">
<link rel="stylesheet" href="https://cdn.form.io/shortcut-buttons-flatpickr/0.4.0/themes/light.min.css"> <!--TODO need to override this style internally @formsflow/theme-->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/formio.full.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/font/bootstrap-icons.min.css"> <!--TODO need to figure out why @aot-technologies/formiojs doesn't package this properly
<!-- ✅ Flatpickr Locales -->
<!-- NOTE: Load these only if needed — optimize in future -->
<script src="https://cdn.form.io/flatpickr-formio/4.6.13-formio.3/l10n/flatpickr-zh.js"></script>
Expand Down
19,664 changes: 2,929 additions & 16,735 deletions forms-flow-web/package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions forms-flow-web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
"redux-mock-store": "^1.5.5"
},
"dependencies": {
"@aot-technologies/formio-react": "^1.0.5",
"@aot-technologies/formiojs": "^1.0.3",
"@aot-technologies/formio-react": "npm:@leodube/formio-react@1.0.6",
"@aot-technologies/formiojs": "npm:@leodube/formiojs@1.0.4",
"@aot-technologies/formsflow-formio-custom-elements": "^1.0.2",
"@babel/generator": "7.24.1",
"@babel/helper-split-export-declaration": "^7.24.7",
Expand All @@ -55,7 +55,7 @@
"@testing-library/user-event": "^14.6.1",
"@wojtekmaj/react-daterange-picker": "^3.1.0",
"axios": "^1.12.0",
"bpmn-js": "^16.0.0",
"bpmn-js": "^18.6.3",
"bpmn-js-bpmnlint": "^0.19.0",
"bpmn-js-properties-panel": "^5.7.0",
"bpmn-xml-parser": "^1.6.0",
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/components/Draft/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ const View = React.memo((props) => {
{processData?.status === "active" ? (
<div className="form-view-wrapper wizard-tab service-task-details">
<Form
form={form}
src={form}
submission={submission.submission}
url={url}
options={{
Expand Down
8 changes: 4 additions & 4 deletions forms-flow-web/src/components/Modals/TaskVariableModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ const FormComponent = React.memo(
<div className="d-flex">
<div className="flex-grow-1 form-hilighter form-field-container wizard-tab">
<Form
form={updatedForm}
src={updatedForm}
options={{
viewAsHtml: true,
readOnly: true,
}}
showHiddenFields={false}
formReady={(e) => {
showHiddenFields: showHiddenFields
}}
onFormReady={(e) => {
formRef.current = e;
}}
/>
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/constants/applicationComponent.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import utils from "@aot-technologies/formiojs/lib/utils";
import utils from "@aot-technologies/formiojs/utils";

// Factory function to create a hidden component with dynamic properties
const createHiddenComponent = ({label, key, persistent,
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/helper/helper.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Translation } from "react-i18next";
import "./helper.scss";
import _ from "lodash";
import utils from "@aot-technologies/formiojs/lib/utils";
import utils from "@aot-technologies/formiojs/utils";

const replaceUrl = (URL, key, value) => {
return URL.replace(key, value);
Expand Down
9 changes: 5 additions & 4 deletions forms-flow-web/src/routes/Design/Forms/FormEdit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useReducer, useState, useEffect, useRef } from "react";
import React, { useReducer, useState, useEffect, useRef, useMemo } from "react";
import { useSelector, useDispatch } from "react-redux";
import { useParams } from "react-router-dom";
import { Card } from "react-bootstrap";
Expand Down Expand Up @@ -111,6 +111,7 @@ const EditComponent = () => {
currentFormReducer,
_cloneDeep(formData)
);
const initialForm = useMemo(() => _cloneDeep(formData), [formData._id]);

/* ------------------ handling form layout and flow layouts ----------------- */
const [currentLayout, setCurrentLayout] = useState(FORM_LAYOUT);
Expand Down Expand Up @@ -1291,7 +1292,7 @@ const handleSaveLayout = () => {
{!createDesigns ? (
<div className="px-4 pt-4 form-preview">
<Form
form={form}
src={form}
options={{
disableAlerts: true,
noAlerts: true,
Expand All @@ -1302,8 +1303,8 @@ const handleSaveLayout = () => {
</div>
) : (
<FormBuilder
key={form._id}
form={form}
key={initialForm._id}
initialForm={initialForm}
onChange={formChange}

options={{
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/routes/Design/Forms/FormPreview.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const FormPreview = () => {
<div className="preview-header-text mb-4">{form?.title}</div>
<div>
<Form
form={form}
src={form}
options={{
disableAlerts: true,
noAlerts: true,
Expand Down
4 changes: 2 additions & 2 deletions forms-flow-web/src/routes/Submit/Forms/UserForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ const View = React.memo((props) => {
<div className={`wizard-tab ${scrollableOverview}`}>
{(isPublic || formStatus === "active") ? (
<Form
form={form}
src={form}
submission={isDraftEdit ? draftData : submission}
url={url}
options={{
Expand All @@ -420,7 +420,7 @@ const View = React.memo((props) => {
setDraftData({ data: formRef.current?.data });
}
}}
formReady={(e) => formRef.current = e}
onFormReady={(e) => formRef.current = e}
onSubmit={(data) => {
setPoll(false);
exitType.current = "SUBMIT";
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/routes/Submit/Forms/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ const View = React.memo((props) => {
<div className="ms-4 me-4 wizard-tab service-task-details p-3">
{(isPublic || (formStatus === "active") ) ? (
<Form
form={form}
src={form}
submission={submission}
url={url}
options={{
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/routes/Submit/Submission/Item/Edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const Edit = React.memo((props) => {
>
<div className="ms-4 mb-5 me-4 wizard-tab service-task-details">
<Form
form={form}
src={form}
submission={isFormSubmissionLoading ? updatedSubmissionData : updatedSubmission}
url={url}
onSubmit={(submission) =>{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ const Resubmit = React.memo(() => {
>
<div className={`wizard-tab ${scrollableOverview}`}>
<Form
form={form}
src={form}
submission={isFormSubmissionLoading ? updatedSubmissionData : submissionState}
url={submissionState?.url}
onSubmit={handleFormSubmit}
Expand Down
2 changes: 1 addition & 1 deletion forms-flow-web/src/routes/Submit/Submission/Item/View.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const View = React.memo((props) => {
)}
<div className="sub-container wizard-tab">
<Form
form={form}
src={form}
submission={updatedSubmission}
url={url}
onSubmit={onSubmit}
Expand Down