@pitcher/canvas-ui 2026.1.9-223804-beta → 2026.1.12-135956-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/canvas-ui.js CHANGED
@@ -88219,15 +88219,14 @@ async function crmQueryAdaptive(payload) {
88219
88219
  } catch {
88220
88220
  useSmartStore = false;
88221
88221
  }
88222
- console.log(`[crmQueryAdaptive] Called query: `, query2);
88222
+ console.log(`crmQueryAdaptive called with the 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(`[crmSmartQuery] Called query: `, smartQuery);
88227
+ console.log(`Smart Query: `, smartQuery);
88228
88228
  const smartStoreResults = await crmSmartQuery({ query: smartQuery });
88229
88229
  const records = transformSmartStoreResults(smartStoreResults, fields, objectName);
88230
- console.log(`[SmartStore] Results: `, records);
88231
88230
  return {
88232
88231
  records,
88233
88232
  totalSize: records.length
@@ -94087,6 +94086,391 @@ function useContentSelector() {
94087
94086
  };
94088
94087
  }
94089
94088
 
94089
+ const generateNewCollection$2 = (t) => ({
94090
+ name: t("canvasUI.collectionSelector.defaultNewCollectionName"),
94091
+ groups: [],
94092
+ hide_footer: false
94093
+ });
94094
+ const generateNewCollectionStructure = () => ({ name: "", groups: [] });
94095
+ const getUniqueSlides = (uniqueSlides, newSlides) => [
94096
+ ...uniqueSlides,
94097
+ ...newSlides.filter(
94098
+ (newSlide) => !uniqueSlides.some(
94099
+ (uniqueSlide) => newSlide.type === "slide" && uniqueSlide.type === "slide" && uniqueSlide.file.id === newSlide.file.id && uniqueSlide.slide.index === newSlide.slide.index
94100
+ )
94101
+ )
94102
+ ];
94103
+
94104
+ const getDefaultNewGroupName$1 = (t) => t("canvasUI.collectionSelector.defaultNewGroupName");
94105
+ const getDefaultGroupName$1 = (t) => t("canvasUI.collectionSelector.defaultGroupName");
94106
+ const getDefaultCollectionName = (t) => t("canvasUI.collectionSelector.defaultCollectionName");
94107
+ const generateNewEmptyGroup$2 = (t) => ({
94108
+ id: v4(),
94109
+ name: getDefaultNewGroupName$1(t),
94110
+ slides: []
94111
+ });
94112
+ const generateNewCollection$1 = (t) => ({
94113
+ name: t("canvasUI.collectionSelector.defaultNewCollectionName"),
94114
+ groups: [generateNewEmptyGroup$2(t)]
94115
+ });
94116
+ const generateNewCollectionSlide = (payload) => ({
94117
+ ...payload,
94118
+ id: v4(),
94119
+ type: "slide"
94120
+ });
94121
+ const generateNewCollectionFile = (file) => ({
94122
+ id: v4(),
94123
+ type: "file",
94124
+ file
94125
+ });
94126
+ const getUniqueFilesCount = (data) => {
94127
+ const fileIds = data.groups.flatMap(
94128
+ (group) => group.slides.map((slide) => {
94129
+ if (slide.file?.id) {
94130
+ return slide.file.id;
94131
+ } else if (slide.file_id) {
94132
+ return slide.file_id;
94133
+ }
94134
+ return null;
94135
+ }).filter(Boolean)
94136
+ );
94137
+ return new Set(fileIds).size;
94138
+ };
94139
+ const getGroupsCount = (data) => data.groups.length;
94140
+ const getSlidesCount = (data) => data.groups.reduce((acc, group) => acc + group.slides.length, 0);
94141
+
94142
+ function parsePptxFileToCollectionPlayer(t, _file) {
94143
+ const metadataSections = _file?.metadata?.pptx_data?.sections ?? [];
94144
+ const sections = metadataSections.length || _file.content_thumbnails.length === 0 ? metadataSections : [{ start: 0, end: _file.content_thumbnails.length - 1, name: null }];
94145
+ const sectionGroups = sections.map((section) => ({
94146
+ name: section.name ?? (_file.name || getDefaultGroupName$1(t)),
94147
+ slides: _file.content_thumbnails.slice(section.start, section.end + 1).map((url, index) => ({ url, index: section.start + index }))
94148
+ }));
94149
+ const file = {
94150
+ id: _file.id,
94151
+ pspdfkit_auth_payload: _file.pspdfkit_auth_payload,
94152
+ pspdfkit_document_id: _file.pspdfkit_document_id,
94153
+ pspdfkit_server_url: _file.pspdfkit_server_url,
94154
+ content_type: _file.content_type,
94155
+ content_url: _file.content_url,
94156
+ permissions: _file.permissions,
94157
+ thumbnail_url: _file.thumbnail_url ?? null,
94158
+ name: _file.name,
94159
+ type: _file.type,
94160
+ metadata: _file.metadata
94161
+ };
94162
+ return {
94163
+ name: file.name ?? getDefaultGroupName$1(t),
94164
+ groups: sectionGroups.map((section) => ({
94165
+ ...generateNewEmptyGroup$2(t),
94166
+ name: section.name,
94167
+ slides: section.slides.map(
94168
+ (slide) => generateNewCollectionSlide({
94169
+ file,
94170
+ slide
94171
+ })
94172
+ )
94173
+ }))
94174
+ };
94175
+ }
94176
+ function parsePdfFileToCollectionPlayer(t, file) {
94177
+ const slides = file.content_thumbnails.map(
94178
+ (url, index) => generateNewCollectionSlide({
94179
+ file: {
94180
+ id: file.id,
94181
+ pspdfkit_auth_payload: file.pspdfkit_auth_payload,
94182
+ pspdfkit_document_id: file.pspdfkit_document_id,
94183
+ pspdfkit_server_url: file.pspdfkit_server_url,
94184
+ content_type: file.content_type,
94185
+ content_url: file.content_url,
94186
+ permissions: file.permissions,
94187
+ thumbnail_url: file.thumbnail_url ?? null,
94188
+ name: file.name,
94189
+ type: file.type,
94190
+ metadata: file.metadata
94191
+ },
94192
+ slide: {
94193
+ index,
94194
+ url
94195
+ }
94196
+ })
94197
+ );
94198
+ return {
94199
+ name: file.name ?? getDefaultCollectionName(t),
94200
+ groups: [
94201
+ {
94202
+ ...generateNewEmptyGroup$2(t),
94203
+ name: file.name ?? getDefaultGroupName$1(t),
94204
+ slides
94205
+ }
94206
+ ]
94207
+ };
94208
+ }
94209
+ function parseFileToCollectionPlayer(t, file) {
94210
+ if (file.content_type === "pdf") {
94211
+ if (file.original_extension === "pptx" || file.metadata?.pptx_data?.sections?.length) {
94212
+ return parsePptxFileToCollectionPlayer(t, file);
94213
+ }
94214
+ return parsePdfFileToCollectionPlayer(t, file);
94215
+ }
94216
+ return {
94217
+ name: file.name ?? getDefaultCollectionName(t),
94218
+ groups: [
94219
+ {
94220
+ ...generateNewEmptyGroup$2(t),
94221
+ name: file.name ?? getDefaultGroupName$1(t),
94222
+ slides: [
94223
+ generateNewCollectionFile({
94224
+ id: file.id,
94225
+ pspdfkit_auth_payload: file.pspdfkit_auth_payload,
94226
+ pspdfkit_document_id: file.pspdfkit_document_id,
94227
+ pspdfkit_server_url: file.pspdfkit_server_url,
94228
+ content_type: file.content_type,
94229
+ content_url: file.content_url,
94230
+ permissions: file.permissions,
94231
+ thumbnail_url: file.thumbnail_url ?? null,
94232
+ name: file.name,
94233
+ type: file.type,
94234
+ metadata: file.metadata
94235
+ })
94236
+ ]
94237
+ }
94238
+ ]
94239
+ };
94240
+ }
94241
+ function parseContentSelectorToCollectionPlayerSlides({
94242
+ selectedItems,
94243
+ filesById
94244
+ }) {
94245
+ return selectedItems.reduce((acc, item) => {
94246
+ if (item.type === "file") {
94247
+ if (filesById[item.id].content_type === "pdf") {
94248
+ const pages = filesById[item.id].content_thumbnails.map(
94249
+ (contentThumbnail, index) => generateNewCollectionSlide({
94250
+ file: {
94251
+ id: item.id,
94252
+ pspdfkit_auth_payload: filesById[item.id].pspdfkit_auth_payload,
94253
+ pspdfkit_document_id: filesById[item.id].pspdfkit_document_id,
94254
+ pspdfkit_server_url: filesById[item.id].pspdfkit_server_url,
94255
+ content_type: filesById[item.id].content_type,
94256
+ content_url: filesById[item.id].content_url,
94257
+ permissions: item.permissions,
94258
+ thumbnail_url: item.thumbnail_url ?? null,
94259
+ name: item.name,
94260
+ type: filesById[item.id].type,
94261
+ metadata: item.metadata
94262
+ },
94263
+ slide: {
94264
+ index,
94265
+ url: contentThumbnail
94266
+ }
94267
+ })
94268
+ );
94269
+ return getUniqueSlides(acc, pages);
94270
+ }
94271
+ return [
94272
+ ...acc,
94273
+ generateNewCollectionFile({
94274
+ id: item.id,
94275
+ pspdfkit_auth_payload: filesById[item.id].pspdfkit_auth_payload,
94276
+ pspdfkit_document_id: filesById[item.id].pspdfkit_document_id,
94277
+ pspdfkit_server_url: filesById[item.id].pspdfkit_server_url,
94278
+ content_type: filesById[item.id].content_type,
94279
+ content_url: filesById[item.id].content_url,
94280
+ permissions: item.permissions,
94281
+ thumbnail_url: filesById[item.id].thumbnail_url,
94282
+ name: item.name,
94283
+ type: filesById[item.id].type,
94284
+ metadata: item.metadata
94285
+ })
94286
+ ];
94287
+ }
94288
+ return getUniqueSlides(acc, [
94289
+ generateNewCollectionSlide({
94290
+ file: {
94291
+ id: item.file.id,
94292
+ pspdfkit_auth_payload: filesById[item.file.id].pspdfkit_auth_payload,
94293
+ pspdfkit_document_id: filesById[item.file.id].pspdfkit_document_id,
94294
+ pspdfkit_server_url: filesById[item.file.id].pspdfkit_server_url,
94295
+ content_type: filesById[item.file.id].content_type,
94296
+ content_url: filesById[item.file.id].content_url,
94297
+ permissions: item.permissions,
94298
+ thumbnail_url: item.thumbnail_url ?? null,
94299
+ name: item.file.name,
94300
+ type: filesById[item.file.id].type,
94301
+ metadata: filesById[item.file.id].metadata
94302
+ },
94303
+ slide: {
94304
+ index: item.page_index,
94305
+ url: item.thumbnail_url ?? null
94306
+ }
94307
+ })
94308
+ ]);
94309
+ }, []);
94310
+ }
94311
+ function parseCollectionPlayerSlidesToContentSelector(slides) {
94312
+ if (!slides?.length) return [];
94313
+ return slides.reduce((acc, item) => {
94314
+ let selection = null;
94315
+ if ("file_id" in item) {
94316
+ const v2Item = item;
94317
+ if (!v2Item.file_id) {
94318
+ return acc;
94319
+ }
94320
+ if (typeof v2Item.index === "number") {
94321
+ selection = {
94322
+ fileId: v2Item.file_id,
94323
+ type: "page",
94324
+ pageIndex: v2Item.index
94325
+ };
94326
+ } else {
94327
+ selection = {
94328
+ fileId: v2Item.file_id,
94329
+ type: "file"
94330
+ };
94331
+ }
94332
+ } else {
94333
+ const v1Item = item;
94334
+ const fileId = v1Item.file?.id;
94335
+ if (!fileId) {
94336
+ return acc;
94337
+ }
94338
+ if (v1Item.type === "slide") {
94339
+ selection = {
94340
+ fileId,
94341
+ type: "page",
94342
+ pageIndex: v1Item.slide.index
94343
+ };
94344
+ } else {
94345
+ selection = {
94346
+ fileId,
94347
+ type: "file"
94348
+ };
94349
+ }
94350
+ }
94351
+ return [...acc, selection];
94352
+ }, []);
94353
+ }
94354
+ function transformFilesToCollectionPlayer(t, filesData, name = "Collection") {
94355
+ if (!Array.isArray(filesData)) {
94356
+ throw new Error("Expected an array of files");
94357
+ }
94358
+ const groups = filesData.reduce((acc, fileData, index) => {
94359
+ try {
94360
+ const fileId = fileData.id;
94361
+ const fileName = fileData.name || `File ${index + 1}`;
94362
+ const selectedPages = fileData.selectedPages;
94363
+ if (!fileId) {
94364
+ return acc;
94365
+ }
94366
+ let slidesToCreate = [];
94367
+ if (selectedPages && Array.isArray(selectedPages) && selectedPages.length > 0) {
94368
+ slidesToCreate = selectedPages.map((pageIndex) => ({
94369
+ id: `${fileId}-slide-${pageIndex}`,
94370
+ file_id: fileId,
94371
+ index: pageIndex
94372
+ }));
94373
+ } else {
94374
+ slidesToCreate = [
94375
+ {
94376
+ id: `${fileId}-file`,
94377
+ file_id: fileId,
94378
+ index: void 0
94379
+ // undefined means entire file, not a specific page
94380
+ }
94381
+ ];
94382
+ }
94383
+ acc.push({
94384
+ id: `group-${fileId}`,
94385
+ name: fileName,
94386
+ slides: slidesToCreate
94387
+ });
94388
+ return acc;
94389
+ } catch (error) {
94390
+ return acc;
94391
+ }
94392
+ }, []);
94393
+ return {
94394
+ name,
94395
+ groups
94396
+ };
94397
+ }
94398
+ function transformFilesToContentGrid(filesData) {
94399
+ if (!Array.isArray(filesData)) {
94400
+ throw new Error("Expected an array of files");
94401
+ }
94402
+ const items = filesData.reduce((acc, fileData) => {
94403
+ try {
94404
+ const fileId = fileData.id;
94405
+ const selectedPages = fileData.selectedPages;
94406
+ if (!fileId) {
94407
+ return acc;
94408
+ }
94409
+ let itemsToCreate = [];
94410
+ if (selectedPages && Array.isArray(selectedPages) && selectedPages.length > 0) {
94411
+ itemsToCreate = selectedPages.map((pageIndex) => ({
94412
+ file: {
94413
+ id: fileId,
94414
+ // ContentGrid will resolve these properties via data accessor or file resolution
94415
+ name: fileData.name || `File ${fileId}`,
94416
+ permissions: void 0,
94417
+ // Will be resolved
94418
+ tags: void 0,
94419
+ // Will be resolved
94420
+ content_url: void 0,
94421
+ // Will be resolved
94422
+ content_type: void 0,
94423
+ // Will be resolved
94424
+ content_extension: void 0,
94425
+ // Will be resolved
94426
+ expires_at: void 0
94427
+ // Will be resolved
94428
+ },
94429
+ slide: {
94430
+ index: pageIndex,
94431
+ url: void 0
94432
+ // Will be resolved from content_thumbnails
94433
+ },
94434
+ type: "slide"
94435
+ }));
94436
+ } else {
94437
+ itemsToCreate = [
94438
+ {
94439
+ file: {
94440
+ id: fileId,
94441
+ // ContentGrid will resolve these properties via data accessor or file resolution
94442
+ name: fileData.name || `File ${fileId}`,
94443
+ thumbnail_url: null,
94444
+ // Will be resolved
94445
+ content_thumbnails: null,
94446
+ // Will be resolved
94447
+ content_url: null,
94448
+ // Will be resolved - required for ContentGridFileProps but can be null
94449
+ content_type: null,
94450
+ // Will be resolved - required for ContentGridFileProps
94451
+ content_extension: null,
94452
+ // Will be resolved - required for ContentGridFileProps
94453
+ content_length: void 0,
94454
+ // Will be resolved
94455
+ permissions: void 0,
94456
+ // Will be resolved
94457
+ expires_at: void 0,
94458
+ // Will be resolved
94459
+ tags: void 0
94460
+ // Will be resolved
94461
+ },
94462
+ type: "file"
94463
+ }
94464
+ ];
94465
+ }
94466
+ return [...acc, ...itemsToCreate];
94467
+ } catch (error) {
94468
+ return acc;
94469
+ }
94470
+ }, []);
94471
+ return { items };
94472
+ }
94473
+
94090
94474
  function createNodeId(type) {
94091
94475
  return `${type || "UnknownType"}-${v4()}`;
94092
94476
  }
@@ -94685,6 +95069,81 @@ function findFirstEmptyContentGridNode(nodes) {
94685
95069
  }
94686
95070
  return null;
94687
95071
  }
95072
+ function findShareboxTargetCollectionPlayerNode(nodes) {
95073
+ for (const node of nodes) {
95074
+ if (node.type === ComponentTypes.CollectionPlayer && node.is_sharebox_target) {
95075
+ return node;
95076
+ }
95077
+ if (node.children) {
95078
+ const found = findShareboxTargetCollectionPlayerNode(node.children);
95079
+ if (found) {
95080
+ return found;
95081
+ }
95082
+ }
95083
+ }
95084
+ return null;
95085
+ }
95086
+ function findFirstEmptyCollectionPlayerNode(nodes) {
95087
+ for (const node of nodes) {
95088
+ if (node.type === ComponentTypes.CollectionPlayer) {
95089
+ const data = node.data;
95090
+ const hasContent = data?.groups?.some((g) => g.slides?.length > 0);
95091
+ if (!hasContent) {
95092
+ return node;
95093
+ }
95094
+ }
95095
+ if (node.children) {
95096
+ const found = findFirstEmptyCollectionPlayerNode(node.children);
95097
+ if (found) {
95098
+ return found;
95099
+ }
95100
+ }
95101
+ }
95102
+ return null;
95103
+ }
95104
+ function updateFirstCollectionPlayerWithShareboxItems(canvasContent, selectedItems, filesById) {
95105
+ let content = simpleDeepClone(canvasContent);
95106
+ let collectionPlayerNode = findShareboxTargetCollectionPlayerNode(content);
95107
+ if (!collectionPlayerNode) {
95108
+ collectionPlayerNode = findFirstEmptyCollectionPlayerNode(content);
95109
+ }
95110
+ if (!collectionPlayerNode) {
95111
+ console.info("No CollectionPlayer component found in the canvas content. Creating one...");
95112
+ const { newContent } = addCanvasComponent(canvasContent, {
95113
+ type: ComponentTypes.CollectionPlayer
95114
+ });
95115
+ content = newContent;
95116
+ collectionPlayerNode = findFirstEmptyCollectionPlayerNode(content);
95117
+ }
95118
+ if (!collectionPlayerNode) {
95119
+ console.error("Could not find or create a CollectionPlayer component in the canvas content");
95120
+ return content;
95121
+ }
95122
+ const data = prepareCollectionPlayerNodeData({ node: collectionPlayerNode, filesById, selectedItems });
95123
+ collectionPlayerNode.data = data;
95124
+ return content;
95125
+ }
95126
+ function prepareCollectionPlayerNodeData({
95127
+ selectedItems,
95128
+ filesById,
95129
+ node
95130
+ }) {
95131
+ const slides = parseContentSelectorToCollectionPlayerSlides({ selectedItems, filesById });
95132
+ const group = {
95133
+ id: v4(),
95134
+ name: "Shared Content",
95135
+ slides: slides.map((slide) => ({
95136
+ id: v4(),
95137
+ file_id: slide.file.id,
95138
+ index: slide.type === "slide" ? slide.slide.index : void 0
95139
+ }))
95140
+ };
95141
+ return {
95142
+ ...node?.data ?? {},
95143
+ name: "Sharebox Collection",
95144
+ groups: [group]
95145
+ };
95146
+ }
94688
95147
  function isMultimediaDataWithTheme(obj, value) {
94689
95148
  return obj && obj.type === "Multimedia" && obj.theme_meta && typeof value === "object" && value !== null;
94690
95149
  }
@@ -95225,118 +95684,120 @@ const _hoisted_9$O = {
95225
95684
  class: "flex items-center space-x-1 ml-2"
95226
95685
  };
95227
95686
  const _hoisted_10$C = { class: "flex items-center" };
95228
- const _hoisted_11$x = { key: 0 };
95229
- const _hoisted_12$p = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
95230
- const _hoisted_13$k = { class: "pa-2 max-h-[300px] overflow-y-auto" };
95231
- const _hoisted_14$h = {
95687
+ const _hoisted_11$x = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
95688
+ const _hoisted_12$p = { class: "pa-2 max-h-[300px] overflow-y-auto" };
95689
+ const _hoisted_13$k = {
95232
95690
  key: 0,
95233
95691
  class: "flex items-center ml-2"
95234
95692
  };
95235
- const _hoisted_15$f = {
95236
- key: 2,
95693
+ const _hoisted_14$h = { class: "flex items-center" };
95694
+ const _hoisted_15$f = { class: "c-select-filter__popover w-[350px] rounded flex flex-col bg-base" };
95695
+ const _hoisted_16$e = { class: "pa-2 max-h-[300px] overflow-y-auto" };
95696
+ const _hoisted_17$c = {
95697
+ key: 0,
95237
95698
  class: "flex items-center ml-2"
95238
95699
  };
95239
- const _hoisted_16$e = { class: "flex flex-col w-full flex-1 min-h-0" };
95240
- const _hoisted_17$c = {
95700
+ const _hoisted_18$a = { class: "flex flex-col w-full flex-1 min-h-0" };
95701
+ const _hoisted_19$a = {
95241
95702
  key: 0,
95242
95703
  class: "flex-1 overflow-y-auto bg-white w-full pl-1 pr-6 py-0"
95243
95704
  };
95244
- const _hoisted_18$a = { class: "space-y-1 mt-4" };
95245
- const _hoisted_19$a = ["onClick"];
95246
- const _hoisted_20$9 = { class: "text-sm text-gray-700" };
95247
- const _hoisted_21$7 = { class: "flex items-center mb-0" };
95248
- const _hoisted_22$5 = { class: "text-sm font-bold text-gray-700" };
95249
- const _hoisted_23$5 = ["onClick"];
95250
- const _hoisted_24$5 = {
95705
+ const _hoisted_20$9 = { class: "space-y-1 mt-4" };
95706
+ const _hoisted_21$7 = ["onClick"];
95707
+ const _hoisted_22$5 = { class: "text-sm text-gray-700" };
95708
+ const _hoisted_23$5 = { class: "flex items-center mb-0" };
95709
+ const _hoisted_24$5 = { class: "text-sm font-bold text-gray-700" };
95710
+ const _hoisted_25$5 = ["onClick"];
95711
+ const _hoisted_26$5 = {
95251
95712
  key: 0,
95252
95713
  class: "relative mr-4"
95253
95714
  };
95254
- const _hoisted_25$5 = {
95715
+ const _hoisted_27$5 = {
95255
95716
  key: 0,
95256
95717
  class: "absolute inset-0 flex items-center justify-center bg-gray-200 bg-opacity-75 border-rounded-1"
95257
95718
  };
95258
- const _hoisted_26$5 = {
95719
+ const _hoisted_28$5 = {
95259
95720
  key: 1,
95260
95721
  class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
95261
95722
  };
95262
- const _hoisted_27$5 = { class: "flex-1 min-w-0" };
95263
- const _hoisted_28$5 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95264
- const _hoisted_29$5 = { class: "text-xs text-gray-500" };
95265
- const _hoisted_30$4 = {
95723
+ const _hoisted_29$5 = { class: "flex-1 min-w-0" };
95724
+ const _hoisted_30$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95725
+ const _hoisted_31$4 = { class: "text-xs text-gray-500" };
95726
+ const _hoisted_32$4 = {
95266
95727
  key: 1,
95267
95728
  class: "flex-1 overflow-y-auto bg-white w-full"
95268
95729
  };
95269
- const _hoisted_31$4 = { class: "w-full px-0" };
95270
- const _hoisted_32$4 = {
95730
+ const _hoisted_33$4 = { class: "w-full px-0" };
95731
+ const _hoisted_34$4 = {
95271
95732
  key: 0,
95272
95733
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95273
95734
  };
95274
- const _hoisted_33$4 = {
95735
+ const _hoisted_35$4 = {
95275
95736
  key: 0,
95276
95737
  class: "mb-0"
95277
95738
  };
95278
- const _hoisted_34$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95279
- const _hoisted_35$4 = { class: "text-m font-semibold text-gray-900" };
95280
- const _hoisted_36$4 = { class: "ml-2 text-sm text-gray-500" };
95281
- const _hoisted_37$4 = ["data-result-selected", "onClick"];
95282
- const _hoisted_38$4 = {
95739
+ const _hoisted_36$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95740
+ const _hoisted_37$4 = { class: "text-m font-semibold text-gray-900" };
95741
+ const _hoisted_38$4 = { class: "ml-2 text-sm text-gray-500" };
95742
+ const _hoisted_39$4 = ["data-result-selected", "onClick"];
95743
+ const _hoisted_40$4 = {
95283
95744
  key: 1,
95284
95745
  class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
95285
95746
  };
95286
- const _hoisted_39$4 = { class: "flex-1 min-w-0" };
95287
- const _hoisted_40$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95288
- const _hoisted_41$4 = ["innerHTML"];
95289
- const _hoisted_42$4 = { class: "text-xs text-gray-500" };
95290
- const _hoisted_43$4 = { class: "text-xs text-gray-400" };
95291
- const _hoisted_44$4 = {
95747
+ const _hoisted_41$4 = { class: "flex-1 min-w-0" };
95748
+ const _hoisted_42$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95749
+ const _hoisted_43$4 = ["innerHTML"];
95750
+ const _hoisted_44$4 = { class: "text-xs text-gray-500" };
95751
+ const _hoisted_45$4 = { class: "text-xs text-gray-400" };
95752
+ const _hoisted_46$4 = {
95292
95753
  key: 0,
95293
95754
  class: "px-0 py-0"
95294
95755
  };
95295
- const _hoisted_45$4 = { key: 1 };
95296
- const _hoisted_46$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95297
- const _hoisted_47$4 = { class: "text-m font-semibold text-gray-900" };
95298
- const _hoisted_48$4 = { class: "ml-2 text-sm text-gray-500" };
95299
- const _hoisted_49$4 = ["data-result-selected", "onClick"];
95300
- 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" };
95301
- const _hoisted_51$3 = { class: "flex-1 min-w-0" };
95302
- const _hoisted_52$3 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95303
- const _hoisted_53$3 = { class: "text-xs text-gray-500" };
95304
- const _hoisted_54$2 = { class: "text-xs text-gray-400" };
95305
- const _hoisted_55$2 = {
95756
+ const _hoisted_47$4 = { key: 1 };
95757
+ const _hoisted_48$4 = { class: "flex items-center px-0 pt-2 pb-1" };
95758
+ const _hoisted_49$4 = { class: "text-m font-semibold text-gray-900" };
95759
+ const _hoisted_50$4 = { class: "ml-2 text-sm text-gray-500" };
95760
+ const _hoisted_51$3 = ["data-result-selected", "onClick"];
95761
+ const _hoisted_52$3 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
95762
+ const _hoisted_53$3 = { class: "flex-1 min-w-0" };
95763
+ const _hoisted_54$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95764
+ const _hoisted_55$2 = { class: "text-xs text-gray-500" };
95765
+ const _hoisted_56$2 = { class: "text-xs text-gray-400" };
95766
+ const _hoisted_57$2 = {
95306
95767
  key: 0,
95307
95768
  class: "px-0 py-0"
95308
95769
  };
95309
- const _hoisted_56$2 = {
95770
+ const _hoisted_58$2 = {
95310
95771
  key: 2,
95311
95772
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95312
95773
  };
95313
- const _hoisted_57$2 = {
95774
+ const _hoisted_59$2 = {
95314
95775
  key: 2,
95315
95776
  class: "flex-1 overflow-y-auto bg-white w-full"
95316
95777
  };
95317
- const _hoisted_58$2 = { class: "w-full px-0" };
95318
- const _hoisted_59$2 = {
95778
+ const _hoisted_60$2 = { class: "w-full px-0" };
95779
+ const _hoisted_61$2 = {
95319
95780
  key: 0,
95320
95781
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95321
95782
  };
95322
- const _hoisted_60$2 = { class: "flex items-center px-0 pt-2 pb-1" };
95323
- const _hoisted_61$2 = { class: "text-m font-semibold text-gray-900" };
95324
- const _hoisted_62$2 = { class: "ml-2 text-sm text-gray-500" };
95325
- const _hoisted_63$2 = ["data-result-selected", "onClick"];
95326
- const _hoisted_64$2 = {
95783
+ const _hoisted_62$2 = { class: "flex items-center px-0 pt-2 pb-1" };
95784
+ const _hoisted_63$2 = { class: "text-m font-semibold text-gray-900" };
95785
+ const _hoisted_64$2 = { class: "ml-2 text-sm text-gray-500" };
95786
+ const _hoisted_65$2 = ["data-result-selected", "onClick"];
95787
+ const _hoisted_66$2 = {
95327
95788
  key: 1,
95328
95789
  class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
95329
95790
  };
95330
- const _hoisted_65$2 = { class: "flex-1 min-w-0" };
95331
- const _hoisted_66$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95332
- const _hoisted_67$2 = ["innerHTML"];
95333
- const _hoisted_68$2 = { class: "text-xs text-gray-500" };
95334
- const _hoisted_69$1 = { class: "text-xs text-gray-400" };
95335
- const _hoisted_70$1 = {
95791
+ const _hoisted_67$2 = { class: "flex-1 min-w-0" };
95792
+ const _hoisted_68$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
95793
+ const _hoisted_69$1 = ["innerHTML"];
95794
+ const _hoisted_70$1 = { class: "text-xs text-gray-500" };
95795
+ const _hoisted_71$1 = { class: "text-xs text-gray-400" };
95796
+ const _hoisted_72$1 = {
95336
95797
  key: 0,
95337
95798
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
95338
95799
  };
95339
- const _hoisted_71$1 = {
95800
+ const _hoisted_73$1 = {
95340
95801
  key: 0,
95341
95802
  class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
95342
95803
  };
@@ -95360,9 +95821,10 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95360
95821
  const showRecentView = ref(true);
95361
95822
  const suggestionsDropdownRef = ref(null);
95362
95823
  const searchInputRef = ref(null);
95363
- const selectedFileTypes = ref([]);
95824
+ const selectedFileType = ref(null);
95364
95825
  const showFileTypeDropdown = ref(false);
95365
- const selectedCanvasFilters = ref([]);
95826
+ const selectedCanvasFilter = ref(null);
95827
+ const showCanvasTypeDropdown = ref(false);
95366
95828
  const fileTypeOptions = [
95367
95829
  { label: "Folder", value: "folder" },
95368
95830
  { label: "PDF", value: "pdf" },
@@ -95375,15 +95837,38 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95375
95837
  { label: "AR", value: "ar" },
95376
95838
  { label: "Web", value: "web" }
95377
95839
  ];
95378
- const hasActiveFilters = computed(() => selectedFileTypes.value.length > 0 || selectedCanvasFilters.value.length > 0);
95840
+ const canvasTypeOptions = computed(() => {
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);
95379
95864
  const clearAllFilters = () => {
95380
- selectedFileTypes.value = [];
95381
- selectedCanvasFilters.value = [];
95865
+ selectedFileType.value = null;
95866
+ selectedCanvasFilter.value = null;
95382
95867
  debouncedFilterSearch();
95383
95868
  };
95384
95869
  const handleEverywhereClick = async () => {
95385
- selectedFileTypes.value = [];
95386
- selectedCanvasFilters.value = [];
95870
+ selectedFileType.value = null;
95871
+ selectedCanvasFilter.value = null;
95387
95872
  searchType.value = null;
95388
95873
  if (searchQuery.value.trim()) {
95389
95874
  try {
@@ -95539,6 +96024,44 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95539
96024
  }
95540
96025
  return canvasResults.value;
95541
96026
  });
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 || selectedFileType.value !== null;
96061
+ });
96062
+ const hasCanvasFilters = computed(() => {
96063
+ return visibleCanvasTypeOptions.value.length > 0 || selectedCanvasFilter.value !== null;
96064
+ });
95542
96065
  const shouldShowNoResults = computed(() => {
95543
96066
  if (showRecentView.value || !searchQuery.value.trim() || isSearching.value || !hasSearchCompleted.value) return false;
95544
96067
  if (searchType.value === "content") {
@@ -95651,32 +96174,18 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95651
96174
  "ar",
95652
96175
  "web"
95653
96176
  ];
95654
- const validCanvasFilters = selectedCanvasFilters.value.filter((f) => ALLOWED_CANVAS_TYPES.includes(f));
95655
- if (selectedCanvasFilters.value.length > 0 && validCanvasFilters.length === 0) {
95656
- console.warn(
95657
- "[CAlgoliaSearch] All selected canvas filters are invalid and were removed:",
95658
- selectedCanvasFilters.value
95659
- );
95660
- selectedCanvasFilters.value = [];
95661
- } else if (validCanvasFilters.length < selectedCanvasFilters.value.length) {
95662
- const removedFilters = selectedCanvasFilters.value.filter((f) => !validCanvasFilters.includes(f));
95663
- console.warn("[CAlgoliaSearch] Some canvas filters were invalid and removed:", removedFilters);
95664
- selectedCanvasFilters.value = validCanvasFilters;
95665
- }
95666
- const canvasFilters = validCanvasFilters.length > 0 ? ` AND (${validCanvasFilters.map((filter) => `content_type:"${filter}"`).join(" OR ")})` : "";
95667
- const validFileTypes = selectedFileTypes.value.filter((t2) => ALLOWED_FILE_TYPES.includes(t2));
95668
- if (selectedFileTypes.value.length > 0 && validFileTypes.length === 0) {
95669
- console.warn(
95670
- "[CAlgoliaSearch] All selected file type filters are invalid and were removed:",
95671
- selectedFileTypes.value
95672
- );
95673
- selectedFileTypes.value = [];
95674
- } else if (validFileTypes.length < selectedFileTypes.value.length) {
95675
- const removedFilters = selectedFileTypes.value.filter((t2) => !validFileTypes.includes(t2));
95676
- console.warn("[CAlgoliaSearch] Some file type filters were invalid and removed:", removedFilters);
95677
- selectedFileTypes.value = validFileTypes;
95678
- }
95679
- const contentFilters = validFileTypes.length > 0 ? ` AND (${validFileTypes.map((type) => type === "folder" ? `type:"${type}"` : `file_category:"${type}"`).join(" OR ")})` : "";
96177
+ const validCanvasFilter = selectedCanvasFilter.value && ALLOWED_CANVAS_TYPES.includes(selectedCanvasFilter.value) ? selectedCanvasFilter.value : null;
96178
+ if (selectedCanvasFilter.value && !validCanvasFilter) {
96179
+ console.warn("[CAlgoliaSearch] Selected canvas filter is invalid and was removed:", selectedCanvasFilter.value);
96180
+ selectedCanvasFilter.value = null;
96181
+ }
96182
+ const canvasFilters = validCanvasFilter ? ` AND content_type:"${validCanvasFilter}"` : "";
96183
+ const validFileType = selectedFileType.value && ALLOWED_FILE_TYPES.includes(selectedFileType.value) ? selectedFileType.value : null;
96184
+ if (selectedFileType.value && !validFileType) {
96185
+ console.warn("[CAlgoliaSearch] Selected file type filter is invalid and was removed:", selectedFileType.value);
96186
+ selectedFileType.value = null;
96187
+ }
96188
+ const contentFilters = validFileType ? ` AND ${validFileType === "folder" ? `type:"${validFileType}"` : `file_category:"${validFileType}"`}` : "";
95680
96189
  const results = await searchViaBackend(query.trim(), {
95681
96190
  canvas: canvasFilters,
95682
96191
  content: contentFilters
@@ -95892,40 +96401,30 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95892
96401
  }
95893
96402
  const emIndex = highlightValue.indexOf("<em>");
95894
96403
  if (emIndex === -1) return "";
95895
- const startChar = Math.max(0, emIndex - 100);
95896
- const endChar = Math.min(highlightValue.length, emIndex + 100);
96404
+ const startChar = Math.max(0, emIndex - 75);
96405
+ const endChar = Math.min(highlightValue.length, emIndex + 125);
95897
96406
  let truncated = highlightValue.substring(startChar, endChar);
95898
96407
  if (startChar > 0) truncated = "..." + truncated;
95899
96408
  if (endChar < highlightValue.length) truncated = truncated + "...";
95900
96409
  return sanitizeHtml(truncated);
95901
96410
  };
95902
- const toggleCanvasFilter = (filterType) => {
95903
- if (selectedCanvasFilters.value.includes(filterType)) {
95904
- selectedCanvasFilters.value.splice(selectedCanvasFilters.value.indexOf(filterType), 1);
95905
- } else {
95906
- selectedCanvasFilters.value.push(filterType);
95907
- }
96411
+ const handleCanvasTypeChange = (value) => {
96412
+ selectedCanvasFilter.value = value;
96413
+ showCanvasTypeDropdown.value = false;
95908
96414
  debouncedFilterSearch();
95909
96415
  };
95910
- const clearCanvasFilters = () => {
95911
- selectedCanvasFilters.value = [];
96416
+ const clearCanvasFilter = () => {
96417
+ selectedCanvasFilter.value = null;
96418
+ showCanvasTypeDropdown.value = false;
95912
96419
  debouncedFilterSearch();
95913
96420
  };
95914
- const toggleFileType = (fileType, checked) => {
95915
- if (checked) {
95916
- if (!selectedFileTypes.value.includes(fileType)) {
95917
- selectedFileTypes.value.push(fileType);
95918
- }
95919
- } else {
95920
- const index = selectedFileTypes.value.indexOf(fileType);
95921
- if (index > -1) {
95922
- selectedFileTypes.value.splice(index, 1);
95923
- }
95924
- }
96421
+ const handleFileTypeChange = (value) => {
96422
+ selectedFileType.value = value;
96423
+ showFileTypeDropdown.value = false;
95925
96424
  debouncedFilterSearch();
95926
96425
  };
95927
- const clearFileTypes = () => {
95928
- selectedFileTypes.value = [];
96426
+ const clearFileType = () => {
96427
+ selectedFileType.value = null;
95929
96428
  showFileTypeDropdown.value = false;
95930
96429
  debouncedFilterSearch();
95931
96430
  };
@@ -96094,7 +96593,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96094
96593
  show: "",
96095
96594
  verticalAlignment: "top",
96096
96595
  "z-index": _ctx.zIndex,
96097
- "onUpdate:show": _cache[16] || (_cache[16] = ($event) => emit("toggleSearch", $event))
96596
+ "onUpdate:show": _cache[14] || (_cache[14] = ($event) => emit("toggleSearch", $event))
96098
96597
  }, {
96099
96598
  default: withCtx(() => [
96100
96599
  createElementVNode("div", {
@@ -96103,7 +96602,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96103
96602
  }, [
96104
96603
  createElementVNode("div", _hoisted_1$4w, [
96105
96604
  createElementVNode("div", _hoisted_2$3j, [
96106
- _cache[17] || (_cache[17] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96605
+ _cache[15] || (_cache[15] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96107
96606
  createElementVNode("i", { class: "c-icon far fa-search text-gray-400 text-l" })
96108
96607
  ], -1)),
96109
96608
  withDirectives(createElementVNode("input", {
@@ -96200,7 +96699,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96200
96699
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.tabs.pitchDecks")), 1)
96201
96700
  ], 2)) : createCommentVNode("", true)
96202
96701
  ]),
96203
- searchType.value ? (openBlock(), createElementBlock("div", _hoisted_9$O, [
96702
+ searchType.value && (searchType.value === "content" && hasContentFilters.value || searchType.value === "canvases" && hasCanvasFilters.value) ? (openBlock(), createElementBlock("div", _hoisted_9$O, [
96204
96703
  searchType.value === "content" ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
96205
96704
  createVNode(unref(NPopover), {
96206
96705
  class: "c-select-filter",
@@ -96215,53 +96714,53 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96215
96714
  createVNode(unref(NTag), {
96216
96715
  class: "select-none cursor-pointer",
96217
96716
  style: normalizeStyle({
96218
- "--n-color": selectedFileTypes.value.length ? "var(--p-primary5)" : "var(--p-primary6)",
96717
+ "--n-color": selectedFileType.value ? "var(--p-primary5)" : "var(--p-primary6)",
96219
96718
  "--n-border": "1px solid var(--p-primary5)",
96220
96719
  "--n-height": "28px"
96221
96720
  }),
96222
96721
  themeOverrides: {
96223
96722
  borderRadius: "4px"
96224
96723
  },
96225
- onClick: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
96724
+ onClick: _cache[6] || (_cache[6] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
96226
96725
  }, {
96227
96726
  default: withCtx(() => [
96228
96727
  createElementVNode("div", _hoisted_10$C, [
96229
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
96230
- selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true),
96231
- selectedFileTypes.value.length ? (openBlock(), createBlock(CIcon, {
96232
- key: 1,
96233
- class: "ml-1",
96234
- color: "var(--p-primary2)",
96235
- icon: "xmark",
96236
- size: "12",
96237
- onClick: _cache[6] || (_cache[6] = withModifiers(($event) => selectedFileTypes.value = [], ["stop"]))
96238
- })) : createCommentVNode("", true)
96728
+ createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1)
96239
96729
  ])
96240
96730
  ]),
96241
96731
  _: 1
96242
96732
  }, 8, ["style"])
96243
96733
  ]),
96244
96734
  default: withCtx(() => [
96245
- createElementVNode("div", _hoisted_12$p, [
96246
- createElementVNode("div", _hoisted_13$k, [
96247
- (openBlock(), createElementBlock(Fragment, null, renderList(fileTypeOptions, (option) => {
96248
- return createElementVNode("div", {
96249
- key: option.value,
96250
- class: "w-full h-7 flex items-center"
96251
- }, [
96252
- createVNode(unref(NCheckbox), {
96253
- checked: selectedFileTypes.value.includes(option.value),
96254
- class: "px-2 truncate",
96255
- "onUpdate:checked": (v) => toggleFileType(option.value, v),
96256
- value: option.value
96257
- }, {
96258
- default: withCtx(() => [
96259
- createTextVNode(toDisplayString(option.label), 1)
96260
- ]),
96261
- _: 2
96262
- }, 1032, ["checked", "onUpdate:checked", "value"])
96263
- ]);
96264
- }), 64))
96735
+ createElementVNode("div", _hoisted_11$x, [
96736
+ createElementVNode("div", _hoisted_12$p, [
96737
+ createVNode(unref(NRadioGroup), {
96738
+ value: selectedFileType.value,
96739
+ "onUpdate:value": [
96740
+ _cache[7] || (_cache[7] = ($event) => selectedFileType.value = $event),
96741
+ handleFileTypeChange
96742
+ ]
96743
+ }, {
96744
+ default: withCtx(() => [
96745
+ (openBlock(true), createElementBlock(Fragment, null, renderList(visibleFileTypeOptions.value, (option) => {
96746
+ return openBlock(), createElementBlock("div", {
96747
+ key: option.value,
96748
+ class: "w-full h-7 flex items-center"
96749
+ }, [
96750
+ createVNode(unref(NRadio), {
96751
+ class: "px-2 truncate",
96752
+ value: option.value
96753
+ }, {
96754
+ default: withCtx(() => [
96755
+ createTextVNode(toDisplayString(option.label), 1)
96756
+ ]),
96757
+ _: 2
96758
+ }, 1032, ["value"])
96759
+ ]);
96760
+ }), 128))
96761
+ ]),
96762
+ _: 1
96763
+ }, 8, ["value"])
96265
96764
  ]),
96266
96765
  createElementVNode("div", {
96267
96766
  class: "pa-2",
@@ -96271,7 +96770,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96271
96770
  block: "",
96272
96771
  class: "pa-2",
96273
96772
  text: "",
96274
- onClick: clearFileTypes
96773
+ onClick: clearFileType
96275
96774
  }, {
96276
96775
  default: withCtx(() => [
96277
96776
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
@@ -96283,115 +96782,109 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96283
96782
  ]),
96284
96783
  _: 1
96285
96784
  }, 8, ["show"]),
96286
- hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_14$h, [
96287
- _cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96785
+ hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_13$k, [
96786
+ _cache[16] || (_cache[16] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96288
96787
  createElementVNode("span", {
96289
96788
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96290
96789
  onClick: clearAllFilters
96291
96790
  }, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
96292
96791
  ])) : createCommentVNode("", true)
96293
96792
  ], 64)) : searchType.value === "canvases" ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
96294
- !_ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
96295
- key: 0,
96296
- class: "select-none cursor-pointer",
96297
- style: normalizeStyle({
96298
- "--n-color": selectedCanvasFilters.value.includes("saved_canvas") ? "var(--p-primary5)" : "var(--p-primary6)",
96299
- "--n-border": "1px solid var(--p-primary5)",
96300
- "--n-height": "28px"
96301
- }),
96302
- themeOverrides: {
96303
- borderRadius: "4px"
96304
- },
96305
- onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("saved_canvas"))
96306
- }, {
96307
- default: withCtx(() => [
96308
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
96309
- ]),
96310
- _: 1
96311
- }, 8, ["style"])) : createCommentVNode("", true),
96312
- createVNode(unref(NTag), {
96313
- class: "select-none cursor-pointer",
96314
- style: normalizeStyle({
96315
- "--n-color": selectedCanvasFilters.value.includes("template") ? "var(--p-primary5)" : "var(--p-primary6)",
96316
- "--n-border": "1px solid var(--p-primary5)",
96317
- "--n-height": "28px"
96318
- }),
96319
- themeOverrides: {
96320
- borderRadius: "4px"
96321
- },
96322
- onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("template"))
96323
- }, {
96324
- default: withCtx(() => [
96325
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
96326
- ]),
96327
- _: 1
96328
- }, 8, ["style"]),
96329
- _ctx.isAdmin ? (openBlock(), createBlock(unref(NTag), {
96330
- key: 1,
96331
- class: "select-none cursor-pointer",
96332
- style: normalizeStyle({
96333
- "--n-color": selectedCanvasFilters.value.includes("product_template") ? "var(--p-primary5)" : "var(--p-primary6)",
96334
- "--n-border": "1px solid var(--p-primary5)",
96335
- "--n-height": "28px"
96336
- }),
96337
- themeOverrides: {
96338
- borderRadius: "4px"
96339
- },
96340
- onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("product_template"))
96341
- }, {
96342
- default: withCtx(() => [
96343
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates")), 1)
96344
- ]),
96345
- _: 1
96346
- }, 8, ["style"])) : createCommentVNode("", true),
96347
- createVNode(unref(NTag), {
96348
- class: "select-none cursor-pointer",
96349
- style: normalizeStyle({
96350
- "--n-color": selectedCanvasFilters.value.includes("section") ? "var(--p-primary5)" : "var(--p-primary6)",
96351
- "--n-border": "1px solid var(--p-primary5)",
96352
- "--n-height": "28px"
96353
- }),
96354
- themeOverrides: {
96355
- borderRadius: "4px"
96356
- },
96357
- onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("section"))
96793
+ createVNode(unref(NPopover), {
96794
+ class: "c-select-filter",
96795
+ placement: "bottom-start",
96796
+ raw: "",
96797
+ show: showCanvasTypeDropdown.value,
96798
+ "show-arrow": false,
96799
+ trigger: "manual",
96800
+ onClickoutside: _cache[11] || (_cache[11] = ($event) => showCanvasTypeDropdown.value = false)
96358
96801
  }, {
96359
- default: withCtx(() => [
96360
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 1)
96802
+ trigger: withCtx(() => [
96803
+ createVNode(unref(NTag), {
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"])
96361
96822
  ]),
96362
- _: 1
96363
- }, 8, ["style"]),
96364
- createVNode(unref(NTag), {
96365
- class: "select-none cursor-pointer",
96366
- style: normalizeStyle({
96367
- "--n-color": selectedCanvasFilters.value.includes("block") ? "var(--p-primary5)" : "var(--p-primary6)",
96368
- "--n-border": "1px solid var(--p-primary5)",
96369
- "--n-height": "28px"
96370
- }),
96371
- themeOverrides: {
96372
- borderRadius: "4px"
96373
- },
96374
- onClick: _cache[13] || (_cache[13] = ($event) => toggleCanvasFilter("block"))
96375
- }, {
96376
96823
  default: withCtx(() => [
96377
- createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 1)
96824
+ createElementVNode("div", _hoisted_15$f, [
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
+ ])
96378
96871
  ]),
96379
96872
  _: 1
96380
- }, 8, ["style"]),
96381
- selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15$f, [
96382
- _cache[19] || (_cache[19] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96873
+ }, 8, ["show"]),
96874
+ hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_17$c, [
96875
+ _cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96383
96876
  createElementVNode("span", {
96384
96877
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96385
- onClick: clearCanvasFilters
96878
+ onClick: clearAllFilters
96386
96879
  }, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.clear")), 1)
96387
96880
  ])) : createCommentVNode("", true)
96388
96881
  ], 64)) : createCommentVNode("", true)
96389
96882
  ])) : createCommentVNode("", true)
96390
96883
  ])) : createCommentVNode("", true)
96391
96884
  ]),
96392
- createElementVNode("div", _hoisted_16$e, [
96393
- showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_17$c, [
96394
- createElementVNode("div", _hoisted_18$a, [
96885
+ createElementVNode("div", _hoisted_18$a, [
96886
+ showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_19$a, [
96887
+ createElementVNode("div", _hoisted_20$9, [
96395
96888
  (openBlock(true), createElementBlock(Fragment, null, renderList(recentSearches.value, (search) => {
96396
96889
  return openBlock(), createElementBlock("div", {
96397
96890
  key: search,
@@ -96404,14 +96897,14 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96404
96897
  icon: "clock-rotate-left",
96405
96898
  size: "16"
96406
96899
  }),
96407
- createElementVNode("span", _hoisted_20$9, toDisplayString(search), 1)
96408
- ], 8, _hoisted_19$a);
96900
+ createElementVNode("span", _hoisted_22$5, toDisplayString(search), 1)
96901
+ ], 8, _hoisted_21$7);
96409
96902
  }), 128))
96410
96903
  ]),
96411
96904
  recentlyOpenedDocs.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
96412
- _cache[20] || (_cache[20] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96413
- createElementVNode("div", _hoisted_21$7, [
96414
- createElementVNode("span", _hoisted_22$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
96905
+ _cache[18] || (_cache[18] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96906
+ createElementVNode("div", _hoisted_23$5, [
96907
+ createElementVNode("span", _hoisted_24$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
96415
96908
  ]),
96416
96909
  createElementVNode("div", {
96417
96910
  class: normalizeClass(_ctx.isAdmin ? "space-y-2" : "space-y-0")
@@ -96425,7 +96918,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96425
96918
  ]),
96426
96919
  onClick: ($event) => handleRecentDocClick(doc, doc.type)
96427
96920
  }, [
96428
- doc.type === "file" ? (openBlock(), createElementBlock("div", _hoisted_24$5, [
96921
+ doc.type === "file" ? (openBlock(), createElementBlock("div", _hoisted_26$5, [
96429
96922
  createVNode(_sfc_main$6K, {
96430
96923
  class: "h-14 border-rounded-1 overflow-hidden flex-0",
96431
96924
  cover: "",
@@ -96434,7 +96927,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96434
96927
  src: recentThumbnails.value[doc.id] || "",
96435
96928
  width: "72"
96436
96929
  }, null, 8, ["file-data", "src"]),
96437
- isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div", _hoisted_25$5, [
96930
+ isLoadingThumbnails.value && !recentThumbnails.value[doc.id] ? (openBlock(), createElementBlock("div", _hoisted_27$5, [
96438
96931
  createVNode(CIcon, {
96439
96932
  class: "animate-spin",
96440
96933
  color: "var(--p-primary)",
@@ -96442,7 +96935,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96442
96935
  size: "20"
96443
96936
  })
96444
96937
  ])) : createCommentVNode("", true)
96445
- ])) : (openBlock(), createElementBlock("div", _hoisted_26$5, [
96938
+ ])) : (openBlock(), createElementBlock("div", _hoisted_28$5, [
96446
96939
  doc.type === "canvas" ? (openBlock(), createBlock(CIcon, {
96447
96940
  key: 0,
96448
96941
  color: "var(--p-text2)",
@@ -96455,33 +96948,33 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96455
96948
  size: "32"
96456
96949
  }))
96457
96950
  ])),
96458
- createElementVNode("div", _hoisted_27$5, [
96459
- createElementVNode("h3", _hoisted_28$5, toDisplayString(doc.name), 1),
96460
- createElementVNode("p", _hoisted_29$5, toDisplayString(doc.type === "canvas" ? formatCanvasType(doc.content_type) : doc.type === "folder" ? "Folder" : doc.file_category || "File"), 1)
96951
+ createElementVNode("div", _hoisted_29$5, [
96952
+ createElementVNode("h3", _hoisted_30$4, toDisplayString(doc.name), 1),
96953
+ createElementVNode("p", _hoisted_31$4, toDisplayString(doc.type === "canvas" ? formatCanvasType(doc.content_type) : doc.type === "folder" ? "Folder" : doc.file_category || "File"), 1)
96461
96954
  ])
96462
- ], 10, _hoisted_23$5);
96955
+ ], 10, _hoisted_25$5);
96463
96956
  }), 128))
96464
96957
  ], 2)
96465
96958
  ], 64)) : createCommentVNode("", true)
96466
- ])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_30$4, [
96467
- createElementVNode("div", _hoisted_31$4, [
96468
- isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
96959
+ ])) : !searchType.value ? (openBlock(), createElementBlock("div", _hoisted_32$4, [
96960
+ createElementVNode("div", _hoisted_33$4, [
96961
+ isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_34$4, [
96469
96962
  createVNode(CIcon, {
96470
96963
  class: "animate-spin text-6xl",
96471
96964
  color: "var(--p-primary)",
96472
96965
  icon: "spinner"
96473
96966
  })
96474
96967
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
96475
- filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_33$4, [
96476
- createElementVNode("div", _hoisted_34$4, [
96968
+ filteredContentFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_35$4, [
96969
+ createElementVNode("div", _hoisted_36$4, [
96477
96970
  createVNode(CIcon, {
96478
96971
  class: "mr-2",
96479
96972
  color: "var(--p-text2)",
96480
96973
  icon: "folder",
96481
96974
  size: "16"
96482
96975
  }),
96483
- createElementVNode("span", _hoisted_35$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
96484
- createElementVNode("span", _hoisted_36$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
96976
+ createElementVNode("span", _hoisted_37$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.content")), 1),
96977
+ createElementVNode("span", _hoisted_38$4, "(" + toDisplayString(filteredContentFiles.value.length) + ")", 1)
96485
96978
  ]),
96486
96979
  createElementVNode("div", null, [
96487
96980
  (openBlock(true), createElementBlock(Fragment, null, renderList(filteredContentFiles.value.slice(0, 5), (item) => {
@@ -96503,30 +96996,30 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96503
96996
  "object-fit": "cover",
96504
96997
  src: item.picture_url || "",
96505
96998
  width: "72"
96506
- }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_38$4, [
96999
+ }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_40$4, [
96507
97000
  createVNode(CIcon, {
96508
97001
  color: "var(--p-text2)",
96509
97002
  icon: "folder",
96510
97003
  size: "32"
96511
97004
  })
96512
97005
  ])),
96513
- createElementVNode("div", _hoisted_39$4, [
96514
- createElementVNode("h3", _hoisted_40$4, toDisplayString(item.name), 1),
97006
+ createElementVNode("div", _hoisted_41$4, [
97007
+ createElementVNode("h3", _hoisted_42$4, toDisplayString(item.name), 1),
96515
97008
  item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
96516
97009
  key: 0,
96517
97010
  class: "text-xs text-gray-600 mb-1",
96518
97011
  innerHTML: getSnippet(item)
96519
- }, null, 8, _hoisted_41$4)) : createCommentVNode("", true),
96520
- createElementVNode("p", _hoisted_42$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
97012
+ }, null, 8, _hoisted_43$4)) : createCommentVNode("", true),
97013
+ createElementVNode("p", _hoisted_44$4, toDisplayString(item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File"), 1)
96521
97014
  ]),
96522
- createElementVNode("div", _hoisted_43$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
96523
- ], 10, _hoisted_37$4);
97015
+ createElementVNode("div", _hoisted_45$4, toDisplayString(item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
97016
+ ], 10, _hoisted_39$4);
96524
97017
  }), 128))
96525
97018
  ]),
96526
- filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
97019
+ filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_46$4, [
96527
97020
  createElementVNode("span", {
96528
97021
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96529
- onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "content")
97022
+ onClick: _cache[12] || (_cache[12] = ($event) => searchType.value = "content")
96530
97023
  }, [
96531
97024
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96532
97025
  createVNode(CIcon, {
@@ -96537,16 +97030,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96537
97030
  ])
96538
97031
  ])) : createCommentVNode("", true)
96539
97032
  ])) : createCommentVNode("", true),
96540
- filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_45$4, [
96541
- createElementVNode("div", _hoisted_46$4, [
97033
+ filteredCanvasFiles.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_47$4, [
97034
+ createElementVNode("div", _hoisted_48$4, [
96542
97035
  createVNode(CIcon, {
96543
97036
  class: "mr-2",
96544
97037
  color: "var(--p-text2)",
96545
97038
  icon: "presentation",
96546
97039
  size: "16"
96547
97040
  }),
96548
- createElementVNode("span", _hoisted_47$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
96549
- createElementVNode("span", _hoisted_48$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
97041
+ createElementVNode("span", _hoisted_49$4, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
97042
+ createElementVNode("span", _hoisted_50$4, "(" + toDisplayString(filteredCanvasFiles.value.length) + ")", 1)
96550
97043
  ]),
96551
97044
  createElementVNode("div", null, [
96552
97045
  (openBlock(true), createElementBlock(Fragment, null, renderList(filteredCanvasFiles.value.slice(0, 5), (item) => {
@@ -96560,25 +97053,25 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96560
97053
  "data-result-selected": isResultSelected(item),
96561
97054
  onClick: ($event) => handleResultClick(item, "canvas")
96562
97055
  }, [
96563
- createElementVNode("div", _hoisted_50$4, [
97056
+ createElementVNode("div", _hoisted_52$3, [
96564
97057
  createVNode(CIcon, {
96565
97058
  color: "var(--p-text2)",
96566
97059
  icon: "presentation",
96567
97060
  size: "32"
96568
97061
  })
96569
97062
  ]),
96570
- createElementVNode("div", _hoisted_51$3, [
96571
- createElementVNode("h3", _hoisted_52$3, toDisplayString(item.name), 1),
96572
- createElementVNode("p", _hoisted_53$3, toDisplayString(formatCanvasType(item.content_type)), 1)
97063
+ createElementVNode("div", _hoisted_53$3, [
97064
+ createElementVNode("h3", _hoisted_54$2, toDisplayString(item.name), 1),
97065
+ createElementVNode("p", _hoisted_55$2, toDisplayString(formatCanvasType(item.content_type)), 1)
96573
97066
  ]),
96574
- createElementVNode("div", _hoisted_54$2, toDisplayString(item.folder?.name || ""), 1)
96575
- ], 10, _hoisted_49$4);
97067
+ createElementVNode("div", _hoisted_56$2, toDisplayString(item.folder?.name || ""), 1)
97068
+ ], 10, _hoisted_51$3);
96576
97069
  }), 128))
96577
97070
  ]),
96578
- filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
97071
+ filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_57$2, [
96579
97072
  createElementVNode("span", {
96580
97073
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96581
- onClick: _cache[15] || (_cache[15] = ($event) => searchType.value = "canvases")
97074
+ onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "canvases")
96582
97075
  }, [
96583
97076
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96584
97077
  createVNode(CIcon, {
@@ -96589,7 +97082,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96589
97082
  ])
96590
97083
  ])) : createCommentVNode("", true)
96591
97084
  ])) : createCommentVNode("", true),
96592
- searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_56$2, [
97085
+ searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_58$2, [
96593
97086
  createVNode(CIcon, {
96594
97087
  class: "text-6xl",
96595
97088
  color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
@@ -96602,16 +97095,16 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96602
97095
  ])) : createCommentVNode("", true)
96603
97096
  ], 64))
96604
97097
  ])
96605
- ])) : (openBlock(), createElementBlock("div", _hoisted_57$2, [
96606
- createElementVNode("div", _hoisted_58$2, [
96607
- isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_59$2, [
97098
+ ])) : (openBlock(), createElementBlock("div", _hoisted_59$2, [
97099
+ createElementVNode("div", _hoisted_60$2, [
97100
+ isSearching.value ? (openBlock(), createElementBlock("div", _hoisted_61$2, [
96608
97101
  createVNode(CIcon, {
96609
97102
  class: "animate-spin text-6xl",
96610
97103
  color: "var(--p-primary)",
96611
97104
  icon: "spinner"
96612
97105
  })
96613
97106
  ])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
96614
- createElementVNode("div", _hoisted_60$2, [
97107
+ createElementVNode("div", _hoisted_62$2, [
96615
97108
  searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
96616
97109
  key: 0,
96617
97110
  class: "mr-2",
@@ -96625,8 +97118,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96625
97118
  icon: "presentation",
96626
97119
  size: "16"
96627
97120
  })),
96628
- createElementVNode("span", _hoisted_61$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
96629
- createElementVNode("span", _hoisted_62$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
97121
+ createElementVNode("span", _hoisted_63$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
97122
+ createElementVNode("span", _hoisted_64$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
96630
97123
  ]),
96631
97124
  createElementVNode("div", null, [
96632
97125
  (openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
@@ -96651,7 +97144,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96651
97144
  "object-fit": "cover",
96652
97145
  src: item.picture_url || "",
96653
97146
  width: "72"
96654
- }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_64$2, [
97147
+ }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_66$2, [
96655
97148
  searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
96656
97149
  key: 0,
96657
97150
  color: "var(--p-text2)",
@@ -96664,20 +97157,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96664
97157
  size: "32"
96665
97158
  }))
96666
97159
  ])),
96667
- createElementVNode("div", _hoisted_65$2, [
96668
- createElementVNode("h3", _hoisted_66$2, toDisplayString(item.name), 1),
97160
+ createElementVNode("div", _hoisted_67$2, [
97161
+ createElementVNode("h3", _hoisted_68$2, toDisplayString(item.name), 1),
96669
97162
  searchType.value === "content" && item.type === "file" && getSnippet(item) ? (openBlock(), createElementBlock("p", {
96670
97163
  key: 0,
96671
97164
  class: "text-xs text-gray-600 mb-1",
96672
97165
  innerHTML: getSnippet(item)
96673
- }, null, 8, _hoisted_67$2)) : createCommentVNode("", true),
96674
- 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)
97166
+ }, null, 8, _hoisted_69$1)) : createCommentVNode("", true),
97167
+ createElementVNode("p", _hoisted_70$1, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.file_category || item.content_type || "File" : formatCanvasType(item.content_type)), 1)
96675
97168
  ]),
96676
- createElementVNode("div", _hoisted_69$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
96677
- ], 10, _hoisted_63$2);
97169
+ createElementVNode("div", _hoisted_71$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
97170
+ ], 10, _hoisted_65$2);
96678
97171
  }), 128))
96679
97172
  ]),
96680
- searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_70$1, [
97173
+ searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_72$1, [
96681
97174
  createVNode(CIcon, {
96682
97175
  class: "text-6xl",
96683
97176
  color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
@@ -96692,7 +97185,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96692
97185
  ])
96693
97186
  ]))
96694
97187
  ]),
96695
- !showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_71$1, [
97188
+ !showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_73$1, [
96696
97189
  createVNode(CShortcut, null, {
96697
97190
  default: withCtx(() => [
96698
97191
  createVNode(CShortcutIcon, { icon: "arrow-up" }),
@@ -96734,7 +97227,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96734
97227
  }
96735
97228
  });
96736
97229
 
96737
- const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-052f4440"]]);
97230
+ const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-de3f39f7"]]);
96738
97231
 
96739
97232
  const BulletListExtended = BulletList.extend({
96740
97233
  addOptions() {
@@ -132254,44 +132747,6 @@ const _sfc_main$3o = /* @__PURE__ */ defineComponent({
132254
132747
  }
132255
132748
  });
132256
132749
 
132257
- const getDefaultNewGroupName$1 = (t) => t("canvasUI.collectionSelector.defaultNewGroupName");
132258
- const getDefaultGroupName$1 = (t) => t("canvasUI.collectionSelector.defaultGroupName");
132259
- const getDefaultCollectionName = (t) => t("canvasUI.collectionSelector.defaultCollectionName");
132260
- const generateNewEmptyGroup$2 = (t) => ({
132261
- id: v4(),
132262
- name: getDefaultNewGroupName$1(t),
132263
- slides: []
132264
- });
132265
- const generateNewCollection$2 = (t) => ({
132266
- name: t("canvasUI.collectionSelector.defaultNewCollectionName"),
132267
- groups: [generateNewEmptyGroup$2(t)]
132268
- });
132269
- const generateNewCollectionSlide = (payload) => ({
132270
- ...payload,
132271
- id: v4(),
132272
- type: "slide"
132273
- });
132274
- const generateNewCollectionFile = (file) => ({
132275
- id: v4(),
132276
- type: "file",
132277
- file
132278
- });
132279
- const getUniqueFilesCount = (data) => {
132280
- const fileIds = data.groups.flatMap(
132281
- (group) => group.slides.map((slide) => {
132282
- if (slide.file?.id) {
132283
- return slide.file.id;
132284
- } else if (slide.file_id) {
132285
- return slide.file_id;
132286
- }
132287
- return null;
132288
- }).filter(Boolean)
132289
- );
132290
- return new Set(fileIds).size;
132291
- };
132292
- const getGroupsCount = (data) => data.groups.length;
132293
- const getSlidesCount = (data) => data.groups.reduce((acc, group) => acc + group.slides.length, 0);
132294
-
132295
132750
  const useCollectionSelector = (selectCollectionPlayerContent) => {
132296
132751
  const { updateNodeDataById, setComponentSettingsMode, contentRef, onCollectionPlayerContentChange } = useCanvas$1();
132297
132752
  const trackContentChange = (id, data) => {
@@ -132690,7 +133145,7 @@ const _sfc_main$3n = /* @__PURE__ */ defineComponent({
132690
133145
  } else {
132691
133146
  let withData = void 0;
132692
133147
  if (selection.type === ComponentTypes.CollectionPlayer) {
132693
- withData = generateNewCollection$2(t);
133148
+ withData = generateNewCollection$1(t);
132694
133149
  }
132695
133150
  addComponentAtParentId(
132696
133151
  selection.type,
@@ -139520,353 +139975,6 @@ const _sfc_main$2S = /* @__PURE__ */ defineComponent({
139520
139975
 
139521
139976
  const CollectionPlayerApp = /* @__PURE__ */ _export_sfc(_sfc_main$2S, [["__scopeId", "data-v-1c2ca5d7"]]);
139522
139977
 
139523
- const generateNewCollection$1 = (t) => ({
139524
- name: t("canvasUI.collectionSelector.defaultNewCollectionName"),
139525
- groups: [],
139526
- hide_footer: false
139527
- });
139528
- const generateNewCollectionStructure = () => ({ name: "", groups: [] });
139529
- const getUniqueSlides = (uniqueSlides, newSlides) => [
139530
- ...uniqueSlides,
139531
- ...newSlides.filter(
139532
- (newSlide) => !uniqueSlides.some(
139533
- (uniqueSlide) => newSlide.type === "slide" && uniqueSlide.type === "slide" && uniqueSlide.file.id === newSlide.file.id && uniqueSlide.slide.index === newSlide.slide.index
139534
- )
139535
- )
139536
- ];
139537
-
139538
- function parsePptxFileToCollectionPlayer(t, _file) {
139539
- const metadataSections = _file?.metadata?.pptx_data?.sections ?? [];
139540
- const sections = metadataSections.length || _file.content_thumbnails.length === 0 ? metadataSections : [{ start: 0, end: _file.content_thumbnails.length - 1, name: null }];
139541
- const sectionGroups = sections.map((section) => ({
139542
- name: section.name ?? (_file.name || getDefaultGroupName$1(t)),
139543
- slides: _file.content_thumbnails.slice(section.start, section.end + 1).map((url, index) => ({ url, index: section.start + index }))
139544
- }));
139545
- const file = {
139546
- id: _file.id,
139547
- pspdfkit_auth_payload: _file.pspdfkit_auth_payload,
139548
- pspdfkit_document_id: _file.pspdfkit_document_id,
139549
- pspdfkit_server_url: _file.pspdfkit_server_url,
139550
- content_type: _file.content_type,
139551
- content_url: _file.content_url,
139552
- permissions: _file.permissions,
139553
- thumbnail_url: _file.thumbnail_url ?? null,
139554
- name: _file.name,
139555
- type: _file.type,
139556
- metadata: _file.metadata
139557
- };
139558
- return {
139559
- name: file.name ?? getDefaultGroupName$1(t),
139560
- groups: sectionGroups.map((section) => ({
139561
- ...generateNewEmptyGroup$2(t),
139562
- name: section.name,
139563
- slides: section.slides.map(
139564
- (slide) => generateNewCollectionSlide({
139565
- file,
139566
- slide
139567
- })
139568
- )
139569
- }))
139570
- };
139571
- }
139572
- function parsePdfFileToCollectionPlayer(t, file) {
139573
- const slides = file.content_thumbnails.map(
139574
- (url, index) => generateNewCollectionSlide({
139575
- file: {
139576
- id: file.id,
139577
- pspdfkit_auth_payload: file.pspdfkit_auth_payload,
139578
- pspdfkit_document_id: file.pspdfkit_document_id,
139579
- pspdfkit_server_url: file.pspdfkit_server_url,
139580
- content_type: file.content_type,
139581
- content_url: file.content_url,
139582
- permissions: file.permissions,
139583
- thumbnail_url: file.thumbnail_url ?? null,
139584
- name: file.name,
139585
- type: file.type,
139586
- metadata: file.metadata
139587
- },
139588
- slide: {
139589
- index,
139590
- url
139591
- }
139592
- })
139593
- );
139594
- return {
139595
- name: file.name ?? getDefaultCollectionName(t),
139596
- groups: [
139597
- {
139598
- ...generateNewEmptyGroup$2(t),
139599
- name: file.name ?? getDefaultGroupName$1(t),
139600
- slides
139601
- }
139602
- ]
139603
- };
139604
- }
139605
- function parseFileToCollectionPlayer(t, file) {
139606
- if (file.content_type === "pdf") {
139607
- if (file.original_extension === "pptx" || file.metadata?.pptx_data?.sections?.length) {
139608
- return parsePptxFileToCollectionPlayer(t, file);
139609
- }
139610
- return parsePdfFileToCollectionPlayer(t, file);
139611
- }
139612
- return {
139613
- name: file.name ?? getDefaultCollectionName(t),
139614
- groups: [
139615
- {
139616
- ...generateNewEmptyGroup$2(t),
139617
- name: file.name ?? getDefaultGroupName$1(t),
139618
- slides: [
139619
- generateNewCollectionFile({
139620
- id: file.id,
139621
- pspdfkit_auth_payload: file.pspdfkit_auth_payload,
139622
- pspdfkit_document_id: file.pspdfkit_document_id,
139623
- pspdfkit_server_url: file.pspdfkit_server_url,
139624
- content_type: file.content_type,
139625
- content_url: file.content_url,
139626
- permissions: file.permissions,
139627
- thumbnail_url: file.thumbnail_url ?? null,
139628
- name: file.name,
139629
- type: file.type,
139630
- metadata: file.metadata
139631
- })
139632
- ]
139633
- }
139634
- ]
139635
- };
139636
- }
139637
- function parseContentSelectorToCollectionPlayerSlides({
139638
- selectedItems,
139639
- filesById
139640
- }) {
139641
- return selectedItems.reduce((acc, item) => {
139642
- if (item.type === "file") {
139643
- if (filesById[item.id].content_type === "pdf") {
139644
- const pages = filesById[item.id].content_thumbnails.map(
139645
- (contentThumbnail, index) => generateNewCollectionSlide({
139646
- file: {
139647
- id: item.id,
139648
- pspdfkit_auth_payload: filesById[item.id].pspdfkit_auth_payload,
139649
- pspdfkit_document_id: filesById[item.id].pspdfkit_document_id,
139650
- pspdfkit_server_url: filesById[item.id].pspdfkit_server_url,
139651
- content_type: filesById[item.id].content_type,
139652
- content_url: filesById[item.id].content_url,
139653
- permissions: item.permissions,
139654
- thumbnail_url: item.thumbnail_url ?? null,
139655
- name: item.name,
139656
- type: filesById[item.id].type,
139657
- metadata: item.metadata
139658
- },
139659
- slide: {
139660
- index,
139661
- url: contentThumbnail
139662
- }
139663
- })
139664
- );
139665
- return getUniqueSlides(acc, pages);
139666
- }
139667
- return [
139668
- ...acc,
139669
- generateNewCollectionFile({
139670
- id: item.id,
139671
- pspdfkit_auth_payload: filesById[item.id].pspdfkit_auth_payload,
139672
- pspdfkit_document_id: filesById[item.id].pspdfkit_document_id,
139673
- pspdfkit_server_url: filesById[item.id].pspdfkit_server_url,
139674
- content_type: filesById[item.id].content_type,
139675
- content_url: filesById[item.id].content_url,
139676
- permissions: item.permissions,
139677
- thumbnail_url: filesById[item.id].thumbnail_url,
139678
- name: item.name,
139679
- type: filesById[item.id].type,
139680
- metadata: item.metadata
139681
- })
139682
- ];
139683
- }
139684
- return getUniqueSlides(acc, [
139685
- generateNewCollectionSlide({
139686
- file: {
139687
- id: item.file.id,
139688
- pspdfkit_auth_payload: filesById[item.file.id].pspdfkit_auth_payload,
139689
- pspdfkit_document_id: filesById[item.file.id].pspdfkit_document_id,
139690
- pspdfkit_server_url: filesById[item.file.id].pspdfkit_server_url,
139691
- content_type: filesById[item.file.id].content_type,
139692
- content_url: filesById[item.file.id].content_url,
139693
- permissions: item.permissions,
139694
- thumbnail_url: item.thumbnail_url ?? null,
139695
- name: item.file.name,
139696
- type: filesById[item.file.id].type,
139697
- metadata: filesById[item.file.id].metadata
139698
- },
139699
- slide: {
139700
- index: item.page_index,
139701
- url: item.thumbnail_url ?? null
139702
- }
139703
- })
139704
- ]);
139705
- }, []);
139706
- }
139707
- function parseCollectionPlayerSlidesToContentSelector(slides) {
139708
- if (!slides?.length) return [];
139709
- return slides.reduce((acc, item) => {
139710
- let selection = null;
139711
- if ("file_id" in item) {
139712
- const v2Item = item;
139713
- if (!v2Item.file_id) {
139714
- return acc;
139715
- }
139716
- if (typeof v2Item.index === "number") {
139717
- selection = {
139718
- fileId: v2Item.file_id,
139719
- type: "page",
139720
- pageIndex: v2Item.index
139721
- };
139722
- } else {
139723
- selection = {
139724
- fileId: v2Item.file_id,
139725
- type: "file"
139726
- };
139727
- }
139728
- } else {
139729
- const v1Item = item;
139730
- const fileId = v1Item.file?.id;
139731
- if (!fileId) {
139732
- return acc;
139733
- }
139734
- if (v1Item.type === "slide") {
139735
- selection = {
139736
- fileId,
139737
- type: "page",
139738
- pageIndex: v1Item.slide.index
139739
- };
139740
- } else {
139741
- selection = {
139742
- fileId,
139743
- type: "file"
139744
- };
139745
- }
139746
- }
139747
- return [...acc, selection];
139748
- }, []);
139749
- }
139750
- function transformFilesToCollectionPlayer(t, filesData, name = "Collection") {
139751
- if (!Array.isArray(filesData)) {
139752
- throw new Error("Expected an array of files");
139753
- }
139754
- const groups = filesData.reduce((acc, fileData, index) => {
139755
- try {
139756
- const fileId = fileData.id;
139757
- const fileName = fileData.name || `File ${index + 1}`;
139758
- const selectedPages = fileData.selectedPages;
139759
- if (!fileId) {
139760
- return acc;
139761
- }
139762
- let slidesToCreate = [];
139763
- if (selectedPages && Array.isArray(selectedPages) && selectedPages.length > 0) {
139764
- slidesToCreate = selectedPages.map((pageIndex) => ({
139765
- id: `${fileId}-slide-${pageIndex}`,
139766
- file_id: fileId,
139767
- index: pageIndex
139768
- }));
139769
- } else {
139770
- slidesToCreate = [
139771
- {
139772
- id: `${fileId}-file`,
139773
- file_id: fileId,
139774
- index: void 0
139775
- // undefined means entire file, not a specific page
139776
- }
139777
- ];
139778
- }
139779
- acc.push({
139780
- id: `group-${fileId}`,
139781
- name: fileName,
139782
- slides: slidesToCreate
139783
- });
139784
- return acc;
139785
- } catch (error) {
139786
- return acc;
139787
- }
139788
- }, []);
139789
- return {
139790
- name,
139791
- groups
139792
- };
139793
- }
139794
- function transformFilesToContentGrid(filesData) {
139795
- if (!Array.isArray(filesData)) {
139796
- throw new Error("Expected an array of files");
139797
- }
139798
- const items = filesData.reduce((acc, fileData) => {
139799
- try {
139800
- const fileId = fileData.id;
139801
- const selectedPages = fileData.selectedPages;
139802
- if (!fileId) {
139803
- return acc;
139804
- }
139805
- let itemsToCreate = [];
139806
- if (selectedPages && Array.isArray(selectedPages) && selectedPages.length > 0) {
139807
- itemsToCreate = selectedPages.map((pageIndex) => ({
139808
- file: {
139809
- id: fileId,
139810
- // ContentGrid will resolve these properties via data accessor or file resolution
139811
- name: fileData.name || `File ${fileId}`,
139812
- permissions: void 0,
139813
- // Will be resolved
139814
- tags: void 0,
139815
- // Will be resolved
139816
- content_url: void 0,
139817
- // Will be resolved
139818
- content_type: void 0,
139819
- // Will be resolved
139820
- content_extension: void 0,
139821
- // Will be resolved
139822
- expires_at: void 0
139823
- // Will be resolved
139824
- },
139825
- slide: {
139826
- index: pageIndex,
139827
- url: void 0
139828
- // Will be resolved from content_thumbnails
139829
- },
139830
- type: "slide"
139831
- }));
139832
- } else {
139833
- itemsToCreate = [
139834
- {
139835
- file: {
139836
- id: fileId,
139837
- // ContentGrid will resolve these properties via data accessor or file resolution
139838
- name: fileData.name || `File ${fileId}`,
139839
- thumbnail_url: null,
139840
- // Will be resolved
139841
- content_thumbnails: null,
139842
- // Will be resolved
139843
- content_url: null,
139844
- // Will be resolved - required for ContentGridFileProps but can be null
139845
- content_type: null,
139846
- // Will be resolved - required for ContentGridFileProps
139847
- content_extension: null,
139848
- // Will be resolved - required for ContentGridFileProps
139849
- content_length: void 0,
139850
- // Will be resolved
139851
- permissions: void 0,
139852
- // Will be resolved
139853
- expires_at: void 0,
139854
- // Will be resolved
139855
- tags: void 0
139856
- // Will be resolved
139857
- },
139858
- type: "file"
139859
- }
139860
- ];
139861
- }
139862
- return [...acc, ...itemsToCreate];
139863
- } catch (error) {
139864
- return acc;
139865
- }
139866
- }, []);
139867
- return { items };
139868
- }
139869
-
139870
139978
  function useLegacyCollectionFileLoader() {
139871
139979
  const fetchFileById = inject("fetchFileById");
139872
139980
  const canvasFileCache = inject("canvasFileCache", ref(/* @__PURE__ */ new Map()));
@@ -162568,7 +162676,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
162568
162676
  // Add height only if already present or if the form value is set (backwards compatibility)
162569
162677
  ...activeSettingsNode.value?.type === ComponentTypes.CollectionPlayer && ("height" in activeSettingsNode.value || formValues.height) ? { height: formValues.height } : {},
162570
162678
  ...isAdminSectionTemplateWithFlag.value ? { allow_admins_to_overwrite: formValues.allowAdminsToOverwrite } : {},
162571
- ...activeSettingsNode.value?.type === "ContentGrid" ? { is_sharebox_target: formValues.isShareboxTarget } : {},
162679
+ ...activeSettingsNode.value?.type && ["ContentGrid", "CollectionPlayer"].includes(activeSettingsNode.value.type) ? { is_sharebox_target: formValues.isShareboxTarget } : {},
162572
162680
  ...newData
162573
162681
  });
162574
162682
  };
@@ -162858,6 +162966,15 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
162858
162966
  ]),
162859
162967
  _: 1
162860
162968
  }, 8, ["checked"]),
162969
+ createVNode(unref(NCheckbox), {
162970
+ checked: formValues.isShareboxTarget,
162971
+ "onUpdate:checked": _cache[18] || (_cache[18] = ($event) => formValues.isShareboxTarget = $event)
162972
+ }, {
162973
+ default: withCtx(() => [
162974
+ createTextVNode(toDisplayString(unref(t)("canvasUI.canvasBuilder.canvasSettings.form.messages.isShareboxTarget")), 1)
162975
+ ]),
162976
+ _: 1
162977
+ }, 8, ["checked"]),
162861
162978
  unref(launchDarkly).enable_collection_player_data_accessor && (unref(isTemplate) || selectedCollectionPlayerDataPath.value) ? (openBlock(), createElementBlock("div", _hoisted_5$w, [
162862
162979
  createElementVNode("div", _hoisted_6$s, [
162863
162980
  createElementVNode("label", null, toDisplayString(unref(t)("canvasUI.canvasBuilder.canvasSettings.form.label.collectionPlayerDataAccessor")), 1),
@@ -162931,7 +163048,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
162931
163048
  block: "",
162932
163049
  class: "mt-auto",
162933
163050
  type: "primary",
162934
- onClick: _cache[18] || (_cache[18] = ($event) => updateShow(false))
163051
+ onClick: _cache[19] || (_cache[19] = ($event) => updateShow(false))
162935
163052
  }, {
162936
163053
  default: withCtx(() => [
162937
163054
  createTextVNode(toDisplayString(unref(t)("canvasUI.common.done")), 1)
@@ -162945,7 +163062,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
162945
163062
  }
162946
163063
  });
162947
163064
 
162948
- const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-c7a7411e"]]);
163065
+ const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-dce6a881"]]);
162949
163066
 
162950
163067
  function useConnectUpload() {
162951
163068
  async function uploadToConnect(formData) {
@@ -169597,7 +169714,7 @@ const clearCache = () => {
169597
169714
  const _export$3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
169598
169715
  __proto__: null,
169599
169716
  clearCache,
169600
- generateNewCollection: generateNewCollection$1,
169717
+ generateNewCollection: generateNewCollection$2,
169601
169718
  generateNewCollectionStructure,
169602
169719
  getUniqueSlides,
169603
169720
  provideAppStore: provideAppStore$3,
@@ -170581,7 +170698,7 @@ function provideAppStore$2({
170581
170698
  translations,
170582
170699
  contentRef
170583
170700
  }) {
170584
- const rawCollection = ref({ ...generateNewCollection$2(t), ...cloneDeep(initialCollection) ?? {} });
170701
+ const rawCollection = ref({ ...generateNewCollection$1(t), ...cloneDeep(initialCollection) ?? {} });
170585
170702
  const fileLoader = useLegacyCollectionFileLoader();
170586
170703
  const childModalZIndex = zIndex !== void 0 ? zIndex + 1 : void 0;
170587
170704
  const isSettingsButtonVisible = computed(() => !!openSettingsFn || !!closeOnSettings);
@@ -181654,7 +181771,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181654
181771
 
181655
181772
  const _export$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
181656
181773
  __proto__: null,
181657
- generateNewCollection: generateNewCollection$2,
181774
+ generateNewCollection: generateNewCollection$1,
181658
181775
  generateNewCollectionFile,
181659
181776
  generateNewCollectionSlide,
181660
181777
  generateNewEmptyGroup: generateNewEmptyGroup$2,
@@ -183571,14 +183688,8 @@ function getEventColor(sfEvent) {
183571
183688
  } else {
183572
183689
  isSubmitted = false;
183573
183690
  }
183574
- const now = /* @__PURE__ */ new Date();
183575
183691
  if (isSubmitted) return SfEventColors.SUBMITTED;
183576
- else if (sfEvent.IsAllDayEvent) {
183577
- const endDate = new Date(sfEvent.EndDateTime);
183578
- const todayStart = startOfDay(now);
183579
- const endDayStart = startOfDay(endDate);
183580
- return isAfter$1(todayStart, endDayStart) ? SfEventColors.PAST : SfEventColors.PLANNED;
183581
- } else if (isAfter$1(now, new Date(sfEvent.EndDateTime))) return SfEventColors.PAST;
183692
+ else if (isAfter$1(/* @__PURE__ */ new Date(), new Date(sfEvent.EndDateTime))) return SfEventColors.PAST;
183582
183693
  else return SfEventColors.PLANNED;
183583
183694
  }
183584
183695
  const minFutureDate = (date = /* @__PURE__ */ new Date()) => add(date, { minutes: MIN_DIFFERENCE_IN_MINUTES });
@@ -184106,5 +184217,5 @@ const localeNames = {
184106
184217
  };
184107
184218
  const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
184108
184219
 
184109
- export { ADMIN_API_METHOD_TYPES, ADMIN_API_TYPES, ADMIN_MESSAGE, ADMIN_MESSAGE_TYPES, APPS_DB, AccessTypeEnum, App$3 as AgendaSelectorApp, AppTypeEnum, _sfc_main as AssetsManagerApp, App$1 as Browser, BulkUpdateMetadataOperationEnum, BulkUpdateTagsOperationEnum, CALL_STORAGE_KEY, CANVASES, CANVAS_HOOKS, CANVAS_TYPOGRAPHY_CSS_PROPERTIES, CANVAS_TYPOGRAPHY_PRESETS, CAlgoliaSearch, CAssignedCanvasesManagement, _sfc_main$4p as CAssignedCanvasesManagementToolbar, _sfc_main$6s as CAvatar, _sfc_main$4O as CBlockManagement, CButton, _sfc_main$5f as CCanvasDeleteDialogContent, _sfc_main$5g as CCanvasMetadataFilters, CCanvasSelector, _sfc_main$6V as CCard, CCarousel, _sfc_main$3G as CCatalogIqSwitcher, _sfc_main$6U as CCheckbox, _sfc_main$3A as CChip, CCollapse, _sfc_main$6R as CCollapseItem, _sfc_main$6r as CCollapseTransition, NColorPicker as CColorPicker, CComponentListItem, CConfigEditor, NConfigProvider as CConfigProvider, _sfc_main$6h as CConfirmationAction, CConfirmationContent, CConfirmationHeader, CConfirmationModal, CContactSelector, CContactSelectorSelected, _sfc_main$68 as CContentError, _sfc_main$65 as CCreateCanvasModal, _sfc_main$64 as CCreateTemplateSectionBlockModal, _sfc_main$5V as CCreateThemeModal, CDP_EVENT_TYPE, CDataTable, NDatePicker as CDatePicker, CDateRangeFilter, CDetailPageSectionButtons, NDialogProvider as CDialogProvider, _sfc_main$6P as CDivider, _sfc_main$6O as CDrawer, _sfc_main$6N as CDrawerContent, _sfc_main$6M as CDropdown, _sfc_main$6p as CEmpty, _sfc_main$4m as CEntitySelector, _sfc_main$6L as CErrorFullScreen, _sfc_main$6n as CFeedback, _sfc_main$3o as CFileAccessManagement, _sfc_main$6C as CFileAttributes, _sfc_main$3p as CFilePanel, _sfc_main$6I as CFileThumbnail, CFileViewer, CFilesAccessInfo, _sfc_main$3$ as CFilesAccessManage, _sfc_main$3I as CFilesFolderDeleteDialogContent, NForm as CForm, NFormItem as CFormItem, NFormItemCol as CFormItemCol, NFormItemGridItem as CFormItemGi, NFormItemGridItem as CFormItemGridItem, FormItemRow as CFormItemRow, _sfc_main$4h as CFullScreenLoader, NGridItem as CGi, CGlobalLoader, _sfc_main$5O as CGlobalSearch, GlobalStyle as CGlobalStyle, NGrid as CGrid, NGridItem as CGridItem, CGroupsAccessInfo, NH1 as CH1, NH2 as CH2, NH3 as CH3, NH4 as CH4, NH5 as CH5, NH6 as CH6, _sfc_main$6m as CHelpText, CIcon, _sfc_main$6K as CImage, _sfc_main$4W as CInfoBadge, _sfc_main$6B as CInput, NInputNumber as CInputNumber, _sfc_main$3y as CKnockNotificationsAppWrapper, CLIENT_TYPE, NLayout as CLayout, NLayoutContent as CLayoutContent, LayoutFooter as CLayoutFooter, LayoutHeader as CLayoutHeader, LayoutSider as CLayoutSider, _sfc_main$4X as CList, NMessageProvider as CMessageProvider, _sfc_main$5L as CMetaDataBadge, _sfc_main$6A as CModal, CMonacoEditor, CMovableWidget, CMultiSelect, NNotificationProvider as CNotificationProvider, NPagination as CPagination, _sfc_main$6l as CPillSelect, _sfc_main$6z as CPopover, _sfc_main$6J as CProcessingOverlay, NProgress as CProgress, _sfc_main$5s as CRichTextEditor, _sfc_main$4q as CSavedCanvasesManagement, CSearch, _sfc_main$6x as CSearchOnClick, CSearchOnClickWithSuggestions, CSecondaryNav, _sfc_main$4R as CSectionManagement, CSelect, CSelectFilter, _sfc_main$3x as CSettingsEditor, CShortcut, CSingleSelect, NSkeleton as CSkeleton, _sfc_main$3C as CSlideViewer, NSpace as CSpace, _sfc_main$6q as CSpin, _sfc_main$6o as CSwitch, CTable, _sfc_main$5c as CTableInput, CTableMore, CTableSelect, CTableTag, _sfc_main$6F as CTag, CTags, CTemplateAccessInfo, _sfc_main$3_ as CTemplateAccessManage, _sfc_main$4G as CTemplateManagement, text as CText, _sfc_main$6v as CThemeEditor, _sfc_main$4B as CThemeManagement, _sfc_main$5l as CToastProvider, CToolbar, _sfc_main$6t as CTooltip, CUpsertFolderModal, _sfc_main$5p as CUserAvatar, CUserMenu, CUsersAccessInfo, CUsersGroupsAccessManage, _sfc_main$5m as CVirtualTable, _sfc_main$48 as CWarningAlert, CallState, CanvasActions, _sfc_main$15 as CanvasBuilderApp, CanvasBuilderMode, CanvasExcludedComponentTypesEnum, CanvasHistoryAction, App as CanvasSelector, CanvasStatus, CanvasThemeStatus, CanvasesViewsTypes, CollaborationRoleEnum, CollectionPlayerApp, App$4 as CollectionSelectorApp, ComponentIcon, ComponentTypes, ContactSelectorQuickFilterType, ContentGridLayoutTypes, ContentSelector, CoreFolderEntityType, DATE_TIME_FORMAT, DEFAULT_ADMIN_TABLE_HEIGHT, DEFAULT_ADMIN_TABLE_WITH_PAGINATION_HEIGHT, DEFAULT_GLOBAL_COMPONENT_SPACING, DEFAULT_GLOBAL_COMPONENT_SPACING_INTERVAL, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PEER_CONNECTIVITY_VERSION, DEFAULT_PITCHER_SETTINGS, DSR_API_METHOD_TYPES, DSR_API_TYPES, DSR_MESSAGE, DSR_MESSAGE_TYPES, DSR_TYPE, DefaultExpiresAtEnum, DownloadTypeEnum, EMBED_TYPE, EventAction, EventExternalObjectContentTypeEnum, EventStatusEnum, FileContentTypeEnum, FileStatusEnum, FileTypeEnum, GlobalSearchResultType, GridLayoutTypes, HIDE_IF_EMPTY_COMPONENT_ID_TAG_PREFIX, HIDE_IF_EMPTY_COMPONENT_TRACKING_ID_TAG_PREFIX, HIDE_TAGS_WITH_PREFIX, HtmlLayoutTypes, IFRAME_ACTION_TYPES, IFRAME_DATA_MESSAGE, INITIAL_CALL_STATE, IS_DEV_ORG, IS_LOCALHOST, InstanceMembershipRoleEnum, InstanceMembershipUserStatusEnum, InvitationStatusEnum, LanguageEnum, LinkAlignmentTypes, LinkAnchorTypes, LinkPreviewTypes, MAX_LUMINANCE_FOR_LIGHT_TEXT, MAX_UPLOAD_SIZE, MIN_DIFFERENCE_IN_MINUTES, MetadataTemplateFieldTypeEnum, MultimediaHorizontalAlignmentOptions, NON_MEMBER_ROLES, NotesApp, OperatorEnum, PAPER_SIZE_PRESETS, PEER_CONNECTIVITY_EVENT, PEER_CONNECTIVITY_HANDLER_MATCH_ALL, PITCHER_EVENT, PITCHER_SETTINGS_KEY, PLATFORM_TYPE, PRINT_SCALE_FACTOR, PeerConnectivityActions, PitcherBroadcastedEventName, PitcherEventName, PitcherExternalEventName, PitcherMessageType, PitcherResponseStatus, PostAction, App$2 as PptConversionSelectorApp, REQUEST_DEFAULT_CANCEL_TIMEOUT, SEARCH_DEBOUNCE_TIME, SUPPORTED_FONT_EXTENSIONS, SUPPORTED_FONT_TYPES, SUPPORTED_IMAGE_EXTENSIONS, SUPPORTED_IMAGE_TYPES, SUPPORTED_UPLOAD_FILE_EXTENSIONS, SUPPORTED_VIDEO_EXTENSIONS, SUPPORTED_VIDEO_TYPES, SfEventColors, SfEventColorsLight, StorageRegionEnum, TRACKING_EVENTS_STORAGE_KEY, UI_API_METHOD_TYPES, UI_MESSAGE, UI_MESSAGE_TYPES, UI_NATIVE_MESSAGE_TYPES, UserRoleEnum, ViewCompactItemType, addCanvasComponent, _export as agendaSelector, appRequiresCrm, applyCanvasThemeAssetsToNode, applyFont, applyToTreeBy, autofocus as autofocusDirective, camelCaseKeys, canvasUiUnoPreset, clearLocalStorageIfNeeded, ClickOutsideDirective as clickOutsideDirective, collectAllNodesByCondition, _export$3 as collectionPlayer, _export$2 as collectionSelector, componentIconType, computeLocalStorageBytes, convertSecondsToMinutes, convertSoqlToSmartQuery, convertToPixels, convertToSosl, createNodeId, createPitcherSettings, dayjs, deepDiff, deepToRaw, derivePatchRequestFields, determineUserRole, discardSectionComponentOverride, displayBytesWithMUnit, displayIntegerWithMunit, doesLocalOverrideExist, doesNotHaveAnyModuleOrHookSpecified, downloadFile, draggable as draggableDirective, elementMounted as elementMountedDirective, escapeSoqlString, evaluateAccessor, evaluateIsExecutedCondition, evaluateIsExecutedForPascalCaseEvent, executeWithDoublingTime, exitFullscreen, extractFieldNamesFromCondition, fallbackLocale, fetchAll, fetchAllWithOffset, fetchFirstChunkAndRemainingAsync, filterSidebarApps, filterTreeBy, findAllEmbeddableTypesInCanvasContent, findAllEmbeddableTypesInSectionsContent, findEmbeddableInCanvasContent, findEmbeddableInSectionsContent, findNodeInTreeByCondition, findNodeInTreeById, findNodeInTreeByType, findParentByNodeId, formatDate, formatDateDetailed, formatDateTime, formatDateTimeAgo, formatDayMonthBasedOnBrowserLang, formatDimensionForGotenberg, generateAIThumbnailUrl, getAllPages, getAppConfigFromAppSource, getAvailableApis, getComponentDescription, getComponentKeywords, getComponentTitle, getContrastTextColor, getDefinedProps, getEventColor, getExcessItemsIndexes, getFontAwesomeIconNameAndType, getImageSize, getLocalOverrideUrl, getLuminance, getNextPageParam, getNodeDisplayNameByComponentType, getNumberWithRegex, getPageQuantity, getPageRange, getPreviewUrl, getRoleIcon, getSectionGlobalComponentSpacing, handleThemeAssetComparison, hasAppTypeDefined, highLevelApi, indirectEval, insertItemSorted, isAfter, isBefore, isBeforeMinDate, isCanvasDrawerApp, isCanvasSectionExecution, isEmbeddableWithZeroHeight, isFileViewerReplacement, isFirefox, isFullscreen, isHeadlessOrNotAvailableApp, isImageAccessible, isIosDevice, isMac, isMobile, isModifierClick, isNonMemberRole, isOriginValid, isPastMaxDate, isPitcherOrIosDevice, isPitcherWkWebView, isPostcallApp, isQueryParamTruthy, isSafari, isSafariOnIosDevice, isSameOrAfter, isSameOrBefore, isTextComponentEmpty, isTheUiItself, isTouchScreen, isValidHex, isWindows, lightThemeOverrides, loadCustomHelpersFromApps, loadRemoteScriptWithCtx, loadScript, loadScriptStyle, loadStyle, localeDropdownOptions, localeNames, locales, minFutureDate, minPastDate, moveNodeTo, msToSeconds, navigateTo, normalizeFilterParams, normalizeNetworkFilterParams, openUsdz, parseCollectionPlayerSlidesToContentSelector, parseContentSelectorToCollectionPlayerSlides, parseFileToCollectionPlayer, parsePdfFileToCollectionPlayer, parsePptxFileToCollectionPlayer, pascalCaseKeys, _export$1 as pptConversionSelector, processCanvasForSectionThemeOverride, regenerateTreeIds, registerCustomHelper, registerCustomHelpers, registerPeerConnectivityHandler, renderTemplate, replaceThemePresetsWithInlineStyles, replaceTranslationMessagesWithOverrides, requestFullscreen, requestStream, scrollCanvasToTop, scrollToComponentById, secondsToHumanReadable, sendPeerConnectivityEvent, setDateTime, shouldDisplayPlaceholderComponent, shouldOpenInCollectionPlayerViewer, shouldShowEmbeddable, shouldShowInSidebar, skipElementsInTree, snakeCaseKeys, someNodeInTree, sortCollectionByString, splitUserName, stringToHslColor, supportedLocales, tapDirective, titleCase, toggleFullscreen, tooltipDirective, transformFilesToCollectionPlayer, transformFilesToContentGrid, updateFirstContentGridWithShareboxItems, urlSafeFetchInChunks, useAdmin, useAdminAndDsrState, useApi, useAppsDb, useBindValidation, useBroadcastRouteChange, useCanvasById, useCanvasLocks, useCanvasOverlay, useCanvasVisibility, useCanvasesAsInfinity, useCollectionPlayerOverlay, useCommentTracking, useConfirmation, useCreateEvent, useDeleteEvent, useDsr, useFetchCanvases, useFetchEvents, useFetchUsers, useFileDisplayHelpers, useFolderNameDescription, useGlobalSearch, useInfiniteScroll, useLocation, useMetadataSearch, useMetadataTemplates, useNotesApp, useNotification, useOpenFileStack, usePitcherApi, usePolling, usePresentationHistory, useRecentFiles, useShareCanvas, useSharedCommentsStorage, useSmartStore, useSuggestedTags, useTheme, useThemeVars, useToast, useUi, useUpdateEvent, useWindowEvents, vueQueryPluginOptions, wait, waitForIframeInitialize, waitForValue };
184220
+ export { ADMIN_API_METHOD_TYPES, ADMIN_API_TYPES, ADMIN_MESSAGE, ADMIN_MESSAGE_TYPES, APPS_DB, AccessTypeEnum, App$3 as AgendaSelectorApp, AppTypeEnum, _sfc_main as AssetsManagerApp, App$1 as Browser, BulkUpdateMetadataOperationEnum, BulkUpdateTagsOperationEnum, CALL_STORAGE_KEY, CANVASES, CANVAS_HOOKS, CANVAS_TYPOGRAPHY_CSS_PROPERTIES, CANVAS_TYPOGRAPHY_PRESETS, CAlgoliaSearch, CAssignedCanvasesManagement, _sfc_main$4p as CAssignedCanvasesManagementToolbar, _sfc_main$6s as CAvatar, _sfc_main$4O as CBlockManagement, CButton, _sfc_main$5f as CCanvasDeleteDialogContent, _sfc_main$5g as CCanvasMetadataFilters, CCanvasSelector, _sfc_main$6V as CCard, CCarousel, _sfc_main$3G as CCatalogIqSwitcher, _sfc_main$6U as CCheckbox, _sfc_main$3A as CChip, CCollapse, _sfc_main$6R as CCollapseItem, _sfc_main$6r as CCollapseTransition, NColorPicker as CColorPicker, CComponentListItem, CConfigEditor, NConfigProvider as CConfigProvider, _sfc_main$6h as CConfirmationAction, CConfirmationContent, CConfirmationHeader, CConfirmationModal, CContactSelector, CContactSelectorSelected, _sfc_main$68 as CContentError, _sfc_main$65 as CCreateCanvasModal, _sfc_main$64 as CCreateTemplateSectionBlockModal, _sfc_main$5V as CCreateThemeModal, CDP_EVENT_TYPE, CDataTable, NDatePicker as CDatePicker, CDateRangeFilter, CDetailPageSectionButtons, NDialogProvider as CDialogProvider, _sfc_main$6P as CDivider, _sfc_main$6O as CDrawer, _sfc_main$6N as CDrawerContent, _sfc_main$6M as CDropdown, _sfc_main$6p as CEmpty, _sfc_main$4m as CEntitySelector, _sfc_main$6L as CErrorFullScreen, _sfc_main$6n as CFeedback, _sfc_main$3o as CFileAccessManagement, _sfc_main$6C as CFileAttributes, _sfc_main$3p as CFilePanel, _sfc_main$6I as CFileThumbnail, CFileViewer, CFilesAccessInfo, _sfc_main$3$ as CFilesAccessManage, _sfc_main$3I as CFilesFolderDeleteDialogContent, NForm as CForm, NFormItem as CFormItem, NFormItemCol as CFormItemCol, NFormItemGridItem as CFormItemGi, NFormItemGridItem as CFormItemGridItem, FormItemRow as CFormItemRow, _sfc_main$4h as CFullScreenLoader, NGridItem as CGi, CGlobalLoader, _sfc_main$5O as CGlobalSearch, GlobalStyle as CGlobalStyle, NGrid as CGrid, NGridItem as CGridItem, CGroupsAccessInfo, NH1 as CH1, NH2 as CH2, NH3 as CH3, NH4 as CH4, NH5 as CH5, NH6 as CH6, _sfc_main$6m as CHelpText, CIcon, _sfc_main$6K as CImage, _sfc_main$4W as CInfoBadge, _sfc_main$6B as CInput, NInputNumber as CInputNumber, _sfc_main$3y as CKnockNotificationsAppWrapper, CLIENT_TYPE, NLayout as CLayout, NLayoutContent as CLayoutContent, LayoutFooter as CLayoutFooter, LayoutHeader as CLayoutHeader, LayoutSider as CLayoutSider, _sfc_main$4X as CList, NMessageProvider as CMessageProvider, _sfc_main$5L as CMetaDataBadge, _sfc_main$6A as CModal, CMonacoEditor, CMovableWidget, CMultiSelect, NNotificationProvider as CNotificationProvider, NPagination as CPagination, _sfc_main$6l as CPillSelect, _sfc_main$6z as CPopover, _sfc_main$6J as CProcessingOverlay, NProgress as CProgress, _sfc_main$5s as CRichTextEditor, _sfc_main$4q as CSavedCanvasesManagement, CSearch, _sfc_main$6x as CSearchOnClick, CSearchOnClickWithSuggestions, CSecondaryNav, _sfc_main$4R as CSectionManagement, CSelect, CSelectFilter, _sfc_main$3x as CSettingsEditor, CShortcut, CSingleSelect, NSkeleton as CSkeleton, _sfc_main$3C as CSlideViewer, NSpace as CSpace, _sfc_main$6q as CSpin, _sfc_main$6o as CSwitch, CTable, _sfc_main$5c as CTableInput, CTableMore, CTableSelect, CTableTag, _sfc_main$6F as CTag, CTags, CTemplateAccessInfo, _sfc_main$3_ as CTemplateAccessManage, _sfc_main$4G as CTemplateManagement, text as CText, _sfc_main$6v as CThemeEditor, _sfc_main$4B as CThemeManagement, _sfc_main$5l as CToastProvider, CToolbar, _sfc_main$6t as CTooltip, CUpsertFolderModal, _sfc_main$5p as CUserAvatar, CUserMenu, CUsersAccessInfo, CUsersGroupsAccessManage, _sfc_main$5m as CVirtualTable, _sfc_main$48 as CWarningAlert, CallState, CanvasActions, _sfc_main$15 as CanvasBuilderApp, CanvasBuilderMode, CanvasExcludedComponentTypesEnum, CanvasHistoryAction, App as CanvasSelector, CanvasStatus, CanvasThemeStatus, CanvasesViewsTypes, CollaborationRoleEnum, CollectionPlayerApp, App$4 as CollectionSelectorApp, ComponentIcon, ComponentTypes, ContactSelectorQuickFilterType, ContentGridLayoutTypes, ContentSelector, CoreFolderEntityType, DATE_TIME_FORMAT, DEFAULT_ADMIN_TABLE_HEIGHT, DEFAULT_ADMIN_TABLE_WITH_PAGINATION_HEIGHT, DEFAULT_GLOBAL_COMPONENT_SPACING, DEFAULT_GLOBAL_COMPONENT_SPACING_INTERVAL, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PEER_CONNECTIVITY_VERSION, DEFAULT_PITCHER_SETTINGS, DSR_API_METHOD_TYPES, DSR_API_TYPES, DSR_MESSAGE, DSR_MESSAGE_TYPES, DSR_TYPE, DefaultExpiresAtEnum, DownloadTypeEnum, EMBED_TYPE, EventAction, EventExternalObjectContentTypeEnum, EventStatusEnum, FileContentTypeEnum, FileStatusEnum, FileTypeEnum, GlobalSearchResultType, GridLayoutTypes, HIDE_IF_EMPTY_COMPONENT_ID_TAG_PREFIX, HIDE_IF_EMPTY_COMPONENT_TRACKING_ID_TAG_PREFIX, HIDE_TAGS_WITH_PREFIX, HtmlLayoutTypes, IFRAME_ACTION_TYPES, IFRAME_DATA_MESSAGE, INITIAL_CALL_STATE, IS_DEV_ORG, IS_LOCALHOST, InstanceMembershipRoleEnum, InstanceMembershipUserStatusEnum, InvitationStatusEnum, LanguageEnum, LinkAlignmentTypes, LinkAnchorTypes, LinkPreviewTypes, MAX_LUMINANCE_FOR_LIGHT_TEXT, MAX_UPLOAD_SIZE, MIN_DIFFERENCE_IN_MINUTES, MetadataTemplateFieldTypeEnum, MultimediaHorizontalAlignmentOptions, NON_MEMBER_ROLES, NotesApp, OperatorEnum, PAPER_SIZE_PRESETS, PEER_CONNECTIVITY_EVENT, PEER_CONNECTIVITY_HANDLER_MATCH_ALL, PITCHER_EVENT, PITCHER_SETTINGS_KEY, PLATFORM_TYPE, PRINT_SCALE_FACTOR, PeerConnectivityActions, PitcherBroadcastedEventName, PitcherEventName, PitcherExternalEventName, PitcherMessageType, PitcherResponseStatus, PostAction, App$2 as PptConversionSelectorApp, REQUEST_DEFAULT_CANCEL_TIMEOUT, SEARCH_DEBOUNCE_TIME, SUPPORTED_FONT_EXTENSIONS, SUPPORTED_FONT_TYPES, SUPPORTED_IMAGE_EXTENSIONS, SUPPORTED_IMAGE_TYPES, SUPPORTED_UPLOAD_FILE_EXTENSIONS, SUPPORTED_VIDEO_EXTENSIONS, SUPPORTED_VIDEO_TYPES, SfEventColors, SfEventColorsLight, StorageRegionEnum, TRACKING_EVENTS_STORAGE_KEY, UI_API_METHOD_TYPES, UI_MESSAGE, UI_MESSAGE_TYPES, UI_NATIVE_MESSAGE_TYPES, UserRoleEnum, ViewCompactItemType, addCanvasComponent, _export as agendaSelector, appRequiresCrm, applyCanvasThemeAssetsToNode, applyFont, applyToTreeBy, autofocus as autofocusDirective, camelCaseKeys, canvasUiUnoPreset, clearLocalStorageIfNeeded, ClickOutsideDirective as clickOutsideDirective, collectAllNodesByCondition, _export$3 as collectionPlayer, _export$2 as collectionSelector, componentIconType, computeLocalStorageBytes, convertSecondsToMinutes, convertSoqlToSmartQuery, convertToPixels, convertToSosl, createNodeId, createPitcherSettings, dayjs, deepDiff, deepToRaw, derivePatchRequestFields, determineUserRole, discardSectionComponentOverride, displayBytesWithMUnit, displayIntegerWithMunit, doesLocalOverrideExist, doesNotHaveAnyModuleOrHookSpecified, downloadFile, draggable as draggableDirective, elementMounted as elementMountedDirective, escapeSoqlString, evaluateAccessor, evaluateIsExecutedCondition, evaluateIsExecutedForPascalCaseEvent, executeWithDoublingTime, exitFullscreen, extractFieldNamesFromCondition, fallbackLocale, fetchAll, fetchAllWithOffset, fetchFirstChunkAndRemainingAsync, filterSidebarApps, filterTreeBy, findAllEmbeddableTypesInCanvasContent, findAllEmbeddableTypesInSectionsContent, findEmbeddableInCanvasContent, findEmbeddableInSectionsContent, findNodeInTreeByCondition, findNodeInTreeById, findNodeInTreeByType, findParentByNodeId, formatDate, formatDateDetailed, formatDateTime, formatDateTimeAgo, formatDayMonthBasedOnBrowserLang, formatDimensionForGotenberg, generateAIThumbnailUrl, getAllPages, getAppConfigFromAppSource, getAvailableApis, getComponentDescription, getComponentKeywords, getComponentTitle, getContrastTextColor, getDefinedProps, getEventColor, getExcessItemsIndexes, getFontAwesomeIconNameAndType, getImageSize, getLocalOverrideUrl, getLuminance, getNextPageParam, getNodeDisplayNameByComponentType, getNumberWithRegex, getPageQuantity, getPageRange, getPreviewUrl, getRoleIcon, getSectionGlobalComponentSpacing, handleThemeAssetComparison, hasAppTypeDefined, highLevelApi, indirectEval, insertItemSorted, isAfter, isBefore, isBeforeMinDate, isCanvasDrawerApp, isCanvasSectionExecution, isEmbeddableWithZeroHeight, isFileViewerReplacement, isFirefox, isFullscreen, isHeadlessOrNotAvailableApp, isImageAccessible, isIosDevice, isMac, isMobile, isModifierClick, isNonMemberRole, isOriginValid, isPastMaxDate, isPitcherOrIosDevice, isPitcherWkWebView, isPostcallApp, isQueryParamTruthy, isSafari, isSafariOnIosDevice, isSameOrAfter, isSameOrBefore, isTextComponentEmpty, isTheUiItself, isTouchScreen, isValidHex, isWindows, lightThemeOverrides, loadCustomHelpersFromApps, loadRemoteScriptWithCtx, loadScript, loadScriptStyle, loadStyle, localeDropdownOptions, localeNames, locales, minFutureDate, minPastDate, moveNodeTo, msToSeconds, navigateTo, normalizeFilterParams, normalizeNetworkFilterParams, openUsdz, parseCollectionPlayerSlidesToContentSelector, parseContentSelectorToCollectionPlayerSlides, parseFileToCollectionPlayer, parsePdfFileToCollectionPlayer, parsePptxFileToCollectionPlayer, pascalCaseKeys, _export$1 as pptConversionSelector, processCanvasForSectionThemeOverride, regenerateTreeIds, registerCustomHelper, registerCustomHelpers, registerPeerConnectivityHandler, renderTemplate, replaceThemePresetsWithInlineStyles, replaceTranslationMessagesWithOverrides, requestFullscreen, requestStream, scrollCanvasToTop, scrollToComponentById, secondsToHumanReadable, sendPeerConnectivityEvent, setDateTime, shouldDisplayPlaceholderComponent, shouldOpenInCollectionPlayerViewer, shouldShowEmbeddable, shouldShowInSidebar, skipElementsInTree, snakeCaseKeys, someNodeInTree, sortCollectionByString, splitUserName, stringToHslColor, supportedLocales, tapDirective, titleCase, toggleFullscreen, tooltipDirective, transformFilesToCollectionPlayer, transformFilesToContentGrid, updateFirstCollectionPlayerWithShareboxItems, updateFirstContentGridWithShareboxItems, urlSafeFetchInChunks, useAdmin, useAdminAndDsrState, useApi, useAppsDb, useBindValidation, useBroadcastRouteChange, useCanvasById, useCanvasLocks, useCanvasOverlay, useCanvasVisibility, useCanvasesAsInfinity, useCollectionPlayerOverlay, useCommentTracking, useConfirmation, useCreateEvent, useDeleteEvent, useDsr, useFetchCanvases, useFetchEvents, useFetchUsers, useFileDisplayHelpers, useFolderNameDescription, useGlobalSearch, useInfiniteScroll, useLocation, useMetadataSearch, useMetadataTemplates, useNotesApp, useNotification, useOpenFileStack, usePitcherApi, usePolling, usePresentationHistory, useRecentFiles, useShareCanvas, useSharedCommentsStorage, useSmartStore, useSuggestedTags, useTheme, useThemeVars, useToast, useUi, useUpdateEvent, useWindowEvents, vueQueryPluginOptions, wait, waitForIframeInitialize, waitForValue };
184110
184221
  //# sourceMappingURL=canvas-ui.js.map