@pitcher/canvas-ui 2026.1.7-082401-beta → 2026.1.7-105737-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.css +17 -17
- package/canvas-ui.js +1070 -276
- package/canvas-ui.js.map +1 -1
- package/lib/api/events/events.helpers.d.ts +14 -2
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +5 -0
- package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +2 -2
- package/lib/composables/useSmartStore.d.ts +25 -0
- package/lib/main.lib.d.ts +2 -0
- package/lib/sdk/api/HighLevelApi.d.ts +4 -0
- package/lib/sdk/api/modules/query.d.ts +77 -1
- package/lib/sdk/api/modules/ui/content.ui.d.ts +22 -1
- package/lib/sdk/api/modules/ui/index.d.ts +2 -0
- package/lib/sdk/api/modules/ui/types.ui.d.ts +12 -0
- package/lib/sdk/main.d.ts +18 -0
- package/lib/sdk/payload.types.d.ts +57 -0
- package/lib/types/app.d.ts +1 -1
- package/lib/types/instanceSettings.types.d.ts +1 -0
- package/lib/types/sfdc.d.ts +5 -0
- package/lib/util/smart-store.util.d.ts +40 -0
- package/lib/util/smart-store.util.spec.d.ts +1 -0
- package/locale/de.json +1 -0
- package/locale/el.json +1 -0
- package/locale/en.json +1 -0
- package/locale/es.json +1 -0
- package/locale/fr.json +1 -0
- package/locale/it.json +1 -0
- package/locale/ja.json +1 -0
- package/locale/nl.json +1 -0
- package/locale/pl.json +1 -0
- package/locale/pt-br.json +1 -0
- package/locale/pt.json +1 -0
- package/locale/th.json +1 -0
- package/locale/tr.json +1 -0
- package/locale/zh.json +1 -0
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -79751,6 +79751,7 @@ const _sfc_main$6C = /* @__PURE__ */ defineComponent({
|
|
|
79751
79751
|
);
|
|
79752
79752
|
const editingField = ref(null);
|
|
79753
79753
|
const showTagsComponent = ref(!props.showKeepAsIsPlaceholder);
|
|
79754
|
+
const initialExpiresAtOption = ref(props.modelValue.expiresAtOption);
|
|
79754
79755
|
const labels = {
|
|
79755
79756
|
sharing: t("canvasUI.browserApp.uploadFilesModal.sharing.label"),
|
|
79756
79757
|
tags: t("canvasUI.browserApp.uploadFilesModal.tags.label"),
|
|
@@ -79772,6 +79773,9 @@ const _sfc_main$6C = /* @__PURE__ */ defineComponent({
|
|
|
79772
79773
|
{ value: "expired" /* Expired */, label: t("canvasUI.browserApp.uploadFilesModal.expiresAt.options.expired") }
|
|
79773
79774
|
];
|
|
79774
79775
|
if (isFileExpirationMandatory.value) {
|
|
79776
|
+
if (initialExpiresAtOption.value === "never" /* Never */ || initialExpiresAtOption.value === null || initialExpiresAtOption.value === void 0) {
|
|
79777
|
+
return allOptions;
|
|
79778
|
+
}
|
|
79775
79779
|
return allOptions.filter((option) => option.value !== "never" /* Never */);
|
|
79776
79780
|
}
|
|
79777
79781
|
return allOptions;
|
|
@@ -87705,18 +87709,537 @@ function toast$2(payload) {
|
|
|
87705
87709
|
return this.API.request("toast", payload);
|
|
87706
87710
|
}
|
|
87707
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
|
+
|
|
87708
88119
|
function query(payload) {
|
|
87709
88120
|
return highLevelApi.API.request("query", payload);
|
|
87710
88121
|
}
|
|
87711
88122
|
function crmQuery(payload) {
|
|
87712
88123
|
return highLevelApi.API.request("crm_query", payload);
|
|
87713
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
|
+
}
|
|
87714
88237
|
function crmSmartQuery(payload) {
|
|
87715
88238
|
const query2 = payload.query;
|
|
87716
88239
|
if (!query2 || typeof query2 !== "string") {
|
|
87717
88240
|
return Promise.reject(new Error("Query is required and must be a string"));
|
|
87718
88241
|
}
|
|
87719
|
-
const smartStorePattern = /\{[^}]+:[^}]
|
|
88242
|
+
const smartStorePattern = /\{[^}]+:[^}]+}/;
|
|
87720
88243
|
if (!smartStorePattern.test(query2.trim())) {
|
|
87721
88244
|
return Promise.reject(
|
|
87722
88245
|
new Error(
|
|
@@ -87773,7 +88296,14 @@ function crmSmartUpsertObjects(payload) {
|
|
|
87773
88296
|
}
|
|
87774
88297
|
}
|
|
87775
88298
|
}
|
|
87776
|
-
|
|
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
|
+
});
|
|
87777
88307
|
}
|
|
87778
88308
|
function crmSmartObjectValidationRules(payload) {
|
|
87779
88309
|
if (!payload) {
|
|
@@ -87813,7 +88343,66 @@ function crmSmartDeleteObjects(payload) {
|
|
|
87813
88343
|
}
|
|
87814
88344
|
}
|
|
87815
88345
|
}
|
|
87816
|
-
|
|
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
|
+
});
|
|
88354
|
+
}
|
|
88355
|
+
function crmCreate(payload) {
|
|
88356
|
+
if (!payload) {
|
|
88357
|
+
return Promise.reject(new Error("Payload is required"));
|
|
88358
|
+
}
|
|
88359
|
+
if (!payload.sobject || typeof payload.sobject !== "string" || payload.sobject.trim() === "") {
|
|
88360
|
+
return Promise.reject(new Error("sobject is required and must be a non-empty string"));
|
|
88361
|
+
}
|
|
88362
|
+
if (!payload.records || !Array.isArray(payload.records) || payload.records.length === 0) {
|
|
88363
|
+
return Promise.reject(new Error("records is required and must be a non-empty array"));
|
|
88364
|
+
}
|
|
88365
|
+
for (let i = 0; i < payload.records.length; i++) {
|
|
88366
|
+
const record = payload.records[i];
|
|
88367
|
+
if (!record || typeof record !== "object" || Array.isArray(record)) {
|
|
88368
|
+
return Promise.reject(
|
|
88369
|
+
new Error(`records contains invalid element at index ${i}. All records must be valid objects.`)
|
|
88370
|
+
);
|
|
88371
|
+
}
|
|
88372
|
+
}
|
|
88373
|
+
return highLevelApi.API.request("crm_create", payload);
|
|
88374
|
+
}
|
|
88375
|
+
function crmUpsert(payload) {
|
|
88376
|
+
if (!payload) {
|
|
88377
|
+
return Promise.reject(new Error("Payload is required"));
|
|
88378
|
+
}
|
|
88379
|
+
if (!payload.sobject || typeof payload.sobject !== "string" || payload.sobject.trim() === "") {
|
|
88380
|
+
return Promise.reject(new Error("sobject is required and must be a non-empty string"));
|
|
88381
|
+
}
|
|
88382
|
+
if (!payload.records || !Array.isArray(payload.records) || payload.records.length === 0) {
|
|
88383
|
+
return Promise.reject(new Error("records is required and must be a non-empty array"));
|
|
88384
|
+
}
|
|
88385
|
+
if (!payload.external_id_field || typeof payload.external_id_field !== "string" || payload.external_id_field.trim() === "") {
|
|
88386
|
+
return Promise.reject(new Error("external_id_field is required and must be a non-empty string"));
|
|
88387
|
+
}
|
|
88388
|
+
for (let i = 0; i < payload.records.length; i++) {
|
|
88389
|
+
const record = payload.records[i];
|
|
88390
|
+
if (!record || typeof record !== "object" || Array.isArray(record)) {
|
|
88391
|
+
return Promise.reject(
|
|
88392
|
+
new Error(`records contains invalid element at index ${i}. All records must be valid objects.`)
|
|
88393
|
+
);
|
|
88394
|
+
}
|
|
88395
|
+
}
|
|
88396
|
+
return highLevelApi.API.request("crm_upsert", payload);
|
|
88397
|
+
}
|
|
88398
|
+
function crmDescribe(payload) {
|
|
88399
|
+
if (!payload) {
|
|
88400
|
+
return Promise.reject(new Error("Payload is required"));
|
|
88401
|
+
}
|
|
88402
|
+
if (!payload.sobject || typeof payload.sobject !== "string" || payload.sobject.trim() === "") {
|
|
88403
|
+
return Promise.reject(new Error("sobject is required and must be a non-empty string"));
|
|
88404
|
+
}
|
|
88405
|
+
return highLevelApi.API.request("crm_describe", payload);
|
|
87817
88406
|
}
|
|
87818
88407
|
|
|
87819
88408
|
function getFolders(payload) {
|
|
@@ -87911,12 +88500,16 @@ const modules = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
87911
88500
|
createFavorite,
|
|
87912
88501
|
createFile,
|
|
87913
88502
|
createFolder,
|
|
88503
|
+
crmCreate,
|
|
88504
|
+
crmDescribe,
|
|
87914
88505
|
crmQuery,
|
|
88506
|
+
crmQueryAdaptive,
|
|
87915
88507
|
crmSmartDeleteObjects,
|
|
87916
88508
|
crmSmartObjectMetadata,
|
|
87917
88509
|
crmSmartObjectValidationRules,
|
|
87918
88510
|
crmSmartQuery,
|
|
87919
88511
|
crmSmartUpsertObjects,
|
|
88512
|
+
crmUpsert,
|
|
87920
88513
|
deleteCanvas,
|
|
87921
88514
|
deleteEvent,
|
|
87922
88515
|
deleteFavorite,
|
|
@@ -88505,6 +89098,15 @@ function getTopPitcherWindow(current = window) {
|
|
|
88505
89098
|
}
|
|
88506
89099
|
|
|
88507
89100
|
const TRUNCATE_LENGTH_TRIGGER = 10;
|
|
89101
|
+
const RAW_PAYLOAD_METHODS = [
|
|
89102
|
+
"crm_create",
|
|
89103
|
+
"crm_upsert",
|
|
89104
|
+
"crm_smart_query",
|
|
89105
|
+
"crm_smart_object_metadata",
|
|
89106
|
+
"crm_smart_object_validation_rules",
|
|
89107
|
+
"crm_smart_upsert_objects",
|
|
89108
|
+
"crm_smart_delete_objects"
|
|
89109
|
+
];
|
|
88508
89110
|
function updateOnlineHandlersEnv(env) {
|
|
88509
89111
|
env && setEnv(env);
|
|
88510
89112
|
}
|
|
@@ -88570,7 +89172,8 @@ class LowLevelApi extends EventEmitter {
|
|
|
88570
89172
|
throw new Error("unsupported response status");
|
|
88571
89173
|
}
|
|
88572
89174
|
};
|
|
88573
|
-
const
|
|
89175
|
+
const shouldSkipSnakeCase = RAW_PAYLOAD_METHODS.includes(type);
|
|
89176
|
+
const payload = shouldSkipSnakeCase ? cloneDeep(body) : cloneDeep(snakeCaseKeys(body));
|
|
88574
89177
|
this.callbacks[id] = {
|
|
88575
89178
|
dispatched_at: Date.now(),
|
|
88576
89179
|
type,
|
|
@@ -88783,7 +89386,9 @@ const UI_API_METHOD_TYPES = {
|
|
|
88783
89386
|
UI_APP_LOADED: "ui_app_loaded",
|
|
88784
89387
|
UI_APP_RESIZE: "ui_app_resize",
|
|
88785
89388
|
UI_CLOSE_CANVAS_SECTION_EXECUTION: "ui_close_canvas_section_execution",
|
|
88786
|
-
UI_CLOSE_CANVAS_DRAWER: "ui_close_canvas_drawer"
|
|
89389
|
+
UI_CLOSE_CANVAS_DRAWER: "ui_close_canvas_drawer",
|
|
89390
|
+
UI_OPEN_GLOBAL_POPUP: "ui_open_global_popup",
|
|
89391
|
+
UI_CLOSE_GLOBAL_POPUP: "ui_close_global_popup"
|
|
88787
89392
|
};
|
|
88788
89393
|
const UI_MESSAGE_TYPES = {
|
|
88789
89394
|
UI_MEETING_CANCELED: "ui_meeting_canceled",
|
|
@@ -88835,10 +89440,25 @@ async function selectAgendaContent$1(payload = {}) {
|
|
|
88835
89440
|
const response = await pr.send(window.parent, UI_API_METHOD_TYPES.UI_SELECT_AGENDA_CONTENT, payload);
|
|
88836
89441
|
return response.data;
|
|
88837
89442
|
}
|
|
89443
|
+
async function openGlobalPopup(appName, extraContext) {
|
|
89444
|
+
const pr = await usePostRobot();
|
|
89445
|
+
const payload = {
|
|
89446
|
+
app_name: appName,
|
|
89447
|
+
extra_context: extraContext
|
|
89448
|
+
};
|
|
89449
|
+
const response = await pr.send(window.parent, UI_API_METHOD_TYPES.UI_OPEN_GLOBAL_POPUP, payload);
|
|
89450
|
+
return response.data;
|
|
89451
|
+
}
|
|
89452
|
+
async function closeGlobalPopup() {
|
|
89453
|
+
const pr = await usePostRobot();
|
|
89454
|
+
await pr.send(window.parent, UI_API_METHOD_TYPES.UI_CLOSE_GLOBAL_POPUP, {});
|
|
89455
|
+
}
|
|
88838
89456
|
|
|
88839
89457
|
const contentUi = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
88840
89458
|
__proto__: null,
|
|
89459
|
+
closeGlobalPopup,
|
|
88841
89460
|
open: open$1,
|
|
89461
|
+
openGlobalPopup,
|
|
88842
89462
|
preselectSfdcMeetingId,
|
|
88843
89463
|
selectAgendaContent: selectAgendaContent$1,
|
|
88844
89464
|
selectCollectionContent: selectCollectionContent$1,
|
|
@@ -94612,7 +95232,7 @@ const _hoisted_14$h = {
|
|
|
94612
95232
|
class: "flex items-center ml-2"
|
|
94613
95233
|
};
|
|
94614
95234
|
const _hoisted_15$f = {
|
|
94615
|
-
key:
|
|
95235
|
+
key: 2,
|
|
94616
95236
|
class: "flex items-center ml-2"
|
|
94617
95237
|
};
|
|
94618
95238
|
const _hoisted_16$e = { class: "flex flex-col w-full flex-1 min-h-0" };
|
|
@@ -94647,67 +95267,75 @@ const _hoisted_30$4 = {
|
|
|
94647
95267
|
};
|
|
94648
95268
|
const _hoisted_31$4 = { class: "w-full px-0" };
|
|
94649
95269
|
const _hoisted_32$4 = {
|
|
95270
|
+
key: 0,
|
|
95271
|
+
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95272
|
+
};
|
|
95273
|
+
const _hoisted_33$4 = {
|
|
94650
95274
|
key: 0,
|
|
94651
95275
|
class: "mb-0"
|
|
94652
95276
|
};
|
|
94653
|
-
const
|
|
94654
|
-
const
|
|
94655
|
-
const
|
|
94656
|
-
const
|
|
94657
|
-
const
|
|
95277
|
+
const _hoisted_34$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95278
|
+
const _hoisted_35$4 = { class: "text-m font-semibold text-gray-900" };
|
|
95279
|
+
const _hoisted_36$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
95280
|
+
const _hoisted_37$4 = ["data-result-selected", "onClick"];
|
|
95281
|
+
const _hoisted_38$4 = {
|
|
94658
95282
|
key: 1,
|
|
94659
95283
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
94660
95284
|
};
|
|
94661
|
-
const
|
|
94662
|
-
const
|
|
94663
|
-
const
|
|
94664
|
-
const
|
|
94665
|
-
const
|
|
94666
|
-
const
|
|
95285
|
+
const _hoisted_39$4 = { class: "flex-1 min-w-0" };
|
|
95286
|
+
const _hoisted_40$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95287
|
+
const _hoisted_41$4 = ["innerHTML"];
|
|
95288
|
+
const _hoisted_42$4 = { class: "text-xs text-gray-500" };
|
|
95289
|
+
const _hoisted_43$4 = { class: "text-xs text-gray-400" };
|
|
95290
|
+
const _hoisted_44$4 = {
|
|
94667
95291
|
key: 0,
|
|
94668
95292
|
class: "px-0 py-0"
|
|
94669
95293
|
};
|
|
94670
|
-
const
|
|
94671
|
-
const
|
|
94672
|
-
const
|
|
94673
|
-
const
|
|
94674
|
-
const
|
|
94675
|
-
const
|
|
94676
|
-
const
|
|
94677
|
-
const
|
|
94678
|
-
const
|
|
94679
|
-
const
|
|
94680
|
-
const
|
|
95294
|
+
const _hoisted_45$4 = { key: 1 };
|
|
95295
|
+
const _hoisted_46$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95296
|
+
const _hoisted_47$4 = { class: "text-m font-semibold text-gray-900" };
|
|
95297
|
+
const _hoisted_48$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
95298
|
+
const _hoisted_49$4 = ["data-result-selected", "onClick"];
|
|
95299
|
+
const _hoisted_50$4 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
|
|
95300
|
+
const _hoisted_51$3 = { class: "flex-1 min-w-0" };
|
|
95301
|
+
const _hoisted_52$3 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95302
|
+
const _hoisted_53$3 = { class: "text-xs text-gray-500" };
|
|
95303
|
+
const _hoisted_54$2 = { class: "text-xs text-gray-400" };
|
|
95304
|
+
const _hoisted_55$2 = {
|
|
94681
95305
|
key: 0,
|
|
94682
95306
|
class: "px-0 py-0"
|
|
94683
95307
|
};
|
|
94684
|
-
const
|
|
94685
|
-
key:
|
|
95308
|
+
const _hoisted_56$2 = {
|
|
95309
|
+
key: 2,
|
|
94686
95310
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
94687
95311
|
};
|
|
94688
|
-
const
|
|
95312
|
+
const _hoisted_57$2 = {
|
|
94689
95313
|
key: 2,
|
|
94690
95314
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
94691
95315
|
};
|
|
94692
|
-
const
|
|
94693
|
-
const
|
|
94694
|
-
|
|
94695
|
-
|
|
94696
|
-
|
|
94697
|
-
const
|
|
95316
|
+
const _hoisted_58$2 = { class: "w-full px-0" };
|
|
95317
|
+
const _hoisted_59$2 = {
|
|
95318
|
+
key: 0,
|
|
95319
|
+
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95320
|
+
};
|
|
95321
|
+
const _hoisted_60$2 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95322
|
+
const _hoisted_61$2 = { class: "text-m font-semibold text-gray-900" };
|
|
95323
|
+
const _hoisted_62$2 = { class: "ml-2 text-sm text-gray-500" };
|
|
95324
|
+
const _hoisted_63$2 = ["data-result-selected", "onClick"];
|
|
95325
|
+
const _hoisted_64$2 = {
|
|
94698
95326
|
key: 1,
|
|
94699
95327
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
94700
95328
|
};
|
|
94701
|
-
const
|
|
94702
|
-
const
|
|
94703
|
-
const
|
|
94704
|
-
const
|
|
94705
|
-
const
|
|
94706
|
-
const
|
|
95329
|
+
const _hoisted_65$2 = { class: "flex-1 min-w-0" };
|
|
95330
|
+
const _hoisted_66$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95331
|
+
const _hoisted_67$2 = ["innerHTML"];
|
|
95332
|
+
const _hoisted_68$2 = { class: "text-xs text-gray-500" };
|
|
95333
|
+
const _hoisted_69$1 = { class: "text-xs text-gray-400" };
|
|
95334
|
+
const _hoisted_70$1 = {
|
|
94707
95335
|
key: 0,
|
|
94708
95336
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
94709
95337
|
};
|
|
94710
|
-
const
|
|
95338
|
+
const _hoisted_71$1 = {
|
|
94711
95339
|
key: 0,
|
|
94712
95340
|
class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
|
|
94713
95341
|
};
|
|
@@ -94737,13 +95365,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
94737
95365
|
const fileTypeOptions = [
|
|
94738
95366
|
{ label: "Folder", value: "folder" },
|
|
94739
95367
|
{ label: "PDF", value: "pdf" },
|
|
94740
|
-
{ label: "Image", value: "image" },
|
|
94741
|
-
{ label: "Audio", value: "audio" },
|
|
94742
|
-
{ label: "Video", value: "video" },
|
|
94743
95368
|
{ label: "Document", value: "document" },
|
|
94744
95369
|
{ label: "Presentation", value: "presentation" },
|
|
94745
95370
|
{ label: "Spreadsheet", value: "spreadsheet" },
|
|
94746
|
-
{ label: "
|
|
95371
|
+
{ label: "Image", value: "image" },
|
|
95372
|
+
{ label: "Video", value: "video" },
|
|
95373
|
+
{ label: "Audio", value: "audio" },
|
|
95374
|
+
{ label: "AR", value: "ar" },
|
|
94747
95375
|
{ label: "Web", value: "web" }
|
|
94748
95376
|
];
|
|
94749
95377
|
const hasActiveFilters = computed(() => selectedFileTypes.value.length > 0 || selectedCanvasFilters.value.length > 0);
|
|
@@ -94752,12 +95380,19 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
94752
95380
|
selectedCanvasFilters.value = [];
|
|
94753
95381
|
debouncedFilterSearch();
|
|
94754
95382
|
};
|
|
94755
|
-
const handleEverywhereClick = () => {
|
|
95383
|
+
const handleEverywhereClick = async () => {
|
|
94756
95384
|
selectedFileTypes.value = [];
|
|
94757
95385
|
selectedCanvasFilters.value = [];
|
|
94758
95386
|
searchType.value = null;
|
|
94759
95387
|
if (searchQuery.value.trim()) {
|
|
94760
|
-
|
|
95388
|
+
try {
|
|
95389
|
+
skipNextSuggestionFetch.value = true;
|
|
95390
|
+
await performSearch(searchQuery.value);
|
|
95391
|
+
} catch (error) {
|
|
95392
|
+
console.error("[handleEverywhereClick] Search failed:", error);
|
|
95393
|
+
} finally {
|
|
95394
|
+
skipNextSuggestionFetch.value = false;
|
|
95395
|
+
}
|
|
94761
95396
|
}
|
|
94762
95397
|
};
|
|
94763
95398
|
const recentSearches = ref([]);
|
|
@@ -94807,6 +95442,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
94807
95442
|
{
|
|
94808
95443
|
thumbnailsOnly: true,
|
|
94809
95444
|
fileIds,
|
|
95445
|
+
instanceId: props.instanceId,
|
|
94810
95446
|
isAdminApp: props.isAdmin === true
|
|
94811
95447
|
}
|
|
94812
95448
|
);
|
|
@@ -94996,8 +95632,12 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
94996
95632
|
isSearching.value = true;
|
|
94997
95633
|
hasSearchCompleted.value = false;
|
|
94998
95634
|
searchError.value = null;
|
|
95635
|
+
const shouldSkipSuggestionFetch = skipNextSuggestionFetch.value;
|
|
95636
|
+
if (shouldSkipSuggestionFetch) {
|
|
95637
|
+
skipNextSuggestionFetch.value = false;
|
|
95638
|
+
}
|
|
94999
95639
|
try {
|
|
95000
|
-
const ALLOWED_CANVAS_TYPES = ["saved_canvas", "template", "section", "block"];
|
|
95640
|
+
const ALLOWED_CANVAS_TYPES = ["saved_canvas", "template", "product_template", "section", "block"];
|
|
95001
95641
|
const ALLOWED_FILE_TYPES = [
|
|
95002
95642
|
"folder",
|
|
95003
95643
|
"pdf",
|
|
@@ -95005,11 +95645,9 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95005
95645
|
"audio",
|
|
95006
95646
|
"video",
|
|
95007
95647
|
"document",
|
|
95008
|
-
"docx",
|
|
95009
|
-
"pptx",
|
|
95010
95648
|
"presentation",
|
|
95011
95649
|
"spreadsheet",
|
|
95012
|
-
"
|
|
95650
|
+
"ar",
|
|
95013
95651
|
"web"
|
|
95014
95652
|
];
|
|
95015
95653
|
const validCanvasFilters = selectedCanvasFilters.value.filter((f) => ALLOWED_CANVAS_TYPES.includes(f));
|
|
@@ -95042,10 +95680,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95042
95680
|
canvas: canvasFilters,
|
|
95043
95681
|
content: contentFilters
|
|
95044
95682
|
});
|
|
95683
|
+
if (query.trim() !== searchQuery.value.trim()) {
|
|
95684
|
+
return;
|
|
95685
|
+
}
|
|
95045
95686
|
contentResults.value = results.content?.hits || [];
|
|
95046
95687
|
canvasResults.value = results.canvas?.hits || [];
|
|
95047
95688
|
selectedResultIndex.value = -1;
|
|
95048
95689
|
searchError.value = null;
|
|
95690
|
+
if (query.trim().length >= 2 && !shouldSkipSuggestionFetch) {
|
|
95691
|
+
fetchQuerySuggestions(query.trim());
|
|
95692
|
+
}
|
|
95049
95693
|
const totalResults = contentResults.value.length + canvasResults.value.length;
|
|
95050
95694
|
trackAlgoliaSearchPerformed(query.trim(), totalResults);
|
|
95051
95695
|
if (totalResults === 0) {
|
|
@@ -95082,11 +95726,18 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95082
95726
|
const debouncedFilterSearch = () => {
|
|
95083
95727
|
if (filterChangeTimer) clearTimeout(filterChangeTimer);
|
|
95084
95728
|
if (searchTimer) clearTimeout(searchTimer);
|
|
95085
|
-
filterChangeTimer = setTimeout(() => {
|
|
95729
|
+
filterChangeTimer = setTimeout(async () => {
|
|
95086
95730
|
if (searchQuery.value.trim() && !showRecentView.value) {
|
|
95087
|
-
|
|
95731
|
+
try {
|
|
95732
|
+
skipNextSuggestionFetch.value = true;
|
|
95733
|
+
await performSearch(searchQuery.value);
|
|
95734
|
+
} catch (error) {
|
|
95735
|
+
console.error("[debouncedFilterSearch] Search failed:", error);
|
|
95736
|
+
} finally {
|
|
95737
|
+
skipNextSuggestionFetch.value = false;
|
|
95738
|
+
}
|
|
95088
95739
|
}
|
|
95089
|
-
},
|
|
95740
|
+
}, 500);
|
|
95090
95741
|
};
|
|
95091
95742
|
const handleSearchInput = (query) => {
|
|
95092
95743
|
const validatedQuery = validateSearchInput(query);
|
|
@@ -95094,20 +95745,14 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95094
95745
|
if (validatedQuery.trim()) {
|
|
95095
95746
|
showRecentView.value = false;
|
|
95096
95747
|
hasSearchCompleted.value = false;
|
|
95097
|
-
if (validatedQuery.trim().length
|
|
95098
|
-
if (skipNextSuggestionFetch.value) {
|
|
95099
|
-
skipNextSuggestionFetch.value = false;
|
|
95100
|
-
} else {
|
|
95101
|
-
fetchQuerySuggestions(validatedQuery);
|
|
95102
|
-
}
|
|
95103
|
-
} else {
|
|
95748
|
+
if (validatedQuery.trim().length < 2) {
|
|
95104
95749
|
querySuggestions.value = [];
|
|
95105
95750
|
selectedSuggestionIndex.value = -1;
|
|
95106
95751
|
}
|
|
95107
95752
|
if (searchTimer) clearTimeout(searchTimer);
|
|
95108
95753
|
searchTimer = setTimeout(() => {
|
|
95109
95754
|
performSearch(validatedQuery);
|
|
95110
|
-
},
|
|
95755
|
+
}, 500);
|
|
95111
95756
|
if (saveSearchTimer) clearTimeout(saveSearchTimer);
|
|
95112
95757
|
saveSearchTimer = setTimeout(() => {
|
|
95113
95758
|
saveSearchTerm(validatedQuery);
|
|
@@ -95145,6 +95790,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95145
95790
|
return;
|
|
95146
95791
|
}
|
|
95147
95792
|
try {
|
|
95793
|
+
skipNextSuggestionFetch.value = true;
|
|
95148
95794
|
searchQuery.value = validatedSearchTerm;
|
|
95149
95795
|
showRecentView.value = false;
|
|
95150
95796
|
querySuggestions.value = [];
|
|
@@ -95152,6 +95798,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95152
95798
|
await performSearch(validatedSearchTerm);
|
|
95153
95799
|
} catch (error) {
|
|
95154
95800
|
console.error("[handleRecentSearchClick] Search failed:", error);
|
|
95801
|
+
} finally {
|
|
95802
|
+
skipNextSuggestionFetch.value = false;
|
|
95155
95803
|
}
|
|
95156
95804
|
};
|
|
95157
95805
|
const handleSuggestionClick = async (suggestion) => {
|
|
@@ -95221,6 +95869,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95221
95869
|
return t("canvasUI.CAlgoliaSearch.canvasFilters.saved");
|
|
95222
95870
|
case "template":
|
|
95223
95871
|
return t("canvasUI.CAlgoliaSearch.canvasFilters.templates");
|
|
95872
|
+
case "product_template":
|
|
95873
|
+
return t("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates");
|
|
95224
95874
|
case "section":
|
|
95225
95875
|
return t("canvasUI.CAlgoliaSearch.canvasFilters.products");
|
|
95226
95876
|
case "block":
|
|
@@ -95241,8 +95891,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95241
95891
|
}
|
|
95242
95892
|
const emIndex = highlightValue.indexOf("<em>");
|
|
95243
95893
|
if (emIndex === -1) return "";
|
|
95244
|
-
const startChar = Math.max(0, emIndex -
|
|
95245
|
-
const endChar = Math.min(highlightValue.length, emIndex +
|
|
95894
|
+
const startChar = Math.max(0, emIndex - 75);
|
|
95895
|
+
const endChar = Math.min(highlightValue.length, emIndex + 125);
|
|
95246
95896
|
let truncated = highlightValue.substring(startChar, endChar);
|
|
95247
95897
|
if (startChar > 0) truncated = "..." + truncated;
|
|
95248
95898
|
if (endChar < highlightValue.length) truncated = truncated + "...";
|
|
@@ -95370,6 +96020,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95370
96020
|
{
|
|
95371
96021
|
thumbnailsOnly: true,
|
|
95372
96022
|
fileIds: [item.id],
|
|
96023
|
+
instanceId: props.instanceId,
|
|
95373
96024
|
isAdminApp: props.isAdmin === true
|
|
95374
96025
|
}
|
|
95375
96026
|
);
|
|
@@ -95557,7 +96208,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95557
96208
|
show: showFileTypeDropdown.value,
|
|
95558
96209
|
"show-arrow": false,
|
|
95559
96210
|
trigger: "manual",
|
|
95560
|
-
onClickoutside: _cache[
|
|
96211
|
+
onClickoutside: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = false)
|
|
95561
96212
|
}, {
|
|
95562
96213
|
trigger: withCtx(() => [
|
|
95563
96214
|
createVNode(unref(NTag), {
|
|
@@ -95570,20 +96221,12 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95570
96221
|
themeOverrides: {
|
|
95571
96222
|
borderRadius: "4px"
|
|
95572
96223
|
},
|
|
95573
|
-
onClick: _cache[
|
|
96224
|
+
onClick: _cache[6] || (_cache[6] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
|
|
95574
96225
|
}, {
|
|
95575
96226
|
default: withCtx(() => [
|
|
95576
96227
|
createElementVNode("div", _hoisted_10$C, [
|
|
95577
96228
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
|
|
95578
|
-
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
|
|
95579
|
-
selectedFileTypes.value.length ? (openBlock(), createBlock(CIcon, {
|
|
95580
|
-
key: 1,
|
|
95581
|
-
class: "ml-1",
|
|
95582
|
-
color: "var(--p-primary2)",
|
|
95583
|
-
icon: "xmark",
|
|
95584
|
-
size: "12",
|
|
95585
|
-
onClick: _cache[6] || (_cache[6] = withModifiers(($event) => selectedFileTypes.value = [], ["stop"]))
|
|
95586
|
-
})) : createCommentVNode("", true)
|
|
96229
|
+
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
|
|
95587
96230
|
])
|
|
95588
96231
|
]),
|
|
95589
96232
|
_: 1
|
|
@@ -95595,7 +96238,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95595
96238
|
(openBlock(), createElementBlock(Fragment, null, renderList(fileTypeOptions, (option) => {
|
|
95596
96239
|
return createElementVNode("div", {
|
|
95597
96240
|
key: option.value,
|
|
95598
|
-
class: "w-full h-
|
|
96241
|
+
class: "w-full h-7 flex items-center"
|
|
95599
96242
|
}, [
|
|
95600
96243
|
createVNode(unref(NCheckbox), {
|
|
95601
96244
|
checked: selectedFileTypes.value.includes(option.value),
|
|
@@ -95639,7 +96282,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95639
96282
|
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
|
|
95640
96283
|
])) : createCommentVNode("", true)
|
|
95641
96284
|
], 64)) : searchType.value === "canvases" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
95642
|
-
|
|
96285
|
+
!_ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
|
|
96286
|
+
key: 0,
|
|
95643
96287
|
class: "select-none cursor-pointer",
|
|
95644
96288
|
style: normalizeStyle({
|
|
95645
96289
|
"--n-color": selectedCanvasFilters.value.includes("saved_canvas") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
@@ -95649,13 +96293,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95649
96293
|
themeOverrides: {
|
|
95650
96294
|
borderRadius: "4px"
|
|
95651
96295
|
},
|
|
95652
|
-
onClick: _cache[
|
|
96296
|
+
onClick: _cache[8] || (_cache[8] = ($event) => toggleCanvasFilter("saved_canvas"))
|
|
95653
96297
|
}, {
|
|
95654
96298
|
default: withCtx(() => [
|
|
95655
96299
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
|
|
95656
96300
|
]),
|
|
95657
96301
|
_: 1
|
|
95658
|
-
}, 8, ["style"]),
|
|
96302
|
+
}, 8, ["style"])) : createCommentVNode("", true),
|
|
95659
96303
|
createVNode(unref(NTag), {
|
|
95660
96304
|
class: "select-none cursor-pointer",
|
|
95661
96305
|
style: normalizeStyle({
|
|
@@ -95666,13 +96310,31 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95666
96310
|
themeOverrides: {
|
|
95667
96311
|
borderRadius: "4px"
|
|
95668
96312
|
},
|
|
95669
|
-
onClick: _cache[
|
|
96313
|
+
onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("template"))
|
|
95670
96314
|
}, {
|
|
95671
96315
|
default: withCtx(() => [
|
|
95672
96316
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
|
|
95673
96317
|
]),
|
|
95674
96318
|
_: 1
|
|
95675
96319
|
}, 8, ["style"]),
|
|
96320
|
+
_ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
|
|
96321
|
+
key: 1,
|
|
96322
|
+
class: "select-none cursor-pointer",
|
|
96323
|
+
style: normalizeStyle({
|
|
96324
|
+
"--n-color": selectedCanvasFilters.value.includes("product_template") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96325
|
+
"--n-border": "1px solid var(--p-primary5)",
|
|
96326
|
+
"--n-height": "28px"
|
|
96327
|
+
}),
|
|
96328
|
+
themeOverrides: {
|
|
96329
|
+
borderRadius: "4px"
|
|
96330
|
+
},
|
|
96331
|
+
onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("product_template"))
|
|
96332
|
+
}, {
|
|
96333
|
+
default: withCtx(() => [
|
|
96334
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates")), 1)
|
|
96335
|
+
]),
|
|
96336
|
+
_: 1
|
|
96337
|
+
}, 8, ["style"])) : createCommentVNode("", true),
|
|
95676
96338
|
createVNode(unref(NTag), {
|
|
95677
96339
|
class: "select-none cursor-pointer",
|
|
95678
96340
|
style: normalizeStyle({
|
|
@@ -95794,30 +96456,185 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95794
96456
|
], 64)) : createCommentVNode("", true)
|
|
95795
96457
|
])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_30$4, [
|
|
95796
96458
|
createElementVNode("div", _hoisted_31$4, [
|
|
95797
|
-
|
|
95798
|
-
|
|
96459
|
+
isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
|
|
96460
|
+
createVNode(CIcon, {
|
|
96461
|
+
class: "animate-spin text-6xl",
|
|
96462
|
+
color: "var(--p-primary)",
|
|
96463
|
+
icon: "spinner"
|
|
96464
|
+
})
|
|
96465
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
96466
|
+
filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_33$4, [
|
|
96467
|
+
createElementVNode("div", _hoisted_34$4, [
|
|
96468
|
+
createVNode(CIcon, {
|
|
96469
|
+
class: "mr-2",
|
|
96470
|
+
color: "var(--p-text2)",
|
|
96471
|
+
icon: "folder",
|
|
96472
|
+
size: "16"
|
|
96473
|
+
}),
|
|
96474
|
+
createElementVNode("span", _hoisted_35$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
|
|
96475
|
+
createElementVNode("span", _hoisted_36$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
|
|
96476
|
+
]),
|
|
96477
|
+
createElementVNode("div", null, [
|
|
96478
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
|
|
96479
|
+
return openBlock(), createElementBlock("div", {
|
|
96480
|
+
key: item.id,
|
|
96481
|
+
class: normalizeClass([
|
|
96482
|
+
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96483
|
+
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96484
|
+
isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
|
|
96485
|
+
]),
|
|
96486
|
+
"data-result-selected": isResultSelected(item),
|
|
96487
|
+
onClick: ($event) => handleResultClick(item, item.type === "folder" ? "folder" : "file")
|
|
96488
|
+
}, [
|
|
96489
|
+
item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
96490
|
+
key: 0,
|
|
96491
|
+
class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
|
|
96492
|
+
cover: "",
|
|
96493
|
+
"file-data": item,
|
|
96494
|
+
"object-fit": "cover",
|
|
96495
|
+
src: item.picture_url || "",
|
|
96496
|
+
width: "72"
|
|
96497
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_38$4, [
|
|
96498
|
+
createVNode(CIcon, {
|
|
96499
|
+
color: "var(--p-text2)",
|
|
96500
|
+
icon: "folder",
|
|
96501
|
+
size: "32"
|
|
96502
|
+
})
|
|
96503
|
+
])),
|
|
96504
|
+
createElementVNode("div", _hoisted_39$4, [
|
|
96505
|
+
createElementVNode("h3", _hoisted_40$4, toDisplayString(item.name), 1),
|
|
96506
|
+
item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
96507
|
+
key: 0,
|
|
96508
|
+
class: "text-xs text-gray-600 mb-1",
|
|
96509
|
+
innerHTML: getSnippet(item)
|
|
96510
|
+
}, null, 8, _hoisted_41$4)) : createCommentVNode("", true),
|
|
96511
|
+
createElementVNode("p", _hoisted_42$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
|
|
96512
|
+
]),
|
|
96513
|
+
createElementVNode("div", _hoisted_43$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
96514
|
+
], 10, _hoisted_37$4);
|
|
96515
|
+
}), 128))
|
|
96516
|
+
]),
|
|
96517
|
+
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
|
|
96518
|
+
createElementVNode("span", {
|
|
96519
|
+
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96520
|
+
onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
|
|
96521
|
+
}, [
|
|
96522
|
+
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96523
|
+
createVNode(CIcon, {
|
|
96524
|
+
class: "ml-1",
|
|
96525
|
+
icon: "chevron-right",
|
|
96526
|
+
size: "12"
|
|
96527
|
+
})
|
|
96528
|
+
])
|
|
96529
|
+
])) : createCommentVNode("", true)
|
|
96530
|
+
])) : createCommentVNode("", true),
|
|
96531
|
+
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_45$4, [
|
|
96532
|
+
createElementVNode("div", _hoisted_46$4, [
|
|
96533
|
+
createVNode(CIcon, {
|
|
96534
|
+
class: "mr-2",
|
|
96535
|
+
color: "var(--p-text2)",
|
|
96536
|
+
icon: "presentation",
|
|
96537
|
+
size: "16"
|
|
96538
|
+
}),
|
|
96539
|
+
createElementVNode("span", _hoisted_47$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
96540
|
+
createElementVNode("span", _hoisted_48$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
|
|
96541
|
+
]),
|
|
96542
|
+
createElementVNode("div", null, [
|
|
96543
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
|
|
96544
|
+
return openBlock(), createElementBlock("div", {
|
|
96545
|
+
key: item.id,
|
|
96546
|
+
class: normalizeClass([
|
|
96547
|
+
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96548
|
+
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96549
|
+
isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
|
|
96550
|
+
]),
|
|
96551
|
+
"data-result-selected": isResultSelected(item),
|
|
96552
|
+
onClick: ($event) => handleResultClick(item, "canvas")
|
|
96553
|
+
}, [
|
|
96554
|
+
createElementVNode("div", _hoisted_50$4, [
|
|
96555
|
+
createVNode(CIcon, {
|
|
96556
|
+
color: "var(--p-text2)",
|
|
96557
|
+
icon: "presentation",
|
|
96558
|
+
size: "32"
|
|
96559
|
+
})
|
|
96560
|
+
]),
|
|
96561
|
+
createElementVNode("div", _hoisted_51$3, [
|
|
96562
|
+
createElementVNode("h3", _hoisted_52$3, toDisplayString(item.name), 1),
|
|
96563
|
+
createElementVNode("p", _hoisted_53$3, toDisplayString(formatCanvasType(item.content_type)), 1)
|
|
96564
|
+
]),
|
|
96565
|
+
createElementVNode("div", _hoisted_54$2, toDisplayString(item.folder?.name || ""), 1)
|
|
96566
|
+
], 10, _hoisted_49$4);
|
|
96567
|
+
}), 128))
|
|
96568
|
+
]),
|
|
96569
|
+
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
|
|
96570
|
+
createElementVNode("span", {
|
|
96571
|
+
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96572
|
+
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
|
|
96573
|
+
}, [
|
|
96574
|
+
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96575
|
+
createVNode(CIcon, {
|
|
96576
|
+
class: "ml-1",
|
|
96577
|
+
icon: "chevron-right",
|
|
96578
|
+
size: "12"
|
|
96579
|
+
})
|
|
96580
|
+
])
|
|
96581
|
+
])) : createCommentVNode("", true)
|
|
96582
|
+
])) : createCommentVNode("", true),
|
|
96583
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_56$2, [
|
|
95799
96584
|
createVNode(CIcon, {
|
|
96585
|
+
class: "text-6xl",
|
|
96586
|
+
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
96587
|
+
"fa-type": "fal",
|
|
96588
|
+
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
96589
|
+
}, null, 8, ["color", "icon"]),
|
|
96590
|
+
createElementVNode("p", {
|
|
96591
|
+
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
96592
|
+
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
96593
|
+
])) : createCommentVNode("", true)
|
|
96594
|
+
], 64))
|
|
96595
|
+
])
|
|
96596
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_57$2, [
|
|
96597
|
+
createElementVNode("div", _hoisted_58$2, [
|
|
96598
|
+
isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_59$2, [
|
|
96599
|
+
createVNode(CIcon, {
|
|
96600
|
+
class: "animate-spin text-6xl",
|
|
96601
|
+
color: "var(--p-primary)",
|
|
96602
|
+
icon: "spinner"
|
|
96603
|
+
})
|
|
96604
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
96605
|
+
createElementVNode("div", _hoisted_60$2, [
|
|
96606
|
+
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
96607
|
+
key: 0,
|
|
95800
96608
|
class: "mr-2",
|
|
95801
96609
|
color: "var(--p-text2)",
|
|
95802
96610
|
icon: "folder",
|
|
95803
96611
|
size: "16"
|
|
95804
|
-
}),
|
|
95805
|
-
|
|
95806
|
-
|
|
96612
|
+
})) : (openBlock(), createBlock(CIcon, {
|
|
96613
|
+
key: 1,
|
|
96614
|
+
class: "mr-2",
|
|
96615
|
+
color: "var(--p-text2)",
|
|
96616
|
+
icon: "presentation",
|
|
96617
|
+
size: "16"
|
|
96618
|
+
})),
|
|
96619
|
+
createElementVNode("span", _hoisted_61$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
96620
|
+
createElementVNode("span", _hoisted_62$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
|
|
95807
96621
|
]),
|
|
95808
96622
|
createElementVNode("div", null, [
|
|
95809
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.
|
|
96623
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
|
|
95810
96624
|
return openBlock(), createElementBlock("div", {
|
|
95811
96625
|
key: item.id,
|
|
95812
96626
|
class: normalizeClass([
|
|
95813
96627
|
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
95814
96628
|
_ctx.isAdmin ? "py-3" : "py-0",
|
|
95815
|
-
isResultSelected(item) ? "bg-
|
|
96629
|
+
isResultSelected(item) ? "bg-gray-100" : "hover:bg-gray-50"
|
|
95816
96630
|
]),
|
|
95817
96631
|
"data-result-selected": isResultSelected(item),
|
|
95818
|
-
onClick: ($event) => handleResultClick(
|
|
96632
|
+
onClick: ($event) => handleResultClick(
|
|
96633
|
+
item,
|
|
96634
|
+
searchType.value === "content" ? item.type === "folder" ? "folder" : "file" : "canvas"
|
|
96635
|
+
)
|
|
95819
96636
|
}, [
|
|
95820
|
-
item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
96637
|
+
searchType.value === "content" && item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
95821
96638
|
key: 0,
|
|
95822
96639
|
class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
|
|
95823
96640
|
cover: "",
|
|
@@ -95825,187 +96642,48 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95825
96642
|
"object-fit": "cover",
|
|
95826
96643
|
src: item.picture_url || "",
|
|
95827
96644
|
width: "72"
|
|
95828
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div",
|
|
95829
|
-
|
|
96645
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_64$2, [
|
|
96646
|
+
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
96647
|
+
key: 0,
|
|
95830
96648
|
color: "var(--p-text2)",
|
|
95831
96649
|
icon: "folder",
|
|
95832
96650
|
size: "32"
|
|
95833
|
-
})
|
|
96651
|
+
})) : (openBlock(), createBlock(CIcon, {
|
|
96652
|
+
key: 1,
|
|
96653
|
+
color: "var(--p-text2)",
|
|
96654
|
+
icon: "presentation",
|
|
96655
|
+
size: "32"
|
|
96656
|
+
}))
|
|
95834
96657
|
])),
|
|
95835
|
-
createElementVNode("div",
|
|
95836
|
-
createElementVNode("h3",
|
|
95837
|
-
item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
96658
|
+
createElementVNode("div", _hoisted_65$2, [
|
|
96659
|
+
createElementVNode("h3", _hoisted_66$2, toDisplayString(item.name), 1),
|
|
96660
|
+
searchType.value === "content" && item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
95838
96661
|
key: 0,
|
|
95839
96662
|
class: "text-xs text-gray-600 mb-1",
|
|
95840
96663
|
innerHTML: getSnippet(item)
|
|
95841
|
-
}, null, 8,
|
|
95842
|
-
createElementVNode("p",
|
|
96664
|
+
}, null, 8, _hoisted_67$2)) : createCommentVNode("", true),
|
|
96665
|
+
createElementVNode("p", _hoisted_68$2, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File" : formatCanvasType(item.content_type)), 1)
|
|
95843
96666
|
]),
|
|
95844
|
-
createElementVNode("div",
|
|
95845
|
-
], 10,
|
|
96667
|
+
createElementVNode("div", _hoisted_69$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
96668
|
+
], 10, _hoisted_63$2);
|
|
95846
96669
|
}), 128))
|
|
95847
96670
|
]),
|
|
95848
|
-
|
|
95849
|
-
createElementVNode("span", {
|
|
95850
|
-
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
95851
|
-
onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
|
|
95852
|
-
}, [
|
|
95853
|
-
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
95854
|
-
createVNode(CIcon, {
|
|
95855
|
-
class: "ml-1",
|
|
95856
|
-
icon: "chevron-right",
|
|
95857
|
-
size: "12"
|
|
95858
|
-
})
|
|
95859
|
-
])
|
|
95860
|
-
])) : createCommentVNode("", true)
|
|
95861
|
-
])) : createCommentVNode("", true),
|
|
95862
|
-
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
|
|
95863
|
-
createElementVNode("div", _hoisted_45$4, [
|
|
96671
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_70$1, [
|
|
95864
96672
|
createVNode(CIcon, {
|
|
95865
|
-
class: "
|
|
95866
|
-
color: "var(--p-
|
|
95867
|
-
|
|
95868
|
-
|
|
95869
|
-
}),
|
|
95870
|
-
createElementVNode("
|
|
95871
|
-
|
|
95872
|
-
|
|
95873
|
-
createElementVNode("div", null, [
|
|
95874
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
|
|
95875
|
-
return openBlock(), createElementBlock("div", {
|
|
95876
|
-
key: item.id,
|
|
95877
|
-
class: normalizeClass([
|
|
95878
|
-
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
95879
|
-
_ctx.isAdmin ? "py-3" : "py-0",
|
|
95880
|
-
isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
|
|
95881
|
-
]),
|
|
95882
|
-
"data-result-selected": isResultSelected(item),
|
|
95883
|
-
onClick: ($event) => handleResultClick(item, "canvas")
|
|
95884
|
-
}, [
|
|
95885
|
-
createElementVNode("div", _hoisted_49$4, [
|
|
95886
|
-
createVNode(CIcon, {
|
|
95887
|
-
color: "var(--p-text2)",
|
|
95888
|
-
icon: "presentation",
|
|
95889
|
-
size: "32"
|
|
95890
|
-
})
|
|
95891
|
-
]),
|
|
95892
|
-
createElementVNode("div", _hoisted_50$4, [
|
|
95893
|
-
createElementVNode("h3", _hoisted_51$3, toDisplayString(item.name), 1),
|
|
95894
|
-
createElementVNode("p", _hoisted_52$3, toDisplayString(formatCanvasType(item.content_type)), 1)
|
|
95895
|
-
]),
|
|
95896
|
-
createElementVNode("div", _hoisted_53$3, toDisplayString(item.folder?.name || ""), 1)
|
|
95897
|
-
], 10, _hoisted_48$4);
|
|
95898
|
-
}), 128))
|
|
95899
|
-
]),
|
|
95900
|
-
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_54$2, [
|
|
95901
|
-
createElementVNode("span", {
|
|
95902
|
-
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
95903
|
-
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
|
|
95904
|
-
}, [
|
|
95905
|
-
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
95906
|
-
createVNode(CIcon, {
|
|
95907
|
-
class: "ml-1",
|
|
95908
|
-
icon: "chevron-right",
|
|
95909
|
-
size: "12"
|
|
95910
|
-
})
|
|
95911
|
-
])
|
|
96673
|
+
class: "text-6xl",
|
|
96674
|
+
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
96675
|
+
"fa-type": "fal",
|
|
96676
|
+
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
96677
|
+
}, null, 8, ["color", "icon"]),
|
|
96678
|
+
createElementVNode("p", {
|
|
96679
|
+
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
96680
|
+
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
95912
96681
|
])) : createCommentVNode("", true)
|
|
95913
|
-
]
|
|
95914
|
-
]),
|
|
95915
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
|
|
95916
|
-
createVNode(CIcon, {
|
|
95917
|
-
class: "text-6xl",
|
|
95918
|
-
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
95919
|
-
"fa-type": "fal",
|
|
95920
|
-
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
95921
|
-
}, null, 8, ["color", "icon"]),
|
|
95922
|
-
createElementVNode("p", {
|
|
95923
|
-
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
95924
|
-
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
95925
|
-
])) : createCommentVNode("", true)
|
|
95926
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_56$2, [
|
|
95927
|
-
createElementVNode("div", _hoisted_57$2, [
|
|
95928
|
-
createElementVNode("div", _hoisted_58$2, [
|
|
95929
|
-
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
95930
|
-
key: 0,
|
|
95931
|
-
class: "mr-2",
|
|
95932
|
-
color: "var(--p-text2)",
|
|
95933
|
-
icon: "folder",
|
|
95934
|
-
size: "16"
|
|
95935
|
-
})) : (openBlock(), createBlock(CIcon, {
|
|
95936
|
-
key: 1,
|
|
95937
|
-
class: "mr-2",
|
|
95938
|
-
color: "var(--p-text2)",
|
|
95939
|
-
icon: "presentation",
|
|
95940
|
-
size: "16"
|
|
95941
|
-
})),
|
|
95942
|
-
createElementVNode("span", _hoisted_59$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
95943
|
-
createElementVNode("span", _hoisted_60$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
|
|
95944
|
-
]),
|
|
95945
|
-
createElementVNode("div", null, [
|
|
95946
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
|
|
95947
|
-
return openBlock(), createElementBlock("div", {
|
|
95948
|
-
key: item.id,
|
|
95949
|
-
class: normalizeClass([
|
|
95950
|
-
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
95951
|
-
_ctx.isAdmin ? "py-3" : "py-0",
|
|
95952
|
-
isResultSelected(item) ? "bg-gray-100" : "hover:bg-gray-50"
|
|
95953
|
-
]),
|
|
95954
|
-
"data-result-selected": isResultSelected(item),
|
|
95955
|
-
onClick: ($event) => handleResultClick(
|
|
95956
|
-
item,
|
|
95957
|
-
searchType.value === "content" ? item.type === "folder" ? "folder" : "file" : "canvas"
|
|
95958
|
-
)
|
|
95959
|
-
}, [
|
|
95960
|
-
searchType.value === "content" && item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
95961
|
-
key: 0,
|
|
95962
|
-
class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
|
|
95963
|
-
cover: "",
|
|
95964
|
-
"file-data": item,
|
|
95965
|
-
"object-fit": "cover",
|
|
95966
|
-
src: item.picture_url || "",
|
|
95967
|
-
width: "72"
|
|
95968
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_62$2, [
|
|
95969
|
-
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
95970
|
-
key: 0,
|
|
95971
|
-
color: "var(--p-text2)",
|
|
95972
|
-
icon: "folder",
|
|
95973
|
-
size: "32"
|
|
95974
|
-
})) : (openBlock(), createBlock(CIcon, {
|
|
95975
|
-
key: 1,
|
|
95976
|
-
color: "var(--p-text2)",
|
|
95977
|
-
icon: "presentation",
|
|
95978
|
-
size: "32"
|
|
95979
|
-
}))
|
|
95980
|
-
])),
|
|
95981
|
-
createElementVNode("div", _hoisted_63$2, [
|
|
95982
|
-
createElementVNode("h3", _hoisted_64$2, toDisplayString(item.name), 1),
|
|
95983
|
-
searchType.value === "content" && item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
95984
|
-
key: 0,
|
|
95985
|
-
class: "text-xs text-gray-600 mb-1",
|
|
95986
|
-
innerHTML: getSnippet(item)
|
|
95987
|
-
}, null, 8, _hoisted_65$2)) : createCommentVNode("", true),
|
|
95988
|
-
createElementVNode("p", _hoisted_66$2, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File" : formatCanvasType(item.content_type)), 1)
|
|
95989
|
-
]),
|
|
95990
|
-
createElementVNode("div", _hoisted_67$2, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
95991
|
-
], 10, _hoisted_61$2);
|
|
95992
|
-
}), 128))
|
|
95993
|
-
]),
|
|
95994
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_68$2, [
|
|
95995
|
-
createVNode(CIcon, {
|
|
95996
|
-
class: "text-6xl",
|
|
95997
|
-
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
95998
|
-
"fa-type": "fal",
|
|
95999
|
-
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
96000
|
-
}, null, 8, ["color", "icon"]),
|
|
96001
|
-
createElementVNode("p", {
|
|
96002
|
-
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
96003
|
-
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
96004
|
-
])) : createCommentVNode("", true)
|
|
96682
|
+
], 64))
|
|
96005
96683
|
])
|
|
96006
96684
|
]))
|
|
96007
96685
|
]),
|
|
96008
|
-
!showRecentView.value ? (openBlock(), createElementBlock("div",
|
|
96686
|
+
!showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_71$1, [
|
|
96009
96687
|
createVNode(CShortcut, null, {
|
|
96010
96688
|
default: withCtx(() => [
|
|
96011
96689
|
createVNode(CShortcutIcon, { icon: "arrow-up" }),
|
|
@@ -96047,7 +96725,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96047
96725
|
}
|
|
96048
96726
|
});
|
|
96049
96727
|
|
|
96050
|
-
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-
|
|
96728
|
+
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-da2357d4"]]);
|
|
96051
96729
|
|
|
96052
96730
|
const BulletListExtended = BulletList.extend({
|
|
96053
96731
|
addOptions() {
|
|
@@ -130912,24 +131590,21 @@ const displayIntegerWithMunit = (number, decimals = 2) => {
|
|
|
130912
131590
|
return `${b.toFixed(decimals)}B`;
|
|
130913
131591
|
};
|
|
130914
131592
|
const convertSecondsToMinutes = (number) => {
|
|
130915
|
-
if (number === 0) return "0 sec";
|
|
130916
|
-
if (number < 1) return "<1 sec";
|
|
130917
131593
|
const units = [
|
|
130918
|
-
[
|
|
130919
|
-
[60 * 60, "h"],
|
|
131594
|
+
[1, "sec"],
|
|
130920
131595
|
[60, "min"],
|
|
130921
|
-
[
|
|
131596
|
+
[60 * 60, "h"],
|
|
131597
|
+
[60 * 60 * 24, "day"]
|
|
130922
131598
|
];
|
|
130923
|
-
|
|
130924
|
-
|
|
130925
|
-
|
|
130926
|
-
|
|
130927
|
-
const val = Math.floor(remaining / divisor);
|
|
130928
|
-
parts.push(`${val} ${label}`);
|
|
130929
|
-
remaining = remaining % divisor;
|
|
131599
|
+
let bestUnit = units[0];
|
|
131600
|
+
for (const unit of units) {
|
|
131601
|
+
if (number >= unit[0]) {
|
|
131602
|
+
bestUnit = unit;
|
|
130930
131603
|
}
|
|
130931
131604
|
}
|
|
130932
|
-
|
|
131605
|
+
const [divisor, label] = bestUnit;
|
|
131606
|
+
const val = Math.floor(number / Number(divisor));
|
|
131607
|
+
return `${val} ${label}`;
|
|
130933
131608
|
};
|
|
130934
131609
|
const getNumberWithRegex = (string) => {
|
|
130935
131610
|
return string?.replace(/\D+/g, "");
|
|
@@ -180947,6 +181622,33 @@ function useTheme() {
|
|
|
180947
181622
|
};
|
|
180948
181623
|
}
|
|
180949
181624
|
|
|
181625
|
+
function useSmartStore(env) {
|
|
181626
|
+
const shouldUseSmartStore = computed(() => {
|
|
181627
|
+
try {
|
|
181628
|
+
const envValue = unref(env);
|
|
181629
|
+
if (!envValue) {
|
|
181630
|
+
return false;
|
|
181631
|
+
}
|
|
181632
|
+
const isIos = envValue?.mode === "IOS";
|
|
181633
|
+
const isSfdcSyncEnabled = envValue?.pitcher?.instance?.settings?.enable_sfdc_sync === true;
|
|
181634
|
+
return isIos && isSfdcSyncEnabled;
|
|
181635
|
+
} catch (error) {
|
|
181636
|
+
console.error("[useSmartStore] Error checking SmartStore availability:", error);
|
|
181637
|
+
return false;
|
|
181638
|
+
}
|
|
181639
|
+
});
|
|
181640
|
+
const generateTempSalesforceId = (objectPrefix) => {
|
|
181641
|
+
const timestamp = Date.now().toString(36);
|
|
181642
|
+
const randomStr = Math.random().toString(36).substring(2, 11);
|
|
181643
|
+
const uniqueId = (timestamp + randomStr).substring(0, 14 - objectPrefix.length);
|
|
181644
|
+
return "PIT_" + objectPrefix + uniqueId.padEnd(14 - objectPrefix.length, "0");
|
|
181645
|
+
};
|
|
181646
|
+
return {
|
|
181647
|
+
shouldUseSmartStore,
|
|
181648
|
+
generateTempSalesforceId
|
|
181649
|
+
};
|
|
181650
|
+
}
|
|
181651
|
+
|
|
180950
181652
|
const initialCanvas = ref(void 0);
|
|
180951
181653
|
const useCanvasOverlay = () => {
|
|
180952
181654
|
const openCanvasOverlay = ({ id, fullscreen, edit_mode, component_id, section_id, position }) => {
|
|
@@ -182676,11 +183378,103 @@ const useCanvasById = (id) => {
|
|
|
182676
183378
|
});
|
|
182677
183379
|
};
|
|
182678
183380
|
|
|
182679
|
-
function
|
|
183381
|
+
function extractFieldNamesFromCondition(condition2) {
|
|
183382
|
+
if (!condition2) return [];
|
|
183383
|
+
const stringLiteralPattern2 = /(["'])(?:(?=(\\?))\2.)*?\1/g;
|
|
183384
|
+
const conditionWithoutStrings2 = condition2.replace(stringLiteralPattern2, "");
|
|
183385
|
+
const fieldPattern2 = /\b([A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)?(?:__[cr])?)\b/g;
|
|
183386
|
+
const matches = conditionWithoutStrings2.match(fieldPattern2) || [];
|
|
183387
|
+
const soqlKeywords2 = /* @__PURE__ */ new Set([
|
|
183388
|
+
"AND",
|
|
183389
|
+
"OR",
|
|
183390
|
+
"NOT",
|
|
183391
|
+
"IN",
|
|
183392
|
+
"LIKE",
|
|
183393
|
+
"NULL",
|
|
183394
|
+
"TRUE",
|
|
183395
|
+
"FALSE",
|
|
183396
|
+
"true",
|
|
183397
|
+
"false",
|
|
183398
|
+
"null",
|
|
183399
|
+
"and",
|
|
183400
|
+
"or",
|
|
183401
|
+
"not",
|
|
183402
|
+
"in",
|
|
183403
|
+
"like"
|
|
183404
|
+
]);
|
|
183405
|
+
return [...new Set(matches.filter((field) => !soqlKeywords2.has(field)))];
|
|
183406
|
+
}
|
|
183407
|
+
function evaluateIsExecutedCondition(condition, event) {
|
|
183408
|
+
if (!condition) return false;
|
|
183409
|
+
try {
|
|
183410
|
+
let jsCondition = condition.replace(/<>/g, "!==").replace(/!=/g, "!==").replace(/([^!<>=])\s*=\s*([^=])/g, "$1 === $2").replace(/\bNULL\b/gi, "null").replace(/\bTRUE\b/gi, "true").replace(/\bFALSE\b/gi, "false").replace(/\bAND\b/gi, "&&").replace(/\bOR\b/gi, "||").replace(/\bNOT\b/gi, "!");
|
|
183411
|
+
const fieldNames = extractFieldNamesFromCondition(condition);
|
|
183412
|
+
fieldNames.forEach((fieldName) => {
|
|
183413
|
+
const fieldValue = event[fieldName];
|
|
183414
|
+
const jsValue = fieldValue === null || fieldValue === void 0 ? "null" : JSON.stringify(fieldValue);
|
|
183415
|
+
const fieldRegex = new RegExp(`\\b${fieldName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`, "g");
|
|
183416
|
+
jsCondition = jsCondition.replace(fieldRegex, jsValue);
|
|
183417
|
+
});
|
|
183418
|
+
jsCondition = jsCondition.replace(
|
|
183419
|
+
/(["'])((?:[^"\\]|\\.)*)\1\s*(===|!==)\s*(["'])((?:[^"\\]|\\.)*)\4/g,
|
|
183420
|
+
(match, leftQuote, leftValue, operator, rightQuote, rightValue) => {
|
|
183421
|
+
return `"${leftValue}".toLowerCase() ${operator} "${rightValue}".toLowerCase()`;
|
|
183422
|
+
}
|
|
183423
|
+
);
|
|
183424
|
+
return eval(jsCondition) === true;
|
|
183425
|
+
} catch (error) {
|
|
183426
|
+
console.error("Error evaluating is_executed_condition:", error, { condition, event });
|
|
183427
|
+
return false;
|
|
183428
|
+
}
|
|
183429
|
+
}
|
|
183430
|
+
function evaluateIsExecutedForPascalCaseEvent(condition, event) {
|
|
183431
|
+
if (!condition) return false;
|
|
183432
|
+
try {
|
|
183433
|
+
let jsCondition = condition.replace(/<>/g, "!==").replace(/!=/g, "!==").replace(/([^!<>=])\s*=\s*([^=])/g, "$1 === $2").replace(/\bNULL\b/gi, "null").replace(/\bTRUE\b/gi, "true").replace(/\bFALSE\b/gi, "false").replace(/\bAND\b/gi, "&&").replace(/\bOR\b/gi, "||").replace(/\bNOT\b/gi, "!");
|
|
183434
|
+
const fieldPattern = /\b([A-Za-z][A-Za-z0-9_]*(?:\.[A-Za-z][A-Za-z0-9_]*)?(?:__[cr])?)\b/g;
|
|
183435
|
+
const stringLiteralPattern = /(["'])(?:(?=(\\?))\2.)*?\1/g;
|
|
183436
|
+
const conditionWithoutStrings = condition.replace(stringLiteralPattern, "");
|
|
183437
|
+
const fieldMatches = conditionWithoutStrings.match(fieldPattern) || [];
|
|
183438
|
+
const soqlKeywords = /* @__PURE__ */ new Set(["and", "or", "not", "null", "true", "false", "in", "like"]);
|
|
183439
|
+
const fieldNames = [...new Set(fieldMatches.filter((field) => !soqlKeywords.has(field.toLowerCase())))];
|
|
183440
|
+
fieldNames.forEach((fieldName) => {
|
|
183441
|
+
const pascalCaseFieldName = titleCase(fieldName).replace(/ /g, "");
|
|
183442
|
+
let fieldValue = event[pascalCaseFieldName];
|
|
183443
|
+
if (fieldValue === void 0) {
|
|
183444
|
+
fieldValue = event[fieldName];
|
|
183445
|
+
}
|
|
183446
|
+
if (fieldValue === void 0) {
|
|
183447
|
+
fieldValue = event[fieldName.toLowerCase()];
|
|
183448
|
+
}
|
|
183449
|
+
const jsValue = fieldValue === null || fieldValue === void 0 ? "null" : JSON.stringify(fieldValue);
|
|
183450
|
+
const fieldRegex = new RegExp(`\\b${fieldName.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\b`, "g");
|
|
183451
|
+
jsCondition = jsCondition.replace(fieldRegex, jsValue);
|
|
183452
|
+
});
|
|
183453
|
+
jsCondition = jsCondition.replace(
|
|
183454
|
+
/(["'])((?:[^"\\]|\\.)*)\1\s*(===|!==)\s*(["'])((?:[^"\\]|\\.)*)\4/g,
|
|
183455
|
+
(match, leftQuote, leftValue, operator, rightQuote, rightValue) => {
|
|
183456
|
+
return `"${leftValue}".toLowerCase() ${operator} "${rightValue}".toLowerCase()`;
|
|
183457
|
+
}
|
|
183458
|
+
);
|
|
183459
|
+
return eval(jsCondition) === true;
|
|
183460
|
+
} catch (error) {
|
|
183461
|
+
console.error("Error evaluating is_executed_condition:", error, {
|
|
183462
|
+
condition,
|
|
183463
|
+
event
|
|
183464
|
+
});
|
|
183465
|
+
return false;
|
|
183466
|
+
}
|
|
183467
|
+
}
|
|
183468
|
+
function getEventColor(sfEvent) {
|
|
182680
183469
|
if (!sfEvent.WhatCount && !sfEvent.WhoCount) return SfEventColors.TIME_OFF_TERRITORY;
|
|
182681
|
-
|
|
183470
|
+
let isSubmitted = false;
|
|
183471
|
+
if (sfEvent.is_executed_condition) {
|
|
183472
|
+
isSubmitted = evaluateIsExecutedCondition(sfEvent.is_executed_condition, sfEvent);
|
|
183473
|
+
} else {
|
|
183474
|
+
isSubmitted = false;
|
|
183475
|
+
}
|
|
183476
|
+
if (isSubmitted) return SfEventColors.SUBMITTED;
|
|
182682
183477
|
else if (isAfter$1(/* @__PURE__ */ new Date(), new Date(sfEvent.EndDateTime))) return SfEventColors.PAST;
|
|
182683
|
-
else if (!pEvent) return SfEventColors.PLANNED_NO_PITCHER_EVENT;
|
|
182684
183478
|
else return SfEventColors.PLANNED;
|
|
182685
183479
|
}
|
|
182686
183480
|
const minFutureDate = (date = /* @__PURE__ */ new Date()) => add(date, { minutes: MIN_DIFFERENCE_IN_MINUTES });
|
|
@@ -183208,5 +184002,5 @@ const localeNames = {
|
|
|
183208
184002
|
};
|
|
183209
184003
|
const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
|
|
183210
184004
|
|
|
183211
|
-
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 };
|
|
184005
|
+
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, evaluateIsExecutedForPascalCaseEvent, 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 };
|
|
183212
184006
|
//# sourceMappingURL=canvas-ui.js.map
|