@ozdao/martyrs 0.2.524 → 0.2.526

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 (107) hide show
  1. package/dist/_virtual/index.cjs +4 -4
  2. package/dist/_virtual/index.js +4 -4
  3. package/dist/_virtual/index2.cjs +4 -4
  4. package/dist/_virtual/index2.js +4 -4
  5. package/dist/community.server.cjs +1 -1
  6. package/dist/community.server.js +1 -1
  7. package/dist/{crud-CC6k6yY5.cjs → crud-DGM6Xa1R.cjs} +1 -1
  8. package/dist/{crud-BIFl1W1i.js → crud-Ed3dcRsC.js} +1 -1
  9. package/dist/events.server.cjs +1 -1
  10. package/dist/events.server.js +1 -1
  11. package/dist/gallery.server.cjs +1 -1
  12. package/dist/gallery.server.js +1 -1
  13. package/dist/{globals.verifier-DFqKQ7hK.js → globals.verifier-BhqUrneb.js} +31 -1
  14. package/dist/{globals.verifier-C0zj_LLo.cjs → globals.verifier-CJ1lr-NW.cjs} +31 -1
  15. package/dist/inventory.server.cjs +3 -3
  16. package/dist/inventory.server.js +3 -3
  17. package/dist/{main-BM3GslOO.cjs → main-4KvvKtzH.cjs} +6 -6
  18. package/dist/{main-Qcn7YlTx.js → main-Bk4xq-K0.js} +45 -37
  19. package/dist/martyrs/src/components/Feed/Feed.vue.cjs +1 -1
  20. package/dist/martyrs/src/components/Feed/Feed.vue.cjs.map +1 -1
  21. package/dist/martyrs/src/components/Feed/Feed.vue.js +1 -1
  22. package/dist/martyrs/src/components/Feed/Feed.vue.js.map +1 -1
  23. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.cjs +1 -1
  24. package/dist/martyrs/src/components/FieldTags/FieldTags.vue.js +1 -1
  25. package/dist/martyrs/src/components/Tree/Tree.vue.cjs +19 -33
  26. package/dist/martyrs/src/components/Tree/Tree.vue.cjs.map +1 -1
  27. package/dist/martyrs/src/components/Tree/Tree.vue.js +19 -33
  28. package/dist/martyrs/src/components/Tree/Tree.vue.js.map +1 -1
  29. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.cjs +1 -1
  30. package/dist/martyrs/src/modules/community/components/pages/CreateBlogPost.vue.js +1 -1
  31. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.cjs +1 -1
  32. package/dist/martyrs/src/modules/globals/views/classes/globals.i18n.js +1 -1
  33. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
  34. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs.map +1 -1
  35. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
  36. package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js.map +1 -1
  37. package/dist/martyrs/src/modules/globals/views/store/globals.cjs +14 -2
  38. package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
  39. package/dist/martyrs/src/modules/globals/views/store/globals.js +14 -2
  40. package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
  41. package/dist/martyrs/src/modules/notifications/notifications.client.cjs +25 -5
  42. package/dist/martyrs/src/modules/notifications/notifications.client.cjs.map +1 -1
  43. package/dist/martyrs/src/modules/notifications/notifications.client.js +25 -5
  44. package/dist/martyrs/src/modules/notifications/notifications.client.js.map +1 -1
  45. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs +6 -1
  46. package/dist/martyrs/src/modules/notifications/store/notifications.store.cjs.map +1 -1
  47. package/dist/martyrs/src/modules/notifications/store/notifications.store.js +6 -1
  48. package/dist/martyrs/src/modules/notifications/store/notifications.store.js.map +1 -1
  49. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +27 -19
  50. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs.map +1 -1
  51. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +27 -19
  52. package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js.map +1 -1
  53. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +76 -44
  54. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs.map +1 -1
  55. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +76 -44
  56. package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js.map +1 -1
  57. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +0 -1
  58. package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs.map +1 -1
  59. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +0 -1
  60. package/dist/martyrs/src/modules/products/components/pages/Products.vue.js.map +1 -1
  61. package/dist/martyrs/src/modules/products/store/products.cjs +12 -2
  62. package/dist/martyrs/src/modules/products/store/products.cjs.map +1 -1
  63. package/dist/martyrs/src/modules/products/store/products.js +12 -2
  64. package/dist/martyrs/src/modules/products/store/products.js.map +1 -1
  65. package/dist/martyrs.cjs.js +1 -1
  66. package/dist/martyrs.es.js +1 -1
  67. package/dist/music.server.cjs +2 -2
  68. package/dist/music.server.js +2 -2
  69. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.cjs +1 -1
  70. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/core/utils.js +1 -1
  71. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.cjs +1 -1
  72. package/dist/node_modules/.pnpm/qrcode@1.5.4/node_modules/qrcode/lib/renderer/utils.js +1 -1
  73. package/dist/notifications.server.cjs +8 -3
  74. package/dist/notifications.server.js +8 -3
  75. package/dist/orders.server.cjs +3 -3
  76. package/dist/orders.server.js +3 -3
  77. package/dist/organizations.server.cjs +2 -2
  78. package/dist/organizations.server.js +2 -2
  79. package/dist/products.server.cjs +34 -22
  80. package/dist/products.server.js +34 -22
  81. package/dist/{queryProcessor-B_X680wC.cjs → queryProcessor-DMSc5-r6.cjs} +17 -20
  82. package/dist/{queryProcessor-CVcLPEnv.js → queryProcessor-rukV_SBd.js} +17 -20
  83. package/dist/rents.server.cjs +2 -2
  84. package/dist/rents.server.js +2 -2
  85. package/dist/spots.server.cjs +1 -1
  86. package/dist/spots.server.js +1 -1
  87. package/dist/{web-DVR8m2fm.js → web-BS-4Xl3x.js} +1 -1
  88. package/dist/{web-B0cfxzgu.cjs → web-CjndIDjT.cjs} +1 -1
  89. package/package.json +1 -1
  90. package/src/components/Feed/Feed.vue +1 -1
  91. package/src/components/Tree/Tree.vue +27 -15
  92. package/src/modules/globals/controllers/classes/globals.validator.js +32 -1
  93. package/src/modules/globals/controllers/utils/queryProcessor.js +27 -20
  94. package/src/modules/globals/views/components/blocks/PopupDateSelector.vue +1 -1
  95. package/src/modules/globals/views/store/globals.js +19 -2
  96. package/src/modules/notifications/controllers/notifications.controller.js +14 -6
  97. package/src/modules/notifications/notifications.client.js +27 -6
  98. package/src/modules/notifications/store/notifications.store.js +6 -1
  99. package/src/modules/products/components/pages/Categories.vue +41 -26
  100. package/src/modules/products/components/pages/ProductEdit.vue +45 -21
  101. package/src/modules/products/components/pages/Products.vue +0 -1
  102. package/src/modules/products/controllers/categories.controller.js +3 -17
  103. package/src/modules/products/controllers/products.controller.js +34 -1
  104. package/src/modules/products/middlewares/categories.verifier.js +1 -1
  105. package/src/modules/products/middlewares/variants.verifier.js +2 -2
  106. package/src/modules/products/store/products.js +10 -0
  107. package/src/modules/products/TASKS.MD +0 -1
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const _commonjsHelpers = require("./_commonjsHelpers.cjs");
4
- const index = require("../node_modules/lodash.merge/index.cjs");
5
- var lodash_mergeExports = index.__require();
6
- const merge = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(lodash_mergeExports);
7
- exports.default = merge;
4
+ const index = require("../node_modules/fast-deep-equal/index.cjs");
5
+ var fastDeepEqualExports = index.__require();
6
+ const equal = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(fastDeepEqualExports);
7
+ exports.default = equal;
8
8
  //# sourceMappingURL=index.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
