robbyson-frontend-library 1.0.20 → 1.0.22
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/dist/components/favorite-button/favorite-button.interface.js +1 -0
- package/dist/types/tree/tree.types.js +8 -0
- package/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/favorite-button/favorite-button.interface.ts +9 -0
- package/src/components/favorite-button/favorite-button.types.d.ts +9 -0
- package/src/components/favorite-button/index.d.ts +1 -0
- package/src/components/guard-permission/guard-permission.interface.ts +8 -2
- package/src/components/header-context-menu/header-context-menu.interface.ts +1 -1
- package/src/components/menu.interface.ts +7 -0
- package/src/repositories/quiz.repository.interface.ts +2 -2
- package/src/services/quiz.service.interface.ts +2 -2
- package/src/states/main-container/tree-app.state.interface.ts +2 -0
- package/src/types/tree/tree.types.ts +7 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -7,6 +7,14 @@ export var UnitType;
|
|
|
7
7
|
UnitType["MINUTES"] = "minutes";
|
|
8
8
|
UnitType["SECONDS"] = "seconds";
|
|
9
9
|
})(UnitType || (UnitType = {}));
|
|
10
|
+
export var IWeightConditionTypes;
|
|
11
|
+
(function (IWeightConditionTypes) {
|
|
12
|
+
IWeightConditionTypes["EQUAL"] = "equal";
|
|
13
|
+
IWeightConditionTypes["BIGGER_OR_EQUAL"] = "bigger_or_equal";
|
|
14
|
+
IWeightConditionTypes["LESS_OR_EQUAL"] = "less_or_equal";
|
|
15
|
+
IWeightConditionTypes["BIGGER"] = "bigger";
|
|
16
|
+
IWeightConditionTypes["LESS"] = "less";
|
|
17
|
+
})(IWeightConditionTypes || (IWeightConditionTypes = {}));
|
|
10
18
|
export var TypeReferenceEnum;
|
|
11
19
|
(function (TypeReferenceEnum) {
|
|
12
20
|
TypeReferenceEnum["monthly"] = "M";
|
package/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
|
+
import {IToggleIconButtonProps} from "../toggle-icon-button/toggle-icon-button.interface";
|
|
3
|
+
|
|
4
|
+
export interface IFavoriteButtonProps<T>extends React.ButtonHTMLAttributes<T>,IBaseComponentProp, IToggleIconButtonProps<T> {
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export interface IFavoriteButtonState {
|
|
8
|
+
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module 'styleguide/FavoriteButton' {
|
|
5
|
+
import { IFavoriteButtonProps } from "robbyson-frontend-library";
|
|
6
|
+
const FavoriteButton: React.ComponentType<IFavoriteButtonProps>;
|
|
7
|
+
|
|
8
|
+
export default FavoriteButton;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './favorite-button.interface';
|
|
@@ -1,11 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IWeightConditionTypes } from "../../types";
|
|
2
|
+
import { UserSessionModel } from "../../models";
|
|
2
3
|
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
3
4
|
|
|
4
5
|
export interface IGuardPermissionProps extends IBaseComponentProp{
|
|
5
|
-
moduleHandle: string;
|
|
6
|
+
moduleHandle: string | undefined;
|
|
6
7
|
permissionHandles: string[];
|
|
7
8
|
children: React.ReactNode;
|
|
9
|
+
checkWeight?: boolean;
|
|
10
|
+
weight?: number;
|
|
11
|
+
redirect?:boolean
|
|
12
|
+
condition?: IWeightConditionTypes
|
|
8
13
|
}
|
|
14
|
+
|
|
9
15
|
export interface IGuardPermissionState {
|
|
10
16
|
hasPermission: boolean;
|
|
11
17
|
roleship: UserSessionModel["permissions"] | undefined;
|
|
@@ -11,7 +11,7 @@ export interface IHeaderContextMenuProps extends IBaseComponentProp {
|
|
|
11
11
|
activeTab?: TabKey;
|
|
12
12
|
selectedMonth?: Date | null;
|
|
13
13
|
textBreakpointsClasses?: HeaderTextBreakpointsClasses;
|
|
14
|
-
onButtonClick?: (buttonName: IHeaderContextMenuButtons) => void;
|
|
14
|
+
onButtonClick?: (buttonName: IHeaderContextMenuButtons, linkTo?: string) => void;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
17
|
export type HeaderTextBreakpointsClasses = Partial<{
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IWeightConditionTypes } from "../types";
|
|
2
|
+
|
|
1
3
|
export type MenuItem = {
|
|
2
4
|
captionLocale: string;
|
|
3
5
|
iconHandle: string;
|
|
@@ -5,6 +7,11 @@ export type MenuItem = {
|
|
|
5
7
|
module?: string;
|
|
6
8
|
disabled?: boolean;
|
|
7
9
|
matchPath?: string;
|
|
10
|
+
permissionsModule?: string[];
|
|
11
|
+
permissionsUser?: string[];
|
|
12
|
+
checkWeight?: boolean;
|
|
13
|
+
weight?: number;
|
|
14
|
+
condition?: IWeightConditionTypes
|
|
8
15
|
}
|
|
9
16
|
|
|
10
17
|
export interface IMenuProps {
|
|
@@ -8,7 +8,7 @@ export interface IQuizRepository {
|
|
|
8
8
|
quizId: string,
|
|
9
9
|
body: QuizDTO.QuestionAnswerDTO
|
|
10
10
|
): Promise<void>;
|
|
11
|
-
getQuizzesToBeAnsweredLater(): Promise<
|
|
11
|
+
getQuizzesToBeAnsweredLater(): Promise<QuizAnsweredModel[]>;
|
|
12
12
|
getNotAnsweredQuizzes(): Promise<QuizNotAnsweredModel[]>;
|
|
13
13
|
getAnsweredQuizzes(): Promise<QuizAnsweredModel[]>;
|
|
14
|
-
}
|
|
14
|
+
}
|
|
@@ -8,9 +8,9 @@ export interface IQuizService {
|
|
|
8
8
|
quizId: string,
|
|
9
9
|
body: QuizDTO.QuestionAnswerDTO
|
|
10
10
|
): Promise<void>;
|
|
11
|
-
getQuizzesToBeAnsweredLater(): Promise<
|
|
11
|
+
getQuizzesToBeAnsweredLater(): Promise<QuizAnsweredModel[]>;
|
|
12
12
|
getNotAnsweredQuizzes(): Promise<QuizNotAnsweredModel[]>;
|
|
13
13
|
getAnsweredQuizzes(): Promise<QuizAnsweredModel[]>;
|
|
14
14
|
getNotAnsweredQuizzesCount(): number;
|
|
15
|
-
getHistory(): Promise<[
|
|
15
|
+
getHistory(): Promise<[QuizAnsweredModel[], QuizAnsweredModel[]]>;
|
|
16
16
|
}
|
|
@@ -7,6 +7,13 @@ export enum UnitType {
|
|
|
7
7
|
MINUTES = 'minutes',
|
|
8
8
|
SECONDS = 'seconds',
|
|
9
9
|
}
|
|
10
|
+
export enum IWeightConditionTypes {
|
|
11
|
+
EQUAL= "equal",
|
|
12
|
+
BIGGER_OR_EQUAL= "bigger_or_equal",
|
|
13
|
+
LESS_OR_EQUAL= "less_or_equal",
|
|
14
|
+
BIGGER= "bigger",
|
|
15
|
+
LESS= "less",
|
|
16
|
+
}
|
|
10
17
|
|
|
11
18
|
type User = {
|
|
12
19
|
_id: number;
|