* Add woo flavored DEWP

* clean up webpack config

* clean

* marketing coupons

* onboarding scripts

* nav scripts

* better imports of deps

* add asset files to bundle

* under git rebase conflict error

* try order

* Add wp_set_script_translations to the scripting loop

* changelog
This commit is contained in:
Paul Sealock 2021-03-01 12:48:52 +13:00 committed by GitHub
parent 66a5c3f42b
commit 101df3b019
13 changed files with 605 additions and 164 deletions

View File

@ -21,7 +21,8 @@ output 2 "Creating archive... 🎁"
ZIP_FILE=$1
build_files=$(find dist/ \( -name '*.js' -o -name '*.css' \))
build_files=$(find dist \( -name '*.js' -o -name '*.css' \))
asset_files=$(find dist \( -name 'index.min.asset.php' \))
zip -r "${ZIP_FILE}" \
woocommerce-admin.php \
@ -29,6 +30,7 @@ zip -r "${ZIP_FILE}" \
includes/ \
images/ \
$build_files \
$asset_files \
languages/woocommerce-admin.pot \
readme.txt \
src/ \

View File

@ -18,6 +18,7 @@ import {
withOptionsHydration,
} from '@woocommerce/data';
import { recordPageView } from '@woocommerce/tracks';
import '@woocommerce/notices';
/**
* Internal dependencies

View File

@ -1,6 +1,6 @@
{
"name": "@woocommerce/admin-library",
"version": "2.1.0-dev",
"version": "2.2.0-dev",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
@ -10321,6 +10321,14 @@
"@wordpress/url": "^2.3.3"
}
},
"@wordpress/autop": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/autop/-/autop-2.11.0.tgz",
"integrity": "sha512-LxcmaiFr0a6rZaSH9Sbw61VryA5/GuAjkQpuPNW03tXF/dHjrKRlRtqo/N5CiIR2QOobPd6p2S9iJrfz4foqkQ==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/babel-plugin-import-jsx-pragma": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@wordpress/babel-plugin-import-jsx-pragma/-/babel-plugin-import-jsx-pragma-3.0.1.tgz",
@ -10384,6 +10392,226 @@
"resolved": "https://registry.npmjs.org/@wordpress/base-styles/-/base-styles-3.3.0.tgz",
"integrity": "sha512-GdGfPhSS59p/IM7f38rithDxmpSPG5wwcwYKzcO9ipovDF/8oSEkBdr2puaxpOXg6oIWY55mrQ/xfJjXBnaaLg=="
},
"@wordpress/blob": {
"version": "2.12.0",
"resolved": "https://registry.npmjs.org/@wordpress/blob/-/blob-2.12.0.tgz",
"integrity": "sha512-st/5z9MFgRszNGFy33JMtmhhhKVIIQNVVq3bsiiyAZrutM07UzdDgPgqkT6mm9ceCOlMHuCL61TKOz32bO4yDg==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/block-serialization-default-parser": {
"version": "3.9.0",
"resolved": "https://registry.npmjs.org/@wordpress/block-serialization-default-parser/-/block-serialization-default-parser-3.9.0.tgz",
"integrity": "sha512-nScZJSastoGwjk8rRr03qf2hGtDIj4rEDw56LxF9DWCNPPrTRYS4U1rumDCYGg2T+XF94HgBCy+fv9K/qkIiQg==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/blocks": {
"version": "6.25.0",
"resolved": "https://registry.npmjs.org/@wordpress/blocks/-/blocks-6.25.0.tgz",
"integrity": "sha512-ItGs8/AbgHxd8tiQJ3kDjd9xxSw/rm7IxGmWp7W73OXtatnz9n5szmDbeM+n96jBpKje0hPp3nNvKMt1lQ3FxA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/autop": "^2.11.0",
"@wordpress/blob": "^2.12.0",
"@wordpress/block-serialization-default-parser": "^3.9.0",
"@wordpress/compose": "^3.23.0",
"@wordpress/data": "^4.26.0",
"@wordpress/deprecated": "^2.11.0",
"@wordpress/dom": "^2.16.0",
"@wordpress/element": "^2.19.0",
"@wordpress/hooks": "^2.11.0",
"@wordpress/html-entities": "^2.10.0",
"@wordpress/i18n": "^3.17.0",
"@wordpress/icons": "^2.9.0",
"@wordpress/is-shallow-equal": "^3.0.0",
"@wordpress/shortcode": "^2.12.0",
"hpq": "^1.3.0",
"lodash": "^4.17.19",
"rememo": "^3.0.0",
"showdown": "^1.9.1",
"simple-html-tokenizer": "^0.5.7",
"tinycolor2": "^1.4.1",
"uuid": "^8.3.0"
},
"dependencies": {
"@wordpress/compose": {
"version": "3.23.0",
"resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-3.23.0.tgz",
"integrity": "sha512-TRoFmQ3BvLEU7XyFLGKk1wzgzNAc3Iu0dG7nAy/QEs9muboINAx4BjWJRHMXPo8k7rJW+yQ3fgMO2SAHFYdMDQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/deprecated": "^2.11.0",
"@wordpress/dom": "^2.16.0",
"@wordpress/element": "^2.19.0",
"@wordpress/is-shallow-equal": "^3.0.0",
"@wordpress/keycodes": "^2.17.0",
"@wordpress/priority-queue": "^1.10.0",
"clipboard": "^2.0.1",
"lodash": "^4.17.19",
"memize": "^1.1.0",
"mousetrap": "^1.6.5",
"react-merge-refs": "^1.0.0",
"react-resize-aware": "^3.0.1",
"use-memo-one": "^1.1.1"
}
},
"@wordpress/data": {
"version": "4.26.0",
"resolved": "https://registry.npmjs.org/@wordpress/data/-/data-4.26.0.tgz",
"integrity": "sha512-z6ZSThv7BnLBudQgcBKT/4AC0kaTOXmZv8kNc8M/Ly6TEgHOQUkypHr5hGSwAaFWma3ttKXcjLH8rtt35yhFtQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/compose": "^3.23.0",
"@wordpress/deprecated": "^2.11.0",
"@wordpress/element": "^2.19.0",
"@wordpress/is-shallow-equal": "^3.0.0",
"@wordpress/priority-queue": "^1.10.0",
"@wordpress/redux-routine": "^3.13.0",
"equivalent-key-map": "^0.2.2",
"is-promise": "^4.0.0",
"lodash": "^4.17.19",
"memize": "^1.1.0",
"redux": "^4.0.0",
"turbo-combine-reducers": "^1.0.2",
"use-memo-one": "^1.1.1"
}
},
"@wordpress/deprecated": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-2.11.0.tgz",
"integrity": "sha512-2wfl5J8Y3hZeqkD9QAuXTRxPeXm6x5rxsz+CAFG+SS1E9FYZdB0FnRmm26iza7oDo0n917SuM+QDJ5R8P0UxlA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/hooks": "^2.11.0"
}
},
"@wordpress/dom": {
"version": "2.16.0",
"resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-2.16.0.tgz",
"integrity": "sha512-IjXPfv9SuEkVbmxD4eaxn01zZmYUxp/4wrMcsHAHGym59k/bN6uJOQprrU/tTiSR4Zlf8Jmo22HWmuL654k8zg==",
"requires": {
"@babel/runtime": "^7.12.5",
"lodash": "^4.17.19"
}
},
"@wordpress/element": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/@wordpress/element/-/element-2.19.0.tgz",
"integrity": "sha512-t6GnllujeJU2N7RagWvPSSki+VnIxUQktg+cDAFDWC4XHCVoZKgs/0B48yeZSvd9T/t4ry0aILh+zeEJ+5DuHg==",
"requires": {
"@babel/runtime": "^7.12.5",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@wordpress/escape-html": "^1.11.0",
"lodash": "^4.17.19",
"react": "^16.13.1",
"react-dom": "^16.13.1"
}
},
"@wordpress/escape-html": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-1.11.0.tgz",
"integrity": "sha512-f/jk3SpYRUp04+LzdonNWBpH8jlm8RXGjK2TimfLz+wRFzFFdF7i2dI9GX+4gea/UuV+WtXAWkfARyV0HVDXwQ==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/hooks": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-2.11.0.tgz",
"integrity": "sha512-TbvCrHcMiSZoyiflegEqVS3DDytDTpkms+yLUaGN4sMvNdR/Mv5s0WnNKyM0T49lbmZYPWlbWhwJ1F6hr/FQDg==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/html-entities": {
"version": "2.10.0",
"resolved": "https://registry.npmjs.org/@wordpress/html-entities/-/html-entities-2.10.0.tgz",
"integrity": "sha512-D6lWrDOOiI/a/uYZpXMqL9ErT1Q4cauLWRZK/E4kaNOkhRxEUtWFiDD+00HdIkrT5QYPIuWos4h4Vw/HHM8Cgg==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/i18n": {
"version": "3.17.0",
"resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-3.17.0.tgz",
"integrity": "sha512-CTZ0oezI6BT5GlmiE4X0fzRY6i7bNsX6hxiROkGlpREY6q4s1pnwhM8ggLIaP18Bvkb/HDkUEENDrv3iwM/LIQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.19",
"memize": "^1.1.0",
"sprintf-js": "^1.1.1",
"tannin": "^1.2.0"
}
},
"@wordpress/icons": {
"version": "2.9.0",
"resolved": "https://registry.npmjs.org/@wordpress/icons/-/icons-2.9.0.tgz",
"integrity": "sha512-eQJQIaCLdmdo8iTjequNkB14Fzx3qLRbjzZTk26fnggG41L+uGRblIeheZDcHY/jPKDd2H4+v9c9/0LqfjuPCA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/element": "^2.19.0",
"@wordpress/primitives": "^1.11.0"
}
},
"@wordpress/is-shallow-equal": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-3.0.0.tgz",
"integrity": "sha512-tefJzEZgKHriE9zDqfk5VxZ6vQGY8DWrzC8+LoNDsWAEEoB0nmA73FUyBgdXscw57xMxE68kjoBhOhlLavMp6w==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/keycodes": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-2.17.0.tgz",
"integrity": "sha512-tV8Cjb1E0kXPTTQnqQu0VZZSncRB8d6KVckOJqwk/uSC7+RjLhGnQU+rUft7AJDaZgRH01xLOJD79mDj5/1FLA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/i18n": "^3.17.0",
"lodash": "^4.17.19"
}
},
"@wordpress/primitives": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/primitives/-/primitives-1.11.0.tgz",
"integrity": "sha512-RjWKYITSBi4RaQchmswI1qTF3n3M3QoGFoItRSnCajOHyNti4K1chPaBpr52ithnentfblF3zquR3J6ZnAkPjA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/element": "^2.19.0",
"classnames": "^2.2.5"
}
},
"@wordpress/priority-queue": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-1.10.0.tgz",
"integrity": "sha512-3ejPX/6ECUN1FAqbL1BvqP77aRrGx5C41HeNZZT9ZzErJWVGfE0NRFfCt7knT0/LumdERApHkswBp3DQ5J18RQ==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/redux-routine": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-3.13.0.tgz",
"integrity": "sha512-2ziG+FJjEwTThqLtoY/6tabAHoycXoBa+BIXNW8B5EclEGJJVbx5wHfsa/JQAGRep1YCGVymDE7YiVyJVpsgNg==",
"requires": {
"@babel/runtime": "^7.12.5",
"is-promise": "^4.0.0",
"lodash": "^4.17.19",
"rungen": "^0.3.2"
}
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
}
}
},
"@wordpress/browserslist-config": {
"version": "2.7.0",
"resolved": "https://registry.npmjs.org/@wordpress/browserslist-config/-/browserslist-config-2.7.0.tgz",
@ -10526,6 +10754,205 @@
}
}
},
"@wordpress/core-data": {
"version": "2.25.0",
"resolved": "https://registry.npmjs.org/@wordpress/core-data/-/core-data-2.25.0.tgz",
"integrity": "sha512-5rQtg0RsEtUmWYfDrLka7cPLFPj+uXM9HtkNgIgFeSNAnNDK+A+t6LYfkdQ6FRQihTySZ6Iwl5QozfqXvwaCJQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "^3.21.0",
"@wordpress/blocks": "^6.25.0",
"@wordpress/data": "^4.26.0",
"@wordpress/data-controls": "^1.20.0",
"@wordpress/deprecated": "^2.11.0",
"@wordpress/element": "^2.19.0",
"@wordpress/i18n": "^3.17.0",
"@wordpress/is-shallow-equal": "^3.0.0",
"@wordpress/url": "^2.20.0",
"equivalent-key-map": "^0.2.2",
"lodash": "^4.17.19",
"rememo": "^3.0.0",
"uuid": "^8.3.0"
},
"dependencies": {
"@wordpress/api-fetch": {
"version": "3.21.0",
"resolved": "https://registry.npmjs.org/@wordpress/api-fetch/-/api-fetch-3.21.0.tgz",
"integrity": "sha512-GbcyKBXQ0fNgtzCsfLYdcmnQhLYwuBM4REZFWajSqHigwAY0kAO2RdODsJNLxsnFKR61HUY8mgVPZL8WHnZYNw==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/i18n": "^3.17.0",
"@wordpress/url": "^2.20.0"
}
},
"@wordpress/compose": {
"version": "3.23.0",
"resolved": "https://registry.npmjs.org/@wordpress/compose/-/compose-3.23.0.tgz",
"integrity": "sha512-TRoFmQ3BvLEU7XyFLGKk1wzgzNAc3Iu0dG7nAy/QEs9muboINAx4BjWJRHMXPo8k7rJW+yQ3fgMO2SAHFYdMDQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/deprecated": "^2.11.0",
"@wordpress/dom": "^2.16.0",
"@wordpress/element": "^2.19.0",
"@wordpress/is-shallow-equal": "^3.0.0",
"@wordpress/keycodes": "^2.17.0",
"@wordpress/priority-queue": "^1.10.0",
"clipboard": "^2.0.1",
"lodash": "^4.17.19",
"memize": "^1.1.0",
"mousetrap": "^1.6.5",
"react-merge-refs": "^1.0.0",
"react-resize-aware": "^3.0.1",
"use-memo-one": "^1.1.1"
}
},
"@wordpress/data": {
"version": "4.26.0",
"resolved": "https://registry.npmjs.org/@wordpress/data/-/data-4.26.0.tgz",
"integrity": "sha512-z6ZSThv7BnLBudQgcBKT/4AC0kaTOXmZv8kNc8M/Ly6TEgHOQUkypHr5hGSwAaFWma3ttKXcjLH8rtt35yhFtQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/compose": "^3.23.0",
"@wordpress/deprecated": "^2.11.0",
"@wordpress/element": "^2.19.0",
"@wordpress/is-shallow-equal": "^3.0.0",
"@wordpress/priority-queue": "^1.10.0",
"@wordpress/redux-routine": "^3.13.0",
"equivalent-key-map": "^0.2.2",
"is-promise": "^4.0.0",
"lodash": "^4.17.19",
"memize": "^1.1.0",
"redux": "^4.0.0",
"turbo-combine-reducers": "^1.0.2",
"use-memo-one": "^1.1.1"
}
},
"@wordpress/data-controls": {
"version": "1.20.0",
"resolved": "https://registry.npmjs.org/@wordpress/data-controls/-/data-controls-1.20.0.tgz",
"integrity": "sha512-hf4iQ3Vw/wC401/7SKRDlGAatRULA97bEzynY9vImGZkhmH+bFDU46cJVlhP/p+UZ6qRSSLjJBVyhnBhzf3kMw==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/api-fetch": "^3.21.0",
"@wordpress/data": "^4.26.0",
"@wordpress/deprecated": "^2.11.0"
}
},
"@wordpress/deprecated": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/deprecated/-/deprecated-2.11.0.tgz",
"integrity": "sha512-2wfl5J8Y3hZeqkD9QAuXTRxPeXm6x5rxsz+CAFG+SS1E9FYZdB0FnRmm26iza7oDo0n917SuM+QDJ5R8P0UxlA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/hooks": "^2.11.0"
}
},
"@wordpress/dom": {
"version": "2.16.0",
"resolved": "https://registry.npmjs.org/@wordpress/dom/-/dom-2.16.0.tgz",
"integrity": "sha512-IjXPfv9SuEkVbmxD4eaxn01zZmYUxp/4wrMcsHAHGym59k/bN6uJOQprrU/tTiSR4Zlf8Jmo22HWmuL654k8zg==",
"requires": {
"@babel/runtime": "^7.12.5",
"lodash": "^4.17.19"
}
},
"@wordpress/element": {
"version": "2.19.0",
"resolved": "https://registry.npmjs.org/@wordpress/element/-/element-2.19.0.tgz",
"integrity": "sha512-t6GnllujeJU2N7RagWvPSSki+VnIxUQktg+cDAFDWC4XHCVoZKgs/0B48yeZSvd9T/t4ry0aILh+zeEJ+5DuHg==",
"requires": {
"@babel/runtime": "^7.12.5",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.9.0",
"@wordpress/escape-html": "^1.11.0",
"lodash": "^4.17.19",
"react": "^16.13.1",
"react-dom": "^16.13.1"
}
},
"@wordpress/escape-html": {
"version": "1.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/escape-html/-/escape-html-1.11.0.tgz",
"integrity": "sha512-f/jk3SpYRUp04+LzdonNWBpH8jlm8RXGjK2TimfLz+wRFzFFdF7i2dI9GX+4gea/UuV+WtXAWkfARyV0HVDXwQ==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/hooks": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@wordpress/hooks/-/hooks-2.11.0.tgz",
"integrity": "sha512-TbvCrHcMiSZoyiflegEqVS3DDytDTpkms+yLUaGN4sMvNdR/Mv5s0WnNKyM0T49lbmZYPWlbWhwJ1F6hr/FQDg==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/i18n": {
"version": "3.17.0",
"resolved": "https://registry.npmjs.org/@wordpress/i18n/-/i18n-3.17.0.tgz",
"integrity": "sha512-CTZ0oezI6BT5GlmiE4X0fzRY6i7bNsX6hxiROkGlpREY6q4s1pnwhM8ggLIaP18Bvkb/HDkUEENDrv3iwM/LIQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"gettext-parser": "^1.3.1",
"lodash": "^4.17.19",
"memize": "^1.1.0",
"sprintf-js": "^1.1.1",
"tannin": "^1.2.0"
}
},
"@wordpress/is-shallow-equal": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/@wordpress/is-shallow-equal/-/is-shallow-equal-3.0.0.tgz",
"integrity": "sha512-tefJzEZgKHriE9zDqfk5VxZ6vQGY8DWrzC8+LoNDsWAEEoB0nmA73FUyBgdXscw57xMxE68kjoBhOhlLavMp6w==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/keycodes": {
"version": "2.17.0",
"resolved": "https://registry.npmjs.org/@wordpress/keycodes/-/keycodes-2.17.0.tgz",
"integrity": "sha512-tV8Cjb1E0kXPTTQnqQu0VZZSncRB8d6KVckOJqwk/uSC7+RjLhGnQU+rUft7AJDaZgRH01xLOJD79mDj5/1FLA==",
"requires": {
"@babel/runtime": "^7.12.5",
"@wordpress/i18n": "^3.17.0",
"lodash": "^4.17.19"
}
},
"@wordpress/priority-queue": {
"version": "1.10.0",
"resolved": "https://registry.npmjs.org/@wordpress/priority-queue/-/priority-queue-1.10.0.tgz",
"integrity": "sha512-3ejPX/6ECUN1FAqbL1BvqP77aRrGx5C41HeNZZT9ZzErJWVGfE0NRFfCt7knT0/LumdERApHkswBp3DQ5J18RQ==",
"requires": {
"@babel/runtime": "^7.12.5"
}
},
"@wordpress/redux-routine": {
"version": "3.13.0",
"resolved": "https://registry.npmjs.org/@wordpress/redux-routine/-/redux-routine-3.13.0.tgz",
"integrity": "sha512-2ziG+FJjEwTThqLtoY/6tabAHoycXoBa+BIXNW8B5EclEGJJVbx5wHfsa/JQAGRep1YCGVymDE7YiVyJVpsgNg==",
"requires": {
"@babel/runtime": "^7.12.5",
"is-promise": "^4.0.0",
"lodash": "^4.17.19",
"rungen": "^0.3.2"
}
},
"@wordpress/url": {
"version": "2.20.0",
"resolved": "https://registry.npmjs.org/@wordpress/url/-/url-2.20.0.tgz",
"integrity": "sha512-7AczODTQEgDtSWdhNhGA+mTCzVNRIEDjmTYtEdM/wR+a/j1CBuwV8h6eSCJ5RIiuneWO9ljhqObzWVl0Bwk2Vw==",
"requires": {
"@babel/runtime": "^7.12.5",
"lodash": "^4.17.19",
"react-native-url-polyfill": "^1.1.2"
}
},
"uuid": {
"version": "8.3.2",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz",
"integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="
}
}
},
"@wordpress/custom-templated-path-webpack-plugin": {
"version": "1.7.0",
"resolved": "https://registry.npmjs.org/@wordpress/custom-templated-path-webpack-plugin/-/custom-templated-path-webpack-plugin-1.7.0.tgz",
@ -13014,6 +13441,16 @@
}
}
},
"@wordpress/shortcode": {
"version": "2.12.0",
"resolved": "https://registry.npmjs.org/@wordpress/shortcode/-/shortcode-2.12.0.tgz",
"integrity": "sha512-ZIFcbyRkogYOIeiMDr7X20VObTgwu9FuneBK6iUZn1Ic0EzOuZ8eOmMIo5M03+8+aQIVJxc/2kS1XGBj3N8kPQ==",
"requires": {
"@babel/runtime": "^7.12.5",
"lodash": "^4.17.19",
"memize": "^1.1.0"
}
},
"@wordpress/url": {
"version": "2.21.0",
"resolved": "https://registry.npmjs.org/@wordpress/url/-/url-2.21.0.tgz",
@ -22753,6 +23190,11 @@
"resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz",
"integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg=="
},
"hpq": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/hpq/-/hpq-1.3.0.tgz",
"integrity": "sha512-fvYTvdCFOWQupGxqkahrkA+ERBuMdzkxwtUdKrxR6rmMd4Pfl+iZ1QiQYoaZ0B/v0y59MOMnz3XFUWbT50/NWA=="
},
"hsl-regex": {
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/hsl-regex/-/hsl-regex-1.0.0.tgz",
@ -35154,6 +35596,63 @@
"resolved": "https://registry.npmjs.org/shellwords/-/shellwords-0.1.1.tgz",
"integrity": "sha512-vFwSUfQvqybiICwZY5+DAWIPLKsWO31Q91JSKl3UYv+K5c2QRPzn0qzec6QPu1Qc9eHYItiP3NdJqNVqetYAww=="
},
"showdown": {
"version": "1.9.1",
"resolved": "https://registry.npmjs.org/showdown/-/showdown-1.9.1.tgz",
"integrity": "sha512-9cGuS382HcvExtf5AHk7Cb4pAeQQ+h0eTr33V1mu+crYWV4KvWAw6el92bDrqGEk5d46Ai/fhbEUwqJ/mTCNEA==",
"requires": {
"yargs": "^14.2"
},
"dependencies": {
"emoji-regex": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz",
"integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA=="
},
"is-fullwidth-code-point": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz",
"integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8="
},
"string-width": {
"version": "3.1.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz",
"integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==",
"requires": {
"emoji-regex": "^7.0.1",
"is-fullwidth-code-point": "^2.0.0",
"strip-ansi": "^5.1.0"
}
},
"yargs": {
"version": "14.2.3",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz",
"integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==",
"requires": {
"cliui": "^5.0.0",
"decamelize": "^1.2.0",
"find-up": "^3.0.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^3.0.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^15.0.1"
}
},
"yargs-parser": {
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz",
"integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==",
"requires": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
}
}
},
"side-channel": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
@ -35170,6 +35669,11 @@
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz",
"integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA=="
},
"simple-html-tokenizer": {
"version": "0.5.10",
"resolved": "https://registry.npmjs.org/simple-html-tokenizer/-/simple-html-tokenizer-0.5.10.tgz",
"integrity": "sha512-1DHMUmvUOGuUZ9/+cX/+hOhWhRD5dEw6lodn8WuV+T+cQ31hhBcCu1dcDsNotowi4mMaNhrLyKoS+DtB81HdDA=="
},
"simple-swizzle": {
"version": "0.2.2",
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",

View File

@ -94,6 +94,7 @@
"@wordpress/api-fetch": "2.2.8",
"@wordpress/base-styles": "3.3.0",
"@wordpress/components": "11.1.3",
"@wordpress/core-data": "^2.25.0",
"@wordpress/data": "4.26.1",
"@wordpress/data-controls": "1.20.1",
"@wordpress/date": "3.13.0",

View File

@ -1,3 +1,8 @@
/**
* External dependencies
*/
import '@wordpress/core-data';
export { SETTINGS_STORE_NAME } from './settings';
export { withSettingsHydration } from './settings/with-settings-hydration';
export { useSettings } from './settings/use-settings';

