@helpdice/ui 1.2.4 → 1.2.5
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/index.js +47 -58
- package/dist/table/index.js +47 -58
- package/esm/table/table-head.js +47 -58
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -42138,69 +42138,58 @@ var TableHead = function TableHead(props) {
|
|
|
42138
42138
|
};
|
|
42139
42139
|
var generateFilterInputs = function generateFilterInputs() {
|
|
42140
42140
|
return columns.map(function (col) {
|
|
42141
|
-
var _String;
|
|
42141
|
+
var _String, _filters$filterName;
|
|
42142
42142
|
var Header = col.label,
|
|
42143
42143
|
accessor = col.filter,
|
|
42144
42144
|
options = col.options;
|
|
42145
42145
|
var filterName = (_String = String(col === null || col === undefined ? undefined : col.label)) === null || _String === undefined ? undefined : _String.replace(' ', '_').toLowerCase();
|
|
42146
42146
|
var unq_accessor = _.uniqueId(filterName);
|
|
42147
|
-
|
|
42148
|
-
|
|
42149
|
-
|
|
42150
|
-
|
|
42151
|
-
|
|
42152
|
-
|
|
42153
|
-
|
|
42154
|
-
|
|
42155
|
-
|
|
42156
|
-
|
|
42157
|
-
|
|
42158
|
-
|
|
42159
|
-
}
|
|
42160
|
-
|
|
42161
|
-
|
|
42162
|
-
|
|
42163
|
-
|
|
42164
|
-
|
|
42165
|
-
}
|
|
42166
|
-
}
|
|
42167
|
-
|
|
42168
|
-
|
|
42169
|
-
|
|
42170
|
-
|
|
42171
|
-
|
|
42172
|
-
|
|
42173
|
-
|
|
42174
|
-
|
|
42175
|
-
|
|
42176
|
-
|
|
42177
|
-
|
|
42178
|
-
|
|
42179
|
-
|
|
42180
|
-
|
|
42181
|
-
|
|
42182
|
-
|
|
42183
|
-
|
|
42184
|
-
|
|
42185
|
-
|
|
42186
|
-
|
|
42187
|
-
|
|
42188
|
-
|
|
42189
|
-
|
|
42190
|
-
|
|
42191
|
-
|
|
42192
|
-
|
|
42193
|
-
height: 30,
|
|
42194
|
-
minWidth: 160
|
|
42195
|
-
},
|
|
42196
|
-
value: filters[filterName],
|
|
42197
|
-
onChange: function onChange(e) {
|
|
42198
|
-
return handleFilterChange(filterName, e.target.value);
|
|
42199
|
-
},
|
|
42200
|
-
placeholder: "Search...",
|
|
42201
|
-
fullWidth: true
|
|
42202
|
-
}));
|
|
42203
|
-
}
|
|
42147
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
42148
|
+
style: {
|
|
42149
|
+
margin: '3px'
|
|
42150
|
+
},
|
|
42151
|
+
"data-column": Header,
|
|
42152
|
+
key: unq_accessor
|
|
42153
|
+
}, accessor === 'fixed' && /*#__PURE__*/React.createElement(Select, {
|
|
42154
|
+
key: unq_accessor,
|
|
42155
|
+
name: filterName,
|
|
42156
|
+
value: (_filters$filterName = filters[filterName]) !== null && _filters$filterName !== undefined ? _filters$filterName : 'All',
|
|
42157
|
+
onChange: function onChange(newValue) {
|
|
42158
|
+
return handleFilterChange(filterName, newValue);
|
|
42159
|
+
}
|
|
42160
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
42161
|
+
value: "All"
|
|
42162
|
+
}, "All ", Header), options ? options.map(function (option) {
|
|
42163
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
42164
|
+
value: option.value
|
|
42165
|
+
}, option.name);
|
|
42166
|
+
}) : null), accessor === 'date' && /*#__PURE__*/React.createElement(Input, {
|
|
42167
|
+
id: "filter-date-".concat(filterName),
|
|
42168
|
+
htmlType: "date",
|
|
42169
|
+
name: filterName,
|
|
42170
|
+
value: filters[filterName],
|
|
42171
|
+
onChange: function onChange(e) {
|
|
42172
|
+
return handleFilterChange(filterName, e.target.value);
|
|
42173
|
+
}
|
|
42174
|
+
}), accessor === 'search' && /*#__PURE__*/React.createElement("th", {
|
|
42175
|
+
"data-column": Header
|
|
42176
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
42177
|
+
id: "filter-search-".concat(filterName),
|
|
42178
|
+
htmlType: "text"
|
|
42179
|
+
// ref={filterRefs.current[filterName]} // Dynamically set ref}
|
|
42180
|
+
,
|
|
42181
|
+
name: filterName,
|
|
42182
|
+
style: {
|
|
42183
|
+
height: 30,
|
|
42184
|
+
minWidth: 160
|
|
42185
|
+
},
|
|
42186
|
+
value: filters[filterName],
|
|
42187
|
+
onChange: function onChange(e) {
|
|
42188
|
+
return handleFilterChange(filterName, e.target.value);
|
|
42189
|
+
},
|
|
42190
|
+
placeholder: "Search...",
|
|
42191
|
+
fullWidth: true
|
|
42192
|
+
})));
|
|
42204
42193
|
});
|
|
42205
42194
|
};
|
|
42206
42195
|
return /*#__PURE__*/React.createElement(React.Fragment, null, colgroup, /*#__PURE__*/React.createElement("thead", {
|
package/dist/table/index.js
CHANGED
|
@@ -19883,69 +19883,58 @@ var TableHead = function TableHead(props) {
|
|
|
19883
19883
|
};
|
|
19884
19884
|
var generateFilterInputs = function generateFilterInputs() {
|
|
19885
19885
|
return columns.map(function (col) {
|
|
19886
|
-
var _String;
|
|
19886
|
+
var _String, _filters$filterName;
|
|
19887
19887
|
var Header = col.label,
|
|
19888
19888
|
accessor = col.filter,
|
|
19889
19889
|
options = col.options;
|
|
19890
19890
|
var filterName = (_String = String(col === null || col === undefined ? undefined : col.label)) === null || _String === undefined ? undefined : _String.replace(' ', '_').toLowerCase();
|
|
19891
19891
|
var unq_accessor = _.uniqueId(filterName);
|
|
19892
|
-
|
|
19893
|
-
|
|
19894
|
-
|
|
19895
|
-
|
|
19896
|
-
|
|
19897
|
-
|
|
19898
|
-
|
|
19899
|
-
|
|
19900
|
-
|
|
19901
|
-
|
|
19902
|
-
|
|
19903
|
-
|
|
19904
|
-
}
|
|
19905
|
-
|
|
19906
|
-
|
|
19907
|
-
|
|
19908
|
-
|
|
19909
|
-
|
|
19910
|
-
}
|
|
19911
|
-
}
|
|
19912
|
-
|
|
19913
|
-
|
|
19914
|
-
|
|
19915
|
-
|
|
19916
|
-
|
|
19917
|
-
|
|
19918
|
-
|
|
19919
|
-
|
|
19920
|
-
|
|
19921
|
-
|
|
19922
|
-
|
|
19923
|
-
|
|
19924
|
-
|
|
19925
|
-
|
|
19926
|
-
|
|
19927
|
-
|
|
19928
|
-
|
|
19929
|
-
|
|
19930
|
-
|
|
19931
|
-
|
|
19932
|
-
|
|
19933
|
-
|
|
19934
|
-
|
|
19935
|
-
|
|
19936
|
-
|
|
19937
|
-
|
|
19938
|
-
height: 30,
|
|
19939
|
-
minWidth: 160
|
|
19940
|
-
},
|
|
19941
|
-
value: filters[filterName],
|
|
19942
|
-
onChange: function onChange(e) {
|
|
19943
|
-
return handleFilterChange(filterName, e.target.value);
|
|
19944
|
-
},
|
|
19945
|
-
placeholder: "Search...",
|
|
19946
|
-
fullWidth: true
|
|
19947
|
-
}));
|
|
19948
|
-
}
|
|
19892
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
19893
|
+
style: {
|
|
19894
|
+
margin: '3px'
|
|
19895
|
+
},
|
|
19896
|
+
"data-column": Header,
|
|
19897
|
+
key: unq_accessor
|
|
19898
|
+
}, accessor === 'fixed' && /*#__PURE__*/React.createElement(Select, {
|
|
19899
|
+
key: unq_accessor,
|
|
19900
|
+
name: filterName,
|
|
19901
|
+
value: (_filters$filterName = filters[filterName]) !== null && _filters$filterName !== undefined ? _filters$filterName : 'All',
|
|
19902
|
+
onChange: function onChange(newValue) {
|
|
19903
|
+
return handleFilterChange(filterName, newValue);
|
|
19904
|
+
}
|
|
19905
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
19906
|
+
value: "All"
|
|
19907
|
+
}, "All ", Header), options ? options.map(function (option) {
|
|
19908
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
19909
|
+
value: option.value
|
|
19910
|
+
}, option.name);
|
|
19911
|
+
}) : null), accessor === 'date' && /*#__PURE__*/React.createElement(Input, {
|
|
19912
|
+
id: "filter-date-".concat(filterName),
|
|
19913
|
+
htmlType: "date",
|
|
19914
|
+
name: filterName,
|
|
19915
|
+
value: filters[filterName],
|
|
19916
|
+
onChange: function onChange(e) {
|
|
19917
|
+
return handleFilterChange(filterName, e.target.value);
|
|
19918
|
+
}
|
|
19919
|
+
}), accessor === 'search' && /*#__PURE__*/React.createElement("th", {
|
|
19920
|
+
"data-column": Header
|
|
19921
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
19922
|
+
id: "filter-search-".concat(filterName),
|
|
19923
|
+
htmlType: "text"
|
|
19924
|
+
// ref={filterRefs.current[filterName]} // Dynamically set ref}
|
|
19925
|
+
,
|
|
19926
|
+
name: filterName,
|
|
19927
|
+
style: {
|
|
19928
|
+
height: 30,
|
|
19929
|
+
minWidth: 160
|
|
19930
|
+
},
|
|
19931
|
+
value: filters[filterName],
|
|
19932
|
+
onChange: function onChange(e) {
|
|
19933
|
+
return handleFilterChange(filterName, e.target.value);
|
|
19934
|
+
},
|
|
19935
|
+
placeholder: "Search...",
|
|
19936
|
+
fullWidth: true
|
|
19937
|
+
})));
|
|
19949
19938
|
});
|
|
19950
19939
|
};
|
|
19951
19940
|
return /*#__PURE__*/React.createElement(React.Fragment, null, colgroup, /*#__PURE__*/React.createElement("thead", {
|
package/esm/table/table-head.js
CHANGED
|
@@ -55,69 +55,58 @@ var TableHead = function TableHead(props) {
|
|
|
55
55
|
};
|
|
56
56
|
var generateFilterInputs = function generateFilterInputs() {
|
|
57
57
|
return columns.map(function (col) {
|
|
58
|
-
var _String;
|
|
58
|
+
var _String, _filters$filterName;
|
|
59
59
|
var Header = col.label,
|
|
60
60
|
accessor = col.filter,
|
|
61
61
|
options = col.options;
|
|
62
62
|
var filterName = (_String = String(col === null || col === void 0 ? void 0 : col.label)) === null || _String === void 0 ? void 0 : _String.replace(' ', '_').toLowerCase();
|
|
63
63
|
var unq_accessor = _.uniqueId(filterName);
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
height: 30,
|
|
111
|
-
minWidth: 160
|
|
112
|
-
},
|
|
113
|
-
value: filters[filterName],
|
|
114
|
-
onChange: function onChange(e) {
|
|
115
|
-
return handleFilterChange(filterName, e.target.value);
|
|
116
|
-
},
|
|
117
|
-
placeholder: "Search...",
|
|
118
|
-
fullWidth: true
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
64
|
+
return /*#__PURE__*/React.createElement("th", {
|
|
65
|
+
style: {
|
|
66
|
+
margin: '3px'
|
|
67
|
+
},
|
|
68
|
+
"data-column": Header,
|
|
69
|
+
key: unq_accessor
|
|
70
|
+
}, accessor === 'fixed' && /*#__PURE__*/React.createElement(Select, {
|
|
71
|
+
key: unq_accessor,
|
|
72
|
+
name: filterName,
|
|
73
|
+
value: (_filters$filterName = filters[filterName]) !== null && _filters$filterName !== void 0 ? _filters$filterName : 'All',
|
|
74
|
+
onChange: function onChange(newValue) {
|
|
75
|
+
return handleFilterChange(filterName, newValue);
|
|
76
|
+
}
|
|
77
|
+
}, /*#__PURE__*/React.createElement(Select.Option, {
|
|
78
|
+
value: "All"
|
|
79
|
+
}, "All ", Header), options ? options.map(function (option) {
|
|
80
|
+
return /*#__PURE__*/React.createElement(Select.Option, {
|
|
81
|
+
value: option.value
|
|
82
|
+
}, option.name);
|
|
83
|
+
}) : null), accessor === 'date' && /*#__PURE__*/React.createElement(Input, {
|
|
84
|
+
id: "filter-date-".concat(filterName),
|
|
85
|
+
htmlType: "date",
|
|
86
|
+
name: filterName,
|
|
87
|
+
value: filters[filterName],
|
|
88
|
+
onChange: function onChange(e) {
|
|
89
|
+
return handleFilterChange(filterName, e.target.value);
|
|
90
|
+
}
|
|
91
|
+
}), accessor === 'search' && /*#__PURE__*/React.createElement("th", {
|
|
92
|
+
"data-column": Header
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
94
|
+
id: "filter-search-".concat(filterName),
|
|
95
|
+
htmlType: "text"
|
|
96
|
+
// ref={filterRefs.current[filterName]} // Dynamically set ref}
|
|
97
|
+
,
|
|
98
|
+
name: filterName,
|
|
99
|
+
style: {
|
|
100
|
+
height: 30,
|
|
101
|
+
minWidth: 160
|
|
102
|
+
},
|
|
103
|
+
value: filters[filterName],
|
|
104
|
+
onChange: function onChange(e) {
|
|
105
|
+
return handleFilterChange(filterName, e.target.value);
|
|
106
|
+
},
|
|
107
|
+
placeholder: "Search...",
|
|
108
|
+
fullWidth: true
|
|
109
|
+
})));
|
|
121
110
|
});
|
|
122
111
|
};
|
|
123
112
|
return /*#__PURE__*/React.createElement(React.Fragment, null, colgroup, /*#__PURE__*/React.createElement("thead", {
|