Commit Graph

1074 Commits

Author SHA1 Message Date
Gan Eng Chin 34bd123448
Remove unused button-style mixins. 2023-03-29 19:06:40 +08:00
Chi-Hsuan Huang 19a119f0a8
Upstream changes from experimental-select-control back to @woocommerce/components (#36521)
* Add scrollIntoViewOnOpen and position props to menu

* Add ability to customize active item style

* Add menu toggle button

* Add changelog

* Fix changelog

* Rename toggle button classname

* Change default menu position

* Update toggle button story

* Add default value to getToggleButtonProps
2023-03-29 17:18:43 +08:00
Niels Lange 96a1e9cd7b
Update extend-cart-checkout-block dependency (#37191) 2023-03-29 09:39:46 +07:00
Joshua T Flowers 49cde4cad6
Content lock all blocks in the product editor (#37382)
* Lock all blocks in the product editor to content only

* Add changelog entry

* Add content role to summary field to allow editing

* Remove unused BlockControls
2023-03-28 15:18:00 -07:00
Christopher Allford 2f4f0bea54
Added Build File Caching (#37459)
Since these files can impact the build, we need to make sure to use
them as part of the cache key.
2023-03-28 12:48:20 -07:00
Matt Sherman 30ea6cfc71
Show spotlight when switching to variable product type (#37413)
* Show variable product tour
* Only show tour when product type is changed to variable
* Only show tour if it hasn't been shown before
* Add variable_product_tour_shown to UserPreferences type
* Store whether tour has been shown in user preferences
* Record Tracks events
* Add docblock for woocommerce_admin_get_user_data_fields filter
* Add test for tour
2023-03-28 13:49:40 -04:00
Matt Sherman eab7750208
Move product-editor CES-related components and utilities (#37131)
* Update package.json and lock file
* Move ProductMVPFeedbackModal to @woocommerce/product-editor
* Move ProductMVPFeedbackModalContainer to @woocommerce/product-editor
* Move ProductMVPCESFooter and useProductMVPCESFooter to @woocommerce/product-editor
* FIx mock of __experimentalUseProductMVPCESFooter in test
2023-03-28 13:38:08 -04:00
louwie17 bc42b853d8
Update product editor interpolate components (#37453)
* Remove use cases of `interpolateComponents`

* Remove from package json

* Add changelog
2023-03-28 04:15:17 -03:00
Niels Lange 9eeda1d853
Move .wp-env.json.mustache to root folder 2023-03-28 12:05:58 +07:00
Maikel David Pérez Gómez a5b104eaed
Add icon support to product section block (#37340)
* Add block icon component

* Use the block icon component within the section block

* Add changelog file

* Fix rebase conflicts

* Remove icon configuration from the client side

* Change the BlockIcon component to get the icon from the attributes first and then from the metadata

* Expose the BlockIcon to be used outside of the package

* Add the BlockIcon documentation

* Configure the block to support the new icon via attributes

* Set the icon to the block section in the server template definition

* Revert back index.tsx -> index.ts in the section block

* Fix php linter errors

* Add changelog file

* Fix php linter error

* Return null instead of a Fragment
2023-03-27 12:52:03 -03:00
Matt Sherman de111c1edb
Update TourKit README to correct primaryButton example and formatting (#37427) 2023-03-27 07:09:39 -04:00
Matt Sherman a77e4abffe
Emit error on webpack build when invalid export name used in import for JS (#37195) 2023-03-26 21:42:33 -04:00
Christopher Allford a8fff3175c
Fix TypeScript Incremental Build Regression (#37432) 2023-03-24 12:07:49 -07:00
Nathan Silveira 1f698d2583
Create experimental SelectTree component (#37319)
* Create a new experimental component TreeSelect
Add functionality to TreeControl to support additional scenarios

* Fix a bug where the shouldNotRecursivelySelect was not passed to Trees inside Tree Items

* Do not collapse nodes inside useEffect if they are already expanded

* Add storybook example for SelectTreeControl

* Move component to its own directory

* Remove wrong comment

* Fix CSS import path

* Remove getFilteredItems from select-tree

* Stop using getFilteredItems inside select tree
Create new shouldShowCreateButton prop to allow receiving only filtered items inside component
Remove support to show custom getItemLabel and getItemValue

* Change interface

* Rename back Item type names

* Rename back value

* Fix lint error and remove passing ref to treeProps

* Make id mandatory in SelectTree

* Refactor

* Improve selector to focus on create button
2023-03-24 14:49:45 -03:00
Christopher Allford 67cde87fd1
Enforce Strict `@types` Dependencies (#37351) 2023-03-23 18:02:20 -07:00
Christopher Allford 3d614cd862
Removed TypeScript Incremental Build Support (#37374) 2023-03-23 11:25:42 -07:00
Joshua T Flowers 562749b60a
Prevent duplicate registration of core blocks in client (#37350)
* Prevent duplicate registration of core blocks

* Add components changelog entry
2023-03-22 16:56:35 -07:00
Joel Thiessen 4ae467af9e
Adding more menu with items using slot fill (#37255)
* Refactored, adding slot fill, basic working via common components

* Pinning plugins dep

* More menu style tweaks

* Fixing merge issues

* Adding product header item slotfill to support more menu modal

* Fixing moved imports

* Adding changelogs

* Adding hover state for more menu toggle btn

* Fixing typo

* Refactoring to use WooHeaderItem instead of adding new slot-fill

* Removing unneeded fragment

* Adding admin layout changelog

* PR feedback

* Fix up lock file after rebase

---------

Co-authored-by: Joshua Flowers <joshuatf@gmail.com>
2023-03-22 07:30:06 -03:00
Joel Thiessen b8416d7948
Replacing multiple components on the product page with a single hook. (#37283)
* Replacing multiple componments on the product page with a single hook.

* Adding changelog

* Removed the conditional hook logic, because of React rule - Don’t call Hooks inside loops, conditions, or nested functions.

* Use promise for receiving entity, and reload template on product change

* Add changelog

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-22 04:48:55 -03:00
Matt Sherman b27f6023f8
Move remaining CES-related components to @woocommerce/customer-effort-score (#37316)
* Add @woocommerce/tracks to dev dependencies
* Move remaining CES-related components to @woocommerce/customer-effort-score
* Update imports in woocommerce/client/admin
2023-03-21 11:58:35 -04:00
Maikel David Pérez Gómez 62ca7a266b
Add the summary field to the product form (#37302)
* Add summary block

* Add changelog files

* Add text alignment

* Add RTL and type definitions

* Add justify text alignment

* Fix rebasing errors
2023-03-21 12:34:24 -03:00
Maikel David Pérez Gómez b9df0e09f0
Create a helper hook for field validation (#37196)
* Add custom hook to validate product fields within blocks

* Add changelog file

* Add unit tests

* Fix non working tests

* Fix linter errors

* Add changelog file

* Fix async validation rejection

* Solve conflicts after rebasing

* Revert false negative lint errors

* Move the hook to its own folder and add the readme.md file
2023-03-20 23:12:09 -03:00
Joel Thiessen edbe36d7ad
Adding collapsible content block with flexible rendering (#37305)
* Adding collapsible content block with flexible rendering

* Adding changelogs

* Move content inside display state to avoid backwards compat issues

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-20 18:18:44 -07:00
Chi-Hsuan Huang 7b10baff00
Add tracks for plugin installation and activation (#37261)
* Add @woocommerce/tracks to @woocommerce/data dependencies

* Add tracks for plugin actions and handle plugin error properly

* Add changelog

* Add doc

* Update doc
2023-03-20 10:38:30 +08:00
louwie17 345ad58919
Add product pricing block (#37211)
* Adding initial pricing block

* Have price block render in form

* Make sure price is loaded correctly and fix template rendering

* Make pricing block abstract and add list and sale price to template

* Add changelogs

* Revert changes in wc/data package

* Fix lint issues

* Fix type error

* Add styling

* Fix styling lint issues

* Revert config change missed in rebase

* Make use of base control help text for field info

* Allow additional callbacks for onFocus and onKeyUp
2023-03-17 14:03:10 -03:00
Maikel David Pérez Gómez e370f25c0c
Add a product header component to the blocks interface (#37152)
* Add button and saving logic

* Add comment suggestions

* Add changelog files

* Add comment suggestions

* Set header title to product name if the name field is dirty otherwise the default title value

* Navigate to EditProductPage after creating the product succesfully

* Add get-header-title util and expose edited product name from useSelect
2023-03-17 13:21:15 -03:00
Joshua T Flowers 5ed070d78a
Add tests around product block editor tabs (#37225)
* Add tests around tabs

* Add changelog entry

* Fix up frozen lock file

* Fix up frozen lock file

* Fix up lock file after rebase
2023-03-16 14:46:38 -07:00
Joshua T Flowers 90e7c66ba6
Remove the product block breadcrumbs and sidebar inspector (#37250)
* Remove the product block breadcrumbs and sidebar inspector

* Add changelog entry
2023-03-16 09:12:11 -07:00
Matt Sherman 9c5e9b57bf
Move CES data store to @woocommerce/customer-effort-score (#37252) 2023-03-16 10:22:33 -04:00
Joshua T Flowers 77937dd8cb
Move usePreventLeavingPage to navigation package (#36752)
* Move usePreventLeavingPage to navigation package

* Rename usePreventLeavingPage to useConfirmUnsavedChanges

* Move imports to external dependencies

* Fix up history push overrides

* Add changelog entries

* Fix up rebase issues

* Update i18n dependency to wp-6.0

* Fix up lock file

* Remove unused imports

* Update lock file

* Remove self import for navUtils
2023-03-16 05:33:22 -03:00
Chi-Hsuan Huang f50abc724f
Remove accordion from "Other payment providers" in WC Pay Task (#37205)
* Remove accordion from Other payment providers in WC Pay Task

* Add changelog

* Fix tests

* Update test

* Fix e2e test
2023-03-16 12:11:59 +08:00
Joshua T Flowers cb82998688
Improve accessibility around product editor tabs (#37217)
* Improve accessibility around product editor tabs

* Add changelog entry
2023-03-15 11:50:37 -07:00
louwie17 93506388e3
Update product rest config and template block usage (#37206)
* Update product post rest configs

* Update block usage

* Add changelogs

* Fix lint

* Make use of setupEditorState instead of setupEditor as we do not have a content block

* Simplify product condition

* Make use of core store only
2023-03-15 13:44:05 -03:00
Matt Sherman b94d38458d
Add components to @woocommerce/customer-effort-score (#37112)
* Update src structure of @woocommerce/customer-effort-score

* Changelog

* Add dependencies to @woocommerce/customer-effort-score

* Move useCustomerEffortScoreExitPageTracker and utils to @woocommerce/customer-effort-score

* Fix up imports from @woocommerce/customer-effort-score

* Changelog

* Fix import of constant

* Mock @woocommerce/customer-effort-score in tests

* Move tests to @woocommerce/customer-effort-score

* Update lock file

* Update lock file from trunk

* Update lock file again... this time, tests pass
2023-03-14 12:16:19 -04:00
Niels Lange 42235d1f31
Update extend-cart-checkout-block dependency 2023-03-14 11:57:22 +07:00
Joshua T Flowers 31ec8d8352
Add tab blocks to the blocks product editor (#37174)
* Add initial tab block and tabs render

* Add tabs styling

* Set initially selected tab on render

* Set initial tab based on query param

* Add template placeholder with tabs

* Add changelog entry

* Allow multiple tab and section blocks

* Add changelog entry for wc

* Fix up arrow alignment

* Fix up block configuration type

* Add missing navigation dependency to product editor
2023-03-13 15:00:50 -07:00
Joshua T Flowers 2b4ed6fe03
Add section block for use in product editor (#37153)
* Allow json imports in product editor package

* Add section block

* Init all blocks in product editor

* Add section styles and base product editor font styles

* Add changelog entry

* Handle PR feedback
2023-03-13 11:38:16 -07:00
Joel Thiessen 4dff6db40f
Adding test name block with support for entity data store (#37132)
* Adding test name block with support for entity data store

* Adding changelog

* Changing block.ts to block.json and amending TS config to support

* Experiment in loading blocks from settings template

* Enable the use of templates with the block editor

* Fix dependency

* Add changelog

* Fix lint error and remove unused utils

* Fix tests by fixing mocks

---------

Co-authored-by: Lourens Schep <lourensschep@gmail.com>
2023-03-13 11:45:25 -03:00
louwie17 329b0cbd07
Hydrate product editor settings (#37123) 2023-03-10 12:21:22 -08:00
Matt Sherman af24637439
Create @woocommerce/admin-layout package (#37094)
* Initial admin-layout package skeleton

* Changelog files

* Use createOrderedChildren and sortFillsByOrder from @woocommerce/components for WooFooterItem

* Move WooFooterItem to @woocommerce/admin-layout

* Use WooFooterItem from @woocommerce/admin-layout

* Suppress errant TS lint errors

* Exports for @woocommerce/admin-layout

* Fill updates and eslint suppression

* Changelogs

* Remove suppression of tslint errors

* Fix react and @types/react versions

* Load @woocommerce/admin-layout script and styles

* Move WooHeaderItem, WooHeaderNavigationItem, and WooHeaderPageTitle to @woocommerce/admin-layout

* Regenerate lock file post-rebase

* Remove duplicate import post-rebase

* Add wc-admin-layout to app style dependency

* Fix jest mock of @woocommerce/admin-layout

* Fix spacing.

* Export slot names

* Fix typo in .npmrc

* Update lock file

* Try updating lock file

* Update lock file

* Update lock file

* Update to latest lock file from trunk

* Update lock file

* Sync dependencies of @woocommerce/admin-layout

* Manually sync @wordpress dependencies
2023-03-10 09:58:02 -05:00
Sam Seay bec3ec18ac
Update Syncpack and use it to pin @wordpress packages to wp-6.0 (#37034) 2023-03-09 10:13:25 +13:00
Maikel David Pérez Gómez 3ded2b46e9
Create editor skeleton on add/edit product pages (#37023)
* Add required dependencies

* Create the block editor component

* Create the header component

* Create the sidebar component

* Create the editor component

* Remove comments

* Export the block editor from its package

* Enqueue wp-edit-site

* Create the new block mode product page

* Register the new ProductPage component in /add-product route

* Add temporal layout styles

* Fix rebasing conflicts

* Fix linter errors

* Redirect to the new product-editor page when edit

* Add changelog files

* Fixing dependencies conflicts and ignoring some non running test

* Add comment suggestions

* Fix conflicts after rebasing

* Add comment suggestions
2023-03-08 05:51:59 -04:00
Joel Thiessen 2332c7c813
Migrating details fields to product-editor package (#36945) 2023-03-06 14:33:10 -08:00
Joel Thiessen b825b51767
Moving useProductHelper and useVariationsOrder hooks to product editor package (#37006) 2023-03-06 09:11:54 -08:00
Maikel David Pérez Gómez 7dd379773b
Add a11y support for the tree-control (#36459)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add styles to fit the disign

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add a11y landmarks

* Add keyboard interactions

* Add changelog file

* Fix linter errors

* Resolving rebase conflicts

* Add comment suggestions
2023-03-02 17:26:41 -03:00
Sam Seay 1834621d1a
Update the @woocommerce/eslint-plugin and fix bugs (#36988) 2023-03-02 11:36:38 +13:00
Maikel David Pérez Gómez e61211406f
Add hightlighter to the tree control (#36480)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add styles to fit the disign

* Add type definitions

* Add custom hook to manage highlight

* Add hightlighter to the tree control

* Add stories

* Add changelog file

* Fix rebase conflicts

* Add comment suggestions
2023-03-01 13:52:23 -03:00
louwie17 93af1c73e9
Update tree select control (#36932)
* Export tree select control and add 3 additional props

* Update storyboook

* Add unit tests for new props

* Fix duplicate parent selection
2023-03-01 03:54:53 -04:00
Maikel David Pérez Gómez 7d0669dcb1
Add selection to the tree control (#36435)
* Create tree-control component

* Remove items from treeItemProps

* Add tree-control expand/collapse on click the expander button or by a custom logic

* Add stories

* Add the type definitions

* Add use selection hook

* Upgrade WP components dependency to v19.8.5 to support indeterminate checkbox control

* Add selection logic to the tree control

* Create stories

* Add changelog file

* Fix linter error

* Add styles to fit the disign

* Highlight selected item when it's a single selection tree

* Rebasing from trunk

* Add comment suggestions

* Fix unit test errors due to a new version of @wordpress/compose related to the ResizeObserve feat
2023-02-28 15:10:12 -03:00
Joel Thiessen 6a345ac7eb
Moving currencyContext to currency package and updating references (#36959) 2023-02-28 08:55:49 -08:00
Paul Sealock da1dce8f19
Package Release: handle initial release case (#36922) 2023-02-28 09:36:38 +13:00
Maikel David Pérez Gómez e5d8b61373
Add custom rendering logic to the item label (#36476)
* Add type definitions

* Add custom rendering logic to the item label

* Add stories

* Add changelog file

* Fix rebase merge issue

* Fix up stories after rebase

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2023-02-24 17:00:32 -03:00
louwie17 aec4dfd3bd
Update product editor package (#36830)
* Add missing dev packages to product-editor package

* Create components folder for organization

* Move product field, section and tab slots over to product-editor package

* Move use of product slot fills to product-editor package

* Sync dependencies

* Add changelogs

* Update README's and add constant for default values

* Update README's in product-editor package
2023-02-24 09:37:53 -04:00
Joshua T Flowers 87d79f15a3
Move product editor utils to product editor package (#36730)
* Move product editor utils to product editor package

* Add changelog entries

* Move remaining utils

* Move util import/exports to separate index file
2023-02-23 09:48:49 -08:00
RJ d26dd4c772
Add: shipping plugins in shipping task based on location (#36873)
Co-authored-by: moon <moon.kyong@automattic.com>
2023-02-20 21:32:14 +08:00
Chi-Hsuan Huang 3c113d1b79
Add `fills` prop to `useSlot` return object to fix task list bugs in WP 6.2 (#36887)
Add fills prop to useSlot return object for backwards compatibility
2023-02-20 17:07:58 +08:00
Moon e297821a9f
Support opening direction prop for ExperimentalCollapsibleList component (#36806)
* Support direction prop

* Update story with direction control

* Add changelog

* Change possible direction value to up or down
2023-02-17 14:11:33 -08:00
louwie17 23d5c4d074
Update product editor packages (#36815)
* Add product section components back to Components package

* Fix imports

* Add a deprecated message

* Add changelog.
2023-02-16 10:43:23 -04:00
louwie17 f615c58714
Fix create ordered children helper function (#36831)
* Still pass injectProps into child props for slot fill helper

* Add changelog
2023-02-16 10:42:41 -04:00
Matt Sherman 465b3d0dd5
Use createSelector for getPermalinkParts selector to cache result (#36848) 2023-02-16 09:13:00 -05:00
Matt Sherman e05a191156
Use products data store for getPermalinkParts selector (#36706)
* Add generated_slug and permalink_template to Product

* Update getPermalinkParts to use products data store instead of posts data store

* Remove ts-expect-error directive

* Changelog

* Add resolver for getPermalinkParts
2023-02-15 11:02:55 -05:00
Matt Sherman 993f1f4879
Fix SelectControl and TreeControl styles (#36718)
* Change TreeItem background hover/focus color to $gray-100

* Remove errand importing of native colors

* Changelog
2023-02-15 09:12:21 -03:00
Tomek Wytrębowicz c5cbc8d4ab
Update `config@3.3.7` (from `3.3.3`) (#33828)
* Update `config@3.3.7` (from `3.3.3`)

Add it to syncpack, to avoid `ReferenceError: node_env_var_name is not defined` when external extension imports and transforms the `admin-e2e-tests` directly from `node_modules`.

Include https://github.com/node-config/node-config/pull/642
2023-02-14 18:34:00 +13:00
github-actions[bot] a3e26fe9ea
Prepare Packages for Release (#36825)
Automated change: Prep @woocommerce/onboarding for release.

Co-authored-by: chihsuan <chihsuan@users.noreply.github.com>
2023-02-14 09:43:17 +08:00
github-actions[bot] fb3183d2c4
Prepare Packages for Release (#36814)
Automated change: Prep @woocommerce/create-woo-extension for release.

Co-authored-by: psealock <psealock@users.noreply.github.com>
2023-02-14 04:12:09 +13:00
Fernando Marichal f6e325bfab
Refactor createOrderedChildren (#36707)
* Refactor createOrderedChildren

* Add changelog

* Add getChildrenAndProps method

* Change method comments

* Change comment

* Change comment `injectProps`

* Add comment to explain check

---------

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-02-13 04:42:26 -04:00
Moon f1c2b28608
Add codistoconnect to pluginNames (#36766)
* Add codistoconnect to pluginNames

* Add changelog
2023-02-06 18:10:25 -08:00
Leif Singer d0a2b582fe
Consolidate eslint versions (#36700)
* pin eslint in .syncpackrc

run `pnpm run sync-dependencies` to ensure pinned version is used across projects, then run `pnpm install` to update `pnpm-lock.yaml`

* add changelog files

ran `pnpm run --no-bail --filter='[HEAD^1]' changelog add --significance=patch --type=dev --entry='Update eslint to 8.32.0 across the monorepo.'`

* re-run `pnpm install` to fix what broke while merging
2023-02-02 23:25:04 +13:00
Barry Hughes 463082fb28
Revert/36294 (#36714)
* Revert "Update spelling of Cancelled to Canceled for US English. (#36294)"

This reverts commit e588c560bf.

* Changelog note
2023-02-01 13:59:42 -06:00
Maikel David Pérez Gómez 5570f6a3e8
Add tree-control expand/collapse on click the expander button or by a custom logic (#36434)
* Add tree-control expand/collapse on click the expander button or by a custom logic

* Update changelog

* Clean up styles

* Update isItemExpanded code doc

* Rename expanded props

* Destructure expander

* Update shouldItemBeExpanded code doc

* Remove useCallback from story

* Remove useCallback from shouldItemBeExpanded code doc

---------

Co-authored-by: Matt Sherman <matt@jam123.com>
2023-02-01 12:04:50 -05:00
louwie17 5f0572664f
Add new `@woocommerce/product-editor` JS package (#36600)
* Bootstrap product-editor package

* Move product section components over to product editor package

* Add changelogs

* Remove unused import leftover from rebase
2023-01-31 09:38:28 -04:00
Joel Thiessen c080886262
Implementation of separate variant slots via refactored components (#36646)
* Adding contants, renaming files, wiring up shipping section with discrete slots for variants and non-variants

* Refactoring pricing section to give discrete slots for variant and non-variant forms

* Refactoring inventory fills to give discrete slots for variant and non-variant products

* Adding additional slot to pricing -> taxes -> advanced

* Renaming api fields component file

* Refactoring images, details and attributes to match others

* Ensure variant field IDs are distinct, organize all product field fill IDs

* Adding changelog

* Simplifying IDs used for slots

* Minor refactor of pricing taxes class field

* Give api fill exports their own registerPlugin scope

* Refactoring WooProductFieldItem to generate unique IDs

* Adding components changelog
2023-01-31 07:19:21 -04:00
Joel Thiessen 79c596cbd0
Updating section and field product fills to support multiple slots (#36592) 2023-01-27 08:42:51 -08:00
Matt Sherman 43a42eac27
Include CSS for experimental tree control (#36517)
* Add @wordpress/base-styles as dependency to @woocommerce/components

* Import experimental tree control styles

* Calc padding-left for tree item in CSS instead of JS

* Force resolution of 7.0.2 react and install base styles.

* Update lock file

Co-authored-by: Sam Seay <samueljseay@gmail.com>
2023-01-26 14:45:14 -05:00
Nathan Silveira b7fd3d9e76
Move registerFill call to inside an useEffect (#36623)
That call was causing a React error (Cannot update a component while rendering a different component)
2023-01-26 13:59:52 -03:00
Nathan Silveira a274057a6e
Create PHP helper functions for adding new tabs (#36583)
* Update documentation on how to add a new field through FormFactory

* Add method to add_tab through FormFactory

* Update ProductForm definition and add Tabs

* Add changelog

* Add test to add_tab and get_tabs methods

* Add changelog for @woocommerce/data

* Add tabs to reducer actions and initial state

* Remove unused function

* Fix unit test

* Increment Tabs TypeScript definition

* Add required fields to Tab class and refactor to reduce lines of code

* Change from filter to action in doc example

* Update method documentation

* Add required fields to test

* Change productform_field test

* Fix form-factory unit test

* Update wrong comment
2023-01-25 18:21:41 -03:00
louwie17 bcdf2518e6
Refactor product tabs and add product tab slot fills (#36551) 2023-01-24 15:37:21 -08:00
Joel Thiessen 4341a53144
Migrating pricing section in product editor to slot fills (#36500)
* Adding changelogs

* Migrating pricing section in product editor to slot fills

* Adding slot and plugarea to variation form

* Removing obsolete pricing section files
2023-01-24 04:24:45 -04:00
Paul Sealock 0beb6b7503
Create woo extension: Update Woo version (#36567)
* Update woocommerce version

* changelog
2023-01-24 21:08:59 +13:00
Joshua T Flowers 372208be41
Always show comments for product feedback form (#36484)
* Always show comments for product feedback form

* Add changelog entry

* Add CES changelog entry

* Fix up lint errors

* Add default for shouldShowComments in CustomerFeedbackModal
2023-01-23 17:36:48 -08:00
Fernando Marichal f13564419b
Add feedback modal and product mvp feedback modal components (#36532)
* Add FeedbackModal component

* Add ProductMVPFeedbackModal package

* Add ref

* Fix `Send feedback` button type

* Add changelog

* Rename a few props

Co-authored-by: Fernando Marichal <contacto@fernandomarichal.com>
2023-01-23 20:19:37 -03:00
Ilyas Foo 30a4bdefd8
Add Tasklist extensibility and WooOnboardingTaskListHeader SlotFill (#36519)
* Add experimental onboarding_tasklist PHP filter

* Add WooOnboardingTaskListHeader and woocommerce_onboarding_task_list_header Slot to task list

* Changelog

* Fix header task logic

* Remove React FC types

* Update changelog

* Fix comment
2023-01-21 15:19:20 +08:00
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