2
- import { __require as requireLodash_merge } from "../node_modules/lodash.merge/index.js";
3
- var lodash_mergeExports = requireLodash_merge();
4
- const merge = /* @__PURE__ */ getDefaultExportFromCjs(lodash_mergeExports);
2
+ import { __require as requireFastDeepEqual } from "../node_modules/fast-deep-equal/index.js";
3
+ var fastDeepEqualExports = requireFastDeepEqual();
4
+ const equal = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
5
5
  export {
6
- merge as default
6
+ equal as default
7
7
  };
8
8
  //# sourceMappingURL=index.js.map
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const _commonjsHelpers = require("./_commonjsHelpers.cjs");
4
- const index = require("../node_modules/fast-deep-equal/index.cjs");
5
- var fastDeepEqualExports = index.__require();
6
- const equal = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(fastDeepEqualExports);
7
- exports.default = equal;
4
+ const index = require("../node_modules/lodash.merge/index.cjs");
5
+ var lodash_mergeExports = index.__require();
6
+ const merge = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(lodash_mergeExports);
7
+ exports.default = merge;
8
8
  //# sourceMappingURL=index2.cjs.map
@@ -1,8 +1,8 @@
1
1
  import { getDefaultExportFromCjs } from "./_commonjsHelpers.js";
