@elementor/editor-canvas 4.3.0-976 → 4.3.0-977

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/dist/index.js CHANGED
@@ -2047,7 +2047,8 @@ function blockFormFieldCreate(args) {
2047
2047
  if (!elementType || !FORM_FIELD_ELEMENT_TYPES.has(elementType)) {
2048
2048
  return false;
2049
2049
  }
2050
- if (!isWithinForm(args.container)) {
2050
+ const containers = args.containers ?? [args.container];
2051
+ if (containers.some((container) => !isWithinForm(container))) {
2051
2052
  handleBlockedFormField();
2052
2053
  return true;
2053
2054
  }
package/dist/index.mjs CHANGED
@@ -2001,7 +2001,8 @@ function blockFormFieldCreate(args) {
2001
2001
  if (!elementType || !FORM_FIELD_ELEMENT_TYPES.has(elementType)) {
2002
2002
  return false;
2003
2003
  }
2004
- if (!isWithinForm(args.container)) {
2004
+ const containers = args.containers ?? [args.container];
2005
+ if (containers.some((container) => !isWithinForm(container))) {
2005
2006
  handleBlockedFormField();
2006
2007
  return true;
2007
2008
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@elementor/editor-canvas",
3
3
  "description": "Elementor Editor Canvas",
4
- "version": "4.3.0-976",
4
+ "version": "4.3.0-977",
5
5
  "private": false,
6
6
  "author": "Elementor Team",
7
7
  "homepage": "https://elementor.com/",
@@ -37,26 +37,26 @@
37
37
  "react-dom": "^18.3.1"
38
38
  },
39
39
  "dependencies": {
40
- "@elementor/editor": "4.3.0-976",
41
- "@elementor/editor-controls": "4.3.0-976",
42
- "@elementor/editor-documents": "4.3.0-976",
43
- "@elementor/editor-elements": "4.3.0-976",
44
- "@elementor/editor-interactions": "4.3.0-976",
45
- "@elementor/editor-mcp": "4.3.0-976",
46
- "@elementor/editor-notifications": "4.3.0-976",
47
- "@elementor/editor-props": "4.3.0-976",
48
- "@elementor/editor-responsive": "4.3.0-976",
49
- "@elementor/editor-styles": "4.3.0-976",
50
- "@elementor/editor-styles-repository": "4.3.0-976",
51
- "@elementor/editor-ui": "4.3.0-976",
52
- "@elementor/editor-v1-adapters": "4.3.0-976",
53
- "@elementor/events": "4.3.0-976",
54
- "@elementor/http-client": "4.3.0-976",
55
- "@elementor/schema": "4.3.0-976",
56
- "@elementor/twing": "4.3.0-976",
40
+ "@elementor/editor": "4.3.0-977",
41
+ "@elementor/editor-controls": "4.3.0-977",
42
+ "@elementor/editor-documents": "4.3.0-977",
43
+ "@elementor/editor-elements": "4.3.0-977",
44
+ "@elementor/editor-interactions": "4.3.0-977",
45
+ "@elementor/editor-mcp": "4.3.0-977",
46
+ "@elementor/editor-notifications": "4.3.0-977",
47
+ "@elementor/editor-props": "4.3.0-977",
48
+ "@elementor/editor-responsive": "4.3.0-977",
49
+ "@elementor/editor-styles": "4.3.0-977",
50
+ "@elementor/editor-styles-repository": "4.3.0-977",
51
+ "@elementor/editor-ui": "4.3.0-977",
52
+ "@elementor/editor-v1-adapters": "4.3.0-977",
53
+ "@elementor/events": "4.3.0-977",
54
+ "@elementor/http-client": "4.3.0-977",
55
+ "@elementor/schema": "4.3.0-977",
56
+ "@elementor/twing": "4.3.0-977",
57
57
  "@elementor/ui": "1.37.5",
58
- "@elementor/utils": "4.3.0-976",
59
- "@elementor/wp-media": "4.3.0-976",
58
+ "@elementor/utils": "4.3.0-977",
59
+ "@elementor/wp-media": "4.3.0-977",
60
60
  "@floating-ui/react": "^0.27.5",
61
61
  "@wordpress/i18n": "^5.13.0",
62
62
  "dompurify": "^3.2.6"
@@ -48,7 +48,9 @@ function blockFormFieldCreate( args: CreateArgs ): boolean {
48
48
  return false;
49
49
  }
50
50
 
51
- if ( ! isWithinForm( args.container ) ) {
51
+ const containers = args.containers ?? [ args.container ];
52
+
53
+ if ( containers.some( ( container ) => ! isWithinForm( container ) ) ) {
52
54
  handleBlockedFormField();
53
55
 
54
56
  return true;
@@ -7,6 +7,7 @@ type Model = {
7
7
 
8
8
  export type CreateArgs = {
9
9
  container?: V1Element;
10
+ containers?: V1Element[];
10
11
  model?: Model;
11
12
  };
12
13