@visns-studio/visns-components 5.14.2 → 5.14.4
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/package.json
CHANGED
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
89
89
|
},
|
|
90
90
|
"name": "@visns-studio/visns-components",
|
|
91
|
-
"version": "5.14.
|
|
91
|
+
"version": "5.14.4",
|
|
92
92
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
93
93
|
"main": "src/index.js",
|
|
94
94
|
"files": [
|
|
@@ -122,15 +122,17 @@ const OcrTemplateEnhanced = ({
|
|
|
122
122
|
});
|
|
123
123
|
setCompletedSteps(newCompletedSteps);
|
|
124
124
|
|
|
125
|
-
//
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
125
|
+
// Only auto-advance if we haven't manually navigated
|
|
126
|
+
if (!hasAutoJumped) {
|
|
127
|
+
const currentStepData = journeySteps.find(s => s.id === currentStep);
|
|
128
|
+
if (currentStepData?.isCompleted() && currentStep < journeySteps.length) {
|
|
129
|
+
const nextIncompleteStep = journeySteps.find(s => s.id > currentStep && !newCompletedSteps.has(s.id));
|
|
130
|
+
if (nextIncompleteStep) {
|
|
131
|
+
setCurrentStep(nextIncompleteStep.id);
|
|
132
|
+
}
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
|
-
}, [ocrTemplateBuilder, data, currentStep]);
|
|
135
|
+
}, [ocrTemplateBuilder, data, currentStep, hasAutoJumped]);
|
|
134
136
|
|
|
135
137
|
// Initial step detection - jump to latest completed step on load (only once)
|
|
136
138
|
React.useEffect(() => {
|
|
@@ -168,8 +170,31 @@ const OcrTemplateEnhanced = ({
|
|
|
168
170
|
|
|
169
171
|
// Manual navigation function to prevent auto-jump interference
|
|
170
172
|
const navigateToStep = (stepId) => {
|
|
171
|
-
|
|
172
|
-
|
|
173
|
+
// Validate step ID
|
|
174
|
+
if (stepId < 1 || stepId > journeySteps.length) {
|
|
175
|
+
console.warn(`Invalid step ID: ${stepId}`);
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
const targetStep = journeySteps.find(s => s.id === stepId);
|
|
180
|
+
if (!targetStep) {
|
|
181
|
+
console.warn(`Step not found: ${stepId}`);
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
// Check if we can access this step
|
|
186
|
+
const stepIndex = journeySteps.findIndex(s => s.id === stepId);
|
|
187
|
+
const canAccess = stepIndex === 0 ||
|
|
188
|
+
completedSteps.has(stepId) ||
|
|
189
|
+
completedSteps.has(journeySteps[stepIndex - 1].id);
|
|
190
|
+
|
|
191
|
+
if (canAccess) {
|
|
192
|
+
console.log(`Navigating to step ${stepId}`);
|
|
193
|
+
setCurrentStep(stepId);
|
|
194
|
+
setHasAutoJumped(true); // Prevent future auto-jumping after manual navigation
|
|
195
|
+
} else {
|
|
196
|
+
console.warn(`Cannot access step ${stepId}. Step index: ${stepIndex}, Completed steps:`, Array.from(completedSteps));
|
|
197
|
+
}
|
|
173
198
|
};
|
|
174
199
|
|
|
175
200
|
// Enhanced smart categorization utility
|
|
@@ -1125,7 +1150,14 @@ const OcrTemplateEnhanced = ({
|
|
|
1125
1150
|
<div
|
|
1126
1151
|
key={step.id}
|
|
1127
1152
|
className={`${styles.progressStep} ${isActive ? styles.active : ''} ${isCompleted ? styles.completed : ''} ${!canAccess ? styles.disabled : ''}`}
|
|
1128
|
-
onClick={() =>
|
|
1153
|
+
onClick={() => {
|
|
1154
|
+
if (canAccess) {
|
|
1155
|
+
navigateToStep(step.id);
|
|
1156
|
+
} else {
|
|
1157
|
+
console.log(`Step ${step.id} not accessible. Completed steps:`, Array.from(completedSteps));
|
|
1158
|
+
}
|
|
1159
|
+
}}
|
|
1160
|
+
style={{ cursor: canAccess ? 'pointer' : 'not-allowed' }}
|
|
1129
1161
|
>
|
|
1130
1162
|
<div className={styles.stepIcon}>
|
|
1131
1163
|
{isCompleted ? (
|
|
@@ -1294,7 +1326,7 @@ const OcrTemplateEnhanced = ({
|
|
|
1294
1326
|
<div className={styles.journeyNavigation}>
|
|
1295
1327
|
<button
|
|
1296
1328
|
className={styles.navBtn}
|
|
1297
|
-
onClick={() => navigateToStep(
|
|
1329
|
+
onClick={() => navigateToStep(currentStep - 1)}
|
|
1298
1330
|
disabled={currentStep === 1}
|
|
1299
1331
|
>
|
|
1300
1332
|
<ArrowLeft size={16} />
|
|
@@ -1303,11 +1335,17 @@ const OcrTemplateEnhanced = ({
|
|
|
1303
1335
|
|
|
1304
1336
|
<div className={styles.stepIndicator}>
|
|
1305
1337
|
Step {currentStep} of {journeySteps.length}
|
|
1338
|
+
{completedSteps.has(currentStep) && (
|
|
1339
|
+
<span className={styles.completedBadge}>
|
|
1340
|
+
<CheckCircle2 size={14} />
|
|
1341
|
+
Completed
|
|
1342
|
+
</span>
|
|
1343
|
+
)}
|
|
1306
1344
|
</div>
|
|
1307
1345
|
|
|
1308
1346
|
<button
|
|
1309
1347
|
className={styles.navBtn}
|
|
1310
|
-
onClick={() => navigateToStep(
|
|
1348
|
+
onClick={() => navigateToStep(currentStep + 1)}
|
|
1311
1349
|
disabled={currentStep === journeySteps.length}
|
|
1312
1350
|
>
|
|
1313
1351
|
Next Step
|
|
@@ -587,7 +587,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
587
587
|
opacity: 1 !important;
|
|
588
588
|
padding: 0 4px !important;
|
|
589
589
|
background: var(--tertiary-color) !important;
|
|
590
|
-
z-index:
|
|
590
|
+
z-index: 5;
|
|
591
591
|
font-weight: 300;
|
|
592
592
|
border-radius: var(--br);
|
|
593
593
|
top: 0;
|
|
@@ -600,7 +600,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
600
600
|
border-top-left-radius: var(--br);
|
|
601
601
|
border-top-right-radius: var(--br);
|
|
602
602
|
position: relative;
|
|
603
|
-
z-index:
|
|
603
|
+
z-index: 100;
|
|
604
604
|
}
|
|
605
605
|
|
|
606
606
|
/* Modal backdrop to prevent background interactions */
|
|
@@ -611,7 +611,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
611
611
|
right: 0;
|
|
612
612
|
bottom: 0;
|
|
613
613
|
background: rgba(0, 0, 0, 0.5);
|
|
614
|
-
z-index:
|
|
614
|
+
z-index: 99;
|
|
615
615
|
backdrop-filter: blur(2px);
|
|
616
616
|
-webkit-backdrop-filter: blur(2px);
|
|
617
617
|
}
|
|
@@ -759,7 +759,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
759
759
|
bottom: 20px;
|
|
760
760
|
right: 20px;
|
|
761
761
|
width: auto;
|
|
762
|
-
z-index:
|
|
762
|
+
z-index: 5;
|
|
763
763
|
|
|
764
764
|
button {
|
|
765
765
|
display: block;
|
|
@@ -1192,7 +1192,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1192
1192
|
// Ensure proper layout during sorting
|
|
1193
1193
|
&.sortableHelper {
|
|
1194
1194
|
position: fixed !important;
|
|
1195
|
-
z-index:
|
|
1195
|
+
z-index: 50 !important;
|
|
1196
1196
|
pointer-events: none !important;
|
|
1197
1197
|
}
|
|
1198
1198
|
|
|
@@ -1222,7 +1222,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1222
1222
|
align-items: flex-start;
|
|
1223
1223
|
opacity: 0;
|
|
1224
1224
|
transition: opacity 0.2s ease;
|
|
1225
|
-
z-index:
|
|
1225
|
+
z-index: 10; // Reduced significantly to stay below header
|
|
1226
1226
|
pointer-events: none;
|
|
1227
1227
|
|
|
1228
1228
|
> * {
|
|
@@ -1247,7 +1247,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1247
1247
|
font-weight: 400; // Lighter font weight - reduced from 500
|
|
1248
1248
|
white-space: nowrap;
|
|
1249
1249
|
box-shadow: 0 1px 4px rgba(var(--primary-rgb), 0.15); // Much softer shadow
|
|
1250
|
-
z-index:
|
|
1250
|
+
z-index: 11; // Reduced significantly to stay below header
|
|
1251
1251
|
pointer-events: none;
|
|
1252
1252
|
opacity: 0.7; // More subtle - reduced from 1
|
|
1253
1253
|
transition: all 0.2s ease;
|
|
@@ -1294,7 +1294,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1294
1294
|
min-width: 28px;
|
|
1295
1295
|
min-height: 28px;
|
|
1296
1296
|
position: relative;
|
|
1297
|
-
z-index:
|
|
1297
|
+
z-index: 12; // Reduced significantly to stay below header
|
|
1298
1298
|
|
|
1299
1299
|
svg {
|
|
1300
1300
|
display: block !important;
|
|
@@ -1344,7 +1344,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1344
1344
|
min-width: 28px;
|
|
1345
1345
|
min-height: 28px;
|
|
1346
1346
|
position: relative;
|
|
1347
|
-
z-index:
|
|
1347
|
+
z-index: 12; // Reduced significantly to stay below header
|
|
1348
1348
|
|
|
1349
1349
|
svg {
|
|
1350
1350
|
display: block !important;
|
|
@@ -1556,7 +1556,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1556
1556
|
}
|
|
1557
1557
|
|
|
1558
1558
|
.sortingHelper {
|
|
1559
|
-
z-index:
|
|
1559
|
+
z-index: 50 !important;
|
|
1560
1560
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2) !important;
|
|
1561
1561
|
transform: rotate(2deg) scale(1.05) !important;
|
|
1562
1562
|
pointer-events: none !important;
|
|
@@ -1763,7 +1763,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1763
1763
|
/* Tooltip positioning fixes */
|
|
1764
1764
|
[data-tooltip-id] {
|
|
1765
1765
|
position: relative;
|
|
1766
|
-
z-index:
|
|
1766
|
+
z-index: 50; /* Reduced further to stay below header */
|
|
1767
1767
|
}
|
|
1768
1768
|
|
|
1769
1769
|
/* React Tooltip specific z-index override */
|
|
@@ -1771,7 +1771,7 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1771
1771
|
:global([data-tooltip-id="action-tooltip"]),
|
|
1772
1772
|
:global([data-tooltip-id="system-tooltip"]) {
|
|
1773
1773
|
position: relative;
|
|
1774
|
-
z-index:
|
|
1774
|
+
z-index: 50 !important;
|
|
1775
1775
|
}
|
|
1776
1776
|
|
|
1777
1777
|
/* Ensure action tooltips take priority over field tooltips */
|
|
@@ -1779,9 +1779,9 @@ select:not(:placeholder-shown) + .fi__span {
|
|
|
1779
1779
|
.editIcon,
|
|
1780
1780
|
.deleteIcon {
|
|
1781
1781
|
position: relative;
|
|
1782
|
-
z-index:
|
|
1782
|
+
z-index: 51;
|
|
1783
1783
|
|
|
1784
1784
|
&:hover {
|
|
1785
|
-
z-index:
|
|
1785
|
+
z-index: 52;
|
|
1786
1786
|
}
|
|
1787
1787
|
}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
/* Custom styles for SweetAlert2 popups */
|
|
2
2
|
|
|
3
|
+
/* Ensure SweetAlert appears above form builder */
|
|
4
|
+
:global(.swal2-container) {
|
|
5
|
+
z-index: 1000 !important;
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
:global(.swal2-popup) {
|
|
4
9
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
|
5
10
|
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
|
@@ -107,3 +112,4 @@
|
|
|
107
112
|
font-size: 14px !important;
|
|
108
113
|
font-size: clamp(14px, 14px, 14px) !important;
|
|
109
114
|
}
|
|
115
|
+
|