@gpa-gemstone/common-pages 0.0.103 → 0.0.105

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/lib/ErrorBoundary.d.ts +17 -17
  2. package/lib/ErrorBoundary.js +91 -68
  3. package/lib/Note.d.ts +22 -22
  4. package/lib/Note.js +256 -230
  5. package/lib/SearchBar.d.ts +37 -37
  6. package/lib/SearchBar.js +203 -180
  7. package/lib/SelectionPopup.d.ts +42 -42
  8. package/lib/SelectionPopup.js +93 -90
  9. package/lib/Setting.d.ts +8 -8
  10. package/lib/Setting.js +151 -125
  11. package/lib/SliceInterfaces.d.ts +76 -76
  12. package/lib/SliceInterfaces.js +2 -2
  13. package/lib/StandardSelectPopup.d.ts +20 -20
  14. package/lib/StandardSelectPopup.js +135 -109
  15. package/lib/TimeFilter/QuickSelects.d.ts +7 -0
  16. package/lib/TimeFilter/QuickSelects.js +240 -0
  17. package/lib/TimeFilter.d.ts +26 -0
  18. package/lib/TimeFilter.js +270 -0
  19. package/lib/TimeWindowUtils.d.ts +33 -0
  20. package/lib/TimeWindowUtils.js +121 -0
  21. package/lib/ValueList/ByValueList.d.ts +10 -10
  22. package/lib/ValueList/ByValueList.js +141 -115
  23. package/lib/ValueList/Group.d.ts +11 -11
  24. package/lib/ValueList/Group.js +97 -71
  25. package/lib/ValueList/GroupForm.d.ts +9 -9
  26. package/lib/ValueList/GroupForm.js +74 -51
  27. package/lib/ValueList/GroupInfo.d.ts +8 -8
  28. package/lib/ValueList/GroupInfo.js +95 -69
  29. package/lib/ValueList/GroupItem.d.ts +9 -9
  30. package/lib/ValueList/GroupItem.js +142 -116
  31. package/lib/ValueList/ItemForm.d.ts +9 -9
  32. package/lib/ValueList/ItemForm.js +82 -59
  33. package/lib/index.d.ts +12 -11
  34. package/lib/index.js +50 -45
  35. package/lib/user/AdditionalField.d.ts +26 -26
  36. package/lib/user/AdditionalField.js +290 -264
  37. package/lib/user/ByUser.d.ts +12 -12
  38. package/lib/user/ByUser.js +174 -148
  39. package/lib/user/User.d.ts +14 -14
  40. package/lib/user/User.js +97 -71
  41. package/lib/user/UserForm.d.ts +12 -12
  42. package/lib/user/UserForm.js +166 -143
  43. package/lib/user/UserInfo.d.ts +7 -7
  44. package/lib/user/UserInfo.js +123 -97
  45. package/lib/user/UserPermissions.d.ts +8 -8
  46. package/lib/user/UserPermissions.js +106 -83
  47. package/package.json +9 -8
@@ -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 {};
@@ -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.defineProperty(exports, "__esModule", { value: true });
40
- var React = require("react");
41
- var react_interactive_1 = require("@gpa-gemstone/react-interactive");
42
- var ErrorBoundary = /** @class */ (function (_super) {
43
- __extends(ErrorBoundary, _super);
44
- function ErrorBoundary(props) {
45
- var _this = _super.call(this, props) || this;
46
- _this.state = { name: "", message: "" };
47
- return _this;
48
- }
49
- ErrorBoundary.prototype.componentDidCatch = function (error) {
50
- this.setState({
51
- name: error.name,
52
- message: error.message
53
- });
54
- console.warn(error);
55
- };
56
- ErrorBoundary.prototype.render = function () {
57
- if (this.state.name.length > 0) {
58
- return (React.createElement("div", { className: "card", style: { width: this.props.Width, height: this.props.Height } },
59
- React.createElement("div", { className: "card-header" }, this.props.HeaderErrorMessage),
60
- React.createElement("div", { className: "card-body" },
61
- React.createElement(react_interactive_1.ServerErrorIcon, { Show: true, Label: this.props.BodyErrorMessage, Size: 150 }))));
62
- }
63
- else
64
- return React.createElement(React.Fragment, null, this.props.children);
65
- };
66
- return ErrorBoundary;
67
- }(React.Component));
68
- exports.default = ErrorBoundary;
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
- /// <reference types="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): 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;