studiokit-scaffolding-js 5.2.0 → 6.0.0-next.1.1
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/components/AlertDialog.d.ts +1 -1
- package/lib/components/Dropdowns/GroupsDropdown.d.ts +3 -3
- package/lib/components/Dropdowns/GroupsDropdown.js +1 -2
- package/lib/components/Dropdowns/ManagedNavDropdown.d.ts +2 -2
- package/lib/components/Dropdowns/UserDropdown.js +1 -1
- package/lib/components/EntityOwnerList.d.ts +3 -3
- package/lib/components/Forms/DateField.d.ts +1 -1
- package/lib/components/Forms/TimeField.d.ts +1 -1
- package/lib/components/Groups/ExternalGroups/Attach.d.ts +4 -3
- package/lib/components/Groups/ExternalGroups/Attach.js +3 -3
- package/lib/components/HOC/ActivityRequiredComponent.d.ts +2 -2
- package/lib/components/HOC/AsyncComponent.d.ts +1 -1
- package/lib/components/HOC/CollectionComponent.d.ts +3 -3
- package/lib/components/HOC/CollectionComponent.js +1 -2
- package/lib/components/HOC/CollectionFirstItemComponent.d.ts +2 -2
- package/lib/components/HOC/CollectionFirstItemComponent.js +1 -1
- package/lib/components/HOC/CollectionItemComponent.d.ts +2 -2
- package/lib/components/HOC/CollectionItemComponent.js +1 -2
- package/lib/components/HOC/ConnectedModalComponent.d.ts +1 -1
- package/lib/components/HOC/ConnectedModalComponent.js +7 -2
- package/lib/components/HOC/DataDependentComponent.d.ts +2 -2
- package/lib/components/HOC/EntityComponent.d.ts +2 -2
- package/lib/components/HOC/FullscreenModalComponent.d.ts +1 -1
- package/lib/components/HOC/ModelContextDependencyVerifyComponent.d.ts +6 -6
- package/lib/components/HOC/ModelErrorRedirectComponent.d.ts +2 -2
- package/lib/components/HOC/ModelErrorRedirectComponent.js +3 -2
- package/lib/components/HOC/SearchPersistorComponent.js +1 -1
- package/lib/components/HOC/UnauthenticatedComponent.d.ts +2 -2
- package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +1 -1
- package/lib/components/ManageTable.d.ts +2 -2
- package/lib/components/NewVersionAlert.d.ts +2 -2
- package/lib/components/Notifications.d.ts +1 -1
- package/lib/components/Notifications.js +2 -1
- package/lib/components/Tables/RoleFilter.d.ts +2 -2
- package/lib/components/Tables/TextFilter.d.ts +2 -2
- package/lib/components/UserRoles/Add.d.ts +2 -2
- package/lib/components/UserRoles/index.d.ts +5 -5
- package/lib/components/UserRoles/index.js +15 -8
- package/lib/config/eslint/{index.js → index.cjs} +2 -2
- package/lib/config/eslint/lib/{typescript.js → typescript.cjs} +2 -2
- package/lib/config/eslint/react.cjs +9 -0
- package/lib/constants/fetchErrorData.d.ts +3 -0
- package/lib/constants/fetchErrorData.js +14 -0
- package/lib/constants/mockData.d.ts +9 -1
- package/lib/constants/mockData.js +41 -1
- package/lib/constants/userRole.d.ts +2 -2
- package/lib/css/index-with-variables.css +5 -4
- package/lib/css/index.css +5 -4
- package/lib/endpointMappings.d.ts +0 -1
- package/lib/endpointMappings.js +6 -8
- package/lib/hooks/useCollection.js +1 -4
- package/lib/hooks/useCollectionConfiguration.d.ts +4 -5
- package/lib/hooks/useCollectionItem.js +1 -4
- package/lib/index.d.ts +1 -0
- package/lib/index.js +8 -1
- package/lib/redux/actionCreator.d.ts +8 -2
- package/lib/redux/actionCreator.js +45 -7
- package/lib/redux/actions/AuthAction.d.ts +53 -0
- package/lib/redux/actions/AuthAction.js +32 -0
- package/lib/redux/actions/ModalAction.d.ts +16 -0
- package/lib/redux/actions/ModalAction.js +8 -0
- package/lib/redux/actions/ModelAction.d.ts +117 -0
- package/lib/redux/actions/ModelAction.js +62 -0
- package/lib/redux/actions/NotificationAction.d.ts +9 -0
- package/lib/redux/actions/NotificationAction.js +8 -0
- package/lib/redux/actions/SearchAction.d.ts +8 -0
- package/lib/redux/actions/SearchAction.js +7 -0
- package/lib/redux/actions/index.d.ts +5 -0
- package/lib/redux/actions/index.js +17 -0
- package/lib/redux/configureReducers.d.ts +3 -2
- package/lib/redux/configureReducers.js +3 -3
- package/lib/redux/configureStore.js +13 -10
- package/lib/redux/helpers.js +1 -3
- package/lib/redux/reducers/authReducer.d.ts +6 -2
- package/lib/redux/reducers/authReducer.js +10 -7
- package/lib/redux/reducers/index.d.ts +2 -2
- package/lib/redux/reducers/index.js +3 -3
- package/lib/redux/reducers/modalsReducer.d.ts +1 -4
- package/lib/redux/reducers/modalsReducer.js +3 -3
- package/lib/redux/reducers/{fetchReducer.d.ts → modelsReducer.d.ts} +11 -5
- package/lib/redux/reducers/{fetchReducer.js → modelsReducer.js} +19 -17
- package/lib/redux/reducers/notificationsReducer.d.ts +2 -5
- package/lib/redux/reducers/notificationsReducer.js +6 -9
- package/lib/redux/reducers/searchReducer.d.ts +1 -4
- package/lib/redux/reducers/searchReducer.js +2 -2
- package/lib/redux/sagas/appInsightsSaga.js +3 -3
- package/lib/redux/sagas/authSaga.d.ts +13 -15
- package/lib/redux/sagas/authSaga.js +111 -115
- package/lib/redux/sagas/caliperSaga.js +9 -8
- package/lib/redux/sagas/clockOffsetSaga.js +1 -1
- package/lib/redux/sagas/configurationSaga.js +1 -1
- package/lib/redux/sagas/downtimeApiErrorSaga.js +5 -5
- package/lib/redux/sagas/googleAnalyticsSaga.js +4 -3
- package/lib/redux/sagas/identityProviderSaga.js +15 -13
- package/lib/redux/sagas/initialDataLoadSaga.js +5 -6
- package/lib/redux/sagas/lockDownBrowserErrorSaga.js +4 -2
- package/lib/redux/sagas/modelFetchSaga.d.ts +65 -0
- package/lib/redux/sagas/modelFetchSaga.js +493 -0
- package/lib/redux/sagas/noStoreSaga.d.ts +12 -11
- package/lib/redux/sagas/noStoreSaga.js +29 -33
- package/lib/redux/sagas/postLoginDataSaga.js +12 -11
- package/lib/redux/sagas/postLoginRedirectSaga.js +2 -2
- package/lib/redux/sagas/rootSaga.js +10 -16
- package/lib/redux/sagas/sentrySaga.js +19 -32
- package/lib/redux/sagas/userIdSaga.js +3 -3
- package/lib/services/fetchService.d.ts +21 -17
- package/lib/services/fetchService.js +80 -64
- package/lib/services/windowService.d.ts +2 -0
- package/lib/services/windowService.js +6 -1
- package/lib/startup.js +6 -3
- package/lib/types/Artifact.d.ts +1 -0
- package/lib/types/Collection.d.ts +21 -21
- package/lib/types/auth/CasV1LoginRequestBody.d.ts +4 -0
- package/lib/types/auth/LocalLoginRequestBody.d.ts +5 -0
- package/lib/types/auth/TokenPersistenceService.d.ts +3 -3
- package/lib/types/auth/index.d.ts +2 -2
- package/lib/types/auth/index.js +2 -2
- package/lib/types/net/ErrorHandler.d.ts +3 -1
- package/lib/types/net/FetchConfig.d.ts +1 -2
- package/lib/types/net/FetchErrorData.d.ts +15 -0
- package/lib/types/net/FetchErrorData.js +8 -0
- package/lib/types/net/HTTPStatusCode.d.ts +11 -0
- package/lib/types/net/HTTPStatusCode.js +15 -0
- package/lib/types/net/Metadata.d.ts +2 -1
- package/lib/types/net/Metadata.js +0 -3
- package/lib/types/net/OAuthToken.js +0 -3
- package/lib/types/net/OAuthTokenOrNull.d.ts +2 -0
- package/lib/types/net/TokenAccessFunction.d.ts +2 -2
- package/lib/types/net/index.d.ts +3 -4
- package/lib/types/net/index.js +3 -4
- package/lib/utils/collection.d.ts +3 -4
- package/lib/utils/collection.js +17 -15
- package/lib/utils/dom.js +4 -4
- package/lib/utils/error.d.ts +1 -0
- package/lib/utils/error.js +20 -0
- package/lib/utils/fetch.d.ts +28 -0
- package/lib/utils/fetch.js +195 -0
- package/lib/utils/model.d.ts +2 -2
- package/lib/utils/quill.js +47 -34
- package/lib/utils/user.js +11 -11
- package/package.json +48 -21
- package/lib/config/eslint/react.js +0 -9
- package/lib/redux/actions.d.ts +0 -39
- package/lib/redux/actions.js +0 -65
- package/lib/redux/sagas/fetchSaga.d.ts +0 -97
- package/lib/redux/sagas/fetchSaga.js +0 -661
- package/lib/setupTests.d.ts +0 -1
- package/lib/setupTests.js +0 -25
- package/lib/types/auth/AuthAction.d.ts +0 -6
- package/lib/types/auth/Credentials.d.ts +0 -4
- package/lib/types/net/FetchAction.d.ts +0 -41
- package/lib/types/net/FetchError.d.ts +0 -7
- package/lib/types/net/FetchError.js +0 -5
- package/lib/types/net/LoggerFunction.d.ts +0 -1
- package/lib/types/net/LoggerFunction.js +0 -2
- package/lib/types/net/OAuthTokenResponse.d.ts +0 -2
- package/lib/types/net/OAuthTokenResponse.js +0 -2
- /package/lib/config/eslint/lib/{order.js → order.cjs} +0 -0
- /package/lib/config/eslint/lib/{prettier.js → prettier.cjs} +0 -0
- /package/lib/types/auth/{AuthAction.js → CasV1LoginRequestBody.js} +0 -0
- /package/lib/types/auth/{Credentials.js → LocalLoginRequestBody.js} +0 -0
- /package/lib/types/net/{FetchAction.js → OAuthTokenOrNull.js} +0 -0
|
@@ -7,7 +7,7 @@ export interface AlertDialogProps {
|
|
|
7
7
|
onProceed?: MouseEventHandler<HTMLElement>;
|
|
8
8
|
proceedText?: string;
|
|
9
9
|
/** onCancel is needed for closing using the X button, clicking the backdrop, or clicking the cancel button*/
|
|
10
|
-
onCancel:
|
|
10
|
+
onCancel: () => void;
|
|
11
11
|
cancelText?: string;
|
|
12
12
|
hideCancel?: boolean;
|
|
13
13
|
onDestroy?: MouseEventHandler<HTMLElement>;
|
|
@@ -10,8 +10,8 @@ interface Props {
|
|
|
10
10
|
declare class GroupsDropdown extends Component<Props> {
|
|
11
11
|
loadGroups: () => void;
|
|
12
12
|
didToggle: (isOpen: boolean) => void;
|
|
13
|
-
renderGroupMenu: (groups: Group[]) => JSX.Element[] | null;
|
|
14
|
-
render(): JSX.Element | null;
|
|
13
|
+
renderGroupMenu: (groups: Group[]) => React.JSX.Element[] | null;
|
|
14
|
+
render(): React.JSX.Element | null;
|
|
15
15
|
}
|
|
16
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof GroupsDropdown, Pick<React.ClassAttributes<GroupsDropdown> & Props, "
|
|
16
|
+
declare const _default: import("react-redux").ConnectedComponent<typeof GroupsDropdown, Pick<React.ClassAttributes<GroupsDropdown> & Props, "ref" | "title" | "id" | "key" | "anyRoleButLearner">>;
|
|
17
17
|
export default _default;
|
|
@@ -37,7 +37,6 @@ var react_bootstrap_1 = require("react-bootstrap");
|
|
|
37
37
|
var react_redux_1 = require("react-redux");
|
|
38
38
|
var react_router_bootstrap_1 = require("react-router-bootstrap");
|
|
39
39
|
var actionCreator_1 = require("../../redux/actionCreator");
|
|
40
|
-
var actions_1 = require("../../redux/actions");
|
|
41
40
|
var date_1 = require("../../utils/date");
|
|
42
41
|
var groupDates_1 = require("../../utils/groupDates");
|
|
43
42
|
var groupRoles_1 = require("../../utils/groupRoles");
|
|
@@ -48,7 +47,7 @@ var GroupsDropdown = /** @class */ (function (_super) {
|
|
|
48
47
|
function GroupsDropdown() {
|
|
49
48
|
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
50
49
|
_this.loadGroups = function () {
|
|
51
|
-
actionCreator_1.
|
|
50
|
+
actionCreator_1.dispatchModelFetchRequest({ modelName: 'groups' });
|
|
52
51
|
};
|
|
53
52
|
_this.didToggle = function (isOpen) {
|
|
54
53
|
if (isOpen) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import { NavDropdownProps } from 'react-bootstrap';
|
|
3
3
|
declare enum EVENT_SOURCE {
|
|
4
4
|
MOUSE_ENTER = "mouseEnter",
|
|
@@ -27,6 +27,6 @@ export declare class ManagedNavDropdown extends Component<ManagedNavDropdownProp
|
|
|
27
27
|
onMouseLeave: () => void;
|
|
28
28
|
onToggle: (nextIsOpen: boolean, event: any, source: Record<string, unknown>) => void;
|
|
29
29
|
didToggle: () => void;
|
|
30
|
-
render(): JSX.Element;
|
|
30
|
+
render(): React.JSX.Element;
|
|
31
31
|
}
|
|
32
32
|
export {};
|
|
@@ -56,7 +56,7 @@ var IconStopImpersonating_1 = require("../Icons/IconStopImpersonating");
|
|
|
56
56
|
var UserDetail_1 = require("../Impersonation/UserDetail");
|
|
57
57
|
var ManagedNavDropdown_1 = require("./ManagedNavDropdown");
|
|
58
58
|
var doLogOut = function () {
|
|
59
|
-
actionCreator_1.dispatchAction(actions_1.
|
|
59
|
+
actionCreator_1.dispatchAction({ type: actions_1.AUTH_ACTION_TYPE.LOG_OUT_REQUESTED });
|
|
60
60
|
};
|
|
61
61
|
var UserDropdown = function (_a) {
|
|
62
62
|
var userInfo = _a.userInfo, children = _a.children, props = __rest(_a, ["userInfo", "children"]);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import { User } from '../types/User';
|
|
3
3
|
export interface EntityOwnerListProps {
|
|
4
4
|
owners: User[];
|
|
@@ -6,6 +6,6 @@ export interface EntityOwnerListProps {
|
|
|
6
6
|
displayAsInstructors?: boolean;
|
|
7
7
|
}
|
|
8
8
|
export declare class EntityOwnerList extends Component<EntityOwnerListProps> {
|
|
9
|
-
renderOwner: (owner: User, className: string) => JSX.Element;
|
|
10
|
-
render(): JSX.Element;
|
|
9
|
+
renderOwner: (owner: User, className: string) => React.JSX.Element;
|
|
10
|
+
render(): React.JSX.Element;
|
|
11
11
|
}
|
|
@@ -9,5 +9,5 @@ export interface DateFieldProps extends Pick<StandardTextFieldProps, Exclude<key
|
|
|
9
9
|
export declare class DateField extends Component<DateFieldProps> {
|
|
10
10
|
onChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>;
|
|
11
11
|
isDateValid: (dateString: string) => boolean;
|
|
12
|
-
render(): JSX.Element;
|
|
12
|
+
render(): React.JSX.Element;
|
|
13
13
|
}
|
|
@@ -7,5 +7,5 @@ export interface TimeFieldProps extends Pick<StandardTextFieldProps, Exclude<key
|
|
|
7
7
|
export declare class TimeField extends Component<TimeFieldProps> {
|
|
8
8
|
onChange: React.ChangeEventHandler<HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement>;
|
|
9
9
|
isTimeValid: (timeString: string) => boolean;
|
|
10
|
-
render(): JSX.Element;
|
|
10
|
+
render(): React.JSX.Element;
|
|
11
11
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Dictionary } from 'lodash';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import { Component } from 'react';
|
|
3
4
|
import { ExternalGroup, GroupUserRole, LtiLaunch, ModelCollection, OwnerSchedule, UniTimeGroup, UserInfo } from '../../../types';
|
|
4
5
|
export interface ExternalGroupsAttachProps {
|
|
@@ -28,8 +29,8 @@ export declare class ExternalGroupsAttach extends Component<ExternalGroupsAttach
|
|
|
28
29
|
handleSelectExternalGroups: (event: any) => void;
|
|
29
30
|
getOwnerUniTimeGroups: (ownerSchedule: OwnerSchedule, userId: string, externalTermId: number) => void;
|
|
30
31
|
setUserUniTimeGroups: (userId: string, externalGroups: UniTimeGroup[]) => void;
|
|
31
|
-
displayOwnerSchedules: (ownerSchedules: Dictionary<OwnerSchedule>) => (JSX.Element | undefined)[];
|
|
32
|
-
displayUniTimeGroups: (externalGroups: UniTimeGroup[]) => (JSX.Element | null)[];
|
|
33
|
-
render(): JSX.Element;
|
|
32
|
+
displayOwnerSchedules: (ownerSchedules: Dictionary<OwnerSchedule>) => (React.JSX.Element | undefined)[];
|
|
33
|
+
displayUniTimeGroups: (externalGroups: UniTimeGroup[]) => (React.JSX.Element | null)[];
|
|
34
|
+
render(): React.JSX.Element;
|
|
34
35
|
}
|
|
35
36
|
export {};
|
|
@@ -24,8 +24,8 @@ var react_bootstrap_1 = require("react-bootstrap");
|
|
|
24
24
|
var uuid_1 = require("uuid");
|
|
25
25
|
var constants_1 = require("../../../constants");
|
|
26
26
|
var actionCreator_1 = require("../../../redux/actionCreator");
|
|
27
|
-
var actions_1 = require("../../../redux/actions");
|
|
28
27
|
var noStoreSaga_1 = require("../../../redux/sagas/noStoreSaga");
|
|
28
|
+
var fetch_1 = require("../../../utils/fetch");
|
|
29
29
|
var model_1 = require("../../../utils/model");
|
|
30
30
|
var shard_1 = require("../../../utils/shard");
|
|
31
31
|
var user_1 = require("../../../utils/user");
|
|
@@ -89,14 +89,14 @@ var ExternalGroupsAttach = /** @class */ (function (_super) {
|
|
|
89
89
|
if (shard_1.isPurdueShard() && ownerSchedule.status === constants_1.MODEL_STATUS.UNINITIALIZED && !ownerSchedule.externalGroups) {
|
|
90
90
|
noStoreSaga_1.registerNoStoreActionHook(ownerSchedule.hookId, function (data) {
|
|
91
91
|
noStoreSaga_1.unregisterNoStoreActionHook(ownerSchedule.hookId);
|
|
92
|
-
if (data
|
|
92
|
+
if (!data || fetch_1.isFetchErrorData(data)) {
|
|
93
93
|
_this.setState({ isShowingErrorAlert: true, isUniTimeScheduleLoadingDone: true });
|
|
94
94
|
}
|
|
95
95
|
else {
|
|
96
96
|
_this.setUserUniTimeGroups(userId, data.externalGroups);
|
|
97
97
|
}
|
|
98
98
|
});
|
|
99
|
-
actionCreator_1.
|
|
99
|
+
actionCreator_1.dispatchModelFetchRequest({
|
|
100
100
|
modelName: 'uniTimeInstructorSchedule',
|
|
101
101
|
queryParams: {
|
|
102
102
|
externalTermId: externalTermId,
|
|
@@ -7,7 +7,7 @@ export interface ActivityRequiredStateProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare const configureActivityRequiredComponent: <TOwnProps extends {}>(WrappedComponent: React.ComponentType<TOwnProps>) => {
|
|
9
9
|
new (props: (TOwnProps & ActivityRequiredStateProps) | Readonly<TOwnProps & ActivityRequiredStateProps>): {
|
|
10
|
-
render(): JSX.Element;
|
|
10
|
+
render(): React.JSX.Element;
|
|
11
11
|
context: any;
|
|
12
12
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & ActivityRequiredStateProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
13
13
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -32,7 +32,7 @@ export declare const configureActivityRequiredComponent: <TOwnProps extends {}>(
|
|
|
32
32
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & ActivityRequiredStateProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
33
33
|
};
|
|
34
34
|
new (props: TOwnProps & ActivityRequiredStateProps, context: any): {
|
|
35
|
-
render(): JSX.Element;
|
|
35
|
+
render(): React.JSX.Element;
|
|
36
36
|
context: any;
|
|
37
37
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & ActivityRequiredStateProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
38
38
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -10,7 +10,7 @@ export default function asyncComponent<TOwnProps extends {}>(importComponent: As
|
|
|
10
10
|
_isMounted: boolean;
|
|
11
11
|
componentDidMount(): Promise<void>;
|
|
12
12
|
componentWillUnmount(): void;
|
|
13
|
-
render(): JSX.Element | null;
|
|
13
|
+
render(): React.JSX.Element | null;
|
|
14
14
|
context: any;
|
|
15
15
|
setState<K extends "component">(state: AsyncComponentState<TOwnProps> | ((prevState: Readonly<AsyncComponentState<TOwnProps>>, props: Readonly<TOwnProps>) => AsyncComponentState<TOwnProps> | Pick<AsyncComponentState<TOwnProps>, K> | null) | Pick<AsyncComponentState<TOwnProps>, K> | null, callback?: (() => void) | undefined): void;
|
|
16
16
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -15,7 +15,7 @@ export declare function configureCollectionComponent<TModel extends Model, TOwnP
|
|
|
15
15
|
componentDidMount(): void;
|
|
16
16
|
componentDidUpdate(prevProps: TOwnProps & CollectionComponentProps<TModel>): void;
|
|
17
17
|
componentWillUnmount(): void;
|
|
18
|
-
changeModelStatus: (newModelStatus: MODEL_STATUS, fetchingId?: string | undefined) => void;
|
|
18
|
+
changeModelStatus: (newModelStatus: MODEL_STATUS, fetchingId?: string | number | undefined) => void;
|
|
19
19
|
getCollectionMethodConfig: () => CollectionMethodConfiguration;
|
|
20
20
|
load: (params?: CollectionLoadParams) => void;
|
|
21
21
|
stopPeriodicLoad: (taskId: string) => void;
|
|
@@ -23,7 +23,7 @@ export declare function configureCollectionComponent<TModel extends Model, TOwnP
|
|
|
23
23
|
update: (params: CollectionUpdateParams) => void;
|
|
24
24
|
delete: (params: CollectionDeleteParams) => void;
|
|
25
25
|
getModelArray: import("memoize-one").MemoizedFn<(model: ModelCollection<TModel>, guid?: string | undefined) => TModel[]>;
|
|
26
|
-
render(): JSX.Element;
|
|
26
|
+
render(): React.JSX.Element;
|
|
27
27
|
context: any;
|
|
28
28
|
setState<K extends "modelStatus" | "previousModelStatus" | "fetchingId">(state: CollectionCommonState | ((prevState: Readonly<CollectionCommonState>, props: Readonly<TOwnProps & CollectionComponentProps<TModel>>) => CollectionCommonState | Pick<CollectionCommonState, K> | null) | Pick<CollectionCommonState, K> | null, callback?: (() => void) | undefined): void;
|
|
29
29
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -46,7 +46,7 @@ export declare function configureCollectionComponent<TModel extends Model, TOwnP
|
|
|
46
46
|
};
|
|
47
47
|
contextType?: React.Context<any> | undefined;
|
|
48
48
|
};
|
|
49
|
-
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionComponentProps<TModel>, "
|
|
49
|
+
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionComponentProps<TModel>, "guid" | "match" | "modelName" | "pathParams" | "queryParams" | "location" | "history" | "staticContext" | "disableAutoLoad" | "disableAutoLoadOnParamsChange">>(modelName: string) => (state: BaseReduxState, ownProps: TOwnProps & Partial<CollectionComponentProps<TModel>>) => import("../../types").CollectionSelectorMethodResponse<Model>;
|
|
50
50
|
/**
|
|
51
51
|
* HOC that provides "collection" related functionality, using redux `connect()`, react-router-dom `withRouter()`, and `GuidComponent`.
|
|
52
52
|
*
|
|
@@ -99,8 +99,7 @@ function configureCollectionComponent(WrappedComponent, LoaderComponent) {
|
|
|
99
99
|
collection_1.loadCollection(_this.getCollectionMethodConfig(), params);
|
|
100
100
|
};
|
|
101
101
|
_this.stopPeriodicLoad = function (taskId) {
|
|
102
|
-
|
|
103
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
102
|
+
collection_1.stopCollectionPeriodicLoad(taskId);
|
|
104
103
|
};
|
|
105
104
|
_this.create = function (params) {
|
|
106
105
|
collection_1.createItemInCollection(_this.getCollectionMethodConfig(), params);
|
|
@@ -13,7 +13,7 @@ export declare function configureCollectionFirstItemComponent<TModel extends Mod
|
|
|
13
13
|
getModelArray: import("memoize-one").MemoizedFn<(model: ModelCollection<TModel>, guid?: string | undefined) => TModel[]>;
|
|
14
14
|
getModelMinusRelations: import("memoize-one").MemoizedFn<(model: TModel) => Partial<TModel>>;
|
|
15
15
|
getFirstItem: () => TModel;
|
|
16
|
-
render(): JSX.Element;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
17
|
context: any;
|
|
18
18
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & CollectionComponentWrappedProps<TModel>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
19
19
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -41,7 +41,7 @@ export declare function configureCollectionFirstItemComponent<TModel extends Mod
|
|
|
41
41
|
getModelArray: import("memoize-one").MemoizedFn<(model: ModelCollection<TModel>, guid?: string | undefined) => TModel[]>;
|
|
42
42
|
getModelMinusRelations: import("memoize-one").MemoizedFn<(model: TModel) => Partial<TModel>>;
|
|
43
43
|
getFirstItem: () => TModel;
|
|
44
|
-
render(): JSX.Element;
|
|
44
|
+
render(): React.JSX.Element;
|
|
45
45
|
context: any;
|
|
46
46
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & CollectionComponentWrappedProps<TModel>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
47
47
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -86,7 +86,7 @@ function configureCollectionFirstItemComponent(WrappedComponent) {
|
|
|
86
86
|
var modelMinusRelations = this.getModelMinusRelations(firstItem);
|
|
87
87
|
var p = __spreadArrays(pathParams);
|
|
88
88
|
if (firstItem.id) {
|
|
89
|
-
p.push(firstItem.id
|
|
89
|
+
p.push(firstItem.id);
|
|
90
90
|
}
|
|
91
91
|
return (react_1.default.createElement(WrappedComponent, __assign({}, this.props, { pathParams: p, model: firstItem, modelMinusRelations: modelMinusRelations })));
|
|
92
92
|
};
|
|
@@ -21,7 +21,7 @@ export declare function configureCollectionItemComponent<TModel extends Model, T
|
|
|
21
21
|
update: (params: CollectionItemUpdateParams) => void;
|
|
22
22
|
delete: (params?: CollectionItemDeleteParams) => void;
|
|
23
23
|
getModelMinusRelations: import("memoize-one").MemoizedFn<(model: TModel) => Partial<TModel>>;
|
|
24
|
-
render(): JSX.Element;
|
|
24
|
+
render(): React.JSX.Element;
|
|
25
25
|
context: any;
|
|
26
26
|
setState<K extends "modelStatus" | "previousModelStatus" | "fetchingId">(state: CollectionCommonState | ((prevState: Readonly<CollectionCommonState>, props: Readonly<TOwnProps & CollectionItemComponentProps<TModel>>) => CollectionCommonState | Pick<CollectionCommonState, K> | null) | Pick<CollectionCommonState, K> | null, callback?: (() => void) | undefined): void;
|
|
27
27
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -45,7 +45,7 @@ export declare function configureCollectionItemComponent<TModel extends Model, T
|
|
|
45
45
|
};
|
|
46
46
|
contextType?: React.Context<any> | undefined;
|
|
47
47
|
};
|
|
48
|
-
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionItemComponentProps<TModel>, "
|
|
48
|
+
export declare const configureMapStateToProps: <TModel extends Model, TOwnProps extends Pick<CollectionItemComponentProps<TModel>, "guid" | "match" | "modelName" | "pathParams" | "queryParams" | "location" | "history" | "staticContext" | "disableAutoLoad" | "disableAutoLoadOnParamsChange">>(modelName: string) => (state: BaseReduxState, ownProps: TOwnProps) => import("../../types").CollectionSelectorMethodResponse<Model>;
|
|
49
49
|
/**
|
|
50
50
|
* HOC that provides "collection" related functionality for a single item in a collection, using redux `connect()`, react-router-dom `withRouter()`, and `GuidComponent`.
|
|
51
51
|
*
|
|
@@ -98,8 +98,7 @@ function configureCollectionItemComponent(WrappedComponent, LoaderComponent) {
|
|
|
98
98
|
collection_1.loadCollectionItem(_this.getCollectionMethodConfig(), params);
|
|
99
99
|
};
|
|
100
100
|
_this.stopPeriodicLoad = function (taskId) {
|
|
101
|
-
|
|
102
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
101
|
+
collection_1.stopCollectionPeriodicLoad(taskId);
|
|
103
102
|
};
|
|
104
103
|
_this.create = function (params) {
|
|
105
104
|
var model = _this.props.model;
|
|
@@ -27,7 +27,7 @@ export declare function configureConnectedModalComponent<TOwnProps extends {}>(W
|
|
|
27
27
|
componentWillUnmount(): void;
|
|
28
28
|
onEntering: () => void;
|
|
29
29
|
onExited: () => void;
|
|
30
|
-
render(): JSX.Element;
|
|
30
|
+
render(): React.JSX.Element;
|
|
31
31
|
context: any;
|
|
32
32
|
setState<K extends "isModalOpen">(state: ConnectedModalState | ((prevState: Readonly<ConnectedModalState>, props: Readonly<TOwnProps & ConnectedModalReduxProps & GuidComponentWrappedProps>) => ConnectedModalState | Pick<ConnectedModalState, K> | null) | Pick<ConnectedModalState, K> | null, callback?: (() => void) | undefined): void;
|
|
33
33
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -89,7 +89,12 @@ function configureConnectedModalComponent(WrappedComponent, isFullscreen) {
|
|
|
89
89
|
var _b = _this.props, guid = _b.guid, modals = _b.modals;
|
|
90
90
|
// Store each modal's GUID in redux with a zero-based index to determine the order in which they were opened
|
|
91
91
|
var maxModal = lodash_1.maxBy(Object.values(modals), function (modal) { return modal.index; });
|
|
92
|
-
actionCreator_1.dispatchAction(
|
|
92
|
+
actionCreator_1.dispatchAction({
|
|
93
|
+
type: actions_1.MODAL_ACTION_TYPE.MODAL_ENTERING,
|
|
94
|
+
guid: guid,
|
|
95
|
+
index: ((_a = maxModal === null || maxModal === void 0 ? void 0 : maxModal.index) !== null && _a !== void 0 ? _a : -1) + 1,
|
|
96
|
+
isFullscreen: isFullscreen
|
|
97
|
+
});
|
|
93
98
|
_this.setState({
|
|
94
99
|
isModalOpen: true
|
|
95
100
|
});
|
|
@@ -98,7 +103,7 @@ function configureConnectedModalComponent(WrappedComponent, isFullscreen) {
|
|
|
98
103
|
var guid = _this.props.guid;
|
|
99
104
|
var isModalOpen = _this.state.isModalOpen;
|
|
100
105
|
if (isModalOpen) {
|
|
101
|
-
actionCreator_1.dispatchAction(actions_1.
|
|
106
|
+
actionCreator_1.dispatchAction({ type: actions_1.MODAL_ACTION_TYPE.MODAL_EXITED, guid: guid });
|
|
102
107
|
}
|
|
103
108
|
_this.setState({
|
|
104
109
|
isModalOpen: false
|
|
@@ -5,7 +5,7 @@ interface DataDependentComponentStateProps {
|
|
|
5
5
|
}
|
|
6
6
|
export declare const configureDataDependentComponent: <TOwnProps extends {}>(WrappedComponent: React.ComponentType<TOwnProps>) => {
|
|
7
7
|
new (props: (TOwnProps & DataDependentComponentStateProps) | Readonly<TOwnProps & DataDependentComponentStateProps>): {
|
|
8
|
-
render(): JSX.Element;
|
|
8
|
+
render(): React.JSX.Element;
|
|
9
9
|
context: any;
|
|
10
10
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & DataDependentComponentStateProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
11
11
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -30,7 +30,7 @@ export declare const configureDataDependentComponent: <TOwnProps extends {}>(Wra
|
|
|
30
30
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & DataDependentComponentStateProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
31
31
|
};
|
|
32
32
|
new (props: TOwnProps & DataDependentComponentStateProps, context: any): {
|
|
33
|
-
render(): JSX.Element;
|
|
33
|
+
render(): React.JSX.Element;
|
|
34
34
|
context: any;
|
|
35
35
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & DataDependentComponentStateProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
36
36
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -14,7 +14,7 @@ export declare type EntityComponentWrappedProps<T extends DeletableModel, TProp
|
|
|
14
14
|
};
|
|
15
15
|
export declare const configureEntityComponent: <T extends DeletableModel, TPropName extends string | number | symbol>(WrappedComponent: React.ComponentType<EntityComponentWrappedProps<T, TPropName>>, WrappedHeader: React.ComponentClass<EntityComponentWrappedHeaderProps<T, TPropName>, any> | React.FunctionComponent<EntityComponentWrappedHeaderProps<T, TPropName>> | undefined, propName: TPropName, entityName: string) => {
|
|
16
16
|
new (props: EntityComponentProps<T> | Readonly<EntityComponentProps<T>>): {
|
|
17
|
-
render(): JSX.Element;
|
|
17
|
+
render(): React.JSX.Element;
|
|
18
18
|
context: any;
|
|
19
19
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<EntityComponentProps<T>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
20
20
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -39,7 +39,7 @@ export declare const configureEntityComponent: <T extends DeletableModel, TPropN
|
|
|
39
39
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<EntityComponentProps<T>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
40
40
|
};
|
|
41
41
|
new (props: EntityComponentProps<T>, context: any): {
|
|
42
|
-
render(): JSX.Element;
|
|
42
|
+
render(): React.JSX.Element;
|
|
43
43
|
context: any;
|
|
44
44
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<EntityComponentProps<T>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
45
45
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -33,7 +33,7 @@ export declare function configureFullscreenModalComponent<TOwnProps extends Full
|
|
|
33
33
|
disableScroll: (e: Event) => boolean;
|
|
34
34
|
onOpen: () => void;
|
|
35
35
|
closeModal: () => void;
|
|
36
|
-
render(): JSX.Element;
|
|
36
|
+
render(): React.JSX.Element;
|
|
37
37
|
context: any;
|
|
38
38
|
setState<K extends "isOpen">(state: FullscreenModalState | ((prevState: Readonly<FullscreenModalState>, props: Readonly<TOwnProps & ConnectedModalWrappedProps & GuidComponentWrappedProps>) => FullscreenModalState | Pick<FullscreenModalState, K> | null) | Pick<FullscreenModalState, K> | null, callback?: (() => void) | undefined): void;
|
|
39
39
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -7,7 +7,7 @@ export interface ModelContextDependencyVerifyComponentProps {
|
|
|
7
7
|
}
|
|
8
8
|
export declare function setupModelContextDependencyVerifyComponent<TOwnProps extends ModelContextDependencyVerifyComponentProps>(WrappedComponent: ComponentType<TOwnProps>, modelName: string, dependentModelName: string): {
|
|
9
9
|
new (props: (TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>) | Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>): {
|
|
10
|
-
render(): JSX.Element;
|
|
10
|
+
render(): React.JSX.Element;
|
|
11
11
|
context: any;
|
|
12
12
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
13
13
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -32,7 +32,7 @@ export declare function setupModelContextDependencyVerifyComponent<TOwnProps ext
|
|
|
32
32
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
33
33
|
};
|
|
34
34
|
new (props: TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, context: any): {
|
|
35
|
-
render(): JSX.Element;
|
|
35
|
+
render(): React.JSX.Element;
|
|
36
36
|
context: any;
|
|
37
37
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
38
38
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -67,7 +67,7 @@ export declare function setupModelContextDependencyVerifyComponent<TOwnProps ext
|
|
|
67
67
|
*/
|
|
68
68
|
export default function modelContextDependencyVerifyComponent<TOwnProps extends ModelContextDependencyVerifyComponentProps>(WrappedComponent: ComponentType<TOwnProps>, modelName: string, dependentModelName: string): React.ComponentClass<import("react-router").Omit<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, "match" | "location" | "history" | "staticContext"> & import("react-router").WithRouterProps<{
|
|
69
69
|
new (props: (TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>) | Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>): {
|
|
70
|
-
render(): JSX.Element;
|
|
70
|
+
render(): React.JSX.Element;
|
|
71
71
|
context: any;
|
|
72
72
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
73
73
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -92,7 +92,7 @@ export default function modelContextDependencyVerifyComponent<TOwnProps extends
|
|
|
92
92
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
93
93
|
};
|
|
94
94
|
new (props: TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, context: any): {
|
|
95
|
-
render(): JSX.Element;
|
|
95
|
+
render(): React.JSX.Element;
|
|
96
96
|
context: any;
|
|
97
97
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
98
98
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -119,7 +119,7 @@ export default function modelContextDependencyVerifyComponent<TOwnProps extends
|
|
|
119
119
|
contextType?: React.Context<any> | undefined;
|
|
120
120
|
}>, any> & import("react-router").WithRouterStatics<{
|
|
121
121
|
new (props: (TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>) | Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>): {
|
|
122
|
-
render(): JSX.Element;
|
|
122
|
+
render(): React.JSX.Element;
|
|
123
123
|
context: any;
|
|
124
124
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
125
125
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -144,7 +144,7 @@ export default function modelContextDependencyVerifyComponent<TOwnProps extends
|
|
|
144
144
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>, nextState: Readonly<{}>, nextContext: any): void;
|
|
145
145
|
};
|
|
146
146
|
new (props: TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>, context: any): {
|
|
147
|
-
render(): JSX.Element;
|
|
147
|
+
render(): React.JSX.Element;
|
|
148
148
|
context: any;
|
|
149
149
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & RouteComponentProps<{}, import("react-router").StaticContext, unknown>>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
150
150
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -16,7 +16,7 @@ import { CollectionItemComponentWrappedProps } from './CollectionItemComponent';
|
|
|
16
16
|
*/
|
|
17
17
|
export default function modelErrorRedirectComponent<TOwnProps extends CollectionItemComponentWrappedProps<Model> | CollectionComponentWrappedProps<Model>>(WrappedComponent: ComponentType<TOwnProps>): {
|
|
18
18
|
new (props: TOwnProps | Readonly<TOwnProps>): {
|
|
19
|
-
render(): JSX.Element;
|
|
19
|
+
render(): React.JSX.Element;
|
|
20
20
|
context: any;
|
|
21
21
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
22
22
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -41,7 +41,7 @@ export default function modelErrorRedirectComponent<TOwnProps extends Collection
|
|
|
41
41
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
42
42
|
};
|
|
43
43
|
new (props: TOwnProps, context: any): {
|
|
44
|
-
render(): JSX.Element;
|
|
44
|
+
render(): React.JSX.Element;
|
|
45
45
|
context: any;
|
|
46
46
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
47
47
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -46,6 +46,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
46
46
|
var react_1 = __importStar(require("react"));
|
|
47
47
|
var react_router_dom_1 = require("react-router-dom");
|
|
48
48
|
var modelStatus_1 = require("../../constants/modelStatus");
|
|
49
|
+
var types_1 = require("../../types");
|
|
49
50
|
/**
|
|
50
51
|
* This component exists as a child to CollectionItemComponent to
|
|
51
52
|
* redirect the user to a 404/500 page if errors occur while fetching data.
|
|
@@ -71,13 +72,13 @@ function modelErrorRedirectComponent(WrappedComponent) {
|
|
|
71
72
|
model._metadata &&
|
|
72
73
|
model._metadata.hasError &&
|
|
73
74
|
model._metadata.lastFetchErrorData &&
|
|
74
|
-
model._metadata.lastFetchErrorData.
|
|
75
|
+
model._metadata.lastFetchErrorData.status === types_1.HTTP_STATUS_CODE.NOT_FOUND;
|
|
75
76
|
var errorRoute = previousModelStatus === modelStatus_1.MODEL_STATUS.UNINITIALIZED &&
|
|
76
77
|
modelStatus === modelStatus_1.MODEL_STATUS.ERROR &&
|
|
77
78
|
model._metadata &&
|
|
78
79
|
model._metadata.hasError &&
|
|
79
80
|
model._metadata.lastFetchErrorData &&
|
|
80
|
-
model._metadata.lastFetchErrorData.
|
|
81
|
+
model._metadata.lastFetchErrorData.status === types_1.HTTP_STATUS_CODE.INTERNAL_SERVER_ERROR;
|
|
81
82
|
if (notFoundRoute) {
|
|
82
83
|
var pathname = window.location.pathname;
|
|
83
84
|
return (react_1.default.createElement(react_router_dom_1.Redirect, { to: {
|
|
@@ -200,7 +200,7 @@ var configureMapDispatchToProps = function (key) { return function (dispatch) {
|
|
|
200
200
|
var dispatchPersistSearch = function (search) {
|
|
201
201
|
var _a;
|
|
202
202
|
dispatch({
|
|
203
|
-
type: actions_1.
|
|
203
|
+
type: actions_1.SEARCH_ACTION_TYPE.PERSIST_SEARCH,
|
|
204
204
|
data: (_a = {},
|
|
205
205
|
_a["" + key] = search,
|
|
206
206
|
_a)
|
|
@@ -6,7 +6,7 @@ interface UnauthenticatedComponentStateProps {
|
|
|
6
6
|
}
|
|
7
7
|
export declare const configureUnauthenticatedComponent: <TOwnProps extends {}>(WrappedComponent: React.ComponentType<TOwnProps>) => {
|
|
8
8
|
new (props: (TOwnProps & UnauthenticatedComponentStateProps) | Readonly<TOwnProps & UnauthenticatedComponentStateProps>): {
|
|
9
|
-
render(): JSX.Element;
|
|
9
|
+
render(): React.JSX.Element;
|
|
10
10
|
context: any;
|
|
11
11
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & UnauthenticatedComponentStateProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
12
12
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -31,7 +31,7 @@ export declare const configureUnauthenticatedComponent: <TOwnProps extends {}>(W
|
|
|
31
31
|
UNSAFE_componentWillUpdate?(nextProps: Readonly<TOwnProps & UnauthenticatedComponentStateProps>, nextState: Readonly<{}>, nextContext: any): void;
|
|
32
32
|
};
|
|
33
33
|
new (props: TOwnProps & UnauthenticatedComponentStateProps, context: any): {
|
|
34
|
-
render(): JSX.Element;
|
|
34
|
+
render(): React.JSX.Element;
|
|
35
35
|
context: any;
|
|
36
36
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<TOwnProps & UnauthenticatedComponentStateProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
37
37
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
@@ -9,5 +9,5 @@ export interface CreateNonLtiGroupAlertDialogProps extends Omit<AlertDialogProps
|
|
|
9
9
|
}
|
|
10
10
|
export declare const CreateNonLtiGroupAlertDialog: FunctionComponent<CreateNonLtiGroupAlertDialogProps>;
|
|
11
11
|
export declare const mapStateToProps: (state: BaseReduxState) => CreateNonLtiGroupAlertDialogReduxProps;
|
|
12
|
-
declare const _default: import("react-redux").ConnectedComponent<React.FunctionComponent<CreateNonLtiGroupAlertDialogProps>, Pick<CreateNonLtiGroupAlertDialogProps
|
|
12
|
+
declare const _default: import("react-redux").ConnectedComponent<React.FunctionComponent<CreateNonLtiGroupAlertDialogProps>, Pick<React.PropsWithChildren<CreateNonLtiGroupAlertDialogProps>, "description" | "id" | "children" | "onCancel" | "isOpen" | "onProceed" | "proceedText" | "cancelText" | "hideCancel" | "onDestroy" | "destroyText" | "manualBackground" | "externalHelpResourcePageUrl">>;
|
|
13
13
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Column, SortingRule } from 'react-table';
|
|
3
3
|
import { Model, Search } from '../types';
|
|
4
4
|
export interface ManageTableProps<TModel, TSearchDataParams> {
|
|
@@ -16,4 +16,4 @@ export interface ManageTableProps<TModel, TSearchDataParams> {
|
|
|
16
16
|
entityName: string;
|
|
17
17
|
canQueryAll?: boolean;
|
|
18
18
|
}
|
|
19
|
-
export declare const ManageTable: <TModel extends Model, TSearchDataParams extends {}>({ search: { hasSearched, queryAll, selectedTab, sortingRules, pageSize, pageByTab }, isFiltered, setSelectedTab, setSortingRules, setPageSize, setPage, tabs, getTabName, searchData, searchDataParams, columns, entityName, canQueryAll }: ManageTableProps<TModel, TSearchDataParams>) => JSX.Element;
|
|
19
|
+
export declare const ManageTable: <TModel extends Model, TSearchDataParams extends {}>({ search: { hasSearched, queryAll, selectedTab, sortingRules, pageSize, pageByTab }, isFiltered, setSelectedTab, setSortingRules, setPageSize, setPage, tabs, getTabName, searchData, searchDataParams, columns, entityName, canQueryAll }: ManageTableProps<TModel, TSearchDataParams>) => React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component, ComponentClass } from 'react';
|
|
1
|
+
import React, { Component, ComponentClass } from 'react';
|
|
2
2
|
import { RouteComponentProps } from 'react-router-dom';
|
|
3
3
|
import { BaseReduxState } from '../types';
|
|
4
4
|
import { Client } from '../types/Client';
|
|
@@ -11,7 +11,7 @@ export declare class NewVersionAlert extends Component<NewVersionAlertProps & Ro
|
|
|
11
11
|
componentDidUpdate(prevProps: NewVersionAlertProps & RouteComponentProps): void;
|
|
12
12
|
hasVersionUpdate: () => boolean;
|
|
13
13
|
refresh: () => void;
|
|
14
|
-
render(): JSX.Element;
|
|
14
|
+
render(): React.JSX.Element;
|
|
15
15
|
}
|
|
16
16
|
export declare const mapStateToProps: (state: BaseReduxState) => NewVersionAlertProps;
|
|
17
17
|
declare const connectedNewVersionAlert: ComponentClass;
|
|
@@ -26,7 +26,7 @@ export declare class Notifications extends Component<NotificationsProps, Notific
|
|
|
26
26
|
closeNotification: () => void;
|
|
27
27
|
removeNotification: () => void;
|
|
28
28
|
classNameForType: (type: NOTIFICATION_TYPE) => "alert-info" | "alert-success" | "alert-warning" | "alert-danger";
|
|
29
|
-
render(): JSX.Element;
|
|
29
|
+
render(): React.JSX.Element;
|
|
30
30
|
}
|
|
31
31
|
export declare const mapStateToProps: (state: {
|
|
32
32
|
notifications: NotificationState;
|
|
@@ -112,7 +112,8 @@ var Notifications = /** @class */ (function (_super) {
|
|
|
112
112
|
if (!notification) {
|
|
113
113
|
return;
|
|
114
114
|
}
|
|
115
|
-
actionCreator_1.dispatchAction(
|
|
115
|
+
actionCreator_1.dispatchAction({
|
|
116
|
+
type: actions_1.NOTIFICATION_ACTION_TYPE.REMOVE_NOTIFICATION,
|
|
116
117
|
notification: notification
|
|
117
118
|
});
|
|
118
119
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Filter } from 'react-table';
|
|
3
3
|
import { UserRole } from '../../types';
|
|
4
4
|
export declare enum ROLE_FILTER {
|
|
@@ -9,6 +9,6 @@ export declare enum ROLE_FILTER {
|
|
|
9
9
|
export declare const RoleFilter: (roles: string[], textForRole?: ((role: string) => string) | undefined, hasExternal?: boolean | undefined) => ({ filter, onChange }: {
|
|
10
10
|
filter: Filter;
|
|
11
11
|
onChange: any;
|
|
12
|
-
}) => JSX.Element;
|
|
12
|
+
}) => React.JSX.Element;
|
|
13
13
|
export declare const roleUserRoleFilterMethod: (filter: Filter, userRole: UserRole) => boolean;
|
|
14
14
|
export declare const roleFilterMethod: (filter: Filter, row: any) => boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { Filter } from 'react-table';
|
|
3
3
|
export declare const TextFilter: ({ filter, onChange }: {
|
|
4
4
|
filter: Filter;
|
|
5
5
|
onChange: any;
|
|
6
|
-
}) => JSX.Element;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
7
|
export declare const textFilterMethod: (filter: Filter, row: any) => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Component } from 'react';
|
|
1
|
+
import React, { Component } from 'react';
|
|
2
2
|
import { RoleDescriptions } from '../../types';
|
|
3
3
|
export interface UserRolesAddProps {
|
|
4
4
|
id: string;
|
|
@@ -26,6 +26,6 @@ export declare class UserRolesAdd extends Component<UserRolesAddProps, UserRoles
|
|
|
26
26
|
closeErrorAlert: () => void;
|
|
27
27
|
updateIdentifiers: (e: any) => void;
|
|
28
28
|
getValidationErrorMessage: (identifiers?: string[] | undefined) => string | undefined;
|
|
29
|
-
render(): JSX.Element;
|
|
29
|
+
render(): React.JSX.Element;
|
|
30
30
|
}
|
|
31
31
|
export {};
|