@pitcher/canvas-ui 2026.1.21-152038-beta → 2026.1.22-122411-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/canvas-ui.css CHANGED
@@ -873,8 +873,8 @@ button[data-v-840d4fd4]:focus {
873
873
  margin: 8px 0px;
874
874
  }td[data-v-8b32d0b5] {
875
875
  border-bottom: 1px solid var(--75c10f0a);
876
- }.template-section--has-next[data-v-fdc432dc] {
877
- border-bottom: 1px solid var(--7551f622);
876
+ }.template-section--has-next[data-v-963d1d99] {
877
+ border-bottom: 1px solid var(--1d28f703);
878
878
  }.template-management-list-item[data-v-6df1530a] {
879
879
  border-bottom: 1px solid var(--1911282a);
880
880
  }
@@ -1401,18 +1401,18 @@ to {
1401
1401
  height: 100px;
1402
1402
  background: var(--3ad38b36);
1403
1403
  }
1404
- .content-grid-file-item[data-v-2a28d327] {
1405
- color: 1px solid var(--216a78e5);
1404
+ .content-grid-file-item[data-v-3e82c628] {
1405
+ color: 1px solid var(--0530313e);
1406
1406
  }
1407
- .content-grid-file-item__img[data-v-2a28d327] {
1408
- outline: 1px solid var(--0b2f6ba8);
1407
+ .content-grid-file-item__img[data-v-3e82c628] {
1408
+ outline: 1px solid var(--b65bcab0);
1409
1409
  }
1410
- .description[data-v-2a28d327] {
1411
- color: var(--0be4a3ee);
1410
+ .description[data-v-3e82c628] {
1411
+ color: var(--a0d5f61c);
1412
1412
  }
1413
1413
  .dot-slider {
1414
1414
  .dot {
1415
- &[data-v-2a28d327] {
1415
+ &[data-v-3e82c628] {
1416
1416
  border-radius: 50%;
1417
1417
  background-color: rgba(0, 0, 0, 0.3);
1418
1418
  border: 1px solid rgba(255, 255, 255, 0.6);
@@ -1420,10 +1420,10 @@ to {
1420
1420
  box-shadow 0.3s 0,
1421
1421
  background-color 0.3s 0;
1422
1422
  }
1423
- &.dot--active[data-v-2a28d327] {
1423
+ &.dot--active[data-v-3e82c628] {
1424
1424
  height: 10px;
1425
1425
  width: 10px;
1426
- background-color: var(--31e8c16c);
1426
+ background-color: var(--6027cf4e);
1427
1427
  }
1428
1428
  }
1429
1429
  }
@@ -1432,15 +1432,15 @@ to {
1432
1432
  }
1433
1433
  .color-text[data-v-79d6b1bf] {
1434
1434
  color: var(--0a685aa6);
1435
- }.content-grid-raw__item[data-v-d0a87ee1] {
1436
- color: var(--e528c74e);
1437
- border: 1px solid var(--7182939f);
1435
+ }.content-grid-raw__item[data-v-1b7c7dda] {
1436
+ color: var(--68a0d203);
1437
+ border: 1px solid var(--c31e376e);
1438
1438
  }
1439
- .content-grid-raw__item__img[data-v-d0a87ee1] {
1440
- outline: 1px solid var(--718293a0);
1439
+ .content-grid-raw__item__img[data-v-1b7c7dda] {
1440
+ outline: 1px solid var(--c31e376c);
1441
1441
  }
1442
- .content-grid-raw__item__hint[data-v-d0a87ee1] {
1443
- color: var(--2007eefa);
1442
+ .content-grid-raw__item__hint[data-v-1b7c7dda] {
1443
+ color: var(--a90d22e0);
1444
1444
  }
1445
1445
  [data-v-440dbcdb] .content-grid-carousel__arrows {
1446
1446
  box-sizing: border-box;
@@ -1469,12 +1469,12 @@ to {
1469
1469
  [data-v-440dbcdb] .content-grid-carousel__button:hover {
1470
1470
  background-color: rgba(0, 0, 0, 0.1);
1471
1471
  }
1472
- .content-grid-list-item[data-v-1ade5c19] {
1472
+ .content-grid-list-item[data-v-6c18ece2] {
1473
1473
  cursor: pointer;
1474
1474
  transition: background-color 0.2s;
1475
1475
  }
1476
- .content-grid-list-item[data-v-1ade5c19]:hover {
1477
- background-color: var(--cd2efdac);
1476
+ .content-grid-list-item[data-v-6c18ece2]:hover {
1477
+ background-color: var(--124a30c2);
1478
1478
  }
1479
1479
  .content-grid-list[data-v-f00de553] {
1480
1480
  max-height: 600px;
@@ -3072,8 +3072,8 @@ to {
3072
3072
  .panel[data-v-cde3ebee] {
3073
3073
  background-color: var(--5e24e1e8);
3074
3074
  }
3075
- .browser-list-item[data-v-8781de25] {
3076
- border-bottom: 1px solid var(--10ccf2df);
3075
+ .browser-list-item[data-v-f822adec] {
3076
+ border-bottom: 1px solid var(--7438e094);
3077
3077
  }.breadcrumb-area[data-v-41ca4793] .n-button {
3078
3078
  border: 1px solid var(--6b5e9219) !important;
3079
3079
  }
package/canvas-ui.js CHANGED
@@ -79760,6 +79760,12 @@ const _hoisted_3$2_ = {
79760
79760
  key: 1,
79761
79761
  class: "flex gap-4 w-full"
79762
79762
  };
79763
+ const _hoisted_4$2o = { class: "flex items-center gap-3" };
79764
+ const _hoisted_5$1$ = { class: "text-16px" };
79765
+ const _hoisted_6$1H = { class: "flex items-center gap-3" };
79766
+ const _hoisted_7$1h = { class: "text-16px" };
79767
+ const _hoisted_8$12 = { class: "flex items-center gap-3" };
79768
+ const _hoisted_9$S = { class: "text-16px" };
79763
79769
  const _sfc_main$6B = /* @__PURE__ */ defineComponent({
79764
79770
  __name: "CFileAttributes",
79765
79771
  props: {
@@ -79794,6 +79800,8 @@ const _sfc_main$6B = /* @__PURE__ */ defineComponent({
79794
79800
  const labels = {
79795
79801
  sharing: t("canvasUI.browserApp.uploadFilesModal.sharing.label"),
79796
79802
  divisible: t("canvasUI.browserApp.uploadFilesModal.divisible.label"),
79803
+ allowExternalSharing: t("canvasUI.files.sharing.allowExternalSharing"),
79804
+ allowPrint: t("canvasUI.files.sharing.allowPrint"),
79797
79805
  tags: t("canvasUI.browserApp.uploadFilesModal.tags.label"),
79798
79806
  expiresAtDateTime: t("canvasUI.browserApp.uploadFilesModal.expiresAt.label"),
79799
79807
  accessType: t("canvasUI.browserApp.uploadFilesModal.access.label")
@@ -79914,6 +79922,41 @@ const _sfc_main$6B = /* @__PURE__ */ defineComponent({
79914
79922
  form.value.permissions.can_be_divided = value;
79915
79923
  }
79916
79924
  });
79925
+ const sharingValueAsBoolean = computed({
79926
+ get: () => {
79927
+ return form.value.permissions?.can_share ?? true;
79928
+ },
79929
+ set: (value) => {
79930
+ if (!form.value.permissions) {
79931
+ form.value.permissions = {};
79932
+ }
79933
+ form.value.permissions.can_share = value;
79934
+ }
79935
+ });
79936
+ const printValueAsBoolean = computed({
79937
+ get: () => {
79938
+ return form.value.permissions?.can_print ?? true;
79939
+ },
79940
+ set: (value) => {
79941
+ form.value.permissions = form.value.permissions || {};
79942
+ form.value.permissions.can_print = value;
79943
+ form.value.metadata = form.value.metadata || {};
79944
+ form.value.metadata.pitcher = form.value.metadata.pitcher || {};
79945
+ form.value.metadata.pitcher.can_print = value;
79946
+ }
79947
+ });
79948
+ function onChangeSharingNew(value) {
79949
+ sharingValueAsBoolean.value = value;
79950
+ if (!value) {
79951
+ printValueAsBoolean.value = false;
79952
+ }
79953
+ }
79954
+ function onChangePrint(value) {
79955
+ printValueAsBoolean.value = value;
79956
+ if (!sharingValueAsBoolean.value) {
79957
+ printValueAsBoolean.value = false;
79958
+ }
79959
+ }
79917
79960
  function isEditingFieldOrNonEmpty(fieldName) {
79918
79961
  if (fieldName === "permissions") {
79919
79962
  return form.value.permissions?.can_share !== void 0 || editingField.value === fieldName;
@@ -80040,7 +80083,7 @@ const _sfc_main$6B = /* @__PURE__ */ defineComponent({
80040
80083
  ]),
80041
80084
  _: 1
80042
80085
  }, 8, ["label"]),
80043
- _ctx.showPermissionSettings ? (openBlock(), createBlock(unref(NFormItemGridItem), {
80086
+ _ctx.showPermissionSettings && !unref(launchDarkly).enable_file_sharing_print_permissions ? (openBlock(), createBlock(unref(NFormItemGridItem), {
80044
80087
  key: 0,
80045
80088
  label: labels.sharing
80046
80089
  }, {
@@ -80145,23 +80188,62 @@ const _sfc_main$6B = /* @__PURE__ */ defineComponent({
80145
80188
  })) : createCommentVNode("", true),
80146
80189
  _ctx.showPermissionSettings && unref(launchDarkly).enable_file_divisible_permission ? (openBlock(), createBlock(unref(NFormItemGridItem), {
80147
80190
  key: 3,
80148
- label: labels.divisible
80191
+ class: "mx-1",
80192
+ "show-label": false,
80193
+ span: 2
80149
80194
  }, {
80150
80195
  default: withCtx(() => [
80151
- _ctx.showKeepAsIsPlaceholder && !isEditingFieldOrNonEmpty("divisiblePermission") ? (openBlock(), createBlock(CInputPlaceholder, {
80152
- key: 0,
80153
- onClick: _cache[9] || (_cache[9] = ($event) => enableEditing("divisiblePermission", unref(MetadataTemplateFieldTypeEnum).SELECT))
80154
- })) : (openBlock(), createBlock(_sfc_main$6F, {
80155
- key: 1,
80156
- checked: divisibleValueAsBoolean.value,
80157
- class: "mx-1",
80158
- "data-field": "divisiblePermission",
80159
- onBlur: _cache[10] || (_cache[10] = ($event) => handleBlur("divisiblePermission")),
80160
- "onUpdate:checked": onChangeDivisible
80161
- }, null, 8, ["checked"]))
80196
+ createElementVNode("div", _hoisted_4$2o, [
80197
+ createVNode(_sfc_main$6F, {
80198
+ checked: divisibleValueAsBoolean.value,
80199
+ "data-field": "divisiblePermission",
80200
+ onBlur: _cache[9] || (_cache[9] = ($event) => handleBlur("divisiblePermission")),
80201
+ "onUpdate:checked": onChangeDivisible
80202
+ }, null, 8, ["checked"]),
80203
+ createElementVNode("span", _hoisted_5$1$, toDisplayString(labels.divisible), 1)
80204
+ ])
80162
80205
  ]),
80163
80206
  _: 1
80164
- }, 8, ["label"])) : createCommentVNode("", true)
80207
+ })) : createCommentVNode("", true),
80208
+ _ctx.showPermissionSettings && unref(launchDarkly).enable_file_sharing_print_permissions ? (openBlock(), createBlock(unref(NFormItemGridItem), {
80209
+ key: 4,
80210
+ class: "mx-1",
80211
+ "show-label": false,
80212
+ span: 2
80213
+ }, {
80214
+ default: withCtx(() => [
80215
+ createElementVNode("div", _hoisted_6$1H, [
80216
+ createVNode(_sfc_main$6F, {
80217
+ checked: sharingValueAsBoolean.value,
80218
+ "data-field": "sharingPermission",
80219
+ onBlur: _cache[10] || (_cache[10] = ($event) => handleBlur("sharingPermission")),
80220
+ "onUpdate:checked": onChangeSharingNew
80221
+ }, null, 8, ["checked"]),
80222
+ createElementVNode("span", _hoisted_7$1h, toDisplayString(labels.allowExternalSharing), 1)
80223
+ ])
80224
+ ]),
80225
+ _: 1
80226
+ })) : createCommentVNode("", true),
80227
+ _ctx.showPermissionSettings && unref(launchDarkly).enable_file_sharing_print_permissions ? (openBlock(), createBlock(unref(NFormItemGridItem), {
80228
+ key: 5,
80229
+ class: "mx-1",
80230
+ "show-label": false,
80231
+ span: 2
80232
+ }, {
80233
+ default: withCtx(() => [
80234
+ createElementVNode("div", _hoisted_8$12, [
80235
+ createVNode(_sfc_main$6F, {
80236
+ checked: printValueAsBoolean.value,
80237
+ "data-field": "printPermission",
80238
+ disabled: !sharingValueAsBoolean.value,
80239
+ onBlur: _cache[11] || (_cache[11] = ($event) => handleBlur("printPermission")),
80240
+ "onUpdate:checked": onChangePrint
80241
+ }, null, 8, ["checked", "disabled"]),
80242
+ createElementVNode("span", _hoisted_9$S, toDisplayString(labels.allowPrint), 1)
80243
+ ])
80244
+ ]),
80245
+ _: 1
80246
+ })) : createCommentVNode("", true)
80165
80247
  ]),
80166
80248
  _: 1
80167
80249
  })
@@ -106843,7 +106925,7 @@ const _sfc_main$52 = /* @__PURE__ */ defineComponent({
106843
106925
  emits: ["change"],
106844
106926
  setup(__props, { expose: __expose, emit: __emit }) {
106845
106927
  useCssVars((_ctx) => ({
106846
- "7551f622": unref(themeVars).primary5
106928
+ "1d28f703": unref(themeVars).primary5
106847
106929
  }));
106848
106930
  const themeVars = useThemeVars();
106849
106931
  const { t } = useI18n();
@@ -106891,9 +106973,23 @@ const _sfc_main$52 = /* @__PURE__ */ defineComponent({
106891
106973
  });
106892
106974
  });
106893
106975
  }
106894
- config.value = !isEmpty(filteredInitialValues) ? filteredInitialValues : sections.reduce((acc, section) => {
106976
+ config.value = sections.reduce((acc, section) => {
106895
106977
  section.fields.forEach((field) => {
106896
- acc[field.name] = null;
106978
+ const fieldExists = field.name in filteredInitialValues;
106979
+ if (fieldExists) {
106980
+ acc[field.name] = filteredInitialValues[field.name];
106981
+ } else if (field.default == null) {
106982
+ acc[field.name] = null;
106983
+ } else if (field.type === MetadataTemplateFieldTypeEnum.MULTI_SELECT && Array.isArray(field.default)) {
106984
+ const validOptions = new Set(field.options?.map((opt) => opt.value));
106985
+ const validDefaults = field.default.filter((v) => validOptions.has(v));
106986
+ acc[field.name] = validDefaults.length > 0 ? validDefaults : null;
106987
+ } else if (field.type === MetadataTemplateFieldTypeEnum.SELECT) {
106988
+ const validOptions = new Set(field.options?.map((opt) => opt.value));
106989
+ acc[field.name] = validOptions.has(field.default) ? field.default : null;
106990
+ } else {
106991
+ acc[field.name] = field.default;
106992
+ }
106897
106993
  });
106898
106994
  return acc;
106899
106995
  }, {});
@@ -107157,7 +107253,7 @@ const _sfc_main$52 = /* @__PURE__ */ defineComponent({
107157
107253
  }
107158
107254
  });
107159
107255
 
107160
- const CConfigEditor = /* @__PURE__ */ _export_sfc(_sfc_main$52, [["__scopeId", "data-v-fdc432dc"]]);
107256
+ const CConfigEditor = /* @__PURE__ */ _export_sfc(_sfc_main$52, [["__scopeId", "data-v-963d1d99"]]);
107161
107257
 
107162
107258
  const _sfc_main$51 = /* @__PURE__ */ defineComponent({
107163
107259
  __name: "CAttributesForm",
@@ -111302,8 +111398,15 @@ const _sfc_main$4T = /* @__PURE__ */ defineComponent({
111302
111398
  icon: "solid-share-from-square-slash",
111303
111399
  text: unref(t)("canvasUI.files.notShareable")
111304
111400
  }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
111305
- Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
111401
+ unref(launchDarkly).enable_file_sharing_print_permissions && _ctx.item?.permissions?.can_share !== false && _ctx.item?.permissions?.can_print === false ? (openBlock(), createBlock(_sfc_main$4W, {
111306
111402
  key: 2,
111403
+ "background-color": unref(themeVars).error2,
111404
+ color: unref(themeVars).error,
111405
+ icon: "print-slash",
111406
+ text: unref(t)("canvasUI.files.printingDisabled")
111407
+ }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
111408
+ Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
111409
+ key: 3,
111307
111410
  class: "gap-2 mr-2",
111308
111411
  engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[_ctx.item.id]?.engagement : void 0,
111309
111412
  "is-recommended": !!unref(recommendedSectionIds).includes(_ctx.item.id?.toString()),
@@ -122464,6 +122567,12 @@ const _sfc_main$4e = /* @__PURE__ */ defineComponent({
122464
122567
  const isExpandFileDisabled = computed(() => {
122465
122568
  return props.isDisabled || appProps?.contentType.value === "file" || props.item.content_type !== "pdf" || launchDarkly.value.enable_file_divisible_permission && props.item.permissions?.can_be_divided === false;
122466
122569
  });
122570
+ const isPrintable = computed(() => {
122571
+ if (!launchDarkly.value.enable_file_sharing_print_permissions) {
122572
+ return true;
122573
+ }
122574
+ return props.item?.permissions?.can_print !== false;
122575
+ });
122467
122576
  return (_ctx, _cache) => {
122468
122577
  const _directive_tooltip = resolveDirective("tooltip");
122469
122578
  return openBlock(), createElementBlock("div", {
@@ -122604,8 +122713,15 @@ const _sfc_main$4e = /* @__PURE__ */ defineComponent({
122604
122713
  icon: "solid-share-from-square-slash",
122605
122714
  text: unref(t)("canvasUI.files.notShareable")
122606
122715
  }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
122607
- Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
122716
+ !isPrintable.value ? (openBlock(), createBlock(_sfc_main$4W, {
122608
122717
  key: 2,
122718
+ "background-color": unref(themeVars).error2,
122719
+ color: unref(themeVars).error,
122720
+ icon: "print-slash",
122721
+ text: unref(t)("canvasUI.components.ContentGrid.printingDisabled")
122722
+ }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
122723
+ Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
122724
+ key: 3,
122609
122725
  class: "flex gap-2 mr-2",
122610
122726
  engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[_ctx.data[_ctx.index].id]?.engagement : void 0,
122611
122727
  "is-recommended": !!unref(recommendedSectionIds).includes(_ctx.data[_ctx.index].id),
@@ -140960,10 +141076,10 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
140960
141076
  },
140961
141077
  setup(__props) {
140962
141078
  useCssVars((_ctx) => ({
140963
- "216a78e5": unref(themeVars).text,
140964
- "0b2f6ba8": unref(themeVars).primary6,
140965
- "0be4a3ee": unref(themeVars).text3,
140966
- "31e8c16c": unref(themeVars).primary
141079
+ "0530313e": unref(themeVars).text,
141080
+ "b65bcab0": unref(themeVars).primary6,
141081
+ "a0d5f61c": unref(themeVars).text3,
141082
+ "6027cf4e": unref(themeVars).primary
140967
141083
  }));
140968
141084
  const props = __props;
140969
141085
  const launchDarkly = inject(
@@ -140971,7 +141087,7 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
140971
141087
  computed(() => ({}))
140972
141088
  );
140973
141089
  const { t } = useI18n();
140974
- const { mode, isEditMode, onDownloadFile, isDefaultDisplayMode, isAdmin, canvasMetadata } = useCanvas$1();
141090
+ const { mode, isEditMode, onDownloadFile, isDefaultDisplayMode, isAdmin, canvasMetadata, fileDataCache } = useCanvas$1();
140975
141091
  const { renderContentType, isFileExpired, isFileExpiring } = useFileDisplayHelpers();
140976
141092
  const { recommendedSectionIds } = useRecommendations();
140977
141093
  const { popularityDict } = useSectionPopularity(computed(() => ({})));
@@ -140979,6 +141095,16 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
140979
141095
  const vTooltip = tooltipDirective;
140980
141096
  const item = computed(() => props.item.type === "file" ? props.item : null);
140981
141097
  const isShareable = computed(() => item.value?.file.permissions?.can_share !== false);
141098
+ const isPrintable = computed(() => {
141099
+ if (!launchDarkly.value.enable_file_sharing_print_permissions) {
141100
+ return true;
141101
+ }
141102
+ const file = fileDataCache.value.get(item.value?.file.id || "");
141103
+ if (file) {
141104
+ return file.permissions?.can_print !== false;
141105
+ }
141106
+ return item.value?.file.permissions?.can_print !== false;
141107
+ });
140982
141108
  const isAdvancedSharingEnabled = computed(() => !!launchDarkly.value?.use_advanced_sharing_modal);
140983
141109
  const canDownload = computed(() => {
140984
141110
  if (item.value?.file.permissions?.can_download === false) {
@@ -141173,6 +141299,15 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
141173
141299
  variation: "minimal"
141174
141300
  }, null, 8, ["background-color", "color"])), [
141175
141301
  [unref(vTooltip), unref(t)("canvasUI.components.ContentGrid.sharingDisabled")]
141302
+ ]) : createCommentVNode("", true),
141303
+ !isPrintable.value ? withDirectives((openBlock(), createBlock(_sfc_main$4W, {
141304
+ key: 4,
141305
+ "background-color": unref(themeVars).error2,
141306
+ color: unref(themeVars).error,
141307
+ icon: "print-slash",
141308
+ variation: "minimal"
141309
+ }, null, 8, ["background-color", "color"])), [
141310
+ [unref(vTooltip), unref(t)("canvasUI.components.ContentGrid.printingDisabled")]
141176
141311
  ]) : createCommentVNode("", true)
141177
141312
  ])
141178
141313
  ]),
@@ -141188,7 +141323,7 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
141188
141323
  }
141189
141324
  });
141190
141325
 
141191
- const ContentGridFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$2O, [["__scopeId", "data-v-2a28d327"]]);
141326
+ const ContentGridFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$2O, [["__scopeId", "data-v-3e82c628"]]);
141192
141327
 
141193
141328
  const _hoisted_1$2a = { class: "flex items-center flex-col justify-center" };
141194
141329
  const _hoisted_2$1y = { class: "text-center font-400 text-truncate font-size-4 line-height-6 color-text font-normal" };
@@ -141248,10 +141383,10 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
141248
141383
  emits: ["deletedFileClicked"],
141249
141384
  setup(__props, { emit: __emit }) {
141250
141385
  useCssVars((_ctx) => ({
141251
- "e528c74e": unref(themeVars).text,
141252
- "7182939f": unref(themeVars).primary5,
141253
- "718293a0": unref(themeVars).primary6,
141254
- "2007eefa": unref(themeVars).text3
141386
+ "68a0d203": unref(themeVars).text,
141387
+ "c31e376e": unref(themeVars).primary5,
141388
+ "c31e376c": unref(themeVars).primary6,
141389
+ "a90d22e0": unref(themeVars).text3
141255
141390
  }));
141256
141391
  const props = __props;
141257
141392
  const emit = __emit;
@@ -141267,6 +141402,12 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
141267
141402
  const isShareable = computed(() => {
141268
141403
  return props.item.file?.permissions?.can_share !== false;
141269
141404
  });
141405
+ const isPrintable = computed(() => {
141406
+ if (!launchDarkly.value.enable_file_sharing_print_permissions) {
141407
+ return true;
141408
+ }
141409
+ return props.item.file?.permissions?.can_print !== false;
141410
+ });
141270
141411
  const canDownload = computed(() => {
141271
141412
  return mode.value === CanvasBuilderMode.SHARING && isDefaultDisplayMode.value && props.item.file?.permissions?.can_download !== false && canvasMetadata.value?.allow_download !== false;
141272
141413
  });
@@ -141340,6 +141481,15 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
141340
141481
  variation: "minimal"
141341
141482
  }, null, 8, ["background-color", "color"])), [
141342
141483
  [unref(vTooltip), unref(t)("canvasUI.components.ContentGrid.sharingDisabled")]
141484
+ ]) : createCommentVNode("", true),
141485
+ !isPrintable.value ? withDirectives((openBlock(), createBlock(_sfc_main$4W, {
141486
+ key: 1,
141487
+ "background-color": unref(themeVars).error2,
141488
+ color: unref(themeVars).error,
141489
+ icon: "print-slash",
141490
+ variation: "minimal"
141491
+ }, null, 8, ["background-color", "color"])), [
141492
+ [unref(vTooltip), unref(t)("canvasUI.components.ContentGrid.printingDisabled")]
141343
141493
  ]) : createCommentVNode("", true)
141344
141494
  ]),
141345
141495
  canDownload.value ? (openBlock(), createElementBlock("div", _hoisted_5$Q, [
@@ -141355,7 +141505,7 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
141355
141505
  }
141356
141506
  });
141357
141507
 
141358
- const ContentGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$2M, [["__scopeId", "data-v-d0a87ee1"]]);
141508
+ const ContentGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$2M, [["__scopeId", "data-v-1b7c7dda"]]);
141359
141509
 
141360
141510
  const _hoisted_1$28 = ["onClick"];
141361
141511
  const _hoisted_2$1w = ["onClick"];
@@ -141502,7 +141652,7 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
141502
141652
  emits: ["deletedFileClicked"],
141503
141653
  setup(__props, { emit: __emit }) {
141504
141654
  useCssVars((_ctx) => ({
141505
- "cd2efdac": unref(themeVars).primary6
141655
+ "124a30c2": unref(themeVars).primary6
141506
141656
  }));
141507
141657
  const { t } = useI18n();
141508
141658
  const vTooltip = tooltipDirective;
@@ -141626,6 +141776,12 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
141626
141776
  const expiresAt = computed(() => enrichedFile.value.expires_at || "");
141627
141777
  const isExpired = computed(() => isFileExpired(expiresAt.value));
141628
141778
  const isExpiring = computed(() => isFileExpiring(expiresAt.value));
141779
+ const isPrintable = computed(() => {
141780
+ if (!launchDarkly.value.enable_file_sharing_print_permissions) {
141781
+ return true;
141782
+ }
141783
+ return enrichedFile.value?.permissions?.can_print !== false;
141784
+ });
141629
141785
  const { hasValidThumbnail, handleImageError } = useImageAccessibility({
141630
141786
  thumbnailUrl,
141631
141787
  hasAIEnabled: computed(() => !!launchDarkly.value.enable_ai_generated_thumbnails),
@@ -141754,8 +141910,15 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
141754
141910
  icon: "solid-share-from-square-slash",
141755
141911
  text: unref(t)("canvasUI.files.notShareable")
141756
141912
  }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
141757
- Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
141913
+ !isPrintable.value ? (openBlock(), createBlock(_sfc_main$4W, {
141758
141914
  key: 3,
141915
+ "background-color": unref(themeVars).error2,
141916
+ color: unref(themeVars).error,
141917
+ icon: "print-slash",
141918
+ text: unref(t)("canvasUI.components.ContentGrid.printingDisabled")
141919
+ }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
141920
+ Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
141921
+ key: 4,
141759
141922
  class: "gap-2 mr-2",
141760
141923
  engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[enrichedFile.value.id]?.engagement : void 0,
141761
141924
  "is-recommended": !!unref(recommendedSectionIds).includes(enrichedFile.value.id?.toString()),
@@ -141797,7 +141960,7 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
141797
141960
  }
141798
141961
  });
141799
141962
 
141800
- const ContentGridListItem = /* @__PURE__ */ _export_sfc(_sfc_main$2K, [["__scopeId", "data-v-1ade5c19"]]);
141963
+ const ContentGridListItem = /* @__PURE__ */ _export_sfc(_sfc_main$2K, [["__scopeId", "data-v-6c18ece2"]]);
141801
141964
 
141802
141965
  const _hoisted_1$26 = { class: "content-grid-list w-full rounded-2 flex bg-base p-4" };
141803
141966
  const _hoisted_2$1u = { class: "flex flex-col w-full" };
@@ -171787,6 +171950,13 @@ const _sfc_main$11 = /*@__PURE__*/defineComponent({
171787
171950
  };
171788
171951
  }
171789
171952
  });
171953
+ const isPrintable = computed(() => {
171954
+ if (!launchDarkly.value.enable_file_sharing_print_permissions) {
171955
+ return true;
171956
+ }
171957
+ const fileId = getFileId();
171958
+ return files.value?.[fileId]?.permissions?.can_print !== false;
171959
+ });
171790
171960
  function handleActions(key) {
171791
171961
  switch (key) {
171792
171962
  case ReorderMenu$1.MoveUp:
@@ -171860,6 +172030,13 @@ const _sfc_main$11 = /*@__PURE__*/defineComponent({
171860
172030
  icon: "solid-share-from-square-slash",
171861
172031
  text: unref(t)('canvasUI.files.notShareable'),
171862
172032
  variation: "extended"
172033
+ }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true), !isPrintable.value ? (openBlock(), createBlock(_sfc_main$4W, {
172034
+ key: 1,
172035
+ "background-color": unref(themeVars).error2,
172036
+ color: unref(themeVars).error,
172037
+ icon: "print-slash",
172038
+ text: unref(t)('canvasUI.components.ContentGrid.printingDisabled'),
172039
+ variation: "extended"
171863
172040
  }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true), createVNode(_sfc_main$4U, {
171864
172041
  class: "flex gap-2 mr-2",
171865
172042
  engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[unref(files)[getFileId()]?.id]?.engagement : undefined,
@@ -175364,7 +175541,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
175364
175541
  },
175365
175542
  setup(__props) {
175366
175543
  useCssVars((_ctx) => ({
175367
- "10ccf2df": unref(themeVars).primary6
175544
+ "7438e094": unref(themeVars).primary6
175368
175545
  }));
175369
175546
  const props = __props;
175370
175547
  const { t } = useI18n();
@@ -175589,8 +175766,15 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
175589
175766
  icon: "solid-share-from-square-slash",
175590
175767
  text: unref(t)("canvasUI.files.notShareable")
175591
175768
  }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
175592
- Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
175769
+ unref(launchDarkly).enable_file_sharing_print_permissions && _ctx.item?.permissions?.can_share !== false && _ctx.item?.permissions?.can_print === false ? (openBlock(), createBlock(_sfc_main$4W, {
175593
175770
  key: 2,
175771
+ "background-color": unref(themeVars).error2,
175772
+ color: unref(themeVars).error,
175773
+ icon: "print-slash",
175774
+ text: unref(t)("canvasUI.files.printingDisabled")
175775
+ }, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
175776
+ Object.keys(unref(popularityDict))?.length ? (openBlock(), createBlock(_sfc_main$4U, {
175777
+ key: 3,
175594
175778
  class: "gap-2 mr-2",
175595
175779
  engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[_ctx.item.id]?.engagement : void 0,
175596
175780
  "is-recommended": !!unref(recommendedSectionIds).includes(_ctx.item.id?.toString()),
@@ -175611,7 +175795,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
175611
175795
  }
175612
175796
  });
175613
175797
 
175614
- const BrowserListItem = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-8781de25"]]);
175798
+ const BrowserListItem = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-f822adec"]]);
175615
175799
 
175616
175800
  const _sfc_main$C = /* @__PURE__ */ defineComponent({
175617
175801
  __name: "ContextMenuDropdown",
@@ -178427,14 +178611,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
178427
178611
  const fileInputRef = ref(null);
178428
178612
  const form = ref({
178429
178613
  permissions: {
178430
- can_share: true
178614
+ can_share: true,
178615
+ can_print: true
178431
178616
  },
178432
178617
  tags: [],
178433
178618
  expiresAtDateTime: pitcherSettings.value?.is_file_expiration_mandatory ? dayjs().add(7, "day").endOf("day").valueOf() : null,
178434
178619
  expiresAtOption: pitcherSettings.value?.is_file_expiration_mandatory ? "at" /* At */ : "never" /* Never */,
178435
178620
  accessType: appName.value === "admin" ? AccessTypeEnum.PUBLIC : AccessTypeEnum.RESTRICTED,
178436
178621
  collaborations: [],
178437
- metadata: {}
178622
+ metadata: {
178623
+ pitcher: {
178624
+ can_print: true
178625
+ }
178626
+ }
178438
178627
  });
178439
178628
  function onSelectFiles(selectedFiles) {
178440
178629
  uploadSelectedFiles.value = [...uploadSelectedFiles.value, ...selectedFiles];
@@ -178479,7 +178668,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
178479
178668
  });
178480
178669
  }
178481
178670
  const isPptxFile = getFileExtension(file) === "pptx";
178482
- const fileMetadata = { ...metadata.value };
178671
+ const fileMetadata = { ...metadata.value, ...form.value.metadata };
178483
178672
  if (isPptxFile && shouldShowConvertPptxToHtml.value) {
178484
178673
  fileMetadata.convert_pptx_to_html = convertPptxToHtml.value;
178485
178674
  }