@uipath/apollo-react 3.36.1 → 3.37.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.
@@ -25,29 +25,37 @@ var __webpack_exports__ = {};
25
25
  __webpack_require__.r(__webpack_exports__);
26
26
  __webpack_require__.d(__webpack_exports__, {
27
27
  COLLAPSED_NODE_SIZE: ()=>COLLAPSED_NODE_SIZE,
28
+ EXPANDED_RECTANGLE_WIDTH: ()=>EXPANDED_RECTANGLE_WIDTH,
28
29
  getCollapsedShape: ()=>getCollapsedShape,
29
30
  getCollapsedSize: ()=>getCollapsedSize,
30
- getExpandedShape: ()=>getExpandedShape
31
+ getExpandedShape: ()=>getExpandedShape,
32
+ getExpandedSize: ()=>getExpandedSize
31
33
  });
32
34
  const COLLAPSED_NODE_SIZE = 96;
33
- const getCollapsedShape = (originalShape)=>{
34
- const shape = originalShape ?? 'rectangle';
35
- return 'rectangle' === shape ? 'square' : shape;
36
- };
37
- const getExpandedShape = (collapsedShape)=>{
38
- const shape = collapsedShape ?? 'rectangle';
39
- return 'square' === shape ? 'rectangle' : shape;
40
- };
41
- const getCollapsedSize = (width, height, measured)=>height ?? measured?.height ?? width ?? measured?.width ?? COLLAPSED_NODE_SIZE;
35
+ const EXPANDED_RECTANGLE_WIDTH = 288;
36
+ const getCollapsedShape = (originalShape)=>'rectangle' === originalShape ? 'square' : originalShape;
37
+ const getExpandedShape = (collapsedShape)=>'square' === collapsedShape ? 'rectangle' : collapsedShape ?? void 0;
38
+ const getCollapsedSize = ()=>({
39
+ width: COLLAPSED_NODE_SIZE,
40
+ height: COLLAPSED_NODE_SIZE
41
+ });
42
+ const getExpandedSize = (shape)=>({
43
+ width: 'rectangle' === shape ? EXPANDED_RECTANGLE_WIDTH : COLLAPSED_NODE_SIZE,
44
+ height: COLLAPSED_NODE_SIZE
45
+ });
42
46
  exports.COLLAPSED_NODE_SIZE = __webpack_exports__.COLLAPSED_NODE_SIZE;
47
+ exports.EXPANDED_RECTANGLE_WIDTH = __webpack_exports__.EXPANDED_RECTANGLE_WIDTH;
43
48
  exports.getCollapsedShape = __webpack_exports__.getCollapsedShape;
44
49
  exports.getCollapsedSize = __webpack_exports__.getCollapsedSize;
45
50
  exports.getExpandedShape = __webpack_exports__.getExpandedShape;
