@atlaskit/teams-public 0.54.0 → 0.54.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @atlaskit/teams-public
2
2
 
3
+ ## 0.54.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`a16cf46ffdef0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a16cf46ffdef0) -
8
+ Optimise setting state in create containers store
9
+
3
10
  ## 0.54.0
4
11
 
5
12
  ### Minor Changes
@@ -15,7 +15,11 @@ var actions = {
15
15
  var setState = _ref.setState,
16
16
  getState = _ref.getState;
17
17
  var containers = getState();
18
- setState(_objectSpread(_objectSpread({}, containers), {}, (0, _defineProperty2.default)({}, product, _objectSpread(_objectSpread({}, containers[product]), {}, {
18
+ var current = containers[product];
19
+ if (current.isLoading === isLoading) {
20
+ return;
21
+ }
22
+ setState(_objectSpread(_objectSpread({}, containers), {}, (0, _defineProperty2.default)({}, product, _objectSpread(_objectSpread({}, current), {}, {
19
23
  isLoading: isLoading
20
24
  }))));
21
25
  };
@@ -25,8 +29,14 @@ var actions = {
25
29
  var setState = _ref2.setState,
26
30
  getState = _ref2.getState;
27
31
  var containers = getState();
28
- setState(_objectSpread(_objectSpread({}, containers), {}, (0, _defineProperty2.default)({}, product, _objectSpread(_objectSpread({}, containers[product]), {}, {
29
- isCreated: isCreated
32
+ var current = containers[product];
33
+ if (current.isCreated === isCreated) {
34
+ return;
35
+ }
36
+ var isLoading = isCreated ? false : current.isLoading;
37
+ setState(_objectSpread(_objectSpread({}, containers), {}, (0, _defineProperty2.default)({}, product, _objectSpread(_objectSpread({}, current), {}, {
38
+ isCreated: isCreated,
39
+ isLoading: isLoading
30
40
  }))));
31
41
  };
32
42
  }
@@ -5,10 +5,14 @@ const actions = {
5
5
  getState
6
6
  }) => {
7
7
  const containers = getState();
8
+ const current = containers[product];
9
+ if (current.isLoading === isLoading) {
10
+ return;
11
+ }
8
12
  setState({
9
13
  ...containers,
10
14
  [product]: {
11
- ...containers[product],
15
+ ...current,
12
16
  isLoading
13
17
  }
14
18
  });
@@ -18,11 +22,17 @@ const actions = {
18
22
  getState
19
23
  }) => {
20
24
  const containers = getState();
25
+ const current = containers[product];
26
+ if (current.isCreated === isCreated) {
27
+ return;
28
+ }
29
+ const isLoading = isCreated ? false : current.isLoading;
21
30
  setState({
22
31
  ...containers,
23
32
  [product]: {
24
- ...containers[product],
25
- isCreated
33
+ ...current,
34
+ isCreated,
35
+ isLoading
26
36
  }
27
37
  });
28
38
  }
@@ -8,7 +8,11 @@ var actions = {
8
8
  var setState = _ref.setState,
9
9
  getState = _ref.getState;
10
10
  var containers = getState();
11
- setState(_objectSpread(_objectSpread({}, containers), {}, _defineProperty({}, product, _objectSpread(_objectSpread({}, containers[product]), {}, {
11
+ var current = containers[product];
12
+ if (current.isLoading === isLoading) {
13
+ return;
14
+ }
15
+ setState(_objectSpread(_objectSpread({}, containers), {}, _defineProperty({}, product, _objectSpread(_objectSpread({}, current), {}, {
12
16
  isLoading: isLoading
13
17
  }))));
14
18
  };
@@ -18,8 +22,14 @@ var actions = {
18
22
  var setState = _ref2.setState,
19
23
  getState = _ref2.getState;
20
24
  var containers = getState();
21
- setState(_objectSpread(_objectSpread({}, containers), {}, _defineProperty({}, product, _objectSpread(_objectSpread({}, containers[product]), {}, {
22
- isCreated: isCreated
25
+ var current = containers[product];
26
+ if (current.isCreated === isCreated) {
27
+ return;
28
+ }
29
+ var isLoading = isCreated ? false : current.isLoading;
30
+ setState(_objectSpread(_objectSpread({}, containers), {}, _defineProperty({}, product, _objectSpread(_objectSpread({}, current), {}, {
31
+ isCreated: isCreated,
32
+ isLoading: isLoading
23
33
  }))));
24
34
  };
25
35
  }
package/i18n/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/i18n/index.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/i18n/index.d.ts"
14
14
  ]
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/common/ui/loom-avatar/index.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/common/ui/loom-avatar/index.d.ts"
14
14
  ]
package/package.json CHANGED
@@ -117,7 +117,7 @@
117
117
  }
118
118
  },
119
119
  "name": "@atlaskit/teams-public",
120
- "version": "0.54.0",
120
+ "version": "0.54.1",
121
121
  "description": "Public components related to teams",
122
122
  "author": "Atlassian Pty Ltd",
123
123
  "license": "Apache-2.0",
@@ -8,7 +8,7 @@
8
8
  ],
9
9
  "types": "../dist/types/ui/team-containers/index.d.ts",
10
10
  "typesVersions": {
11
- ">=4.5 <5.4": {
11
+ ">=4.5 <5.9": {
12
12
  "*": [
13
13
  "../dist/types-ts4.5/ui/team-containers/index.d.ts"
14
14
  ]