@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 CHANGED
@@ -2667,7 +2667,7 @@ to {
2667
2667
  padding: 0;
2668
2668
  }
2669
2669
 
2670
- .data-accessor-input[data-v-dce6a881] .n-input__prefix {
2670
+ .data-accessor-input[data-v-1114be0f] .n-input__prefix {
2671
2671
  margin-right: 0;
2672
2672
  }
2673
2673
  .cb-dynamic-data-table-settings {
package/canvas-ui.js CHANGED
@@ -137726,19 +137726,37 @@ function useComponentPermissions({
137726
137726
  isAnyTypeOfAdmin: false
137727
137727
  }))
137728
137728
  );
137729
- const { canvasContent } = useCanvas$1();
137729
+ const launchDarkly = inject(
137730
+ "launchDarkly",
137731
+ computed(() => ({}))
137732
+ );
137733
+ const { canvasContent, activeCanvas } = useCanvas$1();
137730
137734
  return computed(() => {
137731
- if (!usedInSectionId.value) return calculateCanvasPermissions(id.value, !!pitcherInfo.value?.isAnyTypeOfAdmin);
137732
- const parent = findParentByNodeId(canvasContent.value, id.value);
137733
- const canRemove = !!when_used_in_section.value?.is_removable;
137734
- const canEdit = !!when_used_in_section.value?.is_editable;
137735
- const canDuplicate = parent ? !!parent.when_used_in_section?.is_editable : false;
137736
- return {
137737
- hasSomethingEditable: canEdit || canRemove || canDuplicate,
137738
- canRemove,
137739
- canEdit,
137740
- canDuplicate
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
- () => (selectedComponentType.value === ComponentTypes.Text || selectedComponentType.value === ComponentTypes.Carousel || selectedComponentType.value === ComponentTypes.Multimedia) && isAdmin.value && isSection.value
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-dce6a881"]]);
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) {