@pitcher/canvas-ui 2026.1.6-120415-beta → 2026.1.6-131818-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 +18 -18
- package/canvas-ui.js +43 -137
- package/canvas-ui.js.map +1 -1
- package/lib/apps/browser/components/Content/ActionsToolbar/ActionsToolbar.vue.d.ts +3 -12
- package/lib/apps/canvas-builder/components/ui/DataCharts/types.d.ts +0 -1
- package/lib/apps/content-selector/components/Content/AllContent/List/FoldersFilesList.vue.d.ts +3 -12
- package/lib/components/CSearchFilters/CSearchFilters.vue.d.ts +1 -4
- package/lib/components/assignedCanvases/CAssignedCanvasesManagement.vue.d.ts +4 -20
- package/lib/components/assignedCanvases/CAssignedCanvasesManagementToolbar.vue.d.ts +1 -4
- package/lib/components/canvas-blocks/CBlockManagement.vue.d.ts +4 -16
- package/lib/components/canvas-blocks/CBlockManagementToolbar.vue.d.ts +1 -4
- package/lib/components/canvas-templates/CTemplateManagement.vue.d.ts +10 -40
- package/lib/components/canvas-templates/CTemplateManagementToolbar.vue.d.ts +4 -16
- package/lib/components/savedCanvases/CSavedCanvasesManagement.vue.d.ts +4 -16
- package/lib/components/savedCanvases/CSavedCanvasesManagementToolbar.vue.d.ts +1 -4
- package/lib/components/sections/CSectionManagement.vue.d.ts +4 -16
- package/lib/components/sections/CSectionManagementToolbar.vue.d.ts +1 -4
- package/lib/components/themes/CThemeManagement.vue.d.ts +4 -16
- package/lib/components/themes/CThemeManagementToolbar.vue.d.ts +1 -4
- package/lib/composables/useCanvasStandardFilters.d.ts +2 -17
- package/package.json +1 -1
package/canvas-ui.css
CHANGED
|
@@ -551,13 +551,13 @@ swiper-container::part(pagination) {
|
|
|
551
551
|
line-height: 20px;
|
|
552
552
|
letter-spacing: 0.25px;
|
|
553
553
|
color: var(--ad430d74);
|
|
554
|
-
}[data-v-
|
|
554
|
+
}[data-v-da2357d4] .ais-SearchBox {
|
|
555
555
|
margin: 0;
|
|
556
556
|
}
|
|
557
|
-
[data-v-
|
|
557
|
+
[data-v-da2357d4] .ais-SearchBox-submit,[data-v-da2357d4] .ais-SearchBox-reset {
|
|
558
558
|
display: none;
|
|
559
559
|
}
|
|
560
|
-
.admin-search[data-v-
|
|
560
|
+
.admin-search[data-v-da2357d4] .ais-SearchBox-reset {
|
|
561
561
|
display: block !important;
|
|
562
562
|
position: absolute !important;
|
|
563
563
|
right: 12px !important;
|
|
@@ -571,17 +571,17 @@ swiper-container::part(pagination) {
|
|
|
571
571
|
font-size: 16px !important;
|
|
572
572
|
z-index: 10 !important;
|
|
573
573
|
}
|
|
574
|
-
.admin-search[data-v-
|
|
574
|
+
.admin-search[data-v-da2357d4] .ais-SearchBox-reset:hover {
|
|
575
575
|
color: var(--p-text2) !important;
|
|
576
576
|
}
|
|
577
|
-
.admin-search[data-v-
|
|
577
|
+
.admin-search[data-v-da2357d4] .ais-SearchBox-reset:focus {
|
|
578
578
|
outline: none !important;
|
|
579
579
|
color: var(--p-primary) !important;
|
|
580
580
|
}
|
|
581
|
-
.admin-search[data-v-
|
|
581
|
+
.admin-search[data-v-da2357d4] .ais-SearchBox-input {
|
|
582
582
|
padding-right: 40px !important;
|
|
583
583
|
}
|
|
584
|
-
[data-v-
|
|
584
|
+
[data-v-da2357d4] .ais-SearchBox-input {
|
|
585
585
|
width: 100%;
|
|
586
586
|
padding: 12px 16px 12px 40px;
|
|
587
587
|
border: 1px solid var(--p-primary4);
|
|
@@ -590,39 +590,39 @@ swiper-container::part(pagination) {
|
|
|
590
590
|
background-color: var(--p-base);
|
|
591
591
|
transition: border-color 0.2s ease;
|
|
592
592
|
}
|
|
593
|
-
[data-v-
|
|
593
|
+
[data-v-da2357d4] .ais-SearchBox-input:focus {
|
|
594
594
|
outline: none;
|
|
595
595
|
border-color: var(--p-primary);
|
|
596
596
|
box-shadow: 0 0 0 3px var(--p-primary5);
|
|
597
597
|
}
|
|
598
|
-
[data-v-
|
|
598
|
+
[data-v-da2357d4] .ais-SearchBox-input::placeholder {
|
|
599
599
|
color: var(--p-text3);
|
|
600
600
|
font-size: 14px;
|
|
601
601
|
}
|
|
602
|
-
.overflow-y-auto[data-v-
|
|
602
|
+
.overflow-y-auto[data-v-da2357d4] {
|
|
603
603
|
scrollbar-width: thin;
|
|
604
604
|
scrollbar-color: var(--p-border2) var(--p-surface2);
|
|
605
605
|
}
|
|
606
|
-
.overflow-y-auto[data-v-
|
|
606
|
+
.overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar {
|
|
607
607
|
width: 6px;
|
|
608
608
|
}
|
|
609
|
-
.overflow-y-auto[data-v-
|
|
609
|
+
.overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar-track {
|
|
610
610
|
background: var(--p-surface2);
|
|
611
611
|
}
|
|
612
|
-
.overflow-y-auto[data-v-
|
|
612
|
+
.overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar-thumb {
|
|
613
613
|
background-color: var(--p-border2);
|
|
614
614
|
border-radius: 3px;
|
|
615
615
|
}
|
|
616
|
-
.overflow-y-auto[data-v-
|
|
616
|
+
.overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar-thumb:hover {
|
|
617
617
|
background-color: var(--p-text3);
|
|
618
618
|
}
|
|
619
|
-
button[data-v-
|
|
619
|
+
button[data-v-da2357d4]:hover {
|
|
620
620
|
transition: all 0.2s ease;
|
|
621
621
|
}
|
|
622
|
-
button[data-v-
|
|
622
|
+
button[data-v-da2357d4]:focus {
|
|
623
623
|
outline: none;
|
|
624
624
|
}
|
|
625
|
-
[data-v-
|
|
625
|
+
[data-v-da2357d4] mark,[data-v-da2357d4] em {
|
|
626
626
|
font-weight: bold;
|
|
627
627
|
font-style: normal;
|
|
628
628
|
}
|
|
@@ -903,7 +903,7 @@ button[data-v-052f4440]:focus {
|
|
|
903
903
|
cursor: pointer;
|
|
904
904
|
color: var(--000c7396);
|
|
905
905
|
}
|
|
906
|
-
.c-assigned-canvas-management[data-v-
|
|
906
|
+
.c-assigned-canvas-management[data-v-f6151990] {
|
|
907
907
|
display: flex;
|
|
908
908
|
flex-direction: column;
|
|
909
909
|
}
|
package/canvas-ui.js
CHANGED
|
@@ -95891,8 +95891,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
95891
95891
|
}
|
|
95892
95892
|
const emIndex = highlightValue.indexOf("<em>");
|
|
95893
95893
|
if (emIndex === -1) return "";
|
|
95894
|
-
const startChar = Math.max(0, emIndex -
|
|
95895
|
-
const endChar = Math.min(highlightValue.length, emIndex +
|
|
95894
|
+
const startChar = Math.max(0, emIndex - 75);
|
|
95895
|
+
const endChar = Math.min(highlightValue.length, emIndex + 125);
|
|
95896
95896
|
let truncated = highlightValue.substring(startChar, endChar);
|
|
95897
95897
|
if (startChar > 0) truncated = "..." + truncated;
|
|
95898
95898
|
if (endChar < highlightValue.length) truncated = truncated + "...";
|
|
@@ -96093,7 +96093,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96093
96093
|
show: "",
|
|
96094
96094
|
verticalAlignment: "top",
|
|
96095
96095
|
"z-index": _ctx.zIndex,
|
|
96096
|
-
"onUpdate:show": _cache[
|
|
96096
|
+
"onUpdate:show": _cache[15] || (_cache[15] = ($event) => emit("toggleSearch", $event))
|
|
96097
96097
|
}, {
|
|
96098
96098
|
default: withCtx(() => [
|
|
96099
96099
|
createElementVNode("div", {
|
|
@@ -96102,7 +96102,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96102
96102
|
}, [
|
|
96103
96103
|
createElementVNode("div", _hoisted_1$4w, [
|
|
96104
96104
|
createElementVNode("div", _hoisted_2$3j, [
|
|
96105
|
-
_cache[
|
|
96105
|
+
_cache[16] || (_cache[16] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
|
|
96106
96106
|
createElementVNode("i", { class: "c-icon far fa-search text-gray-400 text-l" })
|
|
96107
96107
|
], -1)),
|
|
96108
96108
|
withDirectives(createElementVNode("input", {
|
|
@@ -96208,7 +96208,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96208
96208
|
show: showFileTypeDropdown.value,
|
|
96209
96209
|
"show-arrow": false,
|
|
96210
96210
|
trigger: "manual",
|
|
96211
|
-
onClickoutside: _cache[
|
|
96211
|
+
onClickoutside: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = false)
|
|
96212
96212
|
}, {
|
|
96213
96213
|
trigger: withCtx(() => [
|
|
96214
96214
|
createVNode(unref(NTag), {
|
|
@@ -96221,20 +96221,12 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96221
96221
|
themeOverrides: {
|
|
96222
96222
|
borderRadius: "4px"
|
|
96223
96223
|
},
|
|
96224
|
-
onClick: _cache[
|
|
96224
|
+
onClick: _cache[6] || (_cache[6] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
|
|
96225
96225
|
}, {
|
|
96226
96226
|
default: withCtx(() => [
|
|
96227
96227
|
createElementVNode("div", _hoisted_10$C, [
|
|
96228
96228
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
|
|
96229
|
-
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
|
|
96230
|
-
selectedFileTypes.value.length ? (openBlock(), createBlock(CIcon, {
|
|
96231
|
-
key: 1,
|
|
96232
|
-
class: "ml-1",
|
|
96233
|
-
color: "var(--p-primary2)",
|
|
96234
|
-
icon: "xmark",
|
|
96235
|
-
size: "12",
|
|
96236
|
-
onClick: _cache[6] || (_cache[6] = withModifiers(($event) => selectedFileTypes.value = [], ["stop"]))
|
|
96237
|
-
})) : createCommentVNode("", true)
|
|
96229
|
+
selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
|
|
96238
96230
|
])
|
|
96239
96231
|
]),
|
|
96240
96232
|
_: 1
|
|
@@ -96283,7 +96275,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96283
96275
|
_: 1
|
|
96284
96276
|
}, 8, ["show"]),
|
|
96285
96277
|
hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_14$h, [
|
|
96286
|
-
_cache[
|
|
96278
|
+
_cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
|
|
96287
96279
|
createElementVNode("span", {
|
|
96288
96280
|
class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
|
|
96289
96281
|
onClick: clearAllFilters
|
|
@@ -96301,7 +96293,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96301
96293
|
themeOverrides: {
|
|
96302
96294
|
borderRadius: "4px"
|
|
96303
96295
|
},
|
|
96304
|
-
onClick: _cache[
|
|
96296
|
+
onClick: _cache[8] || (_cache[8] = ($event) => toggleCanvasFilter("saved_canvas"))
|
|
96305
96297
|
}, {
|
|
96306
96298
|
default: withCtx(() => [
|
|
96307
96299
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
|
|
@@ -96318,7 +96310,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96318
96310
|
themeOverrides: {
|
|
96319
96311
|
borderRadius: "4px"
|
|
96320
96312
|
},
|
|
96321
|
-
onClick: _cache[
|
|
96313
|
+
onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("template"))
|
|
96322
96314
|
}, {
|
|
96323
96315
|
default: withCtx(() => [
|
|
96324
96316
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
|
|
@@ -96336,7 +96328,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96336
96328
|
themeOverrides: {
|
|
96337
96329
|
borderRadius: "4px"
|
|
96338
96330
|
},
|
|
96339
|
-
onClick: _cache[
|
|
96331
|
+
onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("product_template"))
|
|
96340
96332
|
}, {
|
|
96341
96333
|
default: withCtx(() => [
|
|
96342
96334
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates")), 1)
|
|
@@ -96353,7 +96345,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96353
96345
|
themeOverrides: {
|
|
96354
96346
|
borderRadius: "4px"
|
|
96355
96347
|
},
|
|
96356
|
-
onClick: _cache[
|
|
96348
|
+
onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("section"))
|
|
96357
96349
|
}, {
|
|
96358
96350
|
default: withCtx(() => [
|
|
96359
96351
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 1)
|
|
@@ -96370,7 +96362,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96370
96362
|
themeOverrides: {
|
|
96371
96363
|
borderRadius: "4px"
|
|
96372
96364
|
},
|
|
96373
|
-
onClick: _cache[
|
|
96365
|
+
onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("block"))
|
|
96374
96366
|
}, {
|
|
96375
96367
|
default: withCtx(() => [
|
|
96376
96368
|
createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 1)
|
|
@@ -96378,7 +96370,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96378
96370
|
_: 1
|
|
96379
96371
|
}, 8, ["style"]),
|
|
96380
96372
|
selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15$f, [
|
|
96381
|
-
_cache[
|
|
96373
|
+
_cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
|
|
96382
96374
|
createElementVNode("span", {
|
|
96383
96375
|
class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
|
|
96384
96376
|
onClick: clearCanvasFilters
|
|
@@ -96408,7 +96400,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96408
96400
|
}), 128))
|
|
96409
96401
|
]),
|
|
96410
96402
|
recentlyOpenedDocs.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
96411
|
-
_cache[
|
|
96403
|
+
_cache[19] || (_cache[19] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
|
|
96412
96404
|
createElementVNode("div", _hoisted_21$7, [
|
|
96413
96405
|
createElementVNode("span", _hoisted_22$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
|
|
96414
96406
|
]),
|
|
@@ -96525,7 +96517,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96525
96517
|
filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
|
|
96526
96518
|
createElementVNode("span", {
|
|
96527
96519
|
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96528
|
-
onClick: _cache[
|
|
96520
|
+
onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
|
|
96529
96521
|
}, [
|
|
96530
96522
|
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96531
96523
|
createVNode(CIcon, {
|
|
@@ -96577,7 +96569,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96577
96569
|
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
|
|
96578
96570
|
createElementVNode("span", {
|
|
96579
96571
|
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
96580
|
-
onClick: _cache[
|
|
96572
|
+
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
|
|
96581
96573
|
}, [
|
|
96582
96574
|
createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
|
|
96583
96575
|
createVNode(CIcon, {
|
|
@@ -96733,7 +96725,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
|
|
|
96733
96725
|
}
|
|
96734
96726
|
});
|
|
96735
96727
|
|
|
96736
|
-
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-
|
|
96728
|
+
const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-da2357d4"]]);
|
|
96737
96729
|
|
|
96738
96730
|
const BulletListExtended = BulletList.extend({
|
|
96739
96731
|
addOptions() {
|
|
@@ -111034,7 +111026,6 @@ function useCanvasStandardFilters(options = {}) {
|
|
|
111034
111026
|
includeTagsFilter = true,
|
|
111035
111027
|
includeDraftFilter = true,
|
|
111036
111028
|
includeTemplateFilter = false,
|
|
111037
|
-
templateOptions,
|
|
111038
111029
|
includeOwnerFilter = false,
|
|
111039
111030
|
ownerLabel
|
|
111040
111031
|
} = options;
|
|
@@ -111063,10 +111054,9 @@ function useCanvasStandardFilters(options = {}) {
|
|
|
111063
111054
|
}
|
|
111064
111055
|
if (includeTemplateFilter) {
|
|
111065
111056
|
components.push({
|
|
111066
|
-
type: MetadataTemplateFieldTypeEnum.
|
|
111067
|
-
name: "
|
|
111068
|
-
label: t("canvasUI.composables.useCanvasStandardFilters.templateUsed")
|
|
111069
|
-
options: templateOptions?.value ?? []
|
|
111057
|
+
type: MetadataTemplateFieldTypeEnum.TEXT,
|
|
111058
|
+
name: "template__name__icontains",
|
|
111059
|
+
label: t("canvasUI.composables.useCanvasStandardFilters.templateUsed")
|
|
111070
111060
|
});
|
|
111071
111061
|
}
|
|
111072
111062
|
return components;
|
|
@@ -118286,7 +118276,6 @@ const _sfc_main$4q = /*@__PURE__*/defineComponent({
|
|
|
118286
118276
|
const fetchedData = ref([]);
|
|
118287
118277
|
const isLoading = ref(false);
|
|
118288
118278
|
const accessibleTemplateIds = ref(new Set());
|
|
118289
|
-
const availableTemplates = ref([]);
|
|
118290
118279
|
const isCheckingTemplateAccess = ref(false);
|
|
118291
118280
|
const isBulkDeleting = ref(false);
|
|
118292
118281
|
const isBulkUpdating = ref(false);
|
|
@@ -118362,32 +118351,11 @@ const _sfc_main$4q = /*@__PURE__*/defineComponent({
|
|
|
118362
118351
|
return systemTags.includes(lowerTag);
|
|
118363
118352
|
}) ?? false;
|
|
118364
118353
|
}
|
|
118365
|
-
const templateOptions = computed(() => availableTemplates.value.map(t => ({
|
|
118366
|
-
label: t.name,
|
|
118367
|
-
value: t.id
|
|
118368
|
-
})).sort((a, b) => a.label.localeCompare(b.label)));
|
|
118369
|
-
async function fetchTemplates() {
|
|
118370
|
-
try {
|
|
118371
|
-
const {
|
|
118372
|
-
results
|
|
118373
|
-
} = await props.fetcher({
|
|
118374
|
-
is_template: true,
|
|
118375
|
-
is_section: false,
|
|
118376
|
-
page: 1,
|
|
118377
|
-
page_size: 1000,
|
|
118378
|
-
fields: 'id,name'
|
|
118379
|
-
});
|
|
118380
|
-
availableTemplates.value = results;
|
|
118381
|
-
} catch (e) {
|
|
118382
|
-
console.error('Failed to fetch templates for filter:', e);
|
|
118383
|
-
}
|
|
118384
|
-
}
|
|
118385
118354
|
const {
|
|
118386
118355
|
filterComponents: dataFilterComponents
|
|
118387
118356
|
} = useCanvasStandardFilters({
|
|
118388
118357
|
includeTemplateFilter: true,
|
|
118389
|
-
includeOwnerFilter: props.isAnyTypeOfAdmin ?? false
|
|
118390
|
-
templateOptions
|
|
118358
|
+
includeOwnerFilter: props.isAnyTypeOfAdmin ?? false
|
|
118391
118359
|
});
|
|
118392
118360
|
const {
|
|
118393
118361
|
height: canvasManagementToolbarHeight
|
|
@@ -119143,7 +119111,6 @@ const _sfc_main$4q = /*@__PURE__*/defineComponent({
|
|
|
119143
119111
|
onMounted(async () => {
|
|
119144
119112
|
try {
|
|
119145
119113
|
isLoading.value = true;
|
|
119146
|
-
fetchTemplates();
|
|
119147
119114
|
await fetch(fetchingParams.value);
|
|
119148
119115
|
} catch (e) {
|
|
119149
119116
|
console.error(e);
|
|
@@ -119318,9 +119285,6 @@ const _sfc_main$4o = /*@__PURE__*/defineComponent({
|
|
|
119318
119285
|
fetcher: {
|
|
119319
119286
|
type: Function
|
|
119320
119287
|
},
|
|
119321
|
-
templatesFetcher: {
|
|
119322
|
-
type: Function
|
|
119323
|
-
},
|
|
119324
119288
|
byIdFetcher: {
|
|
119325
119289
|
type: Function
|
|
119326
119290
|
},
|
|
@@ -119366,43 +119330,21 @@ const _sfc_main$4o = /*@__PURE__*/defineComponent({
|
|
|
119366
119330
|
const tableRef = ref(null);
|
|
119367
119331
|
const toolbarWrapper = ref(null);
|
|
119368
119332
|
const launchDarkly = inject('launchDarkly', computed(() => ({})));
|
|
119369
|
-
const isLoading = ref(false);
|
|
119370
|
-
const fetchedData = ref([]);
|
|
119371
|
-
const totalCount = ref(0);
|
|
119372
|
-
const availableTemplates = ref([]);
|
|
119373
|
-
const templateOptions = computed(() => availableTemplates.value.map(t => ({
|
|
119374
|
-
label: t.name,
|
|
119375
|
-
value: t.id
|
|
119376
|
-
})).sort((a, b) => a.label.localeCompare(b.label)));
|
|
119377
|
-
async function fetchTemplates() {
|
|
119378
|
-
if (!props.templatesFetcher) return;
|
|
119379
|
-
try {
|
|
119380
|
-
const {
|
|
119381
|
-
results
|
|
119382
|
-
} = await props.templatesFetcher({
|
|
119383
|
-
is_template: true,
|
|
119384
|
-
is_section: false,
|
|
119385
|
-
page: 1,
|
|
119386
|
-
page_size: 1000,
|
|
119387
|
-
fields: 'id,name'
|
|
119388
|
-
});
|
|
119389
|
-
availableTemplates.value = results;
|
|
119390
|
-
} catch (e) {
|
|
119391
|
-
console.error('Failed to fetch templates for filter:', e);
|
|
119392
|
-
}
|
|
119393
|
-
}
|
|
119394
119333
|
const {
|
|
119395
119334
|
filterComponents: dataFilterComponents
|
|
119396
119335
|
} = useCanvasStandardFilters({
|
|
119397
119336
|
includeTemplateFilter: true,
|
|
119398
119337
|
includeOwnerFilter: true,
|
|
119338
|
+
// Include owner filter for assigned canvases
|
|
119399
119339
|
includeTagsFilter: true,
|
|
119400
|
-
includeDraftFilter: true
|
|
119401
|
-
templateOptions
|
|
119340
|
+
includeDraftFilter: true
|
|
119402
119341
|
});
|
|
119403
119342
|
const {
|
|
119404
119343
|
height: canvasManagementToolbarHeight
|
|
119405
119344
|
} = useElementSize(toolbarWrapper);
|
|
119345
|
+
const isLoading = ref(false);
|
|
119346
|
+
const fetchedData = ref([]);
|
|
119347
|
+
const totalCount = ref(0);
|
|
119406
119348
|
const {
|
|
119407
119349
|
search,
|
|
119408
119350
|
pageSize,
|
|
@@ -119649,7 +119591,6 @@ const _sfc_main$4o = /*@__PURE__*/defineComponent({
|
|
|
119649
119591
|
onMounted(async () => {
|
|
119650
119592
|
try {
|
|
119651
119593
|
isLoading.value = true;
|
|
119652
|
-
fetchTemplates();
|
|
119653
119594
|
await fetch(fetchingParams.value);
|
|
119654
119595
|
} catch (e) {
|
|
119655
119596
|
console.error(e);
|
|
@@ -119703,7 +119644,7 @@ const _sfc_main$4o = /*@__PURE__*/defineComponent({
|
|
|
119703
119644
|
}
|
|
119704
119645
|
});
|
|
119705
119646
|
|
|
119706
|
-
const CAssignedCanvasesManagement = /* @__PURE__ */ _export_sfc(_sfc_main$4o, [["__scopeId", "data-v-
|
|
119647
|
+
const CAssignedCanvasesManagement = /* @__PURE__ */ _export_sfc(_sfc_main$4o, [["__scopeId", "data-v-f6151990"]]);
|
|
119707
119648
|
|
|
119708
119649
|
const _hoisted_1$3v = { class: "w-fit flex items-center justify-center text-truncate rd uppercase c-table-select" };
|
|
119709
119650
|
const __default__ = {
|
|
@@ -142476,10 +142417,7 @@ const _hoisted_94 = { class: "flex flex-col gap-2" };
|
|
|
142476
142417
|
const _hoisted_95 = { class: "flex items-center gap-2" };
|
|
142477
142418
|
const _hoisted_96 = { class: "text-sm" };
|
|
142478
142419
|
const _hoisted_97 = { class: "text-sm" };
|
|
142479
|
-
const _hoisted_98 = {
|
|
142480
|
-
key: 0,
|
|
142481
|
-
class: "flex items-center gap-2"
|
|
142482
|
-
};
|
|
142420
|
+
const _hoisted_98 = { class: "flex items-center gap-2" };
|
|
142483
142421
|
const _hoisted_99 = { class: "text-sm" };
|
|
142484
142422
|
const _hoisted_100 = { class: "mb-4" };
|
|
142485
142423
|
const _hoisted_101 = { class: "block mb-2" };
|
|
@@ -142505,9 +142443,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142505
142443
|
const props = __props;
|
|
142506
142444
|
const { t } = useI18n();
|
|
142507
142445
|
const themeVars = useThemeVars();
|
|
142508
|
-
const {
|
|
142509
|
-
const isAdminMode = computed(() => mode.value === CanvasBuilderMode.ADMIN);
|
|
142510
|
-
const confirmation = useConfirmation();
|
|
142446
|
+
const { setComponentEditMode, updateNodeDataById } = useCanvas$1();
|
|
142511
142447
|
const { crmShape } = useCrmShape();
|
|
142512
142448
|
const { palette } = useCanvasTheme$1();
|
|
142513
142449
|
let seriesIdCounter = 0;
|
|
@@ -142595,9 +142531,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142595
142531
|
});
|
|
142596
142532
|
const chartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
|
|
142597
142533
|
const primaryChartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
|
|
142598
|
-
const
|
|
142599
|
-
const datasets = props.data?.data?.datasets;
|
|
142600
|
-
const backgroundColor = savedColorScheme ?? (datasets && datasets.length > 1 ? datasets.map((ds) => ds.background_color).filter(Boolean) : datasets?.[0]?.background_color);
|
|
142534
|
+
const backgroundColor = props.data?.data?.datasets?.[0]?.background_color;
|
|
142601
142535
|
const colorSchemeType = ref(props.data?.color_scheme_type ?? "theme");
|
|
142602
142536
|
const chartColors = ref([]);
|
|
142603
142537
|
const displayColors = computed(() => {
|
|
@@ -142632,7 +142566,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142632
142566
|
const percentDisplay = ref(props.data?.percent_display ?? false);
|
|
142633
142567
|
const enableFullscreenBtn = ref(props.data?.view_controls?.enable_fullscreen_btn ?? false);
|
|
142634
142568
|
const enableChartTypeSwitcher = ref(props.data?.view_controls?.enable_chart_type_switcher ?? false);
|
|
142635
|
-
const enableDataEntry = ref(props.data?.view_controls?.enable_data_entry
|
|
142569
|
+
const enableDataEntry = ref(props.data?.view_controls?.enable_data_entry ?? false);
|
|
142636
142570
|
const chartHeight = ref(props.data?.chart_height ?? 800);
|
|
142637
142571
|
const chartWidth = ref(props.data?.chart_width ?? 100);
|
|
142638
142572
|
const legendPositionOptions = [
|
|
@@ -143149,7 +143083,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143149
143083
|
return chartColors.value;
|
|
143150
143084
|
}
|
|
143151
143085
|
function createChartConfig() {
|
|
143152
|
-
const
|
|
143086
|
+
const datasets = [];
|
|
143153
143087
|
let allLabels = [];
|
|
143154
143088
|
const colorsForStorage = getSeriesColors(true);
|
|
143155
143089
|
const isSingleSeries = seriesList.value.length === 1;
|
|
@@ -143194,7 +143128,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143194
143128
|
if (processedData.labels.length > allLabels.length) {
|
|
143195
143129
|
allLabels = processedData.labels;
|
|
143196
143130
|
}
|
|
143197
|
-
|
|
143131
|
+
datasets.push(datasetOptions);
|
|
143198
143132
|
});
|
|
143199
143133
|
const primaryType = seriesList.value[0].chartType;
|
|
143200
143134
|
let actualPrimaryType = primaryType;
|
|
@@ -143233,7 +143167,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143233
143167
|
const config = {
|
|
143234
143168
|
type: actualPrimaryType,
|
|
143235
143169
|
color_scheme_type: colorSchemeType.value,
|
|
143236
|
-
color_scheme: colorsForStorage,
|
|
143237
143170
|
percent_display: percentDisplay.value,
|
|
143238
143171
|
chart_height: chartHeight.value,
|
|
143239
143172
|
chart_width: chartWidth.value,
|
|
@@ -143244,7 +143177,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143244
143177
|
},
|
|
143245
143178
|
data: {
|
|
143246
143179
|
labels: allLabels,
|
|
143247
|
-
datasets
|
|
143180
|
+
datasets
|
|
143248
143181
|
},
|
|
143249
143182
|
options: {
|
|
143250
143183
|
responsive: true,
|
|
@@ -143292,22 +143225,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143292
143225
|
return config;
|
|
143293
143226
|
}
|
|
143294
143227
|
function onCancel() {
|
|
143295
|
-
if (isDirty.value) {
|
|
143296
|
-
confirmation.warning({
|
|
143297
|
-
title: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.title"),
|
|
143298
|
-
content: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.content"),
|
|
143299
|
-
confirmText: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.confirm"),
|
|
143300
|
-
exitText: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.exit"),
|
|
143301
|
-
hasExit: true,
|
|
143302
|
-
onConfirm: () => {
|
|
143303
|
-
onSave();
|
|
143304
|
-
},
|
|
143305
|
-
onExit: () => {
|
|
143306
|
-
setComponentEditMode(false);
|
|
143307
|
-
}
|
|
143308
|
-
});
|
|
143309
|
-
return;
|
|
143310
|
-
}
|
|
143311
143228
|
setComponentEditMode(false);
|
|
143312
143229
|
}
|
|
143313
143230
|
function onSave() {
|
|
@@ -143316,10 +143233,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143316
143233
|
setComponentEditMode(false);
|
|
143317
143234
|
}
|
|
143318
143235
|
const previewData = ref({});
|
|
143319
|
-
const isDirty = ref(false);
|
|
143320
|
-
function markDirty() {
|
|
143321
|
-
isDirty.value = true;
|
|
143322
|
-
}
|
|
143323
143236
|
function updatePreview() {
|
|
143324
143237
|
const config = createChartConfig();
|
|
143325
143238
|
previewData.value = {
|
|
@@ -143341,7 +143254,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143341
143254
|
enableChartTypeSwitcher.value = false;
|
|
143342
143255
|
}
|
|
143343
143256
|
});
|
|
143344
|
-
let isInitialized = false;
|
|
143345
143257
|
watch(
|
|
143346
143258
|
[
|
|
143347
143259
|
seriesList,
|
|
@@ -143363,23 +143275,17 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143363
143275
|
],
|
|
143364
143276
|
() => {
|
|
143365
143277
|
updatePreview();
|
|
143366
|
-
if (isInitialized) {
|
|
143367
|
-
markDirty();
|
|
143368
|
-
}
|
|
143369
143278
|
},
|
|
143370
143279
|
{ deep: true }
|
|
143371
143280
|
);
|
|
143372
143281
|
onMounted(() => {
|
|
143373
143282
|
updatePreview();
|
|
143374
|
-
nextTick(() => {
|
|
143375
|
-
isInitialized = true;
|
|
143376
|
-
});
|
|
143377
143283
|
});
|
|
143378
143284
|
return (_ctx, _cache) => {
|
|
143379
143285
|
return openBlock(), createBlock(unref(NModal), {
|
|
143380
143286
|
bordered: false,
|
|
143381
143287
|
class: "cb-data-charts-settings",
|
|
143382
|
-
onEsc:
|
|
143288
|
+
onEsc: () => unref(setComponentEditMode)(false),
|
|
143383
143289
|
preset: "card",
|
|
143384
143290
|
show: true,
|
|
143385
143291
|
size: "huge",
|
|
@@ -143391,7 +143297,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
143391
143297
|
"--n-padding-left": "16px"
|
|
143392
143298
|
}]),
|
|
143393
143299
|
title: unref(t)("canvasUI.canvasBuilder.dataCharts.editDataChartsComponent"),
|
|
143394
|
-
onClose:
|
|
143300
|
+
onClose: _cache[16] || (_cache[16] = ($event) => unref(setComponentEditMode)(false))
|
|
143395
143301
|
}, {
|
|
143396
143302
|
footer: withCtx(() => [
|
|
143397
143303
|
createElementVNode("div", _hoisted_110, [
|
|
@@ -144031,13 +143937,13 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
144031
143937
|
]),
|
|
144032
143938
|
_: 1
|
|
144033
143939
|
}, 8, ["disabled"]),
|
|
144034
|
-
|
|
143940
|
+
createElementVNode("div", _hoisted_98, [
|
|
144035
143941
|
createVNode(unref(NSwitch), {
|
|
144036
143942
|
value: enableDataEntry.value,
|
|
144037
143943
|
"onUpdate:value": _cache[13] || (_cache[13] = ($event) => enableDataEntry.value = $event)
|
|
144038
143944
|
}, null, 8, ["value"]),
|
|
144039
143945
|
createElementVNode("span", _hoisted_99, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableDataEntry")), 1)
|
|
144040
|
-
])
|
|
143946
|
+
])
|
|
144041
143947
|
])
|
|
144042
143948
|
]),
|
|
144043
143949
|
createElementVNode("div", _hoisted_100, [
|
|
@@ -144053,7 +143959,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
144053
143959
|
min: 100,
|
|
144054
143960
|
step: 10
|
|
144055
143961
|
}, {
|
|
144056
|
-
suffix: withCtx(() => _cache[
|
|
143962
|
+
suffix: withCtx(() => _cache[17] || (_cache[17] = [
|
|
144057
143963
|
createTextVNode("px")
|
|
144058
143964
|
])),
|
|
144059
143965
|
_: 1
|
|
@@ -144069,7 +143975,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
144069
143975
|
min: 10,
|
|
144070
143976
|
step: 5
|
|
144071
143977
|
}, {
|
|
144072
|
-
suffix: withCtx(() => _cache[
|
|
143978
|
+
suffix: withCtx(() => _cache[18] || (_cache[18] = [
|
|
144073
143979
|
createTextVNode("%")
|
|
144074
143980
|
])),
|
|
144075
143981
|
_: 1
|
|
@@ -144104,7 +144010,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
144104
144010
|
}, 8, ["style"])
|
|
144105
144011
|
]),
|
|
144106
144012
|
_: 1
|
|
144107
|
-
}, 8, ["title"]);
|
|
144013
|
+
}, 8, ["onEsc", "title"]);
|
|
144108
144014
|
};
|
|
144109
144015
|
}
|
|
144110
144016
|
});
|
|
@@ -144152,7 +144058,7 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
144152
144058
|
if (mode.value === CanvasBuilderMode.ADMIN) {
|
|
144153
144059
|
return true;
|
|
144154
144060
|
}
|
|
144155
|
-
return props.data?.view_controls?.enable_data_entry
|
|
144061
|
+
return props.data?.view_controls?.enable_data_entry ?? false;
|
|
144156
144062
|
});
|
|
144157
144063
|
onMounted(() => {
|
|
144158
144064
|
if (justAddedComponentId.value === props.id) {
|