@vendure/dashboard 3.7.1-master-202607110305 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/dist/bundle/chunks/{2SSKDMRQ-BXz8vjrT.js → 2SSKDMRQ-CGPzX7ok.js} +2 -2
  2. package/dist/bundle/chunks/{AP7HFJJL-BcewBvAf.js → AP7HFJJL-BANaC6nc.js} +1 -1
  3. package/dist/bundle/chunks/{WDYDFRGG-Cd364FN_.js → WDYDFRGG-DWwEqh2h.js} +2 -2
  4. package/dist/bundle/chunks/ar-DCEbHB2w.js +4 -0
  5. package/dist/bundle/chunks/bg-Dfcm3H-7.js +4 -0
  6. package/dist/bundle/chunks/cs-CAXaYQpr.js +4 -0
  7. package/dist/bundle/chunks/de-2rMAToGI.js +4 -0
  8. package/dist/bundle/chunks/en-CBy7m12i.js +4 -0
  9. package/dist/bundle/chunks/es-DhcrnvxO.js +4 -0
  10. package/dist/bundle/chunks/fa-BvgI8zZ5.js +4 -0
  11. package/dist/bundle/chunks/fr-B1Aw3cxh.js +4 -0
  12. package/dist/bundle/chunks/he-Dvum09Nk.js +4 -0
  13. package/dist/bundle/chunks/hr-CiUxzJsU.js +4 -0
  14. package/dist/bundle/chunks/hu-nmofxtH_.js +4 -0
  15. package/dist/bundle/chunks/it-CHi8ynGm.js +4 -0
  16. package/dist/bundle/chunks/ja-zasGFj1j.js +4 -0
  17. package/dist/bundle/chunks/ko-CBy7m12i.js +4 -0
  18. package/dist/bundle/chunks/{locale-YfvnivAQ.js → locale--aauL66m.js} +1 -1
  19. package/dist/bundle/chunks/{main-CG6JVORh.js → main-DVt3RsH7.js} +385 -1076
  20. package/dist/bundle/chunks/nb-DL1AcZeO.js +4 -0
  21. package/dist/bundle/chunks/ne-4aOoOw2J.js +4 -0
  22. package/dist/bundle/chunks/nl-Bf1kuLeC.js +4 -0
  23. package/dist/bundle/chunks/pl-Ak_kyBWq.js +4 -0
  24. package/dist/bundle/chunks/pt_BR-DS-J3yJI.js +4 -0
  25. package/dist/bundle/chunks/pt_PT-CQT5peF9.js +4 -0
  26. package/dist/bundle/chunks/ro-BJ2PuiOl.js +4 -0
  27. package/dist/bundle/chunks/ru-Bc_E807P.js +4 -0
  28. package/dist/bundle/chunks/sv-CZhEzelP.js +4 -0
  29. package/dist/bundle/chunks/tr-mdPJPyeZ.js +4 -0
  30. package/dist/bundle/chunks/uk-fAchGf1H.js +4 -0
  31. package/dist/bundle/chunks/{use-job-queue-polling-BESJ2s1g.js → use-job-queue-polling-mUjHlukj.js} +1329 -12523
  32. package/dist/bundle/chunks/uz-B5L-lMAZ.js +4 -0
  33. package/dist/bundle/chunks/zh_Hans-C8s-LcKM.js +4 -0
  34. package/dist/bundle/chunks/zh_Hant-CGwnZIiO.js +4 -0
  35. package/dist/bundle/lib.js +584 -577
  36. package/dist/bundle/main.js +4 -2
  37. package/dist/plugin/service/metrics.service.js +1 -1
  38. package/dist/vite/lib-externals.d.ts +44 -0
  39. package/dist/vite/lib-externals.js +80 -0
  40. package/dist/vite/vite-plugin-config.js +8 -0
  41. package/package.json +4 -3
  42. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-bulk-actions.tsx +69 -0
  43. package/src/app/routes/_authenticated/_customer-groups/components/customer-group-members-table.tsx +12 -2
  44. package/src/app/routes/_authenticated/_orders/components/edit-order-table.tsx +79 -44
  45. package/src/app/routes/_authenticated/_products/components/force-remove-option-group-dialog.tsx +66 -0
  46. package/src/app/routes/_authenticated/_products/components/product-option-group-badge.tsx +66 -12
  47. package/src/app/routes/_authenticated/_products/hooks/use-remove-option-group.ts +90 -0
  48. package/src/app/routes/_authenticated/_products/products_.$id.tsx +15 -21
  49. package/src/app/routes/_authenticated/_products/products_.$id_.variants.tsx +34 -75
  50. package/src/i18n/locales/ar.po +89 -63
  51. package/src/i18n/locales/bg.po +89 -63
  52. package/src/i18n/locales/cs.po +89 -63
  53. package/src/i18n/locales/de.po +89 -63
  54. package/src/i18n/locales/en.po +89 -63
  55. package/src/i18n/locales/es.po +89 -63
  56. package/src/i18n/locales/fa.po +89 -63
  57. package/src/i18n/locales/fr.po +89 -63
  58. package/src/i18n/locales/he.po +89 -63
  59. package/src/i18n/locales/hr.po +89 -63
  60. package/src/i18n/locales/hu.po +89 -63
  61. package/src/i18n/locales/it.po +89 -63
  62. package/src/i18n/locales/ja.po +89 -63
  63. package/src/i18n/locales/ko.po +16 -0
  64. package/src/i18n/locales/nb.po +89 -63
  65. package/src/i18n/locales/ne.po +89 -63
  66. package/src/i18n/locales/nl.po +89 -63
  67. package/src/i18n/locales/pl.po +89 -63
  68. package/src/i18n/locales/pt_BR.po +89 -63
  69. package/src/i18n/locales/pt_PT.po +89 -63
  70. package/src/i18n/locales/ro.po +89 -63
  71. package/src/i18n/locales/ru.po +89 -63
  72. package/src/i18n/locales/sv.po +89 -63
  73. package/src/i18n/locales/tr.po +89 -63
  74. package/src/i18n/locales/uk.po +89 -63
  75. package/src/i18n/locales/uz.po +89 -63
  76. package/src/i18n/locales/zh_Hans.po +89 -63
  77. package/src/i18n/locales/zh_Hant.po +89 -63
  78. package/src/lib/components/layout/nav-main.tsx +3 -1
  79. package/src/lib/framework/document-introspection/add-custom-fields.ts +2 -2
  80. package/src/lib/framework/document-introspection/include-only-selected-list-fields.ts +4 -1
  81. package/src/lib/framework/extension-api/custom-providers.ts +1 -1
  82. package/dist/bundle/chunks/ar-BGF27StW.js +0 -4
  83. package/dist/bundle/chunks/bg-DkqOGEvG.js +0 -4
  84. package/dist/bundle/chunks/cs-CKnEitnA.js +0 -4
  85. package/dist/bundle/chunks/de-B-hSTdcF.js +0 -4
  86. package/dist/bundle/chunks/en-4EbLSxP4.js +0 -4
  87. package/dist/bundle/chunks/es-BJr_pTZZ.js +0 -4
  88. package/dist/bundle/chunks/fa-NHk9jRAC.js +0 -4
  89. package/dist/bundle/chunks/fr-gP2g5_ht.js +0 -4
  90. package/dist/bundle/chunks/he-Xr8Cx_mh.js +0 -4
  91. package/dist/bundle/chunks/hr-DzjCNMEU.js +0 -4
  92. package/dist/bundle/chunks/hu-CXOlSiP6.js +0 -4
  93. package/dist/bundle/chunks/it-DYujYua2.js +0 -4
  94. package/dist/bundle/chunks/ja-ZaE7h4EQ.js +0 -4
  95. package/dist/bundle/chunks/ko-4EbLSxP4.js +0 -4
  96. package/dist/bundle/chunks/nb-BGkcDLkm.js +0 -4
  97. package/dist/bundle/chunks/ne-DDJwrpmB.js +0 -4
  98. package/dist/bundle/chunks/nl-DaJt2O1a.js +0 -4
  99. package/dist/bundle/chunks/pl-DQ-xjSLt.js +0 -4
  100. package/dist/bundle/chunks/pt_BR-Bv3fwQyM.js +0 -4
  101. package/dist/bundle/chunks/pt_PT-DdlVuwFg.js +0 -4
  102. package/dist/bundle/chunks/ro-CsBx1KAe.js +0 -4
  103. package/dist/bundle/chunks/ru-CfK8XmB-.js +0 -4
  104. package/dist/bundle/chunks/sv-DpW1nyx4.js +0 -4
  105. package/dist/bundle/chunks/tr-iM7XvP3W.js +0 -4
  106. package/dist/bundle/chunks/uk-Cc2aTucO.js +0 -4
  107. package/dist/bundle/chunks/uz-Bp06aVxW.js +0 -4
  108. package/dist/bundle/chunks/zh_Hans-D1qOG21m.js +0 -4
  109. package/dist/bundle/chunks/zh_Hant-C2Tj1zDP.js +0 -4
  110. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/dev-config.js +0 -251
  111. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/package.json +0 -4
  112. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/nav-modifier-plugin/nav-modifier-plugin.js +0 -23
  113. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/api/api-extensions.js +0 -99
  114. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/api/product-entity.resolver.js +0 -73
  115. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/api/product-review-admin.resolver.js +0 -146
  116. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/api/product-review-entity.resolver.js +0 -79
  117. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/api/product-review-shop.resolver.js +0 -79
  118. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/entities/product-review-translation.entity.js +0 -47
  119. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/entities/product-review.entity.js +0 -90
  120. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/generated-admin-types.js +0 -1021
  121. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/generated-shop-types.js +0 -974
  122. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/reviews-plugin.js +0 -46
  123. package/dist/vite/.vendure-dashboard-temp/compiler/4346-7f116ae5-e526-4aad-b671-b514921c7c92/test-plugins/reviews/types.js +0 -2
  124. package/dist/vite/.vendure-dashboard-temp/gql-tada/4346-7f116ae5-e526-4aad-b671-b514921c7c92/schema.graphql +0 -6844
  125. package/dist/vite/.vendure-dashboard-temp/gql-tada/4346-7f116ae5-e526-4aad-b671-b514921c7c92/tsconfig.json +0 -10
  126. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/dev-config.js +0 -0
  127. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/package.json +0 -0
  128. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/nav-modifier-plugin/nav-modifier-plugin.js +0 -0
  129. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/api/api-extensions.js +0 -0
  130. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/api/product-entity.resolver.js +0 -0
  131. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/api/product-review-admin.resolver.js +0 -0
  132. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/api/product-review-entity.resolver.js +0 -0
  133. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/api/product-review-shop.resolver.js +0 -0
  134. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/entities/product-review-translation.entity.js +0 -0
  135. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/entities/product-review.entity.js +0 -0
  136. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/generated-admin-types.js +0 -0
  137. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/generated-shop-types.js +0 -0
  138. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/reviews-plugin.js +0 -0
  139. /package/dist/vite/.vendure-dashboard-temp/compiler/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/test-plugins/reviews/types.js +0 -0
  140. /package/dist/vite/.vendure-dashboard-temp/gql-tada/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/schema.graphql +0 -0
  141. /package/dist/vite/.vendure-dashboard-temp/gql-tada/{3392-6cc5883f-d536-4750-80a8-e56ef4d1f34c → 3313-17d5f23c-1ffd-4e86-b905-7235d2fbfa10}/tsconfig.json +0 -0
