Commit Graph

942 Commits

Author SHA1 Message Date
Moon 0d67a6aaf1
Migrate Table component to TS (#36370)
* Migrate table component to TS

* Revert pnpm-lock to orig

* Revert pnpm-lock to orig

* Fix eslint errors

* Update packages/js/components/src/table/empty.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/table/empty.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Remove unnecessary empty space and convert comment stlye

* Update packages/js/components/src/table/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Remove unnecessary type casting

* Type defaultOnQueryChange func correctly

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-19 13:05:12 -08:00
Maikel David Pérez Gómez eca891df09
Create tree-control component (#36432) 2023-01-19 13:59:08 -05:00
Joel Thiessen 2fae3537a7
Experimental SlotContext for managing slot fill interactions (#36333)
* Adding Slotcontext component and adding support to product slot fill components

* Passing inject props correctly to non-function components.
2023-01-19 05:52:45 -04:00
louwie17 fc1745b03b
Add/36075 render fields sections from php config (#36414)
* Add initial component to auto load fills from API config

* Add changelog

* Update logic to make use of new store and re-usable components

* Add changelog

* Add loading state for product form data to add/edit product pages
2023-01-19 04:52:02 -04:00
Joshua T Flowers 1337a6d36e
Add product tour to new product management experience (#36428)
* Add product tour container and modal

* Fix modal open class name

* Add product tour

* Add changelog entry

* Move product tour state logic into hook

* Fix tour selectors for pricing and actions

* Add tests around product tour container

* Add tests around useProductTour hook

* Make tour responsive

* Use tabs instead of spaces

* Fix more scss lint errors

* Remove extra whitespace
2023-01-18 11:11:02 -08:00
Chi-Hsuan Huang e9a4d6c9ba
Add an optional "InputProps" to experimental SelectControl component (#36470)
* Add inputProps to experimental SelectControl component so we can pass custom props to the input

* Add changelog
2023-01-18 11:56:33 +08:00
Joel Thiessen d9daad3e9c
Converting product details section to utilize slot fills (#36368)
* Working prototype of product details via slotfill

* Raising default order for product slot-fills

* Move logic to details field name component

* Adding order prop to all fills.

* Adding components changelog

* Adding changelog

* Deleting obsolete product details section files

* Reducing spacing between slot filled fields
2023-01-17 05:04:58 -04:00
louwie17 8fc9c5cc09
Add basic fields for rendering of Product MVP (#36392) 2023-01-16 12:50:30 -08:00
Joshua T Flowers 0d6af37a66
Add requesting state, actions, and selectors to CRUD data stores (#36297)
* Add requesting state, actions, and selectors to CRUD data stores

* Allow resource specific selectors for requesting status

* Use constants for action names in reducer

* Add tests around new utils

* Add changelog entry

* Use getResourceName instead of getRequestKey in reducer

* Rename and use getRequestIdentifier to avoid ambiguity with resource names

* Sanitize and replace ID query with key in resolution selectors

* Fix up crud action names and remove camel casing

* Fix missing ID in ID query check

* Fix up tests around request identifier

* Add additional tests around utils

* Clean up imports

* Add missing selectors to tests
2023-01-16 07:54:33 -08:00
Joel Thiessen 2dce575449
Adding ProductForm data store (#36430)
* Removing overriding functions in Section.php

* Adding changelog

* Adding product form data store

* Adding data package changelog
2023-01-16 08:13:55 -04:00
Moon c3d62f113a
Migrate product image component to TS (#36305)
* Convert product-image to ts

* Add changelog

* Remove unused ts-expect-error

* Allow arbitrary properties for product

* Remove propTypes

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/product-image/index.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Remove unused import

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 19:19:01 -08:00
Moon 4ff99a8555
Migrate Section component to TS (#36298)
* Convert to ts

* Add changelog

* Fix style

* Remove propTypes

* Remove unused import

* Only allow false

* Update packages/js/components/src/section/section.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/section/section.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

* Update packages/js/components/src/section/section.tsx

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 13:57:15 -08:00
louwie17 b8c25b49bf
Initial product form field store (#36362)
* Add initial product fields registry store and helper functions

* Add changelog

* Change edit to render and address PR feedback

* Make use of memoize-one instead of rememo as memoize-one is already installed
2023-01-12 04:02:35 -04:00
Matt Harrison e588c560bf
Update spelling of Cancelled to Canceled for US English. (#36294)
* Update spelling of Cancelled to Canceled for US English.

This only updates output display text that uses US English. All code that uses
the form Cancelled is unchanged and is perfectly fine to stay as Cancelled.
(since it is behind the scenes and would require changes in other plugins)

For languages where Cancelled is preferred such as UK English the approprate
form can be applied in the translation files.

Fixes https://github.com/woocommerce/woocommerce/issues/25847

* add changelog file

* Update plugins/woocommerce/tests/api-core-tests/tests/settings/settings-crud.test.js

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>

Co-authored-by: Chi-Hsuan Huang <chihsuan.tw@gmail.com>
2023-01-12 12:13:36 +08:00
Joel Thiessen 6e428201c1
Adding WooProductSectionItem slotfill (#36331) 2023-01-11 10:00:20 -08:00
Maikel David Pérez Gómez 8bada412d4
Product variations should inherit parent product properties (#36234)
Remove manage_stock 'parent' value before saving the variation
2023-01-11 11:41:25 -03:00
Miguel Pérez Pellicer ef3d15fcd4
Make secondQuestion and title params optional in CES Prompt (#36270)
* Set secondQuestion and title as optional

* Update docs and changelog

* Fixes after review
2023-01-11 18:53:36 +07:00
Joel Thiessen f429b9444c
Adding WooProductFieldItem slotfill (#36315) 2023-01-10 10:13:02 -08:00
RJ 4927a2e412
dev: migrate @woocommerce/components/link to ts (#36285) 2023-01-10 19:12:22 +08:00
Roy Ho aca46fb7d1
Dev/woo ext/components (#36328)
* Add woo components and lock wp scripts dep

* Add some example usage of Woo components

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

* Update packages/js/create-woo-extension/src/index.js.mustache

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>

Co-authored-by: jonathansadowski <jonathansadowski@users.noreply.github.com>
2023-01-06 14:04:08 -08:00
Maikel David Pérez Gómez 1ab678c13f
Include tax options in pricing section (#36299)
* Add Charge sales tax on sub section to pricing section when enable taxes is set to yes

* Add tax classes datastore

* Load tax classes in pricing section

* Set empty value when tax class is standard rate

* Add changelog files

* Add custom resolver to use slug as id for tax classes

* Add helper text and learn more link to tax class radio group
2023-01-06 09:41:45 -03:00
Fernando Marichal a9005c58f0
Fix moving list item also moves image gallery item (#36262)
* Fix list id

# Conflicts:
#	pnpm-lock.yaml

* Add changelog

* Add package changelog

* Remove changelog

* Add `-` between the item `index` and `id`

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-06 08:53:33 -03:00
Chi-Hsuan Huang 2d4f62be7a
Migrate Tag component to TS (#36265)
* Migrate Tag components's tests and stories to TS

* Migrate tag component to TS

* Add changelog

* Fix prop types

* Remove jsdoc, proptype and add inline ts comments

* Remove unused import
2023-01-06 10:48:03 +08:00
Joshua T Flowers 8b905b92c0
Allow product tab navigation without prompting for unsaved changes (#36235)
* Add callback to confirm whether or not the prevent leaving page prompt should trigger

* Move prevent leaving logic to util and add tests

* Add changelog entry

* Add navigation changelog entry

* Fix WooCommerce data mock

* Revert desctructuring of nav properties
2023-01-05 18:30:36 -08:00
Vedanshu Jain f36a16cd06
Update changelogger to 3.3.0 to support PR number capturing with merge (#36266)
* Update changelogger.

* Add changelog.

* Update changelogger for all packages.

* Add changelogs.

* Update changelog for remaining packages.
2023-01-05 14:42:51 +05:30
github-actions[bot] 216a7505df
Prepare Packages for Release (#36210)
Automated change: Prep @woocommerce/components for release.

Co-authored-by: puntope <puntope@users.noreply.github.com>
2023-01-03 18:53:06 +07:00
Paul Sealock f557c44a0d
Create Woo Extension: Update Readme (#36156) 2023-01-03 07:03:44 +13:00
Chi-Hsuan Huang 9f0d718a33
Cleanup product task experiment (#35950)
* Cleanup product task experiment

* Rename experimental-products -> products

* Add changelog

* Clean up product task experiment in woo/onboarding

Remove product variant

* Rename experimental-import-products -> import-products

* Clean up OnboardingTasks.php

* Add changelog

* Remove experimental-products-task feature flag
2022-12-28 16:08:54 +08:00
Miguel Pérez Pellicer b133ad98c7
Add noDataLabel into Table component allowing to customise No Data Label message. (#36124)
* Add noDataLabel property to allow No Data Message customization

* Adding changelog

* Update variable name

* Add story book use case
2022-12-28 12:31:35 +07:00
Joshua T Flowers 5137973d91
Add product variation header actions and persistence (#36155)
* Fix up updateItem query in CRUD data store

* Add product variation form header

* Fix gaps for variation and parent product actions

* Hide preview button on mobile for product variations

* Add changelog entry

* Add data package changelog entry

* Fix lint errors
2022-12-27 10:21:32 -08:00
Roy Ho d0e143a8bc
Dev/create woo extension/php cleanup (#36017)
* Clean up

* Add changelog
2022-12-26 07:07:11 -08:00
Gan Eng Chin 6382b4997c
Make `Table` component accept `className` prop (#36151) 2022-12-26 20:31:40 +08:00
Maikel David Pérez Gómez dd94bb78ee
Add product variation image (#36133)
* Convert getCheckboxTracks into generic function because of a type mismatch

* Add image to product variation and export types

* Add single image field

* Integrate SingleImageField in variation details section

* Add changelog file

* Add comment suggestions

* Fix set image onFileUploadChange
2022-12-23 10:28:44 -08:00
Maikel David Pérez Gómez bfa2d4f3a7
Product variation order should be persisted on save (#36109)
* Persist product variation order on product save

* Add batchUpdate to product variations datastore

* Add useVariationOrders hook to manage the ordering logic

* Add local ordering logic to variations field

* Persist variation orders on product save

* Add changelog file

* Add comments suggestions

* Add more comment seggestions
2022-12-22 16:01:51 -03:00
Joshua T Flowers 4b4fe7c227
Add product variation title to page header (#36085)
* Add method to get product variation title from data

* Conditionally add variation to page header

* Fix CRUD data store id query on selector

* Make getProductVariation calls and data types consistent to prevent multiple calls

* Add changelog entries

* Update product link type to avoid page refresh

* Expose function to truncate title to 32 character limit
2022-12-22 09:23:44 -08:00
Fernando Marichal a9986fe75e
Product variations - Set fixed height for card (#36053)
* Add className prop to Sortable

* Add styles

* Add `rows` class

* Add changelogs

* Remove `row-#` class

* Fix min-height

* Set task list item min height

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-12-22 09:03:07 -03:00
github-actions[bot] 4823a284dc
Prepare Packages for Release (#36084)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2022-12-20 21:33:51 +13:00
Paul Sealock 378d5f525e
Create Extension: Fix install scripts (#36067)
* Update install scripts

* changelog
2022-12-20 13:53:59 +13:00
Joshua T Flowers 1d251f217c
Extend product variations data store with generate variations actions (#36058)
* Allow extending of CRUD data stores

* Add generate action to product variations data store

* Add controls to storeConfig

* Update readme with additional store config args

* Move key to catch

* Add changelog entry
2022-12-19 12:45:43 -08:00
Paul Sealock 23299dbafd
Create Extension: Prep for initial release (#36002)
* Add initial changelog

* run changelog release prep tool

* revert package.json version bump
2022-12-19 07:31:26 +13:00
Moon 62a957c75d
Add aria-label for simple select dropdown in select-control component (#35808)
* Add aria-label for simple select dropdown

* Add changelog

* Use placeholder value

* Allow aria label prop and use label as a fallback

* Update test snapshot

* Add changelog
2022-12-16 09:55:55 -08:00
Joshua T Flowers d46a1045e8
Add product variation form and routes (#36033)
* Add route for editing product variation

* Fix up ID selector for getItem in CRUD data store

* Add product variation form

* Add changelog entries
2022-12-16 11:20:10 -03:00
Matt Sherman c94a5c6f4b
Refactor AttributeField into sub-components (#35997)
* Add className support to ListItem
* Refactor to extract AttributeListItem component
* Use AttributeListItem component in AttributeField
* Extract AttributeEmptyState from AttributeField
* Use AttributeEmptyState in AttributeField
* Add default value for label prop on AddAttributeListItem
* Add props for labels in AddAttributeModal
* Add props for labels in EditAttributeModal
2022-12-15 21:49:02 -05:00
Joel Thiessen 54f22aa437
Adding delayed spotlight to feedback button on current product page (#35865) 2022-12-15 16:09:21 -08:00
Maikel David Pérez Gómez 393cc629d9
Add pagination to variations list (#35979)
* Add changelog

* Add pagination to variations list

* Apply styles for pagination paddings and to keep it at the bottom of the section card

* Returning back per page option from 2 to 25

* Fix pagination label text from uppercase to normal and font styles

* Update variation footer gap

Co-authored-by: Joshua T Flowers <joshuatf@gmail.com>
2022-12-15 10:13:29 -03:00
Chi-Hsuan Huang 736395ba3a
Fix wcpay benefits UI padding (#35946)
* Fix wcpay benefits padding

* Add changelog
2022-12-15 19:47:36 +08:00
Paul Sealock 3d0e8d500d
Rename package from create-extension to create-woo-extension (#35947)
* Rename package from create-extension to create-woo-extension

* update lock file
2022-12-15 17:45:28 +13:00
Roy Ho d0a464520d
Add WC active validation (#35891) 2022-12-14 07:35:22 -08:00
louwie17 c7132ec8f0
Add/35126 ces exit prompt settings (#35761)
* Add exit settings page tracker

* Add exception for when user hits the save button

* Update settings and add icon support

* Add changelog

* Add dismiss track for when user dismisses CES modal

* Add changelog

* Add tests for staticFormDataToObject function

* Fix imports of test file
2022-12-14 10:55:12 -04:00
Joshua T Flowers e1aabf2d9d
Add product variations list to new product management experience (#35889)
* Add product variations section

* Add variations list

* Add util to get product stock status

* Add variation specific attribute type

* Add currency code to header column

* Fix up variations header width

* Add variations loading state

* Add changelog entries

* Convert spaces to tabs

* Fix status typo

* Fix up return type for stock status
2022-12-13 15:29:05 -08:00