@automattic/newspack-blocks 2.6.2 → 3.0.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.cache/babel/135eb7c6e583be53418b26a29fcc4d81.json.gz +0 -0
- package/.cache/babel/2bec24377bb9890c2268bcd4c8f3953c.json.gz +0 -0
- package/.cache/babel/9ba57ee86df44178ceb255eaf0e770e3.json.gz +0 -0
- package/.cache/babel/a804bf1963e56137e59e37a567cb5e2e.json.gz +0 -0
- package/.cache/babel/b94e6dc0852876a37bd23ec88c5b2583.json.gz +0 -0
- package/.cache/babel/c04d2af94bb0f10f408a15534301cc86.json.gz +0 -0
- package/.cache/babel/c8d4b9ae4be3002e8507d71f1136ebc6.json.gz +0 -0
- package/.cache/babel/d21f5515648ce2a2349b0ee5cc787fce.json.gz +0 -0
- package/.cache/babel/d3eee0c40fc44bc734dee21a645a4f7d.json.gz +0 -0
- package/.cache/babel/d661309b03e38954105e706a32ef09f6.json.gz +0 -0
- package/.cache/babel/e2dd36051554e75a2bf087b85c11e43d.json.gz +0 -0
- package/.hooks/pre-push +2 -2
- package/CHANGELOG.md +21 -0
- package/composer.lock +38 -36
- package/dist/donate/view.asset.php +1 -1
- package/dist/donate/view.css +1 -1
- package/dist/donate/view.rtl.css +1 -1
- package/dist/editor.asset.php +1 -1
- package/dist/editor.css +1 -1
- package/dist/editor.js +11 -11
- package/dist/editor.rtl.css +1 -1
- package/dist/frequencyBased.asset.php +1 -1
- package/dist/frequencyBased.css +1 -1
- package/dist/frequencyBased.rtl.css +1 -1
- package/dist/modalCheckout.asset.php +1 -1
- package/dist/modalCheckout.css +1 -1
- package/dist/modalCheckout.rtl.css +1 -1
- package/dist/tiersBased.asset.php +1 -1
- package/dist/tiersBased.css +1 -1
- package/dist/tiersBased.js +1 -1
- package/dist/tiersBased.rtl.css +1 -1
- package/includes/class-modal-checkout.php +11 -14
- package/includes/class-newspack-blocks.php +87 -43
- package/languages/newspack-blocks-de_DE.po +0 -40
- package/languages/newspack-blocks-es_ES.po +0 -40
- package/languages/newspack-blocks-fr_BE.po +0 -40
- package/languages/newspack-blocks-pt_PT.po +0 -40
- package/languages/newspack-blocks.pot +0 -38
- package/newspack-blocks.php +2 -14
- package/package.json +7 -8
- package/src/blocks/checkout-button/edit.js +5 -1
- package/src/blocks/donate/block.json +0 -12
- package/src/blocks/donate/edit/FrequencyBasedLayout.tsx +61 -106
- package/src/blocks/donate/edit/TierBasedLayout.tsx +7 -26
- package/src/blocks/donate/edit/components/index.tsx +0 -1
- package/src/blocks/donate/edit/index.tsx +157 -152
- package/src/blocks/donate/frequency-based/style.scss +5 -0
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-base.php +33 -147
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-frequency-based.php +21 -10
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer-tiers-based.php +3 -50
- package/src/blocks/donate/frontend/class-newspack-blocks-donate-renderer.php +1 -14
- package/src/blocks/donate/styles/editor.scss +6 -28
- package/src/blocks/donate/styles/style-variations.scss +17 -8
- package/src/blocks/donate/styles/view.scss +9 -0
- package/src/blocks/donate/tiers-based/style.scss +0 -11
- package/src/blocks/donate/tiers-based/utils.test.js +38 -0
- package/src/blocks/donate/tiers-based/utils.ts +1 -2
- package/src/blocks/donate/tiers-based/view.ts +0 -33
- package/src/blocks/donate/types.ts +0 -16
- package/src/blocks/donate/utils.ts +31 -0
- package/src/blocks/homepage-articles/block.json +18 -0
- package/src/blocks/homepage-articles/class-wp-rest-newspack-articles-controller.php +1 -1
- package/src/blocks/homepage-articles/edit.js +3 -0
- package/src/blocks/homepage-articles/utils.ts +4 -0
- package/src/blocks/homepage-articles/view.php +4 -4
- package/src/components/query-controls.js +41 -8
- package/src/modal-checkout/checkout.scss +4 -5
- package/src/types/index.d.ts +4 -3
- package/vendor/autoload.php +1 -1
- package/vendor/composer/autoload_real.php +4 -4
- package/vendor/composer/autoload_static.php +2 -2
- package/vendor/composer/installed.php +2 -2
- package/webpack.config.js +0 -1
- package/.cache/babel/18dda1142078f066419138e7284f03bf.json.gz +0 -0
- package/.cache/babel/1f43960564787ebde7c6d44957cddf0e.json.gz +0 -0
- package/.cache/babel/225618337c609eed2be110274ff82be1.json.gz +0 -0
- package/.cache/babel/29d960d2fc51492a4bea1f4f165810fb.json.gz +0 -0
- package/.cache/babel/2f22325668b5763f8f2c9557833af36f.json.gz +0 -0
- package/.cache/babel/39bcc541624feefe54d1493493ae1ce8.json.gz +0 -0
- package/.cache/babel/4d450b37d365154f05b17cbf6a009255.json.gz +0 -0
- package/.cache/babel/87e2dc4a961b25b0de8d1a8ac88eea13.json.gz +0 -0
- package/.cache/babel/91884d41523f3790da70ea305ee187f2.json.gz +0 -0
- package/.cache/babel/b1ac90699e641ff99e1449b5d7b686e5.json.gz +0 -0
- package/.cache/babel/c5a441fdf7d90d45d2cbeb89967c61fe.json.gz +0 -0
- package/.cache/babel/c7cfb8590e887722a3e715c72ee99bac.json.gz +0 -0
- package/.cache/babel/e1d8932bb19afa36f476f107dbc6ca39.json.gz +0 -0
- package/.cache/babel/f60f8c23ec2b4448cb2815d79207d8c0.json.gz +0 -0
- package/dist/donateStreamlined.asset.php +0 -1
- package/dist/donateStreamlined.css +0 -1
- package/dist/donateStreamlined.js +0 -1
- package/dist/donateStreamlined.rtl.css +0 -1
- package/src/blocks/donate/class-wp-rest-newspack-donate-controller.php +0 -206
- package/src/blocks/donate/edit/components/AdditionalFields.tsx +0 -282
- package/src/blocks/donate/streamlined/index.test.js +0 -132
- package/src/blocks/donate/streamlined/index.ts +0 -356
- package/src/blocks/donate/streamlined/style.scss +0 -306
- package/src/blocks/donate/streamlined/utils.test.js +0 -18
- package/src/blocks/donate/streamlined/utils.ts +0 -217
- package/src/blocks/donate/tiers-based/view.test.js +0 -209
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '777297c176716c6878b9a199acc25049');
|
package/dist/frequencyBased.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wpbnbd--frequency-based{background:#fff;border:1px solid #ccc;color:#111;position:relative;width:100%}.wpbnbd--frequency-based input[type=radio]{position:absolute;left:-99999em}.wpbnbd--frequency-based input[type=radio][name=donation_frequency],.wpbnbd--frequency-based input[type=radio][name=donation_frequency]+label{display:none}.wpbnbd--frequency-based input[readonly]{background-color:#f1f1f1;color:#666}.wpbnbd--frequency-based .freq-label,.wpbnbd--frequency-based .input-container,.wpbnbd--frequency-based .tier-label{display:block;font-weight:700;cursor:pointer}.wpbnbd--frequency-based .freq-label{box-sizing:border-box;overflow:hidden;white-space:nowrap;width:100%;z-index:1}.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 .76rem .76rem}@media only screen and (min-width:782px){.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 1.5rem 1.5rem}}.wpbnbd--frequency-based .submit-button:disabled,.wpbnbd--frequency-based button:disabled{opacity:.5}.wpbnbd--frequency-based .wpbnbd__button{font-size:16px;text-transform:uppercase}.wpbnbd--frequency-based .thanks{color:#767676;font-size:.8em;margin:.38rem .76rem .76rem;display:none}@media only screen and (min-width:600px){.wpbnbd--frequency-based .thanks{display:block}}@media only screen and (min-width:782px){.wpbnbd--frequency-based .thanks{margin-left:1.5rem;margin-right:1.5rem}}.wpbnbd.tiered .tiers{margin:.38rem;display:none;flex-wrap:wrap;position:relative}@media only screen and (min-width:782px){.wpbnbd.tiered .tiers{margin:1.12rem 1.12rem .38rem}}.wpbnbd.tiered .tiers .tier-label{border:1px solid #ccc;border-radius:5px;margin:.38rem;padding:.38rem .76rem}.wpbnbd.tiered .tiers .tier-label:hover{background:#f1f1f1}.wpbnbd.tiered .tiers input[type=radio]:focus+.tier-label{background:#f1f1f1;outline:1px dotted currentcolor;outline-offset:-4px}.wpbnbd.tiered .tiers input[type=radio]:checked+.tier-label{background-color:#757575;border-color:transparent;color:#fff}.wpbnbd.tiered .tiers .odl{font-weight:700;left:.38rem;position:absolute;bottom:calc(1.6em + 1.1rem + 2px)}.wpbnbd.tiered .tiers input.other-input~.money-input,.wpbnbd.tiered .tiers input.other-input~.odl{display:none}.wpbnbd.tiered .tiers input.other-input:checked~.money-input{display:flex}.wpbnbd.tiered .tiers input.other-input:checked~.odl{display:block}.wpbnbd.tiered .tiers input.other-input:checked+label{margin-bottom:calc(3.2em + 1.86rem + 2px)}.wpbnbd.tiered .money-input{bottom:.38rem;left:.38rem;position:absolute}.wpbnbd.untiered .input-container{margin:.76rem;display:none}@media only screen and (min-width:782px){.wpbnbd.untiered .input-container{margin:1.5rem 1.5rem .76rem}}.wpbnbd.untiered input[type=radio]:checked~.input-container{display:block}.wpbnbd .money-input{display:flex;align-items:center;position:relative;max-width:200px;background-color:#fff;border-radius:3px;border:1px solid #ccc}.wpbnbd .money-input[focus-within]{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input:focus-within{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input .currency{cursor:default;font-size:.8em;padding-left:.5em}.wpbnbd .money-input input[type=number]{background:none;max-width:174px}.wpbnbd .money-input input[type=number],.wpbnbd .money-input input[type=number]:focus{border:none;outline:none;box-shadow:none}.wpbnbd .frequencies{position:relative;font-size:.7em}@media only screen and (min-width:600px){.wpbnbd .frequencies{font-size:.8em}}.wpbnbd .frequency input[type=radio]:checked~.tiers,.wpbnbd .tab-container{display:flex}.wpbnbd .tab-container .freq-label{border-radius:0;margin:0}.wpbnbd .tab-container .freq-label.wpbnbd__button--active{color:#111}.wpbnbd .tab-container .freq-label:focus{outline:0;text-decoration:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:1px}
|
|
1
|
+
.wpbnbd--frequency-based{background:#fff;border:1px solid #ccc;color:#111;position:relative;width:100%}.wpbnbd--frequency-based input[type=radio]{position:absolute;left:-99999em}.wpbnbd--frequency-based input[type=radio][name=donation_frequency],.wpbnbd--frequency-based input[type=radio][name=donation_frequency]+label{display:none}.wpbnbd--frequency-based input[readonly]{background-color:#f1f1f1;color:#666}.wpbnbd--frequency-based .freq-label,.wpbnbd--frequency-based .input-container,.wpbnbd--frequency-based .tier-label{display:block;font-weight:700;cursor:pointer}.wpbnbd--frequency-based .freq-label{box-sizing:border-box;overflow:hidden;white-space:nowrap;width:100%;z-index:1}.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 .76rem .76rem}@media only screen and (min-width:782px){.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 1.5rem 1.5rem}}.wpbnbd--frequency-based .submit-button:disabled,.wpbnbd--frequency-based button:disabled{opacity:.5}.wpbnbd--frequency-based .wpbnbd__button{font-size:16px;text-transform:uppercase}.wpbnbd--frequency-based .thanks{color:#767676;font-size:.8em;margin:.38rem .76rem .76rem;display:none}@media only screen and (min-width:600px){.wpbnbd--frequency-based .thanks{display:block}}@media only screen and (min-width:782px){.wpbnbd--frequency-based .thanks{margin-left:1.5rem;margin-right:1.5rem}}.wpbnbd.tiered .tiers{margin:.38rem;display:none;flex-wrap:wrap;position:relative}@media only screen and (min-width:782px){.wpbnbd.tiered .tiers{margin:1.12rem 1.12rem .38rem}}.wpbnbd.tiered .tiers .tier-label{border:1px solid #ccc;border-radius:5px;margin:.38rem;padding:.38rem .76rem}.wpbnbd.tiered .tiers .tier-label:hover{background:#f1f1f1}.wpbnbd.tiered .tiers input[type=radio]:focus+.tier-label{background:#f1f1f1;outline:1px dotted currentcolor;outline-offset:-4px}.wpbnbd.tiered .tiers input[type=radio]:checked+.tier-label{background-color:#757575;border-color:transparent;color:#fff}.wpbnbd.tiered .tiers .odl{font-weight:700;left:.38rem;position:absolute;bottom:calc(1.6em + 1.1rem + 2px)}.wpbnbd.tiered .tiers input.other-input~.money-input,.wpbnbd.tiered .tiers input.other-input~.odl{display:none}.wpbnbd.tiered .tiers input.other-input:checked~.money-input{display:flex}.wpbnbd.tiered .tiers input.other-input:checked~.odl{display:block}.wpbnbd.tiered .tiers input.other-input:checked+label{margin-bottom:calc(3.2em + 1.86rem + 2px)}.wpbnbd.tiered .money-input{bottom:.38rem;left:.38rem;position:absolute}.wpbnbd.untiered.wpbnbd--nyp-disabled .tier-label{border:none;font-size:1.25rem;padding:0}.wpbnbd.untiered .input-container{margin:.76rem;display:none}@media only screen and (min-width:782px){.wpbnbd.untiered .input-container{margin:1.5rem 1.5rem .76rem}}.wpbnbd.untiered input[type=radio]:checked~.input-container{display:block}.wpbnbd .money-input{display:flex;align-items:center;position:relative;max-width:200px;background-color:#fff;border-radius:3px;border:1px solid #ccc}.wpbnbd .money-input[focus-within]{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input:focus-within{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input .currency{cursor:default;font-size:.8em;padding-left:.5em}.wpbnbd .money-input input[type=number]{background:none;max-width:174px}.wpbnbd .money-input input[type=number],.wpbnbd .money-input input[type=number]:focus{border:none;outline:none;box-shadow:none}.wpbnbd .frequencies{position:relative;font-size:.7em}@media only screen and (min-width:600px){.wpbnbd .frequencies{font-size:.8em}}.wpbnbd .frequency input[type=radio]:checked~.tiers,.wpbnbd .tab-container{display:flex}.wpbnbd .tab-container .freq-label{border-radius:0;margin:0}.wpbnbd .tab-container .freq-label.wpbnbd__button--active{color:#111}.wpbnbd .tab-container .freq-label:focus{outline:0;text-decoration:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:1px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.wpbnbd--frequency-based{background:#fff;border:1px solid #ccc;color:#111;position:relative;width:100%}.wpbnbd--frequency-based input[type=radio]{position:absolute;right:-99999em}.wpbnbd--frequency-based input[type=radio][name=donation_frequency],.wpbnbd--frequency-based input[type=radio][name=donation_frequency]+label{display:none}.wpbnbd--frequency-based input[readonly]{background-color:#f1f1f1;color:#666}.wpbnbd--frequency-based .freq-label,.wpbnbd--frequency-based .input-container,.wpbnbd--frequency-based .tier-label{display:block;font-weight:700;cursor:pointer}.wpbnbd--frequency-based .freq-label{box-sizing:border-box;overflow:hidden;white-space:nowrap;width:100%;z-index:1}.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 .76rem .76rem}@media only screen and (min-width:782px){.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 1.5rem 1.5rem}}.wpbnbd--frequency-based .submit-button:disabled,.wpbnbd--frequency-based button:disabled{opacity:.5}.wpbnbd--frequency-based .wpbnbd__button{font-size:16px;text-transform:uppercase}.wpbnbd--frequency-based .thanks{color:#767676;font-size:.8em;margin:.38rem .76rem .76rem;display:none}@media only screen and (min-width:600px){.wpbnbd--frequency-based .thanks{display:block}}@media only screen and (min-width:782px){.wpbnbd--frequency-based .thanks{margin-right:1.5rem;margin-left:1.5rem}}.wpbnbd.tiered .tiers{margin:.38rem;display:none;flex-wrap:wrap;position:relative}@media only screen and (min-width:782px){.wpbnbd.tiered .tiers{margin:1.12rem 1.12rem .38rem}}.wpbnbd.tiered .tiers .tier-label{border:1px solid #ccc;border-radius:5px;margin:.38rem;padding:.38rem .76rem}.wpbnbd.tiered .tiers .tier-label:hover{background:#f1f1f1}.wpbnbd.tiered .tiers input[type=radio]:focus+.tier-label{background:#f1f1f1;outline:1px dotted currentcolor;outline-offset:-4px}.wpbnbd.tiered .tiers input[type=radio]:checked+.tier-label{background-color:#757575;border-color:transparent;color:#fff}.wpbnbd.tiered .tiers .odl{font-weight:700;right:.38rem;position:absolute;bottom:calc(1.6em + 1.1rem + 2px)}.wpbnbd.tiered .tiers input.other-input~.money-input,.wpbnbd.tiered .tiers input.other-input~.odl{display:none}.wpbnbd.tiered .tiers input.other-input:checked~.money-input{display:flex}.wpbnbd.tiered .tiers input.other-input:checked~.odl{display:block}.wpbnbd.tiered .tiers input.other-input:checked+label{margin-bottom:calc(3.2em + 1.86rem + 2px)}.wpbnbd.tiered .money-input{bottom:.38rem;right:.38rem;position:absolute}.wpbnbd.untiered .input-container{margin:.76rem;display:none}@media only screen and (min-width:782px){.wpbnbd.untiered .input-container{margin:1.5rem 1.5rem .76rem}}.wpbnbd.untiered input[type=radio]:checked~.input-container{display:block}.wpbnbd .money-input{display:flex;align-items:center;position:relative;max-width:200px;background-color:#fff;border-radius:3px;border:1px solid #ccc}.wpbnbd .money-input[focus-within]{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input:focus-within{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input .currency{cursor:default;font-size:.8em;padding-right:.5em}.wpbnbd .money-input input[type=number]{background:none;max-width:174px}.wpbnbd .money-input input[type=number],.wpbnbd .money-input input[type=number]:focus{border:none;outline:none;box-shadow:none}.wpbnbd .frequencies{position:relative;font-size:.7em}@media only screen and (min-width:600px){.wpbnbd .frequencies{font-size:.8em}}.wpbnbd .frequency input[type=radio]:checked~.tiers,.wpbnbd .tab-container{display:flex}.wpbnbd .tab-container .freq-label{border-radius:0;margin:0}.wpbnbd .tab-container .freq-label.wpbnbd__button--active{color:#111}.wpbnbd .tab-container .freq-label:focus{outline:0;text-decoration:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:1px}
|
|
1
|
+
.wpbnbd--frequency-based{background:#fff;border:1px solid #ccc;color:#111;position:relative;width:100%}.wpbnbd--frequency-based input[type=radio]{position:absolute;right:-99999em}.wpbnbd--frequency-based input[type=radio][name=donation_frequency],.wpbnbd--frequency-based input[type=radio][name=donation_frequency]+label{display:none}.wpbnbd--frequency-based input[readonly]{background-color:#f1f1f1;color:#666}.wpbnbd--frequency-based .freq-label,.wpbnbd--frequency-based .input-container,.wpbnbd--frequency-based .tier-label{display:block;font-weight:700;cursor:pointer}.wpbnbd--frequency-based .freq-label{box-sizing:border-box;overflow:hidden;white-space:nowrap;width:100%;z-index:1}.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 .76rem .76rem}@media only screen and (min-width:782px){.wpbnbd--frequency-based .submit-button,.wpbnbd--frequency-based button{margin:0 1.5rem 1.5rem}}.wpbnbd--frequency-based .submit-button:disabled,.wpbnbd--frequency-based button:disabled{opacity:.5}.wpbnbd--frequency-based .wpbnbd__button{font-size:16px;text-transform:uppercase}.wpbnbd--frequency-based .thanks{color:#767676;font-size:.8em;margin:.38rem .76rem .76rem;display:none}@media only screen and (min-width:600px){.wpbnbd--frequency-based .thanks{display:block}}@media only screen and (min-width:782px){.wpbnbd--frequency-based .thanks{margin-right:1.5rem;margin-left:1.5rem}}.wpbnbd.tiered .tiers{margin:.38rem;display:none;flex-wrap:wrap;position:relative}@media only screen and (min-width:782px){.wpbnbd.tiered .tiers{margin:1.12rem 1.12rem .38rem}}.wpbnbd.tiered .tiers .tier-label{border:1px solid #ccc;border-radius:5px;margin:.38rem;padding:.38rem .76rem}.wpbnbd.tiered .tiers .tier-label:hover{background:#f1f1f1}.wpbnbd.tiered .tiers input[type=radio]:focus+.tier-label{background:#f1f1f1;outline:1px dotted currentcolor;outline-offset:-4px}.wpbnbd.tiered .tiers input[type=radio]:checked+.tier-label{background-color:#757575;border-color:transparent;color:#fff}.wpbnbd.tiered .tiers .odl{font-weight:700;right:.38rem;position:absolute;bottom:calc(1.6em + 1.1rem + 2px)}.wpbnbd.tiered .tiers input.other-input~.money-input,.wpbnbd.tiered .tiers input.other-input~.odl{display:none}.wpbnbd.tiered .tiers input.other-input:checked~.money-input{display:flex}.wpbnbd.tiered .tiers input.other-input:checked~.odl{display:block}.wpbnbd.tiered .tiers input.other-input:checked+label{margin-bottom:calc(3.2em + 1.86rem + 2px)}.wpbnbd.tiered .money-input{bottom:.38rem;right:.38rem;position:absolute}.wpbnbd.untiered.wpbnbd--nyp-disabled .tier-label{border:none;font-size:1.25rem;padding:0}.wpbnbd.untiered .input-container{margin:.76rem;display:none}@media only screen and (min-width:782px){.wpbnbd.untiered .input-container{margin:1.5rem 1.5rem .76rem}}.wpbnbd.untiered input[type=radio]:checked~.input-container{display:block}.wpbnbd .money-input{display:flex;align-items:center;position:relative;max-width:200px;background-color:#fff;border-radius:3px;border:1px solid #ccc}.wpbnbd .money-input[focus-within]{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input:focus-within{border-color:#111;outline:thin solid rgba(17,17,17,.15);outline-offset:-4px}.wpbnbd .money-input .currency{cursor:default;font-size:.8em;padding-right:.5em}.wpbnbd .money-input input[type=number]{background:none;max-width:174px}.wpbnbd .money-input input[type=number],.wpbnbd .money-input input[type=number]:focus{border:none;outline:none;box-shadow:none}.wpbnbd .frequencies{position:relative;font-size:.7em}@media only screen and (min-width:600px){.wpbnbd .frequencies{font-size:.8em}}.wpbnbd .frequency input[type=radio]:checked~.tiers,.wpbnbd .tab-container{display:flex}.wpbnbd .tab-container .freq-label{border-radius:0;margin:0}.wpbnbd .tab-container .freq-label.wpbnbd__button--active{color:#111}.wpbnbd .tab-container .freq-label:focus{outline:0;text-decoration:underline;-webkit-text-decoration-style:dotted;text-decoration-style:dotted;text-decoration-thickness:1px}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '0fa1c88f8f4aeaed9ddb498389556894');
|
package/dist/modalCheckout.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
#newspack_modal_checkout{padding:32px;font-size:1rem}#newspack_modal_checkout .order-details-summary{border:2px solid;border-radius:3px;padding:16px}#newspack_modal_checkout .order-details-summary h4{font-size:1rem;margin:0}#newspack_modal_checkout .order-details-summary h4>span{color:inherit;font-size:clamp(1.75rem,1.75rem + (1vw - .48rem)*.962,2.25rem);font-weight:700;line-height:1.434}#newspack_modal_checkout .order-details-summary h4 .subscription-details{font-size:1rem;font-weight:400}#newspack_modal_checkout #order-details-wrapper.hidden{display:none}#newspack_modal_checkout .woocommerce-checkout-review-order-table,#newspack_modal_checkout .woocommerce-NoticeGroup{margin-top:16px}#newspack_modal_checkout .woocommerce-checkout-review-order-table td,#newspack_modal_checkout .woocommerce-checkout-review-order-table th{font-size:.8rem}#newspack_modal_checkout .woocommerce-checkout-review-order-table.empty{display:none;margin:0;padding:0}#newspack_modal_checkout .woocommerce-billing-fields{margin-bottom:16px}#newspack_modal_checkout .checkout-billing-summary{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .checkout-billing-summary__grid{align-items:baseline;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}#newspack_modal_checkout .checkout-billing-summary p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:16px 0 0}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link{color:#767676;font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);display:inline-block;text-decoration:underline}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:focus,#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:hover{color:inherit}#newspack_modal_checkout .woocommerce-account-fields .create-account{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-hint,#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-strength{color:#cc1818;margin-top:16px}#newspack_modal_checkout form
|
|
1
|
+
#newspack_modal_checkout{padding:32px;font-size:1rem}#newspack_modal_checkout .order-details-summary{border:2px solid;border-radius:3px;padding:16px}#newspack_modal_checkout .order-details-summary h4{font-size:1rem;margin:0}#newspack_modal_checkout .order-details-summary h4>span{color:inherit;font-size:clamp(1.75rem,1.75rem + (1vw - .48rem)*.962,2.25rem);font-weight:700;line-height:1.434}#newspack_modal_checkout .order-details-summary h4 .subscription-details{font-size:1rem;font-weight:400}#newspack_modal_checkout #order-details-wrapper.hidden{display:none}#newspack_modal_checkout .woocommerce-checkout-review-order-table,#newspack_modal_checkout .woocommerce-NoticeGroup{margin-top:16px}#newspack_modal_checkout .woocommerce-checkout-review-order-table td,#newspack_modal_checkout .woocommerce-checkout-review-order-table th{font-size:.8rem}#newspack_modal_checkout .woocommerce-checkout-review-order-table.empty{display:none;margin:0;padding:0}#newspack_modal_checkout .woocommerce-billing-fields{margin-bottom:16px}#newspack_modal_checkout .checkout-billing-summary{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .checkout-billing-summary__grid{align-items:baseline;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}#newspack_modal_checkout .checkout-billing-summary p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:16px 0 0}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link{color:#767676;font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);display:inline-block;text-decoration:underline}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:focus,#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:hover{color:inherit}#newspack_modal_checkout .woocommerce-account-fields .create-account{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-hint,#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-strength{color:#cc1818;margin-top:16px}#newspack_modal_checkout form{margin:0}#newspack_modal_checkout form .woocommerce-terms-and-conditions-wrapper{margin:16px 0}#newspack_modal_checkout form h3{font-size:1.37rem;margin:32px 0 0}#newspack_modal_checkout form p{margin:16px 0}#newspack_modal_checkout form .select2-container .select2-selection--single{margin:0}#newspack_modal_checkout form #payment button#place_order{margin-bottom:0}#newspack_modal_checkout form .checkout-billing button[type=submit],#newspack_modal_checkout form button.modal-continue,#newspack_modal_checkout form button[name=woocommerce_checkout_place_order]{display:block;width:100%}#newspack_modal_checkout .form-row-first,#newspack_modal_checkout .form-row-last{width:calc(50% - 8px)}#newspack_modal_checkout .form-row-last+.form-row-first,#newspack_modal_checkout .form-row-wide+.form-row-first,#newspack_modal_checkout .form-row-wide+.form-row-first+.form-row-last{margin-top:0}#newspack_modal_checkout .select2-container--default .select2-selection--single{border-color:#ccc;border-radius:0;height:44px}#newspack_modal_checkout .select2-container--default .select2-selection--single .select2-selection__rendered{color:inherit;line-height:44px}#newspack_modal_checkout .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px}#newspack_modal_checkout .wc_payment_method .payment_box{background:#f0f0f0;border-radius:3px;padding:16px}#newspack_modal_checkout .wc_payment_method .payment_box p{margin-top:0}#newspack_modal_checkout .wc_payment_method .payment_box p.newspack-cover-fees,#newspack_modal_checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew{display:flex;margin:8px 0;align-items:flex-start}#newspack_modal_checkout .wc_payment_method .payment_box p.newspack-cover-fees input[type=checkbox],#newspack_modal_checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew input[type=checkbox]{margin-right:8px}#newspack_modal_checkout .wc-saved-payment-methods{padding:0}#newspack_modal_checkout .woocommerce-error{border-radius:3px;margin:0}#newspack_modal_checkout .woocommerce-notices-wrapper:not(:empty){margin-bottom:32px}#newspack_modal_checkout .woocommerce-privacy-policy-text{color:#767676}#newspack_modal_checkout .woocommerce-privacy-policy-text p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:0}#newspack_modal_checkout .woocommerce-thankyou-order-received{align-items:center;border-bottom:1px solid #ccc;display:flex;flex-direction:column;justify-content:center;margin:0 0 32px;padding:0 0 32px}#newspack_modal_checkout .woocommerce-thankyou-order-received:before{-webkit-animation:bounce .25s ease-in;animation:bounce .25s ease-in;-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;background-color:#4ab866;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z' fill='%23fff'/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;background-size:24px;border-radius:50%;content:"";display:block;height:40px;margin-bottom:16px;padding:8px;transform:scale(0);width:40px}#newspack_modal_checkout .woocommerce-form-login-toggle,#newspack_modal_checkout .woocommerce-thankyou-order-received+.woocommerce-info{display:none}#newspack_modal_checkout .woocommerce-order-overview{color:#767676;list-style:none;margin:16px 0 0;padding:0}#newspack_modal_checkout .blockOverlay{align-items:center;display:flex;inset:0;justify-content:center;position:fixed!important}#newspack_modal_checkout .blockOverlay:after{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:2px solid #fff;border-top-color:#767676;border-radius:50%;content:"";display:block;height:25px;width:25px}.newspack-modal-newsletters{margin-top:20px;padding-top:22px;border-top:1px solid #ccc}.newspack-modal-newsletters__info{margin-bottom:35px}.newspack-modal-newsletters__info span{color:#767676}.newspack-modal-newsletters__list-item{display:flex;margin-bottom:18px;border:1px solid #ccc;border-radius:6px}.newspack-modal-newsletters__list-item b{display:block;margin-bottom:2px}.newspack-modal-newsletters label{flex:1;padding:12px;cursor:pointer}.newspack-modal-newsletters input[type=checkbox]{padding:10px;margin-top:18px;margin-right:19px;margin-left:20px;border-radius:5px}.newspack-modal-newsletters__button,.newspack-modal-newsletters input[type=submit]{margin-top:25px;width:100%;padding:22px!important;font-size:1em!important}@-webkit-keyframes bounce{0%{transform:scale(0)}90%{transform:scale(1.4)}to{transform:scale(1)}}@keyframes bounce{0%{transform:scale(0)}90%{transform:scale(1.4)}to{transform:scale(1)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
#newspack_modal_checkout{padding:32px;font-size:1rem}#newspack_modal_checkout .order-details-summary{border:2px solid;border-radius:3px;padding:16px}#newspack_modal_checkout .order-details-summary h4{font-size:1rem;margin:0}#newspack_modal_checkout .order-details-summary h4>span{color:inherit;font-size:clamp(1.75rem,1.75rem + (1vw - .48rem)*.962,2.25rem);font-weight:700;line-height:1.434}#newspack_modal_checkout .order-details-summary h4 .subscription-details{font-size:1rem;font-weight:400}#newspack_modal_checkout #order-details-wrapper.hidden{display:none}#newspack_modal_checkout .woocommerce-checkout-review-order-table,#newspack_modal_checkout .woocommerce-NoticeGroup{margin-top:16px}#newspack_modal_checkout .woocommerce-checkout-review-order-table td,#newspack_modal_checkout .woocommerce-checkout-review-order-table th{font-size:.8rem}#newspack_modal_checkout .woocommerce-checkout-review-order-table.empty{display:none;margin:0;padding:0}#newspack_modal_checkout .woocommerce-billing-fields{margin-bottom:16px}#newspack_modal_checkout .checkout-billing-summary{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .checkout-billing-summary__grid{align-items:baseline;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}#newspack_modal_checkout .checkout-billing-summary p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:16px 0 0}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link{color:#767676;font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);display:inline-block;text-decoration:underline}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:focus,#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:hover{color:inherit}#newspack_modal_checkout .woocommerce-account-fields .create-account{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-hint,#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-strength{color:#cc1818;margin-top:16px}#newspack_modal_checkout form
|
|
1
|
+
#newspack_modal_checkout{padding:32px;font-size:1rem}#newspack_modal_checkout .order-details-summary{border:2px solid;border-radius:3px;padding:16px}#newspack_modal_checkout .order-details-summary h4{font-size:1rem;margin:0}#newspack_modal_checkout .order-details-summary h4>span{color:inherit;font-size:clamp(1.75rem,1.75rem + (1vw - .48rem)*.962,2.25rem);font-weight:700;line-height:1.434}#newspack_modal_checkout .order-details-summary h4 .subscription-details{font-size:1rem;font-weight:400}#newspack_modal_checkout #order-details-wrapper.hidden{display:none}#newspack_modal_checkout .woocommerce-checkout-review-order-table,#newspack_modal_checkout .woocommerce-NoticeGroup{margin-top:16px}#newspack_modal_checkout .woocommerce-checkout-review-order-table td,#newspack_modal_checkout .woocommerce-checkout-review-order-table th{font-size:.8rem}#newspack_modal_checkout .woocommerce-checkout-review-order-table.empty{display:none;margin:0;padding:0}#newspack_modal_checkout .woocommerce-billing-fields{margin-bottom:16px}#newspack_modal_checkout .checkout-billing-summary{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .checkout-billing-summary__grid{align-items:baseline;display:flex;flex-wrap:wrap;gap:8px;justify-content:space-between}#newspack_modal_checkout .checkout-billing-summary p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:16px 0 0}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link{color:#767676;font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);display:inline-block;text-decoration:underline}#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:focus,#newspack_modal_checkout .checkout-billing-summary .edit-billing-link:hover{color:inherit}#newspack_modal_checkout .woocommerce-account-fields .create-account{border-bottom:1px solid #ccc;padding-bottom:32px}#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-hint,#newspack_modal_checkout .woocommerce-account-fields .create-account .woocommerce-password-strength{color:#cc1818;margin-top:16px}#newspack_modal_checkout form{margin:0}#newspack_modal_checkout form .woocommerce-terms-and-conditions-wrapper{margin:16px 0}#newspack_modal_checkout form h3{font-size:1.37rem;margin:32px 0 0}#newspack_modal_checkout form p{margin:16px 0}#newspack_modal_checkout form .select2-container .select2-selection--single{margin:0}#newspack_modal_checkout form #payment button#place_order{margin-bottom:0}#newspack_modal_checkout form .checkout-billing button[type=submit],#newspack_modal_checkout form button.modal-continue,#newspack_modal_checkout form button[name=woocommerce_checkout_place_order]{display:block;width:100%}#newspack_modal_checkout .form-row-first,#newspack_modal_checkout .form-row-last{width:calc(50% - 8px)}#newspack_modal_checkout .form-row-last+.form-row-first,#newspack_modal_checkout .form-row-wide+.form-row-first,#newspack_modal_checkout .form-row-wide+.form-row-first+.form-row-last{margin-top:0}#newspack_modal_checkout .select2-container--default .select2-selection--single{border-color:#ccc;border-radius:0;height:44px}#newspack_modal_checkout .select2-container--default .select2-selection--single .select2-selection__rendered{color:inherit;line-height:44px}#newspack_modal_checkout .select2-container--default .select2-selection--single .select2-selection__arrow{height:42px}#newspack_modal_checkout .wc_payment_method .payment_box{background:#f0f0f0;border-radius:3px;padding:16px}#newspack_modal_checkout .wc_payment_method .payment_box p{margin-top:0}#newspack_modal_checkout .wc_payment_method .payment_box p.newspack-cover-fees,#newspack_modal_checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew{display:flex;margin:8px 0;align-items:flex-start}#newspack_modal_checkout .wc_payment_method .payment_box p.newspack-cover-fees input[type=checkbox],#newspack_modal_checkout .wc_payment_method .payment_box p.woocommerce-SavedPaymentMethods-saveNew input[type=checkbox]{margin-left:8px}#newspack_modal_checkout .wc-saved-payment-methods{padding:0}#newspack_modal_checkout .woocommerce-error{border-radius:3px;margin:0}#newspack_modal_checkout .woocommerce-notices-wrapper:not(:empty){margin-bottom:32px}#newspack_modal_checkout .woocommerce-privacy-policy-text{color:#767676}#newspack_modal_checkout .woocommerce-privacy-policy-text p{font-size:clamp(.75rem,.75rem + (1vw - .48rem)*.481,1rem);margin:0}#newspack_modal_checkout .woocommerce-thankyou-order-received{align-items:center;border-bottom:1px solid #ccc;display:flex;flex-direction:column;justify-content:center;margin:0 0 32px;padding:0 0 32px}#newspack_modal_checkout .woocommerce-thankyou-order-received:before{-webkit-animation:bounce .25s ease-in;animation:bounce .25s ease-in;-webkit-animation-delay:1s;animation-delay:1s;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards;background-color:#4ab866;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.7 7.1l-6.3 8.5-3.3-2.5-.9 1.2 4.5 3.4L17.9 8z' fill='%23fff'/%3E%3C/svg%3E");background-position:50% 50%;background-repeat:no-repeat;background-size:24px;border-radius:50%;content:"";display:block;height:40px;margin-bottom:16px;padding:8px;transform:scale(0);width:40px}#newspack_modal_checkout .woocommerce-form-login-toggle,#newspack_modal_checkout .woocommerce-thankyou-order-received+.woocommerce-info{display:none}#newspack_modal_checkout .woocommerce-order-overview{color:#767676;list-style:none;margin:16px 0 0;padding:0}#newspack_modal_checkout .blockOverlay{align-items:center;display:flex;inset:0;justify-content:center;position:fixed!important}#newspack_modal_checkout .blockOverlay:after{-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:2px solid #fff;border-top-color:#767676;border-radius:50%;content:"";display:block;height:25px;width:25px}.newspack-modal-newsletters{margin-top:20px;padding-top:22px;border-top:1px solid #ccc}.newspack-modal-newsletters__info{margin-bottom:35px}.newspack-modal-newsletters__info span{color:#767676}.newspack-modal-newsletters__list-item{display:flex;margin-bottom:18px;border:1px solid #ccc;border-radius:6px}.newspack-modal-newsletters__list-item b{display:block;margin-bottom:2px}.newspack-modal-newsletters label{flex:1;padding:12px;cursor:pointer}.newspack-modal-newsletters input[type=checkbox]{padding:10px;margin-top:18px;margin-left:19px;margin-right:20px;border-radius:5px}.newspack-modal-newsletters__button,.newspack-modal-newsletters input[type=submit]{margin-top:25px;width:100%;padding:22px!important;font-size:1em!important}@-webkit-keyframes bounce{0%{transform:scale(0)}90%{transform:scale(1.4)}to{transform:scale(1)}}@keyframes bounce{0%{transform:scale(0)}90%{transform:scale(1.4)}to{transform:scale(1)}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '
|
|
1
|
+
<?php return array('dependencies' => array('wp-polyfill'), 'version' => '49c83a4dbfa15d30b1483ef16afc8476');
|
package/dist/tiersBased.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wpbnbd--tiers-based .wpbnbd .submit-button,.wpbnbd--tiers-based .wpbnbd__button{border-width:1px;border-color:transparent;border-radius:0;background:none}.wpbnbd--tiers-based .wpbnbd .submit-button--active,.wpbnbd--tiers-based .wpbnbd__button--active{border-color:#ccc}.wpbnbd--tiers-based .wpbnbd__tiers__view--hidden{display:none}.wpbnbd--tiers-based .
|
|
1
|
+
.wpbnbd--tiers-based .wpbnbd .submit-button,.wpbnbd--tiers-based .wpbnbd__button{border-width:1px;border-color:transparent;border-radius:0;background:none}.wpbnbd--tiers-based .wpbnbd .submit-button--active,.wpbnbd--tiers-based .wpbnbd__button--active{border-color:#ccc}.wpbnbd--tiers-based .wpbnbd__tiers__view--hidden{display:none}.wpbnbd--tiers-based .wpbnbd__tiers__selection{display:flex;justify-content:center;margin-bottom:14px}.wpbnbd--tiers-based .wpbnbd__tiers__selection .submit-button,.wpbnbd--tiers-based .wpbnbd__tiers__selection button{font-size:13px;white-space:nowrap}.wpbnbd--tiers-based .wpbnbd__tiers__options{display:flex;margin-left:-10px;margin-right:-10px}.wpbnbd--tiers-based .wpbnbd__tiers__options__dots{display:none}@media screen and (max-width:600px){.wpbnbd--tiers-based .wpbnbd__tiers__options{overflow-x:scroll;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scroll-padding:10%}.wpbnbd--tiers-based .wpbnbd__tiers__options__dots{display:flex;justify-content:center;margin-top:1em;list-style:none}.wpbnbd--tiers-based .wpbnbd__tiers__options__dots li{height:8px;width:36px;border-radius:50px;background:#ccc;margin:0 5px}}.wpbnbd--tiers-based .wpbnbd__tiers__tier{flex:1;display:flex;scroll-snap-align:start;flex-direction:column;margin-left:10px;margin-right:10px;padding:19px 14px;background:#fff;border:1px solid #ccc;border-radius:5px}@media screen and (max-width:600px){.wpbnbd--tiers-based .wpbnbd__tiers__tier{width:80%;flex:0 0 auto}}.wpbnbd--tiers-based .wpbnbd__tiers__tier--recommended{border:2px solid #111}.wpbnbd--tiers-based .wpbnbd__tiers__top{display:flex;justify-content:space-between;margin-bottom:7px}.wpbnbd--tiers-based .wpbnbd__tiers__heading{font-size:16px;font-weight:700;margin:0}.wpbnbd--tiers-based .wpbnbd__tiers__recommend-label{height:17px;padding:2px 7px;margin:0;background-color:#757575;color:#fff;border-radius:2px;font-size:11px}.wpbnbd--tiers-based .wpbnbd__tiers__amount{margin-bottom:16px}.wpbnbd--tiers-based .wpbnbd__tiers .submit-button,.wpbnbd--tiers-based .wpbnbd__tiers button[type=submit]{border-radius:3px;border:2px solid;font-size:14px;line-height:1;padding:10px 16px;margin-bottom:16px}.wpbnbd--tiers-based .wpbnbd__tiers__description{flex:1;line-height:1.4;font-size:13px}.wpbnbd--tiers-based .wpbnbd__tiers__back-button{background:none;padding:0;margin-bottom:13px;color:#767676}.wpbnbd--tiers-based .wpbnbd__tiers__back-button span{text-decoration:underline}.wpbnbd--tiers-based .wpbnbd__tiers__back-button:focus,.wpbnbd--tiers-based .wpbnbd__tiers__back-button:hover{color:#111;background:none}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile{display:flex;justify-content:space-between;margin-bottom:17px;padding:5px 14px 16px;border:2px solid #111;border-radius:4px}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile h2{font-size:.8em;margin-top:13px}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile h3{display:inline-block;font-size:19px;padding-top:6px;margin:0 0 7px}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile>div{text-align:right}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile [data-amount]{font-weight:700;font-size:1.4em}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile [data-frequency]{font-size:.7em}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile__note{font-size:.6em}
|
package/dist/tiersBased.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var t={7954:t=>{var e=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,
|
|
1
|
+
(()=>{var t={7954:t=>{var e=/^\s+|\s+$/g,n=/^[-+]0x[0-9a-f]+$/i,r=/^0b[01]+$/i,o=/^0o[0-7]+$/i,i=parseInt,a="object"==typeof window&&window&&window.Object===Object&&window,u="object"==typeof self&&self&&self.Object===Object&&self,c=a||u||Function("return this")(),d=Object.prototype.toString,l=Math.max,f=Math.min,s=function(){return c.Date.now()};function b(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function p(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==d.call(t)}(t))return NaN;if(b(t)){var a="function"==typeof t.valueOf?t.valueOf():t;t=b(a)?a+"":a}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(e,"");var u=r.test(t);return u||o.test(t)?i(t.slice(2),u?2:8):n.test(t)?NaN:+t}t.exports=function(t,e,n){var r,o,i,a,u,c,d=0,v=!1,y=!1,_=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function m(e){var n=r,i=o;return r=o=void 0,d=e,a=t.apply(i,n)}function w(t){return d=t,u=setTimeout(g,e),v?m(t):a}function h(t){var n=t-c;return void 0===c||n>=e||n<0||y&&t-d>=i}function g(){var t=s();if(h(t))return q(t);u=setTimeout(g,function(t){var n=e-(t-c);return y?f(n,i-(t-d)):n}(t))}function q(t){return u=void 0,_&&r?m(t):(r=o=void 0,a)}function S(){var t=s(),n=h(t);if(r=arguments,o=this,c=t,n){if(void 0===u)return w(c);if(y)return u=setTimeout(g,e),m(c)}return void 0===u&&(u=setTimeout(g,e)),a}return e=p(e)||0,b(n)&&(v=!!n.leading,i=(y="maxWait"in n)?l(p(n.maxWait)||0,e):i,_="trailing"in n?!!n.trailing:_),S.cancel=function(){void 0!==u&&clearTimeout(u),d=0,r=c=o=u=void 0},S.flush=function(){return void 0===u?a:q(s())},S}}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";n.r(r),n.d(r,{processTiersBasedElements:()=>d});var t=n(7954),e=n.n(t),o=function(t,n){var r=t.querySelector(".wpbnbd__tiers__options"),o=t.querySelector(".wpbnbd__tiers__options__dots");if(r&&o&&n){var i=function(){return Array.from(r.children).map((function(t){return{el:t,width:t.clientWidth}}))},a=i(),u=Math.round(a.length/2)-1,c=function(){return a[u].width},d=function(){return a.map((function(t,e){return l*e}))},l=c(),f=d(),s=u*l;window.addEventListener("resize",(function(){a=i(),l=c(),f=d(),r.scrollTo(s,0)}));var b=Array.from(o.children),p=e()((function(){var t,e,o,i=(t=f,e=r.scrollLeft,o=t.reduce((function(t,n){return Math.abs(n-e)<Math.abs(t)?n-e:t}),1/0)+e,t.indexOf(o));b.forEach((function(t,e){t.style.backgroundColor=e===i?n.buttonColor:""}))}),100);r.addEventListener("scroll",p),b.forEach((function(t,e){t.addEventListener("click",(function(){r.scrollTo({left:e*l,behavior:"smooth"})}))})),r.scrollTo(s,0)}},i="wpbnbd__button--active",a=function(t){return'.wpbnbd__tiers__amount [data-frequency-slug="'.concat(t,'"]')};const u=function(t){var e=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";try{var e=JSON.parse(t);return{params:{frequency:e[0],tierPrefix:e[1]},initialFrequency:e[2],tiersBasedOptions:e[3],amounts:e[4],renewsAt:{month:e[5],year:e[6]},buttonColor:e[7]}}catch(n){return!1}}(t.getAttribute("data-tiers-based-config")||"");if(e){var n=t.querySelectorAll(".wpbnbd__tiers__selection button"),r=t.querySelectorAll(".wpbnbd__tiers__amount [data-frequency-slug]"),u=t.querySelector('input[name="'.concat(e.params.frequency,'"]')),c=t.querySelector("form[data-is-init-form]");if(n&&r&&u&&c){o(t,e);var d=e.initialFrequency;n.forEach((function(o){o.addEventListener("click",(function(){var c=o.getAttribute("data-frequency-slug");c&&(d=c,u.setAttribute("value",d),r.forEach((function(t){return t.style.display="none"})),t.querySelectorAll(a(d)).forEach((function(t){return t.style.display="inline"})),n.forEach((function(t){d===t.getAttribute("data-frequency-slug")?t.classList.add(i):t.classList.remove(i)})),t.querySelectorAll('button[type="submit"]').forEach((function(t){if(d){t.setAttribute("name","".concat(e.params.tierPrefix).concat(d));var n=t.getAttribute("data-tier-index"),r=document.querySelector("".concat(a(d),'[data-tier-index="').concat(n,'"]'));if(r){var o=r.getAttribute("data-amount");o&&t.setAttribute("value",o)}}})))}))}));var l=t.querySelector("button.wpbnbd__tiers__back-button"),f=t.querySelectorAll(".wpbnbd__tiers__tier button"),s=t.querySelectorAll(".wpbnbd__tiers__view");f.forEach((function(n){n.addEventListener("click",(function(){var r,o=parseInt(n.getAttribute("data-tier-index")||""),i=t.querySelector(".wpbnbd__tiers__tier-tile h2"),a=t.querySelector(".wpbnbd__tiers__tier-tile span[data-amount]"),u=t.querySelector(".wpbnbd__tiers__tier-tile span[data-frequency]"),c=t.querySelector(".wpbnbd__tiers__tier-tile span[data-renews-date]");if(!isNaN(o)&&i&&a&&u&&c){var l=e.tiersBasedOptions[o],f=null===(r=t.querySelector('[data-frequency-slug="'.concat(d,'"]')))||void 0===r?void 0:r.getAttribute("data-frequency-label");i.textContent=l.heading,u.textContent=f||"",a.textContent=e.amounts[d][o],c.textContent=e.renewsAt[d],s.forEach((function(t){return t.classList.toggle("wpbnbd__tiers__view--hidden")}))}}))})),window.addEventListener("newspackPaymentFlowComplete-".concat(t.id),(function(){l&&(l.style.display="none")}))}}};var c,d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=t.querySelectorAll(".wpbnbd--tiers-based");e.forEach(u)};"undefined"!=typeof window&&(c=function(){return d()},"undefined"!=typeof document&&("complete"!==document.readyState&&"interactive"!==document.readyState?document.addEventListener("DOMContentLoaded",c):c()))})();var o=window;for(var i in r)o[i]=r[i];r.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
|
package/dist/tiersBased.rtl.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.wpbnbd--tiers-based .wpbnbd .submit-button,.wpbnbd--tiers-based .wpbnbd__button{border-width:1px;border-color:transparent;border-radius:0;background:none}.wpbnbd--tiers-based .wpbnbd .submit-button--active,.wpbnbd--tiers-based .wpbnbd__button--active{border-color:#ccc}.wpbnbd--tiers-based .wpbnbd__tiers__view--hidden{display:none}.wpbnbd--tiers-based .
|
|
1
|
+
.wpbnbd--tiers-based .wpbnbd .submit-button,.wpbnbd--tiers-based .wpbnbd__button{border-width:1px;border-color:transparent;border-radius:0;background:none}.wpbnbd--tiers-based .wpbnbd .submit-button--active,.wpbnbd--tiers-based .wpbnbd__button--active{border-color:#ccc}.wpbnbd--tiers-based .wpbnbd__tiers__view--hidden{display:none}.wpbnbd--tiers-based .wpbnbd__tiers__selection{display:flex;justify-content:center;margin-bottom:14px}.wpbnbd--tiers-based .wpbnbd__tiers__selection .submit-button,.wpbnbd--tiers-based .wpbnbd__tiers__selection button{font-size:13px;white-space:nowrap}.wpbnbd--tiers-based .wpbnbd__tiers__options{display:flex;margin-right:-10px;margin-left:-10px}.wpbnbd--tiers-based .wpbnbd__tiers__options__dots{display:none}@media screen and (max-width:600px){.wpbnbd--tiers-based .wpbnbd__tiers__options{overflow-x:scroll;-ms-scroll-snap-type:x mandatory;scroll-snap-type:x mandatory;scroll-padding:10%}.wpbnbd--tiers-based .wpbnbd__tiers__options__dots{display:flex;justify-content:center;margin-top:1em;list-style:none}.wpbnbd--tiers-based .wpbnbd__tiers__options__dots li{height:8px;width:36px;border-radius:50px;background:#ccc;margin:0 5px}}.wpbnbd--tiers-based .wpbnbd__tiers__tier{flex:1;display:flex;scroll-snap-align:start;flex-direction:column;margin-right:10px;margin-left:10px;padding:19px 14px;background:#fff;border:1px solid #ccc;border-radius:5px}@media screen and (max-width:600px){.wpbnbd--tiers-based .wpbnbd__tiers__tier{width:80%;flex:0 0 auto}}.wpbnbd--tiers-based .wpbnbd__tiers__tier--recommended{border:2px solid #111}.wpbnbd--tiers-based .wpbnbd__tiers__top{display:flex;justify-content:space-between;margin-bottom:7px}.wpbnbd--tiers-based .wpbnbd__tiers__heading{font-size:16px;font-weight:700;margin:0}.wpbnbd--tiers-based .wpbnbd__tiers__recommend-label{height:17px;padding:2px 7px;margin:0;background-color:#757575;color:#fff;border-radius:2px;font-size:11px}.wpbnbd--tiers-based .wpbnbd__tiers__amount{margin-bottom:16px}.wpbnbd--tiers-based .wpbnbd__tiers .submit-button,.wpbnbd--tiers-based .wpbnbd__tiers button[type=submit]{border-radius:3px;border:2px solid;font-size:14px;line-height:1;padding:10px 16px;margin-bottom:16px}.wpbnbd--tiers-based .wpbnbd__tiers__description{flex:1;line-height:1.4;font-size:13px}.wpbnbd--tiers-based .wpbnbd__tiers__back-button{background:none;padding:0;margin-bottom:13px;color:#767676}.wpbnbd--tiers-based .wpbnbd__tiers__back-button span{text-decoration:underline}.wpbnbd--tiers-based .wpbnbd__tiers__back-button:focus,.wpbnbd--tiers-based .wpbnbd__tiers__back-button:hover{color:#111;background:none}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile{display:flex;justify-content:space-between;margin-bottom:17px;padding:5px 14px 16px;border:2px solid #111;border-radius:4px}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile h2{font-size:.8em;margin-top:13px}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile h3{display:inline-block;font-size:19px;padding-top:6px;margin:0 0 7px}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile>div{text-align:left}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile [data-amount]{font-weight:700;font-size:1.4em}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile [data-frequency]{font-size:.7em}.wpbnbd--tiers-based .wpbnbd__tiers__tier-tile__note{font-size:.6em}
|
|
@@ -219,20 +219,17 @@ final class Modal_Checkout {
|
|
|
219
219
|
}
|
|
220
220
|
|
|
221
221
|
/** Apply NYP custom price */
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
if ( empty( $price ) ) {
|
|
227
|
-
$price = \WC_Name_Your_Price_Helpers::get_suggested_price( $product_id );
|
|
228
|
-
}
|
|
229
|
-
$min_price = \WC_Name_Your_Price_Helpers::get_minimum_price( $product_id );
|
|
230
|
-
$max_price = \WC_Name_Your_Price_Helpers::get_maximum_price( $product_id );
|
|
231
|
-
$price = ! empty( $max_price ) ? min( $price, $max_price ) : $price;
|
|
232
|
-
$price = ! empty( $min_price ) ? max( $price, $min_price ) : $price;
|
|
233
|
-
|
|
234
|
-
$cart_item_data['nyp'] = (float) \WC_Name_Your_Price_Helpers::standardize_number( $price );
|
|
222
|
+
$price = filter_input( INPUT_GET, 'price', FILTER_SANITIZE_FULL_SPECIAL_CHARS );
|
|
223
|
+
if ( \Newspack_Blocks::can_use_name_your_price() ? \WC_Name_Your_Price_Helpers::is_nyp( $product_id ) : false ) {
|
|
224
|
+
if ( empty( $price ) ) {
|
|
225
|
+
$price = \WC_Name_Your_Price_Helpers::get_suggested_price( $product_id );
|
|
235
226
|
}
|
|
227
|
+
$min_price = \WC_Name_Your_Price_Helpers::get_minimum_price( $product_id );
|
|
228
|
+
$max_price = \WC_Name_Your_Price_Helpers::get_maximum_price( $product_id );
|
|
229
|
+
$price = ! empty( $max_price ) ? min( $price, $max_price ) : $price;
|
|
230
|
+
$price = ! empty( $min_price ) ? max( $price, $min_price ) : $price;
|
|
231
|
+
|
|
232
|
+
$cart_item_data['nyp'] = (float) \WC_Name_Your_Price_Helpers::standardize_number( $price );
|
|
236
233
|
}
|
|
237
234
|
|
|
238
235
|
/**
|
|
@@ -962,7 +959,7 @@ final class Modal_Checkout {
|
|
|
962
959
|
*/
|
|
963
960
|
public static function is_modal_checkout() {
|
|
964
961
|
$is_modal_checkout = isset( $_REQUEST['modal_checkout'] ); // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
965
|
-
if ( ! $is_modal_checkout && isset( $_REQUEST['post_data'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
962
|
+
if ( ! $is_modal_checkout && isset( $_REQUEST['post_data'] ) && is_string( $_REQUEST['post_data'] ) ) { // phpcs:ignore WordPress.Security.NonceVerification.Recommended
|
|
966
963
|
$is_modal_checkout = strpos( $_REQUEST['post_data'], 'modal_checkout=1' ) !== false; // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.MissingUnslash, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized
|
|
967
964
|
}
|
|
968
965
|
|
|
@@ -16,7 +16,6 @@ class Newspack_Blocks {
|
|
|
16
16
|
const SCRIPT_HANDLES = [
|
|
17
17
|
'modal-checkout' => 'newspack-blocks-donate-modal-checkout',
|
|
18
18
|
'modal-checkout-block' => 'newspack-blocks-donate-modal-checkout-block',
|
|
19
|
-
'streamlined' => 'newspack-blocks-donate-streamlined',
|
|
20
19
|
'frequency-based' => 'newspack-blocks-donate-frequency-based',
|
|
21
20
|
'tiers-based' => 'newspack-blocks-donate-tiers-based',
|
|
22
21
|
];
|
|
@@ -231,6 +230,15 @@ class Newspack_Blocks {
|
|
|
231
230
|
return apply_filters( 'newspack_blocks_home_page_block_custom_taxonomies', $custom_taxonomies );
|
|
232
231
|
}
|
|
233
232
|
|
|
233
|
+
/**
|
|
234
|
+
* Check if the Name Your Price extension is available.
|
|
235
|
+
*
|
|
236
|
+
* @return bool True if available, false if not.
|
|
237
|
+
*/
|
|
238
|
+
public static function can_use_name_your_price() {
|
|
239
|
+
return class_exists( 'WC_Name_Your_Price_Helpers' );
|
|
240
|
+
}
|
|
241
|
+
|
|
234
242
|
/**
|
|
235
243
|
* Enqueue block scripts and styles for editor.
|
|
236
244
|
*/
|
|
@@ -247,18 +255,19 @@ class Newspack_Blocks {
|
|
|
247
255
|
);
|
|
248
256
|
|
|
249
257
|
$localized_data = [
|
|
250
|
-
'patterns'
|
|
251
|
-
'posts_rest_url'
|
|
252
|
-
'specific_posts_rest_url'
|
|
253
|
-
'authors_rest_url'
|
|
254
|
-
'assets_path'
|
|
255
|
-
'post_subtitle'
|
|
256
|
-
'
|
|
257
|
-
'
|
|
258
|
-
'
|
|
259
|
-
'
|
|
260
|
-
'
|
|
261
|
-
'
|
|
258
|
+
'patterns' => self::get_patterns_for_post_type( get_post_type() ),
|
|
259
|
+
'posts_rest_url' => rest_url( 'newspack-blocks/v1/newspack-blocks-posts' ),
|
|
260
|
+
'specific_posts_rest_url' => rest_url( 'newspack-blocks/v1/newspack-blocks-specific-posts' ),
|
|
261
|
+
'authors_rest_url' => rest_url( 'newspack-blocks/v1/authors' ),
|
|
262
|
+
'assets_path' => plugins_url( '/src/assets', NEWSPACK_BLOCKS__PLUGIN_FILE ),
|
|
263
|
+
'post_subtitle' => get_theme_support( 'post-subtitle' ),
|
|
264
|
+
'iframe_accepted_file_mimes' => self::iframe_accepted_file_mimes(),
|
|
265
|
+
'supports_recaptcha' => class_exists( 'Newspack\Recaptcha' ),
|
|
266
|
+
'has_recaptcha' => class_exists( 'Newspack\Recaptcha' ) && \Newspack\Recaptcha::can_use_captcha(),
|
|
267
|
+
'recaptcha_url' => admin_url( 'admin.php?page=newspack-connections-wizard' ),
|
|
268
|
+
'custom_taxonomies' => self::get_custom_taxonomies(),
|
|
269
|
+
'can_use_name_your_price' => self::can_use_name_your_price(),
|
|
270
|
+
'tier_amounts_template' => self::get_formatted_amount(),
|
|
262
271
|
];
|
|
263
272
|
|
|
264
273
|
if ( class_exists( 'WP_REST_Newspack_Author_List_Controller' ) ) {
|
|
@@ -294,22 +303,6 @@ class Newspack_Blocks {
|
|
|
294
303
|
);
|
|
295
304
|
}
|
|
296
305
|
|
|
297
|
-
/**
|
|
298
|
-
* Should the Donate block be a "streamlined" block?
|
|
299
|
-
*
|
|
300
|
-
* @return bool True if it can.
|
|
301
|
-
*/
|
|
302
|
-
public static function is_rendering_stripe_payment_form() {
|
|
303
|
-
if (
|
|
304
|
-
class_exists( 'Newspack\Donations' )
|
|
305
|
-
&& method_exists( 'Newspack\Donations', 'can_use_streamlined_donate_block' )
|
|
306
|
-
&& method_exists( 'Newspack\Donations', 'is_platform_stripe' )
|
|
307
|
-
) {
|
|
308
|
-
return \Newspack\Donations::can_use_streamlined_donate_block() && \Newspack\Donations::is_platform_stripe();
|
|
309
|
-
}
|
|
310
|
-
return false;
|
|
311
|
-
}
|
|
312
|
-
|
|
313
306
|
/**
|
|
314
307
|
* Enqueue block scripts and styles for view.
|
|
315
308
|
*/
|
|
@@ -625,17 +618,18 @@ class Newspack_Blocks {
|
|
|
625
618
|
if ( current_user_can( 'edit_others_posts' ) && isset( $attributes['includedPostStatuses'] ) ) {
|
|
626
619
|
$included_post_statuses = $attributes['includedPostStatuses'];
|
|
627
620
|
}
|
|
628
|
-
$authors
|
|
629
|
-
$categories
|
|
630
|
-
$include_subcategories
|
|
631
|
-
$tags
|
|
632
|
-
$custom_taxonomies
|
|
633
|
-
$tag_exclusions
|
|
634
|
-
$category_exclusions
|
|
635
|
-
$
|
|
636
|
-
$
|
|
637
|
-
$
|
|
638
|
-
$
|
|
621
|
+
$authors = isset( $attributes['authors'] ) ? $attributes['authors'] : array();
|
|
622
|
+
$categories = isset( $attributes['categories'] ) ? $attributes['categories'] : array();
|
|
623
|
+
$include_subcategories = isset( $attributes['includeSubcategories'] ) ? intval( $attributes['includeSubcategories'] ) : false;
|
|
624
|
+
$tags = isset( $attributes['tags'] ) ? $attributes['tags'] : array();
|
|
625
|
+
$custom_taxonomies = isset( $attributes['customTaxonomies'] ) ? $attributes['customTaxonomies'] : array();
|
|
626
|
+
$tag_exclusions = isset( $attributes['tagExclusions'] ) ? $attributes['tagExclusions'] : array();
|
|
627
|
+
$category_exclusions = isset( $attributes['categoryExclusions'] ) ? $attributes['categoryExclusions'] : array();
|
|
628
|
+
$custom_taxonomy_exclusions = isset( $attributes['customTaxonomyExclusions'] ) ? $attributes['customTaxonomyExclusions'] : array();
|
|
629
|
+
$specific_posts = isset( $attributes['specificPosts'] ) ? $attributes['specificPosts'] : array();
|
|
630
|
+
$posts_to_show = intval( $attributes['postsToShow'] );
|
|
631
|
+
$specific_mode = isset( $attributes['specificMode'] ) ? intval( $attributes['specificMode'] ) : false;
|
|
632
|
+
$args = array(
|
|
639
633
|
'post_type' => $post_type,
|
|
640
634
|
'post_status' => $included_post_statuses,
|
|
641
635
|
'suppress_filters' => false,
|
|
@@ -694,6 +688,17 @@ class Newspack_Blocks {
|
|
|
694
688
|
}
|
|
695
689
|
}
|
|
696
690
|
}
|
|
691
|
+
if ( $custom_taxonomy_exclusions && count( $custom_taxonomy_exclusions ) ) {
|
|
692
|
+
foreach ( $custom_taxonomy_exclusions as $exclusion ) {
|
|
693
|
+
$args['tax_query'][] = [
|
|
694
|
+
'field' => 'term_id',
|
|
695
|
+
'include_children' => false,
|
|
696
|
+
'operator' => 'NOT IN',
|
|
697
|
+
'taxonomy' => $exclusion['slug'],
|
|
698
|
+
'terms' => $exclusion['terms'],
|
|
699
|
+
];
|
|
700
|
+
}
|
|
701
|
+
}
|
|
697
702
|
|
|
698
703
|
$is_co_authors_plus_active = class_exists( 'CoAuthors_Guest_Authors' );
|
|
699
704
|
|
|
@@ -790,9 +795,9 @@ class Newspack_Blocks {
|
|
|
790
795
|
* The filter is called after the build_articles_query() function is called by a Newspack block to
|
|
791
796
|
* build the WP_Query arguments based on the given attributes and block requesting the query.
|
|
792
797
|
*
|
|
793
|
-
* @param array
|
|
794
|
-
* @param array
|
|
795
|
-
* @param string
|
|
798
|
+
* @param array $args WP_Query arguments as created by build_articles_query()
|
|
799
|
+
* @param array $attributes The attributes initial passed to build_articles_query()
|
|
800
|
+
* @param string $block_name The name of the requesting block to create the query args for
|
|
796
801
|
*/
|
|
797
802
|
return apply_filters( 'newspack_blocks_build_articles_query', $args, $attributes, $block_name );
|
|
798
803
|
}
|
|
@@ -1534,5 +1539,44 @@ class Newspack_Blocks {
|
|
|
1534
1539
|
],
|
|
1535
1540
|
];
|
|
1536
1541
|
}
|
|
1542
|
+
|
|
1543
|
+
/**
|
|
1544
|
+
* Get a formatted HTML string containing amount and frequency of a donation.
|
|
1545
|
+
*
|
|
1546
|
+
* @param float $amount Amount.
|
|
1547
|
+
* @param string $frequency Frequency.
|
|
1548
|
+
* @param bool $hide_once_label Whether to hide the "once" label.
|
|
1549
|
+
*
|
|
1550
|
+
* @return string
|
|
1551
|
+
*/
|
|
1552
|
+
public static function get_formatted_amount( $amount = 0, $frequency = 'day', $hide_once_label = false ) {
|
|
1553
|
+
if ( ! function_exists( 'wcs_price_string' ) ) {
|
|
1554
|
+
return \wc_price( $amount );
|
|
1555
|
+
}
|
|
1556
|
+
$price_args = [
|
|
1557
|
+
'recurring_amount' => $amount,
|
|
1558
|
+
'subscription_period' => 'once' === $frequency ? 'day' : $frequency,
|
|
1559
|
+
];
|
|
1560
|
+
$wc_formatted_amount = \wcs_price_string( $price_args );
|
|
1561
|
+
|
|
1562
|
+
// A '0' value means we want a placeholder string to replace in the editor.
|
|
1563
|
+
if ( 0 === $amount ) {
|
|
1564
|
+
preg_match( '/<\/span>(.*)<\/bdi>/', $wc_formatted_amount, $matches );
|
|
1565
|
+
if ( ! empty( $matches[1] ) ) {
|
|
1566
|
+
$wc_formatted_amount = str_replace( $matches[1], 'AMOUNT_PLACEHOLDER', $wc_formatted_amount );
|
|
1567
|
+
}
|
|
1568
|
+
}
|
|
1569
|
+
|
|
1570
|
+
// A 'day' frequency means we want a placeholder string to replace in the editor.
|
|
1571
|
+
if ( 'day' === $frequency ) {
|
|
1572
|
+
$wc_formatted_amount = preg_replace( '/ \/ ?.*/', 'FREQUENCY_PLACEHOLDER', $wc_formatted_amount );
|
|
1573
|
+
} elseif ( 'once' === $frequency ) {
|
|
1574
|
+
$once_label = $hide_once_label ? '' : __( ' once', 'newspack-blocks' );
|
|
1575
|
+
$wc_formatted_amount = preg_replace( '/ \/ ?.*/', $once_label, $wc_formatted_amount );
|
|
1576
|
+
}
|
|
1577
|
+
$wc_formatted_amount = str_replace( ' / ', __( ' per ', 'newspack-blocks' ), $wc_formatted_amount );
|
|
1578
|
+
|
|
1579
|
+
return '<span class="wpbnbd__tiers__amount__value">' . $wc_formatted_amount . '</span>';
|
|
1580
|
+
}
|
|
1537
1581
|
}
|
|
1538
1582
|
Newspack_Blocks::init();
|
|
@@ -751,30 +751,6 @@ msgstr ""
|
|
|
751
751
|
msgid "Paused"
|
|
752
752
|
msgstr ""
|
|
753
753
|
|
|
754
|
-
#: dist/donateStreamlined.js:1
|
|
755
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
756
|
-
msgid "Email address is invalid."
|
|
757
|
-
msgstr ""
|
|
758
|
-
|
|
759
|
-
#. Translators: %d is minimum donation amount set in Reader Revenue wizard or block attributes.
|
|
760
|
-
#: dist/donateStreamlined.js:1
|
|
761
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
762
|
-
msgid "Amount must be at least %d."
|
|
763
|
-
msgstr ""
|
|
764
|
-
|
|
765
|
-
#: dist/donateStreamlined.js:1
|
|
766
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
767
|
-
msgid "Full name should be provided."
|
|
768
|
-
msgstr ""
|
|
769
|
-
|
|
770
|
-
#. Translators: %s is the email address of the current user.
|
|
771
|
-
#: dist/donateStreamlined.js:1
|
|
772
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
773
|
-
msgid ""
|
|
774
|
-
"Your payment has been processed. Thank you for your contribution! You will "
|
|
775
|
-
"receive a confirmation email at %s."
|
|
776
|
-
msgstr ""
|
|
777
|
-
|
|
778
754
|
#: dist/editor.js:41 release/newspack-blocks/dist/editor.js:2541
|
|
779
755
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:105
|
|
780
756
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:109
|
|
@@ -1893,22 +1869,6 @@ msgstr ""
|
|
|
1893
1869
|
msgid "Remove Block"
|
|
1894
1870
|
msgstr ""
|
|
1895
1871
|
|
|
1896
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1897
|
-
msgid "Error loading the reCaptcha library."
|
|
1898
|
-
msgstr ""
|
|
1899
|
-
|
|
1900
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1901
|
-
msgid "Error processing captcha request."
|
|
1902
|
-
msgstr ""
|
|
1903
|
-
|
|
1904
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1905
|
-
msgid "Something went wrong with the payment. Please try again later."
|
|
1906
|
-
msgstr ""
|
|
1907
|
-
|
|
1908
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1909
|
-
msgid "Processing payment…"
|
|
1910
|
-
msgstr ""
|
|
1911
|
-
|
|
1912
1872
|
#: release/newspack-blocks/dist/editor.js:2541
|
|
1913
1873
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:224
|
|
1914
1874
|
#: src/blocks/author-list/edit.js:224
|
|
@@ -743,30 +743,6 @@ msgstr ""
|
|
|
743
743
|
msgid "Paused"
|
|
744
744
|
msgstr ""
|
|
745
745
|
|
|
746
|
-
#: dist/donateStreamlined.js:1
|
|
747
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
748
|
-
msgid "Email address is invalid."
|
|
749
|
-
msgstr ""
|
|
750
|
-
|
|
751
|
-
#. Translators: %d is minimum donation amount set in Reader Revenue wizard or block attributes.
|
|
752
|
-
#: dist/donateStreamlined.js:1
|
|
753
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
754
|
-
msgid "Amount must be at least %d."
|
|
755
|
-
msgstr ""
|
|
756
|
-
|
|
757
|
-
#: dist/donateStreamlined.js:1
|
|
758
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
759
|
-
msgid "Full name should be provided."
|
|
760
|
-
msgstr ""
|
|
761
|
-
|
|
762
|
-
#. Translators: %s is the email address of the current user.
|
|
763
|
-
#: dist/donateStreamlined.js:1
|
|
764
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
765
|
-
msgid ""
|
|
766
|
-
"Your payment has been processed. Thank you for your contribution! You will "
|
|
767
|
-
"receive a confirmation email at %s."
|
|
768
|
-
msgstr ""
|
|
769
|
-
|
|
770
746
|
#: dist/editor.js:41 release/newspack-blocks/dist/editor.js:2541
|
|
771
747
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:105
|
|
772
748
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:109
|
|
@@ -1885,22 +1861,6 @@ msgstr ""
|
|
|
1885
1861
|
msgid "Remove Block"
|
|
1886
1862
|
msgstr ""
|
|
1887
1863
|
|
|
1888
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1889
|
-
msgid "Error loading the reCaptcha library."
|
|
1890
|
-
msgstr ""
|
|
1891
|
-
|
|
1892
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1893
|
-
msgid "Error processing captcha request."
|
|
1894
|
-
msgstr ""
|
|
1895
|
-
|
|
1896
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1897
|
-
msgid "Something went wrong with the payment. Please try again later."
|
|
1898
|
-
msgstr ""
|
|
1899
|
-
|
|
1900
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1901
|
-
msgid "Processing payment…"
|
|
1902
|
-
msgstr ""
|
|
1903
|
-
|
|
1904
1864
|
#: release/newspack-blocks/dist/editor.js:2541
|
|
1905
1865
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:224
|
|
1906
1866
|
#: src/blocks/author-list/edit.js:224
|
|
@@ -742,30 +742,6 @@ msgstr ""
|
|
|
742
742
|
msgid "Paused"
|
|
743
743
|
msgstr ""
|
|
744
744
|
|
|
745
|
-
#: dist/donateStreamlined.js:1
|
|
746
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
747
|
-
msgid "Email address is invalid."
|
|
748
|
-
msgstr ""
|
|
749
|
-
|
|
750
|
-
#. Translators: %d is minimum donation amount set in Reader Revenue wizard or block attributes.
|
|
751
|
-
#: dist/donateStreamlined.js:1
|
|
752
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
753
|
-
msgid "Amount must be at least %d."
|
|
754
|
-
msgstr ""
|
|
755
|
-
|
|
756
|
-
#: dist/donateStreamlined.js:1
|
|
757
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
758
|
-
msgid "Full name should be provided."
|
|
759
|
-
msgstr ""
|
|
760
|
-
|
|
761
|
-
#. Translators: %s is the email address of the current user.
|
|
762
|
-
#: dist/donateStreamlined.js:1
|
|
763
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:72
|
|
764
|
-
msgid ""
|
|
765
|
-
"Your payment has been processed. Thank you for your contribution! You will "
|
|
766
|
-
"receive a confirmation email at %s."
|
|
767
|
-
msgstr ""
|
|
768
|
-
|
|
769
745
|
#: dist/editor.js:41 release/newspack-blocks/dist/editor.js:2541
|
|
770
746
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:105
|
|
771
747
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:109
|
|
@@ -1884,22 +1860,6 @@ msgstr ""
|
|
|
1884
1860
|
msgid "Remove Block"
|
|
1885
1861
|
msgstr ""
|
|
1886
1862
|
|
|
1887
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1888
|
-
msgid "Error loading the reCaptcha library."
|
|
1889
|
-
msgstr ""
|
|
1890
|
-
|
|
1891
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1892
|
-
msgid "Error processing captcha request."
|
|
1893
|
-
msgstr ""
|
|
1894
|
-
|
|
1895
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1896
|
-
msgid "Something went wrong with the payment. Please try again later."
|
|
1897
|
-
msgstr ""
|
|
1898
|
-
|
|
1899
|
-
#: release/newspack-blocks/dist/donateStreamlined.js:61
|
|
1900
|
-
msgid "Processing payment…"
|
|
1901
|
-
msgstr ""
|
|
1902
|
-
|
|
1903
1863
|
#: release/newspack-blocks/dist/editor.js:2541
|
|
1904
1864
|
#: release/newspack-blocks/src/blocks/author-list/edit.js:224
|
|
1905
1865
|
#: src/blocks/author-list/edit.js:224
|