studiokit-scaffolding-js 7.0.10-alpha.1 → 7.0.10-next.1.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/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.closeModal = function () {
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.APP_INSIGHTS_KEY;
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.APP_INSIGHTS_KEY) {
67
+ if (appConfig.APP_INSIGHTS_CONNECTION_STRING) {
68
68
  var appInsightsConfig = {
69
- // TODO: change to connectionString
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.APP_INSIGHTS_KEY) {
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
- APP_INSIGHTS_KEY?: string;
28
+ APP_INSIGHTS_CONNECTION_STRING?: string;
29
29
  CLIENT_ID: string;
30
30
  CLIENT_SECRET: string;
31
31
  IS_DOWNTIME: boolean;
@@ -22,7 +22,7 @@ var trackCustomEvent = function (event) {
22
22
  user_id: userId
23
23
  });
24
24
  }
25
- if (appConfig.APP_INSIGHTS_KEY) {
25
+ if (appConfig.APP_INSIGHTS_CONNECTION_STRING) {
26
26
  var appInsights = constants_1.getAppInsights();
27
27
  appInsights.trackEvent({
28
28
  name: eventName,
@@ -1,10 +1,7 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.getShardKey = exports.isDemoShard = exports.isPurdueShard = void 0;
7
- var lodash_1 = __importDefault(require("lodash"));
4
+ var lodash_1 = require("lodash");
8
5
  var configuration_1 = require("../constants/configuration");
9
6
  var shard_1 = require("../constants/shard");
10
7
  var windowService_1 = require("../services/windowService");
@@ -22,15 +19,16 @@ function getShardKey(host, localhostShardKey) {
22
19
  var finalHost = host || location.host;
23
20
  var finalLocalhostShardKey = localhostShardKey || appConfig.LOCALHOST_SHARD_KEY;
24
21
  var rootDomain = appConfig.ROOT_DOMAIN;
25
- if (lodash_1.default.startsWith(finalHost, 'localhost') && !!finalLocalhostShardKey) {
22
+ if (lodash_1.startsWith(finalHost, 'localhost') && !!finalLocalhostShardKey) {
26
23
  return finalLocalhostShardKey;
27
24
  }
28
- if (lodash_1.default.startsWith(finalHost, 'localhost') ||
29
- lodash_1.default.includes(finalHost, 'azurewebsites.net') ||
30
- lodash_1.default.includes(finalHost, 'web.core.windows.net') ||
31
- lodash_1.default.includes(finalHost, 'azureedge.net') ||
32
- lodash_1.default.includes(finalHost, 'z01.azurefd.net') ||
33
- lodash_1.default.includes(finalHost, 'ngrok.io')) {
25
+ if (lodash_1.startsWith(finalHost, 'localhost') ||
26
+ lodash_1.includes(finalHost, 'azurewebsites.net') ||
27
+ lodash_1.includes(finalHost, 'web.core.windows.net') ||
28
+ lodash_1.includes(finalHost, 'azureedge.net') ||
29
+ lodash_1.includes(finalHost, 'azurefd.net') ||
30
+ lodash_1.includes(finalHost, 'azurestaticapps.net') ||
31
+ lodash_1.includes(finalHost, 'ngrok.io')) {
34
32
  return shard_1.SHARD.PURDUE;
35
33
  }
36
34
  var urlParts = finalHost.split('.');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "studiokit-scaffolding-js",
3
- "version": "7.0.10-alpha.1",
3
+ "version": "7.0.10-next.1.1",
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",