@flourish/sdk 4.2.0 → 4.2.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/RELEASE_NOTES.md +3 -0
- package/lib/sdk.js +25 -5
- package/package.json +1 -1
- package/site/script.js +1 -1
- package/common/embed/credit.d.ts +0 -5
- package/common/embed/credit.js +0 -47
- package/common/embed/customer_analytics.d.ts +0 -5
- package/common/embed/customer_analytics.js +0 -114
- package/common/embed/embedding.d.ts +0 -25
- package/common/embed/embedding.js +0 -461
- package/common/embed/localizations.d.ts +0 -243
- package/common/embed/localizations.js +0 -90
- package/common/embed/parse_query_params.d.ts +0 -2
- package/common/embed/parse_query_params.js +0 -18
- package/common/package.json +0 -8
- package/common/tsconfig.sdk.tsbuildinfo +0 -1
- package/common/utils/columns.d.ts +0 -11
- package/common/utils/columns.js +0 -175
- package/common/utils/data.d.ts +0 -30
- package/common/utils/data.js +0 -279
- package/common/utils/json.d.ts +0 -3
- package/common/utils/json.js +0 -60
- package/common/utils/polyfills.d.ts +0 -0
- package/common/utils/polyfills.js +0 -30
- package/common/utils/state.d.ts +0 -7
- package/common/utils/state.js +0 -144
package/RELEASE_NOTES.md
CHANGED
package/lib/sdk.js
CHANGED
|
@@ -283,11 +283,21 @@ function qualifyNames(settings, namespace) {
|
|
|
283
283
|
if (typeof setting !== "object") continue;
|
|
284
284
|
|
|
285
285
|
if ("show_if" in setting) {
|
|
286
|
-
|
|
287
|
-
if (type === "string") {
|
|
286
|
+
if (typeof setting.show_if === "string") {
|
|
288
287
|
setting.show_if = namespace + "." + setting.show_if;
|
|
289
288
|
}
|
|
290
|
-
else if (
|
|
289
|
+
else if (Array.isArray(setting.show_if)) {
|
|
290
|
+
const r = [];
|
|
291
|
+
for (let j = 0; j < setting.show_if.length; j++) {
|
|
292
|
+
const and_conditions = {};
|
|
293
|
+
for (const k in setting.show_if[j]) {
|
|
294
|
+
and_conditions[namespace + "." + k] = setting.show_if[j][k];
|
|
295
|
+
}
|
|
296
|
+
r.push(and_conditions);
|
|
297
|
+
}
|
|
298
|
+
setting.show_if = r;
|
|
299
|
+
}
|
|
300
|
+
else if (typeof setting.show_if === "object") {
|
|
291
301
|
const r = {};
|
|
292
302
|
for (const k in setting.show_if) {
|
|
293
303
|
r[namespace + "." + k] = setting.show_if[k];
|
|
@@ -298,11 +308,21 @@ function qualifyNames(settings, namespace) {
|
|
|
298
308
|
}
|
|
299
309
|
|
|
300
310
|
if ("hide_if" in setting) {
|
|
301
|
-
const type = typeof setting.hide_if;
|
|
302
311
|
if (typeof setting.hide_if === "string") {
|
|
303
312
|
setting.hide_if = namespace + "." + setting.hide_if;
|
|
304
313
|
}
|
|
305
|
-
else if (
|
|
314
|
+
else if (Array.isArray(setting.hide_if)) {
|
|
315
|
+
const r = [];
|
|
316
|
+
for (let j = 0; j < setting.hide_if.length; j++) {
|
|
317
|
+
const and_conditions = {};
|
|
318
|
+
for (const k in setting.hide_if[j]) {
|
|
319
|
+
and_conditions[namespace + "." + k] = setting.hide_if[j][k];
|
|
320
|
+
}
|
|
321
|
+
r.push(and_conditions);
|
|
322
|
+
}
|
|
323
|
+
setting.hide_if = r;
|
|
324
|
+
}
|
|
325
|
+
else if (typeof setting.hide_if === "object") {
|
|
306
326
|
const r = {};
|
|
307
327
|
for (const k in setting.hide_if) {
|
|
308
328
|
r[namespace + "." + k] = setting.hide_if[k];
|