View File

@ -1,3 +1,8 @@
/**
* External dependencies
*/
import '@wordpress/notices';
/**
* Internal dependencies
*/

View File

@ -83,6 +83,7 @@ Release and roadmap notes are available on the [WooCommerce Developers Blog](htt
- Tweak: Refactor autoloader to remove global variable. #6412
- Dev: Deprecate Onboarding::has_woocommerce_support. #6401
- Fix: Broken link anchors to online documentation. #6455
- Dev: Add Dependency Extraction Webpack Plugin #5762
== 2.1.0 ==

View File

@ -128,10 +128,12 @@ class Coupons {
Loader::get_file_version( 'css' )
);
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/marketing-coupons.min.asset.php';
wp_enqueue_script(
'wc-admin-marketing-coupons',
Loader::get_url( 'wp-admin-scripts/marketing-coupons', 'js' ),
array( 'wp-i18n', 'wp-data', 'wp-element', 'moment', 'wp-api-fetch', WC_ADMIN_APP ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
Loader::get_file_version( 'js' ),
true
);

View File

@ -171,10 +171,12 @@ class Init {
Loader::get_file_version( 'css' )
);
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/navigation-opt-out.min.asset.php';
wp_enqueue_script(
'wc-admin-navigation-opt-out',
Loader::get_url( 'wp-admin-scripts/navigation-opt-out', 'js' ),
array( 'wp-i18n', 'wp-element', WC_ADMIN_APP ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
Loader::get_file_version( 'js' ),
true
);

View File

@ -263,7 +263,15 @@ class OnboardingTasks {
return;
}
wp_enqueue_script( 'onboarding-product-notice', Loader::get_url( 'wp-admin-scripts/onboarding-product-notice', 'js' ), array( 'wp-i18n', 'wp-data' ), WC_ADMIN_VERSION_NUMBER, true );
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/onboarding-product-notice.min.asset.php';
wp_enqueue_script(
'onboarding-product-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-product-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
true
);
}
/**
@ -273,8 +281,16 @@ class OnboardingTasks {
*/
public static function add_onboarding_homepage_notice_admin_script( $hook ) {
global $post;
if ( 'post.php' === $hook && 'page' === $post->post_type && isset( $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) && 'homepage' === $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) { // phpcs:ignore csrf ok.
wp_enqueue_script( 'onboarding-homepage-notice', Loader::get_url( 'wp-admin-scripts/onboarding-homepage-notice', 'js' ), array( 'wc-navigation', 'wp-i18n', 'wp-data', 'wc-tracks' ), WC_ADMIN_VERSION_NUMBER, true );
if ( 'post.php' === $hook && 'page' === $post->post_type && isset( $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) && 'homepage' === $_GET[ self::ACTIVE_TASK_TRANSIENT ] ) { // phpcs:ignore csrf ok.
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/onboarding-homepage-notice.min.asset.php';
wp_enqueue_script(
'onboarding-homepage-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-homepage-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
true
);
}
}
@ -291,7 +307,15 @@ class OnboardingTasks {
'tax' === self::get_active_task() &&
! self::is_active_task_complete()
) {
wp_enqueue_script( 'onboarding-tax-notice', Loader::get_url( 'wp-admin-scripts/onboarding-tax-notice', 'js' ), array( 'wc-navigation', 'wp-i18n', 'wp-data' ), WC_ADMIN_VERSION_NUMBER, true );
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/onboarding-tax-notice.min.asset.php';
wp_enqueue_script(
'onboarding-tax-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-tax-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
true
);
}
}
@ -304,7 +328,16 @@ class OnboardingTasks {
$step = isset( $_GET['step'] ) ? $_GET['step'] : ''; // phpcs:ignore csrf ok, sanitization ok.
if ( 'product_page_product_importer' === $hook && 'done' === $step && 'product-import' === self::get_active_task() ) {
delete_transient( self::ACTIVE_TASK_TRANSIENT );
wp_enqueue_script( 'onboarding-product-import-notice', Loader::get_url( 'wp-admin-scripts/onboarding-product-import-notice', 'js' ), array( 'wc-navigation', 'wp-i18n', 'wp-data' ), WC_ADMIN_VERSION_NUMBER, true );
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/onboarding-product-import-notice.min.asset.php';
wp_enqueue_script(
'onboarding-product-import-notice',
Loader::get_url( 'wp-admin-scripts/onboarding-product-import-notice', 'js' ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
WC_ADMIN_VERSION_NUMBER,
true
);
}
}

View File

@ -151,10 +151,12 @@ class ShippingLabelBanner {
Loader::get_file_version( 'css' )
);
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . 'wp-admin-scripts/print-shipping-label-banner.min.asset.php';
wp_enqueue_script(
'print-shipping-label-banner',
Loader::get_url( 'wp-admin-scripts/print-shipping-label-banner', 'js' ),
array( 'wp-i18n', 'wp-data', 'wp-element', 'moment', 'wp-api-fetch', WC_ADMIN_APP ),
array_merge( array( WC_ADMIN_APP ), $script_assets ['dependencies'] ),
Loader::get_file_version( 'js' ),
true
);

View File

@ -301,121 +301,50 @@ class Loader {
$js_file_version = self::get_file_version( 'js' );
$css_file_version = self::get_file_version( 'css' );
wp_register_script(
'wc-csv',
self::get_url( 'csv-export/index', 'js' ),
array( 'moment' ),
$js_file_version,
true
);
wp_register_script(
'wc-currency',
self::get_url( 'currency/index', 'js' ),
array( 'wc-number' ),
$js_file_version,
true
);
wp_set_script_translations( 'wc-currency', 'woocommerce-admin' );
wp_register_script(
$scripts = array(
'wc-customer-effort-score',
self::get_url( 'customer-effort-score/index', 'js' ),
array(
'wp-components',
'wp-compose',
'wp-data',
'wp-element',
'wp-i18n',
'wp-notices',
),
$js_file_version,
true
);
wp_register_script(
// NOTE: This should be removed when Gutenberg is updated and the notices package is removed from WooCommerce Admin.
'wc-notices',
'wc-number',
'wc-tracks',
'wc-date',
'wc-components',
WC_ADMIN_APP,
'wc-csv',
'wc-store-data',
'wc-currency',
'wc-navigation',
self::get_url( 'navigation/index', 'js' ),
array( 'wp-url', 'wp-hooks', 'wp-element', 'wp-data', 'moment', 'wp-components' ),
$js_file_version,
true
);
// NOTE: This should be removed when Gutenberg is updated and
// the notices package is removed from WooCommerce Admin.
$scripts_map = array(
WC_ADMIN_APP => 'app',
'wc-csv' => 'csv-export',
'wc-store-data' => 'data',
);
$translated_scripts = array(
'wc-currency',
'wc-date',
'wc-components',
WC_ADMIN_APP,
);
foreach ( $scripts as $script ) {
$script_path_name = isset( $scripts_map[ $script ] ) ? $scripts_map[ $script ] : str_replace( 'wc-', '', $script );
$script_assets = require WC_ADMIN_ABSPATH . WC_ADMIN_DIST_JS_FOLDER . $script_path_name . '/index.min.asset.php';
wp_register_script(
'wc-notices',
self::get_url( 'notices/index', 'js' ),
array(),
$script,
self::get_url( $script_path_name . '/index', 'js' ),
$script_assets ['dependencies'],
$js_file_version,
true
);
wp_register_script(
'wc-number',
self::get_url( 'number/index', 'js' ),
array(),
$js_file_version,
true
);
wp_register_script(
'wc-tracks',
self::get_url( 'tracks/index', 'js' ),
array(),
$js_file_version,
true
);
wp_register_script(
'wc-date',
self::get_url( 'date/index', 'js' ),
array( 'moment', 'wp-date', 'wp-i18n' ),
$js_file_version,
true
);
wp_register_script(
'wc-store-data',
self::get_url( 'data/index', 'js' ),
array( 'wp-data' ),
$js_file_version,
true
);
wp_set_script_translations( 'wc-date', 'woocommerce-admin' );
wp_register_script(
'wc-components',
self::get_url( 'components/index', 'js' ),
array(
'moment',
'wp-api-fetch',
'wp-data',
'wp-data-controls',
'wp-element',
'wp-hooks',
'wp-html-entities',
'wp-i18n',
'wp-keycodes',
'wc-csv',
'wc-currency',
'wc-customer-effort-score',
'wc-date',
'wc-navigation',
// NOTE: This should be removed when Gutenberg is updated and
// the notices package is removed from WooCommerce Admin.
'wc-notices',
'wc-number',
'wc-store-data',
'wp-components',
),
$js_file_version,
true
);
wp_set_script_translations( 'wc-components', 'woocommerce-admin' );
if ( in_array( $script, $translated_scripts, true ) ) {
wp_set_script_translations( $script, 'woocommerce-admin' );
}
}
wp_register_style(
'wc-components',
@ -441,21 +370,6 @@ class Loader {
);
wp_style_add_data( 'wc-customer-effort-score', 'rtl', 'replace' );
wp_register_script(
WC_ADMIN_APP,
self::get_url( 'app/index', 'js' ),
array(
'wp-core-data',
'wp-components',
'wc-components',
'wp-date',
'wp-plugins',
'wc-tracks',
'wc-navigation',
),
$js_file_version,
true
);
wp_localize_script(
WC_ADMIN_APP,
'wcAdminAssets',
@ -465,8 +379,6 @@ class Loader {
)
);
wp_set_script_translations( WC_ADMIN_APP, 'woocommerce-admin' );
// The "app" RTL files are in a different format than the components.
$rtl = is_rtl() ? '.rtl' : '';

View File

@ -13,6 +13,7 @@ const MomentTimezoneDataPlugin = require( 'moment-timezone-data-webpack-plugin'
const TerserPlugin = require( 'terser-webpack-plugin' );
const UnminifyWebpackPlugin = require( './unminify' );
const AsyncChunkSrcVersionParameterPlugin = require( './chunk-src-version-param' );
const WooCommerceDependencyExtractionWebpackPlugin = require( './packages/dependency-extraction-webpack-plugin/src/index' );
/**
* External dependencies
@ -22,28 +23,6 @@ const CustomTemplatedPathPlugin = require( '@wordpress/custom-templated-path-web
const NODE_ENV = process.env.NODE_ENV || 'development';
const WC_ADMIN_PHASE = process.env.WC_ADMIN_PHASE || 'development';
const externals = {
'@wordpress/api-fetch': { this: [ 'wp', 'apiFetch' ] },
'@wordpress/blocks': { this: [ 'wp', 'blocks' ] },
'@wordpress/data': { this: [ 'wp', 'data' ] },
'@wordpress/editor': { this: [ 'wp', 'editor' ] },
'@wordpress/element': { this: [ 'wp', 'element' ] },
'@wordpress/hooks': { this: [ 'wp', 'hooks' ] },
'@wordpress/url': { this: [ 'wp', 'url' ] },
'@wordpress/html-entities': { this: [ 'wp', 'htmlEntities' ] },
'@wordpress/i18n': { this: [ 'wp', 'i18n' ] },
'@wordpress/data-controls': { this: [ 'wp', 'dataControls' ] },
'@wordpress/plugins': { this: [ 'wp', 'plugins' ] },
'@wordpress/components': { this: [ 'wp', 'components' ] },
'@wordpress/date': { this: [ 'wp', 'date' ] },
'@wordpress/compose': { this: [ 'wp', 'compose' ] },
tinymce: 'tinymce',
moment: 'moment',
react: 'React',
lodash: 'lodash',
'react-dom': 'ReactDOM',
};
const wcAdminPackages = [
'components',
'csv-export',
@ -59,14 +38,6 @@ const wcAdminPackages = [
const entryPoints = {};
wcAdminPackages.forEach( ( name ) => {
externals[ `@woocommerce/${ name }` ] = {
this: [
'wc',
name.replace( /-([a-z])/g, ( match, letter ) =>
letter.toUpperCase()
),
],
};
entryPoints[ name ] = `./packages/${ name }`;
} );
@ -107,7 +78,6 @@ const webpackConfig = {
libraryTarget: 'this',
jsonpFunction: '__wcAdmin_webpackJsonp',
},
externals,
module: {
rules: [
{
@ -215,6 +185,7 @@ const webpackConfig = {
transform: ( content ) => content,
} ) )
),
new WooCommerceDependencyExtractionWebpackPlugin(),
new MomentTimezoneDataPlugin( {
startYear: 2000, // This strips out timezone data before the year 2000 to make a smaller file.
} ),