Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: Introduce dataviews component and update webpack. #2497

Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
f177dae
feat: introduce dataviews from dokan free.
MdAsifHossainNadim Dec 31, 2024
eefed6b
feat: introduce dataviews from dokan free.
MdAsifHossainNadim Jan 1, 2025
29c723d
revert: add dokan category comission js.
MdAsifHossainNadim Jan 1, 2025
b423324
update: remove category commission js updates.
MdAsifHossainNadim Jan 1, 2025
5e00deb
remove: revert component package js file.
MdAsifHossainNadim Jan 1, 2025
cb605ad
remove: dokan sidebar class from data view table.
MdAsifHossainNadim Jan 1, 2025
a3852e8
enhance: update dataviews doc.
MdAsifHossainNadim Jan 1, 2025
4915962
update: filter naming convension for dataviews property.
MdAsifHossainNadim Jan 2, 2025
f3d3cc2
remove: module federation node package from json file.
MdAsifHossainNadim Jan 2, 2025
0f89a6b
remove: example dataviews table usage component.
MdAsifHossainNadim Jan 2, 2025
c8bb6e1
remove: example dataviews table usage component.
MdAsifHossainNadim Jan 2, 2025
ec87691
update: button class name for color scheme customizer.
MdAsifHossainNadim Jan 3, 2025
68c108c
update: split webpack entries, use change-case for namespace cases, h…
MdAsifHossainNadim Jan 6, 2025
36d3b9a
Merge branch 'update/vendor-dashboard-structure' into enhance/introdu…
MdAsifHossainNadim Jan 6, 2025
f1dd3df
update: introduce utilities directory, make exporter from dokan free …
MdAsifHossainNadim Jan 7, 2025
cca9989
update: routing folder naming convesional stuff.
MdAsifHossainNadim Jan 8, 2025
6d2d608
update: add component and utilities accessor doc for dokan free.
MdAsifHossainNadim Jan 8, 2025
a8fb22b
Add router param
Aunshon Jan 14, 2025
c84d06d
Merge branch 'refs/heads/update/vendor-dashboard-structure' into enha…
MdAsifHossainNadim Jan 14, 2025
d524e67
fix: add file exists check before register components scripts.
MdAsifHossainNadim Jan 14, 2025
d6d63ed
revert: remove default config from webpack entries.
MdAsifHossainNadim Jan 14, 2025
c12dd7b
Merge branch 'refs/heads/update/vendor-dashboard-structure' into enha…
MdAsifHossainNadim Jan 15, 2025
4d81600
Merge branch 'refs/heads/update/vendor-dashboard-structure' into enha…
MdAsifHossainNadim Jan 17, 2025
c69aadb
enhance: separate hooks & introduce @dokan/hooks.
MdAsifHossainNadim Jan 17, 2025
3241d9a
enhance: add documentation for hooks and update viewport file extension.
MdAsifHossainNadim Jan 17, 2025
6565f41
remove: react components manual enqueue.
MdAsifHossainNadim Jan 20, 2025
08e049f
update: variable name of component assets path.
MdAsifHossainNadim Jan 20, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
816 changes: 816 additions & 0 deletions docs/frontend/dataviews.md

Large diffs are not rendered by default.

52 changes: 35 additions & 17 deletions includes/Assets.php
Original file line number Diff line number Diff line change
Expand Up @@ -363,12 +363,17 @@ public function get_styles() {
'version' => filemtime( DOKAN_DIR . '/assets/css/dokan-admin-product-style.css' ),
],
'dokan-tailwind' => [
'src' => DOKAN_PLUGIN_ASSEST . '/css/dokan-tailwind.css',
'version' => filemtime( DOKAN_DIR . '/assets/css/dokan-tailwind.css' ),
'src' => DOKAN_PLUGIN_ASSEST . '/css/dokan-tailwind.css',
'version' => filemtime( DOKAN_DIR . '/assets/css/dokan-tailwind.css' ),
],
'dokan-react-frontend' => [
'src' => DOKAN_PLUGIN_ASSEST . '/css/frontend.css',
'version' => filemtime( DOKAN_DIR . '/assets/css/frontend.css' ),
'dokan-react-frontend' => [
'src' => DOKAN_PLUGIN_ASSEST . '/css/frontend.css',
'version' => filemtime( DOKAN_DIR . '/assets/css/frontend.css' ),
],
'dokan-react-components' => [
'deps' => [ 'wp-components' ],
'src' => DOKAN_PLUGIN_ASSEST . '/css/components.css',
'version' => filemtime( DOKAN_DIR . '/assets/css/components.css' ),
],
];

