@builder6/steedos 3.2.0 → 3.2.1
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.
|
@@ -5,9 +5,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
6
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
7
|
};
|
|
8
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
9
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
10
|
-
};
|
|
11
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
9
|
exports.DirectModule = void 0;
|
|
13
10
|
const common_1 = require("@nestjs/common");
|
|
@@ -16,18 +13,15 @@ const core_1 = require("@builder6/core");
|
|
|
16
13
|
const core_2 = require("@builder6/core");
|
|
17
14
|
const object_service_1 = require("./object.service");
|
|
18
15
|
const devextreme_controller_1 = require("./devextreme.controller");
|
|
19
|
-
const app_controller_1 = require("./app.controller");
|
|
20
|
-
const pages_1 = __importDefault(require("@builder6/pages"));
|
|
21
16
|
let DirectModule = class DirectModule {
|
|
22
17
|
};
|
|
23
18
|
exports.DirectModule = DirectModule;
|
|
24
19
|
exports.DirectModule = DirectModule = __decorate([
|
|
25
20
|
(0, common_1.Module)({
|
|
26
|
-
imports: [core_2.AuthModule, core_1.MongodbModule
|
|
21
|
+
imports: [core_2.AuthModule, core_1.MongodbModule],
|
|
27
22
|
controllers: [
|
|
28
23
|
direct_controller_1.MongodbController,
|
|
29
24
|
devextreme_controller_1.DevExtremeController,
|
|
30
|
-
app_controller_1.DevExtremeAppController,
|
|
31
25
|
],
|
|
32
26
|
providers: [object_service_1.ObjectService],
|
|
33
27
|
})
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"direct.module.js","sourceRoot":"","sources":["../../src/steedos/direct.module.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"direct.module.js","sourceRoot":"","sources":["../../src/steedos/direct.module.ts"],"names":[],"mappings":";;;;;;;;;AAAA,2CAAwC;AACxC,2DAAwD;AACxD,yCAA+C;AAC/C,yCAA4C;AAC5C,qDAAiD;AACjD,mEAA+D;AAUxD,IAAM,YAAY,GAAlB,MAAM,YAAY;CAAG,CAAA;AAAf,oCAAY;uBAAZ,YAAY;IARxB,IAAA,eAAM,EAAC;QACN,OAAO,EAAE,CAAC,iBAAU,EAAE,oBAAa,CAAC;QACpC,WAAW,EAAE;YACX,qCAAiB;YACjB,4CAAoB;SACrB;QACD,SAAS,EAAE,CAAC,8BAAa,CAAC;KAC3B,CAAC;GACW,YAAY,CAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@builder6/steedos",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.1",
|
|
4
4
|
"main": "dist/plugin.module.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -22,5 +22,5 @@
|
|
|
22
22
|
"publishConfig": {
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
|
-
"gitHead": "
|
|
25
|
+
"gitHead": "da86657f07eb4bf3124bb090c6bc1b76b2cebeb0"
|
|
26
26
|
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Response } from 'express';
|
|
2
|
-
import { ConfigService } from '@nestjs/config';
|
|
3
|
-
import { PagesService } from '@builder6/pages';
|
|
4
|
-
export declare class DevExtremeAppController {
|
|
5
|
-
private readonly pagesService;
|
|
6
|
-
private configService;
|
|
7
|
-
constructor(pagesService: PagesService, configService: ConfigService);
|
|
8
|
-
pivot(objectName: string, query: Record<string, any>, req: Request, res: Response): Promise<{
|
|
9
|
-
error: string;
|
|
10
|
-
details: any;
|
|
11
|
-
}>;
|
|
12
|
-
grid(objectName: string, query: Record<string, any>, req: Request, res: Response): Promise<{
|
|
13
|
-
error: string;
|
|
14
|
-
details: any;
|
|
15
|
-
}>;
|
|
16
|
-
}
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
-
};
|
|
8
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
-
};
|
|
11
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
12
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
13
|
-
};
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.DevExtremeAppController = void 0;
|
|
16
|
-
const common_1 = require("@nestjs/common");
|
|
17
|
-
const config_1 = require("@nestjs/config");
|
|
18
|
-
const core_1 = require("@builder6/core");
|
|
19
|
-
const pages_1 = require("@builder6/pages");
|
|
20
|
-
const swagger_1 = require("@nestjs/swagger");
|
|
21
|
-
let DevExtremeAppController = class DevExtremeAppController {
|
|
22
|
-
constructor(pagesService, configService) {
|
|
23
|
-
this.pagesService = pagesService;
|
|
24
|
-
this.configService = configService;
|
|
25
|
-
}
|
|
26
|
-
async pivot(objectName = 'test', query, req, res) {
|
|
27
|
-
const user = req['user'];
|
|
28
|
-
try {
|
|
29
|
-
const schema = {
|
|
30
|
-
type: 'page',
|
|
31
|
-
title: objectName,
|
|
32
|
-
regions: ['body'],
|
|
33
|
-
body: [
|
|
34
|
-
{
|
|
35
|
-
type: 'devextreme-pivotgrid',
|
|
36
|
-
config: {
|
|
37
|
-
dataSource: {
|
|
38
|
-
store: {
|
|
39
|
-
type: 'custom',
|
|
40
|
-
version: 2,
|
|
41
|
-
url: '/api/v6/devextreme/' + objectName,
|
|
42
|
-
key: '_id',
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
],
|
|
48
|
-
};
|
|
49
|
-
const data = {};
|
|
50
|
-
const env = {
|
|
51
|
-
assetUrls: [
|
|
52
|
-
`https://unpkg.com/@steedos-widgets/devextreme@6.10.1-beta.38/dist/assets.json`,
|
|
53
|
-
],
|
|
54
|
-
};
|
|
55
|
-
const rendered = await this.pagesService.renderAmis(schema, data, env, user);
|
|
56
|
-
res.status(200).send(rendered);
|
|
57
|
-
}
|
|
58
|
-
catch (error) {
|
|
59
|
-
console.log(error);
|
|
60
|
-
return { error: 'App rendering failed', details: error.message };
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
async grid(objectName = 'test', query, req, res) {
|
|
64
|
-
const user = req['user'];
|
|
65
|
-
try {
|
|
66
|
-
const schema = {
|
|
67
|
-
type: 'page',
|
|
68
|
-
title: objectName,
|
|
69
|
-
regions: ['body'],
|
|
70
|
-
body: [
|
|
71
|
-
{
|
|
72
|
-
type: 'devextreme-datagrid',
|
|
73
|
-
config: {
|
|
74
|
-
dataSource: {
|
|
75
|
-
store: {
|
|
76
|
-
type: 'custom',
|
|
77
|
-
version: 2,
|
|
78
|
-
url: '/api/v6/devextreme/' + objectName,
|
|
79
|
-
key: '_id',
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
paging: {
|
|
83
|
-
pageSize: 10,
|
|
84
|
-
},
|
|
85
|
-
pager: {
|
|
86
|
-
showPageSizeSelector: true,
|
|
87
|
-
allowedPageSizes: [10, 25, 50, 100],
|
|
88
|
-
},
|
|
89
|
-
remoteOperations: false,
|
|
90
|
-
searchPanel: {
|
|
91
|
-
visible: true,
|
|
92
|
-
highlightCaseSensitive: true,
|
|
93
|
-
},
|
|
94
|
-
groupPanel: { visible: true },
|
|
95
|
-
grouping: {
|
|
96
|
-
autoExpandAll: false,
|
|
97
|
-
},
|
|
98
|
-
allowColumnReordering: true,
|
|
99
|
-
rowAlternationEnabled: true,
|
|
100
|
-
showBorders: true,
|
|
101
|
-
width: '100%',
|
|
102
|
-
},
|
|
103
|
-
},
|
|
104
|
-
],
|
|
105
|
-
};
|
|
106
|
-
const data = {};
|
|
107
|
-
const env = {
|
|
108
|
-
assetUrls: [
|
|
109
|
-
`https://unpkg.com/@steedos-widgets/devextreme@6.10.1-beta.38/dist/assets.json`,
|
|
110
|
-
],
|
|
111
|
-
};
|
|
112
|
-
const rendered = await this.pagesService.renderAmis(schema, data, env, user);
|
|
113
|
-
res.status(200).send(rendered);
|
|
114
|
-
}
|
|
115
|
-
catch (error) {
|
|
116
|
-
console.log(error);
|
|
117
|
-
return { error: 'App rendering failed', details: error.message };
|
|
118
|
-
}
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
exports.DevExtremeAppController = DevExtremeAppController;
|
|
122
|
-
__decorate([
|
|
123
|
-
(0, common_1.Get)('pivot/:objectName'),
|
|
124
|
-
__param(0, (0, common_1.Param)('objectName')),
|
|
125
|
-
__param(1, (0, common_1.Query)()),
|
|
126
|
-
__param(2, (0, common_1.Req)()),
|
|
127
|
-
__param(3, (0, common_1.Res)()),
|
|
128
|
-
__metadata("design:type", Function),
|
|
129
|
-
__metadata("design:paramtypes", [String, Object, Request, Object]),
|
|
130
|
-
__metadata("design:returntype", Promise)
|
|
131
|
-
], DevExtremeAppController.prototype, "pivot", null);
|
|
132
|
-
__decorate([
|
|
133
|
-
(0, common_1.Get)('grid/:objectName'),
|
|
134
|
-
__param(0, (0, common_1.Param)('objectName')),
|
|
135
|
-
__param(1, (0, common_1.Query)()),
|
|
136
|
-
__param(2, (0, common_1.Req)()),
|
|
137
|
-
__param(3, (0, common_1.Res)()),
|
|
138
|
-
__metadata("design:type", Function),
|
|
139
|
-
__metadata("design:paramtypes", [String, Object, Request, Object]),
|
|
140
|
-
__metadata("design:returntype", Promise)
|
|
141
|
-
], DevExtremeAppController.prototype, "grid", null);
|
|
142
|
-
exports.DevExtremeAppController = DevExtremeAppController = __decorate([
|
|
143
|
-
(0, swagger_1.ApiTags)('App'),
|
|
144
|
-
(0, common_1.Controller)('b6/devextreme'),
|
|
145
|
-
(0, common_1.UseGuards)(core_1.AdminGuard),
|
|
146
|
-
__metadata("design:paramtypes", [pages_1.PagesService,
|
|
147
|
-
config_1.ConfigService])
|
|
148
|
-
], DevExtremeAppController);
|
|
149
|
-
//# sourceMappingURL=app.controller.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app.controller.js","sourceRoot":"","sources":["../../src/steedos/app.controller.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAQwB;AAExB,2CAA+C;AAC/C,yCAA4C;AAC5C,2CAA+C;AAC/C,6CAAkE;AAM3D,IAAM,uBAAuB,GAA7B,MAAM,uBAAuB;IAClC,YACmB,YAA0B,EACnC,aAA4B;QADnB,iBAAY,GAAZ,YAAY,CAAc;QACnC,kBAAa,GAAb,aAAa,CAAe;IACnC,CAAC;IAGE,AAAN,KAAK,CAAC,KAAK,CACY,aAAqB,MAAM,EACvC,KAA0B,EAC5B,GAAY,EACZ,GAAa;QAEpB,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,CAAC;QACzB,IAAI,CAAC;YACH,MAAM,MAAM,GAAG;gBACb,IAAI,EAAE,MAAM;gBACZ,KAAK,EAAE,UAAU;gBACjB,OAAO,EAAE,CAAC,MAAM,CAAC;gBACjB,IAAI,EAAE;oBACJ;wBACE,IAAI,EAAE,sBAAsB;wBAC5B,MAAM,EAAE;4BACN,UAAU,EAAE;gCACV,KA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