@pitcher/canvas-ui 2025.12.16-085511-beta → 2025.12.16-231823-beta
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/canvas-ui.js +543 -3
- package/canvas-ui.js.map +1 -1
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +5 -0
- package/lib/composables/useSmartStore.d.ts +25 -0
- package/lib/main.lib.d.ts +2 -0
- package/lib/sdk/api/HighLevelApi.d.ts +1 -0
- package/lib/sdk/api/modules/query.d.ts +16 -0
- package/lib/sdk/main.d.ts +3 -0
- package/lib/types/instanceSettings.types.d.ts +1 -0
- package/lib/util/smart-store.util.d.ts +40 -0
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -87705,12 +87705,510 @@ function toast$2(payload) {
|
|
|
87705
87705
|
return this.API.request("toast", payload);
|
|
87706
87706
|
}
|
|
87707
87707
|
|
|
87708
|
+
const SQL_KEYWORDS = /* @__PURE__ */ new Set([
|
|
87709
|
+
"SELECT",
|
|
87710
|
+
"FROM",
|
|
87711
|
+
"WHERE",
|
|
87712
|
+
"AND",
|
|
87713
|
+
"OR",
|
|
87714
|
+
"NOT",
|
|
87715
|
+
"IN",
|
|
87716
|
+
"LIKE",
|
|
87717
|
+
"ORDER",
|
|
87718
|
+
"BY",
|
|
87719
|
+
"GROUP",
|
|
87720
|
+
"HAVING",
|
|
87721
|
+
"LIMIT",
|
|
87722
|
+
"OFFSET",
|
|
87723
|
+
"ASC",
|
|
87724
|
+
"DESC",
|
|
87725
|
+
"NULLS",
|
|
87726
|
+
"FIRST",
|
|
87727
|
+
"LAST",
|
|
87728
|
+
"NULL",
|
|
87729
|
+
"TRUE",
|
|
87730
|
+
"FALSE",
|
|
87731
|
+
"COUNT",
|
|
87732
|
+
"SUM",
|
|
87733
|
+
"AVG",
|
|
87734
|
+
"MIN",
|
|
87735
|
+
"MAX",
|
|
87736
|
+
"COUNT_DISTINCT",
|
|
87737
|
+
"CALENDAR_MONTH",
|
|
87738
|
+
"CALENDAR_QUARTER",
|
|
87739
|
+
"CALENDAR_YEAR",
|
|
87740
|
+
"DAY_IN_MONTH",
|
|
87741
|
+
"DAY_IN_WEEK",
|
|
87742
|
+
"DAY_IN_YEAR",
|
|
87743
|
+
"DAY_ONLY",
|
|
87744
|
+
"FISCAL_MONTH",
|
|
87745
|
+
"FISCAL_QUARTER",
|
|
87746
|
+
"FISCAL_YEAR",
|
|
87747
|
+
"HOUR_IN_DAY",
|
|
87748
|
+
"WEEK_IN_MONTH",
|
|
87749
|
+
"WEEK_IN_YEAR",
|
|
87750
|
+
"INCLUDES",
|
|
87751
|
+
"EXCLUDES",
|
|
87752
|
+
"ABOVE",
|
|
87753
|
+
"BELOW",
|
|
87754
|
+
"ABOVE_OR_BELOW",
|
|
87755
|
+
"AT",
|
|
87756
|
+
"TYPEOF",
|
|
87757
|
+
"WHEN",
|
|
87758
|
+
"THEN",
|
|
87759
|
+
"ELSE",
|
|
87760
|
+
"END",
|
|
87761
|
+
"USING",
|
|
87762
|
+
"SCOPE",
|
|
87763
|
+
"DATA",
|
|
87764
|
+
"CATEGORY",
|
|
87765
|
+
"ROLLUP",
|
|
87766
|
+
"CUBE",
|
|
87767
|
+
"FORMAT",
|
|
87768
|
+
"CONVERTCURRENCY",
|
|
87769
|
+
"TOLABEL",
|
|
87770
|
+
"DISTANCE",
|
|
87771
|
+
"GEOLOCATION"
|
|
87772
|
+
]);
|
|
87773
|
+
const AGGREGATE_FUNCTIONS = ["COUNT", "SUM", "AVG", "MIN", "MAX", "COUNT_DISTINCT"];
|
|
87774
|
+
function isSqlKeyword(word) {
|
|
87775
|
+
return SQL_KEYWORDS.has(word.toUpperCase());
|
|
87776
|
+
}
|
|
87777
|
+
function isLiteralValue(value) {
|
|
87778
|
+
const trimmed = value.trim();
|
|
87779
|
+
if (trimmed.startsWith("'") && trimmed.endsWith("'") || trimmed.startsWith('"') && trimmed.endsWith('"')) {
|
|
87780
|
+
return true;
|
|
87781
|
+
}
|
|
87782
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
87783
|
+
return true;
|
|
87784
|
+
}
|
|
87785
|
+
if (/^(true|false)$/i.test(trimmed)) {
|
|
87786
|
+
return true;
|
|
87787
|
+
}
|
|
87788
|
+
if (/^null$/i.test(trimmed)) {
|
|
87789
|
+
return true;
|
|
87790
|
+
}
|
|
87791
|
+
if (/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z|[+-]\d{2}:\d{2})?)?$/.test(trimmed)) {
|
|
87792
|
+
return true;
|
|
87793
|
+
}
|
|
87794
|
+
if (/^(TODAY|YESTERDAY|TOMORROW|LAST_WEEK|THIS_WEEK|NEXT_WEEK|LAST_MONTH|THIS_MONTH|NEXT_MONTH|LAST_90_DAYS|NEXT_90_DAYS|LAST_N_DAYS:\d+|NEXT_N_DAYS:\d+|LAST_N_WEEKS:\d+|NEXT_N_WEEKS:\d+|LAST_N_MONTHS:\d+|NEXT_N_MONTHS:\d+|LAST_N_QUARTERS:\d+|NEXT_N_QUARTERS:\d+|LAST_N_YEARS:\d+|NEXT_N_YEARS:\d+|THIS_QUARTER|LAST_QUARTER|NEXT_QUARTER|THIS_YEAR|LAST_YEAR|NEXT_YEAR|THIS_FISCAL_QUARTER|LAST_FISCAL_QUARTER|NEXT_FISCAL_QUARTER|THIS_FISCAL_YEAR|LAST_FISCAL_YEAR|NEXT_FISCAL_YEAR)$/i.test(
|
|
87795
|
+
trimmed
|
|
87796
|
+
)) {
|
|
87797
|
+
return true;
|
|
87798
|
+
}
|
|
87799
|
+
return false;
|
|
87800
|
+
}
|
|
87801
|
+
function isDateTimeLiteral(token) {
|
|
87802
|
+
return /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z|[+-]\d{2}:\d{2})?)?$/.test(token);
|
|
87803
|
+
}
|
|
87804
|
+
function convertFieldToSmartStore(field, primaryObject, objectAliases) {
|
|
87805
|
+
const trimmed = field.trim();
|
|
87806
|
+
if (isSqlKeyword(trimmed) || isLiteralValue(trimmed)) {
|
|
87807
|
+
return trimmed;
|
|
87808
|
+
}
|
|
87809
|
+
if (trimmed.startsWith("{") && trimmed.endsWith("}")) {
|
|
87810
|
+
return trimmed;
|
|
87811
|
+
}
|
|
87812
|
+
if (trimmed.includes(".")) {
|
|
87813
|
+
const parts = trimmed.split(".");
|
|
87814
|
+
const alias = parts[0];
|
|
87815
|
+
if (objectAliases.has(alias.toLowerCase()) && objectAliases.get(alias.toLowerCase()) === primaryObject) {
|
|
87816
|
+
const fieldPath = parts.slice(1).join(".");
|
|
87817
|
+
return `{${primaryObject}:${fieldPath}}`;
|
|
87818
|
+
}
|
|
87819
|
+
return `{${primaryObject}:${trimmed}}`;
|
|
87820
|
+
}
|
|
87821
|
+
return `{${primaryObject}:${trimmed}}`;
|
|
87822
|
+
}
|
|
87823
|
+
function convertAggregateFunction(expr, primaryObject, objectAliases) {
|
|
87824
|
+
for (const func of AGGREGATE_FUNCTIONS) {
|
|
87825
|
+
const regex = new RegExp(`\\b${func}\\s*\\(([^)]+)\\)`, "gi");
|
|
87826
|
+
expr = expr.replace(regex, (_match, innerField) => {
|
|
87827
|
+
const trimmedInner = innerField.trim();
|
|
87828
|
+
if (trimmedInner === "*") {
|
|
87829
|
+
return `${func}(*)`;
|
|
87830
|
+
}
|
|
87831
|
+
if (trimmedInner.toUpperCase().startsWith("DISTINCT ")) {
|
|
87832
|
+
const fieldPart = trimmedInner.substring(9).trim();
|
|
87833
|
+
const smartField2 = convertFieldToSmartStore(fieldPart, primaryObject, objectAliases);
|
|
87834
|
+
return `${func}(DISTINCT ${smartField2})`;
|
|
87835
|
+
}
|
|
87836
|
+
const smartField = convertFieldToSmartStore(trimmedInner, primaryObject, objectAliases);
|
|
87837
|
+
return `${func}(${smartField})`;
|
|
87838
|
+
});
|
|
87839
|
+
}
|
|
87840
|
+
return expr;
|
|
87841
|
+
}
|
|
87842
|
+
function parseSelectFields(selectClause) {
|
|
87843
|
+
const fields = [];
|
|
87844
|
+
let depth = 0;
|
|
87845
|
+
let currentField = "";
|
|
87846
|
+
for (let i = 0; i < selectClause.length; i++) {
|
|
87847
|
+
const char = selectClause[i];
|
|
87848
|
+
if (char === "(") {
|
|
87849
|
+
depth++;
|
|
87850
|
+
currentField += char;
|
|
87851
|
+
} else if (char === ")") {
|
|
87852
|
+
depth--;
|
|
87853
|
+
currentField += char;
|
|
87854
|
+
} else if (char === "," && depth === 0) {
|
|
87855
|
+
if (currentField.trim()) {
|
|
87856
|
+
fields.push(currentField.trim());
|
|
87857
|
+
}
|
|
87858
|
+
currentField = "";
|
|
87859
|
+
} else {
|
|
87860
|
+
currentField += char;
|
|
87861
|
+
}
|
|
87862
|
+
}
|
|
87863
|
+
if (currentField.trim()) {
|
|
87864
|
+
fields.push(currentField.trim());
|
|
87865
|
+
}
|
|
87866
|
+
return fields;
|
|
87867
|
+
}
|
|
87868
|
+
function convertSelectFields(fields, primaryObject, objectAliases) {
|
|
87869
|
+
return fields.map((field) => {
|
|
87870
|
+
const aliasMatch = field.match(/^(.+?)\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*)$/i);
|
|
87871
|
+
let expression = field;
|
|
87872
|
+
let alias = "";
|
|
87873
|
+
if (aliasMatch) {
|
|
87874
|
+
expression = aliasMatch[1].trim();
|
|
87875
|
+
alias = aliasMatch[2];
|
|
87876
|
+
}
|
|
87877
|
+
const hasAggregate = AGGREGATE_FUNCTIONS.some((func) => new RegExp(`\\b${func}\\s*\\(`, "i").test(expression));
|
|
87878
|
+
if (hasAggregate) {
|
|
87879
|
+
const converted2 = convertAggregateFunction(expression, primaryObject, objectAliases);
|
|
87880
|
+
return alias ? `${converted2} ${alias}` : converted2;
|
|
87881
|
+
}
|
|
87882
|
+
const converted = convertFieldToSmartStore(expression, primaryObject, objectAliases);
|
|
87883
|
+
return alias ? `${converted} ${alias}` : converted;
|
|
87884
|
+
});
|
|
87885
|
+
}
|
|
87886
|
+
function convertNullComparisons(clause) {
|
|
87887
|
+
let result = clause.replace(/\s*!=\s*null\b/gi, " IS NOT NULL");
|
|
87888
|
+
result = result.replace(/\s*<>\s*null\b/gi, " IS NOT NULL");
|
|
87889
|
+
result = result.replace(/\s*=\s*null\b/gi, " IS NULL");
|
|
87890
|
+
return result;
|
|
87891
|
+
}
|
|
87892
|
+
function convertWhereClause(whereClause, primaryObject, objectAliases) {
|
|
87893
|
+
let result = "";
|
|
87894
|
+
let i = 0;
|
|
87895
|
+
const len = whereClause.length;
|
|
87896
|
+
while (i < len) {
|
|
87897
|
+
const char = whereClause[i];
|
|
87898
|
+
if (/\s/.test(char)) {
|
|
87899
|
+
result += char;
|
|
87900
|
+
i++;
|
|
87901
|
+
continue;
|
|
87902
|
+
}
|
|
87903
|
+
if (char === "'" || char === '"') {
|
|
87904
|
+
const quote = char;
|
|
87905
|
+
result += char;
|
|
87906
|
+
i++;
|
|
87907
|
+
while (i < len && whereClause[i] !== quote) {
|
|
87908
|
+
if (whereClause[i] === "\\" && i + 1 < len) {
|
|
87909
|
+
result += whereClause[i] + whereClause[i + 1];
|
|
87910
|
+
i += 2;
|
|
87911
|
+
} else {
|
|
87912
|
+
result += whereClause[i];
|
|
87913
|
+
i++;
|
|
87914
|
+
}
|
|
87915
|
+
}
|
|
87916
|
+
if (i < len) {
|
|
87917
|
+
result += whereClause[i];
|
|
87918
|
+
i++;
|
|
87919
|
+
}
|
|
87920
|
+
continue;
|
|
87921
|
+
}
|
|
87922
|
+
if (/[()=<>!,]/.test(char)) {
|
|
87923
|
+
result += char;
|
|
87924
|
+
i++;
|
|
87925
|
+
if ((char === "!" || char === "<" || char === ">") && i < len && whereClause[i] === "=") {
|
|
87926
|
+
result += whereClause[i];
|
|
87927
|
+
i++;
|
|
87928
|
+
}
|
|
87929
|
+
continue;
|
|
87930
|
+
}
|
|
87931
|
+
if (/[a-zA-Z_]/.test(char)) {
|
|
87932
|
+
let identifier = "";
|
|
87933
|
+
while (i < len && /[a-zA-Z0-9_.]/.test(whereClause[i])) {
|
|
87934
|
+
identifier += whereClause[i];
|
|
87935
|
+
i++;
|
|
87936
|
+
}
|
|
87937
|
+
if (isSqlKeyword(identifier) || isLiteralValue(identifier)) {
|
|
87938
|
+
result += identifier;
|
|
87939
|
+
} else {
|
|
87940
|
+
result += convertFieldToSmartStore(identifier, primaryObject, objectAliases);
|
|
87941
|
+
}
|
|
87942
|
+
continue;
|
|
87943
|
+
}
|
|
87944
|
+
if (/[0-9-]/.test(char)) {
|
|
87945
|
+
let token = "";
|
|
87946
|
+
if (char === "-") {
|
|
87947
|
+
token += char;
|
|
87948
|
+
i++;
|
|
87949
|
+
}
|
|
87950
|
+
while (i < len && /[0-9.:\-TZ+]/.test(whereClause[i])) {
|
|
87951
|
+
token += whereClause[i];
|
|
87952
|
+
i++;
|
|
87953
|
+
}
|
|
87954
|
+
if (isDateTimeLiteral(token)) {
|
|
87955
|
+
result += `'${token}'`;
|
|
87956
|
+
} else {
|
|
87957
|
+
result += token;
|
|
87958
|
+
}
|
|
87959
|
+
continue;
|
|
87960
|
+
}
|
|
87961
|
+
result += char;
|
|
87962
|
+
i++;
|
|
87963
|
+
}
|
|
87964
|
+
result = convertNullComparisons(result);
|
|
87965
|
+
return result;
|
|
87966
|
+
}
|
|
87967
|
+
function parseOrderByClause(orderByClause) {
|
|
87968
|
+
const result = [];
|
|
87969
|
+
const parts = orderByClause.split(/,(?![^()]*\))/);
|
|
87970
|
+
for (const part of parts) {
|
|
87971
|
+
const trimmed = part.trim();
|
|
87972
|
+
if (!trimmed) continue;
|
|
87973
|
+
const match = trimmed.match(/^(.+?)\s*(ASC|DESC)?\s*(NULLS\s+(?:FIRST|LAST))?$/i);
|
|
87974
|
+
if (match) {
|
|
87975
|
+
const field = match[1].trim();
|
|
87976
|
+
let direction = match[2] ? match[2].toUpperCase() : "";
|
|
87977
|
+
if (match[3]) {
|
|
87978
|
+
direction += (direction ? " " : "") + match[3].toUpperCase();
|
|
87979
|
+
}
|
|
87980
|
+
result.push({ field, direction });
|
|
87981
|
+
} else {
|
|
87982
|
+
result.push({ field: trimmed, direction: "" });
|
|
87983
|
+
}
|
|
87984
|
+
}
|
|
87985
|
+
return result;
|
|
87986
|
+
}
|
|
87987
|
+
function convertOrderByFields(orderByParts, primaryObject, objectAliases) {
|
|
87988
|
+
return orderByParts.map(({ field, direction }) => {
|
|
87989
|
+
const hasAggregate = AGGREGATE_FUNCTIONS.some((func) => new RegExp(`\\b${func}\\s*\\(`, "i").test(field));
|
|
87990
|
+
let convertedField;
|
|
87991
|
+
if (hasAggregate) {
|
|
87992
|
+
convertedField = convertAggregateFunction(field, primaryObject, objectAliases);
|
|
87993
|
+
} else {
|
|
87994
|
+
convertedField = convertFieldToSmartStore(field, primaryObject, objectAliases);
|
|
87995
|
+
}
|
|
87996
|
+
return direction ? `${convertedField} ${direction}` : convertedField;
|
|
87997
|
+
});
|
|
87998
|
+
}
|
|
87999
|
+
function parseGroupByClause(groupByClause) {
|
|
88000
|
+
return groupByClause.split(/,(?![^()]*\))/).map((f) => f.trim()).filter(Boolean);
|
|
88001
|
+
}
|
|
88002
|
+
function convertGroupByFields(fields, primaryObject, objectAliases) {
|
|
88003
|
+
return fields.map((field) => {
|
|
88004
|
+
if (/^(ROLLUP|CUBE)\s*\(/i.test(field)) {
|
|
88005
|
+
return field.replace(/\(([^)]+)\)/g, (_match, inner) => {
|
|
88006
|
+
const innerFields = inner.split(",").map((f) => f.trim());
|
|
88007
|
+
const converted = innerFields.map((f) => convertFieldToSmartStore(f, primaryObject, objectAliases));
|
|
88008
|
+
return `(${converted.join(", ")})`;
|
|
88009
|
+
});
|
|
88010
|
+
}
|
|
88011
|
+
return convertFieldToSmartStore(field, primaryObject, objectAliases);
|
|
88012
|
+
});
|
|
88013
|
+
}
|
|
88014
|
+
function parseFromClause(fromClause) {
|
|
88015
|
+
const joins = [];
|
|
88016
|
+
const primaryMatch = fromClause.match(/^([A-Za-z0-9_]+)(?:\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*))?/i);
|
|
88017
|
+
if (!primaryMatch) {
|
|
88018
|
+
return { primary: "", joins };
|
|
88019
|
+
}
|
|
88020
|
+
const primary = primaryMatch[1];
|
|
88021
|
+
const alias = primaryMatch[2];
|
|
88022
|
+
const joinRegex = /(LEFT\s+OUTER\s+JOIN|LEFT\s+JOIN|INNER\s+JOIN|JOIN)\s+([A-Za-z0-9_]+)(?:\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*))?\s+ON\s+([^,]+?)(?=(?:LEFT|INNER|JOIN|$))/gi;
|
|
88023
|
+
let joinMatch;
|
|
88024
|
+
while ((joinMatch = joinRegex.exec(fromClause)) !== null) {
|
|
88025
|
+
joins.push({
|
|
88026
|
+
type: joinMatch[1].toUpperCase().replace(/\s+/g, " "),
|
|
88027
|
+
object: joinMatch[2],
|
|
88028
|
+
alias: joinMatch[3],
|
|
88029
|
+
on: joinMatch[4]?.trim()
|
|
88030
|
+
});
|
|
88031
|
+
}
|
|
88032
|
+
return { primary, alias, joins };
|
|
88033
|
+
}
|
|
88034
|
+
function convertSoqlToSmartQuery(soqlQuery) {
|
|
88035
|
+
if (!soqlQuery || typeof soqlQuery !== "string") {
|
|
88036
|
+
return "";
|
|
88037
|
+
}
|
|
88038
|
+
const normalizedQuery = soqlQuery.replace(/\s+/g, " ").trim();
|
|
88039
|
+
const selectMatch = normalizedQuery.match(/SELECT\s+([\s\S]+?)\s+FROM\s+/i);
|
|
88040
|
+
if (!selectMatch) {
|
|
88041
|
+
return soqlQuery;
|
|
88042
|
+
}
|
|
88043
|
+
const fromMatch = normalizedQuery.match(
|
|
88044
|
+
/FROM\s+([\s\S]+?)(?=\s+WHERE\s+|\s+ORDER\s+BY\s+|\s+GROUP\s+BY\s+|\s+HAVING\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i
|
|
88045
|
+
);
|
|
88046
|
+
if (!fromMatch) {
|
|
88047
|
+
return soqlQuery;
|
|
88048
|
+
}
|
|
88049
|
+
const whereMatch = normalizedQuery.match(
|
|
88050
|
+
/WHERE\s+([\s\S]+?)(?=\s+ORDER\s+BY\s+|\s+GROUP\s+BY\s+|\s+HAVING\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i
|
|
88051
|
+
);
|
|
88052
|
+
const groupByMatch = normalizedQuery.match(
|
|
88053
|
+
/GROUP\s+BY\s+([\s\S]+?)(?=\s+HAVING\s+|\s+ORDER\s+BY\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i
|
|
88054
|
+
);
|
|
88055
|
+
const havingMatch = normalizedQuery.match(/HAVING\s+([\s\S]+?)(?=\s+ORDER\s+BY\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i);
|
|
88056
|
+
const orderByMatch = normalizedQuery.match(/ORDER\s+BY\s+([\s\S]+?)(?=\s+LIMIT\s+|\s+OFFSET\s+|$)/i);
|
|
88057
|
+
const limitMatch = normalizedQuery.match(/LIMIT\s+(\d+)/i);
|
|
88058
|
+
const offsetMatch = normalizedQuery.match(/OFFSET\s+(\d+)/i);
|
|
88059
|
+
const fromParsed = parseFromClause(fromMatch[1].trim());
|
|
88060
|
+
const primaryObject = fromParsed.primary;
|
|
88061
|
+
if (!primaryObject) {
|
|
88062
|
+
return soqlQuery;
|
|
88063
|
+
}
|
|
88064
|
+
const objectAliases = /* @__PURE__ */ new Map();
|
|
88065
|
+
if (fromParsed.alias) {
|
|
88066
|
+
objectAliases.set(fromParsed.alias.toLowerCase(), primaryObject);
|
|
88067
|
+
}
|
|
88068
|
+
objectAliases.set(primaryObject.toLowerCase(), primaryObject);
|
|
88069
|
+
const parts = [];
|
|
88070
|
+
const selectFields = parseSelectFields(selectMatch[1].trim());
|
|
88071
|
+
const smartSelectFields = convertSelectFields(selectFields, primaryObject, objectAliases);
|
|
88072
|
+
parts.push(`SELECT ${smartSelectFields.join(", ")}`);
|
|
88073
|
+
parts.push(`FROM {${primaryObject}}`);
|
|
88074
|
+
const whereConditions = [];
|
|
88075
|
+
if (whereMatch) {
|
|
88076
|
+
const smartWhere = convertWhereClause(whereMatch[1].trim(), primaryObject, objectAliases);
|
|
88077
|
+
whereConditions.push(smartWhere);
|
|
88078
|
+
}
|
|
88079
|
+
if (whereConditions.length > 0) {
|
|
88080
|
+
parts.push(`WHERE ${whereConditions.join(" AND ")}`);
|
|
88081
|
+
}
|
|
88082
|
+
if (groupByMatch) {
|
|
88083
|
+
const groupByFields = parseGroupByClause(groupByMatch[1].trim());
|
|
88084
|
+
const smartGroupBy = convertGroupByFields(groupByFields, primaryObject, objectAliases);
|
|
88085
|
+
parts.push(`GROUP BY ${smartGroupBy.join(", ")}`);
|
|
88086
|
+
}
|
|
88087
|
+
if (havingMatch) {
|
|
88088
|
+
const smartHaving = convertWhereClause(havingMatch[1].trim(), primaryObject, objectAliases);
|
|
88089
|
+
parts.push(`HAVING ${smartHaving}`);
|
|
88090
|
+
}
|
|
88091
|
+
if (orderByMatch) {
|
|
88092
|
+
const orderByParts = parseOrderByClause(orderByMatch[1].trim());
|
|
88093
|
+
const smartOrderBy = convertOrderByFields(orderByParts, primaryObject, objectAliases);
|
|
88094
|
+
parts.push(`ORDER BY ${smartOrderBy.join(", ")}`);
|
|
88095
|
+
}
|
|
88096
|
+
if (limitMatch) {
|
|
88097
|
+
parts.push(`LIMIT ${limitMatch[1]}`);
|
|
88098
|
+
}
|
|
88099
|
+
if (offsetMatch) {
|
|
88100
|
+
parts.push(`OFFSET ${offsetMatch[1]}`);
|
|
88101
|
+
}
|
|
88102
|
+
return parts.join(" ");
|
|
88103
|
+
}
|
|
88104
|
+
|
|
87708
88105
|
function query(payload) {
|
|
87709
88106
|
return highLevelApi.API.request("query", payload);
|
|
87710
88107
|
}
|
|
87711
88108
|
function crmQuery(payload) {
|
|
87712
88109
|
return highLevelApi.API.request("crm_query", payload);
|
|
87713
88110
|
}
|
|
88111
|
+
function extractFieldsFromSoql(soqlQuery) {
|
|
88112
|
+
const selectMatch = soqlQuery.match(/SELECT\s+([\s\S]+?)\s+FROM\s+/i);
|
|
88113
|
+
if (!selectMatch) return [];
|
|
88114
|
+
const selectClause = selectMatch[1];
|
|
88115
|
+
const fields = [];
|
|
88116
|
+
let depth = 0;
|
|
88117
|
+
let currentField = "";
|
|
88118
|
+
for (let i = 0; i < selectClause.length; i++) {
|
|
88119
|
+
const char = selectClause[i];
|
|
88120
|
+
if (char === "(") {
|
|
88121
|
+
depth++;
|
|
88122
|
+
currentField += char;
|
|
88123
|
+
} else if (char === ")") {
|
|
88124
|
+
depth--;
|
|
88125
|
+
currentField += char;
|
|
88126
|
+
} else if (char === "," && depth === 0) {
|
|
88127
|
+
if (currentField.trim()) {
|
|
88128
|
+
fields.push(currentField.trim());
|
|
88129
|
+
}
|
|
88130
|
+
currentField = "";
|
|
88131
|
+
} else {
|
|
88132
|
+
currentField += char;
|
|
88133
|
+
}
|
|
88134
|
+
}
|
|
88135
|
+
if (currentField.trim()) {
|
|
88136
|
+
fields.push(currentField.trim());
|
|
88137
|
+
}
|
|
88138
|
+
return fields.map((field) => {
|
|
88139
|
+
const aliasMatch = field.match(/^(.+?)\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*)$/i);
|
|
88140
|
+
const fieldExpr = aliasMatch ? aliasMatch[1].trim() : field.trim();
|
|
88141
|
+
return fieldExpr;
|
|
88142
|
+
});
|
|
88143
|
+
}
|
|
88144
|
+
function extractObjectFromSoql(soqlQuery) {
|
|
88145
|
+
const fromMatch = soqlQuery.match(/FROM\s+([A-Za-z0-9_]+)/i);
|
|
88146
|
+
return fromMatch ? fromMatch[1] : "";
|
|
88147
|
+
}
|
|
88148
|
+
function setNestedProperty(obj, path, value) {
|
|
88149
|
+
const parts = path.split(".");
|
|
88150
|
+
if (parts.length === 1) {
|
|
88151
|
+
obj[path] = value;
|
|
88152
|
+
return;
|
|
88153
|
+
}
|
|
88154
|
+
let current = obj;
|
|
88155
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
88156
|
+
const part = parts[i];
|
|
88157
|
+
if (!current[part] || typeof current[part] !== "object") {
|
|
88158
|
+
current[part] = {};
|
|
88159
|
+
}
|
|
88160
|
+
current = current[part];
|
|
88161
|
+
}
|
|
88162
|
+
current[parts[parts.length - 1]] = value;
|
|
88163
|
+
}
|
|
88164
|
+
function transformSmartStoreResults(smartStoreResults, fields, objectName) {
|
|
88165
|
+
if (!smartStoreResults || !Array.isArray(smartStoreResults)) {
|
|
88166
|
+
return [];
|
|
88167
|
+
}
|
|
88168
|
+
return smartStoreResults.map((row) => {
|
|
88169
|
+
const record = {};
|
|
88170
|
+
fields.forEach((field, index) => {
|
|
88171
|
+
if (index < row.length) {
|
|
88172
|
+
setNestedProperty(record, field, row[index]);
|
|
88173
|
+
}
|
|
88174
|
+
});
|
|
88175
|
+
const recordId = record["Id"] || record["id"] || "";
|
|
88176
|
+
record["attributes"] = {
|
|
88177
|
+
type: objectName,
|
|
88178
|
+
url: recordId ? `/services/data/v57.0/sobjects/${objectName}/${recordId}` : ""
|
|
88179
|
+
};
|
|
88180
|
+
return record;
|
|
88181
|
+
});
|
|
88182
|
+
}
|
|
88183
|
+
async function crmQueryAdaptive(payload) {
|
|
88184
|
+
const query2 = payload.query;
|
|
88185
|
+
if (!query2 || typeof query2 !== "string") {
|
|
88186
|
+
return Promise.reject(new Error("Query is required and must be a string"));
|
|
88187
|
+
}
|
|
88188
|
+
let useSmartStore = false;
|
|
88189
|
+
try {
|
|
88190
|
+
const env = await highLevelApi.API.request("get_env");
|
|
88191
|
+
const isIos = env?.mode === "IOS";
|
|
88192
|
+
const isSfdcSyncEnabled = env?.pitcher?.instance?.settings?.enable_sfdc_sync === true;
|
|
88193
|
+
useSmartStore = isIos && isSfdcSyncEnabled;
|
|
88194
|
+
} catch {
|
|
88195
|
+
useSmartStore = false;
|
|
88196
|
+
}
|
|
88197
|
+
console.log(`crmQueryAdaptive called with the query: `, query2);
|
|
88198
|
+
if (useSmartStore) {
|
|
88199
|
+
const fields = extractFieldsFromSoql(query2);
|
|
88200
|
+
const objectName = extractObjectFromSoql(query2);
|
|
88201
|
+
const smartQuery = convertSoqlToSmartQuery(query2);
|
|
88202
|
+
console.log(`Smart Query: `, smartQuery);
|
|
88203
|
+
const smartStoreResults = await crmSmartQuery({ query: smartQuery });
|
|
88204
|
+
const records = transformSmartStoreResults(smartStoreResults, fields, objectName);
|
|
88205
|
+
return {
|
|
88206
|
+
records,
|
|
88207
|
+
totalSize: records.length
|
|
88208
|
+
};
|
|
88209
|
+
}
|
|
88210
|
+
return crmQuery(payload);
|
|
88211
|
+
}
|
|
87714
88212
|
function crmSmartQuery(payload) {
|
|
87715
88213
|
const query2 = payload.query;
|
|
87716
88214
|
if (!query2 || typeof query2 !== "string") {
|
|
@@ -87773,7 +88271,14 @@ function crmSmartUpsertObjects(payload) {
|
|
|
87773
88271
|
}
|
|
87774
88272
|
}
|
|
87775
88273
|
}
|
|
87776
|
-
|
|
88274
|
+
console.log("[crmSmartUpsertObjects] Request payload:", JSON.stringify(payload, null, 2));
|
|
88275
|
+
return highLevelApi.API.request("crm_smart_upsert_objects", payload).then((result) => {
|
|
88276
|
+
console.log("[crmSmartUpsertObjects] Success:", result);
|
|
88277
|
+
return result;
|
|
88278
|
+
}).catch((error) => {
|
|
88279
|
+
console.error("[crmSmartUpsertObjects] Error:", error);
|
|
88280
|
+
throw error;
|
|
88281
|
+
});
|
|
87777
88282
|
}
|
|
87778
88283
|
function crmSmartObjectValidationRules(payload) {
|
|
87779
88284
|
if (!payload) {
|
|
@@ -87813,7 +88318,14 @@ function crmSmartDeleteObjects(payload) {
|
|
|
87813
88318
|
}
|
|
87814
88319
|
}
|
|
87815
88320
|
}
|
|
87816
|
-
|
|
88321
|
+
console.log("[crmSmartDeleteObjects] Request payload:", JSON.stringify(payload, null, 2));
|
|
88322
|
+
return highLevelApi.API.request("crm_smart_delete_objects", payload).then((result) => {
|
|
88323
|
+
console.log("[crmSmartDeleteObjects] Success:", result);
|
|
88324
|
+
return result;
|
|
88325
|
+
}).catch((error) => {
|
|
88326
|
+
console.error("[crmSmartDeleteObjects] Error:", error);
|
|
88327
|
+
throw error;
|
|
88328
|
+
});
|
|
87817
88329
|
}
|
|
87818
88330
|
function crmCreate(payload) {
|
|
87819
88331
|
if (!payload) {
|
|
@@ -87956,6 +88468,7 @@ const modules = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
87956
88468
|
createFolder,
|
|
87957
88469
|
crmCreate,
|
|
87958
88470
|
crmQuery,
|
|
88471
|
+
crmQueryAdaptive,
|
|
87959
88472
|
crmSmartDeleteObjects,
|
|
87960
88473
|
crmSmartObjectMetadata,
|
|
87961
88474
|
crmSmartObjectValidationRules,
|
|
@@ -181016,6 +181529,33 @@ function useTheme() {
|
|
|
181016
181529
|
};
|
|
181017
181530
|
}
|
|
181018
181531
|
|
|
181532
|
+
function useSmartStore(env) {
|
|
181533
|
+
const shouldUseSmartStore = computed(() => {
|
|
181534
|
+
try {
|
|
181535
|
+
const envValue = unref(env);
|
|
181536
|
+
if (!envValue) {
|
|
181537
|
+
return false;
|
|
181538
|
+
}
|
|
181539
|
+
const isIos = envValue?.mode === "IOS";
|
|
181540
|
+
const isSfdcSyncEnabled = envValue?.pitcher?.instance?.settings?.enable_sfdc_sync === true;
|
|
181541
|
+
return isIos && isSfdcSyncEnabled;
|
|
181542
|
+
} catch (error) {
|
|
181543
|
+
console.error("[useSmartStore] Error checking SmartStore availability:", error);
|
|
181544
|
+
return false;
|
|
181545
|
+
}
|
|
181546
|
+
});
|
|
181547
|
+
const generateTempSalesforceId = (objectPrefix) => {
|
|
181548
|
+
const timestamp = Date.now().toString(36);
|
|
181549
|
+
const randomStr = Math.random().toString(36).substring(2, 11);
|
|
181550
|
+
const uniqueId = (timestamp + randomStr).substring(0, 15 - objectPrefix.length);
|
|
181551
|
+
return objectPrefix + uniqueId.padEnd(15 - objectPrefix.length, "0");
|
|
181552
|
+
};
|
|
181553
|
+
return {
|
|
181554
|
+
shouldUseSmartStore,
|
|
181555
|
+
generateTempSalesforceId
|
|
181556
|
+
};
|
|
181557
|
+
}
|
|
181558
|
+
|
|
181019
181559
|
const initialCanvas = ref(void 0);
|
|
181020
181560
|
const useCanvasOverlay = () => {
|
|
181021
181561
|
const openCanvasOverlay = ({ id, fullscreen, edit_mode, component_id, section_id, position }) => {
|
|
@@ -183277,5 +183817,5 @@ const localeNames = {
|
|
|
183277
183817
|
};
|
|
183278
183818
|
const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
|
|
183279
183819
|
|
|
183280
|
-
export { ADMIN_API_METHOD_TYPES, ADMIN_API_TYPES, ADMIN_MESSAGE, ADMIN_MESSAGE_TYPES, APPS_DB, AccessTypeEnum, App$3 as AgendaSelectorApp, AppTypeEnum, _sfc_main as AssetsManagerApp, App$1 as Browser, BulkUpdateMetadataOperationEnum, BulkUpdateTagsOperationEnum, CALL_STORAGE_KEY, CANVASES, CANVAS_HOOKS, CANVAS_TYPOGRAPHY_CSS_PROPERTIES, CANVAS_TYPOGRAPHY_PRESETS, CAlgoliaSearch, CAssignedCanvasesManagement, _sfc_main$4p as CAssignedCanvasesManagementToolbar, _sfc_main$6s as CAvatar, _sfc_main$4O as CBlockManagement, CButton, _sfc_main$5f as CCanvasDeleteDialogContent, _sfc_main$5g as CCanvasMetadataFilters, CCanvasSelector, _sfc_main$6V as CCard, CCarousel, _sfc_main$3G as CCatalogIqSwitcher, _sfc_main$6U as CCheckbox, _sfc_main$3A as CChip, CCollapse, _sfc_main$6R as CCollapseItem, _sfc_main$6r as CCollapseTransition, NColorPicker as CColorPicker, CComponentListItem, CConfigEditor, NConfigProvider as CConfigProvider, _sfc_main$6h as CConfirmationAction, CConfirmationContent, CConfirmationHeader, CConfirmationModal, CContactSelector, CContactSelectorSelected, _sfc_main$68 as CContentError, _sfc_main$65 as CCreateCanvasModal, _sfc_main$64 as CCreateTemplateSectionBlockModal, _sfc_main$5V as CCreateThemeModal, CDP_EVENT_TYPE, CDataTable, NDatePicker as CDatePicker, CDateRangeFilter, CDetailPageSectionButtons, NDialogProvider as CDialogProvider, _sfc_main$6P as CDivider, _sfc_main$6O as CDrawer, _sfc_main$6N as CDrawerContent, _sfc_main$6M as CDropdown, _sfc_main$6p as CEmpty, _sfc_main$4m as CEntitySelector, _sfc_main$6L as CErrorFullScreen, _sfc_main$6n as CFeedback, _sfc_main$3o as CFileAccessManagement, _sfc_main$6C as CFileAttributes, _sfc_main$3p as CFilePanel, _sfc_main$6I as CFileThumbnail, CFileViewer, CFilesAccessInfo, _sfc_main$3$ as CFilesAccessManage, _sfc_main$3I as CFilesFolderDeleteDialogContent, NForm as CForm, NFormItem as CFormItem, NFormItemCol as CFormItemCol, NFormItemGridItem as CFormItemGi, NFormItemGridItem as CFormItemGridItem, FormItemRow as CFormItemRow, _sfc_main$4h as CFullScreenLoader, NGridItem as CGi, CGlobalLoader, _sfc_main$5O as CGlobalSearch, GlobalStyle as CGlobalStyle, NGrid as CGrid, NGridItem as CGridItem, CGroupsAccessInfo, NH1 as CH1, NH2 as CH2, NH3 as CH3, NH4 as CH4, NH5 as CH5, NH6 as CH6, _sfc_main$6m as CHelpText, CIcon, _sfc_main$6K as CImage, _sfc_main$4W as CInfoBadge, _sfc_main$6B as CInput, NInputNumber as CInputNumber, _sfc_main$3y as CKnockNotificationsAppWrapper, CLIENT_TYPE, NLayout as CLayout, NLayoutContent as CLayoutContent, LayoutFooter as CLayoutFooter, LayoutHeader as CLayoutHeader, LayoutSider as CLayoutSider, _sfc_main$4X as CList, NMessageProvider as CMessageProvider, _sfc_main$5L as CMetaDataBadge, _sfc_main$6A as CModal, CMonacoEditor, CMovableWidget, CMultiSelect, NNotificationProvider as CNotificationProvider, NPagination as CPagination, _sfc_main$6l as CPillSelect, _sfc_main$6z as CPopover, _sfc_main$6J as CProcessingOverlay, NProgress as CProgress, _sfc_main$5s as CRichTextEditor, _sfc_main$4q as CSavedCanvasesManagement, CSearch, _sfc_main$6x as CSearchOnClick, CSearchOnClickWithSuggestions, CSecondaryNav, _sfc_main$4R as CSectionManagement, CSelect, CSelectFilter, _sfc_main$3x as CSettingsEditor, CShortcut, CSingleSelect, NSkeleton as CSkeleton, _sfc_main$3C as CSlideViewer, NSpace as CSpace, _sfc_main$6q as CSpin, _sfc_main$6o as CSwitch, CTable, _sfc_main$5c as CTableInput, CTableMore, CTableSelect, CTableTag, _sfc_main$6F as CTag, CTags, CTemplateAccessInfo, _sfc_main$3_ as CTemplateAccessManage, _sfc_main$4G as CTemplateManagement, text as CText, _sfc_main$6v as CThemeEditor, _sfc_main$4B as CThemeManagement, _sfc_main$5l as CToastProvider, CToolbar, _sfc_main$6t as CTooltip, CUpsertFolderModal, _sfc_main$5p as CUserAvatar, CUserMenu, CUsersAccessInfo, CUsersGroupsAccessManage, _sfc_main$5m as CVirtualTable, _sfc_main$48 as CWarningAlert, CallState, CanvasActions, _sfc_main$15 as CanvasBuilderApp, CanvasBuilderMode, CanvasExcludedComponentTypesEnum, CanvasHistoryAction, App as CanvasSelector, CanvasStatus, CanvasThemeStatus, CanvasesViewsTypes, CollaborationRoleEnum, CollectionPlayerApp, App$4 as CollectionSelectorApp, ComponentIcon, ComponentTypes, ContactSelectorQuickFilterType, ContentGridLayoutTypes, ContentSelector, CoreFolderEntityType, DATE_TIME_FORMAT, DEFAULT_ADMIN_TABLE_HEIGHT, DEFAULT_ADMIN_TABLE_WITH_PAGINATION_HEIGHT, DEFAULT_GLOBAL_COMPONENT_SPACING, DEFAULT_GLOBAL_COMPONENT_SPACING_INTERVAL, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PEER_CONNECTIVITY_VERSION, DEFAULT_PITCHER_SETTINGS, DSR_API_METHOD_TYPES, DSR_API_TYPES, DSR_MESSAGE, DSR_MESSAGE_TYPES, DSR_TYPE, DefaultExpiresAtEnum, DownloadTypeEnum, EMBED_TYPE, EventAction, EventExternalObjectContentTypeEnum, EventStatusEnum, FileContentTypeEnum, FileStatusEnum, FileTypeEnum, GlobalSearchResultType, GridLayoutTypes, HIDE_IF_EMPTY_COMPONENT_ID_TAG_PREFIX, HIDE_IF_EMPTY_COMPONENT_TRACKING_ID_TAG_PREFIX, HIDE_TAGS_WITH_PREFIX, HtmlLayoutTypes, IFRAME_ACTION_TYPES, IFRAME_DATA_MESSAGE, INITIAL_CALL_STATE, IS_DEV_ORG, IS_LOCALHOST, InstanceMembershipRoleEnum, InstanceMembershipUserStatusEnum, InvitationStatusEnum, LanguageEnum, LinkAlignmentTypes, LinkAnchorTypes, LinkPreviewTypes, MAX_LUMINANCE_FOR_LIGHT_TEXT, MAX_UPLOAD_SIZE, MIN_DIFFERENCE_IN_MINUTES, MetadataTemplateFieldTypeEnum, MultimediaHorizontalAlignmentOptions, NON_MEMBER_ROLES, NotesApp, OperatorEnum, PAPER_SIZE_PRESETS, PEER_CONNECTIVITY_EVENT, PEER_CONNECTIVITY_HANDLER_MATCH_ALL, PITCHER_EVENT, PITCHER_SETTINGS_KEY, PLATFORM_TYPE, PRINT_SCALE_FACTOR, PeerConnectivityActions, PitcherBroadcastedEventName, PitcherEventName, PitcherExternalEventName, PitcherMessageType, PitcherResponseStatus, PostAction, App$2 as PptConversionSelectorApp, REQUEST_DEFAULT_CANCEL_TIMEOUT, SEARCH_DEBOUNCE_TIME, SUPPORTED_FONT_EXTENSIONS, SUPPORTED_FONT_TYPES, SUPPORTED_IMAGE_EXTENSIONS, SUPPORTED_IMAGE_TYPES, SUPPORTED_UPLOAD_FILE_EXTENSIONS, SUPPORTED_VIDEO_EXTENSIONS, SUPPORTED_VIDEO_TYPES, SfEventColors, SfEventColorsLight, StorageRegionEnum, TRACKING_EVENTS_STORAGE_KEY, UI_API_METHOD_TYPES, UI_MESSAGE, UI_MESSAGE_TYPES, UI_NATIVE_MESSAGE_TYPES, UserRoleEnum, ViewCompactItemType, addCanvasComponent, _export as agendaSelector, appRequiresCrm, applyCanvasThemeAssetsToNode, applyFont, applyToTreeBy, autofocus as autofocusDirective, camelCaseKeys, canvasUiUnoPreset, clearLocalStorageIfNeeded, ClickOutsideDirective as clickOutsideDirective, collectAllNodesByCondition, _export$3 as collectionPlayer, _export$2 as collectionSelector, componentIconType, computeLocalStorageBytes, convertSecondsToMinutes, convertToPixels, convertToSosl, createNodeId, createPitcherSettings, dayjs, deepDiff, deepToRaw, derivePatchRequestFields, determineUserRole, discardSectionComponentOverride, displayBytesWithMUnit, displayIntegerWithMunit, doesLocalOverrideExist, doesNotHaveAnyModuleOrHookSpecified, downloadFile, draggable as draggableDirective, elementMounted as elementMountedDirective, escapeSoqlString, evaluateAccessor, executeWithDoublingTime, exitFullscreen, fallbackLocale, fetchAll, fetchAllWithOffset, fetchFirstChunkAndRemainingAsync, filterSidebarApps, filterTreeBy, findAllEmbeddableTypesInCanvasContent, findAllEmbeddableTypesInSectionsContent, findEmbeddableInCanvasContent, findEmbeddableInSectionsContent, findNodeInTreeByCondition, findNodeInTreeById, findNodeInTreeByType, findParentByNodeId, formatDate, formatDateDetailed, formatDateTime, formatDateTimeAgo, formatDayMonthBasedOnBrowserLang, formatDimensionForGotenberg, generateAIThumbnailUrl, getAllPages, getAppConfigFromAppSource, getAvailableApis, getComponentDescription, getComponentKeywords, getComponentTitle, getContrastTextColor, getDefinedProps, getEventColor, getExcessItemsIndexes, getFontAwesomeIconNameAndType, getImageSize, getLocalOverrideUrl, getLuminance, getNextPageParam, getNodeDisplayNameByComponentType, getNumberWithRegex, getPageQuantity, getPageRange, getPreviewUrl, getRoleIcon, getSectionGlobalComponentSpacing, handleThemeAssetComparison, hasAppTypeDefined, highLevelApi, indirectEval, insertItemSorted, isAfter, isBefore, isBeforeMinDate, isCanvasDrawerApp, isCanvasSectionExecution, isEmbeddableWithZeroHeight, isFileViewerReplacement, isFirefox, isFullscreen, isHeadlessOrNotAvailableApp, isImageAccessible, isIosDevice, isMac, isMobile, isModifierClick, isNonMemberRole, isOriginValid, isPastMaxDate, isPitcherOrIosDevice, isPitcherWkWebView, isPostcallApp, isQueryParamTruthy, isSafari, isSafariOnIosDevice, isSameOrAfter, isSameOrBefore, isTextComponentEmpty, isTheUiItself, isTouchScreen, isValidHex, isWindows, lightThemeOverrides, loadCustomHelpersFromApps, loadRemoteScriptWithCtx, loadScript, loadScriptStyle, loadStyle, localeDropdownOptions, localeNames, locales, minFutureDate, minPastDate, moveNodeTo, msToSeconds, navigateTo, normalizeFilterParams, normalizeNetworkFilterParams, openUsdz, parseCollectionPlayerSlidesToContentSelector, parseContentSelectorToCollectionPlayerSlides, parseFileToCollectionPlayer, parsePdfFileToCollectionPlayer, parsePptxFileToCollectionPlayer, pascalCaseKeys, _export$1 as pptConversionSelector, processCanvasForSectionThemeOverride, regenerateTreeIds, registerCustomHelper, registerCustomHelpers, registerPeerConnectivityHandler, renderTemplate, replaceThemePresetsWithInlineStyles, replaceTranslationMessagesWithOverrides, requestFullscreen, requestStream, scrollCanvasToTop, scrollToComponentById, secondsToHumanReadable, sendPeerConnectivityEvent, setDateTime, shouldDisplayPlaceholderComponent, shouldOpenInCollectionPlayerViewer, shouldShowEmbeddable, shouldShowInSidebar, skipElementsInTree, snakeCaseKeys, someNodeInTree, sortCollectionByString, splitUserName, stringToHslColor, supportedLocales, tapDirective, titleCase, toggleFullscreen, tooltipDirective, transformFilesToCollectionPlayer, transformFilesToContentGrid, updateFirstContentGridWithShareboxItems, urlSafeFetchInChunks, useAdmin, useAdminAndDsrState, useApi, useAppsDb, useBindValidation, useBroadcastRouteChange, useCanvasById, useCanvasLocks, useCanvasOverlay, useCanvasVisibility, useCanvasesAsInfinity, useCollectionPlayerOverlay, useCommentTracking, useConfirmation, useCreateEvent, useDeleteEvent, useDsr, useFetchCanvases, useFetchEvents, useFetchUsers, useFileDisplayHelpers, useFolderNameDescription, useGlobalSearch, useInfiniteScroll, useLocation, useMetadataSearch, useMetadataTemplates, useNotesApp, useNotification, useOpenFileStack, usePitcherApi, usePolling, usePresentationHistory, useRecentFiles, useShareCanvas, useSharedCommentsStorage, useSuggestedTags, useTheme, useThemeVars, useToast, useUi, useUpdateEvent, useWindowEvents, vueQueryPluginOptions, wait, waitForIframeInitialize, waitForValue };
|
|
183820
|
+
export { ADMIN_API_METHOD_TYPES, ADMIN_API_TYPES, ADMIN_MESSAGE, ADMIN_MESSAGE_TYPES, APPS_DB, AccessTypeEnum, App$3 as AgendaSelectorApp, AppTypeEnum, _sfc_main as AssetsManagerApp, App$1 as Browser, BulkUpdateMetadataOperationEnum, BulkUpdateTagsOperationEnum, CALL_STORAGE_KEY, CANVASES, CANVAS_HOOKS, CANVAS_TYPOGRAPHY_CSS_PROPERTIES, CANVAS_TYPOGRAPHY_PRESETS, CAlgoliaSearch, CAssignedCanvasesManagement, _sfc_main$4p as CAssignedCanvasesManagementToolbar, _sfc_main$6s as CAvatar, _sfc_main$4O as CBlockManagement, CButton, _sfc_main$5f as CCanvasDeleteDialogContent, _sfc_main$5g as CCanvasMetadataFilters, CCanvasSelector, _sfc_main$6V as CCard, CCarousel, _sfc_main$3G as CCatalogIqSwitcher, _sfc_main$6U as CCheckbox, _sfc_main$3A as CChip, CCollapse, _sfc_main$6R as CCollapseItem, _sfc_main$6r as CCollapseTransition, NColorPicker as CColorPicker, CComponentListItem, CConfigEditor, NConfigProvider as CConfigProvider, _sfc_main$6h as CConfirmationAction, CConfirmationContent, CConfirmationHeader, CConfirmationModal, CContactSelector, CContactSelectorSelected, _sfc_main$68 as CContentError, _sfc_main$65 as CCreateCanvasModal, _sfc_main$64 as CCreateTemplateSectionBlockModal, _sfc_main$5V as CCreateThemeModal, CDP_EVENT_TYPE, CDataTable, NDatePicker as CDatePicker, CDateRangeFilter, CDetailPageSectionButtons, NDialogProvider as CDialogProvider, _sfc_main$6P as CDivider, _sfc_main$6O as CDrawer, _sfc_main$6N as CDrawerContent, _sfc_main$6M as CDropdown, _sfc_main$6p as CEmpty, _sfc_main$4m as CEntitySelector, _sfc_main$6L as CErrorFullScreen, _sfc_main$6n as CFeedback, _sfc_main$3o as CFileAccessManagement, _sfc_main$6C as CFileAttributes, _sfc_main$3p as CFilePanel, _sfc_main$6I as CFileThumbnail, CFileViewer, CFilesAccessInfo, _sfc_main$3$ as CFilesAccessManage, _sfc_main$3I as CFilesFolderDeleteDialogContent, NForm as CForm, NFormItem as CFormItem, NFormItemCol as CFormItemCol, NFormItemGridItem as CFormItemGi, NFormItemGridItem as CFormItemGridItem, FormItemRow as CFormItemRow, _sfc_main$4h as CFullScreenLoader, NGridItem as CGi, CGlobalLoader, _sfc_main$5O as CGlobalSearch, GlobalStyle as CGlobalStyle, NGrid as CGrid, NGridItem as CGridItem, CGroupsAccessInfo, NH1 as CH1, NH2 as CH2, NH3 as CH3, NH4 as CH4, NH5 as CH5, NH6 as CH6, _sfc_main$6m as CHelpText, CIcon, _sfc_main$6K as CImage, _sfc_main$4W as CInfoBadge, _sfc_main$6B as CInput, NInputNumber as CInputNumber, _sfc_main$3y as CKnockNotificationsAppWrapper, CLIENT_TYPE, NLayout as CLayout, NLayoutContent as CLayoutContent, LayoutFooter as CLayoutFooter, LayoutHeader as CLayoutHeader, LayoutSider as CLayoutSider, _sfc_main$4X as CList, NMessageProvider as CMessageProvider, _sfc_main$5L as CMetaDataBadge, _sfc_main$6A as CModal, CMonacoEditor, CMovableWidget, CMultiSelect, NNotificationProvider as CNotificationProvider, NPagination as CPagination, _sfc_main$6l as CPillSelect, _sfc_main$6z as CPopover, _sfc_main$6J as CProcessingOverlay, NProgress as CProgress, _sfc_main$5s as CRichTextEditor, _sfc_main$4q as CSavedCanvasesManagement, CSearch, _sfc_main$6x as CSearchOnClick, CSearchOnClickWithSuggestions, CSecondaryNav, _sfc_main$4R as CSectionManagement, CSelect, CSelectFilter, _sfc_main$3x as CSettingsEditor, CShortcut, CSingleSelect, NSkeleton as CSkeleton, _sfc_main$3C as CSlideViewer, NSpace as CSpace, _sfc_main$6q as CSpin, _sfc_main$6o as CSwitch, CTable, _sfc_main$5c as CTableInput, CTableMore, CTableSelect, CTableTag, _sfc_main$6F as CTag, CTags, CTemplateAccessInfo, _sfc_main$3_ as CTemplateAccessManage, _sfc_main$4G as CTemplateManagement, text as CText, _sfc_main$6v as CThemeEditor, _sfc_main$4B as CThemeManagement, _sfc_main$5l as CToastProvider, CToolbar, _sfc_main$6t as CTooltip, CUpsertFolderModal, _sfc_main$5p as CUserAvatar, CUserMenu, CUsersAccessInfo, CUsersGroupsAccessManage, _sfc_main$5m as CVirtualTable, _sfc_main$48 as CWarningAlert, CallState, CanvasActions, _sfc_main$15 as CanvasBuilderApp, CanvasBuilderMode, CanvasExcludedComponentTypesEnum, CanvasHistoryAction, App as CanvasSelector, CanvasStatus, CanvasThemeStatus, CanvasesViewsTypes, CollaborationRoleEnum, CollectionPlayerApp, App$4 as CollectionSelectorApp, ComponentIcon, ComponentTypes, ContactSelectorQuickFilterType, ContentGridLayoutTypes, ContentSelector, CoreFolderEntityType, DATE_TIME_FORMAT, DEFAULT_ADMIN_TABLE_HEIGHT, DEFAULT_ADMIN_TABLE_WITH_PAGINATION_HEIGHT, DEFAULT_GLOBAL_COMPONENT_SPACING, DEFAULT_GLOBAL_COMPONENT_SPACING_INTERVAL, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PEER_CONNECTIVITY_VERSION, DEFAULT_PITCHER_SETTINGS, DSR_API_METHOD_TYPES, DSR_API_TYPES, DSR_MESSAGE, DSR_MESSAGE_TYPES, DSR_TYPE, DefaultExpiresAtEnum, DownloadTypeEnum, EMBED_TYPE, EventAction, EventExternalObjectContentTypeEnum, EventStatusEnum, FileContentTypeEnum, FileStatusEnum, FileTypeEnum, GlobalSearchResultType, GridLayoutTypes, HIDE_IF_EMPTY_COMPONENT_ID_TAG_PREFIX, HIDE_IF_EMPTY_COMPONENT_TRACKING_ID_TAG_PREFIX, HIDE_TAGS_WITH_PREFIX, HtmlLayoutTypes, IFRAME_ACTION_TYPES, IFRAME_DATA_MESSAGE, INITIAL_CALL_STATE, IS_DEV_ORG, IS_LOCALHOST, InstanceMembershipRoleEnum, InstanceMembershipUserStatusEnum, InvitationStatusEnum, LanguageEnum, LinkAlignmentTypes, LinkAnchorTypes, LinkPreviewTypes, MAX_LUMINANCE_FOR_LIGHT_TEXT, MAX_UPLOAD_SIZE, MIN_DIFFERENCE_IN_MINUTES, MetadataTemplateFieldTypeEnum, MultimediaHorizontalAlignmentOptions, NON_MEMBER_ROLES, NotesApp, OperatorEnum, PAPER_SIZE_PRESETS, PEER_CONNECTIVITY_EVENT, PEER_CONNECTIVITY_HANDLER_MATCH_ALL, PITCHER_EVENT, PITCHER_SETTINGS_KEY, PLATFORM_TYPE, PRINT_SCALE_FACTOR, PeerConnectivityActions, PitcherBroadcastedEventName, PitcherEventName, PitcherExternalEventName, PitcherMessageType, PitcherResponseStatus, PostAction, App$2 as PptConversionSelectorApp, REQUEST_DEFAULT_CANCEL_TIMEOUT, SEARCH_DEBOUNCE_TIME, SUPPORTED_FONT_EXTENSIONS, SUPPORTED_FONT_TYPES, SUPPORTED_IMAGE_EXTENSIONS, SUPPORTED_IMAGE_TYPES, SUPPORTED_UPLOAD_FILE_EXTENSIONS, SUPPORTED_VIDEO_EXTENSIONS, SUPPORTED_VIDEO_TYPES, SfEventColors, SfEventColorsLight, StorageRegionEnum, TRACKING_EVENTS_STORAGE_KEY, UI_API_METHOD_TYPES, UI_MESSAGE, UI_MESSAGE_TYPES, UI_NATIVE_MESSAGE_TYPES, UserRoleEnum, ViewCompactItemType, addCanvasComponent, _export as agendaSelector, appRequiresCrm, applyCanvasThemeAssetsToNode, applyFont, applyToTreeBy, autofocus as autofocusDirective, camelCaseKeys, canvasUiUnoPreset, clearLocalStorageIfNeeded, ClickOutsideDirective as clickOutsideDirective, collectAllNodesByCondition, _export$3 as collectionPlayer, _export$2 as collectionSelector, componentIconType, computeLocalStorageBytes, convertSecondsToMinutes, convertSoqlToSmartQuery, convertToPixels, convertToSosl, createNodeId, createPitcherSettings, dayjs, deepDiff, deepToRaw, derivePatchRequestFields, determineUserRole, discardSectionComponentOverride, displayBytesWithMUnit, displayIntegerWithMunit, doesLocalOverrideExist, doesNotHaveAnyModuleOrHookSpecified, downloadFile, draggable as draggableDirective, elementMounted as elementMountedDirective, escapeSoqlString, evaluateAccessor, executeWithDoublingTime, exitFullscreen, fallbackLocale, fetchAll, fetchAllWithOffset, fetchFirstChunkAndRemainingAsync, filterSidebarApps, filterTreeBy, findAllEmbeddableTypesInCanvasContent, findAllEmbeddableTypesInSectionsContent, findEmbeddableInCanvasContent, findEmbeddableInSectionsContent, findNodeInTreeByCondition, findNodeInTreeById, findNodeInTreeByType, findParentByNodeId, formatDate, formatDateDetailed, formatDateTime, formatDateTimeAgo, formatDayMonthBasedOnBrowserLang, formatDimensionForGotenberg, generateAIThumbnailUrl, getAllPages, getAppConfigFromAppSource, getAvailableApis, getComponentDescription, getComponentKeywords, getComponentTitle, getContrastTextColor, getDefinedProps, getEventColor, getExcessItemsIndexes, getFontAwesomeIconNameAndType, getImageSize, getLocalOverrideUrl, getLuminance, getNextPageParam, getNodeDisplayNameByComponentType, getNumberWithRegex, getPageQuantity, getPageRange, getPreviewUrl, getRoleIcon, getSectionGlobalComponentSpacing, handleThemeAssetComparison, hasAppTypeDefined, highLevelApi, indirectEval, insertItemSorted, isAfter, isBefore, isBeforeMinDate, isCanvasDrawerApp, isCanvasSectionExecution, isEmbeddableWithZeroHeight, isFileViewerReplacement, isFirefox, isFullscreen, isHeadlessOrNotAvailableApp, isImageAccessible, isIosDevice, isMac, isMobile, isModifierClick, isNonMemberRole, isOriginValid, isPastMaxDate, isPitcherOrIosDevice, isPitcherWkWebView, isPostcallApp, isQueryParamTruthy, isSafari, isSafariOnIosDevice, isSameOrAfter, isSameOrBefore, isTextComponentEmpty, isTheUiItself, isTouchScreen, isValidHex, isWindows, lightThemeOverrides, loadCustomHelpersFromApps, loadRemoteScriptWithCtx, loadScript, loadScriptStyle, loadStyle, localeDropdownOptions, localeNames, locales, minFutureDate, minPastDate, moveNodeTo, msToSeconds, navigateTo, normalizeFilterParams, normalizeNetworkFilterParams, openUsdz, parseCollectionPlayerSlidesToContentSelector, parseContentSelectorToCollectionPlayerSlides, parseFileToCollectionPlayer, parsePdfFileToCollectionPlayer, parsePptxFileToCollectionPlayer, pascalCaseKeys, _export$1 as pptConversionSelector, processCanvasForSectionThemeOverride, regenerateTreeIds, registerCustomHelper, registerCustomHelpers, registerPeerConnectivityHandler, renderTemplate, replaceThemePresetsWithInlineStyles, replaceTranslationMessagesWithOverrides, requestFullscreen, requestStream, scrollCanvasToTop, scrollToComponentById, secondsToHumanReadable, sendPeerConnectivityEvent, setDateTime, shouldDisplayPlaceholderComponent, shouldOpenInCollectionPlayerViewer, shouldShowEmbeddable, shouldShowInSidebar, skipElementsInTree, snakeCaseKeys, someNodeInTree, sortCollectionByString, splitUserName, stringToHslColor, supportedLocales, tapDirective, titleCase, toggleFullscreen, tooltipDirective, transformFilesToCollectionPlayer, transformFilesToContentGrid, updateFirstContentGridWithShareboxItems, urlSafeFetchInChunks, useAdmin, useAdminAndDsrState, useApi, useAppsDb, useBindValidation, useBroadcastRouteChange, useCanvasById, useCanvasLocks, useCanvasOverlay, useCanvasVisibility, useCanvasesAsInfinity, useCollectionPlayerOverlay, useCommentTracking, useConfirmation, useCreateEvent, useDeleteEvent, useDsr, useFetchCanvases, useFetchEvents, useFetchUsers, useFileDisplayHelpers, useFolderNameDescription, useGlobalSearch, useInfiniteScroll, useLocation, useMetadataSearch, useMetadataTemplates, useNotesApp, useNotification, useOpenFileStack, usePitcherApi, usePolling, usePresentationHistory, useRecentFiles, useShareCanvas, useSharedCommentsStorage, useSmartStore, useSuggestedTags, useTheme, useThemeVars, useToast, useUi, useUpdateEvent, useWindowEvents, vueQueryPluginOptions, wait, waitForIframeInitialize, waitForValue };
|
|
183281
183821
|
//# sourceMappingURL=canvas-ui.js.map
|