@pitcher/canvas-ui 2026.1.12-133255-beta → 2026.1.12-71806
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/canvas-ui.js
CHANGED
|
@@ -88219,14 +88219,15 @@ async function crmQueryAdaptive(payload) {
|
|
|
88219
88219
|
} catch {
|
|
88220
88220
|
useSmartStore = false;
|
|
88221
88221
|
}
|
|
88222
|
-
console.log(`crmQueryAdaptive
|
|
88222
|
+
console.log(`[crmQueryAdaptive] Called query: `, query2);
|
|
88223
88223
|
if (useSmartStore) {
|
|
88224
88224
|
const fields = extractFieldsFromSoql(query2);
|
|
88225
88225
|
const objectName = extractObjectFromSoql(query2);
|
|
88226
88226
|
const smartQuery = convertSoqlToSmartQuery(query2);
|
|
88227
|
-
console.log(`
|
|
88227
|
+
console.log(`[crmSmartQuery] Called query: `, smartQuery);
|
|
88228
88228
|
const smartStoreResults = await crmSmartQuery({ query: smartQuery });
|
|
88229
88229
|
const records = transformSmartStoreResults(smartStoreResults, fields, objectName);
|
|
88230
|
+
console.log(`[SmartStore] Results: `, records);
|
|
88230
88231
|
return {
|
|
88231
88232
|
records,
|
|
88232
88233
|
totalSize: records.length
|
|
@@ -95684,120 +95685,118 @@ const _hoisted_9$O = {
|
|
|
95684
95685
|
class: "flex items-center space-x-1 ml-2"
|
|
95685
95686
|
};
|
|
95686
95687
|
const _hoisted_10$C = { class: "flex items-center" };
|
|
95687
|
-
const _hoisted_11$x = {
|
|
95688
|
-
const _hoisted_12$p = { class: "
|
|
95689
|
-
const _hoisted_13$k = {
|
|
95688
|
+
const _hoisted_11$x = { key: 0 };
|
|
95689
|
+
const _hoisted_12$p = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
|
|
95690
|
+
const _hoisted_13$k = { class: "pa-2 max-h-[300px] overflow-y-auto" };
|
|
95691
|
+
const _hoisted_14$h = {
|
|
95690
95692
|
key: 0,
|
|
95691
95693
|
class: "flex items-center ml-2"
|
|
95692
95694
|
};
|
|
95693
|
-
const
|
|
95694
|
-
|
|
95695
|
-
const _hoisted_16$e = { class: "pa-2 max-h-[300px] overflow-y-auto" };
|
|
95696
|
-
const _hoisted_17$c = {
|
|
95697
|
-
key: 0,
|
|
95695
|
+
const _hoisted_15$f = {
|
|
95696
|
+
key: 2,
|
|
95698
95697
|
class: "flex items-center ml-2"
|
|
95699
95698
|
};
|
|
95700
|
-
const
|
|
95701
|
-
const
|
|
95699
|
+
const _hoisted_16$e = { class: "flex flex-col w-full flex-1 min-h-0" };
|
|
95700
|
+
const _hoisted_17$c = {
|
|
95702
95701
|
key: 0,
|
|
95703
95702
|
class: "flex-1 overflow-y-auto bg-white w-full pl-1 pr-6 py-0"
|
|
95704
95703
|
};
|
|
95705
|
-
const
|
|
95706
|
-
const
|
|
95707
|
-
const
|
|
95708
|
-
const
|
|
95709
|
-
const
|
|
95710
|
-
const
|
|
95711
|
-
const
|
|
95704
|
+
const _hoisted_18$a = { class: "space-y-1 mt-4" };
|
|
95705
|
+
const _hoisted_19$a = ["onClick"];
|
|
95706
|
+
const _hoisted_20$9 = { class: "text-sm text-gray-700" };
|
|
95707
|
+
const _hoisted_21$7 = { class: "flex items-center mb-0" };
|
|
95708
|
+
const _hoisted_22$5 = { class: "text-sm font-bold text-gray-700" };
|
|
95709
|
+
const _hoisted_23$5 = ["onClick"];
|
|
95710
|
+
const _hoisted_24$5 = {
|
|
95712
95711
|
key: 0,
|
|
95713
95712
|
class: "relative mr-4"
|
|
95714
95713
|
};
|
|
95715
|
-
const
|
|
95714
|
+
const _hoisted_25$5 = {
|
|
95716
95715
|
key: 0,
|
|
95717
95716
|
class: "absolute inset-0 flex items-center justify-center bg-gray-200 bg-opacity-75 border-rounded-1"
|
|
95718
95717
|
};
|
|
95719
|
-
const
|
|
95718
|
+
const _hoisted_26$5 = {
|
|
95720
95719
|
key: 1,
|
|
95721
95720
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
95722
95721
|
};
|
|
95723
|
-
const
|
|
95724
|
-
const
|
|
95725
|
-
const
|
|
95726
|
-
const
|
|
95722
|
+
const _hoisted_27$5 = { class: "flex-1 min-w-0" };
|
|
95723
|
+
const _hoisted_28$5 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95724
|
+
const _hoisted_29$5 = { class: "text-xs text-gray-500" };
|
|
95725
|
+
const _hoisted_30$4 = {
|
|
95727
95726
|
key: 1,
|
|
95728
95727
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
95729
95728
|
};
|
|
95730
|
-
const
|
|
95731
|
-
const
|
|
95729
|
+
const _hoisted_31$4 = { class: "w-full px-0" };
|
|
95730
|
+
const _hoisted_32$4 = {
|
|
95732
95731
|
key: 0,
|
|
95733
95732
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95734
95733
|
};
|
|
95735
|
-
const
|
|
95734
|
+
const _hoisted_33$4 = {
|
|
95736
95735
|
key: 0,
|
|
95737
95736
|
class: "mb-0"
|
|
95738
95737
|
};
|
|
95739
|
-
const
|
|
95740
|
-
const
|
|
95741
|
-
const
|
|
95742
|
-
const
|
|
95743
|
-
const
|
|
95738
|
+
const _hoisted_34$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95739
|
+
const _hoisted_35$4 = { class: "text-m font-semibold text-gray-900" };
|
|
95740
|
+
const _hoisted_36$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
95741
|
+
const _hoisted_37$4 = ["data-result-selected", "onClick"];
|
|
95742
|
+
const _hoisted_38$4 = {
|
|
95744
95743
|
key: 1,
|
|
95745
95744
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
95746
95745
|
};
|
|
95747
|
-
const
|
|
95748
|
-
const
|
|
95749
|
-
const
|
|
95750
|
-
const
|
|
95751
|
-
const
|
|
95752
|
-
const
|
|
95746
|
+
const _hoisted_39$4 = { class: "flex-1 min-w-0" };
|
|
95747
|
+
const _hoisted_40$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95748
|
+
const _hoisted_41$4 = ["innerHTML"];
|
|
95749
|
+
const _hoisted_42$4 = { class: "text-xs text-gray-500" };
|
|
95750
|
+
const _hoisted_43$4 = { class: "text-xs text-gray-400" };
|
|
95751
|
+
const _hoisted_44$4 = {
|
|
95753
95752
|
key: 0,
|
|
95754
95753
|
class: "px-0 py-0"
|
|
95755
95754
|
};
|
|
95756
|
-
const
|
|
95757
|
-
const
|
|
95758
|
-
const
|
|
95759
|
-
const
|
|
95760
|
-
const
|
|
95761
|
-
const
|
|
95762
|
-
const
|
|
95763
|
-
const
|
|
95764
|
-
const
|
|
95765
|
-
const
|
|
95766
|
-
const
|
|
95755
|
+
const _hoisted_45$4 = { key: 1 };
|
|
95756
|
+
const _hoisted_46$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95757
|
+
const _hoisted_47$4 = { class: "text-m font-semibold text-gray-900" };
|
|
95758
|
+
const _hoisted_48$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
95759
|
+
const _hoisted_49$4 = ["data-result-selected", "onClick"];
|
|
95760
|
+
const _hoisted_50$4 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
|
|
95761
|
+
const _hoisted_51$3 = { class: "flex-1 min-w-0" };
|
|
95762
|
+
const _hoisted_52$3 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95763
|
+
const _hoisted_53$3 = { class: "text-xs text-gray-500" };
|
|
95764
|
+
const _hoisted_54$2 = { class: "text-xs text-gray-400" };
|
|
95765
|
+
const _hoisted_55$2 = {
|
|
95767
95766
|
key: 0,
|
|
95768
95767
|
class: "px-0 py-0"
|
|
95769
95768
|
};
|
|
95770
|
-
const
|
|
95769
|
+
const _hoisted_56$2 = {
|
|
95771
95770
|
key: 2,
|
|
95772
95771
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95773
95772
|
};
|
|
95774
|
-
const
|
|
95773
|
+
const _hoisted_57$2 = {
|
|
95775
95774
|
key: 2,
|
|
95776
95775
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
95777
95776
|
};
|
|
95778
|
-
const
|
|
95779
|
-
const
|
|
95777
|
+
const _hoisted_58$2 = { class: "w-full px-0" };
|
|
95778
|
+
const _hoisted_59$2 = {
|
|
95780
95779
|
key: 0,
|
|
95781
95780
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95782
95781
|
};
|
|
95783
|
-
const
|
|
95784
|
-
const
|
|
95785
|
-
const
|
|
95786
|
-
const
|
|
95787
|
-
const
|
|
95782
|
+
const _hoisted_60$2 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95783
|
+
const _hoisted_61$2 = { class: "text-m font-semibold text-gray-900" };
|
|
95784
|
+
const _hoisted_62$2 = { class: "ml-2 text-sm text-gray-500" };
|
|
95785
|
+
const _hoisted_63$2 = ["data-result-selected", "onClick"];
|
|
95786
|
+
const _hoisted_64$2 = {
|
|
95788
95787
|
key: 1,
|
|
95789
95788
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
95790
95789
|
};
|
|
95791
|
-
const
|
|
95792
|
-
const
|
|
95793
|
-
const
|
|
95794
|
-
const
|
|
95795
|
-
const
|
|
95796
|
-
const
|
|
95790
|
+
const _hoisted_65$2 = { class: "flex-1 min-w-0" };
|
|
95791
|
+
const _hoisted_66$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95792
|
+
const _hoisted_67$2 = ["innerHTML"];
|
|
95793
|
+
const _hoisted_68$2 = { class: "text-xs text-gray-500" };
|
|
95794
|
+
const _hoisted_69$1 = { class: "text-xs text-gray-400" };
|
|
95795
|
+
const _hoisted_70$1 = {
|
|
95797
95796
|
key: 0,
|
|
95798
95797
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95799
95798
|
};
|
|
95800
|
-
const
|
|
95799
|
+
const _hoisted_71$1 = {
|
|
95801
95800
|
key: 0,
|
|
95802
95801
|
class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
|
|
95803
95802
|
};
|
|
@@ -95821,10 +95820,9 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95821
95820
|
const showRecentView = ref(true);
|
|
95822
95821
|
const suggestionsDropdownRef = ref(null);
|
|
95823
95822
|
const searchInputRef = ref(null);
|
|
95824
|
-
const
|
|
95823
|
+
const selectedFileTypes = ref([]);
|
|
95825
95824
|
const showFileTypeDropdown = ref(false);
|
|
95826
|
-
const
|
|
95827
|
-
const showCanvasTypeDropdown = ref(false);
|
|
95825
|
+
const selectedCanvasFilters = ref([]);
|
|
95828
95826
|
const fileTypeOptions = [
|
|
95829
95827
|
{ label: "Folder", value: "folder" },
|
|
95830
95828
|
{ label: "PDF", value: "pdf" },
|
|
@@ -95837,38 +95835,15 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95837
95835
|
{ label: "AR", value: "ar" },
|
|
95838
95836
|
{ label: "Web", value: "web" }
|
|
95839
95837
|
];
|
|
95840
|
-
const
|
|
95841
|
-
const options = [
|
|
95842
|
-
{ label: t("canvasUI.CAlgoliaSearch.canvasFilters.templates"), value: "template" },
|
|
95843
|
-
{ label: t("canvasUI.CAlgoliaSearch.canvasFilters.products"), value: "section" },
|
|
95844
|
-
{ label: t("canvasUI.CAlgoliaSearch.canvasFilters.blocks"), value: "block" }
|
|
95845
|
-
];
|
|
95846
|
-
if (!props.isAdmin) {
|
|
95847
|
-
options.unshift({ label: t("canvasUI.CAlgoliaSearch.canvasFilters.saved"), value: "saved_canvas" });
|
|
95848
|
-
}
|
|
95849
|
-
if (props.isAdmin) {
|
|
95850
|
-
options.splice(1, 0, {
|
|
95851
|
-
label: t("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates"),
|
|
95852
|
-
value: "product_template"
|
|
95853
|
-
});
|
|
95854
|
-
}
|
|
95855
|
-
return options;
|
|
95856
|
-
});
|
|
95857
|
-
const visibleCanvasTypeOptions = computed(() => {
|
|
95858
|
-
if (showRecentView.value || !searchQuery.value.trim()) {
|
|
95859
|
-
return canvasTypeOptions.value;
|
|
95860
|
-
}
|
|
95861
|
-
return canvasTypeOptions.value.filter((option) => availableCanvasTypes.value.has(option.value));
|
|
95862
|
-
});
|
|
95863
|
-
const hasActiveFilters = computed(() => selectedFileType.value !== null || selectedCanvasFilter.value !== null);
|
|
95838
|
+
const hasActiveFilters = computed(() => selectedFileTypes.value.length > 0 || selectedCanvasFilters.value.length > 0);
|
|
95864
95839
|
const clearAllFilters = () => {
|
|
95865
|
-
|
|
95866
|
-
|
|
95840
|
+
selectedFileTypes.value = [];
|
|
95841
|
+
selectedCanvasFilters.value = [];
|
|
95867
95842
|
debouncedFilterSearch();
|
|
95868
95843
|
};
|
|
95869
95844
|
const handleEverywhereClick = async () => {
|
|
95870
|
-
|
|
95871
|
-
|
|
95845
|
+
selectedFileTypes.value = [];
|
|
95846
|
+
selectedCanvasFilters.value = [];
|
|
95872
95847
|
searchType.value = null;
|
|
95873
95848
|
if (searchQuery.value.trim()) {
|
|
95874
95849
|
try {
|
|
@@ -96024,44 +95999,6 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96024
95999
|
}
|
|
96025
96000
|
return canvasResults.value;
|
|
96026
96001
|
});
|
|
96027
|
-
const availableFileTypes = computed(() => {
|
|
96028
|
-
if (showRecentView.value || !searchQuery.value.trim()) {
|
|
96029
|
-
return /* @__PURE__ */ new Set();
|
|
96030
|
-
}
|
|
96031
|
-
const types = /* @__PURE__ */ new Set();
|
|
96032
|
-
contentResults.value.forEach((item) => {
|
|
96033
|
-
if (item.type === "folder") {
|
|
96034
|
-
types.add("folder");
|
|
96035
|
-
} else if (item.type === "file" && item.file_category) {
|
|
96036
|
-
types.add(item.file_category);
|
|
96037
|
-
}
|
|
96038
|
-
});
|
|
96039
|
-
return types;
|
|
96040
|
-
});
|
|
96041
|
-
const availableCanvasTypes = computed(() => {
|
|
96042
|
-
if (showRecentView.value || !searchQuery.value.trim()) {
|
|
96043
|
-
return /* @__PURE__ */ new Set();
|
|
96044
|
-
}
|
|
96045
|
-
const types = /* @__PURE__ */ new Set();
|
|
96046
|
-
canvasResults.value.forEach((item) => {
|
|
96047
|
-
if (item.content_type) {
|
|
96048
|
-
types.add(item.content_type);
|
|
96049
|
-
}
|
|
96050
|
-
});
|
|
96051
|
-
return types;
|
|
96052
|
-
});
|
|
96053
|
-
const visibleFileTypeOptions = computed(() => {
|
|
96054
|
-
if (showRecentView.value || !searchQuery.value.trim()) {
|
|
96055
|
-
return fileTypeOptions;
|
|
96056
|
-
}
|
|
96057
|
-
return fileTypeOptions.filter((option) => availableFileTypes.value.has(option.value));
|
|
96058
|
-
});
|
|
96059
|
-
const hasContentFilters = computed(() => {
|
|
96060
|
-
return visibleFileTypeOptions.value.length > 0;
|
|
96061
|
-
});
|
|
96062
|
-
const hasCanvasFilters = computed(() => {
|
|
96063
|
-
return availableCanvasTypes.value.size > 0;
|
|
96064
|
-
});
|
|
96065
96002
|
const shouldShowNoResults = computed(() => {
|
|
96066
96003
|
if (showRecentView.value || !searchQuery.value.trim() || isSearching.value || !hasSearchCompleted.value) return false;
|
|
96067
96004
|
if (searchType.value === "content") {
|
|
@@ -96174,18 +96111,32 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96174
96111
|
"ar",
|
|
96175
96112
|
"web"
|
|
96176
96113
|
];
|
|
96177
|
-
const
|
|
96178
|
-
if (
|
|
96179
|
-
console.warn(
|
|
96180
|
-
|
|
96181
|
-
|
|
96182
|
-
|
|
96183
|
-
|
|
96184
|
-
if (
|
|
96185
|
-
|
|
96186
|
-
|
|
96187
|
-
|
|
96188
|
-
|
|
96114
|
+
const validCanvasFilters = selectedCanvasFilters.value.filter((f) => ALLOWED_CANVAS_TYPES.includes(f));
|
|
96115
|
+
if (selectedCanvasFilters.value.length > 0 && validCanvasFilters.length === 0) {
|
|
96116
|
+
console.warn(
|
|
96117
|
+
"[CAlgoliaSearch] All selected canvas filters are invalid and were removed:",
|
|
96118
|
+
selectedCanvasFilters.value
|
|
96119
|
+
);
|
|
96120
|
+
selectedCanvasFilters.value = [];
|
|
96121
|
+
} else if (validCanvasFilters.length < selectedCanvasFilters.value.length) {
|
|
96122
|
+
const removedFilters = selectedCanvasFilters.value.filter((f) => !validCanvasFilters.includes(f));
|
|
96123
|
+
console.warn("[CAlgoliaSearch] Some canvas filters were invalid and removed:", removedFilters);
|
|
96124
|
+
selectedCanvasFilters.value = validCanvasFilters;
|
|
96125
|
+
}
|
|
96126
|
+
const canvasFilters = validCanvasFilters.length > 0 ? ` AND (${validCanvasFilters.map((filter) => `content_type:"${filter}"`).join(" OR ")})` : "";
|
|
96127
|
+
const validFileTypes = selectedFileTypes.value.filter((t2) => ALLOWED_FILE_TYPES.includes(t2));
|
|
96128
|
+
if (selectedFileTypes.value.length > 0 && validFileTypes.length === 0) {
|
|
96129
|
+
console.warn(
|
|
96130
|
+
"[CAlgoliaSearch] All selected file type filters are invalid and were removed:",
|
|
96131
|
+
selectedFileTypes.value
|
|
96132
|
+
);
|
|
96133
|
+
selectedFileTypes.value = [];
|
|
96134
|
+
} else if (validFileTypes.length < selectedFileTypes.value.length) {
|
|
96135
|
+
const removedFilters = selectedFileTypes.value.filter((t2) => !validFileTypes.includes(t2));
|
|
96136
|
+
console.warn("[CAlgoliaSearch] Some file type filters were invalid and removed:", removedFilters);
|
|
96137
|
+
selectedFileTypes.value = validFileTypes;
|
|
96138
|
+
}
|
|
96139
|
+
const contentFilters = validFileTypes.length > 0 ? ` AND (${validFileTypes.map((type) => type === "folder" ? `type:"${type}"` : `file_category:"${type}"`).join(" OR ")})` : "";
|
|
96189
96140
|
const results = await searchViaBackend(query.trim(), {
|
|
96190
96141
|
canvas: canvasFilters,
|
|
96191
96142
|
content: contentFilters
|
|
@@ -96408,23 +96359,33 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96408
96359
|
if (endChar < highlightValue.length) truncated = truncated + "...";
|
|
96409
96360
|
return sanitizeHtml(truncated);
|
|
96410
96361
|
};
|
|
96411
|
-
const
|
|
96412
|
-
|
|
96413
|
-
|
|
96362
|
+
const toggleCanvasFilter = (filterType) => {
|
|
96363
|
+
if (selectedCanvasFilters.value.includes(filterType)) {
|
|
96364
|
+
selectedCanvasFilters.value.splice(selectedCanvasFilters.value.indexOf(filterType), 1);
|
|
96365
|
+
} else {
|
|
96366
|
+
selectedCanvasFilters.value.push(filterType);
|
|
96367
|
+
}
|
|
96414
96368
|
debouncedFilterSearch();
|
|
96415
96369
|
};
|
|
96416
|
-
const
|
|
96417
|
-
|
|
96418
|
-
showCanvasTypeDropdown.value = false;
|
|
96370
|
+
const clearCanvasFilters = () => {
|
|
96371
|
+
selectedCanvasFilters.value = [];
|
|
96419
96372
|
debouncedFilterSearch();
|
|
96420
96373
|
};
|
|
96421
|
-
const
|
|
96422
|
-
|
|
96423
|
-
|
|
96374
|
+
const toggleFileType = (fileType, checked) => {
|
|
96375
|
+
if (checked) {
|
|
96376
|
+
if (!selectedFileTypes.value.includes(fileType)) {
|
|
96377
|
+
selectedFileTypes.value.push(fileType);
|
|
96378
|
+
}
|
|
96379
|
+
} else {
|
|
96380
|
+
const index = selectedFileTypes.value.indexOf(fileType);
|
|
96381
|
+
if (index > -1) {
|
|
96382
|
+
selectedFileTypes.value.splice(index, 1);
|
|
96383
|
+
}
|
|
96384
|
+
}
|
|
96424
96385
|
debouncedFilterSearch();
|
|
96425
96386
|
};
|
|
96426
|
-
const
|
|
96427
|
-
|
|
96387
|
+
const clearFileTypes = () => {
|
|
96388
|
+
selectedFileTypes.value = [];
|
|
96428
96389
|
showFileTypeDropdown.value = false;
|
|
96429
96390
|
debouncedFilterSearch();
|
|
96430
96391
|
};
|
|
@@ -96593,7 +96554,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96593
96554
|
show: "",
|
|
96594
96555
|
verticalAlignment: "top",
|
|
96595
96556
|
"z-index": _ctx.zIndex,
|
|
96596
|
-
"onUpdate:show": _cache[
|
|
96557
|
+
"onUpdate:show": _cache[15] || (_cache[15] = ($event) => emit("toggleSearch", $event))
|
|
96597
96558
|
}, {
|
|
96598
96559
|
default: withCtx(() => [
|
|
96599
96560
|
createElementVNode("div", {
|
|
@@ -96602,7 +96563,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96602
96563
|
}, [
|
|
96603
96564
|
createElementVNode("div", _hoisted_1$4w, [
|
|
96604
96565
|
createElementVNode("div", _hoisted_2$3j, [
|
|
96605
|
-
_cache[
|
|
96566
|
+
_cache[16] || (_cache[16] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
|
|
96606
96567
|
createElementVNode("i", { class: "c-icon far fa-search text-gray-400 text-l" })
|
|
96607
96568
|
], -1)),
|
|
96608
96569
|
withDirectives(createElementVNode("input", {
|
|
@@ -96699,7 +96660,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96699
96660
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.tabs.pitchDecks")), 1)
|
|
96700
96661
|
], 2)) : createCommentVNode("", true)
|
|
96701
96662
|
]),
|
|
96702
|
-
searchType.value
|
|
96663
|
+
searchType.value ? (openBlock(), createElementBlock("div", _hoisted_9$O, [
|
|
96703
96664
|
searchType.value === "content" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
96704
96665
|
createVNode(unref(NPopover), {
|
|
96705
96666
|
class: "c-select-filter",
|
|
@@ -96708,13 +96669,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96708
96669
|
show: showFileTypeDropdown.value,
|
|
96709
96670
|
"show-arrow": false,
|
|
96710
96671
|
trigger: "manual",
|
|
96711
|
-
onClickoutside: _cache[
|
|
96672
|
+
onClickoutside: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = false)
|
|
96712
96673
|
}, {
|
|
96713
96674
|
trigger: withCtx(() => [
|
|
96714
96675
|
createVNode(unref(NTag), {
|
|
96715
96676
|
class: "select-none cursor-pointer",
|
|
96716
96677
|
style: normalizeStyle({
|
|
96717
|
-
"--n-color":
|
|
96678
|
+
"--n-color": selectedFileTypes.value.length ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96718
96679
|
"--n-border": "1px solid var(--p-primary5)",
|
|
96719
96680
|
"--n-height": "28px"
|
|
96720
96681
|
}),
|
|
@@ -96725,42 +96686,34 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96725
96686
|
}, {
|
|
96726
96687
|
default: withCtx(() => [
|
|
96727
96688
|
createElementVNode("div", _hoisted_10$C, [
|
|
96728
|
-
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1)
|
|
96689
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
|
|
96690
|
+
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
|
|
96729
96691
|
])
|
|
96730
96692
|
]),
|
|
96731
96693
|
_: 1
|
|
96732
96694
|
}, 8, ["style"])
|
|
96733
96695
|
]),
|
|
96734
96696
|
default: withCtx(() => [
|
|
96735
|
-
createElementVNode("div",
|
|
96736
|
-
createElementVNode("div",
|
|
96737
|
-
|
|
96738
|
-
|
|
96739
|
-
|
|
96740
|
-
|
|
96741
|
-
|
|
96742
|
-
|
|
96743
|
-
|
|
96744
|
-
|
|
96745
|
-
|
|
96746
|
-
|
|
96747
|
-
|
|
96748
|
-
|
|
96749
|
-
|
|
96750
|
-
|
|
96751
|
-
|
|
96752
|
-
|
|
96753
|
-
|
|
96754
|
-
|
|
96755
|
-
createTextVNode(toDisplayString(option.label), 1)
|
|
96756
|
-
]),
|
|
96757
|
-
_: 2
|
|
96758
|
-
}, 1032, ["value"])
|
|
96759
|
-
]);
|
|
96760
|
-
}), 128))
|
|
96761
|
-
]),
|
|
96762
|
-
_: 1
|
|
96763
|
-
}, 8, ["value"])
|
|
96697
|
+
createElementVNode("div", _hoisted_12$p, [
|
|
96698
|
+
createElementVNode("div", _hoisted_13$k, [
|
|
96699
|
+
(openBlock(), createElementBlock(Fragment, null, renderList(fileTypeOptions, (option) => {
|
|
96700
|
+
return createElementVNode("div", {
|
|
96701
|
+
key: option.value,
|
|
96702
|
+
class: "w-full h-7 flex items-center"
|
|
96703
|
+
}, [
|
|
96704
|
+
createVNode(unref(NCheckbox), {
|
|
96705
|
+
checked: selectedFileTypes.value.includes(option.value),
|
|
96706
|
+
class: "px-2 truncate",
|
|
96707
|
+
"onUpdate:checked": (v) => toggleFileType(option.value, v),
|
|
96708
|
+
value: option.value
|
|
96709
|
+
}, {
|
|
96710
|
+
default: withCtx(() => [
|
|
96711
|
+
createTextVNode(toDisplayString(option.label), 1)
|
|
96712
|
+
]),
|
|
96713
|
+
_: 2
|
|
96714
|
+
}, 1032, ["checked", "onUpdate:checked", "value"])
|
|
96715
|
+
]);
|
|
96716
|
+
}), 64))
|
|
96764
96717
|
]),
|
|
96765
96718
|
createElementVNode("div", {
|
|
96766
96719
|
class: "pa-2",
|
|
@@ -96770,7 +96723,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96770
96723
|
block: "",
|
|
96771
96724
|
class: "pa-2",
|
|
96772
96725
|
text: "",
|
|
96773
|
-
onClick:
|
|
96726
|
+
onClick: clearFileTypes
|
|
96774
96727
|
}, {
|
|
96775
96728
|
default: withCtx(() => [
|
|
96776
96729
|
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
|
|
@@ -96782,109 +96735,115 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96782
96735
|
]),
|
|
96783
96736
|
_: 1
|
|
96784
96737
|
}, 8, ["show"]),
|
|
96785
|
-
hasActiveFilters.value ? (openBlock(), createElementBlock("div",
|
|
96786
|
-
_cache[
|
|
96738
|
+
hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_14$h, [
|
|
96739
|
+
_cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
|
|
96787
96740
|
createElementVNode("span", {
|
|
96788
96741
|
class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
|
|
96789
96742
|
onClick: clearAllFilters
|
|
96790
96743
|
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
|
|
96791
96744
|
])) : createCommentVNode("", true)
|
|
96792
96745
|
], 64)) : searchType.value === "canvases" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
96793
|
-
|
|
96794
|
-
|
|
96795
|
-
|
|
96796
|
-
|
|
96797
|
-
|
|
96798
|
-
|
|
96799
|
-
|
|
96800
|
-
|
|
96746
|
+
!_ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
|
|
96747
|
+
key: 0,
|
|
96748
|
+
class: "select-none cursor-pointer",
|
|
96749
|
+
style: normalizeStyle({
|
|
96750
|
+
"--n-color": selectedCanvasFilters.value.includes("saved_canvas") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96751
|
+
"--n-border": "1px solid var(--p-primary5)",
|
|
96752
|
+
"--n-height": "28px"
|
|
96753
|
+
}),
|
|
96754
|
+
themeOverrides: {
|
|
96755
|
+
borderRadius: "4px"
|
|
96756
|
+
},
|
|
96757
|
+
onClick: _cache[8] || (_cache[8] = ($event) => toggleCanvasFilter("saved_canvas"))
|
|
96801
96758
|
}, {
|
|
96802
|
-
|
|
96803
|
-
|
|
96804
|
-
class: "select-none cursor-pointer",
|
|
96805
|
-
style: normalizeStyle({
|
|
96806
|
-
"--n-color": selectedCanvasFilter.value ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96807
|
-
"--n-border": "1px solid var(--p-primary5)",
|
|
96808
|
-
"--n-height": "28px"
|
|
96809
|
-
}),
|
|
96810
|
-
themeOverrides: {
|
|
96811
|
-
borderRadius: "4px"
|
|
96812
|
-
},
|
|
96813
|
-
onClick: _cache[9] || (_cache[9] = ($event) => showCanvasTypeDropdown.value = !showCanvasTypeDropdown.value)
|
|
96814
|
-
}, {
|
|
96815
|
-
default: withCtx(() => [
|
|
96816
|
-
createElementVNode("div", _hoisted_14$h, [
|
|
96817
|
-
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1)
|
|
96818
|
-
])
|
|
96819
|
-
]),
|
|
96820
|
-
_: 1
|
|
96821
|
-
}, 8, ["style"])
|
|
96759
|
+
default: withCtx(() => [
|
|
96760
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
|
|
96822
96761
|
]),
|
|
96762
|
+
_: 1
|
|
96763
|
+
}, 8, ["style"])) : createCommentVNode("", true),
|
|
96764
|
+
createVNode(unref(NTag), {
|
|
96765
|
+
class: "select-none cursor-pointer",
|
|
96766
|
+
style: normalizeStyle({
|
|
96767
|
+
"--n-color": selectedCanvasFilters.value.includes("template") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96768
|
+
"--n-border": "1px solid var(--p-primary5)",
|
|
96769
|
+
"--n-height": "28px"
|
|
96770
|
+
}),
|
|
96771
|
+
themeOverrides: {
|
|
96772
|
+
borderRadius: "4px"
|
|
96773
|
+
},
|
|
96774
|
+
onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("template"))
|
|
96775
|
+
}, {
|
|
96823
96776
|
default: withCtx(() => [
|
|
96824
|
-
createElementVNode("
|
|
96825
|
-
createElementVNode("div", _hoisted_16$e, [
|
|
96826
|
-
createVNode(unref(NRadioGroup), {
|
|
96827
|
-
value: selectedCanvasFilter.value,
|
|
96828
|
-
"onUpdate:value": [
|
|
96829
|
-
_cache[10] || (_cache[10] = ($event) => selectedCanvasFilter.value = $event),
|
|
96830
|
-
handleCanvasTypeChange
|
|
96831
|
-
]
|
|
96832
|
-
}, {
|
|
96833
|
-
default: withCtx(() => [
|
|
96834
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(visibleCanvasTypeOptions.value, (option) => {
|
|
96835
|
-
return openBlock(), createElementBlock("div", {
|
|
96836
|
-
key: option.value,
|
|
96837
|
-
class: "w-full h-7 flex items-center"
|
|
96838
|
-
}, [
|
|
96839
|
-
createVNode(unref(NRadio), {
|
|
96840
|
-
class: "px-2 truncate",
|
|
96841
|
-
value: option.value
|
|
96842
|
-
}, {
|
|
96843
|
-
default: withCtx(() => [
|
|
96844
|
-
createTextVNode(toDisplayString(option.label), 1)
|
|
96845
|
-
]),
|
|
96846
|
-
_: 2
|
|
96847
|
-
}, 1032, ["value"])
|
|
96848
|
-
]);
|
|
96849
|
-
}), 128))
|
|
96850
|
-
]),
|
|
96851
|
-
_: 1
|
|
96852
|
-
}, 8, ["value"])
|
|
96853
|
-
]),
|
|
96854
|
-
createElementVNode("div", {
|
|
96855
|
-
class: "pa-2",
|
|
96856
|
-
style: normalizeStyle({ borderTop: `1px solid ${unref(themeVars).primary5}` })
|
|
96857
|
-
}, [
|
|
96858
|
-
createVNode(CButton, {
|
|
96859
|
-
block: "",
|
|
96860
|
-
class: "pa-2",
|
|
96861
|
-
text: "",
|
|
96862
|
-
onClick: clearCanvasFilter
|
|
96863
|
-
}, {
|
|
96864
|
-
default: withCtx(() => [
|
|
96865
|
-
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
|
|
96866
|
-
]),
|
|
96867
|
-
_: 1
|
|
96868
|
-
})
|
|
96869
|
-
], 4)
|
|
96870
|
-
])
|
|
96777
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
|
|
96871
96778
|
]),
|
|
96872
96779
|
_: 1
|
|
96873
|
-
}, 8, ["
|
|
96874
|
-
|
|
96875
|
-
|
|
96780
|
+
}, 8, ["style"]),
|
|
96781
|
+
_ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
|
|
96782
|
+
key: 1,
|
|
96783
|
+
class: "select-none cursor-pointer",
|
|
96784
|
+
style: normalizeStyle({
|
|
96785
|
+
"--n-color": selectedCanvasFilters.value.includes("product_template") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96786
|
+
"--n-border": "1px solid var(--p-primary5)",
|
|
96787
|
+
"--n-height": "28px"
|
|
96788
|
+
}),
|
|
96789
|
+
themeOverrides: {
|
|
96790
|
+
borderRadius: "4px"
|
|
96791
|
+
},
|
|
96792
|
+
onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("product_template"))
|
|
96793
|
+
}, {
|
|
96794
|
+
default: withCtx(() => [
|
|
96795
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates")), 1)
|
|
96796
|
+
]),
|
|
96797
|
+
_: 1
|
|
96798
|
+
}, 8, ["style"])) : createCommentVNode("", true),
|
|
96799
|
+
createVNode(unref(NTag), {
|
|
96800
|
+
class: "select-none cursor-pointer",
|
|
96801
|
+
style: normalizeStyle({
|
|
96802
|
+
"--n-color": selectedCanvasFilters.value.includes("section") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96803
|
+
"--n-border": "1px solid var(--p-primary5)",
|
|
96804
|
+
"--n-height": "28px"
|
|
96805
|
+
}),
|
|
96806
|
+
themeOverrides: {
|
|
96807
|
+
borderRadius: "4px"
|
|
96808
|
+
},
|
|
96809
|
+
onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("section"))
|
|
96810
|
+
}, {
|
|
96811
|
+
default: withCtx(() => [
|
|
96812
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 1)
|
|
96813
|
+
]),
|
|
96814
|
+
_: 1
|
|
96815
|
+
}, 8, ["style"]),
|
|
96816
|
+
createVNode(unref(NTag), {
|
|
96817
|
+
class: "select-none cursor-pointer",
|
|
96818
|
+
style: normalizeStyle({
|
|
96819
|
+
"--n-color": selectedCanvasFilters.value.includes("block") ? "var(--p-primary5)" : "var(--p-primary6)",
|
|
96820
|
+
"--n-border": "1px solid var(--p-primary5)",
|
|
96821
|
+
"--n-height": "28px"
|
|
96822
|
+
}),
|
|
96823
|
+
themeOverrides: {
|
|
96824
|
+
borderRadius: "4px"
|
|
96825
|
+
},
|
|
96826
|
+
onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("block"))
|
|
96827
|
+
}, {
|
|
96828
|
+
default: withCtx(() => [
|
|
96829
|
+
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 1)
|
|
96830
|
+
]),
|
|
96831
|
+
_: 1
|
|
96832
|
+
}, 8, ["style"]),
|
|
96833
|
+
selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15$f, [
|
|
96834
|
+
_cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
|
|
96876
96835
|
createElementVNode("span", {
|
|
96877
96836
|
class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
|
|
96878
|
-
onClick:
|
|
96837
|
+
onClick: clearCanvasFilters
|
|
96879
96838
|
}, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
|
|
96880
96839
|
])) : createCommentVNode("", true)
|
|
96881
96840
|
], 64)) : createCommentVNode("", true)
|
|
96882
96841
|
])) : createCommentVNode("", true)
|
|
96883
96842
|
])) : createCommentVNode("", true)
|
|
96884
96843
|
]),
|
|
96885
|
-
createElementVNode("div",
|
|
96886
|
-
showRecentView.value ? (openBlock(), createElementBlock("div",
|
|
96887
|
-
createElementVNode("div",
|
|
96844
|
+
createElementVNode("div", _hoisted_16$e, [
|
|
96845
|
+
showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_17$c, [
|
|
96846
|
+
createElementVNode("div", _hoisted_18$a, [
|
|
96888
96847
|
(openBlock(true), createElementBlock(Fragment, null, renderList(recentSearches.value, (search) => {
|
|
96889
96848
|
return openBlock(), createElementBlock("div", {
|
|
96890
96849
|
key: search,
|
|
@@ -96897,14 +96856,14 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96897
96856
|
icon: "clock-rotate-left",
|
|
96898
96857
|
size: "16"
|
|
96899
96858
|
}),
|
|
96900
|
-
createElementVNode("span",
|
|
96901
|
-
], 8,
|
|
96859
|
+
createElementVNode("span", _hoisted_20$9, toDisplayString(search), 1)
|
|
96860
|
+
], 8, _hoisted_19$a);
|
|
96902
96861
|
}), 128))
|
|
96903
96862
|
]),
|
|
96904
96863
|
recentlyOpenedDocs.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
96905
|
-
_cache[
|
|
96906
|
-
createElementVNode("div",
|
|
96907
|
-
createElementVNode("span",
|
|
96864
|
+
_cache[19] || (_cache[19] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
|
|
96865
|
+
createElementVNode("div", _hoisted_21$7, [
|
|
96866
|
+
createElementVNode("span", _hoisted_22$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
|
|
96908
96867
|
]),
|
|
96909
96868
|
createElementVNode("div", {
|
|
96910
96869
|
class: normalizeClass(_ctx.isAdmin ? "space-y-2" : "space-y-0")
|
|
@@ -96918,7 +96877,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96918
96877
|
]),
|
|
96919
96878
|
onClick: ($event) => handleRecentDocClick(doc, doc.type)
|
|
96920
96879
|
}, [
|
|
96921
|
-
doc.type === "file" ? (openBlock(), createElementBlock("div",
|
|
96880
|
+
doc.type === "file" ? (openBlock(), createElementBlock("div", _hoisted_24$5, [
|
|
96922
96881
|
createVNode(_sfc_main$6K, {
|
|
96923
96882
|
class: "h-14 border-rounded-1 overflow-hidden flex-0",
|
|
96924
96883
|
cover: "",
|
|
@@ -96927,7 +96886,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96927
96886
|
src: recentThumbnails.value[doc.id] || "",
|
|
96928
96887
|
width: "72"
|
|
96929
96888
|
}, null, 8, ["file-data", "src"]),
|
|
96930
|
-
isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div",
|
|
96889
|
+
isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div", _hoisted_25$5, [
|
|
96931
96890
|
createVNode(CIcon, {
|
|
96932
96891
|
class: "animate-spin",
|
|
96933
96892
|
color: "var(--p-primary)",
|
|
@@ -96935,7 +96894,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96935
96894
|
size: "20"
|
|
96936
96895
|
})
|
|
96937
96896
|
])) : createCommentVNode("", true)
|
|
96938
|
-
])) : (openBlock(), createElementBlock("div",
|
|
96897
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_26$5, [
|
|
96939
96898
|
doc.type === "canvas" ? (openBlock(), createBlock(CIcon, {
|
|
96940
96899
|
key: 0,
|
|
96941
96900
|
color: "var(--p-text2)",
|
|
@@ -96948,33 +96907,33 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96948
96907
|
size: "32"
|
|
96949
96908
|
}))
|
|
96950
96909
|
])),
|
|
96951
|
-
createElementVNode("div",
|
|
96952
|
-
createElementVNode("h3",
|
|
96953
|
-
createElementVNode("p",
|
|
96910
|
+
createElementVNode("div", _hoisted_27$5, [
|
|
96911
|
+
createElementVNode("h3", _hoisted_28$5, toDisplayString(doc.name), 1),
|
|
96912
|
+
createElementVNode("p", _hoisted_29$5, toDisplayString(doc.type === "canvas" ? formatCanvasType(doc.content_type) : doc.type === "folder" ? "Folder" : doc.file_category || "File"), 1)
|
|
96954
96913
|
])
|
|
96955
|
-
], 10,
|
|
96914
|
+
], 10, _hoisted_23$5);
|
|
96956
96915
|
}), 128))
|
|
96957
96916
|
], 2)
|
|
96958
96917
|
], 64)) : createCommentVNode("", true)
|
|
96959
|
-
])) : !searchType.value ? (openBlock(), createElementBlock("div",
|
|
96960
|
-
createElementVNode("div",
|
|
96961
|
-
isSearching.value ? (openBlock(), createElementBlock("div",
|
|
96918
|
+
])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_30$4, [
|
|
96919
|
+
createElementVNode("div", _hoisted_31$4, [
|
|
96920
|
+
isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
|
|
96962
96921
|
createVNode(CIcon, {
|
|
96963
96922
|
class: "animate-spin text-6xl",
|
|
96964
96923
|
color: "var(--p-primary)",
|
|
96965
96924
|
icon: "spinner"
|
|
96966
96925
|
})
|
|
96967
96926
|
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
96968
|
-
filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
96969
|
-
createElementVNode("div",
|
|
96927
|
+
filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_33$4, [
|
|
96928
|
+
createElementVNode("div", _hoisted_34$4, [
|
|
96970
96929
|
createVNode(CIcon, {
|
|
96971
96930
|
class: "mr-2",
|
|
96972
96931
|
color: "var(--p-text2)",
|
|
96973
96932
|
icon: "folder",
|
|
96974
96933
|
size: "16"
|
|
96975
96934
|
}),
|
|
96976
|
-
createElementVNode("span",
|
|
96977
|
-
createElementVNode("span",
|
|
96935
|
+
createElementVNode("span", _hoisted_35$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
|
|
96936
|
+
createElementVNode("span", _hoisted_36$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
|
|
96978
96937
|
]),
|
|
96979
96938
|
createElementVNode("div", null, [
|
|
96980
96939
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
|
|
@@ -96996,30 +96955,30 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96996
96955
|
"object-fit": "cover",
|
|
96997
96956
|
src: item.picture_url || "",
|
|
96998
96957
|
width: "72"
|
|
96999
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div",
|
|
96958
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_38$4, [
|
|
97000
96959
|
createVNode(CIcon, {
|
|
97001
96960
|
color: "var(--p-text2)",
|
|
97002
96961
|
icon: "folder",
|
|
97003
96962
|
size: "32"
|
|
97004
96963
|
})
|
|
97005
96964
|
])),
|
|
97006
|
-
createElementVNode("div",
|
|
97007
|
-
createElementVNode("h3",
|
|
96965
|
+
createElementVNode("div", _hoisted_39$4, [
|
|
96966
|
+
createElementVNode("h3", _hoisted_40$4, toDisplayString(item.name), 1),
|
|
97008
96967
|
item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
97009
96968
|
key: 0,
|
|
97010
96969
|
class: "text-xs text-gray-600 mb-1",
|
|
97011
96970
|
innerHTML: getSnippet(item)
|
|
97012
|
-
}, null, 8,
|
|
97013
|
-
createElementVNode("p",
|
|
96971
|
+
}, null, 8, _hoisted_41$4)) : createCommentVNode("", true),
|
|
96972
|
+
createElementVNode("p", _hoisted_42$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
|
|
97014
96973
|
]),
|
|
97015
|
-
createElementVNode("div",
|
|
97016
|
-
], 10,
|
|
96974
|
+
createElementVNode("div", _hoisted_43$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
96975
|
+
], 10, _hoisted_37$4);
|
|
97017
96976
|
}), 128))
|
|
97018
96977
|
]),
|
|
97019
|
-
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div",
|
|
96978
|
+
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
|
|
97020
96979
|
createElementVNode("span", {
|
|
97021
96980
|
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
97022
|
-
onClick: _cache[
|
|
96981
|
+
onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
|
|
97023
96982
|
}, [
|
|
97024
96983
|
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
97025
96984
|
createVNode(CIcon, {
|
|
@@ -97030,16 +96989,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97030
96989
|
])
|
|
97031
96990
|
])) : createCommentVNode("", true)
|
|
97032
96991
|
])) : createCommentVNode("", true),
|
|
97033
|
-
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div",
|
|
97034
|
-
createElementVNode("div",
|
|
96992
|
+
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_45$4, [
|
|
96993
|
+
createElementVNode("div", _hoisted_46$4, [
|
|
97035
96994
|
createVNode(CIcon, {
|
|
97036
96995
|
class: "mr-2",
|
|
97037
96996
|
color: "var(--p-text2)",
|
|
97038
96997
|
icon: "presentation",
|
|
97039
96998
|
size: "16"
|
|
97040
96999
|
}),
|
|
97041
|
-
createElementVNode("span",
|
|
97042
|
-
createElementVNode("span",
|
|
97000
|
+
createElementVNode("span", _hoisted_47$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
97001
|
+
createElementVNode("span", _hoisted_48$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
|
|
97043
97002
|
]),
|
|
97044
97003
|
createElementVNode("div", null, [
|
|
97045
97004
|
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
|
|
@@ -97053,25 +97012,25 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97053
97012
|
"data-result-selected": isResultSelected(item),
|
|
97054
97013
|
onClick: ($event) => handleResultClick(item, "canvas")
|
|
97055
97014
|
}, [
|
|
97056
|
-
createElementVNode("div",
|
|
97015
|
+
createElementVNode("div", _hoisted_50$4, [
|
|
97057
97016
|
createVNode(CIcon, {
|
|
97058
97017
|
color: "var(--p-text2)",
|
|
97059
97018
|
icon: "presentation",
|
|
97060
97019
|
size: "32"
|
|
97061
97020
|
})
|
|
97062
97021
|
]),
|
|
97063
|
-
createElementVNode("div",
|
|
97064
|
-
createElementVNode("h3",
|
|
97065
|
-
createElementVNode("p",
|
|
97022
|
+
createElementVNode("div", _hoisted_51$3, [
|
|
97023
|
+
createElementVNode("h3", _hoisted_52$3, toDisplayString(item.name), 1),
|
|
97024
|
+
createElementVNode("p", _hoisted_53$3, toDisplayString(formatCanvasType(item.content_type)), 1)
|
|
97066
97025
|
]),
|
|
97067
|
-
createElementVNode("div",
|
|
97068
|
-
], 10,
|
|
97026
|
+
createElementVNode("div", _hoisted_54$2, toDisplayString(item.folder?.name || ""), 1)
|
|
97027
|
+
], 10, _hoisted_49$4);
|
|
97069
97028
|
}), 128))
|
|
97070
97029
|
]),
|
|
97071
|
-
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div",
|
|
97030
|
+
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
|
|
97072
97031
|
createElementVNode("span", {
|
|
97073
97032
|
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
97074
|
-
onClick: _cache[
|
|
97033
|
+
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
|
|
97075
97034
|
}, [
|
|
97076
97035
|
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
97077
97036
|
createVNode(CIcon, {
|
|
@@ -97082,7 +97041,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97082
97041
|
])
|
|
97083
97042
|
])) : createCommentVNode("", true)
|
|
97084
97043
|
])) : createCommentVNode("", true),
|
|
97085
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div",
|
|
97044
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_56$2, [
|
|
97086
97045
|
createVNode(CIcon, {
|
|
97087
97046
|
class: "text-6xl",
|
|
97088
97047
|
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
@@ -97095,16 +97054,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97095
97054
|
])) : createCommentVNode("", true)
|
|
97096
97055
|
], 64))
|
|
97097
97056
|
])
|
|
97098
|
-
])) : (openBlock(), createElementBlock("div",
|
|
97099
|
-
createElementVNode("div",
|
|
97100
|
-
isSearching.value ? (openBlock(), createElementBlock("div",
|
|
97057
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_57$2, [
|
|
97058
|
+
createElementVNode("div", _hoisted_58$2, [
|
|
97059
|
+
isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_59$2, [
|
|
97101
97060
|
createVNode(CIcon, {
|
|
97102
97061
|
class: "animate-spin text-6xl",
|
|
97103
97062
|
color: "var(--p-primary)",
|
|
97104
97063
|
icon: "spinner"
|
|
97105
97064
|
})
|
|
97106
97065
|
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
97107
|
-
createElementVNode("div",
|
|
97066
|
+
createElementVNode("div", _hoisted_60$2, [
|
|
97108
97067
|
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
97109
97068
|
key: 0,
|
|
97110
97069
|
class: "mr-2",
|
|
@@ -97118,8 +97077,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97118
97077
|
icon: "presentation",
|
|
97119
97078
|
size: "16"
|
|
97120
97079
|
})),
|
|
97121
|
-
createElementVNode("span",
|
|
97122
|
-
createElementVNode("span",
|
|
97080
|
+
createElementVNode("span", _hoisted_61$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
97081
|
+
createElementVNode("span", _hoisted_62$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
|
|
97123
97082
|
]),
|
|
97124
97083
|
createElementVNode("div", null, [
|
|
97125
97084
|
(openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
|
|
@@ -97144,7 +97103,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97144
97103
|
"object-fit": "cover",
|
|
97145
97104
|
src: item.picture_url || "",
|
|
97146
97105
|
width: "72"
|
|
97147
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div",
|
|
97106
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_64$2, [
|
|
97148
97107
|
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
97149
97108
|
key: 0,
|
|
97150
97109
|
color: "var(--p-text2)",
|
|
@@ -97157,20 +97116,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97157
97116
|
size: "32"
|
|
97158
97117
|
}))
|
|
97159
97118
|
])),
|
|
97160
|
-
createElementVNode("div",
|
|
97161
|
-
createElementVNode("h3",
|
|
97119
|
+
createElementVNode("div", _hoisted_65$2, [
|
|
97120
|
+
createElementVNode("h3", _hoisted_66$2, toDisplayString(item.name), 1),
|
|
97162
97121
|
searchType.value === "content" && item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
97163
97122
|
key: 0,
|
|
97164
97123
|
class: "text-xs text-gray-600 mb-1",
|
|
97165
97124
|
innerHTML: getSnippet(item)
|
|
97166
|
-
}, null, 8,
|
|
97167
|
-
createElementVNode("p",
|
|
97125
|
+
}, null, 8, _hoisted_67$2)) : createCommentVNode("", true),
|
|
97126
|
+
createElementVNode("p", _hoisted_68$2, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File" : formatCanvasType(item.content_type)), 1)
|
|
97168
97127
|
]),
|
|
97169
|
-
createElementVNode("div",
|
|
97170
|
-
], 10,
|
|
97128
|
+
createElementVNode("div", _hoisted_69$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
97129
|
+
], 10, _hoisted_63$2);
|
|
97171
97130
|
}), 128))
|
|
97172
97131
|
]),
|
|
97173
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div",
|
|
97132
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_70$1, [
|
|
97174
97133
|
createVNode(CIcon, {
|
|
97175
97134
|
class: "text-6xl",
|
|
97176
97135
|
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
@@ -97185,7 +97144,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97185
97144
|
])
|
|
97186
97145
|
]))
|
|
97187
97146
|
]),
|
|
97188
|
-
!showRecentView.value ? (openBlock(), createElementBlock("div",
|
|
97147
|
+
!showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_71$1, [
|
|
97189
97148
|
createVNode(CShortcut, null, {
|
|
97190
97149
|
default: withCtx(() => [
|
|
97191
97150
|
createVNode(CShortcutIcon, { icon: "arrow-up" }),
|
|
@@ -97227,7 +97186,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
97227
97186
|
}
|
|
97228
97187
|
});
|
|
97229
97188
|
|
|
97230
|
-
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-
|
|
97189
|
+
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-da2357d4"]]);
|
|
97231
97190
|
|
|
97232
97191
|
const BulletListExtended = BulletList.extend({
|
|
97233
97192
|
addOptions() {
|
|
@@ -99294,6 +99253,25 @@ const INITIAL_CALL_STATE = {
|
|
|
99294
99253
|
};
|
|
99295
99254
|
|
|
99296
99255
|
const realTimeExtraCrmShape = ref({});
|
|
99256
|
+
function buildSchemaFromData(data) {
|
|
99257
|
+
if (data === null || data === void 0) {
|
|
99258
|
+
return null;
|
|
99259
|
+
}
|
|
99260
|
+
if (Array.isArray(data)) {
|
|
99261
|
+
if (data.length === 0) {
|
|
99262
|
+
return [];
|
|
99263
|
+
}
|
|
99264
|
+
return [buildSchemaFromData(data[0])];
|
|
99265
|
+
}
|
|
99266
|
+
if (typeof data === "object") {
|
|
99267
|
+
const schema = {};
|
|
99268
|
+
for (const [key, value] of Object.entries(data)) {
|
|
99269
|
+
schema[key] = buildSchemaFromData(value);
|
|
99270
|
+
}
|
|
99271
|
+
return schema;
|
|
99272
|
+
}
|
|
99273
|
+
return null;
|
|
99274
|
+
}
|
|
99297
99275
|
function isEmptyValue(value) {
|
|
99298
99276
|
return !value || typeof value === "string" && value.trim() === "";
|
|
99299
99277
|
}
|
|
@@ -99313,6 +99291,7 @@ function removeEmptyValues(obj) {
|
|
|
99313
99291
|
return result;
|
|
99314
99292
|
}
|
|
99315
99293
|
function useCrmShape() {
|
|
99294
|
+
const { activeCanvas } = useCanvas$1();
|
|
99316
99295
|
const call = useLocalStorage(CALL_STORAGE_KEY, INITIAL_CALL_STATE, {
|
|
99317
99296
|
deep: true,
|
|
99318
99297
|
listenToStorageChanges: true
|
|
@@ -99329,6 +99308,13 @@ function useCrmShape() {
|
|
|
99329
99308
|
"myUser",
|
|
99330
99309
|
computed(() => null)
|
|
99331
99310
|
);
|
|
99311
|
+
const pitcherDataSchema = computed(() => {
|
|
99312
|
+
const pitcherData = activeCanvas.value?.context?.pitcher_data;
|
|
99313
|
+
if (!pitcherData || typeof pitcherData !== "object") {
|
|
99314
|
+
return {};
|
|
99315
|
+
}
|
|
99316
|
+
return { pitcher_data: buildSchemaFromData(pitcherData) };
|
|
99317
|
+
});
|
|
99332
99318
|
function getDefaultCrmShape({
|
|
99333
99319
|
accountName = "",
|
|
99334
99320
|
myUser: myUser2 = null,
|
|
@@ -99367,7 +99353,9 @@ function useCrmShape() {
|
|
|
99367
99353
|
showDefault: !!launchDarkly.value.enable_default_crm_shape
|
|
99368
99354
|
}),
|
|
99369
99355
|
isEmpty(realTimeExtraCrmShape.value) ? {} : realTimeExtraCrmShape.value,
|
|
99370
|
-
isEmpty(extraCrmShape.value) ? {} : extraCrmShape.value
|
|
99356
|
+
isEmpty(extraCrmShape.value) ? {} : extraCrmShape.value,
|
|
99357
|
+
// Derive schema from actual pitcher_data in canvas context
|
|
99358
|
+
isEmpty(pitcherDataSchema.value) ? {} : pitcherDataSchema.value
|
|
99371
99359
|
);
|
|
99372
99360
|
});
|
|
99373
99361
|
return {
|
|
@@ -120837,7 +120825,7 @@ const _sfc_main$4k = /* @__PURE__ */ defineComponent({
|
|
|
120837
120825
|
|
|
120838
120826
|
function useCanvasContext() {
|
|
120839
120827
|
const { activeCanvas, isPrintDisplayMode, builderCache } = useCanvas$1();
|
|
120840
|
-
const { getDefaultCrmShape } = useCrmShape();
|
|
120828
|
+
const { crmShape, getDefaultCrmShape } = useCrmShape();
|
|
120841
120829
|
const myUser = inject(
|
|
120842
120830
|
"myUser",
|
|
120843
120831
|
computed(() => null)
|
|
@@ -120869,14 +120857,21 @@ function useCanvasContext() {
|
|
|
120869
120857
|
builderCache.value[sectionOverrideKey] = mergedCtx;
|
|
120870
120858
|
return mergedCtx;
|
|
120871
120859
|
};
|
|
120872
|
-
const
|
|
120873
|
-
const crmShapeWithSectionCtx = computed(() => {
|
|
120860
|
+
const fullContext = computed(() => {
|
|
120874
120861
|
const mergedCtx = getSectionCtx();
|
|
120875
|
-
|
|
120862
|
+
const defaultShape = getDefaultCrmShape({
|
|
120863
|
+
myUser: myUser.value,
|
|
120864
|
+
showDefault: true
|
|
120865
|
+
});
|
|
120866
|
+
return mergeWith({}, defaultShape, crmShape.value ?? {}, mergedCtx, (_objValue, srcValue) => {
|
|
120867
|
+
if (Array.isArray(srcValue)) {
|
|
120868
|
+
return srcValue;
|
|
120869
|
+
}
|
|
120870
|
+
return void 0;
|
|
120871
|
+
});
|
|
120876
120872
|
});
|
|
120877
120873
|
return {
|
|
120878
|
-
|
|
120879
|
-
crmShapeWithSectionCtx
|
|
120874
|
+
fullContext
|
|
120880
120875
|
};
|
|
120881
120876
|
}
|
|
120882
120877
|
|
|
@@ -120922,10 +120917,10 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
|
|
|
120922
120917
|
__name: "SelectionPanel",
|
|
120923
120918
|
setup(__props) {
|
|
120924
120919
|
useCssVars((_ctx) => ({
|
|
120925
|
-
"
|
|
120926
|
-
"
|
|
120927
|
-
"
|
|
120928
|
-
"
|
|
120920
|
+
"7e857d3a": unref(themeVars).text,
|
|
120921
|
+
"7e7d3ede": unref(themeVars).base,
|
|
120922
|
+
"e1e1c7fe": unref(themeVars).primary6,
|
|
120923
|
+
"e1e1c804": unref(themeVars).primary3
|
|
120929
120924
|
}));
|
|
120930
120925
|
const { t } = useI18n();
|
|
120931
120926
|
const { renderContentType, isFileExpired, isFileExpiring } = useFileDisplayHelpers();
|
|
@@ -120947,7 +120942,7 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
|
|
|
120947
120942
|
"launchDarkly",
|
|
120948
120943
|
computed(() => ({}))
|
|
120949
120944
|
);
|
|
120950
|
-
const {
|
|
120945
|
+
const { fullContext } = useCanvasContext();
|
|
120951
120946
|
const isCrmShapeEnabled = computed(() => launchDarkly.value?.enable_crm_shape_for_external_links ?? false);
|
|
120952
120947
|
const draggableItems = computed({
|
|
120953
120948
|
get: () => isDragNDropEnabled.value ? addedItems.value : selectedItems.value,
|
|
@@ -120962,7 +120957,7 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
|
|
|
120962
120957
|
function getParsedUrl(url) {
|
|
120963
120958
|
if (!url || !isCrmShapeEnabled.value) return url;
|
|
120964
120959
|
try {
|
|
120965
|
-
return renderTemplate(url,
|
|
120960
|
+
return renderTemplate(url, fullContext.value);
|
|
120966
120961
|
} catch (error) {
|
|
120967
120962
|
console.warn("Failed to parse template in external URL, using original URL:", error);
|
|
120968
120963
|
return url;
|
|
@@ -121266,7 +121261,7 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
|
|
|
121266
121261
|
}
|
|
121267
121262
|
});
|
|
121268
121263
|
|
|
121269
|
-
const SelectionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$4j, [["__scopeId", "data-v-
|
|
121264
|
+
const SelectionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$4j, [["__scopeId", "data-v-05db071e"]]);
|
|
121270
121265
|
|
|
121271
121266
|
const _hoisted_1$3q = { class: "flex justify-between gap-2 items-center truncate py-1" };
|
|
121272
121267
|
const _hoisted_2$2z = {
|
|
@@ -123798,13 +123793,13 @@ const _sfc_main$45 = /* @__PURE__ */ defineComponent({
|
|
|
123798
123793
|
computed(() => ({}))
|
|
123799
123794
|
);
|
|
123800
123795
|
const { crmShape } = useCrmShape();
|
|
123801
|
-
const {
|
|
123796
|
+
const { fullContext } = useCanvasContext();
|
|
123802
123797
|
const isCrmShapeEnabled = computed(() => launchDarkly.value?.enable_crm_shape_for_external_links ?? false);
|
|
123803
123798
|
const parsedUrl = computed(() => {
|
|
123804
123799
|
if (!url.value.trim()) return url.value;
|
|
123805
123800
|
if (!isCrmShapeEnabled.value) return url.value;
|
|
123806
123801
|
try {
|
|
123807
|
-
return renderTemplate(url.value,
|
|
123802
|
+
return renderTemplate(url.value, fullContext.value);
|
|
123808
123803
|
} catch (error) {
|
|
123809
123804
|
console.error("Error parsing URL template:", error);
|
|
123810
123805
|
return url.value;
|
|
@@ -123910,7 +123905,7 @@ const _sfc_main$45 = /* @__PURE__ */ defineComponent({
|
|
|
123910
123905
|
}
|
|
123911
123906
|
});
|
|
123912
123907
|
|
|
123913
|
-
const ExternalLinks = /* @__PURE__ */ _export_sfc(_sfc_main$45, [["__scopeId", "data-v-
|
|
123908
|
+
const ExternalLinks = /* @__PURE__ */ _export_sfc(_sfc_main$45, [["__scopeId", "data-v-ba7b39ff"]]);
|
|
123914
123909
|
|
|
123915
123910
|
const _hoisted_1$3d = { class: "mr-3 h-full" };
|
|
123916
123911
|
const _hoisted_2$2m = { class: "flex flex-col gap-3 mb-3" };
|
|
@@ -147996,7 +147991,7 @@ const _sfc_main$2i = /* @__PURE__ */ defineComponent({
|
|
|
147996
147991
|
} = useCanvas$1();
|
|
147997
147992
|
const { discardOverridesConfirmationOptions, getComponentOverrides } = useCanvasSectionOverrides();
|
|
147998
147993
|
const { getDerivedStyleFromFeatureFlags } = useComponentStyle(componentNode);
|
|
147999
|
-
const {
|
|
147994
|
+
const { fullContext } = useCanvasContext();
|
|
148000
147995
|
const { setContentSelectorMode } = useContentSelector();
|
|
148001
147996
|
const confirmation = useConfirmation();
|
|
148002
147997
|
const themeVars = useThemeVars();
|
|
@@ -148149,7 +148144,7 @@ const _sfc_main$2i = /* @__PURE__ */ defineComponent({
|
|
|
148149
148144
|
try {
|
|
148150
148145
|
return {
|
|
148151
148146
|
...value,
|
|
148152
|
-
external_url: renderTemplate(value.external_url,
|
|
148147
|
+
external_url: renderTemplate(value.external_url, fullContext.value)
|
|
148153
148148
|
};
|
|
148154
148149
|
} catch (error) {
|
|
148155
148150
|
console.warn("Failed to parse template in external URL, using original URL:", error);
|
|
@@ -148667,7 +148662,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
148667
148662
|
setCanvasMetadata,
|
|
148668
148663
|
isImpact
|
|
148669
148664
|
} = useCanvas$1();
|
|
148670
|
-
const {
|
|
148665
|
+
const { fullContext } = useCanvasContext();
|
|
148671
148666
|
const { coreRestApiAxios } = useCoreApi();
|
|
148672
148667
|
const { applyPrintModeToElement } = usePrintMode();
|
|
148673
148668
|
const { discardOverridesConfirmationOptions, getComponentOverrides } = useCanvasSectionOverrides();
|
|
@@ -148724,7 +148719,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
148724
148719
|
const memoizedModelValue = computed(() => getModelValue(computedTextProps.value.data?.content));
|
|
148725
148720
|
function getModelValue(value = "") {
|
|
148726
148721
|
if (!shouldInterpolate.value || !value.trim()) return value;
|
|
148727
|
-
return renderTemplate(value,
|
|
148722
|
+
return renderTemplate(value, fullContext.value);
|
|
148728
148723
|
}
|
|
148729
148724
|
const debouncedUpdateNodeData = debounce((data2, nodeId, sectionId) => {
|
|
148730
148725
|
return updateNodeData(data2, nodeId, sectionId);
|
|
@@ -148832,7 +148827,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
148832
148827
|
);
|
|
148833
148828
|
applyPrintModeToElement(contentElement.value, () => {
|
|
148834
148829
|
const content = computedTextProps.value.data?.content || "";
|
|
148835
|
-
return shouldInterpolate.value ? renderTemplate(content,
|
|
148830
|
+
return shouldInterpolate.value ? renderTemplate(content, fullContext.value) : content;
|
|
148836
148831
|
});
|
|
148837
148832
|
if (enableScaleContent && spanStyles) {
|
|
148838
148833
|
setTimeout(() => {
|
|
@@ -148944,7 +148939,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
|
|
|
148944
148939
|
}
|
|
148945
148940
|
});
|
|
148946
148941
|
|
|
148947
|
-
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["__scopeId", "data-v-
|
|
148942
|
+
const Text = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["__scopeId", "data-v-73a884c3"]]);
|
|
148948
148943
|
|
|
148949
148944
|
const _hoisted_1$1Q = { class: "absolute top-2 right-2 flex items-center gap-1 z-10" };
|
|
148950
148945
|
const _hoisted_2$1m = { class: "text-xs" };
|
|
@@ -183688,8 +183683,14 @@ function getEventColor(sfEvent) {
|
|
|
183688
183683
|
} else {
|
|
183689
183684
|
isSubmitted = false;
|
|
183690
183685
|
}
|
|
183686
|
+
const now = /* @__PURE__ */ new Date();
|
|
183691
183687
|
if (isSubmitted) return SfEventColors.SUBMITTED;
|
|
183692
|
-
else if (
|
|
183688
|
+
else if (sfEvent.IsAllDayEvent) {
|
|
183689
|
+
const endDate = new Date(sfEvent.EndDateTime);
|
|
183690
|
+
const todayStart = startOfDay(now);
|
|
183691
|
+
const endDayStart = startOfDay(endDate);
|
|
183692
|
+
return isAfter$1(todayStart, endDayStart) ? SfEventColors.PAST : SfEventColors.PLANNED;
|
|
183693
|
+
} else if (isAfter$1(now, new Date(sfEvent.EndDateTime))) return SfEventColors.PAST;
|
|
183693
183694
|
else return SfEventColors.PLANNED;
|
|
183694
183695
|
}
|
|
183695
183696
|
const minFutureDate = (date = /* @__PURE__ */ new Date()) => add(date, { minutes: MIN_DIFFERENCE_IN_MINUTES });
|