@pitcher/canvas-ui 2025.12.9-123521-beta → 2025.12.9-123935-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.js CHANGED
@@ -92770,6 +92770,55 @@ function renderTemplate(template, context = {}) {
92770
92770
  return template;
92771
92771
  }
92772
92772
  }
92773
+ function registerCustomHelper(helper) {
92774
+ if (!helper || typeof helper.name !== "string" || !helper.name.trim()) {
92775
+ console.warn("[handlebars] Invalid helper: missing or empty name");
92776
+ return false;
92777
+ }
92778
+ if (typeof helper.code !== "string" || !helper.code.trim()) {
92779
+ console.warn(`[handlebars] Invalid helper "${helper.name}": missing or empty code`);
92780
+ return false;
92781
+ }
92782
+ try {
92783
+ const fn = new Function("return " + helper.code)();
92784
+ if (typeof fn !== "function") {
92785
+ console.warn(`[handlebars] Helper "${helper.name}" code does not evaluate to a function`);
92786
+ return false;
92787
+ }
92788
+ Handlebars.registerHelper(helper.name, fn);
92789
+ console.info(`[handlebars] Registered custom helper: ${helper.name}`);
92790
+ return true;
92791
+ } catch (e) {
92792
+ console.warn(`[handlebars] Failed to register helper "${helper.name}":`, e?.message);
92793
+ return false;
92794
+ }
92795
+ }
92796
+ function registerCustomHelpers(helpers) {
92797
+ let registered = 0;
92798
+ let failed = 0;
92799
+ for (const helper of helpers) {
92800
+ if (registerCustomHelper(helper)) {
92801
+ registered++;
92802
+ } else {
92803
+ failed++;
92804
+ }
92805
+ }
92806
+ return { registered, failed };
92807
+ }
92808
+ function loadCustomHelpersFromApps(installedApps) {
92809
+ const helpersApp = installedApps.find((app) => app.app_metadata?.name === "handlebars-helpers");
92810
+ if (!helpersApp) {
92811
+ console.info("[handlebars] No handlebars-helpers app installed");
92812
+ return { registered: 0, failed: 0 };
92813
+ }
92814
+ const helpers = helpersApp.metadata?.handlebars_helpers;
92815
+ if (!helpers || !Array.isArray(helpers) || helpers.length === 0) {
92816
+ console.info("[handlebars] handlebars-helpers app has no helpers configured");
92817
+ return { registered: 0, failed: 0 };
92818
+ }
92819
+ console.info(`[handlebars] Loading ${helpers.length} custom helper(s) from handlebars-helpers app`);
92820
+ return registerCustomHelpers(helpers);
92821
+ }
92773
92822
 
92774
92823
  function createPageId(fileId, pageIndex) {
92775
92824
  return `file-${fileId}-page-index-${pageIndex}`;
@@ -94586,38 +94635,38 @@ const _hoisted_47$4 = ["data-result-selected", "onClick"];
94586
94635
  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
94636
  const _hoisted_49$4 = { class: "flex-1 min-w-0" };
94588
94637
  const _hoisted_50$4 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
94589
- const _hoisted_51$3 = { class: "text-xs text-gray-500" };
94590
- const _hoisted_52$3 = { class: "text-xs text-gray-400" };
94591
- const _hoisted_53$3 = {
94638
+ const _hoisted_51$2 = { class: "text-xs text-gray-500" };
94639
+ const _hoisted_52$2 = { class: "text-xs text-gray-400" };
94640
+ const _hoisted_53$2 = {
94592
94641
  key: 0,
94593
94642
  class: "px-0 py-0"
94594
94643
  };
94595
- const _hoisted_54$2 = {
94644
+ const _hoisted_54$1 = {
94596
94645
  key: 0,
94597
94646
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
94598
94647
  };
94599
- const _hoisted_55$2 = {
94648
+ const _hoisted_55$1 = {
94600
94649
  key: 2,
94601
94650
  class: "flex-1 overflow-y-auto bg-white w-full"
94602
94651
  };
94603
- const _hoisted_56$2 = { class: "w-full px-0" };
94604
- const _hoisted_57$2 = { class: "flex items-center px-0 pt-2 pb-1" };
94605
- const _hoisted_58$2 = { class: "text-m font-semibold text-gray-900" };
94606
- const _hoisted_59$2 = { class: "ml-2 text-sm text-gray-500" };
94607
- const _hoisted_60$2 = ["data-result-selected", "onClick"];
94608
- const _hoisted_61$2 = {
94652
+ const _hoisted_56$1 = { class: "w-full px-0" };
94653
+ const _hoisted_57$1 = { class: "flex items-center px-0 pt-2 pb-1" };
94654
+ const _hoisted_58$1 = { class: "text-m font-semibold text-gray-900" };
94655
+ const _hoisted_59$1 = { class: "ml-2 text-sm text-gray-500" };
94656
+ const _hoisted_60$1 = ["data-result-selected", "onClick"];
94657
+ const _hoisted_61$1 = {
94609
94658
  key: 1,
94610
94659
  class: "w-18 h-14 border-rounded-1 mr-4 flex-shrink-0 bg-gray-200 flex items-center justify-center"
94611
94660
  };
94612
- const _hoisted_62$2 = { class: "flex-1 min-w-0" };
94613
- const _hoisted_63$2 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
94614
- const _hoisted_64$2 = { class: "text-xs text-gray-500" };
94615
- const _hoisted_65$2 = { class: "text-xs text-gray-400" };
94616
- const _hoisted_66$2 = {
94661
+ const _hoisted_62$1 = { class: "flex-1 min-w-0" };
94662
+ const _hoisted_63$1 = { class: "text-sm font-bold text-gray-900 truncate mb-1" };
94663
+ const _hoisted_64$1 = { class: "text-xs text-gray-500" };
94664
+ const _hoisted_65$1 = { class: "text-xs text-gray-400" };
94665
+ const _hoisted_66$1 = {
94617
94666
  key: 0,
94618
94667
  class: "flex flex-col items-center justify-center text-center p-8 gap-4"
94619
94668
  };
94620
- const _hoisted_67$2 = {
94669
+ const _hoisted_67$1 = {
94621
94670
  key: 0,
94622
94671
  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
94672
  };
@@ -95779,13 +95828,13 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
95779
95828
  ]),
95780
95829
  createElementVNode("div", _hoisted_49$4, [
95781
95830
  createElementVNode("h3", _hoisted_50$4, toDisplayString(item.name), 1),
95782
- createElementVNode("p", _hoisted_51$3, toDisplayString(formatCanvasType(item.content_type)), 1)
95831
+ createElementVNode("p", _hoisted_51$2, toDisplayString(formatCanvasType(item.content_type)), 1)
95783
95832
  ]),
95784
- createElementVNode("div", _hoisted_52$3, toDisplayString(item.folder?.name || ""), 1)
95833
+ createElementVNode("div", _hoisted_52$2, toDisplayString(item.folder?.name || ""), 1)
95785
95834
  ], 10, _hoisted_47$4);
95786
95835
  }), 128))
95787
95836
  ]),
95788
- filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_53$3, [
95837
+ filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_53$2, [
95789
95838
  createElementVNode("span", {
95790
95839
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
95791
95840
  onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
@@ -95800,7 +95849,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
95800
95849
  ])) : createCommentVNode("", true)
95801
95850
  ])) : createCommentVNode("", true)
95802
95851
  ]),
95803
- searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_54$2, [
95852
+ searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_54$1, [
95804
95853
  createVNode(CIcon, {
95805
95854
  class: "text-6xl",
95806
95855
  color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
@@ -95811,9 +95860,9 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
95811
95860
  class: normalizeClass(searchError.value ? "text-error font-semibold" : "text-text2")
95812
95861
  }, toDisplayString(searchError.value || unref(t)("canvasUI.CGlobalSearch.noResults")), 3)
95813
95862
  ])) : createCommentVNode("", true)