@@ -1,79 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var _a, _b, _c, _d, _e;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProductReviewEntityResolver = void 0;
17
- const graphql_1 = require("@nestjs/graphql");
18
- const core_1 = require("@vendure/core");
19
- const product_review_entity_1 = require("../entities/product-review.entity");
20
- let ProductReviewEntityResolver = class ProductReviewEntityResolver {
21
- constructor(connection) {
22
- this.connection = connection;
23
- }
24
- async product(review, ctx) {
25
- let product = review.product;
26
- if (!product) {
27
- const reviewWithProduct = await this.connection.getRepository(ctx, product_review_entity_1.ProductReview).findOne({
28
- where: { id: review.id },
29
- relations: {
30
- product: true,
31
- },
32
- });
33
- if (reviewWithProduct) {
34
- product = reviewWithProduct.product;
35
- }
36
- }
37
- if (product) {
38
- return (0, core_1.translateDeep)(product, ctx.languageCode);
39
- }
40
- }
41
- async productVariant(review, ctx) {
42
- let productVariant = review.productVariant;
43
- if (!productVariant) {
44
- const reviewWithProductVariant = await this.connection.getRepository(ctx, product_review_entity_1.ProductReview).findOne({
45
- where: { id: review.id },
46
- relations: {
47
- productVariant: true,
48
- },
49
- });
50
- if (reviewWithProductVariant) {
51
- productVariant = reviewWithProductVariant.productVariant;
52
- }
53
- }
54
- if (productVariant) {
55
- return (0, core_1.translateDeep)(productVariant, ctx.languageCode);
56
- }
57
- }
58
- };
59
- exports.ProductReviewEntityResolver = ProductReviewEntityResolver;
60
- __decorate([
61
- (0, graphql_1.ResolveField)(),
62
- __param(0, (0, graphql_1.Parent)()),
63
- __param(1, (0, core_1.Ctx)()),
64
- __metadata("design:type", Function),
65
- __metadata("design:paramtypes", [typeof (_b = typeof product_review_entity_1.ProductReview !== "undefined" && product_review_entity_1.ProductReview) === "function" ? _b : Object, typeof (_c = typeof core_1.RequestContext !== "undefined" && core_1.RequestContext) === "function" ? _c : Object]),
66
- __metadata("design:returntype", Promise)
67
- ], ProductReviewEntityResolver.prototype, "product", null);
68
- __decorate([
69
- (0, graphql_1.ResolveField)(),
70
- __param(0, (0, graphql_1.Parent)()),
71
- __param(1, (0, core_1.Ctx)()),
72
- __metadata("design:type", Function),
73
- __metadata("design:paramtypes", [typeof (_d = typeof product_review_entity_1.ProductReview !== "undefined" && product_review_entity_1.ProductReview) === "function" ? _d : Object, typeof (_e = typeof core_1.RequestContext !== "undefined" && core_1.RequestContext) === "function" ? _e : Object]),
74
- __metadata("design:returntype", Promise)
75
- ], ProductReviewEntityResolver.prototype, "productVariant", null);
76
- exports.ProductReviewEntityResolver = ProductReviewEntityResolver = __decorate([
77
- (0, graphql_1.Resolver)('ProductReview'),
78
- __metadata("design:paramtypes", [typeof (_a = typeof core_1.TransactionalConnection !== "undefined" && core_1.TransactionalConnection) === "function" ? _a : Object])
79
- ], ProductReviewEntityResolver);
@@ -1,79 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var __param = (this && this.__param) || function (paramIndex, decorator) {
12
- return function (target, key) { decorator(target, key, paramIndex); }
13
- };
14
- var _a, _b, _c, _d, _e, _f;
15
- Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.ProductReviewShopResolver = void 0;
17
- const graphql_1 = require("@nestjs/graphql");
18
- const core_1 = require("@vendure/core");
19
- const product_review_entity_1 = require("../entities/product-review.entity");
20
- const generated_shop_types_1 = require("../generated-shop-types");
21
- let ProductReviewShopResolver = class ProductReviewShopResolver {
22
- constructor(connection, listQueryBuilder) {
23
- this.connection = connection;
24
- this.listQueryBuilder = listQueryBuilder;
25
- }
26
- async submitProductReview(ctx, { input }) {
27
- const review = new product_review_entity_1.ProductReview(input);
28
- const product = await this.connection.getEntityOrThrow(ctx, core_1.Product, input.productId);
29
- review.product = product;
30
- review.state = 'new';
31
- if (input.variantId) {
32
- const variant = await this.connection.getEntityOrThrow(ctx, core_1.ProductVariant, input.variantId);
33
- review.productVariant = variant;
34
- }
35
- if (input.customerId) {
36
- const customer = await this.connection.getEntityOrThrow(ctx, core_1.Customer, input.customerId);
37
- review.author = customer;
38
- }
39
- return this.connection.getRepository(ctx, product_review_entity_1.ProductReview).save(review);
40
- }
41
- async voteOnReview(ctx, { id, vote }) {
42
- const review = await this.connection.getEntityOrThrow(ctx, product_review_entity_1.ProductReview, id, {
43
- relations: ['product'],
44
- where: {
45
- state: 'approved',
46
- },
47
- });
48
- if (vote) {
49
- review.upvotes++;
50
- }
51
- else {
52
- review.downvotes++;
53
- }
54
- return this.connection.getRepository(ctx, product_review_entity_1.ProductReview).save(review);
55
- }
56
- };
57
- exports.ProductReviewShopResolver = ProductReviewShopResolver;
58
- __decorate([
59
- (0, core_1.Transaction)(),
60
- (0, graphql_1.Mutation)(),
61
- __param(0, (0, core_1.Ctx)()),
62
- __param(1, (0, graphql_1.Args)()),
63
- __metadata("design:type", Function),
64
- __metadata("design:paramtypes", [typeof (_c = typeof core_1.RequestContext !== "undefined" && core_1.RequestContext) === "function" ? _c : Object, typeof (_d = typeof generated_shop_types_1.MutationSubmitProductReviewArgs !== "undefined" && generated_shop_types_1.MutationSubmitProductReviewArgs) === "function" ? _d : Object]),
65
- __metadata("design:returntype", Promise)
66
- ], ProductReviewShopResolver.prototype, "submitProductReview", null);
67
- __decorate([
68
- (0, core_1.Transaction)(),
69
- (0, graphql_1.Mutation)(),
70
- __param(0, (0, core_1.Ctx)()),
71
- __param(1, (0, graphql_1.Args)()),
72
- __metadata("design:type", Function),
73
- __metadata("design:paramtypes", [typeof (_e = typeof core_1.RequestContext !== "undefined" && core_1.RequestContext) === "function" ? _e : Object, typeof (_f = typeof generated_shop_types_1.MutationVoteOnReviewArgs !== "undefined" && generated_shop_types_1.MutationVoteOnReviewArgs) === "function" ? _f : Object]),
74
- __metadata("design:returntype", Promise)
75
- ], ProductReviewShopResolver.prototype, "voteOnReview", null);
76
- exports.ProductReviewShopResolver = ProductReviewShopResolver = __decorate([
77
- (0, graphql_1.Resolver)(),
78
- __metadata("design:paramtypes", [typeof (_a = typeof core_1.TransactionalConnection !== "undefined" && core_1.TransactionalConnection) === "function" ? _a : Object, typeof (_b = typeof core_1.ListQueryBuilder !== "undefined" && core_1.ListQueryBuilder) === "function" ? _b : Object])
79
- ], ProductReviewShopResolver);
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var _a, _b, _c;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.ProductReviewTranslation = exports.CustomReviewFieldsTranslation = void 0;
14
- const shared_types_1 = require("@vendure/common/lib/shared-types");
15
- const core_1 = require("@vendure/core");
16
- const typeorm_1 = require("typeorm");
17
- const product_review_entity_1 = require("./product-review.entity");
18
- class CustomReviewFieldsTranslation {
19
- }
20
- exports.CustomReviewFieldsTranslation = CustomReviewFieldsTranslation;
21
- let ProductReviewTranslation = class ProductReviewTranslation extends core_1.VendureEntity {
22
- constructor(input) {
23
- super(input);
24
- }
25
- };
26
- exports.ProductReviewTranslation = ProductReviewTranslation;
27
- __decorate([
28
- (0, typeorm_1.Column)('varchar'),
29
- __metadata("design:type", typeof (_b = typeof core_1.LanguageCode !== "undefined" && core_1.LanguageCode) === "function" ? _b : Object)
30
- ], ProductReviewTranslation.prototype, "languageCode", void 0);
31
- __decorate([
32
- (0, typeorm_1.Column)('varchar'),
33
- __metadata("design:type", String)
34
- ], ProductReviewTranslation.prototype, "text", void 0);
35
- __decorate([
36
- (0, typeorm_1.Index)(),
37
- (0, typeorm_1.ManyToOne)(() => product_review_entity_1.ProductReview, base => base.translations, { onDelete: 'CASCADE' }),
38
- __metadata("design:type", typeof (_c = typeof product_review_entity_1.ProductReview !== "undefined" && product_review_entity_1.ProductReview) === "function" ? _c : Object)
39
- ], ProductReviewTranslation.prototype, "base", void 0);
40
- __decorate([
41
- (0, typeorm_1.Column)(type => CustomReviewFieldsTranslation),
42
- __metadata("design:type", CustomReviewFieldsTranslation)
43
- ], ProductReviewTranslation.prototype, "customFields", void 0);
44
- exports.ProductReviewTranslation = ProductReviewTranslation = __decorate([
45
- (0, typeorm_1.Entity)(),
46
- __metadata("design:paramtypes", [typeof (_a = typeof shared_types_1.DeepPartial !== "undefined" && shared_types_1.DeepPartial) === "function" ? _a : Object])
47
- ], ProductReviewTranslation);
@@ -1,90 +0,0 @@
1
- "use strict";
2
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
3
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
4
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
5
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
6
- return c > 3 && r && Object.defineProperty(target, key, r), r;
7
- };
8
- var __metadata = (this && this.__metadata) || function (k, v) {
9
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
10
- };
11
- var _a, _b, _c, _d, _e, _f, _g;
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.ProductReview = exports.CustomReviewFields = void 0;
14
- const core_1 = require("@vendure/core");
15
- const typeorm_1 = require("typeorm");
16
- const types_1 = require("../types");
17
- const product_review_translation_entity_1 = require("./product-review-translation.entity");
18
- class CustomReviewFields {
19
- }
20
- exports.CustomReviewFields = CustomReviewFields;
21
- let ProductReview = class ProductReview extends core_1.VendureEntity {
22
- constructor(input) {
23
- super(input);
24
- }
25
- };
26
- exports.ProductReview = ProductReview;
27
- __decorate([
28
- (0, typeorm_1.ManyToOne)(type => core_1.Product),
29
- __metadata("design:type", typeof (_b = typeof core_1.Product !== "undefined" && core_1.Product) === "function" ? _b : Object)
30
- ], ProductReview.prototype, "product", void 0);
31
- __decorate([
32
- (0, typeorm_1.ManyToOne)(type => core_1.ProductVariant),
33
- __metadata("design:type", typeof (_c = typeof core_1.ProductVariant !== "undefined" && core_1.ProductVariant) === "function" ? _c : Object)
34
- ], ProductReview.prototype, "productVariant", void 0);
35
- __decorate([
36
- (0, typeorm_1.Column)(),
37
- __metadata("design:type", String)
38
- ], ProductReview.prototype, "summary", void 0);
39
- __decorate([
40
- (0, typeorm_1.Column)('text'),
41
- __metadata("design:type", String)
42
- ], ProductReview.prototype, "body", void 0);
43
- __decorate([
44
- (0, typeorm_1.Column)(),
45
- __metadata("design:type", Number)
46
- ], ProductReview.prototype, "rating", void 0);
47
- __decorate([
48
- (0, typeorm_1.ManyToOne)(type => core_1.Customer),
49
- __metadata("design:type", typeof (_d = typeof core_1.Customer !== "undefined" && core_1.Customer) === "function" ? _d : Object)
50
- ], ProductReview.prototype, "author", void 0);
51
- __decorate([
52
- (0, typeorm_1.Column)(),
53
- __metadata("design:type", String)
54
- ], ProductReview.prototype, "authorName", void 0);
55
- __decorate([
56
- (0, typeorm_1.Column)({ nullable: true }),
57
- __metadata("design:type", String)
58
- ], ProductReview.prototype, "authorLocation", void 0);
59
- __decorate([
60
- (0, typeorm_1.Column)({ default: 0 }),
61
- __metadata("design:type", Number)
62
- ], ProductReview.prototype, "upvotes", void 0);
63
- __decorate([
64
- (0, typeorm_1.Column)({ default: 0 }),
65
- __metadata("design:type", Number)
66
- ], ProductReview.prototype, "downvotes", void 0);
67
- __decorate([
68
- (0, typeorm_1.Column)('varchar'),
69
- __metadata("design:type", typeof (_e = typeof types_1.ReviewState !== "undefined" && types_1.ReviewState) === "function" ? _e : Object)
70
- ], ProductReview.prototype, "state", void 0);
71
- __decorate([
72
- (0, typeorm_1.Column)('text', { nullable: true, default: null }),
73
- __metadata("design:type", String)
74
- ], ProductReview.prototype, "response", void 0);
75
- __decorate([
76
- (0, typeorm_1.Column)({ nullable: true, default: null }),
77
- __metadata("design:type", typeof (_f = typeof Date !== "undefined" && Date) === "function" ? _f : Object)
78
- ], ProductReview.prototype, "responseCreatedAt", void 0);
79
- __decorate([
80
- (0, typeorm_1.OneToMany)(() => product_review_translation_entity_1.ProductReviewTranslation, translation => translation.base, { eager: true }),
81
- __metadata("design:type", typeof (_g = typeof Array !== "undefined" && Array) === "function" ? _g : Object)
82
- ], ProductReview.prototype, "translations", void 0);
83
- __decorate([
84
- (0, typeorm_1.Column)(type => CustomReviewFields),
85
- __metadata("design:type", CustomReviewFields)
86
- ], ProductReview.prototype, "customFields", void 0);
87
- exports.ProductReview = ProductReview = __decorate([
88
- (0, typeorm_1.Entity)(),
89
- __metadata("design:paramtypes", [typeof (_a = typeof core_1.DeepPartial !== "undefined" && core_1.DeepPartial) === "function" ? _a : Object])
90
- ], ProductReview);