cloudcommerce 2.5.1 → 2.6.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 (68) hide show
  1. package/.vscode/settings.json +4 -1
  2. package/CHANGELOG.md +27 -0
  3. package/ecomplus-stores/barradoce/.devcontainer/devcontainer.json +10 -4
  4. package/ecomplus-stores/barradoce/.vscode/settings.json +3 -0
  5. package/ecomplus-stores/barradoce/functions/many/package.json +3 -3
  6. package/ecomplus-stores/barradoce/functions/ssr/package.json +6 -6
  7. package/ecomplus-stores/barradoce/functions/ssr/src/components/CartSidebar.vue +29 -9
  8. package/ecomplus-stores/barradoce/functions/ssr/src/components/HeroSlider.vue +1 -3
  9. package/ecomplus-stores/barradoce/functions/ssr/src/components/ProductDetails.vue +30 -12
  10. package/ecomplus-stores/barradoce/functions/ssr/src/components/SearchModal.vue +9 -6
  11. package/ecomplus-stores/barradoce/functions/ssr/src/components/SearchShowcase.vue +19 -17
  12. package/ecomplus-stores/barradoce/functions/ssr/src/components/ShippingCalculator.vue +100 -0
  13. package/ecomplus-stores/barradoce/functions/ssr/src/main/content/Sections.astro +3 -0
  14. package/ecomplus-stores/barradoce/functions/ssr/src/state/midd-search-engine.ts +19 -0
  15. package/ecomplus-stores/barradoce/functions/with-apps/package.json +3 -3
  16. package/ecomplus-stores/barradoce/package.json +2 -2
  17. package/ecomplus-stores/barradoce/tailwind.config.cjs +5 -3
  18. package/package.json +2 -2
  19. package/packages/api/package.json +1 -1
  20. package/packages/apps/affiliate-program/package.json +1 -1
  21. package/packages/apps/correios/package.json +1 -1
  22. package/packages/apps/custom-payment/package.json +1 -1
  23. package/packages/apps/custom-shipping/package.json +1 -1
  24. package/packages/apps/datafrete/package.json +1 -1
  25. package/packages/apps/discounts/package.json +1 -1
  26. package/packages/apps/emails/package.json +1 -1
  27. package/packages/apps/fb-conversions/package.json +1 -1
  28. package/packages/apps/flash-courier/package.json +1 -1
  29. package/packages/apps/frenet/package.json +1 -1
  30. package/packages/apps/galaxpay/package.json +1 -1
  31. package/packages/apps/google-analytics/package.json +1 -1
  32. package/packages/apps/jadlog/package.json +1 -1
  33. package/packages/apps/loyalty-points/package.json +1 -1
  34. package/packages/apps/mandae/package.json +1 -1
  35. package/packages/apps/melhor-envio/package.json +1 -1
  36. package/packages/apps/mercadopago/package.json +1 -1
  37. package/packages/apps/pagarme/package.json +1 -1
  38. package/packages/apps/pagarme-v5/package.json +1 -1
  39. package/packages/apps/paghiper/package.json +1 -1
  40. package/packages/apps/pix/package.json +1 -1
  41. package/packages/apps/tiny-erp/package.json +1 -1
  42. package/packages/apps/webhooks/package.json +1 -1
  43. package/packages/cli/package.json +1 -1
  44. package/packages/config/package.json +1 -1
  45. package/packages/emails/package.json +1 -1
  46. package/packages/eslint/package.json +1 -1
  47. package/packages/eslint/storefront.eslintrc.cjs +1 -0
  48. package/packages/events/package.json +1 -1
  49. package/packages/feeds/package.json +1 -1
  50. package/packages/firebase/package.json +1 -1
  51. package/packages/i18n/package.json +1 -1
  52. package/packages/modules/package.json +1 -1
  53. package/packages/passport/package.json +1 -1
  54. package/packages/ssr/package.json +3 -3
  55. package/packages/storefront/package.json +4 -3
  56. package/packages/storefront/src/__fixtures__/calculate_shipping.json +161 -0
  57. package/packages/storefront/src/helpers/afetch.ts +1 -0
  58. package/packages/storefront/src/lib/components/Spinner.vue +16 -0
  59. package/packages/storefront/src/lib/components/globals/Skeleton.vue +25 -7
  60. package/packages/storefront/src/lib/composables/use-search-modal.ts +3 -1
  61. package/packages/storefront/src/lib/composables/use-search-showcase.ts +2 -1
  62. package/packages/storefront/src/lib/composables/use-shipping-calculator.ts +90 -31
  63. package/packages/storefront/src/lib/layouts/BaseHead.astro +2 -1
  64. package/packages/storefront/src/lib/layouts/use-page-main.ts +9 -5
  65. package/packages/storefront/src/lib/ssr-context.ts +9 -0
  66. package/packages/storefront/src/lib/state/search-engine.ts +21 -11
  67. package/packages/test-base/package.json +1 -1
  68. package/packages/types/package.json +1 -1