2
- import { __require as requireFastDeepEqual } from "../node_modules/fast-deep-equal/index.js";
3
- var fastDeepEqualExports = requireFastDeepEqual();
4
- const equal = /* @__PURE__ */ getDefaultExportFromCjs(fastDeepEqualExports);
2
+ import { __require as requireLodash_merge } from "../node_modules/lodash.merge/index.js";
3
+ var lodash_mergeExports = requireLodash_merge();
4
+ const merge = /* @__PURE__ */ getDefaultExportFromCjs(lodash_mergeExports);
5
5
  export {
6
- equal as default
6
+ merge as default
7
7
  };
8
8
  //# sourceMappingURL=index2.js.map
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
3
  const mongoose = require("mongoose");
4
- const queryProcessor$1 = require("./queryProcessor-B_X680wC.cjs");
4
+ const queryProcessor$1 = require("./queryProcessor-DMSc5-r6.cjs");
5
5
  const common_schema = require("./common.schema-BzFEVNn3.cjs");
6
6
  const engagement_schema = require("./engagement.schema-JADHu8pj.cjs");
7
7
  const metadata_schema = require("./metadata.schema-RlxNv46L.cjs");
@@ -1,5 +1,5 @@
1
1
  import { Types } from "mongoose";
2
- import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
2
+ import { q as queryProcessorGlobals } from "./queryProcessor-rukV_SBd.js";
3
3
  import { a as applyCommonSchema } from "./common.schema-Bw1O5_2Q.js";
4
4
  import { a as applyEngagementSchema } from "./engagement.schema-Dh1adRsn.js";
5
5
  import { a as applyMetadataSchema } from "./metadata.schema-CWmcDJN7.js";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const authJwt = require("./authJwt-BIZ2GIfT.cjs");
3
- const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
3
+ const queryProcessor = require("./queryProcessor-DMSc5-r6.cjs");
4
4
  const globals_observer = require("./globals.observer-C_FYclgV.cjs");
5
5
  const globals_logger = require("./globals.logger-BuW7JHMY.cjs");
6
6
  class CRUDCore {
@@ -1,5 +1,5 @@
1
1
  import { m as middlewareFactory } from "./authJwt-J1csaMWA.js";
2
- import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
2
+ import { q as queryProcessorGlobals } from "./queryProcessor-rukV_SBd.js";
3
3
  import { O as ObserverNamespaced } from "./globals.observer-MZsqaE6F.js";
4
4
  import { L as LoggerNamespaced, C as CacheNamespaced } from "./globals.logger-VRHh-WUW.js";
5
5
  class CRUDCore {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const queryProcessor$1 = require("./queryProcessor-B_X680wC.cjs");
3
+ const queryProcessor$1 = require("./queryProcessor-DMSc5-r6.cjs");
4
4
  const metadata_schema = require("./metadata.schema-RlxNv46L.cjs");
5
5
  const Stripe = require("stripe");
6
6
  const mongoose = require("mongoose");
@@ -1,4 +1,4 @@
1
- import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
1
+ import { q as queryProcessorGlobals } from "./queryProcessor-rukV_SBd.js";
2
2
  import { c as createFriendlyURL, a as applyMetadataSchema } from "./metadata.schema-CWmcDJN7.js";
3
3
  import Stripe from "stripe";
4
4
  import { Types } from "mongoose";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
3
+ const queryProcessor = require("./queryProcessor-DMSc5-r6.cjs");
4
4
  const path = require("path");
5
5
  const common_schema = require("./common.schema-BzFEVNn3.cjs");
6
6
  const engagement_schema = require("./engagement.schema-JADHu8pj.cjs");
@@ -1,4 +1,4 @@
1
- import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
1
+ import { q as queryProcessorGlobals } from "./queryProcessor-rukV_SBd.js";
2
2
  import path from "path";
3
3
  import { a as applyCommonSchema } from "./common.schema-Bw1O5_2Q.js";
4
4
  import { a as applyEngagementSchema } from "./engagement.schema-Dh1adRsn.js";
@@ -182,6 +182,27 @@ class Validator {
182
182
  });
183
183
  return this;
184
184
  }
