@pitcher/canvas-ui 2026.1.12-71806 → 2026.1.13-125745-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 +1 -1
- package/canvas-ui.js +32 -14
- package/canvas-ui.js.map +1 -1
- package/lib/types/launchDarkly.types.d.ts +1 -1
- package/package.json +1 -1
package/canvas-ui.css
CHANGED
package/canvas-ui.js
CHANGED
|
@@ -137726,19 +137726,37 @@ function useComponentPermissions({
|
|
|
137726
137726
|
isAnyTypeOfAdmin: false
|
|
137727
137727
|
}))
|
|
137728
137728
|
);
|
|
137729
|
-
const
|
|
137729
|
+
const launchDarkly = inject(
|
|
137730
|
+
"launchDarkly",
|
|
137731
|
+
computed(() => ({}))
|
|
137732
|
+
);
|
|
137733
|
+
const { canvasContent, activeCanvas } = useCanvas$1();
|
|
137730
137734
|
return computed(() => {
|
|
137731
|
-
if (
|
|
137732
|
-
|
|
137733
|
-
|
|
137734
|
-
|
|
137735
|
-
|
|
137736
|
-
|
|
137737
|
-
|
|
137738
|
-
|
|
137739
|
-
|
|
137740
|
-
|
|
137741
|
-
|
|
137735
|
+
if (usedInSectionId.value) {
|
|
137736
|
+
const parent = findParentByNodeId(canvasContent.value, id.value);
|
|
137737
|
+
const canRemove = !!when_used_in_section.value?.is_removable;
|
|
137738
|
+
const canEdit = !!when_used_in_section.value?.is_editable;
|
|
137739
|
+
const canDuplicate = parent ? !!parent.when_used_in_section?.is_editable : false;
|
|
137740
|
+
return {
|
|
137741
|
+
hasSomethingEditable: canEdit || canRemove || canDuplicate,
|
|
137742
|
+
canRemove,
|
|
137743
|
+
canEdit,
|
|
137744
|
+
canDuplicate
|
|
137745
|
+
};
|
|
137746
|
+
}
|
|
137747
|
+
if (activeCanvas.value?.template?.id && launchDarkly.value.enable_template_component_permissions && when_used_in_section.value) {
|
|
137748
|
+
const parent = findParentByNodeId(canvasContent.value, id.value);
|
|
137749
|
+
const canRemove = !!when_used_in_section.value?.is_removable;
|
|
137750
|
+
const canEdit = !!when_used_in_section.value?.is_editable;
|
|
137751
|
+
const canDuplicate = parent ? !!parent.when_used_in_section?.is_editable : false;
|
|
137752
|
+
return {
|
|
137753
|
+
hasSomethingEditable: canEdit || canRemove || canDuplicate,
|
|
137754
|
+
canRemove,
|
|
137755
|
+
canEdit,
|
|
137756
|
+
canDuplicate
|
|
137757
|
+
};
|
|
137758
|
+
}
|
|
137759
|
+
return calculateCanvasPermissions(id.value, !!pitcherInfo.value?.isAnyTypeOfAdmin);
|
|
137742
137760
|
});
|
|
137743
137761
|
}
|
|
137744
137762
|
|
|
@@ -162494,7 +162512,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
162494
162512
|
);
|
|
162495
162513
|
const areSectionsSystemControlled = computed(() => launchDarkly.value?.are_sections_system_controlled);
|
|
162496
162514
|
const allowEditOrRemove = computed(
|
|
162497
|
-
() =>
|
|
162515
|
+
() => isAdmin.value && launchDarkly.value.enable_template_component_permissions && (isSection.value || isCanvasTemplate.value)
|
|
162498
162516
|
);
|
|
162499
162517
|
const canSelectSectionListStrategy = computed(
|
|
162500
162518
|
() => isAdmin.value && isCanvasTemplate.value && isSectionOrContentList.value
|
|
@@ -163057,7 +163075,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
163057
163075
|
}
|
|
163058
163076
|
});
|
|
163059
163077
|
|
|
163060
|
-
const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-
|
|
163078
|
+
const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-1114be0f"]]);
|
|
163061
163079
|
|
|
163062
163080
|
function useConnectUpload() {
|
|
163063
163081
|
async function uploadToConnect(formData) {
|