robbyson-frontend-library 0.0.1-rc7 → 0.0.1-rc9
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/overlay/overlay.interface.js +1 -0
- package/dist/components/pages/base-app-page.styles.js +6 -3
- package/dist/constants/layout-dimensions.constants.js +3 -2
- package/dist/services/validations.service.interface.js +1 -0
- package/dist/utils/robbyson-navigate.js +7 -0
- package/index.d.ts +12 -5
- package/package.json +5 -5
- package/src/components/accordion/accordion.interface.ts +2 -1
- package/src/components/badge/badge.interface.ts +3 -2
- package/src/components/base-component.prop.interface.ts +2 -0
- package/src/components/{base-page.prop.interface.tsx → base-page.prop.interface.ts} +1 -2
- package/src/components/filter/basic-button.types.d.ts +9 -0
- package/src/components/filter/filter.interface.tsx +59 -0
- package/src/components/filter/index.d.ts +1 -0
- package/src/components/header-context-menu/header-context-menu.interface.ts +13 -0
- package/src/components/header-context-menu/header-context-menu.types.d.ts +9 -0
- package/src/components/header-context-menu/index.d.ts +1 -0
- package/src/components/loading/index.d.ts +1 -0
- package/src/components/loading/loading.interface.ts +10 -0
- package/src/components/loading/loading.types.d.ts +9 -0
- package/src/components/{menu.interface.tsx → menu.interface.ts} +6 -0
- package/src/components/mobile-filter/index.d.ts +1 -0
- package/src/components/mobile-filter/mobile-filter.interface.ts +8 -0
- package/src/components/mobile-filter/mobile-filter.types.d.ts +9 -0
- package/src/components/modal/modal.interface.ts +3 -2
- package/src/components/overlay/index.d.ts +1 -0
- package/src/components/overlay/overlay.interface.ts +7 -0
- package/src/components/overlay/overlay.types.d.ts +9 -0
- package/src/components/pages/base-app-page.component.tsx +15 -13
- package/src/components/pages/base-app-page.styles.ts +39 -6
- package/src/components/pagination/pagination.interface.ts +2 -2
- package/src/components/pdf-viewer/index.d.ts +1 -0
- package/src/components/pdf-viewer/pdf-viewer.interface.ts +5 -0
- package/src/components/pdf-viewer/pdf-viewer.types.d.ts +10 -0
- package/src/components/scroll-box/scroll-box.interface.ts +2 -1
- package/src/components/sidebar/sidebar.interface.ts +12 -9
- package/src/components/sort/index.d.ts +1 -0
- package/src/components/sort/sort.interface.ts +21 -0
- package/src/components/sort/sort.types.d.ts +9 -0
- package/src/components/tags/tags.interface.ts +2 -1
- package/src/components/text-field/{text-field.interface.tsx → text-field.interface.ts} +1 -0
- package/src/components/toggle-icon-button/toggle-icon-button.interface.ts +1 -1
- package/src/constants/layout-dimensions.constants.ts +3 -2
- package/src/factories/index.ts +2 -1
- package/src/factories/query-params.factory.ts +82 -0
- package/src/factories/response.factory.ts +1 -1
- package/src/index.ts +4 -0
- package/src/models/guidance-category.model.ts +8 -0
- package/src/models/guidance-query.model.ts +11 -0
- package/src/models/guidance.model.ts +58 -0
- package/src/models/http-response.model.ts +14 -0
- package/src/models/index.d.ts +4 -0
- package/src/models/theme-base.ts +3 -1
- package/src/repositories/guidance.repository.interface.ts +11 -0
- package/src/repositories/index.d.ts +2 -1
- package/src/services/authentication.service.interface.ts +2 -0
- package/src/services/dtos/example.dto.ts +1 -0
- package/src/services/dtos/index.ts +1 -0
- package/src/services/guidance.service.interface.ts +27 -0
- package/src/services/index.d.ts +3 -0
- package/src/services/validations.service.interface.ts +5 -0
- package/src/states/main-container/root-app.state.interface.ts +1 -1
- package/src/utils/build-error/buildError.util.ts +1 -1
- package/src/utils/robbyson-navigate.ts +18 -2
- package/src/components/base-component.prop.interface.tsx +0 -4
- package/src/components/snackbar/index.d.ts +0 -1
- package/src/components/snackbar/snackbar.interface.ts +0 -16
- package/src/components/snackbar/snackbar.types.d.ts +0 -9
- /package/src/components/assets/{assets.interfaces.tsx → assets.interfaces.ts} +0 -0
- /package/src/components/{base-test.prop.interface.tsx → base-test.prop.interface.ts} +0 -0
- /package/src/components/basic-button/{basic-button.interface.tsx → basic-button.interface.ts} +0 -0
- /package/src/components/colors/{colors.interfaces.tsx → colors.interfaces.ts} +0 -0
- /package/src/components/divider/{divider.interface.tsx → divider.interface.ts} +0 -0
- /package/src/components/{index.tsx → index.ts} +0 -0
- /package/src/components/progress-bar/{progress-bar.interface.tsx → progress-bar.interface.ts} +0 -0
- /package/src/components/progress-tracker/{progress-tracker.interface.tsx → progress-tracker.interface.ts} +0 -0
- /package/src/components/select/{select.interface.tsx → select.interface.ts} +0 -0
- /package/src/components/typography/{typography.interfaces.tsx → typography.interfaces.ts} +0 -0
- /package/src/components/upload/{upload.interface.tsx → upload.interface.ts} +0 -0
- /package/src/repositories/{base.repository.tsx → base.repository.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -4,10 +4,13 @@ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cook
|
|
|
4
4
|
};
|
|
5
5
|
import { LayoutDimensions } from "../../constants";
|
|
6
6
|
import styled from "styled-components";
|
|
7
|
+
import SVG from "react-inlinesvg";
|
|
7
8
|
var SIDEBAR_WIDTH = 72;
|
|
8
|
-
export var PageContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n background: var(--solid-background);\n height: 100%;\n\n @media (max-width: ", "px) {\n padding: 32px 24px 24px calc(", "px + 24px);\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px 16px calc(", "px + 16px);\n }\n"], ["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n background: var(--solid-background);\n height: 100%;\n\n @media (max-width: ", "px) {\n padding: 32px 24px 24px calc(", "px + 24px);\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px 16px calc(", "px + 16px);\n }\n"])), SIDEBAR_WIDTH, LayoutDimensions.
|
|
9
|
-
export var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex !important;\n flex-direction: row !important;\n justify-content: space-between !important;\n align-items: center !important;\n padding-bottom: 8px;\n gap: 16px !important;\n\n & > div {\n display: flex;\n align-items: center;\n }\n\n svg {\n cursor: pointer;\n }\n"], ["\n display: flex !important;\n flex-direction: row !important;\n justify-content: space-between !important;\n align-items: center !important;\n padding-bottom: 8px;\n gap: 16px !important;\n\n & > div {\n display: flex;\n align-items: center;\n }\n\n svg {\n cursor: pointer;\n }\n"])));
|
|
9
|
+
export var PageContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n background: var(--solid-background);\n height: 100%;\n\n @media (max-width: ", "px) {\n padding: 32px 24px 24px calc(", "px + 24px);\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px 16px calc(", "px + 16px);\n }\n"], ["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n background: var(--solid-background);\n height: 100%;\n\n @media (max-width: ", "px) {\n padding: 32px 24px 24px calc(", "px + 24px);\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px 16px calc(", "px + 16px);\n }\n"])), SIDEBAR_WIDTH, LayoutDimensions.width.horizontalIpadMini, SIDEBAR_WIDTH, LayoutDimensions.width.mobile, SIDEBAR_WIDTH);
|
|
10
|
+
export var Header = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex !important;\n flex-direction: row !important;\n justify-content: space-between !important;\n align-items: center !important;\n padding-bottom: 8px;\n gap: 16px !important;\n\n @media (max-width: ", "px) {\n flex-direction: column !important;\n align-items: flex-start !important;\n }\n\n & > div {\n display: flex;\n align-items: center;\n }\n\n svg {\n cursor: pointer;\n }\n"], ["\n display: flex !important;\n flex-direction: row !important;\n justify-content: space-between !important;\n align-items: center !important;\n padding-bottom: 8px;\n gap: 16px !important;\n\n @media (max-width: ", "px) {\n flex-direction: column !important;\n align-items: flex-start !important;\n }\n\n & > div {\n display: flex;\n align-items: center;\n }\n\n svg {\n cursor: pointer;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
|
|
10
11
|
export var ContextMenu = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
|
|
11
12
|
export var Title = styled.h4(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-left: 12px;\n"], ["\n margin-left: 12px;\n"])));
|
|
12
13
|
export var Content = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject([""], [""])));
|
|
13
|
-
var
|
|
14
|
+
export var LeftArrowLarge = styled(SVG)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n display: none;\n\n @media (min-width: ", "px) {\n display: block;\n }\n"], ["\n display: none;\n\n @media (min-width: ", "px) {\n display: block;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
|
|
15
|
+
export var HamburgerMenu = styled(SVG)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: none;\n\n @media (max-width: ", "px) {\n display: block;\n }\n"], ["\n display: none;\n\n @media (max-width: ", "px) {\n display: block;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
|
|
16
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
var LayoutDimensions = /** @class */ (function () {
|
|
2
2
|
function LayoutDimensions() {
|
|
3
3
|
}
|
|
4
|
-
LayoutDimensions.
|
|
5
|
-
|
|
4
|
+
LayoutDimensions.width = {
|
|
5
|
+
horizontalIpadMini: 1133,
|
|
6
|
+
verticalIpadMini: 744,
|
|
6
7
|
mobile: 412,
|
|
7
8
|
};
|
|
8
9
|
return LayoutDimensions;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -11,6 +11,13 @@ var RobbysonNavigate = /** @class */ (function () {
|
|
|
11
11
|
// TODO: Usar a LIB PATH para concatenar a URL
|
|
12
12
|
history.push("/operacao".concat(url));
|
|
13
13
|
};
|
|
14
|
+
RobbysonNavigate.go = function (delta) {
|
|
15
|
+
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
16
|
+
RobbysonNavigate._globalState =
|
|
17
|
+
RobbysonNavigate._globalStore.GetGlobalState();
|
|
18
|
+
var history = RobbysonNavigate._globalState.Global.RootApp.history;
|
|
19
|
+
history.go(delta);
|
|
20
|
+
};
|
|
14
21
|
RobbysonNavigate.back = function () {
|
|
15
22
|
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
16
23
|
RobbysonNavigate._globalState =
|
package/index.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export * from "./src/models";
|
|
|
3
3
|
export * from "./src/factories";
|
|
4
4
|
export * from "./src/repositories/";
|
|
5
5
|
export * from "./src/services/";
|
|
6
|
-
export * from "./src/utils"
|
|
6
|
+
export * from "./src/utils";
|
|
7
7
|
export * from "./src/constants";
|
|
8
8
|
export * from "./src/components/";
|
|
9
9
|
export * from "./src/components/assets";
|
|
@@ -11,17 +11,16 @@ export * from "./src/components/badge";
|
|
|
11
11
|
export * from "./src/components/basic-button";
|
|
12
12
|
export * from "./src/components/colors";
|
|
13
13
|
export * from "./src/components/checkbox";
|
|
14
|
-
export * from "./src/components/divider"
|
|
14
|
+
export * from "./src/components/divider";
|
|
15
15
|
export * from "./src/components/context-menu";
|
|
16
|
-
export * from "./src/components/speed-dial"
|
|
16
|
+
export * from "./src/components/speed-dial";
|
|
17
17
|
export * from "./src/components/icon-button";
|
|
18
18
|
export * from "./src/components/mood-button";
|
|
19
19
|
export * from "./src/components/profile-image";
|
|
20
|
-
export * from "./src/components/progress-bar"
|
|
20
|
+
export * from "./src/components/progress-bar";
|
|
21
21
|
export * from "./src/components/progress-tracker";
|
|
22
22
|
export * from "./src/components/radio-button";
|
|
23
23
|
export * from "./src/components/search-input";
|
|
24
|
-
export * from "./src/components/snackbar";
|
|
25
24
|
export * from "./src/components/spin-edit";
|
|
26
25
|
export * from "./src/components/switch";
|
|
27
26
|
export * from "./src/components/tag-expand";
|
|
@@ -32,6 +31,7 @@ export * from "./src/components/typography";
|
|
|
32
31
|
export * from "./src/components/tags";
|
|
33
32
|
export * from "./src/components/timer";
|
|
34
33
|
export * from "./src/components/sidebar";
|
|
34
|
+
export * from "./src/components/toggle-icon-button";
|
|
35
35
|
export * from "./src/components/scroll-box";
|
|
36
36
|
export * from "./src/components/select";
|
|
37
37
|
export * from "./src/components/accordion";
|
|
@@ -40,4 +40,11 @@ export * from "./src/components/modal";
|
|
|
40
40
|
export * from "./src/components/pagination";
|
|
41
41
|
export * from "./src/components/upload";
|
|
42
42
|
export * from "./src/components/balloon";
|
|
43
|
+
export * from "./src/components/pdf-viewer";
|
|
43
44
|
export * from "./src/components/toggle-icon-button";
|
|
45
|
+
export * from "./src/components/overlay";
|
|
46
|
+
export * from "./src/components/header-context-menu";
|
|
47
|
+
export * from "./src/components/sort";
|
|
48
|
+
export * from "./src/components/mobile-filter";
|
|
49
|
+
export * from "./src/components/loading";
|
|
50
|
+
export * from "./src/components/filter";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "robbyson-frontend-library",
|
|
3
|
-
"version": "0.0.1-
|
|
3
|
+
"version": "0.0.1-rc9",
|
|
4
4
|
"description": "Robbyson frontend Library",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,23 +18,23 @@
|
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
20
|
"@types/axios": "^0.14.0",
|
|
21
|
+
"@types/crypto-js": "^4.1.1",
|
|
21
22
|
"@types/react": "^18.0.27",
|
|
22
23
|
"@types/styled-components": "^5.1.26",
|
|
23
24
|
"styled-components": "^5.3.9",
|
|
24
25
|
"typescript": "^4.9.5"
|
|
25
26
|
},
|
|
26
27
|
"dependencies": {
|
|
27
|
-
"@types/crypto-js": "^4.1.1",
|
|
28
28
|
"axios": "^1.3.5",
|
|
29
29
|
"crypto-js": "^4.1.1",
|
|
30
|
-
"history": "^5.3.0",
|
|
31
30
|
"localforage": "^1.10.0",
|
|
32
31
|
"moment": "^2.29.4",
|
|
33
|
-
"query-string": "^8.1.0",
|
|
34
32
|
"react": "^18.2.0",
|
|
35
33
|
"react-inlinesvg": "^3.0.2",
|
|
34
|
+
"query-string": "^8.1.0",
|
|
36
35
|
"react-toastify": "^9.1.2",
|
|
37
36
|
"redux-micro-frontend": "^1.3.0",
|
|
38
|
-
"redux-persist": "^6.0.0"
|
|
37
|
+
"redux-persist": "^6.0.0",
|
|
38
|
+
"history": "^5.3.0"
|
|
39
39
|
}
|
|
40
40
|
}
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { IconHandle } from "../../models";
|
|
2
3
|
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
3
4
|
|
|
4
|
-
export interface IBadgeProps extends IBaseComponentProp {
|
|
5
|
+
export interface IBadgeProps extends IBaseComponentProp, React.HTMLAttributes<any> {
|
|
5
6
|
value?: number;
|
|
6
7
|
type: 'icon' | 'number';
|
|
7
8
|
size: 'small' | 'normal'
|
|
8
9
|
iconHandle?: IconHandle;
|
|
9
10
|
onUpdate?(value:number):void;
|
|
10
11
|
color?: string;
|
|
11
|
-
}
|
|
12
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module 'styleguide/Filter' {
|
|
5
|
+
import { IFilterProps } from "robbyson-frontend-library";
|
|
6
|
+
const Filter: React.ComponentType<IFilterProps>;
|
|
7
|
+
|
|
8
|
+
export default Filter;
|
|
9
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { IconHandle } from "../../models";
|
|
2
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
3
|
+
|
|
4
|
+
export interface IFilterState {
|
|
5
|
+
filters: Array<
|
|
6
|
+
IFilter & {
|
|
7
|
+
searchCategories?: Array<string | undefined>;
|
|
8
|
+
showCategoryFilter?: boolean;
|
|
9
|
+
}
|
|
10
|
+
>;
|
|
11
|
+
width: number;
|
|
12
|
+
changedFilters: Array<
|
|
13
|
+
| {
|
|
14
|
+
id: number;
|
|
15
|
+
variant: IFilter["variant"];
|
|
16
|
+
option: IOption;
|
|
17
|
+
}
|
|
18
|
+
| undefined
|
|
19
|
+
>;
|
|
20
|
+
searchingFilter: number | undefined;
|
|
21
|
+
filterReturn: IFilterReturn;
|
|
22
|
+
openFilter: number | undefined;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface IFilterProps extends IBaseComponentProp {
|
|
26
|
+
filters: Array<IFilter>;
|
|
27
|
+
type: "default" | "sidebar";
|
|
28
|
+
showMobileOrSideBar: boolean;
|
|
29
|
+
subtitle?: string;
|
|
30
|
+
onFilter(filter: {}): void;
|
|
31
|
+
onClose?(): void;
|
|
32
|
+
debounceTime?: number;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export interface IFilter {
|
|
36
|
+
title: string;
|
|
37
|
+
variant: "radio" | "checkbox";
|
|
38
|
+
id: number;
|
|
39
|
+
options: Array<IOption>;
|
|
40
|
+
searchInput?: boolean;
|
|
41
|
+
searchInputValue?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface IOption {
|
|
45
|
+
name: string;
|
|
46
|
+
value: string | number;
|
|
47
|
+
hasChildren?: boolean;
|
|
48
|
+
iconHandle?: IconHandle;
|
|
49
|
+
checked?: boolean;
|
|
50
|
+
category?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface IFilterReturn {
|
|
54
|
+
[key: string]: any;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type IOptionsByCategories = Array<
|
|
58
|
+
{ category: string; options: [IOption & { realIndex: number }] } | undefined
|
|
59
|
+
>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './filter.interface';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
|
+
|
|
3
|
+
export interface IHeaderContextMenuProps extends IBaseComponentProp {
|
|
4
|
+
onClick?(buttonName: string | undefined): void;
|
|
5
|
+
buttons: Array<IHeaderContextMenuButtons>;
|
|
6
|
+
activeButton?: IHeaderContextMenuButtons;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface IHeaderContextMenuState {
|
|
10
|
+
activeButton: undefined | IHeaderContextMenuButtons;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type IHeaderContextMenuButtons = "notification" | "quiz" | "informative" | "chat" | "guidance_all" | "guidance_favorites";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module 'styleguide/HeaderContextMenu' {
|
|
5
|
+
import { IHeaderContextMenuProps } from "robbyson-frontend-library";
|
|
6
|
+
const HeaderContextMenu: React.ComponentType<IHeaderContextMenuProps>;
|
|
7
|
+
|
|
8
|
+
export default HeaderContextMenu;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './header-context-menu.interface';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './loading.interface';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/Loader" {
|
|
5
|
+
import { ILoaderProps } from "robbyson-frontend-library";
|
|
6
|
+
const Loader: React.ComponentType<ILoaderProps>;
|
|
7
|
+
|
|
8
|
+
export default Loader;
|
|
9
|
+
}
|
|
@@ -3,8 +3,14 @@ export type MenuItem = {
|
|
|
3
3
|
iconHandle: string,
|
|
4
4
|
linkTo: string,
|
|
5
5
|
disabled?: boolean
|
|
6
|
+
matchPath?: string;
|
|
6
7
|
}
|
|
7
8
|
|
|
8
9
|
export interface IMenuProps {
|
|
9
10
|
items: MenuItem[]
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface IMenuState {
|
|
14
|
+
expanded: boolean,
|
|
15
|
+
location: string,
|
|
10
16
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './mobile-filter.interface';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/MobileFilter" {
|
|
5
|
+
import { IMobileFilterProps } from "robbyson-frontend-library";
|
|
6
|
+
const MobileFilter: React.ComponentType<IMobileFilterProps>;
|
|
7
|
+
|
|
8
|
+
export default MobileFilter;
|
|
9
|
+
}
|
|
@@ -14,7 +14,8 @@ export interface IModalProps extends IBaseComponentProp {
|
|
|
14
14
|
children: any;
|
|
15
15
|
width?: number;
|
|
16
16
|
height?: number;
|
|
17
|
-
|
|
17
|
+
closeIcon?: boolean;
|
|
18
|
+
titleHandleLocale?: string;
|
|
18
19
|
actionButtons?: ActionButton[];
|
|
19
|
-
|
|
20
|
+
overlayZindex?: string;
|
|
20
21
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './overlay.interface';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/Overlay" {
|
|
5
|
+
import { IOverlayProps } from "robbyson-frontend-library";
|
|
6
|
+
const Overlay: React.ComponentType<IOverlayProps<any>>;
|
|
7
|
+
|
|
8
|
+
export default Overlay;
|
|
9
|
+
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { IoC } from "../../ioc";
|
|
3
3
|
import {
|
|
4
|
-
IAuthenticationService,
|
|
5
4
|
ILocaleService,
|
|
6
|
-
IThemeService
|
|
5
|
+
IThemeService
|
|
7
6
|
} from "../../services";
|
|
8
|
-
import SVG from "react-inlinesvg";
|
|
9
7
|
|
|
10
8
|
import {
|
|
11
9
|
PageContainer,
|
|
@@ -13,45 +11,49 @@ import {
|
|
|
13
11
|
Title,
|
|
14
12
|
ContextMenu,
|
|
15
13
|
Content,
|
|
14
|
+
LeftArrowLarge,
|
|
15
|
+
Block,
|
|
16
16
|
} from "./base-app-page.styles";
|
|
17
17
|
import { RobbysonNavigate } from "../../utils";
|
|
18
|
+
import { QueryParamsFactory } from "../../factories/query-params.factory";
|
|
18
19
|
|
|
19
20
|
export abstract class BaseAppPage<T, T1> extends React.Component<T, T1> {
|
|
20
21
|
protected headerLocale: string = "Header Locale";
|
|
21
|
-
|
|
22
|
+
protected abstract paramsValidValues: {};
|
|
23
|
+
protected abstract paramsDefaultValues: {};
|
|
22
24
|
protected _localeService: ILocaleService;
|
|
23
|
-
protected _authenticationService: IAuthenticationService;
|
|
24
25
|
protected _themeService: IThemeService;
|
|
25
26
|
|
|
26
27
|
constructor(props: T) {
|
|
27
28
|
super(props);
|
|
28
29
|
this.translate = this.translate.bind(this);
|
|
29
30
|
this._localeService = IoC.GetInstance<ILocaleService>("LocaleService");
|
|
30
|
-
this._authenticationService = IoC.GetInstance<IAuthenticationService>(
|
|
31
|
-
"AuthenticationService"
|
|
32
|
-
);
|
|
33
31
|
this._themeService = IoC.GetInstance<IThemeService>("ThemeService");
|
|
34
32
|
}
|
|
35
33
|
|
|
36
|
-
public translate(text?: string): string {
|
|
37
|
-
return this._localeService.getLocaleByHandle(text || "");
|
|
34
|
+
public translate(text?: string, ...args: string[]): string {
|
|
35
|
+
return this._localeService.getLocaleByHandle(text || "", ...args);
|
|
38
36
|
}
|
|
39
37
|
|
|
40
|
-
|
|
38
|
+
abstract contextMenu(): React.ReactNode;
|
|
41
39
|
|
|
42
|
-
|
|
40
|
+
abstract renderPage(): React.ReactNode;
|
|
43
41
|
|
|
44
42
|
public render() {
|
|
43
|
+
QueryParamsFactory.validate(this.paramsValidValues, this.paramsDefaultValues)
|
|
45
44
|
return (
|
|
46
45
|
<PageContainer>
|
|
47
46
|
<Header>
|
|
48
47
|
<div>
|
|
49
|
-
<
|
|
48
|
+
<LeftArrowLarge
|
|
50
49
|
src={this._themeService.getIconAssetUrl(
|
|
51
50
|
"left-arrow-large"
|
|
52
51
|
)}
|
|
53
52
|
onClick={() => RobbysonNavigate.back()}
|
|
54
53
|
/>
|
|
54
|
+
|
|
55
|
+
<Block />
|
|
56
|
+
|
|
55
57
|
<Title>{this.translate(this.headerLocale)}</Title>
|
|
56
58
|
</div>
|
|
57
59
|
<ContextMenu className="body-2-book">
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { LayoutDimensions } from "../../constants";
|
|
2
2
|
import styled from "styled-components";
|
|
3
|
+
import SVG from "react-inlinesvg";
|
|
3
4
|
|
|
4
5
|
const SIDEBAR_WIDTH = 72;
|
|
5
6
|
|
|
6
7
|
export const PageContainer = styled.div`
|
|
7
8
|
padding: 32px 55px 47px calc(${SIDEBAR_WIDTH}px + 55px);
|
|
8
9
|
|
|
9
|
-
background: var(--solid-background);
|
|
10
10
|
height: 100%;
|
|
11
11
|
|
|
12
|
-
@media (max-width: ${LayoutDimensions.
|
|
13
|
-
padding: 32px 24px
|
|
12
|
+
@media (max-width: ${LayoutDimensions.width.horizontalIpadMini}px) {
|
|
13
|
+
padding: 32px 24px;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
@media (max-width: ${LayoutDimensions.
|
|
17
|
-
padding: 24px 16px
|
|
16
|
+
@media (max-width: ${LayoutDimensions.width.mobile}px) {
|
|
17
|
+
padding: 24px 16px;
|
|
18
18
|
}
|
|
19
19
|
`;
|
|
20
20
|
|
|
@@ -26,6 +26,11 @@ export const Header = styled.div`
|
|
|
26
26
|
padding-bottom: 8px;
|
|
27
27
|
gap: 16px !important;
|
|
28
28
|
|
|
29
|
+
@media (max-width: ${LayoutDimensions.width.horizontalIpadMini}px) {
|
|
30
|
+
flex-direction: column !important;
|
|
31
|
+
align-items: flex-start !important;
|
|
32
|
+
}
|
|
33
|
+
|
|
29
34
|
& > div {
|
|
30
35
|
display: flex;
|
|
31
36
|
align-items: center;
|
|
@@ -36,10 +41,38 @@ export const Header = styled.div`
|
|
|
36
41
|
}
|
|
37
42
|
`;
|
|
38
43
|
|
|
39
|
-
export const ContextMenu = styled.div
|
|
44
|
+
export const ContextMenu = styled.div`
|
|
45
|
+
-ms-overflow-style: none;
|
|
46
|
+
scrollbar-width: none;
|
|
47
|
+
overflow-y: scroll;
|
|
48
|
+
&::-webkit-scrollbar {
|
|
49
|
+
display: none;
|
|
50
|
+
}
|
|
51
|
+
@media (max-width: ${LayoutDimensions.width.horizontalIpadMini}px) {
|
|
52
|
+
width: 100%;
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
40
55
|
|
|
41
56
|
export const Title = styled.h4`
|
|
42
57
|
margin-left: 12px;
|
|
43
58
|
`;
|
|
44
59
|
|
|
45
60
|
export const Content = styled.div``;
|
|
61
|
+
|
|
62
|
+
export const LeftArrowLarge = styled(SVG)`
|
|
63
|
+
display: none;
|
|
64
|
+
|
|
65
|
+
@media (min-width: ${LayoutDimensions.width.horizontalIpadMini + 1}px) {
|
|
66
|
+
display: block;
|
|
67
|
+
}
|
|
68
|
+
`;
|
|
69
|
+
|
|
70
|
+
export const Block = styled.div`
|
|
71
|
+
display: none;
|
|
72
|
+
|
|
73
|
+
@media (max-width: ${LayoutDimensions.width.horizontalIpadMini}px) {
|
|
74
|
+
display: block;
|
|
75
|
+
width: 24px;
|
|
76
|
+
height: 24px;
|
|
77
|
+
}
|
|
78
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './pdf-viewer.interface';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
///<reference types="react" />
|
|
2
|
+
///<reference types="robbyson-frontend-library" />
|
|
3
|
+
|
|
4
|
+
declare module "styleguide/PDFViewer" {
|
|
5
|
+
import { IPDFViewerProps } from "robbyson-frontend-library";
|
|
6
|
+
const PDFViewer: React.ComponentType<IPDFViewerProps>;
|
|
7
|
+
|
|
8
|
+
export default PDFViewer;
|
|
9
|
+
}
|
|
10
|
+
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
3
3
|
|
|
4
4
|
export interface IScrollBoxProps extends IBaseComponentProp {
|
|
5
|
-
height:
|
|
5
|
+
height: string;
|
|
6
6
|
children: React.ReactNode;
|
|
7
7
|
onScrollBottom?(): void;
|
|
8
8
|
className?: string;
|
|
9
|
+
hideScrollBar?: boolean;
|
|
9
10
|
}
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
2
2
|
|
|
3
3
|
export interface ISidebarProps extends IBaseComponentProp {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
4
|
+
show: boolean;
|
|
5
|
+
position: "left" | "right";
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
onClose: () => void;
|
|
8
|
+
titleLocaleHandle: string;
|
|
9
|
+
height?: number;
|
|
10
|
+
width?: number;
|
|
11
|
+
top?: number;
|
|
12
|
+
overlayZindex?: string;
|
|
13
|
+
showOverlay?: boolean;
|
|
14
|
+
subtitle?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sort.interface';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IconHandle } from "../../models";
|
|
2
|
+
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
3
|
+
|
|
4
|
+
export interface ISortProps extends IBaseComponentProp {
|
|
5
|
+
titleLocaleHandle?: string;
|
|
6
|
+
options: Array<{ nameLocaleHandle: string; value: string | number }>;
|
|
7
|
+
defaultOption: string | number;
|
|
8
|
+
icon: IconHandle;
|
|
9
|
+
onChangeOption?(option: {
|
|
10
|
+
nameLocaleHandle: string;
|
|
11
|
+
value: string | number;
|
|
12
|
+
}): void;
|
|
13
|
+
hideOnMouseOver?: boolean;
|
|
14
|
+
hideOnChangeOption?: boolean;
|
|
15
|
+
width?: string | number;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ISortState {
|
|
19
|
+
showSort: boolean;
|
|
20
|
+
sortValue: string | number;
|
|
21
|
+
}
|
|
@@ -4,8 +4,9 @@ import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
|
4
4
|
export interface ITagsState {
|
|
5
5
|
show: boolean;
|
|
6
6
|
}
|
|
7
|
-
export interface ITagsProps<T> extends IBaseComponentProp {
|
|
7
|
+
export interface ITagsProps<T> extends IBaseComponentProp, React.HTMLAttributes<T> {
|
|
8
8
|
closeable?: boolean;
|
|
9
|
+
fillIcon?: string;
|
|
9
10
|
iconHandle?: IconHandle;
|
|
10
11
|
children?: any;
|
|
11
12
|
variant?: "primary" | "secondary";
|
|
@@ -9,8 +9,8 @@ export interface IToggleIconButtonProps<T> extends React.ButtonHTMLAttributes<T>
|
|
|
9
9
|
active?: boolean,
|
|
10
10
|
disabled?: boolean,
|
|
11
11
|
disabledIconHandle?: IconHandle,
|
|
12
|
+
fatherControl?: boolean,
|
|
12
13
|
}
|
|
13
|
-
|
|
14
14
|
export interface IToggleIconButtonState {
|
|
15
15
|
active: boolean,
|
|
16
16
|
}
|
package/src/factories/index.ts
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export * from './response.factory';
|
|
1
|
+
export * from './response.factory';
|
|
2
|
+
export * from './query-params.factory';
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { BaseFactory } from "./base.factory";
|
|
2
|
+
import { RobbysonNavigate } from "../utils";
|
|
3
|
+
|
|
4
|
+
export class QueryParamsFactory implements BaseFactory {
|
|
5
|
+
private static checkDefaultValues(
|
|
6
|
+
validValues: {},
|
|
7
|
+
defaultValues: {}
|
|
8
|
+
): void {
|
|
9
|
+
// Verifica se os parâmetros validados possuem um valor padrão
|
|
10
|
+
for (const [key, value] of Object.entries(validValues || [])) {
|
|
11
|
+
if (!defaultValues.hasOwnProperty(key))
|
|
12
|
+
throw `The "${key}" query parameter does not have a default value.`;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public static validate<T>(validValues: {}, defaultValues: {}): void {
|
|
17
|
+
const queryParams = RobbysonNavigate.getQueryParams<T>();
|
|
18
|
+
|
|
19
|
+
this.checkDefaultValues(validValues, defaultValues);
|
|
20
|
+
|
|
21
|
+
// Transforma a variável 'queryParams' em um objeto
|
|
22
|
+
if (Object.prototype.toString.call(queryParams) === "[object Object]") {
|
|
23
|
+
const queryParamsCopy = Object(queryParams);
|
|
24
|
+
|
|
25
|
+
for (const [queryParamsKey, queryParamsValue] of Object.entries(
|
|
26
|
+
queryParamsCopy
|
|
27
|
+
)!) {
|
|
28
|
+
for (const [key, value] of Object.entries(validValues)) {
|
|
29
|
+
// Verifica se o parâmetro da URL é o mesmo parâmetro da validação que está sendo iterado
|
|
30
|
+
if (queryParamsKey === key) {
|
|
31
|
+
|
|
32
|
+
// Caso os valores permitidos para esse parâmetro estejam em um objeto, será convertido para um array
|
|
33
|
+
if (value instanceof Object) {
|
|
34
|
+
let validValuesToArray = [];
|
|
35
|
+
for (const [
|
|
36
|
+
objectKey,
|
|
37
|
+
objectValue,
|
|
38
|
+
] of Object.entries(value)) {
|
|
39
|
+
validValuesToArray.push(String(objectValue));
|
|
40
|
+
}
|
|
41
|
+
// Caso o valor do parâmetro atual que está na url não seja um valor válido, o valor padrão será definido
|
|
42
|
+
if (
|
|
43
|
+
!validValuesToArray.includes(
|
|
44
|
+
String(queryParamsValue)
|
|
45
|
+
)
|
|
46
|
+
) {
|
|
47
|
+
RobbysonNavigate.setQueryParams(
|
|
48
|
+
queryParamsKey,
|
|
49
|
+
defaultValues[
|
|
50
|
+
String(
|
|
51
|
+
queryParamsKey
|
|
52
|
+
) as keyof typeof defaultValues
|
|
53
|
+
]
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
} else if (value instanceof Array) {
|
|
57
|
+
if (!value.includes(String(queryParamsValue)))
|
|
58
|
+
RobbysonNavigate.setQueryParams(
|
|
59
|
+
queryParamsKey,
|
|
60
|
+
defaultValues[
|
|
61
|
+
String(
|
|
62
|
+
queryParamsKey
|
|
63
|
+
) as keyof typeof defaultValues
|
|
64
|
+
]
|
|
65
|
+
);
|
|
66
|
+
} else if (value instanceof String || value instanceof Number) {
|
|
67
|
+
if (String(value) !== String(queryParamsValue))
|
|
68
|
+
RobbysonNavigate.setQueryParams(
|
|
69
|
+
queryParamsKey,
|
|
70
|
+
defaultValues[
|
|
71
|
+
String(
|
|
72
|
+
queryParamsKey
|
|
73
|
+
) as keyof typeof defaultValues
|
|
74
|
+
]
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -9,6 +9,10 @@ export * from "./models/user-mirror.model";
|
|
|
9
9
|
export * from "./models/user-session.model";
|
|
10
10
|
export * from "./models/send-user-to-login.model";
|
|
11
11
|
export * from "./models/angel-friend-status.model";
|
|
12
|
+
export * from "./models/guidance-category.model";
|
|
13
|
+
export * from "./models/guidance.model";
|
|
14
|
+
export * from "./models/guidance-query.model";
|
|
15
|
+
export * from "./models/http-response.model";
|
|
12
16
|
|
|
13
17
|
// Repositories
|
|
14
18
|
export * from "./repositories/base.repository";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
2
|
+
|
|
3
|
+
export class GuidanceQueryListModel extends BaseRepositoryModel {
|
|
4
|
+
name?: string;
|
|
5
|
+
categoryId?: string;
|
|
6
|
+
period?:number;
|
|
7
|
+
page?: number;
|
|
8
|
+
per?: number;
|
|
9
|
+
orderBy?: string;
|
|
10
|
+
orderDirection?: "asc" | "desc";
|
|
11
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
2
|
+
import { GuidanceCategoryModel } from "./guidance-category.model";
|
|
3
|
+
|
|
4
|
+
export class GuidanceModel extends BaseRepositoryModel {
|
|
5
|
+
_id: string;
|
|
6
|
+
revision: number;
|
|
7
|
+
tags: string[];
|
|
8
|
+
allowDownload: boolean;
|
|
9
|
+
visibilityType: string;
|
|
10
|
+
files: GuidanceFileObject[];
|
|
11
|
+
name: string;
|
|
12
|
+
description: string;
|
|
13
|
+
category: GuidanceCategoryModel;
|
|
14
|
+
status: string;
|
|
15
|
+
visibleFrom: string;
|
|
16
|
+
visibleUntil: string;
|
|
17
|
+
content: string;
|
|
18
|
+
contentType: string;
|
|
19
|
+
coverImageMetaData: FileMetaData;
|
|
20
|
+
fileMetaData: FileMetaData;
|
|
21
|
+
firstLetter: string;
|
|
22
|
+
createdBy: User;
|
|
23
|
+
updatedBy: User;
|
|
24
|
+
visibleToUsers: string[];
|
|
25
|
+
notVisibleToUsers: string[];
|
|
26
|
+
visibleToAttributeValues: string[];
|
|
27
|
+
notVisibleToAttributeValues: string[];
|
|
28
|
+
visibleToHierarchyLevels: string[];
|
|
29
|
+
notVisibleToHierarchyLevels: string[];
|
|
30
|
+
visibleToGroups: string[];
|
|
31
|
+
notVisibleToGroups: string[];
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
updatedAt: Date;
|
|
34
|
+
isFavorite: boolean;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export class GuidanceFileObject {
|
|
38
|
+
fileMetaData: FileMetaData;
|
|
39
|
+
contentType: string;
|
|
40
|
+
allowDownload?: boolean;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
class FileMetaData {
|
|
44
|
+
_id: string;
|
|
45
|
+
token: string;
|
|
46
|
+
fileType: string;
|
|
47
|
+
fileName: string;
|
|
48
|
+
fileMD5: string;
|
|
49
|
+
publicUrl: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
class User {
|
|
53
|
+
_id: number;
|
|
54
|
+
name: string;
|
|
55
|
+
identification: string;
|
|
56
|
+
login: string;
|
|
57
|
+
}
|
|
58
|
+
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class HttpListResponse<T> {
|
|
2
|
+
data: T;
|
|
3
|
+
meta: GenericHttpListResponseMeta | Record<string, never>;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
class GenericHttpListResponseMeta {
|
|
7
|
+
orderBy: string;
|
|
8
|
+
orderDirection: "DESC" | "ASC";
|
|
9
|
+
page: number;
|
|
10
|
+
per: number;
|
|
11
|
+
total: number;
|
|
12
|
+
totalDocs: number;
|
|
13
|
+
type: string;
|
|
14
|
+
}
|
package/src/models/index.d.ts
CHANGED
|
@@ -5,3 +5,7 @@ export * from "./result-level.model";
|
|
|
5
5
|
export * from "./angel-friend-status.model";
|
|
6
6
|
export * from "./send-user-to-login.model";
|
|
7
7
|
export * from "./term-of-use.model";
|
|
8
|
+
export * from "./guidance-category.model";
|
|
9
|
+
export * from "./guidance-query.model";
|
|
10
|
+
export * from "./guidance.model";
|
|
11
|
+
export * from "./http-response.model";
|
package/src/models/theme-base.ts
CHANGED
|
@@ -79,11 +79,13 @@ class ThemeBaseColors {
|
|
|
79
79
|
};
|
|
80
80
|
complementary: {
|
|
81
81
|
agendaReminder: string;
|
|
82
|
+
angelGodson: string;
|
|
83
|
+
angelGodfather: string;
|
|
82
84
|
};
|
|
83
85
|
|
|
84
86
|
}
|
|
85
87
|
|
|
86
|
-
export type IconHandle = 'active-bold' | 'active-thin' | 'add-challenge-bold' | 'avatar-login' | 'add-challenge-thin' | 'add-notification-bold' | 'add-notification-thin' | 'add-quiz-bold' | 'add-quiz-thin' | 'angel-friend-add-bold' | 'angel-friend-add-thin' | 'angel-friend-bold' | 'angel-friend-thin' | 'attachment-bold' | 'attachment-thin' | 'auction-bold' | 'auction-thin' | 'available-bold' | 'available-thin' | 'broadcast-bold' | 'broadcast-thin' | 'calendar-bold' | 'calendar-thin' | 'camera-bold' | 'camera-thin' | 'cancel-bold' | 'cancel-thin' | 'challenge-bold' | 'challenge-thin' | 'chat-bold' | 'chatbot-bold' | 'chatbot-thin' | 'chat-fil-bold' | 'chat-fill-thin' | 'chat-smile-bold' | 'chat-smile-thin' | 'chat-thin' | 'check-bold' | 'check-thin' | 'chocolate-menu' | 'chronometer-bold' | 'chronometer-thin' | 'clock-bold' | 'clock-thin' | 'close-bold' | 'close-thin' | 'cloud-bold' | 'cloud-thin' | 'coin-bold' | 'coin-thin' | 'column-view-active-bold' | 'column-view-active-thin' | 'column-view-bold' | 'column-view-thin' | 'contacts-bold' | 'contacts-thin' | 'delete-bold' | 'delete-thin' | 'documents-bold' | 'documents-thin' | 'down-arrow' | 'download-bold' | 'download-thin' | 'downward-arrow-bold' | 'downward-arrow-thin' | 'duplicate-bold' | 'duplicate-thin' | 'eagle-bold' | 'eagle-thin' | 'edit-bold' | 'edit-thin' | 'emoji-bold' | 'emoji-thin' | 'family-bold' | 'family-thin' | 'filter-active-bold' | 'filter-active-thin' | 'filter-inactive-bold' | 'filter-inactive-thin' | 'filter' | 'forward-bold' | 'forward-thin' | 'goal-bold' | 'goal-thin' | 'grid-view-active-bold' | 'grid-view-active-thin' | 'grid-view-bold' | 'grid-view-thin' | 'group-bold' | 'group-brackets-bold' | 'group-brackets-thin' | 'group-fill-bold' | 'group-fill-thin' | 'group-thin' | 'guide-bold' | 'guide-thin' | 'health-bold' | 'health-thin' | 'heart-bold' | 'heart-fill-bold' | 'heart-fill-thin' | 'heart-thin' | 'humor-bold' | 'humor-thin' | 'inactive-bold' | 'inactive-thin' | 'indicator-bold' | 'indicator-thin' | 'info-bold' | 'info-thin' | 'integration-bold' | 'integration-thin' | 'learning-bold' | 'learning-thin' | 'leave-bold' | 'leave-thin' | 'left-arrow-large' | 'left-arrow-small' | 'like-bold' | 'like-fill-bold' | 'like-fill-thin' | 'like-thin' | 'magnifying-glass-bold' | 'magnifying-glass-thin' | 'minus' | 'more-vert' | 'mountain-bold' | 'mountain-thin' | 'new-document-bold' | 'new-document-thin' | 'new-tip-thin-1' | 'new-tip-thin' | 'notification-bold' | 'notification-thin' | 'objetive-bold' | 'objetive-thin' | 'order-bold-1' | 'order-bold' | 'order-thin-1' | 'order-thin' | 'performance-bold' | 'performance-thin' | 'phone-bold' | 'phone-thin' | 'plus' | 'quiz-bold' | 'quiz-thin' | 'raffle-bold' | 'raffle-draw-bold' | 'raffle-draw-thin' | 'raffle-thin' | 'relationship-bold' | 'relationship-thin' | 'reports-bold' | 'reports-thin' | 'right-arrow-large' | 'right-arrow-small' | 'send-bold' | 'send-thin' | 'settings-bold' | 'settings-thin' | 'star-bold' | 'star-thin' | 'store-bold' | 'store-item-bold' | 'store-item-thin' | 'store-thin' | 'tag-bold' | 'tag-thin' | 'test-bold' | 'test-thin' | 'tips-bold' | 'tips-thin' | 'tree-bold' | 'tree-thin' | 'trophy-bold' | 'trophy-thin' | 'up-arrow' | 'upload-bold' | 'upload-thin' | 'upward-arrow-bold' | 'upward-arrow-thin' | 'user-bold' | 'user-thin' | 'variable-pay-bold' | 'variable-pay-thin' | 'view-bold' | 'view-thin' | 'not-view-thin' | 'not-view-bold' | 'work-bold' | 'working' | 'work-thin';
|
|
88
|
+
export type IconHandle = 'active-bold' | 'active-thin' | 'add-challenge-bold' | 'avatar-login' | 'add-challenge-thin' | 'add-notification-bold' | 'add-notification-thin' | 'add-quiz-bold' | 'add-quiz-thin' | 'angel-friend-add-bold' | 'angel-friend-add-thin' | 'angel-friend-bold' | 'angel-friend-thin' | 'attachment-bold' | 'attachment-thin' | 'auction-bold' | 'auction-thin' | 'available-bold' | 'available-thin' | 'broadcast-bold' | 'broadcast-thin' | 'calendar-bold' | 'calendar-thin' | 'camera-bold' | 'camera-thin' | 'cancel-bold' | 'cancel-thin' | 'challenge-bold' | 'challenge-thin' | 'chat-bold' | 'chatbot-bold' | 'chatbot-thin' | 'chat-fil-bold' | 'chat-fill-thin' | 'chat-smile-bold' | 'chat-smile-thin' | 'chat-thin' | 'check-bold' | 'check-thin' | 'chocolate-menu' | 'chronometer-bold' | 'chronometer-thin' | 'clock-bold' | 'clock-thin' | 'close-bold' | 'close-thin' | 'cloud-bold' | 'cloud-thin' | 'coin-bold' | 'coin-thin' | 'column-view-active-bold' | 'column-view-active-thin' | 'column-view-bold' | 'column-view-thin' | 'contacts-bold' | 'contacts-thin' | 'delete-bold' | 'delete-thin' | 'documents-bold' | 'documents-thin' | 'down-arrow' | 'download-bold' | 'download-thin' | 'downward-arrow-bold' | 'downward-arrow-thin' | 'duplicate-bold' | 'duplicate-thin' | 'eagle-bold' | 'eagle-thin' | 'edit-bold' | 'edit-thin' | 'emoji-bold' | 'emoji-thin' | 'family-bold' | 'family-thin' | 'filter-active-bold' | 'filter-active-thin' | 'filter-inactive-bold' | 'filter-inactive-thin' | 'filter' | 'forward-bold' | 'forward-thin' | 'goal-bold' | 'goal-thin' | 'grid-view-active-bold' | 'grid-view-active-thin' | 'grid-view-bold' | 'grid-view-thin' | 'group-bold' | 'group-brackets-bold' | 'group-brackets-thin' | 'group-fill-bold' | 'group-fill-thin' | 'group-thin' | 'guide-bold' | 'guide-thin' | 'health-bold' | 'health-thin' | 'heart-bold' | 'heart-fill-bold' | 'heart-fill-thin' | 'heart-thin' | 'humor-bold' | 'humor-thin' | 'inactive-bold' | 'inactive-thin' | 'indicator-bold' | 'indicator-thin' | 'info-bold' | 'info-thin' | 'integration-bold' | 'integration-thin' | 'learning-bold' | 'learning-thin' | 'leave-bold' | 'leave-thin' | 'left-arrow-large' | 'left-arrow-small' | 'like-bold' | 'like-fill-bold' | 'like-fill-thin' | 'like-thin' | 'magnifying-glass-bold' | 'magnifying-glass-thin' | 'minus' | 'more-vert' | 'mountain-bold' | 'mountain-thin' | 'new-document-bold' | 'new-document-thin' | 'new-tip-thin-1' | 'new-tip-thin' | 'notification-bold' | 'notification-thin' | 'objetive-bold' | 'objetive-thin' | 'order-bold-1' | 'order-bold' | 'order-thin-1' | 'order-thin' | 'performance-bold' | 'performance-thin' | 'phone-bold' | 'phone-thin' | 'plus' | 'quiz-bold' | 'quiz-thin' | 'raffle-bold' | 'raffle-draw-bold' | 'raffle-draw-thin' | 'raffle-thin' | 'relationship-bold' | 'relationship-thin' | 'reports-bold' | 'reports-thin' | 'right-arrow-large' | 'right-arrow-small' | 'send-bold' | 'send-thin' | 'settings-bold' | 'settings-thin' | 'star-bold' | 'star-thin' | 'store-bold' | 'store-item-bold' | 'store-item-thin' | 'store-thin' | 'tag-bold' | 'tag-thin' | 'test-bold' | 'test-thin' | 'tips-bold' | 'tips-thin' | 'tree-bold' | 'tree-thin' | 'trophy-bold' | 'trophy-thin' | 'up-arrow' | 'upload-bold' | 'upload-thin' | 'upward-arrow-bold' | 'upward-arrow-thin' | 'user-bold' | 'user-thin' | 'variable-pay-bold' | 'variable-pay-thin' | 'view-bold' | 'view-thin' | 'not-view-thin' | 'not-view-bold' | 'work-bold' | 'working' | 'work-thin' | 'no-results-found' | 'not-found-bold' | 'hamburger-menu';
|
|
87
89
|
|
|
88
90
|
class ThemeBaseRect {
|
|
89
91
|
top: string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { GuidanceCategoryModel, GuidanceModel, GuidanceQueryListModel, HttpListResponse } from "../models";
|
|
2
|
+
|
|
3
|
+
export interface IGuidanceRepository {
|
|
4
|
+
getCategories(): Promise<GuidanceCategoryModel[]>;
|
|
5
|
+
getUserFiles(params: GuidanceQueryListModel): Promise<HttpListResponse<GuidanceModel[]>>;
|
|
6
|
+
toggleFavorite(id: string): Promise<void>;
|
|
7
|
+
getFavoriteUserFiles(params: GuidanceQueryListModel): Promise<HttpListResponse<GuidanceModel[]>>;
|
|
8
|
+
getUserFile(id: string): Promise<GuidanceModel>;
|
|
9
|
+
registerFileAccessToUser(guidanceId: string, fileId: string, imageToken: string): Promise<void>;
|
|
10
|
+
registerFileDownloadToUser(guidanceId: string, fileId: string, imageToken: string): Promise<void>;
|
|
11
|
+
}
|
|
@@ -4,4 +4,5 @@ export * from './theme.repository.interface';
|
|
|
4
4
|
export * from './results.repository.interface';
|
|
5
5
|
export * from './angel-friend.repository.interface';
|
|
6
6
|
export * from './user.repository.interface';
|
|
7
|
-
export * from "./terms-of-use.repository.interface";
|
|
7
|
+
export * from "./terms-of-use.repository.interface";
|
|
8
|
+
export * from "./guidance.repository.interface";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export interface ExempleDTO {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ExampleDTO from "./example.dto";
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
GuidanceFileObject,
|
|
3
|
+
GuidanceCategoryModel,
|
|
4
|
+
GuidanceModel,
|
|
5
|
+
GuidanceQueryListModel,
|
|
6
|
+
HttpListResponse,
|
|
7
|
+
} from "../models";
|
|
8
|
+
|
|
9
|
+
export interface IGuidanceService {
|
|
10
|
+
getUserFiles(
|
|
11
|
+
params?: GuidanceQueryListModel
|
|
12
|
+
): Promise<HttpListResponse<GuidanceModel[]>>;
|
|
13
|
+
getCategories(): Promise<GuidanceCategoryModel[]>;
|
|
14
|
+
toggleFavorite(id: string): Promise<void>;
|
|
15
|
+
getFavoriteUserFiles(
|
|
16
|
+
params?: GuidanceQueryListModel
|
|
17
|
+
): Promise<HttpListResponse<GuidanceModel[]>>;
|
|
18
|
+
getUserFile(id: string): Promise<GuidanceModel>;
|
|
19
|
+
registerFileAccessToUser(
|
|
20
|
+
guidanceId: string,
|
|
21
|
+
file: GuidanceFileObject
|
|
22
|
+
): Promise<void>;
|
|
23
|
+
registerFileDownloadToUser(
|
|
24
|
+
guidanceId: string,
|
|
25
|
+
file: GuidanceFileObject
|
|
26
|
+
): Promise<void>;
|
|
27
|
+
}
|
package/src/services/index.d.ts
CHANGED
|
@@ -5,3 +5,6 @@ export * from "./results.service.interface";
|
|
|
5
5
|
export * from "./angel-friend.service.interface";
|
|
6
6
|
export * from "./user.service.interface";
|
|
7
7
|
export * from "./terms-of-use.service.interface";
|
|
8
|
+
export * from "./guidance.service.interface";
|
|
9
|
+
export * from "./validations.service.interface";
|
|
10
|
+
export * from "./dtos";
|
|
@@ -4,7 +4,7 @@ import { ResponseStatusLogMessages, RobbysonResponseError } from "../../factorie
|
|
|
4
4
|
export class BuildError {
|
|
5
5
|
|
|
6
6
|
public static buildError(error: RobbysonResponseError): RobbysonResponseError {
|
|
7
|
-
error.data.
|
|
7
|
+
error.data.forEach((err: ResponseStatusLogMessages) => {
|
|
8
8
|
return toast.error(err.text);
|
|
9
9
|
});
|
|
10
10
|
|
|
@@ -17,7 +17,15 @@ export class RobbysonNavigate {
|
|
|
17
17
|
// TODO: Usar a LIB PATH para concatenar a URL
|
|
18
18
|
history.push(`/operacao${url}`);
|
|
19
19
|
}
|
|
20
|
+
static go(delta: number) {
|
|
21
|
+
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
22
|
+
RobbysonNavigate._globalState =
|
|
23
|
+
RobbysonNavigate._globalStore.GetGlobalState();
|
|
20
24
|
|
|
25
|
+
const { history } = RobbysonNavigate._globalState.Global.RootApp;
|
|
26
|
+
|
|
27
|
+
history.go(delta);
|
|
28
|
+
}
|
|
21
29
|
static back() {
|
|
22
30
|
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
23
31
|
RobbysonNavigate._globalState =
|
|
@@ -72,17 +80,25 @@ export class RobbysonNavigate {
|
|
|
72
80
|
|
|
73
81
|
const { history } = RobbysonNavigate._globalState.Global.RootApp;
|
|
74
82
|
|
|
83
|
+
|
|
75
84
|
return queryString.parse(history.location.search, {
|
|
76
85
|
sort: false,
|
|
77
86
|
}) as T;
|
|
78
87
|
}
|
|
79
88
|
|
|
80
|
-
static setQueryParams(key: string, value: string): void {
|
|
89
|
+
static setQueryParams(key: string | string[], value: string | number | (string|number)[]): void {
|
|
81
90
|
const queryString = new URLSearchParams(
|
|
82
91
|
RobbysonNavigate.getQueryParams<URLSearchParams>()
|
|
83
92
|
);
|
|
84
93
|
|
|
85
|
-
|
|
94
|
+
if (Array.isArray(key) && Array.isArray(value)) {
|
|
95
|
+
key.forEach((k, index) => {
|
|
96
|
+
queryString.set(k, value[index].toString());
|
|
97
|
+
});
|
|
98
|
+
} else {
|
|
99
|
+
queryString.set(key as string, value as string);
|
|
100
|
+
}
|
|
101
|
+
|
|
86
102
|
|
|
87
103
|
RobbysonNavigate.replace({
|
|
88
104
|
search: queryString.toString(),
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./snackbar.interface";
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { IconHandle } from "../../models";
|
|
2
|
-
import { IBaseComponentProp } from "../base-component.prop.interface";
|
|
3
|
-
|
|
4
|
-
export interface ISnackbarProps<T> extends React.HTMLAttributes<T>, IBaseComponentProp {
|
|
5
|
-
iconHandle?: IconHandle;
|
|
6
|
-
show: boolean;
|
|
7
|
-
autoClose? : boolean;
|
|
8
|
-
timeAutoClose?: number;
|
|
9
|
-
textLocaleHandle?: string;
|
|
10
|
-
position: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export interface ISnackbarState {
|
|
14
|
-
show : boolean
|
|
15
|
-
}
|
|
16
|
-
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
///<reference types="react" />
|
|
2
|
-
///<reference types="robbyson-frontend-library" />
|
|
3
|
-
|
|
4
|
-
declare module "styleguide/Snackbar" {
|
|
5
|
-
import { ISnackbarProps } from "robbyson-frontend-library";
|
|
6
|
-
const Snackbar: React.ComponentType<ISnackbarProps<any>>;
|
|
7
|
-
|
|
8
|
-
export default Snackbar;
|
|
9
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/src/components/basic-button/{basic-button.interface.tsx → basic-button.interface.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/components/progress-bar/{progress-bar.interface.tsx → progress-bar.interface.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|