@things-factory/lite-menu 5.0.7 → 6.0.0-alpha.0
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-server/index.js +3 -16
- package/dist-server/index.js.map +1 -1
- package/dist-server/migrations/index.js.map +1 -1
- package/dist-server/service/index.js +2 -15
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/lite-menu/index.js.map +1 -1
- package/dist-server/service/lite-menu/lite-menu-mutation.js +26 -37
- package/dist-server/service/lite-menu/lite-menu-mutation.js.map +1 -1
- package/dist-server/service/lite-menu/lite-menu-query.js +42 -54
- package/dist-server/service/lite-menu/lite-menu-query.js.map +1 -1
- package/dist-server/service/lite-menu/lite-menu-type.js +44 -52
- package/dist-server/service/lite-menu/lite-menu-type.js.map +1 -1
- package/dist-server/service/lite-menu/lite-menu.js +41 -49
- package/dist-server/service/lite-menu/lite-menu.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -0
- package/package.json +11 -11
- package/server/service/lite-menu/lite-menu-mutation.ts +7 -6
- package/server/service/lite-menu/lite-menu-query.ts +9 -9
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
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 _a, _b, _c, _d;
|
|
2
|
+
var _a;
|
|
12
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
4
|
exports.LiteMenu = void 0;
|
|
5
|
+
const tslib_1 = require("tslib");
|
|
14
6
|
const type_graphql_1 = require("type-graphql");
|
|
15
7
|
const typeorm_1 = require("typeorm");
|
|
16
8
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
@@ -18,120 +10,120 @@ const board_service_1 = require("@things-factory/board-service");
|
|
|
18
10
|
const shell_1 = require("@things-factory/shell");
|
|
19
11
|
let LiteMenu = class LiteMenu {
|
|
20
12
|
};
|
|
21
|
-
__decorate([
|
|
13
|
+
tslib_1.__decorate([
|
|
22
14
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
23
15
|
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
24
|
-
__metadata("design:type", String)
|
|
16
|
+
tslib_1.__metadata("design:type", String)
|
|
25
17
|
], LiteMenu.prototype, "id", void 0);
|
|
26
|
-
__decorate([
|
|
18
|
+
tslib_1.__decorate([
|
|
27
19
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
28
20
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
29
|
-
__metadata("design:type",
|
|
21
|
+
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
30
22
|
], LiteMenu.prototype, "domain", void 0);
|
|
31
|
-
__decorate([
|
|
23
|
+
tslib_1.__decorate([
|
|
32
24
|
(0, typeorm_1.RelationId)((liteMenu) => liteMenu.domain),
|
|
33
|
-
__metadata("design:type", String)
|
|
25
|
+
tslib_1.__metadata("design:type", String)
|
|
34
26
|
], LiteMenu.prototype, "domainId", void 0);
|
|
35
|
-
__decorate([
|
|
27
|
+
tslib_1.__decorate([
|
|
36
28
|
(0, typeorm_1.Column)(),
|
|
37
29
|
(0, type_graphql_1.Field)(),
|
|
38
|
-
__metadata("design:type", String)
|
|
30
|
+
tslib_1.__metadata("design:type", String)
|
|
39
31
|
], LiteMenu.prototype, "name", void 0);
|
|
40
|
-
__decorate([
|
|
32
|
+
tslib_1.__decorate([
|
|
41
33
|
(0, typeorm_1.Column)({
|
|
42
34
|
nullable: true
|
|
43
35
|
}),
|
|
44
36
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
-
__metadata("design:type", String)
|
|
37
|
+
tslib_1.__metadata("design:type", String)
|
|
46
38
|
], LiteMenu.prototype, "description", void 0);
|
|
47
|
-
__decorate([
|
|
39
|
+
tslib_1.__decorate([
|
|
48
40
|
(0, typeorm_1.Column)({
|
|
49
41
|
nullable: true,
|
|
50
42
|
default: ''
|
|
51
43
|
}),
|
|
52
44
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
53
|
-
__metadata("design:type", String)
|
|
45
|
+
tslib_1.__metadata("design:type", String)
|
|
54
46
|
], LiteMenu.prototype, "appName", void 0);
|
|
55
|
-
__decorate([
|
|
47
|
+
tslib_1.__decorate([
|
|
56
48
|
(0, typeorm_1.Column)({
|
|
57
49
|
nullable: true,
|
|
58
50
|
default: ''
|
|
59
51
|
}),
|
|
60
52
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
61
|
-
__metadata("design:type", String)
|
|
53
|
+
tslib_1.__metadata("design:type", String)
|
|
62
54
|
], LiteMenu.prototype, "parent", void 0);
|
|
63
|
-
__decorate([
|
|
55
|
+
tslib_1.__decorate([
|
|
64
56
|
(0, typeorm_1.Column)({
|
|
65
57
|
nullable: true
|
|
66
58
|
}),
|
|
67
59
|
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { nullable: true }),
|
|
68
|
-
__metadata("design:type", Number)
|
|
60
|
+
tslib_1.__metadata("design:type", Number)
|
|
69
61
|
], LiteMenu.prototype, "rank", void 0);
|
|
70
|
-
__decorate([
|
|
62
|
+
tslib_1.__decorate([
|
|
71
63
|
(0, typeorm_1.Column)({
|
|
72
64
|
nullable: true
|
|
73
65
|
}),
|
|
74
66
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
75
|
-
__metadata("design:type", String)
|
|
67
|
+
tslib_1.__metadata("design:type", String)
|
|
76
68
|
], LiteMenu.prototype, "type", void 0);
|
|
77
|
-
__decorate([
|
|
69
|
+
tslib_1.__decorate([
|
|
78
70
|
(0, typeorm_1.Column)({
|
|
79
71
|
nullable: true
|
|
80
72
|
}),
|
|
81
73
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
82
|
-
__metadata("design:type", String)
|
|
74
|
+
tslib_1.__metadata("design:type", String)
|
|
83
75
|
], LiteMenu.prototype, "value", void 0);
|
|
84
|
-
__decorate([
|
|
76
|
+
tslib_1.__decorate([
|
|
85
77
|
(0, typeorm_1.Column)({
|
|
86
78
|
nullable: true
|
|
87
79
|
}),
|
|
88
80
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
89
|
-
__metadata("design:type", String)
|
|
81
|
+
tslib_1.__metadata("design:type", String)
|
|
90
82
|
], LiteMenu.prototype, "icon", void 0);
|
|
91
|
-
__decorate([
|
|
83
|
+
tslib_1.__decorate([
|
|
92
84
|
(0, typeorm_1.Column)({
|
|
93
85
|
nullable: true
|
|
94
86
|
}),
|
|
95
87
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
96
|
-
__metadata("design:type", Boolean)
|
|
88
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
97
89
|
], LiteMenu.prototype, "active", void 0);
|
|
98
|
-
__decorate([
|
|
90
|
+
tslib_1.__decorate([
|
|
99
91
|
(0, type_graphql_1.Field)(type => board_service_1.Board, { nullable: true }),
|
|
100
|
-
__metadata("design:type", typeof (
|
|
92
|
+
tslib_1.__metadata("design:type", typeof (_a = typeof board_service_1.Board !== "undefined" && board_service_1.Board) === "function" ? _a : Object)
|
|
101
93
|
], LiteMenu.prototype, "board", void 0);
|
|
102
|
-
__decorate([
|
|
94
|
+
tslib_1.__decorate([
|
|
103
95
|
(0, typeorm_1.CreateDateColumn)(),
|
|
104
96
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
105
|
-
__metadata("design:type", Date)
|
|
97
|
+
tslib_1.__metadata("design:type", Date)
|
|
106
98
|
], LiteMenu.prototype, "createdAt", void 0);
|
|
107
|
-
__decorate([
|
|
99
|
+
tslib_1.__decorate([
|
|
108
100
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
109
101
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
110
|
-
__metadata("design:type", Date)
|
|
102
|
+
tslib_1.__metadata("design:type", Date)
|
|
111
103
|
], LiteMenu.prototype, "updatedAt", void 0);
|
|
112
|
-
__decorate([
|
|
104
|
+
tslib_1.__decorate([
|
|
113
105
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
114
106
|
nullable: true
|
|
115
107
|
}),
|
|
116
108
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
117
|
-
__metadata("design:type",
|
|
109
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
118
110
|
], LiteMenu.prototype, "creator", void 0);
|
|
119
|
-
__decorate([
|
|
111
|
+
tslib_1.__decorate([
|
|
120
112
|
(0, typeorm_1.RelationId)((liteMenu) => liteMenu.creator),
|
|
121
|
-
__metadata("design:type", String)
|
|
113
|
+
tslib_1.__metadata("design:type", String)
|
|
122
114
|
], LiteMenu.prototype, "creatorId", void 0);
|
|
123
|
-
__decorate([
|
|
115
|
+
tslib_1.__decorate([
|
|
124
116
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, {
|
|
125
117
|
nullable: true
|
|
126
118
|
}),
|
|
127
119
|
(0, type_graphql_1.Field)({ nullable: true }),
|
|
128
|
-
__metadata("design:type",
|
|
120
|
+
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
129
121
|
], LiteMenu.prototype, "updater", void 0);
|
|
130
|
-
__decorate([
|
|
122
|
+
tslib_1.__decorate([
|
|
131
123
|
(0, typeorm_1.RelationId)((liteMenu) => liteMenu.creator),
|
|
132
|
-
__metadata("design:type", String)
|
|
124
|
+
tslib_1.__metadata("design:type", String)
|
|
133
125
|
], LiteMenu.prototype, "updaterId", void 0);
|
|
134
|
-
LiteMenu = __decorate([
|
|
126
|
+
LiteMenu = tslib_1.__decorate([
|
|
135
127
|
(0, typeorm_1.Entity)(),
|
|
136
128
|
(0, typeorm_1.Index)('ix_lite_menus_0', (liteMenu) => [liteMenu.domain, liteMenu.name, liteMenu.appName], { unique: true }),
|
|
137
129
|
(0, typeorm_1.Index)('ix_lite_menus_1', (liteMenu) => [liteMenu.domain, liteMenu.appName, liteMenu.parent, liteMenu.rank], {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lite-menu.js","sourceRoot":"","sources":["../../../server/service/lite-menu/lite-menu.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"lite-menu.js","sourceRoot":"","sources":["../../../server/service/lite-menu/lite-menu.ts"],"names":[],"mappings":";;;;;AAAA,+CAAyD;AACzD,qCASgB;AAEhB,yDAAgD;AAChD,iEAAqD;AACrD,iDAA8C;AAQ9C,IAAa,QAAQ,GAArB,MAAa,QAAQ;CA8FpB,CAAA;AA3FC;IAFC,IAAA,gCAAsB,EAAC,MAAM,CAAC;IAC9B,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,CAAC;;oCACC;AAInB;IAFC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,CAAC;IACzB,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCACjB,cAAM;wCAAA;AAGf;IADC,IAAA,oBAAU,EAAC,CAAC,QAAkB,EAAE,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC;;0CACnC;AAIjB;IAFC,IAAA,gBAAM,GAAE;IACR,IAAA,oBAAK,GAAE;;sCACI;AAMZ;IAJC,IAAA,gBAAM,EAAC;QACN,QAAQ,EAAE,IAAI;KACf,CAAC;IACD,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;6CACN;AAOpB;IALC,IAAA,gBAAM,EAAC;QACN,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8FpB;AA9FY,4BAAQ","sourcesContent":["import { Field, ID, Int, ObjectType } from 'type-graphql'\nimport {\n Column,\n CreateDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\n\nimport { User } from '@things-factory/auth-base'\nimport { Board } from '@things-factory/board-service'\nimport { Domain } from '@things-factory/shell'\n\n@Entity()\n@Index('ix_lite_menus_0', (liteMenu: LiteMenu) => [liteMenu.domain, liteMenu.name, liteMenu.appName], { unique: true })\n@Index('ix_lite_menus_1', (liteMenu: LiteMenu) => [liteMenu.domain, liteMenu.appName, liteMenu.parent, liteMenu.rank], {\n unique: true\n})\n@ObjectType({ description: 'Entity for LiteMenu' })\nexport class LiteMenu {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID)\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field({ nullable: true })\n domain?: Domain\n\n @RelationId((liteMenu: LiteMenu) => liteMenu.domain)\n domainId?: string\n\n @Column()\n @Field()\n name: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n description?: string\n\n @Column({\n nullable: true,\n default: ''\n })\n @Field({ nullable: true })\n appName?: string\n\n @Column({\n nullable: true,\n default: ''\n })\n @Field({ nullable: true })\n parent?: string\n\n @Column({\n nullable: true\n })\n @Field(type => Int, { nullable: true })\n rank?: number\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n type?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n value?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n icon?: string\n\n @Column({\n nullable: true\n })\n @Field({ nullable: true })\n active?: boolean\n\n @Field(type => Board, { nullable: true })\n board?: Board\n\n @CreateDateColumn()\n @Field({ nullable: true })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true })\n updatedAt?: Date\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n creator?: User\n\n @RelationId((liteMenu: LiteMenu) => liteMenu.creator)\n creatorId?: string\n\n @ManyToOne(type => User, {\n nullable: true\n })\n @Field({ nullable: true })\n updater?: User\n\n @RelationId((liteMenu: LiteMenu) => liteMenu.creator)\n updaterId?: string\n}\n"]}
|