@pitcher/canvas-ui 2025.12.22-90449 → 2025.12.23-132349-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 +269 -228
- package/canvas-ui.js.map +1 -1
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -95267,67 +95267,75 @@ const _hoisted_30$4 = {
|
|
|
95267
95267
|
};
|
|
95268
95268
|
const _hoisted_31$4 = { class: "w-full px-0" };
|
|
95269
95269
|
const _hoisted_32$4 = {
|
|
95270
|
+
key: 0,
|
|
95271
|
+
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95272
|
+
};
|
|
95273
|
+
const _hoisted_33$4 = {
|
|
95270
95274
|
key: 0,
|
|
95271
95275
|
class: "mb-0"
|
|
95272
95276
|
};
|
|
95273
|
-
const
|
|
95274
|
-
const
|
|
95275
|
-
const
|
|
95276
|
-
const
|
|
95277
|
-
const
|
|
95277
|
+
const _hoisted_34$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95278
|
+
const _hoisted_35$4 = { class: "text-m font-semibold text-gray-900" };
|
|
95279
|
+
const _hoisted_36$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
95280
|
+
const _hoisted_37$4 = ["data-result-selected", "onClick"];
|
|
95281
|
+
const _hoisted_38$4 = {
|
|
95278
95282
|
key: 1,
|
|
95279
95283
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
95280
95284
|
};
|
|
95281
|
-
const
|
|
95282
|
-
const
|
|
95283
|
-
const
|
|
95284
|
-
const
|
|
95285
|
-
const
|
|
95286
|
-
const
|
|
95285
|
+
const _hoisted_39$4 = { class: "flex-1 min-w-0" };
|
|
95286
|
+
const _hoisted_40$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95287
|
+
const _hoisted_41$4 = ["innerHTML"];
|
|
95288
|
+
const _hoisted_42$4 = { class: "text-xs text-gray-500" };
|
|
95289
|
+
const _hoisted_43$4 = { class: "text-xs text-gray-400" };
|
|
95290
|
+
const _hoisted_44$4 = {
|
|
95287
95291
|
key: 0,
|
|
95288
95292
|
class: "px-0 py-0"
|
|
95289
95293
|
};
|
|
95290
|
-
const
|
|
95291
|
-
const
|
|
95292
|
-
const
|
|
95293
|
-
const
|
|
95294
|
-
const
|
|
95295
|
-
const
|
|
95296
|
-
const
|
|
95297
|
-
const
|
|
95298
|
-
const
|
|
95299
|
-
const
|
|
95300
|
-
const
|
|
95294
|
+
const _hoisted_45$4 = { key: 1 };
|
|
95295
|
+
const _hoisted_46$4 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95296
|
+
const _hoisted_47$4 = { class: "text-m font-semibold text-gray-900" };
|
|
95297
|
+
const _hoisted_48$4 = { class: "ml-2 text-sm text-gray-500" };
|
|
95298
|
+
const _hoisted_49$4 = ["data-result-selected", "onClick"];
|
|
95299
|
+
const _hoisted_50$4 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
|
|
95300
|
+
const _hoisted_51$3 = { class: "flex-1 min-w-0" };
|
|
95301
|
+
const _hoisted_52$3 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95302
|
+
const _hoisted_53$3 = { class: "text-xs text-gray-500" };
|
|
95303
|
+
const _hoisted_54$2 = { class: "text-xs text-gray-400" };
|
|
95304
|
+
const _hoisted_55$2 = {
|
|
95301
95305
|
key: 0,
|
|
95302
95306
|
class: "px-0 py-0"
|
|
95303
95307
|
};
|
|
95304
|
-
const
|
|
95305
|
-
key:
|
|
95308
|
+
const _hoisted_56$2 = {
|
|
95309
|
+
key: 2,
|
|
95306
95310
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95307
95311
|
};
|
|
95308
|
-
const
|
|
95312
|
+
const _hoisted_57$2 = {
|
|
95309
95313
|
key: 2,
|
|
95310
95314
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
95311
95315
|
};
|
|
95312
|
-
const
|
|
95313
|
-
const
|
|
95314
|
-
|
|
95315
|
-
|
|
95316
|
-
|
|
95317
|
-
const
|
|
95316
|
+
const _hoisted_58$2 = { class: "w-full px-0" };
|
|
95317
|
+
const _hoisted_59$2 = {
|
|
95318
|
+
key: 0,
|
|
95319
|
+
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95320
|
+
};
|
|
95321
|
+
const _hoisted_60$2 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
95322
|
+
const _hoisted_61$2 = { class: "text-m font-semibold text-gray-900" };
|
|
95323
|
+
const _hoisted_62$2 = { class: "ml-2 text-sm text-gray-500" };
|
|
95324
|
+
const _hoisted_63$2 = ["data-result-selected", "onClick"];
|
|
95325
|
+
const _hoisted_64$2 = {
|
|
95318
95326
|
key: 1,
|
|
95319
95327
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
95320
95328
|
};
|
|
95321
|
-
const
|
|
95322
|
-
const
|
|
95323
|
-
const
|
|
95324
|
-
const
|
|
95325
|
-
const
|
|
95326
|
-
const
|
|
95329
|
+
const _hoisted_65$2 = { class: "flex-1 min-w-0" };
|
|
95330
|
+
const _hoisted_66$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
95331
|
+
const _hoisted_67$2 = ["innerHTML"];
|
|
95332
|
+
const _hoisted_68$2 = { class: "text-xs text-gray-500" };
|
|
95333
|
+
const _hoisted_69$1 = { class: "text-xs text-gray-400" };
|
|
95334
|
+
const _hoisted_70$1 = {
|
|
95327
95335
|
key: 0,
|
|
95328
95336
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
95329
95337
|
};
|
|
95330
|
-
const
|
|
95338
|
+
const _hoisted_71$1 = {
|
|
95331
95339
|
key: 0,
|
|
95332
95340
|
class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
|
|
95333
95341
|
};
|
|
@@ -95357,13 +95365,13 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95357
95365
|
const fileTypeOptions = [
|
|
95358
95366
|
{ label: "Folder", value: "folder" },
|
|
95359
95367
|
{ label: "PDF", value: "pdf" },
|
|
95360
|
-
{ label: "Image", value: "image" },
|
|
95361
|
-
{ label: "Audio", value: "audio" },
|
|
95362
|
-
{ label: "Video", value: "video" },
|
|
95363
95368
|
{ label: "Document", value: "document" },
|
|
95364
95369
|
{ label: "Presentation", value: "presentation" },
|
|
95365
95370
|
{ label: "Spreadsheet", value: "spreadsheet" },
|
|
95366
|
-
{ label: "
|
|
95371
|
+
{ label: "Image", value: "image" },
|
|
95372
|
+
{ label: "Video", value: "video" },
|
|
95373
|
+
{ label: "Audio", value: "audio" },
|
|
95374
|
+
{ label: "AR", value: "ar" },
|
|
95367
95375
|
{ label: "Web", value: "web" }
|
|
95368
95376
|
];
|
|
95369
95377
|
const hasActiveFilters = computed(() => selectedFileTypes.value.length > 0 || selectedCanvasFilters.value.length > 0);
|
|
@@ -95372,12 +95380,19 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95372
95380
|
selectedCanvasFilters.value = [];
|
|
95373
95381
|
debouncedFilterSearch();
|
|
95374
95382
|
};
|
|
95375
|
-
const handleEverywhereClick = () => {
|
|
95383
|
+
const handleEverywhereClick = async () => {
|
|
95376
95384
|
selectedFileTypes.value = [];
|
|
95377
95385
|
selectedCanvasFilters.value = [];
|
|
95378
95386
|
searchType.value = null;
|
|
95379
95387
|
if (searchQuery.value.trim()) {
|
|
95380
|
-
|
|
95388
|
+
try {
|
|
95389
|
+
skipNextSuggestionFetch.value = true;
|
|
95390
|
+
await performSearch(searchQuery.value);
|
|
95391
|
+
} catch (error) {
|
|
95392
|
+
console.error("[handleEverywhereClick] Search failed:", error);
|
|
95393
|
+
} finally {
|
|
95394
|
+
skipNextSuggestionFetch.value = false;
|
|
95395
|
+
}
|
|
95381
95396
|
}
|
|
95382
95397
|
};
|
|
95383
95398
|
const recentSearches = ref([]);
|
|
@@ -95625,11 +95640,9 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95625
95640
|
"audio",
|
|
95626
95641
|
"video",
|
|
95627
95642
|
"document",
|
|
95628
|
-
"docx",
|
|
95629
|
-
"pptx",
|
|
95630
95643
|
"presentation",
|
|
95631
95644
|
"spreadsheet",
|
|
95632
|
-
"
|
|
95645
|
+
"ar",
|
|
95633
95646
|
"web"
|
|
95634
95647
|
];
|
|
95635
95648
|
const validCanvasFilters = selectedCanvasFilters.value.filter((f) => ALLOWED_CANVAS_TYPES.includes(f));
|
|
@@ -95712,11 +95725,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95712
95725
|
const debouncedFilterSearch = () => {
|
|
95713
95726
|
if (filterChangeTimer) clearTimeout(filterChangeTimer);
|
|
95714
95727
|
if (searchTimer) clearTimeout(searchTimer);
|
|
95715
|
-
filterChangeTimer = setTimeout(() => {
|
|
95728
|
+
filterChangeTimer = setTimeout(async () => {
|
|
95716
95729
|
if (searchQuery.value.trim() && !showRecentView.value) {
|
|
95717
|
-
|
|
95730
|
+
try {
|
|
95731
|
+
skipNextSuggestionFetch.value = true;
|
|
95732
|
+
await performSearch(searchQuery.value);
|
|
95733
|
+
} catch (error) {
|
|
95734
|
+
console.error("[debouncedFilterSearch] Search failed:", error);
|
|
95735
|
+
} finally {
|
|
95736
|
+
skipNextSuggestionFetch.value = false;
|
|
95737
|
+
}
|
|
95738
|
+
} else {
|
|
95739
|
+
skipNextSuggestionFetch.value = false;
|
|
95718
95740
|
}
|
|
95719
|
-
},
|
|
95741
|
+
}, 500);
|
|
95720
95742
|
};
|
|
95721
95743
|
const handleSearchInput = (query) => {
|
|
95722
95744
|
const validatedQuery = validateSearchInput(query);
|
|
@@ -95731,7 +95753,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95731
95753
|
if (searchTimer) clearTimeout(searchTimer);
|
|
95732
95754
|
searchTimer = setTimeout(() => {
|
|
95733
95755
|
performSearch(validatedQuery);
|
|
95734
|
-
},
|
|
95756
|
+
}, 500);
|
|
95735
95757
|
if (saveSearchTimer) clearTimeout(saveSearchTimer);
|
|
95736
95758
|
saveSearchTimer = setTimeout(() => {
|
|
95737
95759
|
saveSearchTerm(validatedQuery);
|
|
@@ -95769,6 +95791,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95769
95791
|
return;
|
|
95770
95792
|
}
|
|
95771
95793
|
try {
|
|
95794
|
+
skipNextSuggestionFetch.value = true;
|
|
95772
95795
|
searchQuery.value = validatedSearchTerm;
|
|
95773
95796
|
showRecentView.value = false;
|
|
95774
95797
|
querySuggestions.value = [];
|
|
@@ -95776,6 +95799,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95776
95799
|
await performSearch(validatedSearchTerm);
|
|
95777
95800
|
} catch (error) {
|
|
95778
95801
|
console.error("[handleRecentSearchClick] Search failed:", error);
|
|
95802
|
+
} finally {
|
|
95803
|
+
skipNextSuggestionFetch.value = false;
|
|
95779
95804
|
}
|
|
95780
95805
|
};
|
|
95781
95806
|
const handleSuggestionClick = async (suggestion) => {
|
|
@@ -96221,7 +96246,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96221
96246
|
(openBlock(), createElementBlock(Fragment, null, renderList(fileTypeOptions, (option) => {
|
|
96222
96247
|
return createElementVNode("div", {
|
|
96223
96248
|
key: option.value,
|
|
96224
|
-
class: "w-full h-
|
|
96249
|
+
class: "w-full h-7 flex items-center"
|
|
96225
96250
|
}, [
|
|
96226
96251
|
createVNode(unref(NCheckbox), {
|
|
96227
96252
|
checked: selectedFileTypes.value.includes(option.value),
|
|
@@ -96439,30 +96464,185 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96439
96464
|
], 64)) : createCommentVNode("", true)
|
|
96440
96465
|
])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_30$4, [
|
|
96441
96466
|
createElementVNode("div", _hoisted_31$4, [
|
|
96442
|
-
|
|
96443
|
-
|
|
96467
|
+
isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
|
|
96468
|
+
createVNode(CIcon, {
|
|
96469
|
+
class: "animate-spin text-6xl",
|
|
96470
|
+
color: "var(--p-primary)",
|
|
96471
|
+
icon: "spinner"
|
|
96472
|
+
})
|
|
96473
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
96474
|
+
filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_33$4, [
|
|
96475
|
+
createElementVNode("div", _hoisted_34$4, [
|
|
96476
|
+
createVNode(CIcon, {
|
|
96477
|
+
class: "mr-2",
|
|
96478
|
+
color: "var(--p-text2)",
|
|
96479
|
+
icon: "folder",
|
|
96480
|
+
size: "16"
|
|
96481
|
+
}),
|
|
96482
|
+
createElementVNode("span", _hoisted_35$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
|
|
96483
|
+
createElementVNode("span", _hoisted_36$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
|
|
96484
|
+
]),
|
|
96485
|
+
createElementVNode("div", null, [
|
|
96486
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
|
|
96487
|
+
return openBlock(), createElementBlock("div", {
|
|
96488
|
+
key: item.id,
|
|
96489
|
+
class: normalizeClass([
|
|
96490
|
+
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96491
|
+
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96492
|
+
isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
|
|
96493
|
+
]),
|
|
96494
|
+
"data-result-selected": isResultSelected(item),
|
|
96495
|
+
onClick: ($event) => handleResultClick(item, item.type === "folder" ? "folder" : "file")
|
|
96496
|
+
}, [
|
|
96497
|
+
item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
96498
|
+
key: 0,
|
|
96499
|
+
class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
|
|
96500
|
+
cover: "",
|
|
96501
|
+
"file-data": item,
|
|
96502
|
+
"object-fit": "cover",
|
|
96503
|
+
src: item.picture_url || "",
|
|
96504
|
+
width: "72"
|
|
96505
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_38$4, [
|
|
96506
|
+
createVNode(CIcon, {
|
|
96507
|
+
color: "var(--p-text2)",
|
|
96508
|
+
icon: "folder",
|
|
96509
|
+
size: "32"
|
|
96510
|
+
})
|
|
96511
|
+
])),
|
|
96512
|
+
createElementVNode("div", _hoisted_39$4, [
|
|
96513
|
+
createElementVNode("h3", _hoisted_40$4, toDisplayString(item.name), 1),
|
|
96514
|
+
item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
96515
|
+
key: 0,
|
|
96516
|
+
class: "text-xs text-gray-600 mb-1",
|
|
96517
|
+
innerHTML: getSnippet(item)
|
|
96518
|
+
}, null, 8, _hoisted_41$4)) : createCommentVNode("", true),
|
|
96519
|
+
createElementVNode("p", _hoisted_42$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
|
|
96520
|
+
]),
|
|
96521
|
+
createElementVNode("div", _hoisted_43$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
96522
|
+
], 10, _hoisted_37$4);
|
|
96523
|
+
}), 128))
|
|
96524
|
+
]),
|
|
96525
|
+
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
|
|
96526
|
+
createElementVNode("span", {
|
|
96527
|
+
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96528
|
+
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "content")
|
|
96529
|
+
}, [
|
|
96530
|
+
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96531
|
+
createVNode(CIcon, {
|
|
96532
|
+
class: "ml-1",
|
|
96533
|
+
icon: "chevron-right",
|
|
96534
|
+
size: "12"
|
|
96535
|
+
})
|
|
96536
|
+
])
|
|
96537
|
+
])) : createCommentVNode("", true)
|
|
96538
|
+
])) : createCommentVNode("", true),
|
|
96539
|
+
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_45$4, [
|
|
96540
|
+
createElementVNode("div", _hoisted_46$4, [
|
|
96541
|
+
createVNode(CIcon, {
|
|
96542
|
+
class: "mr-2",
|
|
96543
|
+
color: "var(--p-text2)",
|
|
96544
|
+
icon: "presentation",
|
|
96545
|
+
size: "16"
|
|
96546
|
+
}),
|
|
96547
|
+
createElementVNode("span", _hoisted_47$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
96548
|
+
createElementVNode("span", _hoisted_48$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
|
|
96549
|
+
]),
|
|
96550
|
+
createElementVNode("div", null, [
|
|
96551
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
|
|
96552
|
+
return openBlock(), createElementBlock("div", {
|
|
96553
|
+
key: item.id,
|
|
96554
|
+
class: normalizeClass([
|
|
96555
|
+
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96556
|
+
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96557
|
+
isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
|
|
96558
|
+
]),
|
|
96559
|
+
"data-result-selected": isResultSelected(item),
|
|
96560
|
+
onClick: ($event) => handleResultClick(item, "canvas")
|
|
96561
|
+
}, [
|
|
96562
|
+
createElementVNode("div", _hoisted_50$4, [
|
|
96563
|
+
createVNode(CIcon, {
|
|
96564
|
+
color: "var(--p-text2)",
|
|
96565
|
+
icon: "presentation",
|
|
96566
|
+
size: "32"
|
|
96567
|
+
})
|
|
96568
|
+
]),
|
|
96569
|
+
createElementVNode("div", _hoisted_51$3, [
|
|
96570
|
+
createElementVNode("h3", _hoisted_52$3, toDisplayString(item.name), 1),
|
|
96571
|
+
createElementVNode("p", _hoisted_53$3, toDisplayString(formatCanvasType(item.content_type)), 1)
|
|
96572
|
+
]),
|
|
96573
|
+
createElementVNode("div", _hoisted_54$2, toDisplayString(item.folder?.name || ""), 1)
|
|
96574
|
+
], 10, _hoisted_49$4);
|
|
96575
|
+
}), 128))
|
|
96576
|
+
]),
|
|
96577
|
+
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
|
|
96578
|
+
createElementVNode("span", {
|
|
96579
|
+
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96580
|
+
onClick: _cache[15] || (_cache[15] = ($event) => searchType.value = "canvases")
|
|
96581
|
+
}, [
|
|
96582
|
+
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96583
|
+
createVNode(CIcon, {
|
|
96584
|
+
class: "ml-1",
|
|
96585
|
+
icon: "chevron-right",
|
|
96586
|
+
size: "12"
|
|
96587
|
+
})
|
|
96588
|
+
])
|
|
96589
|
+
])) : createCommentVNode("", true)
|
|
96590
|
+
])) : createCommentVNode("", true),
|
|
96591
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_56$2, [
|
|
96444
96592
|
createVNode(CIcon, {
|
|
96593
|
+
class: "text-6xl",
|
|
96594
|
+
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
96595
|
+
"fa-type": "fal",
|
|
96596
|
+
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
96597
|
+
}, null, 8, ["color", "icon"]),
|
|
96598
|
+
createElementVNode("p", {
|
|
96599
|
+
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
96600
|
+
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
96601
|
+
])) : createCommentVNode("", true)
|
|
96602
|
+
], 64))
|
|
96603
|
+
])
|
|
96604
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_57$2, [
|
|
96605
|
+
createElementVNode("div", _hoisted_58$2, [
|
|
96606
|
+
isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_59$2, [
|
|
96607
|
+
createVNode(CIcon, {
|
|
96608
|
+
class: "animate-spin text-6xl",
|
|
96609
|
+
color: "var(--p-primary)",
|
|
96610
|
+
icon: "spinner"
|
|
96611
|
+
})
|
|
96612
|
+
])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
96613
|
+
createElementVNode("div", _hoisted_60$2, [
|
|
96614
|
+
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
96615
|
+
key: 0,
|
|
96445
96616
|
class: "mr-2",
|
|
96446
96617
|
color: "var(--p-text2)",
|
|
96447
96618
|
icon: "folder",
|
|
96448
96619
|
size: "16"
|
|
96449
|
-
}),
|
|
96450
|
-
|
|
96451
|
-
|
|
96620
|
+
})) : (openBlock(), createBlock(CIcon, {
|
|
96621
|
+
key: 1,
|
|
96622
|
+
class: "mr-2",
|
|
96623
|
+
color: "var(--p-text2)",
|
|
96624
|
+
icon: "presentation",
|
|
96625
|
+
size: "16"
|
|
96626
|
+
})),
|
|
96627
|
+
createElementVNode("span", _hoisted_61$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
96628
|
+
createElementVNode("span", _hoisted_62$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
|
|
96452
96629
|
]),
|
|
96453
96630
|
createElementVNode("div", null, [
|
|
96454
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.
|
|
96631
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
|
|
96455
96632
|
return openBlock(), createElementBlock("div", {
|
|
96456
96633
|
key: item.id,
|
|
96457
96634
|
class: normalizeClass([
|
|
96458
96635
|
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96459
96636
|
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96460
|
-
isResultSelected(item) ? "bg-
|
|
96637
|
+
isResultSelected(item) ? "bg-gray-100" : "hover:bg-gray-50"
|
|
96461
96638
|
]),
|
|
96462
96639
|
"data-result-selected": isResultSelected(item),
|
|
96463
|
-
onClick: ($event) => handleResultClick(
|
|
96640
|
+
onClick: ($event) => handleResultClick(
|
|
96641
|
+
item,
|
|
96642
|
+
searchType.value === "content" ? item.type === "folder" ? "folder" : "file" : "canvas"
|
|
96643
|
+
)
|
|
96464
96644
|
}, [
|
|
96465
|
-
item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
96645
|
+
searchType.value === "content" && item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
96466
96646
|
key: 0,
|
|
96467
96647
|
class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
|
|
96468
96648
|
cover: "",
|
|
@@ -96470,187 +96650,48 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96470
96650
|
"object-fit": "cover",
|
|
96471
96651
|
src: item.picture_url || "",
|
|
96472
96652
|
width: "72"
|
|
96473
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div",
|
|
96474
|
-
|
|
96653
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_64$2, [
|
|
96654
|
+
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
96655
|
+
key: 0,
|
|
96475
96656
|
color: "var(--p-text2)",
|
|
96476
96657
|
icon: "folder",
|
|
96477
96658
|
size: "32"
|
|
96478
|
-
})
|
|
96659
|
+
})) : (openBlock(), createBlock(CIcon, {
|
|
96660
|
+
key: 1,
|
|
96661
|
+
color: "var(--p-text2)",
|
|
96662
|
+
icon: "presentation",
|
|
96663
|
+
size: "32"
|
|
96664
|
+
}))
|
|
96479
96665
|
])),
|
|
96480
|
-
createElementVNode("div",
|
|
96481
|
-
createElementVNode("h3",
|
|
96482
|
-
item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
96666
|
+
createElementVNode("div", _hoisted_65$2, [
|
|
96667
|
+
createElementVNode("h3", _hoisted_66$2, toDisplayString(item.name), 1),
|
|
96668
|
+
searchType.value === "content" && item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
96483
96669
|
key: 0,
|
|
96484
96670
|
class: "text-xs text-gray-600 mb-1",
|
|
96485
96671
|
innerHTML: getSnippet(item)
|
|
96486
|
-
}, null, 8,
|
|
96487
|
-
createElementVNode("p",
|
|
96672
|
+
}, null, 8, _hoisted_67$2)) : createCommentVNode("", true),
|
|
96673
|
+
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)
|
|
96488
96674
|
]),
|
|
96489
|
-
createElementVNode("div",
|
|
96490
|
-
], 10,
|
|
96675
|
+
createElementVNode("div", _hoisted_69$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
96676
|
+
], 10, _hoisted_63$2);
|
|
96491
96677
|
}), 128))
|
|
96492
96678
|
]),
|
|
96493
|
-
|
|
96494
|
-
createElementVNode("span", {
|
|
96495
|
-
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96496
|
-
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "content")
|
|
96497
|
-
}, [
|
|
96498
|
-
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96499
|
-
createVNode(CIcon, {
|
|
96500
|
-
class: "ml-1",
|
|
96501
|
-
icon: "chevron-right",
|
|
96502
|
-
size: "12"
|
|
96503
|
-
})
|
|
96504
|
-
])
|
|
96505
|
-
])) : createCommentVNode("", true)
|
|
96506
|
-
])) : createCommentVNode("", true),
|
|
96507
|
-
filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
|
|
96508
|
-
createElementVNode("div", _hoisted_45$4, [
|
|
96679
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_70$1, [
|
|
96509
96680
|
createVNode(CIcon, {
|
|
96510
|
-
class: "
|
|
96511
|
-
color: "var(--p-
|
|
96512
|
-
|
|
96513
|
-
|
|
96514
|
-
}),
|
|
96515
|
-
createElementVNode("
|
|
96516
|
-
|
|
96517
|
-
|
|
96518
|
-
createElementVNode("div", null, [
|
|
96519
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
|
|
96520
|
-
return openBlock(), createElementBlock("div", {
|
|
96521
|
-
key: item.id,
|
|
96522
|
-
class: normalizeClass([
|
|
96523
|
-
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96524
|
-
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96525
|
-
isResultSelected(item) ? "bg-primary6" : "hover:bg-primary5"
|
|
96526
|
-
]),
|
|
96527
|
-
"data-result-selected": isResultSelected(item),
|
|
96528
|
-
onClick: ($event) => handleResultClick(item, "canvas")
|
|
96529
|
-
}, [
|
|
96530
|
-
createElementVNode("div", _hoisted_49$4, [
|
|
96531
|
-
createVNode(CIcon, {
|
|
96532
|
-
color: "var(--p-text2)",
|
|
96533
|
-
icon: "presentation",
|
|
96534
|
-
size: "32"
|
|
96535
|
-
})
|
|
96536
|
-
]),
|
|
96537
|
-
createElementVNode("div", _hoisted_50$4, [
|
|
96538
|
-
createElementVNode("h3", _hoisted_51$3, toDisplayString(item.name), 1),
|
|
96539
|
-
createElementVNode("p", _hoisted_52$3, toDisplayString(formatCanvasType(item.content_type)), 1)
|
|
96540
|
-
]),
|
|
96541
|
-
createElementVNode("div", _hoisted_53$3, toDisplayString(item.folder?.name || ""), 1)
|
|
96542
|
-
], 10, _hoisted_48$4);
|
|
96543
|
-
}), 128))
|
|
96544
|
-
]),
|
|
96545
|
-
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_54$2, [
|
|
96546
|
-
createElementVNode("span", {
|
|
96547
|
-
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96548
|
-
onClick: _cache[15] || (_cache[15] = ($event) => searchType.value = "canvases")
|
|
96549
|
-
}, [
|
|
96550
|
-
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96551
|
-
createVNode(CIcon, {
|
|
96552
|
-
class: "ml-1",
|
|
96553
|
-
icon: "chevron-right",
|
|
96554
|
-
size: "12"
|
|
96555
|
-
})
|
|
96556
|
-
])
|
|
96681
|
+
class: "text-6xl",
|
|
96682
|
+
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
96683
|
+
"fa-type": "fal",
|
|
96684
|
+
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
96685
|
+
}, null, 8, ["color", "icon"]),
|
|
96686
|
+
createElementVNode("p", {
|
|
96687
|
+
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
96688
|
+
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
96557
96689
|
])) : createCommentVNode("", true)
|
|
96558
|
-
]
|
|
96559
|
-
]),
|
|
96560
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
|
|
96561
|
-
createVNode(CIcon, {
|
|
96562
|
-
class: "text-6xl",
|
|
96563
|
-
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
96564
|
-
"fa-type": "fal",
|
|
96565
|
-
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
96566
|
-
}, null, 8, ["color", "icon"]),
|
|
96567
|
-
createElementVNode("p", {
|
|
96568
|
-
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
96569
|
-
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
96570
|
-
])) : createCommentVNode("", true)
|
|
96571
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_56$2, [
|
|
96572
|
-
createElementVNode("div", _hoisted_57$2, [
|
|
96573
|
-
createElementVNode("div", _hoisted_58$2, [
|
|
96574
|
-
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
96575
|
-
key: 0,
|
|
96576
|
-
class: "mr-2",
|
|
96577
|
-
color: "var(--p-text2)",
|
|
96578
|
-
icon: "folder",
|
|
96579
|
-
size: "16"
|
|
96580
|
-
})) : (openBlock(), createBlock(CIcon, {
|
|
96581
|
-
key: 1,
|
|
96582
|
-
class: "mr-2",
|
|
96583
|
-
color: "var(--p-text2)",
|
|
96584
|
-
icon: "presentation",
|
|
96585
|
-
size: "16"
|
|
96586
|
-
})),
|
|
96587
|
-
createElementVNode("span", _hoisted_59$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
96588
|
-
createElementVNode("span", _hoisted_60$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
|
|
96589
|
-
]),
|
|
96590
|
-
createElementVNode("div", null, [
|
|
96591
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
|
|
96592
|
-
return openBlock(), createElementBlock("div", {
|
|
96593
|
-
key: item.id,
|
|
96594
|
-
class: normalizeClass([
|
|
96595
|
-
"flex items-center px-0 cursor-pointer border-b border-gray-100 w-full",
|
|
96596
|
-
_ctx.isAdmin ? "py-3" : "py-0",
|
|
96597
|
-
isResultSelected(item) ? "bg-gray-100" : "hover:bg-gray-50"
|
|
96598
|
-
]),
|
|
96599
|
-
"data-result-selected": isResultSelected(item),
|
|
96600
|
-
onClick: ($event) => handleResultClick(
|
|
96601
|
-
item,
|
|
96602
|
-
searchType.value === "content" ? item.type === "folder" ? "folder" : "file" : "canvas"
|
|
96603
|
-
)
|
|
96604
|
-
}, [
|
|
96605
|
-
searchType.value === "content" && item.type === "file" ? (openBlock(), createBlock(_sfc_main$6K, {
|
|
96606
|
-
key: 0,
|
|
96607
|
-
class: "w-18 h-14 border-rounded-1 overflow-hidden flex-shrink-0 mr-4",
|
|
96608
|
-
cover: "",
|
|
96609
|
-
"file-data": item,
|
|
96610
|
-
"object-fit": "cover",
|
|
96611
|
-
src: item.picture_url || "",
|
|
96612
|
-
width: "72"
|
|
96613
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_62$2, [
|
|
96614
|
-
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
96615
|
-
key: 0,
|
|
96616
|
-
color: "var(--p-text2)",
|
|
96617
|
-
icon: "folder",
|
|
96618
|
-
size: "32"
|
|
96619
|
-
})) : (openBlock(), createBlock(CIcon, {
|
|
96620
|
-
key: 1,
|
|
96621
|
-
color: "var(--p-text2)",
|
|
96622
|
-
icon: "presentation",
|
|
96623
|
-
size: "32"
|
|
96624
|
-
}))
|
|
96625
|
-
])),
|
|
96626
|
-
createElementVNode("div", _hoisted_63$2, [
|
|
96627
|
-
createElementVNode("h3", _hoisted_64$2, toDisplayString(item.name), 1),
|
|
96628
|
-
searchType.value === "content" && item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
|
|
96629
|
-
key: 0,
|
|
96630
|
-
class: "text-xs text-gray-600 mb-1",
|
|
96631
|
-
innerHTML: getSnippet(item)
|
|
96632
|
-
}, null, 8, _hoisted_65$2)) : createCommentVNode("", true),
|
|
96633
|
-
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)
|
|
96634
|
-
]),
|
|
96635
|
-
createElementVNode("div", _hoisted_67$2, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
96636
|
-
], 10, _hoisted_61$2);
|
|
96637
|
-
}), 128))
|
|
96638
|
-
]),
|
|
96639
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_68$2, [
|
|
96640
|
-
createVNode(CIcon, {
|
|
96641
|
-
class: "text-6xl",
|
|
96642
|
-
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
96643
|
-
"fa-type": "fal",
|
|
96644
|
-
icon: searchError.value ? "exclamation-triangle" : "radar"
|
|
96645
|
-
}, null, 8, ["color", "icon"]),
|
|
96646
|
-
createElementVNode("p", {
|
|
96647
|
-
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
96648
|
-
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
96649
|
-
])) : createCommentVNode("", true)
|
|
96690
|
+
], 64))
|
|
96650
96691
|
])
|
|
96651
96692
|
]))
|
|
96652
96693
|
]),
|
|
96653
|
-
!showRecentView.value ? (openBlock(), createElementBlock("div",
|
|
96694
|
+
!showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_71$1, [
|
|
96654
96695
|
createVNode(CShortcut, null, {
|
|
96655
96696
|
default: withCtx(() => [
|
|
96656
96697
|
createVNode(CShortcutIcon, { icon: "arrow-up" }),
|
|
@@ -96692,7 +96733,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96692
96733
|
}
|
|
96693
96734
|
});
|
|
96694
96735
|
|
|
96695
|
-
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-
|
|
96736
|
+
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-09781a03"]]);
|
|
96696
96737
|
|
|
96697
96738
|
const BulletListExtended = BulletList.extend({
|
|
96698
96739
|
addOptions() {
|