UNPKG

@shopify/app-bridge

Version:

[![Build Status](https://travis-ci.com/Shopify/app-bridge.svg?token=RBRyvqQyN525bnfz7J8p&branch=master)](https://travis-ci.com/Shopify/app-bridge) [![codecov](https://codecov.io/gh/Shopify/app-bridge/branch/master/graph/badge.svg?token=nZ21m39Dr6)](https:

286 lines (171 loc) 8.8 kB
# Change Log All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. <a name="0.2.2"></a> ## [0.2.2](https://github.com/Shopify/app-bridge/compare/@shopify/app-bridge@0.2.1...@shopify/app-bridge@0.2.2) (2018-09-26) ### Bug Fixes * fix cart actions and tests ([#395](https://github.com/Shopify/app-bridge/issues/395)) ([d570be1](https://github.com/Shopify/app-bridge/commit/d570be1)) <a name="0.2.1"></a> # [0.2.1](https://github.com/Shopify/app-bridge/compare/@shopify/app-bridge@0.2.0...@shopify/app-bridge@0.2.1) (2018-09-26) ### Bug Fixes * publish script ([f4d7cb7](https://github.com/Shopify/app-bridge/commit/f4d7cb7)) <a name="0.2.0"></a> # [0.2.0](https://github.com/Shopify/app-bridge/compare/@shopify/app-bridge@0.1.5...@shopify/app-bridge@0.2.0) (2018-09-26) ### Bug Fixes * test cases ([a6a1597](https://github.com/Shopify/app-bridge/commit/a6a1597)) ### Features * change POS cart actions to follow new dispatch pattern ([32a0c03](https://github.com/Shopify/app-bridge/commit/32a0c03)) <a name="0.1.5"></a> ## [0.1.5](https://github.com/Shopify/app-bridge/compare/@shopify/app-bridge@0.1.4...@shopify/app-bridge@0.1.5) (2018-09-21) ### Bug Fixes * Stop using alias to import client types to fix `actions` module ([09053f3](https://github.com/Shopify/app-bridge/commit/09053f3)) ----- ## [v0.1.4] ### Fixed * Stop using alias to import client types to fix `actions` module ### Added * Added docs and examples for breadcrumbs in the Title Bar * Added more detailed types for selected resources [ResourcePicker] * Added new discrete variant picker [ResourcePicker] * Added `initialQuery` to resource picker options [ResourcePicker] ### Changed * Ensure resource picker payload includes options [ResourcePicker] * Rename all instances of `TwoWay` to `ActionSet` to better clarify the difference between single actions and action sets. * Convert `Redirect`, `History` and `Loading` to actions sets for consistency with other actions groups ### Fixed * Fixed spelling for Flash option `isDismissible` ### Removed ## [v0.1.3] ### Added * Added ability to specify `SECRET` via environment variable * Added CODEOWNERS * Added Cart.updateById action * Export host API client load action * Export POS error actions ### Changed * Clean up READMEs * Introduce more functionality for secondary actions in test app * Ignore `TEST.md` et al for npm ### Fixed * Client now handles redirection correctly when `forceRedirect` is set * Fixed optional fields for cart payload ### Removed * Removed `start:prodShop` task * Removed docs referencing internal setup instructions ## [v0.1.1] ### Changed * Downgraded lerna to `2.9.1` ## [v0.1.0] ### Changed * Rename the package to `app-bridge` ### Fixed * Local dev EASDK Playground app install URL ## [v0.0.18] ### Changed * Use TravisCI instead of CircleCI ## [v0.0.17] ### Added * Perform validation for `apiKey` when an action is dispatched or when the app state is requested * Added client helpers `getUrlParams` and `getShopOrigin` ### Changed * Rename the `apiClientId` in the client config to `apiKey` * Remove dependency on Redux for `actions` and `client` modules * Export a union type for all available actions for each action group * The default export for the client module will now point to a method that automatically calls to create the transport between the app and the top window. _Old_ ```js import createAppWrapper, {getShopOrigin} from '@shopify/easdk'; const config = {apiKey: '123', shopOrigin: getShopOrigin()}; const app = createAppWrapper(window.top)(config); ``` _New_ ```js import createApp, {getShopOrigin} from '@shopify/easdk'; const config = {apiKey: '123', shopOrigin: getShopOrigin()}; const app = createApp(config); ``` ### Fixed * Correct `type` for Resource Picker's `UpdateAction` interface to `typeof ActionType.UPDATE` instead of `typeof ActionType.SELECT` ## [v0.0.16] ### Added * Make `APICLIENT::LOAD` a constant that Web can consume * Add apiClientId to ApiClientConfig in the host module * Handle app printing ### Changed * Simplify the fake host and delete unused apiClientLoad action * Make the fake host handle iframe urls consistent with how Web is handling them for embedded app and modals ### Fixed * Fix the Title Bar to not throw an error if both primary and secondary buttons are undefined ## [v0.0.15] ### Added * Add client id to `APICLIENT::LOAD` action ### Changed * Update the README for modals to reflect the expected `url` and `path` properties in the payload * Update the demo app to include a button to open a iframe modal with a relative path * Fix the webpack config so that the test modal page is nested under `app` like the other pages * Change type for `lineItem.price` and `discount.amount` from string to number ## [v0.0.14] ### Changed * Fixed MessageTransport for AppMessage when calling app.getState(). * Changed update cart action from `APP::CART::UPDATED` to `APP::CART::UPDATE`. ## [v0.0.13] ### Changed * Added a fix for the `fromWindow` to not add a message handler if the contentWindow is the same as the current window. This prevents messages from being sent twice. * Correct the check for EASDK actions in `fromWindow`, previously it was assuming an incorrect shape for the data. ## [v0.0.12] ### Changed * Allow parent message transport to handle all messages that have a type of `dispatch` or `getState` * Modify `fromWindow` to accept an origin as a string * Correct the default export for easdk/client to resolve the `Cannot invoke an expression whose type lacks a call signature` error * Add Cart actions for POS. * Add example to get POS user and location from redux store in test app ## [v0.0.11] ### Changed * Changed ids in ResourcePicker selection payload from strings to numbers to maintain backwards compatibility with current JSON. ## [v0.0.10] ### Added * Client now handles redirection to web host if `forceRedirect` flag is set * Tests for ResourcePicker actions and validator. ### Changed * Add a new `path` option for iframe modals which accepts relative urls. Rename the `srcUrl` to `url` for consistency. Absolute urls for modals must be in the same origin as the app otherwise an error will be thrown. ## [v0.0.9] ### Added * `Resource Picker` actions are now available with [documentation](src/actions/ResourcePicker). ### Fixed * Remove default props for `Modal`, `Button` and `ButtonGroup` so that errors are thrown when invalid options are set. ## [v0.0.8] ### Changed * Change `app.dispatch` type to `Dispatch<AnyAction>` ## [v0.0.7] ### Added * shopify-express middleware to enable installing project as an embedded app locally ### Changed * Host is now required to pass in a reducer when calling buildMiddleware * withApp decorator now provides a store prop to the wrapped component * Make title property optional for `TitleBar` to be more consistent with the older `EASDK` implementation * Make `TitleBar` buttons validator reject empty and malformed objects * Shorten names of exported types for Actions to be more consistent and less verbose. Ex. `Button.ButtonOptions` is now `Button.Options` * Use the prefix `APP` for actions instead of `EASDK` to avoid conflicts with Shopify Web * Allow modal footer to accept a primary button and secondary buttons to be more aligned with Polaris modals * Pass arbitrary props from `Frame` to child `iframe` ### Fixed * Make custom `isModalMessage` type check return the correct `ModalMessage` type [unreleased]: https://github.com/shopify/easdk/compare/v0.1.4...HEAD [v0.1.4]: https://github.com/shopify/easdk/compare/v0.1.3...v0.1.4 [v0.1.3]: https://github.com/shopify/easdk/compare/v0.1.1...v0.1.3 [v0.1.1]: https://github.com/shopify/easdk/compare/v0.1.0...v0.1.1 [v0.1.0]: https://github.com/shopify/easdk/compare/v0.0.18...v0.1.0 [v0.0.18]: https://github.com/shopify/easdk/compare/v0.0.17...v0.0.18 [v0.0.17]: https://github.com/shopify/easdk/compare/v0.0.16...v0.0.17 [v0.0.16]: https://github.com/shopify/easdk/compare/v0.0.15...v0.0.16 [v0.0.15]: https://github.com/shopify/easdk/compare/v0.0.14...v0.0.15 [v0.0.14]: https://github.com/shopify/easdk/compare/v0.0.13...v0.0.14 [v0.0.13]: https://github.com/shopify/easdk/compare/v0.0.12...v0.0.13 [v0.0.12]: https://github.com/shopify/easdk/compare/v0.0.11...v0.0.12 [v0.0.11]: https://github.com/shopify/easdk/compare/v0.0.10...v0.0.11 [v0.0.10]: https://github.com/shopify/easdk/compare/v0.0.9...v0.0.10 [v0.0.9]: https://github.com/shopify/easdk/compare/v0.0.8...v0.0.9 [v0.0.8]: https://github.com/shopify/easdk/compare/v0.0.7...v0.0.8 [v0.0.7]: https://github.com/shopify/easdk/compare/0f328b35a5a4ac06202e768e46a153c1df922593...v0.0.7