@pitcher/canvas-ui 2026.1.9-145245-beta → 2026.1.9-205914-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,14 +88219,15 @@ async function crmQueryAdaptive(payload) {
88219
88219
  } catch {
88220
88220
  useSmartStore = false;
88221
88221
  }
88222
- console.log(`crmQueryAdaptive called with the query: `, query2);
88222
+ console.log(`[crmQueryAdaptive] Called query: `, query2);
88223
88223
  if (useSmartStore) {
88224
88224
  const fields = extractFieldsFromSoql(query2);
88225
88225
  const objectName = extractObjectFromSoql(query2);
88226
88226
  const smartQuery = convertSoqlToSmartQuery(query2);
88227
- console.log(`Smart Query: `, smartQuery);
88227
+ console.log(`[crmSmartQuery] Called query: `, smartQuery);
88228
88228
  const smartStoreResults = await crmSmartQuery({ query: smartQuery });
88229
88229
  const records = transformSmartStoreResults(smartStoreResults, fields, objectName);
88230
+ console.log(`[SmartStore] Results: `, records);
88230
88231
  return {
88231
88232
  records,
88232
88233
  totalSize: records.length
@@ -94086,391 +94087,6 @@ function useContentSelector() {
94086
94087
  };
94087
94088
  }
94088
94089
 
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
-
94474
94090
  function createNodeId(type) {
94475
94091
  return `${type || "UnknownType"}-${v4()}`;
94476
94092
  }
@@ -95069,81 +94685,6 @@ function findFirstEmptyContentGridNode(nodes) {
95069
94685
  }
95070
94686
  return null;
95071
94687
  }
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
- }
95147
94688
  function isMultimediaDataWithTheme(obj, value) {
95148
94689
  return obj && obj.type === "Multimedia" && obj.theme_meta && typeof value === "object" && value !== null;
95149
94690
  }
@@ -96351,8 +95892,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96351
95892
  }
96352
95893
  const emIndex = highlightValue.indexOf("<em>");
96353
95894
  if (emIndex === -1) return "";
96354
- const startChar = Math.max(0, emIndex - 75);
96355
- const endChar = Math.min(highlightValue.length, emIndex + 125);
95895
+ const startChar = Math.max(0, emIndex - 100);
95896
+ const endChar = Math.min(highlightValue.length, emIndex + 100);
96356
95897
  let truncated = highlightValue.substring(startChar, endChar);
96357
95898
  if (startChar > 0) truncated = "..." + truncated;
96358
95899
  if (endChar < highlightValue.length) truncated = truncated + "...";
@@ -96553,7 +96094,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96553
96094
  show: "",
96554
96095
  verticalAlignment: "top",
96555
96096
  "z-index": _ctx.zIndex,
