@pitcher/canvas-ui 2026.1.21-153854 → 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 +21 -21
- package/canvas-ui.js +211 -36
- package/canvas-ui.js.map +1 -1
- package/lib/apps/agenda-selector/composables/move-item-modal.use.d.ts +4 -0
- package/lib/apps/browser/components/UploadFilesModal/UploadFilesModal.vue.d.ts +1 -0
- package/lib/apps/browser/stores/api.d.ts +9 -0
- package/lib/apps/browser/stores/upload.d.ts +4 -0
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +54 -0
- package/lib/apps/canvas-builder/composables/useCanvasBlocks.d.ts +12 -0
- package/lib/apps/canvas-builder/composables/useCanvasHistory.d.ts +12 -0
- package/lib/apps/canvas-builder/composables/useCanvasTheme.d.ts +2 -0
- package/lib/apps/canvas-builder/composables/usePopupApps.d.ts +2 -0
- package/lib/apps/collection-selector/composables/move-slide-modal.use.d.ts +4 -0
- package/lib/apps/ppt-conversion-selector/composables/move-slide-modal.use.d.ts +2 -0
- package/lib/apps/ppt-conversion-selector/stores/app.store.d.ts +2 -0
- package/lib/components/CFileAttributes/CFileAttributes.vue.d.ts +7 -0
- package/lib/types/launchDarkly.types.d.ts +1 -1
- package/locale/el.json +6 -1
- package/locale/en.json +6 -1
- package/locale/es.json +7 -2
- package/locale/fr.json +6 -1
- package/package.json +2 -2
- package/types/openapi/models/FilePermission.d.ts +1 -0
- package/types/openapi/models/FilePermissionRequest.d.ts +1 -0
package/canvas-ui.css
CHANGED
|
@@ -1401,18 +1401,18 @@ to {
|
|
|
1401
1401
|
height: 100px;
|
|
1402
1402
|
background: var(--3ad38b36);
|
|
1403
1403
|
}
|
|
1404
|
-
.content-grid-file-item[data-v-
|
|
1405
|
-
color: 1px solid var(--
|
|
1404
|
+
.content-grid-file-item[data-v-3e82c628] {
|
|
1405
|
+
color: 1px solid var(--0530313e);
|
|
1406
1406
|
}
|
|
1407
|
-
.content-grid-file-item__img[data-v-
|
|
1408
|
-
outline: 1px solid var(--
|
|
1407
|
+
.content-grid-file-item__img[data-v-3e82c628] {
|
|
1408
|
+
outline: 1px solid var(--b65bcab0);
|
|
1409
1409
|
}
|
|
1410
|
-
.description[data-v-
|
|
1411
|
-
color: var(--
|
|
1410
|
+
.description[data-v-3e82c628] {
|
|
1411
|
+
color: var(--a0d5f61c);
|
|
1412
1412
|
}
|
|
1413
1413
|
.dot-slider {
|
|
1414
1414
|
.dot {
|
|
1415
|
-
&[data-v-
|
|
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-
|
|
1423
|
+
&.dot--active[data-v-3e82c628] {
|
|
1424
1424
|
height: 10px;
|
|
1425
1425
|
width: 10px;
|
|
1426
|
-
background-color: var(--
|
|
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-
|
|
1436
|
-
color: var(--
|
|
1437
|
-
border: 1px solid var(--
|
|
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-
|
|
1440
|
-
outline: 1px solid var(--
|
|
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-
|
|
1443
|
-
color: var(--
|
|
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-
|
|
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-
|
|
1477
|
-
background-color: var(--
|
|
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-
|
|
3076
|
-
border-bottom: 1px solid var(--
|
|
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
|
-
|
|
80191
|
+
class: "mx-1",
|
|
80192
|
+
"show-label": false,
|
|
80193
|
+
span: 2
|
|
80149
80194
|
}, {
|
|
80150
80195
|
default: withCtx(() => [
|
|
80151
|
-
|
|
80152
|
-
|
|
80153
|
-
|
|
80154
|
-
|
|
80155
|
-
|
|
80156
|
-
|
|
80157
|
-
|
|
80158
|
-
"
|
|
80159
|
-
|
|
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
|
-
}
|
|
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
|
})
|
|
@@ -111316,8 +111398,15 @@ const _sfc_main$4T = /* @__PURE__ */ defineComponent({
|
|
|
111316
111398
|
icon: "solid-share-from-square-slash",
|
|
111317
111399
|
text: unref(t)("canvasUI.files.notShareable")
|
|
111318
111400
|
}, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
|
|
111319
|
-
|
|
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, {
|
|
111320
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,
|
|
111321
111410
|
class: "gap-2 mr-2",
|
|
111322
111411
|
engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[_ctx.item.id]?.engagement : void 0,
|
|
111323
111412
|
"is-recommended": !!unref(recommendedSectionIds).includes(_ctx.item.id?.toString()),
|
|
@@ -122478,6 +122567,12 @@ const _sfc_main$4e = /* @__PURE__ */ defineComponent({
|
|
|
122478
122567
|
const isExpandFileDisabled = computed(() => {
|
|
122479
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;
|
|
122480
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
|
+
});
|
|
122481
122576
|
return (_ctx, _cache) => {
|
|
122482
122577
|
const _directive_tooltip = resolveDirective("tooltip");
|
|
122483
122578
|
return openBlock(), createElementBlock("div", {
|
|
@@ -122618,8 +122713,15 @@ const _sfc_main$4e = /* @__PURE__ */ defineComponent({
|
|
|
122618
122713
|
icon: "solid-share-from-square-slash",
|
|
122619
122714
|
text: unref(t)("canvasUI.files.notShareable")
|
|
122620
122715
|
}, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
|
|
122621
|
-
|
|
122716
|
+
!isPrintable.value ? (openBlock(), createBlock(_sfc_main$4W, {
|
|
122622
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,
|
|
122623
122725
|
class: "flex gap-2 mr-2",
|
|
122624
122726
|
engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[_ctx.data[_ctx.index].id]?.engagement : void 0,
|
|
122625
122727
|
"is-recommended": !!unref(recommendedSectionIds).includes(_ctx.data[_ctx.index].id),
|
|
@@ -140974,10 +141076,10 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
|
|
|
140974
141076
|
},
|
|
140975
141077
|
setup(__props) {
|
|
140976
141078
|
useCssVars((_ctx) => ({
|
|
140977
|
-
"
|
|
140978
|
-
"
|
|
140979
|
-
"
|
|
140980
|
-
"
|
|
141079
|
+
"0530313e": unref(themeVars).text,
|
|
141080
|
+
"b65bcab0": unref(themeVars).primary6,
|
|
141081
|
+
"a0d5f61c": unref(themeVars).text3,
|
|
141082
|
+
"6027cf4e": unref(themeVars).primary
|
|
140981
141083
|
}));
|
|
140982
141084
|
const props = __props;
|
|
140983
141085
|
const launchDarkly = inject(
|
|
@@ -140985,7 +141087,7 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
|
|
|
140985
141087
|
computed(() => ({}))
|
|
140986
141088
|
);
|
|
140987
141089
|
const { t } = useI18n();
|
|
140988
|
-
const { mode, isEditMode, onDownloadFile, isDefaultDisplayMode, isAdmin, canvasMetadata } = useCanvas$1();
|
|
141090
|
+
const { mode, isEditMode, onDownloadFile, isDefaultDisplayMode, isAdmin, canvasMetadata, fileDataCache } = useCanvas$1();
|
|
140989
141091
|
const { renderContentType, isFileExpired, isFileExpiring } = useFileDisplayHelpers();
|
|
140990
141092
|
const { recommendedSectionIds } = useRecommendations();
|
|
140991
141093
|
const { popularityDict } = useSectionPopularity(computed(() => ({})));
|
|
@@ -140993,6 +141095,16 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
|
|
|
140993
141095
|
const vTooltip = tooltipDirective;
|
|
140994
141096
|
const item = computed(() => props.item.type === "file" ? props.item : null);
|
|
140995
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
|
+
});
|
|
140996
141108
|
const isAdvancedSharingEnabled = computed(() => !!launchDarkly.value?.use_advanced_sharing_modal);
|
|
140997
141109
|
const canDownload = computed(() => {
|
|
140998
141110
|
if (item.value?.file.permissions?.can_download === false) {
|
|
@@ -141187,6 +141299,15 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
|
|
|
141187
141299
|
variation: "minimal"
|
|
141188
141300
|
}, null, 8, ["background-color", "color"])), [
|
|
141189
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")]
|
|
141190
141311
|
]) : createCommentVNode("", true)
|
|
141191
141312
|
])
|
|
141192
141313
|
]),
|
|
@@ -141202,7 +141323,7 @@ const _sfc_main$2O = /* @__PURE__ */ defineComponent({
|
|
|
141202
141323
|
}
|
|
141203
141324
|
});
|
|
141204
141325
|
|
|
141205
|
-
const ContentGridFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$2O, [["__scopeId", "data-v-
|
|
141326
|
+
const ContentGridFileItem = /* @__PURE__ */ _export_sfc(_sfc_main$2O, [["__scopeId", "data-v-3e82c628"]]);
|
|
141206
141327
|
|
|
141207
141328
|
const _hoisted_1$2a = { class: "flex items-center flex-col justify-center" };
|
|
141208
141329
|
const _hoisted_2$1y = { class: "text-center font-400 text-truncate font-size-4 line-height-6 color-text font-normal" };
|
|
@@ -141262,10 +141383,10 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
|
|
|
141262
141383
|
emits: ["deletedFileClicked"],
|
|
141263
141384
|
setup(__props, { emit: __emit }) {
|
|
141264
141385
|
useCssVars((_ctx) => ({
|
|
141265
|
-
"
|
|
141266
|
-
"
|
|
141267
|
-
"
|
|
141268
|
-
"
|
|
141386
|
+
"68a0d203": unref(themeVars).text,
|
|
141387
|
+
"c31e376e": unref(themeVars).primary5,
|
|
141388
|
+
"c31e376c": unref(themeVars).primary6,
|
|
141389
|
+
"a90d22e0": unref(themeVars).text3
|
|
141269
141390
|
}));
|
|
141270
141391
|
const props = __props;
|
|
141271
141392
|
const emit = __emit;
|
|
@@ -141281,6 +141402,12 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
|
|
|
141281
141402
|
const isShareable = computed(() => {
|
|
141282
141403
|
return props.item.file?.permissions?.can_share !== false;
|
|
141283
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
|
+
});
|
|
141284
141411
|
const canDownload = computed(() => {
|
|
141285
141412
|
return mode.value === CanvasBuilderMode.SHARING && isDefaultDisplayMode.value && props.item.file?.permissions?.can_download !== false && canvasMetadata.value?.allow_download !== false;
|
|
141286
141413
|
});
|
|
@@ -141354,6 +141481,15 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
|
|
|
141354
141481
|
variation: "minimal"
|
|
141355
141482
|
}, null, 8, ["background-color", "color"])), [
|
|
141356
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")]
|
|
141357
141493
|
]) : createCommentVNode("", true)
|
|
141358
141494
|
]),
|
|
141359
141495
|
canDownload.value ? (openBlock(), createElementBlock("div", _hoisted_5$Q, [
|
|
@@ -141369,7 +141505,7 @@ const _sfc_main$2M = /* @__PURE__ */ defineComponent({
|
|
|
141369
141505
|
}
|
|
141370
141506
|
});
|
|
141371
141507
|
|
|
141372
|
-
const ContentGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$2M, [["__scopeId", "data-v-
|
|
141508
|
+
const ContentGridItem = /* @__PURE__ */ _export_sfc(_sfc_main$2M, [["__scopeId", "data-v-1b7c7dda"]]);
|
|
141373
141509
|
|
|
141374
141510
|
const _hoisted_1$28 = ["onClick"];
|
|
141375
141511
|
const _hoisted_2$1w = ["onClick"];
|
|
@@ -141516,7 +141652,7 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
|
|
|
141516
141652
|
emits: ["deletedFileClicked"],
|
|
141517
141653
|
setup(__props, { emit: __emit }) {
|
|
141518
141654
|
useCssVars((_ctx) => ({
|
|
141519
|
-
"
|
|
141655
|
+
"124a30c2": unref(themeVars).primary6
|
|
141520
141656
|
}));
|
|
141521
141657
|
const { t } = useI18n();
|
|
141522
141658
|
const vTooltip = tooltipDirective;
|
|
@@ -141640,6 +141776,12 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
|
|
|
141640
141776
|
const expiresAt = computed(() => enrichedFile.value.expires_at || "");
|
|
141641
141777
|
const isExpired = computed(() => isFileExpired(expiresAt.value));
|
|
141642
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
|
+
});
|
|
141643
141785
|
const { hasValidThumbnail, handleImageError } = useImageAccessibility({
|
|
141644
141786
|
thumbnailUrl,
|
|
141645
141787
|
hasAIEnabled: computed(() => !!launchDarkly.value.enable_ai_generated_thumbnails),
|
|
@@ -141768,8 +141910,15 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
|
|
|
141768
141910
|
icon: "solid-share-from-square-slash",
|
|
141769
141911
|
text: unref(t)("canvasUI.files.notShareable")
|
|
141770
141912
|
}, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
|
|
141771
|
-
|
|
141913
|
+
!isPrintable.value ? (openBlock(), createBlock(_sfc_main$4W, {
|
|
141772
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,
|
|
141773
141922
|
class: "gap-2 mr-2",
|
|
141774
141923
|
engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[enrichedFile.value.id]?.engagement : void 0,
|
|
141775
141924
|
"is-recommended": !!unref(recommendedSectionIds).includes(enrichedFile.value.id?.toString()),
|
|
@@ -141811,7 +141960,7 @@ const _sfc_main$2K = /* @__PURE__ */ defineComponent({
|
|
|
141811
141960
|
}
|
|
141812
141961
|
});
|
|
141813
141962
|
|
|
141814
|
-
const ContentGridListItem = /* @__PURE__ */ _export_sfc(_sfc_main$2K, [["__scopeId", "data-v-
|
|
141963
|
+
const ContentGridListItem = /* @__PURE__ */ _export_sfc(_sfc_main$2K, [["__scopeId", "data-v-6c18ece2"]]);
|
|
141815
141964
|
|
|
141816
141965
|
const _hoisted_1$26 = { class: "content-grid-list w-full rounded-2 flex bg-base p-4" };
|
|
141817
141966
|
const _hoisted_2$1u = { class: "flex flex-col w-full" };
|
|
@@ -171801,6 +171950,13 @@ const _sfc_main$11 = /*@__PURE__*/defineComponent({
|
|
|
171801
171950
|
};
|
|
171802
171951
|
}
|
|
171803
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
|
+
});
|
|
171804
171960
|
function handleActions(key) {
|
|
171805
171961
|
switch (key) {
|
|
171806
171962
|
case ReorderMenu$1.MoveUp:
|
|
@@ -171874,6 +172030,13 @@ const _sfc_main$11 = /*@__PURE__*/defineComponent({
|
|
|
171874
172030
|
icon: "solid-share-from-square-slash",
|
|
171875
172031
|
text: unref(t)('canvasUI.files.notShareable'),
|
|
171876
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"
|
|
171877
172040
|
}, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true), createVNode(_sfc_main$4U, {
|
|
171878
172041
|
class: "flex gap-2 mr-2",
|
|
171879
172042
|
engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[unref(files)[getFileId()]?.id]?.engagement : undefined,
|
|
@@ -175378,7 +175541,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
175378
175541
|
},
|
|
175379
175542
|
setup(__props) {
|
|
175380
175543
|
useCssVars((_ctx) => ({
|
|
175381
|
-
"
|
|
175544
|
+
"7438e094": unref(themeVars).primary6
|
|
175382
175545
|
}));
|
|
175383
175546
|
const props = __props;
|
|
175384
175547
|
const { t } = useI18n();
|
|
@@ -175603,8 +175766,15 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
175603
175766
|
icon: "solid-share-from-square-slash",
|
|
175604
175767
|
text: unref(t)("canvasUI.files.notShareable")
|
|
175605
175768
|
}, null, 8, ["background-color", "color", "text"])) : createCommentVNode("", true),
|
|
175606
|
-
|
|
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, {
|
|
175607
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,
|
|
175608
175778
|
class: "gap-2 mr-2",
|
|
175609
175779
|
engagement: unref(launchDarkly).show_popularity_icons ? unref(popularityDict)[_ctx.item.id]?.engagement : void 0,
|
|
175610
175780
|
"is-recommended": !!unref(recommendedSectionIds).includes(_ctx.item.id?.toString()),
|
|
@@ -175625,7 +175795,7 @@ const _sfc_main$D = /* @__PURE__ */ defineComponent({
|
|
|
175625
175795
|
}
|
|
175626
175796
|
});
|
|
175627
175797
|
|
|
175628
|
-
const BrowserListItem = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-
|
|
175798
|
+
const BrowserListItem = /* @__PURE__ */ _export_sfc(_sfc_main$D, [["__scopeId", "data-v-f822adec"]]);
|
|
175629
175799
|
|
|
175630
175800
|
const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
175631
175801
|
__name: "ContextMenuDropdown",
|
|
@@ -178441,14 +178611,19 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
178441
178611
|
const fileInputRef = ref(null);
|
|
178442
178612
|
const form = ref({
|
|
178443
178613
|
permissions: {
|
|
178444
|
-
can_share: true
|
|
178614
|
+
can_share: true,
|
|
178615
|
+
can_print: true
|
|
178445
178616
|
},
|
|
178446
178617
|
tags: [],
|
|
178447
178618
|
expiresAtDateTime: pitcherSettings.value?.is_file_expiration_mandatory ? dayjs().add(7, "day").endOf("day").valueOf() : null,
|
|
178448
178619
|
expiresAtOption: pitcherSettings.value?.is_file_expiration_mandatory ? "at" /* At */ : "never" /* Never */,
|
|
178449
178620
|
accessType: appName.value === "admin" ? AccessTypeEnum.PUBLIC : AccessTypeEnum.RESTRICTED,
|
|
178450
178621
|
collaborations: [],
|
|
178451
|
-
metadata: {
|
|
178622
|
+
metadata: {
|
|
178623
|
+
pitcher: {
|
|
178624
|
+
can_print: true
|
|
178625
|
+
}
|
|
178626
|
+
}
|
|
178452
178627
|
});
|
|
178453
178628
|
function onSelectFiles(selectedFiles) {
|
|
178454
178629
|
uploadSelectedFiles.value = [...uploadSelectedFiles.value, ...selectedFiles];
|
|
@@ -178493,7 +178668,7 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
178493
178668
|
});
|
|
178494
178669
|
}
|
|
178495
178670
|
const isPptxFile = getFileExtension(file) === "pptx";
|
|
178496
|
-
const fileMetadata = { ...metadata.value };
|
|
178671
|
+
const fileMetadata = { ...metadata.value, ...form.value.metadata };
|
|
178497
178672
|
if (isPptxFile && shouldShowConvertPptxToHtml.value) {
|
|
178498
178673
|
fileMetadata.convert_pptx_to_html = convertPptxToHtml.value;
|
|
178499
178674
|
}
|