185
+ /**
186
+ * Проверяет длину строки
187
+ * @param {{ min?: number, max?: number }} options - Минимальная и максимальная длина
188
+ * @param {string} [message] - Пользовательское сообщение об ошибке
189
+ * @returns {Validator}
190
+ */
191
+ length(options, message) {
192
+ this.rules.push({
193
+ type: "length",
194
+ check: (value) => {
195
+ if (value === void 0 || value === null) return true;
196
+ const str = String(value);
197
+ if (options.min !== void 0 && str.length < options.min) return false;
198
+ if (options.max !== void 0 && str.length > options.max) return false;
199
+ return true;
200
+ },
201
+ param: options,
202
+ message
203
+ });
204
+ return this;
205
+ }
185
206
  /**
186
207
  * Проверяет соответствие регулярному выражению
187
208
  * @param {RegExp} regex - Регулярное выражение
@@ -396,6 +417,15 @@ class Validator {
396
417
  case "max":
397
418
  if (rule.param instanceof Date) return `${context}должно быть не позднее ${rule.param.toLocaleDateString()}`;
398
419
  return `${context}должно быть не более ${rule.param}`;
420
+ case "length":
421
+ if (rule.param.min !== void 0 && rule.param.max !== void 0) {
422
+ return `${context}длина должна быть от ${rule.param.min} до ${rule.param.max} символов`;
423
+ } else if (rule.param.min !== void 0) {
424
+ return `${context}длина должна быть не менее ${rule.param.min} символов`;
425
+ } else if (rule.param.max !== void 0) {
426
+ return `${context}длина должна быть не более ${rule.param.max} символов`;
427
+ }
428
+ return `${context}не соответствует требованиям длины`;
399
429
  case "pattern":
400
430
  return `${context}не соответствует требуемому формату`;
401
431
  case "email":
@@ -425,7 +455,7 @@ class Validator {
425
455
  this.errors = [];
426
456
  for (const rule of this.rules) {
427
457
  if (!rule.check(value)) {
428
- if (rule.type !== "items" && rule.type !== "shape") {
458
+ if (rule.type !== "items" && rule.type !== "shape" && rule.type !== "object") {
429
459
  this.errors.push(this._getErrorMessage(rule));
430
460
  }
431
461
  if (["string", "number", "object", "integer", "boolean", "array", "date"].includes(rule.type)) {
@@ -183,6 +183,27 @@ class Validator {
183
183
  });
184
184
  return this;
185
185
  }
186
+ /**
187
+ * Проверяет длину строки
188
+ * @param {{ min?: number, max?: number }} options - Минимальная и максимальная длина
189
+ * @param {string} [message] - Пользовательское сообщение об ошибке
190
+ * @returns {Validator}
191
+ */
192
+ length(options, message) {
193
+ this.rules.push({
194
+ type: "length",
195
+ check: (value) => {
196
+ if (value === void 0 || value === null) return true;
197
+ const str = String(value);
198
+ if (options.min !== void 0 && str.length < options.min) return false;
199
+ if (options.max !== void 0 && str.length > options.max) return false;
200
+ return true;
201
+ },
202
+ param: options,
203
+ message
204
+ });
205
+ return this;
206
+ }
186
207
  /**
187
208
  * Проверяет соответствие регулярному выражению
188
209
  * @param {RegExp} regex - Регулярное выражение
@@ -397,6 +418,15 @@ class Validator {
397
418
  case "max":
398
419
  if (rule.param instanceof Date) return `${context}должно быть не позднее ${rule.param.toLocaleDateString()}`;
399
420
  return `${context}должно быть не более ${rule.param}`;
421
+ case "length":
422
+ if (rule.param.min !== void 0 && rule.param.max !== void 0) {
423
+ return `${context}длина должна быть от ${rule.param.min} до ${rule.param.max} символов`;
424
+ } else if (rule.param.min !== void 0) {
425
+ return `${context}длина должна быть не менее ${rule.param.min} символов`;
426
+ } else if (rule.param.max !== void 0) {
427
+ return `${context}длина должна быть не более ${rule.param.max} символов`;
428
+ }
429
+ return `${context}не соответствует требованиям длины`;
400
430
  case "pattern":
401
431
  return `${context}не соответствует требуемому формату`;
402
432
  case "email":
@@ -426,7 +456,7 @@ class Validator {
426
456
  this.errors = [];
427
457
  for (const rule of this.rules) {
428
458
  if (!rule.check(value)) {
429
- if (rule.type !== "items" && rule.type !== "shape") {
459
+ if (rule.type !== "items" && rule.type !== "shape" && rule.type !== "object") {
430
460
  this.errors.push(this._getErrorMessage(rule));
431
461
  }
432
462
  if (["string", "number", "object", "integer", "boolean", "array", "date"].includes(rule.type)) {
@@ -3,11 +3,11 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
3
3
  const ownership_schema = require("./ownership.schema-D1p5XSpt.cjs");
4
4
  const authJwt = require("./authJwt-BIZ2GIfT.cjs");
5
5
  const globals_abac = require("./globals.abac-CPXLas7N.cjs");
6
- const queryProcessor = require("./queryProcessor-B_X680wC.cjs");
6
+ const queryProcessor = require("./queryProcessor-DMSc5-r6.cjs");
7
7
  const globals_logger = require("./globals.logger-BuW7JHMY.cjs");
8
8
  const globals_observer = require("./globals.observer-C_FYclgV.cjs");
9
- const globals_verifier = require("./globals.verifier-C0zj_LLo.cjs");
10
- const crud = require("./crud-CC6k6yY5.cjs");
9
+ const globals_verifier = require("./globals.verifier-CJ1lr-NW.cjs");
10
+ const crud = require("./crud-DGM6Xa1R.cjs");
11
11
  const abac = require("./abac-DOyUjhee.cjs");
12
12
  const StockAdjustmentModel = (db) => {
13
13
  const StockAdjustmentSchema = new db.mongoose.Schema({
@@ -1,11 +1,11 @@
1
1
  import { a as applyOwnershipSchema } from "./ownership.schema-BqH4v5vH.js";
2
2
  import { m as middlewareFactory } from "./authJwt-J1csaMWA.js";
3
3
  import { g as globalsabac } from "./globals.abac-DNdtSYop.js";
4
- import { q as queryProcessorGlobals } from "./queryProcessor-CVcLPEnv.js";
4
+ import { q as queryProcessorGlobals } from "./queryProcessor-rukV_SBd.js";
5
5
  import { C as CacheNamespaced, L as LoggerNamespaced } from "./globals.logger-VRHh-WUW.js";
6
6
  import { O as ObserverNamespaced } from "./globals.observer-MZsqaE6F.js";
7
- import { a as Validator, V as Verifier } from "./globals.verifier-DFqKQ7hK.js";
8
- import { C as CRUD } from "./crud-BIFl1W1i.js";
7
+ import { a as Validator, V as Verifier } from "./globals.verifier-BhqUrneb.js";
8
+ import { C as CRUD } from "./crud-Ed3dcRsC.js";
9
9
  import { A as ABAC } from "./abac-CnJsrv8S.js";
10
10
  const StockAdjustmentModel = (db) => {
11
11
  const StockAdjustmentSchema = new db.mongoose.Schema({