@stack-spot/portal-layout 2.19.0 → 2.19.2

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,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.19.2](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.19.1...portal-layout@v2.19.2) (2024-12-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * nps is visible validation ([#593](https://github.com/stack-spot/portal-commons/issues/593)) ([150d8a8](https://github.com/stack-spot/portal-commons/commit/150d8a8510f83a3591e459d5e5c803a4189c65c2))
9
+
10
+ ## [2.19.1](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.19.0...portal-layout@v2.19.1) (2024-12-16)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * 1157 unread notifications circle ([#582](https://github.com/stack-spot/portal-commons/issues/582)) ([dd30ed0](https://github.com/stack-spot/portal-commons/commit/dd30ed028faa1ee426b3700e34042b9e7fd66e41))
16
+
3
17
  ## [2.19.0](https://github.com/stack-spot/portal-commons/compare/portal-layout@v2.18.1...portal-layout@v2.19.0) (2024-12-14)
4
18
 
5
19
 
@@ -16,8 +16,8 @@ export const NotificationBox = styled.div `
16
16
  &:before {
17
17
  content: '';
18
18
  position: absolute;
19
- top: -1px;
20
- right: -1px;
19
+ right: 9px;
20
+ top: 9px;
21
21
  width: 12px;
22
22
  height: 12px;
23
23
  border-radius: 50%;
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Rate/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,UAAW,YAAY,SAOlD,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/Rate/utils.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe,UAAW,YAAY,SAOlD,CAAA"}
@@ -1,7 +1,8 @@
1
+ import { shouldShowNpsModal } from './hook.js';
1
2
  export const checkVisibility = (event) => {
2
3
  if (event.key === 'RATED_US_IN') {
3
- const isVisible = !localStorage.getItem('RATED_US_IN');
4
- if (!isVisible) {
4
+ const shouldShow = shouldShowNpsModal();
5
+ if (!shouldShow) {
5
6
  document.getElementById('feedback-modal')?.remove();
6
7
  }
7
8
  }
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/Rate/utils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAmB,EAAE,EAAE;IACrD,IAAI,KAAK,CAAC,GAAG,KAAK,aAAa,EAAE,CAAC;QAChC,MAAM,SAAS,GAAG,CAAC,YAAY,CAAC,OAAO,CAAC,aAAa,CAAC,CAAA;QACtD,IAAI,CAAC,SAAS,EAAE,CAAC;YACf,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;QACrD,CAAC;IACH,CAAC;AACH,CAAC,CAAA"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/components/Rate/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAA;AAE3C,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,KAAmB,EAAE,EAAE;IACrD,IAAI,KAAK,CAAC,GAAG,KAAK,aAAa,EAAE,CAAC;QAChC,MAAM,UAAU,GAAG,kBAAkB,EAAE,CAAA;QACvC,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,QAAQ,CAAC,cAAc,CAAC,gBAAgB,CAAC,EAAE,MAAM,EAAE,CAAA;QACrD,CAAC;IACH,CAAC;AACH,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/portal-layout",
3
- "version": "2.19.0",
3
+ "version": "2.19.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -17,8 +17,8 @@ export const NotificationBox = styled.div`
17
17
  &:before {
18
18
  content: '';
19
19
  position: absolute;
20
- top: -1px;
21
- right: -1px;
20
+ right: 9px;
21
+ top: 9px;
22
22
  width: 12px;
23
23
  height: 12px;
24
24
  border-radius: 50%;
@@ -1,7 +1,9 @@
1
+ import { shouldShowNpsModal } from './hook'
2
+
1
3
  export const checkVisibility = (event: StorageEvent) => {
2
4
  if (event.key === 'RATED_US_IN') {
3
- const isVisible = !localStorage.getItem('RATED_US_IN')
4
- if (!isVisible) {
5
+ const shouldShow = shouldShowNpsModal()
6
+ if (!shouldShow) {
5
7
  document.getElementById('feedback-modal')?.remove()
6
8
  }
7
9
  }