Skip to content

Releases: shopware/frontends

@shopware-pwa/[email protected]

02 Jul 10:24
39faaa3
Compare
Choose a tag to compare

Patch Changes

@shopware-pwa/[email protected]

02 Jul 10:24
39faaa3
Compare
Choose a tag to compare

Patch Changes

@shopware/[email protected]

27 Jun 11:30
a122c60
Compare
Choose a tag to compare

Major Changes

Minor Changes

  • #534 6170dca Thanks @patzick! - loadSchema command added by splitting generate command

  • #534 6170dca Thanks @patzick! - Sorting paths in the same order by api patchs

  • #1017 12c8153 Thanks @patzick! - New command validateJson to check correctness of your OpenAPI json file.

  • #534 6170dca Thanks @patzick! - Command generate has been splitted and doing only transformation from json to d.ts file

  • #564 93a6048 Thanks @patzick! - Added apiType option in loadSchema command. With SHOPWARE_ADMIN_USERNAME and SHOPWARE_ADMIN_PASSWORD env variables we can now authorize Admin API schema.

    example:

    # load schema from store API
    pnpx @shopware/api-gen loadSchema --apiType=store --filename=storeApiSchema.json
    
    # load schema from admin API
    pnpx @shopware/api-gen loadSchema --apiType=admin --filename=adminApiSchema.json
  • #1032 0b6133e Thanks @patzick! - Possibility to add partial patches to the JSON schema.

  • #903 18d8528 Thanks @mdanilowicz! - Add Blob type support

  • #534 6170dca Thanks @patzick! - Schema operations is now a generic type to help with overriding types

  • #1032 0b6133e Thanks @patzick! - Added support for JSON5 config files. Now you can use comments in your config files and JSON schema.

Patch Changes

@shopware/[email protected]

27 Jun 11:30
a122c60
Compare
Choose a tag to compare

Major Changes

  • #871 1566f7a Thanks @patzick! - Read more about new major release: https://github.com/shopware/frontends/discussions/965

  • #1056 c729e70 Thanks @patzick! - Removed deprecations from the code:

    • onContextChanged function inside createAPIClient method. Use apiClient.hook("onContextChanged", ...) instead.
    • apiType flag from the createAPIClient. Use separate methods to create store and admin api clients
    • onAuthChange from the createAdminAPIClient. Use adminApiClient.hook('onAuthChange',...) instead

Minor Changes

  • #1039 2343012 Thanks @patzick! - We're exposing fetchOptions inside params of invoke method. You can now use ofetch features like timeout or signal with AbortController

    Example for the AbortController:

    const controller = new AbortController();
    
    const request = client.invoke("readContext get /context", {
      fetchOptions: {
        signal: controller.signal,
      },
    });
    
    controller.abort(); // At this point client will throw an error with the information, that the request has been cancelled
  • #560 9643e56 Thanks @patzick! - [createAdminAPIClient] ability to pass optional field credentials to be used as authentication method before invoking any Admin API endpoint.

  • #639 d60d062 Thanks @patzick! - Management of defaultHeaders. You can now set them on apiClient init or runtime.

    const apiClient = createApiClient({
      ...,
      defaultHeaders: {
        'sw-language-id': 'my-id',
      },
    });
    
    console.log('Debug default headers:', apiClient.defaultHeaders);
    
    // Change header runtime
    apiClient.defaultHeaders['sw-language-id'] = 'my-new-id';
    
    // Remove header runtime
    apiClient.defaultHeaders['sw-language-id'] = "";
    
    // Change multiple headers runtime
    apiClient.defaultHeaders.apply({
      'sw-language-id': 'another-id',
      'sw-currency-id': 'currency-id',
    })
  • #857 864616f Thanks @mdanilowicz! - Add error and success callbacks

Patch Changes

@shopware-pwa/[email protected]

27 Jun 11:31
a122c60
Compare
Choose a tag to compare

Major Changes

Minor Changes

Patch Changes

@shopware-pwa/[email protected]

27 Jun 11:30
a122c60
Compare
Choose a tag to compare

Major Changes

Patch Changes

@shopware-pwa/[email protected]

27 Jun 11:31
a122c60
Compare
Choose a tag to compare

Major Changes

Minor Changes

Patch Changes

  • #524 6b54268 Thanks @BrocksiNet! - added buildUrlPrefix, which perviously was internal helper of the @shopware/cms-base package

@shopware-pwa/[email protected]

