@gpa-gemstone/common-pages 0.0.106 → 0.0.108
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/SearchBar.d.ts +6 -7
- package/lib/SearchBar.js +12 -18
- package/package.json +5 -5
package/lib/SearchBar.d.ts
CHANGED
@@ -11,7 +11,6 @@ interface IProps<T extends U> {
|
|
11
11
|
GetEnum: (setOptions: (options: IOptions[]) => void, field: Search.IField<T>) => () => void;
|
12
12
|
/** Function that Grabs any additional Filters that shoudl be available (such as Addl Fields) */
|
13
13
|
GetAddlFields: (setAddlFields: (cols: Search.IField<T>[]) => void) => () => void;
|
14
|
-
children: React.ReactNode;
|
15
14
|
AddlFilters?: Search.IFilter<T>[];
|
16
15
|
StorageID?: string;
|
17
16
|
}
|
@@ -22,16 +21,16 @@ interface IOptions {
|
|
22
21
|
/** This Implements a few standardized SearchBars */
|
23
22
|
export declare namespace DefaultSearch {
|
24
23
|
/** This Implements a standard Meter Search */
|
25
|
-
|
24
|
+
const Meter: React.FC<IProps<SystemCenter.Types.DetailedMeter>>;
|
26
25
|
/** This Implements a standard Substation Search */
|
27
|
-
|
26
|
+
const Location: React.FC<IProps<SystemCenter.Types.DetailedLocation>>;
|
28
27
|
/** This Implements a standard Transmission Asset Search */
|
29
|
-
|
28
|
+
const Asset: React.FC<IProps<SystemCenter.Types.DetailedAsset>>;
|
30
29
|
/** This Implements a standard AssetGroup Search */
|
31
|
-
|
30
|
+
const AssetGroup: React.FC<IProps<OpenXDA.Types.AssetGroup>>;
|
32
31
|
/** This Implements a standard User Search */
|
33
|
-
|
32
|
+
const User: React.FC<IProps<Application.Types.iUserAccount>>;
|
34
33
|
/** This Implements a standard Customer Search */
|
35
|
-
|
34
|
+
const Customer: React.FC<IProps<OpenXDA.Types.Customer>>;
|
36
35
|
}
|
37
36
|
export {};
|
package/lib/SearchBar.js
CHANGED
@@ -63,7 +63,7 @@ var react_redux_1 = require("react-redux");
|
|
63
63
|
var DefaultSearch;
|
64
64
|
(function (DefaultSearch) {
|
65
65
|
/** This Implements a standard Meter Search */
|
66
|
-
function
|
66
|
+
DefaultSearch.Meter = function (props) {
|
67
67
|
var defaultSearchcols = [
|
68
68
|
{ label: 'Key', key: 'AssetKey', type: 'string', isPivotField: false },
|
69
69
|
{ label: 'Name', key: 'Name', type: 'string', isPivotField: false },
|
@@ -84,10 +84,9 @@ var DefaultSearch;
|
|
84
84
|
}, []);
|
85
85
|
var standardSearch = { label: 'Name', key: 'Name', type: 'string', isPivotField: false };
|
86
86
|
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: (props.AddlFilters === undefined ? flds : __spreadArray(__spreadArray([], flds, true), props.AddlFilters, true)), sortField: sortField, ascending: ascending })); }, Direction: 'left', defaultCollumn: standardSearch, Width: '50%', Label: 'Search', ShowLoading: searchStatus === 'loading', ResultNote: searchStatus === 'error' ? 'Could not complete Search' : 'Found ' + data.length + ' Meter(s)', GetEnum: props.GetEnum, StorageID: props.StorageID }, props.children);
|
87
|
-
}
|
88
|
-
DefaultSearch.Meter = Meter;
|
87
|
+
};
|
89
88
|
/** This Implements a standard Substation Search */
|
90
|
-
function
|
89
|
+
DefaultSearch.Location = function (props) {
|
91
90
|
var standardSearch = { label: 'Name', key: 'Name', type: 'string', isPivotField: false };
|
92
91
|
var _a = React.useState([]), addlFieldCols = _a[0], setAddlFieldCols = _a[1];
|
93
92
|
var dispatch = (0, react_redux_1.useDispatch)();
|
@@ -108,10 +107,9 @@ var DefaultSearch;
|
|
108
107
|
return props.GetAddlFields(setAddlFieldCols);
|
109
108
|
}, []);
|
110
109
|
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: (props.AddlFilters === undefined ? flds : __spreadArray(__spreadArray([], flds, true), props.AddlFilters, true)), sortField: sortField, ascending: ascending })); }, Direction: 'left', defaultCollumn: standardSearch, Width: '50%', Label: 'Search', ShowLoading: searchStatus === 'loading', ResultNote: searchStatus === 'error' ? 'Could not complete Search' : 'Found ' + data.length + ' Substation(s)', GetEnum: props.GetEnum, StorageID: props.StorageID }, props.children);
|
111
|
-
}
|
112
|
-
DefaultSearch.Location = Location;
|
110
|
+
};
|
113
111
|
/** This Implements a standard Transmission Asset Search */
|
114
|
-
function
|
112
|
+
DefaultSearch.Asset = function (props) {
|
115
113
|
var standardSearch = { label: 'Name', key: 'AssetName', type: 'string', isPivotField: false };
|
116
114
|
var _a = React.useState([]), addlFieldCols = _a[0], setAddlFieldCols = _a[1];
|
117
115
|
var dispatch = (0, react_redux_1.useDispatch)();
|
@@ -134,10 +132,9 @@ var DefaultSearch;
|
|
134
132
|
return props.GetAddlFields(setAddlFieldCols);
|
135
133
|
}, []);
|
136
134
|
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: (props.AddlFilters === undefined ? flds : __spreadArray(__spreadArray([], flds, true), props.AddlFilters, true)), sortField: sortField, ascending: ascending })); }, Direction: 'left', defaultCollumn: standardSearch, Width: '50%', Label: 'Search', ShowLoading: searchStatus === 'loading', ResultNote: searchStatus === 'error' ? 'Could not complete Search' : 'Found ' + data.length + ' Transmission Asset(s)', GetEnum: props.GetEnum, StorageID: props.StorageID }, props.children);
|
137
|
-
}
|
138
|
-
DefaultSearch.Asset = Asset;
|
135
|
+
};
|
139
136
|
/** This Implements a standard AssetGroup Search */
|
140
|
-
function
|
137
|
+
DefaultSearch.AssetGroup = function (props) {
|
141
138
|
var standardSearch = { label: 'Name', key: 'Name', type: 'string', isPivotField: false };
|
142
139
|
var _a = React.useState([]), addlFieldCols = _a[0], setAddlFieldCols = _a[1];
|
143
140
|
var dispatch = (0, react_redux_1.useDispatch)();
|
@@ -157,10 +154,9 @@ var DefaultSearch;
|
|
157
154
|
return props.GetAddlFields(setAddlFieldCols);
|
158
155
|
}, []);
|
159
156
|
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: (props.AddlFilters === undefined ? flds : __spreadArray(__spreadArray([], flds, true), props.AddlFilters, true)), sortField: sortField, ascending: ascending })); }, Direction: 'left', defaultCollumn: standardSearch, Width: '50%', Label: 'Search', ShowLoading: searchStatus === 'loading', ResultNote: searchStatus === 'error' ? 'Could not complete Search' : 'Found ' + data.length + ' Asset Group(s)', GetEnum: props.GetEnum, StorageID: props.StorageID }, props.children);
|
160
|
-
}
|
161
|
-
DefaultSearch.AssetGroup = AssetGroup;
|
157
|
+
};
|
162
158
|
/** This Implements a standard User Search */
|
163
|
-
function
|
159
|
+
DefaultSearch.User = function (props) {
|
164
160
|
var standardSearch = { label: 'Username', key: 'Name', type: 'string', isPivotField: false };
|
165
161
|
var _a = React.useState([]), addlFieldCols = _a[0], setAddlFieldCols = _a[1];
|
166
162
|
var dispatch = (0, react_redux_1.useDispatch)();
|
@@ -177,10 +173,9 @@ var DefaultSearch;
|
|
177
173
|
return props.GetAddlFields(setAddlFieldCols);
|
178
174
|
}, []);
|
179
175
|
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: (props.AddlFilters === undefined ? flds : __spreadArray(__spreadArray([], flds, true), props.AddlFilters, true)), sortField: sortField, ascending: ascending })); }, Direction: 'left', defaultCollumn: standardSearch, Width: '50%', Label: 'Search', ShowLoading: searchStatus === 'loading', ResultNote: searchStatus === 'error' ? 'Could not complete Search' : 'Found ' + data.length + ' User(s)', GetEnum: props.GetEnum, StorageID: props.StorageID }, props.children);
|
180
|
-
}
|
181
|
-
DefaultSearch.User = User;
|
176
|
+
};
|
182
177
|
/** This Implements a standard Customer Search */
|
183
|
-
function
|
178
|
+
DefaultSearch.Customer = function (props) {
|
184
179
|
var defaultSearchcols = [
|
185
180
|
{ label: 'Name', key: 'Name', type: 'string', isPivotField: false },
|
186
181
|
{ label: 'Account Name', key: 'CustomerKey', type: 'string', isPivotField: false },
|
@@ -198,6 +193,5 @@ var DefaultSearch;
|
|
198
193
|
return props.GetAddlFields(setAddlFieldCols);
|
199
194
|
}, []);
|
200
195
|
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: (props.AddlFilters === undefined ? flds : __spreadArray(__spreadArray([], flds, true), props.AddlFilters, true)), sortField: sortField, ascending: ascending })); }, Direction: 'left', defaultCollumn: standardSearch, Width: '50%', Label: 'Search', ShowLoading: searchStatus === 'loading', ResultNote: searchStatus === 'error' ? 'Could not complete Search' : 'Found ' + data.length + ' Customer(s)', GetEnum: props.GetEnum, StorageID: props.StorageID }, props.children);
|
201
|
-
}
|
202
|
-
DefaultSearch.Customer = Customer;
|
196
|
+
};
|
203
197
|
})(DefaultSearch || (exports.DefaultSearch = DefaultSearch = {}));
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@gpa-gemstone/common-pages",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.108",
|
4
4
|
"description": "Common UI pages for GPA products",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "lib/index.d.ts",
|
@@ -45,11 +45,11 @@
|
|
45
45
|
},
|
46
46
|
"dependencies": {
|
47
47
|
"@gpa-gemstone/application-typings": "0.0.72",
|
48
|
-
"@gpa-gemstone/gpa-symbols": "0.0.
|
48
|
+
"@gpa-gemstone/gpa-symbols": "0.0.37",
|
49
49
|
"@gpa-gemstone/helper-functions": "0.0.32",
|
50
|
-
"@gpa-gemstone/react-forms": "1.1.
|
51
|
-
"@gpa-gemstone/react-interactive": "1.0.
|
52
|
-
"@gpa-gemstone/react-table": "1.2.
|
50
|
+
"@gpa-gemstone/react-forms": "1.1.63",
|
51
|
+
"@gpa-gemstone/react-interactive": "1.0.122",
|
52
|
+
"@gpa-gemstone/react-table": "1.2.47",
|
53
53
|
"@reduxjs/toolkit": "1.8.3",
|
54
54
|
"crypto-js": "4.0.0",
|
55
55
|
"moment": "^2.29.4",
|