strapi-plugin-comments 2.2.10 → 2.2.12

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/README.md CHANGED
@@ -134,7 +134,7 @@ In our minimum support we're following [official Node.js releases timelines](htt
134
134
 
135
135
  **Supported Strapi versions**:
136
136
 
137
- - Strapi v4.9.2 (recently tested)
137
+ - Strapi v4.11.7 (recently tested)
138
138
  - Strapi v4.x
139
139
 
140
140
  > This plugin is designed for **Strapi v4** and is not working with v3.x. To get version for **Strapi v3** install version [v1.x](https://github.com/VirtusLab-Open-Source/strapi-plugin-comments/tree/strapi-v3).
@@ -361,6 +361,50 @@ Return a flat structure of comments for specified instance of Content Type like
361
361
  - [sorting](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.html#sorting)
362
362
  - [pagination](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.html#pagination)
363
363
 
364
+ ### Get Comments (by Author)
365
+
366
+ _GraphQL equivalent: [Public GraphQL API -> Get Comments (by Author)](#get-comments-by-author-1)_
367
+
368
+ `GET <host>/api/comments/author/<id>/<?type>`
369
+
370
+ Return a flat structure of comments by specified Author for example `Author` with `ID: 1`
371
+
372
+ **Example URL**: `https://localhost:1337/api/comments/author/1` - get comments by `ID:1` of Strapi User
373
+ **Example URL**: `https://localhost:1337/api/comments/author/1/generic` - get comments by `ID:1` of Generic User
374
+
375
+ **Example response body**
376
+
377
+ ```json
378
+ {
379
+ "data": [
380
+ {
381
+ // -- Comment Model fields ---
382
+ },
383
+ {
384
+ // -- Comment Model fields ---
385
+ }
386
+ // ...
387
+ ],
388
+ "meta": {
389
+ "pagination": {
390
+ // payload based on Strapi REST Pagination specification
391
+ }
392
+ }
393
+ }
394
+ ```
395
+
396
+ **Possible response codes**
397
+
398
+ - `200` - Successful. Response with list of comments (can be empty)
399
+ - `400` - Bad Request. Requested list for not valid / not existing Content Type
400
+
401
+ #### Strapi REST API properties support:
402
+
403
+ - [filtering](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/filtering-locale-publication.html#filtering)
404
+ - [field selection](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/populating-fields.html#field-selection)
405
+ - [sorting](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.html#sorting)
406
+ - [pagination](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/rest/sort-pagination.html#pagination)
407
+
364
408
  ### Post a Comment
365
409
 
366
410
  _GraphQL equivalent: [Public GraphQL API -> Post a Comments](#post-a-comment-1)_
@@ -534,13 +578,14 @@ _REST API equivalent: [Public REST API -> Get Comments](#get-comments)_
534
578
 
535
579
  ```graphql
536
580
  query {
537
- findAllFlat(
538
- relation: "api::page.page:1"
539
- filters: { content: { contains: "Test" } }
540
- ) {
581
+ findAllInHierarchy(relation: "api::page.page:1") {
541
582
  id
542
583
  content
543
584
  blocked
585
+ children {
586
+ id
587
+ content
588
+ }
544
589
  threadOf {
545
590
  id
546
591
  }
@@ -557,20 +602,28 @@ query {
557
602
  ```json
558
603
  {
559
604
  "data": {
560
- "findAllFlat": [
605
+ "findAllInHierarchy": [
561
606
  {
562
- "id": 3,
607
+ "id": 1,
563
608
  "content": "Test",
564
609
  "blocked": false,
610
+ "children": [
611
+ {
612
+ "id": 6,
613
+ "content": "Text to search for"
614
+ }
615
+ // ...
616
+ ],
565
617
  "threadOf": null,
566
618
  "author": {
567
619
  "id": "123456",
568
620
  "name": "Joe Doe"
569
621
  }
570
- },
622
+ }
571
623
  // ...
572
624
  ]
573
625
  }
626
+ }
574
627
  ```
575
628
 
576
629
  #### Strapi GraphQL API properties support:
@@ -585,14 +638,13 @@ _REST API equivalent: [Public REST API -> Get Comments (flat structure)](#get-co
585
638
 
586
639
  ```graphql
587
640
  query {
588
- findAllInHierarchy(relation: "api::page.page:1") {
641
+ findAllFlat(
642
+ relation: "api::page.page:1"
643
+ filters: { content: { contains: "Test" } }
644
+ ) {
589
645
  id
590
646
  content
591
647
  blocked
592
- children {
593
- id
594
- content
595
- }
596
648
  threadOf {
597
649
  id
598
650
  }
@@ -609,28 +661,69 @@ query {
609
661
  ```json
610
662
  {
611
663
  "data": {
612
- "findAllInHierarchy": [
664
+ "findAllFlat": [
613
665
  {
614
- "id": 1,
666
+ "id": 3,
615
667
  "content": "Test",
616
668
  "blocked": false,
617
- "children": [
618
- {
619
- "id": 6,
620
- "content": "Text to search for"
621
- }
622
- // ...
623
- ],
624
669
  "threadOf": null,
625
670
  "author": {
626
671
  "id": "123456",
627
672
  "name": "Joe Doe"
628
673
  }
629
- }
674
+ },
630
675
  // ...
631
676
  ]
632
677
  }
678
+ ```
679
+
680
+ #### Strapi GraphQL API properties support:
681
+
682
+ - [filtering](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.html#filters)
683
+ - [sorting](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.html#sorting)
684
+ - [pagination](https://docs.strapi.io/developer-docs/latest/developer-resources/database-apis-reference/graphql-api.html#pagination)
685
+
686
+ ### Get Comments (by Author)
687
+
688
+ _REST API equivalent: [Public REST API -> Get Comments (by Author)](#get-comments-by-author)_
689
+
690
+ **Example request**
691
+
692
+ ```graphql
693
+ query {
694
+ findAllPerAuthor(authorId: 1, authorType: STRAPI) { // authorType might be one of [GENERIC, STRAPI]
695
+ data {
696
+ id
697
+ content
698
+ blocked
699
+ threadOf {
700
+ id
701
+ }
702
+ }
703
+ }
633
704
  }
705
+
706
+ ```
707
+
708
+ **Example response**
709
+
710
+ ```json
711
+ {
712
+ "data": {
713
+ "findAllPerAuthor": {
714
+ "data": [
715
+ {
716
+ "id": 4,
717
+ "content": "Hackaton test comment",
718
+ "blocked": false,
719
+ "threadOf": {
720
+ "id": 1
721
+ }
722
+ }
723
+ // ...
724
+ ]
725
+ }
726
+ }
634
727
  ```
635
728
 
636
729
  #### Strapi GraphQL API properties support:
@@ -77,15 +77,15 @@ const CustomFieldInput = ({ attribute, description, disabled, error, intlLabel,
77
77
  react_1.default.createElement(Box_1.Box, { paddingTop: 2 },
78
78
  react_1.default.createElement(NumberInput_1.NumberInput, { disabled: disabled, label: (0, utils_2.getMessage)("customField.comments.input.commentsNumber.label", "Number of comments"), name: `${name}.commentsNumber`, value: currentState.commentsNumber, onValueChange: onCommentsNumberChange })),
79
79
  react_1.default.createElement(Box_1.Box, { paddingTop: 2 },
80
- react_1.default.createElement(Select_1.Select, { disabled: disabled, name: `${name}.renderType`, label: (0, utils_2.getMessage)("customField.comments.input.renderType.label", "Render comments as"), value: currentState.renderType, onChange: onRenderTypeChange }, (0, utils_1.getRenderTypeOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: value, value: value }, label))))),
80
+ react_1.default.createElement(Select_1.Select, { disabled: disabled, name: `${name}.renderType`, label: (0, utils_2.getMessage)("customField.comments.input.renderType.label", "Render comments as"), value: currentState.renderType, onChange: onRenderTypeChange }, (0, utils_1.getRenderTypeOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: `renderTypeOptions-${value}`, value: value }, label))))),
81
81
  react_1.default.createElement(Box_1.Box, { paddingTop: 2 },
82
- react_1.default.createElement(Select_1.Select, { disabled: disabled, name: `${name}.sortByDate`, label: (0, utils_2.getMessage)("customField.comments.input.sortByDate.label", "Sort by creation date"), value: currentState.sortByDate, onChange: onSortByDateChange }, (0, utils_1.getSortByDateOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: value, value: value }, label)))))),
82
+ react_1.default.createElement(Select_1.Select, { disabled: disabled, name: `${name}.sortByDate`, label: (0, utils_2.getMessage)("customField.comments.input.sortByDate.label", "Sort by creation date"), value: currentState.sortByDate, onChange: onSortByDateChange, onClear: () => onSortByDateChange(undefined) }, (0, utils_1.getSortByDateOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: `sortByDataOptions-${value}`, value: value }, label)))))),
83
83
  react_1.default.createElement(Grid_1.GridItem, { col: 6 },
84
84
  react_1.default.createElement(Box_1.Box, { paddingTop: 2 },
85
- react_1.default.createElement(Select_1.Select, { disabled: disabled, name: `${name}.filterBy`, label: (0, utils_2.getMessage)("customField.comments.input.filterBy.label", "Filter by"), value: currentState.filterBy, onChange: onFilterByChange }, (0, utils_1.getFilterByOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: value, value: value }, label)))),
85
+ react_1.default.createElement(Select_1.Select, { disabled: disabled, name: `${name}.filterBy`, label: (0, utils_2.getMessage)("customField.comments.input.filterBy.label", "Filter by"), value: currentState.filterBy, onChange: onFilterByChange, onClear: () => onFilterByChange(undefined) }, (0, utils_1.getFilterByOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: `filterByOptions-${value}`, value: value }, label)))),
86
86
  react_1.default.createElement(Box_1.Box, { paddingTop: currentState.filterBy ? 2 : 0 },
87
- currentState.filterBy === "APPROVAL_STATUS" ? (react_1.default.createElement(Select_1.Select, { label: (0, utils_2.getMessage)("customField.comments.input.filterBy.option.approvalStatus.label.details.label", "Specify date"), disabled: disabled, name: `${name}.filterBy.approvalStatus`, value: currentState.filterByValue, onChange: onFilterByValueChange }, (0, utils_1.getApprovalStatusOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: value, value: value }, label))))) : null,
88
- currentState.filterBy === "DATE_CREATED" ? (react_1.default.createElement(DatePicker_1.DatePicker, { label: (0, utils_2.getMessage)("customField.comments.input.filterBy.option.dateCreated.label.details.label", "Specify date"), disabled: disabled, name: `${name}.filterBy.dateCreated`, onChange: onFilterByValueChange, selectedDate: currentState.filterByValue, selectedDateLabel: utils_1.asString })) : null)),
87
+ currentState.filterBy === "APPROVAL_STATUS" ? (react_1.default.createElement(Select_1.Select, { label: (0, utils_2.getMessage)("customField.comments.input.filterBy.option.approvalStatus.label.details.label", "Specify date"), disabled: disabled, name: `${name}.filterBy.approvalStatus`, value: currentState.filterByValue, onChange: onFilterByValueChange, onClear: () => onFilterByValueChange(undefined) }, (0, utils_1.getApprovalStatusOptions)(utils_2.getMessage).map(({ value, label }) => (react_1.default.createElement(Select_1.Option, { key: `approvalStatusOptions-${value}`, value: value }, label))))) : null,
88
+ currentState.filterBy === "DATE_CREATED" ? (react_1.default.createElement(DatePicker_1.DatePicker, { label: (0, utils_2.getMessage)("customField.comments.input.filterBy.option.dateCreated.label.details.label", "Specify date"), disabled: disabled, name: `${name}.filterBy.dateCreated`, onChange: onFilterByValueChange, onClear: () => onFilterByValueChange(undefined), selectedDate: currentState.filterByValue, selectedDateLabel: utils_1.asString })) : null)),
89
89
  react_1.default.createElement(Box_1.Box, { paddingTop: 2 },
90
90
  react_1.default.createElement(Field_1.FieldLabel, null, (0, utils_2.getMessage)("customField.comments.input.populate.label", "Populate")),
91
91
  react_1.default.createElement(Box_1.Box, { paddingTop: 1 },
@@ -11,25 +11,16 @@ export declare const getRenderTypeOptions: (translate: typeof getMessage) => {
11
11
  value: string;
12
12
  label: string;
13
13
  }[];
14
- export declare const getSortByDateOptions: (translate: typeof getMessage) => ({
15
- value: undefined;
16
- label: string;
17
- } | {
14
+ export declare const getSortByDateOptions: (translate: typeof getMessage) => {
18
15
  value: string;
19
16
  label: string;
20
- })[];
21
- export declare const getFilterByOptions: (translate: typeof getMessage) => ({
22
- value: undefined;
23
- label: string;
24
- } | {
17
+ }[];
18
+ export declare const getFilterByOptions: (translate: typeof getMessage) => {
25
19
  value: string;
26
20
  label: string;
27
- })[];
28
- export declare const getApprovalStatusOptions: (translate: typeof getMessage) => ({
29
- value: undefined;
30
- label: string;
31
- } | {
21
+ }[];
22
+ export declare const getApprovalStatusOptions: (translate: typeof getMessage) => {
32
23
  value: string;
33
24
  label: string;
34
- })[];
25
+ }[];
35
26
  //# sourceMappingURL=utils.d.ts.map
@@ -57,7 +57,7 @@ const handlePopulateChange = (key, setState) => () => {
57
57
  });
58
58
  };
