@usertour/helpers 0.0.14 → 0.0.17

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.
Files changed (58) hide show
  1. package/dist/__tests__/attribute.test.cjs +1036 -0
  2. package/dist/__tests__/attribute.test.d.cts +2 -0
  3. package/dist/__tests__/attribute.test.d.ts +2 -0
  4. package/dist/__tests__/attribute.test.js +802 -0
  5. package/dist/__tests__/time.test.cjs +73 -0
  6. package/dist/__tests__/time.test.d.cts +2 -0
  7. package/dist/__tests__/time.test.d.ts +2 -0
  8. package/dist/__tests__/time.test.js +48 -0
  9. package/dist/__tests__/url.test.cjs +259 -0
  10. package/dist/__tests__/url.test.d.cts +2 -0
  11. package/dist/__tests__/url.test.d.ts +2 -0
  12. package/dist/__tests__/url.test.js +197 -0
  13. package/dist/{chunk-BBPZYUJR.js → chunk-4LLDSAHJ.js} +37 -1
  14. package/dist/chunk-7CC4WXB3.js +60 -0
  15. package/dist/chunk-7ODE2AIC.js +0 -0
  16. package/dist/{chunk-FNQIIEWK.js → chunk-BC7KXBMF.js} +5 -56
  17. package/dist/chunk-CEK3SCQO.js +31 -0
  18. package/dist/chunk-PBZSPV5R.js +239 -0
  19. package/dist/conditions/attribute.cjs +264 -0
  20. package/dist/conditions/attribute.d.cts +28 -0
  21. package/dist/conditions/attribute.d.ts +28 -0
  22. package/dist/conditions/attribute.js +9 -0
  23. package/dist/conditions/condition.cjs +95 -0
  24. package/dist/{condition.d.cts → conditions/condition.d.cts} +1 -2
  25. package/dist/{condition.d.ts → conditions/condition.d.ts} +1 -2
  26. package/dist/conditions/condition.js +9 -0
  27. package/dist/conditions/index.cjs +379 -0
  28. package/dist/conditions/index.d.cts +6 -0
  29. package/dist/conditions/index.d.ts +6 -0
  30. package/dist/conditions/index.js +24 -0
  31. package/dist/conditions/time.cjs +55 -0
  32. package/dist/conditions/time.d.cts +10 -0
  33. package/dist/conditions/time.d.ts +10 -0
  34. package/dist/conditions/time.js +7 -0
  35. package/dist/{condition.cjs → conditions/url.cjs} +9 -71
  36. package/dist/conditions/url.d.cts +6 -0
  37. package/dist/conditions/url.d.ts +6 -0
  38. package/dist/conditions/url.js +9 -0
  39. package/dist/content.cjs +36 -0
  40. package/dist/content.d.cts +4 -2
  41. package/dist/content.d.ts +4 -2
  42. package/dist/content.js +5 -1
  43. package/dist/index.cjs +328 -504
  44. package/dist/index.d.cts +5 -4
  45. package/dist/index.d.ts +5 -4
  46. package/dist/index.js +44 -61
  47. package/package.json +15 -9
  48. package/dist/chunk-64BFWPHJ.js +0 -50
  49. package/dist/chunk-SYVTGB2A.js +0 -462
  50. package/dist/condition.js +0 -11
  51. package/dist/conditions.cjs +0 -615
  52. package/dist/conditions.d.cts +0 -35
  53. package/dist/conditions.d.ts +0 -35
  54. package/dist/conditions.js +0 -50
  55. package/dist/content-settings.cjs +0 -76
  56. package/dist/content-settings.d.cts +0 -7
  57. package/dist/content-settings.d.ts +0 -7
  58. package/dist/content-settings.js +0 -11
