@pitcher/canvas-ui 2026.1.19-140513-beta → 2026.1.20-102040-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 +100 -132
- package/canvas-ui.js.map +1 -1
- package/lib/apps/canvas-builder/components/ui/ContentList/ContentList.vue.d.ts +8 -8
- package/lib/apps/canvas-builder/components/ui/SectionList/SectionList.vue.d.ts +3 -8
- package/lib/apps/canvas-builder/composables/useCanvas.d.ts +4 -0
- package/lib/types/launchDarkly.types.d.ts +1 -1
- package/lib/types/organizationSettings.types.d.ts +1 -0
- package/package.json +1 -1
package/canvas-ui.css
CHANGED
package/canvas-ui.js
CHANGED
|
@@ -109730,16 +109730,18 @@ const _sfc_main$4U = /* @__PURE__ */ defineComponent({
|
|
|
109730
109730
|
|
|
109731
109731
|
function filterByItemVisibility(items) {
|
|
109732
109732
|
const isAdmin = state$3.appName.value === "admin";
|
|
109733
|
+
const isSearchMode = state$3.showFilteredResults.value;
|
|
109733
109734
|
return items.reduce((acc, item) => {
|
|
109734
109735
|
const hasCountData = "files_count" in item || "folders_count" in item || "available_files_count" in item || "available_folders_count" in item;
|
|
109735
109736
|
const filesCount = item.available_files_count ?? item.files_count ?? 0;
|
|
109736
109737
|
const foldersCount = item.available_folders_count ?? item.folders_count ?? 0;
|
|
109737
109738
|
const isFolderEmpty = item.type == "folder" && hasCountData && filesCount === 0 && foldersCount === 0;
|
|
109739
|
+
const isFolderWithoutData = item.type == "folder" && !hasCountData && isSearchMode;
|
|
109738
109740
|
const shouldHideItem = item.name?.startsWith(".") || isFolderEmpty || item.folder?.file_thumbnail_urls?.length === 0;
|
|
109739
109741
|
if (!shouldHideItem && !isAdmin || isAdmin) {
|
|
109740
109742
|
acc.push({
|
|
109741
109743
|
...item,
|
|
109742
|
-
opacity: shouldHideItem && isAdmin ? 0.5 : 1
|
|
109744
|
+
opacity: isFolderWithoutData || shouldHideItem && isAdmin ? 0.5 : 1
|
|
109743
109745
|
});
|
|
109744
109746
|
}
|
|
109745
109747
|
return acc;
|
|
@@ -110331,6 +110333,13 @@ function init({
|
|
|
110331
110333
|
canvas_thumbnail_urls: []
|
|
110332
110334
|
}
|
|
110333
110335
|
];
|
|
110336
|
+
state$2.folderCache[folder.id] = {
|
|
110337
|
+
files_count: 0,
|
|
110338
|
+
folders_count: 0,
|
|
110339
|
+
available_files_count: 0,
|
|
110340
|
+
available_folders_count: 0,
|
|
110341
|
+
timestamp: Date.now()
|
|
110342
|
+
};
|
|
110334
110343
|
return folder;
|
|
110335
110344
|
};
|
|
110336
110345
|
state$2.folderUpdater = async function(payload) {
|
|
@@ -110354,6 +110363,7 @@ function init({
|
|
|
110354
110363
|
state$2.folderDeleter = async function(payload) {
|
|
110355
110364
|
await onFolderDelete(payload);
|
|
110356
110365
|
state$2.folders = state$2.folders.filter((folder) => folder.id !== payload);
|
|
110366
|
+
delete state$2.folderCache[payload];
|
|
110357
110367
|
useAppStore$4().removeSelectedItems([payload]);
|
|
110358
110368
|
};
|
|
110359
110369
|
state$2.folderFetcher = async function(folderId) {
|
|
@@ -110374,6 +110384,9 @@ function init({
|
|
|
110374
110384
|
const response = await onFoldersDelete(payload);
|
|
110375
110385
|
const deletedIdsSet = new Set(response.deleted_ids);
|
|
110376
110386
|
state$2.folders = state$2.folders.filter((folder) => !deletedIdsSet.has(folder.id));
|
|
110387
|
+
response.deleted_ids.forEach((id2) => {
|
|
110388
|
+
delete state$2.folderCache[id2];
|
|
110389
|
+
});
|
|
110377
110390
|
useAppStore$4().removeSelectedItems(response.deleted_ids);
|
|
110378
110391
|
return response;
|
|
110379
110392
|
};
|
|
@@ -110474,6 +110487,10 @@ function init({
|
|
|
110474
110487
|
const foldersFromSearch = foldersResponse.value.results ?? [];
|
|
110475
110488
|
filteredFolders = foldersFromSearch.map((folder) => {
|
|
110476
110489
|
const cached = state$2.folderCache[folder.id];
|
|
110490
|
+
const parentCached = folder.parent_folder_id ? state$2.folderCache[folder.parent_folder_id] : null;
|
|
110491
|
+
if (parentCached && parentCached.available_folders_count !== void 0 && parentCached.available_folders_count === 0) {
|
|
110492
|
+
return null;
|
|
110493
|
+
}
|
|
110477
110494
|
if (cached) {
|
|
110478
110495
|
const result = {
|
|
110479
110496
|
...folder,
|
|
@@ -110481,14 +110498,15 @@ function init({
|
|
|
110481
110498
|
};
|
|
110482
110499
|
if (cached.files_count !== void 0) result.files_count = cached.files_count;
|
|
110483
110500
|
if (cached.folders_count !== void 0) result.folders_count = cached.folders_count;
|
|
110484
|
-
if (cached.available_files_count !== void 0)
|
|
110501
|
+
if (cached.available_files_count !== void 0)
|
|
110502
|
+
result.available_files_count = cached.available_files_count;
|
|
110485
110503
|
if (cached.available_folders_count !== void 0) {
|
|
110486
110504
|
result.available_folders_count = cached.available_folders_count;
|
|
110487
110505
|
}
|
|
110488
110506
|
return result;
|
|
110489
110507
|
}
|
|
110490
110508
|
return { ...folder, type: "folder" };
|
|
110491
|
-
});
|
|
110509
|
+
}).filter((folder) => folder !== null);
|
|
110492
110510
|
} else if (!hasMetadataFilters && !useAppStore$4().isLocalSearch.value) {
|
|
110493
110511
|
console.error(
|
|
110494
110512
|
"Failed to fetch folders:",
|
|
@@ -137870,37 +137888,19 @@ function useComponentPermissions({
|
|
|
137870
137888
|
isAnyTypeOfAdmin: false
|
|
137871
137889
|
}))
|
|
137872
137890
|
);
|
|
137873
|
-
const
|
|
137874
|
-
"launchDarkly",
|
|
137875
|
-
computed(() => ({}))
|
|
137876
|
-
);
|
|
137877
|
-
const { canvasContent, activeCanvas } = useCanvas$1();
|
|
137891
|
+
const { canvasContent } = useCanvas$1();
|
|
137878
137892
|
return computed(() => {
|
|
137879
|
-
if (usedInSectionId.value)
|
|
137880
|
-
|
|
137881
|
-
|
|
137882
|
-
|
|
137883
|
-
|
|
137884
|
-
|
|
137885
|
-
|
|
137886
|
-
|
|
137887
|
-
|
|
137888
|
-
|
|
137889
|
-
|
|
137890
|
-
}
|
|
137891
|
-
const hasExplicitPermissions = when_used_in_section.value !== null && when_used_in_section.value !== void 0 && (when_used_in_section.value.is_editable !== void 0 || when_used_in_section.value.is_removable !== void 0);
|
|
137892
|
-
if (activeCanvas.value?.template?.id && launchDarkly.value.enable_template_component_permissions && hasExplicitPermissions) {
|
|
137893
|
-
const canRemove = !!when_used_in_section.value?.is_removable;
|
|
137894
|
-
const canEdit = !!when_used_in_section.value?.is_editable;
|
|
137895
|
-
const canDuplicate = canEdit;
|
|
137896
|
-
return {
|
|
137897
|
-
hasSomethingEditable: canEdit || canRemove || canDuplicate,
|
|
137898
|
-
canRemove,
|
|
137899
|
-
canEdit,
|
|
137900
|
-
canDuplicate
|
|
137901
|
-
};
|
|
137902
|
-
}
|
|
137903
|
-
return calculateCanvasPermissions(id.value, !!pitcherInfo.value?.isAnyTypeOfAdmin);
|
|
137893
|
+
if (!usedInSectionId.value) return calculateCanvasPermissions(id.value, !!pitcherInfo.value?.isAnyTypeOfAdmin);
|
|
137894
|
+
const parent = findParentByNodeId(canvasContent.value, id.value);
|
|
137895
|
+
const canRemove = !!when_used_in_section.value?.is_removable;
|
|
137896
|
+
const canEdit = !!when_used_in_section.value?.is_editable;
|
|
137897
|
+
const canDuplicate = parent ? !!parent.when_used_in_section?.is_editable : false;
|
|
137898
|
+
return {
|
|
137899
|
+
hasSomethingEditable: canEdit || canRemove || canDuplicate,
|
|
137900
|
+
canRemove,
|
|
137901
|
+
canEdit,
|
|
137902
|
+
canDuplicate
|
|
137903
|
+
};
|
|
137904
137904
|
});
|
|
137905
137905
|
}
|
|
137906
137906
|
|
|
@@ -156877,9 +156877,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
156877
156877
|
visible: {},
|
|
156878
156878
|
allow_admins_to_overwrite: { type: Boolean },
|
|
156879
156879
|
style: {},
|
|
156880
|
-
printModeIdx: {}
|
|
156881
|
-
when_used_in_section: {},
|
|
156882
|
-
usedInSectionId: { default: "" }
|
|
156880
|
+
printModeIdx: {}
|
|
156883
156881
|
},
|
|
156884
156882
|
emits: ["style"],
|
|
156885
156883
|
setup(__props, { emit: __emit }) {
|
|
@@ -156894,42 +156892,12 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
156894
156892
|
computed(() => [])
|
|
156895
156893
|
);
|
|
156896
156894
|
const { isCompletionWizardEnabled, retriggerWizard } = useCanvasCompletionWizard();
|
|
156897
|
-
const
|
|
156898
|
-
isImpact
|
|
156899
|
-
|
|
156900
|
-
|
|
156901
|
-
|
|
156902
|
-
|
|
156903
|
-
componentEditMode,
|
|
156904
|
-
componentNodesById,
|
|
156905
|
-
activeCanvas,
|
|
156906
|
-
saveCanvasContentWithContext,
|
|
156907
|
-
removeComponentById,
|
|
156908
|
-
setComponentSelectedMode,
|
|
156909
|
-
setComponentSettingsMode,
|
|
156910
|
-
updateNodeDataById,
|
|
156911
|
-
canvasContent
|
|
156912
|
-
} = useCanvas$1();
|
|
156913
|
-
const { id, usedInSectionId, when_used_in_section } = toRefs(props);
|
|
156914
|
-
const componentPermissions = useComponentPermissions({
|
|
156915
|
-
id,
|
|
156916
|
-
usedInSectionId,
|
|
156917
|
-
when_used_in_section
|
|
156918
|
-
});
|
|
156919
|
-
const isEditable = computed(() => {
|
|
156920
|
-
if (!componentPermissions.value.canEdit) return false;
|
|
156921
|
-
if (isImpact.value) {
|
|
156922
|
-
return !props.data.selection_strategy || props.data.selection_strategy === "free" || isCompletionWizardEnabled.value && wizardStepSectionListIds.value.includes(props.id);
|
|
156923
|
-
}
|
|
156924
|
-
return true;
|
|
156925
|
-
});
|
|
156926
|
-
const isRemovable = computed(() => {
|
|
156927
|
-
if (!componentPermissions.value.canRemove) return false;
|
|
156928
|
-
if (isImpact.value) {
|
|
156929
|
-
return !props.data.selection_strategy || props.data.selection_strategy === "free";
|
|
156930
|
-
}
|
|
156931
|
-
return true;
|
|
156932
|
-
});
|
|
156895
|
+
const isEditable = computed(
|
|
156896
|
+
() => isImpact.value ? !props.data.selection_strategy || props.data.selection_strategy === "free" || isCompletionWizardEnabled.value && wizardStepSectionListIds.value.includes(props.id) : true
|
|
156897
|
+
);
|
|
156898
|
+
const isRemovable = computed(
|
|
156899
|
+
() => isImpact.value ? !props.data.selection_strategy || props.data.selection_strategy === "free" : true
|
|
156900
|
+
);
|
|
156933
156901
|
const sectionSelectorAppSrc = computed(() => {
|
|
156934
156902
|
if (!sectionSelectorApps.value?.length || !props.data.selection_app_name) return null;
|
|
156935
156903
|
const relatedApp = sectionSelectorApps.value.find((app) => app.app_metadata?.name === props.data.selection_app_name);
|
|
@@ -156996,7 +156964,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
156996
156964
|
async (selectedData) => {
|
|
156997
156965
|
console.info(`[SectionList]: Received done callback for ${props.id} with data`, selectedData);
|
|
156998
156966
|
if (!selectedData) return;
|
|
156999
|
-
const sections = (selectedData?.section_ids || []).map((
|
|
156967
|
+
const sections = (selectedData?.section_ids || []).map((id) => ({ id: typeof id === "string" ? id : id.id }));
|
|
157000
156968
|
const updatedData = { ...props.data, sections };
|
|
157001
156969
|
updateNodeDataById(props.id, updatedData);
|
|
157002
156970
|
const currentContext = cloneDeep(activeCanvas.value?.context || {});
|
|
@@ -157022,6 +156990,22 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
157022
156990
|
sectionListRef.value?.toggleSectionSelector();
|
|
157023
156991
|
}
|
|
157024
156992
|
}
|
|
156993
|
+
const {
|
|
156994
|
+
isImpact,
|
|
156995
|
+
mode,
|
|
156996
|
+
isEditMode,
|
|
156997
|
+
componentSelectedMode,
|
|
156998
|
+
isViewOnlyMode,
|
|
156999
|
+
componentEditMode,
|
|
157000
|
+
componentNodesById,
|
|
157001
|
+
activeCanvas,
|
|
157002
|
+
saveCanvasContentWithContext,
|
|
157003
|
+
removeComponentById,
|
|
157004
|
+
setComponentSelectedMode,
|
|
157005
|
+
setComponentSettingsMode,
|
|
157006
|
+
updateNodeDataById,
|
|
157007
|
+
canvasContent
|
|
157008
|
+
} = useCanvas$1();
|
|
157025
157009
|
return (_ctx, _cache) => {
|
|
157026
157010
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
157027
157011
|
unref(shouldDisplayPlaceholderComponent)(unref(isEditMode), unref(mode), _ctx.visible) ? (openBlock(), createBlock(PlaceholderComponent, {
|
|
@@ -157029,25 +157013,25 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
157029
157013
|
name: _ctx.tracking_id
|
|
157030
157014
|
}, null, 8, ["name"])) : unref(isEditMode) && !unref(isViewOnlyMode) ? (openBlock(), createBlock(_sfc_main$34, {
|
|
157031
157015
|
key: 1,
|
|
157032
|
-
id:
|
|
157033
|
-
active: unref(componentEditMode) && unref(componentEditMode)?.id ===
|
|
157016
|
+
id: _ctx.id,
|
|
157017
|
+
active: unref(componentEditMode) && unref(componentEditMode)?.id === _ctx.id,
|
|
157034
157018
|
class: normalizeClass({ "mt-12": sectionListName.value }),
|
|
157035
157019
|
edit: isEditable.value,
|
|
157036
157020
|
"exclude-stylables": [unref(ThemeComponentOptionEnum).COLOR_PICKER],
|
|
157037
157021
|
remove: isRemovable.value,
|
|
157038
|
-
selected: unref(componentSelectedMode) && unref(componentSelectedMode)?.id ===
|
|
157022
|
+
selected: unref(componentSelectedMode) && unref(componentSelectedMode)?.id === _ctx.id,
|
|
157039
157023
|
settings: "",
|
|
157040
157024
|
stylable: "",
|
|
157041
157025
|
style: normalizeStyle(unref(omit$1)(_ctx.style, "paddingBottom", "paddingLeft", "paddingTop", "paddingRight")),
|
|
157042
157026
|
onEdit: handleEdit,
|
|
157043
|
-
onRemove: _cache[0] || (_cache[0] = ($event) => unref(removeComponentById)(
|
|
157044
|
-
onSelect: _cache[1] || (_cache[1] = ($event) => unref(setComponentSelectedMode)(
|
|
157045
|
-
onSettings: _cache[2] || (_cache[2] = ($event) => unref(setComponentSettingsMode)(
|
|
157027
|
+
onRemove: _cache[0] || (_cache[0] = ($event) => unref(removeComponentById)(_ctx.id)),
|
|
157028
|
+
onSelect: _cache[1] || (_cache[1] = ($event) => unref(setComponentSelectedMode)(_ctx.id)),
|
|
157029
|
+
onSettings: _cache[2] || (_cache[2] = ($event) => unref(setComponentSettingsMode)(_ctx.id)),
|
|
157046
157030
|
onStyle: _cache[3] || (_cache[3] = ($event) => emit("style", $event))
|
|
157047
157031
|
}, {
|
|
157048
157032
|
default: withCtx(() => [
|
|
157049
157033
|
createVNode(RawSectionList, mergeProps({
|
|
157050
|
-
id:
|
|
157034
|
+
id: _ctx.id,
|
|
157051
157035
|
ref_key: "sectionListRef",
|
|
157052
157036
|
ref: sectionListRef,
|
|
157053
157037
|
class: "pa-2",
|
|
@@ -157065,7 +157049,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
157065
157049
|
_: 1
|
|
157066
157050
|
}, 8, ["id", "active", "class", "edit", "exclude-stylables", "remove", "selected", "style"])) : (openBlock(), createBlock(RawSectionList, mergeProps({
|
|
157067
157051
|
key: 2,
|
|
157068
|
-
id:
|
|
157052
|
+
id: _ctx.id,
|
|
157069
157053
|
data: _ctx.data
|
|
157070
157054
|
}, unref(attrs), {
|
|
157071
157055
|
"has-section-selector-app": !!sectionSelectorAppSrc.value,
|
|
@@ -159593,8 +159577,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
159593
159577
|
autofill: {},
|
|
159594
159578
|
linkable: {},
|
|
159595
159579
|
autofill_content_types: {},
|
|
159596
|
-
when_used_in_section: {}
|
|
159597
|
-
usedInSectionId: { default: "" }
|
|
159580
|
+
when_used_in_section: {}
|
|
159598
159581
|
},
|
|
159599
159582
|
emits: ["style"],
|
|
159600
159583
|
setup(__props, { emit: __emit }) {
|
|
@@ -159605,42 +159588,12 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
159605
159588
|
computed(() => [])
|
|
159606
159589
|
);
|
|
159607
159590
|
const { isCompletionWizardEnabled, retriggerWizard } = useCanvasCompletionWizard();
|
|
159608
|
-
const
|
|
159609
|
-
isImpact
|
|
159610
|
-
|
|
159611
|
-
|
|
159612
|
-
|
|
159613
|
-
|
|
159614
|
-
componentEditMode,
|
|
159615
|
-
componentNodesById,
|
|
159616
|
-
activeCanvas,
|
|
159617
|
-
saveCanvasContentWithContext,
|
|
159618
|
-
removeComponentById,
|
|
159619
|
-
setComponentSelectedMode,
|
|
159620
|
-
setComponentSettingsMode,
|
|
159621
|
-
updateNodeDataById,
|
|
159622
|
-
canvasContent
|
|
159623
|
-
} = useCanvas$1();
|
|
159624
|
-
const { id, usedInSectionId, when_used_in_section } = toRefs(props);
|
|
159625
|
-
const componentPermissions = useComponentPermissions({
|
|
159626
|
-
id,
|
|
159627
|
-
usedInSectionId,
|
|
159628
|
-
when_used_in_section
|
|
159629
|
-
});
|
|
159630
|
-
const isEditable = computed(() => {
|
|
159631
|
-
if (!componentPermissions.value.canEdit) return false;
|
|
159632
|
-
if (isImpact.value) {
|
|
159633
|
-
return !props.data.selection_strategy || props.data.selection_strategy === "free" || isCompletionWizardEnabled.value && wizardStepSectionListIds.value.includes(props.id);
|
|
159634
|
-
}
|
|
159635
|
-
return true;
|
|
159636
|
-
});
|
|
159637
|
-
const isRemovable = computed(() => {
|
|
159638
|
-
if (!componentPermissions.value.canRemove) return false;
|
|
159639
|
-
if (isImpact.value) {
|
|
159640
|
-
return !props.data.selection_strategy || props.data.selection_strategy === "free";
|
|
159641
|
-
}
|
|
159642
|
-
return true;
|
|
159643
|
-
});
|
|
159591
|
+
const isEditable = computed(
|
|
159592
|
+
() => isImpact.value ? !props.data.selection_strategy || props.data.selection_strategy === "free" || isCompletionWizardEnabled.value && wizardStepSectionListIds.value.includes(props.id) : true
|
|
159593
|
+
);
|
|
159594
|
+
const isRemovable = computed(
|
|
159595
|
+
() => isImpact.value ? !props.data.selection_strategy || props.data.selection_strategy === "free" : true
|
|
159596
|
+
);
|
|
159644
159597
|
const sectionSelectorAppSrc = computed(() => {
|
|
159645
159598
|
if (!sectionSelectorApps.value?.length || !props.data.selection_app_name) return null;
|
|
159646
159599
|
const relatedApp = sectionSelectorApps.value.find((app) => app.app_metadata?.name === props.data.selection_app_name);
|
|
@@ -159706,7 +159659,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
159706
159659
|
async (selectedData) => {
|
|
159707
159660
|
console.info(`[SectionList]: Received done callback for ${props.id} with data`, selectedData);
|
|
159708
159661
|
if (!selectedData) return;
|
|
159709
|
-
const sections = (selectedData?.section_ids || []).map((
|
|
159662
|
+
const sections = (selectedData?.section_ids || []).map((id) => ({ id: typeof id === "string" ? id : id.id }));
|
|
159710
159663
|
const updatedData = { ...props.data, sections };
|
|
159711
159664
|
updateNodeDataById(props.id, updatedData);
|
|
159712
159665
|
const currentContext = cloneDeep(activeCanvas.value?.context || {});
|
|
@@ -159732,6 +159685,22 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
159732
159685
|
contentListRef.value?.toggleSectionSelector();
|
|
159733
159686
|
}
|
|
159734
159687
|
}
|
|
159688
|
+
const {
|
|
159689
|
+
isImpact,
|
|
159690
|
+
mode,
|
|
159691
|
+
isEditMode,
|
|
159692
|
+
componentSelectedMode,
|
|
159693
|
+
isViewOnlyMode,
|
|
159694
|
+
componentEditMode,
|
|
159695
|
+
componentNodesById,
|
|
159696
|
+
activeCanvas,
|
|
159697
|
+
saveCanvasContentWithContext,
|
|
159698
|
+
removeComponentById,
|
|
159699
|
+
setComponentSelectedMode,
|
|
159700
|
+
setComponentSettingsMode,
|
|
159701
|
+
updateNodeDataById,
|
|
159702
|
+
canvasContent
|
|
159703
|
+
} = useCanvas$1();
|
|
159735
159704
|
return (_ctx, _cache) => {
|
|
159736
159705
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
159737
159706
|
unref(shouldDisplayPlaceholderComponent)(unref(isEditMode), unref(mode), _ctx.visible) ? (openBlock(), createBlock(PlaceholderComponent, {
|
|
@@ -159739,25 +159708,25 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
159739
159708
|
name: _ctx.tracking_id
|
|
159740
159709
|
}, null, 8, ["name"])) : unref(isEditMode) && !unref(isViewOnlyMode) ? (openBlock(), createBlock(_sfc_main$34, {
|
|
159741
159710
|
key: 1,
|
|
159742
|
-
id:
|
|
159743
|
-
active: unref(componentEditMode) && unref(componentEditMode)?.id ===
|
|
159711
|
+
id: _ctx.id,
|
|
159712
|
+
active: unref(componentEditMode) && unref(componentEditMode)?.id === _ctx.id,
|
|
159744
159713
|
class: normalizeClass({ "mt-12": componentName.value }),
|
|
159745
159714
|
edit: isEditable.value,
|
|
159746
159715
|
"exclude-stylables": [unref(ThemeComponentOptionEnum).COLOR_PICKER],
|
|
159747
159716
|
remove: isRemovable.value,
|
|
159748
|
-
selected: unref(componentSelectedMode) && unref(componentSelectedMode)?.id ===
|
|
159717
|
+
selected: unref(componentSelectedMode) && unref(componentSelectedMode)?.id === _ctx.id,
|
|
159749
159718
|
settings: "",
|
|
159750
159719
|
stylable: "",
|
|
159751
159720
|
style: normalizeStyle(unref(omit$1)(_ctx.style, "paddingBottom", "paddingLeft", "paddingTop", "paddingRight")),
|
|
159752
159721
|
onEdit: handleEdit,
|
|
159753
|
-
onRemove: _cache[0] || (_cache[0] = ($event) => unref(removeComponentById)(
|
|
159754
|
-
onSelect: _cache[1] || (_cache[1] = ($event) => unref(setComponentSelectedMode)(
|
|
159755
|
-
onSettings: _cache[2] || (_cache[2] = ($event) => unref(setComponentSettingsMode)(
|
|
159722
|
+
onRemove: _cache[0] || (_cache[0] = ($event) => unref(removeComponentById)(_ctx.id)),
|
|
159723
|
+
onSelect: _cache[1] || (_cache[1] = ($event) => unref(setComponentSelectedMode)(_ctx.id)),
|
|
159724
|
+
onSettings: _cache[2] || (_cache[2] = ($event) => unref(setComponentSettingsMode)(_ctx.id)),
|
|
159756
159725
|
onStyle: _cache[3] || (_cache[3] = ($event) => emit("style", $event))
|
|
159757
159726
|
}, {
|
|
159758
159727
|
default: withCtx(() => [
|
|
159759
159728
|
createVNode(ContentListRaw, mergeProps({
|
|
159760
|
-
id:
|
|
159729
|
+
id: _ctx.id,
|
|
159761
159730
|
ref_key: "contentListRef",
|
|
159762
159731
|
ref: contentListRef,
|
|
159763
159732
|
class: ["pa-2", props.class],
|
|
@@ -159775,7 +159744,7 @@ const _sfc_main$1H = /* @__PURE__ */ defineComponent({
|
|
|
159775
159744
|
_: 1
|
|
159776
159745
|
}, 8, ["id", "active", "class", "edit", "exclude-stylables", "remove", "selected", "style"])) : (openBlock(), createBlock(ContentListRaw, mergeProps({
|
|
159777
159746
|
key: 2,
|
|
159778
|
-
id:
|
|
159747
|
+
id: _ctx.id,
|
|
159779
159748
|
data: _ctx.data
|
|
159780
159749
|
}, unref(attrs), {
|
|
159781
159750
|
"has-section-selector-app": !!sectionSelectorAppSrc.value,
|
|
@@ -162687,7 +162656,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
162687
162656
|
);
|
|
162688
162657
|
const areSectionsSystemControlled = computed(() => launchDarkly.value?.are_sections_system_controlled);
|
|
162689
162658
|
const allowEditOrRemove = computed(
|
|
162690
|
-
() =>
|
|
162659
|
+
() => (selectedComponentType.value === ComponentTypes.Text || selectedComponentType.value === ComponentTypes.Carousel || selectedComponentType.value === ComponentTypes.Multimedia) && isAdmin.value && isSection.value
|
|
162691
162660
|
);
|
|
162692
162661
|
const canSelectSectionListStrategy = computed(
|
|
162693
162662
|
() => isAdmin.value && isCanvasTemplate.value && isSectionOrContentList.value
|
|
@@ -162749,8 +162718,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
162749
162718
|
formValues.contentGridDataAccessor = value || "";
|
|
162750
162719
|
}
|
|
162751
162720
|
function getEditOrRemoveOption() {
|
|
162752
|
-
const
|
|
162753
|
-
const map = activeSettingsNode.value?.when_used_in_section ?? defaultPermissions;
|
|
162721
|
+
const map = activeSettingsNode.value?.when_used_in_section ?? cloneDeep(defaultWhenUsedInSection);
|
|
162754
162722
|
let value = "";
|
|
162755
162723
|
value += map.is_editable ? "1" : "0";
|
|
162756
162724
|
value += map.is_removable ? "1" : "0";
|
|
@@ -163251,7 +163219,7 @@ const _sfc_main$1w = /* @__PURE__ */ defineComponent({
|
|
|
163251
163219
|
}
|
|
163252
163220
|
});
|
|
163253
163221
|
|
|
163254
|
-
const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-
|
|
163222
|
+
const ComponentDrawerSettings = /* @__PURE__ */ _export_sfc(_sfc_main$1w, [["__scopeId", "data-v-dce6a881"]]);
|
|
163255
163223
|
|
|
163256
163224
|
function useConnectUpload() {
|
|
163257
163225
|
async function uploadToConnect(formData) {
|