@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.
- package/README.md +2 -2
- package/dist/constructorio-ui-quizzes-bundled.js +13 -14
- package/lib/cjs/constants.js +1 -1
- package/lib/cjs/utils.js +10 -5
- package/lib/cjs/version.js +1 -1
- package/lib/mjs/constants.js +1 -1
- package/lib/mjs/utils.js +10 -5
- package/lib/mjs/version.js +1 -1
- package/lib/types/constants.d.ts +1 -1
- package/lib/types/version.d.ts +1 -1
- package/package.json +2 -2
package/lib/cjs/constants.js
CHANGED
|
@@ -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 = '
|
|
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
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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;
|
package/lib/cjs/version.js
CHANGED
package/lib/mjs/constants.js
CHANGED
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
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
package/lib/mjs/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '1.12.
|
|
1
|
+
export default '1.12.4';
|
package/lib/types/constants.d.ts
CHANGED
package/lib/types/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "1.12.
|
|
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.
|
|
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.
|
|
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"
|