Changeset 3415798
- Timestamp:
- 12/09/2025 09:05:14 PM (4 months ago)
- Location:
- showcase-creator
- Files:
-
- 93 added
- 21 edited
-
tags/1.1.0 (added)
-
tags/1.1.0/LICENCE (added)
-
tags/1.1.0/block (added)
-
tags/1.1.0/block/block.php (added)
-
tags/1.1.0/block/build (added)
-
tags/1.1.0/block/build/block.json (added)
-
tags/1.1.0/block/build/index.asset.php (added)
-
tags/1.1.0/block/build/index.css (added)
-
tags/1.1.0/block/build/index.css.map (added)
-
tags/1.1.0/block/build/index.js (added)
-
tags/1.1.0/block/build/index.js.map (added)
-
tags/1.1.0/block/build/render.php (added)
-
tags/1.1.0/block/build/style-index.css (added)
-
tags/1.1.0/block/package-lock.json (added)
-
tags/1.1.0/block/package.json (added)
-
tags/1.1.0/block/src (added)
-
tags/1.1.0/block/src/block.json (added)
-
tags/1.1.0/block/src/edit.js (added)
-
tags/1.1.0/block/src/editor.scss (added)
-
tags/1.1.0/block/src/index.js (added)
-
tags/1.1.0/block/src/render.php (added)
-
tags/1.1.0/block/src/style.scss (added)
-
tags/1.1.0/languages (added)
-
tags/1.1.0/readme.txt (added)
-
tags/1.1.0/requirements.txt (added)
-
tags/1.1.0/showcase-creator.php (added)
-
tags/1.1.0/src (added)
-
tags/1.1.0/src/admin.css (added)
-
tags/1.1.0/src/admin.js (added)
-
tags/1.1.0/src/admin.php (added)
-
tags/1.1.0/src/ajax.php (added)
-
tags/1.1.0/src/auto-listing.php (added)
-
tags/1.1.0/src/class-layout-element-type.php (added)
-
tags/1.1.0/src/class-layout-element.php (added)
-
tags/1.1.0/src/class-layout.php (added)
-
tags/1.1.0/src/class-ordered-list.php (added)
-
tags/1.1.0/src/class.php (added)
-
tags/1.1.0/src/default-layouts.json (added)
-
tags/1.1.0/src/frontend.php (added)
-
tags/1.1.0/src/home.js (added)
-
tags/1.1.0/src/home.php (added)
-
tags/1.1.0/src/layout-builder.css (added)
-
tags/1.1.0/src/layout-builder.js (added)
-
tags/1.1.0/src/layout-element-types.php (added)
-
tags/1.1.0/src/layout-importer.js (added)
-
tags/1.1.0/src/layout-library.css (added)
-
tags/1.1.0/src/layout-library.js (added)
-
tags/1.1.0/src/layout-library.php (added)
-
tags/1.1.0/src/layout-scripts.php (added)
-
tags/1.1.0/src/layout.css (added)
-
tags/1.1.0/src/layouts.php (added)
-
tags/1.1.0/src/modules (added)
-
tags/1.1.0/src/modules/content-switch.js (added)
-
tags/1.1.0/src/modules/context-menu.css (added)
-
tags/1.1.0/src/modules/context-menu.js (added)
-
tags/1.1.0/src/modules/dialog.css (added)
-
tags/1.1.0/src/modules/dialog.js (added)
-
tags/1.1.0/src/modules/file-list.css (added)
-
tags/1.1.0/src/modules/file-list.js (added)
-
tags/1.1.0/src/modules/hint.css (added)
-
tags/1.1.0/src/modules/hint.js (added)
-
tags/1.1.0/src/modules/item-list.css (added)
-
tags/1.1.0/src/modules/item-list.js (added)
-
tags/1.1.0/src/modules/lightbox.css (added)
-
tags/1.1.0/src/modules/lightbox.js (added)
-
tags/1.1.0/src/modules/loading.css (added)
-
tags/1.1.0/src/modules/loading.js (added)
-
tags/1.1.0/src/modules/number-input.css (added)
-
tags/1.1.0/src/modules/number-input.js (added)
-
tags/1.1.0/src/modules/select.css (added)
-
tags/1.1.0/src/modules/select.js (added)
-
tags/1.1.0/src/modules/slider.js (added)
-
tags/1.1.0/src/modules/text-input.css (added)
-
tags/1.1.0/src/modules/text-input.js (added)
-
tags/1.1.0/src/modules/toggle.css (added)
-
tags/1.1.0/src/modules/toggle.js (added)
-
tags/1.1.0/src/modules/tokens-input.css (added)
-
tags/1.1.0/src/modules/tokens-input.js (added)
-
tags/1.1.0/src/modules/vid-modules.css (added)
-
tags/1.1.0/src/modules/vid-modules.js (added)
-
tags/1.1.0/src/ordered-lists.js (added)
-
tags/1.1.0/src/ordered-lists.php (added)
-
tags/1.1.0/src/post-meta-box.js (added)
-
tags/1.1.0/src/post-meta-box.php (added)
-
tags/1.1.0/src/rest.php (added)
-
tags/1.1.0/src/settings.js (added)
-
tags/1.1.0/src/settings.php (added)
-
tags/1.1.0/src/template-default.php (added)
-
tags/1.1.0/src/template-preview.php (added)
-
tags/1.1.0/src/testimonial-slider.json (added)
-
tags/1.1.0/src/upgrade.php (added)
-
trunk/block/build/index.asset.php (modified) (1 diff)
-
trunk/block/build/index.css (modified) (1 diff)
-
trunk/block/build/index.js (modified) (24 diffs)
-
trunk/block/build/index.js.map (modified) (1 diff)
-
trunk/block/build/style-index.css (modified) (1 diff)
-
trunk/block/package-lock.json (modified) (2 diffs)
-
trunk/block/package.json (modified) (1 diff)
-
trunk/block/src/edit.js (modified) (26 diffs)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/showcase-creator.php (modified) (3 diffs)
-
trunk/src/admin.js (modified) (1 diff)
-
trunk/src/class-layout-element.php (modified) (1 diff)
-
trunk/src/class.php (modified) (11 diffs)
-
trunk/src/default-layouts.json (modified) (1 diff)
-
trunk/src/layout-builder.js (modified) (6 diffs)
-
trunk/src/layout-element-types.php (modified) (8 diffs)
-
trunk/src/layout-scripts.php (added)
-
trunk/src/layouts.php (modified) (6 diffs)
-
trunk/src/modules/lightbox.js (modified) (6 diffs)
-
trunk/src/modules/number-input.js (modified) (3 diffs)
-
trunk/src/modules/slider.js (modified) (5 diffs)
-
trunk/src/modules/toggle.js (modified) (2 diffs)
-
trunk/src/testimonial-slider.json (added)
Legend:
- Unmodified
- Added
- Removed
-
showcase-creator/trunk/block/build/index.asset.php
r3200055 r3415798 1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => ' 6a0a53114759f61ee353');1 <?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-element', 'wp-i18n'), 'version' => 'cb0c36111ea811c3db86'); -
showcase-creator/trunk/block/build/index.css
r3200055 r3415798 1 /*!**************************************************************************************************************************************************************************************************************************************** ***************************************!*\2 !*** css . ./../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***!3 \**************************************************************************************************************************************************************************************************************************************** ***************************************/1 /*!****************************************************************************************************************************************************************************************************************************************!*\ 2 !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/editor.scss ***! 3 \****************************************************************************************************************************************************************************************************************************************/ 4 4 .wp-block-showcase-creator-showcase { 5 5 border: 1px dashed #E7E9EB; -
showcase-creator/trunk/block/build/index.js
r3200055 r3415798 72 72 */ 73 73 async function loadData(setStatus) { 74 const data = showcaseCreator.data;74 const data = window.showcaseCreator.data; 75 75 data.status = 'pending'; 76 let r = await showcaseCreator.rest();76 let r = await window.showcaseCreator.rest(); 77 77 if (r) { 78 78 data.status = 'ready'; … … 152 152 */ 153 153 async function loadPosts(type, setPosts) { 154 let r = await showcaseCreator.rest({154 let r = await window.showcaseCreator.rest({ 155 155 get: 'posts', 156 156 args: { … … 186 186 187 187 // Tab: Query 188 const SC_Tab_Query = _ref => {188 const Tab_Query = _ref => { 189 189 let { 190 190 attributes, … … 297 297 }); 298 298 } 299 }, "Remove tax. query")))), attributes.postType !== '' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, {299 }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Remove tax. query', 'showcase-creator'))))), attributes.postType !== '' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { 300 300 className: 'sc-wide-button', 301 301 variant: "primary", … … 319 319 320 320 // Tab: Order 321 const SC_Tab_Order = _ref2 => {321 const Tab_Order = _ref2 => { 322 322 let { 323 323 attributes, … … 356 356 357 357 // Tab: Authors 358 const SC_Tab_Authors = _ref3 => {358 const Tab_Authors = _ref3 => { 359 359 let { 360 360 attributes, … … 393 393 394 394 // Tab: Posts 395 const SC_Tab_Posts = _ref4 => {395 const Tab_Posts = _ref4 => { 396 396 let { 397 397 attributes, … … 488 488 489 489 // Tab: Date 490 const SC_Tab_Date = _ref5 => {490 const Tab_Date = _ref5 => { 491 491 let { 492 492 attributes, … … 641 641 642 642 // Tab: Pagination 643 const SC_Tab_Pagination = _ref6 => {643 const Tab_Pagination = _ref6 => { 644 644 let { 645 645 attributes, … … 670 670 671 671 // Tab: More 672 const SC_Tab_More = _ref7 => {672 const Tab_More = _ref7 => { 673 673 let { 674 674 attributes, … … 737 737 * @props initialShouldUpdate - The initial state of the 'Update preview?' toggle. 738 738 */ 739 class SC_Renderextends React.Component {739 class RenderShowcase extends React.Component { 740 740 constructor(props) { 741 741 super(props); … … 755 755 ref.innerHTML = html; 756 756 [...ref.querySelectorAll('a', 'button')].forEach(l => l.href = 'javascript:void(0)'); 757 if (ref.querySelector('.vid-slider') && !ref.querySelector('.vid-slider-inner') && typeof showcaseCreator.modules !== 'undefined' && typeofshowcaseCreator.modules.slider !== 'undefined') {758 this.script = showcaseCreator.modules.slider.mount(ref.querySelector('.vid-slider'));757 if (ref.querySelector('.vid-slider') && !ref.querySelector('.vid-slider-inner') && typeof window.showcaseCreator.modules !== 'undefined' && typeof window.showcaseCreator.modules.slider !== 'undefined') { 758 this.script = window.showcaseCreator.modules.slider.mount(ref.querySelector('.vid-slider')); 759 759 } 760 760 } … … 765 765 } 766 766 this.updating = true; 767 showcaseCreator.rest({767 window.showcaseCreator.rest({ 768 768 get: 'block_preview', 769 769 args: this.props.attributes … … 797 797 } 798 798 componentDidUpdate() { 799 if (! showcaseCreator.isEqual(this.oldAtts, this.props.attributes)) {799 if (!window.showcaseCreator.isEqual(this.oldAtts, this.props.attributes)) { 800 800 this.oldAtts = { 801 801 ...this.props.attributes … … 824 824 } 825 825 } 826 const SC_Loading = () => {826 const Loading = () => { 827 827 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { 828 828 className: "vid-loading-wrapper" … … 830 830 className: "vid-loading" 831 831 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null))); 832 }; 833 const LayoutSelector = _ref8 => { 834 let { 835 attributes, 836 setAttributes 837 } = _ref8; 838 const data = window.showcaseCreator.data; 839 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, { 840 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Layout', 'showcase-creator'), 841 value: attributes.layout, 842 options: [data.layouts.length ? _o('Select a layout', '', true) : _o('No layouts found', '', true), ...data.layouts], 843 onChange: v => setAttributes({ 844 layout: v 845 }) 846 }))); 832 847 }; 833 848 … … 840 855 * @return {WPElement} Element to render. 841 856 */ 842 function Edit(_ref 8) {857 function Edit(_ref9) { 843 858 let { 844 859 attributes, 845 860 setAttributes 846 } = _ref8; 847 const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)(), 848 [posts, setPosts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]), 849 data = showcaseCreator.data, 850 [status, setStatus] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(typeof data === 'object' && 'status' in data ? data.status : false); 851 window.scData = data; 852 window.scPosts = posts; 861 } = _ref9; 862 const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)(); 863 const [posts, setPosts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); 864 const data = window.showcaseCreator.data; 865 const [status, setStatus] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(typeof data === 'object' && 'status' in data ? data.status : false); 866 853 867 // Initiate data loading 854 868 if (!status) { … … 870 884 name: 'query', 871 885 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Taxonomy', 'showcase-creator'), 872 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Tab_Query, {886 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Tab_Query, { 873 887 attributes: attributes, 874 888 setAttributes: setAttributes, … … 879 893 name: 'order', 880 894 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Order', 'showcase-creator'), 881 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Tab_Order, {895 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Tab_Order, { 882 896 attributes: attributes, 883 897 setAttributes: setAttributes, … … 887 901 name: 'authors', 888 902 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Authors', 'showcase-creator'), 889 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Tab_Authors, {903 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Tab_Authors, { 890 904 attributes: attributes, 891 905 setAttributes: setAttributes, … … 895 909 name: 'posts', 896 910 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Posts', 'showcase-creator'), 897 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Tab_Posts, {911 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Tab_Posts, { 898 912 attributes: attributes, 899 913 setAttributes: setAttributes, … … 904 918 name: 'date', 905 919 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Date', 'showcase-creator'), 906 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Tab_Date, {920 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Tab_Date, { 907 921 attributes: attributes, 908 922 setAttributes: setAttributes … … 911 925 name: 'pagination', 912 926 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Paging', 'showcase-creator'), 913 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Tab_Pagination, {927 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Tab_Pagination, { 914 928 attributes: attributes, 915 929 setAttributes: setAttributes … … 918 932 name: 'more', 919 933 title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('More', 'showcase-creator'), 920 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Tab_More, {934 content: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Tab_More, { 921 935 attributes: attributes, 922 936 setAttributes: setAttributes 923 937 }) 924 938 }]; 925 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, status !== 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(SC_Loading, null), status === 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { 926 title: "Layout" 927 }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, { 928 label: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('Layout', 'showcase-creator'), 929 value: attributes.layout, 930 options: [data.layouts.length ? _o('Select a layout', '', true) : _o('No layouts found', '', true), ...data.layouts], 931 onChange: v => setAttributes({ 932 layout: v 933 }) 934 }))), status === 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TabPanel, { 939 return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, status !== 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Loading, null), status === 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(LayoutSelector, { 940 attributes: attributes, 941 setAttributes: setAttributes 942 }), status === 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.TabPanel, { 935 943 className: 'sc-inspector-controls-tab-panel', 936 944 activeClass: "sc-controls-tab-active", 937 945 tabs: tabs 938 }, _ref 9=> {946 }, _ref10 => { 939 947 let { 940 948 content 941 } = _ref 9;949 } = _ref10; 942 950 return content; 943 })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Render, {951 })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RenderShowcase, { 944 952 attributes: attributes, 945 953 initialShouldUpdate: true 946 }), status !== 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)( SC_Loading, null));954 }), status !== 'ready' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Loading, null)); 947 955 } 948 956 -
showcase-creator/trunk/block/build/index.js.map
r3200055 r3415798 1 {"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACqC;AACqD;AAK3D;AACe;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACuB;;AAEvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASkB,EAAEA,CAAEC,KAAK,EAAEC,KAAK,EAAqB;EAAA,IAAnBC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAC1C,IAAIG,MAAM,GAAG;IACZN,KAAK,EAAEnB,mDAAE,CAAEmB,KAAK,EAAE,kBAAkB,CAAE;IACtCC,KAAK,EAAEA;EACR,CAAC;EACD,IAAKC,QAAQ,KAAK,IAAI,EAAG;IACxBI,MAAM,CAACJ,QAAQ,GAAG,IAAI;EACvB;EACA,OAAOI,MAAM;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeC,QAAQA,CAAEC,SAAS,EAAG;EACpC,MAAMC,IAAI,GAAGC, eAAe,CAACD,IAAI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AY,oEAAiB,CAAEC,6CAAa,EAAE;EACjC;AACD;AACA;EACCC,IAAI,EAAEb,gDAAIA;AACX,CAAC,CAAE;;;;;;;;;;;AChCH;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://showcase-creator-block/./src/edit.js","webpack://showcase-creator-block/./src/index.js","webpack://showcase-creator-block/./src/editor.scss","webpack://showcase-creator-block/./src/style.scss","webpack://showcase-creator-block/external window [\"wp\",\"blockEditor\"]","webpack://showcase-creator-block/external window [\"wp\",\"blocks\"]","webpack://showcase-creator-block/external window [\"wp\",\"components\"]","webpack://showcase-creator-block/external window [\"wp\",\"element\"]","webpack://showcase-creator-block/external window [\"wp\",\"i18n\"]","webpack://showcase-creator-block/webpack/bootstrap","webpack://showcase-creator-block/webpack/runtime/chunk loaded","webpack://showcase-creator-block/webpack/runtime/compat get default export","webpack://showcase-creator-block/webpack/runtime/define property getters","webpack://showcase-creator-block/webpack/runtime/hasOwnProperty shorthand","webpack://showcase-creator-block/webpack/runtime/make namespace object","webpack://showcase-creator-block/webpack/runtime/jsonp chunk loading","webpack://showcase-creator-block/webpack/before-startup","webpack://showcase-creator-block/webpack/startup","webpack://showcase-creator-block/webpack/after-startup"],"sourcesContent":["/**\n * Packages.\n * \n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, InspectorControls, BlockControls } from '@wordpress/block-editor';\nimport {\n\tPanel, PanelBody, PanelRow, TabPanel, BaseControl, Button,\n\tTextControl, SelectControl, FormTokenField, ToggleControl,\n\t__experimentalNumberControl as NumberControl, RadioControl\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * Those files can contain any CSS code that gets applied to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './editor.scss';\n\n/**\n * Declaration of block functions and components.\n */\n\n/**\n * Returns a translated option object for use in a SelectControl component.\n * \n * @param {*} label Option label.\n * @param {*} value Option value.\n * @param {*} disabled Is it disabled. Default: false.\n * @returns {Object} Option object for use in SelectControl.\n */\nfunction _o( label, value, disabled = false ) {\n\tlet option = {\n\t\tlabel: __( label, 'showcase-creator' ),\n\t\tvalue: value\n\t};\n\tif ( disabled === true ) {\n\t\toption.disabled = true;\n\t}\n\treturn option;\n}\n\n/**\n * Loads data from REST API.\n * \n * @param { string } setStatus \n * @returns { Array|Promise }\n */\nasync function loadData( setStatus ) {\n\tconst data = showcaseCreator.data;\n\tdata.status = 'pending';\n\tlet r = await showcaseCreator.rest();\n\tif ( r ) {\n\t\tdata.status = 'ready';\n\t} else {\n\t\tloadData( setStatus );\n\t\treturn;\n\t}\n\t\n\t// prepare objects\n\tlet taxs = {}, terms = {};\n\tr.types.map( t => t.name ).forEach( t => taxs[t] = [] );\n\tr.taxs.map( f => f.name ).forEach( t => terms[t] = [] );\n\t\n\t// process layouts\n\tdata.layouts = r.layouts.map( d => {\n\t\treturn { label: d.title, value: d.ID }\n\t} );\n\t\n\t// process types\n\tdata.types = r.types;\n\t\n\t// process taxonomies\n\tr.taxs.forEach( tax => { tax.object_type.forEach( type => {\n\t\tif ( ! ( type in taxs ) ) { taxs[type] = []; }\n\t\ttaxs[type].push( { label: tax.label, value: tax.name } ); } ); } );\n\tdata.taxs = taxs;\n\t\n\t// process terms\n\tr.terms.forEach( t => {\n\t\tif ( ! ( t.taxonomy in terms ) ) {\n\t\t\tterms[t.taxonomy] = [];\n\t\t}\n\t\tterms[t.taxonomy].push( {\n\t\t\tlabel: t.name + (\n\t\t\t\tr.terms.filter( f => f.name === o.name).length > 1 ?\n\t\t\t\t\t' (ID: '+o.id+')' :\n\t\t\t\t\t''\n\t\t\t),\n\t\t\tvalue: t.term_id\n\t\t} );\n\t} );\n\tdata.terms = terms;\n\t\n\t// process authors\n\tdata.authors = r.authors.map( o => { return {\n\t\tlabel: o.name + (\n\t\t\tr.authors.filter( f => f.name === o.name ).length > 1 ?\n\t\t\t\t' (ID: '+o.id+')' :\n\t\t\t\t''\n\t\t),\n\t\tvalue: o.id }\n\t} );\n\t\n\t// process ordered lists\n\tdata.ordered_lists = r.ordered_lists.map( k => {\n\t\treturn { label: k.label, value: k.slug }\n\t} );\n\tsetStatus( data.status );\n\treturn Promise.resolve( data );\n}\n\n/**\n * Fetches posts for the current post type.\n * \n * @param {String} type - current post type.\n * @param {*} setPosts - pass the useState function.\n * @returns {Array|Promise}\n */\nasync function loadPosts( type, setPosts ) {\n\tlet r = await showcaseCreator.rest( {\n\t\tget: 'posts', args: { post_type: type }\n\t} );\n\tif ( ! r || ! ( 'posts' in r ) ) {\n\t\tsetTimeout( () => loadPosts( type, setPosts ), 1000 );\n\t\treturn [];\n\t}\n\tr = await r.posts.map( o => {\n\t\tif ( r.posts.filter( f => f.post_title === o.post_title ).length > 1 ) {\n\t\t\treturn { label: o.post_title + ' (ID: '+ o.ID +')', value: o.ID }\n\t\t} else {\n\t\t\treturn { label: o.post_title, value: o.ID }\n\t\t}\n\t} );\n\tsetPosts( r );\n\treturn Promise.resolve( r );\n}\n\n// Mime type suggestions\nconst mimeSuggestions = [\n\t'image',\n\t'video',\n\t'audio',\n\t'image/jpeg',\n\t'image/pjpeg',\n\t'image/jpeg',\n\t'image/pjpeg',\n\t'image/png',\n\t'image/gif',\n\t'image/x-icon',\n\t'application/pdf',\n\t'application/msword',\n\t'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n\t'application/mspowerpoint',\n\t'application/powerpoint',\n\t'application/vnd.ms-powerpoint',\n\t'application/x-mspowerpoint',\n\t'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n\t'application/mspowerpoint',\n\t'application/vnd.ms-powerpoint',\n\t'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n\t'application/vnd.oasis.opendocument.text',\n\t'application/excel',\n\t'application/vnd.ms-excel',\n\t'application/x-excel',\n\t'application/x-msexcel',\n\t'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n\t'application/octet-stream',\n\t'audio/mpeg3',\n\t'audio/x-mpeg-3',\n\t'video/mpeg',\n\t'video/x-mpeg',\n\t'audio/m4a',\n\t'audio/ogg,',\n\t'audio/wav',\n\t'audio/x-wav',\n\t'video/mp4',\n\t'video/x-m4v',\n\t'video/quicktime',\n\t'video/x-ms-asf',\n\t'video/x-ms-wmv',\n\t'application/x-troff-msvideo',\n\t'video/avi',\n\t'video/msvideo',\n\t'video/x-msvideo',\n\t'audio/mpeg',\n\t'video/mpeg',\n\t'video/ogg',\n\t'video/3gpp',\n\t'audio/3gpp',\n\t'video/3gpp2',\n\t'audio/3gpp2',\n];\n\n// Months\nconst monthOptions = [\n\t_o( '', '' ),\n\t_o( 'Jan', '1' ),\n\t_o( 'Feb', '2' ),\n\t_o( 'Mar', '3' ),\n\t_o( 'Apr', '4' ),\n\t_o( 'May', '5' ),\n\t_o( 'Jun', '6' ),\n\t_o( 'Jul', '7' ),\n\t_o( 'Aug', '8' ),\n\t_o( 'Sep', '9' ),\n\t_o( 'Oct', '10' ),\n\t_o( 'Nov', '11' ),\n\t_o( 'Dec', '12' )\n];\n\n// Tab: Query\nconst SC_Tab_Query = ( { attributes, setAttributes, data, onTypeChange } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Post type', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.postType }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Select a post type', '', true ),\n\t\t\t\t\t\t...data.types.map( ( t ) => {\n\t\t\t\t\t\t\treturn { label: t.label, value: t.name }\n\t\t\t\t\t\t} )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tpostType: v,\n\t\t\t\t\t\t\ttaxQueries: [ { taxonomy: '', terms: [], operator: 'IN' } ]\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tonTypeChange( v );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ attributes.postType === 'attachment' && (\n\t\t\t<PanelRow>\n\t\t\t\t<FormTokenField\n\t\t\t\t\tlabel={ __( 'Mime types', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.mimeTypes }\n\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\tsetAttributes( { mimeTypes: v } );\n\t\t\t\t\t} }\n\t\t\t\t\tsuggestions={ mimeSuggestions }\n\t\t\t\t\ttokenizeOnSpace\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.taxQueries.length > 0 && (\n\t\t\t<ol className={ 'sc-inspector-controls-taxqueries' }>\n\t\t\t\t{\n\t\t\t\t\tattributes.taxQueries.map( ( query, i, all ) =>\n\t\t\t\t\t\t<li key={ i }>\n\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Taxonomy', 'showcase-creator' ) }\n\t\t\t\t\t\t\t\t\tstyle={ { margin: '0' } }\n\t\t\t\t\t\t\t\t\tvalue={ query.taxonomy }\n\t\t\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t\t\t_o( 'Any taxonomy', '', false ),\n\t\t\t\t\t\t\t\t\t\t...(\n\t\t\t\t\t\t\t\t\t\t\tattributes.postType in data.taxs\n\t\t\t\t\t\t\t\t\t\t\t? data.taxs[attributes.postType]\n\t\t\t\t\t\t\t\t\t\t\t: []\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\t\t\t\tlet temp = [...all];\n\t\t\t\t\t\t\t\t\t\ttemp[i].taxonomy = v;\n\t\t\t\t\t\t\t\t\t\ttemp[i].terms = [];\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t\t\t{ query.taxonomy && (\n\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Terms', 'showcase-creator' ) }\n\t\t\t\t\t\t\t\t\tstyle={ { margin: '0' } }\n\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\tquery.terms.map( ( v ) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\tquery.taxonomy in data.terms\n\t\t\t\t\t\t\t\t\t\t\t\t? data.terms[query.taxonomy]\n\t\t\t\t\t\t\t\t\t\t\t\t: [ { label: v, value: v } ]\n\t\t\t\t\t\t\t\t\t\t\t).find( f => f.value === v ).label;\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsuggestions={ (\n\t\t\t\t\t\t\t\t\t\tquery.taxonomy in data.terms\n\t\t\t\t\t\t\t\t\t\t? data.terms[query.taxonomy]\n\t\t\t\t\t\t\t\t\t\t: [ { label: v, value: v } ]\n\t\t\t\t\t\t\t\t\t\t).map( t => t.label )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\t\t\t\tconst terms = data.terms[query.taxonomy];\n\t\t\t\t\t\t\t\t\t\tif ( ! terms ) { return; }\n\t\t\t\t\t\t\t\t\t\tlet taxTerms = terms.map( t => t.label ),\n\t\t\t\t\t\t\t\t\t\t\tfiltered = v\n\t\t\t\t\t\t\t\t\t\t\t\t.filter( f => taxTerms.includes( f ) )\n\t\t\t\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t( l ) => data.terms[query.taxonomy]\n\t\t\t\t\t\t\t\t\t\t\t\t\t.find( f => f.label === l ).value ),\n\t\t\t\t\t\t\t\t\t\t\ttemp = [ ...all ];\n\t\t\t\t\t\t\t\t\t\ttemp[i].terms = filtered;\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } ) } }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelRow> ) }\n\t\t\t\t\t\t\t{ query.taxonomy && (\n\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Operator', 'showcase-creator' ) }\n\t\t\t\t\t\t\t\t\tstyle={ { margin: '0' } }\n\t\t\t\t\t\t\t\t\tvalue={ query.operator }\n\t\t\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t\t\t_o( 'IN any of the selected term(s)', 'IN' ),\n\t\t\t\t\t\t\t\t\t\t_o( 'NOT IN the selected term(s)', 'NOT IN' ),\n\t\t\t\t\t\t\t\t\t\t_o( 'AND - present in all terms', 'AND' )\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\t\t\t\tlet temp = [ ...attributes.taxQueries ];\n\t\t\t\t\t\t\t\t\t\ttemp[i].operator = v;\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelRow> ) }\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\tisDestructive={ true }\n\t\t\t\t\t\t\t\tsize={ 'small' }\n\t\t\t\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t\t\t\t'sc-wide-button',\n\t\t\t\t\t\t\t\t\t'sc-gap-above'\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tlet temp = [ ...attributes.taxQueries ];\n\t\t\t\t\t\t\t\t\ttemp.splice( i,1 );\n\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>Remove tax. query</Button>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</ol> ) }\n\t\t\t{ attributes.postType !== '' && (\n\t\t\t<PanelRow>\n\t\t\t\t<Button\n\t\t\t\t\tclassName={ 'sc-wide-button' }\n\t\t\t\t\tvariant='primary' size={ 'small' }\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttaxQueries: [\n\t\t\t\t\t\t\t\t...attributes.taxQueries,\n\t\t\t\t\t\t\t\t{ taxonomy: '', terms: [], operator: 'IN' }\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t>{ __( 'Add new tax. query', 'showcase-creator' ) }</Button>\n\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.taxQueries.length > 0 && (\n\t\t\t<PanelRow>\n\t\t\t\t<RadioControl\n\t\t\t\t\tlabel={ __( 'Relationship between taxonomies', 'showcase-creator' ) }\n\t\t\t\t\tselected={ attributes.taxRelation }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { taxRelation: v } ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'AND = All must be TRUE', 'AND' ),\n\t\t\t\t\t\t_o( 'OR = at least one must be TRUE', 'OR' )\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t</PanelRow> )}\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Order\nconst SC_Tab_Order = ( { attributes, setAttributes, data } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Order', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.order }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Ascending', 'ASC' ),\n\t\t\t\t\t\t_o( 'Descending', 'DESC' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { order: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Order by', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.orderBy }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Date', 'date' ),\n\t\t\t\t\t\t_o( 'Modified', 'modified' ),\n\t\t\t\t\t\t_o( 'Title', 'title' ),\n\t\t\t\t\t\t_o( 'Author', 'author' ),\n\t\t\t\t\t\t_o( 'Menu order', 'menu_order' ),\n\t\t\t\t\t\t_o( 'Random', 'rand' ),\n\t\t\t\t\t\t_o( 'Meta value (alphabetical)', 'meta_value' ),\n\t\t\t\t\t\t_o( 'Meta value (numeric)', 'meta_value_num' ),\n\t\t\t\t\t\t_o( 'Relevance (search)', 'relevance' ),\n\t\t\t\t\t\t_o( 'Post ID', 'ID' ),\n\t\t\t\t\t\t_o( 'Parent ID', 'parent' ),\n\t\t\t\t\t\t_o( 'Comment count', 'comment_count' ),\n\t\t\t\t\t\t_o( 'Ordered List', 'ordered_list' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { orderBy: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ ( attributes.orderBy === 'ordered_list' ) && (\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Ordered List', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.orderList }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\tdata.ordered_lists.length\n\t\t\t\t\t\t\t? _o( 'Select an Ordered List', '', true )\n\t\t\t\t\t\t\t: _o( 'No Ordered Lists', '', true ),\n\t\t\t\t\t\t...data.ordered_lists\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { orderList: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t\t{ [ 'meta_value_num', 'meta_value' ].includes( attributes.orderBy ) && (\n\t\t\t<PanelRow>\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Meta key', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.metaKey }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { metaKey: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Authors\nconst SC_Tab_Authors = ( { attributes, setAttributes, data } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Author', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.author }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Any author', '' ),\n\t\t\t\t\t\t...data.authors\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { author: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<RadioControl\n\t\t\t\t\tlabel={ __( 'Include / exclude', 'showcase-creator' ) }\n\t\t\t\t\tselected={ attributes.authorIn }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { authorIn: v } ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Include authors', '1' ),\n\t\t\t\t\t\t_o( 'Exclude authors', '0' ),\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<FormTokenField\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tparseInt( attributes.authorIn )\n\t\t\t\t\t\t? __( 'Include authors', 'showcase-creator' )\n\t\t\t\t\t\t: __( 'Exclude authors', 'showcase-creator' )\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\tattributes.authors.map( a => (\n\t\t\t\t\t\t\tdata.authors.find( f => f.value === a )\n\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t).label ).filter( a => a )\n\t\t\t\t\t}\n\t\t\t\t\tsuggestions={ data.authors.map( a => a.label ) }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( {\n\t\t\t\t\t\tauthors: v.map( a => (\n\t\t\t\t\t\t\tdata.authors.find( f => f.label === a )\n\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t).value ).filter( a => a )\n\t\t\t\t\t} ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Posts\nconst SC_Tab_Posts = ( { attributes, setAttributes, posts = [], data = {} } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<BaseControl\n\t\t\t\t\thelp={ __( '-1 to show all posts', 'showcase-creator' ) }\n\t\t\t\t\t__nextHasNoMarginBottom={ true }\n\t\t\t\t>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tlabel={ __( 'Maximum number of posts', 'showcase-creator' ) }\n\t\t\t\t\t\tmin={-1}\n\t\t\t\t\t\tvalue={ Number( attributes.postsToDisplay ) }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tsetAttributes( { postsToDisplay: String( v ) } )\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</BaseControl>\n\t\t\t</PanelRow>\n\t\t\t{ attributes.postType && (\n\t\t\t\t<PanelRow>\n\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\tlabel={ __( 'Posts to include', 'showcase-creator' ) }\n\t\t\t\t\t\t__experimentalExpandOnFocus maxSuggestions={ 5 }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes.includePosts.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\tincludePosts: v.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t} )\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.postType &&\n\t\t\t\tdata.types.find( f => f.name === attributes.postType ).hierarchical && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Top level only?', 'showcase-creator' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Whether to ignore posts that are children of others',\n\t\t\t\t\t\t\t\t'showcase-creator'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tchecked={ attributes.topLevelOnly }\n\t\t\t\t\t\t\tonChange={ ( v ) => setAttributes( { topLevelOnly: v } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t{ attributes.postType &&\n\t\t\t\tdata.types.find( f => f.name === attributes.postType ).hierarchical &&\n\t\t\t\t! attributes.topLevelOnly && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\tlabel={ __( 'Include posts within', 'showcase-creator' ) }\n\t\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tattributes.includeInParents.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\t\tincludeInParents: v.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t\t} )\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t{ ( attributes.includePosts.length ||\n\t\t\t\tattributes.includeInParents.length ) > 0 && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\tlabel={ __( 'Where to put included posts', 'showcase-creator' ) }\n\t\t\t\t\t\t\tselected={ attributes.includePostsWhere }\n\t\t\t\t\t\t\tonChange={ ( v ) => setAttributes( { includePostsWhere: v } ) }\n\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t_o( 'Above', 'above' ),\n\t\t\t\t\t\t\t\t_o( 'Below', 'below' ),\n\t\t\t\t\t\t\t\t_o( 'Amongst', 'among' ),\n\t\t\t\t\t\t\t\t_o( 'Alone', 'alone' )\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t{ attributes.postType && (\n\t\t\t\t<PanelRow>\n\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\tlabel={ __( 'Posts to exclude', 'showcase-creator' ) }\n\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes.excludePosts.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\texcludePosts: v.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t} )\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.postType &&\n\t\t\t\tdata.types.find( f => f.name === attributes.postType ).hierarchical &&\n\t\t\t\t! attributes.topLevelOnly && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\tlabel={ __( 'Exclude posts within', 'showcase-creator' ) }\n\t\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tattributes.excludeInParents.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\t\texcludeInParents: v.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t\t} )\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Ignore sticky posts?', 'showcase-creator' ) }\n\t\t\t\t\tchecked={ attributes.ignoreSticky }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { ignoreSticky: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Date\nconst SC_Tab_Date = ( { attributes, setAttributes } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Posts from', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.dateFilter }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Any date', '' ),\n\t\t\t\t\t\t_o( 'This year', 'year' ),\n\t\t\t\t\t\t_o( 'This month', 'month' ),\n\t\t\t\t\t\t_o( 'This week', 'week' ),\n\t\t\t\t\t\t_o( 'Today', 'today' ),\n\t\t\t\t\t\t_o( 'Year/Month/Day', 'ymd' ),\n\t\t\t\t\t\t_o( 'Some time ago', 'ago' ),\n\t\t\t\t\t\t_o( 'After/Before', 'ab' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { dateFilter: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ [ 'ymd', 'ab' ].includes( attributes.dateFilter ) && (\n\t\t\t<BaseControl\n\t\t\t\tlabel={\n\t\t\t\t\t{\n\t\t\t\t\t\tymd: __( 'a given year, month and/or day', 'showcase-creator' ),\n\t\t\t\t\t\tab: __( 'After this date', 'showcase-creator' )\n\t\t\t\t\t}[attributes.dateFilter]\n\t\t\t\t}\n\t\t\t\thelp={ __( 'Fill in at least one field', 'showcase-creator' ) }\n\t\t\t>\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' } >\n\t\t\t\t\t<TextControl label={ __( 'Year', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'y' in attributes.date ? attributes.date.y : '' }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.y = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Month', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'm' in attributes.date ? attributes.date.m : '' }\n\t\t\t\t\t\toptions={ monthOptions }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.m = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tlabel={ __( 'Day', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'd' in attributes.date ? attributes.date.d : '' }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 31 }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.d = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} } />\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl> ) }\n\t\t\t{ attributes.dateFilter === 'ab' && (\n\t\t\t<BaseControl label={ __( 'Before this date', 'showcase-creator' ) } >\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' } >\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'Year', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'y2' in attributes.date ? attributes.date.y2 : '' }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.y2 = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Month', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ attributes.date[4] }\n\t\t\t\t\t\toptions={ monthOptions }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.m2 = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tlabel={ __( 'Day', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'd2' in attributes.date ? attributes.date.d2 : '' }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 31 }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.d2 = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl> ) }\n\t\t\t{ attributes.dateFilter === 'ago' && (\n\t\t\t<BaseControl label={ __( 'Some time ago', 'showcase-creator' ) } >\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' } >\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tvalue={ 'p' in attributes.date ? attributes.date.p : 'after' }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t_o( 'After', 'after' ),\n\t\t\t\t\t\t\t_o( 'Before', 'before' )\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.p = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tvalue={ 'some' in attributes.date ? attributes.date.some : '1' }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.some = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tvalue={ 'time' in attributes.date ? attributes.date.time : 'year' }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t_o( 'Year(s)', 'year' ),\n\t\t\t\t\t\t\t_o( 'Month(s)', 'month' ),\n\t\t\t\t\t\t\t_o( 'Week(s)', 'week' ),\n\t\t\t\t\t\t\t_o( 'Day(s)', 'day' )\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.time = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl> ) }\n\t\t\t{ attributes.dateFilter && (\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Apply to last modified date?', 'showcase-creator' ) }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'By default, the publication date is used.',\n\t\t\t\t\t\t'showcase-creator'\n\t\t\t\t\t) }\n\t\t\t\t\tchecked={ attributes.dateModified }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { dateModified: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t) }\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Pagination\nconst SC_Tab_Pagination = ( { attributes, setAttributes } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<RadioControl\n\t\t\t\t\tlabel={ __( 'Pagination', 'showcase-creator' ) }\n\t\t\t\t\tonChange={( v ) => setAttributes( { pagination: v } ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'No pagination',\t'disabled' ),\n\t\t\t\t\t\t_o( 'Above posts',\t'above' ),\n\t\t\t\t\t\t_o( 'Below posts',\t'below' ),\n\t\t\t\t\t\t_o( 'Both',\t'both' )\n\t\t\t\t\t] }\n\t\t\t\t\tselected={ attributes.pagination }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ attributes.pagination !== 'disabled' && (\n\t\t\t<PanelRow>\n\t\t\t\t<NumberControl\n\t\t\t\t\tlabel={ __( 'Posts per page', 'showcase-creator' ) }\n\t\t\t\t\tmin={1}\n\t\t\t\t\tvalue={ Number( attributes.postsPerPage ) }\n\t\t\t\t\tonChange={( v ) => setAttributes( { postsPerPage: String( v ) } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t\t<PanelRow>\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Text when no posts found', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.noPostsText }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { noPostsText: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: More\nconst SC_Tab_More = ( { attributes, setAttributes } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'With featured images only', 'showcase-creator' ) }\n\t\t\t\t\tchecked={ attributes.withThumbnail }\n\t\t\t\t\tonChange={ ( v ) => { setAttributes( { withThumbnail: v } ) } }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<BaseControl\n\t\t\t\tlabel={ __( 'Comment count', 'showcase-creator' ) }\n\t\t\t\thelp={ __( 'Leave blank to not count comments', 'showcase-creator' ) }\n\t\t\t>\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' }>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tvalue={ attributes.comments[1] }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t_o( '> (greater than)', '>' ),\n\t\t\t\t\t\t\t_o( '< (less than)', '<' ),\n\t\t\t\t\t\t\t_o( '= (equal to)',\t'=' ),\n\t\t\t\t\t\t\t_o( '!= (not equal to)', '!=' )\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = [ ...attributes.comments ];\n\t\t\t\t\t\t\ttemp[1] = v; setAttributes( { comments: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tmin={0}\n\t\t\t\t\t\tvalue={ attributes.comments[0] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = [ ...attributes.comments ];\n\t\t\t\t\t\t\ttemp[0] = String( v );\n\t\t\t\t\t\t\tsetAttributes( { comments: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl>\n\t\t\t<PanelRow>\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Search', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.search }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { search: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Search mode', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.searchMode }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Standard', 's' ),\n\t\t\t\t\t\t_o( 'In title only', 'search_by_title' ),\n\t\t\t\t\t\t_o( 'Title starts with', 'title_starts_with' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { searchMode: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\thelp={ __( 'Caution: For use in templates only.', 'showcase-creator' ) }\n\t\t\t\t\tlabel={ __( 'Use default query?', 'showcase-creator' ) }\n\t\t\t\t\tchecked={ attributes.wpQuery }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { wpQuery: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n/**\n * Custom Server Side Rendering component.\n * \n * @props attributes - Block attributes.\n * @props initialShouldUpdate - The initial state of the 'Update preview?' toggle.\n */\nclass SC_Render extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.ref = React.createRef();\n\t\tthis.script = null;\n\t\tthis.updating = false;\n\t\tthis.oldAtts = {};\n\t\tthis.state = { css: '', html: '', shouldUpdate: props.initialShouldUpdate };\n\t}\n\tsetHTML( html ) {\n\t\tconst ref = this.ref.current;\n\t\tif ( ref ) {\n\t\t\tref.innerHTML = html;\n\t\t\t[ ...ref.querySelectorAll( 'a', 'button' ) ]\n\t\t\t\t.forEach( ( l ) => l.href = 'javascript:void(0)');\n\t\t\tif (\n\t\t\t\tref.querySelector( '.vid-slider' ) &&\n\t\t\t\t! ref.querySelector( '.vid-slider-inner' ) &&\n\t\t\t\ttypeof showcaseCreator.modules !== 'undefined' &&\n\t\t\t\ttypeof showcaseCreator.modules.slider !== 'undefined'\n\t\t\t) {\n\t\t\t\tthis.script = showcaseCreator.modules.slider.mount( ref.querySelector( '.vid-slider' ) );\n\t\t\t}\n\t\t}\n\t}\n\tupdatePreview() {\n\t\tif ( this.updating || ! this.state.shouldUpdate ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.updating = true;\n\t\tshowcaseCreator.rest( {\n\t\t\tget: 'block_preview',\n\t\t\targs: this.props.attributes\n\t\t} ).then( r => {\n\t\t\tif ( ! r || typeof r.block_preview === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst css = r.block_preview.css;\n\t\t\tconst html = r.block_preview.html;\n\t\t\tthis.setHTML( html );\n\t\t\tthis.setState( { css: css, html: html, shouldUpdate: this.state.shouldUpdate } );\n\t\t\tthis.updating = false;\n\t\t} );\n\t}\n\tonUpdateToggle( v ) {\n\t\tthis.setState( {\n\t\t\tcss: this.state.css,\n\t\t\thtml: this.state.html,\n\t\t\tshouldUpdate: v\n\t\t} );\n\t\tif ( v ) {\n\t\t\tthis.updatePreview();\n\t\t}\n\t}\n\tcomponentDidMount() {\n\t\tthis.updatePreview();\n\t}\n\tcomponentDidUpdate() {\n\t\tif ( ! showcaseCreator.isEqual( this.oldAtts, this.props.attributes ) ) {\n\t\t\tthis.oldAtts = { ...this.props.attributes };\n\t\t\tthis.updatePreview();\n\t\t}\n\t}\n\tcomponentWillUnmount() {\n\t\tthis.script && ( this.script.unmount() );\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<div className={ \"sc-block-preview\" }>\n\t\t\t\t<div className={ \"sc-block-preview-options\" }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Update preview?', 'showcase-creator' ) }\n\t\t\t\t\t\tchecked={ this.state.shouldUpdate }\n\t\t\t\t\t\tonChange={ ( v ) => this.onUpdateToggle( v ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<style className={ \"sc-block-preview-css\" }>{ this.state.css }</style>\n\t\t\t\t<div className={ \"sc-block-preview-html\" } ref={ this.ref }></div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst SC_Loading = () => {\n\treturn (\n\t\t<div className={ \"vid-loading-wrapper\" }>\n\t\t\t<div className={ \"vid-loading\" }>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\n/**\n * The edit function describes the structure of your block in the context of the\n * editor. This represents what the editor will render when the block is used.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit\n *\n * @return {WPElement} Element to render.\n */\nexport default function Edit( { attributes, setAttributes } ) {\n\tconst blockProps = useBlockProps(),\n\t\t\t\t[ posts, setPosts ] = useState( [] ),\n\t\t\t\tdata = showcaseCreator.data,\n\t\t\t\t[ status, setStatus ] = useState(\n\t\t\t\t\ttypeof data === 'object' && 'status' in data ?\n\t\t\t\t\t\tdata.status :\n\t\t\t\t\t\tfalse\n\t\t\t\t);\n\twindow.scData = data;\n\twindow.scPosts = posts;\n\t// Initiate data loading\n\tif ( ! status ) {\n\t\tsetStatus( 'pending' );\n\t\tsetTimeout(\n\t\t\t() => loadData( setStatus ).then(\n\t\t\t\t() => {\n\t\t\t\t\tif ( ! attributes.layout ) {\n\t\t\t\t\t\tsetAttributes( { layout: data.layouts[0].value } );\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! posts.length ) {\n\t\t\t\t\t\tloadPosts( attributes.postType, setPosts );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\t}\n\n\t// Tabs\n\tconst tabs = [\n\t\t{\n\t\t\tname: 'query',\n\t\t\ttitle: __( 'Taxonomy', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<SC_Tab_Query\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tonTypeChange={ ( type ) => loadPosts( type, setPosts ) }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'order',\n\t\t\ttitle: __( 'Order', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<SC_Tab_Order\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'authors',\n\t\t\ttitle: __( 'Authors', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<SC_Tab_Authors\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'posts',\n\t\t\ttitle: __( 'Posts', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<SC_Tab_Posts\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tposts={ posts }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'date',\n\t\t\ttitle: __( 'Date', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<SC_Tab_Date\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'pagination',\n\t\t\ttitle: __( 'Paging', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t<SC_Tab_Pagination\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'more',\n\t\t\ttitle: __( 'More', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<SC_Tab_More\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t},\n\t];\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<InspectorControls>\n\t\t\t\t{ status !== 'ready' && ( <SC_Loading /> ) }\n\t\t\t\t{ status === 'ready' && (\n\t\t\t\t\t<PanelBody title='Layout'>\n\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\tlabel={ __( 'Layout', 'showcase-creator' ) }\n\t\t\t\t\t\t\t\tvalue={ attributes.layout }\n\t\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t\tdata.layouts.length ?\n\t\t\t\t\t\t\t\t\t\t_o( 'Select a layout', '', true ) :\n\t\t\t\t\t\t\t\t\t\t_o( 'No layouts found', '', true ),\n\t\t\t\t\t\t\t\t\t...data.layouts\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\tonChange={ ( v ) => setAttributes( { layout: v } ) }\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t</PanelBody>\n\t\t\t\t) }\n\t\t\t\t{ status === 'ready' && (\n\t\t\t\t\t<TabPanel\n\t\t\t\t\t\tclassName={ 'sc-inspector-controls-tab-panel' }\n\t\t\t\t\t\tactiveClass='sc-controls-tab-active'\n\t\t\t\t\t\ttabs={ tabs }\n\t\t\t\t\t>{\n\t\t\t\t\t\t( { content } ) => content\n\t\t\t\t\t}</TabPanel>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t<SC_Render attributes={ attributes } initialShouldUpdate={ true } />\n\t\t\t{ status !== 'ready' && ( <SC_Loading /> ) }\n\t\t</div>\n\t);\n}\n","/**\n * Registers a new block provided a unique name and an object defining its behavior.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * All files containing `style` keyword are bundled together. The code used\n * gets applied both to the front of your site and to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './style.scss';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit.js';\nimport metadata from './block.json';\n\n/**\n * Every block starts by registering a new block type definition.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nregisterBlockType( metadata.name, {\n\t/**\n\t * @see ./edit.js\n\t */\n\tedit: Edit,\n} );\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkshowcase_creator_block\"] = globalThis[\"webpackChunkshowcase_creator_block\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InspectorControls","BlockControls","Panel","PanelBody","PanelRow","TabPanel","BaseControl","Button","TextControl","SelectControl","FormTokenField","ToggleControl","__experimentalNumberControl","NumberControl","RadioControl","useState","_o","label","value","disabled","arguments","length","undefined","option","loadData","setStatus","data","showcaseCreator","status","r","rest","taxs","terms","types","map","t","name","forEach","f","layouts","d","title","ID","tax","object_type","type","push","taxonomy","filter","o","id","term_id","authors","ordered_lists","k","slug","Promise","resolve","loadPosts","setPosts","get","args","post_type","setTimeout","posts","post_title","mimeSuggestions","monthOptions","SC_Tab_Query","_ref","attributes","setAttributes","onTypeChange","createElement","postType","options","onChange","v","taxQueries","operator","mimeTypes","suggestions","tokenizeOnSpace","className","query","i","all","key","style","margin","temp","find","__experimentalExpandOnFocus","taxTerms","filtered","includes","l","variant","isDestructive","size","onClick","splice","selected","taxRelation","SC_Tab_Order","_ref2","order","orderBy","orderList","metaKey","SC_Tab_Authors","_ref3","author","authorIn","parseInt","maxSuggestions","a","SC_Tab_Posts","_ref4","help","__nextHasNoMarginBottom","min","Number","postsToDisplay","String","includePosts","p","hierarchical","checked","topLevelOnly","includeInParents","includePostsWhere","excludePosts","excludeInParents","ignoreSticky","SC_Tab_Date","_ref5","dateFilter","ymd","ab","date","y","m","max","y2","m2","d2","some","time","dateModified","SC_Tab_Pagination","_ref6","pagination","postsPerPage","noPostsText","SC_Tab_More","_ref7","withThumbnail","comments","search","searchMode","wpQuery","SC_Render","React","Component","constructor","props","ref","createRef","script","updating","oldAtts","state","css","html","shouldUpdate","initialShouldUpdate","setHTML","current","innerHTML","querySelectorAll","href","querySelector","modules","slider","mount","updatePreview","then","block_preview","setState","onUpdateToggle","componentDidMount","componentDidUpdate","isEqual","componentWillUnmount","unmount","render","SC_Loading","Edit","_ref8","blockProps","window","scData","scPosts","layout","tabs","content","activeClass","_ref9","registerBlockType","metadata","edit"],"sourceRoot":""}1 {"version":3,"file":"index.js","mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AACA;AACqC;AACqD;AAK3D;AACe;;AAE9C;AACA;AACA;AACA;AACA;AACA;AACuB;;AAEvB;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASkB,EAAEA,CAAEC,KAAK,EAAEC,KAAK,EAAqB;EAAA,IAAnBC,QAAQ,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,KAAK;EAC1C,IAAIG,MAAM,GAAG;IACZN,KAAK,EAAEnB,mDAAE,CAAEmB,KAAK,EAAE,kBAAkB,CAAE;IACtCC,KAAK,EAAEA;EACR,CAAC;EACD,IAAKC,QAAQ,KAAK,IAAI,EAAG;IACxBI,MAAM,CAACJ,QAAQ,GAAG,IAAI;EACvB;EACA,OAAOI,MAAM;AACd;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeC,QAAQA,CAAEC,SAAS,EAAG;EACpC,MAAMC,IAAI,GAAGC,MAAM,CAACC,eAAe,CAACF,IAAI;EACxCA,IAAI,CAACG,MAAM,GAAG,SAAS;EACvB,IAAIC,CAAC,GAAG,MAAMH,MAAM,CAACC,eAAe,CAACG,IAAI,EAAE;EAC3C,IAAKD,CAAC,EAAG;IACRJ,IAAI,CAACG,MAAM,GAAG,OAAO;EACtB,CAAC,MAAM;IACNL,QAAQ,CAAEC,SAAS,CAAE;IACrB;EACD;;EAEA;EACA,IAAIO,IAAI,GAAG,CAAC,CAAC;IAAEC,KAAK,GAAG,CAAC,CAAC;EACzBH,CAAC,CAACI,KAAK,CAACC,GAAG,CAAEC,CAAC,IAAIA,CAAC,CAACC,IAAI,CAAE,CAACC,OAA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;;;;;AChCH;;;;;;;;;;;;ACAA;;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;ACAA;;;;;;;;;;;;;;;;UCAA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;UAEA;UACA;;;;;WCzBA;WACA;WACA;WACA;WACA,+BAA+B,wCAAwC;WACvE;WACA;WACA;WACA;WACA,iBAAiB,qBAAqB;WACtC;WACA;WACA,kBAAkB,qBAAqB;WACvC;WACA;WACA,KAAK;WACL;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;;;;WC3BA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;WCNA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA,MAAM,qBAAqB;WAC3B;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;WAEA;WACA;WACA;;;;;UEjDA;UACA;UACA;UACA;UACA","sources":["webpack://showcase-creator-block/./src/edit.js","webpack://showcase-creator-block/./src/index.js","webpack://showcase-creator-block/./src/editor.scss","webpack://showcase-creator-block/./src/style.scss","webpack://showcase-creator-block/external window [\"wp\",\"blockEditor\"]","webpack://showcase-creator-block/external window [\"wp\",\"blocks\"]","webpack://showcase-creator-block/external window [\"wp\",\"components\"]","webpack://showcase-creator-block/external window [\"wp\",\"element\"]","webpack://showcase-creator-block/external window [\"wp\",\"i18n\"]","webpack://showcase-creator-block/webpack/bootstrap","webpack://showcase-creator-block/webpack/runtime/chunk loaded","webpack://showcase-creator-block/webpack/runtime/compat get default export","webpack://showcase-creator-block/webpack/runtime/define property getters","webpack://showcase-creator-block/webpack/runtime/hasOwnProperty shorthand","webpack://showcase-creator-block/webpack/runtime/make namespace object","webpack://showcase-creator-block/webpack/runtime/jsonp chunk loading","webpack://showcase-creator-block/webpack/before-startup","webpack://showcase-creator-block/webpack/startup","webpack://showcase-creator-block/webpack/after-startup"],"sourcesContent":["/**\n * Packages.\n * \n * @see https://developer.wordpress.org/block-editor/reference-guides/packages/\n */\nimport { __ } from '@wordpress/i18n';\nimport { useBlockProps, InspectorControls, BlockControls } from '@wordpress/block-editor';\nimport {\n\tPanel, PanelBody, PanelRow, TabPanel, BaseControl, Button,\n\tTextControl, SelectControl, FormTokenField, ToggleControl,\n\t__experimentalNumberControl as NumberControl, RadioControl\n} from '@wordpress/components';\nimport { useState } from '@wordpress/element';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * Those files can contain any CSS code that gets applied to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './editor.scss';\n\n/**\n * Declaration of block functions and components.\n */\n\n/**\n * Returns a translated option object for use in a SelectControl component.\n * \n * @param {*} label Option label.\n * @param {*} value Option value.\n * @param {*} disabled Is it disabled. Default: false.\n * @returns {Object} Option object for use in SelectControl.\n */\nfunction _o( label, value, disabled = false ) {\n\tlet option = {\n\t\tlabel: __( label, 'showcase-creator' ),\n\t\tvalue: value\n\t};\n\tif ( disabled === true ) {\n\t\toption.disabled = true;\n\t}\n\treturn option;\n}\n\n/**\n * Loads data from REST API.\n * \n * @param { string } setStatus \n * @returns { Array|Promise }\n */\nasync function loadData( setStatus ) {\n\tconst data = window.showcaseCreator.data;\n\tdata.status = 'pending';\n\tlet r = await window.showcaseCreator.rest();\n\tif ( r ) {\n\t\tdata.status = 'ready';\n\t} else {\n\t\tloadData( setStatus );\n\t\treturn;\n\t}\n\t\n\t// prepare objects\n\tlet taxs = {}, terms = {};\n\tr.types.map( t => t.name ).forEach( t => taxs[t] = [] );\n\tr.taxs.map( f => f.name ).forEach( t => terms[t] = [] );\n\t\n\t// process layouts\n\tdata.layouts = r.layouts.map( d => {\n\t\treturn { label: d.title, value: d.ID }\n\t} );\n\t\n\t// process types\n\tdata.types = r.types;\n\t\n\t// process taxonomies\n\tr.taxs.forEach( tax => { tax.object_type.forEach( type => {\n\t\tif ( ! ( type in taxs ) ) { taxs[type] = []; }\n\t\ttaxs[type].push( { label: tax.label, value: tax.name } ); } ); } );\n\tdata.taxs = taxs;\n\t\n\t// process terms\n\tr.terms.forEach( t => {\n\t\tif ( ! ( t.taxonomy in terms ) ) {\n\t\t\tterms[t.taxonomy] = [];\n\t\t}\n\t\tterms[t.taxonomy].push( {\n\t\t\tlabel: t.name + (\n\t\t\t\tr.terms.filter( f => f.name === o.name).length > 1 ?\n\t\t\t\t\t' (ID: '+o.id+')' :\n\t\t\t\t\t''\n\t\t\t),\n\t\t\tvalue: t.term_id\n\t\t} );\n\t} );\n\tdata.terms = terms;\n\t\n\t// process authors\n\tdata.authors = r.authors.map( o => { return {\n\t\tlabel: o.name + (\n\t\t\tr.authors.filter( f => f.name === o.name ).length > 1 ?\n\t\t\t\t' (ID: '+o.id+')' :\n\t\t\t\t''\n\t\t),\n\t\tvalue: o.id }\n\t} );\n\t\n\t// process ordered lists\n\tdata.ordered_lists = r.ordered_lists.map( k => {\n\t\treturn { label: k.label, value: k.slug }\n\t} );\n\tsetStatus( data.status );\n\treturn Promise.resolve( data );\n}\n\n/**\n * Fetches posts for the current post type.\n * \n * @param {String} type - current post type.\n * @param {*} setPosts - pass the useState function.\n * @returns {Array|Promise}\n */\nasync function loadPosts( type, setPosts ) {\n\tlet r = await window.showcaseCreator.rest( {\n\t\tget: 'posts', args: { post_type: type }\n\t} );\n\tif ( ! r || ! ( 'posts' in r ) ) {\n\t\tsetTimeout( () => loadPosts( type, setPosts ), 1000 );\n\t\treturn [];\n\t}\n\tr = await r.posts.map( o => {\n\t\tif ( r.posts.filter( f => f.post_title === o.post_title ).length > 1 ) {\n\t\t\treturn { label: o.post_title + ' (ID: '+ o.ID +')', value: o.ID }\n\t\t} else {\n\t\t\treturn { label: o.post_title, value: o.ID }\n\t\t}\n\t} );\n\tsetPosts( r );\n\treturn Promise.resolve( r );\n}\n\n// Mime type suggestions\nconst mimeSuggestions = [\n\t'image',\n\t'video',\n\t'audio',\n\t'image/jpeg',\n\t'image/pjpeg',\n\t'image/jpeg',\n\t'image/pjpeg',\n\t'image/png',\n\t'image/gif',\n\t'image/x-icon',\n\t'application/pdf',\n\t'application/msword',\n\t'application/vnd.openxmlformats-officedocument.wordprocessingml.document',\n\t'application/mspowerpoint',\n\t'application/powerpoint',\n\t'application/vnd.ms-powerpoint',\n\t'application/x-mspowerpoint',\n\t'application/vnd.openxmlformats-officedocument.presentationml.presentation',\n\t'application/mspowerpoint',\n\t'application/vnd.ms-powerpoint',\n\t'application/vnd.openxmlformats-officedocument.presentationml.slideshow',\n\t'application/vnd.oasis.opendocument.text',\n\t'application/excel',\n\t'application/vnd.ms-excel',\n\t'application/x-excel',\n\t'application/x-msexcel',\n\t'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',\n\t'application/octet-stream',\n\t'audio/mpeg3',\n\t'audio/x-mpeg-3',\n\t'video/mpeg',\n\t'video/x-mpeg',\n\t'audio/m4a',\n\t'audio/ogg,',\n\t'audio/wav',\n\t'audio/x-wav',\n\t'video/mp4',\n\t'video/x-m4v',\n\t'video/quicktime',\n\t'video/x-ms-asf',\n\t'video/x-ms-wmv',\n\t'application/x-troff-msvideo',\n\t'video/avi',\n\t'video/msvideo',\n\t'video/x-msvideo',\n\t'audio/mpeg',\n\t'video/mpeg',\n\t'video/ogg',\n\t'video/3gpp',\n\t'audio/3gpp',\n\t'video/3gpp2',\n\t'audio/3gpp2',\n];\n\n// Months\nconst monthOptions = [\n\t_o( '', '' ),\n\t_o( 'Jan', '1' ),\n\t_o( 'Feb', '2' ),\n\t_o( 'Mar', '3' ),\n\t_o( 'Apr', '4' ),\n\t_o( 'May', '5' ),\n\t_o( 'Jun', '6' ),\n\t_o( 'Jul', '7' ),\n\t_o( 'Aug', '8' ),\n\t_o( 'Sep', '9' ),\n\t_o( 'Oct', '10' ),\n\t_o( 'Nov', '11' ),\n\t_o( 'Dec', '12' )\n];\n\n// Tab: Query\nconst Tab_Query = ( { attributes, setAttributes, data, onTypeChange } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Post type', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.postType }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Select a post type', '', true ),\n\t\t\t\t\t\t...data.types.map( ( t ) => {\n\t\t\t\t\t\t\treturn { label: t.label, value: t.name }\n\t\t\t\t\t\t} )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\tpostType: v,\n\t\t\t\t\t\t\ttaxQueries: [ { taxonomy: '', terms: [], operator: 'IN' } ]\n\t\t\t\t\t\t} );\n\t\t\t\t\t\tonTypeChange( v );\n\t\t\t\t\t} }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ attributes.postType === 'attachment' && (\n\t\t\t<PanelRow>\n\t\t\t\t<FormTokenField\n\t\t\t\t\tlabel={ __( 'Mime types', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.mimeTypes }\n\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\tsetAttributes( { mimeTypes: v } );\n\t\t\t\t\t} }\n\t\t\t\t\tsuggestions={ mimeSuggestions }\n\t\t\t\t\ttokenizeOnSpace\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.taxQueries.length > 0 && (\n\t\t\t<ol className={ 'sc-inspector-controls-taxqueries' }>\n\t\t\t\t{\n\t\t\t\t\tattributes.taxQueries.map( ( query, i, all ) =>\n\t\t\t\t\t\t<li key={ i }>\n\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Taxonomy', 'showcase-creator' ) }\n\t\t\t\t\t\t\t\t\tstyle={ { margin: '0' } }\n\t\t\t\t\t\t\t\t\tvalue={ query.taxonomy }\n\t\t\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t\t\t_o( 'Any taxonomy', '', false ),\n\t\t\t\t\t\t\t\t\t\t...(\n\t\t\t\t\t\t\t\t\t\t\tattributes.postType in data.taxs\n\t\t\t\t\t\t\t\t\t\t\t? data.taxs[attributes.postType]\n\t\t\t\t\t\t\t\t\t\t\t: []\n\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\t\t\t\tlet temp = [...all];\n\t\t\t\t\t\t\t\t\t\ttemp[i].taxonomy = v;\n\t\t\t\t\t\t\t\t\t\ttemp[i].terms = [];\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelRow>\n\t\t\t\t\t\t\t{ query.taxonomy && (\n\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Terms', 'showcase-creator' ) }\n\t\t\t\t\t\t\t\t\tstyle={ { margin: '0' } }\n\t\t\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\t\t\tquery.terms.map( ( v ) => {\n\t\t\t\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t\t\t\tquery.taxonomy in data.terms\n\t\t\t\t\t\t\t\t\t\t\t\t? data.terms[query.taxonomy]\n\t\t\t\t\t\t\t\t\t\t\t\t: [ { label: v, value: v } ]\n\t\t\t\t\t\t\t\t\t\t\t).find( f => f.value === v ).label;\n\t\t\t\t\t\t\t\t\t\t} )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tsuggestions={ (\n\t\t\t\t\t\t\t\t\t\tquery.taxonomy in data.terms\n\t\t\t\t\t\t\t\t\t\t? data.terms[query.taxonomy]\n\t\t\t\t\t\t\t\t\t\t: [ { label: v, value: v } ]\n\t\t\t\t\t\t\t\t\t\t).map( t => t.label )\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\t\t\t\tconst terms = data.terms[query.taxonomy];\n\t\t\t\t\t\t\t\t\t\tif ( ! terms ) { return; }\n\t\t\t\t\t\t\t\t\t\tlet taxTerms = terms.map( t => t.label ),\n\t\t\t\t\t\t\t\t\t\t\tfiltered = v\n\t\t\t\t\t\t\t\t\t\t\t\t.filter( f => taxTerms.includes( f ) )\n\t\t\t\t\t\t\t\t\t\t\t\t.map(\n\t\t\t\t\t\t\t\t\t\t\t\t\t( l ) => data.terms[query.taxonomy]\n\t\t\t\t\t\t\t\t\t\t\t\t\t.find( f => f.label === l ).value ),\n\t\t\t\t\t\t\t\t\t\t\ttemp = [ ...all ];\n\t\t\t\t\t\t\t\t\t\ttemp[i].terms = filtered;\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } ) } }\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelRow> ) }\n\t\t\t\t\t\t\t{ query.taxonomy && (\n\t\t\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t\t\t<SelectControl\n\t\t\t\t\t\t\t\t\tlabel={ __( 'Operator', 'showcase-creator' ) }\n\t\t\t\t\t\t\t\t\tstyle={ { margin: '0' } }\n\t\t\t\t\t\t\t\t\tvalue={ query.operator }\n\t\t\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t\t\t_o( 'IN any of the selected term(s)', 'IN' ),\n\t\t\t\t\t\t\t\t\t\t_o( 'NOT IN the selected term(s)', 'NOT IN' ),\n\t\t\t\t\t\t\t\t\t\t_o( 'AND - present in all terms', 'AND' )\n\t\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\t\t\t\tlet temp = [ ...attributes.taxQueries ];\n\t\t\t\t\t\t\t\t\t\ttemp[i].operator = v;\n\t\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } );\n\t\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</PanelRow> ) }\n\t\t\t\t\t\t\t<Button\n\t\t\t\t\t\t\t\tvariant='secondary'\n\t\t\t\t\t\t\t\tisDestructive={ true }\n\t\t\t\t\t\t\t\tsize={ 'small' }\n\t\t\t\t\t\t\t\tclassName={ [\n\t\t\t\t\t\t\t\t\t'sc-wide-button',\n\t\t\t\t\t\t\t\t\t'sc-gap-above'\n\t\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t\t\tonClick={ () => {\n\t\t\t\t\t\t\t\t\tlet temp = [ ...attributes.taxQueries ];\n\t\t\t\t\t\t\t\t\ttemp.splice( i,1 );\n\t\t\t\t\t\t\t\t\tsetAttributes( { taxQueries: temp } );\n\t\t\t\t\t\t\t\t} }\n\t\t\t\t\t\t\t>{ __( 'Remove tax. query', 'showcase-creator' ) }</Button>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t)\n\t\t\t\t}\n\t\t\t</ol> ) }\n\t\t\t{ attributes.postType !== '' && (\n\t\t\t<PanelRow>\n\t\t\t\t<Button\n\t\t\t\t\tclassName={ 'sc-wide-button' }\n\t\t\t\t\tvariant='primary' size={ 'small' }\n\t\t\t\t\tonClick={ () =>\n\t\t\t\t\t\tsetAttributes( {\n\t\t\t\t\t\t\ttaxQueries: [\n\t\t\t\t\t\t\t\t...attributes.taxQueries,\n\t\t\t\t\t\t\t\t{ taxonomy: '', terms: [], operator: 'IN' }\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t} )\n\t\t\t\t\t}\n\t\t\t\t>{ __( 'Add new tax. query', 'showcase-creator' ) }</Button>\n\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.taxQueries.length > 0 && (\n\t\t\t<PanelRow>\n\t\t\t\t<RadioControl\n\t\t\t\t\tlabel={ __( 'Relationship between taxonomies', 'showcase-creator' ) }\n\t\t\t\t\tselected={ attributes.taxRelation }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { taxRelation: v } ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'AND = All must be TRUE', 'AND' ),\n\t\t\t\t\t\t_o( 'OR = at least one must be TRUE', 'OR' )\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t</PanelRow> )}\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Order\nconst Tab_Order = ( { attributes, setAttributes, data } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Order', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.order }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Ascending', 'ASC' ),\n\t\t\t\t\t\t_o( 'Descending', 'DESC' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { order: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Order by', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.orderBy }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Date', 'date' ),\n\t\t\t\t\t\t_o( 'Modified', 'modified' ),\n\t\t\t\t\t\t_o( 'Title', 'title' ),\n\t\t\t\t\t\t_o( 'Author', 'author' ),\n\t\t\t\t\t\t_o( 'Menu order', 'menu_order' ),\n\t\t\t\t\t\t_o( 'Random', 'rand' ),\n\t\t\t\t\t\t_o( 'Meta value (alphabetical)', 'meta_value' ),\n\t\t\t\t\t\t_o( 'Meta value (numeric)', 'meta_value_num' ),\n\t\t\t\t\t\t_o( 'Relevance (search)', 'relevance' ),\n\t\t\t\t\t\t_o( 'Post ID', 'ID' ),\n\t\t\t\t\t\t_o( 'Parent ID', 'parent' ),\n\t\t\t\t\t\t_o( 'Comment count', 'comment_count' ),\n\t\t\t\t\t\t_o( 'Ordered List', 'ordered_list' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { orderBy: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ ( attributes.orderBy === 'ordered_list' ) && (\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Ordered List', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.orderList }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\tdata.ordered_lists.length\n\t\t\t\t\t\t\t? _o( 'Select an Ordered List', '', true )\n\t\t\t\t\t\t\t: _o( 'No Ordered Lists', '', true ),\n\t\t\t\t\t\t...data.ordered_lists\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { orderList: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t\t{ [ 'meta_value_num', 'meta_value' ].includes( attributes.orderBy ) && (\n\t\t\t<PanelRow>\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Meta key', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.metaKey }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { metaKey: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Authors\nconst Tab_Authors = ( { attributes, setAttributes, data } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Author', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.author }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Any author', '' ),\n\t\t\t\t\t\t...data.authors\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { author: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<RadioControl\n\t\t\t\t\tlabel={ __( 'Include / exclude', 'showcase-creator' ) }\n\t\t\t\t\tselected={ attributes.authorIn }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { authorIn: v } ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Include authors', '1' ),\n\t\t\t\t\t\t_o( 'Exclude authors', '0' ),\n\t\t\t\t\t] }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<FormTokenField\n\t\t\t\t\tlabel={\n\t\t\t\t\t\tparseInt( attributes.authorIn )\n\t\t\t\t\t\t? __( 'Include authors', 'showcase-creator' )\n\t\t\t\t\t\t: __( 'Exclude authors', 'showcase-creator' )\n\t\t\t\t\t}\n\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\tvalue={\n\t\t\t\t\t\tattributes.authors.map( a => (\n\t\t\t\t\t\t\tdata.authors.find( f => f.value === a )\n\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t).label ).filter( a => a )\n\t\t\t\t\t}\n\t\t\t\t\tsuggestions={ data.authors.map( a => a.label ) }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( {\n\t\t\t\t\t\tauthors: v.map( a => (\n\t\t\t\t\t\t\tdata.authors.find( f => f.label === a )\n\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t).value ).filter( a => a )\n\t\t\t\t\t} ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Posts\nconst Tab_Posts = ( { attributes, setAttributes, posts = [], data = {} } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<BaseControl\n\t\t\t\t\thelp={ __( '-1 to show all posts', 'showcase-creator' ) }\n\t\t\t\t\t__nextHasNoMarginBottom={ true }\n\t\t\t\t>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tlabel={ __( 'Maximum number of posts', 'showcase-creator' ) }\n\t\t\t\t\t\tmin={-1}\n\t\t\t\t\t\tvalue={ Number( attributes.postsToDisplay ) }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tsetAttributes( { postsToDisplay: String( v ) } )\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</BaseControl>\n\t\t\t</PanelRow>\n\t\t\t{ attributes.postType && (\n\t\t\t\t<PanelRow>\n\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\tlabel={ __( 'Posts to include', 'showcase-creator' ) }\n\t\t\t\t\t\t__experimentalExpandOnFocus maxSuggestions={ 5 }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes.includePosts.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\tincludePosts: v.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t} )\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.postType &&\n\t\t\t\tdata.types.find( f => f.name === attributes.postType ).hierarchical && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\t\tlabel={ __( 'Top level only?', 'showcase-creator' ) }\n\t\t\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t\t\t'Whether to ignore posts that are children of others',\n\t\t\t\t\t\t\t\t'showcase-creator'\n\t\t\t\t\t\t\t) }\n\t\t\t\t\t\t\tchecked={ attributes.topLevelOnly }\n\t\t\t\t\t\t\tonChange={ ( v ) => setAttributes( { topLevelOnly: v } ) }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t{ attributes.postType &&\n\t\t\t\tdata.types.find( f => f.name === attributes.postType ).hierarchical &&\n\t\t\t\t! attributes.topLevelOnly && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\tlabel={ __( 'Include posts within', 'showcase-creator' ) }\n\t\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tattributes.includeInParents.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\t\tincludeInParents: v.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t\t} )\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t{ ( attributes.includePosts.length ||\n\t\t\t\tattributes.includeInParents.length ) > 0 && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<RadioControl\n\t\t\t\t\t\t\tlabel={ __( 'Where to put included posts', 'showcase-creator' ) }\n\t\t\t\t\t\t\tselected={ attributes.includePostsWhere }\n\t\t\t\t\t\t\tonChange={ ( v ) => setAttributes( { includePostsWhere: v } ) }\n\t\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t\t_o( 'Above', 'above' ),\n\t\t\t\t\t\t\t\t_o( 'Below', 'below' ),\n\t\t\t\t\t\t\t\t_o( 'Amongst', 'among' ),\n\t\t\t\t\t\t\t\t_o( 'Alone', 'alone' )\n\t\t\t\t\t\t\t] }\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t{ attributes.postType && (\n\t\t\t\t<PanelRow>\n\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\tlabel={ __( 'Posts to exclude', 'showcase-creator' ) }\n\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\tattributes.excludePosts.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\texcludePosts: v.map( p => (\n\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t} )\t}\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow> ) }\n\t\t\t{ attributes.postType &&\n\t\t\t\tdata.types.find( f => f.name === attributes.postType ).hierarchical &&\n\t\t\t\t! attributes.topLevelOnly && (\n\t\t\t\t\t<PanelRow>\n\t\t\t\t\t\t<FormTokenField\n\t\t\t\t\t\t\tlabel={ __( 'Exclude posts within', 'showcase-creator' ) }\n\t\t\t\t\t\t\t__experimentalExpandOnFocus\n\t\t\t\t\t\t\tmaxSuggestions={ 5 }\n\t\t\t\t\t\t\tvalue={\n\t\t\t\t\t\t\t\tattributes.excludeInParents.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.value === p )\n\t\t\t\t\t\t\t\t\t|| { label: '' }\n\t\t\t\t\t\t\t\t).label ).filter( p => p )\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tsuggestions={ posts.map( p => p.label ) }\n\t\t\t\t\t\t\tonChange={ ( v ) =>\tsetAttributes( {\n\t\t\t\t\t\t\t\texcludeInParents: v.map( p => (\n\t\t\t\t\t\t\t\t\tposts.find( f => f.label === p )\n\t\t\t\t\t\t\t\t\t|| { value: '' }\n\t\t\t\t\t\t\t\t).value\t).filter( p => p )\n\t\t\t\t\t\t\t} )\t}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</PanelRow>\n\t\t\t) }\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Ignore sticky posts?', 'showcase-creator' ) }\n\t\t\t\t\tchecked={ attributes.ignoreSticky }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { ignoreSticky: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Date\nconst Tab_Date = ( { attributes, setAttributes } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Posts from', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.dateFilter }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Any date', '' ),\n\t\t\t\t\t\t_o( 'This year', 'year' ),\n\t\t\t\t\t\t_o( 'This month', 'month' ),\n\t\t\t\t\t\t_o( 'This week', 'week' ),\n\t\t\t\t\t\t_o( 'Today', 'today' ),\n\t\t\t\t\t\t_o( 'Year/Month/Day', 'ymd' ),\n\t\t\t\t\t\t_o( 'Some time ago', 'ago' ),\n\t\t\t\t\t\t_o( 'After/Before', 'ab' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { dateFilter: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ [ 'ymd', 'ab' ].includes( attributes.dateFilter ) && (\n\t\t\t<BaseControl\n\t\t\t\tlabel={\n\t\t\t\t\t{\n\t\t\t\t\t\tymd: __( 'a given year, month and/or day', 'showcase-creator' ),\n\t\t\t\t\t\tab: __( 'After this date', 'showcase-creator' )\n\t\t\t\t\t}[attributes.dateFilter]\n\t\t\t\t}\n\t\t\t\thelp={ __( 'Fill in at least one field', 'showcase-creator' ) }\n\t\t\t>\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' } >\n\t\t\t\t\t<TextControl label={ __( 'Year', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'y' in attributes.date ? attributes.date.y : '' }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.y = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Month', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'm' in attributes.date ? attributes.date.m : '' }\n\t\t\t\t\t\toptions={ monthOptions }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.m = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tlabel={ __( 'Day', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'd' in attributes.date ? attributes.date.d : '' }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 31 }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.d = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} } />\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl> ) }\n\t\t\t{ attributes.dateFilter === 'ab' && (\n\t\t\t<BaseControl label={ __( 'Before this date', 'showcase-creator' ) } >\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' } >\n\t\t\t\t\t<TextControl\n\t\t\t\t\t\tlabel={ __( 'Year', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'y2' in attributes.date ? attributes.date.y2 : '' }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.y2 = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tlabel={ __( 'Month', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ attributes.date[4] }\n\t\t\t\t\t\toptions={ monthOptions }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.m2 = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tlabel={ __( 'Day', 'showcase-creator' ) }\n\t\t\t\t\t\tvalue={ 'd2' in attributes.date ? attributes.date.d2 : '' }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tmax={ 31 }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.d2 = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl> ) }\n\t\t\t{ attributes.dateFilter === 'ago' && (\n\t\t\t<BaseControl label={ __( 'Some time ago', 'showcase-creator' ) } >\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' } >\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tvalue={ 'p' in attributes.date ? attributes.date.p : 'after' }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t_o( 'After', 'after' ),\n\t\t\t\t\t\t\t_o( 'Before', 'before' )\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.p = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tvalue={ 'some' in attributes.date ? attributes.date.some : '1' }\n\t\t\t\t\t\tmin={ 1 }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.some = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tvalue={ 'time' in attributes.date ? attributes.date.time : 'year' }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t_o( 'Year(s)', 'year' ),\n\t\t\t\t\t\t\t_o( 'Month(s)', 'month' ),\n\t\t\t\t\t\t\t_o( 'Week(s)', 'week' ),\n\t\t\t\t\t\t\t_o( 'Day(s)', 'day' )\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = { ...attributes.date };\n\t\t\t\t\t\t\ttemp.time = v;\n\t\t\t\t\t\t\tsetAttributes( { date: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl> ) }\n\t\t\t{ attributes.dateFilter && (\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'Apply to last modified date?', 'showcase-creator' ) }\n\t\t\t\t\thelp={ __(\n\t\t\t\t\t\t'By default, the publication date is used.',\n\t\t\t\t\t\t'showcase-creator'\n\t\t\t\t\t) }\n\t\t\t\t\tchecked={ attributes.dateModified }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { dateModified: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t) }\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: Pagination\nconst Tab_Pagination = ( { attributes, setAttributes } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<RadioControl\n\t\t\t\t\tlabel={ __( 'Pagination', 'showcase-creator' ) }\n\t\t\t\t\tonChange={( v ) => setAttributes( { pagination: v } ) }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'No pagination',\t'disabled' ),\n\t\t\t\t\t\t_o( 'Above posts',\t'above' ),\n\t\t\t\t\t\t_o( 'Below posts',\t'below' ),\n\t\t\t\t\t\t_o( 'Both',\t'both' )\n\t\t\t\t\t] }\n\t\t\t\t\tselected={ attributes.pagination }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t{ attributes.pagination !== 'disabled' && (\n\t\t\t<PanelRow>\n\t\t\t\t<NumberControl\n\t\t\t\t\tlabel={ __( 'Posts per page', 'showcase-creator' ) }\n\t\t\t\t\tmin={1}\n\t\t\t\t\tvalue={ Number( attributes.postsPerPage ) }\n\t\t\t\t\tonChange={( v ) => setAttributes( { postsPerPage: String( v ) } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow> ) }\n\t\t\t<PanelRow>\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Text when no posts found', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.noPostsText }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { noPostsText: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n// Tab: More\nconst Tab_More = ( { attributes, setAttributes } ) => {\n\treturn <Panel>\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\tlabel={ __( 'With featured images only', 'showcase-creator' ) }\n\t\t\t\t\tchecked={ attributes.withThumbnail }\n\t\t\t\t\tonChange={ ( v ) => { setAttributes( { withThumbnail: v } ) } }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<BaseControl\n\t\t\t\tlabel={ __( 'Comment count', 'showcase-creator' ) }\n\t\t\t\thelp={ __( 'Leave blank to not count comments', 'showcase-creator' ) }\n\t\t\t>\n\t\t\t\t<PanelRow className={ 'sc-inspector-controls-row-gap' }>\n\t\t\t\t\t<SelectControl\n\t\t\t\t\t\tvalue={ attributes.comments[1] }\n\t\t\t\t\t\toptions={ [\n\t\t\t\t\t\t\t_o( '> (greater than)', '>' ),\n\t\t\t\t\t\t\t_o( '< (less than)', '<' ),\n\t\t\t\t\t\t\t_o( '= (equal to)',\t'=' ),\n\t\t\t\t\t\t\t_o( '!= (not equal to)', '!=' )\n\t\t\t\t\t\t] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = [ ...attributes.comments ];\n\t\t\t\t\t\t\ttemp[1] = v; setAttributes( { comments: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t\t<NumberControl\n\t\t\t\t\t\tmin={0}\n\t\t\t\t\t\tvalue={ attributes.comments[0] }\n\t\t\t\t\t\tonChange={ ( v ) => {\n\t\t\t\t\t\t\tlet temp = [ ...attributes.comments ];\n\t\t\t\t\t\t\ttemp[0] = String( v );\n\t\t\t\t\t\t\tsetAttributes( { comments: temp } );\n\t\t\t\t\t\t} }\n\t\t\t\t\t/>\n\t\t\t\t</PanelRow>\n\t\t\t</BaseControl>\n\t\t\t<PanelRow>\n\t\t\t\t<TextControl\n\t\t\t\t\tlabel={ __( 'Search', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.search }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { search: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Search mode', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.searchMode }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\t_o( 'Standard', 's' ),\n\t\t\t\t\t\t_o( 'In title only', 'search_by_title' ),\n\t\t\t\t\t\t_o( 'Title starts with', 'title_starts_with' )\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { searchMode: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t\t<PanelRow>\n\t\t\t\t<ToggleControl\n\t\t\t\t\thelp={ __( 'Caution: For use in templates only.', 'showcase-creator' ) }\n\t\t\t\t\tlabel={ __( 'Use default query?', 'showcase-creator' ) }\n\t\t\t\t\tchecked={ attributes.wpQuery }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { wpQuery: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t</Panel>\n}\n\n/**\n * Custom Server Side Rendering component.\n * \n * @props attributes - Block attributes.\n * @props initialShouldUpdate - The initial state of the 'Update preview?' toggle.\n */\nclass RenderShowcase extends React.Component {\n\tconstructor( props ) {\n\t\tsuper( props );\n\t\tthis.ref = React.createRef();\n\t\tthis.script = null;\n\t\tthis.updating = false;\n\t\tthis.oldAtts = {};\n\t\tthis.state = { css: '', html: '', shouldUpdate: props.initialShouldUpdate };\n\t}\n\tsetHTML( html ) {\n\t\tconst ref = this.ref.current;\n\t\tif ( ref ) {\n\t\t\tref.innerHTML = html;\n\t\t\t[ ...ref.querySelectorAll( 'a', 'button' ) ]\n\t\t\t\t.forEach( ( l ) => l.href = 'javascript:void(0)');\n\t\t\tif (\n\t\t\t\tref.querySelector( '.vid-slider' ) &&\n\t\t\t\t! ref.querySelector( '.vid-slider-inner' ) &&\n\t\t\t\ttypeof window.showcaseCreator.modules !== 'undefined' &&\n\t\t\t\ttypeof window.showcaseCreator.modules.slider !== 'undefined'\n\t\t\t) {\n\t\t\t\tthis.script = window.showcaseCreator.modules.slider.mount( ref.querySelector( '.vid-slider' ) );\n\t\t\t}\n\t\t}\n\t}\n\tupdatePreview() {\n\t\tif ( this.updating || ! this.state.shouldUpdate ) {\n\t\t\treturn;\n\t\t}\n\t\tthis.updating = true;\n\t\twindow.showcaseCreator.rest( {\n\t\t\tget: 'block_preview',\n\t\t\targs: this.props.attributes\n\t\t} ).then( r => {\n\t\t\tif ( ! r || typeof r.block_preview === 'undefined' ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst css = r.block_preview.css;\n\t\t\tconst html = r.block_preview.html;\n\t\t\tthis.setHTML( html );\n\t\t\tthis.setState( { css: css, html: html, shouldUpdate: this.state.shouldUpdate } );\n\t\t\tthis.updating = false;\n\t\t} );\n\t}\n\tonUpdateToggle( v ) {\n\t\tthis.setState( {\n\t\t\tcss: this.state.css,\n\t\t\thtml: this.state.html,\n\t\t\tshouldUpdate: v\n\t\t} );\n\t\tif ( v ) {\n\t\t\tthis.updatePreview();\n\t\t}\n\t}\n\tcomponentDidMount() {\n\t\tthis.updatePreview();\n\t}\n\tcomponentDidUpdate() {\n\t\tif ( ! window.showcaseCreator.isEqual( this.oldAtts, this.props.attributes ) ) {\n\t\t\tthis.oldAtts = { ...this.props.attributes };\n\t\t\tthis.updatePreview();\n\t\t}\n\t}\n\tcomponentWillUnmount() {\n\t\tthis.script && ( this.script.unmount() );\n\t}\n\trender() {\n\t\treturn (\n\t\t\t<div className={ \"sc-block-preview\" }>\n\t\t\t\t<div className={ \"sc-block-preview-options\" }>\n\t\t\t\t\t<ToggleControl\n\t\t\t\t\t\tlabel={ __( 'Update preview?', 'showcase-creator' ) }\n\t\t\t\t\t\tchecked={ this.state.shouldUpdate }\n\t\t\t\t\t\tonChange={ ( v ) => this.onUpdateToggle( v ) }\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t\t<style className={ \"sc-block-preview-css\" }>{ this.state.css }</style>\n\t\t\t\t<div className={ \"sc-block-preview-html\" } ref={ this.ref }></div>\n\t\t\t</div>\n\t\t);\n\t}\n}\n\nconst Loading = () => {\n\treturn (\n\t\t<div className={ \"vid-loading-wrapper\" }>\n\t\t\t<div className={ \"vid-loading\" }>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t\t<div></div>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nconst LayoutSelector = ( { attributes, setAttributes } ) => {\n\tconst data = window.showcaseCreator.data;\n\treturn (\n\t\t<PanelBody>\n\t\t\t<PanelRow>\n\t\t\t\t<SelectControl\n\t\t\t\t\tlabel={ __( 'Layout', 'showcase-creator' ) }\n\t\t\t\t\tvalue={ attributes.layout }\n\t\t\t\t\toptions={ [\n\t\t\t\t\t\tdata.layouts.length ?\n\t\t\t\t\t\t\t_o( 'Select a layout', '', true ) :\n\t\t\t\t\t\t\t_o( 'No layouts found', '', true ),\n\t\t\t\t\t\t...data.layouts\n\t\t\t\t\t] }\n\t\t\t\t\tonChange={ ( v ) => setAttributes( { layout: v } ) }\n\t\t\t\t/>\n\t\t\t</PanelRow>\n\t\t</PanelBody>\n\t);\n}\n\n/**\n * The edit function describes the structure of your block in the context of the\n * editor. This represents what the editor will render when the block is used.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-edit-save/#edit\n *\n * @return {WPElement} Element to render.\n */\nexport default function Edit( { attributes, setAttributes } ) {\n\tconst blockProps = useBlockProps();\n\tconst [ posts, setPosts ] = useState( [] );\n\tconst data = window.showcaseCreator.data;\n\tconst [ status, setStatus ] = useState(\n\t\ttypeof data === 'object' && 'status' in data ?\n\t\t\tdata.status :\n\t\t\tfalse\n\t);\n\n\t// Initiate data loading\n\tif ( ! status ) {\n\t\tsetStatus( 'pending' );\n\t\tsetTimeout(\n\t\t\t() => loadData( setStatus ).then(\n\t\t\t\t() => {\n\t\t\t\t\tif ( ! attributes.layout ) {\n\t\t\t\t\t\tsetAttributes( { layout: data.layouts[0].value } );\n\t\t\t\t\t}\n\t\t\t\t\tif ( ! posts.length ) {\n\t\t\t\t\t\tloadPosts( attributes.postType, setPosts );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t)\n\t\t);\n\t}\n\n\t// Tabs\n\tconst tabs = [\n\t\t{\n\t\t\tname: 'query',\n\t\t\ttitle: __( 'Taxonomy', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<Tab_Query\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tonTypeChange={ ( type ) => loadPosts( type, setPosts ) }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'order',\n\t\t\ttitle: __( 'Order', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<Tab_Order\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'authors',\n\t\t\ttitle: __( 'Authors', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<Tab_Authors\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'posts',\n\t\t\ttitle: __( 'Posts', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<Tab_Posts\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t\tdata={ data }\n\t\t\t\t\tposts={ posts }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'date',\n\t\t\ttitle: __( 'Date', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<Tab_Date\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'pagination',\n\t\t\ttitle: __( 'Paging', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t<Tab_Pagination\n\t\t\tattributes={ attributes }\n\t\t\tsetAttributes={ setAttributes }\n\t\t\t/>\n\t\t},\n\t\t{\n\t\t\tname: 'more',\n\t\t\ttitle: __( 'More', 'showcase-creator' ),\n\t\t\tcontent:\n\t\t\t\t<Tab_More\n\t\t\t\t\tattributes={ attributes }\n\t\t\t\t\tsetAttributes={ setAttributes }\n\t\t\t\t/>\n\t\t},\n\t];\n\n\treturn (\n\t\t<div { ...blockProps }>\n\t\t\t<InspectorControls>\n\t\t\t\t{ status !== 'ready' && ( <Loading /> ) }\n\t\t\t\t{ status === 'ready' && (\n\t\t\t\t\t<LayoutSelector attributes={ attributes } setAttributes={ setAttributes } />\n\t\t\t\t) }\n\t\t\t\t{ status === 'ready' && (\n\t\t\t\t\t<TabPanel\n\t\t\t\t\t\tclassName={ 'sc-inspector-controls-tab-panel' }\n\t\t\t\t\t\tactiveClass='sc-controls-tab-active'\n\t\t\t\t\t\ttabs={ tabs }\n\t\t\t\t\t>{\n\t\t\t\t\t\t( { content } ) => content\n\t\t\t\t\t}</TabPanel>\n\t\t\t\t) }\n\t\t\t</InspectorControls>\n\t\t\t<RenderShowcase attributes={ attributes } initialShouldUpdate={ true } />\n\t\t\t{ status !== 'ready' && ( <Loading /> ) }\n\t\t</div>\n\t);\n}\n","/**\n * Registers a new block provided a unique name and an object defining its behavior.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nimport { registerBlockType } from '@wordpress/blocks';\n\n/**\n * Lets webpack process CSS, SASS or SCSS files referenced in JavaScript files.\n * All files containing `style` keyword are bundled together. The code used\n * gets applied both to the front of your site and to the editor.\n *\n * @see https://www.npmjs.com/package/@wordpress/scripts#using-css\n */\nimport './style.scss';\n\n/**\n * Internal dependencies\n */\nimport Edit from './edit.js';\nimport metadata from './block.json';\n\n/**\n * Every block starts by registering a new block type definition.\n *\n * @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/\n */\nregisterBlockType( metadata.name, {\n\t/**\n\t * @see ./edit.js\n\t */\n\tedit: Edit,\n} );\n","// extracted by mini-css-extract-plugin\nexport {};","// extracted by mini-css-extract-plugin\nexport {};","module.exports = window[\"wp\"][\"blockEditor\"];","module.exports = window[\"wp\"][\"blocks\"];","module.exports = window[\"wp\"][\"components\"];","module.exports = window[\"wp\"][\"element\"];","module.exports = window[\"wp\"][\"i18n\"];","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n// expose the modules object (__webpack_modules__)\n__webpack_require__.m = __webpack_modules__;\n\n","var deferred = [];\n__webpack_require__.O = (result, chunkIds, fn, priority) => {\n\tif(chunkIds) {\n\t\tpriority = priority || 0;\n\t\tfor(var i = deferred.length; i > 0 && deferred[i - 1][2] > priority; i--) deferred[i] = deferred[i - 1];\n\t\tdeferred[i] = [chunkIds, fn, priority];\n\t\treturn;\n\t}\n\tvar notFulfilled = Infinity;\n\tfor (var i = 0; i < deferred.length; i++) {\n\t\tvar [chunkIds, fn, priority] = deferred[i];\n\t\tvar fulfilled = true;\n\t\tfor (var j = 0; j < chunkIds.length; j++) {\n\t\t\tif ((priority & 1 === 0 || notFulfilled >= priority) && Object.keys(__webpack_require__.O).every((key) => (__webpack_require__.O[key](chunkIds[j])))) {\n\t\t\t\tchunkIds.splice(j--, 1);\n\t\t\t} else {\n\t\t\t\tfulfilled = false;\n\t\t\t\tif(priority < notFulfilled) notFulfilled = priority;\n\t\t\t}\n\t\t}\n\t\tif(fulfilled) {\n\t\t\tdeferred.splice(i--, 1)\n\t\t\tvar r = fn();\n\t\t\tif (r !== undefined) result = r;\n\t\t}\n\t}\n\treturn result;\n};","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","// no baseURI\n\n// object to store loaded and loading chunks\n// undefined = chunk not loaded, null = chunk preloaded/prefetched\n// [resolve, reject, Promise] = chunk loading, 0 = chunk loaded\nvar installedChunks = {\n\t\"index\": 0,\n\t\"./style-index\": 0\n};\n\n// no chunk on demand loading\n\n// no prefetching\n\n// no preloaded\n\n// no HMR\n\n// no HMR manifest\n\n__webpack_require__.O.j = (chunkId) => (installedChunks[chunkId] === 0);\n\n// install a JSONP callback for chunk loading\nvar webpackJsonpCallback = (parentChunkLoadingFunction, data) => {\n\tvar [chunkIds, moreModules, runtime] = data;\n\t// add \"moreModules\" to the modules object,\n\t// then flag all \"chunkIds\" as loaded and fire callback\n\tvar moduleId, chunkId, i = 0;\n\tif(chunkIds.some((id) => (installedChunks[id] !== 0))) {\n\t\tfor(moduleId in moreModules) {\n\t\t\tif(__webpack_require__.o(moreModules, moduleId)) {\n\t\t\t\t__webpack_require__.m[moduleId] = moreModules[moduleId];\n\t\t\t}\n\t\t}\n\t\tif(runtime) var result = runtime(__webpack_require__);\n\t}\n\tif(parentChunkLoadingFunction) parentChunkLoadingFunction(data);\n\tfor(;i < chunkIds.length; i++) {\n\t\tchunkId = chunkIds[i];\n\t\tif(__webpack_require__.o(installedChunks, chunkId) && installedChunks[chunkId]) {\n\t\t\tinstalledChunks[chunkId][0]();\n\t\t}\n\t\tinstalledChunks[chunkId] = 0;\n\t}\n\treturn __webpack_require__.O(result);\n}\n\nvar chunkLoadingGlobal = globalThis[\"webpackChunkshowcase_creator_block\"] = globalThis[\"webpackChunkshowcase_creator_block\"] || [];\nchunkLoadingGlobal.forEach(webpackJsonpCallback.bind(null, 0));\nchunkLoadingGlobal.push = webpackJsonpCallback.bind(null, chunkLoadingGlobal.push.bind(chunkLoadingGlobal));","","// startup\n// Load entry module and return exports\n// This entry module depends on other loaded chunks and execution need to be delayed\nvar __webpack_exports__ = __webpack_require__.O(undefined, [\"./style-index\"], () => (__webpack_require__(\"./src/index.js\")))\n__webpack_exports__ = __webpack_require__.O(__webpack_exports__);\n",""],"names":["__","useBlockProps","InspectorControls","BlockControls","Panel","PanelBody","PanelRow","TabPanel","BaseControl","Button","TextControl","SelectControl","FormTokenField","ToggleControl","__experimentalNumberControl","NumberControl","RadioControl","useState","_o","label","value","disabled","arguments","length","undefined","option","loadData","setStatus","data","window","showcaseCreator","status","r","rest","taxs","terms","types","map","t","name","forEach","f","layouts","d","title","ID","tax","object_type","type","push","taxonomy","filter","o","id","term_id","authors","ordered_lists","k","slug","Promise","resolve","loadPosts","setPosts","get","args","post_type","setTimeout","posts","post_title","mimeSuggestions","monthOptions","Tab_Query","_ref","attributes","setAttributes","onTypeChange","createElement","postType","options","onChange","v","taxQueries","operator","mimeTypes","suggestions","tokenizeOnSpace","className","query","i","all","key","style","margin","temp","find","__experimentalExpandOnFocus","taxTerms","filtered","includes","l","variant","isDestructive","size","onClick","splice","selected","taxRelation","Tab_Order","_ref2","order","orderBy","orderList","metaKey","Tab_Authors","_ref3","author","authorIn","parseInt","maxSuggestions","a","Tab_Posts","_ref4","help","__nextHasNoMarginBottom","min","Number","postsToDisplay","String","includePosts","p","hierarchical","checked","topLevelOnly","includeInParents","includePostsWhere","excludePosts","excludeInParents","ignoreSticky","Tab_Date","_ref5","dateFilter","ymd","ab","date","y","m","max","y2","m2","d2","some","time","dateModified","Tab_Pagination","_ref6","pagination","postsPerPage","noPostsText","Tab_More","_ref7","withThumbnail","comments","search","searchMode","wpQuery","RenderShowcase","React","Component","constructor","props","ref","createRef","script","updating","oldAtts","state","css","html","shouldUpdate","initialShouldUpdate","setHTML","current","innerHTML","querySelectorAll","href","querySelector","modules","slider","mount","updatePreview","then","block_preview","setState","onUpdateToggle","componentDidMount","componentDidUpdate","isEqual","componentWillUnmount","unmount","render","Loading","LayoutSelector","_ref8","layout","Edit","_ref9","blockProps","tabs","content","activeClass","_ref10","registerBlockType","metadata","edit"],"sourceRoot":""} -
showcase-creator/trunk/block/build/style-index.css
r3200055 r3415798 1 /*!*************************************************************************************************************************************************************************************************************************************** ***************************************!*\2 !*** css . ./../../../../node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!../../../../../node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!../../../../../node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***!3 \*************************************************************************************************************************************************************************************************************************************** ***************************************/1 /*!***************************************************************************************************************************************************************************************************************************************!*\ 2 !*** css ./node_modules/css-loader/dist/cjs.js??ruleSet[1].rules[4].use[1]!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[4].use[2]!./node_modules/sass-loader/dist/cjs.js??ruleSet[1].rules[4].use[3]!./src/style.scss ***! 3 \***************************************************************************************************************************************************************************************************************************************/ 4 4 -
showcase-creator/trunk/block/package-lock.json
r3190704 r3415798 14 14 }, 15 15 "devDependencies": { 16 "@wordpress/scripts": "^25.5. 0"16 "@wordpress/scripts": "^25.5.1" 17 17 } 18 18 }, … … 4360 4360 }, 4361 4361 "node_modules/@wordpress/scripts": { 4362 "version": "25.5.0", 4363 "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-25.5.0.tgz", 4364 "integrity": "sha512-Q4hy4R4PLhx+VOcwbG4CEvyEhEC8SI8tALjmblkYrApVgxTV/9MQPIqMHtHW0Gbh7/jSlkNBmGOlvo9m7W4Icg==", 4365 "dev": true, 4362 "version": "25.5.1", 4363 "resolved": "https://registry.npmjs.org/@wordpress/scripts/-/scripts-25.5.1.tgz", 4364 "integrity": "sha512-tQiOokRzjZnBE5TIsl5LVJGtsRFHS0IiT54+ERJaF7TZcAlCZhF5pI+sSMPpJunbtwzI2n02iq7I/uaDS5BiFQ==", 4365 "dev": true, 4366 "license": "GPL-2.0-or-later", 4366 4367 "dependencies": { 4367 4368 "@babel/core": "^7.16.0", -
showcase-creator/trunk/block/package.json
r3190704 r3415798 17 17 }, 18 18 "devDependencies": { 19 "@wordpress/scripts": "^25.5. 0"19 "@wordpress/scripts": "^25.5.1" 20 20 }, 21 21 "dependencies": { -
showcase-creator/trunk/block/src/edit.js
r3200055 r3415798 51 51 */ 52 52 async function loadData( setStatus ) { 53 const data = showcaseCreator.data;53 const data = window.showcaseCreator.data; 54 54 data.status = 'pending'; 55 let r = await showcaseCreator.rest();55 let r = await window.showcaseCreator.rest(); 56 56 if ( r ) { 57 57 data.status = 'ready'; … … 122 122 */ 123 123 async function loadPosts( type, setPosts ) { 124 let r = await showcaseCreator.rest( {124 let r = await window.showcaseCreator.rest( { 125 125 get: 'posts', args: { post_type: type } 126 126 } ); … … 214 214 215 215 // Tab: Query 216 const SC_Tab_Query = ( { attributes, setAttributes, data, onTypeChange } ) => {216 const Tab_Query = ( { attributes, setAttributes, data, onTypeChange } ) => { 217 217 return <Panel> 218 218 <PanelBody> … … 340 340 setAttributes( { taxQueries: temp } ); 341 341 } } 342 > Remove tax. query</Button>342 >{ __( 'Remove tax. query', 'showcase-creator' ) }</Button> 343 343 </li> 344 344 ) … … 377 377 378 378 // Tab: Order 379 const SC_Tab_Order = ( { attributes, setAttributes, data } ) => {379 const Tab_Order = ( { attributes, setAttributes, data } ) => { 380 380 return <Panel> 381 381 <PanelBody> … … 440 440 441 441 // Tab: Authors 442 const SC_Tab_Authors = ( { attributes, setAttributes, data } ) => {442 const Tab_Authors = ( { attributes, setAttributes, data } ) => { 443 443 return <Panel> 444 444 <PanelBody> … … 494 494 495 495 // Tab: Posts 496 const SC_Tab_Posts = ( { attributes, setAttributes, posts = [], data = {} } ) => {496 const Tab_Posts = ( { attributes, setAttributes, posts = [], data = {} } ) => { 497 497 return <Panel> 498 498 <PanelBody> … … 643 643 644 644 // Tab: Date 645 const SC_Tab_Date = ( { attributes, setAttributes } ) => {645 const Tab_Date = ( { attributes, setAttributes } ) => { 646 646 return <Panel> 647 647 <PanelBody> … … 797 797 798 798 // Tab: Pagination 799 const SC_Tab_Pagination = ( { attributes, setAttributes } ) => {799 const Tab_Pagination = ( { attributes, setAttributes } ) => { 800 800 return <Panel> 801 801 <PanelBody> … … 834 834 835 835 // Tab: More 836 const SC_Tab_More = ( { attributes, setAttributes } ) => {836 const Tab_More = ( { attributes, setAttributes } ) => { 837 837 return <Panel> 838 838 <PanelBody> … … 910 910 * @props initialShouldUpdate - The initial state of the 'Update preview?' toggle. 911 911 */ 912 class SC_Renderextends React.Component {912 class RenderShowcase extends React.Component { 913 913 constructor( props ) { 914 914 super( props ); … … 928 928 ref.querySelector( '.vid-slider' ) && 929 929 ! ref.querySelector( '.vid-slider-inner' ) && 930 typeof showcaseCreator.modules !== 'undefined' &&931 typeof showcaseCreator.modules.slider !== 'undefined'930 typeof window.showcaseCreator.modules !== 'undefined' && 931 typeof window.showcaseCreator.modules.slider !== 'undefined' 932 932 ) { 933 this.script = showcaseCreator.modules.slider.mount( ref.querySelector( '.vid-slider' ) );933 this.script = window.showcaseCreator.modules.slider.mount( ref.querySelector( '.vid-slider' ) ); 934 934 } 935 935 } … … 940 940 } 941 941 this.updating = true; 942 showcaseCreator.rest( {942 window.showcaseCreator.rest( { 943 943 get: 'block_preview', 944 944 args: this.props.attributes … … 968 968 } 969 969 componentDidUpdate() { 970 if ( ! showcaseCreator.isEqual( this.oldAtts, this.props.attributes ) ) {970 if ( ! window.showcaseCreator.isEqual( this.oldAtts, this.props.attributes ) ) { 971 971 this.oldAtts = { ...this.props.attributes }; 972 972 this.updatePreview(); … … 993 993 } 994 994 995 const SC_Loading = () => {995 const Loading = () => { 996 996 return ( 997 997 <div className={ "vid-loading-wrapper" }> … … 1010 1010 } 1011 1011 1012 const LayoutSelector = ( { attributes, setAttributes } ) => { 1013 const data = window.showcaseCreator.data; 1014 return ( 1015 <PanelBody> 1016 <PanelRow> 1017 <SelectControl 1018 label={ __( 'Layout', 'showcase-creator' ) } 1019 value={ attributes.layout } 1020 options={ [ 1021 data.layouts.length ? 1022 _o( 'Select a layout', '', true ) : 1023 _o( 'No layouts found', '', true ), 1024 ...data.layouts 1025 ] } 1026 onChange={ ( v ) => setAttributes( { layout: v } ) } 1027 /> 1028 </PanelRow> 1029 </PanelBody> 1030 ); 1031 } 1032 1012 1033 /** 1013 1034 * The edit function describes the structure of your block in the context of the … … 1019 1040 */ 1020 1041 export default function Edit( { attributes, setAttributes } ) { 1021 const blockProps = useBlockProps(), 1022 [ posts, setPosts ] = useState( [] ), 1023 data = showcaseCreator.data, 1024 [ status, setStatus ] = useState( 1025 typeof data === 'object' && 'status' in data ? 1026 data.status : 1027 false 1028 ); 1029 window.scData = data; 1030 window.scPosts = posts; 1042 const blockProps = useBlockProps(); 1043 const [ posts, setPosts ] = useState( [] ); 1044 const data = window.showcaseCreator.data; 1045 const [ status, setStatus ] = useState( 1046 typeof data === 'object' && 'status' in data ? 1047 data.status : 1048 false 1049 ); 1050 1031 1051 // Initiate data loading 1032 1052 if ( ! status ) { … … 1052 1072 title: __( 'Taxonomy', 'showcase-creator' ), 1053 1073 content: 1054 < SC_Tab_Query1074 <Tab_Query 1055 1075 attributes={ attributes } 1056 1076 setAttributes={ setAttributes } … … 1063 1083 title: __( 'Order', 'showcase-creator' ), 1064 1084 content: 1065 < SC_Tab_Order1085 <Tab_Order 1066 1086 attributes={ attributes } 1067 1087 setAttributes={ setAttributes } … … 1073 1093 title: __( 'Authors', 'showcase-creator' ), 1074 1094 content: 1075 < SC_Tab_Authors1095 <Tab_Authors 1076 1096 attributes={ attributes } 1077 1097 setAttributes={ setAttributes } … … 1083 1103 title: __( 'Posts', 'showcase-creator' ), 1084 1104 content: 1085 < SC_Tab_Posts1105 <Tab_Posts 1086 1106 attributes={ attributes } 1087 1107 setAttributes={ setAttributes } … … 1094 1114 title: __( 'Date', 'showcase-creator' ), 1095 1115 content: 1096 < SC_Tab_Date1116 <Tab_Date 1097 1117 attributes={ attributes } 1098 1118 setAttributes={ setAttributes } … … 1103 1123 title: __( 'Paging', 'showcase-creator' ), 1104 1124 content: 1105 < SC_Tab_Pagination1125 <Tab_Pagination 1106 1126 attributes={ attributes } 1107 1127 setAttributes={ setAttributes } … … 1112 1132 title: __( 'More', 'showcase-creator' ), 1113 1133 content: 1114 < SC_Tab_More1134 <Tab_More 1115 1135 attributes={ attributes } 1116 1136 setAttributes={ setAttributes } … … 1122 1142 <div { ...blockProps }> 1123 1143 <InspectorControls> 1124 { status !== 'ready' && ( < SC_Loading /> ) }1144 { status !== 'ready' && ( <Loading /> ) } 1125 1145 { status === 'ready' && ( 1126 <PanelBody title='Layout'> 1127 <PanelRow> 1128 <SelectControl 1129 label={ __( 'Layout', 'showcase-creator' ) } 1130 value={ attributes.layout } 1131 options={ [ 1132 data.layouts.length ? 1133 _o( 'Select a layout', '', true ) : 1134 _o( 'No layouts found', '', true ), 1135 ...data.layouts 1136 ] } 1137 onChange={ ( v ) => setAttributes( { layout: v } ) } 1138 /> 1139 </PanelRow> 1140 </PanelBody> 1146 <LayoutSelector attributes={ attributes } setAttributes={ setAttributes } /> 1141 1147 ) } 1142 1148 { status === 'ready' && ( … … 1150 1156 ) } 1151 1157 </InspectorControls> 1152 < SC_Renderattributes={ attributes } initialShouldUpdate={ true } />1153 { status !== 'ready' && ( < SC_Loading /> ) }1158 <RenderShowcase attributes={ attributes } initialShouldUpdate={ true } /> 1159 { status !== 'ready' && ( <Loading /> ) } 1154 1160 </div> 1155 1161 ); -
showcase-creator/trunk/readme.txt
r3302189 r3415798 4 4 Tags: showcase creator, posts, showcase, show posts, post order 5 5 Requires at least: 6.1 6 Tested up to: 6. 87 Stable tag: 1. 0.106 Tested up to: 6.9 7 Stable tag: 1.1.0 8 8 Requires PHP: 7.0 9 9 License: GPLv2 or later … … 128 128 == Changelog == 129 129 130 = 1.1.0 = 131 * New version of the Slider script with many new features and bug fixes. 132 * New version of the Lightbox script with bug fixes. 133 * Feature: Added a new option to the Categories, Tags and Taxonomy layout elements that can limit the number of terms displayed. 134 * Bug fixed: The Excerpt element does not show the link after the excerpt. 135 * Coding: Added functions and filters to register layout scripts and options. 136 130 137 = 1.0.10 = 131 138 * Bug fixed: Ordered Lists - Post filtering by taxonomy not working. -
showcase-creator/trunk/showcase-creator.php
r3302189 r3415798 4 4 * Plugin URI: https://videlinify.com/showcase-creator/ 5 5 * Description: Provides tools to display a showcase of posts (or custom post types) using a custom layout, advanced filtering and customized post order. 6 * Version: 1. 0.106 * Version: 1.1.0 7 7 * Requires PHP: 7.0 8 8 * Author: Videlin Djedjev … … 28 28 } ); 29 29 30 require_once SHOWCASE_CREATOR_PATH . 'src/class.php'; 31 require_once SHOWCASE_CREATOR_PATH . 'src/class-ordered-list.php'; 32 33 /** 34 * The instance of Showcase_Creator class. 35 * 36 * @since 1.0.0 37 * 38 * @var Showcase_Creator 39 */ 40 global $showcase_creator; 41 $showcase_creator = new Showcase_Creator(); 42 30 43 /** 31 44 * Global variable to store element types. … … 38 51 $showcase_creator_element_types = []; 39 52 40 require_once SHOWCASE_CREATOR_PATH . 'src/class.php';41 require_once SHOWCASE_CREATOR_PATH . 'src/class-ordered-list.php';42 43 /**44 * The instance of Showcase_Creator class.45 */46 global $showcase_creator;47 $showcase_creator = new Showcase_Creator();48 49 53 require_once SHOWCASE_CREATOR_PATH . 'src/layouts.php'; 54 require_once SHOWCASE_CREATOR_PATH . 'src/layout-scripts.php'; 50 55 require_once SHOWCASE_CREATOR_PATH . 'src/admin.php'; 51 56 require_once SHOWCASE_CREATOR_PATH . 'src/rest.php'; -
showcase-creator/trunk/src/admin.js
r3190704 r3415798 224 224 $( parent ).find( '.wp-picker-clear, .wp-picker-default' ).remove(); 225 225 } 226 226 227 } ); 227 228 } -
showcase-creator/trunk/src/class-layout-element.php
r3194048 r3415798 452 452 $links = true, 453 453 $join = ', ', 454 $before = '' 454 $before = '', 455 $limit = 0 455 456 ) { 456 457 $result = array(); 457 458 $terms = wp_get_post_terms( $post_id, $tax, array( 'fields' => 'id=>name' ) ); 459 if ( $limit ) { 460 $terms = array_slice( $terms, 0, $limit ); 461 } 458 462 foreach ( $terms as $id=>$name ) { 459 463 if ( $links ) { -
showcase-creator/trunk/src/class.php
r3302189 r3415798 18 18 * @var string $version x.x.x format 19 19 */ 20 public static string $version = '1. 0.10';20 public static string $version = '1.1.0'; 21 21 22 22 /** … … 45 45 46 46 /** 47 * Galleries. 48 * 49 * @since 1.0.0 50 * @var array $galleries 51 */ 52 public array $galleries = []; 53 54 /** 55 * Layout scripts and their options. 56 * 57 * @since 1.1.0 58 * @var array $layout_scripts 59 */ 60 public static array $layout_scripts = []; 61 62 /** 47 63 * Capability to use the plugin. 48 64 * … … 51 67 */ 52 68 private static string $capability = 'manage_options'; 53 54 /**55 * Galleries.56 *57 * @since 1.0.058 * @var array $galleries59 */60 public array $galleries = [];61 69 62 70 /** … … 136 144 '-layout-builder', 137 145 '/src/layout-builder', 138 array( ' wp-color-picker', 'jquery' )146 array( 'jquery', 'wp-color-picker' ) 139 147 ); 140 148 self::register_asset( '-layout-importer', '/src/layout-importer.js' ); … … 155 163 add_filter( 'showcase_creator_localize_admin_js', function ( $admin_vars ) { 156 164 global $post; 165 166 // Layout data. 157 167 $layout = Showcase_Creator_Layout::get( $post->ID, false ); 158 168 if ( $layout['elements'] && is_string( $layout['elements'] ) ) { … … 162 172 ); 163 173 } 174 175 // Data to localize. 164 176 $admin_vars['layoutBuilder'] = array( 165 177 'types' => Showcase_Creator_LayoutElement_Type::for_layout_builder(), 166 178 'layout' => $layout, 179 'scripts' => self::$layout_scripts, 167 180 ); 168 181 $admin_vars['data'] = $this->get_data( … … 413 426 require_once SHOWCASE_CREATOR_PATH . 'src/layout-element-types.php'; 414 427 } 428 // Layout script options. 429 if ( empty( self::$layout_scripts[ 'masonry' ] ) ) { 430 add_filter( 'showcase_creator_layout_scripts', 'showcase_creator_layout_script__masonry', 1 ); 431 } 432 if ( empty( self::$layout_scripts[ 'slider' ] ) ) { 433 add_filter( 'showcase_creator_layout_scripts', 'showcase_creator_layout_script__slider', 1 ); 434 } 435 436 /** 437 * Filter hook: Register layout scripts and add options. 438 * 439 * @since 1.1.0 440 * 441 * @param array $scripts Registered layout scripts and their options. 442 * Structured array: 443 * [layout_slug] => [ 444 * [label] => string, 445 * [options] => [ 446 * [option_slug] => [ 447 * [label] - string - Option label. 448 * [type] - string - One of: text, number, color, checkbox, select 449 * [default] => mixed - Option default value. 450 * [atts] => array - Associative array to configure the option input. 451 * Eg.: If type is select - [options] => [ ['option-value', 'Option Label'], ... ] 452 * If type is number - [min] => 0, [max] => 1, [step] => 0.1 453 * Think of this as the input attributes. 454 * [hint] => string - Hint / option description. 455 * [hide] => array - Associative array that represents the conditions on which the current option is hidden: 456 * [option] => [value] - Hides the current option when [option] is set to [value]. 457 * Eg.: 'timer' => false - Hides the current option when option 'timer' is false. 458 * The current option will be hidden if any of the conditions is met. 459 * [sanitize_save] => callable - Function to perform on the value before saving to the database. 460 * [sanitize_load] => callable - Function to perform on the value when loaded to option input. 461 * ] 462 * ] 463 * [integrate_callback] => callable - Function to perform on the layout container. 464 * The first argument is an array of the saved script options. 465 * The second argument is the layout container element, which is an instance of Showcase_Creator_Layout_Element. 466 * ] 467 * 468 * To register a script you can also use the function: 469 * showcase_creator_add_layout_script( $script_slug, $script_label, $integrate_callback ) to register a script. 470 * To register an option for an existing script you can also use the function. 471 * showcase_creator_add_layout_script_option( $script_slug, $option_slug, $args ) 472 * Use the init hook to register layout scripts and options. 473 */ 474 self::$layout_scripts = apply_filters( 'showcase_creator_layout_scripts', array() ); 415 475 } 416 476 … … 1215 1275 * - 'no_items_text' => Text to be displayed when there are no options. 1216 1276 * - 'placeholder' => Placeholder. 1217 */ 1218 public static function dropdown( $args ) { 1277 * @param bool $return Whether to return the output or print it. 1278 * @return string HTML Output if $return is true, otherwise void. 1279 */ 1280 public static function dropdown( $args, $return = false ) { 1219 1281 $defaults = array( 1220 1282 'options' => array(), … … 1232 1294 '<select%1$s%2$s%3$s>', 1233 1295 ! empty( $args['name'] ) 1234 ? ( ' name="' . sanitize_key( $args['name']) . '"' )1296 ? ( ' name="' . esc_attr( sanitize_text_field( $args['name'] ) ) . '"' ) 1235 1297 : '', 1236 1298 ! empty( $args['class'] ) … … 1238 1300 : '', 1239 1301 ! empty( $args['id'] ) 1240 ? ( ' id="' . sanitize_key( $args['id']) . '"' )1302 ? ( ' id="' . esc_attr( sanitize_text_field( $args['id'] ) ) . '"' ) 1241 1303 : '' 1242 1304 ); … … 1286 1348 ), 1287 1349 ); 1350 if ( $return ) { 1351 ob_start(); 1352 } 1288 1353 echo wp_kses( $output, $allowed_html ); 1354 if ( $return ) { 1355 return ob_get_clean(); 1356 } 1289 1357 } 1290 1358 -
showcase-creator/trunk/src/default-layouts.json
r3190704 r3415798 1 [{"title":"Post Blocks","slug":"post-blocks","elements":"[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"\"}},{\"id\":3,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-img-wrapper\"]}},{\"id\":4,\"parent\":3,\"type\":\"thumbnail\",\"options\":{\"tag\":\"img\",\"class\":[\"_slug-img\"],\"size\":[\"medium\"],\"fallback\":[\"\"]}},{\"id\":5,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":6,\"parent\":5,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"\"],\"leads_to\":\"post\",\"target_blank\":false}},{\"id\":7,\"parent\":6,\"type\":\"title\",\"options\":{\"tag\":\"h2\",\"class\":[\"_slug-title\"]}},{\"id\":8,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-info\"]}},{\"id\":9,\"parent\":8,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-author\"]}},{\"id\":10,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[],\"content\":\"by \"}},{\"id\":11,\"parent\":9,\"type\":\"author\",\"options\":{\"tag\":[\"span\"],\"class\":[]}},{\"id\":12,\"parent\":8,\"type\":\"date\",\"options\":{\"tag\":\"span\",\"class\":[\"\"]}},{\"id\":13,\"parent\":5,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":30,\"more_link\":\"\",\"more_hide\":false}},{\"id\":14,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-terms\"]}},{\"id\":15,\"parent\":14,\"type\":\"categories\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true}},{\"id\":16,\"parent\":14,\"type\":\"tags\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true,\"hashtag\":true}}]","css":"._slug {\r\n\t--block-width: 300px;\r\n\t--text-color: black;\r\n\t--background: white;\r\n\t--link-color: #006699;\r\n\t--link-hover-color: #0099cc;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--border-radius: 4px;\r\n\t--vertical-gap: 20px;\r\n\tdisplay: flex;\r\n\tflex-flow: row wrap;\r\n\talign-items: flex-start;\r\n\tjustify-content: center;\r\n\tpadding: 10px;\r\n}\r\n._slug * {\r\n\tbox-sizing: border-box;\r\n}\r\n._slug-post {\r\n\twidth: var(--block-width);\r\n\tcolor: var(--text-color);\r\n\tbackground: var(--background);\r\n\tbox-shadow: var(--box-shadow);\r\n\tborder-radius: var(--border-radius);\r\n\tmargin-bottom: var(--vertical-gap);\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 10px;\r\n\tposition: relative;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-img-wrapper {\r\n\tdisplay: block;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n\tborder-radius: var(--border-radius) var(--border-radius) 0 0;\r\n}\r\n.no-img ._slug-img-wrapper {\r\n\tdisplay: none;\r\n}\r\n._slug-img {\r\n\tdisplay: block;\r\n\tobject-fit: cover;\r\n\twidth: 100%;\r\n\tmax-height: 200px;\r\n\tscale: 1;\r\n\ttransition: scale 300ms ease;\r\n}\r\n._slug-img:hover {\r\n\tscale: 1.05;\r\n}\r\n._slug-text-wrapper {\r\n\tpadding: 10px;\r\n\twidth: 100%;\r\n\tposition: relative;\r\n\thyphens: auto;\r\n\tword-break: break-word;\r\n}\r\n._slug-title {\r\n\tmargin-bottom: 10px;\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 10px;\r\n\tmargin-top: 10px;\r\n\tpadding-top: 10px;\r\n\tborder-top: 1px solid #0003;\r\n}\r\n._slug-excerpt {\r\n\tmargin-top: 20px;\r\n}\r\n._slug-info {\r\n\tdisplay: flex;\r\n\tjustify-content: space-between;\r\n}\r\n._slug-author {\r\n\tdisplay: flex; gap: 5px;\r\n}\r\n._slug-author-avatar {\r\n\tborder-radius: 50%;\r\n}","script":{"id":"masonry","masonry":{"columnWidth":300,"gutter":20,"percentPosition":"","horizontalOrder":""}},"preview":{"type":"post","orderby":"date","order":"DESC","limit":"10"}},{"title":"Post List","slug":"post-list","elements":"[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"no-img\"}},{\"id\":3,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-img-wrapper\"]}},{\"id\":4,\"parent\":3,\"type\":\"thumbnail\",\"options\":{\"tag\":\"img\",\"class\":[\"_slug-img\"],\"size\":[\"medium_large\"],\"fallback\":[\"\"]}},{\"id\":5,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":6,\"parent\":5,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"\"],\"leads_to\":\"post\",\"target_blank\":false}},{\"id\":7,\"parent\":6,\"type\":\"title\",\"options\":{\"tag\":\"h2\",\"class\":[\"_slug-title\"]}},{\"id\":8,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-info\"]}},{\"id\":9,\"parent\":8,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"\"]}},{\"id\":10,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[\"\"],\"content\":\"by \"}},{\"id\":11,\"parent\":9,\"type\":\"author\",\"options\":{\"tag\":[\"span\"],\"class\":[\"\"]}},{\"id\":12,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[\"\"],\"content\":\", on \"}},{\"id\":13,\"parent\":9,\"type\":\"date\",\"options\":{\"tag\":\"span\",\"class\":[\"\"]}},{\"id\":14,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-terms\"]}},{\"id\":15,\"parent\":14,\"type\":\"categories\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true}},{\"id\":16,\"parent\":14,\"type\":\"tags\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true,\"hashtag\":true}},{\"id\":17,\"parent\":5,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":30,\"more_link\":\"\",\"more_hide\":false}}]","css":"._slug {\r\n\t--text-color: black;\r\n\t--background: white;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--border-radius: 4px;\r\n\t--link-color: #006699;\r\n\t--link-hover-color: #0099cc;\r\n\t--mobile-bg-mask: #fffc;\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 30px;\r\n\tpadding: 10px;\r\n}\r\n._slug-post {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n\twidth: 100%;\r\n\tbackground: var(--background);\r\n\tbox-shadow: var(--box-shadow);\r\n\tborder-radius: var(--border-radius);\r\n\tcolor: var(--text-color);\r\n\toverflow: hidden;\r\n\tposition: relative;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-img-wrapper {\r\n\tdisplay: block;\r\n\toverflow: hidden;\r\n\twidth: 75%;\r\n}\r\n.no-img ._slug-img-wrapper {\r\n\twidth: 0;\r\n}\r\n._slug-img {\r\n\tdisplay: block;\r\n\tobject-fit: cover;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\tscale: 1;\r\n\ttransition: scale 300ms ease;\r\n}\r\n._slug-img:hover {\r\n\tscale: 1.05;\r\n}\r\n._slug-text-wrapper {\r\n\tpadding: 10px;\r\n\twidth: 100%;\r\n}\r\n._slug-title {\r\n\tmargin-bottom: 10px;\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n}\r\n._slug-excerpt {\r\n\tmargin-top: 20px;\r\n}\r\n._slug-info {\r\n\tdisplay: flex;\r\n\tgap: 20px;\r\n}\r\n@media (max-width: 1000px) {\r\n\t._slug-img-wrapper {\r\n\t\twidth: 50%;\r\n\t}\r\n\t.no-img ._slug-img-wrapper {\r\n\t\twidth: auto;\r\n\t}\r\n}\r\n@media (max-width: 600px) {\r\n\t._slug-post {\r\n\t\tflex-flow: column nowrap;\r\n\t}\r\n\t._slug-img-wrapper {\r\n\t\tposition: absolute;\r\n\t\tinset: 0;\r\n\t\tz-index: 0;\r\n\t\twidth: 100%;\r\n\t}\r\n\t._slug-img {\r\n\t\twidth: 100%;\r\n\t\theight: 100%;\r\n\t}\r\n\t._slug-img-wrapper::after {\r\n\t\tcontent: '';\r\n\t\tdisplay: block;\r\n\t\tposition: absolute;\r\n\t\tinset: 0;\r\n\t\tbackground-color: var(--mobile-bg-mask);\r\n\t}\r\n\t._slug-text-wrapper {\r\n\t\tz-index: 1;\r\n\t}\r\n}","script":{"id":""},"preview":{"type":"post","orderby":"date","order":"DESC","limit":"10"}},{"title":"Gallery","slug":"gallery","elements":"[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"\"}},{\"id\":3,\"parent\":2,\"type\":\"thumbnail\",\"options\":{\"tag\":[\"div\"],\"class\":[\"_slug-img\"],\"size\":[\"medium\"],\"fallback\":[\"\"]}},{\"id\":4,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":5,\"parent\":4,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":15,\"more_link\":\"\",\"more_hide\":false}},{\"id\":6,\"parent\":4,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-row\"]}},{\"id\":7,\"parent\":6,\"type\":\"text\",\"options\":{\"tag\":[\"span\"],\"class\":[],\"content\":\"by \"}},{\"id\":8,\"parent\":6,\"type\":\"author\",\"options\":{\"tag\":[\"a\"],\"class\":[\"_slug-author\"]}},{\"id\":9,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-bar-shadow\"]}},{\"id\":10,\"parent\":9,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-bar-wrapper\"]}},{\"id\":11,\"parent\":10,\"type\":\"title\",\"options\":{\"tag\":[\"span\"],\"class\":[\"_slug-title\"]}},{\"id\":12,\"parent\":2,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"_slug-open\"],\"leads_to\":[\"query_gallery\"],\"target_blank\":false}}]","css":"._slug {\r\n\t--bg-mask: #0009;\r\n\t--text-color: white;\r\n\t--bar-bg: #006699;\r\n\t--bar-color: white;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--block-width: 300px;\r\n\tdisplay: flex;\r\n\tflex-flow: row wrap;\r\n\tjustify-content: center;\r\n\talign-items: flex-start;\r\n\tgap: 30px;\r\n\tpadding: 10px;\r\n}\r\n._slug * {\r\n\tbox-sizing: border-box;\r\n}\r\n._slug-post {\r\n\tposition: relative;\r\n\twidth: var(--block-width);\r\n\taspect-ratio: 4 \/ 3;\r\n\tbox-shadow: var(--box-shadow);\r\n}\r\n._slug-open {\r\n\tposition: absolute;\r\n\tdisplay: block;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n._slug-img {\r\n\tposition: absolute;\r\n\tinset: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tbackground-size: cover;\r\n\tbackground-position: center;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-text-wrapper {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tgap: 10px;\r\n\tpadding: 20% 5px 5px 5px;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tbackground-color: var(--bg-mask);\r\n\tcolor: var(--bar-color);\r\n\topacity: 0;\r\n\ttransition: opacity 300ms ease;\r\n}\r\n._slug-post:hover ._slug-text-wrapper {\r\n\topacity: 1;\r\n}\r\n._slug-row {\r\n\tdisplay: flex;\r\n\tgap: 5px;\r\n}\r\n\r\n._slug-post:hover ._slug-bar-shadow {\r\n\tleft: -10px;\r\n\topacity: 0.3;\r\n}\r\n._slug-title {\r\n\tfont-weight: bold;\r\n\tpadding: 0 8px;\r\n}\r\n._slug-bar-shadow {\r\n\tfilter: drop-shadow(-1px 5px 3px #0009);\r\n\tposition: absolute;\r\n\tz-index: 1;\r\n\tleft: -20px;\r\n\ttop: 20px;\r\n\topacity: 1;\r\n\ttransition: left 300ms ease, opacity 300ms ease;\r\n}\r\n._slug-bar-wrapper {\r\n\twidth: max-content;\r\n\tmax-width: var(--block-width);\r\n\tmin-height: 36px;\r\n\tbackground-color: var(--bar-bg);\r\n\tcolor: var(--bar-color);\r\n\tpadding: 5px 10px;\r\n\tclip-path: polygon(0 0, 95% 0, 100% 50%, 95% 100%, 0 100%, 5% 50%);\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n}","script":{"id":""},"preview":{"type":"post","orderby":"date","order":"DESC","limit":"10"}},{"title":"Carousel Slider","slug":"carousel-slider","elements":"[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"no-img\"}},{\"id\":3,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-img-wrapper\"]}},{\"id\":4,\"parent\":3,\"type\":\"thumbnail\",\"options\":{\"tag\":\"img\",\"class\":[\"_slug-img\"],\"size\":\"medium\",\"fallback\":[\"\"]}},{\"id\":5,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":6,\"parent\":5,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"\"],\"leads_to\":\"post\",\"target_blank\":false}},{\"id\":7,\"parent\":6,\"type\":\"title\",\"options\":{\"tag\":\"h2\",\"class\":[\"_slug-title\"]}},{\"id\":8,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-info\"]}},{\"id\":9,\"parent\":8,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-author\"]}},{\"id\":10,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[],\"content\":\"by \"}},{\"id\":11,\"parent\":9,\"type\":\"author\",\"options\":{\"tag\":\"a\",\"class\":[]}},{\"id\":12,\"parent\":8,\"type\":\"date\",\"options\":{\"tag\":\"span\",\"class\":[\"\"]}},{\"id\":13,\"parent\":5,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":30,\"more_link\":\"\",\"more_hide\":false}},{\"id\":14,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-terms\"]}},{\"id\":15,\"parent\":14,\"type\":\"categories\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true}},{\"id\":16,\"parent\":14,\"type\":\"tags\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true,\"hashtag\":true}}]","css":"._slug {\r\n\t--text-color: #000;\r\n\t--background: #fff;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--border-radius: 3px;\r\n\t--link-color: #006699;\r\n\t--link-hover-color: #0099cc;\r\n\t--block-width: 300px;\r\n\tmargin-bottom: 20px;\r\n}\r\n._slug .slider-inner {\r\n\t\/* Remove the following line to make the block full height. *\/\r\n\talign-items: flex-start;\r\n}\r\n._slug * {\r\n\tbox-sizing: border-box;\r\n}\r\n._slug-post {\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 10px;\r\n\tmargin: 10px;\r\n\twidth: var(--block-width);\r\n\tcolor: var(--text-color);\r\n\tbackground: var(--background);\r\n\tbox-shadow: var(--box-shadow);\r\n\tborder-radius: var(--border-radius);\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-img-wrapper {\r\n\tdisplay: block;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n\tborder-radius: var(--border-radius) var(--border-radius) 0 0;\r\n}\r\n.no-img ._slug-img-wrapper {\r\n\tdisplay: none;\r\n}\r\n._slug-img {\r\n\tdisplay: block;\r\n\tobject-fit: cover;\r\n\twidth: 100%;\r\n\tmax-height: 200px;\r\n\tscale: 1;\r\n\ttransition: scale 300ms ease;\r\n}\r\n._slug-img:hover {\r\n\tscale: 1.05;\r\n}\r\n._slug-text-wrapper {\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tflex-grow: 1;\r\n\tpadding: 10px;\r\n\twidth: 100%;\r\n\tposition: relative;\r\n}\r\n._slug-title {\r\n\tmargin-bottom: 10px;\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n}\r\n._slug-excerpt {\r\n\tmargin-top: 20px;\r\n\tflex-grow: 1;\r\n}\r\n._slug-info {\r\n\tdisplay: flex;\r\n\tjustify-content: space-between;\r\n}\r\n._slug-author {\r\n\tdisplay: flex;\r\n\tgap: 5px;\r\n}\r\n._slug-terms {\r\n\tborder-top: 1px solid #0003;\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tmargin-top: 10px;\r\n}\r\n._slug .slider-counter {\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\twidth: 100%;\r\n}\r\n","script":{"id":"slider","slider":{"delay":5000,"animate":"slide","speed":500,"ease":"ease","immediate":false}},"preview":{"type":"","orderby":"date","order":"DESC","limit":"10"}}] 1 [ 2 { 3 "title": "Post Blocks", 4 "slug": "post-blocks", 5 "elements": "[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"\"}},{\"id\":3,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-img-wrapper\"]}},{\"id\":4,\"parent\":3,\"type\":\"thumbnail\",\"options\":{\"tag\":\"img\",\"class\":[\"_slug-img\"],\"size\":[\"medium\"],\"fallback\":[\"\"]}},{\"id\":5,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":6,\"parent\":5,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"\"],\"leads_to\":\"post\",\"target_blank\":false}},{\"id\":7,\"parent\":6,\"type\":\"title\",\"options\":{\"tag\":\"h2\",\"class\":[\"_slug-title\"]}},{\"id\":8,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-info\"]}},{\"id\":9,\"parent\":8,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-author\"]}},{\"id\":10,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[],\"content\":\"by \"}},{\"id\":11,\"parent\":9,\"type\":\"author\",\"options\":{\"tag\":[\"span\"],\"class\":[]}},{\"id\":12,\"parent\":8,\"type\":\"date\",\"options\":{\"tag\":\"span\",\"class\":[\"\"]}},{\"id\":13,\"parent\":5,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":30,\"more_link\":\"\",\"more_hide\":false}},{\"id\":14,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-terms\"]}},{\"id\":15,\"parent\":14,\"type\":\"categories\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true}},{\"id\":16,\"parent\":14,\"type\":\"tags\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true,\"hashtag\":true}}]", 6 "css": "._slug {\r\n\t--block-width: 300px;\r\n\t--text-color: black;\r\n\t--background: white;\r\n\t--link-color: #006699;\r\n\t--link-hover-color: #0099cc;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--border-radius: 4px;\r\n\t--vertical-gap: 20px;\r\n\tdisplay: flex;\r\n\tflex-flow: row wrap;\r\n\talign-items: flex-start;\r\n\tjustify-content: center;\r\n\tmargin: 0 auto;\r\n\tpadding: 10px;\r\n}\r\n._slug * {\r\n\tbox-sizing: border-box;\r\n}\r\n._slug-post {\r\n\twidth: var(--block-width);\r\n\tcolor: var(--text-color);\r\n\tbackground: var(--background);\r\n\tbox-shadow: var(--box-shadow);\r\n\tborder-radius: var(--border-radius);\r\n\tmargin-bottom: var(--vertical-gap);\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 10px;\r\n\tposition: relative;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-img-wrapper {\r\n\tdisplay: block;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n\tborder-radius: var(--border-radius) var(--border-radius) 0 0;\r\n}\r\n.no-img ._slug-img-wrapper {\r\n\tdisplay: none;\r\n}\r\n._slug-img {\r\n\tdisplay: block;\r\n\tobject-fit: cover;\r\n\twidth: 100%;\r\n\tmax-height: 200px;\r\n\tscale: 1;\r\n\ttransition: scale 300ms ease;\r\n}\r\n._slug-img:hover {\r\n\tscale: 1.05;\r\n}\r\n._slug-text-wrapper {\r\n\tpadding: 10px;\r\n\twidth: 100%;\r\n\tposition: relative;\r\n\thyphens: auto;\r\n\tword-break: break-word;\r\n}\r\n._slug-title {\r\n\tmargin-bottom: 10px;\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 10px;\r\n\tmargin-top: 10px;\r\n\tpadding-top: 10px;\r\n\tborder-top: 1px solid #0003;\r\n}\r\n._slug-excerpt {\r\n\tmargin-top: 20px;\r\n}\r\n._slug-info {\r\n\tdisplay: flex;\r\n\tjustify-content: space-between;\r\n}\r\n._slug-author {\r\n\tdisplay: flex; gap: 5px;\r\n}\r\n._slug-author-avatar {\r\n\tborder-radius: 50%;\r\n}", 7 "script": { 8 "id": "masonry", 9 "masonry": { 10 "columnWidth": 300, 11 "gutter": 20, 12 "percentPosition": "", 13 "horizontalOrder": "" 14 } 15 }, 16 "preview": { 17 "type": "post", 18 "orderby": "date", 19 "order": "DESC", 20 "limit": "10" 21 } 22 }, 23 { 24 "title": "Post List", 25 "slug": "post-list", 26 "elements": "[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"no-img\"}},{\"id\":3,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-img-wrapper\"]}},{\"id\":4,\"parent\":3,\"type\":\"thumbnail\",\"options\":{\"tag\":\"img\",\"class\":[\"_slug-img\"],\"size\":[\"medium_large\"],\"fallback\":[\"\"]}},{\"id\":5,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":6,\"parent\":5,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"\"],\"leads_to\":\"post\",\"target_blank\":false}},{\"id\":7,\"parent\":6,\"type\":\"title\",\"options\":{\"tag\":\"h2\",\"class\":[\"_slug-title\"]}},{\"id\":8,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-info\"]}},{\"id\":9,\"parent\":8,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"\"]}},{\"id\":10,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[\"\"],\"content\":\"by \"}},{\"id\":11,\"parent\":9,\"type\":\"author\",\"options\":{\"tag\":[\"span\"],\"class\":[\"\"]}},{\"id\":12,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[\"\"],\"content\":\", on \"}},{\"id\":13,\"parent\":9,\"type\":\"date\",\"options\":{\"tag\":\"span\",\"class\":[\"\"]}},{\"id\":14,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-terms\"]}},{\"id\":15,\"parent\":14,\"type\":\"categories\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true}},{\"id\":16,\"parent\":14,\"type\":\"tags\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true,\"hashtag\":true}},{\"id\":17,\"parent\":5,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":30,\"more_link\":\"\",\"more_hide\":false}}]", 27 "css": "._slug {\r\n\t--text-color: black;\r\n\t--background: white;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--border-radius: 4px;\r\n\t--link-color: #006699;\r\n\t--link-hover-color: #0099cc;\r\n\t--mobile-bg-mask: #fffc;\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 30px;\r\n\tpadding: 10px;\r\n}\r\n._slug-post {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n\twidth: 100%;\r\n\tbackground: var(--background);\r\n\tbox-shadow: var(--box-shadow);\r\n\tborder-radius: var(--border-radius);\r\n\tcolor: var(--text-color);\r\n\toverflow: hidden;\r\n\tposition: relative;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-img-wrapper {\r\n\tdisplay: block;\r\n\toverflow: hidden;\r\n\twidth: 75%;\r\n}\r\n.no-img ._slug-img-wrapper {\r\n\twidth: 0;\r\n}\r\n._slug-img {\r\n\tdisplay: block;\r\n\tobject-fit: cover;\r\n\theight: 100%;\r\n\twidth: 100%;\r\n\tscale: 1;\r\n\ttransition: scale 300ms ease;\r\n}\r\n._slug-img:hover {\r\n\tscale: 1.05;\r\n}\r\n._slug-text-wrapper {\r\n\tpadding: 10px;\r\n\twidth: 100%;\r\n}\r\n._slug-title {\r\n\tmargin-bottom: 10px;\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n}\r\n._slug-excerpt {\r\n\tmargin-top: 20px;\r\n}\r\n._slug-info {\r\n\tdisplay: flex;\r\n\tgap: 20px;\r\n}\r\n@media (max-width: 1000px) {\r\n\t._slug-img-wrapper {\r\n\t\twidth: 50%;\r\n\t}\r\n\t.no-img ._slug-img-wrapper {\r\n\t\twidth: auto;\r\n\t}\r\n}\r\n@media (max-width: 600px) {\r\n\t._slug-post {\r\n\t\tflex-flow: column nowrap;\r\n\t}\r\n\t._slug-img-wrapper {\r\n\t\tposition: absolute;\r\n\t\tinset: 0;\r\n\t\tz-index: 0;\r\n\t\twidth: 100%;\r\n\t}\r\n\t._slug-img {\r\n\t\twidth: 100%;\r\n\t\theight: 100%;\r\n\t}\r\n\t._slug-img-wrapper::after {\r\n\t\tcontent: '';\r\n\t\tdisplay: block;\r\n\t\tposition: absolute;\r\n\t\tinset: 0;\r\n\t\tbackground-color: var(--mobile-bg-mask);\r\n\t}\r\n\t._slug-text-wrapper {\r\n\t\tz-index: 1;\r\n\t}\r\n}", 28 "script": { 29 "id": "" 30 }, 31 "preview": { 32 "type": "post", 33 "orderby": "date", 34 "order": "DESC", 35 "limit": "10" 36 } 37 }, 38 { 39 "title": "Gallery", 40 "slug": "gallery", 41 "elements": "[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"\"}},{\"id\":3,\"parent\":2,\"type\":\"thumbnail\",\"options\":{\"tag\":[\"div\"],\"class\":[\"_slug-img\"],\"size\":[\"medium\"],\"fallback\":[\"\"]}},{\"id\":4,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":5,\"parent\":4,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":15,\"more_link\":\"\",\"more_hide\":false}},{\"id\":6,\"parent\":4,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-row\"]}},{\"id\":7,\"parent\":6,\"type\":\"text\",\"options\":{\"tag\":[\"span\"],\"class\":[],\"content\":\"by \"}},{\"id\":8,\"parent\":6,\"type\":\"author\",\"options\":{\"tag\":[\"a\"],\"class\":[\"_slug-author\"]}},{\"id\":9,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-bar-shadow\"]}},{\"id\":10,\"parent\":9,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-bar-wrapper\"]}},{\"id\":11,\"parent\":10,\"type\":\"title\",\"options\":{\"tag\":[\"span\"],\"class\":[\"_slug-title\"]}},{\"id\":12,\"parent\":2,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"_slug-open\"],\"leads_to\":[\"query_gallery\"],\"target_blank\":false}}]", 42 "css": "._slug {\r\n\t--bg-mask: #0009;\r\n\t--text-color: white;\r\n\t--bar-bg: #006699;\r\n\t--bar-color: white;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--block-width: 300px;\r\n\tdisplay: flex;\r\n\tflex-flow: row wrap;\r\n\tjustify-content: center;\r\n\talign-items: flex-start;\r\n\tgap: 30px;\r\n\tpadding: 10px;\r\n}\r\n._slug * {\r\n\tbox-sizing: border-box;\r\n}\r\n._slug-post {\r\n\tposition: relative;\r\n\twidth: var(--block-width);\r\n\taspect-ratio: 4 / 3;\r\n\tbox-shadow: var(--box-shadow);\r\n}\r\n._slug-open {\r\n\tposition: absolute;\r\n\tdisplay: block;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n._slug-img {\r\n\tposition: absolute;\r\n\tinset: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tbackground-size: cover;\r\n\tbackground-position: center;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-text-wrapper {\r\n\tposition: absolute;\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tgap: 10px;\r\n\tpadding: 20% 5px 5px 5px;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tbackground-color: var(--bg-mask);\r\n\tcolor: var(--bar-color);\r\n\topacity: 0;\r\n\ttransition: opacity 300ms ease;\r\n}\r\n._slug-post:hover ._slug-text-wrapper {\r\n\topacity: 1;\r\n}\r\n._slug-row {\r\n\tdisplay: flex;\r\n\tgap: 5px;\r\n}\r\n\r\n._slug-post:hover ._slug-bar-shadow {\r\n\tleft: -10px;\r\n\topacity: 0.3;\r\n}\r\n._slug-title {\r\n\tfont-weight: bold;\r\n\tpadding: 0 8px;\r\n}\r\n._slug-bar-shadow {\r\n\tfilter: drop-shadow(-1px 5px 3px #0009);\r\n\tposition: absolute;\r\n\tz-index: 1;\r\n\tleft: -20px;\r\n\ttop: 20px;\r\n\topacity: 1;\r\n\ttransition: left 300ms ease, opacity 300ms ease;\r\n}\r\n._slug-bar-wrapper {\r\n\twidth: max-content;\r\n\tmax-width: var(--block-width);\r\n\tmin-height: 36px;\r\n\tbackground-color: var(--bar-bg);\r\n\tcolor: var(--bar-color);\r\n\tpadding: 5px 10px;\r\n\tclip-path: polygon(0 0, 95% 0, 100% 50%, 95% 100%, 0 100%, 5% 50%);\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n}", 43 "script": { 44 "id": "" 45 }, 46 "preview": { 47 "type": "post", 48 "orderby": "date", 49 "order": "DESC", 50 "limit": "10" 51 } 52 }, 53 { 54 "title": "Carousel Slider", 55 "slug": "carousel-slider", 56 "elements": "[{\"id\":1,\"parent\":null,\"type\":\"container\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug\"]}},{\"id\":2,\"parent\":1,\"type\":\"post\",\"options\":{\"tag\":\"article\",\"class\":[\"_slug-post\"],\"no_thumbnail_class\":\"no-img\"}},{\"id\":3,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-img-wrapper\"]}},{\"id\":4,\"parent\":3,\"type\":\"thumbnail\",\"options\":{\"tag\":\"img\",\"class\":[\"_slug-img\"],\"size\":\"medium\",\"fallback\":[\"\"]}},{\"id\":5,\"parent\":2,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-text-wrapper\"]}},{\"id\":6,\"parent\":5,\"type\":\"link\",\"options\":{\"tag\":\"a\",\"class\":[\"\"],\"leads_to\":\"post\",\"target_blank\":false}},{\"id\":7,\"parent\":6,\"type\":\"title\",\"options\":{\"tag\":\"h2\",\"class\":[\"_slug-title\"]}},{\"id\":8,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-info\"]}},{\"id\":9,\"parent\":8,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-author\"]}},{\"id\":10,\"parent\":9,\"type\":\"text\",\"options\":{\"tag\":\"span\",\"class\":[],\"content\":\"by \"}},{\"id\":11,\"parent\":9,\"type\":\"author\",\"options\":{\"tag\":\"a\",\"class\":[]}},{\"id\":12,\"parent\":8,\"type\":\"date\",\"options\":{\"tag\":\"span\",\"class\":[\"\"]}},{\"id\":13,\"parent\":5,\"type\":\"excerpt\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-excerpt\"],\"source\":[\"mix\"],\"strip_tags\":true,\"cut\":true,\"limit\":30,\"more_link\":\"\",\"more_hide\":false}},{\"id\":14,\"parent\":5,\"type\":\"wrapper\",\"options\":{\"tag\":\"div\",\"class\":[\"_slug-terms\"]}},{\"id\":15,\"parent\":14,\"type\":\"categories\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true}},{\"id\":16,\"parent\":14,\"type\":\"tags\",\"options\":{\"tag\":\"div\",\"class\":[\"\"],\"hyperlink\":true,\"hashtag\":true}}]", 57 "css": "._slug {\r\n\t--text-color: #000;\r\n\t--background: #fff;\r\n\t--box-shadow: 0 0 8px 0 #0003;\r\n\t--border-radius: 3px;\r\n\t--link-color: #006699;\r\n\t--link-hover-color: #0099cc;\r\n\t--block-width: 300px;\r\n\tmargin-bottom: 20px;\r\n}\r\n._slug .slider-inner {\r\n\t/* Remove the following line to make the block full height. */\r\n\talign-items: flex-start;\r\n}\r\n._slug * {\r\n\tbox-sizing: border-box;\r\n}\r\n._slug-post {\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tgap: 10px;\r\n\tmargin: 10px;\r\n\twidth: var(--block-width);\r\n\tcolor: var(--text-color);\r\n\tbackground: var(--background);\r\n\tbox-shadow: var(--box-shadow);\r\n\tborder-radius: var(--border-radius);\r\n\tposition: relative;\r\n\toverflow: hidden;\r\n}\r\n._slug a {\r\n\tcolor: var(--link-color) !important;\r\n}\r\n._slug a:hover {\r\n\tcolor: var(--link-hover-color) !important;\r\n}\r\n._slug-img-wrapper {\r\n\tdisplay: block;\r\n\toverflow: hidden;\r\n\twidth: 100%;\r\n\tborder-radius: var(--border-radius) var(--border-radius) 0 0;\r\n}\r\n.no-img ._slug-img-wrapper {\r\n\tdisplay: none;\r\n}\r\n._slug-img {\r\n\tdisplay: block;\r\n\tobject-fit: cover;\r\n\twidth: 100%;\r\n\tmax-height: 200px;\r\n\tscale: 1;\r\n\ttransition: scale 300ms ease;\r\n}\r\n._slug-img:hover {\r\n\tscale: 1.05;\r\n}\r\n._slug-text-wrapper {\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tflex-grow: 1;\r\n\tpadding: 10px;\r\n\twidth: 100%;\r\n\tposition: relative;\r\n}\r\n._slug-title {\r\n\tmargin-bottom: 10px;\r\n}\r\n._slug-terms {\r\n\tdisplay: flex;\r\n\tgap: 10px;\r\n}\r\n._slug-excerpt {\r\n\tmargin-top: 20px;\r\n\tflex-grow: 1;\r\n}\r\n._slug-info {\r\n\tdisplay: flex;\r\n\tjustify-content: space-between;\r\n}\r\n._slug-author {\r\n\tdisplay: flex;\r\n\tgap: 5px;\r\n}\r\n._slug-terms {\r\n\tborder-top: 1px solid #0003;\r\n\tdisplay: flex;\r\n\tflex-flow: column nowrap;\r\n\tmargin-top: 10px;\r\n}\r\n._slug .slider-counter {\r\n\tdisplay: flex;\r\n\tjustify-content: center;\r\n\twidth: 100%;\r\n}\r\n", 58 "script": { 59 "id": "slider", 60 "slider": { 61 "animate": "slide", 62 "ease": "swing", 63 "timer": true, 64 "speed": 0.5, 65 "delay": 5 66 } 67 }, 68 "preview": { 69 "type": "", 70 "orderby": "date", 71 "order": "DESC", 72 "limit": "10" 73 } 74 } 75 ] -
showcase-creator/trunk/src/layout-builder.js
r3233546 r3415798 28 28 type: 'post', orderby: 'date', order: 'DESC', limit: 10 29 29 }; 30 30 31 31 /** 32 32 * @var {Array} script Saved script options. … … 76 76 77 77 // Converts toggle and number controls. 78 [ ...document.querySelectorAll( '#layout-options input[type=checkbox] ' ) ].forEach( e => {78 [ ...document.querySelectorAll( '#layout-options input[type=checkbox], #enqueue_lightbox' ) ].forEach( e => { 79 79 if ( modules.toggle !== 'undefined' ) { 80 80 modules.toggle.convert( e ); … … 491 491 label: __( 'Pagination wrapper' , 'showcase-creator' ), 492 492 action: () => editorInsert( 493 '\n. paging-navigation .nav-links {\n\t\n}'493 '\n.sc-layout__slug .paging-navigation .nav-links {\n\t\n}' 494 494 ) 495 495 }, … … 528 528 { 529 529 label: __( 'Counter wrapper' , 'showcase-creator' ), 530 action: () => editorInsert( '\n._slug . slider-counter {\n\t\n}' )530 action: () => editorInsert( '\n._slug .vid-slider-counter {\n\t\n}' ) 531 531 }, 532 532 { 533 533 label: __( 'Counter circles' , 'showcase-creator' ), 534 action: () => editorInsert( '\n._slug . slider-circle{\n\t\n}' )534 action: () => editorInsert( '\n._slug .vid-slider-counter-item {\n\t\n}' ) 535 535 }, 536 536 { 537 537 label: __( 'Current circle' , 'showcase-creator' ), 538 action: () => editorInsert( '\n._slug . slider-circle.current {\n\t\n}' )538 action: () => editorInsert( '\n._slug .vid-slider-counter-item.current {\n\t\n}' ) 539 539 }, 540 540 { 541 541 label: __( 'Circle on hover' , 'showcase-creator' ), 542 action: () => editorInsert( '\n._slug . slider-circle:hover {\n\t\n}' )542 action: () => editorInsert( '\n._slug .vid-slider-counter-item:hover {\n\t\n}' ) 543 543 } 544 544 ] ); … … 1363 1363 elements: getElements(), 1364 1364 css: editor.codemirror.doc.getValue(), 1365 script: sc.layoutBuilder.layout.script1365 script: getScriptOptions() 1366 1366 } ); 1367 1367 this.form.action = this.query(); … … 1415 1415 } 1416 1416 1417 function getScriptOptions() { 1418 const $ = window.jQuery; 1419 if ( ! $ ) { 1420 return; 1421 } 1422 const script = {}; 1423 scriptId = $( '#layout-script' ).find( ':selected' ).val(); 1424 script.id = scriptId; 1425 if ( scriptId ) { 1426 script[ scriptId ] = {}; 1427 const opts = $( '.script-option.script-name_' + scriptId ); 1428 opts.each( ( idx, el ) => { 1429 const name = $( el ).find( 'input,select' ).attr( 'name' ).replace( 'script-option_' + scriptId + '_', '' ); 1430 const val = $( el ).find( 'input,select' ).val(); 1431 script[ scriptId ][ name ] = val; 1432 } ); 1433 } 1434 return script; 1435 } 1436 1437 /** 1438 * Handle layout script options. 1439 */ 1440 jQuery( document ).ready( ( $ ) => { 1441 const scripts = sc.layoutBuilder.scripts || {}; 1442 const scriptSelector = $( '#layout-script' ); 1443 if ( ! scriptSelector.length || ! Object.keys( scripts ).length ) { 1444 return; 1445 } 1446 let current = scriptSelector.find( ':selected' ).val(); 1447 scriptSelector.on( 'change', () => { 1448 current = scriptSelector.find( ':selected' ).val(); 1449 $( '.script-option.script-name_' + current ).show(); 1450 $( '.script-option:not(.script-name_' + current + ')' ).hide(); 1451 } ); 1452 $( '#layout-options' ).ready( () => scriptSelector.trigger( 'change' ) ); 1453 for ( scriptName in scripts ) { 1454 const opts = $( '.script-name_' + scriptName ); 1455 if ( ! ( 'options' in scripts[ scriptName ] ) ) { 1456 return; 1457 } 1458 for ( optName in scripts[ scriptName ].options ) { 1459 const option = scripts[ scriptName ].options[ optName ]; 1460 const optEl = $( '#script-option_' + scriptName + '_' + optName ); 1461 if ( 'color' === option.type ) { 1462 sc.colorPickers( { element: optEl.get(0), parent: optEl.parent() } ); 1463 } else if ( 'hidden' === option.type ) { 1464 let prev = optEl.val(); 1465 const obsrv = new MutationObserver( ( m ) => { 1466 for ( mm in m ) { 1467 if ( 1468 m[mm].type === 'attributes' && 1469 m[mm].attributeName === 'value' && 1470 optEl.val() !== prev 1471 ) { 1472 prev = optEl.val(); 1473 optEl.trigger( 'change' ); 1474 } 1475 } 1476 } ); 1477 obsrv.observe( optEl.get(0), { attributes: true } ); 1478 } 1479 if ( 'hide' in option ) { 1480 for ( ctrlName in option.hide ) { 1481 const ctrlEl = opts.find( '[name=script-option_' + scriptName + '_' + ctrlName + ']' ); 1482 const ctrlType = ctrlEl.attr( 'type' ) || 'select'; 1483 ctrlEl.on( 'change', () => { 1484 let currentVal; 1485 if ( ['checkbox', 'hidden'].includes( ctrlType ) ) { 1486 currentVal = ( 1 === parseInt( ctrlEl.val() ) ? true : false ); 1487 } else if ( 'select' === ctrlType ) { 1488 currentVal = ctrlEl.find( ':selected' ).val(); 1489 } else if ( 'number' === ctrlType ) { 1490 currentVal = parseFloat( ctrlEl.val() ); 1491 } else { 1492 currentVal = ctrlEl.val(); 1493 } 1494 const hide = Object.keys( option.hide ).some( ( k ) => { 1495 const v = option.hide[ k ]; 1496 if ( '!' === v[0] ) { 1497 return v.slice( 1 ) !== currentVal; 1498 } 1499 return v === currentVal; 1500 } ); 1501 if ( hide ) { 1502 optEl.closest( '.script-option' ).hide(); 1503 } else { 1504 optEl.closest( '.script-option' ).show(); 1505 } 1506 } ); 1507 ctrlEl.trigger( 'change' ); 1508 } 1509 } 1510 } 1511 } 1512 } ); 1513 1417 1514 } ); -
showcase-creator/trunk/src/layout-element-types.php
r3233559 r3415798 111 111 }, 112 112 function( $element, $post, $layout ) { 113 if ( $layout->script( 'id' ) === 'slider' ) { 114 Showcase_Creator::enqueue_assets( '-vid-modules', '-slider' ); 115 $element->classes[] = 'vid-slider'; 116 $slider = $layout->script( 'slider' ); 117 if ( $slider ) { 118 $element->attributes['data-slider'] = esc_attr( 119 wp_json_encode( $slider ) 120 ); 121 } 122 } else if ( $layout->script( 'id' ) === 'masonry' ) { 123 Showcase_Creator::enqueue_assets( 'jquery', 'jquery-masonry' ); 124 wp_add_inline_script( 125 'jquery-masonry', 126 "jQuery(document).ready(function($){ 127 $('.sc-masonry').masonry(); 128 $(window).load(function(){ 129 $('.sc-masonry').masonry(); 130 }); 131 });" 132 ); 133 $element->classes[] = 'sc-masonry'; 134 $masonry = $layout->script( 'masonry' ); 135 if ( $masonry ) { 136 $element->attributes['data-masonry'] = esc_attr( 137 wp_json_encode( $masonry ) 138 ); 139 } 140 } 141 if ( $layout->script( 'lightbox' ) ) { 113 $script_id = $layout->script( 'id' ); 114 if ( $script_id ) { 115 $script = Showcase_Creator::$layout_scripts[ $script_id ] ?? null; 116 if ( $script && ! empty( $script['integrate_callback'] ) ) { 117 $script_options = $layout->script( $script_id ); 118 call_user_func( $script['integrate_callback'], $script_options, $element ); 119 } 120 } 121 if ( $layout->script( 'lightbox' ) || $layout->uses_lightbox() ) { 142 122 global $showcase_creator; 143 123 $showcase_creator->enqueue_lightbox(); … … 596 576 if ( $limit && count( $splited ) > $limit ) { 597 577 $excerpt = implode( ' ', array_slice( $splited, 0, $limit ) ); 598 if ( $moretext && ! $element->get_option( 'more_hide' )) {578 if ( $moretext ) { 599 579 $excerpt .= ' ' . $morelink; 600 580 } 601 } else if ( $moretext ) {581 } else if ( $moretext && ! $element->get_option( 'more_hide' ) ) { 602 582 $excerpt .= ' ' . $morelink; 603 583 } … … 881 861 true 882 862 ); 863 $type->create_text_option( 864 'separator', 865 esc_html__( 'Separator', 'showcase-creator' ), 866 ', ' 867 ); 868 $type->create_number_option( 869 'limit', 870 esc_html__( 'Limit', 'showcase-creator' ), 871 0, 872 array( 873 'min' => 0, 874 'hint' => esc_html__( 'Set to 0 to show all categories.' , 'showcase-creator' ) 875 ) 876 ); 883 877 }, 884 878 function( $element, $post ) { … … 887 881 'category', 888 882 $element->get_option( 'hyperlink' ), 889 ', ' 883 $element->get_option( 'separator' ), 884 '', 885 $element->get_option( 'limit' ) 890 886 ); 891 887 } … … 918 914 true 919 915 ); 916 $type->create_text_option( 917 'separator', 918 esc_html__( 'Separator', 'showcase-creator' ), 919 ', ' 920 ); 921 $type->create_number_option( 922 'limit', 923 esc_html__( 'Limit', 'showcase-creator' ), 924 0, 925 array( 926 'min' => 0, 927 'hint' => esc_html__( 'Set to 0 to show all tags.' , 'showcase-creator' ) 928 ) 929 ); 920 930 }, 921 931 function( $element, $post ) { … … 924 934 'post_tag', 925 935 $element->get_option( 'hyperlink' ), 926 ', ', 927 ( $element->get_option( 'hashtag' ) ? '#' : '' ) 936 $element->get_option( 'separator' ), 937 ( $element->get_option( 'hashtag' ) ? '#' : '' ), 938 $element->get_option( 'limit' ) 928 939 ); 929 940 } … … 959 970 true 960 971 ); 972 $type->create_text_option( 973 'separator', 974 esc_html__( 'Separator', 'showcase-creator' ), 975 ', ' 976 ); 977 $type->create_text_option( 978 'prefix', 979 esc_html__( 'Prefix', 'showcase-creator' ), 980 '' 981 ); 982 $type->create_number_option( 983 'limit', 984 esc_html__( 'Limit', 'showcase-creator' ), 985 0, 986 array( 987 'min' => 0, 988 'hint' => esc_html__( 'Set to 0 to show all terms.' , 'showcase-creator' ) 989 ) 990 ); 961 991 }, 962 992 function( $element, $post ) { … … 965 995 $element->get_option( 'taxonomy' ), 966 996 $element->get_option( 'hyperlink' ), 967 ', ' 997 $element->get_option( 'separator' ), 998 $element->get_option( 'prefix' ), 999 $element->get_option( 'limit' ) 968 1000 ); 969 1001 } -
showcase-creator/trunk/src/layouts.php
r3302189 r3415798 156 156 header( 'Content-Disposition: attachment; filename="' 157 157 . $layout['slug'] . '.json"' ); 158 echo esc_textarea( sanitize_textarea_field( $output ) );158 echo wp_kses_data( sanitize_textarea_field( $output ) ); 159 159 exit; 160 160 } … … 400 400 function showcase_creator_layout_options_callback( $post ) { 401 401 402 // Prepares drop-down options. 403 $layout_scripts = [ 404 [ '', __( 'No script', 'showcase-creator' ) ], 405 [ 'masonry', __( 'Masonry', 'showcase-creator' ) ], 406 [ 'slider', __( 'Slider', 'showcase-creator' ) ], 407 ]; 408 $animations = [ 409 [ 'slide', __( 'Slide', 'showcase-creator' ) ], 410 [ 'flash', __( 'Flash', 'showcase-creator' ) ], 411 [ 'blur', __( 'Blur', 'showcase-creator' ) ], 412 ]; 413 $easing = [ 414 [ 'ease', __( 'Ease', 'showcase-creator' ) ], 415 [ 'linear', __( 'Linear', 'showcase-creator' ) ], 416 [ 'ease-in-out', __( 'Ease in & out', 'showcase-creator' ) ], 417 [ 'ease-out', __( 'Ease out', 'showcase-creator' ) ], 418 [ 'ease-in', __( 'Ease in', 'showcase-creator' ) ], 419 ]; 402 // Default script options. 403 $script_select = array( 404 [ '', __( 'No script', 'showcase-creator' ) ] 405 ); 406 foreach( Showcase_Creator::$layout_scripts as $script_name => $script ) { 407 $script_select[] = [ $script_name, $script['label'] ?? '' ]; 408 } 420 409 421 410 // Gets saved values. 422 $s cript = get_post_meta( $post->ID, '_script', true );423 $ preview = get_post_meta( $post->ID, '_preview', true );411 $saved_script = get_post_meta( $post->ID, '_script', true ); 412 $saved_preview = get_post_meta( $post->ID, '_preview', true ); 424 413 425 414 // Outputs HTML. … … 438 427 </div> 439 428 <div class="sc-flex-col"> 429 <label for="enqueue-lightbox"> 430 <?php esc_html_e( 'Enqueue lightbox?', 'showcase-creator' ); ?> 431 </label> 432 <input type="checkbox" name="enqueue-lightbox" id="enqueue-lightbox" /> 433 </div> 434 <div class="sc-flex-col"> 440 435 <label for="layout-script"> 441 436 <?php esc_html_e( 'Layout script', 'showcase-creator' ); ?> … … 444 439 'id' => 'layout-script', 445 440 'name' => 'layout-script', 446 'options' => $ layout_scripts,447 'selected' => $s cript['id'] ?? ''441 'options' => $script_select, 442 'selected' => $saved_script['id'] ?? '' 448 443 ) ); ?> 449 444 </div> 450 <div class="script-options" data-for="masonry"> 451 <div class="sc-flex-col script-option"> 452 <label for="masonry-colwidth"> 453 <?php esc_html_e( 'Column width', 'showcase-creator' ); ?> 454 <span class="vid-hint-auto"><?php 455 esc_html_e( 456 'Accepts a number or a CSS selector string.', 457 'showcase-creator' 458 ); 459 ?></span> 460 </label> 461 <input 462 type="text" 463 id="masonry-colwidth" 464 name="masonry-colwidth" 465 value="<?php echo esc_attr( $script['masonry']['columnWidth'] ?? '' ); ?>" 466 /> 467 </div> 468 <div class="sc-flex-col script-option"> 469 <label for="masonry-gutter"> 470 <?php esc_html_e( 'Gutter (horizontal space)', 'showcase-creator' ); ?> 471 <span class="vid-hint-auto"><?php 472 esc_html_e( 473 'Accepts a number or a CSS selector string', 474 'showcase-creator' 475 ); 476 ?></span> 477 </label> 478 <input 479 type="text" 480 id="masonry-gutter" 481 name="masonry-gutter" 482 value="<?php echo esc_attr( $script['masonry']['gutter'] ?? '' ); ?>" 483 /> 484 </div> 485 <div class="sc-flex-col script-option"> 486 <label for="masonry-percents"> 487 <?php esc_html_e( 'Percent position?', 'showcase-creator' ); ?> 488 </label> 489 <input 490 type="checkbox" 491 id="masonry-percents" 492 name="masonry-percents" 493 data-args='{hint: "For use with percent-width items, as 494 they will not transition their position on resize."}' 495 <?php echo esc_attr( 496 ( $script['masonry']['percentPosition'] ?? false ) 497 ? ' checked' 498 : '' 499 ); ?> 500 /> 501 </div> 502 <div class="sc-flex-col script-option"> 503 <label for="masonry-hrorder"><?php 504 esc_html_e( 'Force horizontal alignment?', 'showcase-creator' ); 505 ?></label> 506 <input 507 type="checkbox" 508 id="masonry-hrorder" 509 name="masonry-hrorder" 510 <?php echo esc_html( 511 ( $script['masonry']['horizontalOrder'] ?? false ) 512 ? ' checked' 513 : '' 514 ); ?> 515 /> 516 </div> 517 <div class="sc-flex-col script-option"> 518 <label for="masonry-fitwidth"> 519 <?php esc_html_e( 'Fit width?', 'showcase-creator' ); ?> 520 </label> 521 <input 522 type="checkbox" 523 id="masonry-fitwidth" 524 name="masonry-fitwidth" 525 data-args='{hint: "When enabled, you can center the container with CSS."}' 526 <?php echo esc_attr( 527 ( $script['masonry']['fitWidth'] ?? true ) 528 ? ' checked' 529 : '' 530 ); ?> 531 /> 532 </div> 533 </div> 534 <div class="script-options" data-for="slider"> 535 <div class="sc-flex-col script-option"> 536 <label for="slider-pause"><?php 537 esc_html_e( 'Pause on each slide for (seconds)', 'showcase-creator' ); 538 ?></label> 539 <input 540 type="number" 541 id="slider-pause" 542 name="slider-pause" 543 min="0" 544 step="0.1" 545 value="<?php echo esc_attr( intval( $script['slider']['delay'] ?? 5000 ) / 1000 ); ?>" 546 /> 547 </div> 548 <div class="sc-flex-col script-option"> 549 <label for="slider-anim"><?php 550 esc_html_e( 'Animation type', 'showcase-creator' ); 551 ?></label> 552 <?php Showcase_Creator::dropdown( array( 553 'id' => 'slider-anim', 554 'name' => 'slider-anim', 555 'options' => $animations, 556 'selected' => $script['slider']['animate'] ?? 'slide' 557 ) ); ?> 558 </div> 559 <div class="sc-flex-col script-option"> 560 <label for="slider-speed"><?php 561 esc_html_e( 'Animation duration (seconds)', 'showcase-creator' ); 562 ?></label> 563 <input 564 type="number" 565 id="slider-speed" 566 name="slider-speed" 567 min="0" 568 step="0.1" 569 value="<?php echo esc_attr( intval( $script['slider']['speed'] ?? 500 ) / 1000 ); ?>" 570 /> 571 </div> 572 <div class="sc-flex-col script-option"> 573 <label for="slider-ease"><?php 574 esc_html_e( 'Easing', 'showcase-creator' ); 575 ?></label> 576 <?php Showcase_Creator::dropdown( array( 577 'id' => 'slider-ease', 578 'name' => 'slider-ease', 579 'options' => $easing, 580 'selected' => $script['slider']['ease'] ?? 'ease' 581 ) ); ?> 582 </div> 583 <div class="sc-flex-col script-option"> 584 <label for="slider-immediate"> 585 <?php esc_html_e( 'Start without pause?', 'showcase-creator' ); ?> 586 </label> 587 <input 588 type="checkbox" 589 id="slider-immediate" 590 name="slider-immediate" 591 <?php echo esc_html( 592 ( $script['slider']['immediate'] ?? false ) 593 ? ' checked' 594 : '' 595 ); ?> 596 /> 597 </div> 598 </div> 445 599 446 <?php 600 /** 601 * Hook for printing additional script options. 602 * 603 * @since 1.0.0 604 * 605 * @param WP_Post $post - The layout being edited. 606 */ 607 do_action( 'showcase_creator_print_layout_script_options', $post ); 447 // Prints registered layout script options. 448 $allowed_html = array( 449 'div' => array( 'class' => true, 'id' => true ), 450 'label' => array( 'for' => true ), 451 'span' => array( 'class' => true ), 452 'input' => array( 453 'type' => array( 'text', 'number', 'color', 'checkbox' ), 454 'id' => true, 'name' => true, 'value' => true, 'placeholder' => true, 455 'min' => true, 'max' => true, 'step' => true, 'size' => true, 456 'maxlength' => true, 'pattern' => true, 'checked' => true, 457 'data-*' => true 458 ), 459 'select' => array( 'id' => true, 'name' => true, 'class' => true, 'multiple' => true, 'size' => true ), 460 'option' => array( 'value' => true, 'selected' => true ), 461 ); 462 foreach ( Showcase_Creator::$layout_scripts as $script_name => $script ) { 463 if ( empty( $script['options'] ) ) { 464 continue; 465 } 466 foreach ( $script['options'] as $option_name => $option ) { 467 if ( empty( $option ) ) { 468 continue; 469 } 470 $value = $saved_script[ $script_name ][ $option_name ] ?? $option['default']; 471 echo wp_kses( 472 showcase_creator_print_layout_script_option( $script_name, $option_name, $value ), 473 $allowed_html 474 ); 475 } 476 } 608 477 ?> 609 478 </div> … … 615 484 name="preview-type" 616 485 type="hidden" 617 value="<?php echo esc_attr( $ preview['type'] ?? 'post' ); ?>"486 value="<?php echo esc_attr( $saved_preview['type'] ?? 'post' ); ?>" 618 487 /> 619 488 <input 620 489 name="preview-orderby" 621 490 type="hidden" 622 value="<?php echo esc_attr( $ preview['orderby'] ?? 'date' ); ?>"491 value="<?php echo esc_attr( $saved_preview['orderby'] ?? 'date' ); ?>" 623 492 /> 624 493 <input 625 494 name="preview-order" 626 495 type="hidden" 627 value="<?php echo esc_attr( $ preview['order'] ?? 'DESC' ); ?>"496 value="<?php echo esc_attr( $saved_preview['order'] ?? 'DESC' ); ?>" 628 497 /> 629 498 <input 630 499 name="preview-limit" 631 500 type="hidden" 632 value="<?php echo esc_attr( $ preview['limit'] ?? '10' ); ?>"501 value="<?php echo esc_attr( $saved_preview['limit'] ?? '10' ); ?>" 633 502 /> 634 503 <?php … … 679 548 ); 680 549 681 // S aves the script options.550 // Selected script. 682 551 $script_id = isset( $_POST['layout-script'] ) 683 552 ? sanitize_key( $_POST['layout-script'] ) 684 553 : ''; 685 $script = array( 'id' => $script_id ); 686 if ( 'masonry' === $script_id ) { 687 $col_width = sanitize_text_field( wp_unslash( $_POST['masonry-colwidth'] ?? '' ) ); 688 if ( $col_width ) { 689 $script['masonry']['columnWidth'] = is_numeric( $col_width ) 690 ? intval( $col_width ) 691 : $col_width; 554 $saved_script = array( 'id' => $script_id ); 555 556 // Force enqueue lightbox module. 557 if ( ! empty( $_POST['enqueue-lightbox'] ) ) { 558 $saved_script['lightbox'] = true; 559 } 560 561 // Script options. 562 if ( $script_id ) { 563 $scripts = Showcase_Creator::$layout_scripts; 564 if ( isset( $scripts[ $script_id ] ) ) { 565 foreach ( $scripts[ $script_id ]['options'] as $option_name => $option ) { 566 $name = sanitize_html_class( 'script-option_' . $script_id . '_' . $option_name ); 567 if ( 568 empty( $option['label'] ) || empty( $option['type'] ) || 569 ! isset( $_POST[ $name ] ) 570 ) { 571 continue; 572 } 573 $value = sanitize_text_field( $_POST[ $name ] ?? $option['default'] ?? '' ); 574 if ( 'number' === $option['type'] ) { 575 $value = floatval( $value ); 576 } else if ( 'checkbox' === $option['type'] ) { 577 $value = boolval( $value ); 578 } 579 $value = isset( $option['sanitize_save'] ) && is_callable( $option['sanitize_save'] ) 580 ? call_user_func( $option['sanitize_save'], $value ) 581 : $value; 582 $saved_script[ $script_id ][ $option_name ] = $value; 583 } 692 584 } 693 $gutter = sanitize_text_field( wp_unslash( $_POST['masonry-gutter'] ?? '' ) ); 694 if ( $gutter ) { 695 $script['masonry']['gutter'] = is_numeric( $gutter ) 696 ? intval( $gutter ) 697 : $gutter; 698 } 699 $script['masonry']['percentPosition'] = boolval( $_POST['masonry-percents'] ?? false ); 700 $script['masonry']['horizontalOrder'] = boolval( $_POST['masonry-hrorder'] ?? false ); 701 $script['masonry']['fitWidth'] = boolval( $_POST['masonry-fitwidth'] ?? true ); 702 } else if ( 'slider' === $script_id ) { 703 $script['slider']['delay'] = floatval( $_POST['slider-pause'] ?? 5 ) * 1000; 704 $script['slider']['animate'] = sanitize_key( $_POST['slider-anim'] ?? 'slide' ); 705 $script['slider']['speed'] = floatval( $_POST['slider-speed'] ?? 0.5 ) * 1000; 706 $script['slider']['ease'] = sanitize_key( $_POST['slider-ease'] ?? 'ease' ); 707 $script['slider']['immediate'] = boolval( $_POST['slider-immediate'] ?? false ); 708 } 709 710 /** 711 * Filters layout script options. 712 * Allows additional layout script options. 713 * 714 * @since 1.0.0 715 * 716 * @param string $script The selected script. 717 */ 718 $script = apply_filters( 'showcase_creator_filter_layout_script_options', $script ); 719 update_post_meta( $post_id, '_script', $script ); 585 } 586 update_post_meta( $post_id, '_script', $saved_script ); 720 587 721 588 // Saves the preview options. -
showcase-creator/trunk/src/modules/lightbox.js
r3198078 r3415798 12 12 return; 13 13 } 14 // Ensure jQuery is loaded 15 if (typeof window.jQuery === 'undefined') { 16 console.error('jQuery is required for the lightbox module.'); 17 return; 18 } 19 const $ = window.jQuery; 14 20 15 21 /** 16 * Lightbox 22 * Lightbox (jQuery version) 17 23 * 18 24 * Shows a box of images. … … 23 29 * - String[]: Array of URLs. 24 30 * - String: Single URL. 25 *26 * @author Videlin Djedjev27 31 */ 28 32 modules.lightbox = class { 29 33 30 constructor( args, data ) { 31 34 constructor(args, data) { 32 35 const settings = 33 36 'settings' in sc && … … 48 51 }; 49 52 50 // Processes colors.51 53 const colors = [ 52 54 this.args.dark, … … 55 57 this.args.light, 56 58 this.args.dark 57 ].map( ( color, i) => {58 let c = color.replace( /#|[^a-f0-9]/gi, '');59 if ( c.length === 3 || c.length === 4) {60 c = Array.from( c ).slice( 0,3 ).map( l => l+l ).join( '');59 ].map((color, i) => { 60 let c = color.replace(/#|[^a-f0-9]/gi, ''); 61 if (c.length === 3 || c.length === 4) { 62 c = Array.from(c).slice(0, 3).map(l => l + l).join(''); 61 63 } else { 62 c = c.slice( 0,6);63 } 64 if ( i === 1 || i === 3) {64 c = c.slice(0, 6); 65 } 66 if (i === 1 || i === 3) { 65 67 c += ( 66 68 Math.max( … … 68 70 Math.min( 69 71 255, 70 parseInt( this.args.alpha*255)72 parseInt(this.args.alpha * 255) 71 73 ) 72 74 ) 73 ).toString( 16);74 } else if ( i === 4) {75 ).toString(16); 76 } else if (i === 4) { 75 77 c += '55'; 76 78 } 77 return '#' +c;78 } );79 return '#' + c; 80 }); 79 81 const styleTagCnt = `.vid-lightbox { 80 82 --vid-lightbox-dark: ${colors[0]}; … … 84 86 --vid-lightbox-shadow: ${colors[4]}; 85 87 }`; 86 const styleTag = EL( 'style', { 87 id: 'vid-gallery-style-tag', 88 textContent: styleTagCnt 89 } ); 90 if ( ! document.getElementById( 'vid-gallery-style-tag' ) ) { 91 document.head.appendChild( styleTag ); 92 } 93 const themeName = ( () => { 94 switch( parseInt( this.args.theme ) ) { 88 if (!$('#vid-gallery-style-tag').length) { 89 $('<style>', { 90 id: 'vid-gallery-style-tag', 91 text: styleTagCnt 92 }).appendTo('head'); 93 } 94 const themeName = (() => { 95 switch (parseInt(this.args.theme)) { 95 96 case 2: return 'block'; 96 97 case 3: return 'rounded'; 97 98 default: return 'clean'; 98 99 } 99 } )( this ); 100 const el = EL( 'div', { classList: 'vid-lightbox ' + themeName } ); 101 const prev = EL( 'div' , { classList: 'vid-lightbox-prev', textContent: '❰' } ); 102 const next = EL( 'div', { classList: 'vid-lightbox-next', textContent: '❱' } ); 103 const x = EL( 'div', { classList: 'vid-lightbox-x', textContent: '×' } ); 104 const imgs = data.map( entry => { 100 })(); 101 102 const $el = $('<div>', { class: 'vid-lightbox ' + themeName }); 103 const $prev = $('<div>', { class: 'vid-lightbox-prev', text: '❰' }); 104 const $next = $('<div>', { class: 'vid-lightbox-next', text: '❱' }); 105 const $x = $('<div>', { class: 'vid-lightbox-x', text: '×' }); 106 107 const imgs = data.map(entry => { 105 108 let obj = {}; 106 if ( entry.url) {107 obj. img = EL( 'img', {108 class List: 'vid-lightbox-image',109 if (entry.url) { 110 obj.$img = $('<img>', { 111 class: 'vid-lightbox-image', 109 112 src: entry.url 110 } );111 if ( entry.desc) {112 obj. desc = EL( 'div', {113 class List: 'vid-lightbox-description',114 text Content: entry.desc115 } );113 }); 114 if (entry.desc) { 115 obj.$desc = $('<div>', { 116 class: 'vid-lightbox-description', 117 text: entry.desc 118 }); 116 119 } 117 120 } 118 121 return obj; 119 } ).filter( f => f.img ); 120 el.append( ...( 121 typeof imgs[this.args.current].desc !== 'undefined' 122 ? [ imgs[this.args.current].img, imgs[this.args.current].desc ] 123 : [ imgs[this.args.current].img ] 124 ), x ); 125 if ( imgs.length > 1 ) { 126 el.append( prev, next ); 127 } 122 }).filter(f => f.$img); 123 124 const current = this.args.current; 125 if (imgs[current].$desc) { 126 $el.append(imgs[current].$img, imgs[current].$desc, $x); 127 } else { 128 $el.append(imgs[current].$img, $x); 129 } 130 if (imgs.length > 1) { 131 $el.append($prev, $next); 132 } 133 128 134 this.imgs = imgs; 129 this.current = imgs[ this.args.current];135 this.current = imgs[current]; 130 136 this.count = imgs.length; 131 this.lightbox = el; 132 el.addEventListener( 'click', ( e ) => { 133 if ( e.target === el || e.target === x ) { 134 this.close(); 135 } else if ( e.target === prev ) { 136 this.prev(); 137 } else if ( e.target === next ) { 138 this.next(); 139 } 140 } ); 141 this.keyEvent = ( e ) => { 142 if ( e.key === 'Escape' ) { 143 this.close(); 144 } 145 if ( e.key === 'ArrowLeft' ) { 146 this.prev(); 147 } 148 if ( e.key === 'ArrowRight' ) { 149 this.next(); 150 } 151 }; 152 let startX, startY, threshold = 150; 153 el.addEventListener( 'touchstart', ( e ) => { 154 let touchobj = e.changedTouches[0]; 137 this.$lightbox = $el; 138 139 // Mouse events. 140 $x.on('click', () => this.close()); 141 $prev.on('click', () => this.prev()); 142 $next.on('click', () => this.next()); 143 144 // Mouse drag. 145 let mouseDown = false, mouseStartX = 0, mouseStartY = 0; 146 $el.on('mousedown', (e) => { 147 mouseDown = true; 148 mouseStartX = e.pageX; 149 mouseStartY = e.pageY; 150 }); 151 $el.on('mouseup', (e) => { 152 if (!mouseDown) return; 153 mouseDown = false; 154 const dx = e.pageX - mouseStartX; 155 const dy = e.pageY - mouseStartY; 156 if (Math.abs(dy) <= 100) { 157 if (dx >= threshold) { 158 this.prev(); 159 } else if (dx <= -threshold) { 160 this.next(); 161 } 162 } 163 }); 164 $el.on('mouseleave', () => { 165 mouseDown = false; 166 }); 167 168 // Mouse wheel event. 169 if (this.args.zoom) { 170 $el.on('wheel', (e) => { 171 e.preventDefault(); 172 let scale = this.current.$img[0].style.scale; 173 if (!scale) { 174 this.current.$img[0].style.scale = 1; 175 scale = 1; 176 } 177 if (e.originalEvent.deltaY < 0) { 178 scale = parseFloat(scale) + 0.05; 179 this.current.$img[0].style.scale = scale; 180 } 181 if (e.originalEvent.deltaY > 0) { 182 scale = Math.max(0.05, parseFloat(scale) - 0.05); 183 this.current.$img[0].style.scale = scale; 184 } 185 }); 186 } 187 188 // Touch events. 189 $x.on('touchend', (e) => { 190 e.preventDefault(); 191 this.close(); 192 }); 193 $prev.on('touchend', (e) => { 194 e.preventDefault(); 195 this.prev(); 196 }); 197 $next.on('touchend', (e) => { 198 e.preventDefault(); 199 this.next(); 200 }); 201 202 // Touch swipe. 203 let startX, startY, threshold = 100; 204 $el.on('touchstart', (e) => { 205 let touchobj = e.originalEvent.changedTouches[0]; 155 206 startX = touchobj.pageX; 156 207 startY = touchobj.pageY; 157 208 e.preventDefault(); 158 } , false);159 el.addEventListener( 'touchend', ( e) => {160 let touchobj = e. changedTouches[0];209 }); 210 $el.on('touchend', (e) => { 211 let touchobj = e.originalEvent.changedTouches[0]; 161 212 if ( 162 213 touchobj.pageX - startX >= threshold && 163 Math.abs( touchobj.pageY - startY) <= 100214 Math.abs(touchobj.pageY - startY) <= 100 164 215 ) { 165 216 this.prev(); 166 217 } else if ( 167 218 startX - touchobj.pageX >= threshold && 168 Math.abs( touchobj.pageY - startY) <= 100219 Math.abs(touchobj.pageY - startY) <= 100 169 220 ) { 170 221 this.next(); 171 222 } 172 223 e.preventDefault(); 173 }, false ); 174 if ( this.args.zoom ) { 175 el.onwheel = ( e ) => { 176 e.preventDefault(); 177 let scale = this.current.img.style.scale; 178 if ( ! scale ) { 179 this.current.img.style.scale = 1; 180 scale = 1; 181 } 182 if ( e.deltaY < 0 ) { 183 scale = parseFloat( scale ) + 0.05; 184 this.current.img.style.scale = scale; 185 } 186 if ( e.deltaY > 0 ) { 187 scale = Math.max( 0.05, parseFloat( scale ) - 0.05 ); 188 this.current.img.style.scale = scale; 189 } 190 }; 191 } 224 }); 225 226 // Zoom using touch. 227 if (this.args.zoom) { 228 229 let pinchStartDist = null; 230 let pinchStartScale = 1; 231 232 $el.on('touchmove', (e) => { 233 if (e.originalEvent.touches.length === 2) { 234 e.preventDefault(); 235 const t1 = e.originalEvent.touches[0]; 236 const t2 = e.originalEvent.touches[1]; 237 const dx = t2.pageX - t1.pageX; 238 const dy = t2.pageY - t1.pageY; 239 const dist = Math.sqrt(dx * dx + dy * dy); 240 241 if (pinchStartDist === null) { 242 pinchStartDist = dist; 243 const scale = this.current.$img[0].style.scale; 244 pinchStartScale = scale ? parseFloat(scale) : 1; 245 } else { 246 let newScale = pinchStartScale * (dist / pinchStartDist); 247 newScale = Math.max(0.05, Math.min(newScale, 5)); 248 this.current.$img[0].style.scale = newScale; 249 } 250 } 251 }); 252 253 $el.on('touchend', (e) => { 254 if (e.originalEvent.touches.length < 2) { 255 pinchStartDist = null; 256 } 257 }); 258 } 259 260 // Keyboard events. 261 this.keyEvent = (e) => { 262 if (e.key === 'Escape') this.close(); 263 if (e.key === 'ArrowLeft') this.prev(); 264 if (e.key === 'ArrowRight') this.next(); 265 }; 266 192 267 } 193 268 194 269 open() { 195 document.body.appendChild( this.lightbox);196 window.addEventListener( 'keydown', this.keyEvent);197 this.scale( this.current.img);270 $('body').append(this.$lightbox); 271 $(window).on('keydown', this.keyEvent); 272 this.scale(this.current.$img[0]); 198 273 } 199 274 200 275 close() { 201 this. lightbox.remove();202 window.removeEventListener( 'keydown', this.keyEvent);276 this.$lightbox.remove(); 277 $(window).off('keydown', this.keyEvent); 203 278 } 204 279 205 280 prev() { 206 if ( this.count <= 1 ) { return; }281 if (this.count <= 1) return; 207 282 const oldImg = this.current; 208 283 this.args.current = ( 209 this.imgs[this.args.current -1]210 ? this.args.current-1211 : this.imgs.length-1284 this.imgs[this.args.current - 1] 285 ? this.args.current - 1 286 : this.imgs.length - 1 212 287 ); 213 288 const newImg = this.current = this.imgs[this.args.current]; 214 oldImg.img.animate( [ 215 { left: '50%' }, 216 { left: '150%' } 217 ], { duration: 250 } ); 218 if ( oldImg.desc ) { 219 oldImg.desc.animate( [ 220 { left: '50%' }, 221 { left: '150%' } 222 ], { duration: 250 } ); 223 } 224 this.lightbox.append( 225 ...( 226 newImg.desc 227 ? [newImg.img, newImg.desc] 228 : [newImg.img] 229 ) ); 230 this.scale( newImg.img ); 231 newImg.img.animate( [ 232 { left: '-50%' }, 233 { left: '50%' } 234 ], { duration: 250 } ); 235 if ( newImg.desc ) { 236 newImg.desc.animate( [ 237 { left: '-50%' }, 238 { left: '50%' } 239 ], { duration: 250 } ); 240 } 241 setTimeout( () => { 242 oldImg.img.remove(); 243 if ( oldImg.desc ) { 244 oldImg.desc.remove(); 245 } 246 }, 250 ); 289 oldImg.$img.animate({ left: '150%' }, 250); 290 if (oldImg.$desc) oldImg.$desc.animate({ left: '150%' }, 250); 291 292 if (newImg.$desc) { 293 this.$lightbox.append(newImg.$img, newImg.$desc); 294 } else { 295 this.$lightbox.append(newImg.$img); 296 } 297 this.scale(newImg.$img[0]); 298 newImg.$img.css({ left: '-50%' }).animate({ left: '50%' }, 250); 299 if (newImg.$desc) newImg.$desc.css({ left: '-50%' }).animate({ left: '50%' }, 250); 300 301 setTimeout(() => { 302 oldImg.$img.remove(); 303 if (oldImg.$desc) oldImg.$desc.remove(); 304 }, 250); 247 305 } 248 306 249 307 next() { 250 if ( this.count <= 1 ) { 251 return; 252 } 308 if (this.count <= 1) return; 253 309 const oldImg = this.current; 254 310 this.args.current = ( 255 this.imgs[this.args.current +1]256 ? this.args.current+1257 : 0311 this.imgs[this.args.current + 1] 312 ? this.args.current + 1 313 : 0 258 314 ); 259 315 const newImg = this.current = this.imgs[this.args.current]; 260 oldImg.img.animate( [ 261 { left: '50%' }, 262 { left: '-50%' } 263 ], { duration: 250 } ); 264 if ( oldImg.desc ) { 265 oldImg.desc.animate( [ 266 { left: '50%' }, 267 { left: '-50%' } 268 ], { duration: 250 } ); 269 } 270 this.lightbox.append( ...( 271 newImg.desc 272 ? [ newImg.img, newImg.desc ] 273 : [newImg.img] 274 ) ); 275 this.scale( newImg.img ); 276 newImg.img.animate( [ 277 { left: '150%' }, 278 { left: '50%' } 279 ], { duration: 250 } ); 280 if ( newImg.desc ) { 281 newImg.desc.animate( [ 282 { left: '150%' }, 283 { left: '50%' } 284 ], { duration: 250 } ); 285 } 286 setTimeout( () => { 287 oldImg.img.remove(); 288 if ( oldImg.desc ) { 289 oldImg.desc.remove(); 290 } 291 }, 250 ); 292 } 293 294 scale( img, mode = this.args.scaleMode ) { 295 if ( ! mode ) { 316 oldImg.$img.animate({ left: '-50%' }, 250); 317 if (oldImg.$desc) oldImg.$desc.animate({ left: '-50%' }, 250); 318 319 if (newImg.$desc) { 320 this.$lightbox.append(newImg.$img, newImg.$desc); 321 } else { 322 this.$lightbox.append(newImg.$img); 323 } 324 this.scale(newImg.$img[0]); 325 newImg.$img.css({ left: '150%' }).animate({ left: '50%' }, 250); 326 if (newImg.$desc) newImg.$desc.css({ left: '150%' }).animate({ left: '50%' }, 250); 327 328 setTimeout(() => { 329 oldImg.$img.remove(); 330 if (oldImg.$desc) oldImg.$desc.remove(); 331 }, 250); 332 } 333 334 scale(img, mode = this.args.scaleMode) { 335 if (!mode) return; 336 if (!img.complete) { 337 img.onload = () => this.scale(img, mode); 296 338 return; 297 339 } 298 if ( ! img.complete ) { 299 img.onload = () => this.scale( img, mode ); 300 return; 301 } 302 const style = window.getComputedStyle( img ); 303 const w = window.innerWidth / parseInt( style.width ); 304 const h = window.innerHeight / parseInt( style.height ); 305 const tall = Math.min( w, h ); 306 const short = Math.max( w, h ); 307 if ( mode === 'fit' && tall < 1 ) { 340 const style = window.getComputedStyle(img); 341 const w = window.innerWidth / parseInt(style.width); 342 const h = window.innerHeight / parseInt(style.height); 343 const tall = Math.min(w, h); 344 const short = Math.max(w, h); 345 if (mode === 'fit' && tall < 1) { 308 346 img.style.scale = tall; 309 347 } 310 if ( mode === 'contain') {348 if (mode === 'contain') { 311 349 img.style.scale = tall; 312 350 } 313 if ( mode === 'cover') {351 if (mode === 'cover') { 314 352 img.style.scale = short; 315 353 } 316 354 } 317 355 318 static create( ...data) {319 data = [data].flat();320 data = data.map( d => {321 if ( typeof d === 'string') {356 static create(...data) { 357 data = data.flat(); 358 data = data.map(d => { 359 if (typeof d === 'string') { 322 360 return { url: d }; 323 361 } else { 324 362 return d; 325 363 } 326 } );327 const lightbox = new this( {}, data);364 }); 365 const lightbox = new this({}, data); 328 366 lightbox.open(); 329 367 } 330 368 331 static gallery( name, current) {369 static gallery(name, current) { 332 370 let imgs; 333 371 const gallery = ( 334 372 typeof sc.gallery !== 'undefined' 335 ? sc.gallery336 : {}373 ? sc.gallery 374 : {} 337 375 ); 338 if ( name in gallery) {376 if (name in gallery) { 339 377 imgs = gallery[name]; 340 378 } else { 341 379 return; 342 380 } 343 const lightbox = new this( { current: current }, imgs);381 const lightbox = new this({ current: current }, imgs); 344 382 lightbox.open(); 345 383 } 346 347 384 } 348 385 -
showcase-creator/trunk/src/modules/number-input.js
r3190704 r3415798 209 209 } ); 210 210 this.inputEl.addEventListener( 'input', ( event ) => { 211 event.target.value = this.prefix +this.validate( event.target.value, false )+this.suffix;211 event.target.value = this.prefix + event.target.value + this.suffix; 212 212 if ( this.onInput ) { 213 213 this.onInput.call( null, this ); … … 215 215 } ); 216 216 this.inputEl.addEventListener( 'change', ( event ) => { 217 event.target.value = this.prefix + this.validate( event.target.value, false ) + this.suffix; 217 218 this.value = event.target.value; 218 219 } ); … … 221 222 222 223 validate( v, minmax = true ) { 223 if ( this.precision ) {224 v = v.toFixed( this.precision );224 if ( this.precision && parseInt( v ) !== parseFloat( v ) ) { 225 v = Number( v ).toFixed( this.precision ); 225 226 } 226 227 let valid = String( v ).replace( -
showcase-creator/trunk/src/modules/slider.js
r3302189 r3415798 1 2 1 jQuery( document ).ready( ( $ ) => { 3 2 4 let sc, modules , EL, ms;3 let sc, modules; 5 4 try { 6 5 sc = window.showcaseCreator; 7 6 modules = sc.modules; 8 EL = modules.EL;9 ms = modules.ms;10 7 } 11 8 catch( e ) { … … 15 12 16 13 /** 17 * Slider 14 * Slider (version 1.1.0) 18 15 * 19 * Displays items in a carousel or another type of slider. 16 * Transforms a container of items into a slider. 17 * This version is included in Showcase Creator since 1.1.0 20 18 * 21 * @param {HTMLElement} wrapperHTML element to mount the slider on.19 * @param {HTMLElement} parent HTML element to mount the slider on. 22 20 * 23 21 * @author Videlin Djedjev … … 25 23 modules.slider = class { 26 24 27 constructor( wrapper ) { 28 this.wrapper = wrapper; 29 this.wrapper.style.overflow = 'hidden'; 30 this.wrapper.style.maxWidth = '100%'; 31 this.wrapper.style.position = 'relative'; 32 this.slider = EL( 33 'div', 34 { classList: 'slider-inner' }, 35 {}, 36 { 37 display: 'flex', 38 flexFlow: 'row nowrap', 39 width: 'max-content', 40 position: 'absolute', 41 left: '0' 42 } 43 ); 44 this.items = [ ...wrapper.children ].filter( f => { 45 const rect = f.getBoundingClientRect(); 46 return Boolean( rect.width && rect.height ); 25 constructor( parent, options = {} ) { 26 27 // DEBUG 28 window.sliders = window.sliders || []; window.sliders.push( this ); 29 30 // The element on which the slider is mounted. 31 this.parent = $( parent ); 32 33 // Slider ID. 34 this.id = Math.max( 35 0, 36 ...( [ ...$( '.vid-slider-container' ) ].map( 37 c => parseInt( $( c ).attr( 'id' ).replace( /\D+/gi, '' ) ) 38 ) ) 39 ) + 1; 40 41 // Parse options from tag attribute. 42 let attrOptions = {}; 43 try { 44 const json = JSON.parse( this.parent.attr( 'data-slider' ) || '{}' ) 45 if ( json ) { 46 attrOptions = json; 47 } 48 } catch( e ) { 49 console.log( 'Invalid JSON in data-slider attribute. Default settings will be used.' ); 50 } 51 52 // Slider settings. 53 this.options = { 54 55 /** 56 * animate: one of 'slide', 'shrink', '3d', 'dissolve', 'blur', 'flash' 57 * Default: 'slide' 58 * Specifies the transition between slides. 59 */ 60 animate: 'slide', 61 62 /** 63 * speed: integer 64 * Default: 1 65 * Time in seconds for the transition. 66 */ 67 speed: 1, 68 69 /** 70 * ease: one of 'swing', 'linear' (if jQuery UI is included could be any of its easing functions) 71 * Default: 'swing' 72 * Sets the transition's easing function. 73 */ 74 ease: 'swing', 75 76 /** 77 * infinite: bool 78 * Default: TRUE 79 * Whether to simulate an infinite loop. 80 */ 81 infinite: true, 82 83 /** 84 * arrange: One of 'separate', 'stack', 'single' 85 * Default: 'separate' 86 * The way items are arranged in the slider: 87 * - "separate" places each element on a separate slide, arranged side by side. 88 * - "stack" combines as many items as possible into one slide. 89 * - "single" shows one item at a time. 90 */ 91 arrange: 'separate', 92 93 /** 94 * nrwWidth: int or empty string 95 * Default: '' 96 * The container width breakpoint where each slide will take up the entire 97 * width of the container. Leave blank to disable this option. 98 */ 99 nrwWidth: '', 100 101 /** 102 * align: one of 'start', 'center', 'end' 103 * Default: 'start' 104 * Alignment of current item. 105 */ 106 align: 'start', 107 108 /** 109 * adjustHeight: bool 110 * Default: false 111 * By default the container uses the tallest element's height. 112 * If set to TRUE, the container height will adjust on each transition, 113 * taking into account the tallest element in the view. 114 */ 115 adjustHeight: false, 116 117 /** 118 * rows: integer 119 * Default: 1 120 * Specifies the number of rows in which the items are arranged. 121 */ 122 rows: 1, 123 124 /** 125 * vertical: bool 126 * Default: FALSE 127 * When TRUE, slides vertically. 128 */ 129 vertical: false, 130 131 /** 132 * counterPos: one of 'below', 'above', 'both', 'inline', '' 133 * Default: 'below' 134 * Where to put the slide counter. 135 * Empty string will disable the counter. 136 */ 137 counterPos: 'below', 138 139 /** 140 * touch: bool 141 * Default: TRUE 142 * Whether to enable sliding by using touch gestures. 143 */ 144 touch: true, 145 146 /** 147 * mouse: bool 148 * Default: TRUE 149 * Whether to enable sliding by using the mouse. 150 */ 151 mouse: true, 152 153 /** 154 * timer: bool 155 * Default: TRUE 156 * Whether to enable auto sliding on given interval. 157 */ 158 timer: true, 159 160 /** 161 * delay: integer 162 * Default: 5 163 * Time in seconds to wait on each slide. 164 * Condition: shows when timer is TRUE 165 */ 166 delay: 5, 167 168 /** 169 * backwards: bool 170 * Default: FALSE 171 * If TRUE, reverses the direction of auto sliding. 172 * Condition: shows when timer is TRUE 173 */ 174 backwards: false, 175 176 /** 177 * Stop on hover: bool 178 * Default: TRUE 179 * Whether to stop auto sliding on mouse over or touch. 180 * Condition: shows when timer is TRUE 181 */ 182 stopOnHover: true, 183 184 /** Colors */ 185 counterColor: '#5553', 186 counterColorHover: '#5556', 187 counterColorCurrent: '#5559', 188 flashColor: '#fff', // Conditions: shows when animate is set to 'flash' 189 ...options, // Override from class 190 ...attrOptions // Override from attribute 191 }; 192 193 // Easing fallback. 194 this.options.ease = this.options.ease in jQuery.easing ? this.options.ease : jQuery.easing._default; 195 196 // Turn seconds in milliseconds. 197 this.speed = parseFloat( this.options.speed ) * 1000; 198 this.delay = parseFloat( this.options.delay ) * 1000; 199 200 // Include the slider stylesheet. 201 this.includeStyle(); 202 203 // Slider container. 204 this.container = $( '<div id="vid-slider__' + this.id + '" ' + 205 'class="vid-slider-container vid-slider-transition__' + this.options.animate + '" ' + 206 'style="width:100%;"></div>' ); 207 208 // Vertical mode. 209 if ( this.options.vertical ) { 210 this.container.addClass( 'vid-slider-vertical' ); 211 } 212 213 // Outer wrapper is the static one. 214 this.outer = $( '<div class="vid-slider-outer" style="position:relative;overflow:hidden;">' ); 215 this.outer.css( { width: '100%', height: '100%' } ); 216 /*if ( this.options.vertical ) { 217 this.outer.css( { width: '100%', height: '100%', minHeight: '100%', maxHeight: '100%' } ); 218 } else { 219 this.outer.css( { width: '100%', minWidth: '100%', maxWidth: '100%' } ); 220 }*/ 221 222 // Inner wrapper is the one that moves. 223 this.inner = $( '<div class="vid-slider-inner"></div>' ); 224 225 // Number of rows. 226 this.rows = Math.max( 1, parseInt( this.options.rows ) ); 227 228 // Remove unnecessary items. 229 [ ...this.parent.children() ].forEach( ( i ) => { 230 if ( ( ! $( i ).width() && ! $( i ).height() ) || 'none' === $( i ).css( 'display' ) ) { 231 $( i ).remove(); 232 } 47 233 } ); 48 ! this.items.length && ( this.unmount() ); 49 this.items.forEach( i => { 50 i.style.width = window.getComputedStyle( i ).width; 234 235 // Original items. 236 this.original = this.parent.children(); 237 238 // Items. 239 this.items = [ ...this.original ]; 240 241 // Destroy if no items. 242 if ( ! this.items.length ) { 243 this.unmount(); 244 } 245 246 // Arrange items in columns. 247 if ( this.rows > 1 ) { 248 let cols = []; 249 let col = $( '<div class="vid-slider-col"></div>' ); 250 for ( 251 let i = 0, item = this.items[ i ], buffer = this.rows; 252 i < this.items.length; 253 i++, item = this.items[ i ] 254 ) { 255 col.append( item ); 256 buffer--; 257 if ( buffer < 1 || i === this.items.length - 1 ) { 258 col.append( item ); 259 cols.push( col ); 260 col = $( '<div class="vid-slider-col"></div>' ); 261 buffer = this.rows; 262 } 263 } 264 this.parent.append( ...cols ); 265 this.items = cols; 266 } 267 268 // Slides. 269 this.slides = []; 270 271 // Cloned slides. 272 this.clones = []; 273 274 // Both slides and clones sorted left to right. 275 this.all = []; 276 277 // Full width mode - each slide fills the container width. 278 this.fullMode = 'single' === this.options.arrange; 279 280 // Flag for transition type: Slide (when the slider container is moving during transition). 281 this.ttSlide = [ 'slide', 'flash' ].includes( this.options.animate ); 282 283 // Flag for transition type: Fade (when transition uses cross-fade). 284 this.ttFade = [ 'dissolve', 'blur' ].includes( this.options.animate ); 285 286 // Flag for transition type: Transform - (when the transition is changing item dimensions). 287 this.ttTransform = [ 'shrink', '3d' ].includes( this.options.animate ); 288 289 // Flag for transition type: 3D - (when perspective is used). 290 this.tt3d = [ '3d' ].includes( this.options.animate ); 291 292 // If the slider is in a transition. 293 this.sliding = false; 294 295 // If a slide is initiated during a transition, the action is 296 // remembered and executed after the current transition is complete. 297 this.slideAfter = null; 298 299 // Whether mouse is inside slider. 300 this.mouseIn = false; 301 302 // Whether slide by pointing event is initiated. 303 this.drag = false; 304 305 // The current slide. 306 this._current = 0; 307 308 // The start and end position of the slider transition. 309 this.sliderP1 = 0; 310 this.sliderP2 = 0; 311 312 // Previous slide and next slide. 313 this.prevSlide = null; 314 this.nextSlide = null; 315 316 // Whether the next slide is jumping. 317 this.jumpToNext = false; 318 319 // Alignment origin. 320 this.origin = 0; 321 322 // Timer. 323 this.timer = null; 324 325 // Touch gestures. 326 if ( this.options.touch ) { 327 const inner = this.inner.get(0); 328 let startP1, startP2, engaged = false; 329 const detectThreshold = 30, slideThreshold = 150, maxCross = 100; 330 331 // Touch start 332 function onTouchStart( event ) { 333 const t = event.changedTouches[0]; 334 startP1 = this.options.vertical ? t.pageY : t.pageX; 335 startP2 = this.options.vertical ? t.pageX : t.pageY; 336 engaged = false; 337 if ( ! inner._passiveDetectorAttached ) { 338 inner.addEventListener( 'touchmove', passiveDetect, { passive: true } ); 339 inner._passiveDetectorAttached = true; 340 } 341 removeNonPassiveMove(); 342 this.options.timer && ( this.stop() ); 343 } 344 345 // Detection. 346 function passiveDetect( event ) { 347 if ( engaged ) { // Quits if already engaged. 348 return; 349 } 350 const t = event.changedTouches[0]; 351 const p1 = this.options.vertical ? t.pageY : t.pageX; 352 const p2 = this.options.vertical ? t.pageX : t.pageY; 353 const diffMain = Math.abs( p1 - startP1 ); 354 const diffCross = Math.abs( p2 - startP2 ); 355 356 // Take control if user moved enough on main axis and very little on cross axis. 357 if ( diffMain >= detectThreshold && diffCross <= 20 ) { 358 addNonPassiveMove(); 359 engaged = true; 360 this.inner.css( 'transition', 'transform 300ms ease-out' ); 361 } 362 } 363 const passiveDetectBound = passiveDetect.bind( this ); 364 365 // Sliding process. 366 function nonPassiveMove( event ) { 367 const t = event.changedTouches[0]; 368 const p1 = this.options.vertical ? t.pageY : t.pageX; 369 const p2 = this.options.vertical ? t.pageX : t.pageY; 370 // Prevent scrolling. 371 event.preventDefault(); 372 373 // Show that sliding is engaged. 374 if ( 375 p1 - startP1 >= slideThreshold && 376 Math.abs( p2 - startP2 ) <= maxCross 377 ) { 378 this.inner.css( 'transform', 379 'translate' + ( this.options.vertical ? 'Y' : 'X' ) + '(3px) ' + 380 'skew' + ( this.options.vertical ? 'Y' : 'X' ) + '(-1deg)' ); 381 } else if ( 382 startP1 - p1 >= slideThreshold && 383 Math.abs( p2 - startP2 ) <= maxCross 384 ) { 385 this.inner.css( 'transform', 386 'translate' + ( this.options.vertical ? 'Y' : 'X' ) + '(-3px) ' + 387 'skew' + ( this.options.vertical ? 'Y' : 'X' ) + '(1deg)' ); 388 } 389 } 390 const nonPassiveMoveBound = nonPassiveMove.bind( this ); 391 392 // Add sliding process. 393 function addNonPassiveMove() { 394 if ( ! inner._nonPassiveAttached ) { 395 // Remove passive detector to avoid duplicate calls (optional). 396 inner.removeEventListener( 'touchmove', passiveDetectBound, { passive: true } ); 397 // Add sliding process. 398 inner.addEventListener( 'touchmove', nonPassiveMoveBound, { passive: false } ); 399 inner._nonPassiveAttached = true; 400 } 401 } 402 403 // Remove sliding process. 404 function removeNonPassiveMove() { 405 if ( inner._nonPassiveAttached ) { 406 inner.removeEventListener( 'touchmove', nonPassiveMoveBound, { passive: false } ); 407 inner._nonPassiveAttached = false; 408 } 409 } 410 411 // Finish the sliding process. 412 function onTouchEnd( event ) { 413 const t = event.changedTouches[0]; 414 const p1 = this.options.vertical ? t.pageY : t.pageX; 415 const p2 = this.options.vertical ? t.pageX : t.pageY; 416 if ( 417 p1 - startP1 >= slideThreshold && 418 Math.abs( p2 - startP2 ) <= maxCross 419 ) { 420 this.drag = true; 421 this.slide( this.current - 1 ); 422 } else if ( 423 startP1 - p1 >= slideThreshold && 424 Math.abs( p2 - startP2 ) <= maxCross 425 ) { 426 this.drag = true; 427 this.slide( this.current + 1 ); 428 } else { 429 this.options.timer && ( this.start() ); 430 } 431 432 // Cleanup 433 removeNonPassiveMove(); 434 // Re-attach passive detector (optional). 435 inner.addEventListener( 'touchmove', passiveDetectBound, { passive: true } ); 436 // Back to original transform. 437 this.inner.css( 'transform', '', 'transition', '' ); 438 } 439 440 // bind functions to DOM events (use native listeners) 441 inner.addEventListener( 'touchstart', onTouchStart.bind( this ), { passive: true } ); 442 inner.addEventListener( 'touchend', onTouchEnd.bind( this ), { passive: true } ); 443 444 /*this.inner.on( 'touchstart', ( event ) => { 445 let touchobj = event.changedTouches[0]; 446 startP1 = this.options.vertical ? touchobj.pageY : touchobj.pageX; 447 startP2 = this.options.vertical ? touchobj.pageX : touchobj.pageY; 448 isDragging = false; 449 this.options.timer && ( this.stop() ); 450 this.inner.css( 'transition', 'transform 300ms ease-out' ); 451 }, false ); 452 this.inner.on( 'touchmove', ( event ) => { 453 let touchobj = event.changedTouches[0]; 454 const p1 = this.options.vertical ? touchobj.pageY : touchobj.pageX; 455 const p2 = this.options.vertical ? touchobj.pageX : touchobj.pageY; 456 const diffMain = Math.abs( p1 - startP1 ); 457 const diffCross = Math.abs ( p2 - startP2 ); 458 459 // Detect slider direction first and stop event if no dragging is intended. 460 if ( ! isDragging ) { 461 if ( diffMain > threshold && diffCross < 20 ) { 462 isDragging = true; 463 } else { 464 return; // allow page scroll 465 } 466 } 467 468 // Continue dragging. 469 //event.preventDefault(); 470 if ( 471 p1 - startP1 >= threshold && 472 Math.abs( p2 - startP2 ) <= 100 473 ) { 474 this.inner.css( 'transform', 475 'translate' + ( this.options.vertical ? 'Y' : 'X' ) + '(3px) ' + 476 'skew' + ( this.options.vertical ? 'Y' : 'X' ) + '(-1deg)' ); 477 } else if ( 478 startP1 - p1 >= threshold && 479 Math.abs( p2 - startP2 ) <= 100 480 ) { 481 this.inner.css( 'transform', 482 'translate' + ( this.options.vertical ? 'Y' : 'X' ) + '(-3px) ' + 483 'skew' + ( this.options.vertical ? 'Y' : 'X' ) + '(1deg)' ); 484 } 485 } ); 486 this.inner.on( 'touchend', ( event ) => { 487 let touchobj = event.changedTouches[0]; 488 const p1 = this.options.vertical ? touchobj.pageY : touchobj.pageX; 489 const p2 = this.options.vertical ? touchobj.pageX : touchobj.pageY; 490 if ( 491 p1 - startP1 >= threshold && 492 Math.abs( p2 - startP2 ) <= 100 493 ) { 494 this.drag = true; 495 this.slide( this.current - 1 ); 496 } else if ( 497 startP1 - p1 >= threshold && 498 Math.abs( p2 - startP2 ) <= 100 499 ) { 500 this.drag = true; 501 this.slide( this.current + 1 ); 502 } else { 503 this.options.timer && ( this.start() ); 504 } 505 this.inner.css( 'transform', '', 'transition', '' ); 506 //event.preventDefault(); 507 }, false );*/ 508 } 509 510 // Mouse drag. 511 if ( this.options.mouse ) { 512 let mouseDown = false, startP1 = 0, startP2 = 0, threshold = 150; 513 const onMouseMove = ( event ) => { 514 if ( mouseDown ) { 515 const p1 = this.options.vertical ? event.pageY : event.pageX; 516 const p2 = this.options.vertical ? event.pageX : event.pageY; 517 if ( 518 p1 - startP1 >= threshold && 519 Math.abs( p2 - startP2 ) <= 100 520 ) { 521 this.inner.css( 'transform', 522 'translate' + ( this.options.vertical ? 'Y' : 'X' ) + '(3px) ' + 523 'skew' + ( this.options.vertical ? 'Y' : 'X' ) + '(-1deg)' ); 524 } else if ( 525 startP1 - p1 >= threshold && 526 Math.abs( p2 - startP2 ) <= 100 527 ) { 528 this.inner.css( 'transform', 529 'translate' + ( this.options.vertical ? 'Y' : 'X' ) + '(-3px) ' + 530 'skew' + ( this.options.vertical ? 'Y' : 'X' ) + '(1deg)' ); 531 } 532 } 533 }; 534 const onMouseUp = ( event ) => { 535 if ( mouseDown && event.button === 0 ) { 536 const p1 = this.options.vertical ? event.pageY : event.pageX; 537 const p2 = this.options.vertical ? event.pageX : event.pageY; 538 if ( 539 p1 - startP1 >= threshold && 540 Math.abs( p2 - startP2 ) <= 100 541 ) { 542 this.drag = true; 543 this.slide( this.current - 1 ); 544 } else if ( 545 startP1 - p1 >= threshold && 546 Math.abs( p2 - startP2 ) <= 100 547 ) { 548 this.drag = true; 549 this.slide( this.current + 1 ); 550 } else { 551 this.options.timer && ( this.start() ); 552 } 553 this.inner.css( 'transform', '' ) 554 this.inner.css( 'transition', '' ); 555 mouseDown = false; 556 $( document ).off( 'mousemove.vid-slider', onMouseMove ); 557 $( document ).off( 'mouseup.vid-slider', onMouseUp ); 558 } 559 }; 560 this.inner.on( 'mousedown', ( event ) => { 561 if ( event.button === 0 ) { 562 mouseDown = true; 563 startP1 = this.options.vertical ? event.pageY : event.pageX; 564 startP2 = this.options.vertical ? event.pageX : event.pageY; 565 this.stop(); 566 this.inner.css( 'transition', 'transform 300ms ease-out' ); 567 //event.preventDefault(); 568 $( document ).on( 'mousemove.vid-slider', onMouseMove ); 569 $( document ).on( 'mouseup.vid-slider', onMouseUp ); 570 } 571 } ); 572 } 573 574 // Stop on hover or touch. 575 if ( this.options.stopOnHover && this.options.timer ) { 576 this.outer.on( 'mouseenter mouseover', () => { 577 this.mouseIn = true; 578 if ( ! this.drag ) { 579 this.stop(); 580 } 581 } ); 582 this.outer.on( 'mouseleave', () => { 583 this.mouseIn = false; 584 if ( ! this.sliding ) { 585 this.start(); 586 } else if ( this.ttSlide ) { 587 this.animate(); 588 } 589 } ); 590 this.outer.on( 'touchstart', () => { 591 if ( ! this.drag ) { 592 this.stop(); 593 } 594 }); 595 this.outer.on( 'touchend', () => { 596 if ( ! this.sliding ) { 597 this.start(); 598 } else if ( this.ttSlide ) { 599 this.animate(); 600 } 601 } ); 602 } 603 604 // Initialize the slider. 605 this.init(); 606 } 607 608 /** 609 * Creates the slider. 610 */ 611 init() { 612 613 // Place the slider containers. 614 this.parent.append( this.container ); 615 this.container.append( this.outer ); 616 this.outer.append( this.inner ); 617 618 // Container dimension. 619 const cd = this.options.vertical ? this.outer.height() : this.outer.width(); 620 621 // If the container width is too narrow, use the full width for each individual slide. 622 if ( Number( this.options.nrwWidth ) && cd <= Number( this.options.nrwWidth ) ) { 623 this.fullMode = true; 624 } else if ( 'single' !== this.options.arrange ) { 625 this.fullMode = false; 626 } 627 628 // Add full width mode class to slider container. 629 if ( this.fullMode ) { 630 this.container.addClass( 'vid-slider__full-width-mode' ); 631 } else { 632 this.container.removeClass( 'vid-slider__full-width-mode' ); 633 } 634 635 // Clear slides and clones. 636 this.all.forEach( s => s.el.remove() ); 637 this.slides = []; 638 this.clones = []; 639 this.all = []; 640 641 // Add slides: 642 if ( 'stack' === this.options.arrange ) { 643 // Stack max number of items in one slide. 644 let stack = []; 645 let sum = 0; 646 for ( 647 let i = 0, item = this.items[0]; 648 i < this.items.length; 649 i++, item = this.items[ i ] 650 ) { 651 const d = this.options.vertical 652 ? $( item ).outerHeight( true ) 653 : $( item ).outerWidth( true ); 654 if ( sum + d > cd ) { 655 this.addSlide( ...stack ); 656 stack = []; 657 sum = 0; 658 } 659 stack.push( item ); 660 sum += d; 661 if ( this.items.length - 1 === i ) { 662 this.addSlide( ...stack ); 663 } 664 } 665 } else { 666 // Each item is a single slide. 667 this.items.forEach( i => this.addSlide( i ) ); 668 } 669 670 // Number of slides. 671 const l = this.slides.length; 672 673 // Last slide. 674 const lastSlide = this.slides.slice( -1 )[0]; 675 676 // The start and end position. 677 let startPos = this.slides[0].p; 678 let endPos = lastSlide.p + lastSlide.s1; 679 680 // Set container minimum height (or width if vertical). 681 let maxHeight = Math.max( ...this.slides.map( s => s.s2 ) ); 682 this.outer.css( this.options.vertical ? 'width' : 'height', maxHeight ); 683 684 // Space that remains to be filled with cloned slides. 685 let crL = 0, crR = 0; 686 if ( this.options.infinite && ! this.ttFade && ! this.tt3d ) { 687 crL = cd; 688 crR = cd; 689 } 690 691 // Clone slides on the left/top. 692 if ( crL > 0 ) { 693 for ( 694 let i = l - 1, 695 s = this.slides[ i ], 696 r = crL; 697 698 r > 0; 699 700 i = ( l + ( i - 1 ) % l ) % l, 701 s = this.slides[ i ], 702 r -= s.s1 703 ) { 704 const clone = { ...s }; 705 clone.el = s.el.clone( true, true ); 706 clone.of = s; 707 startPos -= s.s1; 708 clone.p = startPos; 709 if ( ! this.ttTransform ) { 710 const css = this.options.vertical 711 ? { position: 'absolute', top: startPos + 'px' } 712 : { position: 'absolute', left: startPos + 'px' } 713 clone.el.css( css ); 714 } 715 this.clones.push( clone ); 716 this.all.unshift( clone ); 717 this.inner.prepend( clone.el ); 718 } 719 } 720 721 // Clone slides on the right/bottom. 722 if ( crR > 0 ) { 723 for ( 724 let i = 0, 725 s = this.slides[ i ], 726 r = crR; 727 728 r > 0; 729 730 i = ( l + ( i + 1 ) % l ) % l, 731 s = this.slides[ i ], 732 r -= s.s1 733 ) { 734 const clone = { ...s }; 735 clone.el = s.el.clone( true, true ); 736 clone.of = s; 737 clone.p = endPos; 738 if ( ! this.ttTransform ) { 739 const css = this.options.vertical 740 ? { position: 'absolute', top: endPos + 'px' } 741 : { position: 'absolute', left: endPos + 'px' } 742 clone.el.css( css ); 743 } 744 endPos += s.s1; 745 this.clones.push( clone ); 746 this.all.push( clone ); 747 this.inner.append( clone.el ); 748 } 749 } 750 751 // Set alignment origin. 752 this.origin = 'center' === this.options.align 753 ? cd / 2 754 : ( 'end' === this.options.align ? cd : 0 ); 755 756 // Position the slider. 757 const currentSlide = this.slides[ this.current ]; 758 if ( this.ttSlide ) { 759 const prop = this.options.vertical ? 'top' : 'left'; 760 this.inner.css( prop, -1 * ( currentSlide.p - this.origin ) ); 761 } else if ( 'shrink' === this.options.animate ) { 762 this.all.forEach( ( s ) => { 763 const d = Math.max( Math.min( s.p - currentSlide.p + s.s1, Math.max( Math.min( currentSlide.p + cd - s.p, s.s1 ), 0 ) ), 0 ); 764 const prop = this.options.vertical ? 'height' : 'width'; 765 s.el.css( prop, d, 'transition', 'all 0ms' ); 766 } ); 767 } else if ( '3d' === this.options.animate ) { 768 const prop = this.options.vertical ? 'top' : 'left'; 769 this.slides.forEach( s => { 770 s.el.css( prop, 771 this.origin - ( 'center' === this.options.align 772 ? s.s1 / 2 773 : ( 'end' === this.options.align ? s.s1 : 0 ) ), 774 'transition', 'none' 775 ); 776 } ); 777 } else if ( this.ttFade ) { 778 this.slides.forEach( s => { 779 const w = this.options.vertical ? s.s2 : s.s1; 780 const h = this.options.vertical ? s.s1 : s.s2; 781 s.el.css( { 782 left: ( this.inner.outerWidth() - w ) / 2, 783 top: ( this.inner.outerHeight() - h ) / 2, 784 transition: 'none' 785 } ); 786 } ); 787 } 788 this.slide( this.current ); 789 setTimeout( () => { 790 if ( this.ttFade || this.ttTransform ) { 791 this.slides.forEach( s => { 792 s.el.css( 'transition', '' ); 793 } ); 794 } 795 }, 100 ); 796 797 // Create the counter. 798 this.createCounter(); 799 800 // Start slideshow. 801 this.options.timer && ( this.start() ); 802 803 // Reset slider on resize. 804 let resetTimer, oldW = this.outer.width(); 805 $( window ).on( 'resize.vidSlider', () => { 806 if ( $( '#vid-slider__' + this.id ).length ) { 807 clearTimeout( resetTimer ); 808 resetTimer = setTimeout( () => { 809 if ( Math.abs( this.outer.width() - oldW ) > 50 ) { 810 oldW = this.outer.width(); 811 this.reset(); 812 } 813 }, 500 ); 814 } 51 815 } ); 52 this.wrapper.appendChild( this.slider ).append( ...this.items ); 53 this.options = { 54 animate: 'slide', 55 delay: 5000, 56 speed: 500, 57 easing: 'ease', 58 immediate: false, 59 circleColor: '#5553', 60 circleColorHover: '#5556', 61 circleColorCurrent: '#5559', 62 ...JSON.parse( this.wrapper.getAttribute( 'data-slider' ) || '{}' ) 63 }; 64 this.sliding = false; 65 this.afterSlide = null; 66 this.current = 0; 67 this.timer = this.immediate 68 ? setTimeout( () => { 69 this.slide( this.current+1 ); 70 this.start(); 71 }, 100 ) 72 : null; 73 this.resizeTimer = null; 74 new ResizeObserver( () => { 75 if ( this.resizeTimer ) { 76 clearTimeout( this.resizeTimer ); 77 } 78 this.resizeTimer = setTimeout( () => this.resetLayout(), 500 ); 79 } ).observe( this.wrapper ); 80 let startX, startY, threshold = 150; 81 this.slider.addEventListener( 'touchstart', ( e ) => { 82 let touchobj = e.changedTouches[0]; 83 startX = touchobj.pageX; 84 startY = touchobj.pageY; 85 this.stop(); 86 e.preventDefault(); 87 this.slider.style.transition = 'transform 300ms ease-out'; 88 }, false ); 89 this.slider.addEventListener( 'touchmove', ( e ) => { 90 let touchobj = e.changedTouches[0]; 91 if ( 92 touchobj.pageX - startX >= threshold && 93 Math.abs( touchobj.pageY - startY ) <= 100 94 ) { 95 this.slider.style.transform = 'translateX(5px) skew(-1deg)'; 96 } else if ( 97 startX - touchobj.pageX >= threshold && 98 Math.abs( touchobj.pageY - startY ) <= 100 99 ) { 100 this.slider.style.transform = 'translateX(-5px) skew(1deg)'; 101 } 102 } ); 103 this.slider.addEventListener( 'touchend', ( e ) => { 104 let touchobj = e.changedTouches[0]; 105 if ( 106 touchobj.pageX - startX >= threshold && 107 Math.abs( touchobj.pageY - startY ) <= 100 108 ) { 109 this.slide( this.current-1 ); 110 } else if ( 111 startX - touchobj.pageX >= threshold && 112 Math.abs( touchobj.pageY - startY ) <= 100 113 ) { 114 this.slide( this.current+1 ); 816 } 817 818 /** 819 * Adds a slide. 820 * @param {Array} items 821 */ 822 addSlide( ...items ) { 823 items = items.filter( i => i instanceof HTMLElement || i instanceof jQuery ); 824 if ( ! items.length ) { 825 return; 826 } 827 828 let slide = $( '<div class="vid-slider-item"></div>' ); 829 if ( 'stack' === this.options.arrange ) { 830 slide.addClass( 'vid-slider-stack' ); 831 slide.append( ...items ); 832 } else if ( this.fullMode ) { 833 slide.append( items[0] ); 834 this.options.vertical 835 ? slide.outerHeight( this.outer.outerHeight(), true ) 836 : slide.outerWidth( this.outer.outerWidth(), true ); 837 } else { 838 if ( this.ttTransform ) { 839 slide.append( items[0] ); 115 840 } else { 116 this.start(); 117 } 118 this.slider.style.transform = null; 119 e.preventDefault(); 120 }, false ); 121 this.init(); 122 } 123 124 /** 125 * Makes the slider. 126 */ 127 init() { 128 this.tallest = Math.max( 129 ...this.items.map( i => { 130 const style = getComputedStyle( i ); 131 return Math.round( 132 i.offsetHeight + 133 parseFloat( style.marginTop ) + 134 parseFloat( style.marginBottom ) 135 ); 136 } ) 137 ); 138 this.wrapper.style.minHeight = this.tallest + 'px'; 139 const wrapperWidth = this.wrapper.getBoundingClientRect().width; 140 this.items.forEach( i => i.style.maxWidth = ( wrapperWidth - 10 ) + 'px' ); 141 this.widths = this.items.map( i => { 142 const style = getComputedStyle( i ); 143 return Math.round( 144 i.offsetWidth + 145 parseFloat( style.marginLeft ) + 146 parseFloat( style.marginRight ) 841 slide = $( items[0] ); 842 slide.addClass( 'vid-slider-item' ); 843 } 844 } 845 this.inner.append( slide ); 846 if ( 'separate' !== this.options.arrange ) { 847 if ( this.options.vertical ) { 848 slide.outerHeight( Math.max( this.outer.outerHeight(), slide.outerHeight( true ) ) ); 849 } else { 850 slide.outerWidth( Math.max( this.outer.outerWidth(), slide.outerWidth( true ) ), true ); 851 } 852 } else if ( this.tt3d ) { 853 slide.css( 'width', 'max-content' ); 854 } 855 const s1 = this.options.vertical ? slide.outerHeight( true ) : slide.outerWidth( true ); 856 const s2 = this.options.vertical ? slide.outerWidth( true ) : slide.outerHeight( true ); 857 const p = this.options.vertical ? slide.position().top : slide.position().left; 858 const obj = { el: slide, s1: s1, s2: s2, p: p, i: this.slides.length }; 859 this.slides.push( obj ); 860 this.all.push( obj ); 861 } 862 863 /** 864 * Set index of current slide. 865 * @param {int} v 866 */ 867 set current( v ) { 868 v = parseInt( v ) % this.slides.length; 869 this._current = v; 870 } 871 872 /** 873 * Get index of current slide. 874 */ 875 get current() { 876 return this._current; 877 } 878 879 /** 880 * Slides to a given slide. 881 * @param {int} idx The slide index to slide to. 882 */ 883 slide( idx ) { 884 885 // Forse integer input. 886 idx = parseInt( idx ); 887 if ( isNaN( idx ) ) { 888 return; 889 } 890 891 // Remember next slide if already in transition. 892 if ( this.sliding === true ) { 893 this.slideAfter = idx; 894 return; 895 } 896 this.sliding = true; 897 this.slideAfter = null; 898 899 // Clear timer & stop current animation. 900 this.stop(); 901 this.inner.stop(); 902 903 // Number of slides. 904 const l = this.slides.length; 905 906 // Previous and next index. 907 const previ = this.current % l; 908 const nexti = ( l + idx % l ) % l; 909 910 // The relative difference between the current and the requested index. 911 const rel = idx - this.current; 912 913 // The prevoius and next slide. 914 const prevSlide = this.slides[ previ ]; 915 const nextSlide = this.slides[ nexti ]; 916 917 // Last slide. 918 const lastSlide = this.slides.slice( -1 )[0]; 919 920 // Container dimension. 921 const cd = this.options.vertical ? this.outer.height() : this.outer.width(); 922 923 // The start and end position. 924 let startPos = this.slides[0].p; 925 let endPos = lastSlide.p + lastSlide.s1; 926 927 // Slider previous and next position. 928 let sliderPos1 = prevSlide.p; 929 let sliderPos2 = nextSlide.p; 930 931 // Simulate infinite loop by jumping to cloned slides. 932 if ( this.options.infinite && ( previ + rel < 0 || previ + rel >= l ) ) { 933 this.jumpToNext = true; 934 // Jumping to the right. 935 if ( previ + rel >= l ) { 936 sliderPos1 = startPos; 937 for ( let i = l - 1; i >= previ; i-- ) { 938 const s = this.slides[ i % l ]; 939 sliderPos1 -= s.s1; 940 } 941 // Jumping to the left. 942 } else if ( previ + rel < 0 ) { 943 sliderPos1 = endPos; 944 for ( let i = 0; i < previ; i++ ) { 945 const s = this.slides[ i % l ]; 946 sliderPos1 += s.s1; 947 } 948 } 949 } else { 950 this.jumpToNext = false; 951 } 952 953 // Correct slider position due to alignment. 954 if ( 'center' === this.options.align ) { 955 sliderPos1 += prevSlide.s1 / 2 - cd / 2; 956 sliderPos2 += nextSlide.s1 / 2 - cd / 2; 957 } else if ( 'end' === this.options.align ) { 958 sliderPos1 += prevSlide.s1 - cd; 959 sliderPos2 += nextSlide.s1 - cd; 960 } 961 962 // Adjust height. 963 if ( this.options.adjustHeight && ! this.options.vertical ) { 964 let h; 965 if ( this.ttFade ) { 966 h = nextSlide.s2; 967 } else { 968 h = this.all.filter( s => { 969 return s.p + s.s1 > sliderPos2 + 1 && s.p < sliderPos2 + cd - 1; 970 } ); 971 h = h.map( s => s.s2 ); 972 h = Math.max( ...h ); 973 } 974 this.outer.animate( { height: h }, this.speed ); 975 } 976 977 // Set current item. 978 this.parent.find( '.vid-slider-counter .current' ).removeClass( 'current' ); 979 this.parent 980 .find( '.vid-slider-counter .vid-slider-counter-item:nth-child(' + ( nexti + 1 ) + ')' ) 981 .addClass( 'current' ); 982 this.inner.find( '.current' ).removeClass( 'current' ); 983 nextSlide.el.addClass( 'current' ); 984 985 // Transition to next slide. 986 this.prevSlide = prevSlide; 987 this.nextSlide = nextSlide; 988 this.sliderP1 = sliderPos1; 989 this.sliderP2 = sliderPos2; 990 this.animate(); 991 992 } 993 994 /** 995 * Transition animation. 996 */ 997 animate() { 998 999 // Container dimension. 1000 const cd = this.options.vertical ? this.outer.height() : this.outer.width(); 1001 1002 if ( '3d' === this.options.animate ) { 1003 const degStep = 360 / this.slides.length; // Degree ratio 1004 this.slides.forEach( ( s ) => { 1005 const r = ( s.s1 * this.slides.length ) / ( 2 * Math.PI ); // Radius 1006 const rel = this.proximity( s.i, this.nextSlide.i ); // Slide proximity 1007 const deg = rel * degStep; // Degrees of rotation 1008 const rad = rel * degStep * Math.PI / 180; // in radians 1009 const x = parseInt( r * Math.sin( rad ) ); 1010 const z = parseInt( r * Math.cos( rad ) - r ); 1011 const scale = Number( 0.5 + 0.5 * Math.cos( rad ) ).toFixed( 2 ); 1012 const zIndex = 1 + scale * 1000; // Z order 1013 const transform = this.options.vertical 1014 ? `translateY(${-x}px) translateZ(${z}px) rotateX(${deg}deg) scale(${scale})` 1015 : `translateX(${x}px) translateZ(${z}px) rotateY(${deg}deg) scale(${scale})`; 1016 s.el.css( { 1017 transform: transform, 1018 opacity: scale, 1019 zIndex: zIndex 1020 } ); 1021 } ); 1022 setTimeout( () => { 1023 this.sliding = false; 1024 this.drag = false; 1025 this.current = this.nextSlide.i; 1026 this.options.timer && ( this.start() ); 1027 if ( this.slideAfter ) { 1028 this.slide( this.slideAfter ); 1029 } 1030 }, this.speed ); 1031 1032 } else if ( 'shrink' === this.options.animate ) { 1033 this.all.forEach( ( s ) => { 1034 const prop = this.options.vertical ? 'height' : 'width'; 1035 let d; 1036 if ( this.jumpToNext ) { 1037 d = Math.max( Math.min( s.p - this.sliderP1 + s.s1, Math.max( Math.min( this.sliderP1 + cd - s.p, s.s1 ), 0 ) ), 0 ); 1038 s.el.css( prop, d ); 1039 } 1040 d = Math.max( Math.min( s.p - this.sliderP2 + s.s1, Math.max( Math.min( this.sliderP2 + cd - s.p, s.s1 ), 0 ) ), 0 ); 1041 const animate = this.options.vertical ? { height: d } : { width: d }; 1042 s.el.animate( animate, this.speed, this.options.ease ); 1043 } ); 1044 setTimeout( () => { 1045 this.sliding = false; 1046 this.drag = false; 1047 this.current = this.nextSlide.i; 1048 this.options.timer && ( this.start() ); 1049 if ( this.slideAfter ) { 1050 this.slide( this.slideAfter ); 1051 } 1052 }, this.speed ); 1053 1054 } else if ( [ 'dissolve', 'blur' ].includes( this.options.animate ) ) { 1055 setTimeout( () => { 1056 this.sliding = false; 1057 this.drag = false; 1058 this.current = this.nextSlide.i; 1059 this.options.timer && ( this.start() ); 1060 if ( this.slideAfter ) { 1061 this.slide( this.slideAfter ); 1062 } 1063 }, this.speed ); 1064 1065 } else if ( 'flash' === this.options.animate ) { 1066 const prop = this.options.vertical ? 'top' : 'left'; 1067 const flash = $( '<div style="position:absolute;inset:0;z-index:9999;' + 1068 'background-color:' + this.options.flashColor + ';opacity:0;"></div>' ); 1069 this.outer.append( flash ); 1070 flash.animate( { opacity: 1 }, this.speed / 2, 'linear', () => { 1071 this.inner.css( prop, -1 * this.sliderP2 ); 1072 flash.animate( { opacity: 0 }, this.speed / 2, 'linear', () => { 1073 flash.remove(); 1074 this.sliding = false; 1075 this.drag = false; 1076 this.current = this.nextSlide.i; 1077 this.options.timer && ( this.start() ); 1078 if ( this.slideAfter ) { 1079 this.slide( this.slideAfter ); 1080 } 1081 } ); 1082 } ); 1083 1084 } else { 1085 // Sliding is the default transition. 1086 const prop = this.options.vertical ? 'top' : 'left'; 1087 if ( this.jumpToNext ) { 1088 this.inner.css( prop, -1 * this.sliderP1 ); 1089 } 1090 const animate = this.options.vertical ? { top: -1 * this.sliderP2 } : { left: -1 * this.sliderP2 }; 1091 this.inner.animate( 1092 animate, 1093 this.speed, 1094 this.options.ease, 1095 () => { 1096 this.sliding = false; 1097 this.drag = false; 1098 this.current = this.nextSlide.i; 1099 this.options.timer && ( this.start() ); 1100 if ( this.slideAfter ) { 1101 this.slide( this.slideAfter ); 1102 } 1103 } 147 1104 ); 148 } ); 149 this.clonedItems = []; 150 const l = this.items.length; 151 for ( 152 let i = 0, item = this.items[0], sum = 0; 153 sum < wrapperWidth; 154 i++, item = this.items[i/l%1*l] 1105 } 1106 } 1107 1108 /** 1109 * Calculates the proximity between slides in the loop. 1110 * For example, the last slide and the first slide are just one step apart from each other. 1111 * A positive number means that slide A is to the right of B, a negative number means that slide A is to the left of B. 1112 * 1113 * @param {int} a Index of slide A 1114 * @param {int} b Index of slide B 1115 * 1116 * @returns {int} The proximity. 1117 */ 1118 proximity( a, b ) { 1119 a = Math.abs( Math.round( a ) % this.slides.length ); 1120 b = Math.abs( Math.round( b ) % this.slides.length ); 1121 const diff = a - b; 1122 if ( ! this.options.infinite ) { 1123 return diff; 1124 } 1125 const rel = Math.abs( diff ) > this.slides.length / 2 ? 1126 ( diff < 0 ? diff + this.slides.length : diff - this.slides.length ) : 1127 diff; 1128 return rel; 1129 } 1130 1131 /** 1132 * Creates slide counter. 1133 */ 1134 createCounter() { 1135 // Do not create slider if not desired. 1136 if ( 1137 ! this.options.counterPos || 1138 ! [ 'below', 'above', 'both', 'inline' ].includes( this.options.counterPos ) 155 1139 ) { 156 if ( i > this.widths.length-1 ) { 157 i = 0; 158 } 159 if ( 'undefined' === typeof item ) { 160 continue; 161 } 162 sum += this.widths[i]; 163 this.clonedItems.push( item.cloneNode( true ) ); 164 this.slider.appendChild( this.clonedItems[i] ); 165 const style = getComputedStyle( item ); 166 this.widths.push( 167 item.offsetWidth + 168 parseFloat( style.marginLeft ) + 169 parseFloat( style.marginRight ) 1140 return; 1141 } 1142 1143 // Delete old counters if any. 1144 this.parent.find( '.vid-slider-counter' ).remove(); 1145 1146 // Create the circles. 1147 const circles = this.slides.map( ( _, idx ) => { 1148 const circle = $( 1149 '<div class="vid-slider-counter-item' + 1150 ( idx === this.current ? ' current' : '' ) + '" ' + 1151 'data-idx="' + idx + '"' + 1152 '></div>' 170 1153 ); 171 } 172 this.positions = this.widths.map( ( w, i, a ) => { 173 return a 174 .slice( 0,i ) 175 .reduce( ( s,e ) => s+e, 0 ) 176 } ); 177 this.createCounter(); 178 this.start(); 179 this.slide( 0 ); 180 } 181 182 /** 183 * Creates counter. 184 */ 185 createCounter() { 186 if ( this.counter ) { 187 this.wrapper.appendChild( this.counter ); 188 return; 189 } 190 this.counter = EL( 'div', { classList: 'slider-counter' } ); 191 this.counter.style.marginTop = 192 this.tallest + 193 parseInt( window.getComputedStyle( this.counter ).marginTop || 0 ) + 194 'px'; 195 this.circles = this.items.map( ( item, idx ) => { 196 const circle = EL( 'div', { 197 classList: 'slider-circle'+( idx === this.current ? ' current' : '' ) 198 } ); 199 circle.addEventListener( 'click', () => this.slide( idx ) ); 1154 circle.on( 'click', () => this.slide( idx ) ); 200 1155 return circle; 201 1156 } ); 202 this.wrapper.appendChild( this.counter ).append( ...this.circles ); 203 const circleStyle = getComputedStyle( this.circles[0] ); 204 if ( circleStyle.width === '0px' ) { 205 this.includeStyle(); 206 } 207 } 208 209 /** 210 * Slides to given index. 211 * @param {int} idx 212 */ 213 slide( idx ) { 214 if ( this.sliding === true ) { 215 this.afterSlide = idx; 1157 1158 // Add the counter(s). 1159 let counter = $( '<div class="vid-slider-counter"></div>' ).append( ...circles ); 1160 if ( [ 'below', 'both' ].includes( this.options.counterPos ) ) { 1161 this.container.append( counter ); 1162 } 1163 if ( [ 'above', 'both' ].includes( this.options.counterPos ) ) { 1164 if ( 'both' === this.options.counterPos ) { 1165 counter = counter.clone( true, true ); 1166 } 1167 this.container.prepend( counter ); 1168 } else if ( 'inline' === this.options.counterPos ) { 1169 this.outer.append( counter ); 1170 } 1171 } 1172 1173 /** 1174 * Starts auto slideshow. 1175 */ 1176 start() { 1177 if ( this.mouseIn ) { 216 1178 return; 217 1179 } 218 this.sliding = true; 219 this.afterSlide = null; 220 let prevPos = this.current, newPos = idx; 221 if ( idx < 0 ) { 222 prevPos = this.items.length; 223 newPos = this.items.length - 1; 224 } else if ( idx > this.items.length ) { 225 newPos = idx % this.items.length; 226 } 227 const leftOld = ( -1 * this.positions[prevPos] ) + 'px'; 228 const leftNew = ( -1 * this.positions[newPos] ) + 'px'; 229 switch( this.options.animate ) { 230 case 'blur': 231 this.slider.animate( [ 232 { filter: 'blur( 0 )' }, 233 { filter: 'blur( 100px )' }, 234 { filter: 'blur( 0 )'} 235 ], { 236 duration: this.options.speed, 237 easing: this.options.easing 238 } ); 239 this.slider.animate( [ 240 { left: leftOld }, 241 { left: leftOld, offset: 0.48 }, 242 { left: leftNew, offset: 0.52 } 243 ], { 244 duration: this.options.speed, 245 easing: this.options.easing 246 } ); 247 break; 248 case 'flash': 249 const flash = EL( 'div', {}, {}, { 250 position: 'absolute', 251 inset: '0', 252 backgroundColor: '#fff', 253 opacity: 0 254 } ); 255 this.slider.appendChild( flash ); 256 flash.animate( [ 257 { opacity: 0 }, 258 { opacity: 1 }, 259 { opacity: 1 }, 260 { opacity: 0 } 261 ], { 262 duration: this.options.speed, 263 easing: this.options.easing 264 } ); 265 this.slider.animate( [ 266 { left: leftOld }, 267 { left: leftOld, offset: 0.5 }, 268 { left: leftNew, offset: 0.5 } 269 ], { 270 duration: this.options.speed, 271 easing: this.options.easing 272 } ); 273 setTimeout( () => flash.remove(), this.options.speed ); 274 break; 275 case 'slide': 276 default: this.slider.animate( [ 277 { left: leftOld }, 278 { left: leftNew } 279 ], { 280 duration: this.options.speed, 281 easing: this.options.easing 282 } ); 283 } 284 const animEnd = setTimeout( () => { 285 this.sliding = false; 286 if ( this.afterSlide ) { 287 this.slide( this.afterSlide ); 288 } 289 }, this.options.speed ); 290 if ( idx === this.items.length ) { 291 newPos = 0; 292 } 293 this.slider.style.left = leftNew; 294 this.circles.forEach( ( c, i ) => { 295 if ( 296 i === idx || 297 ( i === 0 && idx === this.items.length ) || 298 ( i === this.items.length-1 && idx === -1 ) 299 ) { 300 c.classList.add( 'current' ); 301 } else { 302 c.classList.remove( 'current' ); 303 } 304 } ); 305 [ ...this.items, ...this.clonedItems ].forEach( ( c, i ) => { 306 i === idx 307 ? c.classList.add( 'current' ) 308 : c.classList.remove( 'current' ) 309 } ); 310 this.current = newPos; 311 this.stop(); 312 this.start(); 313 } 314 315 /** 316 * Starts slider timers. 317 */ 318 start() { 1180 clearTimeout( this.timer ); 319 1181 this.timer = setTimeout( () => { 320 this.slide( this. current+1 );321 }, this. options.delay );322 } 323 324 /** 325 * Pauses slider.1182 this.slide( this.options.backwards ? this.current - 1 : this.current + 1 ); 1183 }, this.delay ); 1184 } 1185 1186 /** 1187 * Stops auto slideshow. 326 1188 */ 327 1189 stop() { … … 330 1192 331 1193 /** 332 * Resets the slider layout.333 */334 resetLayout() {335 this.stop();336 this.items.forEach( i => i.style.width = null );337 [ ...this.items, ...this.clonedItems ].forEach( c => c.remove() );338 this.wrapper.append( ...this.items );339 this.items.forEach( i => { console.log( i ); i.style.width = getComputedStyle( i ).width; } );340 this.slider.append( ...this.items );341 this.counter && ( this.counter.remove() );342 this.init();343 }344 345 /**346 1194 * Sets the slider CSS styles. 347 1195 * @param {*} style 348 1196 */ 349 1197 includeStyle() { 1198 const stylesheet = $( 'head .vid-slider-stylesheet__' + this.id ); 1199 stylesheet.remove(); 1200 let ease = 'ease'; 1201 switch ( this.options.ease ) { 1202 default: ease = 'ease'; break; 1203 case 'linear': ease = 'linear'; break; 1204 } 1205 // CSS code 350 1206 let code = 351 ` .slider-counter {1207 `#vid-slider__${this.id}.vid-slider-container { 352 1208 display: flex; 1209 flex-flow: column nowrap; 1210 align-items: center; 1211 width: 100%; 1212 height: 100%; 1213 max-width: 100%; 1214 } 1215 #vid-slider__${this.id} .vid-slider-outer { 1216 position: relative; 1217 overflow: hidden; 1218 touch-action: pan-y; 1219 } 1220 #vid-slider__${this.id} .vid-slider-col { 1221 display: flex; 1222 flex-flow: column nowrap; 1223 } 1224 #vid-slider__${this.id} .vid-slider-inner { 1225 position: absolute; 1226 left: 0; 1227 top: 0; 1228 display: flex; 1229 flex-flow: row nowrap; 1230 align-items: start; 1231 gap: 0 !important; 1232 width: max-content; 1233 height: max-content; 1234 transition: transform ${this.speed} ${ease}; 1235 touch-action: pan-y; 1236 } 1237 #vid-slider__${this.id} .vid-slider-stack { 1238 display: flex; 1239 flex-flow: row nowrap; 1240 } 1241 #vid-slider__${this.id} .vid-slider-stack, 1242 #vid-slider__${this.id}.vid-slider__full-width-mode .vid-slider-item { 1243 justify-content: ${this.options.align}; 1244 } 1245 /* Vertical mode */ 1246 #vid-slider__${this.id}.vid-slider-vertical .vid-slider-inner, 1247 #vid-slider__${this.id}.vid-slider-vertical .vid-slider-stack { 1248 flex-direction: column; 1249 align-items: unset; 1250 } 1251 #vid-slider__${this.id}.vid-slider-vertical .vid-slider-col { 1252 flex-direction: row; 1253 } 1254 /* Transitions */ 1255 #vid-slider__${this.id}.vid-slider-transition__3d .vid-slider-inner { 1256 position: relative; 1257 perspective: 2000px; 1258 perspective-origin: center; 1259 width: 100% !important; 1260 height: 100% !important; 1261 } 1262 #vid-slider__${this.id}.vid-slider-transition__3d .vid-slider-item { 1263 position: absolute; 1264 transform-style: preserve-3d; 1265 transition: transform ${this.speed}ms ${ease}, opacity ${this.speed}ms ${ease}; 1266 } 1267 #vid-slider__${this.id}.vid-slider-transition__shrink .vid-slider-item { 1268 position: relative; 1269 overflow: hidden; 1270 } 1271 #vid-slider__${this.id}.vid-slider-transition__dissolve .vid-slider-inner, 1272 #vid-slider__${this.id}.vid-slider-transition__blur .vid-slider-inner { 1273 width: 100% !important; 1274 height: 100% !important; 1275 } 1276 #vid-slider__${this.id}.vid-slider-transition__dissolve .vid-slider-item, 1277 #vid-slider__${this.id}.vid-slider-transition__blur .vid-slider-item { 1278 position: absolute; 1279 opacity: 0; 1280 transition: opacity ${this.speed}ms ${ease}, filter ${this.speed}ms ${ease}; 1281 } 1282 #vid-slider__${this.id}.vid-slider-transition__dissolve .vid-slider-item.current { 1283 opacity: 1; 1284 } 1285 #vid-slider__${this.id}.vid-slider-transition__blur .vid-slider-item { 1286 filter: blur(40px); 1287 } 1288 #vid-slider__${this.id}.vid-slider-transition__blur .vid-slider-item.current { 1289 filter: blur(0); 1290 opacity: 1; 1291 } 1292 /* Counter */ 1293 #vid-slider__${this.id} .vid-slider-counter { 1294 display: flex; 1295 flex-flow: row wrap; 353 1296 justify-content: center; 354 1297 gap: 5px; 355 1298 width: max-content; 356 max-width: 100%; 357 } 358 .slider-circle { 1299 max-width: min( 90vw, 90% ); 1300 margin: 10px; 1301 } 1302 #vid-slider__${this.id} .vid-slider-outer .vid-slider-counter { 1303 position: absolute; 1304 bottom: 10px; 1305 left: 50%; 1306 transform: translateX(-50%); 1307 z-index: 100; 1308 } 1309 #vid-slider__${this.id} .vid-slider-counter-item { 359 1310 width: 20px; 360 1311 height: 20px; 361 1312 border-radius: 50%; 362 background-color: ${this.options.circleColor}; 363 } 364 .slider-circle.current { 365 background-color: ${this.options.circleColorCurrent}; 366 } 367 .slider-circle:not( .current ):hover { 368 background-color: ${this.options.circleColorHover}; 1313 background-color: ${this.options.counterColor}; 1314 transition: all ${this.speed}ms; 1315 } 1316 #vid-slider__${this.id} .vid-slider-counter-item.current { 1317 background-color: ${this.options.counterColorCurrent}; 1318 } 1319 #vid-slider__${this.id} .vid-slider-counter-item:not( .current ):hover { 1320 background-color: ${this.options.counterColorHover}; 369 1321 }`; 370 document.head.querySelector('link[rel=stylesheet]').before( 371 Object.assign( document.createElement( 'style' ), { innerHTML: code } ) 372 ); 1322 1323 // Place the stylesheet in the DOM. 1324 $('head').append( $( 1325 '<style class="vid-slider-stylesheet__' + this.id + '">' + 1326 code + '</style>' 1327 ) ); 1328 } 1329 1330 /** 1331 * Resets the slider layout. 1332 */ 1333 reset() { 1334 this.stop(); 1335 this.parent.append( this.items ); 1336 this.slides.forEach( s => s.el.attr( 'style', '' ) ); 1337 this.clones.forEach( c => c.el.remove() ); 1338 this.container.find( '.vid-slider-counter' ).remove(); 1339 this.sliding = false; 1340 this.slideAfter = null; 1341 this.init(); 373 1342 } 374 1343 375 1344 /** 376 1345 * Transforms a HTML element into a slider. 377 * @param {HTMLElement} on 1346 * @param {HTMLElement} on 378 1347 * @returns 379 1348 */ 380 static mount( on ) { 381 return new this( on ); 382 } 383 384 /** 385 * Auto-mounts all .vid-slider containers. 1349 static mount( on, options = {} ) { 1350 const j = $( on ); 1351 if ( 1352 j.hasClass( '.vid-slider-container' ) || 1353 $( on ).find( '.vid-slider-container, .vid-slider-outer, .vid-slider-inner, .vid-slider-item' ).length 1354 ) { 1355 console.log( 'It seams a Slider is already mounted on this element:', on ); 1356 return; 1357 } 1358 return new this( on, options ); 1359 } 1360 1361 /** 1362 * Auto-mounts all elements which have the vid-slider class. 386 1363 */ 387 1364 static autoMount() { 388 [ ...document.querySelectorAll( '.vid-slider' ) ] 389 .forEach( c => this.mount( c ) ); 1365 [ ...$( '.vid-slider:not(:has(.vid-slider-container))' ) ].forEach( c => this.mount( c ) ); 390 1366 } 391 1367 … … 394 1370 */ 395 1371 unmount() { 396 this.wrapper.append( ...this.items ); 397 this.items.style = null; 398 this.slider.remove(); 399 this.counter.remove(); 1372 this.stop(); 1373 this.parent.append( this.original ); 1374 this.all.forEach( s => s.el.remove() ); 1375 this.container.remove(); 1376 this.outer.remove(); 1377 this.inner.remove(); 1378 this.parent.removeClass( 'vid-slider__' + this.id ); 400 1379 delete this; 401 1380 } -
showcase-creator/trunk/src/modules/toggle.js
r3190704 r3415798 60 60 type: 'hidden', 61 61 name: args.name, 62 value: args.checked ? 1 : ''62 value: args.checked ? 1 : 0 63 63 } 64 64 ) … … 102 102 this._checked = v; 103 103 this.toggleEl.setAttribute( 'checked', this._checked ); 104 this.name && ( this.inputHidden.value = this._checked ? 1 : '');104 this.name && ( this.inputHidden.value = this._checked ? 1 : 0 ); 105 105 this.onChange && ( this.onChange.call( null, this ) ); 106 106 }
Note: See TracChangeset
for help on using the changeset viewer.