@@ -1,5 +1,7 @@
1
- process.env.STOREFRONT_BASE_DIR = './functions/ssr';
1
+ const { join: joinPath } = require('node:path');
2
2
 
3
- const { genTailwindConfig } = require('./functions/ssr/tailwind.config.cjs');
3
+ process.env.STOREFRONT_BASE_DIR = joinPath(__dirname, './functions/ssr');
4
4
 
5
- module.exports = genTailwindConfig();
5
+ const tailwindConfig = require('./functions/ssr/tailwind.config.cjs');
6
+
7
+ module.exports = tailwindConfig;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cloudcommerce",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "Open fair-code headless commerce platform: API-first, microservices based, event driven and cloud native",
6
6
  "main": "packages/api/lib/index.js",
7
7
  "author": "E-Com Club Softwares para E-commerce <ti@e-com.club>",
@@ -36,7 +36,7 @@
36
36
  "vite": "^5.0.11",
37
37
  "vitest": "^1.3.0",
38
38
  "zx": "^7.2.3",
39
- "@cloudcommerce/eslint": "2.5.1"
39
+ "@cloudcommerce/eslint": "2.6.1"
40
40
  },
41
41
  "scripts": {
42
42
  "fix-install": "bash scripts/pre-install.sh && pnpm i",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/api",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce APIs client/adapter",
6
6
  "main": "lib/api.js",
7
7
  "types": "lib/api.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-affiliate-program",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for simple affiliate program",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-correios",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Correios shipping calculation",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-payment",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for simple custom payment methods",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-custom-shipping",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for custom shipping methods",
6
6
  "main": "lib/custom-shipping.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-datafrete",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Datafrete shipping gateway ",
6
6
  "main": "lib/datafrete.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-discounts",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for complex discount rules",
6
6
  "main": "lib/discounts.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-emails",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce default transactional email app",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-fb-conversions",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to send carts/orders to Facebook Conversions API",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-flash-courier",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Flash Courier",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-frenet",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Frenet shipping calculation",
6
6
  "main": "lib/frenet.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-galaxpay",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Galax Pay for recurring payments",
6
6
  "main": "lib/galaxpay.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-google-analytics",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to send carts/orders events to GA Measurement Protocol",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-jadlog",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Jadlog shipping calculation",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-loyalty-points",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to handle simple loyalty points programs",
6
6
  "main": "lib/loyalty-points.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-mandae",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Mandaê shipping intermediator",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-melhor-envio",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Melhor Envio",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-mercadopago",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Mercado Pago",
6
6
  "main": "lib/mercadopago.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pagarme",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pagar.me",
6
6
  "main": "lib/pagarme.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pagarme-v5",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pagar.me API v5 with recurring payments",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-paghiper",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate PagHiper",
6
6
  "main": "lib/paghiper.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-pix",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app to integrate Pix API (Bacen)",
6
6
  "main": "lib/pix.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-tiny-erp",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for Tiny ERP",
6
6
  "main": "lib/tiny-erp.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/app-webhooks",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app for general order webhooks",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/cli",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce CLI tools",
6
6
  "bin": {
7
7
  "cloudcommerce": "./bin/run.mjs"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/config",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce base config",
6
6
  "main": "lib/config.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/emails",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce email sender",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/eslint",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce ESLint config",
6
6
  "main": "lib/index.js",
7
7
  "repository": {
@@ -26,6 +26,7 @@ module.exports = {
26
26
  'Carousel',
27
27
  'Drawer',
28
28
  'Skeleton',
29
+ 'Spinner',
29
30
  'Prices',
30
31
  'Banner',
31
32
  'Breadcrumbs',
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/events",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce app events",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/feeds",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce catalog feeds",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/firebase",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce on Firebase",
6
6
  "main": "lib/index.js",
7
7
  "types": "lib/index.d.ts",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/i18n",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce i18n",
6
6
  "main": "lib/all.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/modules",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce modules API",
6
6
  "main": "lib/index.cjs",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/passport",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce customers authentication (passport) API",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/ssr",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce storefront SSR",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -31,8 +31,8 @@
31
31
  "@cloudcommerce/firebase": "workspace:*",
32
32
  "@cloudcommerce/i18n": "workspace:*",
33
33
  "@ecomplus/utils": "1.5.0-rc.6",
34
- "@vueuse/core": "10.7.2",
35
- "astro": "4.4.0",
34
+ "@vueuse/core": "10.8.0",
35
+ "astro": "4.4.1",
36
36
  "astro-capo": "^0.0.1",
37
37
  "axios": "^1.6.7",
38
38
  "firebase-admin": "^12.0.0",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cloudcommerce/storefront",
3
3
  "type": "module",
4
- "version": "2.5.1",
4
+ "version": "2.6.1",
5
5
  "description": "E-Com Plus Cloud Commerce storefront with Astro",
6
6
  "bin": {
7
7
  "storefront": "./scripts/build-prod.sh"
@@ -42,8 +42,9 @@
42
42
  "@iconify-json/logos": "^1.1.42",
43
43
  "@types/gtag.js": "^0.0.19",
44
44
  "@vite-pwa/astro": "^0.3.0",
45
- "@vueuse/core": "10.7.2",
46
- "astro": "4.4.0",
45
+ "@vueuse/core": "10.8.0",
46
+ "@webcontainer/api": "^1.1.9",
47
+ "astro": "4.4.1",
47
48
  "astro-capo": "^0.0.1",
48
49
  "chroma-js": "^2.4.2",
49
50
  "dotenv": "^16.4.4",
@@ -0,0 +1,161 @@
1
+ {
2
+ "meta": {
3
+ "to": {
4
+ "zip": "30333111"
5
+ },
6
+ "items": [
7
+ {
8
+ "product_id": "5c701c8ac626be23430d4fe5",
9
+ "sku": "hd-csr-303",
10
+ "name": "Headset Gamer Corsair HS40 Raptor CA-9011122-NA(AP)",
11
+ "quantity": 1,
12
+ "currency_id": "BRL",
13
+ "currency_symbol": "R$",
14
+ "price": 285,
15
+ "dimensions": {
16
+ "width": {
17
+ "value": 10,
18
+ "unit": "cm"
19
+ },
20
+ "height": {
21
+ "value": 10,
22
+ "unit": "cm"
23
+ },
24
+ "length": {
25
+ "value": 10,
26
+ "unit": "cm"
27
+ }
28
+ },
29
+ "weight": {
30
+ "value": 500,
31
+ "unit": "g"
32
+ }
33
+ }
34
+ ],
35
+ "subtotal": 285,
36
+ "own_hand": false,
37
+ "receipt": false,
38
+ "is_checkout_confirmation": false
39
+ },
40
+ "result": [
41
+ {
42
+ "_id": "645e84cf0332fe172e2d7c75",
43
+ "app_id": 1253,
44
+ "queue_took": 45,
45
+ "took": 69,
46
+ "version": "1.3.0",
47
+ "validated": false,
48
+ "response_errors": null,
49
+ "error": true,
50
+ "error_message": "Request failed with status code 400",
51
+ "response": {
52
+ "error": "CALCULATE_ERR",
53
+ "message": "Zip code is unset on app hidden data (merchant must configure the app)"
54
+ }
55
+ },
56
+ {
57
+ "_id": "5fc529c069274c73fcdebb61",
58
+ "app_id": 1248,
59
+ "queue_took": 25,
60
+ "took": 423,
61
+ "version": "1.0.5",
62
+ "validated": false,
63
+ "response_errors": null,
64
+ "error": true,
65
+ "error_message": "Request failed with status code 400",
66
+ "response": {
67
+ "error": "CALCULATE_FAILED",
68
+ "message": "undefined- connect ECONNREFUSED 201.48.198.97:80- Results from offline data invalidated"
69
+ }
70
+ },
71
+ {
72
+ "_id": "5f15da8614ff772fde810435",
73
+ "app_id": 119348,
74
+ "queue_took": 5,
75
+ "took": 526,
76
+ "version": "1.1.2",
77
+ "validated": true,
78
+ "response_errors": null,
79
+ "error": false,
80
+ "error_message": null,
81
+ "response": {
82
+ "shipping_services": [
83
+ {
84
+ "label": "SEDEX",
85
+ "carrier": "Correios (Manda Bem)",
86
+ "service_name": "SEDEX",
87
+ "shipping_line": {
88
+ "from": {
89
+ "zip": "35701399"
90
+ },
91
+ "to": {
92
+ "zip": "30333111"
93
+ },
94
+ "price": 11.73,
95
+ "total_price": 11.73,
96
+ "declared_value": 285,
97
+ "discount": 0,
98
+ "delivery_time": {
99
+ "days": 1,
100
+ "working_days": true
101
+ },
102
+ "posting_deadline": {
103
+ "days": 3,
104
+ "working_days": true,
105
+ "after_approval": true
106
+ },
107
+ "package": {
108
+ "weight": {
109
+ "value": 0.5,
110
+ "unit": "kg"
111
+ }
112
+ },
113
+ "flags": [
114
+ "mandabem-ws"
115
+ ],
116
+ "own_hand": false,
117
+ "receipt": false
118
+ }
119
+ },
120
+ {
121
+ "label": "PAC",
122
+ "carrier": "Correios (Manda Bem)",
123
+ "service_name": "PAC",
124
+ "shipping_line": {
125
+ "from": {
126
+ "zip": "35701399"
127
+ },
128
+ "to": {
129
+ "zip": "30333111"
130
+ },
131
+ "price": 0,
132
+ "total_price": 0,
133
+ "declared_value": 285,
134
+ "discount": 0,
135
+ "delivery_time": {
136
+ "days": 5,
137
+ "working_days": true
138
+ },
139
+ "posting_deadline": {
140
+ "days": 3,
141
+ "working_days": true,
142
+ "after_approval": true
143
+ },
144
+ "package": {
145
+ "weight": {
146
+ "value": 0.5,
147
+ "unit": "kg"
148
+ }
149
+ },
150
+ "flags": [
151
+ "mandabem-ws"
152
+ ],
153
+ "own_hand": false,
154
+ "receipt": false
155
+ }
156
+ }
157
+ ]
158
+ }
159
+ }
160
+ ]
161
+ }
@@ -32,6 +32,7 @@ const afetch = (url: FetchParams[0], init?: AFetchInit, timeout = 10000) => {
32
32
  let query = '';
33
33
  Object.keys(init.params).forEach((key) => {
34
34
  const value: string | number | (string | number)[] = init.params![key];
35
+ if (value === undefined) return;
35
36
  if (Array.isArray(value)) {
36
37
  value.forEach((val) => {
37
38
  query += `&${key}=${val}`;
@@ -0,0 +1,16 @@
1
+ <template>
2
+ <div role="status">
3
+ <svg
4
+ aria-hidden="true"
5
+ class="size-8 max-h-full max-w-full animate-spin fill-secondary text-base-300"
6
+ viewBox="0 0 100 101"
7
+ fill="none"
8
+ xmlns="http://www.w3.org/2000/svg"
9
+ >
10
+ <!-- eslint-disable max-len -->
11
+ <path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"/>
12
+ <path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"/>
13
+ </svg>
14
+ <span class="sr-only">Loading...</span>
15
+ </div>
16
+ </template>