studiokit-scaffolding-js 5.2.0 → 6.0.0
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/Dropdowns/GroupsDropdown.d.ts +1 -1
- package/lib/components/Dropdowns/GroupsDropdown.js +1 -2
- package/lib/components/Dropdowns/UserDropdown.js +1 -1
- package/lib/components/Groups/ExternalGroups/Attach.js +3 -3
- package/lib/components/HOC/CollectionComponent.d.ts +2 -2
- package/lib/components/HOC/CollectionComponent.js +1 -2
- package/lib/components/HOC/CollectionFirstItemComponent.js +1 -1
- package/lib/components/HOC/CollectionItemComponent.d.ts +1 -1
- package/lib/components/HOC/CollectionItemComponent.js +1 -2
- package/lib/components/HOC/ConnectedModalComponent.js +7 -2
- package/lib/components/HOC/ModelErrorRedirectComponent.js +3 -2
- package/lib/components/HOC/SearchPersistorComponent.js +1 -1
- package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +1 -1
- package/lib/components/Notifications.js +2 -1
- package/lib/components/UserRoles/index.d.ts +3 -3
- package/lib/components/UserRoles/index.js +15 -8
- 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/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/setupTests.js +16 -0
- 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/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 +3 -3
- 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/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/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
|
@@ -13,5 +13,5 @@ declare class GroupsDropdown extends Component<Props> {
|
|
|
13
13
|
renderGroupMenu: (groups: Group[]) => JSX.Element[] | null;
|
|
14
14
|
render(): 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) {
|
|
@@ -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"]);
|
|
@@ -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,
|
|
@@ -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;
|
|
@@ -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);
|
|
@@ -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
|
};
|
|
@@ -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;
|
|
@@ -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
|
|
@@ -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)
|
|
@@ -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<CreateNonLtiGroupAlertDialogProps, "description" | "id" | "isOpen" | "onProceed" | "proceedText" | "onCancel" | "cancelText" | "hideCancel" | "onDestroy" | "destroyText" | "manualBackground" | "externalHelpResourcePageUrl">>;
|
|
13
13
|
export default _default;
|
|
@@ -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,5 +1,5 @@
|
|
|
1
1
|
import React, { Component } from 'react';
|
|
2
|
-
import { BaseReduxState, ExternalProvider,
|
|
2
|
+
import { BaseReduxState, ExternalProvider, FetchErrorData, Model, ModelCollection, RoleDescriptions, UserRole, UserWithRoles } from '../../types';
|
|
3
3
|
import { CollectionComponentWrappedProps } from '../HOC/CollectionComponent';
|
|
4
4
|
export interface UserRolesReduxProps {
|
|
5
5
|
/** Is the current user allowed to add, update, and delete user roles? */
|
|
@@ -96,7 +96,7 @@ export declare class UserRoles extends Component<UserRolesProps, UserRolesState>
|
|
|
96
96
|
textForRole: (role: string, lowercase?: boolean) => string;
|
|
97
97
|
singularArticleForRole: (role: string) => string;
|
|
98
98
|
addUserRoles: (identifiers: string[], role: string) => void;
|
|
99
|
-
didAdd: (data
|
|
99
|
+
didAdd: (data: AddBusinessModel | FetchErrorData | null) => void;
|
|
100
100
|
updateUserRole: (userRoleToUpdate: UserRole, newRole: string) => void;
|
|
101
101
|
didUpdate: (isSuccess: boolean) => void;
|
|
102
102
|
alertRemoveUserRole: (userRoleToRemove: UserRole) => void;
|
|
@@ -107,5 +107,5 @@ export declare class UserRoles extends Component<UserRolesProps, UserRolesState>
|
|
|
107
107
|
render(): JSX.Element;
|
|
108
108
|
}
|
|
109
109
|
export declare const mapStateToProps: (state: BaseReduxState, ownProps: UserRolesOwnProps) => UserRolesReduxProps;
|
|
110
|
-
declare const _default: import("react-redux").ConnectedComponent<typeof UserRoles, Pick<React.ClassAttributes<UserRoles> & UserRolesProps, "
|
|
110
|
+
declare const _default: import("react-redux").ConnectedComponent<typeof UserRoles, Pick<React.ClassAttributes<UserRoles> & UserRolesProps, "guid" | "ref" | "modelName" | "pathParams" | "queryParams" | "externalProviders" | "model" | "key" | "readOnly" | "entityName" | "load" | "modelStatus" | "disableAutoLoad" | "disableAutoLoadOnParamsChange" | "modelArray" | "stopPeriodicLoad" | "create" | "update" | "delete" | "previousModelStatus" | "fetchingId" | "textForRole" | "defaultRole" | "roleDescriptions" | "renderAddDescription" | "isUpdateDisabled" | "isDeleteDisabled" | "allowMultipleRoles" | "requiredRole" | "isAddDisabled" | "modifyUserRoleActivityName" | "deleteOwnUserRoleActivityName" | "addRoleExcludeList" | "entity" | "filterUsers" | "onAdd" | "onUpdate" | "onRemove" | "renderTableDescription" | "lowercaseTextForRole" | "singularArticleForRole"> & UserRolesOwnProps>;
|
|
111
111
|
export default _default;
|
|
@@ -42,16 +42,17 @@ var AlertDialog_1 = require("../../components/AlertDialog");
|
|
|
42
42
|
var Loading_1 = require("../../components/Loading");
|
|
43
43
|
var Add_1 = require("../../components/UserRoles/Add");
|
|
44
44
|
var Table_1 = require("../../components/UserRoles/Table");
|
|
45
|
+
var constants_1 = require("../../constants");
|
|
45
46
|
var baseRole_1 = require("../../constants/baseRole");
|
|
46
47
|
var modelStatus_1 = require("../../constants/modelStatus");
|
|
47
48
|
var actionCreator_1 = require("../../redux/actionCreator");
|
|
48
49
|
var actions_1 = require("../../redux/actions");
|
|
49
|
-
var fetchSaga_1 = require("../../redux/sagas/fetchSaga");
|
|
50
50
|
var noStoreSaga_1 = require("../../redux/sagas/noStoreSaga");
|
|
51
51
|
var baseActivity_1 = require("../../utils/baseActivity");
|
|
52
52
|
var baseRole_2 = require("../../utils/baseRole");
|
|
53
53
|
var domainIdentifier_1 = require("../../utils/domainIdentifier");
|
|
54
54
|
var entityUserRole_1 = require("../../utils/entityUserRole");
|
|
55
|
+
var fetch_1 = require("../../utils/fetch");
|
|
55
56
|
var sort_1 = require("../../utils/sort");
|
|
56
57
|
var user_1 = require("../../utils/user");
|
|
57
58
|
var userRole_1 = require("../../utils/userRole");
|
|
@@ -126,7 +127,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
126
127
|
_this.didAdd(data);
|
|
127
128
|
});
|
|
128
129
|
var rootModelName = entityUserRole_1.getRootModelName(_this.props);
|
|
129
|
-
actionCreator_1.
|
|
130
|
+
actionCreator_1.dispatchModelFetchRequest({
|
|
130
131
|
modelName: (rootModelName ? rootModelName + "." : '') + "addUserRoles",
|
|
131
132
|
pathParams: entity ? [entity.id] : undefined,
|
|
132
133
|
body: {
|
|
@@ -144,7 +145,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
144
145
|
if (!roleForAdd || !identifiersToAdd || identifiersToAdd.length === 0) {
|
|
145
146
|
throw new Error('didAdd was called in the incorrect state');
|
|
146
147
|
}
|
|
147
|
-
if (!data || data
|
|
148
|
+
if (!data || fetch_1.isFetchErrorData(data)) {
|
|
148
149
|
var failMessage_1 = "The following identifiers were not added" + (entityName ? " to your " + entityName : '') + ":\r\n" + identifiersToAdd.join('\r\n');
|
|
149
150
|
_this.setState({
|
|
150
151
|
shouldResetAddForm: true,
|
|
@@ -155,7 +156,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
155
156
|
});
|
|
156
157
|
return;
|
|
157
158
|
}
|
|
158
|
-
var
|
|
159
|
+
var addedUserRoles = data.addedUserRoles, existingUserRoles = data.existingUserRoles, blockedUserRoles = data.blockedUserRoles, invalidIdentifiers = data.invalidIdentifiers, allowedDomains = data.allowedDomains, invalidDomainIdentifiers = data.invalidDomainIdentifiers;
|
|
159
160
|
var roleString = _this.textForRole(roleForAdd, true);
|
|
160
161
|
var singularArticleString = _this.singularArticleForRole(roleForAdd);
|
|
161
162
|
var addedNames = !!addedUserRoles && addedUserRoles.length > 0
|
|
@@ -207,9 +208,15 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
207
208
|
// update redux with added userRoles
|
|
208
209
|
var updatedModel_1 = lodash_1.cloneDeep(model);
|
|
209
210
|
addedUserRoles.forEach(function (userRole) { return (updatedModel_1[userRole.id] = lodash_1.cloneDeep(userRole)); });
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
211
|
+
// create a dummy action and call `prepareFetch` to get the final `modelPath`
|
|
212
|
+
var modelPath = fetch_1.prepareFetch({
|
|
213
|
+
type: actions_1.MODEL_FETCH_REQUEST_ACTION_TYPE.FETCH_REQUEST,
|
|
214
|
+
modelName: modelName,
|
|
215
|
+
pathParams: pathParams
|
|
216
|
+
}, constants_1.getEndpointMappings()).modelPath;
|
|
217
|
+
actionCreator_1.dispatchAction({
|
|
218
|
+
type: actions_1.MODEL_FETCH_RESULT_ACTION_TYPE.FETCH_RESULT_RECEIVED,
|
|
219
|
+
modelPath: modelPath,
|
|
213
220
|
data: updatedModel_1
|
|
214
221
|
});
|
|
215
222
|
if (onAdd) {
|
|
@@ -228,7 +235,7 @@ var UserRoles = /** @class */ (function (_super) {
|
|
|
228
235
|
failMessage: undefined
|
|
229
236
|
});
|
|
230
237
|
_this.props.update({
|
|
231
|
-
id: userRoleToUpdate.id
|
|
238
|
+
id: userRoleToUpdate.id,
|
|
232
239
|
body: {},
|
|
233
240
|
queryParams: {
|
|
234
241
|
roleName: newRole
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.networkOfflineErrorData = exports.unknownErrorData = void 0;
|
|
4
|
+
var __1 = require("..");
|
|
5
|
+
exports.unknownErrorData = {
|
|
6
|
+
status: __1.CUSTOM_ERROR_STATUS_CODE.UNKNOWN,
|
|
7
|
+
title: 'Unknown Error',
|
|
8
|
+
detail: 'An unknown error has occurred.'
|
|
9
|
+
};
|
|
10
|
+
exports.networkOfflineErrorData = {
|
|
11
|
+
status: __1.CUSTOM_ERROR_STATUS_CODE.NO_NETWORK_CONNECTION,
|
|
12
|
+
title: 'Network Offline',
|
|
13
|
+
detail: 'There is no network connection.'
|
|
14
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AppConfiguration, ExternalProvider, ExternalTerm, Group, GroupUserRole, ModelCollection, SimpleLocation, UserInfo, UserRole } from '../types';
|
|
1
|
+
import { AppConfiguration, ExternalProvider, ExternalTerm, FetchErrorData, Group, GroupUserRole, ModelCollection, SimpleLocation, UserInfo, UserRole } from '../types';
|
|
2
2
|
export declare const defaultAppConfiguration: AppConfiguration;
|
|
3
3
|
export declare const defaultLocation: SimpleLocation;
|
|
4
4
|
export declare function mockHistory(): History;
|
|
@@ -31,6 +31,7 @@ export declare const defaultNamelessUserInfo: {
|
|
|
31
31
|
dateDemoGenerationSucceeded: string | null;
|
|
32
32
|
dateStored: string;
|
|
33
33
|
dateLastUpdated: string;
|
|
34
|
+
/** 5/15/18 - 8/14/18 */
|
|
34
35
|
isImpersonated: boolean;
|
|
35
36
|
lockDownBrowserTestLaunchUrl: string | null;
|
|
36
37
|
id: string;
|
|
@@ -52,6 +53,7 @@ export declare const defaultNamedUserInfo: {
|
|
|
52
53
|
dateDemoGenerationSucceeded: string | null;
|
|
53
54
|
dateStored: string;
|
|
54
55
|
dateLastUpdated: string;
|
|
56
|
+
/** 5/15/18 - 8/14/18 */
|
|
55
57
|
isImpersonated: boolean;
|
|
56
58
|
lockDownBrowserTestLaunchUrl: string | null;
|
|
57
59
|
id: string;
|
|
@@ -81,3 +83,9 @@ export declare function mockPastGroups(activities?: string[], roles?: string[]):
|
|
|
81
83
|
export declare function mockPastAndCurrentGroups(activities?: string[], roles?: string[]): ModelCollection<Group>;
|
|
82
84
|
export declare const defaultExternalProviders: ModelCollection<ExternalProvider>;
|
|
83
85
|
export declare const defaultExternalTerms: ModelCollection<ExternalTerm>;
|
|
86
|
+
export declare const internalServerErrorData: FetchErrorData;
|
|
87
|
+
export declare const requestTimedOutErrorData: FetchErrorData;
|
|
88
|
+
export declare const forbiddenErrorData: FetchErrorData;
|
|
89
|
+
export declare const unauthorizedErrorData: FetchErrorData;
|
|
90
|
+
export declare const badRequestErrorData: FetchErrorData;
|
|
91
|
+
export declare const badRequestFullErrorData: FetchErrorData;
|
|
@@ -11,9 +11,10 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.defaultExternalTerms = exports.defaultExternalProviders = exports.mockPastAndCurrentGroups = exports.mockPastGroups = exports.mockTermAndUniTimeGroups = exports.mockTermGroups = exports.mockLtiGroups = exports.mockSyncedGroups = exports.mockGroups = exports.defaultGroup = exports.defaultAdminUserRoles = exports.defaultGroupUserRoles = exports.defaultGroupGrader = exports.defaultExternalGroupLearner = exports.defaultGroupLearner = exports.defaultNamedGroupLearner = exports.defaultNamelessGroupLearner = exports.defaultGroupOwner = exports.defaultGroupOwnerUserInfo = exports.mockUser = exports.defaultNamedUserInfo = exports.defaultNamelessUserInfo = exports.defaultUser = exports.defaultDate = exports.currentDates = exports.pastDates = exports.mockHistory = exports.defaultLocation = exports.defaultAppConfiguration = void 0;
|
|
14
|
+
exports.badRequestFullErrorData = exports.badRequestErrorData = exports.unauthorizedErrorData = exports.forbiddenErrorData = exports.requestTimedOutErrorData = exports.internalServerErrorData = exports.defaultExternalTerms = exports.defaultExternalProviders = exports.mockPastAndCurrentGroups = exports.mockPastGroups = exports.mockTermAndUniTimeGroups = exports.mockTermGroups = exports.mockLtiGroups = exports.mockSyncedGroups = exports.mockGroups = exports.defaultGroup = exports.defaultAdminUserRoles = exports.defaultGroupUserRoles = exports.defaultGroupGrader = exports.defaultExternalGroupLearner = exports.defaultGroupLearner = exports.defaultNamedGroupLearner = exports.defaultNamelessGroupLearner = exports.defaultGroupOwner = exports.defaultGroupOwnerUserInfo = exports.mockUser = exports.defaultNamedUserInfo = exports.defaultNamelessUserInfo = exports.defaultUser = exports.defaultDate = exports.currentDates = exports.pastDates = exports.mockHistory = exports.defaultLocation = exports.defaultAppConfiguration = void 0;
|
|
15
15
|
var lodash_1 = require("lodash");
|
|
16
16
|
var externalProviderType_1 = require("../constants/externalProviderType");
|
|
17
|
+
var types_1 = require("../types");
|
|
17
18
|
var baseRole_1 = require("./baseRole");
|
|
18
19
|
var tier_1 = require("./tier");
|
|
19
20
|
//#region General
|
|
@@ -335,3 +336,42 @@ exports.defaultExternalTerms = {
|
|
|
335
336
|
}
|
|
336
337
|
};
|
|
337
338
|
//#endregion ExternalTerms + ExternalProviders
|
|
339
|
+
//#region FetchErrorData
|
|
340
|
+
exports.internalServerErrorData = {
|
|
341
|
+
status: types_1.HTTP_STATUS_CODE.INTERNAL_SERVER_ERROR,
|
|
342
|
+
title: 'Error',
|
|
343
|
+
detail: 'An error has occurred.'
|
|
344
|
+
};
|
|
345
|
+
exports.requestTimedOutErrorData = {
|
|
346
|
+
status: types_1.HTTP_STATUS_CODE.REQUEST_TIMEOUT,
|
|
347
|
+
title: 'Request Timeout',
|
|
348
|
+
detail: null
|
|
349
|
+
};
|
|
350
|
+
exports.forbiddenErrorData = {
|
|
351
|
+
status: types_1.HTTP_STATUS_CODE.FORBIDDEN,
|
|
352
|
+
title: 'Forbidden',
|
|
353
|
+
detail: 'Your request has been denied. You do not have access.'
|
|
354
|
+
};
|
|
355
|
+
exports.unauthorizedErrorData = {
|
|
356
|
+
status: types_1.HTTP_STATUS_CODE.UNAUTHORIZED,
|
|
357
|
+
title: 'Unauthorized',
|
|
358
|
+
detail: 'Your request is unauthorized. You must authenticate.'
|
|
359
|
+
};
|
|
360
|
+
exports.badRequestErrorData = {
|
|
361
|
+
status: types_1.HTTP_STATUS_CODE.BAD_REQUEST,
|
|
362
|
+
title: 'Bad Request',
|
|
363
|
+
detail: 'Reasons'
|
|
364
|
+
};
|
|
365
|
+
exports.badRequestFullErrorData = {
|
|
366
|
+
status: types_1.HTTP_STATUS_CODE.BAD_REQUEST,
|
|
367
|
+
title: 'Bad Request',
|
|
368
|
+
detail: 'Reasons',
|
|
369
|
+
// include all optional properties
|
|
370
|
+
type: 'https://tools.ietf.org/html/rfc7231#section-6.5.1',
|
|
371
|
+
instance: 'instance',
|
|
372
|
+
traceId: '00-3914b43b452b94e3ff4c327922880a03-4cfed6fe42afdd8f-00',
|
|
373
|
+
errors: {
|
|
374
|
+
password: ['The Password must be at least 6 characters long.']
|
|
375
|
+
}
|
|
376
|
+
};
|
|
377
|
+
//#endregion FetchErrorData
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { EndpointMapping, EndpointMappings } from './types';
|
|
2
2
|
export declare const entityUserRoleEndpointMappings: (endpointName: string) => EndpointMappings;
|
|
3
3
|
export declare const groupEndpointMapping: EndpointMapping;
|
|
4
|
-
export declare const authEndpointMappings: EndpointMappings;
|
|
5
4
|
export declare const endpointMappings: EndpointMappings;
|
package/lib/endpointMappings.js
CHANGED
|
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
14
|
-
exports.endpointMappings = exports.
|
|
14
|
+
exports.endpointMappings = exports.groupEndpointMapping = exports.entityUserRoleEndpointMappings = void 0;
|
|
15
15
|
var entityUserRoleEndpointMappings = function (endpointName) {
|
|
16
16
|
var _a;
|
|
17
17
|
return _a = {},
|
|
@@ -47,7 +47,7 @@ exports.groupEndpointMapping = __assign({ _config: {
|
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
49
|
} }, exports.entityUserRoleEndpointMappings('groupUserRoles'));
|
|
50
|
-
exports.
|
|
50
|
+
exports.endpointMappings = {
|
|
51
51
|
codeFromLocalCredentials: {
|
|
52
52
|
_config: {
|
|
53
53
|
fetch: {
|
|
@@ -59,13 +59,13 @@ exports.authEndpointMappings = {
|
|
|
59
59
|
codeFromCasV1: {
|
|
60
60
|
_config: {
|
|
61
61
|
fetch: {
|
|
62
|
-
path: '/api/account/
|
|
62
|
+
path: '/api/account/casV1',
|
|
63
63
|
method: 'POST'
|
|
64
64
|
}
|
|
65
65
|
}
|
|
66
66
|
},
|
|
67
67
|
codeFromCasTicket: {
|
|
68
|
-
_config: { fetch: { path: '/api/
|
|
68
|
+
_config: { fetch: { path: '/api/account/validateCasTicket' } }
|
|
69
69
|
},
|
|
70
70
|
getToken: {
|
|
71
71
|
_config: {
|
|
@@ -80,11 +80,9 @@ exports.authEndpointMappings = {
|
|
|
80
80
|
},
|
|
81
81
|
user: {
|
|
82
82
|
userInfo: {
|
|
83
|
-
_config: { fetch: { path: '/api/
|
|
83
|
+
_config: { fetch: { path: '/api/account/userInfo' } }
|
|
84
84
|
}
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
exports.endpointMappings = {
|
|
85
|
+
},
|
|
88
86
|
urlChecker: {
|
|
89
87
|
_config: {
|
|
90
88
|
fetch: {
|
|
@@ -14,9 +14,6 @@ function useCollection(props) {
|
|
|
14
14
|
if (params === void 0) { params = {}; }
|
|
15
15
|
collection_1.loadCollection(methodConfig, params);
|
|
16
16
|
}, [methodConfig]);
|
|
17
|
-
var stopPeriodicLoad = react_1.useCallback(function (taskId) {
|
|
18
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
19
|
-
}, [modelName]);
|
|
20
17
|
var create = react_1.useCallback(function (params) {
|
|
21
18
|
collection_1.createItemInCollection(methodConfig, params);
|
|
22
19
|
}, [methodConfig]);
|
|
@@ -63,7 +60,7 @@ function useCollection(props) {
|
|
|
63
60
|
previousModelStatus: previousModelStatus,
|
|
64
61
|
fetchingId: fetchingId,
|
|
65
62
|
load: load,
|
|
66
|
-
stopPeriodicLoad:
|
|
63
|
+
stopPeriodicLoad: collection_1.stopCollectionPeriodicLoad,
|
|
67
64
|
create: create,
|
|
68
65
|
update: update,
|
|
69
66
|
delete: deleteItem
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Dictionary } from 'lodash';
|
|
3
2
|
import { CollectionCommonProps, CollectionCommonState, CollectionMethodConfiguration, CollectionSelectorMethod, Model, ModelCollection } from '../types';
|
|
4
3
|
/** Configuration returned by `useCollectionConfiguration` for use in `useCollection` and `useCollectionItem` */
|
|
5
4
|
export interface CollectionConfiguration<TModel extends Model> extends CollectionCommonState {
|
|
@@ -9,10 +8,10 @@ export interface CollectionConfiguration<TModel extends Model> extends Collectio
|
|
|
9
8
|
modelArray?: TModel[];
|
|
10
9
|
modelMinusRelations?: Partial<TModel>;
|
|
11
10
|
previousModel: TModel | ModelCollection<TModel>;
|
|
12
|
-
pathParams: string
|
|
13
|
-
previousPathParams: string
|
|
14
|
-
queryParams?:
|
|
15
|
-
previousQueryParams?:
|
|
11
|
+
pathParams: Array<string | number>;
|
|
12
|
+
previousPathParams: Array<string | number>;
|
|
13
|
+
queryParams?: Record<string, string | number | boolean>;
|
|
14
|
+
previousQueryParams?: Record<string, string | number | boolean>;
|
|
16
15
|
methodConfig: CollectionMethodConfiguration;
|
|
17
16
|
isInitialized: boolean;
|
|
18
17
|
setIsInitialized: (value: React.SetStateAction<boolean>) => void;
|
|
@@ -14,9 +14,6 @@ function useCollectionItem(props) {
|
|
|
14
14
|
if (params === void 0) { params = {}; }
|
|
15
15
|
collection_1.loadCollectionItem(methodConfig, params);
|
|
16
16
|
}, [methodConfig]);
|
|
17
|
-
var stopPeriodicLoad = react_1.useCallback(function (taskId) {
|
|
18
|
-
collection_1.stopCollectionPeriodicLoad(modelName, taskId);
|
|
19
|
-
}, [modelName]);
|
|
20
17
|
var create = react_1.useCallback(function (params) {
|
|
21
18
|
collection_1.createCollectionItem(model, methodConfig, params);
|
|
22
19
|
}, [model, methodConfig]);
|
|
@@ -56,7 +53,7 @@ function useCollectionItem(props) {
|
|
|
56
53
|
modelStatus: modelStatus,
|
|
57
54
|
previousModelStatus: previousModelStatus,
|
|
58
55
|
load: load,
|
|
59
|
-
stopPeriodicLoad:
|
|
56
|
+
stopPeriodicLoad: collection_1.stopCollectionPeriodicLoad,
|
|
60
57
|
create: create,
|
|
61
58
|
update: update,
|
|
62
59
|
delete: deleteItem
|
package/lib/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export * from './constants';
|
|
2
2
|
export * from './types';
|
|
3
3
|
export * from './redux/actions';
|
|
4
|
+
export { dispatchAction, dispatchModelFetchRequest, dispatchPeriodicModelFetchRequest, dispatchPeriodicModelFetchTerminateAction, dispatchModelRemoveKeyAction, addNotification } from './redux/actionCreator';
|
|
4
5
|
export { default as configureStore } from './redux/configureStore';
|
|
5
6
|
export { setOtherDependentSagas } from './redux/sagas/rootSaga';
|
|
6
7
|
export { setOnPostLoginSaga } from './redux/sagas/postLoginDataSaga';
|
package/lib/index.js
CHANGED
|
@@ -13,10 +13,17 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
13
13
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
14
14
|
};
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.setConfigureModelsReducer = exports.setOtherReducers = exports.updatePersistBlacklist = exports.setOnPostLoginSaga = exports.setOtherDependentSagas = exports.configureStore = void 0;
|
|
16
|
+
exports.setConfigureModelsReducer = exports.setOtherReducers = exports.updatePersistBlacklist = exports.setOnPostLoginSaga = exports.setOtherDependentSagas = exports.configureStore = exports.addNotification = exports.dispatchModelRemoveKeyAction = exports.dispatchPeriodicModelFetchTerminateAction = exports.dispatchPeriodicModelFetchRequest = exports.dispatchModelFetchRequest = exports.dispatchAction = void 0;
|
|
17
17
|
__exportStar(require("./constants"), exports);
|
|
18
18
|
__exportStar(require("./types"), exports);
|
|
19
19
|
__exportStar(require("./redux/actions"), exports);
|
|
20
|
+
var actionCreator_1 = require("./redux/actionCreator");
|
|
21
|
+
Object.defineProperty(exports, "dispatchAction", { enumerable: true, get: function () { return actionCreator_1.dispatchAction; } });
|
|
22
|
+
Object.defineProperty(exports, "dispatchModelFetchRequest", { enumerable: true, get: function () { return actionCreator_1.dispatchModelFetchRequest; } });
|
|
23
|
+
Object.defineProperty(exports, "dispatchPeriodicModelFetchRequest", { enumerable: true, get: function () { return actionCreator_1.dispatchPeriodicModelFetchRequest; } });
|
|
24
|
+
Object.defineProperty(exports, "dispatchPeriodicModelFetchTerminateAction", { enumerable: true, get: function () { return actionCreator_1.dispatchPeriodicModelFetchTerminateAction; } });
|
|
25
|
+
Object.defineProperty(exports, "dispatchModelRemoveKeyAction", { enumerable: true, get: function () { return actionCreator_1.dispatchModelRemoveKeyAction; } });
|
|
26
|
+
Object.defineProperty(exports, "addNotification", { enumerable: true, get: function () { return actionCreator_1.addNotification; } });
|
|
20
27
|
var configureStore_1 = require("./redux/configureStore");
|
|
21
28
|
Object.defineProperty(exports, "configureStore", { enumerable: true, get: function () { return __importDefault(configureStore_1).default; } });
|
|
22
29
|
var rootSaga_1 = require("./redux/sagas/rootSaga");
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { Action, Store } from 'redux';
|
|
2
|
+
import { Notification } from '../types/Notification';
|
|
3
|
+
import { ModelFetchRequestAction, ModelRemoveKeyAction, PeriodicModelFetchRequestAction, PeriodicModelFetchTerminationAction } from './actions';
|
|
2
4
|
export declare const setStore: (storeParam: Store) => void;
|
|
3
|
-
export declare const dispatchAction: (
|
|
4
|
-
export declare const
|
|
5
|
+
export declare const dispatchAction: <A extends Action<any>>(action: A) => void;
|
|
6
|
+
export declare const dispatchModelFetchRequest: (action: Omit<ModelFetchRequestAction, 'type'>) => void;
|
|
7
|
+
export declare const dispatchPeriodicModelFetchRequest: (action: Omit<PeriodicModelFetchRequestAction, 'type'>) => void;
|
|
8
|
+
export declare const dispatchPeriodicModelFetchTerminateAction: (action: Omit<PeriodicModelFetchTerminationAction, 'type'>) => void;
|
|
9
|
+
export declare const dispatchModelRemoveKeyAction: (action: Omit<ModelRemoveKeyAction, 'type'>) => void;
|
|
10
|
+
export declare const addNotification: ({ text, type, modalId }: Omit<Notification, 'id'>) => void;
|