* Add onBeforeUnload handler to prevent accidental refresh
* Update button messages
* Fix exit form not working after submit
* Make onBeforeUnload disable if env is development
* Fix onClose
* Remove internal date time field state
* Update messages and dialog
* Prevent navigation on 400 error
* Add submit disabled ref in exit form
* Update exit form dialog for disabled save
* Update confirmLeave forms to set ref if save is disabled
* Remove unused error handling
* Remove explicit ref type
* Remove unused import
* Fix disabled type
* Add disable check function to generic forms
* Add custom isDisabled method to sale and voucher forms
* Add default isDisabled functions to confirmLeave forms
* Update tests
* Remove unused code
* Rebase fixes + update tests
* Refactor form and useform
* Refactor disabling forms
* Change "saveDisabled" name to "isSaveDisabled" for improved readability
* Change "isDisabled" function to "checkIfSaveIsDisabled"
* Update exit form disabling conditions for zone rates forms
* Use generated hooks in apps
* Remove unused files
* Use proper types in apps
* Use generated hooks in attributes
* Use generated hooks in auth module
* Use generated hooks in categories
* Use generated hooks in channels
* Use generated types in collections
* Remove legacy types from background tasks
* Use generated hooks in customers
* Use generated hooks in discounts
* Use generated hook in file upload
* Use generated types in gift cards
* Use generated types in home
* Use generated hooks in navigation
* Use generated hooks in orders
* Use generated hooks in pages
* Use generated hooks in page types
* Use generated hooks in permission groups
* Use generated hooks in plugins
* Use generated hooks in products
* Use fragment to mark product variants
* Improve code a bit
* Use generated hooks in page types
* Use generated types in searches
* Use generated hooks in shipping
* Use generated hooks in site settings
* Use generated hooks in staff members
* Use generated hooks in taxes
* Place all gql generated files in one directory
* Use generated hooks in translations
* Use global types from new generated module
* Use generated hooks in warehouses
* Use generated hooks in webhooks
* Use generated fragment types
* Unclutter types
* Remove hoc components
* Split hooks and types
* Fetch introspection file
* Delete obsolete schema file
* Fix rebase artifacts
* Fix autoreplace
* Fix auth provider tests
* Fix urls
* Remove leftover types
* Fix rebase artifacts
* Add Exit form prompt component and change some minor styles in other components to match
* Add Exit form prompt provider
* Adjust generic form and useform hook to allow using exit form prompt provider
* Add exit form prompt provider to index
* wip
* Fix types
* Fix styling
* Fix types
* Revert warehouse details refactor
* Add handling of edge cases to exit prompt
* Refactor, add comments, fix some types
* Refactor after exit form dialog name change
* fix types
* Fixes after review
* Add default value for useform prop opts so the app doesn't crash
* Add missing category prop to getting initial data for category details form
* Add exit dialog to everywhere WIP (#1600)
* Add Exit form prompt component and change some minor styles in other components to match
* Add Exit form prompt provider
* Adjust generic form and useform hook to allow using exit form prompt provider
* Add exit form prompt provider to index
* wip
* Fix types
* Fix styling
* Fix types
* Revert warehouse details refactor
* Add handling of edge cases to exit prompt
* Refactor, add comments, fix some types
* Refactor after exit form dialog name change
* fix types
* Add CommonUseFormResultWithHandlers type for later use and refactor handleFormSubmit util
* Refactor login form not to use custom form since it doesn't need to
* Add exit form dialog to order refund page
* Add exit form dialog to order return page
* Add exit form dialog to order order settings page
* Add exit form dialog to product variant page
* Add exit form dialog to product create page
* Add exit form dialog to product update page
* Add exit form dialog to product variant create page
* Fix confirm leave prop passing in generic Form
* Add util function to handle for submit to extract errors
* Add confirmLeave prop to generic forms
* Move handleChange for custom forms to useForm
* Add exit dialog to more forms
* Add extract mutation errors util function
* Add extracting errors to submit functions that use metadata create handler
* Fix typo
* Add missing category prop to getting initial data for category details form
* Fix types
* wip
* wip
* wip
* wip
* Fix types & refactor
* Fix types & refactor
* Fix typescript
* Fix unmatching tag
* Fixes
* Add handling of multiple forms at once to exit dirty form provider
* Change all usages of ExitFormDialogContext to designated hook
* wip
* wip
* wip
* Fix types wip
* Fix types
* Remove console logs
* Add isSubmitting prop to exit form dialog in order to avoid enabling exit dialog while submit is still in progresS
* Replace handleSubmit global util with a hook to use exit form dialog props inside
* Move useHandleSubmit to general hooks dir, update imports
* Small fixes
* Update snapshots
* Fix types
* Small fixes due to extensive rebase
* Update package lock
* Fixes after rebase
* Remove exit form from customer address dialog
* Fix types and update messages
* Fix types
* Change imports names
* Refactor
* Remove unnecessary console.log
* Update types, snapshots. etc after rebase
* Update schema
* refactor(shippingMethods): change name from availableShippingMethods to shippingMethod
* refactor(shippingMethods): change shippingMethod to shippingMethodType
* Add missing files
* refactor(order): add active and message prop to the shippingMethod field
* Add support for new webhook types
* refactor(OrderShippingMethodEditDialog): show inactive shipping method as disabled
* refactor(SingleSelectField): change the disabled prop strictly boolean
Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
* refactor(OrderShippingMethodEditDialog): remove unused style
Co-authored-by: Michal Zajac <michal.99.zajac@gmail.com>
Co-authored-by: Michal Zajac <50200782+Michal99Zajac@users.noreply.github.com>
Co-authored-by: Dominik Żegleń <flesz3@o2.pl>
* Replace withStyleswith useStyles (#1100)
* Replace withStyleswith useStyles
* Update messages
* Use rem as a spacing unit (#1101)
* Use rems as spacing units
* Fix visual bugs
* Update stories
* Use macaw-ui as theme provider (#1108)
* Use macaw ui as a theme provider
* Add react-dom to aliases
* Fix jest module resolution
* Update useTheme hook usage
* Fix test wrapper
* Use macaw from git repo
* Fix CI
* Update stories
* Fix aliasing
* Extract savebar to macaw ui (#1146)
* wip
* Use savebar from macaw
* Use confirm button from macaw
* Improve file structure
* Use sidebar context from macaw
* Update macaw
* Update macaw version
* Remove savebar from storybook
* Update stories
* Use alerts and notifications from macaw (#1166)
* Use alerts from macaw
* Add notifications from macaw
* Update stories
* Pin macaw version
* Encapsulate limit reached in one component
* Remove unused imports
* Use backlinks from macaw (#1183)
* Use backlink from macaw
* Update macaw version
* Use macaw sidebar (#1148)
* Use sidebar from macaw
* Use shipped logo
* Use lowercase
* Update stories
* Use user chip from macaw (#1191)
* Use user chip from macaw
* Use dedicated components for menu items
* Simplify code
* Bump version and fix types (#1210)
* Rename onBack to onClick
* Rename UserChip to UserChipMenu
* Rename IMenuItem to SidebarMenuItem
* Update macaw version
* Fix tables after changes in macaw (#1220)
* Update macaw version
* Update changelog
* Update stories
* Fix after rebase
* Update to macaw 0.2.0
* Lint files
* Update macaw to 0.2.2
* Add naked input option to SingleAutocompleteSelectField and update it's stories
* Add new icons - chevron up, down & trash
* Add deletable item component and stories
* Add card add items footer component to be used in warehouses and product stocks assign
* Update schema and types
* Add shipping zones card components
* Update channel details page form to also include shipping zones
* Update makeTopLevelSearch hook files directory and add getSearchFetchMoreProps function to avoid extracting it manually every time
* Update channels types & fragments
* Move getDefaultNotifierSuccessErrorData function to useNotifier utils, update dir etc., also make order discount provider use it from the new dir
* Add shippinh zone to channel update and create and add shipping zone search
* Update messages
* Fix types
* Fix lint, types etc
* Small refactor from review and quick fix styles of shipping zones card
* Refactor a bit and update snapshots
* Refactor a bit and update snapshots
* Addd / refactor channels availability components
* Add useChannelsWithProductVariants hook with utils and types
* Add / refactor more channels availability components
* Move avatar from table cell avatar to separate component for it to be usable outside of tables
* Add channels with variants logic to product create and update pages & views
* Refactor components to use updated channels availability components
* Remove unnecessary comments
* Update storybook
* Update types
* Update messages
* Fix prices for variants / simple product not uodating properly
* Post merge cleanup, update schema, types, etc.
* Change shipping zone details warehouses card into settings card and add ability to assign channels to shipping zone
* Update types
* Update snapshots
* Fix selecting / deselecting all channels in channels with variants modal
* Fixes after review, some types changes etc.
* Update snapshots
* Small types fixes
* Make price rates views use parent shipping method channels instead of all
* Make price rates views use parent shipping method channels instead of all
* Update types
* Fix bugs
* Fixes after review
* Fix channels availability data submission
* Fix lint
* Fix variant pricing card showing not related channels
* Fixes after review
* Fix types
* Hide unaviable variants in add products to draft order dialog
* Fix channels with variants availability modal showing confirm button as enabled when it shouldn't
* Fix types
* Update semi checked icon to match old designs
* Update types
* Update channels icon in channels with variants availability
* Fix product cypress test after product channels mutation changed
* Fix trash and chevron down colors in dark mode
* Fix shipping zones card footer not updating query after click away
* Fix types in schema, add condition not to display shipping zones select in channel details if all zones have already been selected
* Fix products adding in order draft dialog
* Fix simple productupdate
* Update snapshots after merge with master
* Update messages
* Fix product api request for cypress
* Add missing test id
* Fix selecting if product is simple -> form being submitted with empty data sometimes
* Update snapshots, messages and add fix for invalid date at product update
* Remove unnecessary imports
* Fix failing test in saleor 2552 (#1061)
* fix
* fix
* fix
Co-authored-by: Jakub Majorek <majorek.jakub@gmail.com>
Co-authored-by: Karolina <rakoczy.karolina@gmail.com>
* Temporary merged schema and types update
* Update typing for zipCodeRules -> postalCodeRules
* Refactor zipCodes to postalCodes
* Fix new schema webhooks
* Delete postal code unassign dialog
* Query inclusion type from backend
* Clean up schema from old mutations
* Proper new mutations structure, all postal code related changes
* Linter changes
* Fix bug with save not being refreshed after codes are added / deleted / inclusion change
* Tests and translations
* Fix warnings across app, minor variables refactor
* Linting
* Trigger deployment
* CR changes, cleanups and refactors
* Update snapshots
* Resolve bug with radio not shows correct value on page refresh
* Fix price and weight creation of codes
* Reducer
* Revert "Reducer"
This reverts commit 07a3aed9c88332bde7d9be61b6dbc29e34e4edba.
* Add shipping delivery days
* Update changelog with shipping delivery days
* Update data-test and messages
* Add shipping delivery days to shipping rate create page
* Update shipping test snapshots
* Make max delivery time of shipping optional
* Add public and private metadata to shipping zones
* Update initial form
* Fix types
* Update types for metadata in shipping method
* Filter typename of metadata
* Fix price shipping method metadata
* Fetch metadata in weight rate update
* Update storybook
* Clean up stories
* Add missing props
* Add zip codes section (#861)
* Add zip code listing
* Add list wrapping
* Update snapshots
* Set up API data
* Fix lgtm warning
* Update snapshots
* Run Actions on all PR
* Checks on PR
* Test envs on PR
* Cleanup action on PR
* Update messages
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
* Allow zip codes to be assigned to shipping method
* Add zip code deletion (#871)
* Add zip code range dialog
* Fix path management
* Use query params to handle modal actions
* Allow zip codes to be assigned to shipping method
* Make params optional
* Fix types
* Clean up urls
* Add zip code range delete action
* Update snapshots and messages
* Update schema
* Refresh zip code list after assigning them
* Update types and snapshots
* Update snapshots
* Fix error message, checkbox default value (#880)
* Fix error message, checkbox default value
* Update snapshots
* Update schema and types
* Update stories
* add excluded products section in shipping methods views
* create UnassignDialog component
* use priceRangeFragment in shipping queries
* remove unneeded price from ShippingMethodAddProductsDialog
* update messages in ShippingMethodProducts
* updates after rebase
* update snapshots, fix lint errors
* fix ShippingMethodProductsAddDialog
* update snapshots
* small fix in ShippingMethodProducts
* update snapshots after rebase
* add handleClose func in ShippingMethodProductsAddDialog
* Fix metadata not showing in category update
* update snapshots again
* update ShippingMethodProductsAddDialog
* updates after rebase
* update Price and Weight rates views
Co-authored-by: dominik-zeglen <flesz3@o2.pl>
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
Co-authored-by: Tomasz Szymański <lime129@gmail.com>
Co-authored-by: Magdalena Markusik <magdalena.markusik@mirumee.com>
* Clean up stories
* Add missing props
* Add zip codes section (#861)
* Add zip code listing
* Add list wrapping
* Update snapshots
* Set up API data
* Fix lgtm warning
* Update snapshots
* Run Actions on all PR
* Checks on PR
* Test envs on PR
* Cleanup action on PR
* Update messages
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
* Add zip code range dialog
* Fix path management
* Use query params to handle modal actions
* Allow zip codes to be assigned to shipping method
* Make params optional
* Fix types
* Add zip code deletion (#871)
* Add zip code range dialog
* Fix path management
* Use query params to handle modal actions
* Allow zip codes to be assigned to shipping method
* Make params optional
* Fix types
* Clean up urls
* Add zip code range delete action
* Update snapshots and messages
* Update testing and changelog
* Update schema
* Simplify code
* Refresh zip code list after assigning them
* Update view after zip code deletion
* Update types and snapshots
* Update snapshots
* Fix error message, checkbox default value (#880)
* Fix error message, checkbox default value
* Update snapshots
* Use price instead of weight variant
* Update schema and types
* Hide exclude/include zip codes section
* Update stories
Co-authored-by: Krzysztof Wolski <krzysztof.k.wolski@gmail.com>
Co-authored-by: Tomasz Szymański <lime129@gmail.com>