Expand All @@ -383,7 +388,10 @@ public function get_styles() {
public function get_scripts() {
global $wp_version;

// Require built assets.
$react_components_asset = require DOKAN_DIR . '/assets/js/components.asset.php';
MdAsifHossainNadim marked this conversation as resolved.
Show resolved Hide resolved
$frontend_shipping_asset = require DOKAN_DIR . '/assets/js/frontend.asset.php';

$suffix = defined( 'SCRIPT_DEBUG' ) && SCRIPT_DEBUG ? '' : '.min';
$asset_url = DOKAN_PLUGIN_ASSEST;
$asset_path = DOKAN_DIR . '/assets/';
Expand Down Expand Up @@ -525,64 +533,68 @@ public function get_scripts() {
'deps' => [ 'jquery', 'wp-i18n', 'dokan-vue-vendor', 'dokan-vue-bootstrap' ],
'version' => filemtime( $asset_path . 'js/vue-frontend.js' ),
],

'dokan-login-form-popup' => [
'dokan-login-form-popup' => [
'src' => $asset_url . '/js/login-form-popup.js',
'deps' => [ 'dokan-modal', 'wp-i18n' ],
'version' => filemtime( $asset_path . 'js/login-form-popup.js' ),
],
'dokan-sweetalert2' => [
'dokan-sweetalert2' => [
'src' => $asset_url . '/vendors/sweetalert2/sweetalert2.all.min.js',
'deps' => [ 'dokan-modal', 'wp-i18n' ],
'version' => filemtime( $asset_path . 'vendors/sweetalert2/sweetalert2.all.min.js' ),
],
'dokan-util-helper' => [
'dokan-util-helper' => [
'src' => $asset_url . '/js/helper.js',
'deps' => [ 'jquery', 'dokan-sweetalert2', 'moment' ],
'version' => filemtime( $asset_path . 'js/helper.js' ),
'in_footer' => false,
],
'dokan-promo-notice-js' => [
'dokan-promo-notice-js' => [
'src' => $asset_url . '/js/dokan-promo-notice.js',
'deps' => [ 'jquery', 'dokan-vue-vendor' ],
'version' => filemtime( $asset_path . 'js/dokan-promo-notice.js' ),
],
'dokan-admin-notice-js' => [
'dokan-admin-notice-js' => [
'src' => $asset_url . '/js/dokan-admin-notice.js',
'deps' => [ 'jquery', 'dokan-vue-vendor' ],
'version' => filemtime( $asset_path . 'js/dokan-admin-notice.js' ),
],
'dokan-reverse-withdrawal' => [
'dokan-reverse-withdrawal' => [
'src' => $asset_url . '/js/reverse-withdrawal.js',
'deps' => [ 'jquery', 'dokan-util-helper', 'dokan-vue-vendor', 'dokan-date-range-picker' ],
'version' => filemtime( $asset_path . 'js/reverse-withdrawal.js' ),
],
'product-category-ui' => [
'product-category-ui' => [
'src' => $asset_url . '/js/product-category-ui.js',
'deps' => [ 'jquery', 'dokan-vue-vendor' ],
'version' => filemtime( $asset_path . 'js/product-category-ui.js' ),
],
'dokan-vendor-address' => [
'dokan-vendor-address' => [
'src' => $asset_url . '/js/vendor-address.js',
'deps' => [ 'jquery', 'wc-address-i18n' ],
'version' => filemtime( $asset_path . 'js/vendor-address.js' ),
],
'dokan-admin-product' => [
'dokan-admin-product' => [
'src' => $asset_url . '/js/dokan-admin-product.js',
'deps' => [ 'jquery', 'dokan-vue-vendor', 'selectWoo' ],
'version' => filemtime( $asset_path . 'js/dokan-admin-product.js' ),
'in_footer' => false,
],
'dokan-frontend' => [
'dokan-frontend' => [
'src' => $asset_url . '/js/dokan-frontend.js',
'deps' => [ 'jquery' ],
'version' => filemtime( $asset_path . 'js/dokan-frontend.js' ),
],
'dokan-react-frontend' => [
'dokan-react-frontend' => [
'src' => $asset_url . '/js/frontend.js',
'deps' => $frontend_shipping_asset['dependencies'],
'version' => $frontend_shipping_asset['version'],
],
'dokan-react-components' => [
'src' => $asset_url . '/js/components.js',
'deps' => $react_components_asset['dependencies'],
'version' => $react_components_asset['version'],
],
];

return $scripts;
Expand Down Expand Up @@ -892,8 +904,14 @@ public function dokan_dashboard_scripts() {
$wc_instance = WCAdminAssets::get_instance();
$wc_instance->register_scripts();

// Enqueue dokan frontend scripts.
wp_enqueue_script( 'dokan-react-frontend' );
wp_enqueue_style( 'dokan-react-frontend' );

// Enqueue dokan react components scripts.
wp_enqueue_script( 'dokan-react-components' );
wp_enqueue_style( 'dokan-react-components' );
MdAsifHossainNadim marked this conversation as resolved.
Show resolved Hide resolved

wp_enqueue_script( 'jquery' );
wp_enqueue_script( 'jquery-ui' );
wp_enqueue_script( 'jquery-ui-autocomplete' );
Expand Down
Loading
Loading