studiokit-scaffolding-js 7.0.14-alpha.1 → 7.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/ActionList.d.ts +2 -2
- package/lib/components/ActionList.js +166 -87
- package/lib/components/AlertDialog.d.ts +3 -3
- package/lib/components/AlertDialog.js +133 -18
- package/lib/components/AlertWithIcon.js +93 -52
- package/lib/components/ConnectedModal.d.ts +1 -2
- package/lib/components/ConnectedModal.js +41 -35
- package/lib/components/Dropdowns/GroupsDropdown.d.ts +4 -4
- package/lib/components/Dropdowns/GroupsDropdown.js +69 -82
- package/lib/components/Dropdowns/ManagedNavDropdown.d.ts +2 -2
- package/lib/components/Dropdowns/ManagedNavDropdown.js +96 -108
- package/lib/components/Dropdowns/UserDropdown.js +109 -70
- package/lib/components/Dropdowns/index.js +27 -11
- package/lib/components/EntityOwnerList.d.ts +3 -3
- package/lib/components/EntityOwnerList.js +52 -60
- package/lib/components/Error.js +107 -27
- package/lib/components/ErrorBoundary.js +133 -94
- package/lib/components/ErrorMessage.d.ts +2 -2
- package/lib/components/ErrorMessage.js +44 -14
- package/lib/components/Forms/DateField.d.ts +2 -2
- package/lib/components/Forms/DateField.js +63 -95
- package/lib/components/Forms/TimeField.d.ts +2 -2
- package/lib/components/Forms/TimeField.js +84 -108
- package/lib/components/Forms/index.js +27 -13
- package/lib/components/Groups/CreateEditCopySaveButtons.d.ts +2 -2
- package/lib/components/Groups/CreateEditCopySaveButtons.js +102 -14
- package/lib/components/Groups/ExternalGroups/Attach.d.ts +6 -7
- package/lib/components/Groups/ExternalGroups/Attach.js +213 -188
- package/lib/components/Groups/ExternalGroups/Table.js +183 -76
- package/lib/components/Groups/GroupCreateOrEditCommonProps.js +5 -1
- package/lib/components/Groups/RosterSyncInfo.js +140 -49
- package/lib/components/HOC/AccessibleAppComponent.d.ts +2 -2
- package/lib/components/HOC/AccessibleAppComponent.js +96 -119
- package/lib/components/HOC/ActivityRequiredComponent.d.ts +14 -14
- package/lib/components/HOC/ActivityRequiredComponent.js +72 -86
- package/lib/components/HOC/AsyncComponent.d.ts +9 -9
- package/lib/components/HOC/AsyncComponent.js +53 -129
- package/lib/components/HOC/AuthenticatedComponent.d.ts +4 -4
- package/lib/components/HOC/AuthenticatedComponent.js +59 -96
- package/lib/components/HOC/CollectionComponent.d.ts +12 -12
- package/lib/components/HOC/CollectionComponent.js +161 -161
- package/lib/components/HOC/CollectionFirstItemComponent.d.ts +13 -13
- package/lib/components/HOC/CollectionFirstItemComponent.js +49 -91
- package/lib/components/HOC/CollectionItemComponent.d.ts +9 -9
- package/lib/components/HOC/CollectionItemComponent.js +159 -158
- package/lib/components/HOC/ConnectedModalComponent.d.ts +9 -9
- package/lib/components/HOC/ConnectedModalComponent.js +96 -126
- package/lib/components/HOC/DataDependentComponent.d.ts +3 -55
- package/lib/components/HOC/DataDependentComponent.js +30 -79
- package/lib/components/HOC/EntityComponent.d.ts +13 -13
- package/lib/components/HOC/EntityComponent.js +63 -101
- package/lib/components/HOC/FullscreenModalComponent.d.ts +9 -9
- package/lib/components/HOC/FullscreenModalComponent.js +145 -165
- package/lib/components/HOC/GroupActivityRequiredComponent.d.ts +2 -2
- package/lib/components/HOC/GroupActivityRequiredComponent.js +32 -31
- package/lib/components/HOC/GuidComponent.d.ts +1 -1
- package/lib/components/HOC/GuidComponent.js +25 -64
- package/lib/components/HOC/ModelContextDependencyVerifyComponent.d.ts +28 -29
- package/lib/components/HOC/ModelContextDependencyVerifyComponent.js +36 -59
- package/lib/components/HOC/ModelErrorRedirectComponent.d.ts +10 -10
- package/lib/components/HOC/ModelErrorRedirectComponent.js +40 -83
- package/lib/components/HOC/SearchPersistorComponent.d.ts +4 -4
- package/lib/components/HOC/SearchPersistorComponent.js +243 -216
- package/lib/components/HOC/UnauthenticatedComponent.d.ts +12 -12
- package/lib/components/HOC/UnauthenticatedComponent.js +37 -82
- package/lib/components/HOC/UserComponent.d.ts +1 -1
- package/lib/components/HOC/UserComponent.js +12 -11
- package/lib/components/Icons/IconAlphaList.js +34 -20
- package/lib/components/Icons/IconExternalUser.js +34 -20
- package/lib/components/Icons/IconImpersonation.js +34 -20
- package/lib/components/Icons/IconStopImpersonating.js +34 -20
- package/lib/components/Icons/IconTable.js +35 -21
- package/lib/components/Icons/IconTableDeleteCol.js +34 -20
- package/lib/components/Icons/IconTableDeleteRow.js +34 -20
- package/lib/components/Icons/IconTableInsertCol.js +34 -20
- package/lib/components/Icons/IconTableInsertRow.js +34 -20
- package/lib/components/Impersonation/Button.d.ts +2 -2
- package/lib/components/Impersonation/Button.js +76 -56
- package/lib/components/Impersonation/Link.d.ts +2 -2
- package/lib/components/Impersonation/Link.js +76 -53
- package/lib/components/Impersonation/UserDetail.d.ts +2 -2
- package/lib/components/Impersonation/UserDetail.js +64 -15
- package/lib/components/Loading.js +27 -21
- package/lib/components/LockDownBrowser/Check.js +194 -107
- package/lib/components/LockDownBrowser/ExitButton.js +27 -14
- package/lib/components/LockDownBrowser/Launch.js +70 -85
- package/lib/components/Lti/Confirm.js +152 -33
- package/lib/components/Lti/CreateNonLtiGroupAlertDialog.d.ts +4 -2
- package/lib/components/Lti/CreateNonLtiGroupAlertDialog.js +170 -78
- package/lib/components/Lti/Launch.js +105 -49
- package/lib/components/Lti/LaunchGroup.js +85 -39
- package/lib/components/ManageTable.d.ts +1 -2
- package/lib/components/ManageTable.js +309 -104
- package/lib/components/ManageTableNoDataComponent.js +42 -22
- package/lib/components/NewVersionAlert.d.ts +2 -2
- package/lib/components/NewVersionAlert.js +82 -91
- package/lib/components/NotFound.js +87 -28
- package/lib/components/Notifications.d.ts +4 -4
- package/lib/components/Notifications.js +187 -169
- package/lib/components/PaginationNextButton.js +33 -21
- package/lib/components/PaginationPreviousButton.js +33 -21
- package/lib/components/Quill/CustomToolbar.d.ts +2 -2
- package/lib/components/Quill/CustomToolbar.js +432 -257
- package/lib/components/Quill/Formats/Image.d.ts +10 -25
- package/lib/components/Quill/Formats/Image.js +76 -82
- package/lib/components/Quill/Formats/List.d.ts +6 -3
- package/lib/components/Quill/Formats/List.js +50 -72
- package/lib/components/Quill/Formats/Video.d.ts +2 -1
- package/lib/components/Quill/Formats/Video.js +29 -43
- package/lib/components/Quill/ImageDropModule.d.ts +1 -1
- package/lib/components/Quill/ImageDropModule.js +142 -115
- package/lib/components/Quill/ImageWarning.d.ts +2 -2
- package/lib/components/Quill/ImageWarning.js +45 -32
- package/lib/components/Quill/ImageWithAltTextModal.d.ts +0 -1
- package/lib/components/Quill/ImageWithAltTextModal.js +425 -141
- package/lib/components/Quill/Specs/CustomImageSpec.d.ts +1 -1
- package/lib/components/Quill/Specs/CustomImageSpec.js +37 -45
- package/lib/components/Quill/Specs/CustomVideoSpec.d.ts +1 -1
- package/lib/components/Quill/Specs/CustomVideoSpec.js +27 -36
- package/lib/components/Quill/TableModule/Blots/BaseTableBlot.d.ts +2 -1
- package/lib/components/Quill/TableModule/Blots/BaseTableBlot.js +100 -116
- package/lib/components/Quill/TableModule/Blots/TableBlot.js +53 -66
- package/lib/components/Quill/TableModule/Blots/TableBodyBlot.js +54 -67
- package/lib/components/Quill/TableModule/Blots/TableCellBlot.d.ts +1 -1
- package/lib/components/Quill/TableModule/Blots/TableCellBlot.js +225 -241
- package/lib/components/Quill/TableModule/Blots/TableContainer.js +82 -99
- package/lib/components/Quill/TableModule/Blots/TableRowBlot.js +76 -87
- package/lib/components/Quill/TableModule/constants.js +45 -41
- package/lib/components/Quill/TableModule/index.css +25 -25
- package/lib/components/Quill/TableModule/index.d.ts +14 -5
- package/lib/components/Quill/TableModule/index.js +373 -313
- package/lib/components/Quill/TableModule/utils.js +45 -45
- package/lib/components/Quill/accessibilityFix.d.ts +0 -1
- package/lib/components/Quill/accessibilityFix.js +222 -238
- package/lib/components/Quill/index.js +36 -32
- package/lib/components/RefreshIndicator/Bordered.js +48 -32
- package/lib/components/RefreshIndicator/Inline.js +48 -33
- package/lib/components/RefreshIndicator/index.d.ts +2 -2
- package/lib/components/RefreshIndicator/index.js +263 -113
- package/lib/components/SearchControls.js +216 -31
- package/lib/components/SentryRoute.js +10 -23
- package/lib/components/Tables/RoleFilter.d.ts +3 -4
- package/lib/components/Tables/RoleFilter.js +71 -46
- package/lib/components/Tables/TextFilter.d.ts +2 -3
- package/lib/components/Tables/TextFilter.js +62 -20
- package/lib/components/UserRoles/Add.d.ts +3 -3
- package/lib/components/UserRoles/Add.js +199 -161
- package/lib/components/UserRoles/Context.js +8 -6
- package/lib/components/UserRoles/RoleCell.js +181 -100
- package/lib/components/UserRoles/Select.js +168 -54
- package/lib/components/UserRoles/Table.js +221 -102
- package/lib/components/UserRoles/index.d.ts +6 -6
- package/lib/components/UserRoles/index.js +535 -464
- package/lib/config/eslint/index.d.ts +2 -0
- package/lib/config/eslint/index.js +36 -0
- package/lib/config/eslint/lib/order.d.ts +3 -0
- package/lib/config/eslint/lib/order.js +30 -0
- package/lib/config/eslint/lib/prettier.d.ts +3 -0
- package/lib/config/eslint/lib/prettier.js +23 -0
- package/lib/config/eslint/lib/typescript.d.ts +2 -0
- package/lib/config/eslint/lib/typescript.js +98 -0
- package/lib/config/eslint/react.d.ts +2 -0
- package/lib/config/eslint/react.js +30 -0
- package/lib/constants/baseActivity.js +30 -26
- package/lib/constants/baseRole.js +14 -10
- package/lib/constants/configuration.d.ts +1 -1
- package/lib/constants/configuration.js +43 -39
- package/lib/constants/externalProviderType.js +10 -6
- package/lib/constants/fetchErrorData.js +15 -11
- package/lib/constants/index.js +137 -23
- package/lib/constants/lockDownBrowser.js +28 -24
- package/lib/constants/mockData.d.ts +4 -6
- package/lib/constants/mockData.js +383 -324
- package/lib/constants/modelStatus.js +15 -11
- package/lib/constants/notificationType.js +12 -8
- package/lib/constants/operatingSystem.js +12 -8
- package/lib/constants/shard.js +11 -7
- package/lib/constants/table.js +21 -21
- package/lib/constants/tier.js +12 -8
- package/lib/constants/userRole.d.ts +1 -2
- package/lib/constants/userRole.js +15 -17
- package/lib/css/components/_buttons.css +11 -3
- package/lib/css/components/_quill.css +3 -3
- package/lib/css/components/_tables.css +6 -5
- package/lib/css/utils/_display.css +12 -19
- package/lib/css/utils/_general.css +1 -1
- package/lib/css/utils/_text.css +2 -1
- package/lib/css/variables.css +0 -4
- package/lib/endpointMappings.js +197 -193
- package/lib/hooks/useCollection.js +83 -65
- package/lib/hooks/useCollectionConfiguration.d.ts +0 -1
- package/lib/hooks/useCollectionConfiguration.js +179 -82
- package/lib/hooks/useCollectionItem.js +155 -58
- package/lib/hooks/useEventCalback.d.ts +14 -0
- package/lib/hooks/useEventCalback.js +51 -0
- package/lib/hooks/useGuid.js +19 -8
- package/lib/hooks/usePrevious.d.ts +24 -1
- package/lib/hooks/usePrevious.js +82 -12
- package/lib/index.js +156 -36
- package/lib/redux/actionCreator.d.ts +6 -6
- package/lib/redux/actionCreator.js +51 -40
- package/lib/redux/actions/AuthAction.js +44 -31
- package/lib/redux/actions/ModalAction.d.ts +1 -1
- package/lib/redux/actions/ModalAction.js +10 -6
- package/lib/redux/actions/ModelAction.d.ts +1 -1
- package/lib/redux/actions/ModelAction.js +77 -49
- package/lib/redux/actions/NotificationAction.js +10 -6
- package/lib/redux/actions/SearchAction.js +9 -5
- package/lib/redux/actions/index.js +60 -16
- package/lib/redux/configureReducers.d.ts +2 -5
- package/lib/redux/configureReducers.js +61 -72
- package/lib/redux/configureStore.d.ts +2 -2
- package/lib/redux/configureStore.js +83 -115
- package/lib/redux/helpers.js +7 -2
- package/lib/redux/reducers/authReducer.js +50 -44
- package/lib/redux/reducers/index.js +41 -15
- package/lib/redux/reducers/modalsReducer.js +49 -52
- package/lib/redux/reducers/modelsReducer.d.ts +2 -2
- package/lib/redux/reducers/modelsReducer.js +136 -135
- package/lib/redux/reducers/notificationsReducer.js +26 -21
- package/lib/redux/reducers/searchReducer.js +18 -12
- package/lib/redux/sagas/appInsightsSaga.js +24 -62
- package/lib/redux/sagas/authSaga.js +287 -414
- package/lib/redux/sagas/caliperSaga.js +154 -248
- package/lib/redux/sagas/clockOffsetSaga.js +35 -76
- package/lib/redux/sagas/configurationSaga.js +13 -46
- package/lib/redux/sagas/downtimeApiErrorSaga.d.ts +0 -1
- package/lib/redux/sagas/downtimeApiErrorSaga.js +23 -64
- package/lib/redux/sagas/errorSaga.d.ts +0 -1
- package/lib/redux/sagas/errorSaga.js +29 -63
- package/lib/redux/sagas/googleAnalyticsSaga.js +29 -69
- package/lib/redux/sagas/identityProviderSaga.js +24 -69
- package/lib/redux/sagas/initialDataLoadSaga.js +38 -29
- package/lib/redux/sagas/lockDownBrowserErrorSaga.d.ts +0 -1
- package/lib/redux/sagas/lockDownBrowserErrorSaga.js +32 -81
- package/lib/redux/sagas/modelFetchSaga.js +331 -411
- package/lib/redux/sagas/noStoreSaga.d.ts +1 -1
- package/lib/redux/sagas/noStoreSaga.js +68 -101
- package/lib/redux/sagas/postLoginDataSaga.js +42 -74
- package/lib/redux/sagas/postLoginRedirectSaga.js +27 -68
- package/lib/redux/sagas/rootSaga.js +85 -137
- package/lib/redux/sagas/sentrySaga.js +29 -85
- package/lib/redux/sagas/userIdSaga.js +18 -54
- package/lib/services/codeProviderService.js +25 -29
- package/lib/services/dateService.js +12 -10
- package/lib/services/documentService.js +15 -10
- package/lib/services/fetchService.js +110 -144
- package/lib/services/persistenceService.d.ts +4 -4
- package/lib/services/persistenceService.js +45 -43
- package/lib/services/ticketProviderService.js +29 -33
- package/lib/services/tokenPersistenceService.js +13 -9
- package/lib/services/windowService.js +21 -17
- package/lib/startup.d.ts +1 -1
- package/lib/startup.js +115 -118
- package/lib/types/AppConfiguration.js +5 -1
- package/lib/types/Artifact.js +11 -7
- package/lib/types/BaseReduxState.js +5 -1
- package/lib/types/Client.js +5 -1
- package/lib/types/Collection.d.ts +3 -3
- package/lib/types/Collection.js +5 -1
- package/lib/types/Configuration.js +5 -1
- package/lib/types/DeepLinkingResponseRequest.js +5 -1
- package/lib/types/DeletableModel.js +5 -1
- package/lib/types/Event.js +5 -1
- package/lib/types/ExternalGroup.js +5 -1
- package/lib/types/ExternalProvider.js +5 -1
- package/lib/types/ExternalTerm.js +5 -1
- package/lib/types/Group.js +5 -1
- package/lib/types/IdentityProvider.js +5 -1
- package/lib/types/LtiLaunch.js +5 -1
- package/lib/types/NameOnlyEntity.js +5 -1
- package/lib/types/Notification.d.ts +2 -2
- package/lib/types/Notification.js +5 -1
- package/lib/types/OptionalRecord.d.ts +1 -1
- package/lib/types/OptionalRecord.js +5 -1
- package/lib/types/OwnerSchedule.d.ts +3 -1
- package/lib/types/OwnerSchedule.js +5 -1
- package/lib/types/PropertyOfType.d.ts +3 -3
- package/lib/types/PropertyOfType.js +5 -1
- package/lib/types/Quill.js +5 -1
- package/lib/types/RoleDescription.d.ts +0 -1
- package/lib/types/RoleDescription.js +5 -1
- package/lib/types/Search.js +5 -1
- package/lib/types/SimpleLocation.js +5 -1
- package/lib/types/UniTime.js +5 -1
- package/lib/types/User.js +5 -1
- package/lib/types/UserRole.js +5 -1
- package/lib/types/auth/AuthState.js +5 -1
- package/lib/types/auth/CasV1LoginRequestBody.js +5 -1
- package/lib/types/auth/ClientCredentials.js +5 -1
- package/lib/types/auth/CodeProviderService.js +5 -1
- package/lib/types/auth/LocalLoginRequestBody.js +5 -1
- package/lib/types/auth/TicketProviderService.js +5 -1
- package/lib/types/auth/TokenPersistenceService.js +5 -1
- package/lib/types/auth/index.js +82 -18
- package/lib/types/externals.d.js +2 -0
- package/lib/types/index.js +313 -39
- package/lib/types/net/EndpointConfig.js +5 -1
- package/lib/types/net/EndpointMapping.js +5 -1
- package/lib/types/net/EndpointMappings.js +5 -1
- package/lib/types/net/ErrorHandler.d.ts +1 -1
- package/lib/types/net/ErrorHandler.js +5 -1
- package/lib/types/net/FetchConfig.d.ts +1 -1
- package/lib/types/net/FetchConfig.js +5 -1
- package/lib/types/net/FetchErrorData.js +10 -6
- package/lib/types/net/FetchResult.d.ts +2 -2
- package/lib/types/net/FetchResult.js +5 -1
- package/lib/types/net/HTTPMethod.d.ts +1 -1
- package/lib/types/net/HTTPMethod.js +5 -1
- package/lib/types/net/HTTPStatusCode.js +16 -12
- package/lib/types/net/Metadata.js +5 -1
- package/lib/types/net/Model.js +5 -1
- package/lib/types/net/ModelCollection.js +5 -1
- package/lib/types/net/ModelsState.js +5 -1
- package/lib/types/net/OAuthToken.js +5 -1
- package/lib/types/net/OAuthTokenOrNull.d.ts +1 -1
- package/lib/types/net/OAuthTokenOrNull.js +5 -1
- package/lib/types/net/TokenAccessFunction.d.ts +1 -1
- package/lib/types/net/TokenAccessFunction.js +5 -1
- package/lib/types/net/index.js +181 -27
- package/lib/utils/baseActivity.d.ts +2 -2
- package/lib/utils/baseActivity.js +93 -91
- package/lib/utils/baseRole.js +37 -33
- package/lib/utils/collection.js +413 -291
- package/lib/utils/cookies.js +22 -37
- package/lib/utils/date.js +210 -210
- package/lib/utils/dom.js +145 -133
- package/lib/utils/domainIdentifier.js +9 -9
- package/lib/utils/entityUserRole.js +6 -2
- package/lib/utils/error.d.ts +1 -1
- package/lib/utils/error.js +18 -16
- package/lib/utils/events.js +37 -30
- package/lib/utils/externalGroup.js +25 -21
- package/lib/utils/externalProviders.js +8 -4
- package/lib/utils/externalTerms.js +9 -6
- package/lib/utils/fetch.d.ts +1 -1
- package/lib/utils/fetch.js +179 -176
- package/lib/utils/group.js +17 -9
- package/lib/utils/groupDates.d.ts +1 -1
- package/lib/utils/groupDates.js +43 -39
- package/lib/utils/groupRoles.js +28 -28
- package/lib/utils/lockDownBrowser.js +16 -12
- package/lib/utils/logger.js +30 -25
- package/lib/utils/lti.js +10 -5
- package/lib/utils/model.d.ts +2 -2
- package/lib/utils/model.js +35 -44
- package/lib/utils/number.js +13 -16
- package/lib/utils/promise.d.ts +6 -1
- package/lib/utils/promise.js +34 -15
- package/lib/utils/quill.js +60 -71
- package/lib/utils/route.d.ts +2 -2
- package/lib/utils/route.js +61 -60
- package/lib/utils/search.d.ts +1 -1
- package/lib/utils/search.js +78 -85
- package/lib/utils/shard.js +38 -41
- package/lib/utils/sort.d.ts +3 -3
- package/lib/utils/sort.js +62 -58
- package/lib/utils/string.js +14 -10
- package/lib/utils/table.d.ts +3 -3
- package/lib/utils/table.js +36 -33
- package/lib/utils/timezone.js +12 -26
- package/lib/utils/url.d.ts +2 -1
- package/lib/utils/url.js +139 -193
- package/lib/utils/user.js +59 -61
- package/lib/utils/userAgent.js +11 -11
- package/lib/utils/userRole.d.ts +3 -3
- package/lib/utils/userRole.js +46 -44
- package/package.json +90 -73
- package/lib/config/eslint/index.cjs +0 -21
- package/lib/config/eslint/lib/order.cjs +0 -22
- package/lib/config/eslint/lib/prettier.cjs +0 -18
- package/lib/config/eslint/lib/typescript.cjs +0 -86
- package/lib/config/eslint/react.cjs +0 -9
- package/lib/css/utils/_focus.css +0 -4
|
@@ -1,52 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
var __assign = (this && this.__assign) || function () {
|
|
16
|
-
__assign = Object.assign || function(t) {
|
|
17
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
18
|
-
s = arguments[i];
|
|
19
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
20
|
-
t[p] = s[p];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
return __assign.apply(this, arguments);
|
|
25
|
-
};
|
|
26
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
27
|
-
if (k2 === undefined) k2 = k;
|
|
28
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
29
|
-
}) : (function(o, m, k, k2) {
|
|
30
|
-
if (k2 === undefined) k2 = k;
|
|
31
|
-
o[k2] = m[k];
|
|
32
|
-
}));
|
|
33
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
34
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
35
|
-
}) : function(o, v) {
|
|
36
|
-
o["default"] = v;
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
37
5
|
});
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
};
|
|
45
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
var react_1 = __importStar(require("react"));
|
|
47
|
-
var react_router_dom_1 = require("react-router-dom");
|
|
48
|
-
var modelStatus_1 = require("../../constants/modelStatus");
|
|
49
|
-
var types_1 = require("../../types");
|
|
6
|
+
exports.default = modelErrorRedirectComponent;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactRouterDom = require("react-router-dom");
|
|
9
|
+
var _modelStatus = require("../../constants/modelStatus");
|
|
10
|
+
var _types = require("../../types");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
50
12
|
/**
|
|
51
13
|
* This component exists as a child to CollectionItemComponent to
|
|
52
14
|
* redirect the user to a 404/500 page if errors occur while fetching data.
|
|
@@ -60,40 +22,35 @@ var types_1 = require("../../types");
|
|
|
60
22
|
* @returns A wrapped component or redirects
|
|
61
23
|
*/
|
|
62
24
|
function modelErrorRedirectComponent(WrappedComponent) {
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
return react_1.default.createElement(WrappedComponent, __assign({}, this.props));
|
|
95
|
-
};
|
|
96
|
-
return ModelErrorRedirectComponent;
|
|
97
|
-
}(react_1.Component));
|
|
25
|
+
return class ModelErrorRedirectComponent extends _react.Component {
|
|
26
|
+
render() {
|
|
27
|
+
const {
|
|
28
|
+
model,
|
|
29
|
+
modelStatus,
|
|
30
|
+
previousModelStatus
|
|
31
|
+
} = this.props;
|
|
32
|
+
const notFoundRoute = previousModelStatus === _modelStatus.MODEL_STATUS.UNINITIALIZED && modelStatus === _modelStatus.MODEL_STATUS.ERROR && model._metadata && model._metadata.hasError && model._metadata.lastFetchErrorData && model._metadata.lastFetchErrorData.status === _types.HTTP_STATUS_CODE.NOT_FOUND;
|
|
33
|
+
const errorRoute = previousModelStatus === _modelStatus.MODEL_STATUS.UNINITIALIZED && modelStatus === _modelStatus.MODEL_STATUS.ERROR && model._metadata && model._metadata.hasError && model._metadata.lastFetchErrorData && model._metadata.lastFetchErrorData.status === _types.HTTP_STATUS_CODE.INTERNAL_SERVER_ERROR;
|
|
34
|
+
if (notFoundRoute) {
|
|
35
|
+
const pathname = window.location.pathname;
|
|
36
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
|
|
37
|
+
to: {
|
|
38
|
+
pathname: '/not-found',
|
|
39
|
+
search: `?pathname=${pathname}`
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
if (errorRoute) {
|
|
44
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Redirect, {
|
|
45
|
+
to: {
|
|
46
|
+
pathname: '/error'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(WrappedComponent, {
|
|
51
|
+
...this.props
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
};
|
|
98
55
|
}
|
|
99
|
-
|
|
56
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJfcmVhY3QiLCJyZXF1aXJlIiwiX3JlYWN0Um91dGVyRG9tIiwiX21vZGVsU3RhdHVzIiwiX3R5cGVzIiwiX2pzeFJ1bnRpbWUiLCJtb2RlbEVycm9yUmVkaXJlY3RDb21wb25lbnQiLCJXcmFwcGVkQ29tcG9uZW50IiwiTW9kZWxFcnJvclJlZGlyZWN0Q29tcG9uZW50IiwiQ29tcG9uZW50IiwicmVuZGVyIiwibW9kZWwiLCJtb2RlbFN0YXR1cyIsInByZXZpb3VzTW9kZWxTdGF0dXMiLCJwcm9wcyIsIm5vdEZvdW5kUm91dGUiLCJNT0RFTF9TVEFUVVMiLCJVTklOSVRJQUxJWkVEIiwiRVJST1IiLCJfbWV0YWRhdGEiLCJoYXNFcnJvciIsImxhc3RGZXRjaEVycm9yRGF0YSIsInN0YXR1cyIsIkhUVFBfU1RBVFVTX0NPREUiLCJOT1RfRk9VTkQiLCJlcnJvclJvdXRlIiwiSU5URVJOQUxfU0VSVkVSX0VSUk9SIiwicGF0aG5hbWUiLCJ3aW5kb3ciLCJsb2NhdGlvbiIsImpzeCIsIlJlZGlyZWN0IiwidG8iLCJzZWFyY2giXSwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvY29tcG9uZW50cy9IT0MvTW9kZWxFcnJvclJlZGlyZWN0Q29tcG9uZW50LnRzeCJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBDb21wb25lbnQsI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Q0MsUUFBUSxJQUN4QlQsS0FBSyxDQUFDUSxTQUFTLENBQUNFLGtCQUFrQixJQUNsQ1YsS0FBSyxDQUFDUSxTQUFTLENBQUNFLGtCQUFrQixDQUFDQyxNQUFNLEtBQUtDLHVCQUFnQixDQUFDRyxxQkFBcUI7TUFFckYsSUFBSVgsYUFBYSxFQUFFO1FBQ2xCLE1BQU1ZLFFBQVEsR0FBR0MsTUFBTSxDQUFDQyxRQUFRLENBQUNGLFFBQVE7UUFDekMsb0JBQ0MsSUFBQXRCLFdBQUEsQ0FBQXlCLEdBQUEsRUFBQzVCLGVBQUEsQ0FBQTZCLFFBQVE7VUFDUkMsRUFBRSxFQUFFO1lBQ0hMLFFBQVEsRUFBRSxZQUFZO1lBQ3RCTSxNQUFNLEVBQUUsYUFBYU4sUUFBUTtVQUM5QjtRQUFFLENBQ0YsQ0FBQztNQUVKO01BQ0EsSUFBSUYsVUFBVSxFQUFFO1FBQ2Ysb0JBQ0MsSUFBQXBCLFdBQUEsQ0FBQXlCLEdBQUEsRUFBQzVCLGVBQUEsQ0FBQTZCLFFBQVE7VUFDUkMsRUFBRSxFQUFFO1lBQ0hMLFFBQVEsRUFBRTtVQUNYO1FBQUUsQ0FDRixDQUFDO01BRUo7TUFDQSxvQkFBTyxJQUFBdEIsV0FBQSxDQUFBeUIsR0FBQSxFQUFDdkIsZ0JBQWdCO1FBQUEsR0FBSyxJQUFJLENBQUNPO01BQUssQ0FBRyxDQUFDO0lBQzVDO0VBQ0QsQ0FBQztBQUNGIiwiaWdub3JlTGlzdCI6W119
|
|
@@ -4,7 +4,7 @@ import { Dispatch } from 'redux';
|
|
|
4
4
|
import { BaseReduxState, Search } from '../../types';
|
|
5
5
|
export interface SearchPersistorProps<T extends Search = Search> {
|
|
6
6
|
persistSearch: (search?: T) => void;
|
|
7
|
-
persistedSearch: T;
|
|
7
|
+
persistedSearch: T | undefined;
|
|
8
8
|
}
|
|
9
9
|
export interface SearchPersistorMethods<T extends Search = Search> {
|
|
10
10
|
setSearchDefaults: (doSearch: () => void, search: T) => void;
|
|
@@ -22,9 +22,9 @@ export interface SearchPersistorMethods<T extends Search = Search> {
|
|
|
22
22
|
export interface SearchPersistorWrappedProps<T extends Search = Search> extends SearchPersistorProps<T>, SearchPersistorMethods<T> {
|
|
23
23
|
search?: T;
|
|
24
24
|
}
|
|
25
|
-
export declare function configureSearchPersistorComponent<TOwnProps extends
|
|
26
|
-
export declare function configureSearchPersistorComponent<TOwnProps extends
|
|
27
|
-
export declare const configureMapStateToProps: <TSearchType extends Search>(key: string) => (state: BaseReduxState) => SearchPersistorProps<TSearchType
|
|
25
|
+
export declare function configureSearchPersistorComponent<TOwnProps extends object>(WrappedComponent: ComponentType<TOwnProps & SearchPersistorWrappedProps>, disableLocalSearch?: boolean): ComponentType<TOwnProps & SearchPersistorProps>;
|
|
26
|
+
export declare function configureSearchPersistorComponent<TOwnProps extends object, TSearchType extends Search>(WrappedComponent: ComponentType<TOwnProps & SearchPersistorWrappedProps<TSearchType>>, disableLocalSearch?: boolean): ComponentType<TOwnProps & SearchPersistorProps<TSearchType>>;
|
|
27
|
+
export declare const configureMapStateToProps: <TSearchType extends Search>(key: string) => (state: BaseReduxState) => SearchPersistorProps<TSearchType> | undefined;
|
|
28
28
|
export declare const configureMapDispatchToProps: <TSearchType extends Search>(key: string) => (dispatch: Dispatch) => SearchPersistorProps<TSearchType>;
|
|
29
29
|
/**
|
|
30
30
|
* HOC to handle persistence and restoration of "Manage" components search parameters.
|