@lowdefy/blocks-loaders 4.0.0-rc.9 → 4.0.0

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.
@@ -14,17 +14,17 @@
14
14
  limitations under the License.
15
15
  */ import React from 'react';
16
16
  import { blockDefaultProps } from '@lowdefy/block-utils';
17
- const ProgressBar = ({ blockId , methods , style , properties })=>{
18
- const { progress =30 , height =4 , transitionTime =1000 , // loaderSpeed = 500,
17
+ const ProgressBar = ({ blockId, methods, style, properties })=>{
18
+ const { progress = 30, height = 4, transitionTime = 1000, // loaderSpeed = 500,
19
19
  // waitingTime = 1000,
20
- shadow =true } = properties;
20
+ shadow = true } = properties;
21
21
  return /*#__PURE__*/ React.createElement("div", {
22
22
  id: blockId,
23
23
  className: methods.makeCssClass(style),
24
24
  style: {
25
- '--height': height + 'px',
26
- '--progress': progress + '%',
27
- '--transition': 'all ' + transitionTime + 'ms ease',
25
+ '--height': `${height}px`,
26
+ '--progress': `${progress}%`,
27
+ '--transition': `all ${transitionTime}ms ease`,
28
28
  '--opacity': progress < 100 ? 1 : 0
29
29
  }
30
30
  }, /*#__PURE__*/ React.createElement("div", {
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -14,12 +14,12 @@
14
14
  limitations under the License.
15
15
  */ import React from 'react';
16
16
  import { blockDefaultProps } from '@lowdefy/block-utils';
17
- const Skeleton = ({ properties , methods })=>{
17
+ const Skeleton = ({ properties, methods })=>{
18
18
  return /*#__PURE__*/ React.createElement("div", {
19
19
  className: 'skeleton ' + methods.makeCssClass(properties.style),
20
20
  style: {
21
- width: properties.width || '100%',
22
- height: properties.height || '100%'
21
+ width: properties.width ?? '100%',
22
+ height: properties.height ?? '100%'
23
23
  }
24
24
  });
25
25
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -16,8 +16,8 @@
16
16
  import { type } from '@lowdefy/helpers';
17
17
  import { blockDefaultProps } from '@lowdefy/block-utils';
18
18
  import Skeleton from '../Skeleton/Skeleton.js';
19
- const SkeletonAvatar = ({ properties , methods })=>{
20
- let size = properties.size || 32;
19
+ const SkeletonAvatar = ({ properties, methods })=>{
20
+ let size = properties.size ?? 32;
21
21
  if (type.isString(size)) {
22
22
  switch(properties.size){
23
23
  case 'small':
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15
15
  */ import React from 'react';
16
16
  import { blockDefaultProps } from '@lowdefy/block-utils';
17
17
  import Skeleton from '../Skeleton/Skeleton.js';
18
- const SkeletonButton = ({ properties , methods })=>{
18
+ const SkeletonButton = ({ properties, methods })=>{
19
19
  let height;
20
20
  switch(properties.size){
21
21
  case 'small':
@@ -36,8 +36,8 @@ const SkeletonButton = ({ properties , methods })=>{
36
36
  },
37
37
  ...properties.style || {}
38
38
  },
39
- width: properties.width || '100%',
40
- height: height
39
+ width: properties.width ?? '100%',
40
+ height
41
41
  }
42
42
  });
43
43
  };
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -15,7 +15,7 @@
15
15
  */ import React from 'react';
16
16
  import { blockDefaultProps } from '@lowdefy/block-utils';
17
17
  import Skeleton from '../Skeleton/Skeleton.js';
18
- const SkeletonInput = ({ properties , methods })=>{
18
+ const SkeletonInput = ({ properties, methods })=>{
19
19
  let inputHeight;
20
20
  switch(properties.size){
21
21
  case 'small':
@@ -30,8 +30,8 @@ const SkeletonInput = ({ properties , methods })=>{
30
30
  return /*#__PURE__*/ React.createElement("div", null, properties.label !== false && /*#__PURE__*/ React.createElement(Skeleton, {
31
31
  methods: methods,
32
32
  properties: {
33
- width: properties.labelWidth || properties.width || '30%',
34
- height: properties.labelHeight || 20,
33
+ width: properties.labelWidth ?? properties.width ?? '30%',
34
+ height: properties.labelHeight ?? 20,
35
35
  style: {
36
36
  ...{
37
37
  marginBottom: 10
@@ -42,8 +42,8 @@ const SkeletonInput = ({ properties , methods })=>{
42
42
  }), /*#__PURE__*/ React.createElement(Skeleton, {
43
43
  methods: methods,
44
44
  properties: {
45
- width: properties.width || '100%',
46
- height: properties.inputHeight || inputHeight,
45
+ width: properties.width ?? '100%',
46
+ height: properties.inputHeight ?? inputHeight,
47
47
  style: properties.inputStyle || {}
48
48
  }
49
49
  }));
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -15,13 +15,13 @@
15
15
  */ import React from 'react';
16
16
  import { blockDefaultProps } from '@lowdefy/block-utils';
17
17
  import Skeleton from '../Skeleton/Skeleton.js';
18
- const SkeletonParagraph = ({ properties , methods })=>{
18
+ const SkeletonParagraph = ({ properties, methods })=>{
19
19
  const lines = [
20
- ...Array(properties.lines || 4).keys()
20
+ ...Array(properties.lines ?? 4).keys()
21
21
  ];
22
22
  return /*#__PURE__*/ React.createElement("div", {
23
23
  style: {
24
- width: properties.width || '100%'
24
+ width: properties.width ?? '100%'
25
25
  }
26
26
  }, lines.map((key)=>/*#__PURE__*/ React.createElement(Skeleton, {
27
27
  key: key,
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -15,8 +15,8 @@
15
15
  */ import React from 'react';
16
16
  import { type } from '@lowdefy/helpers';
17
17
  import { blockDefaultProps } from '@lowdefy/block-utils';
18
- const Spinner = ({ properties , methods })=>{
19
- let size = properties.size || 20;
18
+ const Spinner = ({ properties, methods })=>{
19
+ let size = properties.size ?? 20;
20
20
  if (type.isString(size)) {
21
21
  switch(properties.size){
22
22
  case 'small':
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/blocks.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
package/dist/types.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable import/namespace */ /*
2
- Copyright 2020-2023 Lowdefy, Inc
2
+ Copyright 2020-2024 Lowdefy, Inc
3
3
 
4
4
  Licensed under the Apache License, Version 2.0 (the "License");
5
5
  you may not use this file except in compliance with the License.
@@ -16,8 +16,8 @@
16
16
  const icons = {};
17
17
  const styles = {};
18
18
  Object.keys(blocks).forEach((block)=>{
19
- icons[block] = blocks[block].meta.icons || [];
20
- styles[block] = blocks[block].meta.styles || [];
19
+ icons[block] = blocks[block].meta.icons ?? [];
20
+ styles[block] = blocks[block].meta.styles ?? [];
21
21
  });
22
22
  export default {
23
23
  blocks: Object.keys(blocks),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lowdefy/blocks-loaders",
3
- "version": "4.0.0-rc.9",
3
+ "version": "4.0.0",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Lowdefy loader blocks.",
6
6
  "homepage": "https://lowdefy.com",
@@ -39,36 +39,34 @@
39
39
  "files": [
40
40
  "dist/*"
41
41
  ],
42
- "scripts": {
43
- "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
44
- "clean": "rm -rf dist",
45
- "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
46
- "prepublishOnly": "pnpm build",
47
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
48
- },
49
42
  "dependencies": {
50
- "@lowdefy/block-utils": "4.0.0-rc.9",
51
- "@lowdefy/helpers": "4.0.0-rc.9",
43
+ "@lowdefy/block-utils": "4.0.0",
44
+ "@lowdefy/helpers": "4.0.0",
52
45
  "react": "18.2.0",
53
46
  "react-dom": "18.2.0"
54
47
  },
55
48
  "devDependencies": {
56
49
  "@emotion/jest": "11.10.5",
57
- "@lowdefy/block-dev": "4.0.0-rc.9",
58
- "@lowdefy/jest-yaml-transform": "4.0.0-rc.9",
59
- "@swc/cli": "0.1.59",
60
- "@swc/core": "1.3.24",
61
- "@swc/jest": "0.2.24",
50
+ "@lowdefy/block-dev": "4.0.0",
51
+ "@lowdefy/jest-yaml-transform": "4.0.0",
52
+ "@swc/cli": "0.1.63",
53
+ "@swc/core": "1.3.99",
54
+ "@swc/jest": "0.2.29",
62
55
  "@testing-library/dom": "8.19.1",
63
56
  "@testing-library/react": "13.4.0",
64
57
  "@testing-library/user-event": "14.4.3",
65
58
  "copyfiles": "2.4.1",
66
- "jest": "28.1.0",
67
- "jest-environment-jsdom": "28.1.0",
59
+ "jest": "28.1.3",
60
+ "jest-environment-jsdom": "28.1.3",
68
61
  "jest-serializer-html": "7.1.0"
69
62
  },
70
63
  "publishConfig": {
71
64
  "access": "public"
72
65
  },
73
- "gitHead": "d20e6ac424643feca527a732dc2b0710713c8243"
74
- }
66
+ "scripts": {
67
+ "build": "swc src --out-dir dist --config-file ../../../../.swcrc --delete-dir-on-start && pnpm copyfiles",
68
+ "clean": "rm -rf dist",
69
+ "copyfiles": "copyfiles -u 1 \"./src/**/*\" dist -e \"./src/**/*.js\" -e \"./src/**/*.yaml\" -e \"./src/**/*.snap\"",
70
+ "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js"
71
+ }
72
+ }