@pitcher/canvas-ui 2025.12.19-101638 → 2025.12.19-193808-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 +565 -4
- 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/lib/util/smart-store.util.spec.d.ts +1 -0
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -87709,18 +87709,537 @@ function toast$2(payload) {
|
|
|
87709
87709
|
return this.API.request("toast", payload);
|
|
87710
87710
|
}
|
|
87711
87711
|
|
|
87712
|
+
const SQL_KEYWORDS = /* @__PURE__ */ new Set([
|
|
87713
|
+
"SELECT",
|
|
87714
|
+
"FROM",
|
|
87715
|
+
"WHERE",
|
|
87716
|
+
"AND",
|
|
87717
|
+
"OR",
|
|
87718
|
+
"NOT",
|
|
87719
|
+
"IN",
|
|
87720
|
+
"LIKE",
|
|
87721
|
+
"ORDER",
|
|
87722
|
+
"BY",
|
|
87723
|
+
"GROUP",
|
|
87724
|
+
"HAVING",
|
|
87725
|
+
"LIMIT",
|
|
87726
|
+
"OFFSET",
|
|
87727
|
+
"ASC",
|
|
87728
|
+
"DESC",
|
|
87729
|
+
"NULLS",
|
|
87730
|
+
"FIRST",
|
|
87731
|
+
"LAST",
|
|
87732
|
+
"NULL",
|
|
87733
|
+
"TRUE",
|
|
87734
|
+
"FALSE",
|
|
87735
|
+
"COUNT",
|
|
87736
|
+
"SUM",
|
|
87737
|
+
"AVG",
|
|
87738
|
+
"MIN",
|
|
87739
|
+
"MAX",
|
|
87740
|
+
"COUNT_DISTINCT",
|
|
87741
|
+
"CALENDAR_MONTH",
|
|
87742
|
+
"CALENDAR_QUARTER",
|
|
87743
|
+
"CALENDAR_YEAR",
|
|
87744
|
+
"DAY_IN_MONTH",
|
|
87745
|
+
"DAY_IN_WEEK",
|
|
87746
|
+
"DAY_IN_YEAR",
|
|
87747
|
+
"DAY_ONLY",
|
|
87748
|
+
"FISCAL_MONTH",
|
|
87749
|
+
"FISCAL_QUARTER",
|
|
87750
|
+
"FISCAL_YEAR",
|
|
87751
|
+
"HOUR_IN_DAY",
|
|
87752
|
+
"WEEK_IN_MONTH",
|
|
87753
|
+
"WEEK_IN_YEAR",
|
|
87754
|
+
"INCLUDES",
|
|
87755
|
+
"EXCLUDES",
|
|
87756
|
+
"ABOVE",
|
|
87757
|
+
"BELOW",
|
|
87758
|
+
"ABOVE_OR_BELOW",
|
|
87759
|
+
"AT",
|
|
87760
|
+
"TYPEOF",
|
|
87761
|
+
"WHEN",
|
|
87762
|
+
"THEN",
|
|
87763
|
+
"ELSE",
|
|
87764
|
+
"END",
|
|
87765
|
+
"USING",
|
|
87766
|
+
"SCOPE",
|
|
87767
|
+
"DATA",
|
|
87768
|
+
"CATEGORY",
|
|
87769
|
+
"ROLLUP",
|
|
87770
|
+
"CUBE",
|
|
87771
|
+
"FORMAT",
|
|
87772
|
+
"CONVERTCURRENCY",
|
|
87773
|
+
"TOLABEL",
|
|
87774
|
+
"DISTANCE",
|
|
87775
|
+
"GEOLOCATION"
|
|
87776
|
+
]);
|
|
87777
|
+
const AGGREGATE_FUNCTIONS = ["COUNT", "SUM", "AVG", "MIN", "MAX", "COUNT_DISTINCT"];
|
|
87778
|
+
function isSqlKeyword(word) {
|
|
87779
|
+
return SQL_KEYWORDS.has(word.toUpperCase());
|
|
87780
|
+
}
|
|
87781
|
+
function isLiteralValue(value) {
|
|
87782
|
+
const trimmed = value.trim();
|
|
87783
|
+
if (trimmed.startsWith("'") && trimmed.endsWith("'") || trimmed.startsWith('"') && trimmed.endsWith('"')) {
|
|
87784
|
+
return true;
|
|
87785
|
+
}
|
|
87786
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
87787
|
+
return true;
|
|
87788
|
+
}
|
|
87789
|
+
if (/^(true|false)$/i.test(trimmed)) {
|
|
87790
|
+
return true;
|
|
87791
|
+
}
|
|
87792
|
+
if (/^null$/i.test(trimmed)) {
|
|
87793
|
+
return true;
|
|
87794
|
+
}
|
|
87795
|
+
if (/^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z|[+-]\d{2}:\d{2})?)?$/.test(trimmed)) {
|
|
87796
|
+
return true;
|
|
87797
|
+
}
|
|
87798
|
+
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(
|
|
87799
|
+
trimmed
|
|
87800
|
+
)) {
|
|
87801
|
+
return true;
|
|
87802
|
+
}
|
|
87803
|
+
return false;
|
|
87804
|
+
}
|
|
87805
|
+
function isDateTimeLiteral(token) {
|
|
87806
|
+
return /^\d{4}-\d{2}-\d{2}(T\d{2}:\d{2}:\d{2}(\.\d{3})?(Z|[+-]\d{2}:\d{2})?)?$/.test(token);
|
|
87807
|
+
}
|
|
87808
|
+
function convertFieldToSmartStore(field, primaryObject, objectAliases) {
|
|
87809
|
+
const trimmed = field.trim();
|
|
87810
|
+
if (isSqlKeyword(trimmed) || isLiteralValue(trimmed)) {
|
|
87811
|
+
return trimmed;
|
|
87812
|
+
}
|
|
87813
|
+
if (trimmed === "__FIELDS_ALL_PLACEHOLDER__") {
|
|
87814
|
+
return `{${primaryObject}:_soup}`;
|
|
87815
|
+
}
|
|
87816
|
+
if (trimmed === "*") {
|
|
87817
|
+
return "*";
|
|
87818
|
+
}
|
|
87819
|
+
if (trimmed.startsWith("{") && trimmed.endsWith("}")) {
|
|
87820
|
+
return trimmed;
|
|
87821
|
+
}
|
|
87822
|
+
if (trimmed.includes(".")) {
|
|
87823
|
+
const parts = trimmed.split(".");
|
|
87824
|
+
const alias = parts[0];
|
|
87825
|
+
if (objectAliases.has(alias.toLowerCase()) && objectAliases.get(alias.toLowerCase()) === primaryObject) {
|
|
87826
|
+
const fieldPath = parts.slice(1).join(".");
|
|
87827
|
+
return `{${primaryObject}:${fieldPath}}`;
|
|
87828
|
+
}
|
|
87829
|
+
return `{${primaryObject}:${trimmed}}`;
|
|
87830
|
+
}
|
|
87831
|
+
return `{${primaryObject}:${trimmed}}`;
|
|
87832
|
+
}
|
|
87833
|
+
function convertAggregateFunction(expr, primaryObject, objectAliases) {
|
|
87834
|
+
for (const func of AGGREGATE_FUNCTIONS) {
|
|
87835
|
+
const regex = new RegExp(`\\b${func}\\s*\\(([^)]+)\\)`, "gi");
|
|
87836
|
+
expr = expr.replace(regex, (_match, innerField) => {
|
|
87837
|
+
const trimmedInner = innerField.trim();
|
|
87838
|
+
if (trimmedInner === "*") {
|
|
87839
|
+
return `${func}(*)`;
|
|
87840
|
+
}
|
|
87841
|
+
if (trimmedInner.toUpperCase().startsWith("DISTINCT ")) {
|
|
87842
|
+
const fieldPart = trimmedInner.substring(9).trim();
|
|
87843
|
+
const smartField2 = convertFieldToSmartStore(fieldPart, primaryObject, objectAliases);
|
|
87844
|
+
return `${func}(DISTINCT ${smartField2})`;
|
|
87845
|
+
}
|
|
87846
|
+
const smartField = convertFieldToSmartStore(trimmedInner, primaryObject, objectAliases);
|
|
87847
|
+
return `${func}(${smartField})`;
|
|
87848
|
+
});
|
|
87849
|
+
}
|
|
87850
|
+
return expr;
|
|
87851
|
+
}
|
|
87852
|
+
function parseSelectFields(selectClause) {
|
|
87853
|
+
const fields = [];
|
|
87854
|
+
let depth = 0;
|
|
87855
|
+
let currentField = "";
|
|
87856
|
+
for (let i = 0; i < selectClause.length; i++) {
|
|
87857
|
+
const char = selectClause[i];
|
|
87858
|
+
if (char === "(") {
|
|
87859
|
+
depth++;
|
|
87860
|
+
currentField += char;
|
|
87861
|
+
} else if (char === ")") {
|
|
87862
|
+
depth--;
|
|
87863
|
+
currentField += char;
|
|
87864
|
+
} else if (char === "," && depth === 0) {
|
|
87865
|
+
if (currentField.trim()) {
|
|
87866
|
+
fields.push(currentField.trim());
|
|
87867
|
+
}
|
|
87868
|
+
currentField = "";
|
|
87869
|
+
} else {
|
|
87870
|
+
currentField += char;
|
|
87871
|
+
}
|
|
87872
|
+
}
|
|
87873
|
+
if (currentField.trim()) {
|
|
87874
|
+
fields.push(currentField.trim());
|
|
87875
|
+
}
|
|
87876
|
+
return fields;
|
|
87877
|
+
}
|
|
87878
|
+
function convertSelectFields(fields, primaryObject, objectAliases) {
|
|
87879
|
+
return fields.map((field) => {
|
|
87880
|
+
const aliasMatch = field.match(/^(.+?)\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*)$/i);
|
|
87881
|
+
let expression = field;
|
|
87882
|
+
let alias = "";
|
|
87883
|
+
if (aliasMatch) {
|
|
87884
|
+
expression = aliasMatch[1].trim();
|
|
87885
|
+
alias = aliasMatch[2];
|
|
87886
|
+
}
|
|
87887
|
+
const hasAggregate = AGGREGATE_FUNCTIONS.some((func) => new RegExp(`\\b${func}\\s*\\(`, "i").test(expression));
|
|
87888
|
+
if (hasAggregate) {
|
|
87889
|
+
const converted2 = convertAggregateFunction(expression, primaryObject, objectAliases);
|
|
87890
|
+
return alias ? `${converted2} ${alias}` : converted2;
|
|
87891
|
+
}
|
|
87892
|
+
const converted = convertFieldToSmartStore(expression, primaryObject, objectAliases);
|
|
87893
|
+
return alias ? `${converted} ${alias}` : converted;
|
|
87894
|
+
});
|
|
87895
|
+
}
|
|
87896
|
+
function convertNullComparisons(clause) {
|
|
87897
|
+
let result = clause.replace(/\s*!=\s*null\b/gi, " IS NOT NULL");
|
|
87898
|
+
result = result.replace(/\s*<>\s*null\b/gi, " IS NOT NULL");
|
|
87899
|
+
result = result.replace(/\s*=\s*null\b/gi, " IS NULL");
|
|
87900
|
+
return result;
|
|
87901
|
+
}
|
|
87902
|
+
function convertWhereClause(whereClause, primaryObject, objectAliases) {
|
|
87903
|
+
let result = "";
|
|
87904
|
+
let i = 0;
|
|
87905
|
+
const len = whereClause.length;
|
|
87906
|
+
while (i < len) {
|
|
87907
|
+
const char = whereClause[i];
|
|
87908
|
+
if (/\s/.test(char)) {
|
|
87909
|
+
result += char;
|
|
87910
|
+
i++;
|
|
87911
|
+
continue;
|
|
87912
|
+
}
|
|
87913
|
+
if (char === "'" || char === '"') {
|
|
87914
|
+
const quote = char;
|
|
87915
|
+
result += char;
|
|
87916
|
+
i++;
|
|
87917
|
+
while (i < len && whereClause[i] !== quote) {
|
|
87918
|
+
if (whereClause[i] === "\\" && i + 1 < len) {
|
|
87919
|
+
result += whereClause[i] + whereClause[i + 1];
|
|
87920
|
+
i += 2;
|
|
87921
|
+
} else {
|
|
87922
|
+
result += whereClause[i];
|
|
87923
|
+
i++;
|
|
87924
|
+
}
|
|
87925
|
+
}
|
|
87926
|
+
if (i < len) {
|
|
87927
|
+
result += whereClause[i];
|
|
87928
|
+
i++;
|
|
87929
|
+
}
|
|
87930
|
+
continue;
|
|
87931
|
+
}
|
|
87932
|
+
if (/[()=<>!,]/.test(char)) {
|
|
87933
|
+
result += char;
|
|
87934
|
+
i++;
|
|
87935
|
+
if ((char === "!" || char === "<" || char === ">") && i < len && whereClause[i] === "=") {
|
|
87936
|
+
result += whereClause[i];
|
|
87937
|
+
i++;
|
|
87938
|
+
}
|
|
87939
|
+
continue;
|
|
87940
|
+
}
|
|
87941
|
+
if (/[a-zA-Z_]/.test(char)) {
|
|
87942
|
+
let identifier = "";
|
|
87943
|
+
while (i < len && /[a-zA-Z0-9_.]/.test(whereClause[i])) {
|
|
87944
|
+
identifier += whereClause[i];
|
|
87945
|
+
i++;
|
|
87946
|
+
}
|
|
87947
|
+
if (isSqlKeyword(identifier) || isLiteralValue(identifier)) {
|
|
87948
|
+
result += identifier;
|
|
87949
|
+
} else {
|
|
87950
|
+
result += convertFieldToSmartStore(identifier, primaryObject, objectAliases);
|
|
87951
|
+
}
|
|
87952
|
+
continue;
|
|
87953
|
+
}
|
|
87954
|
+
if (/[0-9-]/.test(char)) {
|
|
87955
|
+
let token = "";
|
|
87956
|
+
if (char === "-") {
|
|
87957
|
+
token += char;
|
|
87958
|
+
i++;
|
|
87959
|
+
}
|
|
87960
|
+
while (i < len && /[0-9.:\-TZ+]/.test(whereClause[i])) {
|
|
87961
|
+
token += whereClause[i];
|
|
87962
|
+
i++;
|
|
87963
|
+
}
|
|
87964
|
+
if (isDateTimeLiteral(token)) {
|
|
87965
|
+
result += `'${token}'`;
|
|
87966
|
+
} else {
|
|
87967
|
+
result += token;
|
|
87968
|
+
}
|
|
87969
|
+
continue;
|
|
87970
|
+
}
|
|
87971
|
+
result += char;
|
|
87972
|
+
i++;
|
|
87973
|
+
}
|
|
87974
|
+
result = convertNullComparisons(result);
|
|
87975
|
+
return result;
|
|
87976
|
+
}
|
|
87977
|
+
function parseOrderByClause(orderByClause) {
|
|
87978
|
+
const result = [];
|
|
87979
|
+
const parts = orderByClause.split(/,(?![^()]*\))/);
|
|
87980
|
+
for (const part of parts) {
|
|
87981
|
+
const trimmed = part.trim();
|
|
87982
|
+
if (!trimmed) continue;
|
|
87983
|
+
const match = trimmed.match(/^(.+?)\s*(ASC|DESC)?\s*(NULLS\s+(?:FIRST|LAST))?$/i);
|
|
87984
|
+
if (match) {
|
|
87985
|
+
const field = match[1].trim();
|
|
87986
|
+
let direction = match[2] ? match[2].toUpperCase() : "";
|
|
87987
|
+
if (match[3]) {
|
|
87988
|
+
direction += (direction ? " " : "") + match[3].toUpperCase();
|
|
87989
|
+
}
|
|
87990
|
+
result.push({ field, direction });
|
|
87991
|
+
} else {
|
|
87992
|
+
result.push({ field: trimmed, direction: "" });
|
|
87993
|
+
}
|
|
87994
|
+
}
|
|
87995
|
+
return result;
|
|
87996
|
+
}
|
|
87997
|
+
function convertOrderByFields(orderByParts, primaryObject, objectAliases) {
|
|
87998
|
+
return orderByParts.map(({ field, direction }) => {
|
|
87999
|
+
const hasAggregate = AGGREGATE_FUNCTIONS.some((func) => new RegExp(`\\b${func}\\s*\\(`, "i").test(field));
|
|
88000
|
+
let convertedField;
|
|
88001
|
+
if (hasAggregate) {
|
|
88002
|
+
convertedField = convertAggregateFunction(field, primaryObject, objectAliases);
|
|
88003
|
+
} else {
|
|
88004
|
+
convertedField = convertFieldToSmartStore(field, primaryObject, objectAliases);
|
|
88005
|
+
}
|
|
88006
|
+
return direction ? `${convertedField} ${direction}` : convertedField;
|
|
88007
|
+
});
|
|
88008
|
+
}
|
|
88009
|
+
function parseGroupByClause(groupByClause) {
|
|
88010
|
+
return groupByClause.split(/,(?![^()]*\))/).map((f) => f.trim()).filter(Boolean);
|
|
88011
|
+
}
|
|
88012
|
+
function convertGroupByFields(fields, primaryObject, objectAliases) {
|
|
88013
|
+
return fields.map((field) => {
|
|
88014
|
+
if (/^(ROLLUP|CUBE)\s*\(/i.test(field)) {
|
|
88015
|
+
return field.replace(/\(([^)]+)\)/g, (_match, inner) => {
|
|
88016
|
+
const innerFields = inner.split(",").map((f) => f.trim());
|
|
88017
|
+
const converted = innerFields.map((f) => convertFieldToSmartStore(f, primaryObject, objectAliases));
|
|
88018
|
+
return `(${converted.join(", ")})`;
|
|
88019
|
+
});
|
|
88020
|
+
}
|
|
88021
|
+
return convertFieldToSmartStore(field, primaryObject, objectAliases);
|
|
88022
|
+
});
|
|
88023
|
+
}
|
|
88024
|
+
function parseFromClause(fromClause) {
|
|
88025
|
+
const joins = [];
|
|
88026
|
+
const primaryMatch = fromClause.match(/^([A-Za-z0-9_]+)(?:\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*))?/i);
|
|
88027
|
+
if (!primaryMatch) {
|
|
88028
|
+
return { primary: "", joins };
|
|
88029
|
+
}
|
|
88030
|
+
const primary = primaryMatch[1];
|
|
88031
|
+
const alias = primaryMatch[2];
|
|
88032
|
+
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;
|
|
88033
|
+
let joinMatch;
|
|
88034
|
+
while ((joinMatch = joinRegex.exec(fromClause)) !== null) {
|
|
88035
|
+
joins.push({
|
|
88036
|
+
type: joinMatch[1].toUpperCase().replace(/\s+/g, " "),
|
|
88037
|
+
object: joinMatch[2],
|
|
88038
|
+
alias: joinMatch[3],
|
|
88039
|
+
on: joinMatch[4]?.trim()
|
|
88040
|
+
});
|
|
88041
|
+
}
|
|
88042
|
+
return { primary, alias, joins };
|
|
88043
|
+
}
|
|
88044
|
+
function convertSoqlToSmartQuery(soqlQuery) {
|
|
88045
|
+
if (!soqlQuery || typeof soqlQuery !== "string") {
|
|
88046
|
+
return "";
|
|
88047
|
+
}
|
|
88048
|
+
let normalizedQuery = soqlQuery.replace(/\s+/g, " ").trim();
|
|
88049
|
+
const fromMatch = normalizedQuery.match(
|
|
88050
|
+
/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
|
|
88051
|
+
);
|
|
88052
|
+
if (!fromMatch) {
|
|
88053
|
+
return soqlQuery;
|
|
88054
|
+
}
|
|
88055
|
+
const fromParsed = parseFromClause(fromMatch[1].trim());
|
|
88056
|
+
const primaryObject = fromParsed.primary;
|
|
88057
|
+
if (!primaryObject) {
|
|
88058
|
+
return soqlQuery;
|
|
88059
|
+
}
|
|
88060
|
+
normalizedQuery = normalizedQuery.replace(
|
|
88061
|
+
/\bFIELDS\s*\(\s*(ALL|STANDARD|CUSTOM)\s*\)/gi,
|
|
88062
|
+
"__FIELDS_ALL_PLACEHOLDER__"
|
|
88063
|
+
);
|
|
88064
|
+
const selectMatch = normalizedQuery.match(/SELECT\s+([\s\S]+?)\s+FROM\s+/i);
|
|
88065
|
+
if (!selectMatch) {
|
|
88066
|
+
return soqlQuery;
|
|
88067
|
+
}
|
|
88068
|
+
const whereMatch = normalizedQuery.match(
|
|
88069
|
+
/WHERE\s+([\s\S]+?)(?=\s+ORDER\s+BY\s+|\s+GROUP\s+BY\s+|\s+HAVING\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i
|
|
88070
|
+
);
|
|
88071
|
+
const groupByMatch = normalizedQuery.match(
|
|
88072
|
+
/GROUP\s+BY\s+([\s\S]+?)(?=\s+HAVING\s+|\s+ORDER\s+BY\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i
|
|
88073
|
+
);
|
|
88074
|
+
const havingMatch = normalizedQuery.match(/HAVING\s+([\s\S]+?)(?=\s+ORDER\s+BY\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i);
|
|
88075
|
+
const orderByMatch = normalizedQuery.match(/ORDER\s+BY\s+([\s\S]+?)(?=\s+LIMIT\s+|\s+OFFSET\s+|$)/i);
|
|
88076
|
+
const limitMatch = normalizedQuery.match(/LIMIT\s+(\d+)/i);
|
|
88077
|
+
const offsetMatch = normalizedQuery.match(/OFFSET\s+(\d+)/i);
|
|
88078
|
+
const objectAliases = /* @__PURE__ */ new Map();
|
|
88079
|
+
if (fromParsed.alias) {
|
|
88080
|
+
objectAliases.set(fromParsed.alias.toLowerCase(), primaryObject);
|
|
88081
|
+
}
|
|
88082
|
+
objectAliases.set(primaryObject.toLowerCase(), primaryObject);
|
|
88083
|
+
const parts = [];
|
|
88084
|
+
const selectFields = parseSelectFields(selectMatch[1].trim());
|
|
88085
|
+
const smartSelectFields = convertSelectFields(selectFields, primaryObject, objectAliases);
|
|
88086
|
+
parts.push(`SELECT ${smartSelectFields.join(", ")}`);
|
|
88087
|
+
parts.push(`FROM {${primaryObject}}`);
|
|
88088
|
+
const whereConditions = [];
|
|
88089
|
+
if (whereMatch) {
|
|
88090
|
+
const smartWhere = convertWhereClause(whereMatch[1].trim(), primaryObject, objectAliases);
|
|
88091
|
+
whereConditions.push(smartWhere);
|
|
88092
|
+
}
|
|
88093
|
+
if (whereConditions.length > 0) {
|
|
88094
|
+
parts.push(`WHERE ${whereConditions.join(" AND ")}`);
|
|
88095
|
+
}
|
|
88096
|
+
if (groupByMatch) {
|
|
88097
|
+
const groupByFields = parseGroupByClause(groupByMatch[1].trim());
|
|
88098
|
+
const smartGroupBy = convertGroupByFields(groupByFields, primaryObject, objectAliases);
|
|
88099
|
+
parts.push(`GROUP BY ${smartGroupBy.join(", ")}`);
|
|
88100
|
+
}
|
|
88101
|
+
if (havingMatch) {
|
|
88102
|
+
const smartHaving = convertWhereClause(havingMatch[1].trim(), primaryObject, objectAliases);
|
|
88103
|
+
parts.push(`HAVING ${smartHaving}`);
|
|
88104
|
+
}
|
|
88105
|
+
if (orderByMatch) {
|
|
88106
|
+
const orderByParts = parseOrderByClause(orderByMatch[1].trim());
|
|
88107
|
+
const smartOrderBy = convertOrderByFields(orderByParts, primaryObject, objectAliases);
|
|
88108
|
+
parts.push(`ORDER BY ${smartOrderBy.join(", ")}`);
|
|
88109
|
+
}
|
|
88110
|
+
if (limitMatch) {
|
|
88111
|
+
parts.push(`LIMIT ${limitMatch[1]}`);
|
|
88112
|
+
}
|
|
88113
|
+
if (offsetMatch) {
|
|
88114
|
+
parts.push(`OFFSET ${offsetMatch[1]}`);
|
|
88115
|
+
}
|
|
88116
|
+
return parts.join(" ");
|
|
88117
|
+
}
|
|
88118
|
+
|
|
87712
88119
|
function query(payload) {
|
|
87713
88120
|
return highLevelApi.API.request("query", payload);
|
|
87714
88121
|
}
|
|
87715
88122
|
function crmQuery(payload) {
|
|
87716
88123
|
return highLevelApi.API.request("crm_query", payload);
|
|
87717
88124
|
}
|
|
88125
|
+
function extractFieldsFromSoql(soqlQuery) {
|
|
88126
|
+
const selectMatch = soqlQuery.match(/SELECT\s+([\s\S]+?)\s+FROM\s+/i);
|
|
88127
|
+
if (!selectMatch) return [];
|
|
88128
|
+
const selectClause = selectMatch[1];
|
|
88129
|
+
const fields = [];
|
|
88130
|
+
let depth = 0;
|
|
88131
|
+
let currentField = "";
|
|
88132
|
+
for (let i = 0; i < selectClause.length; i++) {
|
|
88133
|
+
const char = selectClause[i];
|
|
88134
|
+
if (char === "(") {
|
|
88135
|
+
depth++;
|
|
88136
|
+
currentField += char;
|
|
88137
|
+
} else if (char === ")") {
|
|
88138
|
+
depth--;
|
|
88139
|
+
currentField += char;
|
|
88140
|
+
} else if (char === "," && depth === 0) {
|
|
88141
|
+
if (currentField.trim()) {
|
|
88142
|
+
fields.push(currentField.trim());
|
|
88143
|
+
}
|
|
88144
|
+
currentField = "";
|
|
88145
|
+
} else {
|
|
88146
|
+
currentField += char;
|
|
88147
|
+
}
|
|
88148
|
+
}
|
|
88149
|
+
if (currentField.trim()) {
|
|
88150
|
+
fields.push(currentField.trim());
|
|
88151
|
+
}
|
|
88152
|
+
return fields.map((field) => {
|
|
88153
|
+
const aliasMatch = field.match(/^(.+?)\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*)$/i);
|
|
88154
|
+
const fieldExpr = aliasMatch ? aliasMatch[1].trim() : field.trim();
|
|
88155
|
+
return fieldExpr;
|
|
88156
|
+
});
|
|
88157
|
+
}
|
|
88158
|
+
function extractObjectFromSoql(soqlQuery) {
|
|
88159
|
+
const fromMatch = soqlQuery.match(/FROM\s+([A-Za-z0-9_]+)/i);
|
|
88160
|
+
return fromMatch ? fromMatch[1] : "";
|
|
88161
|
+
}
|
|
88162
|
+
function setNestedProperty(obj, path, value) {
|
|
88163
|
+
const parts = path.split(".");
|
|
88164
|
+
if (parts.length === 1) {
|
|
88165
|
+
obj[path] = value;
|
|
88166
|
+
return;
|
|
88167
|
+
}
|
|
88168
|
+
let current = obj;
|
|
88169
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
88170
|
+
const part = parts[i];
|
|
88171
|
+
if (!current[part] || typeof current[part] !== "object") {
|
|
88172
|
+
current[part] = {};
|
|
88173
|
+
}
|
|
88174
|
+
current = current[part];
|
|
88175
|
+
}
|
|
88176
|
+
current[parts[parts.length - 1]] = value;
|
|
88177
|
+
}
|
|
88178
|
+
function isAllFieldsSelector(field) {
|
|
88179
|
+
const trimmed = field.trim();
|
|
88180
|
+
return trimmed === "*" || /^FIELDS\s*\(\s*(ALL|STANDARD|CUSTOM)\s*\)$/i.test(trimmed);
|
|
88181
|
+
}
|
|
88182
|
+
function transformSmartStoreResults(smartStoreResults, fields, objectName) {
|
|
88183
|
+
if (!smartStoreResults || !Array.isArray(smartStoreResults)) {
|
|
88184
|
+
return [];
|
|
88185
|
+
}
|
|
88186
|
+
return smartStoreResults.map((row) => {
|
|
88187
|
+
const record = {};
|
|
88188
|
+
fields.forEach((field, index) => {
|
|
88189
|
+
if (index < row.length) {
|
|
88190
|
+
const value = row[index];
|
|
88191
|
+
if (isAllFieldsSelector(field)) {
|
|
88192
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
88193
|
+
Object.assign(record, value);
|
|
88194
|
+
}
|
|
88195
|
+
} else {
|
|
88196
|
+
setNestedProperty(record, field, value);
|
|
88197
|
+
}
|
|
88198
|
+
}
|
|
88199
|
+
});
|
|
88200
|
+
const recordId = record["Id"] || record["id"] || "";
|
|
88201
|
+
record["attributes"] = {
|
|
88202
|
+
type: objectName,
|
|
88203
|
+
url: recordId ? `/services/data/v57.0/sobjects/${objectName}/${recordId}` : ""
|
|
88204
|
+
};
|
|
88205
|
+
return record;
|
|
88206
|
+
});
|
|
88207
|
+
}
|
|
88208
|
+
async function crmQueryAdaptive(payload) {
|
|
88209
|
+
const query2 = payload.query;
|
|
88210
|
+
if (!query2 || typeof query2 !== "string") {
|
|
88211
|
+
return Promise.reject(new Error("Query is required and must be a string"));
|
|
88212
|
+
}
|
|
88213
|
+
let useSmartStore = false;
|
|
88214
|
+
try {
|
|
88215
|
+
const env = await highLevelApi.API.request("get_env");
|
|
88216
|
+
const isIos = env?.mode === "IOS";
|
|
88217
|
+
const isSfdcSyncEnabled = env?.pitcher?.instance?.settings?.enable_sfdc_sync === true;
|
|
88218
|
+
useSmartStore = isIos && isSfdcSyncEnabled;
|
|
88219
|
+
} catch {
|
|
88220
|
+
useSmartStore = false;
|
|
88221
|
+
}
|
|
88222
|
+
console.log(`crmQueryAdaptive called with the query: `, query2);
|
|
88223
|
+
if (useSmartStore) {
|
|
88224
|
+
const fields = extractFieldsFromSoql(query2);
|
|
88225
|
+
const objectName = extractObjectFromSoql(query2);
|
|
88226
|
+
const smartQuery = convertSoqlToSmartQuery(query2);
|
|
88227
|
+
console.log(`Smart Query: `, smartQuery);
|
|
88228
|
+
const smartStoreResults = await crmSmartQuery({ query: smartQuery });
|
|
88229
|
+
const records = transformSmartStoreResults(smartStoreResults, fields, objectName);
|
|
88230
|
+
return {
|
|
88231
|
+
records,
|
|
88232
|
+
totalSize: records.length
|
|
88233
|
+
};
|
|
88234
|
+
}
|
|
88235
|
+
return crmQuery(payload);
|
|
88236
|
+
}
|
|
87718
88237
|
function crmSmartQuery(payload) {
|
|
87719
88238
|
const query2 = payload.query;
|
|
87720
88239
|
if (!query2 || typeof query2 !== "string") {
|
|
87721
88240
|
return Promise.reject(new Error("Query is required and must be a string"));
|
|
87722
88241
|
}
|
|
87723
|
-
const smartStorePattern = /\{[^}]+:[^}]
|
|
88242
|
+
const smartStorePattern = /\{[^}]+:[^}]+}/;
|
|
87724
88243
|
if (!smartStorePattern.test(query2.trim())) {
|
|
87725
88244
|
return Promise.reject(
|
|
87726
88245
|
new Error(
|
|
@@ -87777,7 +88296,14 @@ function crmSmartUpsertObjects(payload) {
|
|
|
87777
88296
|
}
|
|
87778
88297
|
}
|
|
87779
88298
|
}
|
|
87780
|
-
|
|
88299
|
+
console.log("[crmSmartUpsertObjects] Request payload:", JSON.stringify(payload, null, 2));
|
|
88300
|
+
return highLevelApi.API.request("crm_smart_upsert_objects", payload).then((result) => {
|
|
88301
|
+
console.log("[crmSmartUpsertObjects] Success:", result);
|
|
88302
|
+
return result;
|
|
88303
|
+
}).catch((error) => {
|
|
88304
|
+
console.error("[crmSmartUpsertObjects] Error:", error);
|
|
88305
|
+
throw error;
|
|
88306
|
+
});
|
|
87781
88307
|
}
|
|
87782
88308
|
function crmSmartObjectValidationRules(payload) {
|
|
87783
88309
|
if (!payload) {
|
|
@@ -87817,7 +88343,14 @@ function crmSmartDeleteObjects(payload) {
|
|
|
87817
88343
|
}
|
|
87818
88344
|
}
|
|
87819
88345
|
}
|
|
87820
|
-
|
|
88346
|
+
console.log("[crmSmartDeleteObjects] Request payload:", JSON.stringify(payload, null, 2));
|
|
88347
|
+
return highLevelApi.API.request("crm_smart_delete_objects", payload).then((result) => {
|
|
88348
|
+
console.log("[crmSmartDeleteObjects] Success:", result);
|
|
88349
|
+
return result;
|
|
88350
|
+
}).catch((error) => {
|
|
88351
|
+
console.error("[crmSmartDeleteObjects] Error:", error);
|
|
88352
|
+
throw error;
|
|
88353
|
+
});
|
|
87821
88354
|
}
|
|
87822
88355
|
function crmCreate(payload) {
|
|
87823
88356
|
if (!payload) {
|
|
@@ -87960,6 +88493,7 @@ const modules = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
87960
88493
|
createFolder,
|
|
87961
88494
|
crmCreate,
|
|
87962
88495
|
crmQuery,
|
|
88496
|
+
crmQueryAdaptive,
|
|
87963
88497
|
crmSmartDeleteObjects,
|
|
87964
88498
|
crmSmartObjectMetadata,
|
|
87965
88499
|
crmSmartObjectValidationRules,
|
|
@@ -181045,6 +181579,33 @@ function useTheme() {
|
|
|
181045
181579
|
};
|
|
181046
181580
|
}
|
|
181047
181581
|
|
|
181582
|
+
function useSmartStore(env) {
|
|
181583
|
+
const shouldUseSmartStore = computed(() => {
|
|
181584
|
+
try {
|
|
181585
|
+
const envValue = unref(env);
|
|
181586
|
+
if (!envValue) {
|
|
181587
|
+
return false;
|
|
181588
|
+
}
|
|
181589
|
+
const isIos = envValue?.mode === "IOS";
|
|
181590
|
+
const isSfdcSyncEnabled = envValue?.pitcher?.instance?.settings?.enable_sfdc_sync === true;
|
|
181591
|
+
return isIos && isSfdcSyncEnabled;
|
|
181592
|
+
} catch (error) {
|
|
181593
|
+
console.error("[useSmartStore] Error checking SmartStore availability:", error);
|
|
181594
|
+
return false;
|
|
181595
|
+
}
|
|
181596
|
+
});
|
|
181597
|
+
const generateTempSalesforceId = (objectPrefix) => {
|
|
181598
|
+
const timestamp = Date.now().toString(36);
|
|
181599
|
+
const randomStr = Math.random().toString(36).substring(2, 11);
|
|
181600
|
+
const uniqueId = (timestamp + randomStr).substring(0, 14 - objectPrefix.length);
|
|
181601
|
+
return "PIT_" + objectPrefix + uniqueId.padEnd(14 - objectPrefix.length, "0");
|
|
181602
|
+
};
|
|
181603
|
+
return {
|
|
181604
|
+
shouldUseSmartStore,
|
|
181605
|
+
generateTempSalesforceId
|
|
181606
|
+
};
|
|
181607
|
+
}
|
|
181608
|
+
|
|
181048
181609
|
const initialCanvas = ref(void 0);
|
|
181049
181610
|
const useCanvasOverlay = () => {
|
|
181050
181611
|
const openCanvasOverlay = ({ id, fullscreen, edit_mode, component_id, section_id, position }) => {
|
|
@@ -183354,5 +183915,5 @@ const localeNames = {
|
|
|
183354
183915
|
};
|
|
183355
183916
|
const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
|
|
183356
183917
|
|
|
183357
|
-
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, evaluateIsExecutedCondition, executeWithDoublingTime, exitFullscreen, extractFieldNamesFromCondition, 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 };
|
|
183918
|
+
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, evaluateIsExecutedCondition, executeWithDoublingTime, exitFullscreen, extractFieldNamesFromCondition, 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 };
|
|
183358
183919
|
//# sourceMappingURL=canvas-ui.js.map
|