@visns-studio/visns-components 5.10.0 → 5.10.2
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
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
88
88
|
},
|
|
89
89
|
"name": "@visns-studio/visns-components",
|
|
90
|
-
"version": "5.10.
|
|
90
|
+
"version": "5.10.2",
|
|
91
91
|
"description": "Various packages to assist in the development of our Custom Applications.",
|
|
92
92
|
"main": "src/index.js",
|
|
93
93
|
"files": [
|
|
@@ -1836,15 +1836,7 @@ const DataGrid = forwardRef(
|
|
|
1836
1836
|
return (
|
|
1837
1837
|
<div className={buttonClassName}>
|
|
1838
1838
|
{form.export && form.export.url && (
|
|
1839
|
-
<button
|
|
1840
|
-
className={styles.btn}
|
|
1841
|
-
style={{
|
|
1842
|
-
borderRadius: isSearchEnabled
|
|
1843
|
-
? 0
|
|
1844
|
-
: 'var(--br, 4px)',
|
|
1845
|
-
}}
|
|
1846
|
-
onClick={exportTrigger}
|
|
1847
|
-
>
|
|
1839
|
+
<button className={styles.btn} onClick={exportTrigger}>
|
|
1848
1840
|
<LinkOut
|
|
1849
1841
|
strokeWidth={2}
|
|
1850
1842
|
size={16}
|
|
@@ -1854,15 +1846,7 @@ const DataGrid = forwardRef(
|
|
|
1854
1846
|
</button>
|
|
1855
1847
|
)}
|
|
1856
1848
|
{form.sort && form.sort.title && (
|
|
1857
|
-
<button
|
|
1858
|
-
className={styles.btn}
|
|
1859
|
-
style={{
|
|
1860
|
-
borderRadius: isSearchEnabled
|
|
1861
|
-
? 0
|
|
1862
|
-
: 'var(--br, 4px)',
|
|
1863
|
-
}}
|
|
1864
|
-
onClick={sortTrigger}
|
|
1865
|
-
>
|
|
1849
|
+
<button className={styles.btn} onClick={sortTrigger}>
|
|
1866
1850
|
<Sort
|
|
1867
1851
|
strokeWidth={2}
|
|
1868
1852
|
size={16}
|
|
@@ -1878,11 +1862,6 @@ const DataGrid = forwardRef(
|
|
|
1878
1862
|
(form.url && form.create?.title !== '') ? (
|
|
1879
1863
|
<button
|
|
1880
1864
|
className={styles.btn}
|
|
1881
|
-
style={{
|
|
1882
|
-
borderRadius: isSearchEnabled
|
|
1883
|
-
? 0
|
|
1884
|
-
: 'var(--br, 4px)',
|
|
1885
|
-
}}
|
|
1886
1865
|
onClick={(e) => {
|
|
1887
1866
|
e.preventDefault();
|
|
1888
1867
|
|
|
@@ -1928,11 +1907,6 @@ const DataGrid = forwardRef(
|
|
|
1928
1907
|
) : form.url && form.modal === false ? (
|
|
1929
1908
|
<button
|
|
1930
1909
|
className={styles.btn}
|
|
1931
|
-
style={{
|
|
1932
|
-
borderRadius: isSearchEnabled
|
|
1933
|
-
? 0
|
|
1934
|
-
: 'var(--br, 4px)',
|
|
1935
|
-
}}
|
|
1936
1910
|
onClick={(e) => {
|
|
1937
1911
|
e.preventDefault();
|
|
1938
1912
|
|
|
@@ -4790,15 +4764,7 @@ const DataGrid = forwardRef(
|
|
|
4790
4764
|
}, [autoRefreshEnabled, refreshInterval, ajaxSetting]);
|
|
4791
4765
|
|
|
4792
4766
|
return (
|
|
4793
|
-
|
|
4794
|
-
style={{
|
|
4795
|
-
display: 'flex',
|
|
4796
|
-
flexDirection: 'column',
|
|
4797
|
-
border: 'none',
|
|
4798
|
-
borderRadius: '0',
|
|
4799
|
-
overflow: 'hidden',
|
|
4800
|
-
}}
|
|
4801
|
-
>
|
|
4767
|
+
<>
|
|
4802
4768
|
{/* Top container with search, action buttons, and auto-refresh */}
|
|
4803
4769
|
{/* Only show top container if there are controls to display */}
|
|
4804
4770
|
{(renderSearch() ||
|
|
@@ -5353,11 +5319,11 @@ const DataGrid = forwardRef(
|
|
|
5353
5319
|
</div>
|
|
5354
5320
|
|
|
5355
5321
|
{/* Relocated auto refresh control when it's the only control */}
|
|
5356
|
-
{shouldRelocateAutoRefresh() && (
|
|
5322
|
+
{/* {shouldRelocateAutoRefresh() && (
|
|
5357
5323
|
<div className={styles.dataGridBottomContainer}>
|
|
5358
5324
|
{renderAutoRefreshControls(true)}
|
|
5359
5325
|
</div>
|
|
5360
|
-
)}
|
|
5326
|
+
)} */}
|
|
5361
5327
|
|
|
5362
5328
|
{audioSource && <audio src={audioSource} ref={audioRef} />}
|
|
5363
5329
|
<Popup
|
|
@@ -5632,7 +5598,7 @@ const DataGrid = forwardRef(
|
|
|
5632
5598
|
index={lightboxIndex}
|
|
5633
5599
|
slides={galleryData.map((img) => ({ src: img.src }))}
|
|
5634
5600
|
/>
|
|
5635
|
-
|
|
5601
|
+
</>
|
|
5636
5602
|
);
|
|
5637
5603
|
}
|
|
5638
5604
|
);
|
|
@@ -162,8 +162,18 @@ function Field({
|
|
|
162
162
|
let filter = {};
|
|
163
163
|
|
|
164
164
|
if (settings.where?.length > 0) {
|
|
165
|
+
const processedWhere = settings.where.map((whereItem) => {
|
|
166
|
+
if (whereItem.getKey && formData[whereItem.getKey]) {
|
|
167
|
+
return {
|
|
168
|
+
...whereItem,
|
|
169
|
+
value: formData[whereItem.getKey],
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
return whereItem;
|
|
173
|
+
});
|
|
174
|
+
|
|
165
175
|
filter = {
|
|
166
|
-
where:
|
|
176
|
+
where: processedWhere,
|
|
167
177
|
};
|
|
168
178
|
}
|
|
169
179
|
|
|
@@ -187,6 +197,8 @@ function Field({
|
|
|
187
197
|
};
|
|
188
198
|
}
|
|
189
199
|
|
|
200
|
+
console.info(JSON.stringify(filter));
|
|
201
|
+
|
|
190
202
|
CustomFetch(settings.url, 'POST', filter, function (result) {
|
|
191
203
|
setOptions(result.data);
|
|
192
204
|
|
|
@@ -247,7 +259,7 @@ function Field({
|
|
|
247
259
|
);
|
|
248
260
|
setCanvasUrl(canvasType.url);
|
|
249
261
|
}
|
|
250
|
-
}, [settings, counter]);
|
|
262
|
+
}, [settings, counter, formData]);
|
|
251
263
|
|
|
252
264
|
const fetchChildDropdownData = (s, v) => {
|
|
253
265
|
let filter = {};
|
|
@@ -265,7 +277,9 @@ function Field({
|
|
|
265
277
|
{
|
|
266
278
|
id: s.id,
|
|
267
279
|
value: _inputValue,
|
|
268
|
-
...(a.whereHas && {
|
|
280
|
+
...(a.whereHas && {
|
|
281
|
+
whereHas: a.whereHas,
|
|
282
|
+
}),
|
|
269
283
|
},
|
|
270
284
|
],
|
|
271
285
|
};
|
|
@@ -10,7 +10,6 @@
|
|
|
10
10
|
overflow: hidden;
|
|
11
11
|
background: var(--primary-color);
|
|
12
12
|
border: 1px solid rgba(var(--primary-rgb), 1.1);
|
|
13
|
-
border-radius: var(--br);
|
|
14
13
|
outline: none;
|
|
15
14
|
transition: all 0.2s cubic-bezier(0.85, 0, 0.15, 1) 0s;
|
|
16
15
|
|
|
@@ -493,8 +492,7 @@
|
|
|
493
492
|
|
|
494
493
|
/* DataGrid top container and search container styles */
|
|
495
494
|
.dataGridTopContainer {
|
|
496
|
-
|
|
497
|
-
align-items: center;
|
|
495
|
+
display: flex;
|
|
498
496
|
}
|
|
499
497
|
|
|
500
498
|
.dataGridTopLeftContainer {
|
|
@@ -505,7 +503,6 @@
|
|
|
505
503
|
display: flex;
|
|
506
504
|
align-items: center;
|
|
507
505
|
justify-content: flex-end;
|
|
508
|
-
padding-right: 10px;
|
|
509
506
|
}
|
|
510
507
|
|
|
511
508
|
/* Date field styling for uniform width */
|
|
@@ -595,8 +592,6 @@
|
|
|
595
592
|
height: 38px;
|
|
596
593
|
background-color: #f9fafb;
|
|
597
594
|
border: 1px solid #d1d5db;
|
|
598
|
-
border-radius: var(--br, 4px);
|
|
599
|
-
margin-left: 10px;
|
|
600
595
|
margin-bottom: 0;
|
|
601
596
|
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
|
|
602
597
|
}
|
|
@@ -658,11 +653,6 @@
|
|
|
658
653
|
border: none;
|
|
659
654
|
box-sizing: border-box;
|
|
660
655
|
|
|
661
|
-
&:last-child {
|
|
662
|
-
border-top-right-radius: var(--br, 4px);
|
|
663
|
-
border-bottom-right-radius: var(--br, 4px);
|
|
664
|
-
}
|
|
665
|
-
|
|
666
656
|
&:focus,
|
|
667
657
|
&:active {
|
|
668
658
|
outline: none;
|
|
@@ -681,7 +671,6 @@
|
|
|
681
671
|
|
|
682
672
|
> .btn {
|
|
683
673
|
height: 38px;
|
|
684
|
-
border-radius: var(--br, 4px);
|
|
685
674
|
display: flex;
|
|
686
675
|
align-items: center;
|
|
687
676
|
justify-content: center;
|