95814
- ])) : (openBlock(), createElementBlock("div", _hoisted_55$2, [
95815
- createElementVNode("div", _hoisted_56$2, [
95816
- createElementVNode("div", _hoisted_57$2, [
95863
+ ])) : (openBlock(), createElementBlock("div", _hoisted_55$1, [
95864
+ createElementVNode("div", _hoisted_56$1, [
95865
+ createElementVNode("div", _hoisted_57$1, [
95817
95866
  searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
95818
95867
  key: 0,
95819
95868
  class: "mr-2",
@@ -95827,8 +95876,8 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
95827
95876
  icon: "presentation",
95828
95877
  size: "16"
95829
95878
  })),
95830
- createElementVNode("span", _hoisted_58$2, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
95831
- createElementVNode("span", _hoisted_59$2, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
95879
+ createElementVNode("span", _hoisted_58$1, toDisplayString(searchType.value === "content" ? unref(t)("canvasUI.CAlgoliaSearch.sections.content") : unref(t)("canvasUI.CAlgoliaSearch.sections.pitchDecks")), 1),
95880
+ createElementVNode("span", _hoisted_59$1, " (" + toDisplayString(searchType.value === "content" ? filteredContentFiles.value.length : filteredCanvasFiles.value.length) + ") ", 1)
95832
95881
  ]),
95833
95882
  createElementVNode("div", null, [
95834
95883
  (openBlock(true), createElementBlock(Fragment, null, renderList(searchType.value === "content" ? filteredContentFiles.value : filteredCanvasFiles.value, (item) => {
@@ -95853,7 +95902,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
95853
95902
  "object-fit": "cover",
95854
95903
  src: item.picture_url || "",
95855
95904
  width: "72"
95856
- }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_61$2, [
95905
+ }, null, 8, ["file-data", "src"])) : (openBlock(), createElementBlock("div", _hoisted_61$1, [
95857
95906
  searchType.value === "content" ? (openBlock(), createBlock(CIcon, {
95858
95907
  key: 0,
95859
95908
  color: "var(--p-text2)",
@@ -95866,15 +95915,15 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
95866
95915
  size: "32"
95867
95916
  }))
95868
95917
  ])),
95869
- createElementVNode("div", _hoisted_62$2, [
95870
- createElementVNode("h3", _hoisted_63$2, toDisplayString(item.name), 1),
95871
- createElementVNode("p", _hoisted_64$2, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.content_type || "PDF" : formatCanvasType(item.content_type)), 1)
95918
+ createElementVNode("div", _hoisted_62$1, [
95919
+ createElementVNode("h3", _hoisted_63$1, toDisplayString(item.name), 1),
95920
+ createElementVNode("p", _hoisted_64$1, toDisplayString(searchType.value === "content" ? item.type === "folder" ? "Folder" : item.content_type || "PDF" : formatCanvasType(item.content_type)), 1)
95872
95921
  ]),
95873
- createElementVNode("div", _hoisted_65$2, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
95874
- ], 10, _hoisted_60$2);
95922
+ createElementVNode("div", _hoisted_65$1, toDisplayString(searchType.value === "content" && item.type === "folder" ? item.parent_folder?.name || "" : item.folder?.name || ""), 1)
95923
+ ], 10, _hoisted_60$1);
95875
95924
  }), 128))
95876
95925
  ]),
95877
- searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_66$2, [
95926
+ searchError.value || shouldShowNoResults.value ? (openBlock(), createElementBlock("div", _hoisted_66$1, [
95878
95927
  createVNode(CIcon, {
95879
95928
  class: "text-6xl",
95880
95929
  color: searchError.value ? "var(--p-error)" : "var(--p-text3)",
@@ -95888,7 +95937,7 @@ const _sfc_main$5I = /* @__PURE__ */ defineComponent({
95888
95937
  ])
95889
95938
  ]))
95890
95939
  ]),
95891
- !showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_67$2, [
95940
+ !showRecentView.value ? (openBlock(), createElementBlock("div", _hoisted_67$1, [
95892
95941
  createVNode(CShortcut, null, {
95893
95942
  default: withCtx(() => [
95894
95943
  createVNode(CShortcutIcon, { icon: "arrow-up" }),
@@ -140765,96 +140814,17 @@ const _sfc_main$2G = /* @__PURE__ */ defineComponent({
140765
140814
  }
140766
140815
  });
140767
140816
 
140768
- const _hoisted_1$24 = {
140769
- key: 0,
140770
- class: "cb-data-charts-raw__controls"
140771
- };
140817
+ const _hoisted_1$24 = { class: "cb-data-charts-raw" };
140772
140818
  const _sfc_main$2F = /* @__PURE__ */ defineComponent({
140773
140819
  __name: "DataCharts.raw",
140774
140820
  props: {
140775
- data: {},
140776
- isPreview: { type: Boolean },
140777
- isEditMode: { type: Boolean }
140821
+ data: {}
140778
140822
  },
140779
140823
  setup(__props) {
140780
- const { t } = useI18n();
140781
140824
  const chartRef = ref(null);
140782
- const containerRef = ref(null);
140783
140825
  let chart = null;
140784
140826
  const isChartLoaded = ref(false);
140785
- const isFullscreen = ref(false);
140786
- const currentChartType = ref("");
140787
140827
  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 originalChartType = computed(() => {
140804
- return props.data?.type || props.data?._primary_chart_type || "bar";
140805
- });
140806
- const isScatterChart = computed(() => originalChartType.value === "scatter");
140807
- const isBubbleChart = computed(() => originalChartType.value === "bubble");
140808
- const labelValueChartTypes = [
140809
- { label: t("canvasUI.canvasBuilder.dataCharts.types.bar"), key: "bar" },
140810
- { label: t("canvasUI.canvasBuilder.dataCharts.types.line"), key: "line" },
140811
- { label: t("canvasUI.canvasBuilder.dataCharts.types.area"), key: "area" },
140812
- { label: t("canvasUI.canvasBuilder.dataCharts.types.pie"), key: "pie" },
140813
- { label: t("canvasUI.canvasBuilder.dataCharts.types.doughnut"), key: "doughnut" },
140814
- { label: t("canvasUI.canvasBuilder.dataCharts.types.polarArea"), key: "polarArea" },
140815
- { label: t("canvasUI.canvasBuilder.dataCharts.types.radar"), key: "radar" }
140816
- ];
140817
- const scatterChartTypes = [{ label: t("canvasUI.canvasBuilder.dataCharts.types.scatter"), key: "scatter" }];
140818
- const bubbleChartTypes = [{ label: t("canvasUI.canvasBuilder.dataCharts.types.bubble"), key: "bubble" }];
140819
- const chartTypeSwitcherOptions = computed(() => {
140820
- if (isBubbleChart.value) return bubbleChartTypes;
140821
- if (isScatterChart.value) return scatterChartTypes;
140822
- return labelValueChartTypes;
140823
- });
140824
- function toggleFullscreen() {
140825
- if (!containerRef.value) return;
140826
- if (!isFullscreen.value) {
140827
- isFullscreen.value = true;
140828
- } else {
140829
- isFullscreen.value = false;
140830
- }
140831
- nextTick(() => {
140832
- if (chart) {
140833
- chart.resize();
140834
- }
140835
- });
140836
- }
140837
- function handleChartTypeChange(newType) {
140838
- if (!chart || !props.data) return;
140839
- currentChartType.value = newType;
140840
- initChart(newType);
140841
- }
140842
- function handleKeydown(e) {
140843
- if (e.key === "Escape" && isFullscreen.value) {
140844
- isFullscreen.value = false;
140845
- nextTick(() => {
140846
- if (chart) {
140847
- chart.resize();
140848
- }
140849
- });
140850
- }
140851
- }
140852
- onMounted(() => {
140853
- window.addEventListener("keydown", handleKeydown);
140854
- });
140855
- onUnmounted(() => {
140856
- window.removeEventListener("keydown", handleKeydown);
140857
- });
140858
140828
  const sectionListSectionInfo = inject(
140859
140829
  "sectionListSectionInfo",
140860
140830
  computed(() => null)
@@ -140885,191 +140855,41 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
140885
140855
  }
140886
140856
  return window._chartJsPromise;
140887
140857
  }
140888
- function normalizeRValues(values, minRadius = 5, maxRadius = 40) {
140889
- if (values.length === 0) return [];
140890
- const rValues = values.map((v) => v.r);
140891
- const minR = Math.min(...rValues);
140892
- const maxR = Math.max(...rValues);
140893
- if (minR === maxR) {
140894
- return values.map((v) => ({
140895
- ...v,
140896
- r: (minRadius + maxRadius) / 2,
140897
- originalR: v.r
140898
- }));
140899
- }
140900
- return values.map((v) => ({
140901
- ...v,
140902
- r: minRadius + (v.r - minR) / (maxR - minR) * (maxRadius - minRadius),
140903
- originalR: v.r
140904
- }));
140905
- }
140906
- function processSeriesDataPoints(dataPoints, chartType, context) {
140907
- const isScatterChart2 = chartType === "scatter";
140908
- const isBubbleChart2 = chartType === "bubble";
140909
- const isXYChart = isScatterChart2 || isBubbleChart2;
140858
+ function processChartData(chartData, context) {
140910
140859
  const processedData = {
140911
140860
  labels: [],
140912
140861
  values: []
140913
140862
  };
140914
- const rawBubbleData = [];
140915
- dataPoints?.forEach((point) => {
140863
+ chartData.data_points?.forEach((point) => {
140916
140864
  let label = point.label;
140865
+ let value = point.value;
140917
140866
  try {
140918
140867
  if (typeof label === "string") {
140919
140868
  label = renderTemplate(label, context);
140920
140869
  }
140921
- if (isXYChart) {
140922
- let xValue = point.x_value ?? "0";
140923
- let yValue = point.y_value ?? "0";
140924
- let rValue = point.r_value ?? "10";
140925
- if (typeof xValue === "string") {
140926
- xValue = renderTemplate(xValue, context);
140927
- }
140928
- if (typeof yValue === "string") {
140929
- yValue = renderTemplate(yValue, context);
140930
- }
140931
- if (typeof rValue === "string") {
140932
- rValue = renderTemplate(rValue, context);
140933
- }
140934
- if (typeof label === "string" && label.includes(",") && typeof xValue === "string" && xValue.includes(",") && typeof yValue === "string" && yValue.includes(",")) {
140935
- const labels = label.split(",");
140936
- const xValues = xValue.split(",");
140937
- const yValues = yValue.split(",");
140938
- const rValues = typeof rValue === "string" && rValue.includes(",") ? rValue.split(",") : [];
140939
- labels.forEach((l, idx) => {
140940
- const x = Number(xValues[idx]) || 0;
140941
- const y = Number(yValues[idx]) || 0;
140942
- if (isBubbleChart2) {
140943
- const r = rValues[idx] ? Number(rValues[idx]) || 10 : 10;
140944
- rawBubbleData.push({ label: l, x, y, r: Math.abs(r) });
140945
- } else {
140946
- processedData.labels.push(l);
140947
- processedData.values.push({ x, y });
140948
- }
140949
- });
140950
- } else {
140951
- const x = Number(xValue) || 0;
140952
- const y = Number(yValue) || 0;
140953
- if (isBubbleChart2) {
140954
- const r = Number(rValue) || 10;
140955
- rawBubbleData.push({ label, x, y, r: Math.abs(r) });
140956
- } else {
140957
- processedData.labels.push(label);
140958
- processedData.values.push({ x, y });
140870
+ if (typeof value === "string") {
140871
+ value = renderTemplate(value, context);
140872
+ }
140873
+ if (typeof label === "string" && label.includes(",") && typeof value === "string" && value.includes(",")) {
140874
+ const labels = label.split(",");
140875
+ const values = value.split(",");
140876
+ labels.forEach((l, idx) => {
140877
+ const v = values[idx];
140878
+ if (v !== void 0) {
140879
+ processedData.labels.push(l);
140880
+ processedData.values.push(Number(v) || 0);
140959
140881
  }
140960
- }
140882
+ });
140961
140883
  } else {
140962
- let value = point.value;
140963
- if (typeof value === "string") {
140964
- value = renderTemplate(value, context);
140965
- }
140966
- if (typeof label === "string" && label.includes(",") && typeof value === "string" && value.includes(",")) {
140967
- const labels = label.split(",");
140968
- const values = value.split(",");
140969
- labels.forEach((l, idx) => {
140970
- const v = values[idx];
140971
- if (v !== void 0) {
140972
- processedData.labels.push(l);
140973
- processedData.values.push(Number(v) || 0);
140974
- }
140975
- });
140976
- } else {
140977
- processedData.labels.push(label);
140978
- processedData.values.push(Number(value) || 0);
140979
- }
140884
+ processedData.labels.push(label);
140885
+ processedData.values.push(Number(value) || 0);
140980
140886
  }
140981
140887
  } catch (err) {
140982
140888
  console.warn("Error processing chart data point:", err);
140983
- if (isBubbleChart2) {
140984
- rawBubbleData.push({ label, x: 0, y: 0, r: 10 });
140985
- } else if (isXYChart) {
140986
- processedData.labels.push(label);
140987
- processedData.values.push({ x: 0, y: 0 });
140988
- } else {
140989
- processedData.labels.push(label);
140990
- processedData.values.push(0);
140991
- }
140889
+ processedData.labels.push(label);
140890
+ processedData.values.push(Number(value) || 0);
140992
140891
  }
140993
140892
  });
140994
- if (isBubbleChart2 && rawBubbleData.length > 0) {
140995
- const bubbleValues = rawBubbleData.map((d) => ({ x: d.x, y: d.y, r: d.r }));
140996
- const normalizedValues = normalizeRValues(bubbleValues);
140997
- rawBubbleData.forEach((d, idx) => {
140998
- processedData.labels.push(d.label);
140999
- processedData.values.push(normalizedValues[idx]);
141000
- });
141001
- }
141002
- return processedData;
141003
- }
141004
- function processChartData(chartData, context, overrideType) {
141005
- if (chartData.series && Array.isArray(chartData.series) && chartData.series.length > 0) {
141006
- const datasets = [];
141007
- let allLabels = [];
141008
- const isSingleSeries = chartData.series.length === 1;
141009
- chartData.series.forEach((series, index) => {
141010
- const seriesChartType = overrideType || series.chart_type || chartData.type || "bar";
141011
- const processedData2 = processSeriesDataPoints(series.data_points || [], seriesChartType, context);
141012
- if (processedData2.labels.length > allLabels.length) {
141013
- allLabels = processedData2.labels;
141014
- }
141015
- const preBuiltDataset = chartData.data?.datasets?.[index];
141016
- let backgroundColor2 = preBuiltDataset?.background_color || preBuiltDataset?.backgroundColor;
141017
- let borderColor2 = preBuiltDataset?.border_color || preBuiltDataset?.borderColor;
141018
- if (isSingleSeries && Array.isArray(backgroundColor2)) {
141019
- const resolvedColors = backgroundColor2.map((color, i) => {
141020
- if (typeof color === "string" && color.startsWith("palette")) {
141021
- const paletteIndex = parseInt(color.replace("palette", ""));
141022
- const validIndex = paletteIndex >= 0 ? paletteIndex % palette.value.length : i;
141023
- return palette.value[validIndex];
141024
- }
141025
- return color;
141026
- });
141027
- const dataPointsCount = processedData2.values.length;
141028
- backgroundColor2 = Array.from({ length: dataPointsCount }, (_, i) => resolvedColors[i % resolvedColors.length]);
141029
- borderColor2 = [...backgroundColor2];
141030
- } else if (typeof backgroundColor2 === "string" && backgroundColor2.startsWith("palette")) {
141031
- const paletteIndex = parseInt(backgroundColor2.replace("palette", ""));
141032
- const validIndex = paletteIndex >= 0 ? paletteIndex % palette.value.length : index;
141033
- backgroundColor2 = palette.value[validIndex];
141034
- borderColor2 = backgroundColor2;
141035
- }
141036
- const datasetOptions = {
141037
- label: series.name,
141038
- data: processedData2.values,
141039
- backgroundColor: backgroundColor2 || palette.value[index % palette.value.length],
141040
- borderColor: borderColor2 || palette.value[index % palette.value.length],
141041
- borderWidth: 1
141042
- };
141043
- if (!isSingleSeries) {
141044
- if (series.chart_type === "area") {
141045
- datasetOptions.type = "line";
141046
- datasetOptions.fill = true;
141047
- datasetOptions.tension = 0.4;
141048
- } else {
141049
- datasetOptions.type = series.chart_type;
141050
- }
141051
- }
141052
- if (series.chart_type === "area") {
141053
- datasetOptions.fill = true;
141054
- datasetOptions.tension = 0.4;
141055
- }
141056
- if (["line", "area"].includes(series.chart_type)) {
141057
- datasetOptions.tension = 0.4;
141058
- }
141059
- datasets.push(datasetOptions);
141060
- });
141061
- return {
141062
- ...chartData,
141063
- type: chartData.type || chartData._primary_chart_type || "bar",
141064
- data: {
141065
- ...chartData.data,
141066
- labels: allLabels,
141067
- datasets
141068
- }
141069
- };
141070
- }
141071
- const chartType = overrideType || chartData.type || "bar";
141072
- const processedData = processSeriesDataPoints(chartData.data_points || [], chartType, context);
141073
140893
  let backgroundColor = chartData.data?.datasets?.[0]?.background_color || [];
141074
140894
  let borderColor = chartData.data?.datasets?.[0]?.border_color || [];
141075
140895
  if (chartData.color_scheme_type === "theme" && Array.isArray(backgroundColor)) {
@@ -141115,7 +140935,7 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
141115
140935
  }
141116
140936
  };
141117
140937
  }
141118
- function initChart(overrideType) {
140938
+ function initChart() {
141119
140939
  if (!props.data || !chartRef.value || !isChartLoaded.value) {
141120
140940
  return;
141121
140941
  }
@@ -141123,85 +140943,25 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
141123
140943
  chart.destroy();
141124
140944
  }
141125
140945
  const context = props.data.context ?? (!isEmpty(activeCanvas.value?.context) || isCanvas.value ? { ...crmShape.value, ...activeCanvas.value?.context } : crmShape.value);
141126
- const processedChartData = processChartData(props.data, context, overrideType);
141127
- let chartType = overrideType || currentChartType.value || processedChartData.type || "bar";
141128
- const isAreaChart = chartType === "area";
141129
- if (isAreaChart) {
141130
- chartType = "line";
141131
- }
140946
+ const processedChartData = processChartData(props.data, context);
141132
140947
  if (processedChartData.data?.datasets) {
141133
140948
  processedChartData.data.datasets = processedChartData.data.datasets.map((dataset) => {
141134
- const { background_color, border_color, point_style, fill, tension, show_line, ...rest } = dataset;
140949
+ const { background_color, border_color, point_style, ...rest } = dataset;
141135
140950
  return {
141136
140951
  ...rest,
141137
140952
  backgroundColor: dataset.backgroundColor || background_color || ["#000000"],
141138
140953
  borderColor: dataset.borderColor || border_color || ["#000000"],
141139
- pointStyle: point_style,
141140
- fill: isAreaChart ? true : fill,
141141
- tension: isAreaChart ? tension ?? 0.4 : tension,
141142
- showLine: show_line
140954
+ pointStyle: point_style
141143
140955
  };
141144
140956
  });
141145
140957
  }
141146
- let scales = processedChartData.options?.scales;
141147
- if (scales) {
141148
- const convertedScales = {};
141149
- if (scales.x) {
141150
- convertedScales.x = { ...scales.x };
141151
- }
141152
- if (scales.y) {
141153
- convertedScales.y = {
141154
- ...scales.y,
141155
- beginAtZero: scales.y.begin_at_zero
141156
- };
141157
- delete convertedScales.y.begin_at_zero;
141158
- }
141159
- if (scales.r) {
141160
- convertedScales.r = {
141161
- ...scales.r,
141162
- beginAtZero: scales.r.begin_at_zero,
141163
- ticks: scales.r.ticks ? {
141164
- stepSize: scales.r.ticks.step_size
141165
- } : void 0
141166
- };
141167
- }
141168
- scales = convertedScales;
141169
- }
141170
- if (["pie", "doughnut", "polarArea"].includes(chartType)) {
141171
- scales = void 0;
141172
- }
141173
- const tooltipCallbacks = {};
141174
- const isBubble = chartType === "bubble";
141175
- if (props.data.percent_display || isBubble) {
141176
- tooltipCallbacks.label = function(context2) {
141177
- const label = context2.dataset.label || "";
141178
- const value = context2.raw;
141179
- if (isBubble && typeof value === "object" && value !== null) {
141180
- const x = value.x;
141181
- const y = value.y;
141182
- const r = value.originalR !== void 0 ? value.originalR : value.r;
141183
- return `${label}${label ? ": " : ""}(${x}, ${y}, ${r})`;
141184
- }
141185
- if (props.data?.percent_display && typeof value === "number" && value >= 0 && value <= 1) {
141186
- return `${label}${label ? ": " : ""}${(value * 100).toFixed(2)}%`;
141187
- }
141188
- return `${label}${label ? ": " : ""}${value}`;
141189
- };
141190
- }
141191
140958
  const chartConfig = {
141192
140959
  ...processedChartData,
141193
- type: chartType,
140960
+ type: processedChartData.type,
141194
140961
  options: merge$1({}, processedChartData.options, {
141195
140962
  responsive: true,
141196
140963
  maintainAspectRatio: false,
141197
- indexAxis: processedChartData.options?.index_axis,
141198
- scales,
141199
- plugins: {
141200
- ...processedChartData.options?.plugins,
141201
- tooltip: props.data.percent_display || isBubble ? {
141202
- callbacks: tooltipCallbacks
141203
- } : void 0
141204
- }
140964
+ indexAxis: processedChartData.options?.index_axis
141205
140965
  })
141206
140966
  };
141207
140967
  chart = new window.Chart(chartRef.value, chartConfig);
@@ -141221,172 +140981,84 @@ const _sfc_main$2F = /* @__PURE__ */ defineComponent({
141221
140981
  isChartLoaded.value = true;
141222
140982
  });
141223
140983
  return (_ctx, _cache) => {
141224
- return openBlock(), createElementBlock("div", {
141225
- ref_key: "containerRef",
141226
- ref: containerRef,
141227
- class: normalizeClass(["cb-data-charts-raw", { "is-fullscreen": isFullscreen.value }]),
141228
- style: normalizeStyle(containerStyle.value)
141229
- }, [
141230
- showViewControls.value ? (openBlock(), createElementBlock("div", _hoisted_1$24, [
141231
- props.data?.view_controls?.enable_chart_type_switcher ? (openBlock(), createBlock(unref(NDropdown), {
141232
- key: 0,
141233
- options: chartTypeSwitcherOptions.value,
141234
- trigger: "click",
141235
- onSelect: handleChartTypeChange
141236
- }, {
141237
- default: withCtx(() => [
141238
- createVNode(CButton, {
141239
- quaternary: "",
141240
- size: "small"
141241
- }, {
141242
- icon: withCtx(() => [
141243
- createVNode(CIcon, { icon: "chart-bar" })
141244
- ]),
141245
- _: 1
141246
- })
141247
- ]),
141248
- _: 1
141249
- }, 8, ["options"])) : createCommentVNode("", true),
141250
- props.data?.view_controls?.enable_fullscreen_btn ? (openBlock(), createBlock(CButton, {
141251
- key: 1,
141252
- quaternary: "",
141253
- size: "small",
141254
- onClick: toggleFullscreen
141255
- }, {
141256
- icon: withCtx(() => [
141257
- createVNode(CIcon, {
141258
- icon: isFullscreen.value ? "compress" : "expand"
141259
- }, null, 8, ["icon"])
141260
- ]),
141261
- _: 1
141262
- })) : createCommentVNode("", true)
141263
- ])) : createCommentVNode("", true),
140984
+ return openBlock(), createElementBlock("div", _hoisted_1$24, [
141264
140985
  createElementVNode("canvas", {
141265
140986
  ref_key: "chartRef",
141266
140987
  ref: chartRef,
141267
140988
  class: "w-full h-full"
141268
140989
  }, null, 512)
141269
- ], 6);
140990
+ ]);
141270
140991
  };
141271
140992
  }
141272
140993
  });
141273
140994
 
141274
- const RawDataCharts = /* @__PURE__ */ _export_sfc(_sfc_main$2F, [["__scopeId", "data-v-7078dc66"]]);
141275
-
141276
- const STANDALONE_CHART_TYPES = ["pie", "doughnut", "radar", "polarArea"];
141277
- const ONE_D_CHART_TYPES = ["bar", "line", "area"];
141278
- const TWO_D_CHART_TYPES = ["scatter"];
141279
- const THREE_D_CHART_TYPES = ["bubble"];
141280
- const XY_CHART_TYPES = ["scatter"];
141281
- const XYR_CHART_TYPES = ["bubble"];
140995
+ const RawDataCharts = /* @__PURE__ */ _export_sfc(_sfc_main$2F, [["__scopeId", "data-v-e71330a8"]]);
141282
140996
 
141283
140997
  const _hoisted_1$23 = { class: "flex gap-4 h-[calc(80vh-120px)] w-full" };
141284
140998
  const _hoisted_2$1t = { class: "cb-data-charts-settings__card overflow-auto flex-1" };
141285
140999
  const _hoisted_3$17 = { class: "flex flex-col h-full" };
141286
141000
  const _hoisted_4$X = { class: "flex-grow overflow-y-auto overflow-x-hidden" };
141287
- const _hoisted_5$O = { class: "text-sm font-semibold mb-3 text-gray-600 dark:text-gray-400 uppercase tracking-wide" };
141288
- const _hoisted_6$H = { class: "flex items-end border-b border-gray-200 dark:border-gray-700 mb-4 -mx-4 px-4" };
141289
- const _hoisted_7$v = ["onClick"];
141290
- const _hoisted_8$q = { class: "text-sm font-medium truncate max-w-24" };
141291
- const _hoisted_9$m = ["onClick"];
141292
- const _hoisted_10$h = ["title"];
141293
- const _hoisted_11$f = {
141001
+ const _hoisted_5$O = { class: "mb-4" };
141002
+ const _hoisted_6$H = { class: "block mb-2" };
141003
+ const _hoisted_7$v = { class: "mb-4" };
141004
+ const _hoisted_8$q = { class: "block mb-2" };
141005
+ const _hoisted_9$m = { class: "mb-4" };
141006
+ const _hoisted_10$h = { class: "block mb-2" };
141007
+ const _hoisted_11$f = { class: "mb-4" };
141008
+ const _hoisted_12$b = { class: "block mb-2" };
141009
+ const _hoisted_13$a = {
141294
141010
  key: 0,
141295
141011
  class: "mb-4"
141296
141012
  };
141297
- const _hoisted_12$b = { class: "block mb-2" };
141298
- const _hoisted_13$a = { class: "mb-4" };
141299
141013
  const _hoisted_14$9 = { class: "block mb-2" };
141300
141014
  const _hoisted_15$8 = { class: "mb-4" };
141301
- const _hoisted_16$8 = { class: "flex justify-between items-center mb-2" };
141302
- const _hoisted_17$7 = { class: "block" };
141303
- const _hoisted_18$6 = ["onClick"];
141304
- const _hoisted_19$6 = { class: "p-4 min-w-[400px] max-h-[400px]" };
141305
- const _hoisted_20$5 = { class: "flex gap-4 h-full" };
141306
- const _hoisted_21$5 = { class: "flex-1 flex flex-col" };
141307
- const _hoisted_22$3 = { class: "text-sm mb-2" };
141308
- const _hoisted_23$3 = { class: "overflow-auto" };
141309
- const _hoisted_24$3 = {
141015
+ const _hoisted_16$8 = { class: "block mb-2" };
141016
+ const _hoisted_17$7 = {
141017
+ key: 1,
141018
+ class: "mb-4"
141019
+ };
141020
+ const _hoisted_18$6 = { class: "block mb-2" };
141021
+ const _hoisted_19$6 = { class: "mb-4" };
141022
+ const _hoisted_20$5 = { class: "flex justify-between items-center mb-2" };
141023
+ const _hoisted_21$5 = { class: "block" };
141024
+ const _hoisted_22$3 = { class: "flex gap-2 flex-1" };
141025
+ const _hoisted_23$3 = ["onClick"];
141026
+ const _hoisted_24$3 = { class: "p-4 min-w-[400px] max-h-[400px]" };
141027
+ const _hoisted_25$3 = { class: "flex gap-4 h-full" };
141028
+ const _hoisted_26$3 = { class: "flex-1 flex flex-col" };
141029
+ const _hoisted_27$3 = { class: "text-sm mb-2" };
141030
+ const _hoisted_28$3 = { class: "overflow-auto" };
141031
+ const _hoisted_29$3 = {
141310
141032
  key: 0,
141311
141033
  class: "flex-1 border-l pl-4"
141312
141034
  };
141313
- const _hoisted_25$3 = { class: "text-sm font-medium mb-2" };
141314
- const _hoisted_26$3 = { class: "flex flex-col gap-2" };
141315
- const _hoisted_27$3 = { class: "block mb-1 text-sm" };
141316
- const _hoisted_28$3 = { class: "block mb-1 text-sm" };
141317
- const _hoisted_29$3 = ["onClick"];
141318
- const _hoisted_30$3 = { class: "p-4 min-w-[400px] max-h-[400px]" };
141319
- const _hoisted_31$3 = { class: "flex gap-4 h-full" };
141320
- const _hoisted_32$3 = { class: "flex-1 flex flex-col" };
141321
- const _hoisted_33$3 = { class: "text-sm mb-2" };
141322
- const _hoisted_34$3 = { class: "overflow-auto" };
141323
- const _hoisted_35$3 = {
141035
+ const _hoisted_30$3 = { class: "text-sm font-medium mb-2" };
141036
+ const _hoisted_31$3 = { class: "flex flex-col gap-2" };
141037
+ const _hoisted_32$3 = { class: "block mb-1 text-sm" };
141038
+ const _hoisted_33$3 = { class: "block mb-1 text-sm" };
141039
+ const _hoisted_34$3 = ["onClick"];
141040
+ const _hoisted_35$3 = { class: "p-4 min-w-[400px] max-h-[400px]" };
141041
+ const _hoisted_36$3 = { class: "flex gap-4 h-full" };
141042
+ const _hoisted_37$3 = { class: "flex-1 flex flex-col" };
141043
+ const _hoisted_38$3 = { class: "text-sm mb-2" };
141044
+ const _hoisted_39$3 = { class: "overflow-auto" };
141045
+ const _hoisted_40$3 = {
141324
141046
  key: 0,
141325
141047
  class: "flex-1 border-l pl-4"
141326
141048
  };
141327
- const _hoisted_36$3 = { class: "text-sm font-medium mb-2" };
141328
- const _hoisted_37$3 = { class: "flex flex-col gap-2" };
141329
- const _hoisted_38$3 = { class: "block mb-1 text-sm" };
141330
- const _hoisted_39$3 = { class: "block mb-1 text-sm" };
141331
- const _hoisted_40$3 = { class: "block mb-1 text-sm" };
141332
- const _hoisted_41$3 = { key: 0 };
141333
- const _hoisted_42$3 = { class: "block mb-1 text-sm" };
141334
- const _hoisted_43$3 = ["onClick"];
141335
- const _hoisted_44$3 = { class: "p-4 min-w-[400px] max-h-[400px] overflow-auto" };
141336
- const _hoisted_45$3 = { class: "text-sm mb-2" };
141337
- const _hoisted_46$3 = ["onClick"];
141338
- const _hoisted_47$3 = { class: "p-4 min-w-[400px] max-h-[400px] overflow-auto" };
141339
- const _hoisted_48$3 = { class: "text-sm mb-2" };
141340
- const _hoisted_49$3 = { class: "flex justify-center mt-2" };
141341
- const _hoisted_50$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" };
141342
- const _hoisted_51$2 = { class: "mb-4" };
141343
- const _hoisted_52$2 = { class: "block mb-2" };
141344
- const _hoisted_53$2 = { class: "mb-4" };
141345
- const _hoisted_54$1 = { class: "block mb-2" };
141346
- const _hoisted_55$1 = { class: "mb-4" };
141347
- const _hoisted_56$1 = { class: "block mb-2" };
141348
- const _hoisted_57$1 = { class: "mb-4" };
141349
- const _hoisted_58$1 = { class: "block mb-2" };
141350
- const _hoisted_59$1 = {
141351
- key: 2,
141352
- class: "mb-4"
141353
- };
141354
- const _hoisted_60$1 = { class: "block mb-2" };
141355
- const _hoisted_61$1 = {
141356
- key: 3,
141357
- class: "mb-4"
141358
- };
141359
- const _hoisted_62$1 = { class: "block mb-2" };
141360
- const _hoisted_63$1 = { class: "mb-4" };
141361
- const _hoisted_64$1 = { class: "block mb-2" };
141362
- const _hoisted_65$1 = { class: "mb-4" };
141363
- const _hoisted_66$1 = { class: "block mb-2" };
141364
- const _hoisted_67$1 = { class: "mb-4" };
141365
- const _hoisted_68$1 = { class: "block mb-2" };
141366
- const _hoisted_69 = { class: "flex items-center gap-2" };
141367
- const _hoisted_70 = { class: "text-sm text-gray-500" };
141368
- const _hoisted_71 = { class: "mb-4" };
141369
- const _hoisted_72 = { class: "block mb-2" };
141370
- const _hoisted_73 = { class: "flex flex-col gap-2" };
141371
- const _hoisted_74 = { class: "flex items-center gap-2" };
141372
- const _hoisted_75 = { class: "text-sm" };
141373
- const _hoisted_76 = { class: "text-sm" };
141374
- const _hoisted_77 = { class: "flex items-center gap-2" };
141375
- const _hoisted_78 = { class: "text-sm" };
141376
- const _hoisted_79 = { class: "mb-4" };
141377
- const _hoisted_80 = { class: "block mb-2" };
141378
- const _hoisted_81 = { class: "flex flex-col gap-3" };
141379
- const _hoisted_82 = { class: "flex items-center gap-2" };
141380
- const _hoisted_83 = { class: "text-sm w-16" };
141381
- const _hoisted_84 = { class: "flex items-center gap-2" };
141382
- const _hoisted_85 = { class: "text-sm w-16" };
141383
- const _hoisted_86 = { class: "cb-data-charts-settings__preview flex-1 border-l border-[#eee] pl-4" };
141384
- const _hoisted_87 = { class: "text-sm font-medium mb-4" };
141385
- const _hoisted_88 = {
141049
+ const _hoisted_41$3 = { class: "flex flex-col gap-2" };
141050
+ const _hoisted_42$3 = { class: "flex justify-center mt-2" };
141051
+ const _hoisted_43$3 = { class: "mb-4" };
141052
+ const _hoisted_44$3 = { class: "block mb-2" };
141053
+ const _hoisted_45$3 = { class: "mb-4" };
141054
+ const _hoisted_46$3 = { class: "block mb-2" };
141055
+ const _hoisted_47$3 = { class: "cb-data-charts-settings__preview flex-1 border-l border-[#eee] pl-4" };
141056
+ const _hoisted_48$3 = { class: "text-sm font-medium mb-4" };
141057
+ const _hoisted_49$3 = {
141386
141058
  class: "preview-container",
141387
141059
  style: { "height": "300px" }
141388
141060
  };
141389
- const _hoisted_89 = { class: "flex justify-between gap-4" };
141061
+ const _hoisted_50$3 = { class: "flex justify-between gap-4" };
141390
141062
  const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141391
141063
  __name: "DataCharts.settings",
141392
141064
  props: {
@@ -141400,91 +141072,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141400
141072
  const { setComponentEditMode, updateNodeDataById } = useCanvas$1();
141401
141073
  const { crmShape } = useCrmShape();
141402
141074
  const { palette } = useCanvasTheme$1();
141403
- let seriesIdCounter = 0;
141404
- function generateSeriesId() {
141405
- return `series_${Date.now()}_${seriesIdCounter++}`;
141406
- }
141407
- function convertSavedSeriesToRuntime(savedSeries) {
141408
- return {
141409
- id: savedSeries.id || generateSeriesId(),
141410
- name: savedSeries.name || "Series 1",
141411
- chartType: savedSeries.chart_type || "bar",
141412
- dataPoints: (savedSeries.data_points || []).map((dp) => ({
141413
- label: dp.label || "",
141414
- value: dp.value || "",
141415
- xValue: dp.x_value ?? "",
141416
- yValue: dp.y_value ?? "",
141417
- rValue: dp.r_value ?? "",
141418
- dynamicValue: dp.dynamic_value,
141419
- dynamicXValue: dp.dynamic_x_value,
141420
- dynamicYValue: dp.dynamic_y_value,
141421
- dynamicRValue: dp.dynamic_r_value,
141422
- arrayConfig: dp.array_config
141423
- }))
141424
- };
141425
- }
141426
- function convertLegacyToSeries() {
141427
- const chartTypeValue = props.data?.type ?? props.data?._primary_chart_type ?? "bar";
141428
- const dataPoints = props.data?.data_points && Array.isArray(props.data.data_points) ? props.data.data_points.map((dp) => ({
141429
- label: dp.label,
141430
- value: dp.value,
141431
- xValue: dp.x_value ?? "",
141432
- yValue: dp.y_value ?? "",
141433
- dynamicValue: dp.dynamic_value,
141434
- dynamicXValue: dp.dynamic_x_value,
141435
- dynamicYValue: dp.dynamic_y_value,
141436
- arrayConfig: dp.array_config
141437
- })) : props.data?.data?.labels ? props.data.data.labels.map((label, index) => ({
141438
- label: String(label),
141439
- value: String(props.data?.data?.datasets?.[0]?.data?.[index] ?? 0),
141440
- xValue: "",
141441
- yValue: ""
141442
- })) : [];
141443
- return [
141444
- {
141445
- id: generateSeriesId(),
141446
- name: t("canvasUI.canvasBuilder.dataCharts.series") + " 1",
141447
- chartType: chartTypeValue,
141448
- dataPoints
141449
- }
141450
- ];
141451
- }
141452
- const seriesList = ref(
141453
- props.data?.series && Array.isArray(props.data.series) && props.data.series.length > 0 ? props.data.series.map((s) => convertSavedSeriesToRuntime(s)) : convertLegacyToSeries()
141454
- );
141455
- const activeSeriesIndex = ref(0);
141456
- const activeSeries = computed(() => seriesList.value[activeSeriesIndex.value]);
141457
- const isActiveSeriesXYChart = computed(() => XY_CHART_TYPES.includes(activeSeries.value?.chartType));
141458
- const isActiveSeriesXYRChart = computed(() => XYR_CHART_TYPES.includes(activeSeries.value?.chartType));
141459
- const isPrimaryStandalone = computed(() => STANDALONE_CHART_TYPES.includes(seriesList.value[0]?.chartType));
141460
- const isMultiSeries = computed(() => seriesList.value.length > 1);
141461
- const canAddSeries = computed(() => !isPrimaryStandalone.value);
141462
- const availableChartTypeOptions = computed(() => {
141463
- const allOptions = [
141464
- { label: t("canvasUI.canvasBuilder.dataCharts.types.bar"), value: "bar" },
141465
- { label: t("canvasUI.canvasBuilder.dataCharts.types.line"), value: "line" },
141466
- { label: t("canvasUI.canvasBuilder.dataCharts.types.pie"), value: "pie" },
141467
- { label: t("canvasUI.canvasBuilder.dataCharts.types.doughnut"), value: "doughnut" },
141468
- { label: t("canvasUI.canvasBuilder.dataCharts.types.polarArea"), value: "polarArea" },
141469
- { label: t("canvasUI.canvasBuilder.dataCharts.types.radar"), value: "radar" },
141470
- { label: t("canvasUI.canvasBuilder.dataCharts.types.scatter"), value: "scatter" },
141471
- { label: t("canvasUI.canvasBuilder.dataCharts.types.bubble"), value: "bubble" },
141472
- { label: t("canvasUI.canvasBuilder.dataCharts.types.area"), value: "area" }
141473
- ];
141474
- const primaryType = seriesList.value[0]?.chartType;
141475
- if (seriesList.value.length > 1 || activeSeriesIndex.value > 0) {
141476
- if (THREE_D_CHART_TYPES.includes(primaryType)) {
141477
- return allOptions.filter((opt) => THREE_D_CHART_TYPES.includes(opt.value));
141478
- }
141479
- if (TWO_D_CHART_TYPES.includes(primaryType)) {
141480
- return allOptions.filter((opt) => TWO_D_CHART_TYPES.includes(opt.value));
141481
- }
141482
- return allOptions.filter((opt) => ONE_D_CHART_TYPES.includes(opt.value));
141483
- }
141484
- return allOptions;
141485
- });
141486
- const chartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
141487
- const primaryChartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
141075
+ const chartType = ref(props.data?.type ?? "bar");
141488
141076
  const backgroundColor = props.data?.data?.datasets?.[0]?.background_color;
141489
141077
  const colorSchemeType = ref(props.data?.color_scheme_type ?? "theme");
141490
141078
  const chartColors = ref([]);
@@ -141513,16 +141101,24 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141513
141101
  const chartTitle = ref(props.data?.options?.plugins?.title?.text ?? "");
141514
141102
  const legendPosition = ref(props.data?.options?.plugins?.legend?.position ?? "top");
141515
141103
  const enableAnimation = ref((props.data?.options?.animation?.duration ?? 0) > 0);
141104
+ const dataPoints = ref(
141105
+ 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) => ({
141106
+ label: String(label),
141107
+ value: String(props.data?.data?.datasets?.[0]?.data?.[index] ?? 0)
141108
+ })) : []
141109
+ );
141516
141110
  const xAxisLabel = ref(props.data?.options?.scales?.x?.title?.text ?? "");
141517
141111
  const yAxisLabel = ref(props.data?.options?.scales?.y?.title?.text ?? "");
141518
141112
  const orientation = ref(props.data?.options?.index_axis ?? "x");
141519
141113
  const pointStyle = ref(props.data?.data?.datasets?.[0]?.point_style ?? "circle");
141520
- const percentDisplay = ref(props.data?.percent_display ?? false);
141521
- const enableFullscreenBtn = ref(props.data?.view_controls?.enable_fullscreen_btn ?? false);
141522
- const enableChartTypeSwitcher = ref(props.data?.view_controls?.enable_chart_type_switcher ?? false);
141523
- const enableDataEntry = ref(props.data?.view_controls?.enable_data_entry ?? false);
141524
- const chartHeight = ref(props.data?.chart_height ?? 800);
141525
- const chartWidth = ref(props.data?.chart_width ?? 100);
141114
+ const chartTypeOptions = [
141115
+ { label: t("canvasUI.canvasBuilder.dataCharts.types.bar"), value: "bar" },
141116
+ { label: t("canvasUI.canvasBuilder.dataCharts.types.line"), value: "line" },
141117
+ { label: t("canvasUI.canvasBuilder.dataCharts.types.pie"), value: "pie" },
141118
+ { label: t("canvasUI.canvasBuilder.dataCharts.types.doughnut"), value: "doughnut" },
141119
+ { label: t("canvasUI.canvasBuilder.dataCharts.types.polarArea"), value: "polarArea" },
141120
+ { label: t("canvasUI.canvasBuilder.dataCharts.types.radar"), value: "radar" }
141121
+ ];
141526
141122
  const legendPositionOptions = [
141527
141123
  { label: t("canvasUI.canvasBuilder.dataCharts.legendPositions.none"), value: "none" },
141528
141124
  { label: t("canvasUI.canvasBuilder.dataCharts.legendPositions.top"), value: "top" },
@@ -141531,8 +141127,8 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141531
141127
  { label: t("canvasUI.canvasBuilder.dataCharts.legendPositions.right"), value: "right" }
141532
141128
  ];
141533
141129
  const orientationOptions = [
141534
- { label: t("canvasUI.canvasBuilder.dataCharts.orientations.horizontal"), value: "y" },
141535
- { label: t("canvasUI.canvasBuilder.dataCharts.orientations.vertical"), value: "x" }
141130
+ { label: t("canvasUI.canvasBuilder.dataCharts.orientations.horizontal"), value: "x" },
141131
+ { label: t("canvasUI.canvasBuilder.dataCharts.orientations.vertical"), value: "y" }
141536
141132
  ];
141537
141133
  const pointStyleOptions = [
141538
141134
  { label: t("canvasUI.canvasBuilder.dataCharts.pointStyles.circle"), value: "circle" },
@@ -141542,18 +141138,12 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141542
141138
  { label: t("canvasUI.canvasBuilder.dataCharts.pointStyles.star"), value: "star" },
141543
141139
  { label: t("canvasUI.canvasBuilder.dataCharts.pointStyles.triangle"), value: "triangle" }
141544
141140
  ];
141545
- const deleteButtonStyle = computed(() => ({
141546
- "--n-border": "1px solid transparent",
141547
- "--n-border-disabled": "1px solid transparent",
141548
- "--n-border-focus": "1px solid transparent",
141549
- "--n-border-hover": "1px solid transparent",
141550
- "--n-border-pressed": "1px solid transparent",
141551
- "--n-color-focus": themeVars.value.error2,
141552
- "--n-color-hover": themeVars.value.error2,
141553
- "--n-color-disabled": themeVars.value.error2,
141554
- "--n-color-pressed": themeVars.value.error2
141555
- }));
141556
- const activePopoverField = ref(null);
141141
+ function getColors() {
141142
+ if (colorSchemeType.value === "theme") {
141143
+ return chartColors.value.map((index) => `palette${index}`);
141144
+ }
141145
+ return chartColors.value;
141146
+ }
141557
141147
  function updateChartColors(newColors) {
141558
141148
  if (colorSchemeType.value === "theme") {
141559
141149
  chartColors.value = newColors.map((color, i) => {
@@ -141581,55 +141171,17 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141581
141171
  }
141582
141172
  }
141583
141173
  );
141584
- function closePopover() {
141585
- activePopoverPoint.value = null;
141586
- activePopoverField.value = null;
141587
- }
141588
- function addSeries() {
141589
- if (!canAddSeries.value) return;
141590
- const newIndex = seriesList.value.length;
141591
- const newSeries = {
141592
- id: generateSeriesId(),
141593
- name: `${t("canvasUI.canvasBuilder.dataCharts.series")} ${newIndex + 1}`,
141594
- chartType: seriesList.value[0].chartType,
141595
- // Default to same type as first series
141596
- dataPoints: []
141597
- };
141598
- seriesList.value.push(newSeries);
141599
- activeSeriesIndex.value = newIndex;
141600
- updatePreview();
141601
- }
141602
- function removeSeries(index) {
141603
- if (index === 0 || index >= seriesList.value.length) return;
141604
- seriesList.value.splice(index, 1);
141605
- if (activeSeriesIndex.value >= seriesList.value.length) {
141606
- activeSeriesIndex.value = seriesList.value.length - 1;
141607
- }
141608
- updatePreview();
141609
- }
141610
- function onChartTypeChange(newType) {
141611
- if (activeSeriesIndex.value === 0 && STANDALONE_CHART_TYPES.includes(newType)) {
141612
- seriesList.value = [seriesList.value[0]];
141613
- }
141614
- updatePreview();
141615
- }
141616
141174
  function addDataPoint() {
141617
- activeSeries.value.dataPoints.push({
141175
+ dataPoints.value.push({
141618
141176
  label: "",
141619
- xValue: "",
141620
- yValue: "",
141621
- rValue: "",
141622
141177
  value: ""
141623
141178
  });
141624
141179
  }
141625
141180
  function removeDataPoint(index) {
141626
- activeSeries.value.dataPoints.splice(index, 1);
141181
+ dataPoints.value.splice(index, 1);
141627
141182
  }
141628
141183
  function removeAllDataPoints() {
141629
- activeSeries.value.dataPoints = [];
141630
- }
141631
- function isArrayOrObject(value) {
141632
- return Array.isArray(value) || typeof value === "object" && value !== null;
141184
+ dataPoints.value = [];
141633
141185
  }
141634
141186
  function getFieldOptions(data) {
141635
141187
  if (!data || typeof data !== "object") return [];
@@ -141640,54 +141192,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141640
141192
  value: field
141641
141193
  }));
141642
141194
  }
141643
- function updateDynamicValueExpression(point) {
141644
- if (!point.selectedValue || !point.arrayConfig?.labelField || !point.arrayConfig?.valueField) {
141645
- return;
141646
- }
141647
- const path = point.dynamicValue?.path;
141648
- if (!path) {
141649
- return;
141650
- }
141651
- point.label = `{{#each ${path}}}{{lookup this "${point.arrayConfig.labelField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141652
- point.value = `{{#each ${path}}}{{lookup this "${point.arrayConfig.valueField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141653
- point.dynamicValue = {
141654
- path,
141655
- value: point.value
141656
- };
141657
- closePopover();
141658
- }
141659
- function updateXYDynamicValueExpression(point) {
141660
- if (!point.selectedXValue || !point.arrayConfig?.labelField || !point.arrayConfig?.xField || !point.arrayConfig?.yField) {
141661
- return;
141662
- }
141663
- const isBubble = isActiveSeriesXYRChart.value;
141664
- if (isBubble && !point.arrayConfig?.rField) {
141665
- return;
141666
- }
141667
- const path = point.dynamicXValue?.path;
141668
- if (!path) {
141669
- return;
141670
- }
141671
- point.label = `{{#each ${path}}}{{lookup this "${point.arrayConfig.labelField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141672
- point.xValue = `{{#each ${path}}}{{lookup this "${point.arrayConfig.xField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141673
- point.yValue = `{{#each ${path}}}{{lookup this "${point.arrayConfig.yField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141674
- point.dynamicXValue = {
141675
- path,
141676
- value: point.xValue
141677
- };
141678
- point.dynamicYValue = {
141679
- path,
141680
- value: point.yValue
141681
- };
141682
- if (isBubble && point.arrayConfig.rField) {
141683
- point.rValue = `{{#each ${path}}}{{lookup this "${point.arrayConfig.rField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141684
- point.dynamicRValue = {
141685
- path,
141686
- value: point.rValue
141687
- };
141688
- }
141689
- closePopover();
141690
- }
141691
141195
  const dynamicValueTreeData = computed(() => {
141692
141196
  function processObject(obj, path = []) {
141693
141197
  const result = [];
@@ -141738,59 +141242,24 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141738
141242
  return h("span", { class: "text-sm" }, { default: () => info.option.label || "" });
141739
141243
  }
141740
141244
  const activePopoverPoint = ref(null);
141741
- function handleDynamicValueClick(point, field = "value") {
141742
- if (activePopoverPoint.value === point && activePopoverField.value === field) {
141743
- closePopover();
141245
+ function handleDynamicValueClick(point) {
141246
+ if (activePopoverPoint.value === point) {
141247
+ activePopoverPoint.value = null;
141744
141248
  } else {
141745
- if (field === "value") {
141746
- point.selectedValue = void 0;
141747
- point.dynamicValue = void 0;
141748
- point.arrayConfig = void 0;
141749
- point.value = "";
141750
- } else if (field === "x") {
141751
- point.selectedXValue = void 0;
141752
- point.dynamicXValue = void 0;
141753
- point.dynamicYValue = void 0;
141754
- point.dynamicRValue = void 0;
141755
- point.arrayConfig = void 0;
141756
- point.xValue = "";
141757
- point.yValue = "";
141758
- point.rValue = "";
141759
- point.label = "";
141760
- } else if (field === "y") {
141761
- point.selectedYValue = void 0;
141762
- point.dynamicYValue = void 0;
141763
- point.yValue = "";
141764
- } else if (field === "r") {
141765
- point.selectedRValue = void 0;
141766
- point.dynamicRValue = void 0;
141767
- point.rValue = "";
141768
- }
141249
+ point.selectedValue = void 0;
141250
+ point.dynamicValue = void 0;
141251
+ point.arrayConfig = void 0;
141252
+ point.value = "";
141769
141253
  activePopoverPoint.value = point;
141770
- activePopoverField.value = field;
141771
141254
  }
141772
141255
  }
141773
- function handleDynamicValueSelect(keys, point, field = "value") {
141256
+ function handleDynamicValueSelect(keys, point) {
141774
141257
  const selectedKey = keys[0];
141775
141258
  if (!selectedKey) {
141776
- if (field === "value") {
141777
- point.dynamicValue = void 0;
141778
- point.selectedValue = void 0;
141779
- point.value = "";
141780
- } else if (field === "x") {
141781
- point.dynamicXValue = void 0;
141782
- point.selectedXValue = void 0;
141783
- point.xValue = "";
141784
- } else if (field === "y") {
141785
- point.dynamicYValue = void 0;
141786
- point.selectedYValue = void 0;
141787
- point.yValue = "";
141788
- } else if (field === "r") {
141789
- point.dynamicRValue = void 0;
141790
- point.selectedRValue = void 0;
141791
- point.rValue = "";
141792
- }
141793
- closePopover();
141259
+ point.dynamicValue = void 0;
141260
+ point.selectedValue = void 0;
141261
+ point.value = "";
141262
+ activePopoverPoint.value = null;
141794
141263
  return;
141795
141264
  }
141796
141265
  const pathParts = selectedKey.split(/\.(?![^[]*])/) || [];
@@ -141805,80 +141274,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141805
141274
  currentValue = currentValue?.[part];
141806
141275
  }
141807
141276
  }
141808
- if (field === "x") {
141809
- point.selectedXValue = currentValue;
141810
- if (Array.isArray(currentValue) || typeof currentValue === "object" && currentValue !== null) {
141811
- point.arrayConfig = {
141812
- labelField: "",
141813
- valueField: "",
141814
- xField: "",
141815
- yField: "",
141816
- rField: ""
141817
- };
141818
- point.dynamicXValue = {
141819
- path: selectedKey,
141820
- value: ""
141821
- };
141822
- return;
141823
- }
141824
- const rootPart = pathParts[0];
141825
- let expression = "";
141826
- if (pathParts.length === 1) {
141827
- expression = `{{${rootPart}}}`;
141828
- } else {
141829
- const restOfPath = pathParts.slice(1).map((part) => {
141830
- if (part.includes("[") && part.includes("]")) {
141831
- return part.split("[")[1].split("]")[0];
141832
- }
141833
- return part;
141834
- });
141835
- expression = `{{lookup (lookup ${rootPart} ${restOfPath[0]}) "${restOfPath[1]}"}}`;
141836
- }
141837
- point.dynamicXValue = { path: selectedKey, value: expression };
141838
- point.xValue = expression;
141839
- closePopover();
141840
- return;
141841
- }
141842
- if (field === "y") {
141843
- point.selectedYValue = currentValue;
141844
- const rootPart = pathParts[0];
141845
- let expression = "";
141846
- if (pathParts.length === 1) {
141847
- expression = `{{${rootPart}}}`;
141848
- } else {
141849
- const restOfPath = pathParts.slice(1).map((part) => {
141850
- if (part.includes("[") && part.includes("]")) {
141851
- return part.split("[")[1].split("]")[0];
141852
- }
141853
- return part;
141854
- });
141855
- expression = `{{lookup (lookup ${rootPart} ${restOfPath[0]}) "${restOfPath[1]}"}}`;
141856
- }
141857
- point.dynamicYValue = { path: selectedKey, value: expression };
141858
- point.yValue = expression;
141859
- closePopover();
141860
- return;
141861
- }
141862
- if (field === "r") {
141863
- point.selectedRValue = currentValue;
141864
- const rootPart = pathParts[0];
141865
- let expression = "";
141866
- if (pathParts.length === 1) {
141867
- expression = `{{${rootPart}}}`;
141868
- } else {
141869
- const restOfPath = pathParts.slice(1).map((part) => {
141870
- if (part.includes("[") && part.includes("]")) {
141871
- return part.split("[")[1].split("]")[0];
141872
- }
141873
- return part;
141874
- });
141875
- expression = `{{lookup (lookup ${rootPart} ${restOfPath[0]}) "${restOfPath[1]}"}}`;
141876
- }
141877
- point.dynamicRValue = { path: selectedKey, value: expression };
141878
- point.rValue = expression;
141879
- closePopover();
141880
- return;
141881
- }
141882
141277
  point.selectedValue = currentValue;
141883
141278
  if (Array.isArray(currentValue) || typeof currentValue === "object" && currentValue !== null) {
141884
141279
  point.arrayConfig = {
@@ -141908,189 +141303,79 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
141908
141303
  value: expression
141909
141304
  };
141910
141305
  point.value = expression;
141911
- closePopover();
141912
- }
141913
- }
141914
- function normalizeRValues(values, minRadius = 5, maxRadius = 40) {
141915
- if (values.length === 0) return [];
141916
- const rValues = values.map((v) => v.r);
141917
- const minR = Math.min(...rValues);
141918
- const maxR = Math.max(...rValues);
141919
- if (minR === maxR) {
141920
- return values.map((v) => ({
141921
- ...v,
141922
- r: (minRadius + maxRadius) / 2,
141923
- originalR: v.r
141924
- }));
141306
+ activePopoverPoint.value = null;
141925
141307
  }
141926
- return values.map((v) => ({
141927
- ...v,
141928
- r: minRadius + (v.r - minR) / (maxR - minR) * (maxRadius - minRadius),
141929
- originalR: v.r
141930
- }));
141931
141308
  }
141932
- function processSeriesData(series) {
141933
- const isXY = XY_CHART_TYPES.includes(series.chartType);
141934
- const isXYR = XYR_CHART_TYPES.includes(series.chartType);
141935
- if (isXY || isXYR) {
141936
- const processedData2 = {
141937
- labels: [],
141938
- values: []
141939
- };
141940
- const rawBubbleData = [];
141941
- series.dataPoints.forEach((point) => {
141942
- const x = !isNaN(Number(point.xValue)) ? Number(point.xValue) : 0;
141943
- const y = !isNaN(Number(point.yValue)) ? Number(point.yValue) : 0;
141944
- if (series.chartType === "bubble") {
141945
- const r = point.rValue && !isNaN(Number(point.rValue)) ? Math.abs(Number(point.rValue)) : 10;
141946
- rawBubbleData.push({ label: point.label, x, y, r });
141947
- } else {
141948
- processedData2.labels.push(point.label);
141949
- processedData2.values.push({ x, y });
141950
- }
141951
- });
141952
- if (series.chartType === "bubble" && rawBubbleData.length > 0) {
141953
- const bubbleValues = rawBubbleData.map((d) => ({ x: d.x, y: d.y, r: d.r }));
141954
- const normalizedValues = normalizeRValues(bubbleValues);
141955
- rawBubbleData.forEach((d, idx) => {
141956
- processedData2.labels.push(d.label);
141957
- processedData2.values.push(normalizedValues[idx]);
141958
- });
141959
- }
141960
- return processedData2;
141309
+ function updateDynamicValueExpression(point) {
141310
+ if (!point.selectedValue || !point.arrayConfig?.labelField || !point.arrayConfig?.valueField) {
141311
+ return;
141961
141312
  }
141313
+ const path = point.dynamicValue?.path;
141314
+ if (!path) {
141315
+ return;
141316
+ }
141317
+ point.label = `{{#each ${path}}}{{lookup this "${point.arrayConfig.labelField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141318
+ point.value = `{{#each ${path}}}{{lookup this "${point.arrayConfig.valueField}"}}{{#unless @last}},{{/unless}}{{/each}}`;
141319
+ point.dynamicValue = {
141320
+ path,
141321
+ value: point.value
141322
+ };
141323
+ activePopoverPoint.value = null;
141324
+ }
141325
+ function processChartData() {
141962
141326
  const processedData = {
141963
141327
  labels: [],
141964
141328
  values: []
141965
141329
  };
141966
- series.dataPoints.forEach((point) => {
141330
+ dataPoints.value.forEach((point) => {
141967
141331
  processedData.labels.push(point.label);
141968
141332
  processedData.values.push(!isNaN(Number(point.value)) ? Number(point.value) : 0);
141969
141333
  });
141970
141334
  return processedData;
141971
141335
  }
141972
- function getSeriesColors(forStorage = false) {
141973
- if (colorSchemeType.value === "theme") {
141974
- if (forStorage) {
141975
- return chartColors.value.map((index) => `palette${index}`);
141976
- }
141977
- return chartColors.value.map((index) => {
141978
- const idx = parseInt(index);
141979
- return palette.value[idx % palette.value.length];
141980
- });
141981
- }
141982
- return chartColors.value;
141983
- }
141984
141336
  function createChartConfig() {
141985
- const datasets = [];
141986
- let allLabels = [];
141987
- const colorsForStorage = getSeriesColors(true);
141988
- const isSingleSeries = seriesList.value.length === 1;
141989
- seriesList.value.forEach((series, index) => {
141990
- const processedData = processSeriesData(series);
141991
- let backgroundColor2;
141992
- let borderColor;
141993
- if (isSingleSeries) {
141994
- backgroundColor2 = colorsForStorage;
141995
- borderColor = [...colorsForStorage];
141996
- } else {
141997
- const seriesColor = colorsForStorage[index % colorsForStorage.length];
141998
- backgroundColor2 = seriesColor;
141999
- borderColor = seriesColor;
142000
- }
142001
- const datasetOptions = {
142002
- label: series.name,
142003
- data: processedData.values,
142004
- background_color: backgroundColor2,
142005
- border_color: borderColor,
142006
- borderWidth: 1
142007
- };
142008
- if (!isSingleSeries) {
142009
- if (series.chartType === "area") {
142010
- datasetOptions.type = "line";
142011
- datasetOptions.fill = true;
142012
- datasetOptions.tension = 0.4;
142013
- } else {
142014
- datasetOptions.type = series.chartType;
142015
- }
142016
- }
142017
- if (series.chartType === "area") {
142018
- datasetOptions.fill = true;
142019
- datasetOptions.tension = 0.4;
142020
- }
142021
- if (["line", "scatter", "area"].includes(series.chartType)) {
142022
- datasetOptions.pointStyle = pointStyle.value;
142023
- }
142024
- if (["line", "area"].includes(series.chartType)) {
142025
- datasetOptions.tension = 0.4;
142026
- }
142027
- if (processedData.labels.length > allLabels.length) {
142028
- allLabels = processedData.labels;
142029
- }
142030
- datasets.push(datasetOptions);
142031
- });
142032
- const primaryType = seriesList.value[0].chartType;
142033
- let actualPrimaryType = primaryType;
142034
- if (primaryType === "area") {
142035
- actualPrimaryType = "line";
142036
- }
142037
- let scales = void 0;
142038
- const chartTypesWithScales = ["bar", "line", "scatter", "bubble", "area"];
142039
- if (chartTypesWithScales.includes(primaryType)) {
142040
- scales = {
142041
- x: {
142042
- title: {
142043
- display: !!xAxisLabel.value,
142044
- text: xAxisLabel.value
142045
- }
142046
- },
142047
- y: {
142048
- title: {
142049
- display: !!yAxisLabel.value,
142050
- text: yAxisLabel.value
142051
- },
142052
- begin_at_zero: true
142053
- }
142054
- };
142055
- } else if (["radar", "polarArea"].includes(primaryType)) {
142056
- scales = {
142057
- r: {
142058
- begin_at_zero: true,
142059
- ticks: {
142060
- step_size: 1
142061
- }
142062
- }
142063
- };
142064
- }
142065
- const showLegend = seriesList.value.length > 1 || legendPosition.value !== "none";
142066
141337
  const config = {
142067
- type: actualPrimaryType,
141338
+ type: chartType.value,
142068
141339
  color_scheme_type: colorSchemeType.value,
142069
- percent_display: percentDisplay.value,
142070
- chart_height: chartHeight.value,
142071
- chart_width: chartWidth.value,
142072
- view_controls: {
142073
- enable_fullscreen_btn: enableFullscreenBtn.value,
142074
- enable_chart_type_switcher: enableChartTypeSwitcher.value,
142075
- enable_data_entry: enableDataEntry.value
142076
- },
142077
141340
  data: {
142078
- labels: allLabels,
142079
- datasets
141341
+ labels: [],
141342
+ datasets: [
141343
+ {
141344
+ label: "Data Series",
141345
+ data: [],
141346
+ background_color: getColors(),
141347
+ border_color: getColors(),
141348
+ border_width: 1,
141349
+ point_style: ["line"].includes(chartType.value) ? pointStyle.value : void 0
141350
+ }
141351
+ ]
142080
141352
  },
142081
141353
  options: {
142082
141354
  responsive: true,
142083
141355
  maintainAspectRatio: false,
142084
- index_axis: ["bar", "line"].includes(primaryType) ? orientation.value : void 0,
142085
- scales,
141356
+ index_axis: ["bar", "line"].includes(chartType.value) ? orientation.value : void 0,
141357
+ scales: ["bar", "line"].includes(chartType.value) ? {
141358
+ x: {
141359
+ title: {
141360
+ display: !!xAxisLabel.value,
141361
+ text: xAxisLabel.value
141362
+ }
141363
+ },
141364
+ y: {
141365
+ title: {
141366
+ display: !!yAxisLabel.value,
141367
+ text: yAxisLabel.value
141368
+ }
141369
+ }
141370
+ } : void 0,
142086
141371
  plugins: {
142087
141372
  title: {
142088
141373
  display: !!chartTitle.value,
142089
141374
  text: chartTitle.value
142090
141375
  },
142091
141376
  legend: {
142092
- display: showLegend,
142093
- position: legendPosition.value !== "none" ? legendPosition.value : "top",
141377
+ display: legendPosition.value !== "none",
141378
+ position: legendPosition.value,
142094
141379
  labels: {
142095
141380
  usePointStyle: true
142096
141381
  }
@@ -142100,27 +141385,14 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142100
141385
  duration: enableAnimation.value ? 1e3 : 0
142101
141386
  }
142102
141387
  },
142103
- // Save series data for editing
142104
- series: seriesList.value.map((series) => ({
142105
- id: series.id,
142106
- name: series.name,
142107
- chart_type: series.chartType,
142108
- data_points: series.dataPoints.map((point) => ({
142109
- label: point.label,
142110
- value: point.value,
142111
- x_value: point.xValue,
142112
- y_value: point.yValue,
142113
- r_value: point.rValue,
142114
- dynamic_value: point.dynamicValue,
142115
- dynamic_x_value: point.dynamicXValue,
142116
- dynamic_y_value: point.dynamicYValue,
142117
- dynamic_r_value: point.dynamicRValue,
142118
- array_config: point.arrayConfig
142119
- }))
142120
- })),
142121
- // Store the primary chart type for reference
142122
- _primary_chart_type: primaryType
141388
+ data_points: dataPoints.value.map((point) => ({
141389
+ label: point.label,
141390
+ value: point.value
141391
+ }))
142123
141392
  };
141393
+ const processedData = processChartData();
141394
+ config.data.labels = processedData.labels;
141395
+ config.data.datasets[0].data = processedData.values;
142124
141396
  return config;
142125
141397
  }
142126
141398
  function onCancel() {
@@ -142148,14 +141420,9 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142148
141420
  },
142149
141421
  { immediate: true }
142150
141422
  );
142151
- watch(isMultiSeries, (multiSeries) => {
142152
- if (multiSeries) {
142153
- enableChartTypeSwitcher.value = false;
142154
- }
142155
- });
142156
141423
  watch(
142157
141424
  [
142158
- seriesList,
141425
+ chartType,
142159
141426
  chartColors,
142160
141427
  colorSchemeType,
142161
141428
  chartTitle,
@@ -142164,13 +141431,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142164
141431
  yAxisLabel,
142165
141432
  orientation,
142166
141433
  pointStyle,
142167
- percentDisplay,
142168
- enableAnimation,
142169
- enableFullscreenBtn,
142170
- enableChartTypeSwitcher,
142171
- enableDataEntry,
142172
- chartHeight,
142173
- chartWidth
141434
+ dataPoints
142174
141435
  ],
142175
141436
  () => {
142176
141437
  updatePreview();
@@ -142196,10 +141457,10 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142196
141457
  "--n-padding-left": "16px"
142197
141458
  }]),
142198
141459
  title: unref(t)("canvasUI.canvasBuilder.dataCharts.editDataChartsComponent"),
142199
- onClose: _cache[16] || (_cache[16] = ($event) => unref(setComponentEditMode)(false))
141460
+ onClose: _cache[11] || (_cache[11] = ($event) => unref(setComponentEditMode)(false))
142200
141461
  }, {
142201
141462
  footer: withCtx(() => [
142202
- createElementVNode("div", _hoisted_89, [
141463
+ createElementVNode("div", _hoisted_50$3, [
142203
141464
  createVNode(CButton, { onClick: onCancel }, {
142204
141465
  default: withCtx(() => [
142205
141466
  createTextVNode(toDisplayString(unref(t)("canvasUI.common.cancel")), 1)
@@ -142237,66 +141498,69 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142237
141498
  createElementVNode("div", _hoisted_2$1t, [
142238
141499
  createElementVNode("div", _hoisted_3$17, [
142239
141500
  createElementVNode("div", _hoisted_4$X, [
142240
- createElementVNode("div", _hoisted_5$O, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.dataSettings")), 1),
142241
- createElementVNode("div", _hoisted_6$H, [
142242
- (openBlock(true), createElementBlock(Fragment, null, renderList(seriesList.value, (series, index) => {
142243
- return openBlock(), createElementBlock("div", {
142244
- key: series.id,
142245
- class: normalizeClass(["series-tab flex items-center gap-1 px-3 py-2 h-9 cursor-pointer border border-b-0 rounded-t-lg mr-1 transition-colors", [
142246
- activeSeriesIndex.value === index ? "bg-white dark:bg-gray-800 border-gray-200 dark:border-gray-700 -mb-px" : "bg-gray-100 dark:bg-gray-900 border-transparent hover:bg-gray-200 dark:hover:bg-gray-700"
142247
- ]]),
142248
- onClick: ($event) => activeSeriesIndex.value = index
142249
- }, [
142250
- createElementVNode("span", _hoisted_8$q, toDisplayString(series.name), 1),
142251
- index > 0 ? (openBlock(), createElementBlock("div", {
142252
- key: 0,
142253
- class: "ml-1 p-0.5 rounded hover:bg-gray-300 dark:hover:bg-gray-600",
142254
- onClick: withModifiers(($event) => removeSeries(index), ["stop"])
142255
- }, [
142256
- createVNode(CIcon, {
142257
- class: "text-gray-500",
142258
- icon: "times",
142259
- size: 10
142260
- })
142261
- ], 8, _hoisted_9$m)) : createCommentVNode("", true)
142262
- ], 10, _hoisted_7$v);
142263
- }), 128)),
142264
- canAddSeries.value ? (openBlock(), createElementBlock("button", {
142265
- key: 0,
142266
- 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",
142267
- title: unref(t)("canvasUI.canvasBuilder.dataCharts.addSeries"),
142268
- onClick: addSeries
142269
- }, [
142270
- createVNode(CIcon, {
142271
- icon: "plus",
142272
- size: 14
142273
- })
142274
- ], 8, _hoisted_10$h)) : createCommentVNode("", true)
141501
+ createElementVNode("div", _hoisted_5$O, [
141502
+ createElementVNode("label", _hoisted_6$H, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartType")), 1),
141503
+ createVNode(unref(NSelect), {
141504
+ value: chartType.value,
141505
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => chartType.value = $event),
141506
+ options: chartTypeOptions
141507
+ }, null, 8, ["value"])
142275
141508
  ]),
142276
- seriesList.value.length > 1 ? (openBlock(), createElementBlock("div", _hoisted_11$f, [
142277
- createElementVNode("label", _hoisted_12$b, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.seriesName")), 1),
141509
+ ["bar", "line"].includes(chartType.value) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
141510
+ createElementVNode("div", _hoisted_7$v, [
141511
+ createElementVNode("label", _hoisted_8$q, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.xAxisLabel")), 1),
141512
+ createVNode(unref(NInput), {
141513
+ value: xAxisLabel.value,
141514
+ "onUpdate:value": _cache[1] || (_cache[1] = ($event) => xAxisLabel.value = $event),
141515
+ type: "text"
141516
+ }, null, 8, ["value"])
141517
+ ]),
141518
+ createElementVNode("div", _hoisted_9$m, [
141519
+ createElementVNode("label", _hoisted_10$h, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.yAxisLabel")), 1),
141520
+ createVNode(unref(NInput), {
141521
+ value: yAxisLabel.value,
141522
+ "onUpdate:value": _cache[2] || (_cache[2] = ($event) => yAxisLabel.value = $event),
141523
+ type: "text"
141524
+ }, null, 8, ["value"])
141525
+ ]),
141526
+ createElementVNode("div", _hoisted_11$f, [
141527
+ createElementVNode("label", _hoisted_12$b, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.orientation")), 1),
141528
+ createVNode(unref(NSelect), {
141529
+ value: orientation.value,
141530
+ "onUpdate:value": _cache[3] || (_cache[3] = ($event) => orientation.value = $event),
141531
+ options: orientationOptions
141532
+ }, null, 8, ["value"])
141533
+ ]),
141534
+ ["line", "radar"].includes(chartType.value) ? (openBlock(), createElementBlock("div", _hoisted_13$a, [
141535
+ createElementVNode("label", _hoisted_14$9, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.pointStyle")), 1),
141536
+ createVNode(unref(NSelect), {
141537
+ value: pointStyle.value,
141538
+ "onUpdate:value": _cache[4] || (_cache[4] = ($event) => pointStyle.value = $event),
141539
+ options: pointStyleOptions
141540
+ }, null, 8, ["value"])
141541
+ ])) : createCommentVNode("", true)
141542
+ ], 64)) : createCommentVNode("", true),
141543
+ createElementVNode("div", _hoisted_15$8, [
141544
+ createElementVNode("label", _hoisted_16$8, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartTitle")), 1),
142278
141545
  createVNode(unref(NInput), {
142279
- value: activeSeries.value.name,
142280
- "onUpdate:value": _cache[0] || (_cache[0] = ($event) => activeSeries.value.name = $event),
141546
+ value: chartTitle.value,
141547
+ "onUpdate:value": _cache[5] || (_cache[5] = ($event) => chartTitle.value = $event),
142281
141548
  type: "text"
142282
141549
  }, null, 8, ["value"])
142283
- ])) : createCommentVNode("", true),
142284
- createElementVNode("div", _hoisted_13$a, [
142285
- createElementVNode("label", _hoisted_14$9, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartType")), 1),
142286
- createVNode(unref(NSelect), {
142287
- value: activeSeries.value.chartType,
142288
- "onUpdate:value": [
142289
- _cache[1] || (_cache[1] = ($event) => activeSeries.value.chartType = $event),
142290
- onChartTypeChange
142291
- ],
142292
- options: availableChartTypeOptions.value
142293
- }, null, 8, ["value", "options"])
142294
141550
  ]),
142295
- createElementVNode("div", _hoisted_15$8, [
142296
- createElementVNode("div", _hoisted_16$8, [
142297
- createElementVNode("label", _hoisted_17$7, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.dataPoints")), 1),
141551
+ ["pie", "doughnut", "polarArea"].includes(chartType.value) ? (openBlock(), createElementBlock("div", _hoisted_17$7, [
141552
+ createElementVNode("label", _hoisted_18$6, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.legendPosition")), 1),
141553
+ createVNode(unref(NSelect), {
141554
+ value: legendPosition.value,
141555
+ "onUpdate:value": _cache[6] || (_cache[6] = ($event) => legendPosition.value = $event),
141556
+ options: legendPositionOptions
141557
+ }, null, 8, ["value"])
141558
+ ])) : createCommentVNode("", true),
141559
+ createElementVNode("div", _hoisted_19$6, [
141560
+ createElementVNode("div", _hoisted_20$5, [
141561
+ createElementVNode("label", _hoisted_21$5, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.dataPoints")), 1),
142298
141562
  createVNode(unref(Button), {
142299
- disabled: !activeSeries.value.dataPoints.length,
141563
+ disabled: !dataPoints.value.length,
142300
141564
  size: "small",
142301
141565
  onClick: removeAllDataPoints
142302
141566
  }, {
@@ -142306,301 +141570,205 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142306
141570
  _: 1
142307
141571
  }, 8, ["disabled"])
142308
141572
  ]),
142309
- !isActiveSeriesXYChart.value && !isActiveSeriesXYRChart.value ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(activeSeries.value.dataPoints, (point, index) => {
141573
+ (openBlock(true), createElementBlock(Fragment, null, renderList(dataPoints.value, (point, index) => {
142310
141574
  return openBlock(), createElementBlock("div", {
142311
141575
  key: index,
142312
141576
  class: "flex gap-2 mb-2"
142313
141577
  }, [
142314
- createVNode(unref(NInput), {
142315
- value: point.label,
142316
- "onUpdate:value": ($event) => point.label = $event,
142317
- class: "flex-1",
142318
- disabled: !!point.arrayConfig,
142319
- placeholder: "Label"
142320
- }, null, 8, ["value", "onUpdate:value", "disabled"]),
142321
- createVNode(unref(NInput), {
142322
- value: point.value,
142323
- "onUpdate:value": ($event) => point.value = $event,
142324
- class: "flex-1",
142325
- disabled: !!point.dynamicValue,
142326
- placeholder: "Value",
142327
- type: "text"
141578
+ point.selectedValue && (Array.isArray(point.selectedValue) || typeof point.selectedValue === "object" && point.selectedValue !== null) ? (openBlock(), createBlock(unref(NTooltip), {
141579
+ key: 0,
141580
+ trigger: "hover"
142328
141581
  }, {
142329
- suffix: withCtx(() => [
142330
- createVNode(unref(NPopover), {
142331
- placement: "bottom",
142332
- show: activePopoverPoint.value === point && activePopoverField.value === "value",
142333
- trigger: "manual",
142334
- onClickoutside: closePopover
142335
- }, {
142336
- trigger: withCtx(() => [
142337
- createElementVNode("div", {
142338
- class: "cursor-pointer flex items-center",
142339
- onClick: ($event) => handleDynamicValueClick(point, "value")
142340
- }, [
142341
- createVNode(CIcon, {
142342
- class: normalizeClass(point.dynamicValue ? "text-blue-500" : ""),
142343
- icon: "caret-down"
142344
- }, null, 8, ["class"])
142345
- ], 8, _hoisted_18$6)
142346
- ]),
142347
- default: withCtx(() => [
142348
- createElementVNode("div", _hoisted_19$6, [
142349
- createElementVNode("div", _hoisted_20$5, [
142350
- createElementVNode("div", _hoisted_21$5, [
142351
- createElementVNode("div", _hoisted_22$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
142352
- createElementVNode("div", _hoisted_23$3, [
142353
- createVNode(unref(NTree), {
142354
- "block-line": "",
142355
- class: "max-h-[300px]",
142356
- data: dynamicValueTreeData.value,
142357
- "render-label": renderDynamicValueTreeLabel,
142358
- "selected-keys": [point.dynamicValue?.path ?? ""],
142359
- "onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point, "value")
142360
- }, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
142361
- ])
142362
- ]),
142363
- point.selectedValue && point.arrayConfig && isArrayOrObject(point.selectedValue) ? (openBlock(), createElementBlock("div", _hoisted_24$3, [
142364
- createElementVNode("div", _hoisted_25$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.configureArrayObjectFields")), 1),
142365
- createElementVNode("div", _hoisted_26$3, [
142366
- createElementVNode("div", null, [
142367
- createElementVNode("label", _hoisted_27$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.labelField")), 1),
142368
- createVNode(unref(NSelect), {
142369
- value: point.arrayConfig.labelField,
142370
- "onUpdate:value": [($event) => point.arrayConfig.labelField = $event, ($event) => updateDynamicValueExpression(point)],
142371
- options: getFieldOptions(point.selectedValue)
142372
- }, null, 8, ["value", "onUpdate:value", "options"])
142373
- ]),
142374
- createElementVNode("div", null, [
142375
- createElementVNode("label", _hoisted_28$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.valueField")), 1),
142376
- createVNode(unref(NSelect), {
142377
- value: point.arrayConfig.valueField,
142378
- "onUpdate:value": [($event) => point.arrayConfig.valueField = $event, ($event) => updateDynamicValueExpression(point)],
142379
- options: getFieldOptions(point.selectedValue)
142380
- }, null, 8, ["value", "onUpdate:value", "options"])
142381
- ])
142382
- ])
142383
- ])) : createCommentVNode("", true)
142384
- ])
142385
- ])
142386
- ]),
142387
- _: 2
142388
- }, 1032, ["show"])
141582
+ trigger: withCtx(() => [
141583
+ createVNode(unref(NInput), {
141584
+ value: point.label,
141585
+ "onUpdate:value": ($event) => point.label = $event,
141586
+ class: "flex-1",
141587
+ disabled: true,
141588
+ placeholder: "Label"
141589
+ }, null, 8, ["value", "onUpdate:value"])
142389
141590
  ]),
142390
- _: 2
142391
- }, 1032, ["value", "onUpdate:value", "disabled"]),
142392
- createVNode(CButton, {
142393
- circle: "",
142394
- class: "bg-error2 self-center",
142395
- size: "small",
142396
- style: normalizeStyle(deleteButtonStyle.value),
142397
- type: "error",
142398
- onClick: ($event) => removeDataPoint(index)
142399
- }, {
142400
- icon: withCtx(() => [
142401
- createVNode(CIcon, {
142402
- class: "color-error",
142403
- "fa-type": "far",
142404
- icon: "trash",
142405
- size: 12
142406
- })
141591
+ default: withCtx(() => [
141592
+ createTextVNode(" " + toDisplayString(point.label), 1)
142407
141593
  ]),
142408
141594
  _: 2
142409
- }, 1032, ["style", "onClick"])
142410
- ]);
142411
- }), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(activeSeries.value.dataPoints, (point, index) => {
142412
- return openBlock(), createElementBlock("div", {
142413
- key: index,
142414
- class: "flex gap-2 mb-2"
142415
- }, [
142416
- createVNode(unref(NInput), {
141595
+ }, 1024)) : (openBlock(), createBlock(unref(NInput), {
141596
+ key: 1,
142417
141597
  value: point.label,
142418
141598
  "onUpdate:value": ($event) => point.label = $event,
142419
141599
  class: "flex-1",
142420
- disabled: !!point.arrayConfig,
142421
141600
  placeholder: "Label"
142422
- }, null, 8, ["value", "onUpdate:value", "disabled"]),
142423
- createVNode(unref(NInput), {
142424
- value: point.xValue,
142425
- "onUpdate:value": ($event) => point.xValue = $event,
142426
- class: "flex-1",
142427
- disabled: !!point.dynamicXValue,
142428
- placeholder: "X Value",
142429
- type: "text"
142430
- }, {
142431
- suffix: withCtx(() => [
142432
- createVNode(unref(NPopover), {
142433
- placement: "bottom",
142434
- show: activePopoverPoint.value === point && activePopoverField.value === "x",
142435
- trigger: "manual",
142436
- onClickoutside: closePopover
142437
- }, {
142438
- trigger: withCtx(() => [
142439
- createElementVNode("div", {
142440
- class: "cursor-pointer flex items-center",
142441
- onClick: ($event) => handleDynamicValueClick(point, "x")
142442
- }, [
142443
- createVNode(CIcon, {
142444
- class: normalizeClass(point.dynamicXValue ? "text-blue-500" : ""),
142445
- icon: "caret-down"
142446
- }, null, 8, ["class"])
142447
- ], 8, _hoisted_29$3)
142448
- ]),
142449
- default: withCtx(() => [
142450
- createElementVNode("div", _hoisted_30$3, [
142451
- createElementVNode("div", _hoisted_31$3, [
142452
- createElementVNode("div", _hoisted_32$3, [
142453
- createElementVNode("div", _hoisted_33$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
142454
- createElementVNode("div", _hoisted_34$3, [
142455
- createVNode(unref(NTree), {
142456
- "block-line": "",
142457
- class: "max-h-[300px]",
142458
- data: dynamicValueTreeData.value,
142459
- "render-label": renderDynamicValueTreeLabel,
142460
- "selected-keys": [point.dynamicXValue?.path ?? ""],
142461
- "onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point, "x")
142462
- }, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
141601
+ }, null, 8, ["value", "onUpdate:value"])),
141602
+ createElementVNode("div", _hoisted_22$3, [
141603
+ point.dynamicValue ? (openBlock(), createBlock(unref(NTooltip), {
141604
+ key: 0,
141605
+ trigger: "hover"
141606
+ }, {
141607
+ trigger: withCtx(() => [
141608
+ createVNode(unref(NInput), {
141609
+ value: point.value,
141610
+ "onUpdate:value": ($event) => point.value = $event,
141611
+ class: "flex-1",
141612
+ disabled: !!point.dynamicValue,
141613
+ placeholder: "Value",
141614
+ type: "text"
141615
+ }, {
141616
+ suffix: withCtx(() => [
141617
+ createVNode(unref(NPopover), {
141618
+ placement: "bottom",
141619
+ show: activePopoverPoint.value === point,
141620
+ trigger: "manual",
141621
+ onClickoutside: _cache[7] || (_cache[7] = ($event) => activePopoverPoint.value = null)
141622
+ }, {
141623
+ trigger: withCtx(() => [
141624
+ createElementVNode("div", {
141625
+ class: "cursor-pointer flex items-center",
141626
+ onClick: ($event) => handleDynamicValueClick(point)
141627
+ }, [
141628
+ createVNode(CIcon, {
141629
+ class: normalizeClass(point.dynamicValue ? "text-blue-500" : ""),
141630
+ icon: "caret-down"
141631
+ }, null, 8, ["class"])
141632
+ ], 8, _hoisted_23$3)
141633
+ ]),
141634
+ default: withCtx(() => [
141635
+ createElementVNode("div", _hoisted_24$3, [
141636
+ createElementVNode("div", _hoisted_25$3, [
141637
+ createElementVNode("div", _hoisted_26$3, [
141638
+ createElementVNode("div", _hoisted_27$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
141639
+ createElementVNode("div", _hoisted_28$3, [
141640
+ createVNode(unref(NTree), {
141641
+ "block-line": "",
141642
+ class: "max-h-[300px]",
141643
+ data: dynamicValueTreeData.value,
141644
+ "render-label": renderDynamicValueTreeLabel,
141645
+ "selected-keys": [point.dynamicValue?.path ?? ""],
141646
+ "onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point)
141647
+ }, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
141648
+ ])
141649
+ ]),
141650
+ point.selectedValue && point.arrayConfig && (Array.isArray(point.selectedValue) || typeof point.selectedValue === "object" && point.selectedValue !== null) ? (openBlock(), createElementBlock("div", _hoisted_29$3, [
141651
+ createElementVNode("div", _hoisted_30$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.configureArrayObjectFields")), 1),
141652
+ createElementVNode("div", _hoisted_31$3, [
141653
+ createElementVNode("div", null, [
141654
+ createElementVNode("label", _hoisted_32$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.labelField")), 1),
141655
+ createVNode(unref(NSelect), {
141656
+ value: point.arrayConfig.labelField,
141657
+ "onUpdate:value": [($event) => point.arrayConfig.labelField = $event, ($event) => updateDynamicValueExpression(point)],
141658
+ options: getFieldOptions(point.selectedValue)
141659
+ }, null, 8, ["value", "onUpdate:value", "options"])
141660
+ ]),
141661
+ createElementVNode("div", null, [
141662
+ createElementVNode("label", _hoisted_33$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.valueField")), 1),
141663
+ createVNode(unref(NSelect), {
141664
+ value: point.arrayConfig.valueField,
141665
+ "onUpdate:value": [($event) => point.arrayConfig.valueField = $event, ($event) => updateDynamicValueExpression(point)],
141666
+ options: getFieldOptions(point.selectedValue)
141667
+ }, null, 8, ["value", "onUpdate:value", "options"])
141668
+ ])
141669
+ ])
141670
+ ])) : createCommentVNode("", true)
141671
+ ])
142463
141672
  ])
142464
141673
  ]),
142465
- point.selectedXValue && point.arrayConfig && isArrayOrObject(point.selectedXValue) ? (openBlock(), createElementBlock("div", _hoisted_35$3, [
142466
- createElementVNode("div", _hoisted_36$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.configureArrayObjectFields")), 1),
141674
+ _: 2
141675
+ }, 1032, ["show"])
141676
+ ]),
141677
+ _: 2
141678
+ }, 1032, ["value", "onUpdate:value", "disabled"])
141679
+ ]),
141680
+ default: withCtx(() => [
141681
+ createTextVNode(" " + toDisplayString(point.value), 1)
141682
+ ]),
141683
+ _: 2
141684
+ }, 1024)) : (openBlock(), createBlock(unref(NInput), {
141685
+ key: 1,
141686
+ value: point.value,
141687
+ "onUpdate:value": ($event) => point.value = $event,
141688
+ class: "flex-1",
141689
+ disabled: !!point.dynamicValue,
141690
+ placeholder: "Value",
141691
+ type: "text"
141692
+ }, {
141693
+ suffix: withCtx(() => [
141694
+ createVNode(unref(NPopover), {
141695
+ placement: "bottom",
141696
+ show: activePopoverPoint.value === point,
141697
+ trigger: "manual",
141698
+ onClickoutside: _cache[8] || (_cache[8] = ($event) => activePopoverPoint.value = null)
141699
+ }, {
141700
+ trigger: withCtx(() => [
141701
+ createElementVNode("div", {
141702
+ class: "cursor-pointer flex items-center",
141703
+ onClick: ($event) => handleDynamicValueClick(point)
141704
+ }, [
141705
+ createVNode(CIcon, {
141706
+ class: normalizeClass(point.dynamicValue ? "text-blue-500" : ""),
141707
+ icon: "caret-down"
141708
+ }, null, 8, ["class"])
141709
+ ], 8, _hoisted_34$3)
141710
+ ]),
141711
+ default: withCtx(() => [
141712
+ createElementVNode("div", _hoisted_35$3, [
141713
+ createElementVNode("div", _hoisted_36$3, [
142467
141714
  createElementVNode("div", _hoisted_37$3, [
142468
- createElementVNode("div", null, [
142469
- createElementVNode("label", _hoisted_38$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.labelField")), 1),
142470
- createVNode(unref(NSelect), {
142471
- value: point.arrayConfig.labelField,
142472
- "onUpdate:value": [($event) => point.arrayConfig.labelField = $event, ($event) => updateXYDynamicValueExpression(point)],
142473
- options: getFieldOptions(point.selectedXValue)
142474
- }, null, 8, ["value", "onUpdate:value", "options"])
142475
- ]),
142476
- createElementVNode("div", null, [
142477
- createElementVNode("label", _hoisted_39$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.xValueField")), 1),
142478
- createVNode(unref(NSelect), {
142479
- value: point.arrayConfig.xField,
142480
- "onUpdate:value": [($event) => point.arrayConfig.xField = $event, ($event) => updateXYDynamicValueExpression(point)],
142481
- options: getFieldOptions(point.selectedXValue)
142482
- }, null, 8, ["value", "onUpdate:value", "options"])
142483
- ]),
142484
- createElementVNode("div", null, [
142485
- createElementVNode("label", _hoisted_40$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.yValueField")), 1),
142486
- createVNode(unref(NSelect), {
142487
- value: point.arrayConfig.yField,
142488
- "onUpdate:value": [($event) => point.arrayConfig.yField = $event, ($event) => updateXYDynamicValueExpression(point)],
142489
- options: getFieldOptions(point.selectedXValue)
142490
- }, null, 8, ["value", "onUpdate:value", "options"])
142491
- ]),
142492
- isActiveSeriesXYRChart.value ? (openBlock(), createElementBlock("div", _hoisted_41$3, [
142493
- createElementVNode("label", _hoisted_42$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.rValueField")), 1),
142494
- createVNode(unref(NSelect), {
142495
- value: point.arrayConfig.rField,
142496
- "onUpdate:value": [($event) => point.arrayConfig.rField = $event, ($event) => updateXYDynamicValueExpression(point)],
142497
- options: getFieldOptions(point.selectedXValue)
142498
- }, null, 8, ["value", "onUpdate:value", "options"])
142499
- ])) : createCommentVNode("", true)
142500
- ])
142501
- ])) : createCommentVNode("", true)
141715
+ createElementVNode("div", _hoisted_38$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
141716
+ createElementVNode("div", _hoisted_39$3, [
141717
+ createVNode(unref(NTree), {
141718
+ "block-line": "",
141719
+ class: "max-h-[300px]",
141720
+ data: dynamicValueTreeData.value,
141721
+ "render-label": renderDynamicValueTreeLabel,
141722
+ "selected-keys": [point.dynamicValue?.path ?? ""],
141723
+ "onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point)
141724
+ }, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
141725
+ ])
141726
+ ]),
141727
+ point.selectedValue && point.arrayConfig && (Array.isArray(point.selectedValue) || typeof point.selectedValue === "object" && point.selectedValue !== null) ? (openBlock(), createElementBlock("div", _hoisted_40$3, [
141728
+ _cache[14] || (_cache[14] = createElementVNode("div", { class: "text-sm font-medium mb-2" }, "Configure Array/Object Fields", -1)),
141729
+ createElementVNode("div", _hoisted_41$3, [
141730
+ createElementVNode("div", null, [
141731
+ _cache[12] || (_cache[12] = createElementVNode("label", { class: "block mb-1 text-sm" }, "Label Field", -1)),
141732
+ createVNode(unref(NSelect), {
141733
+ value: point.arrayConfig.labelField,
141734
+ "onUpdate:value": [($event) => point.arrayConfig.labelField = $event, ($event) => updateDynamicValueExpression(point)],
141735
+ options: getFieldOptions(point.selectedValue)
141736
+ }, null, 8, ["value", "onUpdate:value", "options"])
141737
+ ]),
141738
+ createElementVNode("div", null, [
141739
+ _cache[13] || (_cache[13] = createElementVNode("label", { class: "block mb-1 text-sm" }, "Value Field", -1)),
141740
+ createVNode(unref(NSelect), {
141741
+ value: point.arrayConfig.valueField,
141742
+ "onUpdate:value": [($event) => point.arrayConfig.valueField = $event, ($event) => updateDynamicValueExpression(point)],
141743
+ options: getFieldOptions(point.selectedValue)
141744
+ }, null, 8, ["value", "onUpdate:value", "options"])
141745
+ ])
141746
+ ])
141747
+ ])) : createCommentVNode("", true)
141748
+ ])
142502
141749
  ])
142503
- ])
142504
- ]),
142505
- _: 2
142506
- }, 1032, ["show"])
142507
- ]),
142508
- _: 2
142509
- }, 1032, ["value", "onUpdate:value", "disabled"]),
142510
- createVNode(unref(NInput), {
142511
- value: point.yValue,
142512
- "onUpdate:value": ($event) => point.yValue = $event,
142513
- class: "flex-1",
142514
- disabled: !!point.dynamicYValue,
142515
- placeholder: "Y Value",
142516
- type: "text"
142517
- }, {
142518
- suffix: withCtx(() => [
142519
- createVNode(unref(NPopover), {
142520
- placement: "bottom",
142521
- show: activePopoverPoint.value === point && activePopoverField.value === "y",
142522
- trigger: "manual",
142523
- onClickoutside: closePopover
142524
- }, {
142525
- trigger: withCtx(() => [
142526
- createElementVNode("div", {
142527
- class: "cursor-pointer flex items-center",
142528
- onClick: ($event) => handleDynamicValueClick(point, "y")
142529
- }, [
142530
- createVNode(CIcon, {
142531
- class: normalizeClass(point.dynamicYValue ? "text-blue-500" : ""),
142532
- icon: "caret-down"
142533
- }, null, 8, ["class"])
142534
- ], 8, _hoisted_43$3)
142535
- ]),
142536
- default: withCtx(() => [
142537
- createElementVNode("div", _hoisted_44$3, [
142538
- createElementVNode("div", _hoisted_45$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
142539
- createVNode(unref(NTree), {
142540
- "block-line": "",
142541
- class: "max-h-[300px]",
142542
- data: dynamicValueTreeData.value,
142543
- "render-label": renderDynamicValueTreeLabel,
142544
- "selected-keys": [point.dynamicYValue?.path ?? ""],
142545
- "onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point, "y")
142546
- }, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
142547
- ])
142548
- ]),
142549
- _: 2
142550
- }, 1032, ["show"])
142551
- ]),
142552
- _: 2
142553
- }, 1032, ["value", "onUpdate:value", "disabled"]),
142554
- isActiveSeriesXYRChart.value ? (openBlock(), createBlock(unref(NInput), {
142555
- key: 0,
142556
- value: point.rValue,
142557
- "onUpdate:value": ($event) => point.rValue = $event,
142558
- class: "flex-1",
142559
- disabled: !!point.dynamicRValue,
142560
- placeholder: "Size (R)",
142561
- type: "text"
142562
- }, {
142563
- suffix: withCtx(() => [
142564
- createVNode(unref(NPopover), {
142565
- placement: "bottom",
142566
- show: activePopoverPoint.value === point && activePopoverField.value === "r",
142567
- trigger: "manual",
142568
- onClickoutside: closePopover
142569
- }, {
142570
- trigger: withCtx(() => [
142571
- createElementVNode("div", {
142572
- class: "cursor-pointer flex items-center",
142573
- onClick: ($event) => handleDynamicValueClick(point, "r")
142574
- }, [
142575
- createVNode(CIcon, {
142576
- class: normalizeClass(point.dynamicRValue ? "text-blue-500" : ""),
142577
- icon: "caret-down"
142578
- }, null, 8, ["class"])
142579
- ], 8, _hoisted_46$3)
142580
- ]),
142581
- default: withCtx(() => [
142582
- createElementVNode("div", _hoisted_47$3, [
142583
- createElementVNode("div", _hoisted_48$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.selectDynamicValue")), 1),
142584
- createVNode(unref(NTree), {
142585
- "block-line": "",
142586
- class: "max-h-[300px]",
142587
- data: dynamicValueTreeData.value,
142588
- "render-label": renderDynamicValueTreeLabel,
142589
- "selected-keys": [point.dynamicRValue?.path ?? ""],
142590
- "onUpdate:selectedKeys": (keys) => handleDynamicValueSelect(keys, point, "r")
142591
- }, null, 8, ["data", "selected-keys", "onUpdate:selectedKeys"])
142592
- ])
142593
- ]),
142594
- _: 2
142595
- }, 1032, ["show"])
142596
- ]),
142597
- _: 2
142598
- }, 1032, ["value", "onUpdate:value", "disabled"])) : createCommentVNode("", true),
141750
+ ]),
141751
+ _: 2
141752
+ }, 1032, ["show"])
141753
+ ]),
141754
+ _: 2
141755
+ }, 1032, ["value", "onUpdate:value", "disabled"]))
141756
+ ]),
142599
141757
  createVNode(CButton, {
142600
141758
  circle: "",
142601
141759
  class: "bg-error2 self-center",
142602
141760
  size: "small",
142603
- style: normalizeStyle(deleteButtonStyle.value),
141761
+ style: normalizeStyle({
141762
+ "--n-border": "1px solid transparent",
141763
+ "--n-border-disabled": "1px solid transparent",
141764
+ "--n-border-focus": "1px solid transparent",
141765
+ "--n-border-hover": "1px solid transparent",
141766
+ "--n-border-pressed": "1px solid transparent",
141767
+ "--n-color-focus": unref(themeVars).error2,
141768
+ "--n-color-hover": unref(themeVars).error2,
141769
+ "--n-color-disabled": unref(themeVars).error2,
141770
+ "--n-color-pressed": unref(themeVars).error2
141771
+ }),
142604
141772
  type: "error",
142605
141773
  onClick: ($event) => removeDataPoint(index)
142606
141774
  }, {
@@ -142616,7 +141784,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142616
141784
  }, 1032, ["style", "onClick"])
142617
141785
  ]);
142618
141786
  }), 128)),
142619
- createElementVNode("div", _hoisted_49$3, [
141787
+ createElementVNode("div", _hoisted_42$3, [
142620
141788
  createVNode(CButton, {
142621
141789
  class: "mt-2",
142622
141790
  "icon-placement": "left",
@@ -142636,62 +141804,11 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142636
141804
  })
142637
141805
  ])
142638
141806
  ]),
142639
- createElementVNode("div", _hoisted_50$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartSettings")), 1),
142640
- createElementVNode("div", _hoisted_51$2, [
142641
- createElementVNode("label", _hoisted_52$2, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartTitle")), 1),
142642
- createVNode(unref(NInput), {
142643
- value: chartTitle.value,
142644
- "onUpdate:value": _cache[2] || (_cache[2] = ($event) => chartTitle.value = $event),
142645
- type: "text"
142646
- }, null, 8, ["value"])
142647
- ]),
142648
- ["bar", "line"].includes(primaryChartType.value) ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
142649
- createElementVNode("div", _hoisted_53$2, [
142650
- createElementVNode("label", _hoisted_54$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.xAxisLabel")), 1),
142651
- createVNode(unref(NInput), {
142652
- value: xAxisLabel.value,
142653
- "onUpdate:value": _cache[3] || (_cache[3] = ($event) => xAxisLabel.value = $event),
142654
- type: "text"
142655
- }, null, 8, ["value"])
142656
- ]),
142657
- createElementVNode("div", _hoisted_55$1, [
142658
- createElementVNode("label", _hoisted_56$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.yAxisLabel")), 1),
142659
- createVNode(unref(NInput), {
142660
- value: yAxisLabel.value,
142661
- "onUpdate:value": _cache[4] || (_cache[4] = ($event) => yAxisLabel.value = $event),
142662
- type: "text"
142663
- }, null, 8, ["value"])
142664
- ]),
142665
- createElementVNode("div", _hoisted_57$1, [
142666
- createElementVNode("label", _hoisted_58$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.orientation")), 1),
142667
- createVNode(unref(NSelect), {
142668
- value: orientation.value,
142669
- "onUpdate:value": _cache[5] || (_cache[5] = ($event) => orientation.value = $event),
142670
- options: orientationOptions
142671
- }, null, 8, ["value"])
142672
- ])
142673
- ], 64)) : createCommentVNode("", true),
142674
- ["pie", "doughnut", "polarArea"].includes(primaryChartType.value) ? (openBlock(), createElementBlock("div", _hoisted_59$1, [
142675
- createElementVNode("label", _hoisted_60$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.legendPosition")), 1),
142676
- createVNode(unref(NSelect), {
142677
- value: legendPosition.value,
142678
- "onUpdate:value": _cache[6] || (_cache[6] = ($event) => legendPosition.value = $event),
142679
- options: legendPositionOptions
142680
- }, null, 8, ["value"])
142681
- ])) : createCommentVNode("", true),
142682
- ["line", "scatter", "area"].includes(primaryChartType.value) ? (openBlock(), createElementBlock("div", _hoisted_61$1, [
142683
- createElementVNode("label", _hoisted_62$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.pointStyle")), 1),
142684
- createVNode(unref(NSelect), {
142685
- value: pointStyle.value,
142686
- "onUpdate:value": _cache[7] || (_cache[7] = ($event) => pointStyle.value = $event),
142687
- options: pointStyleOptions
142688
- }, null, 8, ["value"])
142689
- ])) : createCommentVNode("", true),
142690
- createElementVNode("div", _hoisted_63$1, [
142691
- createElementVNode("label", _hoisted_64$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.colorScheme")), 1),
141807
+ createElementVNode("div", _hoisted_43$3, [
141808
+ createElementVNode("label", _hoisted_44$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.colorScheme")), 1),
142692
141809
  createVNode(unref(NSelect), {
142693
141810
  value: colorSchemeType.value,
142694
- "onUpdate:value": _cache[8] || (_cache[8] = ($event) => colorSchemeType.value = $event),
141811
+ "onUpdate:value": _cache[9] || (_cache[9] = ($event) => colorSchemeType.value = $event),
142695
141812
  class: "mb-2",
142696
141813
  options: [
142697
141814
  { label: unref(t)("canvasUI.canvasBuilder.dataCharts.useThemeColors"), value: "theme" },
@@ -142708,106 +141825,19 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142708
141825
  "onUpdate:palette": updateChartColors
142709
141826
  }, null, 8, ["allow-add", "allow-delete", "allow-edit", "initial-palette"]))
142710
141827
  ]),
142711
- createElementVNode("div", _hoisted_65$1, [
142712
- createElementVNode("label", _hoisted_66$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.animation")), 1),
141828
+ createElementVNode("div", _hoisted_45$3, [
141829
+ createElementVNode("label", _hoisted_46$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.animation")), 1),
142713
141830
  createVNode(unref(NSwitch), {
142714
141831
  value: enableAnimation.value,
142715
- "onUpdate:value": _cache[9] || (_cache[9] = ($event) => enableAnimation.value = $event)
141832
+ "onUpdate:value": _cache[10] || (_cache[10] = ($event) => enableAnimation.value = $event)
142716
141833
  }, null, 8, ["value"])
142717
- ]),
142718
- createElementVNode("div", _hoisted_67$1, [
142719
- createElementVNode("label", _hoisted_68$1, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.percentDisplay")), 1),
142720
- createElementVNode("div", _hoisted_69, [
142721
- createVNode(unref(NSwitch), {
142722
- value: percentDisplay.value,
142723
- "onUpdate:value": _cache[10] || (_cache[10] = ($event) => percentDisplay.value = $event)
142724
- }, null, 8, ["value"]),
142725
- createElementVNode("span", _hoisted_70, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.percentDisplayHint")), 1)
142726
- ])
142727
- ]),
142728
- createElementVNode("div", _hoisted_71, [
142729
- createElementVNode("label", _hoisted_72, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.viewModeControls")), 1),
142730
- createElementVNode("div", _hoisted_73, [
142731
- createElementVNode("div", _hoisted_74, [
142732
- createVNode(unref(NSwitch), {
142733
- value: enableFullscreenBtn.value,
142734
- "onUpdate:value": _cache[11] || (_cache[11] = ($event) => enableFullscreenBtn.value = $event)
142735
- }, null, 8, ["value"]),
142736
- createElementVNode("span", _hoisted_75, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableFullscreenBtn")), 1)
142737
- ]),
142738
- createVNode(unref(NTooltip), {
142739
- disabled: !isMultiSeries.value,
142740
- trigger: "hover"
142741
- }, {
142742
- trigger: withCtx(() => [
142743
- createElementVNode("div", {
142744
- class: normalizeClass(["flex items-center gap-2", { "opacity-50 cursor-not-allowed": isMultiSeries.value }])
142745
- }, [
142746
- createVNode(unref(NSwitch), {
142747
- value: enableChartTypeSwitcher.value,
142748
- "onUpdate:value": _cache[12] || (_cache[12] = ($event) => enableChartTypeSwitcher.value = $event),
142749
- disabled: isMultiSeries.value
142750
- }, null, 8, ["value", "disabled"]),
142751
- createElementVNode("span", _hoisted_76, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableChartTypeSwitcher")), 1)
142752
- ], 2)
142753
- ]),
142754
- default: withCtx(() => [
142755
- createTextVNode(" " + toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartTypeSwitcherMultiSeriesDisabled")), 1)
142756
- ]),
142757
- _: 1
142758
- }, 8, ["disabled"]),
142759
- createElementVNode("div", _hoisted_77, [
142760
- createVNode(unref(NSwitch), {
142761
- value: enableDataEntry.value,
142762
- "onUpdate:value": _cache[13] || (_cache[13] = ($event) => enableDataEntry.value = $event)
142763
- }, null, 8, ["value"]),
142764
- createElementVNode("span", _hoisted_78, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableDataEntry")), 1)
142765
- ])
142766
- ])
142767
- ]),
142768
- createElementVNode("div", _hoisted_79, [
142769
- createElementVNode("label", _hoisted_80, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.chartSize")), 1),
142770
- createElementVNode("div", _hoisted_81, [
142771
- createElementVNode("div", _hoisted_82, [
142772
- createElementVNode("label", _hoisted_83, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.height")), 1),
142773
- createVNode(unref(NInputNumber), {
142774
- value: chartHeight.value,
142775
- "onUpdate:value": _cache[14] || (_cache[14] = ($event) => chartHeight.value = $event),
142776
- class: "flex-1",
142777
- max: 1e3,
142778
- min: 100,
142779
- step: 10
142780
- }, {
142781
- suffix: withCtx(() => _cache[17] || (_cache[17] = [
142782
- createTextVNode("px")
142783
- ])),
142784
- _: 1
142785
- }, 8, ["value"])
142786
- ]),
142787
- createElementVNode("div", _hoisted_84, [
142788
- createElementVNode("label", _hoisted_85, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.width")), 1),
142789
- createVNode(unref(NInputNumber), {
142790
- value: chartWidth.value,
142791
- "onUpdate:value": _cache[15] || (_cache[15] = ($event) => chartWidth.value = $event),
142792
- class: "flex-1",
142793
- max: 100,
142794
- min: 10,
142795
- step: 5
142796
- }, {
142797
- suffix: withCtx(() => _cache[18] || (_cache[18] = [
142798
- createTextVNode("%")
142799
- ])),
142800
- _: 1
142801
- }, 8, ["value"])
142802
- ])
142803
- ])
142804
141834
  ])
142805
141835
  ])
142806
141836
  ])
142807
141837
  ]),
142808
- createElementVNode("div", _hoisted_86, [
142809
- createElementVNode("div", _hoisted_87, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.preview")), 1),
142810
- createElementVNode("div", _hoisted_88, [
141838
+ createElementVNode("div", _hoisted_47$3, [
141839
+ createElementVNode("div", _hoisted_48$3, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.preview")), 1),
141840
+ createElementVNode("div", _hoisted_49$3, [
142811
141841
  createVNode(unref(NCard), { bordered: false }, {
142812
141842
  default: withCtx(() => [
142813
141843
  (openBlock(), createBlock(RawDataCharts, {
@@ -142815,8 +141845,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142815
141845
  data: {
142816
141846
  ...previewData.value,
142817
141847
  context: unref(crmShape)
142818
- },
142819
- "is-preview": ""
141848
+ }
142820
141849
  }, null, 8, ["data"]))
142821
141850
  ]),
142822
141851
  _: 1
@@ -142873,12 +141902,6 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
142873
141902
  usedInSectionId,
142874
141903
  when_used_in_section
142875
141904
  });
142876
- const canEditChart = computed(() => {
142877
- if (mode.value === CanvasBuilderMode.ADMIN) {
142878
- return true;
142879
- }
142880
- return props.data?.view_controls?.enable_data_entry ?? false;
142881
- });
142882
141905
  onMounted(() => {
142883
141906
  if (justAddedComponentId.value === props.id) {
142884
141907
  setComponentEditMode(ComponentTypes.DataCharts, props.id);
@@ -142890,7 +141913,7 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
142890
141913
  unref(shouldDisplayPlaceholderComponent)(unref(isEditMode), unref(mode), _ctx.visible) ? (openBlock(), createBlock(PlaceholderComponent, {
142891
141914
  key: 0,
142892
141915
  name: _ctx.tracking_id
142893
- }, null, 8, ["name"])) : unref(isEditMode) && !unref(isViewOnlyMode) && unref(componentPermissions).hasSomethingEditable && canEditChart.value ? (openBlock(), createBlock(_sfc_main$34, {
141916
+ }, null, 8, ["name"])) : unref(isEditMode) && !unref(isViewOnlyMode) && unref(componentPermissions).hasSomethingEditable ? (openBlock(), createBlock(_sfc_main$34, {
142894
141917
  key: 1,
142895
141918
  id: unref(id),
142896
141919
  active: unref(componentEditMode) && unref(componentEditMode)?.id === unref(id),
@@ -142912,7 +141935,6 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
142912
141935
  key: key.value,
142913
141936
  class: "ma-1",
142914
141937
  data: _ctx.data,
142915
- "is-edit-mode": "",
142916
141938
  style: normalizeStyle(_ctx.style)
142917
141939
  }, null, 8, ["data", "style"])) : (openBlock(), createBlock(_sfc_main$2G, {
142918
141940
  key: 1,
@@ -142924,9 +141946,8 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
142924
141946
  }, 8, ["id", "active", "duplicate", "edit", "remove", "selected", "settings", "stylable"])) : (openBlock(), createBlock(RawDataCharts, {
142925
141947
  key: 2,
142926
141948
  data: _ctx.data,
142927
- "is-edit-mode": unref(isEditMode),
142928
141949
  style: normalizeStyle(_ctx.style)
142929
- }, null, 8, ["data", "is-edit-mode", "style"])),
141950
+ }, null, 8, ["data", "style"])),
142930
141951
  unref(componentEditMode) && unref(componentEditMode).id === unref(id) ? (openBlock(), createBlock(_sfc_main$2E, {
142931
141952
  key: 3,
142932
141953
  id: unref(id),
@@ -182682,5 +181703,5 @@ const localeNames = {
182682
181703
  };
182683
181704
  const localeDropdownOptions = supportedLocales.map((locale) => ({ key: locale, name: localeNames[locale] }));
182684
181705
 
182685
- 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 };
181706
+ 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 };
182686
181707
  //# sourceMappingURL=canvas-ui.js.map