@things-factory/board-service 9.0.0-beta.8 → 9.0.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/controllers/analyzer/analyze-integration.js +4 -4
- package/dist-server/controllers/analyzer/analyze-integration.js.map +1 -1
- package/dist-server/controllers/fonts.js +12 -9
- package/dist-server/controllers/fonts.js.map +1 -1
- package/dist-server/controllers/headless-model.d.ts +1 -1
- package/dist-server/controllers/headless-model.js +6 -6
- package/dist-server/controllers/headless-model.js.map +1 -1
- package/dist-server/controllers/headless-playlist.d.ts +1 -1
- package/dist-server/controllers/headless-playlist.js +5 -5
- package/dist-server/controllers/headless-playlist.js.map +1 -1
- package/dist-server/controllers/headless-pool-for-label.js +4 -17
- package/dist-server/controllers/headless-pool-for-label.js.map +1 -1
- package/dist-server/controllers/index.d.ts +1 -1
- package/dist-server/controllers/index.js +8 -8
- package/dist-server/controllers/index.js.map +1 -1
- package/dist-server/controllers/label-command.js +5 -5
- package/dist-server/controllers/label-command.js.map +1 -1
- package/dist-server/controllers/pdf.d.ts +9 -1
- package/dist-server/controllers/pdf.js +18 -11
- package/dist-server/controllers/pdf.js.map +1 -1
- package/dist-server/controllers/screenshot.js +14 -10
- package/dist-server/controllers/screenshot.js.map +1 -1
- package/dist-server/controllers/thumbnail.js +2 -2
- package/dist-server/controllers/thumbnail.js.map +1 -1
- package/dist-server/errors/index.d.ts +1 -1
- package/dist-server/errors/index.js +1 -1
- package/dist-server/errors/index.js.map +1 -1
- package/dist-server/errors/license-error.js +4 -2
- package/dist-server/errors/license-error.js.map +1 -1
- package/dist-server/index.d.ts +4 -4
- package/dist-server/index.js +4 -4
- package/dist-server/index.js.map +1 -1
- package/dist-server/migrations/1556862253000-SeedGroup.js +7 -4
- package/dist-server/migrations/1556862253000-SeedGroup.js.map +1 -1
- package/dist-server/routers/internal-board-view-router.js +1 -1
- package/dist-server/routers/internal-board-view-router.js.map +1 -1
- package/dist-server/routers/standalone-board-service-router.js +41 -41
- package/dist-server/routers/standalone-board-service-router.js.map +1 -1
- package/dist-server/routes.js +12 -10
- package/dist-server/routes.js.map +1 -1
- package/dist-server/service/analysis/analysis-query.js +2 -2
- package/dist-server/service/analysis/analysis-query.js.map +1 -1
- package/dist-server/service/analysis/index.d.ts +1 -1
- package/dist-server/service/analysis/index.js +2 -2
- package/dist-server/service/analysis/index.js.map +1 -1
- package/dist-server/service/board/board-history.d.ts +4 -3
- package/dist-server/service/board/board-history.js +35 -20
- package/dist-server/service/board/board-history.js.map +1 -1
- package/dist-server/service/board/board-mutation.d.ts +2 -2
- package/dist-server/service/board/board-mutation.js +112 -53
- package/dist-server/service/board/board-mutation.js.map +1 -1
- package/dist-server/service/board/board-query.d.ts +5 -5
- package/dist-server/service/board/board-query.js +40 -39
- package/dist-server/service/board/board-query.js.map +1 -1
- package/dist-server/service/board/board-subscription.d.ts +1 -1
- package/dist-server/service/board/board-subscription.js +6 -6
- package/dist-server/service/board/board-subscription.js.map +1 -1
- package/dist-server/service/board/board-type.d.ts +4 -2
- package/dist-server/service/board/board-type.js +28 -20
- package/dist-server/service/board/board-type.js.map +1 -1
- package/dist-server/service/board/board.d.ts +3 -2
- package/dist-server/service/board/board.js +26 -21
- package/dist-server/service/board/board.js.map +1 -1
- package/dist-server/service/board/event-subscriber.d.ts +5 -5
- package/dist-server/service/board/event-subscriber.js +8 -8
- package/dist-server/service/board/event-subscriber.js.map +1 -1
- package/dist-server/service/board/index.d.ts +6 -6
- package/dist-server/service/board/index.js +9 -9
- package/dist-server/service/board/index.js.map +1 -1
- package/dist-server/service/board-favorite/board-favorite-query.d.ts +1 -1
- package/dist-server/service/board-favorite/board-favorite-query.js +5 -5
- package/dist-server/service/board-favorite/board-favorite-query.js.map +1 -1
- package/dist-server/service/board-favorite/board-favorite-type.d.ts +1 -1
- package/dist-server/service/board-favorite/board-favorite-type.js +7 -7
- package/dist-server/service/board-favorite/board-favorite-type.js.map +1 -1
- package/dist-server/service/board-favorite/index.d.ts +1 -1
- package/dist-server/service/board-favorite/index.js +2 -2
- package/dist-server/service/board-favorite/index.js.map +1 -1
- package/dist-server/service/board-template/board-template-mutation.d.ts +2 -2
- package/dist-server/service/board-template/board-template-mutation.js +43 -25
- package/dist-server/service/board-template/board-template-mutation.js.map +1 -1
- package/dist-server/service/board-template/board-template-query.d.ts +2 -2
- package/dist-server/service/board-template/board-template-query.js +13 -13
- package/dist-server/service/board-template/board-template-query.js.map +1 -1
- package/dist-server/service/board-template/board-template-type.d.ts +1 -1
- package/dist-server/service/board-template/board-template-type.js +21 -18
- package/dist-server/service/board-template/board-template-type.js.map +1 -1
- package/dist-server/service/board-template/board-template.js +14 -14
- package/dist-server/service/board-template/board-template.js.map +1 -1
- package/dist-server/service/board-template/index.d.ts +3 -3
- package/dist-server/service/board-template/index.js +5 -5
- package/dist-server/service/board-template/index.js.map +1 -1
- package/dist-server/service/group/group-mutation.d.ts +2 -2
- package/dist-server/service/group/group-mutation.js +25 -16
- package/dist-server/service/group/group-mutation.js.map +1 -1
- package/dist-server/service/group/group-query.d.ts +3 -3
- package/dist-server/service/group/group-query.js +17 -17
- package/dist-server/service/group/group-query.js.map +1 -1
- package/dist-server/service/group/group-type.d.ts +1 -1
- package/dist-server/service/group/group-type.js +10 -10
- package/dist-server/service/group/group-type.js.map +1 -1
- package/dist-server/service/group/group.d.ts +1 -1
- package/dist-server/service/group/group.js +12 -12
- package/dist-server/service/group/group.js.map +1 -1
- package/dist-server/service/group/index.d.ts +3 -3
- package/dist-server/service/group/index.js +5 -5
- package/dist-server/service/group/index.js.map +1 -1
- package/dist-server/service/index.d.ts +6 -6
- package/dist-server/service/index.js +31 -31
- package/dist-server/service/index.js.map +1 -1
- package/dist-server/service/permission/domain-permission-subscriber.js +3 -3
- package/dist-server/service/permission/domain-permission-subscriber.js.map +1 -1
- package/dist-server/service/permission/index.d.ts +1 -1
- package/dist-server/service/permission/index.js +2 -2
- package/dist-server/service/permission/index.js.map +1 -1
- package/dist-server/service/play-group/event-subscriber.d.ts +1 -1
- package/dist-server/service/play-group/event-subscriber.js +3 -3
- package/dist-server/service/play-group/event-subscriber.js.map +1 -1
- package/dist-server/service/play-group/index.d.ts +5 -5
- package/dist-server/service/play-group/index.js +8 -8
- package/dist-server/service/play-group/index.js.map +1 -1
- package/dist-server/service/play-group/play-group-mutation.d.ts +2 -2
- package/dist-server/service/play-group/play-group-mutation.js +35 -22
- package/dist-server/service/play-group/play-group-mutation.js.map +1 -1
- package/dist-server/service/play-group/play-group-query.d.ts +3 -3
- package/dist-server/service/play-group/play-group-query.js +20 -18
- package/dist-server/service/play-group/play-group-query.js.map +1 -1
- package/dist-server/service/play-group/play-group-subscription.d.ts +1 -1
- package/dist-server/service/play-group/play-group-subscription.js +6 -6
- package/dist-server/service/play-group/play-group-subscription.js.map +1 -1
- package/dist-server/service/play-group/play-group-type.d.ts +1 -1
- package/dist-server/service/play-group/play-group-type.js +10 -10
- package/dist-server/service/play-group/play-group-type.js.map +1 -1
- package/dist-server/service/play-group/play-group.d.ts +2 -2
- package/dist-server/service/play-group/play-group.js +17 -13
- package/dist-server/service/play-group/play-group.js.map +1 -1
- package/dist-server/service/theme/index.d.ts +3 -3
- package/dist-server/service/theme/index.js +5 -5
- package/dist-server/service/theme/index.js.map +1 -1
- package/dist-server/service/theme/theme-mutation.d.ts +2 -2
- package/dist-server/service/theme/theme-mutation.js +44 -24
- package/dist-server/service/theme/theme-mutation.js.map +1 -1
- package/dist-server/service/theme/theme-query.d.ts +2 -2
- package/dist-server/service/theme/theme-query.js +13 -13
- package/dist-server/service/theme/theme-query.js.map +1 -1
- package/dist-server/service/theme/theme-type.d.ts +1 -1
- package/dist-server/service/theme/theme-type.js +18 -18
- package/dist-server/service/theme/theme-type.js.map +1 -1
- package/dist-server/service/theme/theme.js +16 -13
- package/dist-server/service/theme/theme.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -9
- package/views/internal-board-full-feature-view.html +0 -1
- package/views/internal-board-player-view.html +0 -1
- package/views/internal-board-service-view.html +0 -1
|
@@ -5,12 +5,12 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const shell_1 = require("@things-factory/shell");
|
|
7
7
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
8
|
-
const
|
|
9
|
-
const
|
|
8
|
+
const theme_js_1 = require("./theme.js");
|
|
9
|
+
const theme_type_js_1 = require("./theme-type.js");
|
|
10
10
|
let ThemeQuery = class ThemeQuery {
|
|
11
11
|
async theme(id, context) {
|
|
12
12
|
const { domain } = context.state;
|
|
13
|
-
return await (0, shell_1.getRepository)(
|
|
13
|
+
return await (0, shell_1.getRepository)(theme_js_1.Theme).findOne({
|
|
14
14
|
where: { domain: { id: domain.id }, id }
|
|
15
15
|
});
|
|
16
16
|
}
|
|
@@ -19,7 +19,7 @@ let ThemeQuery = class ThemeQuery {
|
|
|
19
19
|
const queryBuilder = (0, shell_1.getQueryBuilderFromListParams)({
|
|
20
20
|
domain,
|
|
21
21
|
params,
|
|
22
|
-
repository: await (0, shell_1.getRepository)(
|
|
22
|
+
repository: await (0, shell_1.getRepository)(theme_js_1.Theme),
|
|
23
23
|
searchables: ['name', 'description']
|
|
24
24
|
});
|
|
25
25
|
const [items, total] = await queryBuilder.getManyAndCount();
|
|
@@ -37,7 +37,7 @@ let ThemeQuery = class ThemeQuery {
|
|
|
37
37
|
};
|
|
38
38
|
exports.ThemeQuery = ThemeQuery;
|
|
39
39
|
tslib_1.__decorate([
|
|
40
|
-
(0, type_graphql_1.Query)(returns =>
|
|
40
|
+
(0, type_graphql_1.Query)(returns => theme_js_1.Theme, { nullable: true, description: 'Finds a single theme by its ID.' }),
|
|
41
41
|
tslib_1.__param(0, (0, type_graphql_1.Arg)('id')),
|
|
42
42
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
43
43
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -45,7 +45,7 @@ tslib_1.__decorate([
|
|
|
45
45
|
tslib_1.__metadata("design:returntype", Promise)
|
|
46
46
|
], ThemeQuery.prototype, "theme", null);
|
|
47
47
|
tslib_1.__decorate([
|
|
48
|
-
(0, type_graphql_1.Query)(returns =>
|
|
48
|
+
(0, type_graphql_1.Query)(returns => theme_type_js_1.ThemeList, { description: 'Retrieves a paginated list of themes.' }),
|
|
49
49
|
tslib_1.__param(0, (0, type_graphql_1.Args)(type => shell_1.ListParam)),
|
|
50
50
|
tslib_1.__param(1, (0, type_graphql_1.Ctx)()),
|
|
51
51
|
tslib_1.__metadata("design:type", Function),
|
|
@@ -53,27 +53,27 @@ tslib_1.__decorate([
|
|
|
53
53
|
tslib_1.__metadata("design:returntype", Promise)
|
|
54
54
|
], ThemeQuery.prototype, "themes", null);
|
|
55
55
|
tslib_1.__decorate([
|
|
56
|
-
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain),
|
|
56
|
+
(0, type_graphql_1.FieldResolver)(type => shell_1.Domain, { description: 'Resolves the domain associated with the theme.' }),
|
|
57
57
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
58
58
|
tslib_1.__metadata("design:type", Function),
|
|
59
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
59
|
+
tslib_1.__metadata("design:paramtypes", [theme_js_1.Theme]),
|
|
60
60
|
tslib_1.__metadata("design:returntype", Promise)
|
|
61
61
|
], ThemeQuery.prototype, "domain", null);
|
|
62
62
|
tslib_1.__decorate([
|
|
63
|
-
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
63
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { description: 'Resolves the user who last updated the theme.' }),
|
|
64
64
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
65
65
|
tslib_1.__metadata("design:type", Function),
|
|
66
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
66
|
+
tslib_1.__metadata("design:paramtypes", [theme_js_1.Theme]),
|
|
67
67
|
tslib_1.__metadata("design:returntype", Promise)
|
|
68
68
|
], ThemeQuery.prototype, "updater", null);
|
|
69
69
|
tslib_1.__decorate([
|
|
70
|
-
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User),
|
|
70
|
+
(0, type_graphql_1.FieldResolver)(type => auth_base_1.User, { description: 'Resolves the user who created the theme.' }),
|
|
71
71
|
tslib_1.__param(0, (0, type_graphql_1.Root)()),
|
|
72
72
|
tslib_1.__metadata("design:type", Function),
|
|
73
|
-
tslib_1.__metadata("design:paramtypes", [
|
|
73
|
+
tslib_1.__metadata("design:paramtypes", [theme_js_1.Theme]),
|
|
74
74
|
tslib_1.__metadata("design:returntype", Promise)
|
|
75
75
|
], ThemeQuery.prototype, "creator", null);
|
|
76
76
|
exports.ThemeQuery = ThemeQuery = tslib_1.__decorate([
|
|
77
|
-
(0, type_graphql_1.Resolver)(
|
|
77
|
+
(0, type_graphql_1.Resolver)(theme_js_1.Theme)
|
|
78
78
|
], ThemeQuery);
|
|
79
79
|
//# sourceMappingURL=theme-query.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-query.js","sourceRoot":"","sources":["../../../server/service/theme/theme-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,
|
|
1
|
+
{"version":3,"file":"theme-query.js","sourceRoot":"","sources":["../../../server/service/theme/theme-query.ts"],"names":[],"mappings":";;;;AAAA,+CAA8F;AAC9F,iDAAuG;AACvG,yDAAgD;AAChD,yCAAkC;AAClC,mDAA2C;AAGpC,IAAM,UAAU,GAAhB,MAAM,UAAU;IAEf,AAAN,KAAK,CAAC,KAAK,CAAY,EAAU,EAAS,OAAwB;QAChE,MAAM,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,KAAK,CAAA;QAEhC,OAAO,MAAM,IAAA,qBAAa,EAAC,gBAAK,CAAC,CAAC,OAAO,CAAC;YACxC,KAAK,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,MA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AC,EAAE,CAAC,gBAAK,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;IAC/E,mBAAA,IAAA,kBAAG,EAAC,IAAI,CAAC,CAAA;IAAc,mBAAA,IAAA,kBAAG,GAAE,CAAA;;;;uCAMxC;AAGK;IADL,IAAA,oBAAK,EAAC,OAAO,CAAC,EAAE,CAAC,yBAAS,EAAE,EAAE,WAAW,EAAE,uCAAuC,EAAE,CAAC;IACxE,mBAAA,IAAA,mBAAI,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAS,CAAC,CAAA;IAAqB,mBAAA,IAAA,kBAAG,GAAE,CAAA;;6CAAjB,iBAAS;;wCAatD;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,cAAM,EAAE,EAAE,WAAW,EAAE,gDAAgD,EAAE,CAAC;IACnF,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;wCAEhC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,WAAW,EAAE,+CAA+C,EAAE,CAAC;IAC/E,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;yCAEjC;AAGK;IADL,IAAA,4BAAa,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,WAAW,EAAE,0CAA0C,EAAE,CAAC;IAC1E,mBAAA,IAAA,mBAAI,GAAE,CAAA;;6CAAQ,gBAAK;;yCAEjC;qBAvCU,UAAU;IADtB,IAAA,uBAAQ,EAAC,gBAAK,CAAC;GACH,UAAU,CAwCtB","sourcesContent":["import { Resolver, Query, FieldResolver, Root, Args, Arg, Ctx, Directive } from 'type-graphql'\nimport { Domain, getQueryBuilderFromListParams, getRepository, ListParam } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\nimport { Theme } from './theme.js'\nimport { ThemeList } from './theme-type.js'\n\n@Resolver(Theme)\nexport class ThemeQuery {\n @Query(returns => Theme, { nullable: true, description: 'Finds a single theme by its ID.' })\n async theme(@Arg('id') id: string, @Ctx() context: ResolverContext): Promise<Theme> {\n const { domain } = context.state\n\n return await getRepository(Theme).findOne({\n where: { domain: { id: domain.id }, id }\n })\n }\n\n @Query(returns => ThemeList, { description: 'Retrieves a paginated list of themes.' })\n async themes(@Args(type => ListParam) params: ListParam, @Ctx() context: ResolverContext): Promise<ThemeList> {\n const { domain } = context.state\n\n const queryBuilder = getQueryBuilderFromListParams({\n domain,\n params,\n repository: await getRepository(Theme),\n searchables: ['name', 'description']\n })\n\n const [items, total] = await queryBuilder.getManyAndCount()\n\n return { items, total }\n }\n\n @FieldResolver(type => Domain, { description: 'Resolves the domain associated with the theme.' })\n async domain(@Root() theme: Theme): Promise<Domain> {\n return theme.domainId && (await getRepository(Domain).findOneBy({ id: theme.domainId }))\n }\n\n @FieldResolver(type => User, { description: 'Resolves the user who last updated the theme.' })\n async updater(@Root() theme: Theme): Promise<User> {\n return theme.updaterId && (await getRepository(User).findOneBy({ id: theme.updaterId }))\n }\n\n @FieldResolver(type => User, { description: 'Resolves the user who created the theme.' })\n async creator(@Root() theme: Theme): Promise<User> {\n return theme.creatorId && (await getRepository(User).findOneBy({ id: theme.creatorId }))\n }\n}\n"]}
|
|
@@ -4,79 +4,79 @@ exports.ThemeList = exports.ThemePatch = exports.NewTheme = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const type_graphql_1 = require("type-graphql");
|
|
6
6
|
const shell_1 = require("@things-factory/shell");
|
|
7
|
-
const
|
|
7
|
+
const theme_js_1 = require("./theme.js");
|
|
8
8
|
let NewTheme = class NewTheme {
|
|
9
9
|
};
|
|
10
10
|
exports.NewTheme = NewTheme;
|
|
11
11
|
tslib_1.__decorate([
|
|
12
|
-
(0, type_graphql_1.Field)(),
|
|
12
|
+
(0, type_graphql_1.Field)({ description: 'The name for the new theme.' }),
|
|
13
13
|
tslib_1.__metadata("design:type", String)
|
|
14
14
|
], NewTheme.prototype, "name", void 0);
|
|
15
15
|
tslib_1.__decorate([
|
|
16
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
16
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'A detailed description for the new theme.' }),
|
|
17
17
|
tslib_1.__metadata("design:type", String)
|
|
18
18
|
], NewTheme.prototype, "description", void 0);
|
|
19
19
|
tslib_1.__decorate([
|
|
20
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
20
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Whether the new theme should be active upon creation.' }),
|
|
21
21
|
tslib_1.__metadata("design:type", Boolean)
|
|
22
22
|
], NewTheme.prototype, "active", void 0);
|
|
23
23
|
tslib_1.__decorate([
|
|
24
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
24
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of the new theme.' }),
|
|
25
25
|
tslib_1.__metadata("design:type", String)
|
|
26
26
|
], NewTheme.prototype, "type", void 0);
|
|
27
27
|
tslib_1.__decorate([
|
|
28
|
-
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
28
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true, description: 'A JSON object of style values for the new theme.' }),
|
|
29
29
|
tslib_1.__metadata("design:type", Object)
|
|
30
30
|
], NewTheme.prototype, "value", void 0);
|
|
31
31
|
exports.NewTheme = NewTheme = tslib_1.__decorate([
|
|
32
|
-
(0, type_graphql_1.InputType)()
|
|
32
|
+
(0, type_graphql_1.InputType)({ description: 'Input for creating a new theme.' })
|
|
33
33
|
], NewTheme);
|
|
34
34
|
let ThemePatch = class ThemePatch {
|
|
35
35
|
};
|
|
36
36
|
exports.ThemePatch = ThemePatch;
|
|
37
37
|
tslib_1.__decorate([
|
|
38
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true }),
|
|
38
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { nullable: true, description: 'The unique identifier of the theme to update.' }),
|
|
39
39
|
tslib_1.__metadata("design:type", String)
|
|
40
40
|
], ThemePatch.prototype, "id", void 0);
|
|
41
41
|
tslib_1.__decorate([
|
|
42
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
42
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The new name for the theme.' }),
|
|
43
43
|
tslib_1.__metadata("design:type", String)
|
|
44
44
|
], ThemePatch.prototype, "name", void 0);
|
|
45
45
|
tslib_1.__decorate([
|
|
46
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
46
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The new description for the theme.' }),
|
|
47
47
|
tslib_1.__metadata("design:type", String)
|
|
48
48
|
], ThemePatch.prototype, "description", void 0);
|
|
49
49
|
tslib_1.__decorate([
|
|
50
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
50
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The new active status for the theme.' }),
|
|
51
51
|
tslib_1.__metadata("design:type", Boolean)
|
|
52
52
|
], ThemePatch.prototype, "active", void 0);
|
|
53
53
|
tslib_1.__decorate([
|
|
54
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
54
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The new type for the theme.' }),
|
|
55
55
|
tslib_1.__metadata("design:type", String)
|
|
56
56
|
], ThemePatch.prototype, "type", void 0);
|
|
57
57
|
tslib_1.__decorate([
|
|
58
|
-
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true }),
|
|
58
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, { nullable: true, description: 'The new JSON object of style values for the theme.' }),
|
|
59
59
|
tslib_1.__metadata("design:type", Object)
|
|
60
60
|
], ThemePatch.prototype, "value", void 0);
|
|
61
61
|
tslib_1.__decorate([
|
|
62
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
62
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'A flag indicating whether the theme is being created, updated, or deleted.' }),
|
|
63
63
|
tslib_1.__metadata("design:type", String)
|
|
64
64
|
], ThemePatch.prototype, "cuFlag", void 0);
|
|
65
65
|
exports.ThemePatch = ThemePatch = tslib_1.__decorate([
|
|
66
|
-
(0, type_graphql_1.InputType)()
|
|
66
|
+
(0, type_graphql_1.InputType)({ description: 'Input for updating (patching) an existing theme.' })
|
|
67
67
|
], ThemePatch);
|
|
68
68
|
let ThemeList = class ThemeList {
|
|
69
69
|
};
|
|
70
70
|
exports.ThemeList = ThemeList;
|
|
71
71
|
tslib_1.__decorate([
|
|
72
|
-
(0, type_graphql_1.Field)(type => [
|
|
72
|
+
(0, type_graphql_1.Field)(type => [theme_js_1.Theme], { description: 'The list of theme items.' }),
|
|
73
73
|
tslib_1.__metadata("design:type", Array)
|
|
74
74
|
], ThemeList.prototype, "items", void 0);
|
|
75
75
|
tslib_1.__decorate([
|
|
76
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.Int),
|
|
76
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.Int, { description: 'The total number of themes.' }),
|
|
77
77
|
tslib_1.__metadata("design:type", Number)
|
|
78
78
|
], ThemeList.prototype, "total", void 0);
|
|
79
79
|
exports.ThemeList = ThemeList = tslib_1.__decorate([
|
|
80
|
-
(0, type_graphql_1.ObjectType)()
|
|
80
|
+
(0, type_graphql_1.ObjectType)({ description: 'A paginated list of themes.' })
|
|
81
81
|
], ThemeList);
|
|
82
82
|
//# sourceMappingURL=theme-type.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme-type.js","sourceRoot":"","sources":["../../../server/service/theme/theme-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAoD;AACpD,
|
|
1
|
+
{"version":3,"file":"theme-type.js","sourceRoot":"","sources":["../../../server/service/theme/theme-type.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,iDAAoD;AACpD,yCAAkC;AAG3B,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AAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;;wCACzD;AAGb;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,oBAAY,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,oDAAoD,EAAE,CAAC;;yCACxG;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,4EAA4E,EAAE,CAAC;;0CACtG;qBApBJ,UAAU;IADtB,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,kDAAkD,EAAE,CAAC;GAClE,UAAU,CAqBtB;AAGM,IAAM,SAAS,GAAf,MAAM,SAAS;CAMrB,CAAA;AANY,8BAAS;AAEpB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,CAAC,gBAAK,CAAC,EAAE,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;;wCACtD;AAGd;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,kBAAG,EAAE,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;;wCACtD;oBALF,SAAS;IADrB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,6BAA6B,EAAE,CAAC;GAC9C,SAAS,CAMrB","sourcesContent":["import { ObjectType, Field, InputType, Int, ID } from 'type-graphql'\n\nimport { ScalarObject } from '@things-factory/shell'\nimport { Theme } from './theme.js'\n\n@InputType({ description: 'Input for creating a new theme.' })\nexport class NewTheme {\n @Field({ description: 'The name for the new theme.' })\n name: string\n\n @Field({ nullable: true, description: 'A detailed description for the new theme.' })\n description?: string\n\n @Field({ nullable: true, description: 'Whether the new theme should be active upon creation.' })\n active?: boolean\n\n @Field({ nullable: true, description: 'The type of the new theme.' })\n type?: string\n\n @Field(type => ScalarObject, { nullable: true, description: 'A JSON object of style values for the new theme.' })\n value?: any\n}\n\n@InputType({ description: 'Input for updating (patching) an existing theme.' })\nexport class ThemePatch {\n @Field(type => ID, { nullable: true, description: 'The unique identifier of the theme to update.' })\n id?: string\n\n @Field({ nullable: true, description: 'The new name for the theme.' })\n name?: string\n\n @Field({ nullable: true, description: 'The new description for the theme.' })\n description?: string\n\n @Field({ nullable: true, description: 'The new active status for the theme.' })\n active?: boolean\n\n @Field({ nullable: true, description: 'The new type for the theme.' })\n type?: string\n\n @Field(type => ScalarObject, { nullable: true, description: 'The new JSON object of style values for the theme.' })\n value?: any\n\n @Field({ nullable: true, description: 'A flag indicating whether the theme is being created, updated, or deleted.' })\n cuFlag?: string\n}\n\n@ObjectType({ description: 'A paginated list of themes.' })\nexport class ThemeList {\n @Field(type => [Theme], { description: 'The list of theme items.' })\n items: Theme[]\n\n @Field(type => Int, { description: 'The total number of themes.' })\n total: number\n}\n"]}
|
|
@@ -23,12 +23,12 @@ let Theme = class Theme {
|
|
|
23
23
|
exports.Theme = Theme;
|
|
24
24
|
tslib_1.__decorate([
|
|
25
25
|
(0, typeorm_1.PrimaryGeneratedColumn)('uuid'),
|
|
26
|
-
(0, type_graphql_1.Field)(type => type_graphql_1.ID),
|
|
26
|
+
(0, type_graphql_1.Field)(type => type_graphql_1.ID, { description: 'Unique identifier for the theme.' }),
|
|
27
27
|
tslib_1.__metadata("design:type", String)
|
|
28
28
|
], Theme.prototype, "id", void 0);
|
|
29
29
|
tslib_1.__decorate([
|
|
30
30
|
(0, typeorm_1.ManyToOne)(type => shell_1.Domain),
|
|
31
|
-
(0, type_graphql_1.Field)(type => shell_1.Domain),
|
|
31
|
+
(0, type_graphql_1.Field)(type => shell_1.Domain, { description: 'The domain to which this theme belongs.' }),
|
|
32
32
|
tslib_1.__metadata("design:type", shell_1.Domain)
|
|
33
33
|
], Theme.prototype, "domain", void 0);
|
|
34
34
|
tslib_1.__decorate([
|
|
@@ -37,47 +37,50 @@ tslib_1.__decorate([
|
|
|
37
37
|
], Theme.prototype, "domainId", void 0);
|
|
38
38
|
tslib_1.__decorate([
|
|
39
39
|
(0, typeorm_1.Column)(),
|
|
40
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
40
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The name of the theme.' }),
|
|
41
41
|
tslib_1.__metadata("design:type", String)
|
|
42
42
|
], Theme.prototype, "name", void 0);
|
|
43
43
|
tslib_1.__decorate([
|
|
44
44
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
45
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
45
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'A detailed description of the theme.' }),
|
|
46
46
|
tslib_1.__metadata("design:type", String)
|
|
47
47
|
], Theme.prototype, "description", void 0);
|
|
48
48
|
tslib_1.__decorate([
|
|
49
49
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
50
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
50
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'Indicates whether the theme is currently active and available for use.' }),
|
|
51
51
|
tslib_1.__metadata("design:type", Boolean)
|
|
52
52
|
], Theme.prototype, "active", void 0);
|
|
53
53
|
tslib_1.__decorate([
|
|
54
54
|
(0, typeorm_1.Column)({ nullable: true }),
|
|
55
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
55
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The type of the theme (e.g., Legend).' }),
|
|
56
56
|
tslib_1.__metadata("design:type", String)
|
|
57
57
|
], Theme.prototype, "type", void 0);
|
|
58
58
|
tslib_1.__decorate([
|
|
59
59
|
(0, typeorm_1.Column)('simple-json', { nullable: true }),
|
|
60
|
-
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
|
|
60
|
+
(0, type_graphql_1.Field)(type => shell_1.ScalarObject, {
|
|
61
|
+
nullable: true,
|
|
62
|
+
description: 'A JSON object containing the theme-specific style values.'
|
|
63
|
+
}),
|
|
61
64
|
tslib_1.__metadata("design:type", Object)
|
|
62
65
|
], Theme.prototype, "value", void 0);
|
|
63
66
|
tslib_1.__decorate([
|
|
64
67
|
(0, typeorm_1.CreateDateColumn)(),
|
|
65
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
68
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The timestamp when the theme was created.' }),
|
|
66
69
|
tslib_1.__metadata("design:type", Date)
|
|
67
70
|
], Theme.prototype, "createdAt", void 0);
|
|
68
71
|
tslib_1.__decorate([
|
|
69
72
|
(0, typeorm_1.UpdateDateColumn)(),
|
|
70
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
73
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The timestamp when the theme was last updated.' }),
|
|
71
74
|
tslib_1.__metadata("design:type", Date)
|
|
72
75
|
], Theme.prototype, "updatedAt", void 0);
|
|
73
76
|
tslib_1.__decorate([
|
|
74
77
|
(0, typeorm_1.DeleteDateColumn)(),
|
|
75
|
-
(0, type_graphql_1.Field)({ nullable: true }),
|
|
78
|
+
(0, type_graphql_1.Field)({ nullable: true, description: 'The timestamp when the theme was soft-deleted.' }),
|
|
76
79
|
tslib_1.__metadata("design:type", Date)
|
|
77
80
|
], Theme.prototype, "deletedAt", void 0);
|
|
78
81
|
tslib_1.__decorate([
|
|
79
82
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
80
|
-
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
83
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who created the theme.' }),
|
|
81
84
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
82
85
|
], Theme.prototype, "creator", void 0);
|
|
83
86
|
tslib_1.__decorate([
|
|
@@ -86,7 +89,7 @@ tslib_1.__decorate([
|
|
|
86
89
|
], Theme.prototype, "creatorId", void 0);
|
|
87
90
|
tslib_1.__decorate([
|
|
88
91
|
(0, typeorm_1.ManyToOne)(type => auth_base_1.User, { nullable: true }),
|
|
89
|
-
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true }),
|
|
92
|
+
(0, type_graphql_1.Field)(type => auth_base_1.User, { nullable: true, description: 'The user who last updated the theme.' }),
|
|
90
93
|
tslib_1.__metadata("design:type", auth_base_1.User)
|
|
91
94
|
], Theme.prototype, "updater", void 0);
|
|
92
95
|
tslib_1.__decorate([
|
|
@@ -96,6 +99,6 @@ tslib_1.__decorate([
|
|
|
96
99
|
exports.Theme = Theme = tslib_1.__decorate([
|
|
97
100
|
(0, typeorm_1.Entity)(),
|
|
98
101
|
(0, typeorm_1.Index)('ix_theme_0', (theme) => [theme.domain, theme.name, theme.deletedAt], { unique: true }),
|
|
99
|
-
(0, type_graphql_1.ObjectType)({ description: '
|
|
102
|
+
(0, type_graphql_1.ObjectType)({ description: 'Represents a visual theme or style that can be applied to dashboard components.' })
|
|
100
103
|
], Theme);
|
|
101
104
|
//# sourceMappingURL=theme.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../server/service/theme/theme.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AAEpD,iDAA4D;AAC5D,yDAAgD;AAOhD,IAAI,UAAU,GAAkC;IAC9C,MAAM,EAAE;QACN,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,QAAQ;KACnB;CACF,CAAA;AAKM,IAAM,KAAK,GAAX,MAAM,KAAK;IAChB,MAAM,CAAC,iBAAiB,CAAC,SAAoB;QAC3C,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,SAAS,CAAA;IACxC,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,IAAY;QAC9B,OAAO,UAAU,CAAC,IAAI,CAAC,CAAA;IACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../server/service/theme/theme.ts"],"names":[],"mappings":";;;;AAAA,qCAUgB;AAChB,+CAAoD;AAEpD,iDAA4D;AAC5D,yDAAgD;AAOhD,IAAI,UAAU,GAAkC;IAC9C,MAA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AAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,sCAAsC,EAAE,CAAC;sCACnF,gBAAI;sCAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,KAAY,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC;;wCAC1B;gBAnEP,KAAK;IAHjB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,YAAY,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,IAAI,EAAE,KAAK,CAAC,SAAS,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IACpG,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,iFAAiF,EAAE,CAAC;GAClG,KAAK,CAoEjB","sourcesContent":["import {\n CreateDateColumn,\n UpdateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n Column,\n RelationId,\n ManyToOne,\n PrimaryGeneratedColumn\n} from 'typeorm'\nimport { ObjectType, Field, ID } from 'type-graphql'\n\nimport { Domain, ScalarObject } from '@things-factory/shell'\nimport { User } from '@things-factory/auth-base'\n\nexport interface ThemeType {\n name: string\n propType: string\n}\n\nvar ThemeTypes: { [name: string]: ThemeType } = {\n Legend: {\n name: 'Legend',\n propType: 'legend'\n }\n}\n\n@Entity()\n@Index('ix_theme_0', (theme: Theme) => [theme.domain, theme.name, theme.deletedAt], { unique: true })\n@ObjectType({ description: 'Represents a visual theme or style that can be applied to dashboard components.' })\nexport class Theme {\n static registerThemeType(themeType: ThemeType) {\n ThemeTypes[themeType.name] = themeType\n }\n\n static getThemeType(name: string) {\n return ThemeTypes[name]\n }\n\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Unique identifier for the theme.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { description: 'The domain to which this theme belongs.' })\n domain?: Domain\n\n @RelationId((theme: Theme) => theme.domain)\n domainId?: string\n\n @Column()\n @Field({ nullable: true, description: 'The name of the theme.' })\n name?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'A detailed description of the theme.' })\n description?: string\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'Indicates whether the theme is currently active and available for use.' })\n active: boolean\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'The type of the theme (e.g., Legend).' })\n type?: string\n\n @Column('simple-json', { nullable: true })\n @Field(type => ScalarObject, {\n nullable: true,\n description: 'A JSON object containing the theme-specific style values.'\n })\n value?: any\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'The timestamp when the theme was created.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'The timestamp when the theme was last updated.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'The timestamp when the theme was soft-deleted.' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who created the theme.' })\n creator?: User\n\n @RelationId((theme: Theme) => theme.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'The user who last updated the theme.' })\n updater?: User\n\n @RelationId((theme: Theme) => theme.updater)\n updaterId?: string\n}\n"]}
|