@usertour/helpers 0.0.10 → 0.0.12
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/dist/{chunk-7IK5Q5N2.js → chunk-UT6OPCUX.js} +14 -145
- package/dist/conditions.cjs +17 -407
- package/dist/conditions.d.cts +13 -3
- package/dist/conditions.d.ts +13 -3
- package/dist/conditions.js +7 -6
- package/dist/globals.d.cts +1 -1
- package/dist/globals.d.ts +1 -1
- package/dist/index.cjs +21 -474
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +24 -33
- package/package.json +8 -10
- package/dist/chunk-DEG6MTU7.js +0 -318
- package/dist/chunk-Y6FPPOKF.js +0 -28
- package/dist/finderx.cjs +0 -346
- package/dist/finderx.d.cts +0 -47
- package/dist/finderx.d.ts +0 -47
- package/dist/finderx.js +0 -15
- package/dist/listener.cjs +0 -68
- package/dist/listener.d.cts +0 -7
- package/dist/listener.d.ts +0 -7
- package/dist/listener.js +0 -16
package/dist/conditions.d.cts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ContentPriority,
|
|
1
|
+
import { ContentPriority, RulesType, RulesCondition, SDKContent, BizEvent, BizEvents, BizSession } from '@usertour/types';
|
|
2
2
|
|
|
3
3
|
declare const PRIORITIES: ContentPriority[];
|
|
4
|
-
declare const
|
|
4
|
+
declare const rulesTypes: RulesType[];
|
|
5
5
|
type RewriteRulesCondition = Partial<Record<RulesType, boolean>>;
|
|
6
6
|
declare const activedRulesConditions: (conditions: RulesCondition[], rewrite?: RewriteRulesCondition) => Promise<RulesCondition[]>;
|
|
7
7
|
declare const activedContentRulesConditions: (conditions: RulesCondition[], contents: SDKContent[]) => Promise<RulesCondition[]>;
|
|
@@ -12,6 +12,16 @@ declare const filterAutoStartContent: (contents: SDKContent[], type: string) =>
|
|
|
12
12
|
declare const isHasActivedContents: (source: SDKContent[], dest: SDKContent[]) => boolean;
|
|
13
13
|
declare const isSameContents: (source: SDKContent[], dest: SDKContent[]) => boolean;
|
|
14
14
|
declare const findLatestEvent: (bizEvents: BizEvent[]) => BizEvent;
|
|
15
|
+
declare const completeEventMapping: {
|
|
16
|
+
flow: BizEvents;
|
|
17
|
+
launcher: BizEvents;
|
|
18
|
+
checklist: BizEvents;
|
|
19
|
+
};
|
|
20
|
+
declare const isDismissedEventMapping: {
|
|
21
|
+
flow: BizEvents;
|
|
22
|
+
launcher: BizEvents;
|
|
23
|
+
checklist: BizEvents;
|
|
24
|
+
};
|
|
15
25
|
declare const checklistIsDimissed: (latestSession?: BizSession) => BizEvent | undefined;
|
|
16
26
|
declare const flowIsDismissed: (latestSession?: BizSession) => BizEvent | undefined;
|
|
17
27
|
declare const flowIsSeen: (latestSession?: BizSession) => BizEvent | undefined;
|
|
@@ -20,4 +30,4 @@ declare const isValidContent: (content: SDKContent, contents: SDKContent[]) => b
|
|
|
20
30
|
declare const parseUrlParams: (url: string, paramName: string) => string | null;
|
|
21
31
|
declare const wait: (seconds: number) => Promise<void>;
|
|
22
32
|
|
|
23
|
-
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isHasActivedContents, isSameContents, isValidContent,
|
|
33
|
+
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, completeEventMapping, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isDismissedEventMapping, isHasActivedContents, isSameContents, isValidContent, parseUrlParams, rulesTypes, wait };
|
package/dist/conditions.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ContentPriority,
|
|
1
|
+
import { ContentPriority, RulesType, RulesCondition, SDKContent, BizEvent, BizEvents, BizSession } from '@usertour/types';
|
|
2
2
|
|
|
3
3
|
declare const PRIORITIES: ContentPriority[];
|
|
4
|
-
declare const
|
|
4
|
+
declare const rulesTypes: RulesType[];
|
|
5
5
|
type RewriteRulesCondition = Partial<Record<RulesType, boolean>>;
|
|
6
6
|
declare const activedRulesConditions: (conditions: RulesCondition[], rewrite?: RewriteRulesCondition) => Promise<RulesCondition[]>;
|
|
7
7
|
declare const activedContentRulesConditions: (conditions: RulesCondition[], contents: SDKContent[]) => Promise<RulesCondition[]>;
|
|
@@ -12,6 +12,16 @@ declare const filterAutoStartContent: (contents: SDKContent[], type: string) =>
|
|
|
12
12
|
declare const isHasActivedContents: (source: SDKContent[], dest: SDKContent[]) => boolean;
|
|
13
13
|
declare const isSameContents: (source: SDKContent[], dest: SDKContent[]) => boolean;
|
|
14
14
|
declare const findLatestEvent: (bizEvents: BizEvent[]) => BizEvent;
|
|
15
|
+
declare const completeEventMapping: {
|
|
16
|
+
flow: BizEvents;
|
|
17
|
+
launcher: BizEvents;
|
|
18
|
+
checklist: BizEvents;
|
|
19
|
+
};
|
|
20
|
+
declare const isDismissedEventMapping: {
|
|
21
|
+
flow: BizEvents;
|
|
22
|
+
launcher: BizEvents;
|
|
23
|
+
checklist: BizEvents;
|
|
24
|
+
};
|
|
15
25
|
declare const checklistIsDimissed: (latestSession?: BizSession) => BizEvent | undefined;
|
|
16
26
|
declare const flowIsDismissed: (latestSession?: BizSession) => BizEvent | undefined;
|
|
17
27
|
declare const flowIsSeen: (latestSession?: BizSession) => BizEvent | undefined;
|
|
@@ -20,4 +30,4 @@ declare const isValidContent: (content: SDKContent, contents: SDKContent[]) => b
|
|
|
20
30
|
declare const parseUrlParams: (url: string, paramName: string) => string | null;
|
|
21
31
|
declare const wait: (seconds: number) => Promise<void>;
|
|
22
32
|
|
|
23
|
-
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isHasActivedContents, isSameContents, isValidContent,
|
|
33
|
+
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, completeEventMapping, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isDismissedEventMapping, isHasActivedContents, isSameContents, isValidContent, parseUrlParams, rulesTypes, wait };
|
package/dist/conditions.js
CHANGED
|
@@ -5,22 +5,21 @@ import {
|
|
|
5
5
|
activedRulesConditions,
|
|
6
6
|
checklistIsDimissed,
|
|
7
7
|
checklistIsSeen,
|
|
8
|
+
completeEventMapping,
|
|
8
9
|
filterAutoStartContent,
|
|
9
10
|
findLatestEvent,
|
|
10
11
|
flowIsDismissed,
|
|
11
12
|
flowIsSeen,
|
|
12
13
|
isActive,
|
|
13
14
|
isActiveContent,
|
|
15
|
+
isDismissedEventMapping,
|
|
14
16
|
isHasActivedContents,
|
|
15
17
|
isSameContents,
|
|
16
18
|
isValidContent,
|
|
17
|
-
isVisible,
|
|
18
19
|
parseUrlParams,
|
|
20
|
+
rulesTypes,
|
|
19
21
|
wait
|
|
20
|
-
} from "./chunk-
|
|
21
|
-
import "./chunk-DEG6MTU7.js";
|
|
22
|
-
import "./chunk-Y6FPPOKF.js";
|
|
23
|
-
import "./chunk-H7VA3ML2.js";
|
|
22
|
+
} from "./chunk-UT6OPCUX.js";
|
|
24
23
|
import "./chunk-FNQIIEWK.js";
|
|
25
24
|
import "./chunk-XEO3YXBM.js";
|
|
26
25
|
export {
|
|
@@ -30,16 +29,18 @@ export {
|
|
|
30
29
|
activedRulesConditions,
|
|
31
30
|
checklistIsDimissed,
|
|
32
31
|
checklistIsSeen,
|
|
32
|
+
completeEventMapping,
|
|
33
33
|
filterAutoStartContent,
|
|
34
34
|
findLatestEvent,
|
|
35
35
|
flowIsDismissed,
|
|
36
36
|
flowIsSeen,
|
|
37
37
|
isActive,
|
|
38
38
|
isActiveContent,
|
|
39
|
+
isDismissedEventMapping,
|
|
39
40
|
isHasActivedContents,
|
|
40
41
|
isSameContents,
|
|
41
42
|
isValidContent,
|
|
42
|
-
isVisible,
|
|
43
43
|
parseUrlParams,
|
|
44
|
+
rulesTypes,
|
|
44
45
|
wait
|
|
45
46
|
};
|
package/dist/globals.d.cts
CHANGED
|
@@ -3,7 +3,7 @@ import { UserTourTypes } from '@usertour/types/';
|
|
|
3
3
|
declare const win: (UserTourTypes.WindowWithUsertour & typeof globalThis) | undefined;
|
|
4
4
|
declare const ArrayProto: any[];
|
|
5
5
|
declare const nativeForEach: (callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any) => void;
|
|
6
|
-
declare const nativeIndexOf: (searchElement: any, fromIndex?: number) => number;
|
|
6
|
+
declare const nativeIndexOf: (searchElement: any, fromIndex?: number | undefined) => number;
|
|
7
7
|
declare const navigator: Navigator | undefined;
|
|
8
8
|
declare const document: Document | undefined;
|
|
9
9
|
declare const location: Location | undefined;
|
package/dist/globals.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { UserTourTypes } from '@usertour/types/';
|
|
|
3
3
|
declare const win: (UserTourTypes.WindowWithUsertour & typeof globalThis) | undefined;
|
|
4
4
|
declare const ArrayProto: any[];
|
|
5
5
|
declare const nativeForEach: (callbackfn: (value: any, index: number, array: any[]) => void, thisArg?: any) => void;
|
|
6
|
-
declare const nativeIndexOf: (searchElement: any, fromIndex?: number) => number;
|
|
6
|
+
declare const nativeIndexOf: (searchElement: any, fromIndex?: number | undefined) => number;
|
|
7
7
|
declare const navigator: Navigator | undefined;
|
|
8
8
|
declare const document: Document | undefined;
|
|
9
9
|
declare const location: Location | undefined;
|