@gpa-gemstone/common-pages 0.0.103 → 0.0.105
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/ErrorBoundary.d.ts +17 -17
- package/lib/ErrorBoundary.js +91 -68
- package/lib/Note.d.ts +22 -22
- package/lib/Note.js +256 -230
- package/lib/SearchBar.d.ts +37 -37
- package/lib/SearchBar.js +203 -180
- package/lib/SelectionPopup.d.ts +42 -42
- package/lib/SelectionPopup.js +93 -90
- package/lib/Setting.d.ts +8 -8
- package/lib/Setting.js +151 -125
- package/lib/SliceInterfaces.d.ts +76 -76
- package/lib/SliceInterfaces.js +2 -2
- package/lib/StandardSelectPopup.d.ts +20 -20
- package/lib/StandardSelectPopup.js +135 -109
- package/lib/TimeFilter/QuickSelects.d.ts +7 -0
- package/lib/TimeFilter/QuickSelects.js +240 -0
- package/lib/TimeFilter.d.ts +26 -0
- package/lib/TimeFilter.js +270 -0
- package/lib/TimeWindowUtils.d.ts +33 -0
- package/lib/TimeWindowUtils.js +121 -0
- package/lib/ValueList/ByValueList.d.ts +10 -10
- package/lib/ValueList/ByValueList.js +141 -115
- package/lib/ValueList/Group.d.ts +11 -11
- package/lib/ValueList/Group.js +97 -71
- package/lib/ValueList/GroupForm.d.ts +9 -9
- package/lib/ValueList/GroupForm.js +74 -51
- package/lib/ValueList/GroupInfo.d.ts +8 -8
- package/lib/ValueList/GroupInfo.js +95 -69
- package/lib/ValueList/GroupItem.d.ts +9 -9
- package/lib/ValueList/GroupItem.js +142 -116
- package/lib/ValueList/ItemForm.d.ts +9 -9
- package/lib/ValueList/ItemForm.js +82 -59
- package/lib/index.d.ts +12 -11
- package/lib/index.js +50 -45
- package/lib/user/AdditionalField.d.ts +26 -26
- package/lib/user/AdditionalField.js +290 -264
- package/lib/user/ByUser.d.ts +12 -12
- package/lib/user/ByUser.js +174 -148
- package/lib/user/User.d.ts +14 -14
- package/lib/user/User.js +97 -71
- package/lib/user/UserForm.d.ts +12 -12
- package/lib/user/UserForm.js +166 -143
- package/lib/user/UserInfo.d.ts +7 -7
- package/lib/user/UserInfo.js +123 -97
- package/lib/user/UserPermissions.d.ts +8 -8
- package/lib/user/UserPermissions.js +106 -83
- package/package.json +9 -8
package/lib/ErrorBoundary.d.ts
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
import * as React from 'react';
|
2
|
-
interface IError {
|
3
|
-
name: string;
|
4
|
-
message: string;
|
5
|
-
}
|
6
|
-
interface IProps {
|
7
|
-
HeaderErrorMessage: string;
|
8
|
-
BodyErrorMessage: string;
|
9
|
-
Height: number | string;
|
10
|
-
Width: number | string;
|
11
|
-
}
|
12
|
-
export default class ErrorBoundary extends React.Component<IProps, IError> {
|
13
|
-
constructor(props: IProps);
|
14
|
-
componentDidCatch(error: IError): void;
|
15
|
-
render(): JSX.Element;
|
16
|
-
}
|
17
|
-
export {};
|
1
|
+
import * as React from 'react';
|
2
|
+
interface IError {
|
3
|
+
name: string;
|
4
|
+
message: string;
|
5
|
+
}
|
6
|
+
interface IProps {
|
7
|
+
HeaderErrorMessage: string;
|
8
|
+
BodyErrorMessage: string;
|
9
|
+
Height: number | string;
|
10
|
+
Width: number | string;
|
11
|
+
}
|
12
|
+
export default class ErrorBoundary extends React.Component<IProps, IError> {
|
13
|
+
constructor(props: IProps);
|
14
|
+
componentDidCatch(error: IError): void;
|
15
|
+
render(): React.JSX.Element;
|
16
|
+
}
|
17
|
+
export {};
|
package/lib/ErrorBoundary.js
CHANGED
@@ -1,68 +1,91 @@
|
|
1
|
-
"use strict";
|
2
|
-
//******************************************************************************************************
|
3
|
-
// ErrorBoundary.tsx - Gbtc
|
4
|
-
//
|
5
|
-
// Copyright (c) 2024, Grid Protection Alliance. All Rights Reserved.
|
6
|
-
//
|
7
|
-
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
8
|
-
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
9
|
-
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
10
|
-
// file except in compliance with the License. You may obtain a copy of the License at:
|
11
|
-
//
|
12
|
-
// http://opensource.org/licenses/MIT
|
13
|
-
//
|
14
|
-
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
15
|
-
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
16
|
-
// License for the specific language governing permissions and limitations.
|
17
|
-
//
|
18
|
-
// Code Modification History:
|
19
|
-
// ----------------------------------------------------------------------------------------------------
|
20
|
-
// 05/02/2024 - Preton Crawford
|
21
|
-
// Generated original version of source code.
|
22
|
-
//
|
23
|
-
//******************************************************************************************************
|
24
|
-
var __extends = (this && this.__extends) || (function () {
|
25
|
-
var extendStatics = function (d, b) {
|
26
|
-
extendStatics = Object.setPrototypeOf ||
|
27
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
28
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
29
|
-
return extendStatics(d, b);
|
30
|
-
};
|
31
|
-
return function (d, b) {
|
32
|
-
if (typeof b !== "function" && b !== null)
|
33
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
34
|
-
extendStatics(d, b);
|
35
|
-
function __() { this.constructor = d; }
|
36
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
37
|
-
};
|
38
|
-
})();
|
39
|
-
Object.
|
40
|
-
|
41
|
-
var
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
1
|
+
"use strict";
|
2
|
+
//******************************************************************************************************
|
3
|
+
// ErrorBoundary.tsx - Gbtc
|
4
|
+
//
|
5
|
+
// Copyright (c) 2024, Grid Protection Alliance. All Rights Reserved.
|
6
|
+
//
|
7
|
+
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
|
8
|
+
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
|
9
|
+
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may not use this
|
10
|
+
// file except in compliance with the License. You may obtain a copy of the License at:
|
11
|
+
//
|
12
|
+
// http://opensource.org/licenses/MIT
|
13
|
+
//
|
14
|
+
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
|
15
|
+
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
|
16
|
+
// License for the specific language governing permissions and limitations.
|
17
|
+
//
|
18
|
+
// Code Modification History:
|
19
|
+
// ----------------------------------------------------------------------------------------------------
|
20
|
+
// 05/02/2024 - Preton Crawford
|
21
|
+
// Generated original version of source code.
|
22
|
+
//
|
23
|
+
//******************************************************************************************************
|
24
|
+
var __extends = (this && this.__extends) || (function () {
|
25
|
+
var extendStatics = function (d, b) {
|
26
|
+
extendStatics = Object.setPrototypeOf ||
|
27
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
28
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
29
|
+
return extendStatics(d, b);
|
30
|
+
};
|
31
|
+
return function (d, b) {
|
32
|
+
if (typeof b !== "function" && b !== null)
|
33
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
34
|
+
extendStatics(d, b);
|
35
|
+
function __() { this.constructor = d; }
|
36
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
37
|
+
};
|
38
|
+
})();
|
39
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
40
|
+
if (k2 === undefined) k2 = k;
|
41
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
42
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
43
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
44
|
+
}
|
45
|
+
Object.defineProperty(o, k2, desc);
|
46
|
+
}) : (function(o, m, k, k2) {
|
47
|
+
if (k2 === undefined) k2 = k;
|
48
|
+
o[k2] = m[k];
|
49
|
+
}));
|
50
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
51
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
52
|
+
}) : function(o, v) {
|
53
|
+
o["default"] = v;
|
54
|
+
});
|
55
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
56
|
+
if (mod && mod.__esModule) return mod;
|
57
|
+
var result = {};
|
58
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
59
|
+
__setModuleDefault(result, mod);
|
60
|
+
return result;
|
61
|
+
};
|
62
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
63
|
+
var React = __importStar(require("react"));
|
64
|
+
var react_interactive_1 = require("@gpa-gemstone/react-interactive");
|
65
|
+
var ErrorBoundary = /** @class */ (function (_super) {
|
66
|
+
__extends(ErrorBoundary, _super);
|
67
|
+
function ErrorBoundary(props) {
|
68
|
+
var _this = _super.call(this, props) || this;
|
69
|
+
_this.state = { name: "", message: "" };
|
70
|
+
return _this;
|
71
|
+
}
|
72
|
+
ErrorBoundary.prototype.componentDidCatch = function (error) {
|
73
|
+
this.setState({
|
74
|
+
name: error.name,
|
75
|
+
message: error.message
|
76
|
+
});
|
77
|
+
console.warn(error);
|
78
|
+
};
|
79
|
+
ErrorBoundary.prototype.render = function () {
|
80
|
+
if (this.state.name.length > 0) {
|
81
|
+
return (React.createElement("div", { className: "card", style: { width: this.props.Width, height: this.props.Height } },
|
82
|
+
React.createElement("div", { className: "card-header" }, this.props.HeaderErrorMessage),
|
83
|
+
React.createElement("div", { className: "card-body" },
|
84
|
+
React.createElement(react_interactive_1.ServerErrorIcon, { Show: true, Label: this.props.BodyErrorMessage, Size: 150 }))));
|
85
|
+
}
|
86
|
+
else
|
87
|
+
return React.createElement(React.Fragment, null, this.props.children);
|
88
|
+
};
|
89
|
+
return ErrorBoundary;
|
90
|
+
}(React.Component));
|
91
|
+
exports.default = ErrorBoundary;
|
package/lib/Note.d.ts
CHANGED
@@ -1,22 +1,22 @@
|
|
1
|
-
|
2
|
-
import { Column } from '@gpa-gemstone/react-table';
|
3
|
-
import { OpenXDA } from '@gpa-gemstone/application-typings';
|
4
|
-
import { IGenericSlice } from './SliceInterfaces';
|
5
|
-
interface IProps {
|
6
|
-
NoteTypes: OpenXDA.Types.NoteType[];
|
7
|
-
NoteTags: OpenXDA.Types.NoteTag[];
|
8
|
-
NoteApplications: OpenXDA.Types.NoteApplication[];
|
9
|
-
MaxHeight: number;
|
10
|
-
Title?: string;
|
11
|
-
ReferenceTableID?: number;
|
12
|
-
NoteSlice: IGenericSlice<OpenXDA.Types.Note>;
|
13
|
-
AllowEdit?: boolean;
|
14
|
-
AllowRemove?: boolean;
|
15
|
-
AllowAdd?: boolean;
|
16
|
-
ShowCard?: boolean;
|
17
|
-
DefaultApplication?: OpenXDA.Types.NoteApplication;
|
18
|
-
Filter?: (note: OpenXDA.Types.Note) => boolean;
|
19
|
-
AdditionalCollumns?: Column<OpenXDA.Types.Note>[];
|
20
|
-
}
|
21
|
-
declare function Note(props: IProps): JSX.Element;
|
22
|
-
export default Note;
|
1
|
+
import * as React from 'react';
|
2
|
+
import { Column } from '@gpa-gemstone/react-table';
|
3
|
+
import { OpenXDA } from '@gpa-gemstone/application-typings';
|
4
|
+
import { IGenericSlice } from './SliceInterfaces';
|
5
|
+
interface IProps {
|
6
|
+
NoteTypes: OpenXDA.Types.NoteType[];
|
7
|
+
NoteTags: OpenXDA.Types.NoteTag[];
|
8
|
+
NoteApplications: OpenXDA.Types.NoteApplication[];
|
9
|
+
MaxHeight: number;
|
10
|
+
Title?: string;
|
11
|
+
ReferenceTableID?: number;
|
12
|
+
NoteSlice: IGenericSlice<OpenXDA.Types.Note>;
|
13
|
+
AllowEdit?: boolean;
|
14
|
+
AllowRemove?: boolean;
|
15
|
+
AllowAdd?: boolean;
|
16
|
+
ShowCard?: boolean;
|
17
|
+
DefaultApplication?: OpenXDA.Types.NoteApplication;
|
18
|
+
Filter?: (note: OpenXDA.Types.Note) => boolean;
|
19
|
+
AdditionalCollumns?: Column<OpenXDA.Types.Note>[];
|
20
|
+
}
|
21
|
+
declare function Note(props: IProps): React.JSX.Element;
|
22
|
+
export default Note;
|