@constructor-io/constructorio-ui-quizzes 1.12.2 → 1.12.4

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.
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.RequestStates = exports.quizSessionStateKey = exports.quizId = exports.apiKey = void 0;
4
4
  // Autocomplete key index
5
- exports.apiKey = 'key_wJSdZSiesX5hiVLt';
5
+ exports.apiKey = 'key_n4SkMH5PFWLdStQZ';
6
6
  exports.quizId = 'coffee-quiz';
7
7
  // Session Storage default key
8
8
  exports.quizSessionStateKey = 'constructorIOQuizState';
package/lib/cjs/utils.js CHANGED
@@ -114,11 +114,16 @@ const resetQuizSessionStorageState = (quizStateKey) => () => {
114
114
  exports.resetQuizSessionStorageState = resetQuizSessionStorageState;
115
115
  const logger = (action) => {
116
116
  var _a;
117
- if ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.LOGGER) {
118
- console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
119
- console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
120
- console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
121
- console.groupEnd();
117
+ try {
118
+ if (typeof process !== 'undefined' && ((_a = process === null || process === void 0 ? void 0 : process.env) === null || _a === void 0 ? void 0 : _a.LOGGER)) {
119
+ console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
120
+ console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
121
+ console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
122
+ console.groupEnd();
123
+ }
124
+ }
125
+ catch (error) {
126
+ // process variable is not available and logger should not be active
122
127
  }
123
128
  };
124
129
  exports.logger = logger;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = '1.12.2';
3
+ exports.default = '1.12.4';
@@ -1,5 +1,5 @@
1
1
  // Autocomplete key index
2
- export const apiKey = 'key_wJSdZSiesX5hiVLt';
2
+ export const apiKey = 'key_n4SkMH5PFWLdStQZ';
3
3
  export const quizId = 'coffee-quiz';
4
4
  // Session Storage default key
5
5
  export const quizSessionStateKey = 'constructorIOQuizState';
package/lib/mjs/utils.js CHANGED
@@ -98,11 +98,16 @@ export const resetQuizSessionStorageState = (quizStateKey) => () => {
98
98
  window?.sessionStorage?.removeItem(quizStateKey);
99
99
  };
100
100
  export const logger = (action) => {
101
- if (process?.env?.LOGGER) {
102
- console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
103
- console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
104
- console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
105
- console.groupEnd();
101
+ try {
102
+ if (typeof process !== 'undefined' && process?.env?.LOGGER) {
103
+ console.group(`%cAction:%c ${action.type}`, 'color: red; font-weight: bold;', 'color: green; font-weight: lighter;');
104
+ console.log('%c type:', 'color: #9E9E9E; font-weight: 700;', action.type);
105
+ console.log('%c payload:', 'color: #00A7F7; font-weight: 700;', action.payload);
106
+ console.groupEnd();
107
+ }
108
+ }
109
+ catch (error) {
110
+ // process variable is not available and logger should not be active
106
111
  }
107
112
  };
108
113
  // Function to emulate pausing between interactions
@@ -1 +1 @@
1
- export default '1.12.2';
1
+ export default '1.12.4';
@@ -1,4 +1,4 @@
1
- export declare const apiKey = "key_wJSdZSiesX5hiVLt";
1
+ export declare const apiKey = "key_n4SkMH5PFWLdStQZ";
2
2
  export declare const quizId = "coffee-quiz";
3
3
  export declare const quizSessionStateKey = "constructorIOQuizState";
4
4
  export declare enum RequestStates {
@@ -1,2 +1,2 @@
1
- declare const _default: "1.12.2";
1
+ declare const _default: "1.12.4";
2
2
  export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-ui-quizzes",
3
- "version": "1.12.2",
3
+ "version": "1.12.4",
4
4
  "description": "Constructor.io Quizzes UI library for web applications",
5
5
  "author": "constructor.io",
6
6
  "license": "MIT",
@@ -61,7 +61,7 @@
61
61
  "check-license": "license-checker --production --onlyAllow 'Apache-2.0;BSD-3-Clause;MIT;0BSD;BSD-2-Clause' --excludePackages 'picocolors@1.0.0'"
62
62
  },
63
63
  "peerDependencies": {
64
- "@constructor-io/constructorio-client-javascript": "^2.39.0",
64
+ "@constructor-io/constructorio-client-javascript": "^2.42.0",
65
65
  "react": ">=16.12.0",
66
66
  "react-dom": ">=16.12.0",
67
67
  "tslib": "^2.4.0"