@ozdao/martyrs 0.2.539 → 0.2.541
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{globals.verifier-CJ1lr-NW.cjs → globals.verifier-Bi-XLEi9.cjs} +24 -23
- package/dist/{globals.verifier-BhqUrneb.js → globals.verifier-gPPX_jhf.js} +24 -23
- package/dist/inventory.server.cjs +1 -1
- package/dist/inventory.server.js +1 -1
- package/dist/{main-Zhs0EqRp.cjs → main-7IA3UHca.cjs} +6 -6
- package/dist/{main-gOfhekZG.js → main-BpBtIUcJ.js} +549 -549
- package/dist/martyrs/src/components/Button/Button.vue.cjs +1 -1
- package/dist/martyrs/src/components/Button/Button.vue.js +1 -1
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs → Dropdown.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.js → Dropdown.vue2.js} +2 -2
- package/dist/martyrs/src/components/Dropdown/{Dropdown.vue.cjs.map → Dropdown.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs +0 -93
- package/dist/martyrs/src/components/EditImages/EditImages.vue.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js +1 -94
- package/dist/martyrs/src/components/EditImages/EditImages.vue.js.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs +93 -0
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.cjs.map +1 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js +94 -1
- package/dist/martyrs/src/components/EditImages/EditImages.vue2.js.map +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.cjs +1 -1
- package/dist/martyrs/src/components/Feed/Carousel.vue.js +1 -1
- package/dist/martyrs/src/components/Feed/Feed.vue.cjs +3 -3
- package/dist/martyrs/src/components/Feed/Feed.vue.js +3 -3
- package/dist/martyrs/src/components/FieldTags/create-tags.cjs +11 -2
- package/dist/martyrs/src/components/FieldTags/create-tags.cjs.map +1 -1
- package/dist/martyrs/src/components/FieldTags/create-tags.js +11 -2
- package/dist/martyrs/src/components/FieldTags/create-tags.js.map +1 -1
- package/dist/martyrs/src/components/Loader/{Loader.vue.cjs → Loader.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Loader/Loader.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Loader/{Loader.vue.js → Loader.vue2.js} +2 -2
- package/dist/martyrs/src/components/Loader/{Loader.vue.cjs.map → Loader.vue2.js.map} +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.cjs +1 -1
- package/dist/martyrs/src/components/LocationMarker/LocationMarker.vue.js +1 -1
- package/dist/martyrs/src/components/Menu/{Menu.vue.cjs → Menu.vue2.cjs} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.cjs.map +1 -0
- package/dist/martyrs/src/components/Menu/{Menu.vue.js → Menu.vue2.js} +2 -2
- package/dist/martyrs/src/components/Menu/Menu.vue2.js.map +1 -0
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.cjs +1 -1
- package/dist/martyrs/src/components/UploadImageMultiple/UploadImageMultiple.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.cjs +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/Profile.vue.js +3 -3
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/auth/views/components/pages/ProfileEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs +0 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.cjs.map +1 -1
- package/dist/martyrs/src/modules/auth/views/store/auth.js +0 -2
- package/dist/martyrs/src/modules/auth/views/store/auth.js.map +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.cjs +1 -1
- package/dist/martyrs/src/modules/community/components/pages/BlogPost.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.cjs +2 -2
- package/dist/martyrs/src/modules/events/components/pages/EditEvent.vue.js +2 -2
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.cjs +3 -3
- package/dist/martyrs/src/modules/events/components/pages/Event.vue.js +3 -3
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/Feed.vue.js +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.cjs +1 -1
- package/dist/martyrs/src/modules/events/components/sections/List.vue.js +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.cjs +1 -1
- package/dist/martyrs/src/modules/gallery/components/sections/BackofficeGallery.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.cjs +0 -3
- package/dist/martyrs/src/modules/globals/globals.client.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/globals.client.js +0 -3
- package/dist/martyrs/src/modules/globals/globals.client.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.cjs +31 -41
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.js +31 -41
- package/dist/martyrs/src/modules/globals/views/classes/globals.app.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.cjs +0 -3
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.js +0 -3
- package/dist/martyrs/src/modules/globals/views/classes/module-registry.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/store.cjs +0 -5
- package/dist/martyrs/src/modules/globals/views/classes/store.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/classes/store.js +0 -5
- package/dist/martyrs/src/modules/globals/views/classes/store.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/CardHeader.vue.js +2 -2
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/blocks/PopupDateSelector.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/layouts/Client.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/globals/views/components/partials/Navigation.vue.js +1 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.cjs → Filters.vue2.cjs} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue2.cjs.map +1 -0
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.js → Filters.vue2.js} +2 -2
- package/dist/martyrs/src/modules/globals/views/components/sections/{Filters.vue.cjs.map → Filters.vue2.js.map} +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs +2 -2
- package/dist/martyrs/src/modules/globals/views/store/globals.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/store/globals.js +2 -2
- package/dist/martyrs/src/modules/globals/views/store/globals.js.map +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs +7 -3
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.cjs.map +1 -1
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js +7 -3
- package/dist/martyrs/src/modules/globals/views/utils/vue-app-renderer.js.map +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.cjs +2 -2
- package/dist/martyrs/src/modules/inventory/components/pages/Inventory.vue.js +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/inventory/components/pages/InventoryEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.cjs +1 -1
- package/dist/martyrs/src/modules/marketplace/views/components/sections/SectionMenu.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/forms/ArtistForm.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Album.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Artist.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Playlist.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/SearchResults.vue.js +1 -1
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.cjs +2 -2
- package/dist/martyrs/src/modules/music/components/pages/Track.vue.js +2 -2
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.cjs +1 -1
- package/dist/martyrs/src/modules/music/components/pages/TrackCreate.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.cjs +1 -1
- package/dist/martyrs/src/modules/orders/components/forms/FormSelectCustomer.vue.js +1 -1
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.cjs +3 -3
- package/dist/martyrs/src/modules/orders/components/sections/FormDelivery.vue.js +3 -3
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/blocks/CardDepartment.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Department.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Members.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.cjs +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/Organization.vue.js +4 -4
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/pages/OrganizationBackoffice.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Documents.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/components/sections/Organizations.vue.js +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.cjs +1 -1
- package/dist/martyrs/src/modules/organizations/router/organizations.js +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.cjs +1 -1
- package/dist/martyrs/src/modules/pages/views/components/blocks/CardPage.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/elements/Image360.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Categories.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs +19 -3
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js +19 -3
- package/dist/martyrs/src/modules/products/components/pages/CategoryEdit.vue.js.map +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Product.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductEdit.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/ProductRecommmendation.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/pages/Products.vue.js +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.cjs +1 -1
- package/dist/martyrs/src/modules/products/components/sections/EditVariants.vue.js +1 -1
- package/dist/martyrs/src/modules/products/store/categories.cjs +4 -0
- package/dist/martyrs/src/modules/products/store/categories.cjs.map +1 -1
- package/dist/martyrs/src/modules/products/store/categories.js +4 -0
- package/dist/martyrs/src/modules/products/store/categories.js.map +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.cjs +1 -1
- package/dist/martyrs/src/modules/rents/views/components/pages/Gant/GanttToolbar.vue.js +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.cjs +1 -1
- package/dist/martyrs/src/modules/spots/components/layouts/Spots.vue.js +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.cjs +1 -1
- package/dist/martyrs/src/modules/wallet/views/components/pages/Wallet.vue.js +1 -1
- package/dist/martyrs.cjs.js +1 -1
- package/dist/martyrs.es.js +1 -1
- package/dist/music.server.cjs +1 -1
- package/dist/music.server.js +1 -1
- package/dist/orders.server.cjs +1 -1
- package/dist/orders.server.js +1 -1
- package/dist/organizations.server.cjs +1 -1
- package/dist/organizations.server.js +1 -1
- package/dist/products.server.cjs +10 -2
- package/dist/products.server.js +10 -2
- package/dist/rents.server.cjs +1 -1
- package/dist/rents.server.js +1 -1
- package/dist/{web-bMa0DMyG.cjs → web-C9bVm6Nw.cjs} +1 -1
- package/dist/{web-DxxU2bwy.js → web-DsdyXC8n.js} +1 -1
- package/package.json +1 -1
- package/src/components/FieldTags/FieldTagsNew.vue +366 -0
- package/src/components/FieldTags/README.md +513 -0
- package/src/components/FieldTags/create-tags.js +15 -2
- package/src/modules/auth/views/store/auth.js +0 -2
- package/src/modules/globals/controllers/classes/globals.validator.js +24 -23
- package/src/modules/globals/globals.client.js +0 -3
- package/src/modules/globals/views/classes/globals.app.js +21 -34
- package/src/modules/globals/views/classes/module-registry.js +0 -3
- package/src/modules/globals/views/classes/store.js +0 -7
- package/src/modules/globals/views/store/globals.js +2 -2
- package/src/modules/globals/views/utils/vue-app-renderer.js +11 -3
- package/src/modules/products/components/pages/CategoryEdit.vue +20 -0
- package/src/modules/products/middlewares/categories.verifier.js +9 -1
- package/src/modules/products/store/categories.js +5 -0
- package/dist/martyrs/src/components/Dropdown/Dropdown.vue.js.map +0 -1
- package/dist/martyrs/src/components/Loader/Loader.vue.js.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.cjs.map +0 -1
- package/dist/martyrs/src/components/Menu/Menu.vue.js.map +0 -1
- package/dist/martyrs/src/modules/globals/views/components/sections/Filters.vue.js.map +0 -1
|
@@ -318,7 +318,8 @@ class Validator {
|
|
|
318
318
|
for (let i = 0; i < value.length; i++) {
|
|
319
319
|
const result = validator.validate(value[i]);
|
|
320
320
|
if (!result.isValid) {
|
|
321
|
-
|
|
321
|
+
const fieldName = message ? `${message}[${i}]` : `Item ${i}`;
|
|
322
|
+
this.errors.push(`${fieldName}: ${result.errors.join(", ")}`);
|
|
322
323
|
return false;
|
|
323
324
|
}
|
|
324
325
|
}
|
|
@@ -344,7 +345,7 @@ class Validator {
|
|
|
344
345
|
}
|
|
345
346
|
const result = validator.validate(value[key]);
|
|
346
347
|
if (!result.isValid) {
|
|
347
|
-
this.errors.push(`
|
|
348
|
+
this.errors.push(`"${key}" ${result.errors.join(", ")}`);
|
|
348
349
|
return false;
|
|
349
350
|
}
|
|
350
351
|
}
|
|
@@ -371,7 +372,7 @@ class Validator {
|
|
|
371
372
|
}
|
|
372
373
|
const result = validator.validate(value[key]);
|
|
373
374
|
if (!result.isValid) {
|
|
374
|
-
this.errors.push(`
|
|
375
|
+
this.errors.push(`"${key}" ${result.errors.join(", ")}`);
|
|
375
376
|
return false;
|
|
376
377
|
}
|
|
377
378
|
}
|
|
@@ -399,46 +400,46 @@ class Validator {
|
|
|
399
400
|
const context = this.options.context ? `${this.options.context} ` : "";
|
|
400
401
|
switch (rule.type) {
|
|
401
402
|
case "string":
|
|
402
|
-
return `${context}
|
|
403
|
+
return `${context}must be a string`;
|
|
403
404
|
case "number":
|
|
404
|
-
return `${context}
|
|
405
|
+
return `${context}must be a number`;
|
|
405
406
|
case "integer":
|
|
406
|
-
return `${context}
|
|
407
|
+
return `${context}must be an integer`;
|
|
407
408
|
case "boolean":
|
|
408
|
-
return `${context}
|
|
409
|
+
return `${context}must be a boolean`;
|
|
409
410
|
case "array":
|
|
410
|
-
return `${context}
|
|
411
|
+
return `${context}must be an array`;
|
|
411
412
|
case "date":
|
|
412
|
-
return `${context}
|
|
413
|
+
return `${context}must be a valid date`;
|
|
413
414
|
case "required":
|
|
414
|
-
return `${context}
|
|
415
|
+
return `${context}is required`;
|
|
415
416
|
case "min":
|
|
416
|
-
if (rule.param instanceof Date) return `${context}
|
|
417
|
-
return `${context}
|
|
417
|
+
if (rule.param instanceof Date) return `${context}must be no earlier than ${rule.param.toLocaleDateString()}`;
|
|
418
|
+
return `${context}must be at least ${rule.param}`;
|
|
418
419
|
case "max":
|
|
419
|
-
if (rule.param instanceof Date) return `${context}
|
|
420
|
-
return `${context}
|
|
420
|
+
if (rule.param instanceof Date) return `${context}must be no later than ${rule.param.toLocaleDateString()}`;
|
|
421
|
+
return `${context}must be at most ${rule.param}`;
|
|
421
422
|
case "length":
|
|
422
423
|
if (rule.param.min !== void 0 && rule.param.max !== void 0) {
|
|
423
|
-
return `${context}
|
|
424
|
+
return `${context}length must be between ${rule.param.min} and ${rule.param.max} characters`;
|
|
424
425
|
} else if (rule.param.min !== void 0) {
|
|
425
|
-
return `${context}
|
|
426
|
+
return `${context}length must be at least ${rule.param.min} characters`;
|
|
426
427
|
} else if (rule.param.max !== void 0) {
|
|
427
|
-
return `${context}
|
|
428
|
+
return `${context}length must be at most ${rule.param.max} characters`;
|
|
428
429
|
}
|
|
429
|
-
return `${context}
|
|
430
|
+
return `${context}does not meet length requirements`;
|
|
430
431
|
case "pattern":
|
|
431
|
-
return `${context}
|
|
432
|
+
return `${context}does not match required format`;
|
|
432
433
|
case "email":
|
|
433
|
-
return `${context}
|
|
434
|
+
return `${context}must be a valid email address`;
|
|
434
435
|
case "oneOf":
|
|
435
|
-
return `${context}
|
|
436
|
+
return `${context}must be one of: ${rule.param.join(", ")}`;
|
|
436
437
|
case "oneOfTypes":
|
|
437
|
-
return `${context}
|
|
438
|
+
return `${context}must be one of types: ${rule.param.join(", ")}`;
|
|
438
439
|
case "custom":
|
|
439
440
|
return rule.param;
|
|
440
441
|
case "items":
|
|
441
|
-
return `${context}
|
|
442
|
+
return `${context}contains invalid items`;
|
|
442
443
|
case "object":
|
|
443
444
|
return `${context}не соответствует типу объекта`;
|
|
444
445
|
case "shape":
|
|
@@ -317,7 +317,8 @@ class Validator {
|
|
|
317
317
|
for (let i = 0; i < value.length; i++) {
|
|
318
318
|
const result = validator.validate(value[i]);
|
|
319
319
|
if (!result.isValid) {
|
|
320
|
-
|
|
320
|
+
const fieldName = message ? `${message}[${i}]` : `Item ${i}`;
|
|
321
|
+
this.errors.push(`${fieldName}: ${result.errors.join(", ")}`);
|
|
321
322
|
return false;
|
|
322
323
|
}
|
|
323
324
|
}
|
|
@@ -343,7 +344,7 @@ class Validator {
|
|
|
343
344
|
}
|
|
344
345
|
const result = validator.validate(value[key]);
|
|
345
346
|
if (!result.isValid) {
|
|
346
|
-
this.errors.push(`
|
|
347
|
+
this.errors.push(`"${key}" ${result.errors.join(", ")}`);
|
|
347
348
|
return false;
|
|
348
349
|
}
|
|
349
350
|
}
|
|
@@ -370,7 +371,7 @@ class Validator {
|
|
|
370
371
|
}
|
|
371
372
|
const result = validator.validate(value[key]);
|
|
372
373
|
if (!result.isValid) {
|
|
373
|
-
this.errors.push(`
|
|
374
|
+
this.errors.push(`"${key}" ${result.errors.join(", ")}`);
|
|
374
375
|
return false;
|
|
375
376
|
}
|
|
376
377
|
}
|
|
@@ -398,46 +399,46 @@ class Validator {
|
|
|
398
399
|
const context = this.options.context ? `${this.options.context} ` : "";
|
|
399
400
|
switch (rule.type) {
|
|
400
401
|
case "string":
|
|
401
|
-
return `${context}
|
|
402
|
+
return `${context}must be a string`;
|
|
402
403
|
case "number":
|
|
403
|
-
return `${context}
|
|
404
|
+
return `${context}must be a number`;
|
|
404
405
|
case "integer":
|
|
405
|
-
return `${context}
|
|
406
|
+
return `${context}must be an integer`;
|
|
406
407
|
case "boolean":
|
|
407
|
-
return `${context}
|
|
408
|
+
return `${context}must be a boolean`;
|
|
408
409
|
case "array":
|
|
409
|
-
return `${context}
|
|
410
|
+
return `${context}must be an array`;
|
|
410
411
|
case "date":
|
|
411
|
-
return `${context}
|
|
412
|
+
return `${context}must be a valid date`;
|
|
412
413
|
case "required":
|
|
413
|
-
return `${context}
|
|
414
|
+
return `${context}is required`;
|
|
414
415
|
case "min":
|
|
415
|
-
if (rule.param instanceof Date) return `${context}
|
|
416
|
-
return `${context}
|
|
416
|
+
if (rule.param instanceof Date) return `${context}must be no earlier than ${rule.param.toLocaleDateString()}`;
|
|
417
|
+
return `${context}must be at least ${rule.param}`;
|
|
417
418
|
case "max":
|
|
418
|
-
if (rule.param instanceof Date) return `${context}
|
|
419
|
-
return `${context}
|
|
419
|
+
if (rule.param instanceof Date) return `${context}must be no later than ${rule.param.toLocaleDateString()}`;
|
|
420
|
+
return `${context}must be at most ${rule.param}`;
|
|
420
421
|
case "length":
|
|
421
422
|
if (rule.param.min !== void 0 && rule.param.max !== void 0) {
|
|
422
|
-
return `${context}
|
|
423
|
+
return `${context}length must be between ${rule.param.min} and ${rule.param.max} characters`;
|
|
423
424
|
} else if (rule.param.min !== void 0) {
|
|
424
|
-
return `${context}
|
|
425
|
+
return `${context}length must be at least ${rule.param.min} characters`;
|
|
425
426
|
} else if (rule.param.max !== void 0) {
|
|
426
|
-
return `${context}
|
|
427
|
+
return `${context}length must be at most ${rule.param.max} characters`;
|
|
427
428
|
}
|
|
428
|
-
return `${context}
|
|
429
|
+
return `${context}does not meet length requirements`;
|
|
429
430
|
case "pattern":
|
|
430
|
-
return `${context}
|
|
431
|
+
return `${context}does not match required format`;
|
|
431
432
|
case "email":
|
|
432
|
-
return `${context}
|
|
433
|
+
return `${context}must be a valid email address`;
|
|
433
434
|
case "oneOf":
|
|
434
|
-
return `${context}
|
|
435
|
+
return `${context}must be one of: ${rule.param.join(", ")}`;
|
|
435
436
|
case "oneOfTypes":
|
|
436
|
-
return `${context}
|
|
437
|
+
return `${context}must be one of types: ${rule.param.join(", ")}`;
|
|
437
438
|
case "custom":
|
|
438
439
|
return rule.param;
|
|
439
440
|
case "items":
|
|
440
|
-
return `${context}
|
|
441
|
+
return `${context}contains invalid items`;
|
|
441
442
|
case "object":
|
|
442
443
|
return `${context}не соответствует типу объекта`;
|
|
443
444
|
case "shape":
|
|
@@ -6,7 +6,7 @@ const globals_abac = require("./globals.abac-CPXLas7N.cjs");
|
|
|
6
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-
|
|
9
|
+
const globals_verifier = require("./globals.verifier-Bi-XLEi9.cjs");
|
|
10
10
|
const crud = require("./crud-DGM6Xa1R.cjs");
|
|
11
11
|
const abac = require("./abac-DOyUjhee.cjs");
|
|
12
12
|
const StockAdjustmentModel = (db) => {
|
package/dist/inventory.server.js
CHANGED
|
@@ -4,7 +4,7 @@ import { g as globalsabac } from "./globals.abac-DNdtSYop.js";
|
|
|
4
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-
|
|
7
|
+
import { a as Validator, V as Verifier } from "./globals.verifier-gPPX_jhf.js";
|
|
8
8
|
import { C as CRUD } from "./crud-Ed3dcRsC.js";
|
|
9
9
|
import { A as ABAC } from "./abac-CnJsrv8S.js";
|
|
10
10
|
const StockAdjustmentModel = (db) => {
|