@usertour/helpers 0.0.47 → 0.0.48
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/__tests__/content-helper.test.cjs +1009 -0
- package/dist/__tests__/content-helper.test.d.cts +2 -0
- package/dist/__tests__/content-helper.test.d.ts +2 -0
- package/dist/__tests__/content-helper.test.js +716 -0
- package/dist/chunk-7GJAPR7Y.js +218 -0
- package/dist/content-helper.cjs +67 -23
- package/dist/content-helper.d.cts +34 -9
- package/dist/content-helper.d.ts +34 -9
- package/dist/content-helper.js +25 -169
- package/dist/index.cjs +217 -0
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +30 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -49,11 +49,17 @@ __export(src_exports, {
|
|
|
49
49
|
convertSettings: () => convertSettings,
|
|
50
50
|
convertTimeConditionLegacyToV2: () => convertTimeConditionLegacyToV2,
|
|
51
51
|
convertToCssVars: () => convertToCssVars,
|
|
52
|
+
createStepCopy: () => createStepCopy,
|
|
52
53
|
cuid: () => cuid,
|
|
53
54
|
deepClone: () => deepClone,
|
|
54
55
|
defaultContentConfig: () => defaultContentConfig,
|
|
55
56
|
defaultStep: () => defaultStep,
|
|
56
57
|
document: () => document,
|
|
58
|
+
duplicateChecklistData: () => duplicateChecklistData,
|
|
59
|
+
duplicateConfig: () => duplicateConfig,
|
|
60
|
+
duplicateData: () => duplicateData,
|
|
61
|
+
duplicateTarget: () => duplicateTarget,
|
|
62
|
+
duplicateTriggers: () => duplicateTriggers,
|
|
57
63
|
evalCode: () => evalCode,
|
|
58
64
|
evaluateAttributeCondition: () => evaluateAttributeCondition,
|
|
59
65
|
evaluateRule: () => evaluateRule,
|
|
@@ -61,11 +67,13 @@ __export(src_exports, {
|
|
|
61
67
|
evaluateTimeCondition: () => evaluateTimeCondition,
|
|
62
68
|
evaluateUrlCondition: () => evaluateUrlCondition,
|
|
63
69
|
extractLinkUrl: () => extractLinkUrl,
|
|
70
|
+
extractQuestionData: () => extractQuestionData,
|
|
64
71
|
fetch: () => fetch,
|
|
65
72
|
filterConditionsByType: () => filterConditionsByType,
|
|
66
73
|
filterNullAttributes: () => filterNullAttributes,
|
|
67
74
|
formatDate: () => formatDate,
|
|
68
75
|
generateAutoStateColors: () => generateAutoStateColors,
|
|
76
|
+
generateUniqueCopyName: () => generateUniqueCopyName,
|
|
69
77
|
getAttributeType: () => getAttributeType,
|
|
70
78
|
getAuthToken: () => getAuthToken,
|
|
71
79
|
getCodeError: () => getCodeError,
|
|
@@ -84,11 +92,13 @@ __export(src_exports, {
|
|
|
84
92
|
getWaitError: () => getWaitError,
|
|
85
93
|
hasActionError: () => hasActionError,
|
|
86
94
|
hasError: () => hasError,
|
|
95
|
+
hasMissingRequiredData: () => hasMissingRequiredData,
|
|
87
96
|
hexToHSLString: () => hexToHSLString,
|
|
88
97
|
hexToRGBStr: () => hexToRGBStr,
|
|
89
98
|
hexToRgb: () => hexToRgb,
|
|
90
99
|
isArray: () => isArray,
|
|
91
100
|
isBoolean: () => isBoolean,
|
|
101
|
+
isClickableElement: () => isClickableElement,
|
|
92
102
|
isConditionsActived: () => isConditionsActived,
|
|
93
103
|
isDark: () => isDark,
|
|
94
104
|
isDate: () => isDate,
|
|
@@ -100,12 +110,15 @@ __export(src_exports, {
|
|
|
100
110
|
isFormData: () => isFormData,
|
|
101
111
|
isFunction: () => isFunction,
|
|
102
112
|
isMatchUrlPattern: () => isMatchUrlPattern,
|
|
113
|
+
isMissingRequiredData: () => isMissingRequiredData,
|
|
103
114
|
isNull: () => isNull,
|
|
104
115
|
isNullish: () => isNullish,
|
|
105
116
|
isNumber: () => isNumber,
|
|
106
117
|
isObject: () => isObject,
|
|
107
118
|
isPublishedAtLeastOneEnvironment: () => isPublishedAtLeastOneEnvironment,
|
|
108
119
|
isPublishedInAllEnvironments: () => isPublishedInAllEnvironments,
|
|
120
|
+
isQuestionElement: () => isQuestionElement,
|
|
121
|
+
isRestrictedType: () => isRestrictedType,
|
|
109
122
|
isString: () => isString,
|
|
110
123
|
isTimeConditionDataLegacy: () => isTimeConditionDataLegacy,
|
|
111
124
|
isTimeConditionDataV2: () => isTimeConditionDataV2,
|
|
@@ -121,6 +134,7 @@ __export(src_exports, {
|
|
|
121
134
|
navigator: () => navigator,
|
|
122
135
|
normalizeTimeConditionData: () => normalizeTimeConditionData,
|
|
123
136
|
parseUrlParams: () => parseUrlParams,
|
|
137
|
+
processQuestionElements: () => processQuestionElements,
|
|
124
138
|
regenerateConditionIds: () => regenerateConditionIds,
|
|
125
139
|
removeAuthToken: () => removeAuthToken,
|
|
126
140
|
replaceUserAttr: () => replaceUserAttr,
|
|
@@ -1690,6 +1704,195 @@ var filterNullAttributes = (attributes) => {
|
|
|
1690
1704
|
}
|
|
1691
1705
|
return attrs;
|
|
1692
1706
|
};
|
|
1707
|
+
|
|
1708
|
+
// src/content-helper.ts
|
|
1709
|
+
var import_types7 = require("@usertour/types");
|
|
1710
|
+
var isRestrictedType = (type) => {
|
|
1711
|
+
const restrictedTypes = [
|
|
1712
|
+
import_types7.ContentEditorElementType.NPS,
|
|
1713
|
+
import_types7.ContentEditorElementType.STAR_RATING,
|
|
1714
|
+
import_types7.ContentEditorElementType.SCALE,
|
|
1715
|
+
import_types7.ContentEditorElementType.SINGLE_LINE_TEXT,
|
|
1716
|
+
import_types7.ContentEditorElementType.MULTI_LINE_TEXT,
|
|
1717
|
+
import_types7.ContentEditorElementType.MULTIPLE_CHOICE
|
|
1718
|
+
];
|
|
1719
|
+
return restrictedTypes.includes(type);
|
|
1720
|
+
};
|
|
1721
|
+
var isMissingRequiredData = (element) => {
|
|
1722
|
+
var _a, _b, _c, _d;
|
|
1723
|
+
if (isRestrictedType(element.type)) {
|
|
1724
|
+
return isEmptyString((_a = element.data) == null ? void 0 : _a.name);
|
|
1725
|
+
}
|
|
1726
|
+
if (element.type === import_types7.ContentEditorElementType.BUTTON) {
|
|
1727
|
+
if (isEmptyString((_b = element.data) == null ? void 0 : _b.text)) {
|
|
1728
|
+
return true;
|
|
1729
|
+
}
|
|
1730
|
+
if (!((_c = element == null ? void 0 : element.data) == null ? void 0 : _c.actions) || ((_d = element == null ? void 0 : element.data) == null ? void 0 : _d.actions.length) === 0) {
|
|
1731
|
+
return true;
|
|
1732
|
+
}
|
|
1733
|
+
}
|
|
1734
|
+
return false;
|
|
1735
|
+
};
|
|
1736
|
+
var hasMissingRequiredData = (contents) => {
|
|
1737
|
+
return contents.some(
|
|
1738
|
+
(group) => group.children.some(
|
|
1739
|
+
(column) => column.children.some((item) => isMissingRequiredData(item.element))
|
|
1740
|
+
)
|
|
1741
|
+
);
|
|
1742
|
+
};
|
|
1743
|
+
var isQuestionElement = (element) => {
|
|
1744
|
+
return element.type === import_types7.ContentEditorElementType.SINGLE_LINE_TEXT || element.type === import_types7.ContentEditorElementType.MULTI_LINE_TEXT || element.type === import_types7.ContentEditorElementType.NPS || element.type === import_types7.ContentEditorElementType.STAR_RATING || element.type === import_types7.ContentEditorElementType.SCALE || element.type === import_types7.ContentEditorElementType.MULTIPLE_CHOICE;
|
|
1745
|
+
};
|
|
1746
|
+
var isClickableElement = (element) => {
|
|
1747
|
+
return element.type === import_types7.ContentEditorElementType.BUTTON || isQuestionElement(element);
|
|
1748
|
+
};
|
|
1749
|
+
var extractQuestionData = (data) => {
|
|
1750
|
+
const result = [];
|
|
1751
|
+
function isQuestionRootElement(item) {
|
|
1752
|
+
return "element" in item && isQuestionElement(item.element);
|
|
1753
|
+
}
|
|
1754
|
+
function traverse(item) {
|
|
1755
|
+
if (isQuestionRootElement(item)) {
|
|
1756
|
+
result.push(item.element);
|
|
1757
|
+
}
|
|
1758
|
+
if ("children" in item && item.children) {
|
|
1759
|
+
for (const child of item.children) {
|
|
1760
|
+
traverse(child);
|
|
1761
|
+
}
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
for (const item of data) {
|
|
1765
|
+
traverse(item);
|
|
1766
|
+
}
|
|
1767
|
+
return result;
|
|
1768
|
+
};
|
|
1769
|
+
var processQuestionElements = (contents) => {
|
|
1770
|
+
if (!contents || !isArray(contents) || contents.length === 0) {
|
|
1771
|
+
return [];
|
|
1772
|
+
}
|
|
1773
|
+
return contents.map((group) => ({
|
|
1774
|
+
...group,
|
|
1775
|
+
children: group.children.map((column) => ({
|
|
1776
|
+
...column,
|
|
1777
|
+
children: column.children.map((item) => {
|
|
1778
|
+
var _a, _b;
|
|
1779
|
+
const element = item.element;
|
|
1780
|
+
if (isQuestionElement(element)) {
|
|
1781
|
+
const questionElement = element;
|
|
1782
|
+
const updatedElement = {
|
|
1783
|
+
...questionElement,
|
|
1784
|
+
data: {
|
|
1785
|
+
...questionElement.data,
|
|
1786
|
+
cvid: cuid(),
|
|
1787
|
+
...((_a = questionElement.data) == null ? void 0 : _a.actions) && isArray(questionElement.data.actions) ? { actions: regenerateConditionIds(questionElement.data.actions) } : {}
|
|
1788
|
+
}
|
|
1789
|
+
};
|
|
1790
|
+
return {
|
|
1791
|
+
...item,
|
|
1792
|
+
element: updatedElement
|
|
1793
|
+
};
|
|
1794
|
+
}
|
|
1795
|
+
if (element.type === import_types7.ContentEditorElementType.BUTTON) {
|
|
1796
|
+
const buttonElement = element;
|
|
1797
|
+
if (((_b = buttonElement.data) == null ? void 0 : _b.actions) && isArray(buttonElement.data.actions)) {
|
|
1798
|
+
return {
|
|
1799
|
+
...item,
|
|
1800
|
+
element: {
|
|
1801
|
+
...buttonElement,
|
|
1802
|
+
data: {
|
|
1803
|
+
...buttonElement.data,
|
|
1804
|
+
actions: regenerateConditionIds(buttonElement.data.actions)
|
|
1805
|
+
}
|
|
1806
|
+
}
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
}
|
|
1810
|
+
return item;
|
|
1811
|
+
})
|
|
1812
|
+
}))
|
|
1813
|
+
}));
|
|
1814
|
+
};
|
|
1815
|
+
var generateUniqueCopyName = (originalName, existingNames) => {
|
|
1816
|
+
let name = `${originalName} (copy)`;
|
|
1817
|
+
if (existingNames == null ? void 0 : existingNames.includes(name)) {
|
|
1818
|
+
let number = 2;
|
|
1819
|
+
while (existingNames.includes(`${originalName} (copy ${number})`)) {
|
|
1820
|
+
number++;
|
|
1821
|
+
}
|
|
1822
|
+
name = `${originalName} (copy ${number})`;
|
|
1823
|
+
}
|
|
1824
|
+
return name;
|
|
1825
|
+
};
|
|
1826
|
+
var duplicateTriggers = (triggers) => {
|
|
1827
|
+
if (!isArray(triggers)) {
|
|
1828
|
+
return triggers;
|
|
1829
|
+
}
|
|
1830
|
+
return triggers.map((trigger) => ({
|
|
1831
|
+
...trigger,
|
|
1832
|
+
id: cuid(),
|
|
1833
|
+
actions: isArray(trigger.actions) ? regenerateConditionIds(trigger.actions) : trigger.actions,
|
|
1834
|
+
conditions: isArray(trigger.conditions) ? regenerateConditionIds(trigger.conditions) : trigger.conditions
|
|
1835
|
+
}));
|
|
1836
|
+
};
|
|
1837
|
+
var duplicateTarget = (target) => {
|
|
1838
|
+
if (!target) {
|
|
1839
|
+
return void 0;
|
|
1840
|
+
}
|
|
1841
|
+
if (target.actions && isArray(target.actions)) {
|
|
1842
|
+
return {
|
|
1843
|
+
...target,
|
|
1844
|
+
actions: regenerateConditionIds(target.actions)
|
|
1845
|
+
};
|
|
1846
|
+
}
|
|
1847
|
+
return target;
|
|
1848
|
+
};
|
|
1849
|
+
var duplicateChecklistData = (data) => {
|
|
1850
|
+
if (!data || !isObject(data) || !isArray(data.items)) {
|
|
1851
|
+
return data;
|
|
1852
|
+
}
|
|
1853
|
+
const checklistData = data;
|
|
1854
|
+
return {
|
|
1855
|
+
...checklistData,
|
|
1856
|
+
items: checklistData.items.map((item) => ({
|
|
1857
|
+
...item,
|
|
1858
|
+
id: uuidV4(),
|
|
1859
|
+
clickedActions: isArray(item.clickedActions) ? regenerateConditionIds(item.clickedActions) : item.clickedActions,
|
|
1860
|
+
completeConditions: isArray(item.completeConditions) ? regenerateConditionIds(item.completeConditions) : item.completeConditions,
|
|
1861
|
+
onlyShowTaskConditions: isArray(item.onlyShowTaskConditions) ? regenerateConditionIds(item.onlyShowTaskConditions) : item.onlyShowTaskConditions
|
|
1862
|
+
}))
|
|
1863
|
+
};
|
|
1864
|
+
};
|
|
1865
|
+
var duplicateConfig = (config) => {
|
|
1866
|
+
if (!config) {
|
|
1867
|
+
return config;
|
|
1868
|
+
}
|
|
1869
|
+
return {
|
|
1870
|
+
...config,
|
|
1871
|
+
autoStartRules: config.autoStartRules ? regenerateConditionIds(config.autoStartRules) : config.autoStartRules,
|
|
1872
|
+
hideRules: config.hideRules ? regenerateConditionIds(config.hideRules) : config.hideRules
|
|
1873
|
+
};
|
|
1874
|
+
};
|
|
1875
|
+
var duplicateData = (data, contentType) => {
|
|
1876
|
+
if (contentType === import_types7.ContentDataType.CHECKLIST) {
|
|
1877
|
+
return duplicateChecklistData(data);
|
|
1878
|
+
}
|
|
1879
|
+
return data;
|
|
1880
|
+
};
|
|
1881
|
+
var createStepCopy = (originalStep, sequence, existingStepNames) => {
|
|
1882
|
+
const { id, cvid, updatedAt, createdAt, ...rest } = originalStep;
|
|
1883
|
+
const name = generateUniqueCopyName(originalStep == null ? void 0 : originalStep.name, existingStepNames);
|
|
1884
|
+
const trigger = (originalStep == null ? void 0 : originalStep.trigger) ? duplicateTriggers(originalStep == null ? void 0 : originalStep.trigger) : [];
|
|
1885
|
+
const data = (originalStep == null ? void 0 : originalStep.data) ? processQuestionElements(originalStep == null ? void 0 : originalStep.data) : [];
|
|
1886
|
+
const target = duplicateTarget(originalStep == null ? void 0 : originalStep.target);
|
|
1887
|
+
return {
|
|
1888
|
+
...rest,
|
|
1889
|
+
data,
|
|
1890
|
+
trigger,
|
|
1891
|
+
target,
|
|
1892
|
+
name,
|
|
1893
|
+
sequence
|
|
1894
|
+
};
|
|
1895
|
+
};
|
|
1693
1896
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1694
1897
|
0 && (module.exports = {
|
|
1695
1898
|
AbortController,
|
|
@@ -1706,11 +1909,17 @@ var filterNullAttributes = (attributes) => {
|
|
|
1706
1909
|
convertSettings,
|
|
1707
1910
|
convertTimeConditionLegacyToV2,
|
|
1708
1911
|
convertToCssVars,
|
|
1912
|
+
createStepCopy,
|
|
1709
1913
|
cuid,
|
|
1710
1914
|
deepClone,
|
|
1711
1915
|
defaultContentConfig,
|
|
1712
1916
|
defaultStep,
|
|
1713
1917
|
document,
|
|
1918
|
+
duplicateChecklistData,
|
|
1919
|
+
duplicateConfig,
|
|
1920
|
+
duplicateData,
|
|
1921
|
+
duplicateTarget,
|
|
1922
|
+
duplicateTriggers,
|
|
1714
1923
|
evalCode,
|
|
1715
1924
|
evaluateAttributeCondition,
|
|
1716
1925
|
evaluateRule,
|
|
@@ -1718,11 +1927,13 @@ var filterNullAttributes = (attributes) => {
|
|
|
1718
1927
|
evaluateTimeCondition,
|
|
1719
1928
|
evaluateUrlCondition,
|
|
1720
1929
|
extractLinkUrl,
|
|
1930
|
+
extractQuestionData,
|
|
1721
1931
|
fetch,
|
|
1722
1932
|
filterConditionsByType,
|
|
1723
1933
|
filterNullAttributes,
|
|
1724
1934
|
formatDate,
|
|
1725
1935
|
generateAutoStateColors,
|
|
1936
|
+
generateUniqueCopyName,
|
|
1726
1937
|
getAttributeType,
|
|
1727
1938
|
getAuthToken,
|
|
1728
1939
|
getCodeError,
|
|
@@ -1741,11 +1952,13 @@ var filterNullAttributes = (attributes) => {
|
|
|
1741
1952
|
getWaitError,
|
|
1742
1953
|
hasActionError,
|
|
1743
1954
|
hasError,
|
|
1955
|
+
hasMissingRequiredData,
|
|
1744
1956
|
hexToHSLString,
|
|
1745
1957
|
hexToRGBStr,
|
|
1746
1958
|
hexToRgb,
|
|
1747
1959
|
isArray,
|
|
1748
1960
|
isBoolean,
|
|
1961
|
+
isClickableElement,
|
|
1749
1962
|
isConditionsActived,
|
|
1750
1963
|
isDark,
|
|
1751
1964
|
isDate,
|
|
@@ -1757,12 +1970,15 @@ var filterNullAttributes = (attributes) => {
|
|
|
1757
1970
|
isFormData,
|
|
1758
1971
|
isFunction,
|
|
1759
1972
|
isMatchUrlPattern,
|
|
1973
|
+
isMissingRequiredData,
|
|
1760
1974
|
isNull,
|
|
1761
1975
|
isNullish,
|
|
1762
1976
|
isNumber,
|
|
1763
1977
|
isObject,
|
|
1764
1978
|
isPublishedAtLeastOneEnvironment,
|
|
1765
1979
|
isPublishedInAllEnvironments,
|
|
1980
|
+
isQuestionElement,
|
|
1981
|
+
isRestrictedType,
|
|
1766
1982
|
isString,
|
|
1767
1983
|
isTimeConditionDataLegacy,
|
|
1768
1984
|
isTimeConditionDataV2,
|
|
@@ -1778,6 +1994,7 @@ var filterNullAttributes = (attributes) => {
|
|
|
1778
1994
|
navigator,
|
|
1779
1995
|
normalizeTimeConditionData,
|
|
1780
1996
|
parseUrlParams,
|
|
1997
|
+
processQuestionElements,
|
|
1781
1998
|
regenerateConditionIds,
|
|
1782
1999
|
removeAuthToken,
|
|
1783
2000
|
replaceUserAttr,
|
package/dist/index.d.cts
CHANGED
|
@@ -14,6 +14,7 @@ export { evaluateUrlCondition, isMatchUrlPattern } from './conditions/url.cjs';
|
|
|
14
14
|
export { convertTimeConditionLegacyToV2, evaluateTimeCondition, isTimeConditionDataLegacy, isTimeConditionDataV2, normalizeTimeConditionData } from './conditions/time.cjs';
|
|
15
15
|
export { evaluateAttributeCondition } from './conditions/attribute.cjs';
|
|
16
16
|
export { capitalizeFirstLetter, filterNullAttributes, getAttributeType, isValidISO8601 } from './attribute.cjs';
|
|
17
|
+
export { createStepCopy, duplicateChecklistData, duplicateConfig, duplicateData, duplicateTarget, duplicateTriggers, extractQuestionData, generateUniqueCopyName, hasMissingRequiredData, isClickableElement, isMissingRequiredData, isQuestionElement, isRestrictedType, processQuestionElements } from './content-helper.cjs';
|
|
17
18
|
export { default as isEqual } from 'fast-deep-equal';
|
|
18
19
|
import '@usertour/types';
|
|
19
20
|
import './storage.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { evaluateUrlCondition, isMatchUrlPattern } from './conditions/url.js';
|
|
|
14
14
|
export { convertTimeConditionLegacyToV2, evaluateTimeCondition, isTimeConditionDataLegacy, isTimeConditionDataV2, normalizeTimeConditionData } from './conditions/time.js';
|
|
15
15
|
export { evaluateAttributeCondition } from './conditions/attribute.js';
|
|
16
16
|
export { capitalizeFirstLetter, filterNullAttributes, getAttributeType, isValidISO8601 } from './attribute.js';
|
|
17
|
+
export { createStepCopy, duplicateChecklistData, duplicateConfig, duplicateData, duplicateTarget, duplicateTriggers, extractQuestionData, generateUniqueCopyName, hasMissingRequiredData, isClickableElement, isMissingRequiredData, isQuestionElement, isRestrictedType, processQuestionElements } from './content-helper.js';
|
|
17
18
|
export { default as isEqual } from 'fast-deep-equal';
|
|
18
19
|
import '@usertour/types';
|
|
19
20
|
import './storage.js';
|
package/dist/index.js
CHANGED
|
@@ -22,6 +22,22 @@ import {
|
|
|
22
22
|
storage
|
|
23
23
|
} from "./chunk-FGFMTWFT.js";
|
|
24
24
|
import "./chunk-3ZGH3NRU.js";
|
|
25
|
+
import {
|
|
26
|
+
createStepCopy,
|
|
27
|
+
duplicateChecklistData,
|
|
28
|
+
duplicateConfig,
|
|
29
|
+
duplicateData,
|
|
30
|
+
duplicateTarget,
|
|
31
|
+
duplicateTriggers,
|
|
32
|
+
extractQuestionData,
|
|
33
|
+
generateUniqueCopyName,
|
|
34
|
+
hasMissingRequiredData,
|
|
35
|
+
isClickableElement,
|
|
36
|
+
isMissingRequiredData,
|
|
37
|
+
isQuestionElement,
|
|
38
|
+
isRestrictedType,
|
|
39
|
+
processQuestionElements
|
|
40
|
+
} from "./chunk-7GJAPR7Y.js";
|
|
25
41
|
import "./chunk-7ODE2AIC.js";
|
|
26
42
|
import {
|
|
27
43
|
allConditionsHaveIds,
|
|
@@ -144,11 +160,17 @@ export {
|
|
|
144
160
|
convertSettings,
|
|
145
161
|
convertTimeConditionLegacyToV2,
|
|
146
162
|
convertToCssVars,
|
|
163
|
+
createStepCopy,
|
|
147
164
|
cuid,
|
|
148
165
|
deepClone,
|
|
149
166
|
defaultContentConfig,
|
|
150
167
|
defaultStep,
|
|
151
168
|
document,
|
|
169
|
+
duplicateChecklistData,
|
|
170
|
+
duplicateConfig,
|
|
171
|
+
duplicateData,
|
|
172
|
+
duplicateTarget,
|
|
173
|
+
duplicateTriggers,
|
|
152
174
|
evalCode,
|
|
153
175
|
evaluateAttributeCondition,
|
|
154
176
|
evaluateRule,
|
|
@@ -156,11 +178,13 @@ export {
|
|
|
156
178
|
evaluateTimeCondition,
|
|
157
179
|
evaluateUrlCondition,
|
|
158
180
|
extractLinkUrl,
|
|
181
|
+
extractQuestionData,
|
|
159
182
|
fetch,
|
|
160
183
|
filterConditionsByType,
|
|
161
184
|
filterNullAttributes,
|
|
162
185
|
formatDate,
|
|
163
186
|
generateAutoStateColors,
|
|
187
|
+
generateUniqueCopyName,
|
|
164
188
|
getAttributeType,
|
|
165
189
|
getAuthToken,
|
|
166
190
|
getCodeError,
|
|
@@ -179,11 +203,13 @@ export {
|
|
|
179
203
|
getWaitError,
|
|
180
204
|
hasActionError,
|
|
181
205
|
hasError,
|
|
206
|
+
hasMissingRequiredData,
|
|
182
207
|
hexToHSLString,
|
|
183
208
|
hexToRGBStr,
|
|
184
209
|
hexToRgb,
|
|
185
210
|
isArray,
|
|
186
211
|
isBoolean,
|
|
212
|
+
isClickableElement,
|
|
187
213
|
isConditionsActived,
|
|
188
214
|
isDark,
|
|
189
215
|
isDate,
|
|
@@ -195,12 +221,15 @@ export {
|
|
|
195
221
|
isFormData,
|
|
196
222
|
isFunction,
|
|
197
223
|
isMatchUrlPattern,
|
|
224
|
+
isMissingRequiredData,
|
|
198
225
|
isNull,
|
|
199
226
|
isNullish,
|
|
200
227
|
isNumber,
|
|
201
228
|
isObject,
|
|
202
229
|
isPublishedAtLeastOneEnvironment,
|
|
203
230
|
isPublishedInAllEnvironments,
|
|
231
|
+
isQuestionElement,
|
|
232
|
+
isRestrictedType,
|
|
204
233
|
isString,
|
|
205
234
|
isTimeConditionDataLegacy,
|
|
206
235
|
isTimeConditionDataV2,
|
|
@@ -216,6 +245,7 @@ export {
|
|
|
216
245
|
navigator,
|
|
217
246
|
normalizeTimeConditionData,
|
|
218
247
|
parseUrlParams,
|
|
248
|
+
processQuestionElements,
|
|
219
249
|
regenerateConditionIds,
|
|
220
250
|
removeAuthToken,
|
|
221
251
|
replaceUserAttr,
|