saleor-dashboard/src/components
Dominik Żegleń 31e0c11fea
New datagrid view for product variant management (#2162)
* New datagrid view for product variant management (#2040)

* Split simple and product with variants updates

* Simplify code

* Change selectedVariantsIds to availableVariants

selectedVariantsIds suggested that these variants *were just* selected

* Add datagrid component

Add datagrid component

Add actions column

Add column picker

Add ts-ignore comment

Remove unused import

Fix after rebase

Add story

Fix column picking

Fix column dragging

Add column resizing

Extract components to own files

Apply styles from class

Improve data storage

Extract state to hook

Expose handlers

Fix styles

Fix header overflow

Add select all option

Add cell types

Fix types

Add number type cell

Add min to stocks

Fix types

Generate columns from shop data

Add number type editor

Fix tests

Update src/components/Datagrid/Datagrid.tsx

Co-authored-by: Jonatan Witoszek <jonatanwitoszek@gmail.com>

Reconstruct data after column toggling

Minor fixes

Add missing id

Remove unused import

Fix container width

Keep changes in state

Drop onChange usage

Use glide datagrid

* Add column picker

* Memoize callbacks

* Add right toolbar

* Make toolbar as prop

* Clean up code

* Fix styling

* Lint files

* Save variant data in datagrid (#2161)

* Allow rows to be deleted

* Add row adding

* Clean up code

* Improve mutations

* Add stock saving

* Add sku and attribute saving

* Display notification after all mutations

* Fix types

* Save channels in datagrid (#2197)

* wip

* Merge simple and variantable handlers

* Move channel setting to form

* Link availability card to form

* Extract listing management to hook

* Update only touched channels

* Improve channel listing managemend

* Display channel data in datagrid

* Save variant channels

* Save changes in channel listings

* Group columns

* Fix types

* Display touched fields

* Return errors from hook

* Display errors in cells

* Improve naming

* Improve naming

* Use reliable called/loading state

* Update src/components/Datagrid/cells.ts

Co-authored-by: Michał Droń <dron.official@yahoo.com>

* Apply fixes from review

Co-authored-by: Michał Droń <dron.official@yahoo.com>

* Fix type error

* Trigger CI

* Trigger CI

* Save added and deleted variants (#2237)

* Save new variants

* Update channel data

* Remove bulk variant delete dialog

* Do not fetch products from api after save

* Extract types

* Reset errors after api response

* Display error when creating variants

* Fix variant reordering

* Remove commented code

* Fix imports

* Edit attributes in datagrid (#2305)

* Add basic dropdown cell

* Fix clickaway

* Add choice customization

* Add callback to fetch choices

* Add attriute value search

* wip

* Pass getSuggestions cb using props

* Fix row adding

* Fix choice creation

* Add styles to datagrid (#2315)

* Improve cell styling

* Prevent navigation when scrolling horizontally

* Fix text editor styles

* Remove unused variable

* Update whole row after editing cell

* Translate column names

* Improve empty message

* Highlight newly created rows

* Add name editing

* Add disabled context menu to added rows

* Add column groups

* Translate column groups names

* Save edited name

* Fix missing column id error

* Add card to datagrid

* Improve shadow on scroll

* Improve fonts

* Fix toolbar placement

* Update api type definitions

* Fix copypasting from excel

* Fix editor font weight

* Improve dark theme

* Improve cell coloring

* Drop styling from story

* Add docs to datagrid (#2339)

* Add docs

* Add summary

* Datagrid fix bugs (#2341)

* Pass refetch to form to avoid double calls

* Add missing prop

* Remove paddings (#2352)

* remove paddings

* remove paddings

* remove paddings

* remove vertical scroll

* update tests

* styles, currency

* Fix variants tests in datagrid (#2365)

* refactor variant test after adding datagrid

* adding assertion to check if datagrid table is visible

* adding check for datagrid

* fix flaky tests in variants

* fix flaky tests in variants

* small changes

* amedments

* update styles

* refactoring, handle prices

* update snapshots

* messages

* snap

* scrolling handle, css for safari

* snap, random mock

* update overflow

* history back hook

* fix cross-price changing, scroll optimization

* trigger ci

* channel checking when adding new variant

Co-authored-by: Michał Droń <dron.official@yahoo.com>
Co-authored-by: Patryk Andrzejewski <vox3r69@gmail.com>
Co-authored-by: Ewa Czerniak <ewa.czerniak@saleor.io>
2022-10-18 11:10:15 +02:00
..
Accordion Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AccountPermissionGroups Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AccountPermissions Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ActionDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AddressEdit Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AddressFormatter Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Alert Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AppLayout Revert "Update React to 17 and update related packages (#2344)" (#2367) 2022-10-11 12:01:17 +02:00
AssignAttributeDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AssignAttributeValueDialog Add product variant reference attribute (#2268) 2022-09-13 12:07:41 +02:00
AssignCategoryDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AssignCollectionDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AssignContainerDialog Drop "manage products" permission requirement to view orders (#2248) 2022-08-25 10:35:07 +02:00
AssignProductDialog fix assign modal when we no pass selectedids (#2330) 2022-09-22 13:44:06 +02:00
AssignVariantDialog Add product variant reference attribute (#2268) 2022-09-13 12:07:41 +02:00
Attributes Add format tip for text attribute rows (#2340) 2022-10-13 12:41:26 +02:00
AttributeUnassignDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
AutocompleteSelectMenu Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Backlink Use links instead of onClick navigate function (#1969) 2022-05-06 10:59:55 +02:00
BulkAttributeUnassignDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Button Use links instead of onClick navigate function (#1969) 2022-05-06 10:59:55 +02:00
ButtonWithSelect Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
CardMenu New datagrid view for product variant management (#2162) 2022-10-18 11:10:15 +02:00
CardTitle ESLint: No unused variables (#1981) 2022-10-04 13:30:51 +02:00
ChannelsAvailability Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ChannelsAvailabilityCard New datagrid view for product variant management (#2162) 2022-10-18 11:10:15 +02:00
ChannelsAvailabilityContent Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ChannelsAvailabilityDialog Add UI to enable channel listing in variants view (#2303) 2022-09-22 12:00:13 +02:00
ChannelsAvailabilityDialogChannelsList Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ChannelsAvailabilityDialogWrapper Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ChannelsAvailabilityDropdown Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ChannelsAvailabilityMenuContent Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Checkbox firefox checkbox overlap workaround (#2329) 2022-09-28 15:14:31 +02:00
Chip Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
CollectionWithDividers Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ColorPicker ESLint: No unused variables (#1981) 2022-10-04 13:30:51 +02:00
ColumnPicker New datagrid view for product variant management (#2162) 2022-10-18 11:10:15 +02:00
CompanyAddressInput Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
CountryList Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
CreatorSteps Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Datagrid New datagrid view for product variant management (#2162) 2022-10-18 11:10:15 +02:00
Date Fix sales/voucher page styles and fix date tooltips styles (#2154) 2022-07-19 13:58:00 +02:00
DeletableItem Bump macaw to 0.3 (#1807) 2022-01-28 13:34:20 +01:00
DeleteButton Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
DeleteFilterTabDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
DeleteIconButton Bump macaw to 0.3 (#1807) 2022-01-28 13:34:20 +01:00
DemoBanner Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
DiscountedPrice Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
EditableTableCell Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ErrorMessageCard Use esbuild-loader (#1983) 2022-05-05 09:54:28 +02:00
ErrorNoticeBar Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ErrorPage Revert "Update React to 17 and update related packages (#2344)" (#2367) 2022-10-11 12:01:17 +02:00
ExtendedPageHeader Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ExternalLink Add rel=noopener to links that take users to external sites (#1980) 2022-10-04 14:28:26 +02:00
FileUploadField Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Filter Fix numeric attribute filters (#2145) 2022-08-01 11:39:20 +02:00
FilterBar Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
FilterCard Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Form Fix exit form dialog false positive (#2311) 2022-09-16 16:16:26 +02:00
Grid New datagrid view for product variant management (#2162) 2022-10-18 11:10:15 +02:00
IconButton Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
IconButtonTableCell Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ImageUpload Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
InternalLink Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
LanguageSwitch Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
LinkChoice Fix dropdown buttons styles (#2151) 2022-07-19 16:10:10 +02:00
Locale Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
MediaTile Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
messages Fix overflowing error notifications (#2286) 2022-09-12 14:54:26 +02:00
Metadata Revert "Update React to 17 and update related packages (#2344)" (#2367) 2022-10-11 12:01:17 +02:00
Money Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
MoneyRange Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
MultiAutocompleteSelectField Fix dropdown select arrow clicks bugs (#2301) 2022-09-23 13:39:25 +02:00
MultiSelectField Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Navigator Revert "Update React to 17 and update related packages (#2344)" (#2367) 2022-10-11 12:01:17 +02:00
NavigatorButton Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
NotFoundPage Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
PageHeader Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
PageSectionHeader Add stock reservation settings (#1459) 2021-10-13 14:35:00 +03:00
Percent Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
PhoneField Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
PreviewPill Minor fixes to gift card list (#2218) 2022-08-18 12:50:09 +02:00
PriceField New datagrid view for product variant management (#2162) 2022-10-18 11:10:15 +02:00
RadioGroupField Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
RadioSwitchField Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ResponsiveTable Handle errors on finalizing draft order (#2191) 2022-08-10 10:11:32 +01:00
RichTextEditor ESLint: No unused variables (#1981) 2022-10-04 13:30:51 +02:00
RowNumberSelect Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
SaveFilterTabDialog Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
SearchBar Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
SeoForm Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Shop prevent duplicated queries (channels, siteinfo) (#2343) 2022-10-06 13:46:23 +02:00
SingleAutocompleteSelectField New datagrid view for product variant management (#2162) 2022-10-18 11:10:15 +02:00
SingleSelectField Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
SortableChip Make sortable chips accessible (#2175) 2022-07-29 18:47:09 +02:00
SortableChipsField Make sortable chips accessible (#2175) 2022-07-29 18:47:09 +02:00
SortableTable Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Tab Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
TableButtonWrapper ESLint: No unused variables (#1981) 2022-10-04 13:30:51 +02:00
TableCellAvatar Revert "Update React to 17 and update related packages (#2344)" (#2367) 2022-10-11 12:01:17 +02:00
TableCellHeader ESLint: No unused variables (#1981) 2022-10-04 13:30:51 +02:00
TableFilter Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
TableHead Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
TablePagination Minor fixes to gift card list (#2218) 2022-08-18 12:50:09 +02:00
TableRowLink Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
TextFieldWithChoice Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
TextWithSelectField Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Timeline Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Timezone Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
TooltipTableCellHeader Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
TypeDeleteWarningDialog Revert "Update React to 17 and update related packages (#2344)" (#2367) 2022-10-11 12:01:17 +02:00
UserChip Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
VersionInfo Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
VisibilityCard Update product and page default availability settings (#2165) 2022-08-22 14:53:17 +01:00
Weight Use esbuild-loader (#1983) 2022-05-05 09:54:28 +02:00
WeightRange Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
WindowTitle Add circleci config and enhance our linters (#519) 2020-05-14 11:30:32 +02:00
BackButton.tsx Use links instead of onClick navigate function (#1969) 2022-05-06 10:59:55 +02:00
CardSpacer.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ConfirmButton.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Container.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
ControlledCheckbox.tsx add tests for creating vouchers for 3.1 (#1844) 2022-02-11 15:39:10 +01:00
ControlledSwitch.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
DateTimeField.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
DateTimeTimezoneField.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Debounce.tsx Update @material-ui to v4 2019-11-07 14:29:07 +01:00
DebounceForm.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Dropzone.tsx Update from saleor/master 2019-08-09 13:14:35 +02:00
FormSpacer.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Hr.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
LimitReachedAlert.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Link.tsx Add rel=noopener to links that take users to external sites (#1980) 2022-10-04 14:28:26 +02:00
MenuToggle.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
RequirePermissions.tsx Hide shipping zones when you do not have access (#2333) 2022-09-29 10:40:19 +02:00
Savebar.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00
Skeleton.tsx Add trailing commas (#2062) 2022-06-21 11:36:55 +02:00