96556
- "onUpdate:show": _cache[15] || (_cache[15] = ($event) => emit("toggleSearch", $event))
96097
+ "onUpdate:show": _cache[16] || (_cache[16] = ($event) => emit("toggleSearch", $event))
96557
96098
  }, {
96558
96099
  default: withCtx(() => [
96559
96100
  createElementVNode("div", {
@@ -96562,7 +96103,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96562
96103
  }, [
96563
96104
  createElementVNode("div", _hoisted_1$4w, [
96564
96105
  createElementVNode("div", _hoisted_2$3j, [
96565
- _cache[16] || (_cache[16] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96106
+ _cache[17] || (_cache[17] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96566
96107
  createElementVNode("i", { class: "c-icon far fa-search text-gray-400 text-l" })
96567
96108
  ], -1)),
96568
96109
  withDirectives(createElementVNode("input", {
@@ -96668,7 +96209,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96668
96209
  show: showFileTypeDropdown.value,
96669
96210
  "show-arrow": false,
96670
96211
  trigger: "manual",
96671
- onClickoutside: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = false)
96212
+ onClickoutside: _cache[8] || (_cache[8] = ($event) => showFileTypeDropdown.value = false)
96672
96213
  }, {
96673
96214
  trigger: withCtx(() => [
96674
96215
  createVNode(unref(NTag), {
@@ -96681,12 +96222,20 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96681
96222
  themeOverrides: {
96682
96223
  borderRadius: "4px"
96683
96224
  },
96684
- onClick: _cache[6] || (_cache[6] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
96225
+ onClick: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
96685
96226
  }, {
96686
96227
  default: withCtx(() => [
96687
96228
  createElementVNode("div", _hoisted_10$C, [
96688
96229
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
96689
- selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
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)
96690
96239
  ])
96691
96240
  ]),
96692
96241
  _: 1
@@ -96735,7 +96284,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96735
96284
  _: 1
96736
96285
  }, 8, ["show"]),
96737
96286
  hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_14$h, [
96738
- _cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96287
+ _cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96739
96288
  createElementVNode("span", {
96740
96289
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96741
96290
  onClick: clearAllFilters
@@ -96753,7 +96302,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96753
96302
  themeOverrides: {
96754
96303
  borderRadius: "4px"
96755
96304
  },
96756
- onClick: _cache[8] || (_cache[8] = ($event) => toggleCanvasFilter("saved_canvas"))
96305
+ onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("saved_canvas"))
96757
96306
  }, {
96758
96307
  default: withCtx(() => [
96759
96308
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
@@ -96770,7 +96319,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96770
96319
  themeOverrides: {
96771
96320
  borderRadius: "4px"
96772
96321
  },
96773
- onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("template"))
96322
+ onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("template"))
96774
96323
  }, {
96775
96324
  default: withCtx(() => [
96776
96325
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
@@ -96788,7 +96337,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96788
96337
  themeOverrides: {
96789
96338
  borderRadius: "4px"
96790
96339
  },
96791
- onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("product_template"))
96340
+ onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("product_template"))
96792
96341
  }, {
96793
96342
  default: withCtx(() => [
96794
96343
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates")), 1)
@@ -96805,7 +96354,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96805
96354
  themeOverrides: {
96806
96355
  borderRadius: "4px"
96807
96356
  },
96808
- onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("section"))
96357
+ onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("section"))
96809
96358
  }, {
96810
96359
  default: withCtx(() => [
96811
96360
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 1)
@@ -96822,7 +96371,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96822
96371
  themeOverrides: {
96823
96372
  borderRadius: "4px"
96824
96373
  },
96825
- onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("block"))
96374
+ onClick: _cache[13] || (_cache[13] = ($event) => toggleCanvasFilter("block"))
96826
96375
  }, {
96827
96376
  default: withCtx(() => [
96828
96377
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 1)
@@ -96830,7 +96379,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96830
96379
  _: 1
96831
96380
  }, 8, ["style"]),
96832
96381
  selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15$f, [
96833
- _cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96382
+ _cache[19] || (_cache[19] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96834
96383
  createElementVNode("span", {
96835
96384
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96836
96385
  onClick: clearCanvasFilters
@@ -96860,7 +96409,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96860
96409
  }), 128))
96861
96410
  ]),
96862
96411
  recentlyOpenedDocs.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
96863
- _cache[19] || (_cache[19] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96412
+ _cache[20] || (_cache[20] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96864
96413
  createElementVNode("div", _hoisted_21$7, [
96865
96414
  createElementVNode("span", _hoisted_22$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
96866
96415
  ]),
@@ -96977,7 +96526,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96977
96526
  filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
96978
96527
  createElementVNode("span", {
96979
96528
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96980
- onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
96529
+ onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "content")
96981
96530
  }, [
96982
96531
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96983
96532
  createVNode(CIcon, {
@@ -97029,7 +96578,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97029
96578
  filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
97030
96579
  createElementVNode("span", {
97031
96580
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
97032
- onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
96581
+ onClick: _cache[15] || (_cache[15] = ($event) => searchType.value = "canvases")
97033
96582
  }, [
97034
96583
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
97035
96584
  createVNode(CIcon, {
@@ -97185,7 +96734,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
97185
96734
  }
97186
96735
  });
97187
96736
 
97188
- const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-da2357d4"]]);
96737
+ const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-052f4440"]]);
97189
96738
 
97190
96739
  const BulletListExtended = BulletList.extend({
97191
96740
  addOptions() {
@@ -99252,25 +98801,6 @@ const INITIAL_CALL_STATE = {
99252
98801
  };
99253
98802
 
99254
98803
  const realTimeExtraCrmShape = ref({});
99255
- function buildSchemaFromData(data) {
99256
- if (data === null || data === void 0) {
99257
- return null;
99258
- }
99259
- if (Array.isArray(data)) {
99260
- if (data.length === 0) {
99261
- return [];
99262
- }
99263
- return [buildSchemaFromData(data[0])];
99264
- }
99265
- if (typeof data === "object") {
99266
- const schema = {};
99267
- for (const [key, value] of Object.entries(data)) {
99268
- schema[key] = buildSchemaFromData(value);
99269
- }
99270
- return schema;
99271
- }
99272
- return null;
99273
- }
99274
98804
  function isEmptyValue(value) {
99275
98805
  return !value || typeof value === "string" && value.trim() === "";
99276
98806
  }
@@ -99290,7 +98820,6 @@ function removeEmptyValues(obj) {
99290
98820
  return result;
99291
98821
  }
99292
98822
  function useCrmShape() {
99293
- const { activeCanvas } = useCanvas$1();
99294
98823
  const call = useLocalStorage(CALL_STORAGE_KEY, INITIAL_CALL_STATE, {
99295
98824
  deep: true,
99296
98825
  listenToStorageChanges: true
@@ -99307,13 +98836,6 @@ function useCrmShape() {
99307
98836
  "myUser",
99308
98837
  computed(() => null)
99309
98838
  );
99310
- const pitcherDataSchema = computed(() => {
99311
- const pitcherData = activeCanvas.value?.context?.pitcher_data;
99312
- if (!pitcherData || typeof pitcherData !== "object") {
99313
- return {};
99314
- }
99315
- return { pitcher_data: buildSchemaFromData(pitcherData) };
99316
- });
99317
98839
  function getDefaultCrmShape({
99318
98840
  accountName = "",
99319
98841
  myUser: myUser2 = null,
@@ -99352,9 +98874,7 @@ function useCrmShape() {
99352
98874
  showDefault: !!launchDarkly.value.enable_default_crm_shape
99353
98875
  }),
99354
98876
  isEmpty(realTimeExtraCrmShape.value) ? {} : realTimeExtraCrmShape.value,
99355
- isEmpty(extraCrmShape.value) ? {} : extraCrmShape.value,
99356
- // Derive schema from actual pitcher_data in canvas context
99357
- isEmpty(pitcherDataSchema.value) ? {} : pitcherDataSchema.value
98877
+ isEmpty(extraCrmShape.value) ? {} : extraCrmShape.value
99358
98878
  );
99359
98879
  });
99360
98880
  return {
@@ -120824,7 +120344,7 @@ const _sfc_main$4k = /* @__PURE__ */ defineComponent({
120824
120344
 
120825
120345
  function useCanvasContext() {
120826
120346
  const { activeCanvas, isPrintDisplayMode, builderCache } = useCanvas$1();
120827
- const { crmShape, getDefaultCrmShape } = useCrmShape();
120347
+ const { getDefaultCrmShape } = useCrmShape();
120828
120348
  const myUser = inject(
120829
120349
  "myUser",
120830
120350
  computed(() => null)
@@ -120856,21 +120376,14 @@ function useCanvasContext() {
120856
120376
  builderCache.value[sectionOverrideKey] = mergedCtx;
120857
120377
  return mergedCtx;
120858
120378
  };
120859
- const fullContext = computed(() => {
120379
+ const crmShape = computed(() => getDefaultCrmShape({ myUser: myUser.value }));
120380
+ const crmShapeWithSectionCtx = computed(() => {
120860
120381
  const mergedCtx = getSectionCtx();
120861
- const defaultShape = getDefaultCrmShape({
120862
- myUser: myUser.value,
120863
- showDefault: true
120864
- });
120865
- return mergeWith({}, defaultShape, crmShape.value ?? {}, mergedCtx, (_objValue, srcValue) => {
120866
- if (Array.isArray(srcValue)) {
120867
- return srcValue;
120868
- }
120869
- return void 0;
120870
- });
120382
+ return !isEmpty(crmShape.value) ? { ...mergedCtx, ...crmShape.value } : mergedCtx;
120871
120383
  });
120872
120384
  return {
120873
- fullContext
120385
+ getSectionCtx,
120386
+ crmShapeWithSectionCtx
120874
120387
  };
120875
120388
  }
120876
120389
 
@@ -120916,10 +120429,10 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
120916
120429
  __name: "SelectionPanel",
120917
120430
  setup(__props) {
120918
120431
  useCssVars((_ctx) => ({
120919
- "7e857d3a": unref(themeVars).text,
120920
- "7e7d3ede": unref(themeVars).base,
120921
- "e1e1c7fe": unref(themeVars).primary6,
120922
- "e1e1c804": unref(themeVars).primary3
120432
+ "6fe3245a": unref(themeVars).text,
120433
+ "6fdae5fe": unref(themeVars).base,
120434
+ "85f799be": unref(themeVars).primary6,
120435
+ "85f799c4": unref(themeVars).primary3
120923
120436
  }));
120924
120437
  const { t } = useI18n();
120925
120438
  const { renderContentType, isFileExpired, isFileExpiring } = useFileDisplayHelpers();
@@ -120941,7 +120454,7 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
120941
120454
  "launchDarkly",
120942
120455
  computed(() => ({}))
120943
120456
  );
120944
- const { fullContext } = useCanvasContext();
120457
+ const { crmShapeWithSectionCtx } = useCanvasContext();
120945
120458
  const isCrmShapeEnabled = computed(() => launchDarkly.value?.enable_crm_shape_for_external_links ?? false);
120946
120459
  const draggableItems = computed({
120947
120460
  get: () => isDragNDropEnabled.value ? addedItems.value : selectedItems.value,
@@ -120956,7 +120469,7 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
120956
120469
  function getParsedUrl(url) {
120957
120470
  if (!url || !isCrmShapeEnabled.value) return url;
120958
120471
  try {
120959
- return renderTemplate(url, fullContext.value);
120472
+ return renderTemplate(url, crmShapeWithSectionCtx.value);
120960
120473
  } catch (error) {
120961
120474
  console.warn("Failed to parse template in external URL, using original URL:", error);
120962
120475
  return url;
@@ -121260,7 +120773,7 @@ const _sfc_main$4j = /* @__PURE__ */ defineComponent({
121260
120773
  }
121261
120774
  });
121262
120775
 
121263
- const SelectionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$4j, [["__scopeId", "data-v-05db071e"]]);
120776
+ const SelectionPanel = /* @__PURE__ */ _export_sfc(_sfc_main$4j, [["__scopeId", "data-v-aa03fa77"]]);
121264
120777
 
121265
120778
  const _hoisted_1$3q = { class: "flex justify-between gap-2 items-center truncate py-1" };
121266
120779
  const _hoisted_2$2z = {
@@ -123792,13 +123305,13 @@ const _sfc_main$45 = /* @__PURE__ */ defineComponent({
123792
123305
  computed(() => ({}))
123793
123306
  );
123794
123307
  const { crmShape } = useCrmShape();
123795
- const { fullContext } = useCanvasContext();
123308
+ const { crmShapeWithSectionCtx } = useCanvasContext();
123796
123309
  const isCrmShapeEnabled = computed(() => launchDarkly.value?.enable_crm_shape_for_external_links ?? false);
123797
123310
  const parsedUrl = computed(() => {
123798
123311
  if (!url.value.trim()) return url.value;
123799
123312
  if (!isCrmShapeEnabled.value) return url.value;
123800
123313
  try {
123801
- return renderTemplate(url.value, fullContext.value);
123314
+ return renderTemplate(url.value, crmShapeWithSectionCtx.value);
123802
123315
  } catch (error) {
123803
123316
  console.error("Error parsing URL template:", error);
123804
123317
  return url.value;
@@ -123904,7 +123417,7 @@ const _sfc_main$45 = /* @__PURE__ */ defineComponent({
123904
123417
  }
123905
123418
  });
123906
123419
 
123907
- const ExternalLinks = /* @__PURE__ */ _export_sfc(_sfc_main$45, [["__scopeId", "data-v-ba7b39ff"]]);
123420
+ const ExternalLinks = /* @__PURE__ */ _export_sfc(_sfc_main$45, [["__scopeId", "data-v-1287b675"]]);
123908
123421
 
123909
123422
  const _hoisted_1$3d = { class: "mr-3 h-full" };
123910
123423
  const _hoisted_2$2m = { class: "flex flex-col gap-3 mb-3" };
@@ -132741,6 +132254,44 @@ const _sfc_main$3o = /* @__PURE__ */ defineComponent({
132741
132254
  }
132742
132255
  });
132743
132256
 
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
+
132744
132295
  const useCollectionSelector = (selectCollectionPlayerContent) => {
132745
132296
  const { updateNodeDataById, setComponentSettingsMode, contentRef, onCollectionPlayerContentChange } = useCanvas$1();
132746
132297
  const trackContentChange = (id, data) => {
@@ -133139,7 +132690,7 @@ const _sfc_main$3n = /* @__PURE__ */ defineComponent({
133139
132690
  } else {
133140
132691
  let withData = void 0;
133141
132692
  if (selection.type === ComponentTypes.CollectionPlayer) {
133142
- withData = generateNewCollection$1(t);
132693
+ withData = generateNewCollection$2(t);
133143
132694
  }
133144
132695
  addComponentAtParentId(
133145
132696
  selection.type,
@@ -139969,6 +139520,353 @@ const _sfc_main$2S = /* @__PURE__ */ defineComponent({
139969
139520
 
139970
139521
  const CollectionPlayerApp = /* @__PURE__ */ _export_sfc(_sfc_main$2S, [["__scopeId", "data-v-1c2ca5d7"]]);
139971
139522
 
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
+
139972
139870
  function useLegacyCollectionFileLoader() {
139973
139871
  const fetchFileById = inject("fetchFileById");
139974
139872
  const canvasFileCache = inject("canvasFileCache", ref(/* @__PURE__ */ new Map()));
@@ -147990,7 +147888,7 @@ const _sfc_main$2i = /* @__PURE__ */ defineComponent({
147990
147888
  } = useCanvas$1();
147991
147889
  const { discardOverridesConfirmationOptions, getComponentOverrides } = useCanvasSectionOverrides();
147992
147890
  const { getDerivedStyleFromFeatureFlags } = useComponentStyle(componentNode);
147993
- const { fullContext } = useCanvasContext();
147891
+ const { crmShapeWithSectionCtx } = useCanvasContext();
147994
147892
  const { setContentSelectorMode } = useContentSelector();
147995
147893
  const confirmation = useConfirmation();
147996
147894
  const themeVars = useThemeVars();
@@ -148143,7 +148041,7 @@ const _sfc_main$2i = /* @__PURE__ */ defineComponent({
148143
148041
  try {
148144
148042
  return {
148145
148043
  ...value,
148146
- external_url: renderTemplate(value.external_url, fullContext.value)
148044
+ external_url: renderTemplate(value.external_url, crmShapeWithSectionCtx.value)
148147
148045
  };
148148
148046
  } catch (error) {
148149
148047
  console.warn("Failed to parse template in external URL, using original URL:", error);
@@ -148661,7 +148559,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
148661
148559
  setCanvasMetadata,
148662
148560
  isImpact
148663
148561
  } = useCanvas$1();
148664
- const { fullContext } = useCanvasContext();
148562
+ const { crmShapeWithSectionCtx } = useCanvasContext();
148665
148563
  const { coreRestApiAxios } = useCoreApi();
148666
148564
  const { applyPrintModeToElement } = usePrintMode();
148667
148565
  const { discardOverridesConfirmationOptions, getComponentOverrides } = useCanvasSectionOverrides();
@@ -148718,7 +148616,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
148718
148616
  const memoizedModelValue = computed(() => getModelValue(computedTextProps.value.data?.content));
148719
148617
  function getModelValue(value = "") {
148720
148618
  if (!shouldInterpolate.value || !value.trim()) return value;
148721
- return renderTemplate(value, fullContext.value);
148619
+ return renderTemplate(value, crmShapeWithSectionCtx.value);
148722
148620
  }
148723
148621
  const debouncedUpdateNodeData = debounce((data2, nodeId, sectionId) => {
148724
148622
  return updateNodeData(data2, nodeId, sectionId);
@@ -148826,7 +148724,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
148826
148724
  );
148827
148725
  applyPrintModeToElement(contentElement.value, () => {
148828
148726
  const content = computedTextProps.value.data?.content || "";
148829
- return shouldInterpolate.value ? renderTemplate(content, fullContext.value) : content;
148727
+ return shouldInterpolate.value ? renderTemplate(content, crmShapeWithSectionCtx.value) : content;
148830
148728
  });
148831
148729
  if (enableScaleContent && spanStyles) {
148832
148730
  setTimeout(() => {
@@ -148938,7 +148836,7 @@ const _sfc_main$2h = /* @__PURE__ */ defineComponent({
148938
148836
  }
148939
148837
  });
148940
148838
 
148941
- const Text = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["__scopeId", "data-v-73a884c3"]]);
148839
+ const Text = /* @__PURE__ */ _export_sfc(_sfc_main$2h, [["__scopeId", "data-v-b2424519"]]);
148942
148840
 
148943
148841
  const _hoisted_1$1Q = { class: "absolute top-2 right-2 flex items-center gap-1 z-10" };
148944
148842
  const _hoisted_2$1m = { class: "text-xs" };
@@ -162670,7 +162568,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
162670
162568
  // Add height only if already present or if the form value is set (backwards compatibility)
162671
162569
  ...activeSettingsNode.value?.type === ComponentTypes.CollectionPlayer && ("height" in activeSettingsNode.value || formValues.height) ? { height: formValues.height } : {},
162672
162570
  ...isAdminSectionTemplateWithFlag.value ? { allow_admins_to_overwrite: formValues.allowAdminsToOverwrite } : {},
162673
- ...activeSettingsNode.value?.type && ["ContentGrid", "CollectionPlayer"].includes(activeSettingsNode.value.type) ? { is_sharebox_target: formValues.isShareboxTarget } : {},
162571
+ ...activeSettingsNode.value?.type === "ContentGrid" ? { is_sharebox_target: formValues.isShareboxTarget } : {},
162674
162572
  ...newData
162675
162573
  });
162676
162574
  };
@@ -162960,15 +162858,6 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
162960
162858
  ]),
162961
162859
  _: 1
162962
162860
  }, 8, ["checked"]),
162963
- createVNode(unref(NCheckbox), {
162964
- checked: formValues.isShareboxTarget,
162965
- "onUpdate:checked": _cache[18] || (_cache[18] = ($event) => formValues.isShareboxTarget = $event)
162966
- }, {
162967
- default: withCtx(() => [
162968
- createTextVNode(toDisplayString(unref(t)("canvasUI.canvasBuilder.canvasSettings.form.messages.isShareboxTarget")), 1)
162969
- ]),
162970
- _: 1
162971
- }, 8, ["checked"]),
162972
162861
  unref(launchDarkly).enable_collection_player_data_accessor && (unref(isTemplate) || selectedCollectionPlayerDataPath.value) ? (openBlock(), createElementBlock("div", _hoisted_5$w, [
162973
162862
  createElementVNode("div", _hoisted_6$s, [
162974
162863
  createElementVNode("label", null, toDisplayString(unref(t)("canvasUI.canvasBuilder.canvasSettings.form.label.collectionPlayerDataAccessor")), 1),
@@ -163042,7 +162931,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
163042
162931
  block: "",
163043
162932
  class: "mt-auto",
163044
162933
  type: "primary",
163045
- onClick: _cache[19] || (_cache[19] = ($event) => updateShow(false))
162934
+ onClick: _cache[18] || (_cache[18] = ($event) => updateShow(false))
163046
162935
  }, {
163047
162936
  default: withCtx(() => [
163048
162937
  createTextVNode(toDisplayString(unref(t)("canvasUI.common.done")), 1)
@@ -163056,7 +162945,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
163056
162945
  }
163057
162946
  });
163058
162947
 
163059
- const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-dce6a881"]]);
162948
+ const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-c7a7411e"]]);
163060
162949
 
163061
162950
  function useConnectUpload() {
163062
162951
  async function uploadToConnect(formData) {
@@ -169708,7 +169597,7 @@ const clearCache = () => {
169708
169597
  const _export$3 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
169709
169598
  __proto__: null,
169710
169599
  clearCache,
169711
- generateNewCollection: generateNewCollection$2,
169600
+ generateNewCollection: generateNewCollection$1,
169712
169601
  generateNewCollectionStructure,
169713
169602
  getUniqueSlides,
169714
169603
  provideAppStore: provideAppStore$3,
@@ -170692,7 +170581,7 @@ function provideAppStore$2({
170692
170581
  translations,
170693
170582
  contentRef
170694
170583
  }) {
170695
- const rawCollection = ref({ ...generateNewCollection$1(t), ...cloneDeep(initialCollection) ?? {} });
170584
+ const rawCollection = ref({ ...generateNewCollection$2(t), ...cloneDeep(initialCollection) ?? {} });
170696
170585
  const fileLoader = useLegacyCollectionFileLoader();
170697
170586
  const childModalZIndex = zIndex !== void 0 ? zIndex + 1 : void 0;
170698
170587
  const isSettingsButtonVisible = computed(() => !!openSettingsFn || !!closeOnSettings);
@@ -181765,7 +181654,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
181765
181654
 
181766
181655
  const _export$2 = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty({
181767
181656
  __proto__: null,
181768
- generateNewCollection: generateNewCollection$1,
181657
+ generateNewCollection: generateNewCollection$2,
181769
181658
  generateNewCollectionFile,
181770
181659
  generateNewCollectionSlide,
181771
181660
  generateNewEmptyGroup: generateNewEmptyGroup$2,
@@ -183682,8 +183571,18 @@ function getEventColor(sfEvent) {
183682
183571
  } else {
183683
183572
  isSubmitted = false;
183684
183573
  }
183574
+ const now = /* @__PURE__ */ new Date();
183685
183575
  if (isSubmitted) return SfEventColors.SUBMITTED;
183686
- else if (isAfter$1(/* @__PURE__ */ new Date(), new Date(sfEvent.EndDateTime))) return SfEventColors.PAST;
183576
+ else if (sfEvent.IsAllDayEvent) {
183577
+ const endDate = new Date(sfEvent.EndDateTime);
183578
+ const nowUTC = Date.UTC(now.getUTCFullYear(), now.getUTCMonth(), now.getUTCDate());
183579
+ const endDateUTC = Date.UTC(
183580
+ endDate.getUTCFullYear(),
183581
+ endDate.getUTCMonth(),
183582
+ endDate.getUTCDate()
183583
+ );
183584
+ return nowUTC >= endDateUTC ? SfEventColors.PAST : SfEventColors.PLANNED;
183585
+ } else if (isAfter$1(now, new Date(sfEvent.EndDateTime))) return SfEventColors.PAST;
183687
183586
  else return SfEventColors.PLANNED;
183688
183587
  }
183689
183588
  const minFutureDate = (date = /* @__PURE__ */ new Date()) => add(date, { minutes: MIN_DIFFERENCE_IN_MINUTES });
@@ -184211,5 +184110,5 @@ const localeNames = {
184211
184110
  };
184212
184111
  const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
184213
184112
 
184214
- 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 };
184113
+ 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 };
184215
184114
  //# sourceMappingURL=canvas-ui.js.map