robbyson-frontend-library 0.0.1-rc1 → 0.0.1-rc11
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/drawer/drawer.interface.js +1 -0
- package/dist/components/filter/filter.interface.js +1 -0
- package/dist/components/header-context-menu/header-context-menu.interface.js +1 -0
- package/dist/components/loading/loading.interface.js +1 -0
- package/dist/components/overlay/overlay.interface.js +1 -0
- package/dist/components/pages/base-app-page.component.js +20 -5
- package/dist/components/pages/base-app-page.styles.js +14 -5
- package/dist/components/pdf-viewer/pdf-viewer.interface.js +1 -0
- package/dist/components/range-date-picker/range-date-picker.interface.js +1 -0
- package/dist/components/sort/sort.interface.js +1 -0
- package/dist/components/tab/tab.interface.js +1 -0
- package/dist/components/terms-of-use/terms-of-use.interface.js +1 -0
- package/dist/components/time-picker/time-picker.interface.js +1 -0
- package/dist/components/tree-date-picker/tree-date-picker.interface.js +1 -0
- package/dist/constants/layout-dimensions.constants.js +4 -3
- package/dist/factories/index.js +1 -0
- package/dist/factories/query-params.factory.js +52 -0
- package/dist/factories/response.factory.js +3 -2
- package/dist/index.js +7 -0
- package/dist/models/document.model.js +24 -0
- package/dist/models/guidance-category.model.js +24 -0
- package/dist/models/guidance-query.model.js +24 -0
- package/dist/models/guidance.model.js +40 -0
- package/dist/models/http-response.model.js +11 -0
- package/dist/models/humor-list.model.js +24 -0
- package/dist/models/humor-register.model.js +40 -0
- package/dist/models/theme-base.js +4 -0
- package/dist/repositories/base.repository.js +9 -0
- package/dist/repositories/document.repository.interface.js +1 -0
- package/dist/repositories/guidance.repository.interface.js +1 -0
- package/dist/repositories/humor.repository.interface.js +1 -0
- package/dist/services/document.service.interface.js +1 -0
- package/dist/services/dtos/example.dto.js +1 -0
- package/dist/services/dtos/index.js +1 -0
- package/dist/services/guidance.service.interface.js +1 -0
- package/dist/services/humor.service.interface.js +1 -0
- package/dist/services/validations.service.interface.js +1 -0
- package/dist/utils/build-error/buildError.util.js +1 -1
- package/dist/utils/date.utils.js +30 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/layout.utils.js +10 -0
- package/dist/utils/robbyson-navigate.js +34 -1
- package/index.d.ts +18 -5
- package/package.json +7 -5
- package/src/components/accordion/accordion.interface.ts +2 -1
- package/src/components/badge/badge.interface.ts +3 -2
- package/src/components/balloon/balloon.interface.ts +2 -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/basic-button/{basic-button.interface.tsx → basic-button.interface.ts} +4 -1
- package/src/components/date-picker/date-picker.interface.ts +13 -0
- package/src/components/date-picker/date-picker.types.d.ts +10 -0
- package/src/components/date-picker/index.d.ts +1 -0
- package/src/components/drawer/drawer.interface.ts +10 -0
- package/src/components/drawer/drawer.types.d.ts +10 -0
- package/src/components/drawer/index.d.ts +1 -0
- package/src/components/filter/basic-button.types.d.ts +9 -0
- package/src/components/filter/filter.interface.tsx +61 -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/modal/modal.interface.ts +19 -9
- package/src/components/mood-button/mood-button.interface.ts +2 -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 +53 -7
- 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/range-date-picker/index.d.ts +1 -0
- package/src/components/range-date-picker/range-date-picker.interface.ts +16 -0
- package/src/components/range-date-picker/range-date-picker.types.d.ts +10 -0
- package/src/components/scroll-box/scroll-box.interface.ts +2 -1
- package/src/components/sidebar/sidebar.interface.ts +13 -9
- package/src/components/sort/index.d.ts +1 -0
- package/src/components/sort/sort.interface.ts +28 -0
- package/src/components/sort/sort.types.d.ts +9 -0
- package/src/components/tab/index.d.ts +1 -0
- package/src/components/tab/tab.interface.ts +16 -0
- package/src/components/tab/tab.types.d.ts +9 -0
- package/src/components/tags/tags.interface.ts +2 -1
- package/src/components/terms-of-use/index.d.ts +1 -0
- package/src/components/terms-of-use/terms-of-use.interface.tsx +13 -0
- package/src/components/terms-of-use/terms-of-use.types.d.ts +11 -0
- package/src/components/text-field/text-field.interface.ts +41 -0
- package/src/components/time-picker/index.d.ts +1 -0
- package/src/components/time-picker/time-picker.interface.ts +15 -0
- package/src/components/time-picker/time-picker.types.d.ts +9 -0
- package/src/components/toggle-icon-button/toggle-icon-button.interface.ts +1 -1
- package/src/components/tree-date-picker/index.d.ts +1 -0
- package/src/components/tree-date-picker/tree-date-picker.interface.ts +30 -0
- package/src/components/tree-date-picker/tree-date-picker.types.d.ts +10 -0
- package/src/constants/layout-dimensions.constants.ts +4 -3
- package/src/factories/index.ts +2 -1
- package/src/factories/query-params.factory.ts +82 -0
- package/src/factories/response.factory.ts +17 -12
- package/src/index.ts +9 -1
- package/src/models/document.model.ts +27 -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/humor-list.model.ts +23 -0
- package/src/models/humor-register.model.ts +35 -0
- package/src/models/index.d.ts +7 -0
- package/src/models/theme-base.ts +16 -1
- package/src/repositories/{base.repository.tsx → base.repository.ts} +11 -0
- package/src/repositories/document.repository.interface.ts +17 -0
- package/src/repositories/guidance.repository.interface.ts +11 -0
- package/src/repositories/humor.repository.interface.ts +10 -0
- package/src/repositories/index.d.ts +4 -1
- package/src/services/authentication.service.interface.ts +2 -0
- package/src/services/document.service.interface.ts +20 -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/humor.service.interface.ts +12 -0
- package/src/services/index.d.ts +5 -0
- package/src/services/theme.service.interface.ts +2 -1
- package/src/services/validations.service.interface.ts +7 -0
- package/src/states/main-container/root-app.state.interface.ts +8 -1
- package/src/utils/build-error/buildError.util.ts +1 -1
- package/src/utils/date.utils.ts +35 -0
- package/src/utils/index.ts +2 -1
- package/src/utils/layout.utils.ts +7 -0
- package/src/utils/robbyson-navigate.ts +45 -2
- package/tsconfig.json +4 -1
- 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/text-field/text-field.interface.tsx +0 -27
- /package/dist/components/{snackbar/snackbar.interface.js → date-picker/date-picker.interface.js} +0 -0
- /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/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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -13,11 +13,20 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
13
13
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
14
|
};
|
|
15
15
|
})();
|
|
16
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
17
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
18
|
+
if (ar || !(i in from)) {
|
|
19
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
20
|
+
ar[i] = from[i];
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
24
|
+
};
|
|
16
25
|
import React from "react";
|
|
17
26
|
import { IoC } from "../../ioc";
|
|
18
|
-
import
|
|
19
|
-
import { PageContainer, Header, Title, ContextMenu, Content, } from "./base-app-page.styles";
|
|
27
|
+
import { PageContainer, Header, Title, ContextMenu, Content, LeftArrowLarge, Block, } from "./base-app-page.styles";
|
|
20
28
|
import { RobbysonNavigate } from "../../utils";
|
|
29
|
+
import { QueryParamsFactory } from "../../factories/query-params.factory";
|
|
21
30
|
var BaseAppPage = /** @class */ (function (_super) {
|
|
22
31
|
__extends(BaseAppPage, _super);
|
|
23
32
|
function BaseAppPage(props) {
|
|
@@ -25,18 +34,24 @@ var BaseAppPage = /** @class */ (function (_super) {
|
|
|
25
34
|
_this.headerLocale = "Header Locale";
|
|
26
35
|
_this.translate = _this.translate.bind(_this);
|
|
27
36
|
_this._localeService = IoC.GetInstance("LocaleService");
|
|
28
|
-
_this._authenticationService = IoC.GetInstance("AuthenticationService");
|
|
29
37
|
_this._themeService = IoC.GetInstance("ThemeService");
|
|
30
38
|
return _this;
|
|
31
39
|
}
|
|
32
40
|
BaseAppPage.prototype.translate = function (text) {
|
|
33
|
-
|
|
41
|
+
var _a;
|
|
42
|
+
var args = [];
|
|
43
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
44
|
+
args[_i - 1] = arguments[_i];
|
|
45
|
+
}
|
|
46
|
+
return (_a = this._localeService).getLocaleByHandle.apply(_a, __spreadArray([text || ""], args, false));
|
|
34
47
|
};
|
|
35
48
|
BaseAppPage.prototype.render = function () {
|
|
49
|
+
QueryParamsFactory.validate(this.paramsValidValues, this.paramsDefaultValues);
|
|
36
50
|
return (React.createElement(PageContainer, null,
|
|
37
51
|
React.createElement(Header, null,
|
|
38
52
|
React.createElement("div", null,
|
|
39
|
-
React.createElement(
|
|
53
|
+
React.createElement(LeftArrowLarge, { src: this._themeService.getIconAssetUrl("left-arrow-large"), onClick: function () { return RobbysonNavigate.back(); } }),
|
|
54
|
+
React.createElement(Block, null),
|
|
40
55
|
React.createElement(Title, null, this.translate(this.headerLocale))),
|
|
41
56
|
React.createElement(ContextMenu, { className: "body-2-book" }, this.contextMenu())),
|
|
42
57
|
React.createElement(Content, null, this.renderPage())));
|
|
@@ -4,10 +4,19 @@ 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
|
|
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"])));
|
|
10
|
-
export var ContextMenu = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject([""], [""])));
|
|
9
|
+
export var PageContainer = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n height: 100%;\n\n @media (max-width: ", "px) {\n padding: 32px 24px;\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px;\n }\n"], ["\n padding: 32px 55px 47px calc(", "px + 55px);\n\n height: 100%;\n\n @media (max-width: ", "px) {\n padding: 32px 24px;\n }\n\n @media (max-width: ", "px) {\n padding: 24px 16px;\n }\n"])), SIDEBAR_WIDTH, LayoutDimensions.width.horizontalIpadMini, LayoutDimensions.width.mobile);
|
|
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);
|
|
11
|
+
export var ContextMenu = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n -ms-overflow-style: none;\n scrollbar-width: none;\n overflow-y: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n @media (max-width: ", "px) {\n width: 100%;\n }\n"], ["\n -ms-overflow-style: none;\n scrollbar-width: none;\n overflow-y: scroll;\n &::-webkit-scrollbar {\n display: none;\n }\n @media (max-width: ", "px) {\n width: 100%;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
|
|
11
12
|
export var Title = styled.h4(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n margin-left: 12px;\n"], ["\n margin-left: 12px;\n"])));
|
|
12
|
-
|
|
13
|
-
var
|
|
13
|
+
var PADDING_TOP_DESKTOP = 32;
|
|
14
|
+
var PADDING_TOP_MOBILE = 32;
|
|
15
|
+
var PADDING_BOTTOM_DESKTOP = 47;
|
|
16
|
+
var PADDING_BOTTOM_MOBILE = 32;
|
|
17
|
+
var HEADER_HEIGHT_DESKTOP = 48;
|
|
18
|
+
var HEADER_HEIGHT_MOBILE = 99;
|
|
19
|
+
export var Content = styled.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n height: calc(100vh - ", "px);\n\n @media (max-width: ", "px) {\n height: calc(100vh - ", "px);\n }\n"], ["\n height: calc(100vh - ", "px);\n\n @media (max-width: ", "px) {\n height: calc(100vh - ", "px);\n }\n"])), PADDING_TOP_DESKTOP + PADDING_BOTTOM_DESKTOP + HEADER_HEIGHT_DESKTOP, LayoutDimensions.width.horizontalIpadMini, PADDING_TOP_MOBILE + PADDING_BOTTOM_MOBILE + HEADER_HEIGHT_MOBILE);
|
|
20
|
+
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 + 1);
|
|
21
|
+
export var Block = styled.div(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n display: none;\n\n @media (max-width: ", "px) {\n display: block;\n width: 24px;\n height: 24px;\n }\n"], ["\n display: none;\n\n @media (max-width: ", "px) {\n display: block;\n width: 24px;\n height: 24px;\n }\n"])), LayoutDimensions.width.horizontalIpadMini);
|
|
22
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
var LayoutDimensions = /** @class */ (function () {
|
|
2
2
|
function LayoutDimensions() {
|
|
3
3
|
}
|
|
4
|
-
LayoutDimensions.
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
LayoutDimensions.width = {
|
|
5
|
+
horizontalIpadMini: 1199,
|
|
6
|
+
verticalIpadMini: 767,
|
|
7
|
+
mobile: 575,
|
|
7
8
|
};
|
|
8
9
|
return LayoutDimensions;
|
|
9
10
|
}());
|
package/dist/factories/index.js
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { RobbysonNavigate } from "../utils";
|
|
2
|
+
var QueryParamsFactory = /** @class */ (function () {
|
|
3
|
+
function QueryParamsFactory() {
|
|
4
|
+
}
|
|
5
|
+
QueryParamsFactory.checkDefaultValues = function (validValues, defaultValues) {
|
|
6
|
+
// Verifica se os parâmetros validados possuem um valor padrão
|
|
7
|
+
for (var _i = 0, _a = Object.entries(validValues || []); _i < _a.length; _i++) {
|
|
8
|
+
var _b = _a[_i], key = _b[0], value = _b[1];
|
|
9
|
+
if (!defaultValues.hasOwnProperty(key))
|
|
10
|
+
throw "The \"".concat(key, "\" query parameter does not have a default value.");
|
|
11
|
+
}
|
|
12
|
+
};
|
|
13
|
+
QueryParamsFactory.validate = function (validValues, defaultValues) {
|
|
14
|
+
var queryParams = RobbysonNavigate.getQueryParams();
|
|
15
|
+
this.checkDefaultValues(validValues, defaultValues);
|
|
16
|
+
// Transforma a variável 'queryParams' em um objeto
|
|
17
|
+
if (Object.prototype.toString.call(queryParams) === "[object Object]") {
|
|
18
|
+
var queryParamsCopy = Object(queryParams);
|
|
19
|
+
for (var _i = 0, _a = Object.entries(queryParamsCopy); _i < _a.length; _i++) {
|
|
20
|
+
var _b = _a[_i], queryParamsKey = _b[0], queryParamsValue = _b[1];
|
|
21
|
+
for (var _c = 0, _d = Object.entries(validValues); _c < _d.length; _c++) {
|
|
22
|
+
var _e = _d[_c], key = _e[0], value = _e[1];
|
|
23
|
+
// Verifica se o parâmetro da URL é o mesmo parâmetro da validação que está sendo iterado
|
|
24
|
+
if (queryParamsKey === key) {
|
|
25
|
+
// Caso os valores permitidos para esse parâmetro estejam em um objeto, será convertido para um array
|
|
26
|
+
if (value instanceof Object) {
|
|
27
|
+
var validValuesToArray = [];
|
|
28
|
+
for (var _f = 0, _g = Object.entries(value); _f < _g.length; _f++) {
|
|
29
|
+
var _h = _g[_f], objectKey = _h[0], objectValue = _h[1];
|
|
30
|
+
validValuesToArray.push(String(objectValue));
|
|
31
|
+
}
|
|
32
|
+
// Caso o valor do parâmetro atual que está na url não seja um valor válido, o valor padrão será definido
|
|
33
|
+
if (!validValuesToArray.includes(String(queryParamsValue))) {
|
|
34
|
+
RobbysonNavigate.setQueryParams(queryParamsKey, defaultValues[String(queryParamsKey)]);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else if (value instanceof Array) {
|
|
38
|
+
if (!value.includes(String(queryParamsValue)))
|
|
39
|
+
RobbysonNavigate.setQueryParams(queryParamsKey, defaultValues[String(queryParamsKey)]);
|
|
40
|
+
}
|
|
41
|
+
else if (value instanceof String || value instanceof Number) {
|
|
42
|
+
if (String(value) !== String(queryParamsValue))
|
|
43
|
+
RobbysonNavigate.setQueryParams(queryParamsKey, defaultValues[String(queryParamsKey)]);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
return QueryParamsFactory;
|
|
51
|
+
}());
|
|
52
|
+
export { QueryParamsFactory };
|
|
@@ -65,12 +65,13 @@ var ResponseFactory = /** @class */ (function () {
|
|
|
65
65
|
throw new RobbysonResponseError();
|
|
66
66
|
if (response.data.statusLog &&
|
|
67
67
|
response.data.statusLog.length &&
|
|
68
|
-
response.data.statusLog[0].type !==
|
|
68
|
+
response.data.statusLog[0].type !==
|
|
69
|
+
ResponseStatusLogType.SUCCESS_RESPONSE)
|
|
69
70
|
throw new RobbysonResponseError(response.data);
|
|
70
71
|
};
|
|
71
72
|
ResponseFactory.Create = function (response) {
|
|
72
73
|
this.checkResponseError(response);
|
|
73
|
-
return response.data
|
|
74
|
+
return response.data;
|
|
74
75
|
};
|
|
75
76
|
return ResponseFactory;
|
|
76
77
|
}());
|
package/dist/index.js
CHANGED
|
@@ -7,6 +7,11 @@ export * from "./models/user-mirror.model";
|
|
|
7
7
|
export * from "./models/user-session.model";
|
|
8
8
|
export * from "./models/send-user-to-login.model";
|
|
9
9
|
export * from "./models/angel-friend-status.model";
|
|
10
|
+
export * from './models/document.model';
|
|
11
|
+
export * from "./models/guidance-category.model";
|
|
12
|
+
export * from "./models/guidance.model";
|
|
13
|
+
export * from "./models/guidance-query.model";
|
|
14
|
+
export * from "./models/http-response.model";
|
|
10
15
|
// Repositories
|
|
11
16
|
export * from "./repositories/base.repository";
|
|
12
17
|
// Components
|
|
@@ -17,3 +22,5 @@ export * from "./states";
|
|
|
17
22
|
export * from "./utils";
|
|
18
23
|
// Constants
|
|
19
24
|
export * from "./constants";
|
|
25
|
+
// DTOs
|
|
26
|
+
export * from "./services/dtos";
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
17
|
+
var DocumentModel = /** @class */ (function (_super) {
|
|
18
|
+
__extends(DocumentModel, _super);
|
|
19
|
+
function DocumentModel() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
return DocumentModel;
|
|
23
|
+
}(BaseRepositoryModel));
|
|
24
|
+
export { DocumentModel };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
17
|
+
var GuidanceCategoryModel = /** @class */ (function (_super) {
|
|
18
|
+
__extends(GuidanceCategoryModel, _super);
|
|
19
|
+
function GuidanceCategoryModel() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
return GuidanceCategoryModel;
|
|
23
|
+
}(BaseRepositoryModel));
|
|
24
|
+
export { GuidanceCategoryModel };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
17
|
+
var GuidanceQueryListModel = /** @class */ (function (_super) {
|
|
18
|
+
__extends(GuidanceQueryListModel, _super);
|
|
19
|
+
function GuidanceQueryListModel() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
return GuidanceQueryListModel;
|
|
23
|
+
}(BaseRepositoryModel));
|
|
24
|
+
export { GuidanceQueryListModel };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
17
|
+
var GuidanceModel = /** @class */ (function (_super) {
|
|
18
|
+
__extends(GuidanceModel, _super);
|
|
19
|
+
function GuidanceModel() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
return GuidanceModel;
|
|
23
|
+
}(BaseRepositoryModel));
|
|
24
|
+
export { GuidanceModel };
|
|
25
|
+
var GuidanceFileObject = /** @class */ (function () {
|
|
26
|
+
function GuidanceFileObject() {
|
|
27
|
+
}
|
|
28
|
+
return GuidanceFileObject;
|
|
29
|
+
}());
|
|
30
|
+
export { GuidanceFileObject };
|
|
31
|
+
var FileMetaData = /** @class */ (function () {
|
|
32
|
+
function FileMetaData() {
|
|
33
|
+
}
|
|
34
|
+
return FileMetaData;
|
|
35
|
+
}());
|
|
36
|
+
var User = /** @class */ (function () {
|
|
37
|
+
function User() {
|
|
38
|
+
}
|
|
39
|
+
return User;
|
|
40
|
+
}());
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
var HttpListResponse = /** @class */ (function () {
|
|
2
|
+
function HttpListResponse() {
|
|
3
|
+
}
|
|
4
|
+
return HttpListResponse;
|
|
5
|
+
}());
|
|
6
|
+
export { HttpListResponse };
|
|
7
|
+
var GenericHttpListResponseMeta = /** @class */ (function () {
|
|
8
|
+
function GenericHttpListResponseMeta() {
|
|
9
|
+
}
|
|
10
|
+
return GenericHttpListResponseMeta;
|
|
11
|
+
}());
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
17
|
+
var HumorListModel = /** @class */ (function (_super) {
|
|
18
|
+
__extends(HumorListModel, _super);
|
|
19
|
+
function HumorListModel() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
return HumorListModel;
|
|
23
|
+
}(BaseRepositoryModel));
|
|
24
|
+
export { HumorListModel };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
var __extends = (this && this.__extends) || (function () {
|
|
2
|
+
var extendStatics = function (d, b) {
|
|
3
|
+
extendStatics = Object.setPrototypeOf ||
|
|
4
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
5
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
6
|
+
return extendStatics(d, b);
|
|
7
|
+
};
|
|
8
|
+
return function (d, b) {
|
|
9
|
+
if (typeof b !== "function" && b !== null)
|
|
10
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
11
|
+
extendStatics(d, b);
|
|
12
|
+
function __() { this.constructor = d; }
|
|
13
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
14
|
+
};
|
|
15
|
+
})();
|
|
16
|
+
import { BaseRepositoryModel } from "./base.repository.model";
|
|
17
|
+
var HumorRegisterModel = /** @class */ (function (_super) {
|
|
18
|
+
__extends(HumorRegisterModel, _super);
|
|
19
|
+
function HumorRegisterModel() {
|
|
20
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
21
|
+
}
|
|
22
|
+
return HumorRegisterModel;
|
|
23
|
+
}(BaseRepositoryModel));
|
|
24
|
+
export { HumorRegisterModel };
|
|
25
|
+
var HumorRegisterResponseModel = /** @class */ (function (_super) {
|
|
26
|
+
__extends(HumorRegisterResponseModel, _super);
|
|
27
|
+
function HumorRegisterResponseModel() {
|
|
28
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
29
|
+
}
|
|
30
|
+
return HumorRegisterResponseModel;
|
|
31
|
+
}(BaseRepositoryModel));
|
|
32
|
+
export { HumorRegisterResponseModel };
|
|
33
|
+
var HumorLastModel = /** @class */ (function (_super) {
|
|
34
|
+
__extends(HumorLastModel, _super);
|
|
35
|
+
function HumorLastModel() {
|
|
36
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
37
|
+
}
|
|
38
|
+
return HumorLastModel;
|
|
39
|
+
}(BaseRepositoryModel));
|
|
40
|
+
export { HumorLastModel };
|
|
@@ -34,6 +34,10 @@ var ThemeBase = /** @class */ (function () {
|
|
|
34
34
|
logoCompleteNegative: new ThemeAssets(),
|
|
35
35
|
logoIconNegative: new ThemeAssets(),
|
|
36
36
|
backgroundLogo: new ThemeAssets(),
|
|
37
|
+
humorAvatar: new ThemeAssets(),
|
|
38
|
+
humorImGoodCircle: new ThemeAssets(),
|
|
39
|
+
humorImTopCircle: new ThemeAssets(),
|
|
40
|
+
humorImbadCircle: new ThemeAssets(),
|
|
37
41
|
logoMobile: new ThemeAssets(),
|
|
38
42
|
loginRobbysonAvatar: new ThemeAssets(),
|
|
39
43
|
};
|
|
@@ -177,6 +177,15 @@ var BaseRepository = /** @class */ (function () {
|
|
|
177
177
|
config.headers['x-system-id'] = BaseRepository._systemId;
|
|
178
178
|
return config;
|
|
179
179
|
};
|
|
180
|
+
BaseRepository.prototype.createAxiosCancelationContext = function () {
|
|
181
|
+
BaseRepository._source = axios.CancelToken.source();
|
|
182
|
+
};
|
|
183
|
+
BaseRepository.prototype.cancelAxiosRequest = function () {
|
|
184
|
+
if (BaseRepository._source) {
|
|
185
|
+
BaseRepository._source.cancel();
|
|
186
|
+
BaseRepository._source = null;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
180
189
|
BaseRepository._sessionKey = "";
|
|
181
190
|
BaseRepository._systemId = 1;
|
|
182
191
|
BaseRepository._baseURL = "";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as ExampleDTO from "./example.dto";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import moment from "moment";
|
|
3
|
+
var DateUtils = /** @class */ (function () {
|
|
4
|
+
function DateUtils() {
|
|
5
|
+
}
|
|
6
|
+
DateUtils.isSameDateAsNow = function (date) {
|
|
7
|
+
return moment(date).isSame(moment(new Date()), "day");
|
|
8
|
+
};
|
|
9
|
+
DateUtils.isPastDateAsNow = function (date) {
|
|
10
|
+
return moment(date).isBefore(moment(new Date()));
|
|
11
|
+
};
|
|
12
|
+
DateUtils.getDateBetweenDates = function (start, end) {
|
|
13
|
+
var clonedStart = _.cloneDeep(start);
|
|
14
|
+
if (!start ||
|
|
15
|
+
!end ||
|
|
16
|
+
!(start instanceof Date) ||
|
|
17
|
+
!(end instanceof Date)) {
|
|
18
|
+
throw new Error("Invalid date");
|
|
19
|
+
}
|
|
20
|
+
var dates = [];
|
|
21
|
+
var currentDate = clonedStart;
|
|
22
|
+
while (currentDate <= end) {
|
|
23
|
+
dates.push(new Date(currentDate));
|
|
24
|
+
currentDate.setDate(currentDate.getDate() + 1);
|
|
25
|
+
}
|
|
26
|
+
return dates;
|
|
27
|
+
};
|
|
28
|
+
return DateUtils;
|
|
29
|
+
}());
|
|
30
|
+
export { DateUtils };
|
package/dist/utils/index.js
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { LayoutDimensions } from "../constants";
|
|
2
|
+
var LayoutUtils = /** @class */ (function () {
|
|
3
|
+
function LayoutUtils() {
|
|
4
|
+
}
|
|
5
|
+
LayoutUtils.isMobile = function () {
|
|
6
|
+
return window.innerWidth <= LayoutDimensions.width.horizontalIpadMini;
|
|
7
|
+
};
|
|
8
|
+
return LayoutUtils;
|
|
9
|
+
}());
|
|
10
|
+
export { LayoutUtils };
|
|
@@ -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 =
|
|
@@ -25,6 +32,25 @@ var RobbysonNavigate = /** @class */ (function () {
|
|
|
25
32
|
var history = RobbysonNavigate._globalState.Global.RootApp.history;
|
|
26
33
|
history.replace(replace, state);
|
|
27
34
|
};
|
|
35
|
+
RobbysonNavigate.getRouteId = function () {
|
|
36
|
+
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
37
|
+
RobbysonNavigate._globalState =
|
|
38
|
+
RobbysonNavigate._globalStore.GetGlobalState();
|
|
39
|
+
var history = RobbysonNavigate._globalState.Global.RootApp.history;
|
|
40
|
+
var routeParams = history.location.pathname.split("/");
|
|
41
|
+
var id = routeParams[routeParams.length - 1];
|
|
42
|
+
return id;
|
|
43
|
+
};
|
|
44
|
+
RobbysonNavigate.getPathname = function () {
|
|
45
|
+
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
46
|
+
RobbysonNavigate._globalState =
|
|
47
|
+
RobbysonNavigate._globalStore.GetGlobalState();
|
|
48
|
+
var history = RobbysonNavigate._globalState.Global.RootApp.history;
|
|
49
|
+
return history.location.pathname;
|
|
50
|
+
};
|
|
51
|
+
RobbysonNavigate.matchPath = function (path) {
|
|
52
|
+
return RobbysonNavigate.getPathname().includes(path);
|
|
53
|
+
};
|
|
28
54
|
RobbysonNavigate.getQueryParams = function () {
|
|
29
55
|
RobbysonNavigate._globalStore = GlobalStore.Get();
|
|
30
56
|
RobbysonNavigate._globalState =
|
|
@@ -36,7 +62,14 @@ var RobbysonNavigate = /** @class */ (function () {
|
|
|
36
62
|
};
|
|
37
63
|
RobbysonNavigate.setQueryParams = function (key, value) {
|
|
38
64
|
var queryString = new URLSearchParams(RobbysonNavigate.getQueryParams());
|
|
39
|
-
|
|
65
|
+
if (Array.isArray(key) && Array.isArray(value)) {
|
|
66
|
+
key.forEach(function (k, index) {
|
|
67
|
+
queryString.set(k, value[index].toString());
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
queryString.set(key, value);
|
|
72
|
+
}
|
|
40
73
|
RobbysonNavigate.replace({
|
|
41
74
|
search: queryString.toString(),
|
|
42
75
|
});
|