59
59
  exports.handlePopulateChange = handlePopulateChange;
60
- const getRenderTypeOptions = (translate) => [
60
+ const getRenderTypeOptions = (translate) => ([
61
61
  {
62
62
  value: "TREE",
63
63
  label: translate({
@@ -72,13 +72,9 @@ const getRenderTypeOptions = (translate) => [
72
72
  defaultMessage: "Flat list",
73
73
  }),
74
74
  },
75
- ];
75
+ ]);
76
76
  exports.getRenderTypeOptions = getRenderTypeOptions;
77
- const getSortByDateOptions = (translate) => [
78
- {
79
- value: undefined,
80
- label: "",
81
- },
77
+ const getSortByDateOptions = (translate) => ([
82
78
  {
83
79
  value: "ASC",
84
80
  label: translate({
@@ -93,13 +89,9 @@ const getSortByDateOptions = (translate) => [
93
89
  defaultMessage: "Descending",
94
90
  }),
95
91
  },
96
- ];
92
+ ]);
97
93
  exports.getSortByDateOptions = getSortByDateOptions;
98
- const getFilterByOptions = (translate) => [
99
- {
100
- value: undefined,
101
- label: "",
102
- },
94
+ const getFilterByOptions = (translate) => ([
103
95
  {
104
96
  value: "DATE_CREATED",
105
97
  label: translate({
@@ -114,13 +106,9 @@ const getFilterByOptions = (translate) => [
114
106
  defaultMessage: "Approval Status",
115
107
  }),
116
108
  },
117
- ];
109
+ ]);
118
110
  exports.getFilterByOptions = getFilterByOptions;
119
- const getApprovalStatusOptions = (translate) => [
120
- {
121
- value: undefined,
122
- label: "",
123
- },
111
+ const getApprovalStatusOptions = (translate) => ([
124
112
  {
125
113
  value: utils_1.APPROVAL_STATUS.APPROVED,
126
114
  label: translate({
@@ -142,7 +130,7 @@ const getApprovalStatusOptions = (translate) => [
142
130
  defaultMessage: "Rejected",
143
131
  }),
144
132
  },
145
- ];
133
+ ]);
146
134
  exports.getApprovalStatusOptions = getApprovalStatusOptions;
147
135
  const stringFields = [
148
136
  "renderType",
@@ -83,7 +83,7 @@ exports.default = {
83
83
  });
84
84
  (0, custom_fields_1.registerCustomFields)(app);
85
85
  },
86
- registerTrads({ locales }) {
86
+ registerTrads({ locales = [] }) {
87
87
  return locales.map((locale) => {
88
88
  return {
89
89
  data: (0, helper_plugin_1.prefixPluginTranslations)((0, lodash_1.get)(translations_1.default, locale), pluginId_1.pluginId, {}),
@@ -1,5 +1,5 @@
1
1
  import { KeyValueSet } from "strapi-typed";
2
- export type TranslationKey = "en" | "fr" | "pt-BR" | "tr" | "ru" | "zh-Hans";
2
+ export type TranslationKey = "en" | "fr" | "pt-BR" | "tr" | "ru" | "zh-Hans" | "pl";
3
3
  export type Translations = {
4
4
  [key in TranslationKey]: KeyValueSet<string>;
5
5
  };
@@ -9,6 +9,7 @@ const tr_json_1 = __importDefault(require("./tr.json"));
9
9
  const pt_BR_json_1 = __importDefault(require("./pt-BR.json"));
10
10
  const ru_json_1 = __importDefault(require("./ru.json"));
11
11
  const zh_Hans_json_1 = __importDefault(require("./zh-Hans.json"));
12
+ const pl_json_1 = __importDefault(require("./pl.json"));
12
13
  const trads = {
13
14
  en: en_json_1.default,
14
15
  fr: fr_json_1.default,
@@ -16,6 +17,7 @@ const trads = {
16
17
  tr: tr_json_1.default,
17
18
  ru: ru_json_1.default,
18
19
  "zh-Hans": zh_Hans_json_1.default,
20
+ pl: pl_json_1.default
19
21
  };
20
22
  exports.default = trads;
21
23
  //# sourceMappingURL=index.js.map
@@ -0,0 +1,192 @@
1
+ {
2
+ "plugin.name": "Komentarze",
3
+ "plugin.section": "Plugin komentarzy",
4
+ "plugin.section.item": "Konfiguracja",
5
+ "common.button.back": "Powrót",
6
+ "nav.header.moderation": "Moderacja",
7
+ "nav.header.settings": "Ustawienia",
8
+ "nav.item.updates": "Aktualizacje",
9
+ "nav.item.discover": "Odkryj",
10
+ "nav.item.reports": "Raporty",
11
+ "nav.item.settings": "Ustawienia",
12
+ "page.auth.noAccess": "Brak dostępu",
13
+ "page.auth.not.allowed": "Ups! Wygląda na to, że nie masz dostępu do tej strony...",
14
+ "page.common.item.status.OPEN": "Otwarty",
15
+ "page.common.item.status.PENDING": "Oczekujący",
16
+ "page.common.item.status.BLOCKED": "Zablokowany",
17
+ "page.common.item.status.APPROVED": "Zatwierdzony",
18
+ "page.common.item.status.RESOLVED": "Rozwiązany",
19
+ "page.common.item.status.TO_REVIEW": "Do przeglądu ({count, number})",
20
+ "page.common.item.status.REJECTED": "Odrzucony",
21
+ "page.common.item.status.REMOVED": "Usunięty przez autora",
22
+ "page.updates.header": "Ostatnie aktualizacje",
23
+ "page.discover.header": "Odkryj wątki",
24
+ "page.discover.header.count": "znalezionych wpisów",
25
+ "page.discover.table.header.id": "ID",
26
+ "page.discover.table.header.author": "Autor",
27
+ "page.discover.table.header.message": "Wiadomość",
28
+ "page.discover.table.header.thread": "Wątek",
29
+ "page.discover.table.header.entry": "Wpis",
30
+ "page.discover.table.header.lastUpdate": "Ostatnia aktualizacja",
31
+ "page.discover.table.header.status": "Status",
32
+ "page.discover.table.header.actions": "Akcje",
33
+ "page.discover.table.cell.thread": "Komentarz #{id}",
34
+ "page.discover.table.action.display": "Wyświetl",
35
+ "page.discover.table.action.reports": "Raporty",
36
+ "page.discover.table.empty": "Nie masz jeszcze żadnych komentarzy.",
37
+ "page.discover.table.empty.search": "Brak komentarzy pasujących do wyszukiwania.",
38
+ "page.discover.table.filters": "Filtrowanie",
39
+ "page.discover.table.reports.review": "Przejrzyj raporty",
40
+ "page.reports.header": "Rozwiązywanie raportów",
41
+ "page.reports.table.empty": "Nie masz jeszcze żadnych raportów.",
42
+ "page.reports.table.empty.search": "Brak raportów pasujących do wyszukiwania.",
43
+ "page.reports.table.header.id": "ID",
44
+ "page.reports.table.header.reason": "Powód",
45
+ "page.reports.table.header.content": "Treść",
46
+ "page.reports.table.header.status": "Status",
47
+ "page.reports.table.header.issueDate": "Data zgłoszenia",
48
+ "page.reports.table.header.relatedComment": "Powiązany komentarz",
49
+ "page.reports.table.header.actions": "Akcje",
50
+ "page.reports.table.cell.action.resolve": "Rozwiązane",
51
+ "page.reports.table.cell.action.block": "Blokuj",
52
+ "page.details.header": "Panel dyskusji",
53
+ "page.details.header.description": "Przegłądaj i zarządzaj dyskusją dotyczącą obiektu",
54
+ "page.details.panel.discussion": "Dyskusja",
55
+ "page.details.panel.discussion.nav.drilldown": "Przewijaj w dół",
56
+ "page.details.panel.discussion.nav.back": "Powrót na górę",
57
+ "page.details.panel.discussion.warnings.reports.description": "otwarte raporty",
58
+ "page.details.panel.discussion.warnings.reports.review": "Przeglądaj",
59
+ "page.details.panel.discussion.warnings.reports.dialog.list": "Raporty",
60
+ "page.details.panel.discussion.warnings.reports.dialog.header": "Moderacja: Przeglądaj otwarte raporty",
61
+ "page.details.panel.discussion.warnings.reports.dialog.selectAll": "Zaznacz wszystkie wpisy",
62
+ "page.details.panel.discussion.warnings.reports.dialog.select": "Wybierz obiekt",
63
+ "page.details.panel.discussion.warnings.reports.dialog.reason": "Powód",
64
+ "page.details.panel.discussion.warnings.reports.dialog.reason.BAD_LANGUAGE": "Nieodpowiedni język",
65
+ "page.details.panel.discussion.warnings.reports.dialog.reason.DISCRIMINATION": "Dyskryminacja",
66
+ "page.details.panel.discussion.warnings.reports.dialog.reason.OTHER": "Inny",
67
+ "page.details.panel.discussion.warnings.reports.dialog.content": "Zawartość",
68
+ "page.details.panel.discussion.warnings.reports.dialog.createdAt": "Data zgłoszenia",
69
+ "page.details.panel.discussion.warnings.reports.dialog.status": "Status",
70
+ "page.details.panel.discussion.warnings.reports.dialog.status.OPEN": "Otwarte",
71
+ "page.details.panel.discussion.warnings.reports.dialog.status.RESOLVED": "Rozwiązane",
72
+ "page.details.panel.discussion.warnings.reports.dialog.actions": "Akcje",
73
+ "page.details.panel.discussion.warnings.reports.dialog.actions.resolve": "Rozwiąż",
74
+ "page.details.panel.discussion.warnings.reports.dialog.actions.resolve.selected": "Rozwiąż raporty ({count})",
75
+ "page.details.panel.discussion.warnings.reports.dialog.confirmation.success": "Otwarty raport został rozwiązany",
76
+ "page.details.panel.discussion.warnings.reports.selected.dialog.confirmation.success": "Otwarte raporty zostały rozwiązane",
77
+ "page.details.panel.discussion.warnings.comments.header": "Moderacja: Przeglądaj zgłoszone komentarze",
78
+ "page.details.panel.discussion.status.blocked": "Zablokowane",
79
+ "page.details.panel.discussion.reply": "Odpowiedz",
80
+ "page.details.panel.discussion.reopen": "Ponowne otwarcie",
81
+ "page.details.panel.discussion.send": "Wyślij odpowiedź moderatora",
82
+ "page.details.actions.comment.post.confirmation": "Komentarz został opublikowany",
83
+ "page.details.actions.comment.update.confirmation": "Komentarz został zaktualizowany",
84
+ "page.details.panel.entity": "Szczegóły obiektu",
85
+ "page.details.panel.status": "Status dyskusji",
86
+ "page.details.panel.status.open": "Otwarta",
87
+ "page.details.panel.status.blocked": "Zablokowana",
88
+ "page.details.panel.status.pending": "Oczekująca",
89
+ "page.details.panel.loading": "Pobieranie informacji o obiekcie...",
90
+ "page.details.actions.comment.block": "Zablokuj komentarz",
91
+ "page.details.actions.comment.block.confirmation.header": "Moderacja: Zablokuj komentarz",
92
+ "page.details.actions.comment.block.confirmation.description": "Czy na pewno chcesz zablokować ten komentarz?",
93
+ "page.details.actions.comment.block.confirmation.button.confirm": "Tak, zablokuj",
94
+ "page.details.actions.comment.block.confirmation.success": "Komentarz został zablokowany",
95
+ "page.details.actions.comment.unblock": "Odblokuj komentarz",
96
+ "page.details.actions.comment.unblock.confirmation.success": "Komentarz został odblokowany",
97
+ "page.details.actions.comment.delete": "Usuń komentarz",
98
+ "page.details.actions.comment.delete.confirmation.success": "Komentarz został usunięty",
99
+ "page.details.actions.comment.reports.review": "Przeglądaj",
100
+ "page.details.actions.thread.block": "Zablokuj wątek",
101
+ "page.details.actions.thread.block.confirmation.header": "Moderacja: Zablokuj wątek",
102
+ "page.details.actions.thread.block.confirmation.description": "Czy na pewno chcesz zablokować cały wątek? Nie będą możliwe dalsze dyskusje.",
103
+ "page.details.actions.thread.block.confirmation.button.confirm": "Tak, zablokuj",
104
+ "page.details.actions.thread.block.confirmation.success": "Wątek został zablokowany",
105
+ "page.details.actions.thread.unblock": "Odblokuj wątek",
106
+ "page.details.actions.thread.unblock.confirmation.success": "Wątek został odblokowany",
107
+ "page.details.actions.thread.modal.start.thread": "Rozpocznij wątek",
108
+ "page.details.actions.thread.modal.update.comment": "Aktualizuj komentarz",
109
+ "page.details.actions.comment.approve.confirmation.success": "Komentarz został zatwierdzony",
110
+ "page.details.actions.comment.reject.confirmation.success": "Komentarz został odrzucony",
111
+ "page.details.filters.label": "Widok",
112
+ "page.details.filters.removed.visibility": "Pokaż usunięte komentarze",
113
+ "page.coming.soon": "Oczekuj...",
114
+ "page.settings": "Ustawienia",
115
+ "page.settings.header.title": "Komentarze",
116
+ "page.settings.header.description": "Skonfiguruj możliwości moderacji komentarzy",
117
+ "page.settings.actions.submit": "Zapisz",
118
+ "page.settings.actions.restore": "Przywróć domyślne ustawienia",
119
+ "page.settings.actions.restart": "Uruchom ponownie Strapi",
120
+ "page.settings.section.general": "Konfiguracja ogólna",
121
+ "page.settings.section.additional": "Dodatkowa konfiguracja",
122
+ "page.settings.section.client": "Konfiguracja portalu klienta",
123
+ "page.settings.section.restore": "Przywróć domyślne ustawienia",
124
+ "page.settings.section.restore.subtitle": "Odrzucanie wszystkich zastosowanych ustawień i powrót do domyślnych ustawień wtyczki. Używaj rozsądnie.",
125
+ "page.settings.form.enabledCollections.label": "Włącz komentarze tylko dla",
126
+ "page.settings.form.enabledCollections.placeholder": "Wybierz jedną lub więcej kolekcji",
127
+ "page.settings.form.enabledCollections.hint": "Jeśli żadna nie jest wybrana, wszystkie typy zawartości będą włączone",
128
+ "page.settings.form.contentTypesSettings.label": "Typy zawartości",
129
+ "page.settings.form.contentTypesSettings.tooltip": "Konfiguracja niestandardowa dla każdego typu zawartości",
130
+ "page.settings.form.moderatorRoles.label": "Wysyłaj istotne powiadomienia do",
131
+ "page.settings.form.moderatorRoles.placeholder": "Wybierz jedną lub więcej ról",
132
+ "page.settings.form.moderatorRoles.hint": "Role, które otrzymają powiadomienia od wtyczki dotyczące istotnych działań do wykonania",
133
+ "page.settings.form.badWords.label": "Filtrowanie nieodpowiednich słów",
134
+ "page.settings.form.badWords.hint": "Jeśli jest włączone, każdy post / aktualizacja komentarza będzie sprawdzany pod kątem nieodpowiedniego języka",
135
+ "page.settings.form.gqlAuth.label": "Autoryzacja zapytań GraphQL",
136
+ "page.settings.form.gqlAuth.hint": "Jeśli jest włączone, zapytania i mutacje interfejsu API GraphQL mogą być wywoływane tylko przez uwierzytelnionych użytkowników Strapi. W przeciwnym razie API pozostaje otwarte.",
137
+ "page.settings.form.approvalFlow.label": "Przebieg zatwierdzania",
138
+ "page.settings.form.approvalFlow.hint": "Komentarze powiązane z typem zawartości \"{name}\" będą podlegały ręcznemu procesowi zatwierdzania",
139
+ "page.settings.form.entryLabel.label": "Pola tytułu",
140
+ "page.settings.form.entryLabel.placeholder": "Wybierz co najmniej jedno pole lub pozostaw puste, aby zastosować domyślne wartości",
141
+ "page.settings.form.entryLabel.hint": "Jeśli zostanie puste, generowanie tytułu będzie korzystać z następujących pól w kolejności: \"Tytuł\", \"Temat\" i \"Nazwa\"",
142
+ "page.settings.form.client.url.label": "URL portalu",
143
+ "page.settings.form.client.url.hint": "Adres URL, pod którym dostępny jest twój portal klienta",
144
+ "page.settings.form.client.email.label": "E-mail do komunikacji",
145
+ "page.settings.form.client.email.hint": "Adres e-mail używany do wysyłania wiadomości, komunikacji z użytkownikami w imieniu zespołu portalu",
146
+ "page.settings.actions.restore.confirmation.header": "Przywróć domyślną konfigurację",
147
+ "page.settings.actions.restore.confirmation.description": "Zamierzasz przywrócić konfigurację wtyczki do domyślnych wartości. Może to spowodować utratę danych zgromadzonych wcześniej. Czy na pewno chcesz kontynuować?",
148
+ "page.settings.actions.restore.confirmation.button.confirm": "Tak, chcę przywrócić",
149
+ "page.settings.actions.restart.alert.title": "Strapi wymaga restartu",
150
+ "page.settings.actions.restart.alert.description": "Wprowadziłeś zmiany w konfiguracji, które wymagają ponownego uruchomienia Twojej aplikacji Strapi, aby zaczęły obowiązywać w schemacie GraphQL. Zrób to ręcznie lub użyj poniższego wyzwalacza.",
151
+ "page.settings.actions.restart.alert.close": "Anuluj",
152
+ "page.settings.notification.fetch.error": "Nie udało się pobrać konfiguracji. Ponawianie próby...",
153
+ "page.settings.notification.submit.success": "Konfiguracja została pomyślnie zapisana",
154
+ "page.settings.notification.submit.error": "Nie udało się zapisać konfiguracji. Spróbuj ponownie.",
155
+ "page.settings.notification.restore.success": "Konfiguracja została pomyślnie przywrócona",
156
+ "page.settings.notification.restore.error": "Nie udało się przywrócić konfiguracji. Spróbuj ponownie.",
157
+ "page.settings.notification.restart.success": "Aplikacja została pomyślnie uruchomiona ponownie",
158
+ "page.settings.notification.restart.error": "Nie udało się uruchomić aplikacji ponownie. Spróbuj zrobić to ręcznie.",
159
+ "page.settings.loading": "Pobieranie konfiguracji...",
160
+ "page.settings.form.author.blockedProps.label": "Zablokowane dane autora",
161
+ "page.settings.form.author.blockedProps.hint": "Określone właściwości zostaną filtrowane z danych autora (oddzielone przecinkiem)",
162
+ "compontents.confirmation.dialog.header": "Potwierdzenie",
163
+ "compontents.confirmation.dialog.description": "Czy na pewno chcesz wykonać tę czynność?",
164
+ "compontents.confirmation.dialog.button.confirm": "Tak, chcę",
165
+ "compontents.confirmation.dialog.button.cancel": "Anuluj",
166
+ "compontents.toogle.enabled": "Włączone",
167
+ "compontents.toogle.disabled": "Wyłączone",
168
+ "compontents.author.unknown": "Autor usunięty",
169
+ "components.reason.unknown": "Nie podano przyczyny",
170
+ "components.content.unknown": "Nie podano treści",
171
+ "components.notAccessPage.back": "Powrót do strony głównej",
172
+ "customField.comments.label": "Komentarze",
173
+ "customField.comments.description": "Określ parametry zapytania dla komentarzy",
174
+ "customField.comments.input.commentsNumber.label": "Liczba komentarzy",
175
+ "customField.comments.input.renderType.label": "Wyświetlanie komentarzy jako",
176
+ "customField.comments.input.renderType.option.tree.label": "Drzewo",
177
+ "customField.comments.input.renderType.option.flat.label": "Płaska lista",
178
+ "customField.comments.input.sortByDate.label": "Sortuj według daty utworzenia",
179
+ "customField.comments.input.sortByDate.option.asc.label": "Rosnąco",
180
+ "customField.comments.input.sortByDate.option.desc.label": "Malejąco",
181
+ "customField.comments.input.filterBy.label": "Filtruj według",
182
+ "customField.comments.input.filterBy.option.dateCreated.label": "Data utworzenia",
183
+ "customField.comments.input.filterBy.option.dateCreated.label.details.label": "Podaj datę",
184
+ "customField.comments.input.filterBy.option.approvalStatus.label": "Status zatwierdzenia",
185
+ "customField.comments.input.filterBy.option.approvalStatus.label.details.label": "Określ status",
186
+ "customField.comments.input.filterBy.option.approvalStatus.option.pending.label": "Oczekujący",
187
+ "customField.comments.input.filterBy.option.approvalStatus.option.approved.label": "Zatwierdzony",
188
+ "customField.comments.input.filterBy.option.approvalStatus.option.rejected.label": "Odrzucony",
189
+ "customField.comments.input.populate.label": "Uzupełnienie",
190
+ "customField.comments.input.populate.author.label": "Uzupełnij pole autora",
191
+ "customField.comments.input.populate.avatar.label": "Uzupełnij pole awatara"
192
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "strapi-plugin-comments",
3
- "version": "2.2.10",
3
+ "version": "2.2.12",
4
4
  "description": "Strapi - Comments plugin",
5
5
  "strapi": {
6
6
  "name": "comments",
@@ -14,8 +14,8 @@
14
14
  "url": "https://github.com/VirtusLab-Open-Source/strapi-plugin-comments"
15
15
  },
16
16
  "dependencies": {
17
- "@strapi/plugin-graphql": "^4.9.2",
18
- "@strapi/utils": "^4.9.2",
17
+ "@strapi/plugin-graphql": "^4.11.7",
18
+ "@strapi/utils": "^4.11.7",
19
19
  "@types/axios": "^0.14.0",
20
20
  "@types/react-intl": "^3.0.0",
21
21
  "@types/react-query": "^1.2.9",
@@ -7,6 +7,7 @@ const functions_1 = require("./../utils/functions");
7
7
  const functions_2 = require("./utils/functions");
8
8
  const parsers_1 = require("./utils/parsers");
9
9
  const error_1 = __importDefault(require("../utils/error"));
10
+ const constants_1 = require("../utils/constants");
10
11
  const controllers = {
11
12
  getService(name = "client") {
12
13
  return (0, functions_1.getPluginService)(name);
@@ -49,6 +50,23 @@ const controllers = {
49
50
  throw (0, functions_2.throwError)(ctx, e);
50
51
  }
51
52
  },
53
+ async findAllPerAuthor(ctx) {
54
+ const { params = {}, query, sort, pagination } = ctx;
55
+ const { id, type } = (0, functions_2.parseParams)(params);
56
+ const { sort: querySort, pagination: queryPagination, fields, ...filterQuery } = query || {};
57
+ try {
58
+ (0, functions_1.assertParamsPresent)(params, ["id"]);
59
+ return this.getService("common").findAllPerAuthor((0, parsers_1.flatInput)({
60
+ query: filterQuery,
61
+ sort: sort || querySort,
62
+ pagination: pagination || queryPagination,
63
+ fields,
64
+ }), id, ![constants_1.AUTHOR_TYPE.GENERIC.toLowerCase(), constants_1.AUTHOR_TYPE.GENERIC].includes(type));
65
+ }
66
+ catch (e) {
67
+ throw (0, functions_2.throwError)(ctx, e);
68
+ }
69
+ },
52
70
  async post(ctx) {
53
71
  const { request, params, state = {} } = ctx;
54
72
  const { relation } = (0, functions_2.parseParams)(params);
@@ -0,0 +1,21 @@
1
+ import { Id, StrapiGraphQLContext, ToBeFixed } from "../../../types";
2
+ type ResponseFindAllPerAuthorResolverProps = {
3
+ authorId: Id;
4
+ authorType: 'STRAPI' | 'GENERIC' | undefined;
5
+ filters: ToBeFixed;
6
+ sort: ToBeFixed;
7
+ pagination: ToBeFixed;
8
+ };
9
+ declare const _default: ({ strapi, nexus }: StrapiGraphQLContext) => {
10
+ type: string;
11
+ args: {
12
+ authorId: any;
13
+ authorType: any;
14
+ filters: any;
15
+ pagination: any;
16
+ sort: any;
17
+ };
18
+ resolve(obj: Object, args: ResponseFindAllPerAuthorResolverProps): Promise<import("strapi-typed").StrapiPaginatedResponse<import("../../../types").Comment<import("../../../types").CommentAuthor>>>;
19
+ };
20
+ export = _default;
21
+ //# sourceMappingURL=findAllPerAuthor.d.ts.map