Skip to content

Commit caf905c

Browse files
authored
Merge pull request #3863 from reduxframework/update-extendify-ucs4oe4
Update Extendify Library
2 parents 36a656f + 67eabc6 commit caf905c

File tree

5 files changed

+19
-9
lines changed

5 files changed

+19
-9
lines changed

extendify-sdk/public/build/extendify.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

extendify-sdk/readme.txt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: extendify, richtabor, kbat82, clubkert, arturgrabo
33
Tags: page builder, editor, patterns, drag-and-drop, blocks, visual editor, wysiwyg, design, website builder, landing page builder, front-end builder
44
Requires at least: 5.4
55
Tested up to: 5.9.0
6-
Stable tag: 0.3.0
6+
Stable tag: 0.3.1
77
Requires PHP: 5.6
88
License: GPLv2
99
License URI: https://www.gnu.org/licenses/gpl-2.0.html
@@ -120,6 +120,11 @@ Nope! Extendify imports lightweight block-based content that is served directly
120120

121121
== Changelog ==
122122

123+
= 0.3.1 - 2022-01-26 =
124+
- Add singular value when import count is 1
125+
- Remove destructuring within block filters
126+
- Fix typo in setTimeout function name
127+
123128
= 0.3.0 - 2022-01-25 =
124129
- Improve layout rendering performance
125130
- Improve utility styles to better support WordPress 5.9

extendify-sdk/src/components/ImportCounter.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import classnames from 'classnames'
22
import { Icon } from '@wordpress/icons'
3-
import { __, sprintf } from '@wordpress/i18n'
3+
import { __, _n, sprintf } from '@wordpress/i18n'
44
import { useEffect } from '@wordpress/element'
55
import { alert, download } from './icons/'
66
import { useUserStore } from '../state/User'
@@ -10,7 +10,8 @@ import { growthArrow } from './icons'
1010
export const ImportCounter = () => {
1111
const remainingImports = useUserStore((state) => state.remainingImports)
1212
const allowedImports = useUserStore((state) => state.allowedImports)
13-
const status = remainingImports() > 0 ? 'has-imports' : 'no-imports'
13+
const count = remainingImports()
14+
const status = count > 0 ? 'has-imports' : 'no-imports'
1415
const backgroundColor =
1516
status === 'has-imports'
1617
? 'bg-extendify-main hover:bg-extendify-main-dark'
@@ -51,7 +52,10 @@ export const ImportCounter = () => {
5152
<div className="flex items-center space-x-2 no-underline text-xs">
5253
<Icon icon={icon} size={14} />
5354
<span>
54-
{sprintf(__('%s Imports', 'extendify'), remainingImports())}
55+
{sprintf(
56+
_n('%s Import', '%s Imports', count, 'extendify'),
57+
count,
58+
)}
5559
</span>
5660
</div>
5761
<span className="text-white text-sm no-underline font-medium outline-none flex items-center">

extendify-sdk/src/components/ImportTemplateBlock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ export function ImportTemplateBlock({ template }) {
108108
frame.style.height = height + 'px'
109109
},
110110
)
111-
const id = window.setTimout(() => {
111+
const id = window.setTimeout(() => {
112112
frame.style.height = height + 'px'
113113
}, 1000)
114114
timeouts.push(id)

extendify-sdk/src/utility-control/index.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ function addEditProps(settings) {
3838
// Create HOC to add Extendify Utility to Advanced Panel of block.
3939
const utilityClassEdit = createHigherOrderComponent((BlockEdit) => {
4040
return function editPanel(props) {
41-
const { extUtilities: classes } = props.attributes
41+
const classes = props?.attributes?.extUtilities ?? []
4242
const suggestionList = suggestions.suggestions.map((s) => {
4343
// Remove all extra // and . from classnames
4444
return s.replace('.', '').replace(new RegExp('\\\\', 'g'), '')
@@ -68,8 +68,9 @@ const utilityClassEdit = createHigherOrderComponent((BlockEdit) => {
6868
}, 'utilityClassEdit')
6969

7070
function addSaveProps(saveElementProps, blockType, attributes) {
71-
let { className: generatedClasses } = saveElementProps
72-
let { extUtilities: classes, className: additionalClasses } = attributes
71+
const generatedClasses = saveElementProps?.className ?? []
72+
const classes = attributes?.extUtilities ?? []
73+
const additionalClasses = attributes?.className ?? []
7374

7475
if (!classes || !Object.keys(classes).length) {
7576
return saveElementProps

0 commit comments

Comments
 (0)