@pitcher/canvas-ui 2026.1.5-141434 → 2026.1.6-131818-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/canvas-ui.css CHANGED
@@ -551,13 +551,13 @@ swiper-container::part(pagination) {
551
551
  line-height: 20px;
552
552
  letter-spacing: 0.25px;
553
553
  color: var(--ad430d74);
554
- }[data-v-052f4440] .ais-SearchBox {
554
+ }[data-v-da2357d4] .ais-SearchBox {
555
555
  margin: 0;
556
556
  }
557
- [data-v-052f4440] .ais-SearchBox-submit,[data-v-052f4440] .ais-SearchBox-reset {
557
+ [data-v-da2357d4] .ais-SearchBox-submit,[data-v-da2357d4] .ais-SearchBox-reset {
558
558
  display: none;
559
559
  }
560
- .admin-search[data-v-052f4440] .ais-SearchBox-reset {
560
+ .admin-search[data-v-da2357d4] .ais-SearchBox-reset {
561
561
  display: block !important;
562
562
  position: absolute !important;
563
563
  right: 12px !important;
@@ -571,17 +571,17 @@ swiper-container::part(pagination) {
571
571
  font-size: 16px !important;
572
572
  z-index: 10 !important;
573
573
  }
574
- .admin-search[data-v-052f4440] .ais-SearchBox-reset:hover {
574
+ .admin-search[data-v-da2357d4] .ais-SearchBox-reset:hover {
575
575
  color: var(--p-text2) !important;
576
576
  }
577
- .admin-search[data-v-052f4440] .ais-SearchBox-reset:focus {
577
+ .admin-search[data-v-da2357d4] .ais-SearchBox-reset:focus {
578
578
  outline: none !important;
579
579
  color: var(--p-primary) !important;
580
580
  }
581
- .admin-search[data-v-052f4440] .ais-SearchBox-input {
581
+ .admin-search[data-v-da2357d4] .ais-SearchBox-input {
582
582
  padding-right: 40px !important;
583
583
  }
584
- [data-v-052f4440] .ais-SearchBox-input {
584
+ [data-v-da2357d4] .ais-SearchBox-input {
585
585
  width: 100%;
586
586
  padding: 12px 16px 12px 40px;
587
587
  border: 1px solid var(--p-primary4);
@@ -590,39 +590,39 @@ swiper-container::part(pagination) {
590
590
  background-color: var(--p-base);
591
591
  transition: border-color 0.2s ease;
592
592
  }
593
- [data-v-052f4440] .ais-SearchBox-input:focus {
593
+ [data-v-da2357d4] .ais-SearchBox-input:focus {
594
594
  outline: none;
595
595
  border-color: var(--p-primary);
596
596
  box-shadow: 0 0 0 3px var(--p-primary5);
597
597
  }
598
- [data-v-052f4440] .ais-SearchBox-input::placeholder {
598
+ [data-v-da2357d4] .ais-SearchBox-input::placeholder {
599
599
  color: var(--p-text3);
600
600
  font-size: 14px;
601
601
  }
602
- .overflow-y-auto[data-v-052f4440] {
602
+ .overflow-y-auto[data-v-da2357d4] {
603
603
  scrollbar-width: thin;
604
604
  scrollbar-color: var(--p-border2) var(--p-surface2);
605
605
  }
606
- .overflow-y-auto[data-v-052f4440]::-webkit-scrollbar {
606
+ .overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar {
607
607
  width: 6px;
608
608
  }
609
- .overflow-y-auto[data-v-052f4440]::-webkit-scrollbar-track {
609
+ .overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar-track {
610
610
  background: var(--p-surface2);
611
611
  }
612
- .overflow-y-auto[data-v-052f4440]::-webkit-scrollbar-thumb {
612
+ .overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar-thumb {
613
613
  background-color: var(--p-border2);
614
614
  border-radius: 3px;
615
615
  }
616
- .overflow-y-auto[data-v-052f4440]::-webkit-scrollbar-thumb:hover {
616
+ .overflow-y-auto[data-v-da2357d4]::-webkit-scrollbar-thumb:hover {
617
617
  background-color: var(--p-text3);
618
618
  }
619
- button[data-v-052f4440]:hover {
619
+ button[data-v-da2357d4]:hover {
620
620
  transition: all 0.2s ease;
621
621
  }
622
- button[data-v-052f4440]:focus {
622
+ button[data-v-da2357d4]:focus {
623
623
  outline: none;
624
624
  }
625
- [data-v-052f4440] mark,[data-v-052f4440] em {
625
+ [data-v-da2357d4] mark,[data-v-da2357d4] em {
626
626
  font-weight: bold;
627
627
  font-style: normal;
628
628
  }
package/canvas-ui.js CHANGED
@@ -95891,8 +95891,8 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
95891
95891
  }
95892
95892
  const emIndex = highlightValue.indexOf("<em>");
95893
95893
  if (emIndex === -1) return "";
95894
- const startChar = Math.max(0, emIndex - 100);
95895
- const endChar = Math.min(highlightValue.length, emIndex + 100);
95894
+ const startChar = Math.max(0, emIndex - 75);
95895
+ const endChar = Math.min(highlightValue.length, emIndex + 125);
95896
95896
  let truncated = highlightValue.substring(startChar, endChar);
95897
95897
  if (startChar > 0) truncated = "..." + truncated;
95898
95898
  if (endChar < highlightValue.length) truncated = truncated + "...";
@@ -96093,7 +96093,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96093
96093
  show: "",
96094
96094
  verticalAlignment: "top",
96095
96095
  "z-index": _ctx.zIndex,
96096
- "onUpdate:show": _cache[16] || (_cache[16] = ($event) => emit("toggleSearch", $event))
96096
+ "onUpdate:show": _cache[15] || (_cache[15] = ($event) => emit("toggleSearch", $event))
96097
96097
  }, {
96098
96098
  default: withCtx(() => [
96099
96099
  createElementVNode("div", {
@@ -96102,7 +96102,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96102
96102
  }, [
96103
96103
  createElementVNode("div", _hoisted_1$4w, [
96104
96104
  createElementVNode("div", _hoisted_2$3j, [
96105
- _cache[17] || (_cache[17] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96105
+ _cache[16] || (_cache[16] = createElementVNode("div", { class: "absolute left-2.5 top-1/2 transform -translate-y-1/2 z-10" }, [
96106
96106
  createElementVNode("i", { class: "c-icon far fa-search text-gray-400 text-l" })
96107
96107
  ], -1)),
96108
96108
  withDirectives(createElementVNode("input", {
@@ -96208,7 +96208,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96208
96208
  show: showFileTypeDropdown.value,
96209
96209
  "show-arrow": false,
96210
96210
  trigger: "manual",
96211
- onClickoutside: _cache[8] || (_cache[8] = ($event) => showFileTypeDropdown.value = false)
96211
+ onClickoutside: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = false)
96212
96212
  }, {
96213
96213
  trigger: withCtx(() => [
96214
96214
  createVNode(unref(NTag), {
@@ -96221,20 +96221,12 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96221
96221
  themeOverrides: {
96222
96222
  borderRadius: "4px"
96223
96223
  },
96224
- onClick: _cache[7] || (_cache[7] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
96224
+ onClick: _cache[6] || (_cache[6] = ($event) => showFileTypeDropdown.value = !showFileTypeDropdown.value)
96225
96225
  }, {
96226
96226
  default: withCtx(() => [
96227
96227
  createElementVNode("div", _hoisted_10$C, [
96228
96228
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.filters.type")), 1),
96229
- selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true),
96230
- selectedFileTypes.value.length ? (openBlock(), createBlock(CIcon, {
96231
- key: 1,
96232
- class: "ml-1",
96233
- color: "var(--p-primary2)",
96234
- icon: "xmark",
96235
- size: "12",
96236
- onClick: _cache[6] || (_cache[6] = withModifiers(($event) => selectedFileTypes.value = [], ["stop"]))
96237
- })) : createCommentVNode("", true)
96229
+ selectedFileTypes.value.length ? (openBlock(), createElementBlock("span", _hoisted_11$x, ": " + toDisplayString(selectedFileTypes.value.length), 1)) : createCommentVNode("", true)
96238
96230
  ])
96239
96231
  ]),
96240
96232
  _: 1
@@ -96283,7 +96275,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96283
96275
  _: 1
96284
96276
  }, 8, ["show"]),
96285
96277
  hasActiveFilters.value ? (openBlock(), createElementBlock("div", _hoisted_14$h, [
96286
- _cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96278
+ _cache[17] || (_cache[17] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96287
96279
  createElementVNode("span", {
96288
96280
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96289
96281
  onClick: clearAllFilters
@@ -96301,7 +96293,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96301
96293
  themeOverrides: {
96302
96294
  borderRadius: "4px"
96303
96295
  },
96304
- onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("saved_canvas"))
96296
+ onClick: _cache[8] || (_cache[8] = ($event) => toggleCanvasFilter("saved_canvas"))
96305
96297
  }, {
96306
96298
  default: withCtx(() => [
96307
96299
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.saved")), 1)
@@ -96318,7 +96310,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96318
96310
  themeOverrides: {
96319
96311
  borderRadius: "4px"
96320
96312
  },
96321
- onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("template"))
96313
+ onClick: _cache[9] || (_cache[9] = ($event) => toggleCanvasFilter("template"))
96322
96314
  }, {
96323
96315
  default: withCtx(() => [
96324
96316
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.templates")), 1)
@@ -96336,7 +96328,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96336
96328
  themeOverrides: {
96337
96329
  borderRadius: "4px"
96338
96330
  },
96339
- onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("product_template"))
96331
+ onClick: _cache[10] || (_cache[10] = ($event) => toggleCanvasFilter("product_template"))
96340
96332
  }, {
96341
96333
  default: withCtx(() => [
96342
96334
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.productTemplates")), 1)
@@ -96353,7 +96345,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96353
96345
  themeOverrides: {
96354
96346
  borderRadius: "4px"
96355
96347
  },
96356
- onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("section"))
96348
+ onClick: _cache[11] || (_cache[11] = ($event) => toggleCanvasFilter("section"))
96357
96349
  }, {
96358
96350
  default: withCtx(() => [
96359
96351
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.products")), 1)
@@ -96370,7 +96362,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96370
96362
  themeOverrides: {
96371
96363
  borderRadius: "4px"
96372
96364
  },
96373
- onClick: _cache[13] || (_cache[13] = ($event) => toggleCanvasFilter("block"))
96365
+ onClick: _cache[12] || (_cache[12] = ($event) => toggleCanvasFilter("block"))
96374
96366
  }, {
96375
96367
  default: withCtx(() => [
96376
96368
  createElementVNode("span", null, toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.canvasFilters.blocks")), 1)
@@ -96378,7 +96370,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96378
96370
  _: 1
96379
96371
  }, 8, ["style"]),
96380
96372
  selectedCanvasFilters.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_15$f, [
96381
- _cache[19] || (_cache[19] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96373
+ _cache[18] || (_cache[18] = createElementVNode("div", { class: "h-6 w-px bg-gray-300 mx-2" }, null, -1)),
96382
96374
  createElementVNode("span", {
96383
96375
  class: "text-sm text-gray-600 hover:text-gray-800 font-normal cursor-pointer",
96384
96376
  onClick: clearCanvasFilters
@@ -96408,7 +96400,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96408
96400
  }), 128))
96409
96401
  ]),
96410
96402
  recentlyOpenedDocs.value.length > 0 ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
96411
- _cache[20] || (_cache[20] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96403
+ _cache[19] || (_cache[19] = createElementVNode("hr", { class: "border-0 h-px bg-gray-200 mt-2 mb-3 w-full" }, null, -1)),
96412
96404
  createElementVNode("div", _hoisted_21$7, [
96413
96405
  createElementVNode("span", _hoisted_22$5, toDisplayString(unref(t)("canvasUI.components.fileViewer.recentlyOpened")), 1)
96414
96406
  ]),
@@ -96525,7 +96517,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96525
96517
  filteredContentFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_44$4, [
96526
96518
  createElementVNode("span", {
96527
96519
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96528
- onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "content")
96520
+ onClick: _cache[13] || (_cache[13] = ($event) => searchType.value = "content")
96529
96521
  }, [
96530
96522
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96531
96523
  createVNode(CIcon, {
@@ -96577,7 +96569,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96577
96569
  filteredCanvasFiles.value.length > 5 ? (openBlock(), createElementBlock("div", _hoisted_55$2, [
96578
96570
  createElementVNode("span", {
96579
96571
  class: "text-sm text-gray-600 hover:text-gray-800 font-bold flex items-center cursor-pointer",
96580
- onClick: _cache[15] || (_cache[15] = ($event) => searchType.value = "canvases")
96572
+ onClick: _cache[14] || (_cache[14] = ($event) => searchType.value = "canvases")
96581
96573
  }, [
96582
96574
  createTextVNode(toDisplayString(unref(t)("canvasUI.CAlgoliaSearch.actions.viewAll")) + " ", 1),
96583
96575
  createVNode(CIcon, {
@@ -96733,7 +96725,7 @@ const _sfc_main$5K = /* @__PURE__ */ defineComponent({
96733
96725
  }
96734
96726
  });
96735
96727
 
96736
- const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-052f4440"]]);
96728
+ const CAlgoliaSearch = /* @__PURE__ */ _export_sfc(_sfc_main$5K, [["__scopeId", "data-v-da2357d4"]]);
96737
96729
 
96738
96730
  const BulletListExtended = BulletList.extend({
96739
96731
  addOptions() {
@@ -142425,10 +142417,7 @@ const _hoisted_94 = { class: "flex flex-col gap-2" };
142425
142417
  const _hoisted_95 = { class: "flex items-center gap-2" };
142426
142418
  const _hoisted_96 = { class: "text-sm" };
142427
142419
  const _hoisted_97 = { class: "text-sm" };
142428
- const _hoisted_98 = {
142429
- key: 0,
142430
- class: "flex items-center gap-2"
142431
- };
142420
+ const _hoisted_98 = { class: "flex items-center gap-2" };
142432
142421
  const _hoisted_99 = { class: "text-sm" };
142433
142422
  const _hoisted_100 = { class: "mb-4" };
142434
142423
  const _hoisted_101 = { class: "block mb-2" };
@@ -142454,9 +142443,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142454
142443
  const props = __props;
142455
142444
  const { t } = useI18n();
142456
142445
  const themeVars = useThemeVars();
142457
- const { mode, setComponentEditMode, updateNodeDataById } = useCanvas$1();
142458
- const isAdminMode = computed(() => mode.value === CanvasBuilderMode.ADMIN);
142459
- const confirmation = useConfirmation();
142446
+ const { setComponentEditMode, updateNodeDataById } = useCanvas$1();
142460
142447
  const { crmShape } = useCrmShape();
142461
142448
  const { palette } = useCanvasTheme$1();
142462
142449
  let seriesIdCounter = 0;
@@ -142544,9 +142531,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142544
142531
  });
142545
142532
  const chartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
142546
142533
  const primaryChartType = computed(() => seriesList.value[0]?.chartType ?? "bar");
142547
- const savedColorScheme = props.data?.color_scheme;
142548
- const datasets = props.data?.data?.datasets;
142549
- const backgroundColor = savedColorScheme ?? (datasets && datasets.length > 1 ? datasets.map((ds) => ds.background_color).filter(Boolean) : datasets?.[0]?.background_color);
142534
+ const backgroundColor = props.data?.data?.datasets?.[0]?.background_color;
142550
142535
  const colorSchemeType = ref(props.data?.color_scheme_type ?? "theme");
142551
142536
  const chartColors = ref([]);
142552
142537
  const displayColors = computed(() => {
@@ -142581,7 +142566,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
142581
142566
  const percentDisplay = ref(props.data?.percent_display ?? false);
142582
142567
  const enableFullscreenBtn = ref(props.data?.view_controls?.enable_fullscreen_btn ?? false);
142583
142568
  const enableChartTypeSwitcher = ref(props.data?.view_controls?.enable_chart_type_switcher ?? false);
142584
- const enableDataEntry = ref(props.data?.view_controls?.enable_data_entry !== false);
142569
+ const enableDataEntry = ref(props.data?.view_controls?.enable_data_entry ?? false);
142585
142570
  const chartHeight = ref(props.data?.chart_height ?? 800);
142586
142571
  const chartWidth = ref(props.data?.chart_width ?? 100);
142587
142572
  const legendPositionOptions = [
@@ -143098,7 +143083,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143098
143083
  return chartColors.value;
143099
143084
  }
143100
143085
  function createChartConfig() {
143101
- const datasets2 = [];
143086
+ const datasets = [];
143102
143087
  let allLabels = [];
143103
143088
  const colorsForStorage = getSeriesColors(true);
143104
143089
  const isSingleSeries = seriesList.value.length === 1;
@@ -143143,7 +143128,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143143
143128
  if (processedData.labels.length > allLabels.length) {
143144
143129
  allLabels = processedData.labels;
143145
143130
  }
143146
- datasets2.push(datasetOptions);
143131
+ datasets.push(datasetOptions);
143147
143132
  });
143148
143133
  const primaryType = seriesList.value[0].chartType;
143149
143134
  let actualPrimaryType = primaryType;
@@ -143182,7 +143167,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143182
143167
  const config = {
143183
143168
  type: actualPrimaryType,
143184
143169
  color_scheme_type: colorSchemeType.value,
143185
- color_scheme: colorsForStorage,
143186
143170
  percent_display: percentDisplay.value,
143187
143171
  chart_height: chartHeight.value,
143188
143172
  chart_width: chartWidth.value,
@@ -143193,7 +143177,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143193
143177
  },
143194
143178
  data: {
143195
143179
  labels: allLabels,
143196
- datasets: datasets2
143180
+ datasets
143197
143181
  },
143198
143182
  options: {
143199
143183
  responsive: true,
@@ -143241,22 +143225,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143241
143225
  return config;
143242
143226
  }
143243
143227
  function onCancel() {
143244
- if (isDirty.value) {
143245
- confirmation.warning({
143246
- title: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.title"),
143247
- content: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.content"),
143248
- confirmText: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.confirm"),
143249
- exitText: t("canvasUI.canvasBuilder.confirmationOnUnsavedChanges.exit"),
143250
- hasExit: true,
143251
- onConfirm: () => {
143252
- onSave();
143253
- },
143254
- onExit: () => {
143255
- setComponentEditMode(false);
143256
- }
143257
- });
143258
- return;
143259
- }
143260
143228
  setComponentEditMode(false);
143261
143229
  }
143262
143230
  function onSave() {
@@ -143265,10 +143233,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143265
143233
  setComponentEditMode(false);
143266
143234
  }
143267
143235
  const previewData = ref({});
143268
- const isDirty = ref(false);
143269
- function markDirty() {
143270
- isDirty.value = true;
143271
- }
143272
143236
  function updatePreview() {
143273
143237
  const config = createChartConfig();
143274
143238
  previewData.value = {
@@ -143290,7 +143254,6 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143290
143254
  enableChartTypeSwitcher.value = false;
143291
143255
  }
143292
143256
  });
143293
- let isInitialized = false;
143294
143257
  watch(
143295
143258
  [
143296
143259
  seriesList,
@@ -143312,23 +143275,17 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143312
143275
  ],
143313
143276
  () => {
143314
143277
  updatePreview();
143315
- if (isInitialized) {
143316
- markDirty();
143317
- }
143318
143278
  },
143319
143279
  { deep: true }
143320
143280
  );
143321
143281
  onMounted(() => {
143322
143282
  updatePreview();
143323
- nextTick(() => {
143324
- isInitialized = true;
143325
- });
143326
143283
  });
143327
143284
  return (_ctx, _cache) => {
143328
143285
  return openBlock(), createBlock(unref(NModal), {
143329
143286
  bordered: false,
143330
143287
  class: "cb-data-charts-settings",
143331
- onEsc: onCancel,
143288
+ onEsc: () => unref(setComponentEditMode)(false),
143332
143289
  preset: "card",
143333
143290
  show: true,
143334
143291
  size: "huge",
@@ -143340,7 +143297,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143340
143297
  "--n-padding-left": "16px"
143341
143298
  }]),
143342
143299
  title: unref(t)("canvasUI.canvasBuilder.dataCharts.editDataChartsComponent"),
143343
- onClose: onCancel
143300
+ onClose: _cache[16] || (_cache[16] = ($event) => unref(setComponentEditMode)(false))
143344
143301
  }, {
143345
143302
  footer: withCtx(() => [
143346
143303
  createElementVNode("div", _hoisted_110, [
@@ -143980,13 +143937,13 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
143980
143937
  ]),
143981
143938
  _: 1
143982
143939
  }, 8, ["disabled"]),
143983
- isAdminMode.value ? (openBlock(), createElementBlock("div", _hoisted_98, [
143940
+ createElementVNode("div", _hoisted_98, [
143984
143941
  createVNode(unref(NSwitch), {
143985
143942
  value: enableDataEntry.value,
143986
143943
  "onUpdate:value": _cache[13] || (_cache[13] = ($event) => enableDataEntry.value = $event)
143987
143944
  }, null, 8, ["value"]),
143988
143945
  createElementVNode("span", _hoisted_99, toDisplayString(unref(t)("canvasUI.canvasBuilder.dataCharts.enableDataEntry")), 1)
143989
- ])) : createCommentVNode("", true)
143946
+ ])
143990
143947
  ])
143991
143948
  ]),
143992
143949
  createElementVNode("div", _hoisted_100, [
@@ -144002,7 +143959,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
144002
143959
  min: 100,
144003
143960
  step: 10
144004
143961
  }, {
144005
- suffix: withCtx(() => _cache[16] || (_cache[16] = [
143962
+ suffix: withCtx(() => _cache[17] || (_cache[17] = [
144006
143963
  createTextVNode("px")
144007
143964
  ])),
144008
143965
  _: 1
@@ -144018,7 +143975,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
144018
143975
  min: 10,
144019
143976
  step: 5
144020
143977
  }, {
144021
- suffix: withCtx(() => _cache[17] || (_cache[17] = [
143978
+ suffix: withCtx(() => _cache[18] || (_cache[18] = [
144022
143979
  createTextVNode("%")
144023
143980
  ])),
144024
143981
  _: 1
@@ -144053,7 +144010,7 @@ const _sfc_main$2E = /* @__PURE__ */ defineComponent({
144053
144010
  }, 8, ["style"])
144054
144011
  ]),
144055
144012
  _: 1
144056
- }, 8, ["title"]);
144013
+ }, 8, ["onEsc", "title"]);
144057
144014
  };
144058
144015
  }
144059
144016
  });
@@ -144101,7 +144058,7 @@ const _sfc_main$2D = /* @__PURE__ */ defineComponent({
144101
144058
  if (mode.value === CanvasBuilderMode.ADMIN) {
144102
144059
  return true;
144103
144060
  }
144104
- return props.data?.view_controls?.enable_data_entry !== false;
144061
+ return props.data?.view_controls?.enable_data_entry ?? false;
144105
144062
  });
144106
144063
  onMounted(() => {
144107
144064
  if (justAddedComponentId.value === props.id) {