@usertour/helpers 0.0.12 → 0.0.13
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-UT6OPCUX.js → chunk-SYVTGB2A.js} +2 -0
- package/dist/conditions.cjs +4 -0
- package/dist/conditions.d.cts +3 -1
- package/dist/conditions.d.ts +3 -1
- package/dist/conditions.js +5 -1
- package/dist/index.cjs +2 -125
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +4 -26
- package/package.json +1 -1
package/dist/conditions.cjs
CHANGED
|
@@ -43,6 +43,8 @@ __export(conditions_exports, {
|
|
|
43
43
|
flowIsSeen: () => flowIsSeen,
|
|
44
44
|
isActive: () => isActive,
|
|
45
45
|
isActiveContent: () => isActiveContent,
|
|
46
|
+
isActiveRulesByCurrentPage: () => isActiveRulesByCurrentPage,
|
|
47
|
+
isActiveRulesByCurrentTime: () => isActiveRulesByCurrentTime,
|
|
46
48
|
isDismissedEventMapping: () => isDismissedEventMapping,
|
|
47
49
|
isHasActivedContents: () => isHasActivedContents,
|
|
48
50
|
isSameContents: () => isSameContents,
|
|
@@ -601,6 +603,8 @@ var wait = (seconds) => {
|
|
|
601
603
|
flowIsSeen,
|
|
602
604
|
isActive,
|
|
603
605
|
isActiveContent,
|
|
606
|
+
isActiveRulesByCurrentPage,
|
|
607
|
+
isActiveRulesByCurrentTime,
|
|
604
608
|
isDismissedEventMapping,
|
|
605
609
|
isHasActivedContents,
|
|
606
610
|
isSameContents,
|
package/dist/conditions.d.cts
CHANGED
|
@@ -2,6 +2,8 @@ import { ContentPriority, RulesType, RulesCondition, SDKContent, BizEvent, BizEv
|
|
|
2
2
|
|
|
3
3
|
declare const PRIORITIES: ContentPriority[];
|
|
4
4
|
declare const rulesTypes: RulesType[];
|
|
5
|
+
declare const isActiveRulesByCurrentPage: (rules: RulesCondition) => boolean;
|
|
6
|
+
declare const isActiveRulesByCurrentTime: (rules: RulesCondition) => boolean;
|
|
5
7
|
type RewriteRulesCondition = Partial<Record<RulesType, boolean>>;
|
|
6
8
|
declare const activedRulesConditions: (conditions: RulesCondition[], rewrite?: RewriteRulesCondition) => Promise<RulesCondition[]>;
|
|
7
9
|
declare const activedContentRulesConditions: (conditions: RulesCondition[], contents: SDKContent[]) => Promise<RulesCondition[]>;
|
|
@@ -30,4 +32,4 @@ declare const isValidContent: (content: SDKContent, contents: SDKContent[]) => b
|
|
|
30
32
|
declare const parseUrlParams: (url: string, paramName: string) => string | null;
|
|
31
33
|
declare const wait: (seconds: number) => Promise<void>;
|
|
32
34
|
|
|
33
|
-
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, completeEventMapping, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isDismissedEventMapping, isHasActivedContents, isSameContents, isValidContent, parseUrlParams, rulesTypes, wait };
|
|
35
|
+
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, completeEventMapping, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isActiveRulesByCurrentPage, isActiveRulesByCurrentTime, isDismissedEventMapping, isHasActivedContents, isSameContents, isValidContent, parseUrlParams, rulesTypes, wait };
|
package/dist/conditions.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import { ContentPriority, RulesType, RulesCondition, SDKContent, BizEvent, BizEv
|
|
|
2
2
|
|
|
3
3
|
declare const PRIORITIES: ContentPriority[];
|
|
4
4
|
declare const rulesTypes: RulesType[];
|
|
5
|
+
declare const isActiveRulesByCurrentPage: (rules: RulesCondition) => boolean;
|
|
6
|
+
declare const isActiveRulesByCurrentTime: (rules: RulesCondition) => boolean;
|
|
5
7
|
type RewriteRulesCondition = Partial<Record<RulesType, boolean>>;
|
|
6
8
|
declare const activedRulesConditions: (conditions: RulesCondition[], rewrite?: RewriteRulesCondition) => Promise<RulesCondition[]>;
|
|
7
9
|
declare const activedContentRulesConditions: (conditions: RulesCondition[], contents: SDKContent[]) => Promise<RulesCondition[]>;
|
|
@@ -30,4 +32,4 @@ declare const isValidContent: (content: SDKContent, contents: SDKContent[]) => b
|
|
|
30
32
|
declare const parseUrlParams: (url: string, paramName: string) => string | null;
|
|
31
33
|
declare const wait: (seconds: number) => Promise<void>;
|
|
32
34
|
|
|
33
|
-
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, completeEventMapping, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isDismissedEventMapping, isHasActivedContents, isSameContents, isValidContent, parseUrlParams, rulesTypes, wait };
|
|
35
|
+
export { PRIORITIES, activedContentCondition, activedContentRulesConditions, activedRulesConditions, checklistIsDimissed, checklistIsSeen, completeEventMapping, filterAutoStartContent, findLatestEvent, flowIsDismissed, flowIsSeen, isActive, isActiveContent, isActiveRulesByCurrentPage, isActiveRulesByCurrentTime, isDismissedEventMapping, isHasActivedContents, isSameContents, isValidContent, parseUrlParams, rulesTypes, wait };
|
package/dist/conditions.js
CHANGED
|
@@ -12,6 +12,8 @@ import {
|
|
|
12
12
|
flowIsSeen,
|
|
13
13
|
isActive,
|
|
14
14
|
isActiveContent,
|
|
15
|
+
isActiveRulesByCurrentPage,
|
|
16
|
+
isActiveRulesByCurrentTime,
|
|
15
17
|
isDismissedEventMapping,
|
|
16
18
|
isHasActivedContents,
|
|
17
19
|
isSameContents,
|
|
@@ -19,7 +21,7 @@ import {
|
|
|
19
21
|
parseUrlParams,
|
|
20
22
|
rulesTypes,
|
|
21
23
|
wait
|
|
22
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-SYVTGB2A.js";
|
|
23
25
|
import "./chunk-FNQIIEWK.js";
|
|
24
26
|
import "./chunk-XEO3YXBM.js";
|
|
25
27
|
export {
|
|
@@ -36,6 +38,8 @@ export {
|
|
|
36
38
|
flowIsSeen,
|
|
37
39
|
isActive,
|
|
38
40
|
isActiveContent,
|
|
41
|
+
isActiveRulesByCurrentPage,
|
|
42
|
+
isActiveRulesByCurrentTime,
|
|
39
43
|
isDismissedEventMapping,
|
|
40
44
|
isHasActivedContents,
|
|
41
45
|
isSameContents,
|
package/dist/index.cjs
CHANGED
|
@@ -37,19 +37,15 @@ var src_exports = {};
|
|
|
37
37
|
__export(src_exports, {
|
|
38
38
|
AbortController: () => AbortController,
|
|
39
39
|
ArrayProto: () => ArrayProto,
|
|
40
|
-
PRIORITIES: () => PRIORITIES,
|
|
41
40
|
XMLHttpRequest: () => XMLHttpRequest,
|
|
42
41
|
absoluteUrl: () => absoluteUrl,
|
|
43
|
-
activedContentCondition: () => activedContentCondition,
|
|
44
42
|
activedContentRulesConditions: () => activedContentRulesConditions,
|
|
45
|
-
activedRulesConditions: () => activedRulesConditions,
|
|
46
43
|
assignableWindow: () => assignableWindow,
|
|
47
44
|
autoStartConditions: () => autoStartConditions,
|
|
48
45
|
buildConfig: () => buildConfig,
|
|
49
46
|
checklistIsDimissed: () => checklistIsDimissed,
|
|
50
47
|
checklistIsSeen: () => checklistIsSeen,
|
|
51
48
|
cn: () => cn,
|
|
52
|
-
completeEventMapping: () => completeEventMapping,
|
|
53
49
|
conditionsIsSame: () => conditionsIsSame,
|
|
54
50
|
convertSettings: () => convertSettings,
|
|
55
51
|
convertToCssVars: () => convertToCssVars,
|
|
@@ -61,7 +57,6 @@ __export(src_exports, {
|
|
|
61
57
|
evalCode: () => evalCode,
|
|
62
58
|
fetch: () => fetch,
|
|
63
59
|
filterAutoStartContent: () => filterAutoStartContent,
|
|
64
|
-
findLatestEvent: () => findLatestEvent,
|
|
65
60
|
flowIsDismissed: () => flowIsDismissed,
|
|
66
61
|
flowIsSeen: () => flowIsSeen,
|
|
67
62
|
formatDate: () => formatDate,
|
|
@@ -86,13 +81,11 @@ __export(src_exports, {
|
|
|
86
81
|
hexToHSLString: () => hexToHSLString,
|
|
87
82
|
hexToRGBStr: () => hexToRGBStr,
|
|
88
83
|
hexToRgb: () => hexToRgb,
|
|
89
|
-
|
|
90
|
-
isActiveContent: () => isActiveContent,
|
|
84
|
+
isActiveRulesByCurrentTime: () => isActiveRulesByCurrentTime,
|
|
91
85
|
isArray: () => isArray,
|
|
92
86
|
isBoolean: () => isBoolean,
|
|
93
87
|
isDark: () => isDark,
|
|
94
88
|
isDate: () => isDate,
|
|
95
|
-
isDismissedEventMapping: () => isDismissedEventMapping,
|
|
96
89
|
isDocument: () => isDocument,
|
|
97
90
|
isEmptyObject: () => isEmptyObject,
|
|
98
91
|
isEmptyString: () => isEmptyString,
|
|
@@ -100,7 +93,6 @@ __export(src_exports, {
|
|
|
100
93
|
isFile: () => isFile,
|
|
101
94
|
isFormData: () => isFormData,
|
|
102
95
|
isFunction: () => isFunction,
|
|
103
|
-
isHasActivedContents: () => isHasActivedContents,
|
|
104
96
|
isMatchUrlPattern: () => isMatchUrlPattern,
|
|
105
97
|
isNull: () => isNull,
|
|
106
98
|
isNullish: () => isNullish,
|
|
@@ -108,7 +100,6 @@ __export(src_exports, {
|
|
|
108
100
|
isObject: () => isObject,
|
|
109
101
|
isPublishedAtLeastOneEnvironment: () => isPublishedAtLeastOneEnvironment,
|
|
110
102
|
isPublishedInAllEnvironments: () => isPublishedInAllEnvironments,
|
|
111
|
-
isSameContents: () => isSameContents,
|
|
112
103
|
isString: () => isString,
|
|
113
104
|
isUint8Array: () => isUint8Array,
|
|
114
105
|
isUndefined: () => isUndefined,
|
|
@@ -122,12 +113,10 @@ __export(src_exports, {
|
|
|
122
113
|
navigator: () => navigator,
|
|
123
114
|
parseUrlParams: () => parseUrlParams,
|
|
124
115
|
removeAuthToken: () => removeAuthToken,
|
|
125
|
-
rulesTypes: () => rulesTypes,
|
|
126
116
|
setAuthToken: () => setAuthToken,
|
|
127
117
|
storage: () => storage,
|
|
128
118
|
userAgent: () => userAgent,
|
|
129
119
|
uuidV4: () => uuidV4,
|
|
130
|
-
wait: () => wait,
|
|
131
120
|
window: () => win
|
|
132
121
|
});
|
|
133
122
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -1118,14 +1107,6 @@ var PRIORITIES = [
|
|
|
1118
1107
|
import_types4.ContentPriority.LOWEST
|
|
1119
1108
|
];
|
|
1120
1109
|
var rulesTypes = Object.values(import_types4.RulesType);
|
|
1121
|
-
var isActiveRulesByCurrentPage = (rules) => {
|
|
1122
|
-
const { excludes, includes } = rules.data;
|
|
1123
|
-
if (location) {
|
|
1124
|
-
const href = location.href;
|
|
1125
|
-
return isMatchUrlPattern(href, includes, excludes);
|
|
1126
|
-
}
|
|
1127
|
-
return false;
|
|
1128
|
-
};
|
|
1129
1110
|
var isActiveRulesByCurrentTime = (rules) => {
|
|
1130
1111
|
const { endDate, endDateHour, endDateMinute, startDate, startDateHour, startDateMinute } = rules.data;
|
|
1131
1112
|
const startTime = /* @__PURE__ */ new Date(`${startDate} ${startDateHour}:${startDateMinute}:00`);
|
|
@@ -1159,38 +1140,6 @@ var isActivedContentRulesCondition = (rules, contentSession) => {
|
|
|
1159
1140
|
}
|
|
1160
1141
|
return false;
|
|
1161
1142
|
};
|
|
1162
|
-
var isValidRulesType = (type) => {
|
|
1163
|
-
return rulesTypes.includes(type);
|
|
1164
|
-
};
|
|
1165
|
-
var isActiveRules = async (rules) => {
|
|
1166
|
-
if (!isValidRulesType(rules.type)) {
|
|
1167
|
-
return true;
|
|
1168
|
-
}
|
|
1169
|
-
switch (rules.type) {
|
|
1170
|
-
case import_types4.RulesType.CURRENT_PAGE:
|
|
1171
|
-
return isActiveRulesByCurrentPage(rules);
|
|
1172
|
-
case import_types4.RulesType.TIME:
|
|
1173
|
-
return isActiveRulesByCurrentTime(rules);
|
|
1174
|
-
default:
|
|
1175
|
-
return rules.actived;
|
|
1176
|
-
}
|
|
1177
|
-
};
|
|
1178
|
-
var activedRulesConditions = async (conditions, rewrite) => {
|
|
1179
|
-
const rulesCondition = [...conditions];
|
|
1180
|
-
for (let j = 0; j < rulesCondition.length; j++) {
|
|
1181
|
-
const rules = rulesCondition[j];
|
|
1182
|
-
if (rules.type !== "group") {
|
|
1183
|
-
if (rewrite == null ? void 0 : rewrite[rules.type]) {
|
|
1184
|
-
rulesCondition[j].actived = true;
|
|
1185
|
-
} else {
|
|
1186
|
-
rulesCondition[j].actived = await isActiveRules(rules);
|
|
1187
|
-
}
|
|
1188
|
-
} else if (rules.conditions) {
|
|
1189
|
-
rulesCondition[j].conditions = await activedRulesConditions(rules.conditions);
|
|
1190
|
-
}
|
|
1191
|
-
}
|
|
1192
|
-
return rulesCondition;
|
|
1193
|
-
};
|
|
1194
1143
|
var activedContentRulesConditions = async (conditions, contents) => {
|
|
1195
1144
|
const rulesCondition = [...conditions];
|
|
1196
1145
|
for (let j = 0; j < rulesCondition.length; j++) {
|
|
@@ -1219,20 +1168,6 @@ var activedContentRulesConditions = async (conditions, contents) => {
|
|
|
1219
1168
|
}
|
|
1220
1169
|
return rulesCondition;
|
|
1221
1170
|
};
|
|
1222
|
-
var activedContentCondition = async (contents) => {
|
|
1223
|
-
const _contents = JSON.parse(JSON.stringify(contents));
|
|
1224
|
-
for (let index = 0; index < _contents.length; index++) {
|
|
1225
|
-
const content = _contents[index];
|
|
1226
|
-
const { enabledAutoStartRules, autoStartRules, hideRules, enabledHideRules } = content.config;
|
|
1227
|
-
if (enabledAutoStartRules && autoStartRules && autoStartRules.length > 0) {
|
|
1228
|
-
content.config.autoStartRules = await activedRulesConditions(autoStartRules);
|
|
1229
|
-
}
|
|
1230
|
-
if (enabledHideRules && hideRules && hideRules.length > 0) {
|
|
1231
|
-
content.config.hideRules = await activedRulesConditions(hideRules);
|
|
1232
|
-
}
|
|
1233
|
-
}
|
|
1234
|
-
return _contents;
|
|
1235
|
-
};
|
|
1236
1171
|
var isActive = (autoStartRules) => {
|
|
1237
1172
|
if (!autoStartRules || autoStartRules.length === 0) {
|
|
1238
1173
|
return false;
|
|
@@ -1277,35 +1212,6 @@ var filterAutoStartContent = (contents, type) => {
|
|
|
1277
1212
|
return content.type === type && isActive2 && isValid;
|
|
1278
1213
|
}).sort(priorityCompare);
|
|
1279
1214
|
};
|
|
1280
|
-
var isHasActivedContents = (source, dest) => {
|
|
1281
|
-
for (let index = 0; index < source.length; index++) {
|
|
1282
|
-
const content1 = source[index];
|
|
1283
|
-
const content2 = dest.find((c) => c.id === content1.id);
|
|
1284
|
-
if (!content2) {
|
|
1285
|
-
return true;
|
|
1286
|
-
}
|
|
1287
|
-
if (isActiveContent(content1) !== isActiveContent(content2)) {
|
|
1288
|
-
return true;
|
|
1289
|
-
}
|
|
1290
|
-
}
|
|
1291
|
-
return false;
|
|
1292
|
-
};
|
|
1293
|
-
var isSameContents = (source, dest) => {
|
|
1294
|
-
if (!source || !dest || source.length !== dest.length) {
|
|
1295
|
-
return false;
|
|
1296
|
-
}
|
|
1297
|
-
for (let index = 0; index < source.length; index++) {
|
|
1298
|
-
const content1 = source[index];
|
|
1299
|
-
const content2 = dest.find((c) => c.id === content1.id);
|
|
1300
|
-
if (!content2) {
|
|
1301
|
-
return false;
|
|
1302
|
-
}
|
|
1303
|
-
if (!conditionsIsSame(content1.config.autoStartRules, content2.config.autoStartRules)) {
|
|
1304
|
-
return false;
|
|
1305
|
-
}
|
|
1306
|
-
}
|
|
1307
|
-
return true;
|
|
1308
|
-
};
|
|
1309
1215
|
var getLatestEvent = (currentContent, contents, eventCodeName) => {
|
|
1310
1216
|
var _a;
|
|
1311
1217
|
const bizEvents = [];
|
|
@@ -1506,41 +1412,19 @@ var parseUrlParams = (url, paramName) => {
|
|
|
1506
1412
|
return null;
|
|
1507
1413
|
}
|
|
1508
1414
|
};
|
|
1509
|
-
var wait = (seconds) => {
|
|
1510
|
-
if (typeof seconds !== "number" || Number.isNaN(seconds)) {
|
|
1511
|
-
return Promise.reject(new Error("Invalid wait time: must be a number"));
|
|
1512
|
-
}
|
|
1513
|
-
if (seconds < 0) {
|
|
1514
|
-
return Promise.reject(new Error("Invalid wait time: cannot be negative"));
|
|
1515
|
-
}
|
|
1516
|
-
if (seconds === 0) {
|
|
1517
|
-
return Promise.resolve();
|
|
1518
|
-
}
|
|
1519
|
-
return new Promise((resolve, reject) => {
|
|
1520
|
-
try {
|
|
1521
|
-
setTimeout(resolve, seconds * 1e3);
|
|
1522
|
-
} catch (error) {
|
|
1523
|
-
reject(error);
|
|
1524
|
-
}
|
|
1525
|
-
});
|
|
1526
|
-
};
|
|
1527
1415
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1528
1416
|
0 && (module.exports = {
|
|
1529
1417
|
AbortController,
|
|
1530
1418
|
ArrayProto,
|
|
1531
|
-
PRIORITIES,
|
|
1532
1419
|
XMLHttpRequest,
|
|
1533
1420
|
absoluteUrl,
|
|
1534
|
-
activedContentCondition,
|
|
1535
1421
|
activedContentRulesConditions,
|
|
1536
|
-
activedRulesConditions,
|
|
1537
1422
|
assignableWindow,
|
|
1538
1423
|
autoStartConditions,
|
|
1539
1424
|
buildConfig,
|
|
1540
1425
|
checklistIsDimissed,
|
|
1541
1426
|
checklistIsSeen,
|
|
1542
1427
|
cn,
|
|
1543
|
-
completeEventMapping,
|
|
1544
1428
|
conditionsIsSame,
|
|
1545
1429
|
convertSettings,
|
|
1546
1430
|
convertToCssVars,
|
|
@@ -1552,7 +1436,6 @@ var wait = (seconds) => {
|
|
|
1552
1436
|
evalCode,
|
|
1553
1437
|
fetch,
|
|
1554
1438
|
filterAutoStartContent,
|
|
1555
|
-
findLatestEvent,
|
|
1556
1439
|
flowIsDismissed,
|
|
1557
1440
|
flowIsSeen,
|
|
1558
1441
|
formatDate,
|
|
@@ -1577,13 +1460,11 @@ var wait = (seconds) => {
|
|
|
1577
1460
|
hexToHSLString,
|
|
1578
1461
|
hexToRGBStr,
|
|
1579
1462
|
hexToRgb,
|
|
1580
|
-
|
|
1581
|
-
isActiveContent,
|
|
1463
|
+
isActiveRulesByCurrentTime,
|
|
1582
1464
|
isArray,
|
|
1583
1465
|
isBoolean,
|
|
1584
1466
|
isDark,
|
|
1585
1467
|
isDate,
|
|
1586
|
-
isDismissedEventMapping,
|
|
1587
1468
|
isDocument,
|
|
1588
1469
|
isEmptyObject,
|
|
1589
1470
|
isEmptyString,
|
|
@@ -1591,7 +1472,6 @@ var wait = (seconds) => {
|
|
|
1591
1472
|
isFile,
|
|
1592
1473
|
isFormData,
|
|
1593
1474
|
isFunction,
|
|
1594
|
-
isHasActivedContents,
|
|
1595
1475
|
isMatchUrlPattern,
|
|
1596
1476
|
isNull,
|
|
1597
1477
|
isNullish,
|
|
@@ -1599,7 +1479,6 @@ var wait = (seconds) => {
|
|
|
1599
1479
|
isObject,
|
|
1600
1480
|
isPublishedAtLeastOneEnvironment,
|
|
1601
1481
|
isPublishedInAllEnvironments,
|
|
1602
|
-
isSameContents,
|
|
1603
1482
|
isString,
|
|
1604
1483
|
isUint8Array,
|
|
1605
1484
|
isUndefined,
|
|
@@ -1613,11 +1492,9 @@ var wait = (seconds) => {
|
|
|
1613
1492
|
navigator,
|
|
1614
1493
|
parseUrlParams,
|
|
1615
1494
|
removeAuthToken,
|
|
1616
|
-
rulesTypes,
|
|
1617
1495
|
setAuthToken,
|
|
1618
1496
|
storage,
|
|
1619
1497
|
userAgent,
|
|
1620
1498
|
uuidV4,
|
|
1621
|
-
wait,
|
|
1622
1499
|
window
|
|
1623
1500
|
});
|
package/dist/index.d.cts
CHANGED
|
@@ -11,7 +11,7 @@ export { isPublishedAtLeastOneEnvironment, isPublishedInAllEnvironments } from '
|
|
|
11
11
|
export { deepClone } from './utils.cjs';
|
|
12
12
|
export { generateAutoStateColors, hexToHSLString, hexToRGBStr } from './color.cjs';
|
|
13
13
|
export { absoluteUrl, cn, cuid, evalCode, formatDate, getRandomColor, hexToRgb, isDark, uuidV4 } from './helper.cjs';
|
|
14
|
-
export {
|
|
14
|
+
export { activedContentRulesConditions, checklistIsDimissed, checklistIsSeen, filterAutoStartContent, flowIsDismissed, flowIsSeen, isActiveRulesByCurrentTime, isValidContent, parseUrlParams } from './conditions.cjs';
|
|
15
15
|
export { default as isEqual } from 'fast-deep-equal';
|
|
16
16
|
import '@usertour/types';
|
|
17
17
|
import './storage.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ export { isPublishedAtLeastOneEnvironment, isPublishedInAllEnvironments } from '
|
|
|
11
11
|
export { deepClone } from './utils.js';
|
|
12
12
|
export { generateAutoStateColors, hexToHSLString, hexToRGBStr } from './color.js';
|
|
13
13
|
export { absoluteUrl, cn, cuid, evalCode, formatDate, getRandomColor, hexToRgb, isDark, uuidV4 } from './helper.js';
|
|
14
|
-
export {
|
|
14
|
+
export { activedContentRulesConditions, checklistIsDimissed, checklistIsSeen, filterAutoStartContent, flowIsDismissed, flowIsSeen, isActiveRulesByCurrentTime, isValidContent, parseUrlParams } from './conditions.js';
|
|
15
15
|
export { default as isEqual } from 'fast-deep-equal';
|
|
16
16
|
import '@usertour/types';
|
|
17
17
|
import './storage.js';
|
package/dist/index.js
CHANGED
|
@@ -40,27 +40,16 @@ import {
|
|
|
40
40
|
win
|
|
41
41
|
} from "./chunk-H7VA3ML2.js";
|
|
42
42
|
import {
|
|
43
|
-
PRIORITIES,
|
|
44
|
-
activedContentCondition,
|
|
45
43
|
activedContentRulesConditions,
|
|
46
|
-
activedRulesConditions,
|
|
47
44
|
checklistIsDimissed,
|
|
48
45
|
checklistIsSeen,
|
|
49
|
-
completeEventMapping,
|
|
50
46
|
filterAutoStartContent,
|
|
51
|
-
findLatestEvent,
|
|
52
47
|
flowIsDismissed,
|
|
53
48
|
flowIsSeen,
|
|
54
|
-
|
|
55
|
-
isActiveContent,
|
|
56
|
-
isDismissedEventMapping,
|
|
57
|
-
isHasActivedContents,
|
|
58
|
-
isSameContents,
|
|
49
|
+
isActiveRulesByCurrentTime,
|
|
59
50
|
isValidContent,
|
|
60
|
-
parseUrlParams
|
|
61
|
-
|
|
62
|
-
wait
|
|
63
|
-
} from "./chunk-UT6OPCUX.js";
|
|
51
|
+
parseUrlParams
|
|
52
|
+
} from "./chunk-SYVTGB2A.js";
|
|
64
53
|
import {
|
|
65
54
|
conditionsIsSame,
|
|
66
55
|
isEqual,
|
|
@@ -125,19 +114,15 @@ import "./chunk-XEO3YXBM.js";
|
|
|
125
114
|
export {
|
|
126
115
|
AbortController,
|
|
127
116
|
ArrayProto,
|
|
128
|
-
PRIORITIES,
|
|
129
117
|
XMLHttpRequest,
|
|
130
118
|
absoluteUrl,
|
|
131
|
-
activedContentCondition,
|
|
132
119
|
activedContentRulesConditions,
|
|
133
|
-
activedRulesConditions,
|
|
134
120
|
assignableWindow,
|
|
135
121
|
autoStartConditions,
|
|
136
122
|
buildConfig,
|
|
137
123
|
checklistIsDimissed,
|
|
138
124
|
checklistIsSeen,
|
|
139
125
|
cn,
|
|
140
|
-
completeEventMapping,
|
|
141
126
|
conditionsIsSame,
|
|
142
127
|
convertSettings,
|
|
143
128
|
convertToCssVars,
|
|
@@ -149,7 +134,6 @@ export {
|
|
|
149
134
|
evalCode,
|
|
150
135
|
fetch,
|
|
151
136
|
filterAutoStartContent,
|
|
152
|
-
findLatestEvent,
|
|
153
137
|
flowIsDismissed,
|
|
154
138
|
flowIsSeen,
|
|
155
139
|
formatDate,
|
|
@@ -174,13 +158,11 @@ export {
|
|
|
174
158
|
hexToHSLString,
|
|
175
159
|
hexToRGBStr,
|
|
176
160
|
hexToRgb,
|
|
177
|
-
|
|
178
|
-
isActiveContent,
|
|
161
|
+
isActiveRulesByCurrentTime,
|
|
179
162
|
isArray,
|
|
180
163
|
isBoolean,
|
|
181
164
|
isDark,
|
|
182
165
|
isDate,
|
|
183
|
-
isDismissedEventMapping,
|
|
184
166
|
isDocument,
|
|
185
167
|
isEmptyObject,
|
|
186
168
|
isEmptyString,
|
|
@@ -188,7 +170,6 @@ export {
|
|
|
188
170
|
isFile,
|
|
189
171
|
isFormData,
|
|
190
172
|
isFunction,
|
|
191
|
-
isHasActivedContents,
|
|
192
173
|
isMatchUrlPattern,
|
|
193
174
|
isNull,
|
|
194
175
|
isNullish,
|
|
@@ -196,7 +177,6 @@ export {
|
|
|
196
177
|
isObject,
|
|
197
178
|
isPublishedAtLeastOneEnvironment,
|
|
198
179
|
isPublishedInAllEnvironments,
|
|
199
|
-
isSameContents,
|
|
200
180
|
isString,
|
|
201
181
|
isUint8Array,
|
|
202
182
|
isUndefined,
|
|
@@ -210,11 +190,9 @@ export {
|
|
|
210
190
|
navigator,
|
|
211
191
|
parseUrlParams,
|
|
212
192
|
removeAuthToken,
|
|
213
|
-
rulesTypes,
|
|
214
193
|
setAuthToken,
|
|
215
194
|
storage,
|
|
216
195
|
userAgent,
|
|
217
196
|
uuidV4,
|
|
218
|
-
wait,
|
|
219
197
|
win as window
|
|
220
198
|
};
|