@@ -1,50 +0,0 @@
1
- import {
2
- PRIORITIES,
3
- activedContentCondition,
4
- activedContentRulesConditions,
5
- activedRulesConditions,
6
- checklistIsDimissed,
7
- checklistIsSeen,
8
- completeEventMapping,
9
- filterAutoStartContent,
10
- findLatestEvent,
11
- flowIsDismissed,
12
- flowIsSeen,
13
- isActive,
14
- isActiveContent,
15
- isActiveRulesByCurrentPage,
16
- isActiveRulesByCurrentTime,
17
- isDismissedEventMapping,
18
- isHasActivedContents,
19
- isSameContents,
20
- isValidContent,
21
- parseUrlParams,
22
- rulesTypes,
23
- wait
24
- } from "./chunk-SYVTGB2A.js";
25
- import "./chunk-FNQIIEWK.js";
26
- import "./chunk-XEO3YXBM.js";
27
- export {
28
- PRIORITIES,
29
- activedContentCondition,
30
- activedContentRulesConditions,
31
- activedRulesConditions,
32
- checklistIsDimissed,
33
- checklistIsSeen,
34
- completeEventMapping,
35
- filterAutoStartContent,
36
- findLatestEvent,
37
- flowIsDismissed,
38
- flowIsSeen,
39
- isActive,
40
- isActiveContent,
41
- isActiveRulesByCurrentPage,
42
- isActiveRulesByCurrentTime,
43
- isDismissedEventMapping,
44
- isHasActivedContents,
45
- isSameContents,
46
- isValidContent,
47
- parseUrlParams,
48
- rulesTypes,
49
- wait
50
- };
@@ -1,76 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // src/content-settings.ts
21
- var content_settings_exports = {};
22
- __export(content_settings_exports, {
23
- autoStartConditions: () => autoStartConditions,
24
- buildConfig: () => buildConfig,
25
- defaultContentConfig: () => defaultContentConfig
26
- });
27
- module.exports = __toCommonJS(content_settings_exports);
28
- var import_types = require("@usertour/types");
29
- var import_deepmerge_ts = require("deepmerge-ts");
30
- var rulesSetting = {
31
- // frequency: {
32
- // frequency: Frequency.ONCE,
33
- // every: { duration: 0, times: 1, unit: FrequencyUnits.MINUTES },
34
- // atLeast: { duration: 0, unit: FrequencyUnits.MINUTES },
35
- // },
36
- startIfNotComplete: false,
37
- priority: import_types.ContentPriority.MEDIUM,
38
- wait: 0
39
- };
40
- var hideRulesSetting = {};
41
- var defaultContentConfig = {
42
- enabledAutoStartRules: false,
43
- enabledHideRules: false,
44
- autoStartRules: [],
45
- hideRules: [],
46
- autoStartRulesSetting: rulesSetting,
47
- hideRulesSetting
48
- };
49
- var autoStartConditions = {
50
- ...defaultContentConfig,
51
- enabledAutoStartRules: true,
52
- autoStartRules: [
53
- {
54
- data: { excludes: [], includes: ["/*"] },
55
- type: "current-page",
56
- operators: "and"
57
- }
58
- ]
59
- };
60
- var buildConfig = (config) => {
61
- return {
62
- ...defaultContentConfig,
63
- ...config,
64
- autoStartRulesSetting: (0, import_deepmerge_ts.deepmerge)(
65
- defaultContentConfig.autoStartRulesSetting,
66
- (config == null ? void 0 : config.autoStartRulesSetting) || {}
67
- ),
68
- hideRulesSetting: (config == null ? void 0 : config.hideRulesSetting) || {}
69
- };
70
- };
71
- // Annotate the CommonJS export names for ESM import in node:
72
- 0 && (module.exports = {
73
- autoStartConditions,
74
- buildConfig,
75
- defaultContentConfig
76
- });
@@ -1,7 +0,0 @@
1
- import { ContentConfigObject } from '@usertour/types';
2
-
3
- declare const defaultContentConfig: ContentConfigObject;
4
- declare const autoStartConditions: ContentConfigObject;
5
- declare const buildConfig: (config: ContentConfigObject | undefined) => ContentConfigObject;
6
-
7
- export { autoStartConditions, buildConfig, defaultContentConfig };
@@ -1,7 +0,0 @@
1
- import { ContentConfigObject } from '@usertour/types';
2
-
3
- declare const defaultContentConfig: ContentConfigObject;
4
- declare const autoStartConditions: ContentConfigObject;
5
- declare const buildConfig: (config: ContentConfigObject | undefined) => ContentConfigObject;
6
-
7
- export { autoStartConditions, buildConfig, defaultContentConfig };
@@ -1,11 +0,0 @@
1
- import {
2
- autoStartConditions,
3
- buildConfig,
4
- defaultContentConfig
5
- } from "./chunk-64BFWPHJ.js";
6
- import "./chunk-XEO3YXBM.js";
7
- export {
8
- autoStartConditions,
9
- buildConfig,
10
- defaultContentConfig
11
- };