@walkeros/web-destination-tiktok 3.3.1 → 3.4.0

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.
@@ -110,9 +110,9 @@ var c = {};
110
110
  for (var o in n) e(t, o, { get: n[o], enumerable: true });
111
111
  })(c, { Level: () => u });
112
112
  var u = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(u || {});
113
- var F = { merge: true, shallow: true, extend: true };
113
+ var W = { merge: true, shallow: true, extend: true };
114
114
  function L(e2, t = {}, n = {}) {
115
- n = { ...F, ...n };
115
+ n = { ...W, ...n };
116
116
  const o = Object.entries(t).reduce((t2, [o2, r]) => {
117
117
  const i = e2[o2];
118
118
  return n.merge && Array.isArray(i) && Array.isArray(r) ? t2[o2] = r.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || o2 in e2) && (t2[o2] = r), t2;
@@ -121,7 +121,7 @@ function L(e2, t = {}, n = {}) {
121
121
  }
122
122
  function fe(e2 = {}) {
123
123
  var _a;
124
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.3.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
124
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
125
125
  if (e2.name) {
126
126
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
127
127
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -137,10 +137,12 @@ function le(e2 = "entity action", t = {}) {
137
137
  var defaultEventForwarding = {
138
138
  in: le("product view"),
139
139
  out: [
140
- "ttq.track",
141
- "product view",
142
- {},
143
- { event_id: le("product view").id }
140
+ [
141
+ "ttq.track",
142
+ "product view",
143
+ {},
144
+ { event_id: le("product view").id }
145
+ ]
144
146
  ]
145
147
  };
146
148
  var wildcardIgnored = {
@@ -165,35 +167,39 @@ var productViewContent = {
165
167
  include: []
166
168
  },
167
169
  out: [
168
- "ttq.track",
169
- "ViewContent",
170
- {
171
- content_type: "product",
172
- content_id: "ers",
173
- content_name: "Everyday Ruck Snack",
174
- // content_category is absent from the default product view fixture;
175
- // the mapper skips undefined resolutions.
176
- value: 420,
177
- currency: "EUR"
178
- // fallback — default fixture has no globals.currency
179
- },
180
- { event_id: le("product view").id }
170
+ [
171
+ "ttq.track",
172
+ "ViewContent",
173
+ {
174
+ content_type: "product",
175
+ content_id: "ers",
176
+ content_name: "Everyday Ruck Snack",
177
+ // content_category is absent from the default product view fixture;
178
+ // the mapper skips undefined resolutions.
179
+ value: 420,
180
+ currency: "EUR"
181
+ // fallback — default fixture has no globals.currency
182
+ },
183
+ { event_id: le("product view").id }
184
+ ]
181
185
  ]
182
186
  };
183
187
  var destinationLevelInclude = {
184
188
  in: le("product view"),
185
189
  configInclude: ["data"],
186
190
  out: [
187
- "ttq.track",
188
- "product view",
189
- {
190
- data_id: "ers",
191
- data_name: "Everyday Ruck Snack",
192
- data_color: "black",
193
- data_size: "l",
194
- data_price: 420
195
- },
196
- { event_id: le("product view").id }
191
+ [
192
+ "ttq.track",
193
+ "product view",
194
+ {
195
+ data_id: "ers",
196
+ data_name: "Everyday Ruck Snack",
197
+ data_color: "black",
198
+ data_size: "l",
199
+ data_price: 420
200
+ },
201
+ { event_id: le("product view").id }
202
+ ]
197
203
  ]
198
204
  };
199
205
  var ruleIncludeReplaces = {
@@ -203,12 +209,14 @@ var ruleIncludeReplaces = {
203
209
  include: ["globals"]
204
210
  },
205
211
  out: [
206
- "ttq.track",
207
- "order complete",
208
- {
209
- globals_pagegroup: "shop"
210
- },
211
- { event_id: le("order complete").id }
212
+ [
213
+ "ttq.track",
214
+ "order complete",
215
+ {
216
+ globals_pagegroup: "shop"
217
+ },
218
+ { event_id: le("order complete").id }
219
+ ]
212
220
  ]
213
221
  };
214
222
  var destinationLevelIdentify = {
@@ -312,36 +320,38 @@ var orderCompleteCompletePayment = {
312
320
  include: []
313
321
  },
314
322
  out: [
315
- "ttq.track",
316
- "CompletePayment",
317
- {
318
- content_type: "product",
319
- value: 555,
320
- currency: "EUR",
321
- order_id: "0rd3r1d",
322
- contents: [
323
- {
324
- content_id: "ers",
325
- content_name: "Everyday Ruck Snack",
326
- quantity: 1,
327
- // fallback — fixture has no data.quantity
328
- price: 420
329
- },
330
- {
331
- content_id: "cc",
332
- content_name: "Cool Cap",
333
- quantity: 1,
334
- price: 42
335
- },
336
- {
337
- // gift entry — { name: 'Surprise' }, no id and no price.
338
- // walkerOS map skips keys whose resolved value is undefined.
339
- content_name: "Surprise",
340
- quantity: 1
341
- }
342
- ]
343
- },
344
- { event_id: le("order complete").id }
323
+ [
324
+ "ttq.track",
325
+ "CompletePayment",
326
+ {
327
+ content_type: "product",
328
+ value: 555,
329
+ currency: "EUR",
330
+ order_id: "0rd3r1d",
331
+ contents: [
332
+ {
333
+ content_id: "ers",
334
+ content_name: "Everyday Ruck Snack",
335
+ quantity: 1,
336
+ // fallback — fixture has no data.quantity
337
+ price: 420
338
+ },
339
+ {
340
+ content_id: "cc",
341
+ content_name: "Cool Cap",
342
+ quantity: 1,
343
+ price: 42
344
+ },
345
+ {
346
+ // gift entry { name: 'Surprise' }, no id and no price.
347
+ // walkerOS map skips keys whose resolved value is undefined.
348
+ content_name: "Surprise",
349
+ quantity: 1
350
+ }
351
+ ]
352
+ },
353
+ { event_id: le("order complete").id }
354
+ ]
345
355
  ]
346
356
  };
347
357
  var searchSubmitSearch = {
@@ -360,12 +370,14 @@ var searchSubmitSearch = {
360
370
  include: []
361
371
  },
362
372
  out: [
363
- "ttq.track",
364
- "Search",
365
- {
366
- query: "hiking backpack"
367
- },
368
- { event_id: le("search submit").id }
373
+ [
374
+ "ttq.track",
375
+ "Search",
376
+ {
377
+ query: "hiking backpack"
378
+ },
379
+ { event_id: le("search submit").id }
380
+ ]
369
381
  ]
370
382
  };
371
383
  var consentGrantEnableCookie = {
@@ -373,13 +385,13 @@ var consentGrantEnableCookie = {
373
385
  in: { marketing: true },
374
386
  settings: {},
375
387
  // consent key is derived from config.consent
376
- out: ["ttq.enableCookie"]
388
+ out: [["ttq.enableCookie"]]
377
389
  };
378
390
  var consentRevokeDisableCookie = {
379
391
  command: "consent",
380
392
  in: { marketing: false },
381
393
  settings: {},
382
- out: ["ttq.disableCookie"]
394
+ out: [["ttq.disableCookie"]]
383
395
  };
384
396
  // Annotate the CommonJS export names for ESM import in node:
385
397
  0 && (module.exports = {
@@ -89,9 +89,9 @@ var c = {};
89
89
  for (var o in n) e(t, o, { get: n[o], enumerable: true });
90
90
  })(c, { Level: () => u });
91
91
  var u = ((e2) => (e2[e2.ERROR = 0] = "ERROR", e2[e2.WARN = 1] = "WARN", e2[e2.INFO = 2] = "INFO", e2[e2.DEBUG = 3] = "DEBUG", e2))(u || {});
92
- var F = { merge: true, shallow: true, extend: true };
92
+ var W = { merge: true, shallow: true, extend: true };
93
93
  function L(e2, t = {}, n = {}) {
94
- n = { ...F, ...n };
94
+ n = { ...W, ...n };
95
95
  const o = Object.entries(t).reduce((t2, [o2, r]) => {
96
96
  const i = e2[o2];
97
97
  return n.merge && Array.isArray(i) && Array.isArray(r) ? t2[o2] = r.reduce((e3, t3) => e3.includes(t3) ? e3 : [...e3, t3], [...i]) : (n.extend || o2 in e2) && (t2[o2] = r), t2;
@@ -100,7 +100,7 @@ function L(e2, t = {}, n = {}) {
100
100
  }
101
101
  function fe(e2 = {}) {
102
102
  var _a;
103
- const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.3.1", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
103
+ const t = e2.timestamp || (/* @__PURE__ */ new Date()).setHours(0, 13, 37, 0), n = e2.group || "gr0up", o = e2.count || 1, r = L({ name: "entity action", data: { string: "foo", number: 1, boolean: true, array: [0, "text", false], not: void 0 }, context: { dev: ["test", 1] }, globals: { lang: "elb" }, custom: { completely: "random" }, user: { id: "us3r", device: "c00k13", session: "s3ss10n" }, nested: [{ entity: "child", data: { is: "subordinated" }, nested: [], context: { element: ["child", 0] } }], consent: { functional: true }, id: `${t}-${n}-${o}`, trigger: "test", entity: "entity", action: "action", timestamp: t, timing: 3.14, group: n, count: o, version: { source: "3.4.0", tagging: 1 }, source: { type: "web", id: "https://localhost:80", previous_id: "http://remotehost:9001" } }, e2, { merge: false });
104
104
  if (e2.name) {
105
105
  const [t2, n2] = (_a = e2.name.split(" ")) != null ? _a : [];
106
106
  t2 && n2 && (r.entity = t2, r.action = n2);
@@ -116,10 +116,12 @@ function le(e2 = "entity action", t = {}) {
116
116
  var defaultEventForwarding = {
117
117
  in: le("product view"),
118
118
  out: [
119
- "ttq.track",
120
- "product view",
121
- {},
122
- { event_id: le("product view").id }
119
+ [
120
+ "ttq.track",
121
+ "product view",
122
+ {},
123
+ { event_id: le("product view").id }
124
+ ]
123
125
  ]
124
126
  };
125
127
  var wildcardIgnored = {
@@ -144,35 +146,39 @@ var productViewContent = {
144
146
  include: []
145
147
  },
146
148
  out: [
147
- "ttq.track",
148
- "ViewContent",
149
- {
150
- content_type: "product",
151
- content_id: "ers",
152
- content_name: "Everyday Ruck Snack",
153
- // content_category is absent from the default product view fixture;
154
- // the mapper skips undefined resolutions.
155
- value: 420,
156
- currency: "EUR"
157
- // fallback — default fixture has no globals.currency
158
- },
159
- { event_id: le("product view").id }
149
+ [
150
+ "ttq.track",
151
+ "ViewContent",
152
+ {
153
+ content_type: "product",
154
+ content_id: "ers",
155
+ content_name: "Everyday Ruck Snack",
156
+ // content_category is absent from the default product view fixture;
157
+ // the mapper skips undefined resolutions.
158
+ value: 420,
159
+ currency: "EUR"
160
+ // fallback — default fixture has no globals.currency
161
+ },
162
+ { event_id: le("product view").id }
163
+ ]
160
164
  ]
161
165
  };
162
166
  var destinationLevelInclude = {
163
167
  in: le("product view"),
164
168
  configInclude: ["data"],
165
169
  out: [
166
- "ttq.track",
167
- "product view",
168
- {
169
- data_id: "ers",
170
- data_name: "Everyday Ruck Snack",
171
- data_color: "black",
172
- data_size: "l",
173
- data_price: 420
174
- },
175
- { event_id: le("product view").id }
170
+ [
171
+ "ttq.track",
172
+ "product view",
173
+ {
174
+ data_id: "ers",
175
+ data_name: "Everyday Ruck Snack",
176
+ data_color: "black",
177
+ data_size: "l",
178
+ data_price: 420
179
+ },
180
+ { event_id: le("product view").id }
181
+ ]
176
182
  ]
177
183
  };
178
184
  var ruleIncludeReplaces = {
@@ -182,12 +188,14 @@ var ruleIncludeReplaces = {
182
188
  include: ["globals"]
183
189
  },
184
190
  out: [
185
- "ttq.track",
186
- "order complete",
187
- {
188
- globals_pagegroup: "shop"
189
- },
190
- { event_id: le("order complete").id }
191
+ [
192
+ "ttq.track",
193
+ "order complete",
194
+ {
195
+ globals_pagegroup: "shop"
196
+ },
197
+ { event_id: le("order complete").id }
198
+ ]
191
199
  ]
192
200
  };
193
201
  var destinationLevelIdentify = {
@@ -291,36 +299,38 @@ var orderCompleteCompletePayment = {
291
299
  include: []
292
300
  },
293
301
  out: [
294
- "ttq.track",
295
- "CompletePayment",
296
- {
297
- content_type: "product",
298
- value: 555,
299
- currency: "EUR",
300
- order_id: "0rd3r1d",
301
- contents: [
302
- {
303
- content_id: "ers",
304
- content_name: "Everyday Ruck Snack",
305
- quantity: 1,
306
- // fallback — fixture has no data.quantity
307
- price: 420
308
- },
309
- {
310
- content_id: "cc",
311
- content_name: "Cool Cap",
312
- quantity: 1,
313
- price: 42
314
- },
315
- {
316
- // gift entry — { name: 'Surprise' }, no id and no price.
317
- // walkerOS map skips keys whose resolved value is undefined.
318
- content_name: "Surprise",
319
- quantity: 1
320
- }
321
- ]
322
- },
323
- { event_id: le("order complete").id }
302
+ [
303
+ "ttq.track",
304
+ "CompletePayment",
305
+ {
306
+ content_type: "product",
307
+ value: 555,
308
+ currency: "EUR",
309
+ order_id: "0rd3r1d",
310
+ contents: [
311
+ {
312
+ content_id: "ers",
313
+ content_name: "Everyday Ruck Snack",
314
+ quantity: 1,
315
+ // fallback — fixture has no data.quantity
316
+ price: 420
317
+ },
318
+ {
319
+ content_id: "cc",
320
+ content_name: "Cool Cap",
321
+ quantity: 1,
322
+ price: 42
323
+ },
324
+ {
325
+ // gift entry { name: 'Surprise' }, no id and no price.
326
+ // walkerOS map skips keys whose resolved value is undefined.
327
+ content_name: "Surprise",
328
+ quantity: 1
329
+ }
330
+ ]
331
+ },
332
+ { event_id: le("order complete").id }
333
+ ]
324
334
  ]
325
335
  };
326
336
  var searchSubmitSearch = {
@@ -339,12 +349,14 @@ var searchSubmitSearch = {
339
349
  include: []
340
350
  },
341
351
  out: [
342
- "ttq.track",
343
- "Search",
344
- {
345
- query: "hiking backpack"
346
- },
347
- { event_id: le("search submit").id }
352
+ [
353
+ "ttq.track",
354
+ "Search",
355
+ {
356
+ query: "hiking backpack"
357
+ },
358
+ { event_id: le("search submit").id }
359
+ ]
348
360
  ]
349
361
  };
350
362
  var consentGrantEnableCookie = {
@@ -352,13 +364,13 @@ var consentGrantEnableCookie = {
352
364
  in: { marketing: true },
353
365
  settings: {},
354
366
  // consent key is derived from config.consent
355
- out: ["ttq.enableCookie"]
367
+ out: [["ttq.enableCookie"]]
356
368
  };
357
369
  var consentRevokeDisableCookie = {
358
370
  command: "consent",
359
371
  in: { marketing: false },
360
372
  settings: {},
361
- out: ["ttq.disableCookie"]
373
+ out: [["ttq.disableCookie"]]
362
374
  };
363
375
  export {
364
376
  env_exports as env,