From 816b9bb0b9d05380cfe099fe2e43c524e765460c Mon Sep 17 00:00:00 2001 From: Nikita Date: Thu, 28 Nov 2024 21:02:19 +0300 Subject: [PATCH] fix some components deprecated notices --- assets/admin/templates/index.js | 6 +++++- assets/admin/tools/tools.js | 6 +++++- assets/components/block-slug/editor.scss | 6 ++++-- assets/components/block-slug/index.js | 8 +++++++- assets/components/icon-picker/index.js | 9 ++++++++- assets/components/pro-notice/index.js | 6 +++++- assets/components/tabs/index.js | 2 +- assets/editor-constructor/boxes/code/index.js | 12 +++++++++--- assets/editor-constructor/boxes/condition/index.js | 1 + assets/editor-constructor/boxes/general/index.js | 3 +++ .../settings-rows/default.js | 2 ++ .../selected-control-settings/settings-rows/group.js | 3 +++ .../selected-control-settings/settings-rows/help.js | 1 + .../settings-rows/hide-if-not-selected.js | 2 ++ .../selected-control-settings/settings-rows/label.js | 2 ++ .../selected-control-settings/settings-rows/name.js | 2 ++ .../settings-rows/placement.js | 1 + .../settings-rows/required.js | 2 ++ .../settings-rows/save-in-meta.js | 4 ++++ .../settings-rows/translate.js | 2 ++ .../selected-control-settings/settings-rows/type.js | 3 +++ .../selected-control-settings/settings-rows/width.js | 1 + .../boxes/supports-ghost-kit/index.js | 12 ++++++++++-- assets/editor-constructor/boxes/supports/index.js | 7 +++++++ controls/checkbox/script.js | 7 +++++++ controls/color/script.js | 5 +++++ controls/email/script.js | 6 ++++++ controls/gallery/script.js | 2 ++ controls/image/image-control.js | 7 ++++++- controls/image/script.js | 3 +++ controls/number/script.js | 10 ++++++++++ controls/password/script.js | 6 ++++++ controls/radio/script.js | 3 +++ controls/range/script.js | 8 ++++++++ controls/repeater/script.js | 10 ++++++++++ controls/select/component-choices.js | 4 +++- controls/select/script.js | 5 +++++ controls/text/script.js | 6 ++++++ controls/textarea/script.js | 5 +++++ controls/toggle/script.js | 4 ++++ package-lock.json | 8 ++++---- package.json | 2 +- 42 files changed, 184 insertions(+), 20 deletions(-) diff --git a/assets/admin/templates/index.js b/assets/admin/templates/index.js index 8d2f084b5..b08b15d1f 100644 --- a/assets/admin/templates/index.js +++ b/assets/admin/templates/index.js @@ -14,7 +14,7 @@ import { useSelect } from '@wordpress/data'; import { useEntityProp } from '@wordpress/core-data'; import { PanelRow, SelectControl } from '@wordpress/components'; import { useDebounce } from '@wordpress/compose'; -import { PluginDocumentSettingPanel } from '@wordpress/edit-post'; +import { PluginDocumentSettingPanel } from '@wordpress/editor'; /** * Internal dependencies @@ -182,6 +182,8 @@ function UpdateEditor() { onChange={(value) => { updateMeta('_lzb_template_post_types', value); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -194,6 +196,8 @@ function UpdateEditor() { onChange={(value) => { updateMeta('_lzb_template_lock', value); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/assets/admin/tools/tools.js b/assets/admin/tools/tools.js index 374d2bc02..e11c518d9 100644 --- a/assets/admin/tools/tools.js +++ b/assets/admin/tools/tools.js @@ -112,7 +112,7 @@ export default function Templates() { return ( <>
- + {data[type].map((item) => { const isSelected = @@ -215,6 +216,7 @@ export default function Templates() { setDisabledTemplates(newDisabled); } }} + __nextHasNoMarginBottom /> ); })} @@ -228,6 +230,8 @@ export default function Templates() { className="lzb-export-code" readOnly value={getPHPStringCode(type)} + __next40pxDefaultSize + __nextHasNoMarginBottom />
diff --git a/assets/components/block-slug/editor.scss b/assets/components/block-slug/editor.scss index 275f10b74..8b74d0deb 100644 --- a/assets/components/block-slug/editor.scss +++ b/assets/components/block-slug/editor.scss @@ -13,7 +13,7 @@ white-space: nowrap; padding: 6px 8px; padding-right: 10px; - height: 32px; + height: 40px; border: 1px solid #949494; line-height: normal; color: $gray-800; @@ -39,7 +39,9 @@ flex: 1; margin-bottom: 0 !important; - input { + input.components-text-control__input { + padding-left: 5px; + padding-right: 5px; margin-left: 0; border-left: none; border-top-left-radius: 0; diff --git a/assets/components/block-slug/index.js b/assets/components/block-slug/index.js index 38baec65f..0dc58f099 100644 --- a/assets/components/block-slug/index.js +++ b/assets/components/block-slug/index.js @@ -17,7 +17,11 @@ import { __ } from '@wordpress/i18n'; export default function BlockSlug(props) { return ( - +
diff --git a/assets/components/icon-picker/index.js b/assets/components/icon-picker/index.js index 2f9b25336..f5e84fa3d 100644 --- a/assets/components/icon-picker/index.js +++ b/assets/components/icon-picker/index.js @@ -88,6 +88,8 @@ function IconPickerDropdown(props) { onChange={(searchVal) => setSearch(searchVal)} placeholder={__('Type to Search…', 'lazy-blocks')} autoComplete="off" + __next40pxDefaultSize + __nextHasNoMarginBottom /> ), @@ -297,7 +299,12 @@ function IconPickerDropdown(props) { ); return label ? ( - + {dropdown} ) : ( diff --git a/assets/components/pro-notice/index.js b/assets/components/pro-notice/index.js index 5ac98d3ba..00de74735 100644 --- a/assets/components/pro-notice/index.js +++ b/assets/components/pro-notice/index.js @@ -22,6 +22,7 @@ export default function ProNotice() { id="lazyblocks-pro-notice" label={__('Lazy Blocks Pro', 'lazy-blocks')} className="lazyblocks-component-pro-notice" + __nextHasNoMarginBottom >
  • - {__('Custom Slugs and Collections', 'lazy-blocks')} + {__( + 'Custom block collections and slug namespaces', + 'lazy-blocks' + )}
  • {__('Controls Conditional Logic', 'lazy-blocks')} diff --git a/assets/components/tabs/index.js b/assets/components/tabs/index.js index 8854d70b1..c406154ac 100644 --- a/assets/components/tabs/index.js +++ b/assets/components/tabs/index.js @@ -10,7 +10,7 @@ import { BaseControl, TabPanel } from '@wordpress/components'; export default function Tabs({ tabs, children }) { return ( - + {children} diff --git a/assets/editor-constructor/boxes/code/index.js b/assets/editor-constructor/boxes/code/index.js index bafb0acbe..352480ce6 100644 --- a/assets/editor-constructor/boxes/code/index.js +++ b/assets/editor-constructor/boxes/code/index.js @@ -101,6 +101,8 @@ export default function CustomCodeSettings(props) { value={data.code_output_method || 'html'} onChange={(value) => updateData({ code_output_method: value })} isAdaptiveWidth + __next40pxDefaultSize + __nextHasNoMarginBottom > - + {tabs.length > 1 ? ( - + {!showInfo ? (
@@ -158,6 +162,7 @@ addFilter( checked: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom />
@@ -181,6 +186,7 @@ addFilter( multiple: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -223,6 +229,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/color/script.js b/controls/color/script.js index be125635d..a2db443a2 100644 --- a/controls/color/script.js +++ b/controls/color/script.js @@ -75,6 +75,8 @@ addFilter( onChange={(value) => updateData({ alongside_text: value }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -93,6 +95,7 @@ addFilter( onChange={(value) => updateData({ alpha: value ? 'true' : 'false' }) } + __nextHasNoMarginBottom /> @@ -142,6 +146,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/email/script.js b/controls/email/script.js index 5b131c1e8..a73016136 100644 --- a/controls/email/script.js +++ b/controls/email/script.js @@ -28,6 +28,8 @@ addFilter('lzb.editor.control.email.render', 'lzb.editor', (render, props) => { placeholder={props.data.placeholder} value={props.getValue()} onChange={props.onChange} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -73,6 +75,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -93,6 +97,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/gallery/script.js b/controls/gallery/script.js index a390c2905..b8d405baa 100644 --- a/controls/gallery/script.js +++ b/controls/gallery/script.js @@ -127,6 +127,8 @@ function AdditionalAttributes(props) { })} value={data.preview_size || 'medium'} onChange={(value) => updateData({ preview_size: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); diff --git a/controls/image/image-control.js b/controls/image/image-control.js index 31708cf02..04e7e8c4f 100644 --- a/controls/image/image-control.js +++ b/controls/image/image-control.js @@ -71,7 +71,12 @@ function ImageControl(props) { } return ( - +
{!value || !Object.keys(value).length ? ( @@ -151,6 +152,8 @@ function AdditionalAttributes(props) { })} value={data.preview_size || 'medium'} onChange={(value) => updateData({ preview_size: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/number/script.js b/controls/number/script.js index a69acba56..bf4b49da1 100644 --- a/controls/number/script.js +++ b/controls/number/script.js @@ -33,6 +33,8 @@ addFilter('lzb.editor.control.number.render', 'lzb.editor', (render, props) => { onChange={(val) => { props.onChange(parseFloat(val)); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -95,6 +97,8 @@ addFilter( step={data.step} value={data.min} onChange={(value) => updateData({ min: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -104,6 +108,8 @@ addFilter( step={data.step} value={data.max} onChange={(value) => updateData({ max: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -112,6 +118,8 @@ addFilter( type="number" value={data.step} onChange={(value) => updateData({ step: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -119,6 +127,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/password/script.js b/controls/password/script.js index 7a4966e41..9b6070241 100644 --- a/controls/password/script.js +++ b/controls/password/script.js @@ -31,6 +31,8 @@ addFilter( placeholder={props.data.placeholder} value={props.getValue()} onChange={props.onChange} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -53,6 +55,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -73,6 +77,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/radio/script.js b/controls/radio/script.js index 477425c8b..7caa08e5c 100644 --- a/controls/radio/script.js +++ b/controls/radio/script.js @@ -23,6 +23,7 @@ addFilter('lzb.editor.control.radio.render', 'lzb.editor', (render, props) => ( selected={props.getValue()} options={props.data.choices} onChange={props.onChange} + __nextHasNoMarginBottom /> )); @@ -88,6 +89,7 @@ addFilter( allow_null: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -119,6 +121,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/range/script.js b/controls/range/script.js index fe2ce839b..5986393a6 100644 --- a/controls/range/script.js +++ b/controls/range/script.js @@ -25,6 +25,8 @@ addFilter('lzb.editor.control.range.render', 'lzb.editor', (render, props) => ( onChange={(val) => { props.onChange(parseFloat(val)); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> )); @@ -47,6 +49,8 @@ addFilter( step={data.step} value={data.min} onChange={(value) => updateData({ min: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -56,6 +60,8 @@ addFilter( step={data.step} value={data.max} onChange={(value) => updateData({ max: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -64,6 +70,8 @@ addFilter( type="number" value={data.step} onChange={(value) => updateData({ step: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/repeater/script.js b/controls/repeater/script.js index 106abcdc5..cb9b19871 100644 --- a/controls/repeater/script.js +++ b/controls/repeater/script.js @@ -281,6 +281,8 @@ addFilter( )} value={data.rows_label} onChange={(value) => updateData({ rows_label: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -291,6 +293,8 @@ addFilter( onChange={(value) => updateData({ rows_add_button_label: value }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -301,6 +305,8 @@ addFilter( min={0} value={data.rows_min} onChange={(value) => updateData({ rows_min: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -311,6 +317,8 @@ addFilter( min={0} value={data.rows_max} onChange={(value) => updateData({ rows_max: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -327,6 +335,7 @@ addFilter( rows_collapsible: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> {data.rows_collapsible === 'true' ? ( ) : ( '' diff --git a/controls/select/component-choices.js b/controls/select/component-choices.js index 7516099cf..5519edb2f 100644 --- a/controls/select/component-choices.js +++ b/controls/select/component-choices.js @@ -70,6 +70,8 @@ const SortableItem = function (props) { } // eslint-disable-next-line jsx-a11y/no-autofocus autoFocus={focusInput && i === 0} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); })} @@ -236,7 +238,7 @@ export default function ComponentChoices(props) { } return ( - +
{items.length ? (
diff --git a/controls/select/script.js b/controls/select/script.js index 829157873..8e65e6409 100644 --- a/controls/select/script.js +++ b/controls/select/script.js @@ -46,6 +46,8 @@ addFilter('lzb.editor.control.select.render', 'lzb.editor', (render, props) => { onChange={(val) => { props.onChange(val); }} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -112,6 +114,7 @@ addFilter( allow_null: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -133,6 +136,7 @@ addFilter( multiple: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> @@ -164,6 +168,7 @@ addFilter( onChange={(value) => updateData({ output_format: value }) } + __nextHasNoMarginBottom /> diff --git a/controls/text/script.js b/controls/text/script.js index fdc5e44c7..7f0ff635a 100644 --- a/controls/text/script.js +++ b/controls/text/script.js @@ -27,6 +27,8 @@ addFilter('lzb.editor.control.text.render', 'lzb.editor', (render, props) => { placeholder={props.data.placeholder} value={props.getValue()} onChange={props.onChange} + __next40pxDefaultSize + __nextHasNoMarginBottom /> ); @@ -78,6 +80,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -98,6 +102,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/textarea/script.js b/controls/textarea/script.js index 9ca393a5f..8af46fd3c 100644 --- a/controls/textarea/script.js +++ b/controls/textarea/script.js @@ -30,6 +30,7 @@ addFilter( value={props.getValue()} placeholder={props.data.placeholder} onChange={props.onChange} + __nextHasNoMarginBottom /> ); @@ -52,6 +53,8 @@ addFilter( label={__('Placeholder', 'lazy-blocks')} value={data.placeholder} onChange={(value) => updateData({ placeholder: value })} + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -72,6 +75,8 @@ addFilter( onChange={(value) => updateData({ characters_limit: `${value}` }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> diff --git a/controls/toggle/script.js b/controls/toggle/script.js index 9696c60be..440326cd0 100644 --- a/controls/toggle/script.js +++ b/controls/toggle/script.js @@ -20,6 +20,7 @@ addFilter('lzb.editor.control.toggle.render', 'lzb.editor', (render, props) => ( label={props.data.alongside_text} checked={!!props.getValue()} onChange={props.onChange} + __nextHasNoMarginBottom /> )); @@ -46,6 +47,8 @@ addFilter( onChange={(value) => updateData({ alongside_text: value }) } + __next40pxDefaultSize + __nextHasNoMarginBottom /> @@ -62,6 +65,7 @@ addFilter( checked: value ? 'true' : 'false', }) } + __nextHasNoMarginBottom /> diff --git a/package-lock.json b/package-lock.json index fb4b81d7f..b95ecba29 100644 --- a/package-lock.json +++ b/package-lock.json @@ -20,7 +20,7 @@ "ace-builds": "^1.22.0", "array-move": "^4.0.0", "classnames": "^2.3.2", - "gutenberg-react-select-styles": "0.0.2", + "gutenberg-react-select-styles": "^0.0.3", "html-react-parser": "^4.0.0", "json5": "^2.2.3", "react-ace": "^10.1.0", @@ -13480,9 +13480,9 @@ } }, "node_modules/gutenberg-react-select-styles": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/gutenberg-react-select-styles/-/gutenberg-react-select-styles-0.0.2.tgz", - "integrity": "sha512-Mu5APgD1WYZXx9IWrFUAkIqqPqRXYN0FarWUrAMDK8cMVZHzYFz0VMOxgE2sYleGEDmGcEIyYgDV9ZrISDeQ2w==" + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/gutenberg-react-select-styles/-/gutenberg-react-select-styles-0.0.3.tgz", + "integrity": "sha512-0RJNq9UWmLI76s0Jk3/ye2wbxBmedx2K8dXMyYEuvXzMK2UxZhy30ce4gw12zTHnFWnJ/7uXfHE8zX9ejLmGgA==" }, "node_modules/gzip-size": { "version": "6.0.0", diff --git a/package.json b/package.json index 60ee93c65..f846197a0 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "ace-builds": "^1.22.0", "array-move": "^4.0.0", "classnames": "^2.3.2", - "gutenberg-react-select-styles": "0.0.2", + "gutenberg-react-select-styles": "^0.0.3", "html-react-parser": "^4.0.0", "json5": "^2.2.3", "react-ace": "^10.1.0",