@visns-studio/visns-components 5.4.17 → 5.4.19
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
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"@nivo/core": "^0.88.0",
|
|
9
9
|
"@nivo/line": "^0.88.0",
|
|
10
10
|
"@nivo/pie": "^0.88.0",
|
|
11
|
-
"@tinymce/tinymce-react": "^
|
|
11
|
+
"@tinymce/tinymce-react": "^6.1.0",
|
|
12
12
|
"@vitejs/plugin-react": "^4.3.4",
|
|
13
13
|
"add": "^2.0.6",
|
|
14
14
|
"akar-icons": "^1.9.31",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"react-datepicker": "^7.6.0",
|
|
37
37
|
"react-dropzone": "^14.3.8",
|
|
38
38
|
"react-grid-gallery": "^1.0.1",
|
|
39
|
-
"react-number-format": "^5.4.
|
|
39
|
+
"react-number-format": "^5.4.4",
|
|
40
40
|
"react-password-strength-bar": "^0.4.1",
|
|
41
41
|
"react-promise-tracker": "^2.1.1",
|
|
42
42
|
"react-quill": "^2.0.0",
|
|
@@ -54,7 +54,7 @@
|
|
|
54
54
|
"reactjs-popup": "^2.0.6",
|
|
55
55
|
"style-loader": "^4.0.0",
|
|
56
56
|
"swapy": "^1.0.5",
|
|
57
|
-
"sweetalert2": "^11.
|
|
57
|
+
"sweetalert2": "^11.18.0",
|
|
58
58
|
"truncate": "^3.0.0",
|
|
59
59
|
"uuid": "^10.0.0",
|
|
60
60
|
"validator": "^13.15.0",
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
82
82
|
},
|
|
83
83
|
"name": "@visns-studio/visns-components",
|
|
84
|
-
"version": "5.4.
|
|
84
|
+
"version": "5.4.19",
|
|
85
85
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
86
86
|
"main": "src/index.js",
|
|
87
87
|
"files": [
|
|
@@ -1226,11 +1226,14 @@ function Field({
|
|
|
1226
1226
|
name={settings.id}
|
|
1227
1227
|
data-name={settings.id}
|
|
1228
1228
|
type="radio"
|
|
1229
|
-
className={styles.fi__customcheckbox}
|
|
1229
|
+
className={`${styles.fi__customcheckbox} radio-input`}
|
|
1230
1230
|
value={option.id}
|
|
1231
1231
|
checked={
|
|
1232
|
-
|
|
1233
|
-
|
|
1232
|
+
inputValue !== undefined &&
|
|
1233
|
+
inputValue !== null &&
|
|
1234
|
+
inputValue !== '' &&
|
|
1235
|
+
parseInt(String(inputValue)) ===
|
|
1236
|
+
parseInt(String(option.id))
|
|
1234
1237
|
}
|
|
1235
1238
|
onChange={onChange}
|
|
1236
1239
|
/>
|
|
@@ -1253,11 +1256,25 @@ function Field({
|
|
|
1253
1256
|
name={settings.id}
|
|
1254
1257
|
data-name={settings.id}
|
|
1255
1258
|
type="radio"
|
|
1256
|
-
className={styles.fi__customcheckbox}
|
|
1259
|
+
className={`${styles.fi__customcheckbox} radio-input`}
|
|
1257
1260
|
value={option.id}
|
|
1258
1261
|
checked={
|
|
1259
|
-
|
|
1260
|
-
|
|
1262
|
+
inputValue !== undefined &&
|
|
1263
|
+
inputValue !== null &&
|
|
1264
|
+
inputValue !== '' &&
|
|
1265
|
+
// Handle case where inputValue is an object with value property
|
|
1266
|
+
((typeof inputValue === 'object' &&
|
|
1267
|
+
inputValue.value !== undefined &&
|
|
1268
|
+
parseInt(
|
|
1269
|
+
String(inputValue.value)
|
|
1270
|
+
) ===
|
|
1271
|
+
parseInt(String(option.id))) ||
|
|
1272
|
+
// Handle case where inputValue is a direct value
|
|
1273
|
+
(typeof inputValue !== 'object' &&
|
|
1274
|
+
parseInt(String(inputValue)) ===
|
|
1275
|
+
parseInt(
|
|
1276
|
+
String(option.id)
|
|
1277
|
+
)))
|
|
1261
1278
|
}
|
|
1262
1279
|
onChange={onChange}
|
|
1263
1280
|
/>
|
|
@@ -1341,6 +1358,10 @@ function Field({
|
|
|
1341
1358
|
type={'checkbox'}
|
|
1342
1359
|
checked={cell[cellKey] || false}
|
|
1343
1360
|
data-id={settings.id}
|
|
1361
|
+
style={{
|
|
1362
|
+
transform: 'scale(1)', // Use normal scale
|
|
1363
|
+
margin: '3px', // Reduced margin
|
|
1364
|
+
}}
|
|
1344
1365
|
onChange={(e) => {
|
|
1345
1366
|
e.stopPropagation(); // Stop event bubbling
|
|
1346
1367
|
onChangeTableRadio(e, rowKey, cellKey);
|
|
@@ -1439,8 +1460,8 @@ function Field({
|
|
|
1439
1460
|
checked={cell[cellKey] || false}
|
|
1440
1461
|
data-id={settings.id}
|
|
1441
1462
|
style={{
|
|
1442
|
-
transform: 'scale(1
|
|
1443
|
-
margin: '
|
|
1463
|
+
transform: 'scale(1)', // Use normal scale
|
|
1464
|
+
margin: '3px', // Reduced margin
|
|
1444
1465
|
}}
|
|
1445
1466
|
onChange={(e) => {
|
|
1446
1467
|
e.stopPropagation(); // Stop event bubbling
|
|
@@ -886,17 +886,19 @@ function Form({
|
|
|
886
886
|
|
|
887
887
|
if (resSaveAnother.data.error === '') {
|
|
888
888
|
toast.success(saveAnother.message);
|
|
889
|
+
fetchTable();
|
|
889
890
|
}
|
|
890
891
|
} else {
|
|
891
892
|
fetchData();
|
|
892
893
|
modalOpen('create', 0);
|
|
893
894
|
}
|
|
894
895
|
}
|
|
896
|
+
} else {
|
|
897
|
+
toast.success(
|
|
898
|
+
formSettings?.save?.toast?.success ||
|
|
899
|
+
'Entry successfully saved into the system.'
|
|
900
|
+
);
|
|
895
901
|
}
|
|
896
|
-
toast.success(
|
|
897
|
-
formSettings?.save?.toast?.success ||
|
|
898
|
-
'Entry successfully saved into the system.'
|
|
899
|
-
);
|
|
900
902
|
|
|
901
903
|
if (formSettings.redirect && res.data.data?.id) {
|
|
902
904
|
navigate(
|
|
@@ -1190,6 +1192,7 @@ function Form({
|
|
|
1190
1192
|
'multi-dropdown',
|
|
1191
1193
|
'multi-dropdown-ajax',
|
|
1192
1194
|
'async-dropdown-ajax',
|
|
1195
|
+
'radio-ajax',
|
|
1193
1196
|
];
|
|
1194
1197
|
|
|
1195
1198
|
if (relationTypes.includes(field.type)) {
|
|
@@ -635,8 +635,8 @@
|
|
|
635
635
|
}
|
|
636
636
|
|
|
637
637
|
.schedulingTable td input[type='checkbox'] {
|
|
638
|
-
width:
|
|
639
|
-
height:
|
|
638
|
+
width: 14px !important;
|
|
639
|
+
height: 14px !important;
|
|
640
640
|
border-radius: 4px;
|
|
641
641
|
background-color: var(--item-color);
|
|
642
642
|
border: 2px solid rgba(var(--primary-rgb), 0.15);
|
|
@@ -105,8 +105,8 @@
|
|
|
105
105
|
.fi__optionscontainer {
|
|
106
106
|
display: flex;
|
|
107
107
|
flex-wrap: wrap; // Allows options to wrap if they exceed the container's width
|
|
108
|
-
gap:
|
|
109
|
-
margin-top:
|
|
108
|
+
gap: 6px; // Further reduced gap for more compact layout
|
|
109
|
+
margin-top: 4px; // Further reduced margin for more compact layout
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
.fi__checkboxcontainer {
|
|
@@ -116,11 +116,80 @@
|
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
.fi__customcheckbox {
|
|
119
|
-
margin-right:
|
|
119
|
+
margin-right: 4px; // Reduced space between checkbox and its label
|
|
120
|
+
-webkit-appearance: none; // Reset default appearance for Safari
|
|
121
|
+
-moz-appearance: none;
|
|
122
|
+
appearance: none;
|
|
123
|
+
width: 14px;
|
|
124
|
+
height: 14px;
|
|
125
|
+
border: 1px solid rgba(var(--paragraph-color-rgb), 0.5);
|
|
126
|
+
outline: none;
|
|
127
|
+
position: relative;
|
|
128
|
+
cursor: pointer;
|
|
129
|
+
vertical-align: middle;
|
|
130
|
+
background-color: white;
|
|
131
|
+
display: inline-block;
|
|
132
|
+
transition: border-color 0.2s ease-in-out;
|
|
133
|
+
transform: scale(1) !important; /* Override any transform scale */
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
/* Apply border-radius based on input type */
|
|
137
|
+
input[type='radio'].fi__customcheckbox {
|
|
138
|
+
border-radius: 50% !important; // Make it round for radio buttons
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
input[type='checkbox'].fi__customcheckbox {
|
|
142
|
+
border-radius: 3px !important; // Make it square for checkboxes
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
/* Hover state */
|
|
146
|
+
.fi__customcheckbox:hover {
|
|
147
|
+
border-color: var(--primary-color);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
/* Styling for checked state */
|
|
151
|
+
.fi__customcheckbox:checked {
|
|
152
|
+
border-color: var(--primary-color);
|
|
153
|
+
background-color: white;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
/* Create the inner circle/square for checked state */
|
|
157
|
+
.fi__customcheckbox:checked::after {
|
|
158
|
+
content: '';
|
|
159
|
+
position: absolute;
|
|
160
|
+
top: 50%;
|
|
161
|
+
left: 50%;
|
|
162
|
+
transform: translate(-50%, -50%);
|
|
163
|
+
width: 7px;
|
|
164
|
+
height: 7px;
|
|
165
|
+
background-color: var(--primary-color);
|
|
166
|
+
display: block;
|
|
167
|
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/* Apply border-radius to the checked state based on input type */
|
|
171
|
+
input[type='radio'].fi__customcheckbox:checked::after {
|
|
172
|
+
border-radius: 50% !important; // Make it round for radio buttons
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
input[type='checkbox'].fi__customcheckbox:checked::after {
|
|
176
|
+
content: '✓' !important;
|
|
177
|
+
border-radius: 0 !important;
|
|
178
|
+
width: auto !important;
|
|
179
|
+
height: auto !important;
|
|
180
|
+
background-color: transparent !important;
|
|
181
|
+
font-size: 10px !important;
|
|
182
|
+
line-height: 1 !important;
|
|
183
|
+
color: var(--primary-color) !important;
|
|
184
|
+
box-shadow: none !important;
|
|
185
|
+
font-weight: bold !important;
|
|
120
186
|
}
|
|
121
187
|
|
|
122
188
|
.fi__checkboxlabel {
|
|
123
189
|
user-select: none; // Improves UX by preventing text selection
|
|
190
|
+
margin-left: 4px;
|
|
191
|
+
vertical-align: middle;
|
|
192
|
+
font-size: 0.9em; // Slightly smaller font for more compact appearance
|
|
124
193
|
}
|
|
125
194
|
}
|
|
126
195
|
|
|
@@ -37,6 +37,91 @@ select {
|
|
|
37
37
|
font: inherit;
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
+
/* Global radio button styling */
|
|
41
|
+
input[type='radio'],
|
|
42
|
+
.radio-input {
|
|
43
|
+
-webkit-appearance: none !important;
|
|
44
|
+
-moz-appearance: none !important;
|
|
45
|
+
appearance: none !important;
|
|
46
|
+
width: 14px !important;
|
|
47
|
+
height: 14px !important;
|
|
48
|
+
border: 1px solid rgba(var(--paragraph-color-rgb, 0, 0, 0), 0.5) !important;
|
|
49
|
+
border-radius: 50% !important;
|
|
50
|
+
outline: none !important;
|
|
51
|
+
position: relative !important;
|
|
52
|
+
cursor: pointer !important;
|
|
53
|
+
vertical-align: middle !important;
|
|
54
|
+
background-color: white !important;
|
|
55
|
+
display: inline-block !important;
|
|
56
|
+
box-sizing: border-box !important;
|
|
57
|
+
transition: border-color 0.2s ease-in-out !important;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/* Global checkbox styling */
|
|
61
|
+
input[type='checkbox'] {
|
|
62
|
+
-webkit-appearance: none !important;
|
|
63
|
+
-moz-appearance: none !important;
|
|
64
|
+
appearance: none !important;
|
|
65
|
+
width: 14px !important;
|
|
66
|
+
height: 14px !important;
|
|
67
|
+
border: 1px solid rgba(var(--paragraph-color-rgb, 0, 0, 0), 0.5) !important;
|
|
68
|
+
border-radius: 3px !important;
|
|
69
|
+
outline: none !important;
|
|
70
|
+
position: relative !important;
|
|
71
|
+
cursor: pointer !important;
|
|
72
|
+
vertical-align: middle !important;
|
|
73
|
+
background-color: white !important;
|
|
74
|
+
display: inline-block !important;
|
|
75
|
+
box-sizing: border-box !important;
|
|
76
|
+
transition: border-color 0.2s ease-in-out !important;
|
|
77
|
+
transform: scale(1) !important; /* Override any transform scale */
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
input[type='radio']:hover,
|
|
81
|
+
.radio-input:hover,
|
|
82
|
+
input[type='checkbox']:hover {
|
|
83
|
+
border-color: var(--primary-color, #0066cc) !important;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
input[type='radio']:checked,
|
|
87
|
+
.radio-input:checked {
|
|
88
|
+
border-color: var(--primary-color, #0066cc) !important;
|
|
89
|
+
background-color: white !important;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
input[type='checkbox']:checked {
|
|
93
|
+
border-color: var(--primary-color, #0066cc) !important;
|
|
94
|
+
background-color: white !important;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
input[type='radio']:checked::after,
|
|
98
|
+
.radio-input:checked::after {
|
|
99
|
+
content: '' !important;
|
|
100
|
+
position: absolute !important;
|
|
101
|
+
top: 50% !important;
|
|
102
|
+
left: 50% !important;
|
|
103
|
+
transform: translate(-50%, -50%) !important;
|
|
104
|
+
width: 7px !important;
|
|
105
|
+
height: 7px !important;
|
|
106
|
+
border-radius: 50% !important;
|
|
107
|
+
background-color: var(--primary-color, #0066cc) !important;
|
|
108
|
+
display: block !important;
|
|
109
|
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2) !important;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
input[type='checkbox']:checked::after {
|
|
113
|
+
content: '✓' !important;
|
|
114
|
+
position: absolute !important;
|
|
115
|
+
top: 50% !important;
|
|
116
|
+
left: 50% !important;
|
|
117
|
+
transform: translate(-50%, -50%) !important;
|
|
118
|
+
font-size: 10px !important;
|
|
119
|
+
line-height: 1 !important;
|
|
120
|
+
color: var(--primary-color, #0066cc) !important;
|
|
121
|
+
display: block !important;
|
|
122
|
+
font-weight: bold !important;
|
|
123
|
+
}
|
|
124
|
+
|
|
40
125
|
select {
|
|
41
126
|
background: url(data:image/svg+xml;base64,PHN2ZyBpZD0iTGF5ZXJfMSIgZGF0YS1uYW1lPSJMYXllciAxIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0Ljk1IDEwIj48ZGVmcz48c3R5bGU+LmNscy0xe2ZpbGw6I2ZmZjt9LmNscy0ye2ZpbGw6IzQ0NDt9PC9zdHlsZT48L2RlZnM+PHRpdGxlPmFycm93czwvdGl0bGU+PHJlY3QgY2xhc3M9ImNscy0xIiB3aWR0aD0iNC45NSIgaGVpZ2h0PSIxMCIvPjxwb2x5Z29uIGNsYXNzPSJjbHMtMiIgcG9pbnRzPSIxLjQxIDQuNjcgMi40OCAzLjE4IDMuNTQgNC42NyAxLjQxIDQuNjciLz48cG9seWdvbiBjbGFzcz0iY2xzLTIiIHBvaW50cz0iMy41NCA1LjMzIDIuNDggNi44MiAxLjQxIDUuMzMgMy41NCA1LjMzIi8+PC9zdmc+)
|
|
42
127
|
no-repeat 100% 50% #fff;
|
|
@@ -292,3 +377,88 @@ input[type]:not([type='search']):not([type='url']):not([type='hidden']):not(
|
|
|
292
377
|
background: rgba(0, 0, 0, 0.5) !important;
|
|
293
378
|
z-index: -1 !important;
|
|
294
379
|
}
|
|
380
|
+
|
|
381
|
+
/* Safari-specific fixes for form elements */
|
|
382
|
+
@supports (-webkit-touch-callout: none) {
|
|
383
|
+
/* Safari-specific styles */
|
|
384
|
+
input[type='radio'],
|
|
385
|
+
.radio-input {
|
|
386
|
+
-webkit-appearance: none !important;
|
|
387
|
+
appearance: none !important;
|
|
388
|
+
width: 14px !important;
|
|
389
|
+
height: 14px !important;
|
|
390
|
+
border: 1px solid rgba(var(--paragraph-color-rgb, 0, 0, 0), 0.5) !important;
|
|
391
|
+
border-radius: 50% !important;
|
|
392
|
+
outline: none !important;
|
|
393
|
+
position: relative !important;
|
|
394
|
+
cursor: pointer !important;
|
|
395
|
+
vertical-align: middle !important;
|
|
396
|
+
background-color: white !important;
|
|
397
|
+
display: inline-block !important;
|
|
398
|
+
box-sizing: border-box !important;
|
|
399
|
+
transition: border-color 0.2s ease-in-out !important;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
input[type='checkbox'] {
|
|
403
|
+
-webkit-appearance: none !important;
|
|
404
|
+
appearance: none !important;
|
|
405
|
+
width: 14px !important;
|
|
406
|
+
height: 14px !important;
|
|
407
|
+
border: 1px solid rgba(var(--paragraph-color-rgb, 0, 0, 0), 0.5) !important;
|
|
408
|
+
border-radius: 3px !important;
|
|
409
|
+
outline: none !important;
|
|
410
|
+
position: relative !important;
|
|
411
|
+
cursor: pointer !important;
|
|
412
|
+
vertical-align: middle !important;
|
|
413
|
+
background-color: white !important;
|
|
414
|
+
display: inline-block !important;
|
|
415
|
+
box-sizing: border-box !important;
|
|
416
|
+
transition: border-color 0.2s ease-in-out !important;
|
|
417
|
+
transform: scale(1) !important; /* Override any transform scale */
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
input[type='radio']:hover,
|
|
421
|
+
.radio-input:hover,
|
|
422
|
+
input[type='checkbox']:hover {
|
|
423
|
+
border-color: var(--primary-color, #0066cc) !important;
|
|
424
|
+
}
|
|
425
|
+
|
|
426
|
+
input[type='radio']:checked,
|
|
427
|
+
.radio-input:checked {
|
|
428
|
+
border-color: var(--primary-color, #0066cc) !important;
|
|
429
|
+
background-color: white !important;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
input[type='checkbox']:checked {
|
|
433
|
+
border-color: var(--primary-color, #0066cc) !important;
|
|
434
|
+
background-color: white !important;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
input[type='radio']:checked::after,
|
|
438
|
+
.radio-input:checked::after {
|
|
439
|
+
content: '' !important;
|
|
440
|
+
position: absolute !important;
|
|
441
|
+
top: 50% !important;
|
|
442
|
+
left: 50% !important;
|
|
443
|
+
transform: translate(-50%, -50%) !important;
|
|
444
|
+
width: 7px !important;
|
|
445
|
+
height: 7px !important;
|
|
446
|
+
border-radius: 50% !important;
|
|
447
|
+
background-color: var(--primary-color, #0066cc) !important;
|
|
448
|
+
display: block !important;
|
|
449
|
+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.2) !important;
|
|
450
|
+
}
|
|
451
|
+
|
|
452
|
+
input[type='checkbox']:checked::after {
|
|
453
|
+
content: '✓' !important;
|
|
454
|
+
position: absolute !important;
|
|
455
|
+
top: 50% !important;
|
|
456
|
+
left: 50% !important;
|
|
457
|
+
transform: translate(-50%, -50%) !important;
|
|
458
|
+
font-size: 10px !important;
|
|
459
|
+
line-height: 1 !important;
|
|
460
|
+
color: var(--primary-color, #0066cc) !important;
|
|
461
|
+
display: block !important;
|
|
462
|
+
font-weight: bold !important;
|
|
463
|
+
}
|
|
464
|
+
}
|