27 Jun 11:30
a122c60
Compare
Choose a tag to compare

Major Changes

  • #871 1566f7a Thanks @patzick! - Read more about new major release: https://github.com/shopware/frontends/discussions/965

  • #1056 c729e70 Thanks @patzick! - Removed deprecations from the composables:

    • createShopwareContext is no longer accpting apiInstance option. Use apiClient instead.
    • useCart - getProductItemsSeoUrlsData is removed. Use product related methods to fetch an item's URL instead.
    • useCartItem - getProductItemSeoUrlData is removed
    • apiInstance is not exposing apiInstance anymore. Use apiClient instead.
  • #452 e2c225f Thanks @patzick! - Created Nuxt layer for composables and cms-base. This way overriding any part of that is now possible.

  • #978 479357c Thanks @patzick! - useCustomerPassword and loadCustomerAddresses inside useAddress are now throwing api errors on invocation. The errors object has been removed from the composable to make consistent error handling across the composables. This change is breaking and requires you to update your implementation of the composables.

    Example of error handling for resseting password:

    const {
      resetPassword,
      // errors --> removed from the API
    } = useCustomerPassword();
    
    const errors = ref([]);
    
    const invokeRecover = async (): Promise<void> => {
      try {
        errors.value = [];
        const emailSent = await resetPassword(formData.value);
    
        if (emailSent.success) {
          // here we know that email was sent
        }
      } catch (error) {
        console.error("[AccountRecoverPassword]", error);
        if (error instanceof ApiClientError) {
          errors.value = error.details?.errors || [];
        }
      }
    };

Minor Changes

  • #991 38a3853 Thanks @patzick! - Few changes in composables API to access data returned from the backend:

    • useAddress - loadCustomerAddresses returns addresses now
    • useCart - removeItem returns updated cart
    • useCartItem - removeItem returns updated cart, similar to useCart
    • fetchCountries - returns countries with the response
    • useNewsletter - getNewsletterStatus returns full response from the API
    • useOrderDetails - loadOrderDetails returns order details now, cancel returns order state, changePaymentMethod returns success response info
    • changePaymentMethod - changePaymentMethod returns success response info now
    • useProductReviews - loadProductReviews returns reviews response now
    • useSalutations - fetchSalutations returns salutations response now
    • useUser - refreshUser returns customer data. logout, loadCountry and loadSalutation returns data from the API
  • #840 823aa9b Thanks @mdanilowicz! - Return componentNameToResolve in resolveCmsComponent function

  • #529 4dce006 Thanks @mdanilowicz! - BREAKING: Use product ID instead of whole product object in useProductWishlist composable

  • #535 bebae42 Thanks @mdanilowicz! - Fix country ID in session context
    Add salesChannelCountryId that represent sales channel default city ID

  • #986 013a1d6 Thanks @mdanilowicz! - Added tests to achieve coverage > 80%

  • #933 04ac2ad Thanks @mdanilowicz! - - Added checkPromotion attribute to the orderAssociations

    • Added statusTechnicalName property to the useOrderDetails composable
    • Added getPaymentMethods method that allows change payment for existed order
    • Added stateMachineState association for loading orders
  • #1027 05ca5b6 Thanks @mdanilowicz! - Added useCategorySearch and useCmsElementProductBox tests

  • #703 7a3a92c Thanks @mdanilowicz! - Add B2b quote management composable

Patch Changes

@shopware-pwa/[email protected]

27 Jun 11:30
a122c60
Compare
Choose a tag to compare

Major Changes

Minor Changes

  • #524 6b54268 Thanks @BrocksiNet! - Moved cms internal helper functions:

    • buildUrlPrefix - moved to helpers package, see packages/helpers/src/cms/buildUrlPrefix.ts.
    • getCmsTranslations - move to composables as useCmsTranslations
    • getUrlPrefix - move to composables as method in useUrlResolver
    • resolveUrl - move to composables as method in useUrlResolver
  • #517 f7797e8 Thanks @BrocksiNet! - Change tailwindcss colors definition. Allows easy overwrite in demo-store template.

  • #1067 da77b65 Thanks @mdanilowicz! - Changed slider element to use a static value

  • #794 ead7415 Thanks @mdanilowicz! - Add media 3D models support

Patch Changes

@shopware-pwa/[email protected]

27 Jun 11:30
a122c60
Compare
Choose a tag to compare

Major Changes

Patch Changes