@subiz/widget-v4 4.0.80 → 4.0.81

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.
@@ -1012,6 +1012,16 @@ class Popup extends _common.Com {
1012
1012
  if (com.type === 'image') return this.renderImageComponent(com, i);
1013
1013
  });
1014
1014
 
1015
+ let formComponents = _index.default.filter(page.components, com => com.type !== 'image');
1016
+
1017
+ if (!formComponents.length) {
1018
+ formcss.background = 'transparent';
1019
+ formcss.padding_top = '0';
1020
+ formcss.padding_bottom = '0';
1021
+ formcss.padding_left = '0';
1022
+ formcss.padding_right = '0';
1023
+ }
1024
+
1015
1025
  return (0, _preact.h)("div", {
1016
1026
  class: "overlay",
1017
1027
  style: overlaystyle
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@subiz/widget-v4",
3
- "version": "4.0.80",
3
+ "version": "4.0.81",
4
4
  "main": "./compiled_src/lib.js",
5
5
  "scripts": {
6
6
  "dev": "npx webpack serve --config webpack.dev.js",
@@ -918,6 +918,17 @@ export default class Popup extends Com {
918
918
  let $imgs = sb.map(page.components, (com, i) => {
919
919
  if (com.type === 'image') return this.renderImageComponent(com, i)
920
920
  })
921
+
922
+ // fix bug image only popup has white block
923
+ let formComponents = sb.filter(page.components, (com) => com.type !== 'image')
924
+ if (!formComponents.length) {
925
+ formcss.background = 'transparent'
926
+ formcss.padding_top = '0'
927
+ formcss.padding_bottom = '0'
928
+ formcss.padding_left = '0'
929
+ formcss.padding_right = '0'
930
+ }
931
+
921
932
  return (
922
933
  <div class='overlay' style={overlaystyle}>
923
934
  <div class={animation} style={this.js2css(containercss)} onClick={(e) => e.stopPropagation()}>