studiokit-scaffolding-js 7.0.10-alpha.1 → 7.0.10
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/README.md +3 -0
- package/lib/components/HOC/FullscreenModalComponent.d.ts +1 -0
- package/lib/components/HOC/FullscreenModalComponent.js +7 -1
- package/lib/redux/sagas/appInsightsSaga.js +1 -1
- package/lib/startup.js +3 -4
- package/lib/types/AppConfiguration.d.ts +1 -1
- package/lib/utils/events.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -105,6 +105,9 @@ Components and utils can be imported from `studiokit-scaffolding-js/lib/...`
|
|
|
105
105
|
* e.g. `1.0.1-alpha.1` => `1.0.1-alpha.2` for a hotfix branch
|
|
106
106
|
1. Push to gitlab. Azure DevOps will run a pipeline and publish this version to npmjs.org
|
|
107
107
|
1. Install the new version in the project(s) you are working on by updating its `package.json` and running `yarn`
|
|
108
|
+
* As an alternative to the two steps above, if you don't need to make changes available to other devs yet you can:
|
|
109
|
+
1. In the studiokit directory, run `yarn build` then `yarn pack`. You'll still need to have incremented the version number to avoid having it cached.
|
|
110
|
+
1. Over in the Circuit/Variate/etc. directory, run `yarn add ../studiokit-scaffolding-js/package.tgz`.
|
|
108
111
|
1. Repeat as needed
|
|
109
112
|
1. Merging
|
|
110
113
|
* After the Merge Request is approved, **remove** the "next" or "alpha" suffix from the version **before** merging to develop or master
|
|
@@ -42,6 +42,7 @@ export declare function configureFullscreenModalComponent<TOwnProps extends {}>(
|
|
|
42
42
|
componentDidUpdate(prevProps: TOwnProps & FullscreenModalOwnProps & ConnectedModalWrappedProps & GuidComponentWrappedProps, prevState: FullscreenModalState): void;
|
|
43
43
|
disableScroll: (e: Event) => boolean;
|
|
44
44
|
onOpen: () => void;
|
|
45
|
+
onClose: () => void;
|
|
45
46
|
closeModal: () => void;
|
|
46
47
|
render(): React.JSX.Element;
|
|
47
48
|
context: any;
|
|
@@ -83,8 +83,11 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
83
83
|
document.documentElement.addEventListener('touchmove', _this.disableScroll);
|
|
84
84
|
_this.props.onEntering();
|
|
85
85
|
};
|
|
86
|
-
_this.
|
|
86
|
+
_this.onClose = function () {
|
|
87
87
|
document.documentElement.removeEventListener('touchmove', _this.disableScroll);
|
|
88
|
+
_this.props.onExited();
|
|
89
|
+
};
|
|
90
|
+
_this.closeModal = function () {
|
|
88
91
|
if (_this.props.closeModal) {
|
|
89
92
|
_this.props.closeModal();
|
|
90
93
|
return;
|
|
@@ -128,6 +131,9 @@ function configureFullscreenModalComponent(WrappedComponent) {
|
|
|
128
131
|
if (isOpen) {
|
|
129
132
|
this.onOpen();
|
|
130
133
|
}
|
|
134
|
+
else {
|
|
135
|
+
this.onClose();
|
|
136
|
+
}
|
|
131
137
|
this.setState({
|
|
132
138
|
isOpen: isOpen
|
|
133
139
|
});
|
|
@@ -36,7 +36,7 @@ function appInsightsSaga() {
|
|
|
36
36
|
switch (_a.label) {
|
|
37
37
|
case 0:
|
|
38
38
|
appConfig = constants_1.getAppConfig();
|
|
39
|
-
appInsightsKey = appConfig.
|
|
39
|
+
appInsightsKey = appConfig.APP_INSIGHTS_CONNECTION_STRING;
|
|
40
40
|
if (!appInsightsKey) {
|
|
41
41
|
return [2 /*return*/];
|
|
42
42
|
}
|
package/lib/startup.js
CHANGED
|
@@ -64,10 +64,9 @@ var startup = function (appConfig, endpointMappings) {
|
|
|
64
64
|
react_ga4_1.default.send({ hitType: 'pageview', page: window.location.pathname });
|
|
65
65
|
}
|
|
66
66
|
// Application Insights
|
|
67
|
-
if (appConfig.
|
|
67
|
+
if (appConfig.APP_INSIGHTS_CONNECTION_STRING) {
|
|
68
68
|
var appInsightsConfig = {
|
|
69
|
-
|
|
70
|
-
instrumentationKey: appConfig.APP_INSIGHTS_KEY
|
|
69
|
+
connectionString: appConfig.APP_INSIGHTS_CONNECTION_STRING
|
|
71
70
|
};
|
|
72
71
|
var appInsights = new applicationinsights_web_1.ApplicationInsights({ config: appInsightsConfig });
|
|
73
72
|
appInsights.loadAppInsights();
|
|
@@ -81,7 +80,7 @@ var startup = function (appConfig, endpointMappings) {
|
|
|
81
80
|
react_ga4_1.default.send({ hitType: 'pageview', page: location.pathname, user_id: configuration_1.getUserId() });
|
|
82
81
|
}
|
|
83
82
|
// send pageview to Application Insights
|
|
84
|
-
if (appConfig.
|
|
83
|
+
if (appConfig.APP_INSIGHTS_CONNECTION_STRING) {
|
|
85
84
|
var appInsights = configuration_1.getAppInsights();
|
|
86
85
|
appInsights.trackPageView({ uri: location.pathname });
|
|
87
86
|
}
|
|
@@ -25,7 +25,7 @@ export interface AppConfiguration {
|
|
|
25
25
|
SENTRY_TRACES_SAMPLE_RATE?: number;
|
|
26
26
|
SENTRY_REPLAYS_SESSION_SAMPLE_RATE?: number;
|
|
27
27
|
SENTRY_REPLAYS_ON_ERROR_SAMPLE_RATE?: number;
|
|
28
|
-
|
|
28
|
+
APP_INSIGHTS_CONNECTION_STRING?: string;
|
|
29
29
|
CLIENT_ID: string;
|
|
30
30
|
CLIENT_SECRET: string;
|
|
31
31
|
IS_DOWNTIME: boolean;
|
package/lib/utils/events.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "studiokit-scaffolding-js",
|
|
3
|
-
"version": "7.0.10
|
|
3
|
+
"version": "7.0.10",
|
|
4
4
|
"description": "Common scaffolding for Studio apps at Purdue",
|
|
5
5
|
"repository": "https://gitlab.com/purdue-informatics/studiokit/studiokit-scaffolding-js",
|
|
6
6
|
"license": "MIT",
|