Skip to content

Commit

Permalink
Apply automatic changes
Browse files Browse the repository at this point in the history
Signed-off-by: VF-WP GitHub Actions Bot <[email protected]>
  • Loading branch information
VF-WP GitHub Actions Bot authored and VF-WP GitHub Actions Bot committed Oct 17, 2024
1 parent c88f218 commit 347b6ef
Show file tree
Hide file tree
Showing 14 changed files with 205 additions and 178 deletions.
2 changes: 1 addition & 1 deletion vf-components/vf-componenet-rollup/package.variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ $componentInfo: (
version: "1.0.0-beta.4",
location: "components/vf-componenet-rollup",
vfCoreVersion: "2.2.43",
buildTimeStamp: "Wed, 16 Oct 2024 04:36:11 GMT"
buildTimeStamp: "Thu, 17 Oct 2024 05:37:57 GMT"
);
2 changes: 1 addition & 1 deletion vf-components/vfwp-admin/package.variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ $componentInfo: (
version: "0.0.1",
location: "components/vfwp-admin",
vfCoreVersion: "2.2.43",
buildTimeStamp: "Wed, 16 Oct 2024 04:36:11 GMT"
buildTimeStamp: "Thu, 17 Oct 2024 05:37:57 GMT"
);
2 changes: 1 addition & 1 deletion vf-components/vfwp-autocomplete/package.variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ $componentInfo: (
version: "0.0.1",
location: "components/vfwp-autocomplete",
vfCoreVersion: "2.2.43",
buildTimeStamp: "Wed, 16 Oct 2024 04:36:11 GMT"
buildTimeStamp: "Thu, 17 Oct 2024 05:37:57 GMT"
);
2 changes: 1 addition & 1 deletion vf-components/vfwp-gutenberg-blocks/package.variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ $componentInfo: (
version: "0.0.1",
location: "components/vfwp-gutenberg-blocks",
vfCoreVersion: "2.2.43",
buildTimeStamp: "Wed, 16 Oct 2024 04:36:11 GMT"
buildTimeStamp: "Thu, 17 Oct 2024 05:37:58 GMT"
);
2 changes: 1 addition & 1 deletion vf-components/vfwp-gutenberg-iframe/package.variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ $componentInfo: (
version: "0.0.1",
location: "components/vfwp-gutenberg-iframe",
vfCoreVersion: "2.2.43",
buildTimeStamp: "Wed, 16 Oct 2024 04:36:11 GMT"
buildTimeStamp: "Thu, 17 Oct 2024 05:37:57 GMT"
);
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
* Component: @visual-framework/vf-back-to-top
* Version: 1.0.2
* Location: components/vf-core-components/vf-back-to-top
* Build time: Wed, 16 Oct 2024 04:35:45 GMT
* Build time: Thu, 17 Oct 2024 05:37:32 GMT
*/
.vf-back-to-top {
display: inline;
Expand Down
2 changes: 1 addition & 1 deletion wp-content/themes/vf-wp/assets/assets/vf-flag/vf-flag.css
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
* Component: @visual-framework/vf-flag
* Version: 1.0.0-alpha.2
* Location: components/vf-core-components/vf-flag
* Build time: Wed, 16 Oct 2024 04:35:45 GMT
* Build time: Thu, 17 Oct 2024 05:37:32 GMT
*/
.vf-flag {
display: table;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
* Component: @visual-framework/vf-mega-menu
* Version: 1.0.2
* Location: components/vf-core-components/vf-mega-menu
* Build time: Wed, 16 Oct 2024 04:35:45 GMT
* Build time: Thu, 17 Oct 2024 05:37:32 GMT
*/
.vf-mega-menu__link {
display: -webkit-box;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
* Component: @visual-framework/vf-sidebar
* Version: 1.0.0-alpha.2
* Location: components/vf-core-components/vf-sidebar
* Build time: Wed, 16 Oct 2024 04:35:45 GMT
* Build time: Thu, 17 Oct 2024 05:37:32 GMT
*/
.vf-sidebar {
overflow: hidden;
Expand Down
4 changes: 2 additions & 2 deletions wp-content/themes/vf-wp/assets/assets/vf-table/vf-table.css
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
/* stylelint-enable */
/*!
* Component: @visual-framework/vf-table
* Version: 1.2.0-rc.3
* Version: 1.2.2
* Location: components/vf-core-components/vf-table
*/
.vf-table {
Expand Down Expand Up @@ -214,7 +214,7 @@
}

.vf-table__row--selected {
background-color: #d1e3f6;
background-color: #d1e3f6 !important;
color: #ffffff;
}
.vf-table__row--selected .vf-button {
Expand Down
63 changes: 38 additions & 25 deletions wp-content/themes/vf-wp/assets/assets/vf-table/vf-table.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// vf-table

// Don't need JS? Then feel free to delete this file.

/*
* A note on the Visual Framework and JavaScript:
* The VF is primairly a CSS framework so we've included only a minimal amount
Expand All @@ -16,28 +14,43 @@
* This allows users who would prefer not to have this JS engange on an element
* to drop `data-vf-js-component` and still maintain CSS styling.
*/
function vfTable() {
var checkboxes = document.querySelectorAll("tbody tr input[type=checkbox]");

checkboxes.forEach(function(checkbox) {
checkbox.addEventListener("change", function() {
var tr = checkbox.closest("tr");
if (checkbox.checked) {
tr.classList.add("vf-table__row--selected");
} else {
tr.classList.remove("vf-table__row--selected");
}
});
});

var header_checkboxes = document.querySelectorAll(
".vf-table__heading input[type=checkbox]"
);

// Uncomment this boilerplate
// // if you need to import any other components' JS to use here
// import { vfOthercomponent } from 'vf-other-component/vf-other-component';
//
// /**
// * The global function for this component
// * @example vfcomponentName(firstPassedVar)
// * @param {string} [firstPassedVar] - An option to be passed
// */
// function vfcomponentName(firstPassedVar) {
// firstPassedVar = firstPassedVar || 'defaultVal';
//
// }
//
// // If you need to invoke the component by default
// vfcomponentName();
//
header_checkboxes.forEach(function(header_checkbox) {
header_checkbox.addEventListener("change", function() {
var tbody = header_checkbox.closest("thead").nextElementSibling;
var checkboxes = tbody.querySelectorAll("tr input[type=checkbox]");
if (header_checkbox.checked) {
checkboxes.forEach(function(checkbox) {
checkbox.checked = true;
let event = new Event("change");
checkbox.dispatchEvent(event);
});
} else {
checkboxes.forEach(function(checkbox) {
checkbox.checked = false;
let event = new Event("change");
checkbox.dispatchEvent(event);
});
}
});
});
}
// // By default your component should be usable with js imports
// export { vfcomponentName };
//
// // You should also import it at ./components/vf-core/scripts.js
// // import { vfcomponentName } from '../components/raw/vf-component/vf-component.js';
// // And, if needed, invoke it
// // vfcomponentName();
export { vfTable };
Loading

0 comments on commit 347b6ef

Please sign in to comment.