@northern.tech/store 0.1.0 → 0.1.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 +2 -12
- package/package.json +21 -16
- package/usersSlice/thunks.ts +18 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
## [0.1.0](https://github.com/NorthernTechHQ/nt-gui/compare/@northern.tech/store-0.0.1...@northern.tech/store-0.1.0) (2024-11-05)
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
### Features
|
|
7
|
-
|
|
8
|
-
* added tenant creation thunk ([651a67b](https://github.com/NorthernTechHQ/nt-gui/commit/651a67b7df45a0515acfc15e0771ba25ef5f2beb))
|
|
9
|
-
* added tenant-related location utils ([ee167e4](https://github.com/NorthernTechHQ/nt-gui/commit/ee167e45bd4229c86fdb457d140719f8f0b608b8))
|
|
10
|
-
* added tenant-related location utils ([5a7d931](https://github.com/NorthernTechHQ/nt-gui/commit/5a7d931ef7c94a126ae0796d772895fb650816a9))
|
|
11
|
-
* basic repository setup ([da55163](https://github.com/NorthernTechHQ/nt-gui/commit/da55163f94358d3472499f5953734603826d5255))
|
|
12
|
-
* basic repository setup ([7b61c8c](https://github.com/NorthernTechHQ/nt-gui/commit/7b61c8c4f3b46d6ba998bc194f75dab8c8cc7cf6))
|
|
1
|
+
---
|
|
2
|
+
---
|
package/package.json
CHANGED
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@northern.tech/store",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
|
+
"private": false,
|
|
6
|
+
"publishConfig": {
|
|
7
|
+
"access": "public"
|
|
8
|
+
},
|
|
9
|
+
"repository": {
|
|
10
|
+
"type": "git",
|
|
11
|
+
"url": "git+https://github.com/NorthernTechHQ/nt-gui.git"
|
|
12
|
+
},
|
|
5
13
|
"scripts": {
|
|
6
14
|
"build": "tsup store.ts",
|
|
7
15
|
"lint": "eslint . --ext .js,.ts,.tsx",
|
|
@@ -19,20 +27,17 @@
|
|
|
19
27
|
"@northern.tech/utils": "*"
|
|
20
28
|
},
|
|
21
29
|
"peerDependencies": {
|
|
22
|
-
"@mdi/js": "7.
|
|
23
|
-
"@mui/icons-material": "6.
|
|
24
|
-
"@reduxjs/toolkit": "2.
|
|
25
|
-
"axios": "1.
|
|
26
|
-
"dayjs": "1.
|
|
27
|
-
"jwt-decode": "4.
|
|
28
|
-
"md5": "2.
|
|
29
|
-
"react": "^18.
|
|
30
|
-
"react-redux": "9.
|
|
31
|
-
"react-router-dom": "6.
|
|
32
|
-
"universal-cookie": "7.
|
|
33
|
-
"validator": "13.
|
|
34
|
-
},
|
|
35
|
-
"publishConfig": {
|
|
36
|
-
"access": "public"
|
|
30
|
+
"@mdi/js": "^7.x",
|
|
31
|
+
"@mui/icons-material": "^6.x",
|
|
32
|
+
"@reduxjs/toolkit": "^2.x",
|
|
33
|
+
"axios": "^1.x",
|
|
34
|
+
"dayjs": "^1.x",
|
|
35
|
+
"jwt-decode": "^4.x",
|
|
36
|
+
"md5": "^2.x",
|
|
37
|
+
"react": "^18.x",
|
|
38
|
+
"react-redux": "^9.x",
|
|
39
|
+
"react-router-dom": "^6.x",
|
|
40
|
+
"universal-cookie": "^7.x",
|
|
41
|
+
"validator": "^13.x"
|
|
37
42
|
}
|
|
38
43
|
}
|
package/usersSlice/thunks.ts
CHANGED
|
@@ -761,13 +761,22 @@ export const setAllTooltipsReadState = createAsyncThunk(`${sliceName}/toggleHelp
|
|
|
761
761
|
return Promise.resolve(dispatch(actions.setTooltipsState(updatedTips))).then(() => dispatch(saveUserSettings()));
|
|
762
762
|
});
|
|
763
763
|
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
})
|
|
764
|
+
interface SubmitFeedbackPayload {
|
|
765
|
+
satisfaction: string;
|
|
766
|
+
feedback: string;
|
|
767
|
+
meta?: Record<string, unknown>;
|
|
768
|
+
}
|
|
769
|
+
|
|
770
|
+
export const submitFeedback = createAsyncThunk<SubmitFeedbackPayload, SubmitFeedbackPayload>(
|
|
771
|
+
`${sliceName}/submitFeedback`,
|
|
772
|
+
({ satisfaction, feedback, ...meta }, { dispatch }) => {
|
|
773
|
+
return GeneralApi.post(`${tenantadmApiUrlv2}/contact/support`, {
|
|
774
|
+
subject: 'feedback submission',
|
|
775
|
+
body: JSON.stringify({ feedback, satisfaction, meta })
|
|
776
|
+
}).then(() => {
|
|
777
|
+
const today = new Date();
|
|
778
|
+
dispatch(saveUserSettings({ feedbackCollectedAt: today.toISOString().split('T')[0] }));
|
|
779
|
+
setTimeout(() => dispatch(actions.setShowFeedbackDialog(false)), TIMEOUTS.threeSeconds);
|
|
780
|
+
});
|
|
781
|
+
}
|
|
773
782
|
);
|