@gpa-gemstone/common-pages 0.0.41 → 0.0.42
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/lib/SearchBar.d.ts +2 -0
- package/lib/SearchBar.js +21 -0
- package/lib/SelectionPopup.d.ts +2 -0
- package/lib/SelectionPopup.js +5 -0
- package/package.json +8 -8
package/lib/SearchBar.d.ts
CHANGED
@@ -27,5 +27,7 @@ export declare namespace DefaultSearch {
|
|
27
27
|
function Asset(props: IProps<SystemCenter.Types.DetailedAsset>): JSX.Element;
|
28
28
|
/** This Implements a standard AssetGroup Search */
|
29
29
|
function AssetGroup(props: IProps<OpenXDA.Types.AssetGroup>): JSX.Element;
|
30
|
+
/** This Implements a standard Customer Search */
|
31
|
+
function Customer(props: IProps<OpenXDA.Types.Customer>): JSX.Element;
|
30
32
|
}
|
31
33
|
export {};
|
package/lib/SearchBar.js
CHANGED
@@ -133,4 +133,25 @@ var DefaultSearch;
|
|
133
133
|
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: flds, 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 }, props.children);
|
134
134
|
}
|
135
135
|
DefaultSearch.AssetGroup = AssetGroup;
|
136
|
+
/** This Implements a standard Customer Search */
|
137
|
+
function Customer(props) {
|
138
|
+
var defaultSearchcols = [
|
139
|
+
{ label: 'Account Name', key: 'CustomerKey', type: 'string', isPivotField: false },
|
140
|
+
{ label: 'Name', key: 'Name', type: 'string', isPivotField: false },
|
141
|
+
{ label: 'Phone', key: 'Phone', type: 'string', isPivotField: false },
|
142
|
+
{ label: 'Description', key: 'Description', type: 'string', isPivotField: false },
|
143
|
+
];
|
144
|
+
var standardSearch = defaultSearchcols[0];
|
145
|
+
var _a = React.useState([]), addlFieldCols = _a[0], setAddlFieldCols = _a[1];
|
146
|
+
var dispatch = (0, react_redux_1.useDispatch)();
|
147
|
+
var searchStatus = (0, react_redux_1.useSelector)(props.Slice.SearchStatus);
|
148
|
+
var sortField = (0, react_redux_1.useSelector)(props.Slice.SortField);
|
149
|
+
var ascending = (0, react_redux_1.useSelector)(props.Slice.Ascending);
|
150
|
+
var data = (0, react_redux_1.useSelector)(props.Slice.SearchResults);
|
151
|
+
React.useEffect(function () {
|
152
|
+
return props.GetAddlFields(setAddlFieldCols);
|
153
|
+
}, []);
|
154
|
+
return React.createElement(react_interactive_1.SearchBar, { CollumnList: __spreadArray(__spreadArray([], defaultSearchcols, true), addlFieldCols, true), SetFilter: function (flds) { return dispatch(props.Slice.DBSearch({ filter: flds, 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 }, props.children);
|
155
|
+
}
|
156
|
+
DefaultSearch.Customer = Customer;
|
136
157
|
})(DefaultSearch = exports.DefaultSearch || (exports.DefaultSearch = {}));
|
package/lib/SelectionPopup.d.ts
CHANGED
@@ -31,5 +31,7 @@ export declare namespace DefaultSelects {
|
|
31
31
|
function Asset(props: IProps<SystemCenter.Types.DetailedAsset>): JSX.Element;
|
32
32
|
/** This Implements a standard Asset Group Selection Modal */
|
33
33
|
function AssetGroup(props: IProps<OpenXDA.Types.AssetGroup>): JSX.Element;
|
34
|
+
/** This Implements a standard Asset Group Selection Modal */
|
35
|
+
function Customer(props: IProps<OpenXDA.Types.Customer>): JSX.Element;
|
34
36
|
}
|
35
37
|
export {};
|
package/lib/SelectionPopup.js
CHANGED
@@ -59,4 +59,9 @@ var DefaultSelects;
|
|
59
59
|
return React.createElement(StandardSelectPopup_1.default, __assign({}, props, { Searchbar: function (children) { return React.createElement(SearchBar_1.DefaultSearch.AssetGroup, { Slice: props.Slice, GetAddlFields: props.GetAddlFields, GetEnum: props.GetEnum }, children); } }));
|
60
60
|
}
|
61
61
|
DefaultSelects.AssetGroup = AssetGroup;
|
62
|
+
/** This Implements a standard Asset Group Selection Modal */
|
63
|
+
function Customer(props) {
|
64
|
+
return React.createElement(StandardSelectPopup_1.default, __assign({}, props, { Searchbar: function (children) { return React.createElement(SearchBar_1.DefaultSearch.Customer, { Slice: props.Slice, GetAddlFields: props.GetAddlFields, GetEnum: props.GetEnum }, children); } }));
|
65
|
+
}
|
66
|
+
DefaultSelects.Customer = Customer;
|
62
67
|
})(DefaultSelects = exports.DefaultSelects || (exports.DefaultSelects = {}));
|
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.42",
|
4
4
|
"description": "Common UI pages for GPA products",
|
5
5
|
"main": "lib/index.js",
|
6
6
|
"types": "lib/index.d.ts",
|
@@ -47,18 +47,18 @@
|
|
47
47
|
"typescript": "4.4.4"
|
48
48
|
},
|
49
49
|
"dependencies": {
|
50
|
-
"@gpa-gemstone/application-typings": "0.0.
|
51
|
-
"@gpa-gemstone/gpa-symbols": "0.0.
|
52
|
-
"@gpa-gemstone/helper-functions": "0.0.
|
53
|
-
"@gpa-gemstone/react-forms": "1.1.
|
54
|
-
"@gpa-gemstone/react-interactive": "1.0.
|
55
|
-
"@gpa-gemstone/react-table": "1.2.
|
50
|
+
"@gpa-gemstone/application-typings": "0.0.47",
|
51
|
+
"@gpa-gemstone/gpa-symbols": "0.0.21",
|
52
|
+
"@gpa-gemstone/helper-functions": "0.0.15",
|
53
|
+
"@gpa-gemstone/react-forms": "1.1.23",
|
54
|
+
"@gpa-gemstone/react-interactive": "1.0.53",
|
55
|
+
"@gpa-gemstone/react-table": "1.2.14",
|
56
56
|
"@reduxjs/toolkit": "1.6.0",
|
57
57
|
"crypto-js": "4.0.0",
|
58
58
|
"moment": "^2.29.1",
|
59
59
|
"react": "^17.0.2",
|
60
60
|
"react-redux": "7.2.6",
|
61
|
-
"styled-components": "
|
61
|
+
"styled-components": "5.3.3"
|
62
62
|
},
|
63
63
|
"publishConfig": {
|
64
64
|
"access": "public"
|