@pitcher/canvas-ui 2026.1.6-143102-beta → 2026.1.7-082401-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 +276 -1070
- package/canvas-ui.js.map +1 -1
- package/lib/api/events/events.helpers.d.ts +2 -14
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +0 -5
- package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +2 -2
- package/lib/main.lib.d.ts +0 -2
- package/lib/sdk/api/HighLevelApi.d.ts +0 -4
- package/lib/sdk/api/modules/query.d.ts +1 -77
- package/lib/sdk/api/modules/ui/content.ui.d.ts +1 -22
- package/lib/sdk/api/modules/ui/index.d.ts +0 -2
- package/lib/sdk/api/modules/ui/types.ui.d.ts +0 -12
- package/lib/sdk/main.d.ts +0 -18
- package/lib/sdk/payload.types.d.ts +0 -57
- package/lib/types/app.d.ts +1 -1
- package/lib/types/instanceSettings.types.d.ts +0 -1
- package/lib/types/sfdc.d.ts +0 -5
- package/locale/de.json +0 -1
- package/locale/el.json +0 -1
- package/locale/en.json +0 -1
- package/locale/es.json +0 -1
- package/locale/fr.json +0 -1
- package/locale/it.json +0 -1
- package/locale/ja.json +0 -1
- package/locale/nl.json +0 -1
- package/locale/pl.json +0 -1
- package/locale/pt-br.json +0 -1
- package/locale/pt.json +0 -1
- package/locale/th.json +0 -1
- package/locale/tr.json +0 -1
- package/locale/zh.json +0 -1
- package/package.json +1 -1
- package/lib/composables/useSmartStore.d.ts +0 -25
- package/lib/util/smart-store.util.d.ts +0 -40
- package/lib/util/smart-store.util.spec.d.ts +0 -1
package/canvas-ui.js
CHANGED
|
@@ -79751,7 +79751,6 @@ 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);
|
|
79755
79754
|
const labels = {
|
|
79756
79755
|
sharing: t("canvasUI.browserApp.uploadFilesModal.sharing.label"),
|
|
79757
79756
|
tags: t("canvasUI.browserApp.uploadFilesModal.tags.label"),
|
|
@@ -79773,9 +79772,6 @@ const _sfc_main$6C = /* @__PURE__ */ defineComponent({
|
|
|
79773
79772
|
{ value: "expired" /* Expired */, label: t("canvasUI.browserApp.uploadFilesModal.expiresAt.options.expired") }
|
|
79774
79773
|
];
|
|
79775
79774
|
if (isFileExpirationMandatory.value) {
|
|
79776
|
-
if (initialExpiresAtOption.value === "never" /* Never */ || initialExpiresAtOption.value === null || initialExpiresAtOption.value === void 0) {
|
|
79777
|
-
return allOptions;
|
|
79778
|
-
}
|
|
79779
79775
|
return allOptions.filter((option) => option.value !== "never" /* Never */);
|
|
79780
79776
|
}
|
|
79781
79777
|
return allOptions;
|
|
@@ -87709,537 +87705,18 @@ function toast$2(payload) {
|
|
|
87709
87705
|
return this.API.request("toast", payload);
|
|
87710
87706
|
}
|
|
87711
87707
|
|
|
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
|
-
|
|
88119
87708
|
function query(payload) {
|
|
88120
87709
|
return highLevelApi.API.request("query", payload);
|
|
88121
87710
|
}
|
|
88122
87711
|
function crmQuery(payload) {
|
|
88123
87712
|
return highLevelApi.API.request("crm_query", payload);
|
|
88124
87713
|
}
|
|
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
|
-
}
|
|
88237
87714
|
function crmSmartQuery(payload) {
|
|
88238
87715
|
const query2 = payload.query;
|
|
88239
87716
|
if (!query2 || typeof query2 !== "string") {
|
|
88240
87717
|
return Promise.reject(new Error("Query is required and must be a string"));
|
|
88241
87718
|
}
|
|
88242
|
-
const smartStorePattern = /\{[^}]+:[^}]
|
|
87719
|
+
const smartStorePattern = /\{[^}]+:[^}]+\}/;
|
|
88243
87720
|
if (!smartStorePattern.test(query2.trim())) {
|
|
88244
87721
|
return Promise.reject(
|
|
88245
87722
|
new Error(
|
|
@@ -88296,14 +87773,7 @@ function crmSmartUpsertObjects(payload) {
|
|
|
88296
87773
|
}
|
|
88297
87774
|
}
|
|
88298
87775
|
}
|
|
88299
|
-
|
|
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
|
-
});
|
|
87776
|
+
return highLevelApi.API.request("crm_smart_upsert_objects", payload);
|
|
88307
87777
|
}
|
|
88308
87778
|
function crmSmartObjectValidationRules(payload) {
|
|
88309
87779
|
if (!payload) {
|
|
@@ -88343,66 +87813,7 @@ function crmSmartDeleteObjects(payload) {
|
|
|
88343
87813
|
}
|
|
88344
87814
|
}
|
|
88345
87815
|
}
|
|
88346
|
-
|
|
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);
|
|
87816
|
+
return highLevelApi.API.request("crm_smart_delete_objects", payload);
|
|
88406
87817
|
}
|
|
88407
87818
|
|
|
88408
87819
|
function getFolders(payload) {
|
|
@@ -88500,16 +87911,12 @@ const modules = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
|
88500
87911
|
createFavorite,
|
|
88501
87912
|
createFile,
|
|
88502
87913
|
createFolder,
|
|
88503
|
-
crmCreate,
|
|
88504
|
-
crmDescribe,
|
|
88505
87914
|
crmQuery,
|
|
88506
|
-
crmQueryAdaptive,
|
|
88507
87915
|
crmSmartDeleteObjects,
|
|
88508
87916
|
crmSmartObjectMetadata,
|
|
88509
87917
|
crmSmartObjectValidationRules,
|
|
88510
87918
|
crmSmartQuery,
|
|
88511
87919
|
crmSmartUpsertObjects,
|
|
88512
|
-
crmUpsert,
|
|
88513
87920
|
deleteCanvas,
|
|
88514
87921
|
deleteEvent,
|
|
88515
87922
|
deleteFavorite,
|
|
@@ -89098,15 +88505,6 @@ function getTopPitcherWindow(current = window) {
|
|
|
89098
88505
|
}
|
|
89099
88506
|
|
|
89100
88507
|
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
|
-
];
|
|
89110
88508
|
function updateOnlineHandlersEnv(env) {
|
|
89111
88509
|
env && setEnv(env);
|
|
89112
88510
|
}
|
|
@@ -89172,8 +88570,7 @@ class LowLevelApi extends EventEmitter {
|
|
|
89172
88570
|
throw new Error("unsupported response status");
|
|
89173
88571
|
}
|
|
89174
88572
|
};
|
|
89175
|
-
const
|
|
89176
|
-
const payload = shouldSkipSnakeCase ? cloneDeep(body) : cloneDeep(snakeCaseKeys(body));
|
|
88573
|
+
const payload = cloneDeep(snakeCaseKeys(body));
|
|
89177
88574
|
this.callbacks[id] = {
|
|
89178
88575
|
dispatched_at: Date.now(),
|
|
89179
88576
|
type,
|
|
@@ -89386,9 +88783,7 @@ const UI_API_METHOD_TYPES = {
|
|
|
89386
88783
|
UI_APP_LOADED: "ui_app_loaded",
|
|
89387
88784
|
UI_APP_RESIZE: "ui_app_resize",
|
|
89388
88785
|
UI_CLOSE_CANVAS_SECTION_EXECUTION: "ui_close_canvas_section_execution",
|
|
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"
|
|
88786
|
+
UI_CLOSE_CANVAS_DRAWER: "ui_close_canvas_drawer"
|
|
89392
88787
|
};
|
|
89393
88788
|
const UI_MESSAGE_TYPES = {
|
|
89394
88789
|
UI_MEETING_CANCELED: "ui_meeting_canceled",
|
|
@@ -89440,25 +88835,10 @@ async function selectAgendaContent$1(payload = {}) {
|
|
|
89440
88835
|
const response = await pr.send(window.parent, UI_API_METHOD_TYPES.UI_SELECT_AGENDA_CONTENT, payload);
|
|
89441
88836
|
return response.data;
|
|
89442
88837
|
}
|
|
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
|
-
}
|
|
89456
88838
|
|
|
89457
88839
|
const contentUi = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
|
|
89458
88840
|
__proto__: null,
|
|
89459
|
-
closeGlobalPopup,
|
|
89460
88841
|
open: open$1,
|
|
89461
|
-
openGlobalPopup,
|
|
89462
88842
|
preselectSfdcMeetingId,
|
|
89463
88843
|
selectAgendaContent: selectAgendaContent$1,
|
|
89464
88844
|
selectCollectionContent: selectCollectionContent$1,
|
|
@@ -95232,7 +94612,7 @@ const _hoisted_14$h = {
|
|
|
95232
94612
|
class: "flex items-center ml-2"
|
|
95233
94613
|
};
|
|
95234
94614
|
const _hoisted_15$f = {
|
|
95235
|
-
key:
|
|
94615
|
+
key: 0,
|
|
95236
94616
|
class: "flex items-center ml-2"
|
|
95237
94617
|
};
|
|
95238
94618
|
const _hoisted_16$e = { class: "flex flex-col w-full flex-1 min-h-0" };
|
|
@@ -95267,75 +94647,67 @@ const _hoisted_30$4 = {
|
|
|
95267
94647
|
};
|
|
95268
94648
|
const _hoisted_31$4 = { class: "w-full px-0" };
|
|
95269
94649
|
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 = {
|
|
95274
94650
|
key: 0,
|
|
95275
94651
|
class: "mb-0"
|
|
95276
94652
|
};
|
|
95277
|
-
const
|
|
95278
|
-
const
|
|
95279
|
-
const
|
|
95280
|
-
const
|
|
95281
|
-
const
|
|
94653
|
+
const _hoisted_33$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
94654
|
+
const _hoisted_34$4 = { class: "text-m font-semibold text-gray-900" };
|
|
94655
|
+
const _hoisted_35$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
94656
|
+
const _hoisted_36$4 = ["data-result-selected", "onClick"];
|
|
94657
|
+
const _hoisted_37$4 = {
|
|
95282
94658
|
key: 1,
|
|
95283
94659
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
95284
94660
|
};
|
|
95285
|
-
const
|
|
95286
|
-
const
|
|
95287
|
-
const
|
|
95288
|
-
const
|
|
95289
|
-
const
|
|
95290
|
-
const
|
|
94661
|
+
const _hoisted_38$4 = { class: "flex-1 min-w-0" };
|
|
94662
|
+
const _hoisted_39$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94663
|
+
const _hoisted_40$4 = ["innerHTML"];
|
|
94664
|
+
const _hoisted_41$4 = { class: "text-xs text-gray-500" };
|
|
94665
|
+
const _hoisted_42$4 = { class: "text-xs text-gray-400" };
|
|
94666
|
+
const _hoisted_43$4 = {
|
|
95291
94667
|
key: 0,
|
|
95292
94668
|
class: "px-0 py-0"
|
|
95293
94669
|
};
|
|
95294
|
-
const
|
|
95295
|
-
const
|
|
95296
|
-
const
|
|
95297
|
-
const
|
|
95298
|
-
const
|
|
95299
|
-
const
|
|
95300
|
-
const
|
|
95301
|
-
const
|
|
95302
|
-
const
|
|
95303
|
-
const
|
|
95304
|
-
const
|
|
94670
|
+
const _hoisted_44$4 = { key: 1 };
|
|
94671
|
+
const _hoisted_45$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
94672
|
+
const _hoisted_46$4 = { class: "text-m font-semibold text-gray-900" };
|
|
94673
|
+
const _hoisted_47$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
94674
|
+
const _hoisted_48$4 = ["data-result-selected", "onClick"];
|
|
94675
|
+
const _hoisted_49$4 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
|
|
94676
|
+
const _hoisted_50$4 = { class: "flex-1 min-w-0" };
|
|
94677
|
+
const _hoisted_51$3 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94678
|
+
const _hoisted_52$3 = { class: "text-xs text-gray-500" };
|
|
94679
|
+
const _hoisted_53$3 = { class: "text-xs text-gray-400" };
|
|
94680
|
+
const _hoisted_54$2 = {
|
|
95305
94681
|
key: 0,
|
|
95306
94682
|
class: "px-0 py-0"
|
|
95307
94683
|
};
|
|
95308
|
-
const
|
|
95309
|
-
key:
|
|
94684
|
+
const _hoisted_55$2 = {
|
|
94685
|
+
key: 0,
|
|
95310
94686
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95311
94687
|
};
|
|
95312
|
-
const
|
|
94688
|
+
const _hoisted_56$2 = {
|
|
95313
94689
|
key: 2,
|
|
95314
94690
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
95315
94691
|
};
|
|
95316
|
-
const
|
|
95317
|
-
const
|
|
95318
|
-
|
|
95319
|
-
|
|
95320
|
-
|
|
95321
|
-
const
|
|
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 = {
|
|
94692
|
+
const _hoisted_57$2 = { class: "w-full px-0" };
|
|
94693
|
+
const _hoisted_58$2 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
94694
|
+
const _hoisted_59$2 = { class: "text-m font-semibold text-gray-900" };
|
|
94695
|
+
const _hoisted_60$2 = { class: "ml-2 text-sm text-gray-500" };
|
|
94696
|
+
const _hoisted_61$2 = ["data-result-selected", "onClick"];
|
|
94697
|
+
const _hoisted_62$2 = {
|
|
95326
94698
|
key: 1,
|
|
95327
94699
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
95328
94700
|
};
|
|
95329
|
-
const
|
|
95330
|
-
const
|
|
95331
|
-
const
|
|
95332
|
-
const
|
|
95333
|
-
const
|
|
95334
|
-
const
|
|
94701
|
+
const _hoisted_63$2 = { class: "flex-1 min-w-0" };
|
|
94702
|
+
const _hoisted_64$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94703
|
+
const _hoisted_65$2 = ["innerHTML"];
|
|
94704
|
+
const _hoisted_66$2 = { class: "text-xs text-gray-500" };
|
|
94705
|
+
const _hoisted_67$2 = { class: "text-xs text-gray-400" };
|
|
94706
|
+
const _hoisted_68$2 = {
|
|
95335
94707
|
key: 0,
|
|
95336
94708
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95337
94709
|
};
|
|
95338
|
-
const
|
|
94710
|
+
const _hoisted_69$1 = {
|
|
95339
94711
|
key: 0,
|
|
95340
94712
|
class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
|
|
95341
94713
|
};
|
|
@@ -95365,13 +94737,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95365
94737
|
const fileTypeOptions = [
|
|
95366
94738
|
{ label: "Folder", value: "folder" },
|
|
95367
94739
|
{ label: "PDF", value: "pdf" },
|
|
94740
|
+
{ label: "Image", value: "image" },
|
|
94741
|
+
{ label: "Audio", value: "audio" },
|
|
94742
|
+
{ label: "Video", value: "video" },
|
|
95368
94743
|
{ label: "Document", value: "document" },
|
|
95369
94744
|
{ label: "Presentation", value: "presentation" },
|
|
95370
94745
|
{ label: "Spreadsheet", value: "spreadsheet" },
|
|
95371
|
-
{ label: "
|
|
95372
|
-
{ label: "Video", value: "video" },
|
|
95373
|
-
{ label: "Audio", value: "audio" },
|
|
95374
|
-
{ label: "AR", value: "ar" },
|
|
94746
|
+
{ label: "Font", value: "font" },
|
|
95375
94747
|
{ label: "Web", value: "web" }
|
|
95376
94748
|
];
|
|
95377
94749
|
const hasActiveFilters = computed(() => selectedFileTypes.value.length > 0 || selectedCanvasFilters.value.length > 0);
|
|
@@ -95380,19 +94752,12 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95380
94752
|
selectedCanvasFilters.value = [];
|
|
95381
94753
|
debouncedFilterSearch();
|
|
95382
94754
|
};
|
|
95383
|
-
const handleEverywhereClick =
|
|
94755
|
+
const handleEverywhereClick = () => {
|
|
95384
94756
|
selectedFileTypes.value = [];
|
|
95385
94757
|
selectedCanvasFilters.value = [];
|
|
95386
94758
|
searchType.value = null;
|
|
95387
94759
|
if (searchQuery.value.trim()) {
|
|
95388
|
-
|
|
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
|
-
}
|
|
94760
|
+
performSearch(searchQuery.value);
|
|
95396
94761
|
}
|
|
95397
94762
|
};
|
|
95398
94763
|
const recentSearches = ref([]);
|
|
@@ -95442,7 +94807,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95442
94807
|
{
|
|
95443
94808
|
thumbnailsOnly: true,
|
|
95444
94809
|
fileIds,
|
|
95445
|
-
instanceId: props.instanceId,
|
|
95446
94810
|
isAdminApp: props.isAdmin === true
|
|
95447
94811
|
}
|
|
95448
94812
|
);
|
|
@@ -95632,12 +94996,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95632
94996
|
isSearching.value = true;
|
|
95633
94997
|
hasSearchCompleted.value = false;
|
|
95634
94998
|
searchError.value = null;
|
|
95635
|
-
const shouldSkipSuggestionFetch = skipNextSuggestionFetch.value;
|
|
95636
|
-
if (shouldSkipSuggestionFetch) {
|
|
95637
|
-
skipNextSuggestionFetch.value = false;
|
|
95638
|
-
}
|
|
95639
94999
|
try {
|
|
95640
|
-
const ALLOWED_CANVAS_TYPES = ["saved_canvas", "template", "
|
|
95000
|
+
const ALLOWED_CANVAS_TYPES = ["saved_canvas", "template", "section", "block"];
|
|
95641
95001
|
const ALLOWED_FILE_TYPES = [
|
|
95642
95002
|
"folder",
|
|
95643
95003
|
"pdf",
|
|
@@ -95645,9 +95005,11 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95645
95005
|
"audio",
|
|
95646
95006
|
"video",
|
|
95647
95007
|
"document",
|
|
95008
|
+
"docx",
|
|
95009
|
+
"pptx",
|
|
95648
95010
|
"presentation",
|
|
95649
95011
|
"spreadsheet",
|
|
95650
|
-
"
|
|
95012
|
+
"font",
|
|
95651
95013
|
"web"
|
|
95652
95014
|
];
|
|
95653
95015
|
const validCanvasFilters = selectedCanvasFilters.value.filter((f) => ALLOWED_CANVAS_TYPES.includes(f));
|
|
@@ -95680,16 +95042,10 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95680
95042
|
canvas: canvasFilters,
|
|
95681
95043
|
content: contentFilters
|
|
95682
95044
|
});
|
|
95683
|
-
if (query.trim() !== searchQuery.value.trim()) {
|
|
95684
|
-
return;
|
|
95685
|
-
}
|
|
95686
95045
|
contentResults.value = results.content?.hits || [];
|
|
95687
95046
|
canvasResults.value = results.canvas?.hits || [];
|
|
95688
95047
|
selectedResultIndex.value = -1;
|
|
95689
95048
|
searchError.value = null;
|
|
95690
|
-
if (query.trim().length >= 2 && !shouldSkipSuggestionFetch) {
|
|
95691
|
-
fetchQuerySuggestions(query.trim());
|
|
95692
|
-
}
|
|
95693
95049
|
const totalResults = contentResults.value.length + canvasResults.value.length;
|
|
95694
95050
|
trackAlgoliaSearchPerformed(query.trim(), totalResults);
|
|
95695
95051
|
if (totalResults === 0) {
|
|
@@ -95726,18 +95082,11 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95726
95082
|
const debouncedFilterSearch = () => {
|
|
95727
95083
|
if (filterChangeTimer) clearTimeout(filterChangeTimer);
|
|
95728
95084
|
if (searchTimer) clearTimeout(searchTimer);
|
|
95729
|
-
filterChangeTimer = setTimeout(
|
|
95085
|
+
filterChangeTimer = setTimeout(() => {
|
|
95730
95086
|
if (searchQuery.value.trim() && !showRecentView.value) {
|
|
95731
|
-
|
|
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
|
-
}
|
|
95087
|
+
performSearch(searchQuery.value);
|
|
95739
95088
|
}
|
|
95740
|
-
},
|
|
95089
|
+
}, 300);
|
|
95741
95090
|
};
|
|
95742
95091
|
const handleSearchInput = (query) => {
|
|
95743
95092
|
const validatedQuery = validateSearchInput(query);
|
|
@@ -95745,14 +95094,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95745
95094
|
if (validatedQuery.trim()) {
|
|
95746
95095
|
showRecentView.value = false;
|
|
95747
95096
|
hasSearchCompleted.value = false;
|
|
95748
|
-
if (validatedQuery.trim().length
|
|
95097
|
+
if (validatedQuery.trim().length >= 2) {
|
|
95098
|
+
if (skipNextSuggestionFetch.value) {
|
|
95099
|
+
skipNextSuggestionFetch.value = false;
|
|
95100
|
+
} else {
|
|
95101
|
+
fetchQuerySuggestions(validatedQuery);
|
|
95102
|
+
}
|
|
95103
|
+
} else {
|
|
95749
95104
|
querySuggestions.value = [];
|
|
95750
95105
|
selectedSuggestionIndex.value = -1;
|
|
95751
95106
|
}
|
|
95752
95107
|
if (searchTimer) clearTimeout(searchTimer);
|
|
95753
95108
|
searchTimer = setTimeout(() => {
|
|
95754
95109
|
performSearch(validatedQuery);
|
|
95755
|
-
},
|
|
95110
|
+
}, 300);
|
|
95756
95111
|
if (saveSearchTimer) clearTimeout(saveSearchTimer);
|
|
95757
95112
|
saveSearchTimer = setTimeout(() => {
|
|
95758
95113
|
saveSearchTerm(validatedQuery);
|
|
@@ -95790,7 +95145,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95790
95145
|
return;
|
|
95791
95146
|
}
|
|
95792
95147
|
try {
|
|
95793
|
-
skipNextSuggestionFetch.value = true;
|
|
95794
95148
|
searchQuery.value = validatedSearchTerm;
|
|
95795
95149
|
showRecentView.value = false;
|
|
95796
95150
|
querySuggestions.value = [];
|
|
@@ -95798,8 +95152,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95798
95152
|
await performSearch(validatedSearchTerm);
|
|
95799
95153
|
} catch (error) {
|
|
95800
95154
|
console.error("[handleRecentSearchClick] Search failed:", error);
|
|
95801
|
-
} finally {
|
|
95802
|
-
skipNextSuggestionFetch.value = false;
|
|
95803
95155
|
}
|
|
95804
95156
|
};
|
|
95805
95157
|
const handleSuggestionClick = async (suggestion) => {
|
|
@@ -95869,8 +95221,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95869
95221
|
return t("canvasUI.CAlgoliaSearch.canvasFilters.saved");
|
|
95870
95222
|
case "template":
|
|
95871
95223
|
return t("canvasUI.CAlgoliaSearch.canvasFilters.templates");
|
|
95872
|
-
case "product_template":
|
|
95873
|
-
return t("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates");
|
|
95874
95224
|
case "section":
|
|
95875
95225
|
return t("canvasUI.CAlgoliaSearch.canvasFilters.products");
|
|
95876
95226
|
case "block":
|
|
@@ -95891,8 +95241,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95891
95241
|
}
|
|
95892
95242
|
const emIndex = highlightValue.indexOf("<em>");
|
|
95893
95243
|
if (emIndex === -1) return "";
|
|
95894
|
-
const startChar = Math.max(0, emIndex -
|
|
95895
|
-
const endChar = Math.min(highlightValue.length, emIndex +
|
|
95244
|
+
const startChar = Math.max(0, emIndex - 100);
|
|
95245
|
+
const endChar = Math.min(highlightValue.length, emIndex + 100);
|
|
95896
95246
|
let truncated = highlightValue.substring(startChar, endChar);
|
|
95897
95247
|
if (startChar > 0) truncated = "..." + truncated;
|
|
95898
95248
|
if (endChar < highlightValue.length) truncated = truncated + "...";
|
|
@@ -96020,7 +95370,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96020
95370
|
{
|
|
96021
95371
|
thumbnailsOnly: true,
|
|
96022
95372
|
fileIds: [item.id],
|
|
96023
|
-
instanceId: props.instanceId,
|
|
96024
95373
|
isAdminApp: props.isAdmin === true
|
|
96025
95374
|
}
|
|
96026
95375
|
);
|
|
@@ -96208,7 +95557,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96208
95557
|
show: showFileTypeDropdown.value,
|
|
96209
95558
|
"show-arrow": false,
|
|
96210
95559
|
trigger: "manual",
|
|
96211
|
-
onClickoutside: _cache[
|
|
95560
|
+
onClickoutside: _cache[8] || (_cache[8] = ($event) => showFileTypeDropdown.value = false)
|
|
96212
95561
|
}, {
|
|
96213
95562
|
trigger: withCtx(() => [
|
|
96214
95563
|
createVNode(unref(NTag), {
|
|
@@ -96221,12 +95570,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96221
95570
|
themeOverrides: {
|
|
96222
95571
|
borderRadius: "4px"
|
|
96223
95572
|
},
|
|
96224
|
-
onClick: _cache[
|
|
95573
|
+
onClick: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
|
|
96225
95574
|
}, {
|
|
96226
95575
|
default: withCtx(() => [
|
|
96227
95576
|
createElementVNode("div", _hoisted_10$C, [
|
|
96228
95577
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
|
|
96229
|
-
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
|
|
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)
|
|
96230
95587
|
])
|
|
96231
95588
|
]),
|
|
96232
95589
|
_: 1
|
|
@@ -96238,7 +95595,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96238
95595
|
(openBlock(), createElementBlock(Fragment, null, renderList(fileTypeOptions, (option) => {
|
|
96239
95596
|
return createElementVNode("div", {
|
|
96240
95597
|
key: option.value,
|
|
96241
|
-
class: "w-full h-
|
|
95598
|
+
class: "w-full h-8 flex items-center"
|
|
96242
95599
|
}, [
|
|
96243
95600
|
createVNode(unref(NCheckbox), {
|
|
96244
95601
|
checked: selectedFileTypes.value.includes(option.value),
|
|
@@ -96282,8 +95639,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96282
95639
|
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
|
|
96283
95640
|
])) : createCommentVNode("", true)
|
|
96284
95641
|
], 64)) : searchType.value === "canvases" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
96285
|
-
|
|
96286
|
-
key: 0,
|
|
95642
|
+
createVNode(unref(NTag), {
|
|
96287
95643
|
class: "select-none cursor-pointer",
|
|
96288
95644
|
style: normalizeStyle({
|
|
96289
95645
|
"--n-color": selectedCanvasFilters.value.includes("saved_canvas") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
@@ -96293,13 +95649,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96293
95649
|
themeOverrides: {
|
|
96294
95650
|
borderRadius: "4px"
|
|
96295
95651
|
},
|
|
96296
|
-
onClick: _cache[
|
|
95652
|
+
onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("saved_canvas"))
|
|
96297
95653
|
}, {
|
|
96298
95654
|
default: withCtx(() => [
|
|
96299
95655
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
|
|
96300
95656
|
]),
|
|
96301
95657
|
_: 1
|
|
96302
|
-
}, 8, ["style"])
|
|
95658
|
+
}, 8, ["style"]),
|
|
96303
95659
|
createVNode(unref(NTag), {
|
|
96304
95660
|
class: "select-none cursor-pointer",
|
|
96305
95661
|
style: normalizeStyle({
|
|
@@ -96310,31 +95666,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96310
95666
|
themeOverrides: {
|
|
96311
95667
|
borderRadius: "4px"
|
|
96312
95668
|
},
|
|
96313
|
-
onClick: _cache[
|
|
95669
|
+
onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("template"))
|
|
96314
95670
|
}, {
|
|
96315
95671
|
default: withCtx(() => [
|
|
96316
95672
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
|
|
96317
95673
|
]),
|
|
96318
95674
|
_: 1
|
|
96319
95675
|
}, 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),
|
|
96338
95676
|
createVNode(unref(NTag), {
|
|
96339
95677
|
class: "select-none cursor-pointer",
|
|
96340
95678
|
style: normalizeStyle({
|
|
@@ -96456,185 +95794,30 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96456
95794
|
], 64)) : createCommentVNode("", true)
|
|
96457
95795
|
])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_30$4, [
|
|
96458
95796
|
createElementVNode("div", _hoisted_31$4, [
|
|
96459
|
-
|
|
96460
|
-
|
|
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, [
|
|
95797
|
+
filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
|
|
95798
|
+
createElementVNode("div", _hoisted_33$4, [
|
|
96584
95799
|
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,
|
|
96608
95800
|
class: "mr-2",
|
|
96609
95801
|
color: "var(--p-text2)",
|
|
96610
95802
|
icon: "folder",
|
|
96611
95803
|
size: "16"
|
|
96612
|
-
})
|
|
96613
|
-
|
|
96614
|
-
|
|
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)
|
|
95804
|
+
}),
|
|
95805
|
+
createElementVNode("span", _hoisted_34$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
|
|
95806
|
+
createElementVNode("span", _hoisted_35$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
|
|
96621
95807
|
]),
|
|
96622
95808
|
createElementVNode("div", null, [
|
|
96623
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(
|
|
95809
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
|
|
96624
95810
|
return openBlock(), createElementBlock("div", {
|
|
96625
95811
|
key: item.id,
|
|
96626
95812
|
class: normalizeClass([
|
|
96627
95813
|
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96628
95814
|
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96629
|
-
isResultSelected(item) ? "bg-
|
|
95815
|
+
isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
|
|
96630
95816
|
]),
|
|
96631
95817
|
"data-result-selected": isResultSelected(item),
|
|
96632
|
-
onClick: ($event) => handleResultClick(
|
|
96633
|
-
item,
|
|
96634
|
-
searchType.value === "content" ? item.type === "folder" ? "folder" : "file" : "canvas"
|
|
96635
|
-
)
|
|
95818
|
+
onClick: ($event) => handleResultClick(item, item.type === "folder" ? "folder" : "file")
|
|
96636
95819
|
}, [
|
|
96637
|
-
|
|
95820
|
+
item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
96638
95821
|
key: 0,
|
|
96639
95822
|
class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
|
|
96640
95823
|
cover: "",
|
|
@@ -96642,48 +95825,187 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96642
95825
|
"object-fit": "cover",
|
|
96643
95826
|
src: item.picture_url || "",
|
|
96644
95827
|
width: "72"
|
|
96645
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div",
|
|
96646
|
-
|
|
96647
|
-
key: 0,
|
|
95828
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_37$4, [
|
|
95829
|
+
createVNode(CIcon, {
|
|
96648
95830
|
color: "var(--p-text2)",
|
|
96649
95831
|
icon: "folder",
|
|
96650
95832
|
size: "32"
|
|
96651
|
-
})
|
|
96652
|
-
key: 1,
|
|
96653
|
-
color: "var(--p-text2)",
|
|
96654
|
-
icon: "presentation",
|
|
96655
|
-
size: "32"
|
|
96656
|
-
}))
|
|
95833
|
+
})
|
|
96657
95834
|
])),
|
|
96658
|
-
createElementVNode("div",
|
|
96659
|
-
createElementVNode("h3",
|
|
96660
|
-
|
|
95835
|
+
createElementVNode("div", _hoisted_38$4, [
|
|
95836
|
+
createElementVNode("h3", _hoisted_39$4, toDisplayString(item.name), 1),
|
|
95837
|
+
item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
96661
95838
|
key: 0,
|
|
96662
95839
|
class: "text-xs text-gray-600 mb-1",
|
|
96663
95840
|
innerHTML: getSnippet(item)
|
|
96664
|
-
}, null, 8,
|
|
96665
|
-
createElementVNode("p",
|
|
95841
|
+
}, null, 8, _hoisted_40$4)) : createCommentVNode("", true),
|
|
95842
|
+
createElementVNode("p", _hoisted_41$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
|
|
96666
95843
|
]),
|
|
96667
|
-
createElementVNode("div",
|
|
96668
|
-
], 10,
|
|
95844
|
+
createElementVNode("div", _hoisted_42$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
95845
|
+
], 10, _hoisted_36$4);
|
|
96669
95846
|
}), 128))
|
|
96670
95847
|
]),
|
|
96671
|
-
|
|
95848
|
+
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_43$4, [
|
|
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, [
|
|
96672
95864
|
createVNode(CIcon, {
|
|
96673
|
-
class: "
|
|
96674
|
-
color:
|
|
96675
|
-
|
|
96676
|
-
|
|
96677
|
-
}
|
|
96678
|
-
createElementVNode("
|
|
96679
|
-
|
|
96680
|
-
|
|
95865
|
+
class: "mr-2",
|
|
95866
|
+
color: "var(--p-text2)",
|
|
95867
|
+
icon: "presentation",
|
|
95868
|
+
size: "16"
|
|
95869
|
+
}),
|
|
95870
|
+
createElementVNode("span", _hoisted_46$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
95871
|
+
createElementVNode("span", _hoisted_47$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
|
|
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
|
+
])
|
|
96681
95912
|
])) : createCommentVNode("", true)
|
|
96682
|
-
],
|
|
95913
|
+
])) : createCommentVNode("", true)
|
|
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)
|
|
96683
96005
|
])
|
|
96684
96006
|
]))
|
|
96685
96007
|
]),
|
|
96686
|
-
!showRecentView.value ? (openBlock(), createElementBlock("div",
|
|
96008
|
+
!showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_69$1, [
|
|
96687
96009
|
createVNode(CShortcut, null, {
|
|
96688
96010
|
default: withCtx(() => [
|
|
96689
96011
|
createVNode(CShortcutIcon, { icon: "arrow-up" }),
|
|
@@ -96725,7 +96047,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96725
96047
|
}
|
|
96726
96048
|
});
|
|
96727
96049
|
|
|
96728
|
-
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-
|
|
96050
|
+
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-338ca99c"]]);
|
|
96729
96051
|
|
|
96730
96052
|
const BulletListExtended = BulletList.extend({
|
|
96731
96053
|
addOptions() {
|
|
@@ -131590,21 +130912,24 @@ const displayIntegerWithMunit = (number, decimals = 2) => {
|
|
|
131590
130912
|
return `${b.toFixed(decimals)}B`;
|
|
131591
130913
|
};
|
|
131592
130914
|
const convertSecondsToMinutes = (number) => {
|
|
130915
|
+
if (number === 0) return "0 sec";
|
|
130916
|
+
if (number < 1) return "<1 sec";
|
|
131593
130917
|
const units = [
|
|
131594
|
-
[
|
|
131595
|
-
[60, "min"],
|
|
130918
|
+
[60 * 60 * 24, "day"],
|
|
131596
130919
|
[60 * 60, "h"],
|
|
131597
|
-
[60
|
|
130920
|
+
[60, "min"],
|
|
130921
|
+
[1, "sec"]
|
|
131598
130922
|
];
|
|
131599
|
-
|
|
131600
|
-
|
|
131601
|
-
|
|
131602
|
-
|
|
130923
|
+
const parts = [];
|
|
130924
|
+
let remaining = number;
|
|
130925
|
+
for (const [divisor, label] of units) {
|
|
130926
|
+
if (remaining >= divisor) {
|
|
130927
|
+
const val = Math.floor(remaining / divisor);
|
|
130928
|
+
parts.push(`${val} ${label}`);
|
|
130929
|
+
remaining = remaining % divisor;
|
|
131603
130930
|
}
|
|
131604
130931
|
}
|
|
131605
|
-
|
|
131606
|
-
const val = Math.floor(number / Number(divisor));
|
|
131607
|
-
return `${val} ${label}`;
|
|
130932
|
+
return parts.slice(0, 2).join(" ");
|
|
131608
130933
|
};
|
|
131609
130934
|
const getNumberWithRegex = (string) => {
|
|
131610
130935
|
return string?.replace(/\D+/g, "");
|
|
@@ -181622,33 +180947,6 @@ function useTheme() {
|
|
|
181622
180947
|
};
|
|
181623
180948
|
}
|
|
181624
180949
|
|
|
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
|
-
|
|
181652
180950
|
const initialCanvas = ref(void 0);
|
|
181653
180951
|
const useCanvasOverlay = () => {
|
|
181654
180952
|
const openCanvasOverlay = ({ id, fullscreen, edit_mode, component_id, section_id, position }) => {
|
|
@@ -183378,103 +182676,11 @@ const useCanvasById = (id) => {
|
|
|
183378
182676
|
});
|
|
183379
182677
|
};
|
|
183380
182678
|
|
|
183381
|
-
function
|
|
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) {
|
|
182679
|
+
function getEventColor(pEvent, sfEvent) {
|
|
183469
182680
|
if (!sfEvent.WhatCount && !sfEvent.WhoCount) return SfEventColors.TIME_OFF_TERRITORY;
|
|
183470
|
-
|
|
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;
|
|
182681
|
+
else if (pEvent?.status === EventStatusEnum.EXECUTED) return SfEventColors.SUBMITTED;
|
|
183477
182682
|
else if (isAfter$1(/* @__PURE__ */ new Date(), new Date(sfEvent.EndDateTime))) return SfEventColors.PAST;
|
|
182683
|
+
else if (!pEvent) return SfEventColors.PLANNED_NO_PITCHER_EVENT;
|
|
183478
182684
|
else return SfEventColors.PLANNED;
|
|
183479
182685
|
}
|
|
183480
182686
|
const minFutureDate = (date = /* @__PURE__ */ new Date()) => add(date, { minutes: MIN_DIFFERENCE_IN_MINUTES });
|
|
@@ -184002,5 +183208,5 @@ const localeNames = {
|
|
|
184002
183208
|
};
|
|
184003
183209
|
const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
|
|
184004
183210
|
|
|
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 };
|
|
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 };
|
|
184006
183212
|
//# sourceMappingURL=canvas-ui.js.map
|