@pitcher/canvas-ui 2025.12.16-90934 → 2025.12.17-001204-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 +561 -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/lib/util/smart-store.util.spec.d.ts +1 -0
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -87705,12 +87705,528 @@ 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 === "__FIELDS_ALL_PLACEHOLDER__") {
|
|
87810
|
+
return `{${primaryObject}:_soup}`;
|
|
87811
|
+
}
|
|
87812
|
+
if (trimmed === "*") {
|
|
87813
|
+
return "*";
|
|
87814
|
+
}
|
|
87815
|
+
if (trimmed.startsWith("{") && trimmed.endsWith("}")) {
|
|
87816
|
+
return trimmed;
|
|
87817
|
+
}
|
|
87818
|
+
if (trimmed.includes(".")) {
|
|
87819
|
+
const parts = trimmed.split(".");
|
|
87820
|
+
const alias = parts[0];
|
|
87821
|
+
if (objectAliases.has(alias.toLowerCase()) && objectAliases.get(alias.toLowerCase()) === primaryObject) {
|
|
87822
|
+
const fieldPath = parts.slice(1).join(".");
|
|
87823
|
+
return `{${primaryObject}:${fieldPath}}`;
|
|
87824
|
+
}
|
|
87825
|
+
return `{${primaryObject}:${trimmed}}`;
|
|
87826
|
+
}
|
|
87827
|
+
return `{${primaryObject}:${trimmed}}`;
|
|
87828
|
+
}
|
|
87829
|
+
function convertAggregateFunction(expr, primaryObject, objectAliases) {
|
|
87830
|
+
for (const func of AGGREGATE_FUNCTIONS) {
|
|
87831
|
+
const regex = new RegExp(`\\b${func}\\s*\\(([^)]+)\\)`, "gi");
|
|
87832
|
+
expr = expr.replace(regex, (_match, innerField) => {
|
|
87833
|
+
const trimmedInner = innerField.trim();
|
|
87834
|
+
if (trimmedInner === "*") {
|
|
87835
|
+
return `${func}(*)`;
|
|
87836
|
+
}
|
|
87837
|
+
if (trimmedInner.toUpperCase().startsWith("DISTINCT ")) {
|
|
87838
|
+
const fieldPart = trimmedInner.substring(9).trim();
|
|
87839
|
+
const smartField2 = convertFieldToSmartStore(fieldPart, primaryObject, objectAliases);
|
|
87840
|
+
return `${func}(DISTINCT ${smartField2})`;
|
|
87841
|
+
}
|
|
87842
|
+
const smartField = convertFieldToSmartStore(trimmedInner, primaryObject, objectAliases);
|
|
87843
|
+
return `${func}(${smartField})`;
|
|
87844
|
+
});
|
|
87845
|
+
}
|
|
87846
|
+
return expr;
|
|
87847
|
+
}
|
|
87848
|
+
function parseSelectFields(selectClause) {
|
|
87849
|
+
const fields = [];
|
|
87850
|
+
let depth = 0;
|
|
87851
|
+
let currentField = "";
|
|
87852
|
+
for (let i = 0; i < selectClause.length; i++) {
|
|
87853
|
+
const char = selectClause[i];
|
|
87854
|
+
if (char === "(") {
|
|
87855
|
+
depth++;
|
|
87856
|
+
currentField += char;
|
|
87857
|
+
} else if (char === ")") {
|
|
87858
|
+
depth--;
|
|
87859
|
+
currentField += char;
|
|
87860
|
+
} else if (char === "," && depth === 0) {
|
|
87861
|
+
if (currentField.trim()) {
|
|
87862
|
+
fields.push(currentField.trim());
|
|
87863
|
+
}
|
|
87864
|
+
currentField = "";
|
|
87865
|
+
} else {
|
|
87866
|
+
currentField += char;
|
|
87867
|
+
}
|
|
87868
|
+
}
|
|
87869
|
+
if (currentField.trim()) {
|
|
87870
|
+
fields.push(currentField.trim());
|
|
87871
|
+
}
|
|
87872
|
+
return fields;
|
|
87873
|
+
}
|
|
87874
|
+
function convertSelectFields(fields, primaryObject, objectAliases) {
|
|
87875
|
+
return fields.map((field) => {
|
|
87876
|
+
const aliasMatch = field.match(/^(.+?)\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*)$/i);
|
|
87877
|
+
let expression = field;
|
|
87878
|
+
let alias = "";
|
|
87879
|
+
if (aliasMatch) {
|
|
87880
|
+
expression = aliasMatch[1].trim();
|
|
87881
|
+
alias = aliasMatch[2];
|
|
87882
|
+
}
|
|
87883
|
+
const hasAggregate = AGGREGATE_FUNCTIONS.some((func) => new RegExp(`\\b${func}\\s*\\(`, "i").test(expression));
|
|
87884
|
+
if (hasAggregate) {
|
|
87885
|
+
const converted2 = convertAggregateFunction(expression, primaryObject, objectAliases);
|
|
87886
|
+
return alias ? `${converted2} ${alias}` : converted2;
|
|
87887
|
+
}
|
|
87888
|
+
const converted = convertFieldToSmartStore(expression, primaryObject, objectAliases);
|
|
87889
|
+
return alias ? `${converted} ${alias}` : converted;
|
|
87890
|
+
});
|
|
87891
|
+
}
|
|
87892
|
+
function convertNullComparisons(clause) {
|
|
87893
|
+
let result = clause.replace(/\s*!=\s*null\b/gi, " IS NOT NULL");
|
|
87894
|
+
result = result.replace(/\s*<>\s*null\b/gi, " IS NOT NULL");
|
|
87895
|
+
result = result.replace(/\s*=\s*null\b/gi, " IS NULL");
|
|
87896
|
+
return result;
|
|
87897
|
+
}
|
|
87898
|
+
function convertWhereClause(whereClause, primaryObject, objectAliases) {
|
|
87899
|
+
let result = "";
|
|
87900
|
+
let i = 0;
|
|
87901
|
+
const len = whereClause.length;
|
|
87902
|
+
while (i < len) {
|
|
87903
|
+
const char = whereClause[i];
|
|
87904
|
+
if (/\s/.test(char)) {
|
|
87905
|
+
result += char;
|
|
87906
|
+
i++;
|
|
87907
|
+
continue;
|
|
87908
|
+
}
|
|
87909
|
+
if (char === "'" || char === '"') {
|
|
87910
|
+
const quote = char;
|
|
87911
|
+
result += char;
|
|
87912
|
+
i++;
|
|
87913
|
+
while (i < len && whereClause[i] !== quote) {
|
|
87914
|
+
if (whereClause[i] === "\\" && i + 1 < len) {
|
|
87915
|
+
result += whereClause[i] + whereClause[i + 1];
|
|
87916
|
+
i += 2;
|
|
87917
|
+
} else {
|
|
87918
|
+
result += whereClause[i];
|
|
87919
|
+
i++;
|
|
87920
|
+
}
|
|
87921
|
+
}
|
|
87922
|
+
if (i < len) {
|
|
87923
|
+
result += whereClause[i];
|
|
87924
|
+
i++;
|
|
87925
|
+
}
|
|
87926
|
+
continue;
|
|
87927
|
+
}
|
|
87928
|
+
if (/[()=<>!,]/.test(char)) {
|
|
87929
|
+
result += char;
|
|
87930
|
+
i++;
|
|
87931
|
+
if ((char === "!" || char === "<" || char === ">") && i < len && whereClause[i] === "=") {
|
|
87932
|
+
result += whereClause[i];
|
|
87933
|
+
i++;
|
|
87934
|
+
}
|
|
87935
|
+
continue;
|
|
87936
|
+
}
|
|
87937
|
+
if (/[a-zA-Z_]/.test(char)) {
|
|
87938
|
+
let identifier = "";
|
|
87939
|
+
while (i < len && /[a-zA-Z0-9_.]/.test(whereClause[i])) {
|
|
87940
|
+
identifier += whereClause[i];
|
|
87941
|
+
i++;
|
|
87942
|
+
}
|
|
87943
|
+
if (isSqlKeyword(identifier) || isLiteralValue(identifier)) {
|
|
87944
|
+
result += identifier;
|
|
87945
|
+
} else {
|
|
87946
|
+
result += convertFieldToSmartStore(identifier, primaryObject, objectAliases);
|
|
87947
|
+
}
|
|
87948
|
+
continue;
|
|
87949
|
+
}
|
|
87950
|
+
if (/[0-9-]/.test(char)) {
|
|
87951
|
+
let token = "";
|
|
87952
|
+
if (char === "-") {
|
|
87953
|
+
token += char;
|
|
87954
|
+
i++;
|
|
87955
|
+
}
|
|
87956
|
+
while (i < len && /[0-9.:\-TZ+]/.test(whereClause[i])) {
|
|
87957
|
+
token += whereClause[i];
|
|
87958
|
+
i++;
|
|
87959
|
+
}
|
|
87960
|
+
if (isDateTimeLiteral(token)) {
|
|
87961
|
+
result += `'${token}'`;
|
|
87962
|
+
} else {
|
|
87963
|
+
result += token;
|
|
87964
|
+
}
|
|
87965
|
+
continue;
|
|
87966
|
+
}
|
|
87967
|
+
result += char;
|
|
87968
|
+
i++;
|
|
87969
|
+
}
|
|
87970
|
+
result = convertNullComparisons(result);
|
|
87971
|
+
return result;
|
|
87972
|
+
}
|
|
87973
|
+
function parseOrderByClause(orderByClause) {
|
|
87974
|
+
const result = [];
|
|
87975
|
+
const parts = orderByClause.split(/,(?![^()]*\))/);
|
|
87976
|
+
for (const part of parts) {
|
|
87977
|
+
const trimmed = part.trim();
|
|
87978
|
+
if (!trimmed) continue;
|
|
87979
|
+
const match = trimmed.match(/^(.+?)\s*(ASC|DESC)?\s*(NULLS\s+(?:FIRST|LAST))?$/i);
|
|
87980
|
+
if (match) {
|
|
87981
|
+
const field = match[1].trim();
|
|
87982
|
+
let direction = match[2] ? match[2].toUpperCase() : "";
|
|
87983
|
+
if (match[3]) {
|
|
87984
|
+
direction += (direction ? " " : "") + match[3].toUpperCase();
|
|
87985
|
+
}
|
|
87986
|
+
result.push({ field, direction });
|
|
87987
|
+
} else {
|
|
87988
|
+
result.push({ field: trimmed, direction: "" });
|
|
87989
|
+
}
|
|
87990
|
+
}
|
|
87991
|
+
return result;
|
|
87992
|
+
}
|
|
87993
|
+
function convertOrderByFields(orderByParts, primaryObject, objectAliases) {
|
|
87994
|
+
return orderByParts.map(({ field, direction }) => {
|
|
87995
|
+
const hasAggregate = AGGREGATE_FUNCTIONS.some((func) => new RegExp(`\\b${func}\\s*\\(`, "i").test(field));
|
|
87996
|
+
let convertedField;
|
|
87997
|
+
if (hasAggregate) {
|
|
87998
|
+
convertedField = convertAggregateFunction(field, primaryObject, objectAliases);
|
|
87999
|
+
} else {
|
|
88000
|
+
convertedField = convertFieldToSmartStore(field, primaryObject, objectAliases);
|
|
88001
|
+
}
|
|
88002
|
+
return direction ? `${convertedField} ${direction}` : convertedField;
|
|
88003
|
+
});
|
|
88004
|
+
}
|
|
88005
|
+
function parseGroupByClause(groupByClause) {
|
|
88006
|
+
return groupByClause.split(/,(?![^()]*\))/).map((f) => f.trim()).filter(Boolean);
|
|
88007
|
+
}
|
|
88008
|
+
function convertGroupByFields(fields, primaryObject, objectAliases) {
|
|
88009
|
+
return fields.map((field) => {
|
|
88010
|
+
if (/^(ROLLUP|CUBE)\s*\(/i.test(field)) {
|
|
88011
|
+
return field.replace(/\(([^)]+)\)/g, (_match, inner) => {
|
|
88012
|
+
const innerFields = inner.split(",").map((f) => f.trim());
|
|
88013
|
+
const converted = innerFields.map((f) => convertFieldToSmartStore(f, primaryObject, objectAliases));
|
|
88014
|
+
return `(${converted.join(", ")})`;
|
|
88015
|
+
});
|
|
88016
|
+
}
|
|
88017
|
+
return convertFieldToSmartStore(field, primaryObject, objectAliases);
|
|
88018
|
+
});
|
|
88019
|
+
}
|
|
88020
|
+
function parseFromClause(fromClause) {
|
|
88021
|
+
const joins = [];
|
|
88022
|
+
const primaryMatch = fromClause.match(/^([A-Za-z0-9_]+)(?:\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*))?/i);
|
|
88023
|
+
if (!primaryMatch) {
|
|
88024
|
+
return { primary: "", joins };
|
|
88025
|
+
}
|
|
88026
|
+
const primary = primaryMatch[1];
|
|
88027
|
+
const alias = primaryMatch[2];
|
|
88028
|
+
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;
|
|
88029
|
+
let joinMatch;
|
|
88030
|
+
while ((joinMatch = joinRegex.exec(fromClause)) !== null) {
|
|
88031
|
+
joins.push({
|
|
88032
|
+
type: joinMatch[1].toUpperCase().replace(/\s+/g, " "),
|
|
88033
|
+
object: joinMatch[2],
|
|
88034
|
+
alias: joinMatch[3],
|
|
88035
|
+
on: joinMatch[4]?.trim()
|
|
88036
|
+
});
|
|
88037
|
+
}
|
|
88038
|
+
return { primary, alias, joins };
|
|
88039
|
+
}
|
|
88040
|
+
function convertSoqlToSmartQuery(soqlQuery) {
|
|
88041
|
+
if (!soqlQuery || typeof soqlQuery !== "string") {
|
|
88042
|
+
return "";
|
|
88043
|
+
}
|
|
88044
|
+
let normalizedQuery = soqlQuery.replace(/\s+/g, " ").trim();
|
|
88045
|
+
const fromMatch = normalizedQuery.match(
|
|
88046
|
+
/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
|
|
88047
|
+
);
|
|
88048
|
+
if (!fromMatch) {
|
|
88049
|
+
return soqlQuery;
|
|
88050
|
+
}
|
|
88051
|
+
const fromParsed = parseFromClause(fromMatch[1].trim());
|
|
88052
|
+
const primaryObject = fromParsed.primary;
|
|
88053
|
+
if (!primaryObject) {
|
|
88054
|
+
return soqlQuery;
|
|
88055
|
+
}
|
|
88056
|
+
normalizedQuery = normalizedQuery.replace(/\bFIELDS\s*\(\s*(ALL|STANDARD|CUSTOM)\s*\)/gi, "__FIELDS_ALL_PLACEHOLDER__");
|
|
88057
|
+
const selectMatch = normalizedQuery.match(/SELECT\s+([\s\S]+?)\s+FROM\s+/i);
|
|
88058
|
+
if (!selectMatch) {
|
|
88059
|
+
return soqlQuery;
|
|
88060
|
+
}
|
|
88061
|
+
const whereMatch = normalizedQuery.match(
|
|
88062
|
+
/WHERE\s+([\s\S]+?)(?=\s+ORDER\s+BY\s+|\s+GROUP\s+BY\s+|\s+HAVING\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i
|
|
88063
|
+
);
|
|
88064
|
+
const groupByMatch = normalizedQuery.match(
|
|
88065
|
+
/GROUP\s+BY\s+([\s\S]+?)(?=\s+HAVING\s+|\s+ORDER\s+BY\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i
|
|
88066
|
+
);
|
|
88067
|
+
const havingMatch = normalizedQuery.match(/HAVING\s+([\s\S]+?)(?=\s+ORDER\s+BY\s+|\s+LIMIT\s+|\s+OFFSET\s+|$)/i);
|
|
88068
|
+
const orderByMatch = normalizedQuery.match(/ORDER\s+BY\s+([\s\S]+?)(?=\s+LIMIT\s+|\s+OFFSET\s+|$)/i);
|
|
88069
|
+
const limitMatch = normalizedQuery.match(/LIMIT\s+(\d+)/i);
|
|
88070
|
+
const offsetMatch = normalizedQuery.match(/OFFSET\s+(\d+)/i);
|
|
88071
|
+
const objectAliases = /* @__PURE__ */ new Map();
|
|
88072
|
+
if (fromParsed.alias) {
|
|
88073
|
+
objectAliases.set(fromParsed.alias.toLowerCase(), primaryObject);
|
|
88074
|
+
}
|
|
88075
|
+
objectAliases.set(primaryObject.toLowerCase(), primaryObject);
|
|
88076
|
+
const parts = [];
|
|
88077
|
+
const selectFields = parseSelectFields(selectMatch[1].trim());
|
|
88078
|
+
const smartSelectFields = convertSelectFields(selectFields, primaryObject, objectAliases);
|
|
88079
|
+
parts.push(`SELECT ${smartSelectFields.join(", ")}`);
|
|
88080
|
+
parts.push(`FROM {${primaryObject}}`);
|
|
88081
|
+
const whereConditions = [];
|
|
88082
|
+
if (whereMatch) {
|
|
88083
|
+
const smartWhere = convertWhereClause(whereMatch[1].trim(), primaryObject, objectAliases);
|
|
88084
|
+
whereConditions.push(smartWhere);
|
|
88085
|
+
}
|
|
88086
|
+
if (whereConditions.length > 0) {
|
|
88087
|
+
parts.push(`WHERE ${whereConditions.join(" AND ")}`);
|
|
88088
|
+
}
|
|
88089
|
+
if (groupByMatch) {
|
|
88090
|
+
const groupByFields = parseGroupByClause(groupByMatch[1].trim());
|
|
88091
|
+
const smartGroupBy = convertGroupByFields(groupByFields, primaryObject, objectAliases);
|
|
88092
|
+
parts.push(`GROUP BY ${smartGroupBy.join(", ")}`);
|
|
88093
|
+
}
|
|
88094
|
+
if (havingMatch) {
|
|
88095
|
+
const smartHaving = convertWhereClause(havingMatch[1].trim(), primaryObject, objectAliases);
|
|
88096
|
+
parts.push(`HAVING ${smartHaving}`);
|
|
88097
|
+
}
|
|
88098
|
+
if (orderByMatch) {
|
|
88099
|
+
const orderByParts = parseOrderByClause(orderByMatch[1].trim());
|
|
88100
|
+
const smartOrderBy = convertOrderByFields(orderByParts, primaryObject, objectAliases);
|
|
88101
|
+
parts.push(`ORDER BY ${smartOrderBy.join(", ")}`);
|
|
88102
|
+
}
|
|
88103
|
+
if (limitMatch) {
|
|
88104
|
+
parts.push(`LIMIT ${limitMatch[1]}`);
|
|
88105
|
+
}
|
|
88106
|
+
if (offsetMatch) {
|
|
88107
|
+
parts.push(`OFFSET ${offsetMatch[1]}`);
|
|
88108
|
+
}
|
|
88109
|
+
return parts.join(" ");
|
|
88110
|
+
}
|
|
88111
|
+
|
|
87708
88112
|
function query(payload) {
|
|
87709
88113
|
return highLevelApi.API.request("query", payload);
|
|
87710
88114
|
}
|
|
87711
88115
|
function crmQuery(payload) {
|
|
87712
88116
|
return highLevelApi.API.request("crm_query", payload);
|
|
87713
88117
|
}
|
|
88118
|
+
function extractFieldsFromSoql(soqlQuery) {
|
|
88119
|
+
const selectMatch = soqlQuery.match(/SELECT\s+([\s\S]+?)\s+FROM\s+/i);
|
|
88120
|
+
if (!selectMatch) return [];
|
|
88121
|
+
const selectClause = selectMatch[1];
|
|
88122
|
+
const fields = [];
|
|
88123
|
+
let depth = 0;
|
|
88124
|
+
let currentField = "";
|
|
88125
|
+
for (let i = 0; i < selectClause.length; i++) {
|
|
88126
|
+
const char = selectClause[i];
|
|
88127
|
+
if (char === "(") {
|
|
88128
|
+
depth++;
|
|
88129
|
+
currentField += char;
|
|
88130
|
+
} else if (char === ")") {
|
|
88131
|
+
depth--;
|
|
88132
|
+
currentField += char;
|
|
88133
|
+
} else if (char === "," && depth === 0) {
|
|
88134
|
+
if (currentField.trim()) {
|
|
88135
|
+
fields.push(currentField.trim());
|
|
88136
|
+
}
|
|
88137
|
+
currentField = "";
|
|
88138
|
+
} else {
|
|
88139
|
+
currentField += char;
|
|
88140
|
+
}
|
|
88141
|
+
}
|
|
88142
|
+
if (currentField.trim()) {
|
|
88143
|
+
fields.push(currentField.trim());
|
|
88144
|
+
}
|
|
88145
|
+
return fields.map((field) => {
|
|
88146
|
+
const aliasMatch = field.match(/^(.+?)\s+(?:AS\s+)?([A-Za-z_][A-Za-z0-9_]*)$/i);
|
|
88147
|
+
const fieldExpr = aliasMatch ? aliasMatch[1].trim() : field.trim();
|
|
88148
|
+
return fieldExpr;
|
|
88149
|
+
});
|
|
88150
|
+
}
|
|
88151
|
+
function extractObjectFromSoql(soqlQuery) {
|
|
88152
|
+
const fromMatch = soqlQuery.match(/FROM\s+([A-Za-z0-9_]+)/i);
|
|
88153
|
+
return fromMatch ? fromMatch[1] : "";
|
|
88154
|
+
}
|
|
88155
|
+
function setNestedProperty(obj, path, value) {
|
|
88156
|
+
const parts = path.split(".");
|
|
88157
|
+
if (parts.length === 1) {
|
|
88158
|
+
obj[path] = value;
|
|
88159
|
+
return;
|
|
88160
|
+
}
|
|
88161
|
+
let current = obj;
|
|
88162
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
88163
|
+
const part = parts[i];
|
|
88164
|
+
if (!current[part] || typeof current[part] !== "object") {
|
|
88165
|
+
current[part] = {};
|
|
88166
|
+
}
|
|
88167
|
+
current = current[part];
|
|
88168
|
+
}
|
|
88169
|
+
current[parts[parts.length - 1]] = value;
|
|
88170
|
+
}
|
|
88171
|
+
function isAllFieldsSelector(field) {
|
|
88172
|
+
const trimmed = field.trim();
|
|
88173
|
+
return trimmed === "*" || /^FIELDS\s*\(\s*(ALL|STANDARD|CUSTOM)\s*\)$/i.test(trimmed);
|
|
88174
|
+
}
|
|
88175
|
+
function transformSmartStoreResults(smartStoreResults, fields, objectName) {
|
|
88176
|
+
if (!smartStoreResults || !Array.isArray(smartStoreResults)) {
|
|
88177
|
+
return [];
|
|
88178
|
+
}
|
|
88179
|
+
return smartStoreResults.map((row) => {
|
|
88180
|
+
const record = {};
|
|
88181
|
+
fields.forEach((field, index) => {
|
|
88182
|
+
if (index < row.length) {
|
|
88183
|
+
const value = row[index];
|
|
88184
|
+
if (isAllFieldsSelector(field)) {
|
|
88185
|
+
if (value && typeof value === "object" && !Array.isArray(value)) {
|
|
88186
|
+
Object.assign(record, value);
|
|
88187
|
+
}
|
|
88188
|
+
} else {
|
|
88189
|
+
setNestedProperty(record, field, value);
|
|
88190
|
+
}
|
|
88191
|
+
}
|
|
88192
|
+
});
|
|
88193
|
+
const recordId = record["Id"] || record["id"] || "";
|
|
88194
|
+
record["attributes"] = {
|
|
88195
|
+
type: objectName,
|
|
88196
|
+
url: recordId ? `/services/data/v57.0/sobjects/${objectName}/${recordId}` : ""
|
|
88197
|
+
};
|
|
88198
|
+
return record;
|
|
88199
|
+
});
|
|
88200
|
+
}
|
|
88201
|
+
async function crmQueryAdaptive(payload) {
|
|
88202
|
+
const query2 = payload.query;
|
|
88203
|
+
if (!query2 || typeof query2 !== "string") {
|
|
88204
|
+
return Promise.reject(new Error("Query is required and must be a string"));
|
|
88205
|
+
}
|
|
88206
|
+
let useSmartStore = false;
|
|
88207
|
+
try {
|
|
88208
|
+
const env = await highLevelApi.API.request("get_env");
|
|
88209
|
+
const isIos = env?.mode === "IOS";
|
|
88210
|
+
const isSfdcSyncEnabled = env?.pitcher?.instance?.settings?.enable_sfdc_sync === true;
|
|
88211
|
+
useSmartStore = isIos && isSfdcSyncEnabled;
|
|
88212
|
+
} catch {
|
|
88213
|
+
useSmartStore = false;
|
|
88214
|
+
}
|
|
88215
|
+
console.log(`crmQueryAdaptive called with the query: `, query2);
|
|
88216
|
+
if (useSmartStore) {
|
|
88217
|
+
const fields = extractFieldsFromSoql(query2);
|
|
88218
|
+
const objectName = extractObjectFromSoql(query2);
|
|
88219
|
+
const smartQuery = convertSoqlToSmartQuery(query2);
|
|
88220
|
+
console.log(`Smart Query: `, smartQuery);
|
|
88221
|
+
const smartStoreResults = await crmSmartQuery({ query: smartQuery });
|
|
88222
|
+
const records = transformSmartStoreResults(smartStoreResults, fields, objectName);
|
|
88223
|
+
return {
|
|
88224
|
+
records,
|
|
88225
|
+
totalSize: records.length
|
|
88226
|
+
};
|
|
88227
|
+
}
|
|
88228
|
+
return crmQuery(payload);
|
|
88229
|
+
}
|
|
87714
88230
|
function crmSmartQuery(payload) {
|
|
87715
88231
|
const query2 = payload.query;
|
|
87716
88232
|
if (!query2 || typeof query2 !== "string") {
|
|
@@ -87773,7 +88289,14 @@ function crmSmartUpsertObjects(payload) {
|
|
|
87773
88289
|
}
|
|
87774
88290
|
}
|
|
87775
88291
|
}
|
|
87776
|
-
|
|
88292
|
+
console.log("[crmSmartUpsertObjects] Request payload:", JSON.stringify(payload, null, 2));
|
|
88293
|
+
return highLevelApi.API.request("crm_smart_upsert_objects", payload).then((result) => {
|
|
88294
|
+
console.log("[crmSmartUpsertObjects] Success:", result);
|
|
88295
|
+
return result;
|
|
88296
|
+
}).catch((error) => {
|
|
88297
|
+
console.error("[crmSmartUpsertObjects] Error:", error);
|
|
88298
|
+
throw error;
|
|
88299
|
+
});
|
|
87777
88300
|
}
|
|
87778
88301
|
function crmSmartObjectValidationRules(payload) {
|
|
87779
88302
|
if (!payload) {
|
|
@@ -87813,7 +88336,14 @@ function crmSmartDeleteObjects(payload) {
|
|
|
87813
88336
|
}
|
|
87814
88337
|
}
|
|
87815
88338
|
}
|
|
87816
|
-
|
|
88339
|
+
console.log("[crmSmartDeleteObjects] Request payload:", JSON.stringify(payload, null, 2));
|
|
88340
|
+
return highLevelApi.API.request("crm_smart_delete_objects", payload).then((result) => {
|
|
88341
|
+
console.log("[crmSmartDeleteObjects] Success:", result);
|
|
88342
|
+
return result;
|
|
88343
|
+
}).catch((error) => {
|
|
88344
|
+
console.error("[crmSmartDeleteObjects] Error:", error);
|
|
88345
|
+
throw error;
|
|
88346
|
+
});
|
|
87817
88347
|
}
|
|
87818
88348
|
function crmCreate(payload) {
|
|
87819
88349
|
if (!payload) {
|
|
@@ -87956,6 +88486,7 @@ const modules = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
87956
88486
|
createFolder,
|
|
87957
88487
|
crmCreate,
|
|
87958
88488
|
crmQuery,
|
|
88489
|
+
crmQueryAdaptive,
|
|
87959
88490
|
crmSmartDeleteObjects,
|
|
87960
88491
|
crmSmartObjectMetadata,
|
|
87961
88492
|
crmSmartObjectValidationRules,
|
|
@@ -181016,6 +181547,33 @@ function useTheme() {
|
|
|
181016
181547
|
};
|
|
181017
181548
|
}
|
|
181018
181549
|
|
|
181550
|
+
function useSmartStore(env) {
|
|
181551
|
+
const shouldUseSmartStore = computed(() => {
|
|
181552
|
+
try {
|
|
181553
|
+
const envValue = unref(env);
|
|
181554
|
+
if (!envValue) {
|
|
181555
|
+
return false;
|
|
181556
|
+
}
|
|
181557
|
+
const isIos = envValue?.mode === "IOS";
|
|
181558
|
+
const isSfdcSyncEnabled = envValue?.pitcher?.instance?.settings?.enable_sfdc_sync === true;
|
|
181559
|
+
return isIos && isSfdcSyncEnabled;
|
|
181560
|
+
} catch (error) {
|
|
181561
|
+
console.error("[useSmartStore] Error checking SmartStore availability:", error);
|
|
181562
|
+
return false;
|
|
181563
|
+
}
|
|
181564
|
+
});
|
|
181565
|
+
const generateTempSalesforceId = (objectPrefix) => {
|
|
181566
|
+
const timestamp = Date.now().toString(36);
|
|
181567
|
+
const randomStr = Math.random().toString(36).substring(2, 11);
|
|
181568
|
+
const uniqueId = (timestamp + randomStr).substring(0, 15 - objectPrefix.length);
|
|
181569
|
+
return "id_" + objectPrefix + uniqueId.padEnd(15 - objectPrefix.length, "0");
|
|
181570
|
+
};
|
|
181571
|
+
return {
|
|
181572
|
+
shouldUseSmartStore,
|
|
181573
|
+
generateTempSalesforceId
|
|
181574
|
+
};
|
|
181575
|
+
}
|
|
181576
|
+
|
|
181019
181577
|
const initialCanvas = ref(void 0);
|
|
181020
181578
|
const useCanvasOverlay = () => {
|
|
181021
181579
|
const openCanvasOverlay = ({ id, fullscreen, edit_mode, component_id, section_id, position }) => {
|
|
@@ -183277,5 +183835,5 @@ const localeNames = {
|
|
|
183277
183835
|
};
|
|
183278
183836
|
const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
|
|
183279
183837
|
|
|
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 };
|
|
183838
|
+
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
183839
|
//# sourceMappingURL=canvas-ui.js.map
|