@things-factory/gallery 10.1.233 → 10.1.236
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/client/bootstrap.ts +12 -0
- package/client/components/gallery-forms.ts +1 -1
- package/client/components/gallery-saver-setting-let.ts +78 -0
- package/client/components/gallery-show.ts +312 -0
- package/client/components/gallery-uploader.ts +35 -5
- package/client/components/gallery-viewer.ts +17 -4
- package/client/pages/gallery-page.ts +18 -16
- package/client/utils/gallery-api.ts +4 -2
- package/client/utils/gallery-saver.ts +72 -0
- package/dist-client/bootstrap.d.ts +1 -0
- package/dist-client/bootstrap.js +10 -0
- package/dist-client/bootstrap.js.map +1 -1
- package/dist-client/components/gallery-forms.js +1 -1
- package/dist-client/components/gallery-forms.js.map +1 -1
- package/dist-client/components/gallery-saver-setting-let.d.ts +11 -0
- package/dist-client/components/gallery-saver-setting-let.js +81 -0
- package/dist-client/components/gallery-saver-setting-let.js.map +1 -0
- package/dist-client/components/gallery-show.d.ts +46 -0
- package/dist-client/components/gallery-show.js +316 -0
- package/dist-client/components/gallery-show.js.map +1 -0
- package/dist-client/components/gallery-uploader.d.ts +5 -0
- package/dist-client/components/gallery-uploader.js +43 -4
- package/dist-client/components/gallery-uploader.js.map +1 -1
- package/dist-client/components/gallery-viewer.d.ts +2 -2
- package/dist-client/components/gallery-viewer.js +16 -3
- package/dist-client/components/gallery-viewer.js.map +1 -1
- package/dist-client/pages/gallery-page.d.ts +0 -1
- package/dist-client/pages/gallery-page.js +20 -16
- package/dist-client/pages/gallery-page.js.map +1 -1
- package/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-client/utils/gallery-api.d.ts +4 -0
- package/dist-client/utils/gallery-api.js +1 -1
- package/dist-client/utils/gallery-api.js.map +1 -1
- package/dist-client/utils/gallery-saver.d.ts +6 -0
- package/dist-client/utils/gallery-saver.js +69 -0
- package/dist-client/utils/gallery-saver.js.map +1 -0
- package/dist-server/service/gallery/gallery-resolver.js +13 -2
- package/dist-server/service/gallery/gallery-resolver.js.map +1 -1
- package/dist-server/service/gallery/gallery-rules.d.ts +4 -2
- package/dist-server/service/gallery/gallery-rules.js +4 -3
- package/dist-server/service/gallery/gallery-rules.js.map +1 -1
- package/dist-server/service/gallery/gallery-types.d.ts +3 -0
- package/dist-server/service/gallery/gallery-types.js +12 -0
- package/dist-server/service/gallery/gallery-types.js.map +1 -1
- package/dist-server/service/gallery/gallery.d.ts +2 -1
- package/dist-server/service/gallery/gallery.js +7 -2
- package/dist-server/service/gallery/gallery.js.map +1 -1
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +10 -9
- package/server/service/gallery/gallery-resolver.ts +13 -4
- package/server/service/gallery/gallery-rules.ts +5 -4
- package/server/service/gallery/gallery-types.ts +9 -0
- package/server/service/gallery/gallery.ts +7 -2
- package/test/gallery-persistence.test.ts +24 -3
- package/test/gallery-rules.test.ts +10 -4
- package/test/refusals-and-bounds.test.ts +28 -0
- package/translations/en.json +16 -2
- package/translations/es.json +16 -2
- package/translations/ja.json +16 -2
- package/translations/ko.json +16 -2
- package/translations/ms.json +16 -2
- package/translations/zh.json +16 -2
|
@@ -161,6 +161,10 @@ tslib_1.__decorate([
|
|
|
161
161
|
(0, type_graphql_1.Field)(type => gallery_1.GallerySpace, { nullable: true, description: "The company's gallery (default) or the person's own." }),
|
|
162
162
|
tslib_1.__metadata("design:type", String)
|
|
163
163
|
], GalleryPostInput.prototype, "space", void 0);
|
|
164
|
+
tslib_1.__decorate([
|
|
165
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "Shares a post of the own gallery with everyone of the domain; it is the person's alone when not given." }),
|
|
166
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
167
|
+
], GalleryPostInput.prototype, "shared", void 0);
|
|
164
168
|
tslib_1.__decorate([
|
|
165
169
|
(0, type_graphql_1.Field)({ nullable: true, description: 'A short caption, plain text.' }),
|
|
166
170
|
tslib_1.__metadata("design:type", String)
|
|
@@ -199,6 +203,14 @@ tslib_1.__decorate([
|
|
|
199
203
|
(0, type_graphql_1.Field)({ nullable: true, description: "Only this person's posts." }),
|
|
200
204
|
tslib_1.__metadata("design:type", String)
|
|
201
205
|
], GalleryFilter.prototype, "authorId", void 0);
|
|
206
|
+
tslib_1.__decorate([
|
|
207
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "Only the asking person's own posts - their own gallery." }),
|
|
208
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
209
|
+
], GalleryFilter.prototype, "mine", void 0);
|
|
210
|
+
tslib_1.__decorate([
|
|
211
|
+
(0, type_graphql_1.Field)({ nullable: true, description: "Only the posts everyone of the domain sees - the company's and the shared own ones." }),
|
|
212
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
213
|
+
], GalleryFilter.prototype, "everyone", void 0);
|
|
202
214
|
exports.GalleryFilter = GalleryFilter = tslib_1.__decorate([
|
|
203
215
|
(0, type_graphql_1.InputType)({ description: 'How a list of gallery posts is narrowed.' })
|
|
204
216
|
], GalleryFilter);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gallery-types.js","sourceRoot":"","sources":["../../../server/service/gallery/gallery-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,uCAAqD;AAG9C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAexB,CAAA;AAfY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;;wCAC5D;AAGV;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;;0CAC5C;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;;+CAC1E;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CA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AAZY,8CAAiB;AAE5B;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;;+CAC9B;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;sCACjC,IAAI;kDAAA;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;sCACjC,IAAI;gDAAA;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;mDAC/C;4BAXN,iBAAiB;IAD7B,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;GACjD,iBAAiB,CAY7B","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { GalleryPost, GallerySpace } from './gallery'\n\n@ObjectType({ description: 'One photo of a gallery post.' })\nexport class GalleryPhoto {\n @Field(type => ID, { description: 'The attachment id of the photo.' })\n id: string\n\n @Field({ nullable: true, description: 'The file name.' })\n name?: string\n\n @Field({ nullable: true, description: 'A small picture of it, usable as an image source.' })\n thumbnail?: string\n\n @Field({ description: 'Where the photo itself is read.' })\n fullpath: string\n\n @Field({ nullable: true, description: 'The image type.' })\n mimetype?: string\n}\n\n/** What everyone of the domain sees of an event a post hangs on - name, time and place, never its people (ADR-0165 사용자 판정 1). */\n@ObjectType({ description: 'The name, time and place of a calendar event - what the gallery shows of it.' })\nexport class GalleryEventFacts {\n @Field(type => ID, { description: 'The calendar event id.' })\n id: string\n\n @Field({ description: 'The event name.' })\n name: string\n\n @Field({ description: 'When it starts.' })\n startAt: Date\n\n @Field({ description: 'When it ends.' })\n endAt: Date\n\n @Field({ nullable: true, description: 'Where it takes place.' })\n location?: string\n}\n\n@ObjectType({ description: 'An event whose gallery is open, with how many posts it holds and the photo shown for it.' })\nexport class GalleryEventCard extends GalleryEventFacts {\n @Field(type => Int, { description: 'How many posts the viewer sees in it.' })\n postCount: number\n\n @Field(type => GalleryPhoto, {\n nullable: true,\n description: 'The photo shown for it - the first of its most liked post.'\n })\n cover?: GalleryPhoto\n}\n\n@ObjectType({ description: 'An event offered for a photo.' })\nexport class GalleryEventChoice extends GalleryEventFacts {\n @Field({ description: 'Whether it is near when the photo was taken.' })\n near: boolean\n}\n\n@ObjectType({ description: 'A tag and how many posts hold it.' })\nexport class GalleryTagCount {\n @Field({ description: 'The tag, without the # mark.' })\n tag: string\n\n @Field(type => Int, { description: 'How many posts hold it.' })\n count: number\n}\n\n@ObjectType({ description: 'A person, as the gallery names them.' })\nexport class GalleryPerson {\n @Field(type => ID, { description: 'User id.' })\n id: string\n\n @Field({ nullable: true, description: 'Their name.' })\n name?: string\n}\n\n@ObjectType({ description: 'A page of gallery posts.' })\nexport class GalleryPostList {\n @Field(type => [GalleryPost], { description: 'The posts, newest first.' })\n items: GalleryPost[]\n\n @Field(type => Int, { description: 'How many posts the narrowing holds.' })\n total: number\n}\n\n@ObjectType({ description: \"What the gallery's menu entry says.\" })\nexport class GallerySummary {\n @Field(type => Int, { description: 'Posts by others since the person last opened the gallery.' })\n fresh: number\n}\n\n@ObjectType({ description: 'A like as it stands after the change.' })\nexport class GalleryLikeState {\n @Field(type => ID, { description: 'Post id.' })\n id: string\n\n @Field(type => Int, { description: 'How many people like it.' })\n likeCount: number\n\n @Field({ description: 'Whether the person likes it.' })\n liked: boolean\n}\n\n@InputType({ description: 'What a gallery post holds besides its photos.' })\nexport class GalleryPostInput {\n @Field(type => GallerySpace, { nullable: true, description: \"The company's gallery (default) or the person's own.\" })\n space?: GallerySpace\n\n @Field({ nullable: true, description: 'A short caption, plain text.' })\n caption?: string\n\n @Field({ nullable: true, description: 'When the photos were taken; now when not given.' })\n takenAt?: Date\n\n @Field(type => [String], { nullable: true, description: 'The tags; a leading # is dropped.' })\n tags?: string[]\n\n @Field({ nullable: true, description: 'The calendar event the photos are of - only in the company gallery.' })\n eventId?: string\n}\n\n@InputType({ description: 'How a list of gallery posts is narrowed.' })\nexport class GalleryFilter {\n @Field(type => GallerySpace, { nullable: true, description: 'Only this space.' })\n space?: GallerySpace\n\n @Field({ nullable: true, description: 'Only the posts of this event.' })\n eventId?: string\n\n @Field({ nullable: true, description: 'Only the posts holding this tag.' })\n tag?: string\n\n @Field({ nullable: true, description: \"Only this person's posts.\" })\n authorId?: string\n}\n\n@InputType({ description: 'An event made from the gallery.' })\nexport class GalleryEventInput {\n @Field({ description: 'The event name.' })\n name: string\n\n @Field({ description: 'When it starts.' })\n startAt: Date\n\n @Field({ description: 'When it ends.' })\n endAt: Date\n\n @Field({ nullable: true, description: 'Where it takes place.' })\n location?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"gallery-types.js","sourceRoot":"","sources":["../../../server/service/gallery/gallery-types.ts"],"names":[],"mappings":";;;;AAAA,+CAAoE;AAEpE,uCAAqD;AAG9C,IAAM,YAAY,GAAlB,MAAM,YAAY;CAexB,CAAA;AAfY,oCAAY;AAEvB;IADC,IAAA,oBAAK,EAAC,IAAI,CAAC,EAAE,CAAC,iBAAE,EAAE,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;;wCAC5D;AAGV;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;;0CAC5C;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,mDAAmD,EAAE,CAAC;;+CAC1E;AAGlB;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;;8CAC1C;AAGhB;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;;8CACzC;uBAdN,YAAY;IADxB,IAAA,yBAAU,EAAC,EAAE,WAAW,EAAE,8BAA8B,EAAE,CAAC;GAC/C,YAAY,CAexB;AAED,iIA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,0CAA0C,EAAE,CAAC;GAC1D,aAAa,CAkBzB;AAGM,IAAM,iBAAiB,GAAvB,MAAM,iBAAiB;CAY7B,CAAA;AAZY,8CAAiB;AAE5B;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;;+CAC9B;AAGZ;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,iBAAiB,EAAE,CAAC;sCACjC,IAAI;kDAAA;AAGb;IADC,IAAA,oBAAK,EAAC,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC;sCACjC,IAAI;gDAAA;AAGX;IADC,IAAA,oBAAK,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,WAAW,EAAE,uBAAuB,EAAE,CAAC;;mDAC/C;4BAXN,iBAAiB;IAD7B,IAAA,wBAAS,EAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;GACjD,iBAAiB,CAY7B","sourcesContent":["import { Field, ID, InputType, Int, ObjectType } from 'type-graphql'\n\nimport { GalleryPost, GallerySpace } from './gallery'\n\n@ObjectType({ description: 'One photo of a gallery post.' })\nexport class GalleryPhoto {\n @Field(type => ID, { description: 'The attachment id of the photo.' })\n id: string\n\n @Field({ nullable: true, description: 'The file name.' })\n name?: string\n\n @Field({ nullable: true, description: 'A small picture of it, usable as an image source.' })\n thumbnail?: string\n\n @Field({ description: 'Where the photo itself is read.' })\n fullpath: string\n\n @Field({ nullable: true, description: 'The image type.' })\n mimetype?: string\n}\n\n/** What everyone of the domain sees of an event a post hangs on - name, time and place, never its people (ADR-0165 사용자 판정 1). */\n@ObjectType({ description: 'The name, time and place of a calendar event - what the gallery shows of it.' })\nexport class GalleryEventFacts {\n @Field(type => ID, { description: 'The calendar event id.' })\n id: string\n\n @Field({ description: 'The event name.' })\n name: string\n\n @Field({ description: 'When it starts.' })\n startAt: Date\n\n @Field({ description: 'When it ends.' })\n endAt: Date\n\n @Field({ nullable: true, description: 'Where it takes place.' })\n location?: string\n}\n\n@ObjectType({ description: 'An event whose gallery is open, with how many posts it holds and the photo shown for it.' })\nexport class GalleryEventCard extends GalleryEventFacts {\n @Field(type => Int, { description: 'How many posts the viewer sees in it.' })\n postCount: number\n\n @Field(type => GalleryPhoto, {\n nullable: true,\n description: 'The photo shown for it - the first of its most liked post.'\n })\n cover?: GalleryPhoto\n}\n\n@ObjectType({ description: 'An event offered for a photo.' })\nexport class GalleryEventChoice extends GalleryEventFacts {\n @Field({ description: 'Whether it is near when the photo was taken.' })\n near: boolean\n}\n\n@ObjectType({ description: 'A tag and how many posts hold it.' })\nexport class GalleryTagCount {\n @Field({ description: 'The tag, without the # mark.' })\n tag: string\n\n @Field(type => Int, { description: 'How many posts hold it.' })\n count: number\n}\n\n@ObjectType({ description: 'A person, as the gallery names them.' })\nexport class GalleryPerson {\n @Field(type => ID, { description: 'User id.' })\n id: string\n\n @Field({ nullable: true, description: 'Their name.' })\n name?: string\n}\n\n@ObjectType({ description: 'A page of gallery posts.' })\nexport class GalleryPostList {\n @Field(type => [GalleryPost], { description: 'The posts, newest first.' })\n items: GalleryPost[]\n\n @Field(type => Int, { description: 'How many posts the narrowing holds.' })\n total: number\n}\n\n@ObjectType({ description: \"What the gallery's menu entry says.\" })\nexport class GallerySummary {\n @Field(type => Int, { description: 'Posts by others since the person last opened the gallery.' })\n fresh: number\n}\n\n@ObjectType({ description: 'A like as it stands after the change.' })\nexport class GalleryLikeState {\n @Field(type => ID, { description: 'Post id.' })\n id: string\n\n @Field(type => Int, { description: 'How many people like it.' })\n likeCount: number\n\n @Field({ description: 'Whether the person likes it.' })\n liked: boolean\n}\n\n@InputType({ description: 'What a gallery post holds besides its photos.' })\nexport class GalleryPostInput {\n @Field(type => GallerySpace, { nullable: true, description: \"The company's gallery (default) or the person's own.\" })\n space?: GallerySpace\n\n @Field({ nullable: true, description: \"Shares a post of the own gallery with everyone of the domain; it is the person's alone when not given.\" })\n shared?: boolean\n\n @Field({ nullable: true, description: 'A short caption, plain text.' })\n caption?: string\n\n @Field({ nullable: true, description: 'When the photos were taken; now when not given.' })\n takenAt?: Date\n\n @Field(type => [String], { nullable: true, description: 'The tags; a leading # is dropped.' })\n tags?: string[]\n\n @Field({ nullable: true, description: 'The calendar event the photos are of - only in the company gallery.' })\n eventId?: string\n}\n\n@InputType({ description: 'How a list of gallery posts is narrowed.' })\nexport class GalleryFilter {\n @Field(type => GallerySpace, { nullable: true, description: 'Only this space.' })\n space?: GallerySpace\n\n @Field({ nullable: true, description: 'Only the posts of this event.' })\n eventId?: string\n\n @Field({ nullable: true, description: 'Only the posts holding this tag.' })\n tag?: string\n\n @Field({ nullable: true, description: \"Only this person's posts.\" })\n authorId?: string\n\n @Field({ nullable: true, description: \"Only the asking person's own posts - their own gallery.\" })\n mine?: boolean\n\n @Field({ nullable: true, description: \"Only the posts everyone of the domain sees - the company's and the shared own ones.\" })\n everyone?: boolean\n}\n\n@InputType({ description: 'An event made from the gallery.' })\nexport class GalleryEventInput {\n @Field({ description: 'The event name.' })\n name: string\n\n @Field({ description: 'When it starts.' })\n startAt: Date\n\n @Field({ description: 'When it ends.' })\n endAt: Date\n\n @Field({ nullable: true, description: 'Where it takes place.' })\n location?: string\n}\n"]}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { User } from '@things-factory/auth-base';
|
|
2
2
|
import { Event } from '@things-factory/calendar';
|
|
3
3
|
import { Domain } from '@things-factory/shell';
|
|
4
|
-
/** Where a post lives.
|
|
4
|
+
/** Where a post lives. The company's is seen by everyone of the domain; the person's own by them, and by everyone once shared. */
|
|
5
5
|
export declare enum GallerySpace {
|
|
6
6
|
/** The company's - events, workshops and work. */
|
|
7
7
|
COMPANY = "COMPANY",
|
|
@@ -13,6 +13,7 @@ export declare class GalleryPost {
|
|
|
13
13
|
domain?: Domain;
|
|
14
14
|
domainId?: string;
|
|
15
15
|
space: GallerySpace;
|
|
16
|
+
shared: boolean;
|
|
16
17
|
caption?: string;
|
|
17
18
|
takenAt: Date;
|
|
18
19
|
tags?: string[];
|
|
@@ -12,7 +12,7 @@ const type_graphql_1 = require("type-graphql");
|
|
|
12
12
|
const auth_base_1 = require("@things-factory/auth-base");
|
|
13
13
|
const calendar_1 = require("@things-factory/calendar");
|
|
14
14
|
const shell_1 = require("@things-factory/shell");
|
|
15
|
-
/** Where a post lives.
|
|
15
|
+
/** Where a post lives. The company's is seen by everyone of the domain; the person's own by them, and by everyone once shared. */
|
|
16
16
|
var GallerySpace;
|
|
17
17
|
(function (GallerySpace) {
|
|
18
18
|
/** The company's - events, workshops and work. */
|
|
@@ -46,6 +46,11 @@ tslib_1.__decorate([
|
|
|
46
46
|
(0, type_graphql_1.Field)(type => GallerySpace, { description: "The company's gallery or the person's own." }),
|
|
47
47
|
tslib_1.__metadata("design:type", String)
|
|
48
48
|
], GalleryPost.prototype, "space", void 0);
|
|
49
|
+
tslib_1.__decorate([
|
|
50
|
+
(0, typeorm_1.Column)({ default: false }),
|
|
51
|
+
(0, type_graphql_1.Field)({ description: "Whether a post of the person's own gallery is open to everyone of the domain; the company's always is." }),
|
|
52
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
53
|
+
], GalleryPost.prototype, "shared", void 0);
|
|
49
54
|
tslib_1.__decorate([
|
|
50
55
|
(0, typeorm_1.Column)({ type: 'text', nullable: true }),
|
|
51
56
|
(0, type_graphql_1.Field)({ nullable: true, description: 'A short caption, plain text.' }),
|
|
@@ -130,7 +135,7 @@ exports.GalleryPost = GalleryPost = tslib_1.__decorate([
|
|
|
130
135
|
(0, typeorm_1.Index)('ix_gallery_post_1', (one) => [one.domain, one.event]),
|
|
131
136
|
(0, typeorm_1.Index)('ix_gallery_post_2', (one) => [one.domain, one.creator]),
|
|
132
137
|
(0, type_graphql_1.ObjectType)({
|
|
133
|
-
description:
|
|
138
|
+
description: "A post of the gallery - one or more photos, a short caption and tags; the company's seen by everyone of the domain."
|
|
134
139
|
})
|
|
135
140
|
], GalleryPost);
|
|
136
141
|
let GalleryLike = class GalleryLike {
|
|
@@ -1 +1 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AE,CAAC,GAAG,CAAC,OAAO,CAAC;;+CAC7B;AAGlB;IADC,IAAA,mBAAS,EAAC,IAAI,CAAC,EAAE,CAAC,gBAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAClC,gBAAI;6CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,GAAiB,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;;+CAC7B;uBAtCP,YAAY;IALxB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,oBAAoB,EAAE,CAAC,GAAiB,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE;QAC1E,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;GACW,YAAY,CAuCxB","sourcesContent":["/*\n * The tables of the gallery (ADR-0165 decisions 2, 4-6): a post of photos, a like, an event its gallery is open for,\n * and when a person last looked. The photos themselves are attachments hung on the post (`refType: 'Gallery Post'`);\n * an event is calendar's.\n */\nimport {\n Column,\n CreateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { Field, ID, Int, ObjectType, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Event } from '@things-factory/calendar'\nimport { Domain } from '@things-factory/shell'\n\n/** Where a post lives. Both are seen by everyone of the domain - the space says only whose it is and where it shows. */\nexport enum GallerySpace {\n /** The company's - events, workshops and work. */\n COMPANY = 'COMPANY',\n /** The person's own - their days, hobbies and pets. */\n PERSONAL = 'PERSONAL'\n}\n\nregisterEnumType(GallerySpace, {\n name: 'GallerySpace',\n description: \"Where a gallery post lives: the company's gallery or the person's own.\"\n})\n\n@Entity()\n@Index('ix_gallery_post_0', (one: GalleryPost) => [one.domain, one.createdAt])\n@Index('ix_gallery_post_1', (one: GalleryPost) => [one.domain, one.event])\n@Index('ix_gallery_post_2', (one: GalleryPost) => [one.domain, one.creator])\n@ObjectType({\n description: 'A post of the gallery - one or more photos, a short caption and tags, seen by everyone of the domain.'\n})\nexport class GalleryPost {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Post id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain the post is in.' })\n domain?: Domain\n\n @RelationId((one: GalleryPost) => one.domain)\n domainId?: string\n\n @Column({ default: GallerySpace.COMPANY })\n @Field(type => GallerySpace, { description: \"The company's gallery or the person's own.\" })\n space: GallerySpace\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'A short caption, plain text.' })\n caption?: string\n\n @Column()\n @Field({ description: 'When the photos were taken - from the first photo, or when it was posted.' })\n takenAt: Date\n\n @Column('simple-json', { nullable: true })\n @Field(type => [String], { nullable: true, description: 'The tags, without the # mark.' })\n tags?: string[]\n\n /* Read as its name, time and place (GalleryEventFacts) - the post's field never hands out the calendar's event. */\n @ManyToOne(type => Event, { nullable: true })\n event?: Event\n\n @RelationId((one: GalleryPost) => one.event)\n eventId?: string\n\n @Column('int', { default: 0 })\n @Field(type => Int, { description: 'How many people like it.' })\n likeCount: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When a moderator hid it; hidden, only its owner and the moderators see it.' })\n hiddenAt?: Date\n\n @Column({ nullable: true })\n hiddenReason?: string\n\n @ManyToOne(type => User, { nullable: true })\n hiddenBy?: User\n\n @RelationId((one: GalleryPost) => one.hiddenBy)\n hiddenById?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was posted.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When it last changed.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When its owner deleted it.' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who posted it - the owner.' })\n creator?: User\n\n @RelationId((one: GalleryPost) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who changed it last.' })\n updater?: User\n\n @RelationId((one: GalleryPost) => one.updater)\n updaterId?: string\n}\n\n@Entity()\n@Index('ix_gallery_like_0', (one: GalleryLike) => [one.post, one.user], { unique: true, where: '\"deleted_at\" IS NULL' })\n@ObjectType({ description: 'One person liking one gallery post.' })\nexport class GalleryLike {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Like id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryLike) => one.domain)\n domainId?: string\n\n @ManyToOne(type => GalleryPost, { onDelete: 'CASCADE' })\n post?: GalleryPost\n\n @RelationId((one: GalleryLike) => one.post)\n postId?: string\n\n @ManyToOne(type => User)\n @Field(type => User, { nullable: true, description: 'Who likes it.' })\n user?: User\n\n @RelationId((one: GalleryLike) => one.user)\n userId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When they liked it.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryLike) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryLike) => one.updater)\n updaterId?: string\n}\n\n/**\n * A calendar event whose gallery is open - opened by a moderator making the event from the gallery, or by the first post\n * linked to it. Everyone of the domain may post to an open event (ADR-0165 사용자 판정 1).\n */\n@Entity()\n@Index('ix_gallery_event_0', (one: GalleryEvent) => [one.domain, one.event], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: 'A calendar event whose gallery is open to everyone of the domain.' })\nexport class GalleryEvent {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Gallery event id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryEvent) => one.domain)\n domainId?: string\n\n @ManyToOne(type => Event, { onDelete: 'CASCADE' })\n event?: Event\n\n @RelationId((one: GalleryEvent) => one.event)\n eventId?: string\n\n @CreateDateColumn()\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryEvent) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryEvent) => one.updater)\n updaterId?: string\n}\n\n/** When a person last opened the gallery - the menu counts the posts that came after. */\n@Entity()\n@Index('ix_gallery_visit_0', (one: GalleryVisit) => [one.domain, one.user], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\nexport class GalleryVisit {\n @PrimaryGeneratedColumn('uuid')\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryVisit) => one.domain)\n domainId?: string\n\n @ManyToOne(type => User)\n user?: User\n\n @RelationId((one: GalleryVisit) => one.user)\n userId?: string\n\n @Column()\n seenAt: Date\n\n @CreateDateColumn()\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryVisit) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryVisit) => one.updater)\n updaterId?: string\n}\n"]}
|
|
1
|
+
{"version":3,"file":"gallery.js","sourceRoot":"","sources":["../../../server/service/gallery/gallery.ts"],"names":[],"mappings":";;;;AAAA;;;;GAIG;AACH,qCAUgB;AAChB,+CAA2E;AAE3E,yDAAgD;AAChD,uDAAgD;AAChD,iDAA8C;AAE9C,kIAAkI;AAClI,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,kDAA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BAAI,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;sCAClC,gBAAI;6CAAA;AAGd;IADC,IAAA,oBAAU,EAAC,CAAC,GAAiB,EAAE,EAAE,CAAC,GAAG,CAAC,OAAO,CAAC;;+CAC7B;uBAtCP,YAAY;IALxB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,oBAAoB,EAAE,CAAC,GAAiB,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,EAAE;QAC1E,MAAM,EAAE,IAAI;QACZ,KAAK,EAAE,sBAAsB;KAC9B,CAAC;GACW,YAAY,CAuCxB","sourcesContent":["/*\n * The tables of the gallery (ADR-0165 decisions 2, 4-6): a post of photos, a like, an event its gallery is open for,\n * and when a person last looked. The photos themselves are attachments hung on the post (`refType: 'Gallery Post'`);\n * an event is calendar's.\n */\nimport {\n Column,\n CreateDateColumn,\n DeleteDateColumn,\n Entity,\n Index,\n ManyToOne,\n PrimaryGeneratedColumn,\n RelationId,\n UpdateDateColumn\n} from 'typeorm'\nimport { Field, ID, Int, ObjectType, registerEnumType } from 'type-graphql'\n\nimport { User } from '@things-factory/auth-base'\nimport { Event } from '@things-factory/calendar'\nimport { Domain } from '@things-factory/shell'\n\n/** Where a post lives. The company's is seen by everyone of the domain; the person's own by them, and by everyone once shared. */\nexport enum GallerySpace {\n /** The company's - events, workshops and work. */\n COMPANY = 'COMPANY',\n /** The person's own - their days, hobbies and pets. */\n PERSONAL = 'PERSONAL'\n}\n\nregisterEnumType(GallerySpace, {\n name: 'GallerySpace',\n description: \"Where a gallery post lives: the company's gallery or the person's own.\"\n})\n\n@Entity()\n@Index('ix_gallery_post_0', (one: GalleryPost) => [one.domain, one.createdAt])\n@Index('ix_gallery_post_1', (one: GalleryPost) => [one.domain, one.event])\n@Index('ix_gallery_post_2', (one: GalleryPost) => [one.domain, one.creator])\n@ObjectType({\n description: \"A post of the gallery - one or more photos, a short caption and tags; the company's seen by everyone of the domain.\"\n})\nexport class GalleryPost {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Post id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n @Field(type => Domain, { nullable: true, description: 'The domain the post is in.' })\n domain?: Domain\n\n @RelationId((one: GalleryPost) => one.domain)\n domainId?: string\n\n @Column({ default: GallerySpace.COMPANY })\n @Field(type => GallerySpace, { description: \"The company's gallery or the person's own.\" })\n space: GallerySpace\n\n /* A post of the own gallery is the person's alone until they share it (2026-10-31, the user) - private by default. */\n @Column({ default: false })\n @Field({ description: \"Whether a post of the person's own gallery is open to everyone of the domain; the company's always is.\" })\n shared: boolean\n\n @Column({ type: 'text', nullable: true })\n @Field({ nullable: true, description: 'A short caption, plain text.' })\n caption?: string\n\n @Column()\n @Field({ description: 'When the photos were taken - from the first photo, or when it was posted.' })\n takenAt: Date\n\n @Column('simple-json', { nullable: true })\n @Field(type => [String], { nullable: true, description: 'The tags, without the # mark.' })\n tags?: string[]\n\n /* Read as its name, time and place (GalleryEventFacts) - the post's field never hands out the calendar's event. */\n @ManyToOne(type => Event, { nullable: true })\n event?: Event\n\n @RelationId((one: GalleryPost) => one.event)\n eventId?: string\n\n @Column('int', { default: 0 })\n @Field(type => Int, { description: 'How many people like it.' })\n likeCount: number\n\n @Column({ nullable: true })\n @Field({ nullable: true, description: 'When a moderator hid it; hidden, only its owner and the moderators see it.' })\n hiddenAt?: Date\n\n @Column({ nullable: true })\n hiddenReason?: string\n\n @ManyToOne(type => User, { nullable: true })\n hiddenBy?: User\n\n @RelationId((one: GalleryPost) => one.hiddenBy)\n hiddenById?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When it was posted.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n @Field({ nullable: true, description: 'When it last changed.' })\n updatedAt?: Date\n\n @DeleteDateColumn()\n @Field({ nullable: true, description: 'When its owner deleted it.' })\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who posted it - the owner.' })\n creator?: User\n\n @RelationId((one: GalleryPost) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n @Field(type => User, { nullable: true, description: 'Who changed it last.' })\n updater?: User\n\n @RelationId((one: GalleryPost) => one.updater)\n updaterId?: string\n}\n\n@Entity()\n@Index('ix_gallery_like_0', (one: GalleryLike) => [one.post, one.user], { unique: true, where: '\"deleted_at\" IS NULL' })\n@ObjectType({ description: 'One person liking one gallery post.' })\nexport class GalleryLike {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Like id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryLike) => one.domain)\n domainId?: string\n\n @ManyToOne(type => GalleryPost, { onDelete: 'CASCADE' })\n post?: GalleryPost\n\n @RelationId((one: GalleryLike) => one.post)\n postId?: string\n\n @ManyToOne(type => User)\n @Field(type => User, { nullable: true, description: 'Who likes it.' })\n user?: User\n\n @RelationId((one: GalleryLike) => one.user)\n userId?: string\n\n @CreateDateColumn()\n @Field({ nullable: true, description: 'When they liked it.' })\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryLike) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryLike) => one.updater)\n updaterId?: string\n}\n\n/**\n * A calendar event whose gallery is open - opened by a moderator making the event from the gallery, or by the first post\n * linked to it. Everyone of the domain may post to an open event (ADR-0165 사용자 판정 1).\n */\n@Entity()\n@Index('ix_gallery_event_0', (one: GalleryEvent) => [one.domain, one.event], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\n@ObjectType({ description: 'A calendar event whose gallery is open to everyone of the domain.' })\nexport class GalleryEvent {\n @PrimaryGeneratedColumn('uuid')\n @Field(type => ID, { description: 'Gallery event id.' })\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryEvent) => one.domain)\n domainId?: string\n\n @ManyToOne(type => Event, { onDelete: 'CASCADE' })\n event?: Event\n\n @RelationId((one: GalleryEvent) => one.event)\n eventId?: string\n\n @CreateDateColumn()\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryEvent) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryEvent) => one.updater)\n updaterId?: string\n}\n\n/** When a person last opened the gallery - the menu counts the posts that came after. */\n@Entity()\n@Index('ix_gallery_visit_0', (one: GalleryVisit) => [one.domain, one.user], {\n unique: true,\n where: '\"deleted_at\" IS NULL'\n})\nexport class GalleryVisit {\n @PrimaryGeneratedColumn('uuid')\n readonly id: string\n\n @ManyToOne(type => Domain)\n domain?: Domain\n\n @RelationId((one: GalleryVisit) => one.domain)\n domainId?: string\n\n @ManyToOne(type => User)\n user?: User\n\n @RelationId((one: GalleryVisit) => one.user)\n userId?: string\n\n @Column()\n seenAt: Date\n\n @CreateDateColumn()\n createdAt?: Date\n\n @UpdateDateColumn()\n updatedAt?: Date\n\n @DeleteDateColumn()\n deletedAt?: Date\n\n @ManyToOne(type => User, { nullable: true })\n creator?: User\n\n @RelationId((one: GalleryVisit) => one.creator)\n creatorId?: string\n\n @ManyToOne(type => User, { nullable: true })\n updater?: User\n\n @RelationId((one: GalleryVisit) => one.updater)\n updaterId?: string\n}\n"]}
|