studiokit-scaffolding-js 6.0.0 → 7.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/AlertDialog.d.ts +1 -1
- package/lib/components/Dropdowns/GroupsDropdown.d.ts +2 -2
- package/lib/components/Dropdowns/ManagedNavDropdown.d.ts +2 -2
- 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/HOC/ActivityRequiredComponent.d.ts +2 -2
- package/lib/components/HOC/AsyncComponent.d.ts +1 -1
- package/lib/components/HOC/CollectionComponent.d.ts +1 -1
- package/lib/components/HOC/CollectionFirstItemComponent.d.ts +2 -2
- package/lib/components/HOC/CollectionItemComponent.d.ts +1 -1
- package/lib/components/HOC/ConnectedModalComponent.d.ts +1 -1
- 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/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/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 +2 -2
- 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 +1 -1
- package/lib/constants/fetchErrorData.js +3 -3
- 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/redux/sagas/caliperSaga.js +1 -1
- package/lib/utils/dom.js +4 -4
- package/package.json +47 -20
- package/lib/config/eslint/react.js +0 -9
- package/lib/setupTests.d.ts +0 -1
- package/lib/setupTests.js +0 -41
- /package/lib/config/eslint/lib/{order.js → order.cjs} +0 -0
- /package/lib/config/eslint/lib/{prettier.js → prettier.cjs} +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
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;
|
|
@@ -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 {};
|
|
@@ -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 {};
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -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 {};
|
|
@@ -101,10 +101,10 @@ export declare class UserRoles extends Component<UserRolesProps, UserRolesState>
|
|
|
101
101
|
didUpdate: (isSuccess: boolean) => void;
|
|
102
102
|
alertRemoveUserRole: (userRoleToRemove: UserRole) => void;
|
|
103
103
|
removeUserRoleTitle: (roleForRemove: string) => string;
|
|
104
|
-
renderRemoveUserRoleDescription: (userRoleToRemove: UserRole, warning?: JSX.Element | undefined) => JSX.Element;
|
|
104
|
+
renderRemoveUserRoleDescription: (userRoleToRemove: UserRole, warning?: JSX.Element | undefined) => React.JSX.Element;
|
|
105
105
|
removeUserRole: (shouldRemove: boolean) => void;
|
|
106
106
|
didRemove: (isSuccess: boolean) => void;
|
|
107
|
-
render(): JSX.Element;
|
|
107
|
+
render(): React.JSX.Element;
|
|
108
108
|
}
|
|
109
109
|
export declare const mapStateToProps: (state: BaseReduxState, ownProps: UserRolesOwnProps) => UserRolesReduxProps;
|
|
110
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>;
|
|
@@ -10,12 +10,12 @@ module.exports = {
|
|
|
10
10
|
browser: true,
|
|
11
11
|
jest: true
|
|
12
12
|
},
|
|
13
|
-
extends: ['eslint:recommended', './lib/order.
|
|
13
|
+
extends: ['eslint:recommended', './lib/order.cjs', 'prettier', './lib/prettier.cjs'],
|
|
14
14
|
plugins: ['import', 'prettier'],
|
|
15
15
|
overrides: [
|
|
16
16
|
{
|
|
17
17
|
files: ['**/*.ts?(x)'],
|
|
18
|
-
extends: ['./lib/typescript.
|
|
18
|
+
extends: ['./lib/typescript.cjs']
|
|
19
19
|
}
|
|
20
20
|
]
|
|
21
21
|
}
|
|
@@ -15,10 +15,10 @@ module.exports = {
|
|
|
15
15
|
'plugin:@typescript-eslint/eslint-recommended',
|
|
16
16
|
'plugin:@typescript-eslint/recommended',
|
|
17
17
|
'plugin:@typescript-eslint/recommended-requiring-type-checking',
|
|
18
|
-
'./order.
|
|
18
|
+
'./order.cjs',
|
|
19
19
|
'prettier',
|
|
20
20
|
'prettier/@typescript-eslint',
|
|
21
|
-
'./prettier.
|
|
21
|
+
'./prettier.cjs'
|
|
22
22
|
],
|
|
23
23
|
plugins: ['@typescript-eslint', 'import', 'prettier'],
|
|
24
24
|
rules: {
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.networkOfflineErrorData = exports.unknownErrorData = void 0;
|
|
4
|
-
var
|
|
4
|
+
var types_1 = require("../types");
|
|
5
5
|
exports.unknownErrorData = {
|
|
6
|
-
status:
|
|
6
|
+
status: types_1.CUSTOM_ERROR_STATUS_CODE.UNKNOWN,
|
|
7
7
|
title: 'Unknown Error',
|
|
8
8
|
detail: 'An unknown error has occurred.'
|
|
9
9
|
};
|
|
10
10
|
exports.networkOfflineErrorData = {
|
|
11
|
-
status:
|
|
11
|
+
status: types_1.CUSTOM_ERROR_STATUS_CODE.NO_NETWORK_CONNECTION,
|
|
12
12
|
title: 'Network Offline',
|
|
13
13
|
detail: 'There is no network connection.'
|
|
14
14
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const renderAddDescription: (entityName?: string | undefined) => JSX.Element;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const renderAddDescription: (entityName?: string | undefined) => React.JSX.Element;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
/* Do not write any CSS in here, add it to the appropriate module or make a new one */
|
|
2
1
|
@charset "UTF-8";
|
|
3
2
|
|
|
3
|
+
/* Do not write any CSS in here, add it to the appropriate module or make a new one */
|
|
4
|
+
|
|
4
5
|
/* 1. Variables */
|
|
5
6
|
@import 'variables.css';
|
|
6
7
|
|
|
7
8
|
/* 2. Utils */
|
|
8
|
-
@import 'utils/*.css';
|
|
9
|
+
@import-glob 'utils/*.css';
|
|
9
10
|
|
|
10
11
|
/* 3. Base */
|
|
11
|
-
@import 'base/*.css';
|
|
12
|
+
@import-glob 'base/*.css';
|
|
12
13
|
|
|
13
14
|
/* 4. Global components */
|
|
14
|
-
@import 'components/*.css';
|
|
15
|
+
@import-glob 'components/*.css';
|
package/lib/css/index.css
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
/* Do not write any CSS in here, add it to the appropriate module or make a new one */
|
|
2
1
|
@charset "UTF-8";
|
|
3
2
|
|
|
3
|
+
/* Do not write any CSS in here, add it to the appropriate module or make a new one */
|
|
4
|
+
|
|
4
5
|
/* NOTE: variables.css is NOT imported to allow app specific overrides. *
|
|
5
6
|
|
|
6
7
|
/* 1. Utils */
|
|
7
|
-
@import 'utils/*.css';
|
|
8
|
+
@import-glob 'utils/*.css';
|
|
8
9
|
|
|
9
10
|
/* 2. Base */
|
|
10
|
-
@import 'base/*.css';
|
|
11
|
+
@import-glob 'base/*.css';
|
|
11
12
|
|
|
12
13
|
/* 3. Global components */
|
|
13
|
-
@import 'components/*.css';
|
|
14
|
+
@import-glob 'components/*.css';
|
|
@@ -128,7 +128,7 @@ function getToken() {
|
|
|
128
128
|
noStore: true
|
|
129
129
|
});
|
|
130
130
|
return [4 /*yield*/, effects_1.race({
|
|
131
|
-
receivedResult: effects_1.take(function (action) { return actions_1.
|
|
131
|
+
receivedResult: effects_1.take(function (action) { return actions_1.isTransientModelFetchResultAction(action) && action.modelPath === 'caliperToken'; }),
|
|
132
132
|
failedResult: effects_1.take(function (action) { return actions_1.isTransientModelFetchErrorAction(action) && action.modelPath === 'caliperToken'; })
|
|
133
133
|
})];
|
|
134
134
|
case 1:
|
package/lib/utils/dom.js
CHANGED
|
@@ -63,7 +63,7 @@ var setHasExternalKeyboard = function (hasExternalKeyboard) {
|
|
|
63
63
|
*
|
|
64
64
|
*/
|
|
65
65
|
var setVisualViewportHeightVar = function () {
|
|
66
|
-
var height = visualViewport.height;
|
|
66
|
+
var height = visualViewport ? visualViewport.height : 0;
|
|
67
67
|
document.documentElement.style.setProperty('--visual-viewport-height', height + "px");
|
|
68
68
|
};
|
|
69
69
|
/**
|
|
@@ -86,11 +86,11 @@ exports.isTextInput = isTextInput;
|
|
|
86
86
|
var updateHasExternalKeyboardAfterFocusTimeout = undefined;
|
|
87
87
|
var scrollToElementAfterFocusTimeout = undefined;
|
|
88
88
|
var updateHasExternalKeyboardAfterFocus = function () {
|
|
89
|
-
var closedVisualViewportHeight = visualViewport.height;
|
|
89
|
+
var closedVisualViewportHeight = visualViewport ? visualViewport.height : 0;
|
|
90
90
|
// wait for the keyboard animation
|
|
91
91
|
updateHasExternalKeyboardAfterFocusTimeout = window.setTimeout(function () {
|
|
92
92
|
// find the keyboard height based on the difference in viewport height
|
|
93
|
-
var keyboardHeight = closedVisualViewportHeight - visualViewport.height;
|
|
93
|
+
var keyboardHeight = closedVisualViewportHeight - (visualViewport ? visualViewport.height : 0);
|
|
94
94
|
// on first-load the input focus can fail
|
|
95
95
|
// when this happens the height is 0, and this ONLY happens when there is NOT an external keyboard
|
|
96
96
|
if (keyboardHeight === 0 && exports.hasExternalKeyboard() === undefined) {
|
|
@@ -181,7 +181,7 @@ var checkForExternalKeyboard = function () {
|
|
|
181
181
|
document.documentElement.append(el);
|
|
182
182
|
};
|
|
183
183
|
var setupMobileEventListeners = function () {
|
|
184
|
-
if (!exports.isMobileDevice())
|
|
184
|
+
if (!exports.isMobileDevice() || !visualViewport)
|
|
185
185
|
return;
|
|
186
186
|
// set viewport height var at setup
|
|
187
187
|
setVisualViewportHeightVar();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiokit-scaffolding-js",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "7.0.0",
|
|
4
4
|
"description": "Common scaffolding for Studio apps at Purdue",
|
|
5
5
|
"repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"build": "yarn clean && tsc -p ./tsconfig.build.json && yarn copy",
|
|
14
14
|
"build:watch": "tsc -p ./tsconfig.build.json -w",
|
|
15
15
|
"clean": "rimraf ./lib",
|
|
16
|
-
"copy": "copyfiles -u 1 \"src/**/*.css\" lib && copyfiles -u 1 \"src/config/**/*.
|
|
16
|
+
"copy": "copyfiles -u 1 \"src/**/*.css\" lib && copyfiles -u 1 \"src/config/**/*.cjs\" lib",
|
|
17
17
|
"coverage": "jest --coverage",
|
|
18
18
|
"fix": "run-s 'fix:**'",
|
|
19
19
|
"fix:code": "yarn lint:code --fix",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"eslintConfig": {
|
|
48
48
|
"extends": [
|
|
49
|
-
"./src/config/eslint/react.
|
|
49
|
+
"./src/config/eslint/react.cjs"
|
|
50
50
|
],
|
|
51
51
|
"overrides": [
|
|
52
52
|
{
|
|
@@ -67,7 +67,15 @@
|
|
|
67
67
|
"stylelint": {
|
|
68
68
|
"extends": "stylelint-config-standard",
|
|
69
69
|
"rules": {
|
|
70
|
-
"indentation": "tab"
|
|
70
|
+
"indentation": "tab",
|
|
71
|
+
"at-rule-no-unknown": [
|
|
72
|
+
true,
|
|
73
|
+
{
|
|
74
|
+
"ignoreAtRules": [
|
|
75
|
+
"import-glob"
|
|
76
|
+
]
|
|
77
|
+
}
|
|
78
|
+
]
|
|
71
79
|
},
|
|
72
80
|
"ignoreFiles": "src/**/*.{ts,tsx,js,jsx}"
|
|
73
81
|
},
|
|
@@ -91,10 +99,10 @@
|
|
|
91
99
|
},
|
|
92
100
|
"resolutions": {
|
|
93
101
|
"@sentry/browser": "^7.113.0",
|
|
102
|
+
"@types/node": "~18.6.0",
|
|
94
103
|
"@types/react": "^17.0.0",
|
|
95
104
|
"@types/react-router": "^5.1.11",
|
|
96
105
|
"kind-of": "^6.0.3",
|
|
97
|
-
"lodash": "^4.17.20",
|
|
98
106
|
"mixin-deep": "^1.3.2",
|
|
99
107
|
"set-value": "^2.0.1"
|
|
100
108
|
},
|
|
@@ -103,11 +111,13 @@
|
|
|
103
111
|
"@material-ui/icons": "^4.11.2",
|
|
104
112
|
"@material-ui/lab": "^4.0.0-alpha.57",
|
|
105
113
|
"@microsoft/applicationinsights-web": "^3.1.0",
|
|
114
|
+
"@redux-saga/core": "^1.1.3",
|
|
106
115
|
"@redux-saga/types": "^1.1.0",
|
|
107
116
|
"@sentry/react": "^7.113.0",
|
|
108
117
|
"@types/history": "^4.7.8",
|
|
109
|
-
"@types/lodash": "^4.14.
|
|
118
|
+
"@types/lodash": "^4.14.202",
|
|
110
119
|
"@types/pluralize": "^0.0.29",
|
|
120
|
+
"@types/quill": "^1.3.10",
|
|
111
121
|
"@types/react": "^17.0.0",
|
|
112
122
|
"@types/react-dom": "^17.0.0",
|
|
113
123
|
"@types/react-helmet": "^6.1.0",
|
|
@@ -117,26 +127,25 @@
|
|
|
117
127
|
"@types/react-router-bootstrap": "^0.24.5",
|
|
118
128
|
"@types/react-router-dom": "^5.1.7",
|
|
119
129
|
"@types/react-table": "^6.8.7",
|
|
120
|
-
"@types/redux-logger": "
|
|
130
|
+
"@types/redux-logger": "3.0.12",
|
|
121
131
|
"@types/uuid": "^8.3.0",
|
|
122
132
|
"bootstrap": "^4.6.0",
|
|
123
133
|
"compare-versions": "^3.6.0",
|
|
124
134
|
"connected-react-router": "^6.8.0",
|
|
125
135
|
"detect-browser": "^5.2.0",
|
|
126
136
|
"history": "^4.10.1",
|
|
127
|
-
"local-storage-fallback": "^4.1.
|
|
128
|
-
"lodash": "^4.17.
|
|
137
|
+
"local-storage-fallback": "^4.1.2",
|
|
138
|
+
"lodash": "^4.17.21",
|
|
129
139
|
"memoize-one": "^6.0.0",
|
|
130
|
-
"moment
|
|
140
|
+
"moment": "^2.29.4",
|
|
141
|
+
"moment-timezone": "^0.5.43",
|
|
131
142
|
"parchment": "^1.1.4",
|
|
132
143
|
"pluralize": "^8.0.0",
|
|
133
144
|
"prop-types": "^15.7.2",
|
|
134
145
|
"query-string": "^6.13.8",
|
|
135
146
|
"quill": "^1.3.7",
|
|
136
|
-
"quill-blot-formatter": "purdue-tlt/quill-blot-formatter#
|
|
137
|
-
"react": "^17.0.1",
|
|
147
|
+
"quill-blot-formatter": "purdue-tlt/quill-blot-formatter#a01562a213eb615abcdf2963457890e81ebc1ab3",
|
|
138
148
|
"react-bootstrap": "^1.4.3",
|
|
139
|
-
"react-dom": "^17.0.1",
|
|
140
149
|
"react-ga4": "^2.1.0",
|
|
141
150
|
"react-helmet": "^6.1.0",
|
|
142
151
|
"react-modal": "^3.12.1",
|
|
@@ -152,7 +161,7 @@
|
|
|
152
161
|
"redux-logger": "^3.0.6",
|
|
153
162
|
"redux-persist": "^6.0.0",
|
|
154
163
|
"redux-saga": "^1.1.3",
|
|
155
|
-
"studiokit-caliper-js": "^1.0.
|
|
164
|
+
"studiokit-caliper-js": "^1.0.25",
|
|
156
165
|
"tachyons": "^4.12.0",
|
|
157
166
|
"tslib": "^2.1.0",
|
|
158
167
|
"uuid": "^8.3.2"
|
|
@@ -163,8 +172,9 @@
|
|
|
163
172
|
"@types/enzyme-adapter-react-16": "^1.0.6",
|
|
164
173
|
"@types/jest": "^26.0.20",
|
|
165
174
|
"@types/mockdate": "^2.0.0",
|
|
166
|
-
"@
|
|
167
|
-
"@typescript-eslint/
|
|
175
|
+
"@types/react": "^17.0.0",
|
|
176
|
+
"@typescript-eslint/eslint-plugin": "4.33.0",
|
|
177
|
+
"@typescript-eslint/parser": "4.33.0",
|
|
168
178
|
"@wojtekmaj/enzyme-adapter-react-17": "^0.4.1",
|
|
169
179
|
"babel-eslint": "^10.1.0",
|
|
170
180
|
"copyfiles": "^2.4.1",
|
|
@@ -173,8 +183,9 @@
|
|
|
173
183
|
"eslint": "^7.11.0",
|
|
174
184
|
"eslint-config-prettier": "^7.2.0",
|
|
175
185
|
"eslint-config-react-app": "^6.0.0",
|
|
186
|
+
"eslint-import-resolver-node": "^0.3.9",
|
|
176
187
|
"eslint-plugin-flowtype": "^5.2.0",
|
|
177
|
-
"eslint-plugin-import": "
|
|
188
|
+
"eslint-plugin-import": "~2.22.1",
|
|
178
189
|
"eslint-plugin-jsx-a11y": "^6.4.1",
|
|
179
190
|
"eslint-plugin-prettier": "^3.3.1",
|
|
180
191
|
"eslint-plugin-react": "^7.22.0",
|
|
@@ -188,13 +199,29 @@
|
|
|
188
199
|
"lint-staged": "^10.5.3",
|
|
189
200
|
"mockdate": "^3.0.2",
|
|
190
201
|
"npm-run-all": "^4.1.5",
|
|
191
|
-
"prettier": "
|
|
202
|
+
"prettier": "~2.2.1",
|
|
203
|
+
"react": "^17.0.2",
|
|
204
|
+
"react-dom": "^17.0.1",
|
|
192
205
|
"rimraf": "^3.0.2",
|
|
193
206
|
"sort-package-json": "^1.48.1",
|
|
194
207
|
"stylelint": "^13.9.0",
|
|
195
208
|
"stylelint-config-standard": "^20.0.0",
|
|
196
209
|
"ts-jest": "^26.4.4",
|
|
197
|
-
"typescript": "
|
|
210
|
+
"typescript": "~4.1.6"
|
|
211
|
+
},
|
|
212
|
+
"peerDependencies": {
|
|
213
|
+
"@types/react": "^17.0.0",
|
|
214
|
+
"@types/react-redux": "^7.1.16",
|
|
215
|
+
"react": "^17.0.2",
|
|
216
|
+
"react-dom": "^17.0.1"
|
|
217
|
+
},
|
|
218
|
+
"peerDependenciesMeta": {
|
|
219
|
+
"@types/react": {
|
|
220
|
+
"optional": true
|
|
221
|
+
},
|
|
222
|
+
"@types/react-redux": {
|
|
223
|
+
"optional": true
|
|
224
|
+
}
|
|
198
225
|
},
|
|
199
|
-
"packageManager": "yarn@
|
|
226
|
+
"packageManager": "yarn@4.2.2"
|
|
200
227
|
}
|
package/lib/setupTests.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/lib/setupTests.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
var enzyme_adapter_react_17_1 = __importDefault(require("@wojtekmaj/enzyme-adapter-react-17"));
|
|
18
|
-
var enzyme_1 = require("enzyme");
|
|
19
|
-
var jest_fetch_mock_1 = __importDefault(require("jest-fetch-mock"));
|
|
20
|
-
var mockdate_1 = __importDefault(require("mockdate"));
|
|
21
|
-
var configuration_1 = require("./constants/configuration");
|
|
22
|
-
var mockData_1 = require("./constants/mockData");
|
|
23
|
-
var endpointMappings_1 = require("./endpointMappings");
|
|
24
|
-
var logger_1 = require("./utils/logger");
|
|
25
|
-
logger_1.setLogger(logger_1.dummyLogger);
|
|
26
|
-
configuration_1.setEndpointMappings(__assign(__assign({}, endpointMappings_1.endpointMappings), { groups: endpointMappings_1.groupEndpointMapping }));
|
|
27
|
-
jest_fetch_mock_1.default.enableMocks();
|
|
28
|
-
jest.mock('./utils/timezone', function () {
|
|
29
|
-
return {
|
|
30
|
-
getDefaultTimeZone: function () { return 'America/Indianapolis'; },
|
|
31
|
-
guessTimeZoneId: function () { return 'America/Indianapolis'; }
|
|
32
|
-
};
|
|
33
|
-
});
|
|
34
|
-
// globally mock the date
|
|
35
|
-
beforeEach(function () {
|
|
36
|
-
mockdate_1.default.set(mockData_1.defaultDate);
|
|
37
|
-
});
|
|
38
|
-
afterEach(function () {
|
|
39
|
-
mockdate_1.default.reset();
|
|
40
|
-
});
|
|
41
|
-
enzyme_1.configure({ adapter: new enzyme_adapter_react_17_1.default() });
|
|
File without changes
|
|
File without changes
|