@solidstarters/solid-core-ui 1.1.36 → 1.1.38
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/components/common/SolidBreadcrumb.d.ts +1 -1
- package/dist/components/common/SolidBreadcrumb.d.ts.map +1 -1
- package/dist/components/common/SolidBreadcrumb.js +5 -3
- package/dist/components/common/SolidBreadcrumb.js.map +1 -1
- package/dist/components/common/SolidFormHeader.d.ts +9 -0
- package/dist/components/common/SolidFormHeader.d.ts.map +1 -0
- package/dist/components/common/SolidFormHeader.js +22 -0
- package/dist/components/common/SolidFormHeader.js.map +1 -0
- package/dist/components/common/SolidFormStepper.d.ts +8 -1
- package/dist/components/common/SolidFormStepper.d.ts.map +1 -1
- package/dist/components/common/SolidFormStepper.js +144 -7
- package/dist/components/common/SolidFormStepper.js.map +1 -1
- package/dist/components/common/SolidModuleHome.d.ts +6 -0
- package/dist/components/common/SolidModuleHome.d.ts.map +1 -0
- package/dist/components/common/SolidModuleHome.js +12 -0
- package/dist/components/common/SolidModuleHome.js.map +1 -0
- package/dist/components/core/form/SolidFormView.d.ts.map +1 -1
- package/dist/components/core/form/SolidFormView.js +22 -15
- package/dist/components/core/form/SolidFormView.js.map +1 -1
- package/dist/components/core/list/SolidListView.js +37 -37
- package/dist/components/core/list/SolidListView.js.map +1 -1
- package/dist/components/core/model/CreateModel.d.ts.map +1 -1
- package/dist/components/core/model/CreateModel.js +2 -2
- package/dist/components/core/model/CreateModel.js.map +1 -1
- package/dist/components/core/module/CreateModule.d.ts.map +1 -1
- package/dist/components/core/module/CreateModule.js +2 -2
- package/dist/components/core/module/CreateModule.js.map +1 -1
- package/dist/components/core/users/CreateUser.d.ts.map +1 -1
- package/dist/components/core/users/CreateUser.js +2 -2
- package/dist/components/core/users/CreateUser.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/redux/api/solidEntityApi.d.ts +1 -0
- package/dist/redux/api/solidEntityApi.d.ts.map +1 -1
- package/dist/redux/api/solidEntityApi.js +10 -0
- package/dist/redux/api/solidEntityApi.js.map +1 -1
- package/dist/resources/globals.css +115 -9
- package/package.json +1 -1
- package/src/components/common/SolidBreadcrumb.tsx +5 -4
- package/src/components/common/SolidFormHeader.tsx +22 -0
- package/src/components/common/SolidFormStepper.tsx +208 -56
- package/src/components/common/SolidModuleHome.tsx +68 -0
- package/src/components/core/form/SolidFormView.tsx +14 -6
- package/src/components/core/list/SolidListView.tsx +1 -1
- package/src/components/core/model/CreateModel.tsx +2 -1
- package/src/components/core/module/CreateModule.tsx +2 -1
- package/src/components/core/users/CreateUser.tsx +4 -3
- package/src/index.ts +1 -0
- package/src/redux/api/solidEntityApi.tsx +7 -1
- package/src/resources/globals.css +115 -9
|
@@ -1,65 +1,217 @@
|
|
|
1
1
|
"use client"
|
|
2
2
|
import { Button } from 'primereact/button'
|
|
3
3
|
import { OverlayPanel } from 'primereact/overlaypanel';
|
|
4
|
-
import React, { useRef } from 'react'
|
|
4
|
+
import React, { useEffect, useRef, useState } from 'react'
|
|
5
|
+
import { createSolidEntityApi } from '@/redux/api/solidEntityApi';
|
|
6
|
+
import { useFormik } from 'formik';
|
|
7
|
+
import { Toast } from 'primereact/toast';
|
|
5
8
|
|
|
6
|
-
|
|
9
|
+
interface Props {
|
|
10
|
+
solidFormViewMetaData?: any;
|
|
11
|
+
modelName?: any,
|
|
12
|
+
initialEntityData?: any;
|
|
13
|
+
id?: any
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export const SolidFormStepper = (props: Props) => {
|
|
17
|
+
const { solidFormViewMetaData, modelName, initialEntityData, id } = props;
|
|
18
|
+
const toast = useRef<Toast>(null);
|
|
7
19
|
const formStepperOverlay = useRef(null);
|
|
8
20
|
|
|
21
|
+
const solidFormViewWorkflowData = solidFormViewMetaData?.data?.solidFormViewWorkflowData;
|
|
22
|
+
const solidWorkflowField = solidFormViewMetaData?.data?.solidView?.layout?.attrs?.workflowField;
|
|
23
|
+
const solidWorkflowFieldEnabled = solidFormViewMetaData?.data?.solidView?.layout?.attrs?.workflowFieldUpdateEnabled;
|
|
24
|
+
const defaultWorkflowFieldValue = solidFormViewMetaData?.data?.solidFieldsMetadata?.[solidWorkflowField]?.defaultValue
|
|
25
|
+
const defaultWorkflowFieldDisplayName = solidFormViewMetaData?.data?.solidFieldsMetadata?.[solidWorkflowField]?.displayName
|
|
26
|
+
const activeStep = solidFormViewMetaData?.data?.solidFormViewWorkflowData[0].value
|
|
27
|
+
const [solidWorkflowFieldKey, setSolidWorkflowFieldKey] = useState<string>("");
|
|
28
|
+
const [solidWorkflowFieldValue, setSolidWorkflowFieldValue] = useState<string>("");
|
|
29
|
+
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (!solidWorkflowField) return;
|
|
32
|
+
|
|
33
|
+
setSolidWorkflowFieldKey(solidWorkflowField);
|
|
34
|
+
|
|
35
|
+
setSolidWorkflowFieldValue(() => {
|
|
36
|
+
if (initialEntityData?.[solidWorkflowField] !== undefined) {
|
|
37
|
+
console.log("checkloginitial", initialEntityData[solidWorkflowField]);
|
|
38
|
+
return initialEntityData[solidWorkflowField];
|
|
39
|
+
} else if (defaultWorkflowFieldValue !== undefined) {
|
|
40
|
+
console.log("checklogdefault", defaultWorkflowFieldValue);
|
|
41
|
+
return defaultWorkflowFieldValue;
|
|
42
|
+
} else {
|
|
43
|
+
return activeStep;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
}, [solidWorkflowField, initialEntityData, defaultWorkflowFieldValue, activeStep]);
|
|
47
|
+
|
|
48
|
+
const formik = useFormik({
|
|
49
|
+
enableReinitialize: true,
|
|
50
|
+
initialValues: {
|
|
51
|
+
id: +id,
|
|
52
|
+
[solidWorkflowFieldKey]: solidWorkflowFieldValue || "",
|
|
53
|
+
},
|
|
54
|
+
onSubmit: (values) => {
|
|
55
|
+
handleStepChange(values);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const entityApi = createSolidEntityApi(modelName);
|
|
60
|
+
const {
|
|
61
|
+
usePatchUpdateSolidEntityMutation,
|
|
62
|
+
} = entityApi;
|
|
63
|
+
|
|
64
|
+
const [
|
|
65
|
+
updateStepper,
|
|
66
|
+
{ isSuccess: isStepperUpdateSuccessfull, isError: isStepperUpdateError, error: stepperUpdateError },
|
|
67
|
+
] = usePatchUpdateSolidEntityMutation();
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
const showToast = (severity: "success" | "error", summary: string, detail: string) => {
|
|
71
|
+
toast.current?.show({
|
|
72
|
+
severity,
|
|
73
|
+
summary,
|
|
74
|
+
detail,
|
|
75
|
+
life: 3000,
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const handleStepChange = async (values: any) => {
|
|
80
|
+
try {
|
|
81
|
+
const result = await updateStepper({ id: values.id, data: { [solidWorkflowFieldKey]: values[solidWorkflowFieldKey] } }).unwrap();
|
|
82
|
+
if (result?.statusCode === 200) {
|
|
83
|
+
showToast("success", `${defaultWorkflowFieldDisplayName} Update`, `${defaultWorkflowFieldDisplayName} updated successfully!`);
|
|
84
|
+
if (result?.data?.[solidWorkflowFieldKey]) {
|
|
85
|
+
setSolidWorkflowFieldValue(result.data[solidWorkflowFieldKey]);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} catch (error) {
|
|
89
|
+
console.error('Error updating stepper:', error);
|
|
90
|
+
showToast("error", "Update Failed", "Failed to update the form.");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const handleButtonClick = (stepValue: any) => {
|
|
95
|
+
formik.setFieldValue(solidWorkflowFieldKey, stepValue);
|
|
96
|
+
formik.handleSubmit();
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
const activeIndex = solidFormViewWorkflowData.findIndex((step: any) => step.value === solidWorkflowFieldValue);
|
|
100
|
+
const visibleSteps = solidFormViewWorkflowData.length > 5 ? solidFormViewWorkflowData.slice(0, 5) : solidFormViewWorkflowData;
|
|
101
|
+
console.log("activeIndex:", activeIndex, "solidWorkflowFieldValue:", solidWorkflowFieldValue);
|
|
102
|
+
|
|
9
103
|
return (
|
|
10
|
-
|
|
11
|
-
<
|
|
12
|
-
<
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
104
|
+
<>
|
|
105
|
+
<Toast ref={toast} />
|
|
106
|
+
<div className='flex solid-dynamic-stepper' style={solidWorkflowFieldEnabled === false ? { pointerEvents: 'none' } : {}}>
|
|
107
|
+
{visibleSteps.map((step: any, index: number) => {
|
|
108
|
+
const isActive = index === activeIndex;
|
|
109
|
+
const isBeforeActive = index < activeIndex;
|
|
110
|
+
const isAfterActive = index > activeIndex;
|
|
111
|
+
const isFirstVisible = index === 0;
|
|
112
|
+
const isLastVisible = index === visibleSteps.length - 1;
|
|
113
|
+
const isNextAfterActive = index === activeIndex + 1;
|
|
114
|
+
const isTwoStepsOnly = visibleSteps.length === 2;
|
|
115
|
+
console.log("isActive", isActive);
|
|
116
|
+
|
|
117
|
+
return (
|
|
118
|
+
<Button
|
|
119
|
+
key={index}
|
|
120
|
+
type="button"
|
|
121
|
+
className={`solid-step-button relative ${isTwoStepsOnly ? 'two-step-button' : ''} ${isActive ? 'p-button-primary' : ''} ${isBeforeActive ? 'p-button-secondary' : ''}`}
|
|
122
|
+
text={!isActive && !isBeforeActive}
|
|
123
|
+
onClick={() => handleButtonClick(step.value)}
|
|
124
|
+
>
|
|
125
|
+
{step.label}
|
|
126
|
+
<>
|
|
127
|
+
{isNextAfterActive && solidFormViewWorkflowData.map((step: any) => step.value).includes(solidWorkflowFieldValue) &&
|
|
128
|
+
(
|
|
129
|
+
<div className="absolute active-step-arrow">
|
|
130
|
+
<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" fill="#000000" transform="rotate(30)"
|
|
131
|
+
height="48px"
|
|
132
|
+
width="48px"
|
|
133
|
+
>
|
|
134
|
+
<g id="SVGRepo_iconCarrier">
|
|
135
|
+
<g id="color">
|
|
136
|
+
<polygon fill={"var(--primary-color)"} points="36,62 65,12 7,12" />
|
|
137
|
+
</g>
|
|
138
|
+
<g id="line">
|
|
139
|
+
<polyline fill="none" stroke="" stroke-miterlimit="10" stroke-width="1.5" points="36,62 65,12 7,12" />
|
|
140
|
+
</g>
|
|
141
|
+
</g>
|
|
142
|
+
</svg>
|
|
143
|
+
</div>
|
|
144
|
+
)}
|
|
145
|
+
|
|
146
|
+
{(isActive || isBeforeActive) && !isFirstVisible && (!isTwoStepsOnly || index === 1) && (
|
|
147
|
+
<div className="absolute active-before-step-arrow">
|
|
148
|
+
<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" fill="#000000" transform="rotate(30)"
|
|
149
|
+
height="48px"
|
|
150
|
+
width="48px"
|
|
151
|
+
>
|
|
152
|
+
<g id="SVGRepo_iconCarrier">
|
|
153
|
+
<g id="color">
|
|
154
|
+
<polygon fill="#EAEDF1" points="36,62 65,12 7,12" />
|
|
155
|
+
</g>
|
|
156
|
+
<g id="line">
|
|
157
|
+
<polyline fill="none" stroke="var(--solid-stepper-border)" stroke-miterlimit="10" stroke-width="1.5" points="36,62 65,12 7,12" />
|
|
158
|
+
</g>
|
|
159
|
+
</g>
|
|
160
|
+
</svg>
|
|
161
|
+
</div>
|
|
162
|
+
)}
|
|
163
|
+
|
|
164
|
+
{isAfterActive && !isLastVisible && (
|
|
165
|
+
<div className="absolute inactive-step-arrow">
|
|
166
|
+
<svg viewBox="0 0 72 72" xmlns="http://www.w3.org/2000/svg" fill="#000000" transform="rotate(30)"
|
|
167
|
+
height="48px"
|
|
168
|
+
width="48px"
|
|
169
|
+
>
|
|
170
|
+
<g id="SVGRepo_iconCarrier">
|
|
171
|
+
<g id="color">
|
|
172
|
+
<polygon fill="#fff" points="36,62 65,12 7,12" />
|
|
173
|
+
</g>
|
|
174
|
+
<g id="line">
|
|
175
|
+
<polyline fill="none" stroke="var(--solid-stepper-border)" stroke-miterlimit="10" stroke-width="1.5" points="36,62 65,12 7,12" />
|
|
176
|
+
</g>
|
|
177
|
+
</g>
|
|
178
|
+
</svg>
|
|
179
|
+
</div>
|
|
180
|
+
)}
|
|
181
|
+
</>
|
|
182
|
+
{solidFormViewWorkflowData.length > 5 && index === 4 && (
|
|
183
|
+
<div className='absolute' style={{ right: 5 }}>
|
|
184
|
+
<Button
|
|
185
|
+
type='button'
|
|
186
|
+
icon="pi pi-angle-down"
|
|
187
|
+
text
|
|
188
|
+
size='small'
|
|
189
|
+
style={{ height: 24, width: '1.5rem', padding: 0 }}
|
|
190
|
+
onClick={(e) =>
|
|
191
|
+
// @ts-ignore
|
|
192
|
+
formStepperOverlay.current.toggle(e)
|
|
193
|
+
}
|
|
194
|
+
/>
|
|
195
|
+
<OverlayPanel ref={formStepperOverlay} className="solid-custom-overlay solid-form-stepper-overlay">
|
|
196
|
+
<div className='flex flex-column gap-1 p-1'>
|
|
197
|
+
{solidFormViewWorkflowData.slice(5).map((step: any, index: number) => (
|
|
198
|
+
<Button
|
|
199
|
+
key={index}
|
|
200
|
+
type='button'
|
|
201
|
+
label={step.label}
|
|
202
|
+
size='small'
|
|
203
|
+
text
|
|
204
|
+
onClick={() => handleButtonClick(step.value)}
|
|
205
|
+
/>
|
|
206
|
+
))}
|
|
207
|
+
</div>
|
|
208
|
+
</OverlayPanel>
|
|
209
|
+
</div>
|
|
210
|
+
)}
|
|
211
|
+
</Button>
|
|
212
|
+
)
|
|
213
|
+
})}
|
|
214
|
+
</div>
|
|
215
|
+
</>
|
|
64
216
|
)
|
|
65
217
|
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client"
|
|
2
|
+
import { Card } from "primereact/card"
|
|
3
|
+
type SolidModuleParams = {
|
|
4
|
+
moduleName: string;
|
|
5
|
+
}
|
|
6
|
+
export const SolidModuleHome = (params: SolidModuleParams) => {
|
|
7
|
+
const formatName = (moduleName: string) => {
|
|
8
|
+
return moduleName
|
|
9
|
+
.split('-')
|
|
10
|
+
.map(word => word.charAt(0).toUpperCase() + word.slice(1)) // Capitalize each word
|
|
11
|
+
.join(' ');
|
|
12
|
+
};
|
|
13
|
+
return (
|
|
14
|
+
<div className="page-parent-wrapper">
|
|
15
|
+
<div className="surface-0 text-center">
|
|
16
|
+
<div className="mb-3 font-bold text-3xl">
|
|
17
|
+
<span className="text-900">One Product, </span>
|
|
18
|
+
<span className="text-blue-600">Many Solutions</span>
|
|
19
|
+
</div>
|
|
20
|
+
<div className="text-700 mb-6">Ac turpis egestas maecenas pharetra convallis posuere morbi leo urna.</div>
|
|
21
|
+
<div className="grid">
|
|
22
|
+
<div className="col-12 md:col-4 mb-4 px-5">
|
|
23
|
+
<span className="p-3 shadow-2 mb-3 inline-block" style={{ borderRadius: '10px' }}>
|
|
24
|
+
<i className="pi pi-desktop text-4xl text-blue-500"></i>
|
|
25
|
+
</span>
|
|
26
|
+
<div className="text-900 text-xl mb-3 font-medium">Built for Developers</div>
|
|
27
|
+
<span className="text-700 line-height-3">Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div className="col-12 md:col-4 mb-4 px-5">
|
|
30
|
+
<span className="p-3 shadow-2 mb-3 inline-block" style={{ borderRadius: '10px' }}>
|
|
31
|
+
<i className="pi pi-lock text-4xl text-blue-500"></i>
|
|
32
|
+
</span>
|
|
33
|
+
<div className="text-900 text-xl mb-3 font-medium">End-to-End Encryption</div>
|
|
34
|
+
<span className="text-700 line-height-3">Risus nec feugiat in fermentum posuere urna nec. Posuere sollicitudin aliquam ultrices sagittis.</span>
|
|
35
|
+
</div>
|
|
36
|
+
<div className="col-12 md:col-4 mb-4 px-5">
|
|
37
|
+
<span className="p-3 shadow-2 mb-3 inline-block" style={{ borderRadius: '10px' }}>
|
|
38
|
+
<i className="pi pi-check-circle text-4xl text-blue-500"></i>
|
|
39
|
+
</span>
|
|
40
|
+
<div className="text-900 text-xl mb-3 font-medium">Easy to Use</div>
|
|
41
|
+
<span className="text-700 line-height-3">Ornare suspendisse sed nisi lacus sed viverra tellus. Neque volutpat ac tincidunt vitae semper.</span>
|
|
42
|
+
</div>
|
|
43
|
+
<div className="col-12 md:col-4 mb-4 px-5">
|
|
44
|
+
<span className="p-3 shadow-2 mb-3 inline-block" style={{ borderRadius: '10px' }}>
|
|
45
|
+
<i className="pi pi-globe text-4xl text-blue-500"></i>
|
|
46
|
+
</span>
|
|
47
|
+
<div className="text-900 text-xl mb-3 font-medium">Fast & Global Support</div>
|
|
48
|
+
<span className="text-700 line-height-3">Fermentum et sollicitudin ac orci phasellus egestas tellus rutrum tellus.</span>
|
|
49
|
+
</div>
|
|
50
|
+
<div className="col-12 md:col-4 mb-4 px-5">
|
|
51
|
+
<span className="p-3 shadow-2 mb-3 inline-block" style={{ borderRadius: '10px' }}>
|
|
52
|
+
<i className="pi pi-github text-4xl text-blue-500"></i>
|
|
53
|
+
</span>
|
|
54
|
+
<div className="text-900 text-xl mb-3 font-medium">Open Source</div>
|
|
55
|
+
<span className="text-700 line-height-3">Nec tincidunt praesent semper feugiat. Sed adipiscing diam donec adipiscing tristique risus nec feugiat. </span>
|
|
56
|
+
</div>
|
|
57
|
+
<div className="col-12 md:col-4 md:mb-4 mb-0 px-3">
|
|
58
|
+
<span className="p-3 shadow-2 mb-3 inline-block" style={{ borderRadius: '10px' }}>
|
|
59
|
+
<i className="pi pi-shield text-4xl text-blue-500"></i>
|
|
60
|
+
</span>
|
|
61
|
+
<div className="text-900 text-xl mb-3 font-medium">Trusted Securitty</div>
|
|
62
|
+
<span className="text-700 line-height-3">Mattis rhoncus urna neque viverra justo nec ultrices. Id cursus metus aliquam eleifend.</span>
|
|
63
|
+
</div>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
)
|
|
68
|
+
}
|
|
@@ -41,6 +41,8 @@ import { SolidFormWidgetProps, SolidLoadForm } from "@/types/solid-core";
|
|
|
41
41
|
import { SolidPasswordField } from "./fields/SolidPasswordField";
|
|
42
42
|
import { SolidEmailField } from "./fields/SolidEmailField";
|
|
43
43
|
import { Panel } from "primereact/panel";
|
|
44
|
+
import { SolidFormStepper } from "@/components/common/SolidFormStepper";
|
|
45
|
+
import { SolidFormHeader } from "@/components/common/SolidFormHeader";
|
|
44
46
|
|
|
45
47
|
export type SolidFormViewProps = {
|
|
46
48
|
moduleName: string;
|
|
@@ -1176,17 +1178,23 @@ const SolidFormView = (params: SolidFormViewProps) => {
|
|
|
1176
1178
|
</>
|
|
1177
1179
|
)}
|
|
1178
1180
|
</div>
|
|
1179
|
-
{params.embeded !== true &&
|
|
1181
|
+
{/* {params.embeded !== true &&
|
|
1180
1182
|
<SolidBreadcrumb
|
|
1181
1183
|
solidViewData={solidFormViewMetaData?.data?.solidView?.model}
|
|
1182
1184
|
initialEntityData={initialEntityData}
|
|
1183
1185
|
/>
|
|
1184
|
-
}
|
|
1185
|
-
{/* {params.embeded !== true &&
|
|
1186
|
-
<div className="solid-form-stepper">
|
|
1187
|
-
<SolidFormStepper />
|
|
1188
|
-
</div>
|
|
1189
1186
|
} */}
|
|
1187
|
+
{params.embeded !== true &&
|
|
1188
|
+
// <div className="solid-form-stepper">
|
|
1189
|
+
<SolidFormHeader
|
|
1190
|
+
// solidFormViewMetaData={solidFormViewMetaData?.data?.solidView?.model}
|
|
1191
|
+
solidFormViewMetaData={solidFormViewMetaData}
|
|
1192
|
+
initialEntityData={initialEntityData}
|
|
1193
|
+
modelName={params.modelName}
|
|
1194
|
+
id={params.id}
|
|
1195
|
+
/>
|
|
1196
|
+
// </div>
|
|
1197
|
+
}
|
|
1190
1198
|
<div className="p-4 solid-form-content">
|
|
1191
1199
|
{DynamicHeaderComponent && <DynamicHeaderComponent />}
|
|
1192
1200
|
{renderFormDynamically(formViewMetaData)}
|
|
@@ -676,7 +676,7 @@ export const SolidListView = (params: SolidListViewParams) => {
|
|
|
676
676
|
onClick={() => setRecoverDialogVisible(true)}
|
|
677
677
|
></Button>}
|
|
678
678
|
|
|
679
|
-
{params.embeded === false &&
|
|
679
|
+
{params.embeded === false && (solidListViewMetaData?.data?.solidView?.layout?.attrs?.configureView !== false) &&
|
|
680
680
|
<SolidConfigureLayoutElement
|
|
681
681
|
setShowArchived={setShowArchived}
|
|
682
682
|
showArchived={showArchived}
|
|
@@ -19,6 +19,7 @@ import { Dialog } from "primereact/dialog";
|
|
|
19
19
|
import { Divider } from "primereact/divider";
|
|
20
20
|
import { OverlayPanel } from "primereact/overlaypanel";
|
|
21
21
|
import { SolidBreadcrumb } from "@/components/common/SolidBreadcrumb";
|
|
22
|
+
import { SolidFormHeader } from "@/components/common/SolidFormHeader";
|
|
22
23
|
|
|
23
24
|
interface ErrorResponseData {
|
|
24
25
|
message: string;
|
|
@@ -402,7 +403,7 @@ const CreateModel = ({ data, params }: any) => {
|
|
|
402
403
|
</>
|
|
403
404
|
}
|
|
404
405
|
</div>
|
|
405
|
-
<
|
|
406
|
+
<SolidFormHeader />
|
|
406
407
|
{/* <div className="solid-form-stepper">
|
|
407
408
|
<SolidFormStepper />
|
|
408
409
|
</div> */}
|
|
@@ -6,6 +6,7 @@ import { DropzoneUpload } from "@/components/common/DropzoneUpload";
|
|
|
6
6
|
import { FileReaderExt } from "@/components/common/FileReaderExt";
|
|
7
7
|
import { SingleSelectAutoCompleteField } from "@/components/common/SingleSelectAutoCompleteField";
|
|
8
8
|
import { SolidBreadcrumb } from "@/components/common/SolidBreadcrumb";
|
|
9
|
+
import { SolidFormHeader } from "@/components/common/SolidFormHeader";
|
|
9
10
|
import { SolidFormStepper } from "@/components/common/SolidFormStepper";
|
|
10
11
|
import { getSingularAndPlural } from "@/helpers/helpers";
|
|
11
12
|
import { handleError } from "@/helpers/ToastContainer";
|
|
@@ -414,7 +415,7 @@ const CreateModule = ({ data }: any) => {
|
|
|
414
415
|
</>
|
|
415
416
|
}
|
|
416
417
|
</div>
|
|
417
|
-
<
|
|
418
|
+
<SolidFormHeader />
|
|
418
419
|
{/* <div className="solid-form-stepper">
|
|
419
420
|
<SolidFormStepper />
|
|
420
421
|
</div> */}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { BackButton } from "@/components/common/BackButton";
|
|
3
3
|
import { CancelButton } from "@/components/common/CancelButton";
|
|
4
4
|
import { SolidBreadcrumb } from "@/components/common/SolidBreadcrumb";
|
|
5
|
+
import { SolidFormHeader } from "@/components/common/SolidFormHeader";
|
|
5
6
|
import { SolidFormStepper } from "@/components/common/SolidFormStepper";
|
|
6
7
|
import { useRegisterPrivateMutation, useUpdateUserMutation } from "@/redux/api/authApi";
|
|
7
8
|
import { useGetrolesQuery } from "@/redux/api/roleApi";
|
|
@@ -269,7 +270,7 @@ const CreateUser = ({ data, params }: any) => {
|
|
|
269
270
|
</>
|
|
270
271
|
)}
|
|
271
272
|
</div>
|
|
272
|
-
<
|
|
273
|
+
<SolidFormHeader />
|
|
273
274
|
{/* <div className="solid-form-stepper">
|
|
274
275
|
<SolidFormStepper />
|
|
275
276
|
</div> */}
|
|
@@ -399,10 +400,10 @@ const CreateUser = ({ data, params }: any) => {
|
|
|
399
400
|
|
|
400
401
|
</div>
|
|
401
402
|
</Panel>
|
|
402
|
-
|
|
403
|
+
|
|
403
404
|
{/* <Divider /> */}
|
|
404
405
|
{/* <p className="form-wrapper-heading text-base" style={{ fontSize: 16 }}>Roles</p> */}
|
|
405
|
-
|
|
406
|
+
|
|
406
407
|
<Panel toggleable header="Roles" className="solid-column-panel mt-5">
|
|
407
408
|
<div className="formgrid grid mt-4">
|
|
408
409
|
{rolesData?.data?.records && rolesData?.data?.records.map((role: any, i: number) => (
|
package/src/index.ts
CHANGED
|
@@ -281,6 +281,7 @@ export { SolidKanbanView } from '@/components/core/kanban/SolidKanbanView';
|
|
|
281
281
|
|
|
282
282
|
// export * from '@/components/core/kanban/columns/relations/SolidRelationManyToOneColumn';
|
|
283
283
|
|
|
284
|
+
export { SolidModuleHome } from '@/components/common/SolidModuleHome';
|
|
284
285
|
export { SolidListView } from '@/components/core/list/SolidListView';
|
|
285
286
|
export { SolidListViewColumn, getNumberOfInputs } from '@/components/core/list/SolidListViewColumn';
|
|
286
287
|
export type { SolidListViewColumnParams } from '@/components/core/list/SolidListViewColumn';
|
|
@@ -78,7 +78,13 @@ export const createSolidEntityApi = (entityName: string) => {
|
|
|
78
78
|
method: 'POST',
|
|
79
79
|
body: data
|
|
80
80
|
})
|
|
81
|
-
|
|
81
|
+
}),
|
|
82
|
+
patchUpdateSolidEntity: builder.mutation({
|
|
83
|
+
query: ({ id, data }) => ({
|
|
84
|
+
url: `/${kebabEntityName}/${id}`,
|
|
85
|
+
method: 'PATCH',
|
|
86
|
+
body: data,
|
|
87
|
+
}),
|
|
82
88
|
}),
|
|
83
89
|
}),
|
|
84
90
|
});
|
|
@@ -1664,11 +1664,12 @@ li.header-li-px {
|
|
|
1664
1664
|
}
|
|
1665
1665
|
|
|
1666
1666
|
.solid-form-wrapper .solid-form-content {
|
|
1667
|
-
height: calc(100vh -
|
|
1667
|
+
height: calc(100vh - 115px);
|
|
1668
|
+
/* height: calc(100vh - 111px); */
|
|
1668
1669
|
/* If No Breadcrumb */
|
|
1669
1670
|
/* height: calc(100vh - 64px); */
|
|
1670
1671
|
/* if Stepper */
|
|
1671
|
-
/* height: calc(100vh -
|
|
1672
|
+
/* height: calc(100vh - 127px); */
|
|
1672
1673
|
overflow-y: auto;
|
|
1673
1674
|
}
|
|
1674
1675
|
|
|
@@ -1682,18 +1683,27 @@ li.header-li-px {
|
|
|
1682
1683
|
|
|
1683
1684
|
.solid-form-stepper {
|
|
1684
1685
|
padding: 7.5px 14px 7.5px 24px;
|
|
1685
|
-
background-color:
|
|
1686
|
+
background-color: #fff;
|
|
1687
|
+
/* background-color: var(--solid-light-100); */
|
|
1686
1688
|
border-top: 1px solid var(--primary-light-color);
|
|
1687
1689
|
border-bottom: 1px solid var(--primary-light-color);
|
|
1688
1690
|
}
|
|
1689
1691
|
|
|
1692
|
+
.solid-dynamic-breadcrumb-stepper {
|
|
1693
|
+
height: 50px;
|
|
1694
|
+
border-bottom: 1px solid var(--primary-light-color);
|
|
1695
|
+
padding: 0.8rem 1.5rem;
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1690
1698
|
.solid-breadcrumb.p-breadcrumb {
|
|
1691
|
-
border-bottom: 1px solid #CED0D6;
|
|
1699
|
+
/* border-bottom: 1px solid #CED0D6; */
|
|
1700
|
+
border-bottom: none;
|
|
1692
1701
|
border-right: none;
|
|
1693
1702
|
border-left: none;
|
|
1694
1703
|
border-top: none;
|
|
1695
1704
|
border-radius: 0;
|
|
1696
|
-
padding: 0
|
|
1705
|
+
padding: 0;
|
|
1706
|
+
/* padding: 0.8rem 1.5rem; */
|
|
1697
1707
|
font-size: 14px;
|
|
1698
1708
|
font-weight: 500;
|
|
1699
1709
|
text-transform: capitalize;
|
|
@@ -1730,17 +1740,112 @@ li.header-li-px {
|
|
|
1730
1740
|
margin-top: 10px;
|
|
1731
1741
|
}
|
|
1732
1742
|
|
|
1743
|
+
|
|
1744
|
+
.solid-dynamic-stepper {
|
|
1745
|
+
overflow: hidden;
|
|
1746
|
+
border-radius: 6px;
|
|
1747
|
+
border: 1px solid var(--solid-stepper-border);
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
.active-step-arrow {
|
|
1751
|
+
left: -21px;
|
|
1752
|
+
z-index: 9999;
|
|
1753
|
+
top: 50%;
|
|
1754
|
+
transform: translateY(-38%);
|
|
1755
|
+
}
|
|
1756
|
+
|
|
1757
|
+
.active-before-step-arrow {
|
|
1758
|
+
left: -18px;
|
|
1759
|
+
z-index: 9999;
|
|
1760
|
+
top: 50%;
|
|
1761
|
+
transform: translateY(-38%);
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
.inactive-step-arrow {
|
|
1765
|
+
right: 2px;
|
|
1766
|
+
z-index: 999;
|
|
1767
|
+
top: 50%;
|
|
1768
|
+
transform: translateY(-37%);
|
|
1769
|
+
}
|
|
1770
|
+
|
|
1733
1771
|
.solid-step-button.p-button {
|
|
1734
1772
|
position: relative;
|
|
1735
|
-
min-width:
|
|
1773
|
+
min-width: 110px;
|
|
1736
1774
|
display: flex;
|
|
1737
1775
|
justify-content: center;
|
|
1776
|
+
padding-top: 8px;
|
|
1777
|
+
padding-bottom: 8px;
|
|
1778
|
+
font-size: 0.875rem;
|
|
1779
|
+
border-radius: 0;
|
|
1780
|
+
border: none;
|
|
1738
1781
|
}
|
|
1739
1782
|
|
|
1783
|
+
.solid-step-button.p-button-primary {
|
|
1784
|
+
padding-right: 0;
|
|
1785
|
+
}
|
|
1740
1786
|
|
|
1741
|
-
.solid-step-button.p-button:
|
|
1742
|
-
padding-left:
|
|
1743
|
-
min-width:
|
|
1787
|
+
.solid-step-button.p-button-secondary:first-child {
|
|
1788
|
+
padding-left: 0;
|
|
1789
|
+
min-width: 100px;
|
|
1790
|
+
}
|
|
1791
|
+
|
|
1792
|
+
/* .solid-step-button.p-button.p-button-text:first-child {
|
|
1793
|
+
padding-left: 16px !important;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
.solid-step-button.p-button.p-button-text:not(:first-child) {
|
|
1797
|
+
padding-left: 0px !important;
|
|
1798
|
+
} */
|
|
1799
|
+
|
|
1800
|
+
.solid-step-button.p-button-secondary {
|
|
1801
|
+
background-color: #EAEDF1;
|
|
1802
|
+
color: #0D0B26;
|
|
1803
|
+
padding-right: 0;
|
|
1804
|
+
}
|
|
1805
|
+
|
|
1806
|
+
.solid-step-button.p-button-secondary.p-button:not(:disabled):active {
|
|
1807
|
+
background: #EAEDF1;
|
|
1808
|
+
color: #0D0B26;
|
|
1809
|
+
}
|
|
1810
|
+
|
|
1811
|
+
.solid-step-button.p-button-secondary.p-button:not(:disabled):hover {
|
|
1812
|
+
background: #EAEDF1;
|
|
1813
|
+
color: #0D0B26;
|
|
1814
|
+
}
|
|
1815
|
+
|
|
1816
|
+
.solid-step-button.p-button:not(:disabled):active {
|
|
1817
|
+
background: var(--primary-color);
|
|
1818
|
+
color: #ffffff;
|
|
1819
|
+
border-color: var(--primary-color);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1822
|
+
.solid-step-button.p-button:not(:disabled):hover {
|
|
1823
|
+
background: var(--primary-color);
|
|
1824
|
+
color: #ffffff;
|
|
1825
|
+
border-color: var(--primary-color);
|
|
1826
|
+
}
|
|
1827
|
+
|
|
1828
|
+
.solid-step-button.p-button.p-button-text {
|
|
1829
|
+
background-color: transparent;
|
|
1830
|
+
color: #0D0B26;
|
|
1831
|
+
border: 0;
|
|
1832
|
+
min-width: 130px;
|
|
1833
|
+
/* padding-left: 0; */
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
/* .solid-dynamic-stepper.test .solid-step-button.p-button:nth-child(2) {
|
|
1837
|
+
padding-left: 20px !important;
|
|
1838
|
+
min-width: 130px;
|
|
1839
|
+
} */
|
|
1840
|
+
|
|
1841
|
+
.solid-step-button.p-button.p-button-text:not(:disabled):active {
|
|
1842
|
+
background-color: transparent;
|
|
1843
|
+
color: #0D0B26;
|
|
1844
|
+
}
|
|
1845
|
+
|
|
1846
|
+
.solid-step-button.p-button.p-button-text:not(:disabled):hover {
|
|
1847
|
+
background-color: transparent;
|
|
1848
|
+
color: #0D0B26;
|
|
1744
1849
|
}
|
|
1745
1850
|
|
|
1746
1851
|
.solid-step-button.btn-step-first {
|
|
@@ -2774,6 +2879,7 @@ li.header-li-px {
|
|
|
2774
2879
|
.solid-right-layout .solid-logo {
|
|
2775
2880
|
top: 3rem;
|
|
2776
2881
|
}
|
|
2882
|
+
|
|
2777
2883
|
.customize-layout-panel.p-overlaypanel {
|
|
2778
2884
|
position: absolute;
|
|
2779
2885
|
left: 59% !important;
|