@pitcher/canvas-ui 2025.12.9-104839-beta → 2025.12.9-123223-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 +2 -25
- package/canvas-ui.js +494 -1276
- package/canvas-ui.js.map +1 -1
- package/lib/apps/canvas-builder/components/ui/DataCharts/DataCharts.raw.vue.d.ts +0 -4
- package/lib/apps/canvas-builder/components/ui/DataCharts/types.d.ts +8 -73
- package/lib/main.lib.d.ts +1 -0
- package/lib/util/handlebars.d.ts +35 -0
- package/locale/de.json +2 -22
- package/locale/el.json +2 -22
- package/locale/en.json +2 -22
- package/locale/es.json +2 -22
- package/locale/fr.json +3 -23
- package/locale/it.json +41 -61
- package/locale/ja.json +38 -58
- package/locale/nl.json +41 -61
- package/locale/pl.json +2 -22
- package/locale/pt-br.json +13 -33
- package/locale/pt.json +2 -22
- package/locale/th.json +6 -26
- package/locale/tr.json +2 -22
- package/locale/zh.json +38 -58
- package/package.json +1 -1
package/canvas-ui.js
CHANGED
|
@@ -92770,6 +92770,47 @@ function renderTemplate(template, context = {}) {
|
|
|
92770
92770
|
return template;
|
|
92771
92771
|
}
|
|
92772
92772
|
}
|
|
92773
|
+
function registerCustomHelper(helper) {
|
|
92774
|
+
try {
|
|
92775
|
+
const fn = new Function("return " + helper.code)();
|
|
92776
|
+
if (typeof fn !== "function") {
|
|
92777
|
+
console.warn(`[handlebars] Helper "${helper.name}" code does not evaluate to a function`);
|
|
92778
|
+
return false;
|
|
92779
|
+
}
|
|
92780
|
+
Handlebars.registerHelper(helper.name, fn);
|
|
92781
|
+
console.info(`[handlebars] Registered custom helper: ${helper.name}`);
|
|
92782
|
+
return true;
|
|
92783
|
+
} catch (e) {
|
|
92784
|
+
console.warn(`[handlebars] Failed to register helper "${helper.name}":`, e?.message);
|
|
92785
|
+
return false;
|
|
92786
|
+
}
|
|
92787
|
+
}
|
|
92788
|
+
function registerCustomHelpers(helpers) {
|
|
92789
|
+
let registered = 0;
|
|
92790
|
+
let failed = 0;
|
|
92791
|
+
for (const helper of helpers) {
|
|
92792
|
+
if (registerCustomHelper(helper)) {
|
|
92793
|
+
registered++;
|
|
92794
|
+
} else {
|
|
92795
|
+
failed++;
|
|
92796
|
+
}
|
|
92797
|
+
}
|
|
92798
|
+
return { registered, failed };
|
|
92799
|
+
}
|
|
92800
|
+
function loadCustomHelpersFromApps(installedApps) {
|
|
92801
|
+
const helpersApp = installedApps.find((app) => app.app_metadata?.name === "handlebars-helpers");
|
|
92802
|
+
if (!helpersApp) {
|
|
92803
|
+
console.info("[handlebars] No handlebars-helpers app installed");
|
|
92804
|
+
return { registered: 0, failed: 0 };
|
|
92805
|
+
}
|
|
92806
|
+
const helpers = helpersApp.metadata?.handlebars_helpers;
|
|
92807
|
+
if (!helpers || !Array.isArray(helpers) || helpers.length === 0) {
|
|
92808
|
+
console.info("[handlebars] handlebars-helpers app has no helpers configured");
|
|
92809
|
+
return { registered: 0, failed: 0 };
|
|
92810
|
+
}
|
|
92811
|
+
console.info(`[handlebars] Loading ${helpers.length} custom helper(s) from handlebars-helpers app`);
|
|
92812
|
+
return registerCustomHelpers(helpers);
|
|
92813
|
+
}
|
|
92773
92814
|
|
|
92774
92815
|
function createPageId(fileId, pageIndex) {
|
|
92775
92816
|
return `file-${fileId}-page-index-${pageIndex}`;
|
|
@@ -94586,38 +94627,38 @@ const _hoisted_47$4 = ["data-result-selected", "onClick"];
|
|
|
94586
94627
|
const _hoisted_48$4 = { class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center" };
|
|
94587
94628
|
const _hoisted_49$4 = { class: "flex-1 min-w-0" };
|
|
94588
94629
|
const _hoisted_50$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94589
|
-
const _hoisted_51$
|
|
94590
|
-
const _hoisted_52$
|
|
94591
|
-
const _hoisted_53$
|
|
94630
|
+
const _hoisted_51$2 = { class: "text-xs text-gray-500" };
|
|
94631
|
+
const _hoisted_52$2 = { class: "text-xs text-gray-400" };
|
|
94632
|
+
const _hoisted_53$2 = {
|
|
94592
94633
|
key: 0,
|
|
94593
94634
|
class: "px-0 py-0"
|
|
94594
94635
|
};
|
|
94595
|
-
const _hoisted_54$
|
|
94636
|
+
const _hoisted_54$1 = {
|
|
94596
94637
|
key: 0,
|
|
94597
94638
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
94598
94639
|
};
|
|
94599
|
-
const _hoisted_55$
|
|
94640
|
+
const _hoisted_55$1 = {
|
|
94600
94641
|
key: 2,
|
|
94601
94642
|
class: "flex-1 overflow-y-auto bg-white w-full"
|
|
94602
94643
|
};
|
|
94603
|
-
const _hoisted_56$
|
|
94604
|
-
const _hoisted_57$
|
|
94605
|
-
const _hoisted_58$
|
|
94606
|
-
const _hoisted_59$
|
|
94607
|
-
const _hoisted_60$
|
|
94608
|
-
const _hoisted_61$
|
|
94644
|
+
const _hoisted_56$1 = { class: "w-full px-0" };
|
|
94645
|
+
const _hoisted_57$1 = { class: "flex items-center px-0 pt-2 pb-1" };
|
|
94646
|
+
const _hoisted_58$1 = { class: "text-m font-semibold text-gray-900" };
|
|
94647
|
+
const _hoisted_59$1 = { class: "ml-2 text-sm text-gray-500" };
|
|
94648
|
+
const _hoisted_60$1 = ["data-result-selected", "onClick"];
|
|
94649
|
+
const _hoisted_61$1 = {
|
|
94609
94650
|
key: 1,
|
|
94610
94651
|
class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
|
|
94611
94652
|
};
|
|
94612
|
-
const _hoisted_62$
|
|
94613
|
-
const _hoisted_63$
|
|
94614
|
-
const _hoisted_64$
|
|
94615
|
-
const _hoisted_65$
|
|
94616
|
-
const _hoisted_66$
|
|
94653
|
+
const _hoisted_62$1 = { class: "flex-1 min-w-0" };
|
|
94654
|
+
const _hoisted_63$1 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
|
|
94655
|
+
const _hoisted_64$1 = { class: "text-xs text-gray-500" };
|
|
94656
|
+
const _hoisted_65$1 = { class: "text-xs text-gray-400" };
|
|
94657
|
+
const _hoisted_66$1 = {
|
|
94617
94658
|
key: 0,
|
|
94618
94659
|
class: "flex flex-col items-center justify-center text-center p-8 gap-4"
|
|
94619
94660
|
};
|
|
94620
|
-
const _hoisted_67$
|
|
94661
|
+
const _hoisted_67$1 = {
|
|
94621
94662
|
key: 0,
|
|
94622
94663
|
class: "flex flex-wrap line-height-6 pt-4 pb-2 px-6 border-t border-gray-200 gap-y-4 gap-x-4"
|
|
94623
94664
|
};
|
|
@@ -95779,13 +95820,13 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95779
95820
|
]),
|
|
95780
95821
|
createElementVNode("div", _hoisted_49$4, [
|
|
95781
95822
|
createElementVNode("h3", _hoisted_50$4, toDisplayString(item.name), 1),
|
|
95782
|
-
createElementVNode("p", _hoisted_51$
|
|
95823
|
+
createElementVNode("p", _hoisted_51$2, toDisplayString(formatCanvasType(item.content_type)), 1)
|
|
95783
95824
|
]),
|
|
95784
|
-
createElementVNode("div", _hoisted_52$
|
|
95825
|
+
createElementVNode("div", _hoisted_52$2, toDisplayString(item.folder?.name || ""), 1)
|
|
95785
95826
|
], 10, _hoisted_47$4);
|
|
95786
95827
|
}), 128))
|
|
95787
95828
|
]),
|
|
95788
|
-
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_53$
|
|
95829
|
+
filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_53$2, [
|
|
95789
95830
|
createElementVNode("span", {
|
|
95790
95831
|
class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
|
|
95791
95832
|
onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
|
|
@@ -95800,7 +95841,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95800
95841
|
])) : createCommentVNode("", true)
|
|
95801
95842
|
])) : createCommentVNode("", true)
|
|
95802
95843
|
]),
|
|
95803
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_54$
|
|
95844
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_54$1, [
|
|
95804
95845
|
createVNode(CIcon, {
|
|
95805
95846
|
class: "text-6xl",
|
|
95806
95847
|
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
@@ -95811,9 +95852,9 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95811
95852
|
class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
|
|
95812
95853
|
}, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
|
|
95813
95854
|
])) : createCommentVNode("", true)
|
|
95814
|
-
])) : (openBlock(), createElementBlock("div", _hoisted_55$
|
|
95815
|
-
createElementVNode("div", _hoisted_56$
|
|
95816
|
-
createElementVNode("div", _hoisted_57$
|
|
95855
|
+
])) : (openBlock(), createElementBlock("div", _hoisted_55$1, [
|
|
95856
|
+
createElementVNode("div", _hoisted_56$1, [
|
|
95857
|
+
createElementVNode("div", _hoisted_57$1, [
|
|
95817
95858
|
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
95818
95859
|
key: 0,
|
|
95819
95860
|
class: "mr-2",
|
|
@@ -95827,8 +95868,8 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95827
95868
|
icon: "presentation",
|
|
95828
95869
|
size: "16"
|
|
95829
95870
|
})),
|
|
95830
|
-
createElementVNode("span", _hoisted_58$
|
|
95831
|
-
createElementVNode("span", _hoisted_59$
|
|
95871
|
+
createElementVNode("span", _hoisted_58$1, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
|
|
95872
|
+
createElementVNode("span", _hoisted_59$1, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
|
|
95832
95873
|
]),
|
|
95833
95874
|
createElementVNode("div", null, [
|
|
95834
95875
|
(openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
|
|
@@ -95853,7 +95894,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95853
95894
|
"object-fit": "cover",
|
|
95854
95895
|
src: item.picture_url || "",
|
|
95855
95896
|
width: "72"
|
|
95856
|
-
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_61$
|
|
95897
|
+
}, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_61$1, [
|
|
95857
95898
|
searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
|
|
95858
95899
|
key: 0,
|
|
95859
95900
|
color: "var(--p-text2)",
|
|
@@ -95866,15 +95907,15 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95866
95907
|
size: "32"
|
|
95867
95908
|
}))
|
|
95868
95909
|
])),
|
|
95869
|
-
createElementVNode("div", _hoisted_62$
|
|
95870
|
-
createElementVNode("h3", _hoisted_63$
|
|
95871
|
-
createElementVNode("p", _hoisted_64$
|
|
95910
|
+
createElementVNode("div", _hoisted_62$1, [
|
|
95911
|
+
createElementVNode("h3", _hoisted_63$1, toDisplayString(item.name), 1),
|
|
95912
|
+
createElementVNode("p", _hoisted_64$1, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.content_type || "PDF" : formatCanvasType(item.content_type)), 1)
|
|
95872
95913
|
]),
|
|
95873
|
-
createElementVNode("div", _hoisted_65$
|
|
95874
|
-
], 10, _hoisted_60$
|
|
95914
|
+
createElementVNode("div", _hoisted_65$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
|
|
95915
|
+
], 10, _hoisted_60$1);
|
|
95875
95916
|
}), 128))
|
|
95876
95917
|
]),
|
|
95877
|
-
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_66$
|
|
95918
|
+
searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_66$1, [
|
|
95878
95919
|
createVNode(CIcon, {
|
|
95879
95920
|
class: "text-6xl",
|
|
95880
95921
|
color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
|
|
@@ -95888,7 +95929,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
|
|
|
95888
95929
|
])
|
|
95889
95930
|
]))
|
|
95890
95931
|
]),
|
|
95891
|
-
!showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_67$
|
|
95932
|
+
!showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_67$1, [
|
|
95892
95933
|
createVNode(CShortcut, null, {
|
|
95893
95934
|
default: withCtx(() => [
|
|
95894
95935
|
createVNode(CShortcutIcon, { icon: "arrow-up" }),
|
|
@@ -140765,84 +140806,17 @@ const _sfc_main$2G = /* @__PURE__ */ defineComponent({
|
|
|
140765
140806
|
}
|
|
140766
140807
|
});
|
|
140767
140808
|
|
|
140768
|
-
const _hoisted_1$24 = {
|
|
140769
|
-
key: 0,
|
|
140770
|
-
class: "cb-data-charts-raw__controls"
|
|
140771
|
-
};
|
|
140809
|
+
const _hoisted_1$24 = { class: "cb-data-charts-raw" };
|
|
140772
140810
|
const _sfc_main$2F = /* @__PURE__ */ defineComponent({
|
|
140773
140811
|
__name: "DataCharts.raw",
|
|
140774
140812
|
props: {
|
|
140775
|
-
data: {}
|
|
140776
|
-
isPreview: { type: Boolean },
|
|
140777
|
-
isEditMode: { type: Boolean }
|
|
140813
|
+
data: {}
|
|
140778
140814
|
},
|
|
140779
140815
|
setup(__props) {
|
|
140780
|
-
const { t } = useI18n();
|
|
140781
140816
|
const chartRef = ref(null);
|
|
140782
|
-
const containerRef = ref(null);
|
|
140783
140817
|
let chart = null;
|
|
140784
140818
|
const isChartLoaded = ref(false);
|
|
140785
|
-
const isFullscreen = ref(false);
|
|
140786
|
-
const currentChartType = ref("");
|
|
140787
140819
|
const props = __props;
|
|
140788
|
-
const showViewControls = computed(() => {
|
|
140789
|
-
if (props.isPreview || props.isEditMode) return false;
|
|
140790
|
-
return props.data?.view_controls?.enable_fullscreen_btn || props.data?.view_controls?.enable_chart_type_switcher;
|
|
140791
|
-
});
|
|
140792
|
-
const containerStyle = computed(() => {
|
|
140793
|
-
if (isFullscreen.value || props.isPreview) {
|
|
140794
|
-
return {};
|
|
140795
|
-
}
|
|
140796
|
-
return {
|
|
140797
|
-
height: props.data?.chart_height ? `${props.data.chart_height}px` : void 0,
|
|
140798
|
-
width: props.data?.chart_width ? `${props.data.chart_width}%` : void 0,
|
|
140799
|
-
minHeight: props.data?.chart_height ? `${props.data.chart_height}px` : void 0,
|
|
140800
|
-
maxHeight: props.data?.chart_height ? `${props.data.chart_height}px` : void 0
|
|
140801
|
-
};
|
|
140802
|
-
});
|
|
140803
|
-
const chartTypeSwitcherOptions = computed(() => [
|
|
140804
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.bar"), key: "bar" },
|
|
140805
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.line"), key: "line" },
|
|
140806
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.pie"), key: "pie" },
|
|
140807
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.doughnut"), key: "doughnut" },
|
|
140808
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.polarArea"), key: "polarArea" },
|
|
140809
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.radar"), key: "radar" },
|
|
140810
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.scatter"), key: "scatter" }
|
|
140811
|
-
]);
|
|
140812
|
-
function toggleFullscreen() {
|
|
140813
|
-
if (!containerRef.value) return;
|
|
140814
|
-
if (!isFullscreen.value) {
|
|
140815
|
-
isFullscreen.value = true;
|
|
140816
|
-
} else {
|
|
140817
|
-
isFullscreen.value = false;
|
|
140818
|
-
}
|
|
140819
|
-
nextTick(() => {
|
|
140820
|
-
if (chart) {
|
|
140821
|
-
chart.resize();
|
|
140822
|
-
}
|
|
140823
|
-
});
|
|
140824
|
-
}
|
|
140825
|
-
function handleChartTypeChange(newType) {
|
|
140826
|
-
if (!chart || !props.data) return;
|
|
140827
|
-
currentChartType.value = newType;
|
|
140828
|
-
initChart(newType);
|
|
140829
|
-
}
|
|
140830
|
-
function handleKeydown(e) {
|
|
140831
|
-
if (e.key === "Escape" && isFullscreen.value) {
|
|
140832
|
-
isFullscreen.value = false;
|
|
140833
|
-
nextTick(() => {
|
|
140834
|
-
if (chart) {
|
|
140835
|
-
chart.resize();
|
|
140836
|
-
}
|
|
140837
|
-
});
|
|
140838
|
-
}
|
|
140839
|
-
}
|
|
140840
|
-
onMounted(() => {
|
|
140841
|
-
window.addEventListener("keydown", handleKeydown);
|
|
140842
|
-
});
|
|
140843
|
-
onUnmounted(() => {
|
|
140844
|
-
window.removeEventListener("keydown", handleKeydown);
|
|
140845
|
-
});
|
|
140846
140820
|
const sectionListSectionInfo = inject(
|
|
140847
140821
|
"sectionListSectionInfo",
|
|
140848
140822
|
computed(() => null)
|
|
@@ -140873,151 +140847,41 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
|
|
|
140873
140847
|
}
|
|
140874
140848
|
return window._chartJsPromise;
|
|
140875
140849
|
}
|
|
140876
|
-
function
|
|
140877
|
-
const isXYChart = ["scatter", "bubble"].includes(chartType);
|
|
140850
|
+
function processChartData(chartData, context) {
|
|
140878
140851
|
const processedData = {
|
|
140879
140852
|
labels: [],
|
|
140880
140853
|
values: []
|
|
140881
140854
|
};
|
|
140882
|
-
|
|
140855
|
+
chartData.data_points?.forEach((point) => {
|
|
140883
140856
|
let label = point.label;
|
|
140857
|
+
let value = point.value;
|
|
140884
140858
|
try {
|
|
140885
140859
|
if (typeof label === "string") {
|
|
140886
140860
|
label = renderTemplate(label, context);
|
|
140887
140861
|
}
|
|
140888
|
-
if (
|
|
140889
|
-
|
|
140890
|
-
|
|
140891
|
-
|
|
140892
|
-
|
|
140893
|
-
|
|
140894
|
-
|
|
140895
|
-
|
|
140896
|
-
|
|
140897
|
-
if (typeof label === "string" && label.includes(",") && typeof xValue === "string" && xValue.includes(",") && typeof yValue === "string" && yValue.includes(",")) {
|
|
140898
|
-
const labels = label.split(",");
|
|
140899
|
-
const xValues = xValue.split(",");
|
|
140900
|
-
const yValues = yValue.split(",");
|
|
140901
|
-
labels.forEach((l, idx) => {
|
|
140902
|
-
const x = Number(xValues[idx]) || 0;
|
|
140903
|
-
const y = Number(yValues[idx]) || 0;
|
|
140862
|
+
if (typeof value === "string") {
|
|
140863
|
+
value = renderTemplate(value, context);
|
|
140864
|
+
}
|
|
140865
|
+
if (typeof label === "string" && label.includes(",") && typeof value === "string" && value.includes(",")) {
|
|
140866
|
+
const labels = label.split(",");
|
|
140867
|
+
const values = value.split(",");
|
|
140868
|
+
labels.forEach((l, idx) => {
|
|
140869
|
+
const v = values[idx];
|
|
140870
|
+
if (v !== void 0) {
|
|
140904
140871
|
processedData.labels.push(l);
|
|
140905
|
-
|
|
140906
|
-
processedData.values.push({ x, y, r: Math.max(5, Math.abs(y) / 2) });
|
|
140907
|
-
} else {
|
|
140908
|
-
processedData.values.push({ x, y });
|
|
140909
|
-
}
|
|
140910
|
-
});
|
|
140911
|
-
} else {
|
|
140912
|
-
const x = Number(xValue) || 0;
|
|
140913
|
-
const y = Number(yValue) || 0;
|
|
140914
|
-
processedData.labels.push(label);
|
|
140915
|
-
if (chartType === "bubble") {
|
|
140916
|
-
processedData.values.push({ x, y, r: Math.max(5, Math.abs(y) / 2) });
|
|
140917
|
-
} else {
|
|
140918
|
-
processedData.values.push({ x, y });
|
|
140872
|
+
processedData.values.push(Number(v) || 0);
|
|
140919
140873
|
}
|
|
140920
|
-
}
|
|
140874
|
+
});
|
|
140921
140875
|
} else {
|
|
140922
|
-
|
|
140923
|
-
|
|
140924
|
-
value = renderTemplate(value, context);
|
|
140925
|
-
}
|
|
140926
|
-
if (typeof label === "string" && label.includes(",") && typeof value === "string" && value.includes(",")) {
|
|
140927
|
-
const labels = label.split(",");
|
|
140928
|
-
const values = value.split(",");
|
|
140929
|
-
labels.forEach((l, idx) => {
|
|
140930
|
-
const v = values[idx];
|
|
140931
|
-
if (v !== void 0) {
|
|
140932
|
-
processedData.labels.push(l);
|
|
140933
|
-
processedData.values.push(Number(v) || 0);
|
|
140934
|
-
}
|
|
140935
|
-
});
|
|
140936
|
-
} else {
|
|
140937
|
-
processedData.labels.push(label);
|
|
140938
|
-
processedData.values.push(Number(value) || 0);
|
|
140939
|
-
}
|
|
140876
|
+
processedData.labels.push(label);
|
|
140877
|
+
processedData.values.push(Number(value) || 0);
|
|
140940
140878
|
}
|
|
140941
140879
|
} catch (err) {
|
|
140942
140880
|
console.warn("Error processing chart data point:", err);
|
|
140943
140881
|
processedData.labels.push(label);
|
|
140944
|
-
|
|
140945
|
-
processedData.values.push({ x: 0, y: 0 });
|
|
140946
|
-
} else {
|
|
140947
|
-
processedData.values.push(0);
|
|
140948
|
-
}
|
|
140882
|
+
processedData.values.push(Number(value) || 0);
|
|
140949
140883
|
}
|
|
140950
140884
|
});
|
|
140951
|
-
return processedData;
|
|
140952
|
-
}
|
|
140953
|
-
function processChartData(chartData, context) {
|
|
140954
|
-
if (chartData.series && Array.isArray(chartData.series) && chartData.series.length > 0) {
|
|
140955
|
-
const datasets = [];
|
|
140956
|
-
let allLabels = [];
|
|
140957
|
-
const isSingleSeries = chartData.series.length === 1;
|
|
140958
|
-
chartData.series.forEach((series, index) => {
|
|
140959
|
-
const seriesChartType = series.chart_type || chartData.type || "bar";
|
|
140960
|
-
const processedData2 = processSeriesDataPoints(series.data_points || [], seriesChartType, context);
|
|
140961
|
-
if (processedData2.labels.length > allLabels.length) {
|
|
140962
|
-
allLabels = processedData2.labels;
|
|
140963
|
-
}
|
|
140964
|
-
const preBuiltDataset = chartData.data?.datasets?.[index];
|
|
140965
|
-
let backgroundColor2 = preBuiltDataset?.background_color || preBuiltDataset?.backgroundColor;
|
|
140966
|
-
let borderColor2 = preBuiltDataset?.border_color || preBuiltDataset?.borderColor;
|
|
140967
|
-
if (isSingleSeries && Array.isArray(backgroundColor2)) {
|
|
140968
|
-
const resolvedColors = backgroundColor2.map((color, i) => {
|
|
140969
|
-
if (typeof color === "string" && color.startsWith("palette")) {
|
|
140970
|
-
const paletteIndex = parseInt(color.replace("palette", ""));
|
|
140971
|
-
const validIndex = paletteIndex >= 0 ? paletteIndex % palette.value.length : i;
|
|
140972
|
-
return palette.value[validIndex];
|
|
140973
|
-
}
|
|
140974
|
-
return color;
|
|
140975
|
-
});
|
|
140976
|
-
const dataPointsCount = processedData2.values.length;
|
|
140977
|
-
backgroundColor2 = Array.from({ length: dataPointsCount }, (_, i) => resolvedColors[i % resolvedColors.length]);
|
|
140978
|
-
borderColor2 = [...backgroundColor2];
|
|
140979
|
-
} else if (typeof backgroundColor2 === "string" && backgroundColor2.startsWith("palette")) {
|
|
140980
|
-
const paletteIndex = parseInt(backgroundColor2.replace("palette", ""));
|
|
140981
|
-
const validIndex = paletteIndex >= 0 ? paletteIndex % palette.value.length : index;
|
|
140982
|
-
backgroundColor2 = palette.value[validIndex];
|
|
140983
|
-
borderColor2 = backgroundColor2;
|
|
140984
|
-
}
|
|
140985
|
-
const datasetOptions = {
|
|
140986
|
-
label: series.name,
|
|
140987
|
-
data: processedData2.values,
|
|
140988
|
-
backgroundColor: backgroundColor2 || palette.value[index % palette.value.length],
|
|
140989
|
-
borderColor: borderColor2 || palette.value[index % palette.value.length],
|
|
140990
|
-
borderWidth: 1
|
|
140991
|
-
};
|
|
140992
|
-
if (!isSingleSeries) {
|
|
140993
|
-
if (series.chart_type === "area") {
|
|
140994
|
-
datasetOptions.type = "line";
|
|
140995
|
-
datasetOptions.fill = true;
|
|
140996
|
-
datasetOptions.tension = 0.4;
|
|
140997
|
-
} else {
|
|
140998
|
-
datasetOptions.type = series.chart_type;
|
|
140999
|
-
}
|
|
141000
|
-
}
|
|
141001
|
-
if (series.chart_type === "area") {
|
|
141002
|
-
datasetOptions.fill = true;
|
|
141003
|
-
datasetOptions.tension = 0.4;
|
|
141004
|
-
}
|
|
141005
|
-
if (["line", "area"].includes(series.chart_type)) {
|
|
141006
|
-
datasetOptions.tension = 0.4;
|
|
141007
|
-
}
|
|
141008
|
-
datasets.push(datasetOptions);
|
|
141009
|
-
});
|
|
141010
|
-
return {
|
|
141011
|
-
...chartData,
|
|
141012
|
-
type: chartData.type || chartData._primary_chart_type || "bar",
|
|
141013
|
-
data: {
|
|
141014
|
-
...chartData.data,
|
|
141015
|
-
labels: allLabels,
|
|
141016
|
-
datasets
|
|
141017
|
-
}
|
|
141018
|
-
};
|
|
141019
|
-
}
|
|
141020
|
-
const processedData = processSeriesDataPoints(chartData.data_points || [], chartData.type, context);
|
|
141021
140885
|
let backgroundColor = chartData.data?.datasets?.[0]?.background_color || [];
|
|
141022
140886
|
let borderColor = chartData.data?.datasets?.[0]?.border_color || [];
|
|
141023
140887
|
if (chartData.color_scheme_type === "theme" && Array.isArray(backgroundColor)) {
|
|
@@ -141063,7 +140927,7 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
|
|
|
141063
140927
|
}
|
|
141064
140928
|
};
|
|
141065
140929
|
}
|
|
141066
|
-
function initChart(
|
|
140930
|
+
function initChart() {
|
|
141067
140931
|
if (!props.data || !chartRef.value || !isChartLoaded.value) {
|
|
141068
140932
|
return;
|
|
141069
140933
|
}
|
|
@@ -141072,73 +140936,24 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
|
|
|
141072
140936
|
}
|
|
141073
140937
|
const context = props.data.context ?? (!isEmpty(activeCanvas.value?.context) || isCanvas.value ? { ...crmShape.value, ...activeCanvas.value?.context } : crmShape.value);
|
|
141074
140938
|
const processedChartData = processChartData(props.data, context);
|
|
141075
|
-
const chartType = overrideType || currentChartType.value || processedChartData.type || "bar";
|
|
141076
140939
|
if (processedChartData.data?.datasets) {
|
|
141077
140940
|
processedChartData.data.datasets = processedChartData.data.datasets.map((dataset) => {
|
|
141078
|
-
const { background_color, border_color, point_style,
|
|
140941
|
+
const { background_color, border_color, point_style, ...rest } = dataset;
|
|
141079
140942
|
return {
|
|
141080
140943
|
...rest,
|
|
141081
140944
|
backgroundColor: dataset.backgroundColor || background_color || ["#000000"],
|
|
141082
140945
|
borderColor: dataset.borderColor || border_color || ["#000000"],
|
|
141083
|
-
pointStyle: point_style
|
|
141084
|
-
fill,
|
|
141085
|
-
tension,
|
|
141086
|
-
showLine: show_line
|
|
140946
|
+
pointStyle: point_style
|
|
141087
140947
|
};
|
|
141088
140948
|
});
|
|
141089
140949
|
}
|
|
141090
|
-
let scales = processedChartData.options?.scales;
|
|
141091
|
-
if (scales) {
|
|
141092
|
-
const convertedScales = {};
|
|
141093
|
-
if (scales.x) {
|
|
141094
|
-
convertedScales.x = { ...scales.x };
|
|
141095
|
-
}
|
|
141096
|
-
if (scales.y) {
|
|
141097
|
-
convertedScales.y = {
|
|
141098
|
-
...scales.y,
|
|
141099
|
-
beginAtZero: scales.y.begin_at_zero
|
|
141100
|
-
};
|
|
141101
|
-
delete convertedScales.y.begin_at_zero;
|
|
141102
|
-
}
|
|
141103
|
-
if (scales.r) {
|
|
141104
|
-
convertedScales.r = {
|
|
141105
|
-
...scales.r,
|
|
141106
|
-
beginAtZero: scales.r.begin_at_zero,
|
|
141107
|
-
ticks: scales.r.ticks ? {
|
|
141108
|
-
stepSize: scales.r.ticks.step_size
|
|
141109
|
-
} : void 0
|
|
141110
|
-
};
|
|
141111
|
-
}
|
|
141112
|
-
scales = convertedScales;
|
|
141113
|
-
}
|
|
141114
|
-
if (["pie", "doughnut", "polarArea"].includes(chartType)) {
|
|
141115
|
-
scales = void 0;
|
|
141116
|
-
}
|
|
141117
|
-
const tooltipCallbacks = {};
|
|
141118
|
-
if (props.data.percent_display) {
|
|
141119
|
-
tooltipCallbacks.label = function(context2) {
|
|
141120
|
-
const label = context2.dataset.label || "";
|
|
141121
|
-
const value = context2.raw;
|
|
141122
|
-
if (typeof value === "number" && value >= 0 && value <= 1) {
|
|
141123
|
-
return `${label}${label ? ": " : ""}${(value * 100).toFixed(2)}%`;
|
|
141124
|
-
}
|
|
141125
|
-
return `${label}${label ? ": " : ""}${value}`;
|
|
141126
|
-
};
|
|
141127
|
-
}
|
|
141128
140950
|
const chartConfig = {
|
|
141129
140951
|
...processedChartData,
|
|
141130
|
-
type:
|
|
140952
|
+
type: processedChartData.type,
|
|
141131
140953
|
options: merge$1({}, processedChartData.options, {
|
|
141132
140954
|
responsive: true,
|
|
141133
140955
|
maintainAspectRatio: false,
|
|
141134
|
-
indexAxis: processedChartData.options?.index_axis
|
|
141135
|
-
scales,
|
|
141136
|
-
plugins: {
|
|
141137
|
-
...processedChartData.options?.plugins,
|
|
141138
|
-
tooltip: props.data.percent_display ? {
|
|
141139
|
-
callbacks: tooltipCallbacks
|
|
141140
|
-
} : void 0
|
|
141141
|
-
}
|
|
140956
|
+
indexAxis: processedChartData.options?.index_axis
|
|
141142
140957
|
})
|
|
141143
140958
|
};
|
|
141144
140959
|
chart = new window.Chart(chartRef.value, chartConfig);
|
|
@@ -141158,164 +140973,84 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
|
|
|
141158
140973
|
isChartLoaded.value = true;
|
|
141159
140974
|
});
|
|
141160
140975
|
return (_ctx, _cache) => {
|
|
141161
|
-
return openBlock(), createElementBlock("div",
|
|
141162
|
-
ref_key: "containerRef",
|
|
141163
|
-
ref: containerRef,
|
|
141164
|
-
class: normalizeClass(["cb-data-charts-raw", { "is-fullscreen": isFullscreen.value }]),
|
|
141165
|
-
style: normalizeStyle(containerStyle.value)
|
|
141166
|
-
}, [
|
|
141167
|
-
showViewControls.value ? (openBlock(), createElementBlock("div", _hoisted_1$24, [
|
|
141168
|
-
props.data?.view_controls?.enable_chart_type_switcher ? (openBlock(), createBlock(unref(NDropdown), {
|
|
141169
|
-
key: 0,
|
|
141170
|
-
options: chartTypeSwitcherOptions.value,
|
|
141171
|
-
trigger: "click",
|
|
141172
|
-
onSelect: handleChartTypeChange
|
|
141173
|
-
}, {
|
|
141174
|
-
default: withCtx(() => [
|
|
141175
|
-
createVNode(CButton, {
|
|
141176
|
-
quaternary: "",
|
|
141177
|
-
size: "small"
|
|
141178
|
-
}, {
|
|
141179
|
-
icon: withCtx(() => [
|
|
141180
|
-
createVNode(CIcon, { icon: "chart-bar" })
|
|
141181
|
-
]),
|
|
141182
|
-
_: 1
|
|
141183
|
-
})
|
|
141184
|
-
]),
|
|
141185
|
-
_: 1
|
|
141186
|
-
}, 8, ["options"])) : createCommentVNode("", true),
|
|
141187
|
-
props.data?.view_controls?.enable_fullscreen_btn ? (openBlock(), createBlock(CButton, {
|
|
141188
|
-
key: 1,
|
|
141189
|
-
quaternary: "",
|
|
141190
|
-
size: "small",
|
|
141191
|
-
onClick: toggleFullscreen
|
|
141192
|
-
}, {
|
|
141193
|
-
icon: withCtx(() => [
|
|
141194
|
-
createVNode(CIcon, {
|
|
141195
|
-
icon: isFullscreen.value ? "compress" : "expand"
|
|
141196
|
-
}, null, 8, ["icon"])
|
|
141197
|
-
]),
|
|
141198
|
-
_: 1
|
|
141199
|
-
})) : createCommentVNode("", true)
|
|
141200
|
-
])) : createCommentVNode("", true),
|
|
140976
|
+
return openBlock(), createElementBlock("div", _hoisted_1$24, [
|
|
141201
140977
|
createElementVNode("canvas", {
|
|
141202
140978
|
ref_key: "chartRef",
|
|
141203
140979
|
ref: chartRef,
|
|
141204
140980
|
class: "w-full h-full"
|
|
141205
140981
|
}, null, 512)
|
|
141206
|
-
]
|
|
140982
|
+
]);
|
|
141207
140983
|
};
|
|
141208
140984
|
}
|
|
141209
140985
|
});
|
|
141210
140986
|
|
|
141211
|
-
const RawDataCharts = /* @__PURE__ */ _export_sfc(_sfc_main$2F, [["__scopeId", "data-v-
|
|
141212
|
-
|
|
141213
|
-
const STANDALONE_CHART_TYPES = ["pie", "doughnut", "radar", "polarArea"];
|
|
141214
|
-
const MIXABLE_CHART_TYPES = ["bar", "line", "scatter", "bubble", "area"];
|
|
141215
|
-
const XY_CHART_TYPES = ["scatter", "bubble"];
|
|
140987
|
+
const RawDataCharts = /* @__PURE__ */ _export_sfc(_sfc_main$2F, [["__scopeId", "data-v-e71330a8"]]);
|
|
141216
140988
|
|
|
141217
140989
|
const _hoisted_1$23 = { class: "flex gap-4 h-[calc(80vh-120px)] w-full" };
|
|
141218
140990
|
const _hoisted_2$1t = { class: "cb-data-charts-settings__card overflow-auto flex-1" };
|
|
141219
140991
|
const _hoisted_3$17 = { class: "flex flex-col h-full" };
|
|
141220
140992
|
const _hoisted_4$X = { class: "flex-grow overflow-y-auto overflow-x-hidden" };
|
|
141221
|
-
const _hoisted_5$O = { class: "
|
|
141222
|
-
const _hoisted_6$H = { class: "
|
|
141223
|
-
const _hoisted_7$v =
|
|
141224
|
-
const _hoisted_8$q = { class: "
|
|
141225
|
-
const _hoisted_9$m =
|
|
141226
|
-
const _hoisted_10$h =
|
|
141227
|
-
const _hoisted_11$f = {
|
|
140993
|
+
const _hoisted_5$O = { class: "mb-4" };
|
|
140994
|
+
const _hoisted_6$H = { class: "block mb-2" };
|
|
140995
|
+
const _hoisted_7$v = { class: "mb-4" };
|
|
140996
|
+
const _hoisted_8$q = { class: "block mb-2" };
|
|
140997
|
+
const _hoisted_9$m = { class: "mb-4" };
|
|
140998
|
+
const _hoisted_10$h = { class: "block mb-2" };
|
|
140999
|
+
const _hoisted_11$f = { class: "mb-4" };
|
|
141000
|
+
const _hoisted_12$b = { class: "block mb-2" };
|
|
141001
|
+
const _hoisted_13$a = {
|
|
141228
141002
|
key: 0,
|
|
141229
141003
|
class: "mb-4"
|
|
141230
141004
|
};
|
|
141231
|
-
const _hoisted_12$b = { class: "block mb-2" };
|
|
141232
|
-
const _hoisted_13$a = { class: "mb-4" };
|
|
141233
141005
|
const _hoisted_14$9 = { class: "block mb-2" };
|
|
141234
141006
|
const _hoisted_15$8 = { class: "mb-4" };
|
|
141235
|
-
const _hoisted_16$8 = { class: "
|
|
141236
|
-
const _hoisted_17$7 = {
|
|
141237
|
-
|
|
141238
|
-
|
|
141239
|
-
|
|
141240
|
-
const
|
|
141241
|
-
const
|
|
141242
|
-
const
|
|
141243
|
-
const
|
|
141007
|
+
const _hoisted_16$8 = { class: "block mb-2" };
|
|
141008
|
+
const _hoisted_17$7 = {
|
|
141009
|
+
key: 1,
|
|
141010
|
+
class: "mb-4"
|
|
141011
|
+
};
|
|
141012
|
+
const _hoisted_18$6 = { class: "block mb-2" };
|
|
141013
|
+
const _hoisted_19$6 = { class: "mb-4" };
|
|
141014
|
+
const _hoisted_20$5 = { class: "flex justify-between items-center mb-2" };
|
|
141015
|
+
const _hoisted_21$5 = { class: "block" };
|
|
141016
|
+
const _hoisted_22$3 = { class: "flex gap-2 flex-1" };
|
|
141017
|
+
const _hoisted_23$3 = ["onClick"];
|
|
141018
|
+
const _hoisted_24$3 = { class: "p-4 min-w-[400px] max-h-[400px]" };
|
|
141019
|
+
const _hoisted_25$3 = { class: "flex gap-4 h-full" };
|
|
141020
|
+
const _hoisted_26$3 = { class: "flex-1 flex flex-col" };
|
|
141021
|
+
const _hoisted_27$3 = { class: "text-sm mb-2" };
|
|
141022
|
+
const _hoisted_28$3 = { class: "overflow-auto" };
|
|
141023
|
+
const _hoisted_29$3 = {
|
|
141244
141024
|
key: 0,
|
|
141245
141025
|
class: "flex-1 border-l pl-4"
|
|
141246
141026
|
};
|
|
141247
|
-
const
|
|
141248
|
-
const
|
|
141249
|
-
const
|
|
141250
|
-
const
|
|
141251
|
-
const
|
|
141252
|
-
const
|
|
141253
|
-
const
|
|
141254
|
-
const
|
|
141255
|
-
const
|
|
141256
|
-
const
|
|
141257
|
-
const
|
|
141027
|
+
const _hoisted_30$3 = { class: "text-sm font-medium mb-2" };
|
|
141028
|
+
const _hoisted_31$3 = { class: "flex flex-col gap-2" };
|
|
141029
|
+
const _hoisted_32$3 = { class: "block mb-1 text-sm" };
|
|
141030
|
+
const _hoisted_33$3 = { class: "block mb-1 text-sm" };
|
|
141031
|
+
const _hoisted_34$3 = ["onClick"];
|
|
141032
|
+
const _hoisted_35$3 = { class: "p-4 min-w-[400px] max-h-[400px]" };
|
|
141033
|
+
const _hoisted_36$3 = { class: "flex gap-4 h-full" };
|
|
141034
|
+
const _hoisted_37$3 = { class: "flex-1 flex flex-col" };
|
|
141035
|
+
const _hoisted_38$3 = { class: "text-sm mb-2" };
|
|
141036
|
+
const _hoisted_39$3 = { class: "overflow-auto" };
|
|
141037
|
+
const _hoisted_40$3 = {
|
|
141258
141038
|
key: 0,
|
|
141259
141039
|
class: "flex-1 border-l pl-4"
|
|
141260
141040
|
};
|
|
141261
|
-
const
|
|
141262
|
-
const
|
|
141263
|
-
const
|
|
141264
|
-
const
|
|
141265
|
-
const
|
|
141266
|
-
const
|
|
141267
|
-
const
|
|
141268
|
-
const
|
|
141269
|
-
const
|
|
141270
|
-
const _hoisted_45$3 = { class: "text-sm font-semibold mb-3 mt-6 text-gray-600 dark:text-gray-400 uppercase tracking-wide border-t border-gray-200 dark:border-gray-700 pt-6" };
|
|
141271
|
-
const _hoisted_46$3 = { class: "mb-4" };
|
|
141272
|
-
const _hoisted_47$3 = { class: "block mb-2" };
|
|
141273
|
-
const _hoisted_48$3 = { class: "mb-4" };
|
|
141274
|
-
const _hoisted_49$3 = { class: "block mb-2" };
|
|
141275
|
-
const _hoisted_50$3 = { class: "mb-4" };
|
|
141276
|
-
const _hoisted_51$2 = { class: "block mb-2" };
|
|
141277
|
-
const _hoisted_52$2 = { class: "mb-4" };
|
|
141278
|
-
const _hoisted_53$2 = { class: "block mb-2" };
|
|
141279
|
-
const _hoisted_54$1 = {
|
|
141280
|
-
key: 2,
|
|
141281
|
-
class: "mb-4"
|
|
141282
|
-
};
|
|
141283
|
-
const _hoisted_55$1 = { class: "block mb-2" };
|
|
141284
|
-
const _hoisted_56$1 = {
|
|
141285
|
-
key: 3,
|
|
141286
|
-
class: "mb-4"
|
|
141287
|
-
};
|
|
141288
|
-
const _hoisted_57$1 = { class: "block mb-2" };
|
|
141289
|
-
const _hoisted_58$1 = { class: "mb-4" };
|
|
141290
|
-
const _hoisted_59$1 = { class: "block mb-2" };
|
|
141291
|
-
const _hoisted_60$1 = { class: "mb-4" };
|
|
141292
|
-
const _hoisted_61$1 = { class: "block mb-2" };
|
|
141293
|
-
const _hoisted_62$1 = { class: "mb-4" };
|
|
141294
|
-
const _hoisted_63$1 = { class: "block mb-2" };
|
|
141295
|
-
const _hoisted_64$1 = { class: "flex items-center gap-2" };
|
|
141296
|
-
const _hoisted_65$1 = { class: "text-sm text-gray-500" };
|
|
141297
|
-
const _hoisted_66$1 = { class: "mb-4" };
|
|
141298
|
-
const _hoisted_67$1 = { class: "block mb-2" };
|
|
141299
|
-
const _hoisted_68$1 = { class: "flex flex-col gap-2" };
|
|
141300
|
-
const _hoisted_69 = { class: "flex items-center gap-2" };
|
|
141301
|
-
const _hoisted_70 = { class: "text-sm" };
|
|
141302
|
-
const _hoisted_71 = { class: "text-sm" };
|
|
141303
|
-
const _hoisted_72 = { class: "flex items-center gap-2" };
|
|
141304
|
-
const _hoisted_73 = { class: "text-sm" };
|
|
141305
|
-
const _hoisted_74 = { class: "mb-4" };
|
|
141306
|
-
const _hoisted_75 = { class: "block mb-2" };
|
|
141307
|
-
const _hoisted_76 = { class: "flex flex-col gap-3" };
|
|
141308
|
-
const _hoisted_77 = { class: "flex items-center gap-2" };
|
|
141309
|
-
const _hoisted_78 = { class: "text-sm w-16" };
|
|
141310
|
-
const _hoisted_79 = { class: "flex items-center gap-2" };
|
|
141311
|
-
const _hoisted_80 = { class: "text-sm w-16" };
|
|
141312
|
-
const _hoisted_81 = { class: "cb-data-charts-settings__preview flex-1 border-l border-[#eee] pl-4" };
|
|
141313
|
-
const _hoisted_82 = { class: "text-sm font-medium mb-4" };
|
|
141314
|
-
const _hoisted_83 = {
|
|
141041
|
+
const _hoisted_41$3 = { class: "flex flex-col gap-2" };
|
|
141042
|
+
const _hoisted_42$3 = { class: "flex justify-center mt-2" };
|
|
141043
|
+
const _hoisted_43$3 = { class: "mb-4" };
|
|
141044
|
+
const _hoisted_44$3 = { class: "block mb-2" };
|
|
141045
|
+
const _hoisted_45$3 = { class: "mb-4" };
|
|
141046
|
+
const _hoisted_46$3 = { class: "block mb-2" };
|
|
141047
|
+
const _hoisted_47$3 = { class: "cb-data-charts-settings__preview flex-1 border-l border-[#eee] pl-4" };
|
|
141048
|
+
const _hoisted_48$3 = { class: "text-sm font-medium mb-4" };
|
|
141049
|
+
const _hoisted_49$3 = {
|
|
141315
141050
|
class: "preview-container",
|
|
141316
141051
|
style: { "height": "300px" }
|
|
141317
141052
|
};
|
|
141318
|
-
const
|
|
141053
|
+
const _hoisted_50$3 = { class: "flex justify-between gap-4" };
|
|
141319
141054
|
const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
141320
141055
|
__name: "DataCharts.settings",
|
|
141321
141056
|
props: {
|
|
@@ -141329,84 +141064,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141329
141064
|
const { setComponentEditMode, updateNodeDataById } = useCanvas$1();
|
|
141330
141065
|
const { crmShape } = useCrmShape();
|
|
141331
141066
|
const { palette } = useCanvasTheme$1();
|
|
141332
|
-
|
|
141333
|
-
function generateSeriesId() {
|
|
141334
|
-
return `series_${Date.now()}_${seriesIdCounter++}`;
|
|
141335
|
-
}
|
|
141336
|
-
function convertSavedSeriesToRuntime(savedSeries) {
|
|
141337
|
-
return {
|
|
141338
|
-
id: savedSeries.id || generateSeriesId(),
|
|
141339
|
-
name: savedSeries.name || "Series 1",
|
|
141340
|
-
chartType: savedSeries.chart_type || "bar",
|
|
141341
|
-
dataPoints: (savedSeries.data_points || []).map((dp) => ({
|
|
141342
|
-
label: dp.label || "",
|
|
141343
|
-
value: dp.value || "",
|
|
141344
|
-
xValue: dp.x_value ?? "",
|
|
141345
|
-
yValue: dp.y_value ?? "",
|
|
141346
|
-
dynamicValue: dp.dynamic_value,
|
|
141347
|
-
dynamicXValue: dp.dynamic_x_value,
|
|
141348
|
-
dynamicYValue: dp.dynamic_y_value,
|
|
141349
|
-
arrayConfig: dp.array_config
|
|
141350
|
-
}))
|
|
141351
|
-
};
|
|
141352
|
-
}
|
|
141353
|
-
function convertLegacyToSeries() {
|
|
141354
|
-
const chartTypeValue = props.data?.type ?? props.data?._primary_chart_type ?? "bar";
|
|
141355
|
-
const dataPoints = props.data?.data_points && Array.isArray(props.data.data_points) ? props.data.data_points.map((dp) => ({
|
|
141356
|
-
label: dp.label,
|
|
141357
|
-
value: dp.value,
|
|
141358
|
-
xValue: dp.x_value ?? "",
|
|
141359
|
-
yValue: dp.y_value ?? "",
|
|
141360
|
-
dynamicValue: dp.dynamic_value,
|
|
141361
|
-
dynamicXValue: dp.dynamic_x_value,
|
|
141362
|
-
dynamicYValue: dp.dynamic_y_value,
|
|
141363
|
-
arrayConfig: dp.array_config
|
|
141364
|
-
})) : props.data?.data?.labels ? props.data.data.labels.map((label, index) => ({
|
|
141365
|
-
label: String(label),
|
|
141366
|
-
value: String(props.data?.data?.datasets?.[0]?.data?.[index] ?? 0),
|
|
141367
|
-
xValue: "",
|
|
141368
|
-
yValue: ""
|
|
141369
|
-
})) : [];
|
|
141370
|
-
return [
|
|
141371
|
-
{
|
|
141372
|
-
id: generateSeriesId(),
|
|
141373
|
-
name: t("canvasUI.canvasBuilder.dataCharts.series") + " 1",
|
|
141374
|
-
chartType: chartTypeValue,
|
|
141375
|
-
dataPoints
|
|
141376
|
-
}
|
|
141377
|
-
];
|
|
141378
|
-
}
|
|
141379
|
-
const seriesList = ref(
|
|
141380
|
-
props.data?.series && Array.isArray(props.data.series) && props.data.series.length > 0 ? props.data.series.map((s) => convertSavedSeriesToRuntime(s)) : convertLegacyToSeries()
|
|
141381
|
-
);
|
|
141382
|
-
const activeSeriesIndex = ref(0);
|
|
141383
|
-
const activeSeries = computed(() => seriesList.value[activeSeriesIndex.value]);
|
|
141384
|
-
const isActiveSeriesXYChart = computed(() => XY_CHART_TYPES.includes(activeSeries.value?.chartType));
|
|
141385
|
-
const isPrimaryStandalone = computed(() => STANDALONE_CHART_TYPES.includes(seriesList.value[0]?.chartType));
|
|
141386
|
-
const isMultiSeries = computed(() => seriesList.value.length > 1);
|
|
141387
|
-
const canAddSeries = computed(() => !isPrimaryStandalone.value);
|
|
141388
|
-
const availableChartTypeOptions = computed(() => {
|
|
141389
|
-
const allOptions = [
|
|
141390
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.bar"), value: "bar" },
|
|
141391
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.line"), value: "line" },
|
|
141392
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.pie"), value: "pie" },
|
|
141393
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.doughnut"), value: "doughnut" },
|
|
141394
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.polarArea"), value: "polarArea" },
|
|
141395
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.radar"), value: "radar" },
|
|
141396
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.scatter"), value: "scatter" },
|
|
141397
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.bubble"), value: "bubble" },
|
|
141398
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.types.area"), value: "area" }
|
|
141399
|
-
];
|
|
141400
|
-
if (activeSeriesIndex.value === 0 && seriesList.value.length > 1) {
|
|
141401
|
-
return allOptions.filter((opt) => MIXABLE_CHART_TYPES.includes(opt.value));
|
|
141402
|
-
}
|
|
141403
|
-
if (activeSeriesIndex.value > 0) {
|
|
141404
|
-
return allOptions.filter((opt) => MIXABLE_CHART_TYPES.includes(opt.value));
|
|
141405
|
-
}
|
|
141406
|
-
return allOptions;
|
|
141407
|
-
});
|
|
141408
|
-
const chartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
|
|
141409
|
-
const primaryChartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
|
|
141067
|
+
const chartType = ref(props.data?.type ?? "bar");
|
|
141410
141068
|
const backgroundColor = props.data?.data?.datasets?.[0]?.background_color;
|
|
141411
141069
|
const colorSchemeType = ref(props.data?.color_scheme_type ?? "theme");
|
|
141412
141070
|
const chartColors = ref([]);
|
|
@@ -141435,16 +141093,24 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141435
141093
|
const chartTitle = ref(props.data?.options?.plugins?.title?.text ?? "");
|
|
141436
141094
|
const legendPosition = ref(props.data?.options?.plugins?.legend?.position ?? "top");
|
|
141437
141095
|
const enableAnimation = ref((props.data?.options?.animation?.duration ?? 0) > 0);
|
|
141096
|
+
const dataPoints = ref(
|
|
141097
|
+
props.data?.data_points && Array.isArray(props.data.data_points) ? [...props.data.data_points] : props.data?.data?.labels ? props.data.data.labels.map((label, index) => ({
|
|
141098
|
+
label: String(label),
|
|
141099
|
+
value: String(props.data?.data?.datasets?.[0]?.data?.[index] ?? 0)
|
|
141100
|
+
})) : []
|
|
141101
|
+
);
|
|
141438
141102
|
const xAxisLabel = ref(props.data?.options?.scales?.x?.title?.text ?? "");
|
|
141439
141103
|
const yAxisLabel = ref(props.data?.options?.scales?.y?.title?.text ?? "");
|
|
141440
141104
|
const orientation = ref(props.data?.options?.index_axis ?? "x");
|
|
141441
141105
|
const pointStyle = ref(props.data?.data?.datasets?.[0]?.point_style ?? "circle");
|
|
141442
|
-
const
|
|
141443
|
-
|
|
141444
|
-
|
|
141445
|
-
|
|
141446
|
-
|
|
141447
|
-
|
|
141106
|
+
const chartTypeOptions = [
|
|
141107
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.types.bar"), value: "bar" },
|
|
141108
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.types.line"), value: "line" },
|
|
141109
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.types.pie"), value: "pie" },
|
|
141110
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.types.doughnut"), value: "doughnut" },
|
|
141111
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.types.polarArea"), value: "polarArea" },
|
|
141112
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.types.radar"), value: "radar" }
|
|
141113
|
+
];
|
|
141448
141114
|
const legendPositionOptions = [
|
|
141449
141115
|
{ label: t("canvasUI.canvasBuilder.dataCharts.legendPositions.none"), value: "none" },
|
|
141450
141116
|
{ label: t("canvasUI.canvasBuilder.dataCharts.legendPositions.top"), value: "top" },
|
|
@@ -141453,8 +141119,8 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141453
141119
|
{ label: t("canvasUI.canvasBuilder.dataCharts.legendPositions.right"), value: "right" }
|
|
141454
141120
|
];
|
|
141455
141121
|
const orientationOptions = [
|
|
141456
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.orientations.horizontal"), value: "
|
|
141457
|
-
{ label: t("canvasUI.canvasBuilder.dataCharts.orientations.vertical"), value: "
|
|
141122
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.orientations.horizontal"), value: "x" },
|
|
141123
|
+
{ label: t("canvasUI.canvasBuilder.dataCharts.orientations.vertical"), value: "y" }
|
|
141458
141124
|
];
|
|
141459
141125
|
const pointStyleOptions = [
|
|
141460
141126
|
{ label: t("canvasUI.canvasBuilder.dataCharts.pointStyles.circle"), value: "circle" },
|
|
@@ -141464,18 +141130,12 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141464
141130
|
{ label: t("canvasUI.canvasBuilder.dataCharts.pointStyles.star"), value: "star" },
|
|
141465
141131
|
{ label: t("canvasUI.canvasBuilder.dataCharts.pointStyles.triangle"), value: "triangle" }
|
|
141466
141132
|
];
|
|
141467
|
-
|
|
141468
|
-
|
|
141469
|
-
|
|
141470
|
-
|
|
141471
|
-
|
|
141472
|
-
|
|
141473
|
-
"--n-color-focus": themeVars.value.error2,
|
|
141474
|
-
"--n-color-hover": themeVars.value.error2,
|
|
141475
|
-
"--n-color-disabled": themeVars.value.error2,
|
|
141476
|
-
"--n-color-pressed": themeVars.value.error2
|
|
141477
|
-
}));
|
|
141478
|
-
const activePopoverField = ref(null);
|
|
141133
|
+
function getColors() {
|
|
141134
|
+
if (colorSchemeType.value === "theme") {
|
|
141135
|
+
return chartColors.value.map((index) => `palette${index}`);
|
|
141136
|
+
}
|
|
141137
|
+
return chartColors.value;
|
|
141138
|
+
}
|
|
141479
141139
|
function updateChartColors(newColors) {
|
|
141480
141140
|
if (colorSchemeType.value === "theme") {
|
|
141481
141141
|
chartColors.value = newColors.map((color, i) => {
|
|
@@ -141503,54 +141163,17 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141503
141163
|
}
|
|
141504
141164
|
}
|
|
141505
141165
|
);
|
|
141506
|
-
function closePopover() {
|
|
141507
|
-
activePopoverPoint.value = null;
|
|
141508
|
-
activePopoverField.value = null;
|
|
141509
|
-
}
|
|
141510
|
-
function addSeries() {
|
|
141511
|
-
if (!canAddSeries.value) return;
|
|
141512
|
-
const newIndex = seriesList.value.length;
|
|
141513
|
-
const newSeries = {
|
|
141514
|
-
id: generateSeriesId(),
|
|
141515
|
-
name: `${t("canvasUI.canvasBuilder.dataCharts.series")} ${newIndex + 1}`,
|
|
141516
|
-
chartType: seriesList.value[0].chartType,
|
|
141517
|
-
// Default to same type as first series
|
|
141518
|
-
dataPoints: []
|
|
141519
|
-
};
|
|
141520
|
-
seriesList.value.push(newSeries);
|
|
141521
|
-
activeSeriesIndex.value = newIndex;
|
|
141522
|
-
updatePreview();
|
|
141523
|
-
}
|
|
141524
|
-
function removeSeries(index) {
|
|
141525
|
-
if (index === 0 || index >= seriesList.value.length) return;
|
|
141526
|
-
seriesList.value.splice(index, 1);
|
|
141527
|
-
if (activeSeriesIndex.value >= seriesList.value.length) {
|
|
141528
|
-
activeSeriesIndex.value = seriesList.value.length - 1;
|
|
141529
|
-
}
|
|
141530
|
-
updatePreview();
|
|
141531
|
-
}
|
|
141532
|
-
function onChartTypeChange(newType) {
|
|
141533
|
-
if (activeSeriesIndex.value === 0 && STANDALONE_CHART_TYPES.includes(newType)) {
|
|
141534
|
-
seriesList.value = [seriesList.value[0]];
|
|
141535
|
-
}
|
|
141536
|
-
updatePreview();
|
|
141537
|
-
}
|
|
141538
141166
|
function addDataPoint() {
|
|
141539
|
-
|
|
141167
|
+
dataPoints.value.push({
|
|
141540
141168
|
label: "",
|
|
141541
|
-
xValue: "",
|
|
141542
|
-
yValue: "",
|
|
141543
141169
|
value: ""
|
|
141544
141170
|
});
|
|
141545
141171
|
}
|
|
141546
141172
|
function removeDataPoint(index) {
|
|
141547
|
-
|
|
141173
|
+
dataPoints.value.splice(index, 1);
|
|
141548
141174
|
}
|
|
141549
141175
|
function removeAllDataPoints() {
|
|
141550
|
-
|
|
141551
|
-
}
|
|
141552
|
-
function isArrayOrObject(value) {
|
|
141553
|
-
return Array.isArray(value) || typeof value === "object" && value !== null;
|
|
141176
|
+
dataPoints.value = [];
|
|
141554
141177
|
}
|
|
141555
141178
|
function getFieldOptions(data) {
|
|
141556
141179
|
if (!data || typeof data !== "object") return [];
|
|
@@ -141561,43 +141184,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141561
141184
|
value: field
|
|
141562
141185
|
}));
|
|
141563
141186
|
}
|
|
141564
|
-
function updateDynamicValueExpression(point) {
|
|
141565
|
-
if (!point.selectedValue || !point.arrayConfig?.labelField || !point.arrayConfig?.valueField) {
|
|
141566
|
-
return;
|
|
141567
|
-
}
|
|
141568
|
-
const path = point.dynamicValue?.path;
|
|
141569
|
-
if (!path) {
|
|
141570
|
-
return;
|
|
141571
|
-
}
|
|
141572
|
-
point.label = `{{#each ${path}}}{{lookup this "${point.arrayConfig.labelField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
|
|
141573
|
-
point.value = `{{#each ${path}}}{{lookup this "${point.arrayConfig.valueField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
|
|
141574
|
-
point.dynamicValue = {
|
|
141575
|
-
path,
|
|
141576
|
-
value: point.value
|
|
141577
|
-
};
|
|
141578
|
-
closePopover();
|
|
141579
|
-
}
|
|
141580
|
-
function updateXYDynamicValueExpression(point) {
|
|
141581
|
-
if (!point.selectedXValue || !point.arrayConfig?.labelField || !point.arrayConfig?.xField || !point.arrayConfig?.yField) {
|
|
141582
|
-
return;
|
|
141583
|
-
}
|
|
141584
|
-
const path = point.dynamicXValue?.path;
|
|
141585
|
-
if (!path) {
|
|
141586
|
-
return;
|
|
141587
|
-
}
|
|
141588
|
-
point.label = `{{#each ${path}}}{{lookup this "${point.arrayConfig.labelField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
|
|
141589
|
-
point.xValue = `{{#each ${path}}}{{lookup this "${point.arrayConfig.xField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
|
|
141590
|
-
point.yValue = `{{#each ${path}}}{{lookup this "${point.arrayConfig.yField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
|
|
141591
|
-
point.dynamicXValue = {
|
|
141592
|
-
path,
|
|
141593
|
-
value: point.xValue
|
|
141594
|
-
};
|
|
141595
|
-
point.dynamicYValue = {
|
|
141596
|
-
path,
|
|
141597
|
-
value: point.yValue
|
|
141598
|
-
};
|
|
141599
|
-
closePopover();
|
|
141600
|
-
}
|
|
141601
141187
|
const dynamicValueTreeData = computed(() => {
|
|
141602
141188
|
function processObject(obj, path = []) {
|
|
141603
141189
|
const result = [];
|
|
@@ -141648,49 +141234,24 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141648
141234
|
return h("span", { class: "text-sm" }, { default: () => info.option.label || "" });
|
|
141649
141235
|
}
|
|
141650
141236
|
const activePopoverPoint = ref(null);
|
|
141651
|
-
function handleDynamicValueClick(point
|
|
141652
|
-
if (activePopoverPoint.value === point
|
|
141653
|
-
|
|
141237
|
+
function handleDynamicValueClick(point) {
|
|
141238
|
+
if (activePopoverPoint.value === point) {
|
|
141239
|
+
activePopoverPoint.value = null;
|
|
141654
141240
|
} else {
|
|
141655
|
-
|
|
141656
|
-
|
|
141657
|
-
|
|
141658
|
-
|
|
141659
|
-
point.value = "";
|
|
141660
|
-
} else if (field === "x") {
|
|
141661
|
-
point.selectedXValue = void 0;
|
|
141662
|
-
point.dynamicXValue = void 0;
|
|
141663
|
-
point.dynamicYValue = void 0;
|
|
141664
|
-
point.arrayConfig = void 0;
|
|
141665
|
-
point.xValue = "";
|
|
141666
|
-
point.yValue = "";
|
|
141667
|
-
point.label = "";
|
|
141668
|
-
} else if (field === "y") {
|
|
141669
|
-
point.selectedYValue = void 0;
|
|
141670
|
-
point.dynamicYValue = void 0;
|
|
141671
|
-
point.yValue = "";
|
|
141672
|
-
}
|
|
141241
|
+
point.selectedValue = void 0;
|
|
141242
|
+
point.dynamicValue = void 0;
|
|
141243
|
+
point.arrayConfig = void 0;
|
|
141244
|
+
point.value = "";
|
|
141673
141245
|
activePopoverPoint.value = point;
|
|
141674
|
-
activePopoverField.value = field;
|
|
141675
141246
|
}
|
|
141676
141247
|
}
|
|
141677
|
-
function handleDynamicValueSelect(keys, point
|
|
141248
|
+
function handleDynamicValueSelect(keys, point) {
|
|
141678
141249
|
const selectedKey = keys[0];
|
|
141679
141250
|
if (!selectedKey) {
|
|
141680
|
-
|
|
141681
|
-
|
|
141682
|
-
|
|
141683
|
-
|
|
141684
|
-
} else if (field === "x") {
|
|
141685
|
-
point.dynamicXValue = void 0;
|
|
141686
|
-
point.selectedXValue = void 0;
|
|
141687
|
-
point.xValue = "";
|
|
141688
|
-
} else if (field === "y") {
|
|
141689
|
-
point.dynamicYValue = void 0;
|
|
141690
|
-
point.selectedYValue = void 0;
|
|
141691
|
-
point.yValue = "";
|
|
141692
|
-
}
|
|
141693
|
-
closePopover();
|
|
141251
|
+
point.dynamicValue = void 0;
|
|
141252
|
+
point.selectedValue = void 0;
|
|
141253
|
+
point.value = "";
|
|
141254
|
+
activePopoverPoint.value = null;
|
|
141694
141255
|
return;
|
|
141695
141256
|
}
|
|
141696
141257
|
const pathParts = selectedKey.split(/\.(?![^[]*])/) || [];
|
|
@@ -141705,59 +141266,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141705
141266
|
currentValue = currentValue?.[part];
|
|
141706
141267
|
}
|
|
141707
141268
|
}
|
|
141708
|
-
if (field === "x") {
|
|
141709
|
-
point.selectedXValue = currentValue;
|
|
141710
|
-
if (Array.isArray(currentValue) || typeof currentValue === "object" && currentValue !== null) {
|
|
141711
|
-
point.arrayConfig = {
|
|
141712
|
-
labelField: "",
|
|
141713
|
-
valueField: "",
|
|
141714
|
-
xField: "",
|
|
141715
|
-
yField: ""
|
|
141716
|
-
};
|
|
141717
|
-
point.dynamicXValue = {
|
|
141718
|
-
path: selectedKey,
|
|
141719
|
-
value: ""
|
|
141720
|
-
};
|
|
141721
|
-
return;
|
|
141722
|
-
}
|
|
141723
|
-
const rootPart = pathParts[0];
|
|
141724
|
-
let expression = "";
|
|
141725
|
-
if (pathParts.length === 1) {
|
|
141726
|
-
expression = `{{${rootPart}}}`;
|
|
141727
|
-
} else {
|
|
141728
|
-
const restOfPath = pathParts.slice(1).map((part) => {
|
|
141729
|
-
if (part.includes("[") && part.includes("]")) {
|
|
141730
|
-
return part.split("[")[1].split("]")[0];
|
|
141731
|
-
}
|
|
141732
|
-
return part;
|
|
141733
|
-
});
|
|
141734
|
-
expression = `{{lookup (lookup ${rootPart} ${restOfPath[0]}) "${restOfPath[1]}"}}`;
|
|
141735
|
-
}
|
|
141736
|
-
point.dynamicXValue = { path: selectedKey, value: expression };
|
|
141737
|
-
point.xValue = expression;
|
|
141738
|
-
closePopover();
|
|
141739
|
-
return;
|
|
141740
|
-
}
|
|
141741
|
-
if (field === "y") {
|
|
141742
|
-
point.selectedYValue = currentValue;
|
|
141743
|
-
const rootPart = pathParts[0];
|
|
141744
|
-
let expression = "";
|
|
141745
|
-
if (pathParts.length === 1) {
|
|
141746
|
-
expression = `{{${rootPart}}}`;
|
|
141747
|
-
} else {
|
|
141748
|
-
const restOfPath = pathParts.slice(1).map((part) => {
|
|
141749
|
-
if (part.includes("[") && part.includes("]")) {
|
|
141750
|
-
return part.split("[")[1].split("]")[0];
|
|
141751
|
-
}
|
|
141752
|
-
return part;
|
|
141753
|
-
});
|
|
141754
|
-
expression = `{{lookup (lookup ${rootPart} ${restOfPath[0]}) "${restOfPath[1]}"}}`;
|
|
141755
|
-
}
|
|
141756
|
-
point.dynamicYValue = { path: selectedKey, value: expression };
|
|
141757
|
-
point.yValue = expression;
|
|
141758
|
-
closePopover();
|
|
141759
|
-
return;
|
|
141760
|
-
}
|
|
141761
141269
|
point.selectedValue = currentValue;
|
|
141762
141270
|
if (Array.isArray(currentValue) || typeof currentValue === "object" && currentValue !== null) {
|
|
141763
141271
|
point.arrayConfig = {
|
|
@@ -141787,160 +141295,79 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141787
141295
|
value: expression
|
|
141788
141296
|
};
|
|
141789
141297
|
point.value = expression;
|
|
141790
|
-
|
|
141298
|
+
activePopoverPoint.value = null;
|
|
141791
141299
|
}
|
|
141792
141300
|
}
|
|
141793
|
-
function
|
|
141794
|
-
|
|
141795
|
-
|
|
141796
|
-
const processedData2 = {
|
|
141797
|
-
labels: [],
|
|
141798
|
-
values: []
|
|
141799
|
-
};
|
|
141800
|
-
series.dataPoints.forEach((point) => {
|
|
141801
|
-
const x = !isNaN(Number(point.xValue)) ? Number(point.xValue) : 0;
|
|
141802
|
-
const y = !isNaN(Number(point.yValue)) ? Number(point.yValue) : 0;
|
|
141803
|
-
processedData2.labels.push(point.label);
|
|
141804
|
-
if (series.chartType === "bubble") {
|
|
141805
|
-
processedData2.values.push({ x, y, r: Math.max(5, Math.abs(y) / 2) });
|
|
141806
|
-
} else {
|
|
141807
|
-
processedData2.values.push({ x, y });
|
|
141808
|
-
}
|
|
141809
|
-
});
|
|
141810
|
-
return processedData2;
|
|
141301
|
+
function updateDynamicValueExpression(point) {
|
|
141302
|
+
if (!point.selectedValue || !point.arrayConfig?.labelField || !point.arrayConfig?.valueField) {
|
|
141303
|
+
return;
|
|
141811
141304
|
}
|
|
141305
|
+
const path = point.dynamicValue?.path;
|
|
141306
|
+
if (!path) {
|
|
141307
|
+
return;
|
|
141308
|
+
}
|
|
141309
|
+
point.label = `{{#each ${path}}}{{lookup this "${point.arrayConfig.labelField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
|
|
141310
|
+
point.value = `{{#each ${path}}}{{lookup this "${point.arrayConfig.valueField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
|
|
141311
|
+
point.dynamicValue = {
|
|
141312
|
+
path,
|
|
141313
|
+
value: point.value
|
|
141314
|
+
};
|
|
141315
|
+
activePopoverPoint.value = null;
|
|
141316
|
+
}
|
|
141317
|
+
function processChartData() {
|
|
141812
141318
|
const processedData = {
|
|
141813
141319
|
labels: [],
|
|
141814
141320
|
values: []
|
|
141815
141321
|
};
|
|
141816
|
-
|
|
141322
|
+
dataPoints.value.forEach((point) => {
|
|
141817
141323
|
processedData.labels.push(point.label);
|
|
141818
141324
|
processedData.values.push(!isNaN(Number(point.value)) ? Number(point.value) : 0);
|
|
141819
141325
|
});
|
|
141820
141326
|
return processedData;
|
|
141821
141327
|
}
|
|
141822
|
-
function getSeriesColors(forStorage = false) {
|
|
141823
|
-
if (colorSchemeType.value === "theme") {
|
|
141824
|
-
if (forStorage) {
|
|
141825
|
-
return chartColors.value.map((index) => `palette${index}`);
|
|
141826
|
-
}
|
|
141827
|
-
return chartColors.value.map((index) => {
|
|
141828
|
-
const idx = parseInt(index);
|
|
141829
|
-
return palette.value[idx % palette.value.length];
|
|
141830
|
-
});
|
|
141831
|
-
}
|
|
141832
|
-
return chartColors.value;
|
|
141833
|
-
}
|
|
141834
141328
|
function createChartConfig() {
|
|
141835
|
-
const datasets = [];
|
|
141836
|
-
let allLabels = [];
|
|
141837
|
-
const colorsForStorage = getSeriesColors(true);
|
|
141838
|
-
const isSingleSeries = seriesList.value.length === 1;
|
|
141839
|
-
seriesList.value.forEach((series, index) => {
|
|
141840
|
-
const processedData = processSeriesData(series);
|
|
141841
|
-
let backgroundColor2;
|
|
141842
|
-
let borderColor;
|
|
141843
|
-
if (isSingleSeries) {
|
|
141844
|
-
backgroundColor2 = colorsForStorage;
|
|
141845
|
-
borderColor = [...colorsForStorage];
|
|
141846
|
-
} else {
|
|
141847
|
-
const seriesColor = colorsForStorage[index % colorsForStorage.length];
|
|
141848
|
-
backgroundColor2 = seriesColor;
|
|
141849
|
-
borderColor = seriesColor;
|
|
141850
|
-
}
|
|
141851
|
-
const datasetOptions = {
|
|
141852
|
-
label: series.name,
|
|
141853
|
-
data: processedData.values,
|
|
141854
|
-
background_color: backgroundColor2,
|
|
141855
|
-
border_color: borderColor,
|
|
141856
|
-
borderWidth: 1
|
|
141857
|
-
};
|
|
141858
|
-
if (!isSingleSeries) {
|
|
141859
|
-
if (series.chartType === "area") {
|
|
141860
|
-
datasetOptions.type = "line";
|
|
141861
|
-
datasetOptions.fill = true;
|
|
141862
|
-
datasetOptions.tension = 0.4;
|
|
141863
|
-
} else {
|
|
141864
|
-
datasetOptions.type = series.chartType;
|
|
141865
|
-
}
|
|
141866
|
-
}
|
|
141867
|
-
if (series.chartType === "area") {
|
|
141868
|
-
datasetOptions.fill = true;
|
|
141869
|
-
datasetOptions.tension = 0.4;
|
|
141870
|
-
}
|
|
141871
|
-
if (["line", "scatter", "area"].includes(series.chartType)) {
|
|
141872
|
-
datasetOptions.pointStyle = pointStyle.value;
|
|
141873
|
-
}
|
|
141874
|
-
if (["line", "area"].includes(series.chartType)) {
|
|
141875
|
-
datasetOptions.tension = 0.4;
|
|
141876
|
-
}
|
|
141877
|
-
if (processedData.labels.length > allLabels.length) {
|
|
141878
|
-
allLabels = processedData.labels;
|
|
141879
|
-
}
|
|
141880
|
-
datasets.push(datasetOptions);
|
|
141881
|
-
});
|
|
141882
|
-
const primaryType = seriesList.value[0].chartType;
|
|
141883
|
-
let actualPrimaryType = primaryType;
|
|
141884
|
-
if (primaryType === "area") {
|
|
141885
|
-
actualPrimaryType = "line";
|
|
141886
|
-
}
|
|
141887
|
-
let scales = void 0;
|
|
141888
|
-
const chartTypesWithScales = ["bar", "line", "scatter", "bubble", "area"];
|
|
141889
|
-
if (chartTypesWithScales.includes(primaryType)) {
|
|
141890
|
-
scales = {
|
|
141891
|
-
x: {
|
|
141892
|
-
title: {
|
|
141893
|
-
display: !!xAxisLabel.value,
|
|
141894
|
-
text: xAxisLabel.value
|
|
141895
|
-
}
|
|
141896
|
-
},
|
|
141897
|
-
y: {
|
|
141898
|
-
title: {
|
|
141899
|
-
display: !!yAxisLabel.value,
|
|
141900
|
-
text: yAxisLabel.value
|
|
141901
|
-
},
|
|
141902
|
-
begin_at_zero: true
|
|
141903
|
-
}
|
|
141904
|
-
};
|
|
141905
|
-
} else if (["radar", "polarArea"].includes(primaryType)) {
|
|
141906
|
-
scales = {
|
|
141907
|
-
r: {
|
|
141908
|
-
begin_at_zero: true,
|
|
141909
|
-
ticks: {
|
|
141910
|
-
step_size: 1
|
|
141911
|
-
}
|
|
141912
|
-
}
|
|
141913
|
-
};
|
|
141914
|
-
}
|
|
141915
|
-
const showLegend = seriesList.value.length > 1 || legendPosition.value !== "none";
|
|
141916
141329
|
const config = {
|
|
141917
|
-
type:
|
|
141330
|
+
type: chartType.value,
|
|
141918
141331
|
color_scheme_type: colorSchemeType.value,
|
|
141919
|
-
percent_display: percentDisplay.value,
|
|
141920
|
-
chart_height: chartHeight.value,
|
|
141921
|
-
chart_width: chartWidth.value,
|
|
141922
|
-
view_controls: {
|
|
141923
|
-
enable_fullscreen_btn: enableFullscreenBtn.value,
|
|
141924
|
-
enable_chart_type_switcher: enableChartTypeSwitcher.value,
|
|
141925
|
-
enable_data_entry: enableDataEntry.value
|
|
141926
|
-
},
|
|
141927
141332
|
data: {
|
|
141928
|
-
labels:
|
|
141929
|
-
datasets
|
|
141333
|
+
labels: [],
|
|
141334
|
+
datasets: [
|
|
141335
|
+
{
|
|
141336
|
+
label: "Data Series",
|
|
141337
|
+
data: [],
|
|
141338
|
+
background_color: getColors(),
|
|
141339
|
+
border_color: getColors(),
|
|
141340
|
+
border_width: 1,
|
|
141341
|
+
point_style: ["line"].includes(chartType.value) ? pointStyle.value : void 0
|
|
141342
|
+
}
|
|
141343
|
+
]
|
|
141930
141344
|
},
|
|
141931
141345
|
options: {
|
|
141932
141346
|
responsive: true,
|
|
141933
141347
|
maintainAspectRatio: false,
|
|
141934
|
-
index_axis: ["bar", "line"].includes(
|
|
141935
|
-
scales,
|
|
141348
|
+
index_axis: ["bar", "line"].includes(chartType.value) ? orientation.value : void 0,
|
|
141349
|
+
scales: ["bar", "line"].includes(chartType.value) ? {
|
|
141350
|
+
x: {
|
|
141351
|
+
title: {
|
|
141352
|
+
display: !!xAxisLabel.value,
|
|
141353
|
+
text: xAxisLabel.value
|
|
141354
|
+
}
|
|
141355
|
+
},
|
|
141356
|
+
y: {
|
|
141357
|
+
title: {
|
|
141358
|
+
display: !!yAxisLabel.value,
|
|
141359
|
+
text: yAxisLabel.value
|
|
141360
|
+
}
|
|
141361
|
+
}
|
|
141362
|
+
} : void 0,
|
|
141936
141363
|
plugins: {
|
|
141937
141364
|
title: {
|
|
141938
141365
|
display: !!chartTitle.value,
|
|
141939
141366
|
text: chartTitle.value
|
|
141940
141367
|
},
|
|
141941
141368
|
legend: {
|
|
141942
|
-
display:
|
|
141943
|
-
position: legendPosition.value
|
|
141369
|
+
display: legendPosition.value !== "none",
|
|
141370
|
+
position: legendPosition.value,
|
|
141944
141371
|
labels: {
|
|
141945
141372
|
usePointStyle: true
|
|
141946
141373
|
}
|
|
@@ -141950,25 +141377,14 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141950
141377
|
duration: enableAnimation.value ? 1e3 : 0
|
|
141951
141378
|
}
|
|
141952
141379
|
},
|
|
141953
|
-
|
|
141954
|
-
|
|
141955
|
-
|
|
141956
|
-
|
|
141957
|
-
chart_type: series.chartType,
|
|
141958
|
-
data_points: series.dataPoints.map((point) => ({
|
|
141959
|
-
label: point.label,
|
|
141960
|
-
value: point.value,
|
|
141961
|
-
x_value: point.xValue,
|
|
141962
|
-
y_value: point.yValue,
|
|
141963
|
-
dynamic_value: point.dynamicValue,
|
|
141964
|
-
dynamic_x_value: point.dynamicXValue,
|
|
141965
|
-
dynamic_y_value: point.dynamicYValue,
|
|
141966
|
-
array_config: point.arrayConfig
|
|
141967
|
-
}))
|
|
141968
|
-
})),
|
|
141969
|
-
// Store the primary chart type for reference
|
|
141970
|
-
_primary_chart_type: primaryType
|
|
141380
|
+
data_points: dataPoints.value.map((point) => ({
|
|
141381
|
+
label: point.label,
|
|
141382
|
+
value: point.value
|
|
141383
|
+
}))
|
|
141971
141384
|
};
|
|
141385
|
+
const processedData = processChartData();
|
|
141386
|
+
config.data.labels = processedData.labels;
|
|
141387
|
+
config.data.datasets[0].data = processedData.values;
|
|
141972
141388
|
return config;
|
|
141973
141389
|
}
|
|
141974
141390
|
function onCancel() {
|
|
@@ -141996,14 +141412,9 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
141996
141412
|
},
|
|
141997
141413
|
{ immediate: true }
|
|
141998
141414
|
);
|
|
141999
|
-
watch(isMultiSeries, (multiSeries) => {
|
|
142000
|
-
if (multiSeries) {
|
|
142001
|
-
enableChartTypeSwitcher.value = false;
|
|
142002
|
-
}
|
|
142003
|
-
});
|
|
142004
141415
|
watch(
|
|
142005
141416
|
[
|
|
142006
|
-
|
|
141417
|
+
chartType,
|
|
142007
141418
|
chartColors,
|
|
142008
141419
|
colorSchemeType,
|
|
142009
141420
|
chartTitle,
|
|
@@ -142012,13 +141423,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142012
141423
|
yAxisLabel,
|
|
142013
141424
|
orientation,
|
|
142014
141425
|
pointStyle,
|
|
142015
|
-
|
|
142016
|
-
enableAnimation,
|
|
142017
|
-
enableFullscreenBtn,
|
|
142018
|
-
enableChartTypeSwitcher,
|
|
142019
|
-
enableDataEntry,
|
|
142020
|
-
chartHeight,
|
|
142021
|
-
chartWidth
|
|
141426
|
+
dataPoints
|
|
142022
141427
|
],
|
|
142023
141428
|
() => {
|
|
142024
141429
|
updatePreview();
|
|
@@ -142044,10 +141449,10 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142044
141449
|
"--n-padding-left": "16px"
|
|
142045
141450
|
}]),
|
|
142046
141451
|
title: unref(t)("canvasUI.canvasBuilder.dataCharts.editDataChartsComponent"),
|
|
142047
|
-
onClose: _cache[
|
|
141452
|
+
onClose: _cache[11] || (_cache[11] = ($event) => unref(setComponentEditMode)(false))
|
|
142048
141453
|
}, {
|
|
142049
141454
|
footer: withCtx(() => [
|
|
142050
|
-
createElementVNode("div",
|
|
141455
|
+
createElementVNode("div", _hoisted_50$3, [
|
|
142051
141456
|
createVNode(CButton, { onClick: onCancel }, {
|
|
142052
141457
|
default: withCtx(() => [
|
|
142053
141458
|
createTextVNode(toDisplayString(unref(t)("canvasUI.common.cancel")), 1)
|
|
@@ -142085,66 +141490,69 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142085
141490
|
createElementVNode("div", _hoisted_2$1t, [
|
|
142086
141491
|
createElementVNode("div", _hoisted_3$17, [
|
|
142087
141492
|
createElementVNode("div", _hoisted_4$X, [
|
|
142088
|
-
createElementVNode("div", _hoisted_5$O,
|
|
142089
|
-
|
|
142090
|
-
(
|
|
142091
|
-
|
|
142092
|
-
|
|
142093
|
-
|
|
142094
|
-
|
|
142095
|
-
]]),
|
|
142096
|
-
onClick: ($event) => activeSeriesIndex.value = index
|
|
142097
|
-
}, [
|
|
142098
|
-
createElementVNode("span", _hoisted_8$q, toDisplayString(series.name), 1),
|
|
142099
|
-
index > 0 ? (openBlock(), createElementBlock("div", {
|
|
142100
|
-
key: 0,
|
|
142101
|
-
class: "ml-1 p-0.5 rounded hover:bg-gray-300 dark:hover:bg-gray-600",
|
|
142102
|
-
onClick: withModifiers(($event) => removeSeries(index), ["stop"])
|
|
142103
|
-
}, [
|
|
142104
|
-
createVNode(CIcon, {
|
|
142105
|
-
class: "text-gray-500",
|
|
142106
|
-
icon: "times",
|
|
142107
|
-
size: 10
|
|
142108
|
-
})
|
|
142109
|
-
], 8, _hoisted_9$m)) : createCommentVNode("", true)
|
|
142110
|
-
], 10, _hoisted_7$v);
|
|
142111
|
-
}), 128)),
|
|
142112
|
-
canAddSeries.value ? (openBlock(), createElementBlock("button", {
|
|
142113
|
-
key: 0,
|
|
142114
|
-
class: "flex items-center justify-center w-8 h-8 mb-1 rounded bg-transparent border-none hover:bg-gray-200 dark:hover:bg-gray-700 transition-colors cursor-pointer",
|
|
142115
|
-
title: unref(t)("canvasUI.canvasBuilder.dataCharts.addSeries"),
|
|
142116
|
-
onClick: addSeries
|
|
142117
|
-
}, [
|
|
142118
|
-
createVNode(CIcon, {
|
|
142119
|
-
icon: "plus",
|
|
142120
|
-
size: 14
|
|
142121
|
-
})
|
|
142122
|
-
], 8, _hoisted_10$h)) : createCommentVNode("", true)
|
|
141493
|
+
createElementVNode("div", _hoisted_5$O, [
|
|
141494
|
+
createElementVNode("label", _hoisted_6$H, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartType")), 1),
|
|
141495
|
+
createVNode(unref(NSelect), {
|
|
141496
|
+
value: chartType.value,
|
|
141497
|
+
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => chartType.value = $event),
|
|
141498
|
+
options: chartTypeOptions
|
|
141499
|
+
}, null, 8, ["value"])
|
|
142123
141500
|
]),
|
|
142124
|
-
|
|
142125
|
-
createElementVNode("
|
|
141501
|
+
["bar", "line"].includes(chartType.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
141502
|
+
createElementVNode("div", _hoisted_7$v, [
|
|
141503
|
+
createElementVNode("label", _hoisted_8$q, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.xAxisLabel")), 1),
|
|
141504
|
+
createVNode(unref(NInput), {
|
|
141505
|
+
value: xAxisLabel.value,
|
|
141506
|
+
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => xAxisLabel.value = $event),
|
|
141507
|
+
type: "text"
|
|
141508
|
+
}, null, 8, ["value"])
|
|
141509
|
+
]),
|
|
141510
|
+
createElementVNode("div", _hoisted_9$m, [
|
|
141511
|
+
createElementVNode("label", _hoisted_10$h, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.yAxisLabel")), 1),
|
|
141512
|
+
createVNode(unref(NInput), {
|
|
141513
|
+
value: yAxisLabel.value,
|
|
141514
|
+
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => yAxisLabel.value = $event),
|
|
141515
|
+
type: "text"
|
|
141516
|
+
}, null, 8, ["value"])
|
|
141517
|
+
]),
|
|
141518
|
+
createElementVNode("div", _hoisted_11$f, [
|
|
141519
|
+
createElementVNode("label", _hoisted_12$b, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.orientation")), 1),
|
|
141520
|
+
createVNode(unref(NSelect), {
|
|
141521
|
+
value: orientation.value,
|
|
141522
|
+
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => orientation.value = $event),
|
|
141523
|
+
options: orientationOptions
|
|
141524
|
+
}, null, 8, ["value"])
|
|
141525
|
+
]),
|
|
141526
|
+
["line", "radar"].includes(chartType.value) ? (openBlock(), createElementBlock("div", _hoisted_13$a, [
|
|
141527
|
+
createElementVNode("label", _hoisted_14$9, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.pointStyle")), 1),
|
|
141528
|
+
createVNode(unref(NSelect), {
|
|
141529
|
+
value: pointStyle.value,
|
|
141530
|
+
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => pointStyle.value = $event),
|
|
141531
|
+
options: pointStyleOptions
|
|
141532
|
+
}, null, 8, ["value"])
|
|
141533
|
+
])) : createCommentVNode("", true)
|
|
141534
|
+
], 64)) : createCommentVNode("", true),
|
|
141535
|
+
createElementVNode("div", _hoisted_15$8, [
|
|
141536
|
+
createElementVNode("label", _hoisted_16$8, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartTitle")), 1),
|
|
142126
141537
|
createVNode(unref(NInput), {
|
|
142127
|
-
value:
|
|
142128
|
-
"onUpdate:value": _cache[
|
|
141538
|
+
value: chartTitle.value,
|
|
141539
|
+
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => chartTitle.value = $event),
|
|
142129
141540
|
type: "text"
|
|
142130
141541
|
}, null, 8, ["value"])
|
|
142131
|
-
])) : createCommentVNode("", true),
|
|
142132
|
-
createElementVNode("div", _hoisted_13$a, [
|
|
142133
|
-
createElementVNode("label", _hoisted_14$9, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartType")), 1),
|
|
142134
|
-
createVNode(unref(NSelect), {
|
|
142135
|
-
value: activeSeries.value.chartType,
|
|
142136
|
-
"onUpdate:value": [
|
|
142137
|
-
_cache[1] || (_cache[1] = ($event) => activeSeries.value.chartType = $event),
|
|
142138
|
-
onChartTypeChange
|
|
142139
|
-
],
|
|
142140
|
-
options: availableChartTypeOptions.value
|
|
142141
|
-
}, null, 8, ["value", "options"])
|
|
142142
141542
|
]),
|
|
142143
|
-
|
|
142144
|
-
createElementVNode("
|
|
142145
|
-
|
|
141543
|
+
["pie", "doughnut", "polarArea"].includes(chartType.value) ? (openBlock(), createElementBlock("div", _hoisted_17$7, [
|
|
141544
|
+
createElementVNode("label", _hoisted_18$6, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.legendPosition")), 1),
|
|
141545
|
+
createVNode(unref(NSelect), {
|
|
141546
|
+
value: legendPosition.value,
|
|
141547
|
+
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => legendPosition.value = $event),
|
|
141548
|
+
options: legendPositionOptions
|
|
141549
|
+
}, null, 8, ["value"])
|
|
141550
|
+
])) : createCommentVNode("", true),
|
|
141551
|
+
createElementVNode("div", _hoisted_19$6, [
|
|
141552
|
+
createElementVNode("div", _hoisted_20$5, [
|
|
141553
|
+
createElementVNode("label", _hoisted_21$5, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.dataPoints")), 1),
|
|
142146
141554
|
createVNode(unref(Button), {
|
|
142147
|
-
disabled: !
|
|
141555
|
+
disabled: !dataPoints.value.length,
|
|
142148
141556
|
size: "small",
|
|
142149
141557
|
onClick: removeAllDataPoints
|
|
142150
141558
|
}, {
|
|
@@ -142154,248 +141562,205 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142154
141562
|
_: 1
|
|
142155
141563
|
}, 8, ["disabled"])
|
|
142156
141564
|
]),
|
|
142157
|
-
|
|
141565
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(dataPoints.value, (point, index) => {
|
|
142158
141566
|
return openBlock(), createElementBlock("div", {
|
|
142159
141567
|
key: index,
|
|
142160
141568
|
class: "flex gap-2 mb-2"
|
|
142161
141569
|
}, [
|
|
142162
|
-
|
|
142163
|
-
|
|
142164
|
-
|
|
142165
|
-
class: "flex-1",
|
|
142166
|
-
disabled: !!point.arrayConfig,
|
|
142167
|
-
placeholder: "Label"
|
|
142168
|
-
}, null, 8, ["value", "onUpdate:value", "disabled"]),
|
|
142169
|
-
createVNode(unref(NInput), {
|
|
142170
|
-
value: point.value,
|
|
142171
|
-
"onUpdate:value": ($event) => point.value = $event,
|
|
142172
|
-
class: "flex-1",
|
|
142173
|
-
disabled: !!point.dynamicValue,
|
|
142174
|
-
placeholder: "Value",
|
|
142175
|
-
type: "text"
|
|
141570
|
+
point.selectedValue && (Array.isArray(point.selectedValue) || typeof point.selectedValue === "object" && point.selectedValue !== null) ? (openBlock(), createBlock(unref(NTooltip), {
|
|
141571
|
+
key: 0,
|
|
141572
|
+
trigger: "hover"
|
|
142176
141573
|
}, {
|
|
142177
|
-
|
|
142178
|
-
createVNode(unref(
|
|
142179
|
-
|
|
142180
|
-
|
|
142181
|
-
|
|
142182
|
-
|
|
142183
|
-
|
|
142184
|
-
|
|
142185
|
-
createElementVNode("div", {
|
|
142186
|
-
class: "cursor-pointer flex items-center",
|
|
142187
|
-
onClick: ($event) => handleDynamicValueClick(point, "value")
|
|
142188
|
-
}, [
|
|
142189
|
-
createVNode(CIcon, {
|
|
142190
|
-
class: normalizeClass(point.dynamicValue ? "text-blue-500" : ""),
|
|
142191
|
-
icon: "caret-down"
|
|
142192
|
-
}, null, 8, ["class"])
|
|
142193
|
-
], 8, _hoisted_18$6)
|
|
142194
|
-
]),
|
|
142195
|
-
default: withCtx(() => [
|
|
142196
|
-
createElementVNode("div", _hoisted_19$6, [
|
|
142197
|
-
createElementVNode("div", _hoisted_20$5, [
|
|
142198
|
-
createElementVNode("div", _hoisted_21$5, [
|
|
142199
|
-
createElementVNode("div", _hoisted_22$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
|
|
142200
|
-
createElementVNode("div", _hoisted_23$3, [
|
|
142201
|
-
createVNode(unref(NTree), {
|
|
142202
|
-
"block-line": "",
|
|
142203
|
-
class: "max-h-[300px]",
|
|
142204
|
-
data: dynamicValueTreeData.value,
|
|
142205
|
-
"render-label": renderDynamicValueTreeLabel,
|
|
142206
|
-
"selected-keys": [point.dynamicValue?.path ?? ""],
|
|
142207
|
-
"onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point, "value")
|
|
142208
|
-
}, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
|
|
142209
|
-
])
|
|
142210
|
-
]),
|
|
142211
|
-
point.selectedValue && point.arrayConfig && isArrayOrObject(point.selectedValue) ? (openBlock(), createElementBlock("div", _hoisted_24$3, [
|
|
142212
|
-
createElementVNode("div", _hoisted_25$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.configureArrayObjectFields")), 1),
|
|
142213
|
-
createElementVNode("div", _hoisted_26$3, [
|
|
142214
|
-
createElementVNode("div", null, [
|
|
142215
|
-
createElementVNode("label", _hoisted_27$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.labelField")), 1),
|
|
142216
|
-
createVNode(unref(NSelect), {
|
|
142217
|
-
value: point.arrayConfig.labelField,
|
|
142218
|
-
"onUpdate:value": [($event) => point.arrayConfig.labelField = $event, ($event) => updateDynamicValueExpression(point)],
|
|
142219
|
-
options: getFieldOptions(point.selectedValue)
|
|
142220
|
-
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
142221
|
-
]),
|
|
142222
|
-
createElementVNode("div", null, [
|
|
142223
|
-
createElementVNode("label", _hoisted_28$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.valueField")), 1),
|
|
142224
|
-
createVNode(unref(NSelect), {
|
|
142225
|
-
value: point.arrayConfig.valueField,
|
|
142226
|
-
"onUpdate:value": [($event) => point.arrayConfig.valueField = $event, ($event) => updateDynamicValueExpression(point)],
|
|
142227
|
-
options: getFieldOptions(point.selectedValue)
|
|
142228
|
-
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
142229
|
-
])
|
|
142230
|
-
])
|
|
142231
|
-
])) : createCommentVNode("", true)
|
|
142232
|
-
])
|
|
142233
|
-
])
|
|
142234
|
-
]),
|
|
142235
|
-
_: 2
|
|
142236
|
-
}, 1032, ["show"])
|
|
141574
|
+
trigger: withCtx(() => [
|
|
141575
|
+
createVNode(unref(NInput), {
|
|
141576
|
+
value: point.label,
|
|
141577
|
+
"onUpdate:value": ($event) => point.label = $event,
|
|
141578
|
+
class: "flex-1",
|
|
141579
|
+
disabled: true,
|
|
141580
|
+
placeholder: "Label"
|
|
141581
|
+
}, null, 8, ["value", "onUpdate:value"])
|
|
142237
141582
|
]),
|
|
142238
|
-
|
|
142239
|
-
|
|
142240
|
-
createVNode(CButton, {
|
|
142241
|
-
circle: "",
|
|
142242
|
-
class: "bg-error2 self-center",
|
|
142243
|
-
size: "small",
|
|
142244
|
-
style: normalizeStyle(deleteButtonStyle.value),
|
|
142245
|
-
type: "error",
|
|
142246
|
-
onClick: ($event) => removeDataPoint(index)
|
|
142247
|
-
}, {
|
|
142248
|
-
icon: withCtx(() => [
|
|
142249
|
-
createVNode(CIcon, {
|
|
142250
|
-
class: "color-error",
|
|
142251
|
-
"fa-type": "far",
|
|
142252
|
-
icon: "trash",
|
|
142253
|
-
size: 12
|
|
142254
|
-
})
|
|
141583
|
+
default: withCtx(() => [
|
|
141584
|
+
createTextVNode(" " + toDisplayString(point.label), 1)
|
|
142255
141585
|
]),
|
|
142256
141586
|
_: 2
|
|
142257
|
-
},
|
|
142258
|
-
|
|
142259
|
-
}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(activeSeries.value.dataPoints, (point, index) => {
|
|
142260
|
-
return openBlock(), createElementBlock("div", {
|
|
142261
|
-
key: index,
|
|
142262
|
-
class: "flex gap-2 mb-2"
|
|
142263
|
-
}, [
|
|
142264
|
-
createVNode(unref(NInput), {
|
|
141587
|
+
}, 1024)) : (openBlock(), createBlock(unref(NInput), {
|
|
141588
|
+
key: 1,
|
|
142265
141589
|
value: point.label,
|
|
142266
141590
|
"onUpdate:value": ($event) => point.label = $event,
|
|
142267
141591
|
class: "flex-1",
|
|
142268
|
-
disabled: !!point.arrayConfig,
|
|
142269
141592
|
placeholder: "Label"
|
|
142270
|
-
}, null, 8, ["value", "onUpdate:value"
|
|
142271
|
-
|
|
142272
|
-
|
|
142273
|
-
|
|
142274
|
-
|
|
142275
|
-
|
|
142276
|
-
|
|
142277
|
-
|
|
142278
|
-
|
|
142279
|
-
|
|
142280
|
-
|
|
142281
|
-
|
|
142282
|
-
|
|
142283
|
-
|
|
142284
|
-
|
|
142285
|
-
|
|
142286
|
-
|
|
142287
|
-
|
|
142288
|
-
|
|
142289
|
-
|
|
142290
|
-
|
|
142291
|
-
|
|
142292
|
-
|
|
142293
|
-
|
|
142294
|
-
|
|
142295
|
-
|
|
142296
|
-
|
|
142297
|
-
|
|
142298
|
-
|
|
142299
|
-
|
|
142300
|
-
|
|
142301
|
-
|
|
142302
|
-
|
|
142303
|
-
|
|
142304
|
-
|
|
142305
|
-
|
|
142306
|
-
|
|
142307
|
-
|
|
142308
|
-
|
|
142309
|
-
|
|
142310
|
-
|
|
141593
|
+
}, null, 8, ["value", "onUpdate:value"])),
|
|
141594
|
+
createElementVNode("div", _hoisted_22$3, [
|
|
141595
|
+
point.dynamicValue ? (openBlock(), createBlock(unref(NTooltip), {
|
|
141596
|
+
key: 0,
|
|
141597
|
+
trigger: "hover"
|
|
141598
|
+
}, {
|
|
141599
|
+
trigger: withCtx(() => [
|
|
141600
|
+
createVNode(unref(NInput), {
|
|
141601
|
+
value: point.value,
|
|
141602
|
+
"onUpdate:value": ($event) => point.value = $event,
|
|
141603
|
+
class: "flex-1",
|
|
141604
|
+
disabled: !!point.dynamicValue,
|
|
141605
|
+
placeholder: "Value",
|
|
141606
|
+
type: "text"
|
|
141607
|
+
}, {
|
|
141608
|
+
suffix: withCtx(() => [
|
|
141609
|
+
createVNode(unref(NPopover), {
|
|
141610
|
+
placement: "bottom",
|
|
141611
|
+
show: activePopoverPoint.value === point,
|
|
141612
|
+
trigger: "manual",
|
|
141613
|
+
onClickoutside: _cache[7] || (_cache[7] = ($event) => activePopoverPoint.value = null)
|
|
141614
|
+
}, {
|
|
141615
|
+
trigger: withCtx(() => [
|
|
141616
|
+
createElementVNode("div", {
|
|
141617
|
+
class: "cursor-pointer flex items-center",
|
|
141618
|
+
onClick: ($event) => handleDynamicValueClick(point)
|
|
141619
|
+
}, [
|
|
141620
|
+
createVNode(CIcon, {
|
|
141621
|
+
class: normalizeClass(point.dynamicValue ? "text-blue-500" : ""),
|
|
141622
|
+
icon: "caret-down"
|
|
141623
|
+
}, null, 8, ["class"])
|
|
141624
|
+
], 8, _hoisted_23$3)
|
|
141625
|
+
]),
|
|
141626
|
+
default: withCtx(() => [
|
|
141627
|
+
createElementVNode("div", _hoisted_24$3, [
|
|
141628
|
+
createElementVNode("div", _hoisted_25$3, [
|
|
141629
|
+
createElementVNode("div", _hoisted_26$3, [
|
|
141630
|
+
createElementVNode("div", _hoisted_27$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
|
|
141631
|
+
createElementVNode("div", _hoisted_28$3, [
|
|
141632
|
+
createVNode(unref(NTree), {
|
|
141633
|
+
"block-line": "",
|
|
141634
|
+
class: "max-h-[300px]",
|
|
141635
|
+
data: dynamicValueTreeData.value,
|
|
141636
|
+
"render-label": renderDynamicValueTreeLabel,
|
|
141637
|
+
"selected-keys": [point.dynamicValue?.path ?? ""],
|
|
141638
|
+
"onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point)
|
|
141639
|
+
}, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
|
|
141640
|
+
])
|
|
141641
|
+
]),
|
|
141642
|
+
point.selectedValue && point.arrayConfig && (Array.isArray(point.selectedValue) || typeof point.selectedValue === "object" && point.selectedValue !== null) ? (openBlock(), createElementBlock("div", _hoisted_29$3, [
|
|
141643
|
+
createElementVNode("div", _hoisted_30$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.configureArrayObjectFields")), 1),
|
|
141644
|
+
createElementVNode("div", _hoisted_31$3, [
|
|
141645
|
+
createElementVNode("div", null, [
|
|
141646
|
+
createElementVNode("label", _hoisted_32$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.labelField")), 1),
|
|
141647
|
+
createVNode(unref(NSelect), {
|
|
141648
|
+
value: point.arrayConfig.labelField,
|
|
141649
|
+
"onUpdate:value": [($event) => point.arrayConfig.labelField = $event, ($event) => updateDynamicValueExpression(point)],
|
|
141650
|
+
options: getFieldOptions(point.selectedValue)
|
|
141651
|
+
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
141652
|
+
]),
|
|
141653
|
+
createElementVNode("div", null, [
|
|
141654
|
+
createElementVNode("label", _hoisted_33$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.valueField")), 1),
|
|
141655
|
+
createVNode(unref(NSelect), {
|
|
141656
|
+
value: point.arrayConfig.valueField,
|
|
141657
|
+
"onUpdate:value": [($event) => point.arrayConfig.valueField = $event, ($event) => updateDynamicValueExpression(point)],
|
|
141658
|
+
options: getFieldOptions(point.selectedValue)
|
|
141659
|
+
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
141660
|
+
])
|
|
141661
|
+
])
|
|
141662
|
+
])) : createCommentVNode("", true)
|
|
141663
|
+
])
|
|
142311
141664
|
])
|
|
142312
141665
|
]),
|
|
142313
|
-
|
|
142314
|
-
|
|
141666
|
+
_: 2
|
|
141667
|
+
}, 1032, ["show"])
|
|
141668
|
+
]),
|
|
141669
|
+
_: 2
|
|
141670
|
+
}, 1032, ["value", "onUpdate:value", "disabled"])
|
|
141671
|
+
]),
|
|
141672
|
+
default: withCtx(() => [
|
|
141673
|
+
createTextVNode(" " + toDisplayString(point.value), 1)
|
|
141674
|
+
]),
|
|
141675
|
+
_: 2
|
|
141676
|
+
}, 1024)) : (openBlock(), createBlock(unref(NInput), {
|
|
141677
|
+
key: 1,
|
|
141678
|
+
value: point.value,
|
|
141679
|
+
"onUpdate:value": ($event) => point.value = $event,
|
|
141680
|
+
class: "flex-1",
|
|
141681
|
+
disabled: !!point.dynamicValue,
|
|
141682
|
+
placeholder: "Value",
|
|
141683
|
+
type: "text"
|
|
141684
|
+
}, {
|
|
141685
|
+
suffix: withCtx(() => [
|
|
141686
|
+
createVNode(unref(NPopover), {
|
|
141687
|
+
placement: "bottom",
|
|
141688
|
+
show: activePopoverPoint.value === point,
|
|
141689
|
+
trigger: "manual",
|
|
141690
|
+
onClickoutside: _cache[8] || (_cache[8] = ($event) => activePopoverPoint.value = null)
|
|
141691
|
+
}, {
|
|
141692
|
+
trigger: withCtx(() => [
|
|
141693
|
+
createElementVNode("div", {
|
|
141694
|
+
class: "cursor-pointer flex items-center",
|
|
141695
|
+
onClick: ($event) => handleDynamicValueClick(point)
|
|
141696
|
+
}, [
|
|
141697
|
+
createVNode(CIcon, {
|
|
141698
|
+
class: normalizeClass(point.dynamicValue ? "text-blue-500" : ""),
|
|
141699
|
+
icon: "caret-down"
|
|
141700
|
+
}, null, 8, ["class"])
|
|
141701
|
+
], 8, _hoisted_34$3)
|
|
141702
|
+
]),
|
|
141703
|
+
default: withCtx(() => [
|
|
141704
|
+
createElementVNode("div", _hoisted_35$3, [
|
|
141705
|
+
createElementVNode("div", _hoisted_36$3, [
|
|
142315
141706
|
createElementVNode("div", _hoisted_37$3, [
|
|
142316
|
-
createElementVNode("div",
|
|
142317
|
-
|
|
142318
|
-
createVNode(unref(
|
|
142319
|
-
|
|
142320
|
-
|
|
142321
|
-
|
|
142322
|
-
|
|
142323
|
-
|
|
142324
|
-
|
|
142325
|
-
|
|
142326
|
-
createVNode(unref(NSelect), {
|
|
142327
|
-
value: point.arrayConfig.xField,
|
|
142328
|
-
"onUpdate:value": [($event) => point.arrayConfig.xField = $event, ($event) => updateXYDynamicValueExpression(point)],
|
|
142329
|
-
options: getFieldOptions(point.selectedXValue)
|
|
142330
|
-
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
142331
|
-
]),
|
|
142332
|
-
createElementVNode("div", null, [
|
|
142333
|
-
createElementVNode("label", _hoisted_40$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.yValueField")), 1),
|
|
142334
|
-
createVNode(unref(NSelect), {
|
|
142335
|
-
value: point.arrayConfig.yField,
|
|
142336
|
-
"onUpdate:value": [($event) => point.arrayConfig.yField = $event, ($event) => updateXYDynamicValueExpression(point)],
|
|
142337
|
-
options: getFieldOptions(point.selectedXValue)
|
|
142338
|
-
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
141707
|
+
createElementVNode("div", _hoisted_38$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
|
|
141708
|
+
createElementVNode("div", _hoisted_39$3, [
|
|
141709
|
+
createVNode(unref(NTree), {
|
|
141710
|
+
"block-line": "",
|
|
141711
|
+
class: "max-h-[300px]",
|
|
141712
|
+
data: dynamicValueTreeData.value,
|
|
141713
|
+
"render-label": renderDynamicValueTreeLabel,
|
|
141714
|
+
"selected-keys": [point.dynamicValue?.path ?? ""],
|
|
141715
|
+
"onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point)
|
|
141716
|
+
}, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
|
|
142339
141717
|
])
|
|
142340
|
-
])
|
|
142341
|
-
|
|
141718
|
+
]),
|
|
141719
|
+
point.selectedValue && point.arrayConfig && (Array.isArray(point.selectedValue) || typeof point.selectedValue === "object" && point.selectedValue !== null) ? (openBlock(), createElementBlock("div", _hoisted_40$3, [
|
|
141720
|
+
_cache[14] || (_cache[14] = createElementVNode("div", { class: "text-sm font-medium mb-2" }, "Configure Array/Object Fields", -1)),
|
|
141721
|
+
createElementVNode("div", _hoisted_41$3, [
|
|
141722
|
+
createElementVNode("div", null, [
|
|
141723
|
+
_cache[12] || (_cache[12] = createElementVNode("label", { class: "block mb-1 text-sm" }, "Label Field", -1)),
|
|
141724
|
+
createVNode(unref(NSelect), {
|
|
141725
|
+
value: point.arrayConfig.labelField,
|
|
141726
|
+
"onUpdate:value": [($event) => point.arrayConfig.labelField = $event, ($event) => updateDynamicValueExpression(point)],
|
|
141727
|
+
options: getFieldOptions(point.selectedValue)
|
|
141728
|
+
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
141729
|
+
]),
|
|
141730
|
+
createElementVNode("div", null, [
|
|
141731
|
+
_cache[13] || (_cache[13] = createElementVNode("label", { class: "block mb-1 text-sm" }, "Value Field", -1)),
|
|
141732
|
+
createVNode(unref(NSelect), {
|
|
141733
|
+
value: point.arrayConfig.valueField,
|
|
141734
|
+
"onUpdate:value": [($event) => point.arrayConfig.valueField = $event, ($event) => updateDynamicValueExpression(point)],
|
|
141735
|
+
options: getFieldOptions(point.selectedValue)
|
|
141736
|
+
}, null, 8, ["value", "onUpdate:value", "options"])
|
|
141737
|
+
])
|
|
141738
|
+
])
|
|
141739
|
+
])) : createCommentVNode("", true)
|
|
141740
|
+
])
|
|
142342
141741
|
])
|
|
142343
|
-
])
|
|
142344
|
-
|
|
142345
|
-
|
|
142346
|
-
|
|
142347
|
-
|
|
142348
|
-
|
|
142349
|
-
|
|
142350
|
-
createVNode(unref(NInput), {
|
|
142351
|
-
value: point.yValue,
|
|
142352
|
-
"onUpdate:value": ($event) => point.yValue = $event,
|
|
142353
|
-
class: "flex-1",
|
|
142354
|
-
disabled: !!point.dynamicYValue,
|
|
142355
|
-
placeholder: "Y Value",
|
|
142356
|
-
type: "text"
|
|
142357
|
-
}, {
|
|
142358
|
-
suffix: withCtx(() => [
|
|
142359
|
-
createVNode(unref(NPopover), {
|
|
142360
|
-
placement: "bottom",
|
|
142361
|
-
show: activePopoverPoint.value === point && activePopoverField.value === "y",
|
|
142362
|
-
trigger: "manual",
|
|
142363
|
-
onClickoutside: closePopover
|
|
142364
|
-
}, {
|
|
142365
|
-
trigger: withCtx(() => [
|
|
142366
|
-
createElementVNode("div", {
|
|
142367
|
-
class: "cursor-pointer flex items-center",
|
|
142368
|
-
onClick: ($event) => handleDynamicValueClick(point, "y")
|
|
142369
|
-
}, [
|
|
142370
|
-
createVNode(CIcon, {
|
|
142371
|
-
class: normalizeClass(point.dynamicYValue ? "text-blue-500" : ""),
|
|
142372
|
-
icon: "caret-down"
|
|
142373
|
-
}, null, 8, ["class"])
|
|
142374
|
-
], 8, _hoisted_41$3)
|
|
142375
|
-
]),
|
|
142376
|
-
default: withCtx(() => [
|
|
142377
|
-
createElementVNode("div", _hoisted_42$3, [
|
|
142378
|
-
createElementVNode("div", _hoisted_43$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
|
|
142379
|
-
createVNode(unref(NTree), {
|
|
142380
|
-
"block-line": "",
|
|
142381
|
-
class: "max-h-[300px]",
|
|
142382
|
-
data: dynamicValueTreeData.value,
|
|
142383
|
-
"render-label": renderDynamicValueTreeLabel,
|
|
142384
|
-
"selected-keys": [point.dynamicYValue?.path ?? ""],
|
|
142385
|
-
"onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point, "y")
|
|
142386
|
-
}, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
|
|
142387
|
-
])
|
|
142388
|
-
]),
|
|
142389
|
-
_: 2
|
|
142390
|
-
}, 1032, ["show"])
|
|
142391
|
-
]),
|
|
142392
|
-
_: 2
|
|
142393
|
-
}, 1032, ["value", "onUpdate:value", "disabled"]),
|
|
141742
|
+
]),
|
|
141743
|
+
_: 2
|
|
141744
|
+
}, 1032, ["show"])
|
|
141745
|
+
]),
|
|
141746
|
+
_: 2
|
|
141747
|
+
}, 1032, ["value", "onUpdate:value", "disabled"]))
|
|
141748
|
+
]),
|
|
142394
141749
|
createVNode(CButton, {
|
|
142395
141750
|
circle: "",
|
|
142396
141751
|
class: "bg-error2 self-center",
|
|
142397
141752
|
size: "small",
|
|
142398
|
-
style: normalizeStyle(
|
|
141753
|
+
style: normalizeStyle({
|
|
141754
|
+
"--n-border": "1px solid transparent",
|
|
141755
|
+
"--n-border-disabled": "1px solid transparent",
|
|
141756
|
+
"--n-border-focus": "1px solid transparent",
|
|
141757
|
+
"--n-border-hover": "1px solid transparent",
|
|
141758
|
+
"--n-border-pressed": "1px solid transparent",
|
|
141759
|
+
"--n-color-focus": unref(themeVars).error2,
|
|
141760
|
+
"--n-color-hover": unref(themeVars).error2,
|
|
141761
|
+
"--n-color-disabled": unref(themeVars).error2,
|
|
141762
|
+
"--n-color-pressed": unref(themeVars).error2
|
|
141763
|
+
}),
|
|
142399
141764
|
type: "error",
|
|
142400
141765
|
onClick: ($event) => removeDataPoint(index)
|
|
142401
141766
|
}, {
|
|
@@ -142411,7 +141776,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142411
141776
|
}, 1032, ["style", "onClick"])
|
|
142412
141777
|
]);
|
|
142413
141778
|
}), 128)),
|
|
142414
|
-
createElementVNode("div",
|
|
141779
|
+
createElementVNode("div", _hoisted_42$3, [
|
|
142415
141780
|
createVNode(CButton, {
|
|
142416
141781
|
class: "mt-2",
|
|
142417
141782
|
"icon-placement": "left",
|
|
@@ -142431,62 +141796,11 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142431
141796
|
})
|
|
142432
141797
|
])
|
|
142433
141798
|
]),
|
|
142434
|
-
createElementVNode("div",
|
|
142435
|
-
|
|
142436
|
-
createElementVNode("label", _hoisted_47$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartTitle")), 1),
|
|
142437
|
-
createVNode(unref(NInput), {
|
|
142438
|
-
value: chartTitle.value,
|
|
142439
|
-
"onUpdate:value": _cache[2] || (_cache[2] = ($event) => chartTitle.value = $event),
|
|
142440
|
-
type: "text"
|
|
142441
|
-
}, null, 8, ["value"])
|
|
142442
|
-
]),
|
|
142443
|
-
["bar", "line"].includes(primaryChartType.value) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
142444
|
-
createElementVNode("div", _hoisted_48$3, [
|
|
142445
|
-
createElementVNode("label", _hoisted_49$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.xAxisLabel")), 1),
|
|
142446
|
-
createVNode(unref(NInput), {
|
|
142447
|
-
value: xAxisLabel.value,
|
|
142448
|
-
"onUpdate:value": _cache[3] || (_cache[3] = ($event) => xAxisLabel.value = $event),
|
|
142449
|
-
type: "text"
|
|
142450
|
-
}, null, 8, ["value"])
|
|
142451
|
-
]),
|
|
142452
|
-
createElementVNode("div", _hoisted_50$3, [
|
|
142453
|
-
createElementVNode("label", _hoisted_51$2, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.yAxisLabel")), 1),
|
|
142454
|
-
createVNode(unref(NInput), {
|
|
142455
|
-
value: yAxisLabel.value,
|
|
142456
|
-
"onUpdate:value": _cache[4] || (_cache[4] = ($event) => yAxisLabel.value = $event),
|
|
142457
|
-
type: "text"
|
|
142458
|
-
}, null, 8, ["value"])
|
|
142459
|
-
]),
|
|
142460
|
-
createElementVNode("div", _hoisted_52$2, [
|
|
142461
|
-
createElementVNode("label", _hoisted_53$2, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.orientation")), 1),
|
|
142462
|
-
createVNode(unref(NSelect), {
|
|
142463
|
-
value: orientation.value,
|
|
142464
|
-
"onUpdate:value": _cache[5] || (_cache[5] = ($event) => orientation.value = $event),
|
|
142465
|
-
options: orientationOptions
|
|
142466
|
-
}, null, 8, ["value"])
|
|
142467
|
-
])
|
|
142468
|
-
], 64)) : createCommentVNode("", true),
|
|
142469
|
-
["pie", "doughnut", "polarArea"].includes(primaryChartType.value) ? (openBlock(), createElementBlock("div", _hoisted_54$1, [
|
|
142470
|
-
createElementVNode("label", _hoisted_55$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.legendPosition")), 1),
|
|
142471
|
-
createVNode(unref(NSelect), {
|
|
142472
|
-
value: legendPosition.value,
|
|
142473
|
-
"onUpdate:value": _cache[6] || (_cache[6] = ($event) => legendPosition.value = $event),
|
|
142474
|
-
options: legendPositionOptions
|
|
142475
|
-
}, null, 8, ["value"])
|
|
142476
|
-
])) : createCommentVNode("", true),
|
|
142477
|
-
["line", "scatter", "area"].includes(primaryChartType.value) ? (openBlock(), createElementBlock("div", _hoisted_56$1, [
|
|
142478
|
-
createElementVNode("label", _hoisted_57$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.pointStyle")), 1),
|
|
142479
|
-
createVNode(unref(NSelect), {
|
|
142480
|
-
value: pointStyle.value,
|
|
142481
|
-
"onUpdate:value": _cache[7] || (_cache[7] = ($event) => pointStyle.value = $event),
|
|
142482
|
-
options: pointStyleOptions
|
|
142483
|
-
}, null, 8, ["value"])
|
|
142484
|
-
])) : createCommentVNode("", true),
|
|
142485
|
-
createElementVNode("div", _hoisted_58$1, [
|
|
142486
|
-
createElementVNode("label", _hoisted_59$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.colorScheme")), 1),
|
|
141799
|
+
createElementVNode("div", _hoisted_43$3, [
|
|
141800
|
+
createElementVNode("label", _hoisted_44$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.colorScheme")), 1),
|
|
142487
141801
|
createVNode(unref(NSelect), {
|
|
142488
141802
|
value: colorSchemeType.value,
|
|
142489
|
-
"onUpdate:value": _cache[
|
|
141803
|
+
"onUpdate:value": _cache[9] || (_cache[9] = ($event) => colorSchemeType.value = $event),
|
|
142490
141804
|
class: "mb-2",
|
|
142491
141805
|
options: [
|
|
142492
141806
|
{ label: unref(t)("canvasUI.canvasBuilder.dataCharts.useThemeColors"), value: "theme" },
|
|
@@ -142503,106 +141817,19 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142503
141817
|
"onUpdate:palette": updateChartColors
|
|
142504
141818
|
}, null, 8, ["allow-add", "allow-delete", "allow-edit", "initial-palette"]))
|
|
142505
141819
|
]),
|
|
142506
|
-
createElementVNode("div",
|
|
142507
|
-
createElementVNode("label",
|
|
141820
|
+
createElementVNode("div", _hoisted_45$3, [
|
|
141821
|
+
createElementVNode("label", _hoisted_46$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.animation")), 1),
|
|
142508
141822
|
createVNode(unref(NSwitch), {
|
|
142509
141823
|
value: enableAnimation.value,
|
|
142510
|
-
"onUpdate:value": _cache[
|
|
141824
|
+
"onUpdate:value": _cache[10] || (_cache[10] = ($event) => enableAnimation.value = $event)
|
|
142511
141825
|
}, null, 8, ["value"])
|
|
142512
|
-
]),
|
|
142513
|
-
createElementVNode("div", _hoisted_62$1, [
|
|
142514
|
-
createElementVNode("label", _hoisted_63$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.percentDisplay")), 1),
|
|
142515
|
-
createElementVNode("div", _hoisted_64$1, [
|
|
142516
|
-
createVNode(unref(NSwitch), {
|
|
142517
|
-
value: percentDisplay.value,
|
|
142518
|
-
"onUpdate:value": _cache[10] || (_cache[10] = ($event) => percentDisplay.value = $event)
|
|
142519
|
-
}, null, 8, ["value"]),
|
|
142520
|
-
createElementVNode("span", _hoisted_65$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.percentDisplayHint")), 1)
|
|
142521
|
-
])
|
|
142522
|
-
]),
|
|
142523
|
-
createElementVNode("div", _hoisted_66$1, [
|
|
142524
|
-
createElementVNode("label", _hoisted_67$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.viewModeControls")), 1),
|
|
142525
|
-
createElementVNode("div", _hoisted_68$1, [
|
|
142526
|
-
createElementVNode("div", _hoisted_69, [
|
|
142527
|
-
createVNode(unref(NSwitch), {
|
|
142528
|
-
value: enableFullscreenBtn.value,
|
|
142529
|
-
"onUpdate:value": _cache[11] || (_cache[11] = ($event) => enableFullscreenBtn.value = $event)
|
|
142530
|
-
}, null, 8, ["value"]),
|
|
142531
|
-
createElementVNode("span", _hoisted_70, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableFullscreenBtn")), 1)
|
|
142532
|
-
]),
|
|
142533
|
-
createVNode(unref(NTooltip), {
|
|
142534
|
-
disabled: !isMultiSeries.value,
|
|
142535
|
-
trigger: "hover"
|
|
142536
|
-
}, {
|
|
142537
|
-
trigger: withCtx(() => [
|
|
142538
|
-
createElementVNode("div", {
|
|
142539
|
-
class: normalizeClass(["flex items-center gap-2", { "opacity-50 cursor-not-allowed": isMultiSeries.value }])
|
|
142540
|
-
}, [
|
|
142541
|
-
createVNode(unref(NSwitch), {
|
|
142542
|
-
value: enableChartTypeSwitcher.value,
|
|
142543
|
-
"onUpdate:value": _cache[12] || (_cache[12] = ($event) => enableChartTypeSwitcher.value = $event),
|
|
142544
|
-
disabled: isMultiSeries.value
|
|
142545
|
-
}, null, 8, ["value", "disabled"]),
|
|
142546
|
-
createElementVNode("span", _hoisted_71, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableChartTypeSwitcher")), 1)
|
|
142547
|
-
], 2)
|
|
142548
|
-
]),
|
|
142549
|
-
default: withCtx(() => [
|
|
142550
|
-
createTextVNode(" " + toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartTypeSwitcherMultiSeriesDisabled")), 1)
|
|
142551
|
-
]),
|
|
142552
|
-
_: 1
|
|
142553
|
-
}, 8, ["disabled"]),
|
|
142554
|
-
createElementVNode("div", _hoisted_72, [
|
|
142555
|
-
createVNode(unref(NSwitch), {
|
|
142556
|
-
value: enableDataEntry.value,
|
|
142557
|
-
"onUpdate:value": _cache[13] || (_cache[13] = ($event) => enableDataEntry.value = $event)
|
|
142558
|
-
}, null, 8, ["value"]),
|
|
142559
|
-
createElementVNode("span", _hoisted_73, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableDataEntry")), 1)
|
|
142560
|
-
])
|
|
142561
|
-
])
|
|
142562
|
-
]),
|
|
142563
|
-
createElementVNode("div", _hoisted_74, [
|
|
142564
|
-
createElementVNode("label", _hoisted_75, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartSize")), 1),
|
|
142565
|
-
createElementVNode("div", _hoisted_76, [
|
|
142566
|
-
createElementVNode("div", _hoisted_77, [
|
|
142567
|
-
createElementVNode("label", _hoisted_78, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.height")), 1),
|
|
142568
|
-
createVNode(unref(NInputNumber), {
|
|
142569
|
-
value: chartHeight.value,
|
|
142570
|
-
"onUpdate:value": _cache[14] || (_cache[14] = ($event) => chartHeight.value = $event),
|
|
142571
|
-
class: "flex-1",
|
|
142572
|
-
max: 1e3,
|
|
142573
|
-
min: 100,
|
|
142574
|
-
step: 10
|
|
142575
|
-
}, {
|
|
142576
|
-
suffix: withCtx(() => _cache[17] || (_cache[17] = [
|
|
142577
|
-
createTextVNode("px")
|
|
142578
|
-
])),
|
|
142579
|
-
_: 1
|
|
142580
|
-
}, 8, ["value"])
|
|
142581
|
-
]),
|
|
142582
|
-
createElementVNode("div", _hoisted_79, [
|
|
142583
|
-
createElementVNode("label", _hoisted_80, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.width")), 1),
|
|
142584
|
-
createVNode(unref(NInputNumber), {
|
|
142585
|
-
value: chartWidth.value,
|
|
142586
|
-
"onUpdate:value": _cache[15] || (_cache[15] = ($event) => chartWidth.value = $event),
|
|
142587
|
-
class: "flex-1",
|
|
142588
|
-
max: 100,
|
|
142589
|
-
min: 10,
|
|
142590
|
-
step: 5
|
|
142591
|
-
}, {
|
|
142592
|
-
suffix: withCtx(() => _cache[18] || (_cache[18] = [
|
|
142593
|
-
createTextVNode("%")
|
|
142594
|
-
])),
|
|
142595
|
-
_: 1
|
|
142596
|
-
}, 8, ["value"])
|
|
142597
|
-
])
|
|
142598
|
-
])
|
|
142599
141826
|
])
|
|
142600
141827
|
])
|
|
142601
141828
|
])
|
|
142602
141829
|
]),
|
|
142603
|
-
createElementVNode("div",
|
|
142604
|
-
createElementVNode("div",
|
|
142605
|
-
createElementVNode("div",
|
|
141830
|
+
createElementVNode("div", _hoisted_47$3, [
|
|
141831
|
+
createElementVNode("div", _hoisted_48$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.preview")), 1),
|
|
141832
|
+
createElementVNode("div", _hoisted_49$3, [
|
|
142606
141833
|
createVNode(unref(NCard), { bordered: false }, {
|
|
142607
141834
|
default: withCtx(() => [
|
|
142608
141835
|
(openBlock(), createBlock(RawDataCharts, {
|
|
@@ -142610,8 +141837,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
|
|
|
142610
141837
|
data: {
|
|
142611
141838
|
...previewData.value,
|
|
142612
141839
|
context: unref(crmShape)
|
|
142613
|
-
}
|
|
142614
|
-
"is-preview": ""
|
|
141840
|
+
}
|
|
142615
141841
|
}, null, 8, ["data"]))
|
|
142616
141842
|
]),
|
|
142617
141843
|
_: 1
|
|
@@ -142668,12 +141894,6 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
142668
141894
|
usedInSectionId,
|
|
142669
141895
|
when_used_in_section
|
|
142670
141896
|
});
|
|
142671
|
-
const canEditChart = computed(() => {
|
|
142672
|
-
if (mode.value === CanvasBuilderMode.ADMIN) {
|
|
142673
|
-
return true;
|
|
142674
|
-
}
|
|
142675
|
-
return props.data?.view_controls?.enable_data_entry ?? false;
|
|
142676
|
-
});
|
|
142677
141897
|
onMounted(() => {
|
|
142678
141898
|
if (justAddedComponentId.value === props.id) {
|
|
142679
141899
|
setComponentEditMode(ComponentTypes.DataCharts, props.id);
|
|
@@ -142685,7 +141905,7 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
142685
141905
|
unref(shouldDisplayPlaceholderComponent)(unref(isEditMode), unref(mode), _ctx.visible) ? (openBlock(), createBlock(PlaceholderComponent, {
|
|
142686
141906
|
key: 0,
|
|
142687
141907
|
name: _ctx.tracking_id
|
|
142688
|
-
}, null, 8, ["name"])) : unref(isEditMode) && !unref(isViewOnlyMode) && unref(componentPermissions).hasSomethingEditable
|
|
141908
|
+
}, null, 8, ["name"])) : unref(isEditMode) && !unref(isViewOnlyMode) && unref(componentPermissions).hasSomethingEditable ? (openBlock(), createBlock(_sfc_main$34, {
|
|
142689
141909
|
key: 1,
|
|
142690
141910
|
id: unref(id),
|
|
142691
141911
|
active: unref(componentEditMode) && unref(componentEditMode)?.id === unref(id),
|
|
@@ -142707,7 +141927,6 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
142707
141927
|
key: key.value,
|
|
142708
141928
|
class: "ma-1",
|
|
142709
141929
|
data: _ctx.data,
|
|
142710
|
-
"is-edit-mode": "",
|
|
142711
141930
|
style: normalizeStyle(_ctx.style)
|
|
142712
141931
|
}, null, 8, ["data", "style"])) : (openBlock(), createBlock(_sfc_main$2G, {
|
|
142713
141932
|
key: 1,
|
|
@@ -142719,9 +141938,8 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
|
|
|
142719
141938
|
}, 8, ["id", "active", "duplicate", "edit", "remove", "selected", "settings", "stylable"])) : (openBlock(), createBlock(RawDataCharts, {
|
|
142720
141939
|
key: 2,
|
|
142721
141940
|
data: _ctx.data,
|
|
142722
|
-
"is-edit-mode": unref(isEditMode),
|
|
142723
141941
|
style: normalizeStyle(_ctx.style)
|
|
142724
|
-
}, null, 8, ["data", "
|
|
141942
|
+
}, null, 8, ["data", "style"])),
|
|
142725
141943
|
unref(componentEditMode) && unref(componentEditMode).id === unref(id) ? (openBlock(), createBlock(_sfc_main$2E, {
|
|
142726
141944
|
key: 3,
|
|
142727
141945
|
id: unref(id),
|
|
@@ -182477,5 +181695,5 @@ const localeNames = {
|
|
|
182477
181695
|
};
|
|
182478
181696
|
const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
|
|
182479
181697
|
|
|
182480
|
-
export { ADMIN_API_METHOD_TYPES, ADMIN_API_TYPES, ADMIN_MESSAGE, ADMIN_MESSAGE_TYPES, APPS_DB, AccessTypeEnum, App$3 as AgendaSelectorApp, AppTypeEnum, _sfc_main as AssetsManagerApp, App$1 as Browser, BulkUpdateMetadataOperationEnum, BulkUpdateTagsOperationEnum, CALL_STORAGE_KEY, CANVASES, CANVAS_HOOKS, CANVAS_TYPOGRAPHY_CSS_PROPERTIES, CANVAS_TYPOGRAPHY_PRESETS, CAlgoliaSearch, CAssignedCanvasesManagement, _sfc_main$4n as CAssignedCanvasesManagementToolbar, _sfc_main$6q as CAvatar, _sfc_main$4M as CBlockManagement, CButton, _sfc_main$5d as CCanvasDeleteDialogContent, _sfc_main$5e as CCanvasMetadataFilters, CCanvasSelector, _sfc_main$6T as CCard, CCarousel, _sfc_main$3G as CCatalogIqSwitcher, _sfc_main$6S as CCheckbox, _sfc_main$3A as CChip, CCollapse, _sfc_main$6P as CCollapseItem, _sfc_main$6p as CCollapseTransition, NColorPicker as CColorPicker, CComponentListItem, CConfigEditor, NConfigProvider as CConfigProvider, _sfc_main$6f as CConfirmationAction, CConfirmationContent, CConfirmationHeader, CConfirmationModal, CContactSelector, CContactSelectorSelected, _sfc_main$66 as CContentError, _sfc_main$63 as CCreateCanvasModal, _sfc_main$62 as CCreateTemplateSectionBlockModal, _sfc_main$5T as CCreateThemeModal, CDP_EVENT_TYPE, CDataTable, NDatePicker as CDatePicker, CDateRangeFilter, CDetailPageSectionButtons, NDialogProvider as CDialogProvider, _sfc_main$6N as CDivider, _sfc_main$6M as CDrawer, _sfc_main$6L as CDrawerContent, _sfc_main$6K as CDropdown, _sfc_main$6n as CEmpty, _sfc_main$4k as CEntitySelector, _sfc_main$6J as CErrorFullScreen, _sfc_main$6l as CFeedback, _sfc_main$3o as CFileAccessManagement, _sfc_main$6A as CFileAttributes, _sfc_main$3p as CFilePanel, _sfc_main$6G as CFileThumbnail, CFileViewer, CFilesAccessInfo, _sfc_main$3Z as CFilesAccessManage, _sfc_main$3I as CFilesFolderDeleteDialogContent, NForm as CForm, NFormItem as CFormItem, NFormItemCol as CFormItemCol, NFormItemGridItem as CFormItemGi, NFormItemGridItem as CFormItemGridItem, FormItemRow as CFormItemRow, _sfc_main$4f as CFullScreenLoader, NGridItem as CGi, CGlobalLoader, _sfc_main$5M as CGlobalSearch, GlobalStyle as CGlobalStyle, NGrid as CGrid, NGridItem as CGridItem, CGroupsAccessInfo, NH1 as CH1, NH2 as CH2, NH3 as CH3, NH4 as CH4, NH5 as CH5, NH6 as CH6, _sfc_main$6k as CHelpText, CIcon, _sfc_main$6I as CImage, _sfc_main$4U as CInfoBadge, _sfc_main$6z as CInput, NInputNumber as CInputNumber, _sfc_main$3y as CKnockNotificationsAppWrapper, CLIENT_TYPE, NLayout as CLayout, NLayoutContent as CLayoutContent, LayoutFooter as CLayoutFooter, LayoutHeader as CLayoutHeader, LayoutSider as CLayoutSider, _sfc_main$4V as CList, NMessageProvider as CMessageProvider, _sfc_main$5J as CMetaDataBadge, _sfc_main$6y as CModal, CMonacoEditor, CMovableWidget, CMultiSelect, NNotificationProvider as CNotificationProvider, NPagination as CPagination, _sfc_main$6j as CPillSelect, _sfc_main$6x as CPopover, _sfc_main$6H as CProcessingOverlay, NProgress as CProgress, _sfc_main$5q as CRichTextEditor, _sfc_main$4o as CSavedCanvasesManagement, CSearch, _sfc_main$6v as CSearchOnClick, CSearchOnClickWithSuggestions, CSecondaryNav, _sfc_main$4P as CSectionManagement, CSelect, CSelectFilter, _sfc_main$3x as CSettingsEditor, CShortcut, CSingleSelect, NSkeleton as CSkeleton, _sfc_main$3C as CSlideViewer, NSpace as CSpace, _sfc_main$6o as CSpin, _sfc_main$6m as CSwitch, CTable, _sfc_main$5a as CTableInput, CTableMore, CTableSelect, CTableTag, _sfc_main$6D as CTag, CTags, _sfc_main$4E as CTemplateManagement, text as CText, _sfc_main$6t as CThemeEditor, _sfc_main$4z as CThemeManagement, _sfc_main$5j as CToastProvider, CToolbar, _sfc_main$6r as CTooltip, CUpsertFolderModal, _sfc_main$5n as CUserAvatar, CUserMenu, CUsersAccessInfo, CUsersGroupsAccessManage, _sfc_main$5k as CVirtualTable, _sfc_main$46 as CWarningAlert, CallState, CanvasActions, _sfc_main$15 as CanvasBuilderApp, CanvasBuilderMode, CanvasExcludedComponentTypesEnum, CanvasHistoryAction, App as CanvasSelector, CanvasStatus, CanvasThemeStatus, CanvasesViewsTypes, CollaborationRoleEnum, CollectionPlayerApp, App$4 as CollectionSelectorApp, ComponentIcon, ComponentTypes, ContactSelectorQuickFilterType, ContentGridLayoutTypes, ContentSelector, CoreFolderEntityType, DATE_TIME_FORMAT, DEFAULT_ADMIN_TABLE_HEIGHT, DEFAULT_ADMIN_TABLE_WITH_PAGINATION_HEIGHT, DEFAULT_GLOBAL_COMPONENT_SPACING, DEFAULT_GLOBAL_COMPONENT_SPACING_INTERVAL, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PEER_CONNECTIVITY_VERSION, DEFAULT_PITCHER_SETTINGS, DSR_API_METHOD_TYPES, DSR_API_TYPES, DSR_MESSAGE, DSR_MESSAGE_TYPES, DSR_TYPE, DefaultExpiresAtEnum, DownloadTypeEnum, EMBED_TYPE, EventAction, EventExternalObjectContentTypeEnum, EventStatusEnum, FileContentTypeEnum, FileStatusEnum, FileTypeEnum, GlobalSearchResultType, GridLayoutTypes, HIDE_IF_EMPTY_COMPONENT_ID_TAG_PREFIX, HIDE_IF_EMPTY_COMPONENT_TRACKING_ID_TAG_PREFIX, HIDE_TAGS_WITH_PREFIX, HtmlLayoutTypes, IFRAME_ACTION_TYPES, IFRAME_DATA_MESSAGE, INITIAL_CALL_STATE, IS_DEV_ORG, IS_LOCALHOST, InstanceMembershipRoleEnum, InstanceMembershipUserStatusEnum, InvitationStatusEnum, LanguageEnum, LinkAlignmentTypes, LinkAnchorTypes, LinkPreviewTypes, MAX_LUMINANCE_FOR_LIGHT_TEXT, MAX_UPLOAD_SIZE, MIN_DIFFERENCE_IN_MINUTES, MetadataTemplateFieldTypeEnum, MultimediaHorizontalAlignmentOptions, NON_MEMBER_ROLES, NotesApp, OperatorEnum, PAPER_SIZE_PRESETS, PEER_CONNECTIVITY_EVENT, PEER_CONNECTIVITY_HANDLER_MATCH_ALL, PITCHER_EVENT, PITCHER_SETTINGS_KEY, PLATFORM_TYPE, PRINT_SCALE_FACTOR, PeerConnectivityActions, PitcherBroadcastedEventName, PitcherEventName, PitcherExternalEventName, PitcherMessageType, PitcherResponseStatus, PostAction, App$2 as PptConversionSelectorApp, REQUEST_DEFAULT_CANCEL_TIMEOUT, SEARCH_DEBOUNCE_TIME, SUPPORTED_FONT_EXTENSIONS, SUPPORTED_FONT_TYPES, SUPPORTED_IMAGE_EXTENSIONS, SUPPORTED_IMAGE_TYPES, SUPPORTED_UPLOAD_FILE_EXTENSIONS, SUPPORTED_VIDEO_EXTENSIONS, SUPPORTED_VIDEO_TYPES, SfEventColors, SfEventColorsLight, StorageRegionEnum, TRACKING_EVENTS_STORAGE_KEY, UI_API_METHOD_TYPES, UI_MESSAGE, UI_MESSAGE_TYPES, UI_NATIVE_MESSAGE_TYPES, UserRoleEnum, ViewCompactItemType, addCanvasComponent, _export as agendaSelector, applyCanvasThemeAssetsToNode, applyFont, applyToTreeBy, autofocus as autofocusDirective, camelCaseKeys, canvasUiUnoPreset, clearLocalStorageIfNeeded, ClickOutsideDirective as clickOutsideDirective, collectAllNodesByCondition, _export$3 as collectionPlayer, _export$2 as collectionSelector, componentIconType, computeLocalStorageBytes, convertSecondsToMinutes, convertToPixels, convertToSosl, createNodeId, createPitcherSettings, dayjs, deepDiff, deepToRaw, derivePatchRequestFields, determineUserRole, discardSectionComponentOverride, displayBytesWithMUnit, displayIntegerWithMunit, doesLocalOverrideExist, downloadFile, draggable as draggableDirective, elementMounted as elementMountedDirective, escapeSoqlString, evaluateAccessor, executeWithDoublingTime, exitFullscreen, fallbackLocale, fetchAll, fetchAllWithOffset, fetchFirstChunkAndRemainingAsync, filterTreeBy, findAllEmbeddableTypesInCanvasContent, findAllEmbeddableTypesInSectionsContent, findEmbeddableInCanvasContent, findEmbeddableInSectionsContent, findNodeInTreeByCondition, findNodeInTreeById, findNodeInTreeByType, findParentByNodeId, formatDate, formatDateDetailed, formatDateTime, formatDateTimeAgo, formatDayMonthBasedOnBrowserLang, formatDimensionForGotenberg, generateAIThumbnailUrl, getAllPages, getAppConfigFromAppSource, getAvailableApis, getComponentDescription, getComponentKeywords, getComponentTitle, getContrastTextColor, getDefinedProps, getEventColor, getExcessItemsIndexes, getFontAwesomeIconNameAndType, getImageSize, getLocalOverrideUrl, getLuminance, getNextPageParam, getNodeDisplayNameByComponentType, getNumberWithRegex, getPageQuantity, getPageRange, getPreviewUrl, getRoleIcon, getSectionGlobalComponentSpacing, handleThemeAssetComparison, highLevelApi, indirectEval, insertItemSorted, isAfter, isBefore, isBeforeMinDate, isEmbeddableWithZeroHeight, isFirefox, isFullscreen, isHeadlessOrNotAvailableApp, isImageAccessible, isIosDevice, isMac, isMobile, isModifierClick, isNonMemberRole, isOriginValid, isPastMaxDate, isPitcherOrIosDevice, isPitcherWkWebView, isQueryParamTruthy, isSafari, isSafariOnIosDevice, isSameOrAfter, isSameOrBefore, isTextComponentEmpty, isTouchScreen, isValidHex, isWindows, lightThemeOverrides, loadRemoteScriptWithCtx, loadScript, loadScriptStyle, loadStyle, localeDropdownOptions, localeNames, locales, minFutureDate, minPastDate, moveNodeTo, msToSeconds, navigateTo, normalizeFilterParams, normalizeNetworkFilterParams, openUsdz, parseCollectionPlayerSlidesToContentSelector, parseContentSelectorToCollectionPlayerSlides, parseFileToCollectionPlayer, parsePdfFileToCollectionPlayer, parsePptxFileToCollectionPlayer, pascalCaseKeys, _export$1 as pptConversionSelector, processCanvasForSectionThemeOverride, regenerateTreeIds, registerPeerConnectivityHandler, replaceThemePresetsWithInlineStyles, replaceTranslationMessagesWithOverrides, requestFullscreen, requestStream, scrollCanvasToTop, scrollToComponentById, secondsToHumanReadable, sendPeerConnectivityEvent, setDateTime, shouldDisplayPlaceholderComponent, shouldOpenInCollectionPlayerViewer, shouldShowEmbeddable, skipElementsInTree, snakeCaseKeys, someNodeInTree, sortCollectionByString, splitUserName, stringToHslColor, supportedLocales, tapDirective, titleCase, toggleFullscreen, tooltipDirective, transformFilesToCollectionPlayer, transformFilesToContentGrid, updateFirstContentGridWithShareboxItems, urlSafeFetchInChunks, useAdmin, useAdminAndDsrState, useApi, useAppsDb, useBindValidation, useBroadcastRouteChange, useCanvasById, useCanvasLocks, useCanvasOverlay, useCanvasVisibility, useCanvasesAsInfinity, useCollectionPlayerOverlay, useCommentTracking, useConfirmation, useCreateEvent, useDeleteEvent, useDsr, useFetchCanvases, useFetchEvents, useFetchUsers, useFileDisplayHelpers, useFolderNameDescription, useGlobalSearch, useInfiniteScroll, useLocation, useMetadataSearch, useMetadataTemplates, useNotesApp, useNotification, useOpenFileStack, usePitcherApi, usePolling, usePresentationHistory, useRecentFiles, useShareCanvas, useSharedCommentsStorage, useSuggestedTags, useTheme, useThemeVars, useToast, useUi, useUpdateEvent, useWindowEvents, vueQueryPluginOptions, wait, waitForIframeInitialize, waitForValue };
|
|
181698
|
+
export { ADMIN_API_METHOD_TYPES, ADMIN_API_TYPES, ADMIN_MESSAGE, ADMIN_MESSAGE_TYPES, APPS_DB, AccessTypeEnum, App$3 as AgendaSelectorApp, AppTypeEnum, _sfc_main as AssetsManagerApp, App$1 as Browser, BulkUpdateMetadataOperationEnum, BulkUpdateTagsOperationEnum, CALL_STORAGE_KEY, CANVASES, CANVAS_HOOKS, CANVAS_TYPOGRAPHY_CSS_PROPERTIES, CANVAS_TYPOGRAPHY_PRESETS, CAlgoliaSearch, CAssignedCanvasesManagement, _sfc_main$4n as CAssignedCanvasesManagementToolbar, _sfc_main$6q as CAvatar, _sfc_main$4M as CBlockManagement, CButton, _sfc_main$5d as CCanvasDeleteDialogContent, _sfc_main$5e as CCanvasMetadataFilters, CCanvasSelector, _sfc_main$6T as CCard, CCarousel, _sfc_main$3G as CCatalogIqSwitcher, _sfc_main$6S as CCheckbox, _sfc_main$3A as CChip, CCollapse, _sfc_main$6P as CCollapseItem, _sfc_main$6p as CCollapseTransition, NColorPicker as CColorPicker, CComponentListItem, CConfigEditor, NConfigProvider as CConfigProvider, _sfc_main$6f as CConfirmationAction, CConfirmationContent, CConfirmationHeader, CConfirmationModal, CContactSelector, CContactSelectorSelected, _sfc_main$66 as CContentError, _sfc_main$63 as CCreateCanvasModal, _sfc_main$62 as CCreateTemplateSectionBlockModal, _sfc_main$5T as CCreateThemeModal, CDP_EVENT_TYPE, CDataTable, NDatePicker as CDatePicker, CDateRangeFilter, CDetailPageSectionButtons, NDialogProvider as CDialogProvider, _sfc_main$6N as CDivider, _sfc_main$6M as CDrawer, _sfc_main$6L as CDrawerContent, _sfc_main$6K as CDropdown, _sfc_main$6n as CEmpty, _sfc_main$4k as CEntitySelector, _sfc_main$6J as CErrorFullScreen, _sfc_main$6l as CFeedback, _sfc_main$3o as CFileAccessManagement, _sfc_main$6A as CFileAttributes, _sfc_main$3p as CFilePanel, _sfc_main$6G as CFileThumbnail, CFileViewer, CFilesAccessInfo, _sfc_main$3Z as CFilesAccessManage, _sfc_main$3I as CFilesFolderDeleteDialogContent, NForm as CForm, NFormItem as CFormItem, NFormItemCol as CFormItemCol, NFormItemGridItem as CFormItemGi, NFormItemGridItem as CFormItemGridItem, FormItemRow as CFormItemRow, _sfc_main$4f as CFullScreenLoader, NGridItem as CGi, CGlobalLoader, _sfc_main$5M as CGlobalSearch, GlobalStyle as CGlobalStyle, NGrid as CGrid, NGridItem as CGridItem, CGroupsAccessInfo, NH1 as CH1, NH2 as CH2, NH3 as CH3, NH4 as CH4, NH5 as CH5, NH6 as CH6, _sfc_main$6k as CHelpText, CIcon, _sfc_main$6I as CImage, _sfc_main$4U as CInfoBadge, _sfc_main$6z as CInput, NInputNumber as CInputNumber, _sfc_main$3y as CKnockNotificationsAppWrapper, CLIENT_TYPE, NLayout as CLayout, NLayoutContent as CLayoutContent, LayoutFooter as CLayoutFooter, LayoutHeader as CLayoutHeader, LayoutSider as CLayoutSider, _sfc_main$4V as CList, NMessageProvider as CMessageProvider, _sfc_main$5J as CMetaDataBadge, _sfc_main$6y as CModal, CMonacoEditor, CMovableWidget, CMultiSelect, NNotificationProvider as CNotificationProvider, NPagination as CPagination, _sfc_main$6j as CPillSelect, _sfc_main$6x as CPopover, _sfc_main$6H as CProcessingOverlay, NProgress as CProgress, _sfc_main$5q as CRichTextEditor, _sfc_main$4o as CSavedCanvasesManagement, CSearch, _sfc_main$6v as CSearchOnClick, CSearchOnClickWithSuggestions, CSecondaryNav, _sfc_main$4P as CSectionManagement, CSelect, CSelectFilter, _sfc_main$3x as CSettingsEditor, CShortcut, CSingleSelect, NSkeleton as CSkeleton, _sfc_main$3C as CSlideViewer, NSpace as CSpace, _sfc_main$6o as CSpin, _sfc_main$6m as CSwitch, CTable, _sfc_main$5a as CTableInput, CTableMore, CTableSelect, CTableTag, _sfc_main$6D as CTag, CTags, _sfc_main$4E as CTemplateManagement, text as CText, _sfc_main$6t as CThemeEditor, _sfc_main$4z as CThemeManagement, _sfc_main$5j as CToastProvider, CToolbar, _sfc_main$6r as CTooltip, CUpsertFolderModal, _sfc_main$5n as CUserAvatar, CUserMenu, CUsersAccessInfo, CUsersGroupsAccessManage, _sfc_main$5k as CVirtualTable, _sfc_main$46 as CWarningAlert, CallState, CanvasActions, _sfc_main$15 as CanvasBuilderApp, CanvasBuilderMode, CanvasExcludedComponentTypesEnum, CanvasHistoryAction, App as CanvasSelector, CanvasStatus, CanvasThemeStatus, CanvasesViewsTypes, CollaborationRoleEnum, CollectionPlayerApp, App$4 as CollectionSelectorApp, ComponentIcon, ComponentTypes, ContactSelectorQuickFilterType, ContentGridLayoutTypes, ContentSelector, CoreFolderEntityType, DATE_TIME_FORMAT, DEFAULT_ADMIN_TABLE_HEIGHT, DEFAULT_ADMIN_TABLE_WITH_PAGINATION_HEIGHT, DEFAULT_GLOBAL_COMPONENT_SPACING, DEFAULT_GLOBAL_COMPONENT_SPACING_INTERVAL, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_PEER_CONNECTIVITY_VERSION, DEFAULT_PITCHER_SETTINGS, DSR_API_METHOD_TYPES, DSR_API_TYPES, DSR_MESSAGE, DSR_MESSAGE_TYPES, DSR_TYPE, DefaultExpiresAtEnum, DownloadTypeEnum, EMBED_TYPE, EventAction, EventExternalObjectContentTypeEnum, EventStatusEnum, FileContentTypeEnum, FileStatusEnum, FileTypeEnum, GlobalSearchResultType, GridLayoutTypes, HIDE_IF_EMPTY_COMPONENT_ID_TAG_PREFIX, HIDE_IF_EMPTY_COMPONENT_TRACKING_ID_TAG_PREFIX, HIDE_TAGS_WITH_PREFIX, HtmlLayoutTypes, IFRAME_ACTION_TYPES, IFRAME_DATA_MESSAGE, INITIAL_CALL_STATE, IS_DEV_ORG, IS_LOCALHOST, InstanceMembershipRoleEnum, InstanceMembershipUserStatusEnum, InvitationStatusEnum, LanguageEnum, LinkAlignmentTypes, LinkAnchorTypes, LinkPreviewTypes, MAX_LUMINANCE_FOR_LIGHT_TEXT, MAX_UPLOAD_SIZE, MIN_DIFFERENCE_IN_MINUTES, MetadataTemplateFieldTypeEnum, MultimediaHorizontalAlignmentOptions, NON_MEMBER_ROLES, NotesApp, OperatorEnum, PAPER_SIZE_PRESETS, PEER_CONNECTIVITY_EVENT, PEER_CONNECTIVITY_HANDLER_MATCH_ALL, PITCHER_EVENT, PITCHER_SETTINGS_KEY, PLATFORM_TYPE, PRINT_SCALE_FACTOR, PeerConnectivityActions, PitcherBroadcastedEventName, PitcherEventName, PitcherExternalEventName, PitcherMessageType, PitcherResponseStatus, PostAction, App$2 as PptConversionSelectorApp, REQUEST_DEFAULT_CANCEL_TIMEOUT, SEARCH_DEBOUNCE_TIME, SUPPORTED_FONT_EXTENSIONS, SUPPORTED_FONT_TYPES, SUPPORTED_IMAGE_EXTENSIONS, SUPPORTED_IMAGE_TYPES, SUPPORTED_UPLOAD_FILE_EXTENSIONS, SUPPORTED_VIDEO_EXTENSIONS, SUPPORTED_VIDEO_TYPES, SfEventColors, SfEventColorsLight, StorageRegionEnum, TRACKING_EVENTS_STORAGE_KEY, UI_API_METHOD_TYPES, UI_MESSAGE, UI_MESSAGE_TYPES, UI_NATIVE_MESSAGE_TYPES, UserRoleEnum, ViewCompactItemType, addCanvasComponent, _export as agendaSelector, applyCanvasThemeAssetsToNode, applyFont, applyToTreeBy, autofocus as autofocusDirective, camelCaseKeys, canvasUiUnoPreset, clearLocalStorageIfNeeded, ClickOutsideDirective as clickOutsideDirective, collectAllNodesByCondition, _export$3 as collectionPlayer, _export$2 as collectionSelector, componentIconType, computeLocalStorageBytes, convertSecondsToMinutes, convertToPixels, convertToSosl, createNodeId, createPitcherSettings, dayjs, deepDiff, deepToRaw, derivePatchRequestFields, determineUserRole, discardSectionComponentOverride, displayBytesWithMUnit, displayIntegerWithMunit, doesLocalOverrideExist, downloadFile, draggable as draggableDirective, elementMounted as elementMountedDirective, escapeSoqlString, evaluateAccessor, executeWithDoublingTime, exitFullscreen, fallbackLocale, fetchAll, fetchAllWithOffset, fetchFirstChunkAndRemainingAsync, filterTreeBy, findAllEmbeddableTypesInCanvasContent, findAllEmbeddableTypesInSectionsContent, findEmbeddableInCanvasContent, findEmbeddableInSectionsContent, findNodeInTreeByCondition, findNodeInTreeById, findNodeInTreeByType, findParentByNodeId, formatDate, formatDateDetailed, formatDateTime, formatDateTimeAgo, formatDayMonthBasedOnBrowserLang, formatDimensionForGotenberg, generateAIThumbnailUrl, getAllPages, getAppConfigFromAppSource, getAvailableApis, getComponentDescription, getComponentKeywords, getComponentTitle, getContrastTextColor, getDefinedProps, getEventColor, getExcessItemsIndexes, getFontAwesomeIconNameAndType, getImageSize, getLocalOverrideUrl, getLuminance, getNextPageParam, getNodeDisplayNameByComponentType, getNumberWithRegex, getPageQuantity, getPageRange, getPreviewUrl, getRoleIcon, getSectionGlobalComponentSpacing, handleThemeAssetComparison, highLevelApi, indirectEval, insertItemSorted, isAfter, isBefore, isBeforeMinDate, isEmbeddableWithZeroHeight, isFirefox, isFullscreen, isHeadlessOrNotAvailableApp, isImageAccessible, isIosDevice, isMac, isMobile, isModifierClick, isNonMemberRole, isOriginValid, isPastMaxDate, isPitcherOrIosDevice, isPitcherWkWebView, isQueryParamTruthy, isSafari, isSafariOnIosDevice, isSameOrAfter, isSameOrBefore, isTextComponentEmpty, isTouchScreen, isValidHex, isWindows, lightThemeOverrides, loadCustomHelpersFromApps, loadRemoteScriptWithCtx, loadScript, loadScriptStyle, loadStyle, localeDropdownOptions, localeNames, locales, minFutureDate, minPastDate, moveNodeTo, msToSeconds, navigateTo, normalizeFilterParams, normalizeNetworkFilterParams, openUsdz, parseCollectionPlayerSlidesToContentSelector, parseContentSelectorToCollectionPlayerSlides, parseFileToCollectionPlayer, parsePdfFileToCollectionPlayer, parsePptxFileToCollectionPlayer, pascalCaseKeys, _export$1 as pptConversionSelector, processCanvasForSectionThemeOverride, regenerateTreeIds, registerCustomHelper, registerCustomHelpers, registerPeerConnectivityHandler, renderTemplate, replaceThemePresetsWithInlineStyles, replaceTranslationMessagesWithOverrides, requestFullscreen, requestStream, scrollCanvasToTop, scrollToComponentById, secondsToHumanReadable, sendPeerConnectivityEvent, setDateTime, shouldDisplayPlaceholderComponent, shouldOpenInCollectionPlayerViewer, shouldShowEmbeddable, skipElementsInTree, snakeCaseKeys, someNodeInTree, sortCollectionByString, splitUserName, stringToHslColor, supportedLocales, tapDirective, titleCase, toggleFullscreen, tooltipDirective, transformFilesToCollectionPlayer, transformFilesToContentGrid, updateFirstContentGridWithShareboxItems, urlSafeFetchInChunks, useAdmin, useAdminAndDsrState, useApi, useAppsDb, useBindValidation, useBroadcastRouteChange, useCanvasById, useCanvasLocks, useCanvasOverlay, useCanvasVisibility, useCanvasesAsInfinity, useCollectionPlayerOverlay, useCommentTracking, useConfirmation, useCreateEvent, useDeleteEvent, useDsr, useFetchCanvases, useFetchEvents, useFetchUsers, useFileDisplayHelpers, useFolderNameDescription, useGlobalSearch, useInfiniteScroll, useLocation, useMetadataSearch, useMetadataTemplates, useNotesApp, useNotification, useOpenFileStack, usePitcherApi, usePolling, usePresentationHistory, useRecentFiles, useShareCanvas, useSharedCommentsStorage, useSuggestedTags, useTheme, useThemeVars, useToast, useUi, useUpdateEvent, useWindowEvents, vueQueryPluginOptions, wait, waitForIframeInitialize, waitForValue };
|
|
182481
181699
|
//# sourceMappingURL=canvas-ui.js.map
|