infinity-forge 1.8.2 → 1.8.4
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/system/data/use-cases/dynamic-section/remote-dynamic-section.d.ts +1 -1
- package/dist/system/data/use-cases/dynamic-section/remote-dynamic-section.js +2 -1
- package/dist/system/data/use-cases/dynamic-section/remote-dynamic-section.js.map +1 -1
- package/dist/system/domain/use-cases/dynamic-section/load-all.d.ts +4 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/card/index.js +2 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/messages/content/index.js +1 -1
- package/dist/system/presentation/components/layout/header/components/menu-right/profile/content/index.js +2 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/create/index.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/export/index.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/filters/index.js +2 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.d.ts +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/pagination/index.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/skeleton-table/index.js +1 -1
- package/dist/system/presentation/hooks/ui/use-table/components/table/thead-item/index.js +1 -1
- package/dist/ui/contexts/dynamic-sections/context.js +5 -5
- package/dist/ui/contexts/dynamic-sections/context.js.map +1 -1
- package/dist/ui/contexts/dynamic-sections/get-initial-props-dynamic-section.d.ts +4 -1
- package/dist/ui/contexts/dynamic-sections/get-initial-props-dynamic-section.js +13 -9
- package/dist/ui/contexts/dynamic-sections/get-initial-props-dynamic-section.js.map +1 -1
- package/dist/ui/contexts/i18n/context.js +4 -4
- package/dist/ui/contexts/i18n/context.js.map +1 -1
- package/dist/ui/contexts/i18n/get-initial-props.js +7 -15
- package/dist/ui/contexts/i18n/get-initial-props.js.map +1 -1
- package/dist/ui/utils/_app_utils/get-pathname-ref.d.ts +5 -0
- package/dist/ui/utils/_app_utils/get-pathname-ref.js +13 -0
- package/dist/ui/utils/_app_utils/get-pathname-ref.js.map +1 -0
- package/dist/ui/utils/_app_utils/index.d.ts +1 -0
- package/dist/ui/utils/_app_utils/index.js +18 -0
- package/dist/ui/utils/_app_utils/index.js.map +1 -0
- package/dist/ui/utils/index.d.ts +2 -1
- package/dist/ui/utils/index.js +1 -0
- package/dist/ui/utils/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ export declare class RemoteDynamicSection implements domain.LoadAllDynamicSectio
|
|
|
7
7
|
keys(): {
|
|
8
8
|
loadAll: string;
|
|
9
9
|
};
|
|
10
|
-
loadAll(): Promise<domain.LoadAllDynamicSection.Model>;
|
|
10
|
+
loadAll(params: domain.LoadAllDynamicSection.Params): Promise<domain.LoadAllDynamicSection.Model>;
|
|
11
11
|
update(params: domain.UpdateDynamicSection.Params): Promise<domain.DynamicSection>;
|
|
12
12
|
create(params: domain.CreateDynamicSection.Params): Promise<domain.DynamicSection>;
|
|
13
13
|
}
|
|
@@ -98,7 +98,7 @@ var RemoteDynamicSection = /** @class */ (function () {
|
|
|
98
98
|
loadAll: RemoteDynamicSection_1.name + "_loadAll",
|
|
99
99
|
};
|
|
100
100
|
};
|
|
101
|
-
RemoteDynamicSection.prototype.loadAll = function () {
|
|
101
|
+
RemoteDynamicSection.prototype.loadAll = function (params) {
|
|
102
102
|
return __awaiter(this, void 0, void 0, function () {
|
|
103
103
|
var response;
|
|
104
104
|
return __generator(this, function (_a) {
|
|
@@ -106,6 +106,7 @@ var RemoteDynamicSection = /** @class */ (function () {
|
|
|
106
106
|
case 0: return [4 /*yield*/, this.httpClient.request({
|
|
107
107
|
url: this.makeApiURL.make("section"),
|
|
108
108
|
method: "get",
|
|
109
|
+
body: params
|
|
109
110
|
})];
|
|
110
111
|
case 1:
|
|
111
112
|
response = _a.sent();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"remote-dynamic-section.js","sourceRoot":"","sources":["../../../../../src/system/data/use-cases/dynamic-section/remote-dynamic-section.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA+C;AAE/C,wDAA2D;AAC3D,sEAAkE;AAElE,sDAAyC;AAGzC;IACE,8BAEmB,UAAsB,EAEtB,UAAkC;QAFlC,eAAU,GAAV,UAAU,CAAY;QAEtB,eAAU,GAAV,UAAU,CAAwB;IAClD,CAAC;6BANO,oBAAoB;IAQ/B,mCAAI,GAAJ;QACE,OAAO;YACL,OAAO,EAAE,sBAAoB,CAAC,IAAI,GAAG,UAAU;SAChD,CAAC;IACJ,CAAC;IAEK,sCAAO,GAAb;;;;;
|
|
1
|
+
{"version":3,"file":"remote-dynamic-section.js","sourceRoot":"","sources":["../../../../../src/system/data/use-cases/dynamic-section/remote-dynamic-section.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAA+C;AAE/C,wDAA2D;AAC3D,sEAAkE;AAElE,sDAAyC;AAGzC;IACE,8BAEmB,UAAsB,EAEtB,UAAkC;QAFlC,eAAU,GAAV,UAAU,CAAY;QAEtB,eAAU,GAAV,UAAU,CAAwB;IAClD,CAAC;6BANO,oBAAoB;IAQ/B,mCAAI,GAAJ;QACE,OAAO;YACL,OAAO,EAAE,sBAAoB,CAAC,IAAI,GAAG,UAAU;SAChD,CAAC;IACJ,CAAC;IAEK,sCAAO,GAAb,UAAc,MAA2C;;;;;4BACtC,qBAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;4BAC7C,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;4BACpC,MAAM,EAAE,KAAK;4BACb,IAAI,EAAE,MAAM;yBACb,CAAC,EAAA;;wBAJI,QAAQ,GAAG,SAIf;wBAEF,sBAAO,QAA8C,EAAC;;;;KACvD;IAEK,qCAAM,GAAZ,UAAa,MAA0C;;;;;4BACpC,qBAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;4BAC7C,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,EAAE,CAAC;4BACjD,MAAM,EAAE,KAAK;4BACb,IAAI,wBAAM,MAAM,KAAE,EAAE,EAAE,SAAS,GAAE;yBAClC,CAAC,EAAA;;wBAJI,QAAQ,GAAG,SAIf;wBAEF,sBAAO,QAA6C,EAAC;;;;KACtD;IAEK,qCAAM,GAAZ,UAAa,MAA0C;;;;;4BACpC,qBAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;4BAC7C,GAAG,EAAE,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC;4BACpC,MAAM,EAAE,MAAM;4BACd,IAAI,EAAE,MAAM;yBACb,CAAC,EAAA;;wBAJI,QAAQ,GAAG,SAIf;wBAEF,sBAAO,QAA6C,EAAC;;;;KACtD;;IA1CU,oBAAoB;QADhC,IAAA,sBAAU,GAAE;QAGR,WAAA,IAAA,kBAAM,EAAC,kBAAU,CAAC,UAAU,CAAC,CAAA;QAE7B,WAAA,IAAA,kBAAM,EAAC,kBAAU,CAAC,kBAAkB,CAAC,CAAA;yCADT,yBAAU;OAH9B,oBAAoB,CA2ChC;IAAD,2BAAC;CAAA,AA5CD,IA4CC;AA3CY,oDAAoB"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { DynamicSection } from "./dynamic-section.js";
|
|
2
2
|
export type LoadAllDynamicSection = {
|
|
3
|
-
loadAll: () => Promise<LoadAllDynamicSection.Model>;
|
|
3
|
+
loadAll: (params: LoadAllDynamicSection.Params) => Promise<LoadAllDynamicSection.Model>;
|
|
4
4
|
};
|
|
5
5
|
export declare namespace LoadAllDynamicSection {
|
|
6
|
+
type Params = {
|
|
7
|
+
page?: string;
|
|
8
|
+
};
|
|
6
9
|
type Model = DynamicSection[];
|
|
7
10
|
}
|
|
@@ -43,4 +43,5 @@ function MessageCard(_a) {
|
|
|
43
43
|
var title = _a.title, status = _a.status, date = _a.date, name = _a.name, description = _a.description, url = _a.url;
|
|
44
44
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'MessageCard', children: (0, jsx_runtime_1.jsxs)(S.MessageCard, { href: url, children: [(0, jsx_runtime_1.jsxs)("div", { className: 'top', children: [(0, jsx_runtime_1.jsx)("h5", { className: 'title font-16-bold', children: title }), (0, jsx_runtime_1.jsx)(system_1.HighlightText, __assign({}, status)), (0, jsx_runtime_1.jsx)("span", { className: 'days font-12-regular', children: date })] }), (0, jsx_runtime_1.jsxs)("p", { className: 'description font-16-regular', children: [(0, jsx_runtime_1.jsxs)("strong", { className: '-bold', children: [name, ": "] }), " ", description] })] }) }));
|
|
45
45
|
}
|
|
46
|
-
exports.
|
|
46
|
+
exports.MessageCard = MessageCard;
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -89,4 +89,4 @@ function Content() {
|
|
|
89
89
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Content', children: (0, jsx_runtime_1.jsx)(S.Content, { children: (0, jsx_runtime_1.jsx)("div", { className: 'cards-box', children: messages.map(function (item) { return ((0, jsx_runtime_1.jsx)(card_1.MessageCard, __assign({}, item), 'message-card' + item.title)); }) }) }) }));
|
|
90
90
|
}
|
|
91
91
|
exports.Content = Content;
|
|
92
|
-
//#
|
|
92
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -32,4 +32,5 @@ function Content() {
|
|
|
32
32
|
var _a = (0, system_1.useAuthAdmin)(), user = _a.user, signOut = _a.signOut;
|
|
33
33
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Content', children: (0, jsx_runtime_1.jsxs)(S.Content, { children: [(0, jsx_runtime_1.jsx)("div", { className: 'user-profile', children: (0, jsx_runtime_1.jsxs)("div", { className: 'user-info', children: [(0, jsx_runtime_1.jsx)("h6", { className: 'font-16-semibold', children: user === null || user === void 0 ? void 0 : user.firstName }), (0, jsx_runtime_1.jsx)("p", { className: 'font-14-regular email', children: user === null || user === void 0 ? void 0 : user.emailAddress })] }) }), (0, jsx_runtime_1.jsx)("div", { className: 'divider', children: (0, jsx_runtime_1.jsx)("button", { className: 'sign-out-button font-14-regular', type: 'button', onClick: function () { return signOut(); }, children: "Sair" }) })] }) }));
|
|
34
34
|
}
|
|
35
|
-
exports.
|
|
35
|
+
exports.Content = Content;
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -103,4 +103,4 @@ function CreateAction(_a) {
|
|
|
103
103
|
return ((0, jsx_runtime_1.jsx)(S.Create, { children: ((_b = actions.create) === null || _b === void 0 ? void 0 : _b.link) ? ((0, jsx_runtime_1.jsxs)(link_1.default, { className: 'create-button font-14-regular', href: actions.create.link.href, children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: ((_c = actions === null || actions === void 0 ? void 0 : actions.create) === null || _c === void 0 ? void 0 : _c.icon) || 'IconPlusSharp' }) }), actions.create.text] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ui_1.Modal, { styles: { width: '100vw', maxWidth: '512px', borderRadius: 10 }, open: open, onClose: function () { return setOpen(false); }, children: (0, jsx_runtime_1.jsx)(ui_1.DynamicFormHandler, __assign({}, actions.create, { onSucess: onSuccessCreate })) }), (0, jsx_runtime_1.jsxs)("button", { className: 'create-button font-14-regular', type: 'button', onClick: function () { return setOpen(true); }, children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: (actions === null || actions === void 0 ? void 0 : actions.create.icon) || 'IconPlusSharp' }) }), actions.create.text] })] })) }));
|
|
104
104
|
}
|
|
105
105
|
exports.CreateAction = CreateAction;
|
|
106
|
-
//#
|
|
106
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -32,4 +32,4 @@ function Export(_a) {
|
|
|
32
32
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'Export', children: (0, jsx_runtime_1.jsxs)(S.Export, { className: 'font-14-regular', children: [(0, jsx_runtime_1.jsx)("div", { className: 'icon', children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconUpload' }) }), "Exportar"] }) }));
|
|
33
33
|
}
|
|
34
34
|
exports.Export = Export;
|
|
35
|
-
//#
|
|
35
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -135,4 +135,5 @@ function Filters(_a) {
|
|
|
135
135
|
});
|
|
136
136
|
}); }, options: filter.options.map(function (op) { return ({ label: op.text, value: op.value }); }) }, filter.data)); }), (0, jsx_runtime_1.jsx)(system_1.InputSearch, { onChange: function (value) { return (0, ui_1.updateRoute)({ params: { search: value, page: 1 }, router: router }); } })] }) }) }) }));
|
|
137
137
|
}
|
|
138
|
-
exports.Filters
|
|
138
|
+
exports.Filters = Filters;
|
|
139
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { PaginationModel } from '../../../../../../../../system/index.js';
|
|
2
|
-
export declare function PaginationTable({ page, endPage, pages, pageSize, totalItems, hasNextPage, hasPreviousPage }: PaginationModel): import("react/jsx-
|
|
2
|
+
export declare function PaginationTable({ page, endPage, pages, pageSize, totalItems, hasNextPage, hasPreviousPage }: PaginationModel): import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,4 +53,4 @@ function PaginationTable(_a) {
|
|
|
53
53
|
}, onClick: function () { return onSelect(pagination.page + 1); }, children: (0, jsx_runtime_1.jsx)(ui_1.Icon, { name: 'IconKeyboardRightArrow' }) }))] }));
|
|
54
54
|
}
|
|
55
55
|
exports.PaginationTable = PaginationTable;
|
|
56
|
-
//#
|
|
56
|
+
//# sourceMappingURL=index.js.map
|
package/dist/system/presentation/hooks/ui/use-table/components/table/skeleton-table/index.js
CHANGED
|
@@ -31,4 +31,4 @@ function SkeletonTable() {
|
|
|
31
31
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'skeleton', children: (0, jsx_runtime_1.jsxs)(S.SkeletonCustom, { "data-testid": 'skeleton', children: [(0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } }), (0, jsx_runtime_1.jsx)(ui_1.Skeleton, { type: 'line', size: { height: '60px', width: '100%', margin: "0" } })] }) }));
|
|
32
32
|
}
|
|
33
33
|
exports.SkeletonTable = SkeletonTable;
|
|
34
|
-
//#
|
|
34
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -47,4 +47,4 @@ function THeadItem(_a) {
|
|
|
47
47
|
return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'thead-item', children: (0, jsx_runtime_1.jsx)("th", { style: { width: colunm.width + 'px' }, children: (0, jsx_runtime_1.jsxs)(S.THeadItem, { style: { width: colunm.width + 'px' }, onClick: handleOrd, children: [(0, jsx_runtime_1.jsx)("span", { className: 'font-12-bold uppercase', children: colunm.label }), !disableOrdenationTable && colunm.hasAsc && ((0, jsx_runtime_1.jsx)("div", { className: 'ord-actions', children: (0, jsx_runtime_1.jsx)("button", { type: 'button', children: (0, jsx_runtime_1.jsx)("svg", { style: { transform: rotateArrow ? 'rotate(180deg)' : 'rotate(0deg)' }, xmlns: 'http://www.w3.org/2000/svg', width: '11', height: '6', viewBox: '0 0 11 6', fill: 'none', children: (0, jsx_runtime_1.jsx)("path", { d: 'M5.75 5.5L0.75 0.5H10.75L5.75 5.5Z', fill: ascIsActive ? '#1ABB64' : '#828282' }) }) }) }))] }) }) }));
|
|
48
48
|
}
|
|
49
49
|
exports.THeadItem = THeadItem;
|
|
50
|
-
//#
|
|
50
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -49,23 +49,23 @@ var dynamicSectionContext = (0, react_1.createContext)({
|
|
|
49
49
|
function DynamicSectionProvider(_a) {
|
|
50
50
|
var _this = this;
|
|
51
51
|
var children = _a.children, _b = _a.sections, sections = _b === void 0 ? [] : _b;
|
|
52
|
-
var
|
|
52
|
+
var router = (0, router_1.useRouter)();
|
|
53
53
|
var remote = system_1.container.get(system_1.Types.RemoteDynamicSection);
|
|
54
|
-
var
|
|
54
|
+
var _c = (0, ui_1.useQuery)({
|
|
55
55
|
queryKey: remote.keys().loadAll,
|
|
56
56
|
queryFn: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
57
57
|
var response;
|
|
58
58
|
return __generator(this, function (_a) {
|
|
59
59
|
switch (_a.label) {
|
|
60
|
-
case 0: return [4 /*yield*/, remote.loadAll()];
|
|
60
|
+
case 0: return [4 /*yield*/, remote.loadAll((0, ui_1.getPathnameRef)(undefined, router))];
|
|
61
61
|
case 1:
|
|
62
62
|
response = _a.sent();
|
|
63
63
|
return [2 /*return*/, response];
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
66
|
}); },
|
|
67
|
-
enabled: isReady && query.editMode === "true"
|
|
68
|
-
}), data =
|
|
67
|
+
enabled: router.isReady && router.query.editMode === "true"
|
|
68
|
+
}), data = _c.data, mutate = _c.mutate;
|
|
69
69
|
return ((0, jsx_runtime_1.jsx)(dynamicSectionContext.Provider, { value: { sections: data || sections, mutate: mutate }, children: children }));
|
|
70
70
|
}
|
|
71
71
|
exports.DynamicSectionProvider = DynamicSectionProvider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/ui/contexts/dynamic-sections/context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiD;AAEjD,sCAAuC;AACvC,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/ui/contexts/dynamic-sections/context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiD;AAEjD,sCAAuC;AACvC,2BAA8D;AAE9D,mCAAiF;AAEjF,IAAM,qBAAqB,GAAG,IAAA,qBAAa,EAA2E;IACpH,QAAQ,EAAE,EAAE;IACZ,MAAM,EAAE,cAAO,CAAC;CACjB,CAAC,CAAA;AAEF,SAAS,sBAAsB,CAAC,EAM/B;IAND,iBA2BC;QA1BC,QAAQ,cAAA,EACR,gBAAa,EAAb,QAAQ,mBAAG,EAAE,KAAA;IAMb,IAAM,MAAM,GAAG,IAAA,kBAAS,GAAE,CAAC;IAE3B,IAAM,MAAM,GAAG,kBAAS,CAAC,GAAG,CAAuB,cAAK,CAAC,oBAAoB,CAAC,CAAA;IAExE,IAAA,KAAmB,IAAA,aAAQ,EAAC;QAChC,QAAQ,EAAE,MAAM,CAAC,IAAI,EAAE,CAAC,OAAO;QAC/B,OAAO,EAAE;;;;4BACU,qBAAM,MAAM,CAAC,OAAO,CAAC,IAAA,mBAAc,EAAC,SAAS,EAAE,MAAM,CAAC,CAAC,EAAA;;wBAAlE,QAAQ,GAAG,SAAuD;wBAExE,sBAAO,QAAQ,EAAA;;;aAChB;QACD,OAAO,EAAE,MAAM,CAAC,OAAO,IAAI,MAAM,CAAC,KAAK,CAAC,QAAQ,KAAK,MAAM;KAC5D,CAAC,EARM,IAAI,UAAA,EAAE,MAAM,YAQlB,CAAA;IAEF,OAAO,CACL,uBAAC,qBAAqB,CAAC,QAAQ,IAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,QAAA,EAAE,YAC1E,QAAQ,GACsB,CAClC,CAAA;AACH,CAAC;AAMQ,wDAAsB;AAJ/B,SAAS,wBAAwB;IAC/B,OAAO,IAAA,kBAAU,EAAC,qBAAqB,CAAC,CAAA;AAC1C,CAAC;AAEgC,4DAAwB"}
|
|
@@ -1 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { AppContext } from "next/app";
|
|
2
|
+
export declare function getInitialPropsDynamicSection({ context }: {
|
|
3
|
+
context: AppContext;
|
|
4
|
+
}): Promise<import("../../../system/index.js").LoadAllDynamicSection.Model>;
|
|
@@ -37,22 +37,26 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.getInitialPropsDynamicSection = void 0;
|
|
40
|
+
var ui_1 = require("../../../ui/index.js");
|
|
40
41
|
var system_1 = require("../../../system/index.js");
|
|
41
|
-
function getInitialPropsDynamicSection() {
|
|
42
|
-
return __awaiter(this,
|
|
42
|
+
function getInitialPropsDynamicSection(_a) {
|
|
43
|
+
return __awaiter(this, arguments, void 0, function (_b) {
|
|
43
44
|
var remote, sections, err_1;
|
|
44
|
-
|
|
45
|
-
|
|
45
|
+
var context = _b.context;
|
|
46
|
+
return __generator(this, function (_c) {
|
|
47
|
+
switch (_c.label) {
|
|
46
48
|
case 0:
|
|
47
|
-
|
|
49
|
+
_c.trys.push([0, 2, , 3]);
|
|
50
|
+
if (context.router.asPath === '/404') {
|
|
51
|
+
return [2 /*return*/, []];
|
|
52
|
+
}
|
|
48
53
|
remote = system_1.container.get(system_1.Types.RemoteDynamicSection);
|
|
49
|
-
return [4 /*yield*/, remote.loadAll()];
|
|
54
|
+
return [4 /*yield*/, remote.loadAll((0, ui_1.getPathnameRef)(context))];
|
|
50
55
|
case 1:
|
|
51
|
-
sections =
|
|
56
|
+
sections = _c.sent();
|
|
52
57
|
return [2 /*return*/, sections];
|
|
53
58
|
case 2:
|
|
54
|
-
err_1 =
|
|
55
|
-
console.log(err_1);
|
|
59
|
+
err_1 = _c.sent();
|
|
56
60
|
return [2 /*return*/, []];
|
|
57
61
|
case 3: return [2 /*return*/];
|
|
58
62
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-initial-props-dynamic-section.js","sourceRoot":"","sources":["../../../../src/ui/contexts/dynamic-sections/get-initial-props-dynamic-section.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"get-initial-props-dynamic-section.js","sourceRoot":"","sources":["../../../../src/ui/contexts/dynamic-sections/get-initial-props-dynamic-section.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,2BAAsC;AACtC,mCAAkE;AAElE,SAAsB,6BAA6B;wDAAC,EAAoC;;YAAlC,OAAO,aAAA;;;;;oBAEzD,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;wBACrC,sBAAO,EAAE,EAAA;oBACX,CAAC;oBAEK,MAAM,GAAG,kBAAS,CAAC,GAAG,CAAuB,cAAK,CAAC,oBAAoB,CAAC,CAAA;oBAE7D,qBAAM,MAAM,CAAC,OAAO,CAAC,IAAA,mBAAc,EAAC,OAAO,CAAC,CAAC,EAAA;;oBAAxD,QAAQ,GAAG,SAA6C;oBAE9D,sBAAO,QAAQ,EAAC;;;oBAGhB,sBAAO,EAAE,EAAC;;;;;CAEb;AAfD,sEAeC"}
|
|
@@ -51,10 +51,10 @@ exports.useI18n = exports.I18nProvider = void 0;
|
|
|
51
51
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
52
52
|
var react_1 = require("react");
|
|
53
53
|
var router_1 = require("next/router");
|
|
54
|
+
var sites_1 = require("../../../sites/index.js");
|
|
55
|
+
var ui_1 = require("../../../ui/index.js");
|
|
54
56
|
var system_1 = require("../../../system/index.js");
|
|
55
57
|
var edit_mode_1 = require("./edit-mode/index.js");
|
|
56
|
-
var hooks_1 = require("../../../ui/hooks/index.js");
|
|
57
|
-
var sites_1 = require("../../../sites/index.js");
|
|
58
58
|
var I18nContext = (0, react_1.createContext)({
|
|
59
59
|
language: 'pt-BR',
|
|
60
60
|
languages: [],
|
|
@@ -72,13 +72,13 @@ function I18nProvider(props) {
|
|
|
72
72
|
function changeLanguage(locale, path) {
|
|
73
73
|
router.push({ pathname: pathname, query: query }, path || asPath, { locale: locale });
|
|
74
74
|
}
|
|
75
|
-
var _a = (0,
|
|
75
|
+
var _a = (0, ui_1.useQuery)({
|
|
76
76
|
queryKey: 'words',
|
|
77
77
|
queryFn: function () { return __awaiter(_this, void 0, void 0, function () {
|
|
78
78
|
var response;
|
|
79
79
|
return __generator(this, function (_a) {
|
|
80
80
|
switch (_a.label) {
|
|
81
|
-
case 0: return [4 /*yield*/, (0, sites_1.api)({ method: 'get', url: 'word' })];
|
|
81
|
+
case 0: return [4 /*yield*/, (0, sites_1.api)({ method: 'get', url: 'word', body: (0, ui_1.getPathnameRef)(undefined, router) })];
|
|
82
82
|
case 1:
|
|
83
83
|
response = _a.sent();
|
|
84
84
|
return [2 /*return*/, response];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../../../src/ui/contexts/i18n/context.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAiD;AAEjD,sCAAuC;AAEvC,
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","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, body) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.i18nGetInitialProps = void 0;
|
|
40
40
|
var sites_1 = require("../../../sites/index.js");
|
|
41
|
-
|
|
42
|
-
var path = pathname;
|
|
43
|
-
if (path === '/') {
|
|
44
|
-
return 'Home';
|
|
45
|
-
}
|
|
46
|
-
var parts = path.split('/');
|
|
47
|
-
return parts[1];
|
|
48
|
-
}
|
|
41
|
+
var ui_1 = require("../../../ui/index.js");
|
|
49
42
|
function i18nGetInitialProps(context_1, roleToEditLanguage_1) {
|
|
50
43
|
return __awaiter(this, arguments, void 0, function (context, roleToEditLanguage, disableEditMode) {
|
|
51
|
-
var
|
|
44
|
+
var words, languages, err_1;
|
|
52
45
|
var _a, _b;
|
|
53
46
|
if (disableEditMode === void 0) { disableEditMode = false; }
|
|
54
47
|
return __generator(this, function (_c) {
|
|
55
48
|
switch (_c.label) {
|
|
56
49
|
case 0:
|
|
57
50
|
_c.trys.push([0, 3, , 4]);
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
51
|
+
if (context.router.asPath === '/404') {
|
|
52
|
+
return [2 /*return*/, {
|
|
53
|
+
i18n: null,
|
|
54
|
+
}];
|
|
61
55
|
}
|
|
62
|
-
|
|
63
|
-
return [4 /*yield*/, (0, sites_1.api)({ method: 'get', url: 'word', body: { page: refPathname } })];
|
|
56
|
+
return [4 /*yield*/, (0, sites_1.api)({ method: 'get', url: 'word', body: (0, ui_1.getPathnameRef)(context) })];
|
|
64
57
|
case 1:
|
|
65
58
|
words = _c.sent();
|
|
66
59
|
return [4 /*yield*/, fetch(process.env.api + 'language').then(function (r) { return r.json(); })];
|
|
@@ -78,7 +71,6 @@ function i18nGetInitialProps(context_1, roleToEditLanguage_1) {
|
|
|
78
71
|
}];
|
|
79
72
|
case 3:
|
|
80
73
|
err_1 = _c.sent();
|
|
81
|
-
console.log(err_1);
|
|
82
74
|
return [2 /*return*/, {
|
|
83
75
|
i18n: null,
|
|
84
76
|
}];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-initial-props.js","sourceRoot":"","sources":["../../../../src/ui/contexts/i18n/get-initial-props.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA6B;
|
|
1
|
+
{"version":3,"file":"get-initial-props.js","sourceRoot":"","sources":["../../../../src/ui/contexts/i18n/get-initial-props.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iCAA6B;AAG7B,2BAAqC;AAIrC,SAAsB,mBAAmB;wDAAC,OAAmB,EAAE,kBAA0D,EAAE,eAAuB;;;QAAvB,gCAAA,EAAA,uBAAuB;;;;;oBAE9I,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;wBACrC,sBAAO;gCACL,IAAI,EAAE,IAAI;6BACX,EAAA;oBACH,CAAC;oBAEa,qBAAM,IAAA,WAAG,EAAC,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,IAAA,mBAAc,EAAC,OAAO,CAAC,EAAG,CAAC,EAAA;;oBAAjF,KAAK,GAAG,SAAyE;oBACrE,qBAAM,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,GAAG,GAAG,UAAU,CAAC,CAAC,IAAI,CAAC,UAAC,CAAC,IAAK,OAAA,CAAC,CAAC,IAAI,EAAE,EAAR,CAAQ,CAAC,EAAA;;oBAA3E,SAAS,GAAG,SAA+D;oBAEjF,sBAAO;4BACL,IAAI,EAAE;gCACJ,KAAK,OAAA;gCACL,eAAe,iBAAA;gCACf,kBAAkB,oBAAA;gCAClB,SAAS,EAAE,SAAS;gCACpB,QAAQ,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,MAAM;gCACjC,aAAa,EAAE,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,0CAAE,OAAO;6BACxC;yBACF,EAAA;;;oBAED,sBAAO;4BACL,IAAI,EAAE,IAAI;yBACX,EAAA;;;;;CAEJ;AA1BD,kDA0BC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getPathnameRef = void 0;
|
|
4
|
+
function getPathnameRef(context, router) {
|
|
5
|
+
var pathname = router.asPath || context.router.asPath;
|
|
6
|
+
if (pathname === '/') {
|
|
7
|
+
return { page: 'Home' };
|
|
8
|
+
}
|
|
9
|
+
var parts = pathname.split('/');
|
|
10
|
+
return { page: parts[1] };
|
|
11
|
+
}
|
|
12
|
+
exports.getPathnameRef = getPathnameRef;
|
|
13
|
+
//# sourceMappingURL=get-pathname-ref.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-pathname-ref.js","sourceRoot":"","sources":["../../../../src/ui/utils/_app_utils/get-pathname-ref.ts"],"names":[],"mappings":";;;AAGA,SAAgB,cAAc,CAAC,OAAoB,EAAE,MAAmB;IACtE,IAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,MAAM,CAAA;IAEvD,IAAI,QAAQ,KAAK,GAAG,EAAE,CAAC;QACrB,OAAO,EAAE,IAAI,EAAE,MAAM,EAAC,CAAA;IACxB,CAAC;IAED,IAAM,KAAK,GAAG,QAAQ,CAAC,KAAK,CAAC,GAAG,CAAC,CAAA;IAEjC,OAAO,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,CAAA;AAC3B,CAAC;AAVD,wCAUC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./get-pathname-ref.js";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./get-pathname-ref.js"), exports);
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/ui/utils/_app_utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAkC"}
|
package/dist/ui/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from './jwt/index.js';
|
|
2
2
|
export * from './uid/index.js';
|
|
3
3
|
export * from './file/index.js';
|
|
4
4
|
export * from './libs/index.js';
|
|
@@ -6,6 +6,7 @@ export * from './format/index.js';
|
|
|
6
6
|
export * from './buffer/index.js';
|
|
7
7
|
export * from './cookies.js';
|
|
8
8
|
export * from './facebook/index.js';
|
|
9
|
+
export * from './_app_utils/index.js';
|
|
9
10
|
export * from './formatters/index.js';
|
|
10
11
|
export * from './validations/index.js';
|
|
11
12
|
export * from './disable-scroll.js';
|
package/dist/ui/utils/index.js
CHANGED
|
@@ -22,6 +22,7 @@ __exportStar(require("./format/index.js"), exports);
|
|
|
22
22
|
__exportStar(require("./buffer/index.js"), exports);
|
|
23
23
|
__exportStar(require("./cookies.js"), exports);
|
|
24
24
|
__exportStar(require("./facebook/index.js"), exports);
|
|
25
|
+
__exportStar(require("./_app_utils/index.js"), exports);
|
|
25
26
|
__exportStar(require("./formatters/index.js"), exports);
|
|
26
27
|
__exportStar(require("./validations/index.js"), exports);
|
|
27
28
|
__exportStar(require("./disable-scroll.js"), exports);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB;AACtB,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB;AACzB,6CAA0B;AAC1B,+CAA4B;AAC5B,gDAA6B;AAC7B,mDAAgC;AAChC,uDAAoC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/ui/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,wCAAqB;AACrB,wCAAqB;AACrB,yCAAsB;AACtB,yCAAsB;AACtB,2CAAwB;AACxB,2CAAwB;AACxB,4CAAyB;AACzB,6CAA0B;AAC1B,+CAA4B;AAC5B,+CAA4B;AAC5B,gDAA6B;AAC7B,mDAAgC;AAChC,uDAAoC"}
|