@onehat/ui 0.3.330 → 0.3.332
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 +1 -1
- package/src/Components/Form/Field/Combo/Combo.js +2 -2
- package/src/Components/Grid/ColumnSelectorWindow.js +6 -6
- package/src/Components/Grid/Grid.js +5 -4
- package/src/Components/Grid/GridHeaderRow.js +9 -9
- package/src/Components/Grid/GridRow.js +3 -3
- package/src/Functions/Cypress/crud_functions.js +7 -7
package/package.json
CHANGED
|
@@ -588,7 +588,7 @@ export function ComboComponent(props) {
|
|
|
588
588
|
h="100%"
|
|
589
589
|
m={0}
|
|
590
590
|
InputLeftElement={inputIconElement}
|
|
591
|
-
autoSubmitDelay={
|
|
591
|
+
autoSubmitDelay={500}
|
|
592
592
|
borderTopRightRadius={0}
|
|
593
593
|
borderBottomRightRadius={0}
|
|
594
594
|
fontSize={styles.FORM_COMBO_INPUT_FONTSIZE}
|
|
@@ -914,7 +914,7 @@ export function ComboComponent(props) {
|
|
|
914
914
|
h="100%"
|
|
915
915
|
m={0}
|
|
916
916
|
InputLeftElement={inputIconElement}
|
|
917
|
-
autoSubmitDelay={
|
|
917
|
+
autoSubmitDelay={500}
|
|
918
918
|
borderTopRightRadius={0}
|
|
919
919
|
borderBottomRightRadius={0}
|
|
920
920
|
fontSize={styles.FORM_COMBO_INPUT_FONTSIZE}
|
|
@@ -70,10 +70,10 @@ export default function ColumnSelectorWindow(props) {
|
|
|
70
70
|
{
|
|
71
71
|
header: 'Show',
|
|
72
72
|
fieldName: 'is_shown',
|
|
73
|
-
|
|
73
|
+
isSortable: false,
|
|
74
74
|
isEditable: false,
|
|
75
|
-
|
|
76
|
-
|
|
75
|
+
isReorderable: false,
|
|
76
|
+
isResizable: false,
|
|
77
77
|
w: '50px',
|
|
78
78
|
renderer: (datum) => {
|
|
79
79
|
const
|
|
@@ -95,10 +95,10 @@ export default function ColumnSelectorWindow(props) {
|
|
|
95
95
|
{
|
|
96
96
|
header: 'Column',
|
|
97
97
|
fieldName: 1, // ix
|
|
98
|
-
|
|
98
|
+
isSortable: false,
|
|
99
99
|
isEditable: false,
|
|
100
|
-
|
|
101
|
-
|
|
100
|
+
isReorderable: false,
|
|
101
|
+
isResizable: false,
|
|
102
102
|
flex: 3,
|
|
103
103
|
}
|
|
104
104
|
]}
|
|
@@ -92,6 +92,7 @@ function GridComponent(props) {
|
|
|
92
92
|
|
|
93
93
|
columnsConfig = [], // json configurations for each column
|
|
94
94
|
columnProps = {},
|
|
95
|
+
defaultHiddenColumns = [],
|
|
95
96
|
getRowProps = (item) => {
|
|
96
97
|
return {
|
|
97
98
|
borderBottomWidth: 1,
|
|
@@ -836,10 +837,10 @@ function GridComponent(props) {
|
|
|
836
837
|
const
|
|
837
838
|
defaults = {
|
|
838
839
|
isEditable: false,
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
isHidden:
|
|
840
|
+
isReorderable: true,
|
|
841
|
+
isResizable: true,
|
|
842
|
+
isSortable: true,
|
|
843
|
+
isHidden: inArray(columnConfig.id, defaultHiddenColumns),
|
|
843
844
|
isOver: false,
|
|
844
845
|
},
|
|
845
846
|
config = _.assign({}, defaults, columnConfig);
|
|
@@ -147,7 +147,7 @@ export default function GridHeaderRow(props) {
|
|
|
147
147
|
});
|
|
148
148
|
|
|
149
149
|
// Verify index can actually be used
|
|
150
|
-
if (typeof localColumnsConfig[newIx] === 'undefined' || !localColumnsConfig[newIx].
|
|
150
|
+
if (typeof localColumnsConfig[newIx] === 'undefined' || !localColumnsConfig[newIx].isReorderable) {
|
|
151
151
|
return;
|
|
152
152
|
}
|
|
153
153
|
|
|
@@ -222,7 +222,7 @@ export default function GridHeaderRow(props) {
|
|
|
222
222
|
});
|
|
223
223
|
|
|
224
224
|
// Verify index can actually be used
|
|
225
|
-
if (typeof localColumnsConfig[newIx] === 'undefined' || !localColumnsConfig[newIx].
|
|
225
|
+
if (typeof localColumnsConfig[newIx] === 'undefined' || !localColumnsConfig[newIx].isReorderable) {
|
|
226
226
|
return;
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -296,17 +296,17 @@ export default function GridHeaderRow(props) {
|
|
|
296
296
|
let {
|
|
297
297
|
fieldName,
|
|
298
298
|
header = _.upperFirst(fieldName),
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
299
|
+
isReorderable,
|
|
300
|
+
isResizable,
|
|
301
|
+
isSortable,
|
|
302
302
|
w,
|
|
303
303
|
flex,
|
|
304
304
|
isOver = false,
|
|
305
305
|
isHidden = false,
|
|
306
306
|
} = config,
|
|
307
|
-
isSorter =
|
|
308
|
-
isReorderable = canColumnsReorder &&
|
|
309
|
-
isResizable = canColumnsResize &&
|
|
307
|
+
isSorter = isSortable && canColumnsSort && sortField === fieldName,
|
|
308
|
+
isReorderable = canColumnsReorder && isReorderable,
|
|
309
|
+
isResizable = canColumnsResize && isResizable,
|
|
310
310
|
propsToPass = {
|
|
311
311
|
borderRightWidth: 2,
|
|
312
312
|
borderRightColor: '#fff',
|
|
@@ -351,7 +351,7 @@ export default function GridHeaderRow(props) {
|
|
|
351
351
|
if (isBlocked.current) { // withDraggable initiates block
|
|
352
352
|
return;
|
|
353
353
|
}
|
|
354
|
-
if (
|
|
354
|
+
if (isSortable && canColumnsSort) {
|
|
355
355
|
onSort(config, e);
|
|
356
356
|
}
|
|
357
357
|
}}
|
|
@@ -649,7 +649,7 @@ export function runClosureTreeControlledManagerScreenCrudTests(model, schema, ne
|
|
|
649
649
|
|
|
650
650
|
// it('CRUD in full mode', function() {
|
|
651
651
|
|
|
652
|
-
// const gridSelector = '/' + Models + '
|
|
652
|
+
// const gridSelector = '/' + Models + 'GridEditor';
|
|
653
653
|
|
|
654
654
|
// toFullMode();
|
|
655
655
|
// cy.wait(500); // wait for grid to load
|
|
@@ -678,7 +678,7 @@ export function runClosureTreeControlledManagerScreenCrudTests(model, schema, ne
|
|
|
678
678
|
|
|
679
679
|
// it('CRUD in side mode', function() {
|
|
680
680
|
|
|
681
|
-
// const gridSelector = '/' + Models + '
|
|
681
|
+
// const gridSelector = '/' + Models + 'GridEditor';
|
|
682
682
|
|
|
683
683
|
// toSideMode();
|
|
684
684
|
// cy.wait(1000); // wait for grid to load
|
|
@@ -747,7 +747,7 @@ export function runClosureTreeManagerScreenCrudTests(model, schema, newData, edi
|
|
|
747
747
|
|
|
748
748
|
const
|
|
749
749
|
managerSelector = '/' + Models + 'Manager',
|
|
750
|
-
treeSelector = '/' + Models + '
|
|
750
|
+
treeSelector = '/' + Models + 'TreeEditor';
|
|
751
751
|
|
|
752
752
|
toSideMode(managerSelector);
|
|
753
753
|
cy.wait(1000); // wait for grid to load
|
|
@@ -786,7 +786,7 @@ export function runInlineManagerScreenCrudTests(model, schema, newData, editData
|
|
|
786
786
|
|
|
787
787
|
const
|
|
788
788
|
managerSelector = '/' + Models + 'Manager',
|
|
789
|
-
gridSelector = '/' + Models + '
|
|
789
|
+
gridSelector = '/' + Models + 'GridEditor';
|
|
790
790
|
|
|
791
791
|
toFullMode(managerSelector);
|
|
792
792
|
cy.wait(500); // wait for grid to load
|
|
@@ -799,7 +799,7 @@ export function runInlineManagerScreenCrudTests(model, schema, newData, editData
|
|
|
799
799
|
|
|
800
800
|
const
|
|
801
801
|
managerSelector = '/' + Models + 'Manager',
|
|
802
|
-
gridSelector = '/' + Models + '
|
|
802
|
+
gridSelector = '/' + Models + 'GridEditor';
|
|
803
803
|
|
|
804
804
|
toSideMode(managerSelector);
|
|
805
805
|
cy.wait(1000); // wait for grid to load
|
|
@@ -838,7 +838,7 @@ export function runManagerScreenCrudTests(model, schema, newData, editData, anci
|
|
|
838
838
|
|
|
839
839
|
const
|
|
840
840
|
managerSelector = '/' + Models + 'Manager',
|
|
841
|
-
gridSelector = '/' + Models + '
|
|
841
|
+
gridSelector = '/' + Models + 'GridEditor';
|
|
842
842
|
|
|
843
843
|
toFullMode(managerSelector);
|
|
844
844
|
cy.wait(500); // wait for grid to load
|
|
@@ -851,7 +851,7 @@ export function runManagerScreenCrudTests(model, schema, newData, editData, anci
|
|
|
851
851
|
|
|
852
852
|
const
|
|
853
853
|
managerSelector = '/' + Models + 'Manager',
|
|
854
|
-
gridSelector = '/' + Models + '
|
|
854
|
+
gridSelector = '/' + Models + 'GridEditor';
|
|
855
855
|
|
|
856
856
|
toSideMode(managerSelector);
|
|
857
857
|
cy.wait(1000); // wait for grid to load
|