51
+ exports.getExpandedSize = __webpack_exports__.getExpandedSize;
46
52
  for(var __webpack_i__ in __webpack_exports__)if (-1 === [
47
53
  "COLLAPSED_NODE_SIZE",
54
+ "EXPANDED_RECTANGLE_WIDTH",
48
55
  "getCollapsedShape",
49
56
  "getCollapsedSize",
50
- "getExpandedShape"
57
+ "getExpandedShape",
58
+ "getExpandedSize"
51
59
  ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
52
60
  Object.defineProperty(exports, '__esModule', {
53
61
  value: true
@@ -1,9 +1,14 @@
1
1
  import type { NodeShape } from '../schema/node-definition';
2
2
  export declare const COLLAPSED_NODE_SIZE = 96;
3
- export declare const getCollapsedShape: (originalShape: NodeShape | undefined) => NodeShape;
4
- export declare const getExpandedShape: (collapsedShape: NodeShape | undefined) => NodeShape;
5
- export declare const getCollapsedSize: (width: number | undefined, height: number | undefined, measured?: {
6
- width?: number;
7
- height?: number;
8
- }) => number;
3
+ export declare const EXPANDED_RECTANGLE_WIDTH = 288;
4
+ export declare const getCollapsedShape: (originalShape?: NodeShape) => NodeShape | undefined;
5
+ export declare const getExpandedShape: (collapsedShape?: NodeShape) => NodeShape | undefined;
6
+ export declare const getCollapsedSize: () => {
7
+ width: number;
8
+ height: number;
9
+ };
10
+ export declare const getExpandedSize: (shape?: NodeShape) => {
11
+ width: number;
12
+ height: number;
13
+ };
9
14
  //# sourceMappingURL=collapse.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapse.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/collapse.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAK3D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAMtC,eAAO,MAAM,iBAAiB,GAAI,eAAe,SAAS,GAAG,SAAS,KAAG,SAGxE,CAAC;AAOF,eAAO,MAAM,gBAAgB,GAAI,gBAAgB,SAAS,GAAG,SAAS,KAAG,SAGxE,CAAC;AAMF,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,GAAG,SAAS,EACzB,QAAQ,MAAM,GAAG,SAAS,EAC1B,WAAW;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAA;CAAE,KAC7C,MAEF,CAAC"}
1
+ {"version":3,"file":"collapse.d.ts","sourceRoot":"","sources":["../../../src/canvas/utils/collapse.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAK3D,eAAO,MAAM,mBAAmB,KAAK,CAAC;AAKtC,eAAO,MAAM,wBAAwB,MAAM,CAAC;AAM5C,eAAO,MAAM,iBAAiB,GAAI,gBAAgB,SAAS,KAAG,SAAS,GAAG,SAEzE,CAAC;AAOF,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,SAAS,KAAG,SAAS,GAAG,SAEzE,CAAC;AAMF,eAAO,MAAM,gBAAgB,QAAO;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAKlE,CAAC;AAOF,eAAO,MAAM,eAAe,GAAI,QAAQ,SAAS,KAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAKlF,CAAC"}
@@ -1,11 +1,13 @@
1
1
  const COLLAPSED_NODE_SIZE = 96;
2
- const getCollapsedShape = (originalShape)=>{
3
- const shape = originalShape ?? 'rectangle';
4
- return 'rectangle' === shape ? 'square' : shape;
5
- };
6
- const getExpandedShape = (collapsedShape)=>{
7
- const shape = collapsedShape ?? 'rectangle';
8
- return 'square' === shape ? 'rectangle' : shape;
9
- };
10
- const getCollapsedSize = (width, height, measured)=>height ?? measured?.height ?? width ?? measured?.width ?? COLLAPSED_NODE_SIZE;
11
- export { COLLAPSED_NODE_SIZE, getCollapsedShape, getCollapsedSize, getExpandedShape };
2
+ const EXPANDED_RECTANGLE_WIDTH = 288;
3
+ const getCollapsedShape = (originalShape)=>'rectangle' === originalShape ? 'square' : originalShape;
4
+ const getExpandedShape = (collapsedShape)=>'square' === collapsedShape ? 'rectangle' : collapsedShape ?? void 0;
5
+ const getCollapsedSize = ()=>({
6
+ width: COLLAPSED_NODE_SIZE,
7
+ height: COLLAPSED_NODE_SIZE
8
+ });
9
+ const getExpandedSize = (shape)=>({
10
+ width: 'rectangle' === shape ? EXPANDED_RECTANGLE_WIDTH : COLLAPSED_NODE_SIZE,
11
+ height: COLLAPSED_NODE_SIZE
12
+ });
13
+ export { COLLAPSED_NODE_SIZE, EXPANDED_RECTANGLE_WIDTH, getCollapsedShape, getCollapsedSize, getExpandedShape, getExpandedSize };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uipath/apollo-react",
3
- "version": "3.36.1",
3
+ "version": "3.37.0",
4
4
  "description": "Apollo Design System - React component library with Material UI theming",
5
5
  "repository": {
6
6
  "type": "git",