@odoo/o-spreadsheet 19.1.0-alpha.0 → 19.1.0-alpha.2

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.
@@ -2,9 +2,9 @@
2
2
  /**
3
3
  * This file is generated by o-spreadsheet build tools. Do not edit it.
4
4
  * @see https://github.com/odoo/o-spreadsheet
5
- * @version 19.1.0-alpha.0
6
- * @date 2025-09-11T07:49:49.483Z
7
- * @hash 587c928
5
+ * @version 19.1.0-alpha.2
6
+ * @date 2025-09-19T07:26:49.306Z
7
+ * @hash 8cc543d
8
8
  */
9
9
 
10
10
  import { useEnv, useSubEnv, onWillUnmount, useComponent, status, Component, useRef, onMounted, useEffect, App, blockDom, useState, onPatched, useExternalListener, onWillUpdateProps, onWillStart, onWillPatch, xml, useChildSubEnv, markRaw, toRaw } from '@odoo/owl';
@@ -587,7 +587,6 @@ var DIRECTION;
587
587
  const CANVAS_SHIFT = 0.5;
588
588
  // Colors
589
589
  const HIGHLIGHT_COLOR = "#017E84";
590
- const BACKGROUND_GRAY_COLOR = "#f5f5f5";
591
590
  const BACKGROUND_HEADER_COLOR = "#F8F9FA";
592
591
  const BACKGROUND_HEADER_SELECTED_COLOR = "#E8EAED";
593
592
  const BACKGROUND_HEADER_ACTIVE_COLOR = "#595959";
@@ -597,15 +596,10 @@ const SELECTION_BORDER_COLOR = "#3266ca";
597
596
  const HEADER_BORDER_COLOR = "#C0C0C0";
598
597
  const CELL_BORDER_COLOR = "#E2E3E3";
599
598
  const BACKGROUND_CHART_COLOR = "#FFFFFF";
600
- const DISABLED_TEXT_COLOR = "#CACACA";
601
599
  const DEFAULT_COLOR_SCALE_MIDPOINT_COLOR = 0xb6d7a8;
602
600
  const LINK_COLOR = HIGHLIGHT_COLOR;
603
601
  const FILTERS_COLOR = "#188038";
604
- const SEPARATOR_COLOR = "#E0E2E4";
605
- const ICONS_COLOR = "#4A4F59";
606
- const HEADER_GROUPING_BACKGROUND_COLOR = "#F5F5F5";
607
602
  const HEADER_GROUPING_BORDER_COLOR = "#999";
608
- const GRID_BORDER_COLOR = "#E2E3E3";
609
603
  const FROZEN_PANE_HEADER_BORDER_COLOR = "#BCBCBC";
610
604
  const FROZEN_PANE_BORDER_COLOR = "#DADFE8";
611
605
  const COMPOSER_ASSISTANT_COLOR = "#9B359B";
@@ -617,30 +611,9 @@ const CHART_WATERFALL_SUBTOTAL_COLOR = "#AAAAAA";
617
611
  const GRAY_900 = "#111827";
618
612
  const GRAY_300 = "#D8DADD";
619
613
  const GRAY_200 = "#E7E9ED";
620
- const GRAY_100 = "#F9FAFB";
621
614
  const TEXT_BODY = "#374151";
622
615
  const TEXT_BODY_MUTED = TEXT_BODY + "C2";
623
- const TEXT_HEADING = "#111827";
624
- const PRIMARY_BUTTON_BG = "#714B67";
625
- const PRIMARY_BUTTON_HOVER_BG = "#624159";
626
- const PRIMARY_BUTTON_ACTIVE_BG = "#f1edf0";
627
- const BUTTON_BG = GRAY_200;
628
- const BUTTON_HOVER_BG = GRAY_300;
629
- const BUTTON_HOVER_TEXT_COLOR = "#111827";
630
- const BUTTON_ACTIVE_BG = "#e6f2f3";
631
- const BUTTON_ACTIVE_TEXT_COLOR = "#111827";
632
616
  const ACTION_COLOR = HIGHLIGHT_COLOR;
633
- const ACTION_COLOR_HOVER = "#01585c";
634
- const ALERT_WARNING_BG = "#FBEBCC";
635
- const ALERT_WARNING_BORDER = "#F8E2B3";
636
- const ALERT_WARNING_TEXT_COLOR = "#946D23";
637
- const ALERT_DANGER_BG = "#D44C591A";
638
- const ALERT_DANGER_BORDER = "#C34A41";
639
- const ALERT_DANGER_TEXT_COLOR = "#C34A41";
640
- const ALERT_INFO_BG = "#CDEDF1";
641
- const ALERT_INFO_BORDER = "#98DBE2";
642
- const ALERT_INFO_TEXT_COLOR = "#09414A";
643
- const BADGE_SELECTED_COLOR = "#E6F2F3";
644
617
  const CHART_PADDING = 20;
645
618
  const CHART_PADDING_BOTTOM = 10;
646
619
  const CHART_PADDING_TOP = 15;
@@ -738,9 +711,7 @@ const MIN_COL_WIDTH = 5;
738
711
  const HEADER_HEIGHT = 26;
739
712
  const HEADER_WIDTH = 48;
740
713
  const DESKTOP_TOPBAR_TOOLBAR_HEIGHT = 34;
741
- const MOBILE_TOPBAR_TOOLBAR_HEIGHT = 44;
742
714
  const DESKTOP_BOTTOMBAR_HEIGHT = 36;
743
- const MOBILE_BOTTOMBAR_HEIGHT = 44;
744
715
  const DEFAULT_CELL_WIDTH = 96;
745
716
  const DEFAULT_CELL_HEIGHT = 23;
746
717
  const SCROLLBAR_WIDTH = 15;
@@ -748,7 +719,6 @@ const AUTOFILL_EDGE_LENGTH = 8;
748
719
  const ICON_EDGE_LENGTH = 18;
749
720
  const MIN_CF_ICON_MARGIN = 4;
750
721
  const MIN_CELL_TEXT_MARGIN = 4;
751
- const CF_ICON_EDGE_LENGTH = 15;
752
722
  const PADDING_AUTORESIZE_VERTICAL = 3;
753
723
  const PADDING_AUTORESIZE_HORIZONTAL = MIN_CELL_TEXT_MARGIN;
754
724
  const GROUP_LAYER_WIDTH = 21;
@@ -763,11 +733,6 @@ const MOBILE_WIDTH_BREAKPOINT = 768;
763
733
  const MENU_WIDTH = 250;
764
734
  const MENU_VERTICAL_PADDING = 6;
765
735
  const DESKTOP_MENU_ITEM_HEIGHT = 26;
766
- const MOBILE_MENU_ITEM_HEIGHT = 35;
767
- const MENU_ITEM_PADDING_HORIZONTAL = 11;
768
- const MENU_ITEM_PADDING_VERTICAL = 4;
769
- const MENU_SEPARATOR_BORDER_WIDTH = 1;
770
- const MENU_SEPARATOR_PADDING = 5;
771
736
  // Style
772
737
  const DEFAULT_STYLE = {
773
738
  align: "left",
@@ -821,23 +786,6 @@ const FORBIDDEN_SHEETNAME_CHARS = ["'", "*", "?", "/", "\\", "[", "]"];
821
786
  const FORBIDDEN_SHEETNAME_CHARS_IN_EXCEL_REGEX = /'|\*|\?|\/|\\|\[|\]/;
822
787
  // Cells
823
788
  const FORMULA_REF_IDENTIFIER = "|";
824
- // Components
825
- var ComponentsImportance;
826
- (function (ComponentsImportance) {
827
- ComponentsImportance[ComponentsImportance["Grid"] = 0] = "Grid";
828
- ComponentsImportance[ComponentsImportance["Highlight"] = 5] = "Highlight";
829
- ComponentsImportance[ComponentsImportance["HeaderGroupingButton"] = 6] = "HeaderGroupingButton";
830
- ComponentsImportance[ComponentsImportance["Figure"] = 10] = "Figure";
831
- ComponentsImportance[ComponentsImportance["ScrollBar"] = 15] = "ScrollBar";
832
- ComponentsImportance[ComponentsImportance["GridPopover"] = 19] = "GridPopover";
833
- ComponentsImportance[ComponentsImportance["GridComposer"] = 20] = "GridComposer";
834
- ComponentsImportance[ComponentsImportance["IconPicker"] = 25] = "IconPicker";
835
- ComponentsImportance[ComponentsImportance["TopBarComposer"] = 30] = "TopBarComposer";
836
- ComponentsImportance[ComponentsImportance["Popover"] = 35] = "Popover";
837
- ComponentsImportance[ComponentsImportance["FigureAnchor"] = 1000] = "FigureAnchor";
838
- ComponentsImportance[ComponentsImportance["FigureSnapLine"] = 1001] = "FigureSnapLine";
839
- ComponentsImportance[ComponentsImportance["FigureTooltip"] = 1002] = "FigureTooltip";
840
- })(ComponentsImportance || (ComponentsImportance = {}));
841
789
  let DEFAULT_SHEETVIEW_SIZE = 0;
842
790
  function getDefaultSheetViewSize() {
843
791
  return DEFAULT_SHEETVIEW_SIZE;
@@ -888,6 +836,7 @@ const tokenColors = {
888
836
  ARG_SEPARATOR: functionColor,
889
837
  ORPHAN_RIGHT_PAREN: "#ff0000",
890
838
  };
839
+ const DRAG_THRESHOLD = 5; // in pixels, to avoid unwanted drag when clicking
891
840
 
892
841
  //------------------------------------------------------------------------------
893
842
  // Miscellaneous
@@ -1366,8 +1315,19 @@ function memoize(func) {
1366
1315
  },
1367
1316
  }[funcName];
1368
1317
  }
1318
+ /**
1319
+ * Removes the specified indexes from the array.
1320
+ * Sparse (empty) elements are transformed to undefined (unless their index is explicitly removed).
1321
+ */
1369
1322
  function removeIndexesFromArray(array, indexes) {
1370
- return array.filter((_, index) => !indexes.includes(index));
1323
+ const toRemove = new Set(indexes);
1324
+ const newArray = [];
1325
+ for (let i = 0; i < array.length; i++) {
1326
+ if (!toRemove.has(i)) {
1327
+ newArray.push(array[i]);
1328
+ }
1329
+ }
1330
+ return newArray;
1371
1331
  }
1372
1332
  function insertItemsAtIndex(array, items, index) {
1373
1333
  const newArray = [...array];
@@ -10663,153 +10623,6 @@ class ComposerFocusStore extends SpreadsheetStore {
10663
10623
  }
10664
10624
  }
10665
10625
 
10666
- /**
10667
- * This file is largely inspired by owl 1.
10668
- * `css` tag has been removed from owl 2 without workaround to manage css.
10669
- * So, the solution was to import the behavior of owl 1 directly in our
10670
- * codebase, with one difference: the css is added to the sheet as soon as the
10671
- * css tag is executed. In owl 1, the css was added as soon as a Component was
10672
- * created for the first time.
10673
- */
10674
- const STYLESHEETS = {};
10675
- let nextId = 0;
10676
- /**
10677
- * CSS tag helper for defining inline stylesheets. With this, one can simply define
10678
- * an inline stylesheet with just the following code:
10679
- * ```js
10680
- * css`.component-a { color: red; }`;
10681
- * ```
10682
- */
10683
- function css(strings, ...args) {
10684
- const name = `__sheet__${nextId++}`;
10685
- const value = String.raw(strings, ...args);
10686
- registerSheet(name, value);
10687
- activateSheet(name);
10688
- return name;
10689
- }
10690
- function processSheet(str) {
10691
- const tokens = str.split(/(\{|\}|;)/).map((s) => s.trim());
10692
- const selectorStack = [];
10693
- const parts = [];
10694
- let rules = [];
10695
- function generateSelector(stackIndex, parentSelector) {
10696
- const parts = [];
10697
- for (const selector of selectorStack[stackIndex]) {
10698
- let part = (parentSelector && parentSelector + " " + selector) || selector;
10699
- if (part.includes("&")) {
10700
- part = selector.replace(/&/g, parentSelector || "");
10701
- }
10702
- if (stackIndex < selectorStack.length - 1) {
10703
- part = generateSelector(stackIndex + 1, part);
10704
- }
10705
- parts.push(part);
10706
- }
10707
- return parts.join(", ");
10708
- }
10709
- function generateRules() {
10710
- if (rules.length) {
10711
- parts.push(generateSelector(0) + " {");
10712
- parts.push(...rules);
10713
- parts.push("}");
10714
- rules = [];
10715
- }
10716
- }
10717
- while (tokens.length) {
10718
- const token = tokens.shift();
10719
- if (token === "}") {
10720
- generateRules();
10721
- selectorStack.pop();
10722
- }
10723
- else {
10724
- if (tokens[0] === "{") {
10725
- generateRules();
10726
- selectorStack.push(token.split(/\s*,\s*/));
10727
- tokens.shift();
10728
- }
10729
- if (tokens[0] === ";") {
10730
- rules.push(" " + token + ";");
10731
- }
10732
- }
10733
- }
10734
- return parts.join("\n");
10735
- }
10736
- function registerSheet(id, css) {
10737
- const sheet = document.createElement("style");
10738
- sheet.textContent = processSheet(css);
10739
- STYLESHEETS[id] = sheet;
10740
- }
10741
- function activateSheet(id) {
10742
- const sheet = STYLESHEETS[id];
10743
- sheet.setAttribute("component", id);
10744
- document.head.appendChild(sheet);
10745
- }
10746
- function getTextDecoration({ strikethrough, underline, }) {
10747
- if (!strikethrough && !underline) {
10748
- return "none";
10749
- }
10750
- return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
10751
- }
10752
- /**
10753
- * Convert the cell style to CSS properties.
10754
- */
10755
- function cellStyleToCss(style) {
10756
- const attributes = cellTextStyleToCss(style);
10757
- if (!style)
10758
- return attributes;
10759
- if (style.fillColor) {
10760
- attributes["background"] = style.fillColor;
10761
- }
10762
- return attributes;
10763
- }
10764
- /**
10765
- * Convert the cell text style to CSS properties.
10766
- */
10767
- function cellTextStyleToCss(style) {
10768
- const attributes = {};
10769
- if (!style)
10770
- return attributes;
10771
- if (style.bold) {
10772
- attributes["font-weight"] = "bold";
10773
- }
10774
- if (style.italic) {
10775
- attributes["font-style"] = "italic";
10776
- }
10777
- if (style.fontSize) {
10778
- attributes["font-size"] = `${style.fontSize}px`;
10779
- }
10780
- if (style.strikethrough || style.underline) {
10781
- let decoration = style.strikethrough ? "line-through" : "";
10782
- decoration = style.underline ? decoration + " underline" : decoration;
10783
- attributes["text-decoration"] = decoration;
10784
- }
10785
- if (style.textColor) {
10786
- attributes["color"] = style.textColor;
10787
- }
10788
- return attributes;
10789
- }
10790
- /**
10791
- * Transform CSS properties into a CSS string.
10792
- */
10793
- function cssPropertiesToCss(attributes) {
10794
- let styleStr = "";
10795
- for (const attName in attributes) {
10796
- if (!attributes[attName]) {
10797
- continue;
10798
- }
10799
- styleStr += `${attName}:${attributes[attName]}; `;
10800
- }
10801
- return styleStr;
10802
- }
10803
- function getElementMargins(el) {
10804
- const style = window.getComputedStyle(el);
10805
- return {
10806
- top: parseInt(style.marginTop, 10) || 0,
10807
- bottom: parseInt(style.marginBottom, 10) || 0,
10808
- left: parseInt(style.marginLeft, 10) || 0,
10809
- right: parseInt(style.marginRight, 10) || 0,
10810
- };
10811
- }
10812
-
10813
10626
  const chartJsExtensionRegistry = new Registry();
10814
10627
  function areChartJSExtensionsLoaded() {
10815
10628
  return !!window.Chart.registry.plugins.get("chartShowValuesPlugin");
@@ -16082,8 +15895,9 @@ function interactiveSort(env, sheetId, anchor, zone, sortDirection, sortOptions)
16082
15895
  }
16083
15896
 
16084
15897
  function sortMatrix(matrix, locale, ...criteria) {
16085
- for (const [i, value] of criteria.entries()) {
16086
- assert(value !== undefined, _t("Value for parameter %d is missing, while the function [[FUNCTION_NAME]] expect a number or a range.", i + 1));
15898
+ for (let i = 0; i < criteria.length; i++) {
15899
+ const param = i % 2 === 0 ? "sort_column" : "is_ascending";
15900
+ assert(criteria[i] !== undefined, _t("Value for parameter %s is missing in [[FUNCTION_NAME]].", param));
16087
15901
  }
16088
15902
  const sortingOrders = [];
16089
15903
  const sortColumns = [];
@@ -24031,15 +23845,6 @@ function getNextNonEmptyBar(bars, startIndex) {
24031
23845
  return bars.find((bar, i) => i > startIndex && bar.height !== 0);
24032
23846
  }
24033
23847
 
24034
- css /* scss */ `
24035
- .o-spreadsheet {
24036
- .o-chart-custom-tooltip {
24037
- font-size: 12px;
24038
- background-color: #fff;
24039
- z-index: ${ComponentsImportance.FigureTooltip};
24040
- }
24041
- }
24042
- `;
24043
23848
  chartJsExtensionRegistry.add("chartShowValuesPlugin", {
24044
23849
  register: (Chart) => Chart.register(chartShowValuesPlugin),
24045
23850
  unregister: (Chart) => Chart.unregister(chartShowValuesPlugin),
@@ -24537,18 +24342,15 @@ function createScorecardChartRuntime(chart, getters) {
24537
24342
  return {
24538
24343
  title: {
24539
24344
  ...chart.title,
24540
- // chart titles are extracted from .json files and they are translated at runtime here
24541
- text: chart.title.text ? _t(chart.title.text) : "",
24345
+ text: chart.title.text ? getters.dynamicTranslate(chart.title.text) : "",
24542
24346
  },
24543
24347
  keyValue: formattedKeyValue,
24544
- keyDescr: chart.keyDescr?.text
24545
- ? _t(chart.keyDescr.text) // descriptions are extracted from .json files and they are translated at runtime here
24546
- : "",
24348
+ keyDescr: chart.keyDescr?.text ? getters.dynamicTranslate(chart.keyDescr.text) : "",
24547
24349
  baselineDisplay,
24548
24350
  baselineArrow: getBaselineArrowDirection(baselineCell, keyValueCell, chart.baselineMode),
24549
24351
  baselineColor: getBaselineColor(baselineCell, chart.baselineMode, keyValueCell, chart.baselineColorUp, chart.baselineColorDown),
24550
24352
  baselineDescr: chart.baselineMode !== "progress" && chart.baselineDescr?.text
24551
- ? _t(chart.baselineDescr.text) // descriptions are extracted from .json files and they are translated at runtime here
24353
+ ? getters.dynamicTranslate(chart.baselineDescr.text)
24552
24354
  : "",
24553
24355
  fontColor,
24554
24356
  background,
@@ -24848,9 +24650,8 @@ class ScorecardChart extends Component {
24848
24650
  return this.env.model.getters.getChartRuntime(this.props.chartId);
24849
24651
  }
24850
24652
  get title() {
24851
- const title = this.env.model.getters.getChartDefinition(this.props.chartId).title.text ?? "";
24852
- // chart titles are extracted from .json files and they are translated at runtime here
24853
- return _t(title);
24653
+ const title = this.env.model.getters.getChartDefinition(this.props.chartId).title.text;
24654
+ return title ? this.env.model.getters.dynamicTranslate(title) : "";
24854
24655
  }
24855
24656
  setup() {
24856
24657
  useEffect(this.createChart.bind(this), () => {
@@ -27023,12 +26824,12 @@ function getDatasetAxisId(definition, dataset) {
27023
26824
  return axisId || "y";
27024
26825
  }
27025
26826
 
27026
- function getChartTitle(definition) {
26827
+ function getChartTitle(definition, getters) {
27027
26828
  const chartTitle = definition.title;
27028
26829
  const fontColor = chartMutedFontColor(definition.background);
27029
26830
  return {
27030
26831
  display: !!chartTitle.text,
27031
- text: _t(chartTitle.text),
26832
+ text: chartTitle.text ? getters.dynamicTranslate(chartTitle.text) : "",
27032
26833
  color: chartTitle?.color ?? fontColor,
27033
26834
  align: chartTitle.align === "center" ? "center" : chartTitle.align === "right" ? "end" : "start",
27034
26835
  font: {
@@ -27596,7 +27397,7 @@ function createBarChartRuntime(chart, getters) {
27596
27397
  layout: getChartLayout(definition, chartData),
27597
27398
  scales: getBarChartScales(definition, chartData),
27598
27399
  plugins: {
27599
- title: getChartTitle(definition),
27400
+ title: getChartTitle(definition, getters),
27600
27401
  legend: getBarChartLegend(definition),
27601
27402
  tooltip: getBarChartTooltip(definition, chartData),
27602
27403
  chartShowValuesPlugin: getChartShowValues(definition, chartData),
@@ -27783,13 +27584,6 @@ const zoomWindowPlugin = {
27783
27584
  },
27784
27585
  };
27785
27586
 
27786
- css /* scss */ `
27787
- .o-spreadsheet {
27788
- .o-master-chart-container {
27789
- height: ${MASTER_CHART_HEIGHT}px;
27790
- }
27791
- }
27792
- `;
27793
27587
  chartJsExtensionRegistry.add("zoomWindowPlugin", {
27794
27588
  register: (Chart) => Chart.register(zoomWindowPlugin),
27795
27589
  unregister: (Chart) => Chart.unregister(zoomWindowPlugin),
@@ -28827,7 +28621,7 @@ function createComboChartRuntime(chart, getters) {
28827
28621
  layout: getChartLayout(definition, chartData),
28828
28622
  scales: getBarChartScales(definition, chartData),
28829
28623
  plugins: {
28830
- title: getChartTitle(definition),
28624
+ title: getChartTitle(definition, getters),
28831
28625
  legend: getComboChartLegend(definition),
28832
28626
  tooltip: getBarChartTooltip(definition, chartData),
28833
28627
  chartShowValuesPlugin: getChartShowValues(definition, chartData),
@@ -28973,7 +28767,7 @@ function createFunnelChartRuntime(chart, getters) {
28973
28767
  layout: getChartLayout(definition, chartData),
28974
28768
  scales: getFunnelChartScales(definition, chartData),
28975
28769
  plugins: {
28976
- title: getChartTitle(definition),
28770
+ title: getChartTitle(definition, getters),
28977
28771
  legend: { display: false },
28978
28772
  tooltip: getFunnelChartTooltip(definition, chartData),
28979
28773
  chartShowValuesPlugin: getChartShowValues(definition, chartData),
@@ -29210,8 +29004,7 @@ function createGaugeChartRuntime(chart, getters) {
29210
29004
  background: getters.getStyleOfSingleCellChart(chart.background, dataRange).background,
29211
29005
  title: {
29212
29006
  ...chart.title,
29213
- // chart titles are extracted from .json files and they are translated at runtime here
29214
- text: _t(chart.title.text ?? ""),
29007
+ text: chart.title.text ? getters.dynamicTranslate(chart.title.text) : "",
29215
29008
  },
29216
29009
  minValue: {
29217
29010
  value: minValue,
@@ -29395,7 +29188,7 @@ function createGeoChartRuntime(chart, getters) {
29395
29188
  layout: getChartLayout(definition, chartData),
29396
29189
  scales: getGeoChartScales(definition, chartData),
29397
29190
  plugins: {
29398
- title: getChartTitle(definition),
29191
+ title: getChartTitle(definition, getters),
29399
29192
  tooltip: getGeoChartTooltip(definition, chartData),
29400
29193
  legend: { display: false },
29401
29194
  },
@@ -29560,7 +29353,7 @@ function createLineChartRuntime(chart, getters) {
29560
29353
  layout: getChartLayout(definition, chartData),
29561
29354
  scales: getLineChartScales(definition, chartData),
29562
29355
  plugins: {
29563
- title: getChartTitle(definition),
29356
+ title: getChartTitle(definition, getters),
29564
29357
  legend: getLineChartLegend(definition),
29565
29358
  tooltip: getLineChartTooltip(definition, chartData),
29566
29359
  chartShowValuesPlugin: getChartShowValues(definition, chartData),
@@ -29697,7 +29490,7 @@ function createPieChartRuntime(chart, getters) {
29697
29490
  : undefined,
29698
29491
  layout: getChartLayout(definition, chartData),
29699
29492
  plugins: {
29700
- title: getChartTitle(definition),
29493
+ title: getChartTitle(definition, getters),
29701
29494
  legend: getPieChartLegend(definition, chartData),
29702
29495
  tooltip: getPieChartTooltip(definition, chartData),
29703
29496
  chartShowValuesPlugin: getChartShowValues(definition, chartData),
@@ -29851,7 +29644,7 @@ function createPyramidChartRuntime(chart, getters) {
29851
29644
  layout: getChartLayout(definition, chartData),
29852
29645
  scales: getPyramidChartScales(definition, chartData),
29853
29646
  plugins: {
29854
- title: getChartTitle(definition),
29647
+ title: getChartTitle(definition, getters),
29855
29648
  legend: getBarChartLegend(definition),
29856
29649
  tooltip: getPyramidChartTooltip(definition, chartData),
29857
29650
  chartShowValuesPlugin: getPyramidChartShowValues(definition, chartData),
@@ -30000,7 +29793,7 @@ function createRadarChartRuntime(chart, getters) {
30000
29793
  layout: getChartLayout(definition, chartData),
30001
29794
  scales: getRadarChartScales(definition, chartData),
30002
29795
  plugins: {
30003
- title: getChartTitle(definition),
29796
+ title: getChartTitle(definition, getters),
30004
29797
  legend: getRadarChartLegend(definition),
30005
29798
  tooltip: getRadarChartTooltip(definition, chartData),
30006
29799
  chartShowValuesPlugin: getChartShowValues(definition, chartData),
@@ -30155,7 +29948,7 @@ function createScatterChartRuntime(chart, getters) {
30155
29948
  layout: getChartLayout(definition, chartData),
30156
29949
  scales: getScatterChartScales(definition, chartData),
30157
29950
  plugins: {
30158
- title: getChartTitle(definition),
29951
+ title: getChartTitle(definition, getters),
30159
29952
  legend: getScatterChartLegend(definition),
30160
29953
  tooltip: getLineChartTooltip(definition, chartData),
30161
29954
  chartShowValuesPlugin: getChartShowValues(definition, chartData),
@@ -30294,7 +30087,7 @@ function createSunburstChartRuntime(chart, getters) {
30294
30087
  ...CHART_COMMON_OPTIONS,
30295
30088
  layout: getChartLayout(definition, chartData),
30296
30089
  plugins: {
30297
- title: getChartTitle(definition),
30090
+ title: getChartTitle(definition, getters),
30298
30091
  legend: getSunburstChartLegend(definition),
30299
30092
  tooltip: getSunburstChartTooltip(definition, chartData),
30300
30093
  sunburstLabelsPlugin: getSunburstShowValues(definition, chartData),
@@ -30444,7 +30237,7 @@ function createTreeMapChartRuntime(chart, getters) {
30444
30237
  ...CHART_COMMON_OPTIONS,
30445
30238
  layout: getChartLayout(definition, chartData),
30446
30239
  plugins: {
30447
- title: getChartTitle(definition),
30240
+ title: getChartTitle(definition, getters),
30448
30241
  legend: { display: false },
30449
30242
  tooltip: getTreeMapChartTooltip(definition, chartData),
30450
30243
  },
@@ -30607,7 +30400,7 @@ function createWaterfallChartRuntime(chart, getters) {
30607
30400
  layout: getChartLayout(definition, chartData),
30608
30401
  scales: getWaterfallChartScales(definition, chartData),
30609
30402
  plugins: {
30610
- title: getChartTitle(definition),
30403
+ title: getChartTitle(definition, getters),
30611
30404
  legend: getWaterfallChartLegend(definition),
30612
30405
  tooltip: getWaterfallChartTooltip(definition, chartData),
30613
30406
  chartShowValuesPlugin: getWaterfallChartShowValues(definition, chartData),
@@ -31601,6 +31394,81 @@ function getCarouselItemTitle(getters, item) {
31601
31394
  return matchedChart.displayName;
31602
31395
  }
31603
31396
 
31397
+ /**
31398
+ * This file is largely inspired by owl 1.
31399
+ * `css` tag has been removed from owl 2 without workaround to manage css.
31400
+ * So, the solution was to import the behavior of owl 1 directly in our
31401
+ * codebase, with one difference: the css is added to the sheet as soon as the
31402
+ * css tag is executed. In owl 1, the css was added as soon as a Component was
31403
+ * created for the first time.
31404
+ */
31405
+ function getTextDecoration({ strikethrough, underline, }) {
31406
+ if (!strikethrough && !underline) {
31407
+ return "none";
31408
+ }
31409
+ return `${strikethrough ? "line-through" : ""} ${underline ? "underline" : ""}`;
31410
+ }
31411
+ /**
31412
+ * Convert the cell style to CSS properties.
31413
+ */
31414
+ function cellStyleToCss(style) {
31415
+ const attributes = cellTextStyleToCss(style);
31416
+ if (!style)
31417
+ return attributes;
31418
+ if (style.fillColor) {
31419
+ attributes["background"] = style.fillColor;
31420
+ }
31421
+ return attributes;
31422
+ }
31423
+ /**
31424
+ * Convert the cell text style to CSS properties.
31425
+ */
31426
+ function cellTextStyleToCss(style) {
31427
+ const attributes = {};
31428
+ if (!style)
31429
+ return attributes;
31430
+ if (style.bold) {
31431
+ attributes["font-weight"] = "bold";
31432
+ }
31433
+ if (style.italic) {
31434
+ attributes["font-style"] = "italic";
31435
+ }
31436
+ if (style.fontSize) {
31437
+ attributes["font-size"] = `${style.fontSize}px`;
31438
+ }
31439
+ if (style.strikethrough || style.underline) {
31440
+ let decoration = style.strikethrough ? "line-through" : "";
31441
+ decoration = style.underline ? decoration + " underline" : decoration;
31442
+ attributes["text-decoration"] = decoration;
31443
+ }
31444
+ if (style.textColor) {
31445
+ attributes["color"] = style.textColor;
31446
+ }
31447
+ return attributes;
31448
+ }
31449
+ /**
31450
+ * Transform CSS properties into a CSS string.
31451
+ */
31452
+ function cssPropertiesToCss(attributes) {
31453
+ let styleStr = "";
31454
+ for (const attName in attributes) {
31455
+ if (!attributes[attName]) {
31456
+ continue;
31457
+ }
31458
+ styleStr += `${attName}:${attributes[attName]}; `;
31459
+ }
31460
+ return styleStr;
31461
+ }
31462
+ function getElementMargins(el) {
31463
+ const style = window.getComputedStyle(el);
31464
+ return {
31465
+ top: parseInt(style.marginTop, 10) || 0,
31466
+ bottom: parseInt(style.marginBottom, 10) || 0,
31467
+ left: parseInt(style.marginLeft, 10) || 0,
31468
+ right: parseInt(style.marginRight, 10) || 0,
31469
+ };
31470
+ }
31471
+
31604
31472
  /**
31605
31473
  * Repeatedly calls a callback function with a time delay between calls.
31606
31474
  */
@@ -31655,59 +31523,6 @@ function useTimeOut() {
31655
31523
  };
31656
31524
  }
31657
31525
 
31658
- //------------------------------------------------------------------------------
31659
- // Context Menu Component
31660
- //------------------------------------------------------------------------------
31661
- css /* scss */ `
31662
- .o-menu {
31663
- background-color: white;
31664
- user-select: none;
31665
-
31666
- .o-menu-item {
31667
- height: ${DESKTOP_MENU_ITEM_HEIGHT}px;
31668
- padding: ${MENU_ITEM_PADDING_VERTICAL}px ${MENU_ITEM_PADDING_HORIZONTAL}px;
31669
- cursor: pointer;
31670
- user-select: none;
31671
-
31672
- .o-menu-item-name {
31673
- min-width: 40%;
31674
- }
31675
-
31676
- .o-menu-item-icon {
31677
- display: inline-block;
31678
- margin: 0px 8px 0px 0px;
31679
- width: ${DESKTOP_MENU_ITEM_HEIGHT - 2 * MENU_ITEM_PADDING_VERTICAL}px;
31680
- line-height: ${DESKTOP_MENU_ITEM_HEIGHT - 2 * MENU_ITEM_PADDING_VERTICAL}px;
31681
- }
31682
-
31683
- &:not(.disabled) {
31684
- &:hover,
31685
- &.o-menu-item-active {
31686
- background-color: ${BUTTON_ACTIVE_BG};
31687
- color: ${BUTTON_ACTIVE_TEXT_COLOR};
31688
- }
31689
- .o-menu-item-description {
31690
- color: grey;
31691
- }
31692
- .o-menu-item-icon {
31693
- .o-icon {
31694
- color: ${ICONS_COLOR};
31695
- }
31696
- }
31697
- }
31698
- &.disabled {
31699
- color: ${DISABLED_TEXT_COLOR};
31700
- cursor: not-allowed;
31701
- }
31702
- }
31703
- }
31704
-
31705
- .o-spreadsheet-mobile {
31706
- .o-menu-item {
31707
- height: ${MOBILE_MENU_ITEM_HEIGHT}px;
31708
- }
31709
- }
31710
- `;
31711
31526
  class Menu extends Component {
31712
31527
  static template = "o-spreadsheet-Menu";
31713
31528
  static props = {
@@ -31884,16 +31699,6 @@ function usePopoverContainer() {
31884
31699
  return container;
31885
31700
  }
31886
31701
 
31887
- css /* scss */ `
31888
- .o-popover {
31889
- position: absolute;
31890
- z-index: ${ComponentsImportance.Popover};
31891
- overflow: auto;
31892
- box-shadow: 1px 2px 5px 2px rgb(51 51 51 / 15%);
31893
- width: fit-content;
31894
- height: fit-content;
31895
- }
31896
- `;
31897
31702
  class Popover extends Component {
31898
31703
  static template = "o-spreadsheet-Popover";
31899
31704
  static props = {
@@ -31916,7 +31721,6 @@ class Popover extends Component {
31916
31721
  onMouseWheel: () => { },
31917
31722
  onPopoverMoved: () => { },
31918
31723
  onPopoverHidden: () => { },
31919
- zIndex: ComponentsImportance.Popover,
31920
31724
  };
31921
31725
  popoverRef = useRef("popover");
31922
31726
  popoverContentRef = useRef("popoverContent");
@@ -31937,11 +31741,6 @@ class Popover extends Component {
31937
31741
  // the element in rendered, so we can still set its position
31938
31742
  useEffect(this.computePopoverPosition.bind(this));
31939
31743
  }
31940
- get popoverStyle() {
31941
- return cssPropertiesToCss({
31942
- "z-index": `${this.props.zIndex}`,
31943
- });
31944
- }
31945
31744
  computePopoverPosition() {
31946
31745
  if (!this.containerRect)
31947
31746
  throw new Error("Popover container is not defined");
@@ -32132,12 +31931,6 @@ class TopRightPopoverContext extends PopoverPositionContext {
32132
31931
  //------------------------------------------------------------------------------
32133
31932
  // Context MenuPopover Component
32134
31933
  //------------------------------------------------------------------------------
32135
- css /* scss */ `
32136
- .o-menu-wrapper {
32137
- padding: ${MENU_VERTICAL_PADDING}px 0px;
32138
- background-color: white;
32139
- }
32140
- `;
32141
31934
  const TIMEOUT_DELAY = 250;
32142
31935
  class MenuPopover extends Component {
32143
31936
  static template = "o-spreadsheet-Menu-Popover";
@@ -32383,7 +32176,11 @@ class CarouselFigure extends Component {
32383
32176
  onFigureDeleted: Function,
32384
32177
  editFigureStyle: { type: Function, optional: true },
32385
32178
  };
32386
- static components = { ChartDashboardMenu };
32179
+ static components = { ChartDashboardMenu, MenuPopover };
32180
+ carouselTabsRef = useRef("carouselTabs");
32181
+ carouselTabsDropdownRef = useRef("carouselTabsDropdown");
32182
+ menuState = useState({ isOpen: false, anchorRect: null, menuItems: [] });
32183
+ hiddenItems = [];
32387
32184
  animationStore;
32388
32185
  setup() {
32389
32186
  this.animationStore = useStore(ChartAnimationStore);
@@ -32394,6 +32191,7 @@ class CarouselFigure extends Component {
32394
32191
  else {
32395
32192
  this.props.editFigureStyle?.({ "pointer-events": "auto" });
32396
32193
  }
32194
+ this.updateTabsVisibility();
32397
32195
  });
32398
32196
  }
32399
32197
  get carousel() {
@@ -32453,6 +32251,49 @@ class CarouselFigure extends Component {
32453
32251
  const style = { ...DEFAULT_CAROUSEL_TITLE_STYLE, ...this.carousel.title };
32454
32252
  return cssPropertiesToCss(cellTextStyleToCss(chartStyleToCellStyle(style)));
32455
32253
  }
32254
+ updateTabsVisibility() {
32255
+ const tabsContainerEl = this.carouselTabsRef.el;
32256
+ const dropDownEl = this.carouselTabsDropdownRef.el;
32257
+ if (!tabsContainerEl || !dropDownEl) {
32258
+ return;
32259
+ }
32260
+ this.hiddenItems = [];
32261
+ const containerRect = getBoundingRectAsPOJO(tabsContainerEl);
32262
+ const tabs = Array.from(tabsContainerEl.children);
32263
+ for (const tab of tabs) {
32264
+ tab.style.display = "block";
32265
+ }
32266
+ const tabWidths = tabs.map((tab) => getBoundingRectAsPOJO(tab).width);
32267
+ let currentWidth = 0;
32268
+ for (let i = 0; i < tabs.length; i++) {
32269
+ const shouldBeHidden = currentWidth + tabWidths[i] > containerRect.width;
32270
+ currentWidth += tabWidths[i];
32271
+ if (shouldBeHidden) {
32272
+ tabs[i].style.display = "none";
32273
+ this.hiddenItems.push(this.carousel.items[i]);
32274
+ }
32275
+ }
32276
+ dropDownEl.style.display = this.hiddenItems.length ? "block" : "none";
32277
+ }
32278
+ get menuId() {
32279
+ return "carousel-tabs-menu-";
32280
+ }
32281
+ toggleMenu(ev) {
32282
+ if (ev.closedMenuId === this.menuId) {
32283
+ this.menuState.isOpen = false;
32284
+ return;
32285
+ }
32286
+ const rect = getRefBoundingRect(this.carouselTabsDropdownRef);
32287
+ const menuItems = this.hiddenItems.map((item) => ({
32288
+ name: this.getItemTitle(item),
32289
+ execute: () => this.onCarouselTabClick(item),
32290
+ isActive: () => this.isItemSelected(item),
32291
+ isReadonlyAllowed: true,
32292
+ }));
32293
+ this.menuState.isOpen = true;
32294
+ this.menuState.anchorRect = rect;
32295
+ this.menuState.menuItems = createActions(menuItems);
32296
+ }
32456
32297
  }
32457
32298
 
32458
32299
  class ChartFigure extends Component {
@@ -32530,79 +32371,6 @@ figureRegistry.add("carousel", {
32530
32371
  const ANCHOR_SIZE = 8;
32531
32372
  const BORDER_WIDTH = 1;
32532
32373
  const ACTIVE_BORDER_WIDTH = 2;
32533
- css /*SCSS*/ `
32534
- div.o-figure {
32535
- position: absolute;
32536
- width: 100%;
32537
- height: 100%;
32538
- user-select: none;
32539
-
32540
- &:focus {
32541
- outline: none;
32542
- }
32543
- }
32544
-
32545
- div.o-figure-border {
32546
- z-index: 1;
32547
- }
32548
-
32549
- .o-figure-wrapper {
32550
- position: absolute;
32551
- box-sizing: content-box;
32552
- pointer-events: auto;
32553
-
32554
- .o-fig-anchor {
32555
- z-index: ${ComponentsImportance.FigureAnchor};
32556
- position: absolute;
32557
- width: ${ANCHOR_SIZE}px;
32558
- height: ${ANCHOR_SIZE}px;
32559
- background-color: #1a73e8;
32560
- outline: ${BORDER_WIDTH}px solid white;
32561
-
32562
- &.o-top {
32563
- cursor: n-resize;
32564
- }
32565
- &.o-topRight {
32566
- cursor: ne-resize;
32567
- }
32568
- &.o-right {
32569
- cursor: e-resize;
32570
- }
32571
- &.o-bottomRight {
32572
- cursor: se-resize;
32573
- }
32574
- &.o-bottom {
32575
- cursor: s-resize;
32576
- }
32577
- &.o-bottomLeft {
32578
- cursor: sw-resize;
32579
- }
32580
- &.o-left {
32581
- cursor: w-resize;
32582
- }
32583
- &.o-topLeft {
32584
- cursor: nw-resize;
32585
- }
32586
- }
32587
-
32588
- .o-figure-menu {
32589
- right: 0px;
32590
- top: 0px;
32591
- display: none;
32592
- }
32593
-
32594
- .o-figure-menu-item {
32595
- cursor: pointer;
32596
- }
32597
-
32598
- .o-figure.active:focus,
32599
- .o-figure:hover {
32600
- .o-figure-menu {
32601
- display: flex;
32602
- }
32603
- }
32604
- }
32605
- `;
32606
32374
  class FigureComponent extends Component {
32607
32375
  static template = "o-spreadsheet-FigureComponent";
32608
32376
  static props = {
@@ -32647,7 +32415,6 @@ class FigureComponent extends Component {
32647
32415
  top: `${y}px`,
32648
32416
  width: `${width}px`,
32649
32417
  height: `${height}px`,
32650
- "z-index": String(ComponentsImportance.Figure + (this.isSelected ? 1 : 0)),
32651
32418
  });
32652
32419
  }
32653
32420
  getResizerPosition(resizer) {
@@ -32926,21 +32693,6 @@ class CellPopoverStore extends SpreadsheetStore {
32926
32693
  }
32927
32694
 
32928
32695
  const ERROR_TOOLTIP_MAX_HEIGHT = 80;
32929
- const ERROR_TOOLTIP_WIDTH = 180;
32930
- css /* scss */ `
32931
- .o-error-tooltip {
32932
- font-size: 13px;
32933
- background-color: white;
32934
- border-left: 3px solid red;
32935
- padding: 10px;
32936
- width: ${ERROR_TOOLTIP_WIDTH}px;
32937
- overflow-wrap: break-word;
32938
-
32939
- .o-error-tooltip-message {
32940
- overflow: hidden;
32941
- }
32942
- }
32943
- `;
32944
32696
  class ErrorToolTip extends Component {
32945
32697
  static maxSize = { maxHeight: ERROR_TOOLTIP_MAX_HEIGHT };
32946
32698
  static template = "o-spreadsheet-ErrorToolTip";
@@ -33041,34 +32793,6 @@ class Collapse extends Component {
33041
32793
  }
33042
32794
  }
33043
32795
 
33044
- css /* scss */ `
33045
- .o_side_panel_collapsible_title {
33046
- font-size: 16px;
33047
- cursor: pointer;
33048
- padding: 6px 0px 6px 6px !important;
33049
-
33050
- .collapsor-arrow {
33051
- transform: rotate(-90deg);
33052
- display: inline-block;
33053
- transform-origin: 8px 11px;
33054
- transition: transform 0.2s ease-in-out;
33055
-
33056
- .o-icon {
33057
- width: 16px;
33058
- height: 22px;
33059
- }
33060
- }
33061
- .collapsor:not(.collapsed) .collapsor-arrow {
33062
- transform: rotate(0);
33063
- }
33064
-
33065
- .collapsor {
33066
- width: 100%;
33067
- transition-delay: 0.35s;
33068
- transition-property: all;
33069
- }
33070
- }
33071
- `;
33072
32796
  class SidePanelCollapsible extends Component {
33073
32797
  static template = "o-spreadsheet-SidePanelCollapsible";
33074
32798
  static props = {
@@ -33705,27 +33429,6 @@ function updateSelectionWithArrowKeys(ev, selection) {
33705
33429
  }
33706
33430
  }
33707
33431
 
33708
- css /* scss */ `
33709
- .o-autocomplete-dropdown {
33710
- pointer-events: auto;
33711
- cursor: pointer;
33712
- background-color: #fff;
33713
- max-width: 400px;
33714
- z-index: 1;
33715
-
33716
- .o-autocomplete-value-focus {
33717
- background-color: #f2f2f2;
33718
- }
33719
-
33720
- & > div {
33721
- padding: 1px 5px 5px 5px;
33722
- .o-autocomplete-description {
33723
- padding-left: 5px;
33724
- font-size: 11px;
33725
- }
33726
- }
33727
- }
33728
- `;
33729
33432
  class TextValueProvider extends Component {
33730
33433
  static template = "o-spreadsheet-TextValueProvider";
33731
33434
  static props = {
@@ -34027,36 +33730,6 @@ class FunctionDescriptionProvider extends Component {
34027
33730
  }
34028
33731
 
34029
33732
  const BUBBLE_ARROW_SIZE = 7;
34030
- css /* scss */ `
34031
- .o-spreadsheet {
34032
- .o-speech-bubble {
34033
- background-color: white;
34034
- box-sizing: border-box;
34035
- box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
34036
- border: 1px solid #ccc;
34037
- z-index: ${ComponentsImportance.Popover};
34038
-
34039
- &::after {
34040
- content: "";
34041
- position: absolute;
34042
- top: 100%;
34043
- left: 50%;
34044
- background-color: white;
34045
- height: ${BUBBLE_ARROW_SIZE}px;
34046
- width: ${BUBBLE_ARROW_SIZE}px;
34047
- transform-origin: top left;
34048
- transform: translate(0, -67%) rotate(45deg);
34049
- border-right: 1px solid #ccc;
34050
- border-bottom: 1px solid #ccc;
34051
- box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.15);
34052
- }
34053
- }
34054
-
34055
- .o-speech-content {
34056
- max-width: 300px;
34057
- }
34058
- }
34059
- `;
34060
33733
  class SpeechBubble extends Component {
34061
33734
  static template = "o-spreadsheet-SpeechBubble";
34062
33735
  static props = { content: String, anchorRect: Object };
@@ -34085,85 +33758,6 @@ const CLOSE_ICON_RADIUS = 9;
34085
33758
  const selectionIndicatorClass = "selector-flag";
34086
33759
  const highlightParenthesisClass = "highlight-parenthesis-flag";
34087
33760
  const highlightClass = "highlight-flag";
34088
- const selectionIndicatorColor = "#a9a9a9";
34089
- const selectionIndicator = "␣";
34090
- css /* scss */ `
34091
- .o-composer-container {
34092
- .o-composer {
34093
- overflow-y: auto;
34094
- overflow-x: hidden;
34095
- word-break: break-all;
34096
- padding-right: 2px;
34097
-
34098
- caret-color: black;
34099
- padding-left: 3px;
34100
- padding-right: 3px;
34101
- outline: none;
34102
-
34103
- tab-size: 4;
34104
-
34105
- p {
34106
- margin-bottom: 0px;
34107
-
34108
- span {
34109
- white-space: pre-wrap;
34110
- /* On some browsers (chromium ?) it is somehow possible to hover two of the composer's spans at the same time, leading to
34111
- * flickering with a succession of onmouseenter/onmouseleave events. A small invisible padding seems to prevent the issue.*/
34112
- padding-left: 0.01px;
34113
-
34114
- &.${selectionIndicatorClass}:after {
34115
- content: "${selectionIndicator}";
34116
- color: ${selectionIndicatorColor};
34117
- }
34118
-
34119
- &.${highlightParenthesisClass}:not(.${highlightClass}) {
34120
- border-radius: 5px;
34121
- background-color: lightgray;
34122
- padding: 1.5px 0px 1.5px 0px;
34123
- }
34124
-
34125
- &.${highlightClass} {
34126
- background-color: #e6edf3;
34127
- }
34128
- }
34129
- }
34130
- }
34131
- .o-composer[placeholder]:empty:not(:focus):not(.active)::before {
34132
- content: attr(placeholder);
34133
- color: #bdbdbd;
34134
- position: relative;
34135
- top: 0%;
34136
- pointer-events: none;
34137
- }
34138
-
34139
- .fa-stack {
34140
- /* reset stack size which is doubled by default */
34141
- width: ${CLOSE_ICON_RADIUS * 2}px;
34142
- height: ${CLOSE_ICON_RADIUS * 2}px;
34143
- line-height: ${CLOSE_ICON_RADIUS * 2}px;
34144
- }
34145
-
34146
- .force-open-assistant {
34147
- left: -1px;
34148
- top: -1px;
34149
-
34150
- .fa-question-circle {
34151
- color: ${PRIMARY_BUTTON_BG};
34152
- }
34153
- }
34154
-
34155
- .o-composer-assistant {
34156
- margin-top: 1px;
34157
-
34158
- .o-semi-bold {
34159
- /* FIXME: to remove in favor of Bootstrap
34160
- * 'fw-semibold' when we upgrade to Bootstrap 5.2
34161
- */
34162
- font-weight: 600 !important;
34163
- }
34164
- }
34165
- }
34166
- `;
34167
33761
  class Composer extends Component {
34168
33762
  static template = "o-spreadsheet-Composer";
34169
33763
  static props = {
@@ -35836,30 +35430,6 @@ class StandaloneComposerStore extends AbstractComposerStore {
35836
35430
  }
35837
35431
  }
35838
35432
 
35839
- css /* scss */ `
35840
- .o-spreadsheet {
35841
- .o-standalone-composer {
35842
- min-height: 24px;
35843
-
35844
- border-bottom: 1px solid;
35845
- border-color: ${GRAY_300};
35846
-
35847
- &.active {
35848
- border-color: ${ACTION_COLOR};
35849
- }
35850
-
35851
- &.o-invalid {
35852
- border-bottom: 2px solid red;
35853
- }
35854
-
35855
- /* As the standalone composer is potentially very small (eg. in a side panel), we remove the scrollbar display */
35856
- scrollbar-width: none; /* Firefox */
35857
- &::-webkit-scrollbar {
35858
- display: none;
35859
- }
35860
- }
35861
- }
35862
- `;
35863
35433
  class StandaloneComposer extends Component {
35864
35434
  static template = "o-spreadsheet-StandaloneComposer";
35865
35435
  static props = {
@@ -35927,17 +35497,6 @@ class StandaloneComposer extends Component {
35927
35497
  }
35928
35498
  }
35929
35499
 
35930
- css /* scss */ `
35931
- .o-dv-input {
35932
- &.o-invalid {
35933
- background-color: #ffdddd;
35934
- }
35935
- .error-icon {
35936
- right: 7px;
35937
- top: 7px;
35938
- }
35939
- }
35940
- `;
35941
35500
  class CriterionInput extends Component {
35942
35501
  static template = "o-spreadsheet-CriterionInput";
35943
35502
  static props = {
@@ -36105,8 +35664,6 @@ function startDnd(onPointerMove, onPointerUp) {
36105
35664
  return removeListeners;
36106
35665
  }
36107
35666
 
36108
- const LINE_VERTICAL_PADDING = 1;
36109
- const PICKER_PADDING = 8;
36110
35667
  const ITEM_BORDER_WIDTH = 1;
36111
35668
  const ITEM_EDGE_LENGTH = 18;
36112
35669
  const ITEMS_PER_LINE = 10;
@@ -36115,170 +35672,6 @@ const ITEM_GAP = 2;
36115
35672
  const CONTENT_WIDTH = ITEMS_PER_LINE * (ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH) + (ITEMS_PER_LINE - 1) * ITEM_GAP;
36116
35673
  const INNER_GRADIENT_WIDTH = CONTENT_WIDTH - 2 * ITEM_BORDER_WIDTH;
36117
35674
  const INNER_GRADIENT_HEIGHT = CONTENT_WIDTH - 30 - 2 * ITEM_BORDER_WIDTH;
36118
- const CONTAINER_WIDTH = CONTENT_WIDTH + 2 * PICKER_PADDING;
36119
- css /* scss */ `
36120
- .o-color-picker {
36121
- padding: ${PICKER_PADDING}px 0;
36122
- /* FIXME: this is useless, overiden by the popover container */
36123
- box-shadow: 1px 2px 5px 2px rgba(51, 51, 51, 0.15);
36124
- background-color: white;
36125
- line-height: 1.2;
36126
- overflow-y: auto;
36127
- overflow-x: hidden;
36128
- width: ${CONTAINER_WIDTH}px;
36129
-
36130
- .o-color-picker-section-name {
36131
- margin: 0px ${ITEM_BORDER_WIDTH}px;
36132
- padding: 4px ${PICKER_PADDING}px;
36133
- }
36134
- .colors-grid {
36135
- display: grid;
36136
- padding: ${LINE_VERTICAL_PADDING}px ${PICKER_PADDING}px;
36137
- grid-template-columns: repeat(${ITEMS_PER_LINE}, 1fr);
36138
- grid-gap: ${ITEM_GAP}px;
36139
- }
36140
- .o-color-picker-toggler-button {
36141
- display: flex;
36142
- .o-color-picker-toggler-sign {
36143
- display: flex;
36144
- margin: auto auto;
36145
- width: 55%;
36146
- height: 55%;
36147
- .o-icon {
36148
- width: 100%;
36149
- height: 100%;
36150
- }
36151
- }
36152
- }
36153
- .o-color-picker-line-item {
36154
- width: ${ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH}px;
36155
- height: ${ITEM_EDGE_LENGTH + 2 * ITEM_BORDER_WIDTH}px;
36156
- margin: 0px;
36157
- border-radius: 50px;
36158
- border: ${ITEM_BORDER_WIDTH}px solid #666666;
36159
- padding: 0px;
36160
- font-size: 16px;
36161
- background: white;
36162
- &:hover {
36163
- background-color: rgba(0, 0, 0, 0.08);
36164
- outline: 1px solid gray;
36165
- cursor: pointer;
36166
- }
36167
- }
36168
- .o-buttons {
36169
- padding: ${PICKER_PADDING}px;
36170
- display: flex;
36171
- .o-cancel {
36172
- border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
36173
- width: 100%;
36174
- padding: 5px;
36175
- font-size: 14px;
36176
- background: white;
36177
- border-radius: 4px;
36178
- &:hover:enabled {
36179
- background-color: rgba(0, 0, 0, 0.08);
36180
- }
36181
- }
36182
- }
36183
- .o-add-button {
36184
- border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
36185
- padding: 4px;
36186
- background: white;
36187
- border-radius: 4px;
36188
- &:hover:enabled {
36189
- background-color: rgba(0, 0, 0, 0.08);
36190
- }
36191
- }
36192
- .o-separator {
36193
- border-bottom: ${MENU_SEPARATOR_BORDER_WIDTH}px solid ${SEPARATOR_COLOR};
36194
- margin-top: ${MENU_SEPARATOR_PADDING}px;
36195
- margin-bottom: ${MENU_SEPARATOR_PADDING}px;
36196
- }
36197
-
36198
- .o-custom-selector {
36199
- padding: ${PICKER_PADDING + 2}px ${PICKER_PADDING}px;
36200
- position: relative;
36201
- .o-gradient {
36202
- margin-bottom: ${MAGNIFIER_EDGE / 2}px;
36203
- border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
36204
- width: ${INNER_GRADIENT_WIDTH + 2 * ITEM_BORDER_WIDTH}px;
36205
- height: ${INNER_GRADIENT_HEIGHT + 2 * ITEM_BORDER_WIDTH}px;
36206
- position: relative;
36207
- }
36208
-
36209
- .magnifier {
36210
- height: ${MAGNIFIER_EDGE}px;
36211
- width: ${MAGNIFIER_EDGE}px;
36212
- border-radius: 50%;
36213
- border: 2px solid #fff;
36214
- box-shadow: 0px 0px 3px #c0c0c0;
36215
- position: absolute;
36216
- z-index: 2;
36217
- }
36218
- .saturation {
36219
- background: linear-gradient(to right, #fff 0%, transparent 100%);
36220
- }
36221
- .lightness {
36222
- background: linear-gradient(to top, #000 0%, transparent 100%);
36223
- }
36224
- .o-hue-picker {
36225
- border: ${ITEM_BORDER_WIDTH}px solid #c0c0c0;
36226
- width: 100%;
36227
- height: 12px;
36228
- border-radius: 4px;
36229
- background: linear-gradient(
36230
- to right,
36231
- hsl(0 100% 50%) 0%,
36232
- hsl(0.2turn 100% 50%) 20%,
36233
- hsl(0.3turn 100% 50%) 30%,
36234
- hsl(0.4turn 100% 50%) 40%,
36235
- hsl(0.5turn 100% 50%) 50%,
36236
- hsl(0.6turn 100% 50%) 60%,
36237
- hsl(0.7turn 100% 50%) 70%,
36238
- hsl(0.8turn 100% 50%) 80%,
36239
- hsl(0.9turn 100% 50%) 90%,
36240
- hsl(1turn 100% 50%) 100%
36241
- );
36242
- position: relative;
36243
- cursor: crosshair;
36244
- }
36245
- .o-hue-slider {
36246
- margin-top: -3px;
36247
- }
36248
- .o-custom-input-preview {
36249
- padding: 2px 0px;
36250
- display: flex;
36251
- input {
36252
- width: 50%;
36253
- border-radius: 4px;
36254
- padding: 4px 23px 4px 10px;
36255
- height: 24px;
36256
- border: 1px solid #c0c0c0;
36257
- margin-right: 2px;
36258
- }
36259
- .o-wrong-color {
36260
- /* FIXME bootstrap class instead? */
36261
- outline-color: red;
36262
- border-color: red;
36263
- &:focus {
36264
- outline-style: solid;
36265
- outline-width: 1px;
36266
- }
36267
- }
36268
- }
36269
- .o-custom-input-buttons {
36270
- padding: 2px 0px;
36271
- display: flex;
36272
- justify-content: end;
36273
- }
36274
- .o-color-preview {
36275
- border: 1px solid #c0c0c0;
36276
- border-radius: 4px;
36277
- width: 50%;
36278
- }
36279
- }
36280
- }
36281
- `;
36282
35675
  class ColorPicker extends Component {
36283
35676
  static template = "o-spreadsheet-ColorPicker";
36284
35677
  static props = {
@@ -36433,21 +35826,12 @@ class Section extends Component {
36433
35826
  };
36434
35827
  }
36435
35828
 
36436
- const TRANSPARENT_BACKGROUND_SVG = /*xml*/ `
36437
- <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10">
36438
- <path fill="#d9d9d9" d="M5 5h5v5H5zH0V0h5"/>
36439
- </svg>
36440
- `;
36441
- css /* scss */ `
36442
- .o-round-color-picker-button {
36443
- width: 20px;
36444
- height: 20px;
36445
- cursor: pointer;
36446
- border: 1px solid ${GRAY_300};
36447
- background-position: 1px 1px;
36448
- background-image: url("data:image/svg+xml,${encodeURIComponent(TRANSPARENT_BACKGROUND_SVG)}");
36449
- }
36450
- `;
35829
+ // FIXME Encoding version used in css
35830
+ // const TRANSPARENT_BACKGROUND_SVG = /*xml*/ `
35831
+ // <svg xmlns="http://www.w3.org/2000/svg" width="10" height="10">
35832
+ // <path fill="#d9d9d9" d="M5 5h5v5H5zH0V0h5"/>
35833
+ // </svg>
35834
+ // `;
36451
35835
  class RoundColorPicker extends Component {
36452
35836
  static template = "o-spreadsheet.RoundColorPicker";
36453
35837
  static components = { Section, ColorPicker };
@@ -36484,12 +35868,6 @@ class RoundColorPicker extends Component {
36484
35868
  }
36485
35869
  }
36486
35870
 
36487
- css /* scss */ `
36488
- .o-dv-list-item-delete {
36489
- color: #666666;
36490
- cursor: pointer;
36491
- }
36492
- `;
36493
35871
  class ListCriterionForm extends CriterionForm {
36494
35872
  static template = "o-spreadsheet-ListCriterionForm";
36495
35873
  static components = { CriterionInput, RoundColorPicker };
@@ -37203,36 +36581,6 @@ class SelectionInputStore extends SpreadsheetStore {
37203
36581
  }
37204
36582
  }
37205
36583
 
37206
- css /* scss */ `
37207
- .o-selection {
37208
- .o-selection-input {
37209
- padding: 2px 0px;
37210
-
37211
- input.o-invalid {
37212
- background-color: ${ALERT_DANGER_BG};
37213
- }
37214
- .input-icon {
37215
- right: 7px;
37216
- top: 4px;
37217
- }
37218
- .o-drag-handle {
37219
- cursor: move;
37220
- }
37221
- }
37222
- .o-disabled-ranges {
37223
- color: #888 !important;
37224
- }
37225
- .o-button {
37226
- flex-grow: 0;
37227
- }
37228
-
37229
- /* Make the character a bit bigger
37230
- compared to its neighbor INPUT box */
37231
- .o-remove-selection {
37232
- font-size: calc(100% + 4px);
37233
- }
37234
- }
37235
- `;
37236
36584
  /**
37237
36585
  * This component can be used when the user needs to input some
37238
36586
  * ranges. He can either input the ranges with the regular DOM `<input/>`
@@ -37731,44 +37079,6 @@ class FilterMenuCriterion extends Component {
37731
37079
  }
37732
37080
  }
37733
37081
 
37734
- const CHECK_SVG = /*xml*/ `
37735
- <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'>
37736
- <path fill='none' stroke='#FFF' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/>
37737
- </svg>
37738
- `;
37739
- const CHECKBOX_WIDTH = 14;
37740
- css /* scss */ `
37741
- label.o-checkbox {
37742
- input {
37743
- appearance: none;
37744
- -webkit-appearance: none;
37745
- -moz-appearance: none;
37746
- border-radius: 0;
37747
- width: ${CHECKBOX_WIDTH}px;
37748
- height: ${CHECKBOX_WIDTH}px;
37749
- vertical-align: top;
37750
- outline: none;
37751
- border: 1px solid ${GRAY_300};
37752
- cursor: pointer;
37753
-
37754
- &:hover {
37755
- border-color: ${ACTION_COLOR};
37756
- }
37757
-
37758
- &:checked {
37759
- background: url("data:image/svg+xml,${encodeURIComponent(CHECK_SVG)}");
37760
- background-color: ${ACTION_COLOR};
37761
- border-color: ${ACTION_COLOR};
37762
- }
37763
-
37764
- &:focus {
37765
- outline: none;
37766
- box-shadow: 0 0 0 0.25rem rgba(113, 75, 103, 0.25);
37767
- border-color: ${ACTION_COLOR};
37768
- }
37769
- }
37770
- }
37771
- `;
37772
37082
  class Checkbox extends Component {
37773
37083
  static template = "o-spreadsheet.Checkbox";
37774
37084
  static props = {
@@ -37976,60 +37286,6 @@ class FilterMenuValueList extends Component {
37976
37286
  }
37977
37287
  }
37978
37288
 
37979
- css /* scss */ `
37980
- .o-filter-menu {
37981
- width: 245px;
37982
- padding: 8px 0;
37983
- user-select: none;
37984
-
37985
- .o-filter-menu-content {
37986
- padding: 0 16px;
37987
- }
37988
-
37989
- .o-sort-item {
37990
- padding-left: 34px;
37991
- }
37992
-
37993
- .o_side_panel_collapsible_title {
37994
- font-size: inherit;
37995
- padding: 0 0 4px 0 !important;
37996
- font-weight: 400 !important;
37997
-
37998
- .collapsor .o-icon {
37999
- opacity: 0.8;
38000
- }
38001
-
38002
- .collapsor-arrow {
38003
- transform-origin: 6px 8px;
38004
-
38005
- .o-icon {
38006
- width: 12px;
38007
- height: 16px;
38008
- }
38009
- }
38010
- }
38011
-
38012
- .o-filter-menu-item {
38013
- display: flex;
38014
- cursor: pointer;
38015
- user-select: none;
38016
- line-height: 1;
38017
-
38018
- &.selected,
38019
- &:hover {
38020
- background-color: ${BUTTON_ACTIVE_BG};
38021
- }
38022
- }
38023
-
38024
- .o-filter-menu-buttons {
38025
- margin-top: 9px;
38026
-
38027
- .o-button {
38028
- height: 26px;
38029
- }
38030
- }
38031
- }
38032
- `;
38033
37289
  class FilterMenu extends Component {
38034
37290
  static template = "o-spreadsheet-FilterMenu";
38035
37291
  static props = {
@@ -38153,55 +37409,6 @@ const FilterMenuPopoverBuilder = {
38153
37409
  },
38154
37410
  };
38155
37411
 
38156
- const LINK_TOOLTIP_HEIGHT = 32;
38157
- const LINK_TOOLTIP_WIDTH = 220;
38158
- css /* scss */ `
38159
- .o-link-tool {
38160
- font-size: 13px;
38161
- background-color: white;
38162
- box-shadow: 0 1px 4px 3px rgba(60, 64, 67, 0.15);
38163
- padding: 6px 12px;
38164
- border-radius: 4px;
38165
- display: flex;
38166
- justify-content: space-between;
38167
- height: ${LINK_TOOLTIP_HEIGHT}px;
38168
- width: ${LINK_TOOLTIP_WIDTH}px;
38169
-
38170
- img {
38171
- margin-right: 3px;
38172
- width: 16px;
38173
- height: 16px;
38174
- }
38175
-
38176
- a.o-link {
38177
- color: ${LINK_COLOR};
38178
- text-decoration: none;
38179
- flex-grow: 2;
38180
- white-space: nowrap;
38181
- overflow: hidden;
38182
- text-overflow: ellipsis;
38183
- }
38184
- a.o-link:hover {
38185
- text-decoration: none;
38186
- color: #001d1f;
38187
- cursor: pointer;
38188
- }
38189
- }
38190
- .o-link-icon {
38191
- float: right;
38192
- padding-left: 5px;
38193
- .o-icon {
38194
- height: 16px;
38195
- }
38196
- }
38197
- .o-link-icon .o-icon {
38198
- height: 13px;
38199
- }
38200
- .o-link-icon:hover {
38201
- cursor: pointer;
38202
- color: #000;
38203
- }
38204
- `;
38205
37412
  class LinkDisplay extends Component {
38206
37413
  static template = "o-spreadsheet-LinkDisplay";
38207
37414
  static props = {
@@ -38432,54 +37639,6 @@ linkMenuRegistry.add("sheet", {
38432
37639
  sequence: 10,
38433
37640
  });
38434
37641
 
38435
- const PADDING = 12;
38436
- const LINK_EDITOR_WIDTH = 340 + 2 * PADDING;
38437
- css /* scss */ `
38438
- .o-link-editor {
38439
- font-size: 13px;
38440
- background-color: white;
38441
- box-shadow: 0 1px 4px 3px rgba(60, 64, 67, 0.15);
38442
- padding: ${PADDING}px;
38443
- display: flex;
38444
- flex-direction: column;
38445
- border-radius: 4px;
38446
- width: ${LINK_EDITOR_WIDTH}px;
38447
-
38448
- .o-section {
38449
- .o-section-title {
38450
- font-weight: bold;
38451
- margin-bottom: 5px;
38452
- }
38453
- }
38454
- .o-buttons {
38455
- padding-left: 16px;
38456
- padding-top: 16px;
38457
- text-align: right;
38458
- }
38459
- input.o-input {
38460
- width: 100%;
38461
- padding: 0 23px 4px 0;
38462
- }
38463
- .o-link-url {
38464
- position: relative;
38465
- flex-grow: 1;
38466
- button {
38467
- position: absolute;
38468
- right: 0px;
38469
- top: 0px;
38470
- border: none;
38471
- height: 20px;
38472
- width: 20px;
38473
- background-color: #fff;
38474
- margin: 2px 3px 1px 0px;
38475
- padding: 0px 1px 0px 0px;
38476
- }
38477
- button:hover {
38478
- cursor: pointer;
38479
- }
38480
- }
38481
- }
38482
- `;
38483
37642
  class LinkEditor extends Component {
38484
37643
  static template = "o-spreadsheet-LinkEditor";
38485
37644
  static props = {
@@ -39207,29 +38366,6 @@ function buildTableStyle(name, templateName, primaryColor) {
39207
38366
  };
39208
38367
  }
39209
38368
 
39210
- css /* scss */ `
39211
- .o-spreadsheet {
39212
- .o-icon {
39213
- display: flex;
39214
- align-items: center;
39215
- justify-content: center;
39216
- width: ${ICON_EDGE_LENGTH}px;
39217
- height: ${ICON_EDGE_LENGTH}px;
39218
- font-size: ${ICON_EDGE_LENGTH}px;
39219
- vertical-align: middle;
39220
-
39221
- .small-text {
39222
- font: bold 9px sans-serif;
39223
- }
39224
- .heavy-text {
39225
- font: bold 16px sans-serif;
39226
- }
39227
- }
39228
- .fa-small {
39229
- font-size: 14px;
39230
- }
39231
- }
39232
- `;
39233
38369
  // -----------------------------------------------------------------------------
39234
38370
  // We need here the svg of the icons that we need to convert to images for the renderer
39235
38371
  // -----------------------------------------------------------------------------
@@ -39326,6 +38462,14 @@ function getCaretDownSvg(color) {
39326
38462
  paths: [{ fillColor: color.textColor || TEXT_BODY_MUTED, path: "M120 195 h270 l-135 130" }],
39327
38463
  };
39328
38464
  }
38465
+ function getCaretUpSvg(color) {
38466
+ return {
38467
+ name: "CARET_UP",
38468
+ width: 512,
38469
+ height: 512,
38470
+ paths: [{ fillColor: color.textColor || TEXT_BODY_MUTED, path: "M120 325 h270 l-135 -130" }],
38471
+ };
38472
+ }
39329
38473
  function getHoveredCaretDownSvg(color) {
39330
38474
  return {
39331
38475
  name: "CARET_DOWN",
@@ -49095,37 +48239,6 @@ function adjustIndexWithinBounds(index, position, max) {
49095
48239
  return index;
49096
48240
  }
49097
48241
 
49098
- // -----------------------------------------------------------------------------
49099
- // Autofill
49100
- // -----------------------------------------------------------------------------
49101
- css /* scss */ `
49102
- .o-autofill {
49103
- position: absolute;
49104
- height: ${AUTOFILL_EDGE_LENGTH}px;
49105
- width: ${AUTOFILL_EDGE_LENGTH}px;
49106
- border: 1px solid white;
49107
- background-color: #1a73e8;
49108
- }
49109
-
49110
- .o-autofill-handler {
49111
- position: absolute;
49112
- height: ${AUTOFILL_EDGE_LENGTH}px;
49113
- width: ${AUTOFILL_EDGE_LENGTH}px;
49114
- &:hover {
49115
- cursor: crosshair;
49116
- }
49117
- }
49118
-
49119
- .o-autofill-nextvalue {
49120
- position: absolute;
49121
- background-color: #ffffff;
49122
- border: 1px solid black;
49123
- padding: 5px;
49124
- font-size: 12px;
49125
- pointer-events: none;
49126
- white-space: nowrap;
49127
- }
49128
- `;
49129
48242
  class Autofill extends Component {
49130
48243
  static template = "o-spreadsheet-Autofill";
49131
48244
  static props = {
@@ -49210,16 +48323,6 @@ class TooltipComponent extends Component {
49210
48323
  `;
49211
48324
  }
49212
48325
 
49213
- css /* scss */ `
49214
- .o-client-tag {
49215
- position: absolute;
49216
- border-top-left-radius: 4px;
49217
- border-top-right-radius: 4px;
49218
- font-size: ${DEFAULT_FONT_SIZE};
49219
- color: white;
49220
- pointer-events: none;
49221
- }
49222
- `;
49223
48326
  class ClientTag extends Component {
49224
48327
  static template = "o-spreadsheet-ClientTag";
49225
48328
  static props = {
@@ -49769,28 +48872,6 @@ class CellComposerStore extends AbstractComposerStore {
49769
48872
 
49770
48873
  const COMPOSER_BORDER_WIDTH = 3 * 0.4 * window.devicePixelRatio || 1;
49771
48874
  const GRID_CELL_REFERENCE_TOP_OFFSET = 28;
49772
- css /* scss */ `
49773
- div.o-grid-composer {
49774
- z-index: ${ComponentsImportance.GridComposer};
49775
- position: absolute;
49776
- border: ${COMPOSER_BORDER_WIDTH}px solid ${SELECTION_BORDER_COLOR};
49777
- font-family: ${DEFAULT_FONT};
49778
-
49779
- display: flex;
49780
- align-items: center;
49781
- }
49782
-
49783
- div.o-cell-reference {
49784
- position: absolute;
49785
- z-index: ${ComponentsImportance.GridComposer};
49786
- background: ${SELECTION_BORDER_COLOR};
49787
- color: white;
49788
- font-size: 12px;
49789
- line-height: 14px;
49790
- padding: 6px 7px;
49791
- border-radius: 4px;
49792
- }
49793
- `;
49794
48875
  /**
49795
48876
  * This component is a composer which positions itself on the grid at the anchor cell.
49796
48877
  * It also applies the style of the cell to the composer input.
@@ -49916,6 +48997,7 @@ class GridComposer extends Component {
49916
48997
  return cssPropertiesToCss({
49917
48998
  left: `${left - 1}px`,
49918
48999
  top: `${top}px`,
49000
+ border: `${COMPOSER_BORDER_WIDTH}px solid ${SELECTION_BORDER_COLOR}`,
49919
49001
  "min-width": `${minWidth}px`,
49920
49002
  "min-height": `${minHeight}px`,
49921
49003
  "max-width": `${maxWidth}px`,
@@ -50186,24 +49268,6 @@ function getAxis(getters, figureUI, dnd, axisType) {
50186
49268
  return { position, axisType: axisType };
50187
49269
  }
50188
49270
 
50189
- css /*SCSS*/ `
50190
- .o-figure-snap-line {
50191
- position: relative;
50192
- z-index: ${ComponentsImportance.FigureSnapLine};
50193
- &.vertical {
50194
- width: 0px;
50195
- border-left: 1px dashed black;
50196
- }
50197
- &.horizontal {
50198
- border-top: 1px dashed black;
50199
- height: 0px;
50200
- }
50201
- }
50202
- .o-figure-container {
50203
- -webkit-user-select: none; /* safari */
50204
- user-select: none;
50205
- }
50206
- `;
50207
49271
  /**
50208
49272
  * Each figure ⭐ is positioned inside a container `div` placed and sized
50209
49273
  * according to the split pane the figure is part of, or a separate container for the figure
@@ -50432,9 +49496,16 @@ class FiguresContainer extends Component {
50432
49496
  maxX: this.env.model.getters.getColDimensions(sheetId, this.env.model.getters.getNumberCols(sheetId) - 1).end,
50433
49497
  maxY: this.env.model.getters.getRowDimensions(sheetId, this.env.model.getters.getNumberRows(sheetId) - 1).end,
50434
49498
  };
49499
+ let hasStartedDnd = false;
50435
49500
  const onMouseMove = (ev) => {
50436
49501
  const getters = this.env.model.getters;
50437
49502
  const currentMousePosition = { x: ev.clientX, y: ev.clientY };
49503
+ const offsetX = Math.abs(currentMousePosition.x - initialMousePosition.x);
49504
+ const offsetY = Math.abs(currentMousePosition.y - initialMousePosition.y);
49505
+ if (!hasStartedDnd && offsetX < DRAG_THRESHOLD && offsetY < DRAG_THRESHOLD) {
49506
+ return; // add a small threshold to avoid dnd when just clicking
49507
+ }
49508
+ hasStartedDnd = true;
50438
49509
  const draggedFigure = dragFigureForMove(currentMousePosition, initialMousePosition, initialFigure, maxDimensions, initialScrollPosition, getters.getActiveSheetScrollInfo());
50439
49510
  const otherFigures = this.getOtherFigures(initialFigure.id);
50440
49511
  const overlappingCarousel = this.getCarouselOverlappingChart(draggedFigure, otherFigures);
@@ -50628,38 +49699,6 @@ class FiguresContainer extends Component {
50628
49699
  }
50629
49700
  }
50630
49701
 
50631
- css /* scss */ `
50632
- .o-validation {
50633
- border-radius: 4px;
50634
- border-width: 0 0 0 3px;
50635
- border-style: solid;
50636
- gap: 3px;
50637
-
50638
- .o-icon {
50639
- margin-right: 5px;
50640
- height: 1.2em;
50641
- width: 1.2em;
50642
- }
50643
- }
50644
-
50645
- .o-validation-warning {
50646
- border-color: ${ALERT_WARNING_BORDER};
50647
- color: ${ALERT_WARNING_TEXT_COLOR};
50648
- background-color: ${ALERT_WARNING_BG};
50649
- }
50650
-
50651
- .o-validation-error {
50652
- border-color: ${ALERT_DANGER_BORDER};
50653
- color: ${ALERT_DANGER_TEXT_COLOR};
50654
- background-color: ${ALERT_DANGER_BG};
50655
- }
50656
-
50657
- .o-validation-info {
50658
- border-color: ${ALERT_INFO_BORDER};
50659
- color: ${ALERT_INFO_TEXT_COLOR};
50660
- background-color: ${ALERT_INFO_BG};
50661
- }
50662
- `;
50663
49702
  class ValidationMessages extends Component {
50664
49703
  static template = "o-spreadsheet-ValidationMessages";
50665
49704
  static props = {
@@ -50681,20 +49720,6 @@ class ValidationMessages extends Component {
50681
49720
  }
50682
49721
  }
50683
49722
 
50684
- css /* scss */ `
50685
- .o-grid-add-rows {
50686
- input.o-input {
50687
- width: 60px;
50688
- height: 30px;
50689
- }
50690
-
50691
- .o-validation-error {
50692
- display: inline-block !important;
50693
- margin-top: 0;
50694
- margin-left: 8px;
50695
- }
50696
- }
50697
- `;
50698
49723
  class GridAddRowsFooter extends Component {
50699
49724
  static template = "o-spreadsheet-GridAddRowsFooter";
50700
49725
  static props = {
@@ -50939,14 +49964,6 @@ class HoveredIconStore extends SpreadsheetStore {
50939
49964
  }
50940
49965
  }
50941
49966
 
50942
- const CURSOR_SVG = /*xml*/ `
50943
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="14" height="16"><path d="M6.5.4c1.3-.8 2.9-.1 3.8 1.4l2.9 5.1c.2.4.9 1.6-.4 2.3l-1.6.9 1.8 3.1c.2.4.1 1-.2 1.2l-1.6 1c-.3.1-.9 0-1.1-.4l-1.8-3.1-1.6 1c-.6.4-1.7 0-2.2-.8L0 4.3"/><path fill="#fff" d="M9.1 2a1.4 1.1 60 0 0-1.7-.6L5.5 2.5l.9 1.6-1 .6-.9-1.6-.6.4 1.8 3.1-1.3.7-1.8-3.1-1 .6 3.8 6.6 6.8-3.98M3.9 8.8 10.82 5l.795 1.4-6.81 3.96"/></svg>
50944
- `;
50945
- css /* scss */ `
50946
- .o-paint-format-cursor {
50947
- cursor: url("data:image/svg+xml,${encodeURIComponent(CURSOR_SVG)}"), auto;
50948
- }
50949
- `;
50950
49967
  function useCellHovered(env, gridRef) {
50951
49968
  const delayedHoveredCell = useStore(DelayedHoveredCellStore);
50952
49969
  const hoveredTable = useStore(HoveredTableStore);
@@ -51192,7 +50209,6 @@ class GridPopover extends Component {
51192
50209
  };
51193
50210
  static components = { Popover };
51194
50211
  cellPopovers;
51195
- zIndex = ComponentsImportance.GridPopover;
51196
50212
  setup() {
51197
50213
  this.cellPopovers = useStore(CellPopoverStore);
51198
50214
  }
@@ -51511,58 +50527,6 @@ class AbstractResizer extends Component {
51511
50527
  this.props.onOpenContextMenu(type, ev.clientX, ev.clientY);
51512
50528
  }
51513
50529
  }
51514
- css /* scss */ `
51515
- .o-col-resizer {
51516
- position: absolute;
51517
- top: 0;
51518
- left: ${HEADER_WIDTH}px;
51519
- right: ${SCROLLBAR_WIDTH}px;
51520
- height: ${HEADER_HEIGHT}px;
51521
- width: calc(100% - ${HEADER_WIDTH + SCROLLBAR_WIDTH}px);
51522
- &.o-dragging {
51523
- cursor: grabbing;
51524
- }
51525
- &.o-grab {
51526
- cursor: grab;
51527
- }
51528
- .dragging-col-line {
51529
- top: ${HEADER_HEIGHT}px;
51530
- position: absolute;
51531
- width: 2px;
51532
- height: 10000px;
51533
- background-color: black;
51534
- }
51535
- .dragging-col-shadow {
51536
- top: ${HEADER_HEIGHT}px;
51537
- position: absolute;
51538
- height: 10000px;
51539
- background-color: black;
51540
- opacity: 0.1;
51541
- }
51542
- .o-handle {
51543
- position: absolute;
51544
- height: ${HEADER_HEIGHT}px;
51545
- width: 4px;
51546
- cursor: e-resize;
51547
- background-color: ${SELECTION_BORDER_COLOR};
51548
- }
51549
- .dragging-resizer {
51550
- top: ${HEADER_HEIGHT}px;
51551
- position: absolute;
51552
- margin-left: 2px;
51553
- width: 1px;
51554
- height: 10000px;
51555
- background-color: ${SELECTION_BORDER_COLOR};
51556
- }
51557
- .o-unhide {
51558
- color: ${ICONS_COLOR};
51559
- }
51560
- .o-unhide:hover {
51561
- z-index: ${ComponentsImportance.Grid + 1};
51562
- background-color: lightgrey;
51563
- }
51564
- }
51565
- `;
51566
50530
  class ColResizer extends AbstractResizer {
51567
50531
  static props = {
51568
50532
  onOpenContextMenu: Function,
@@ -51705,57 +50669,6 @@ class ColResizer extends AbstractResizer {
51705
50669
  return this.env.model.getters.getPaneDivisions(this.sheetId).xSplit > 0;
51706
50670
  }
51707
50671
  }
51708
- css /* scss */ `
51709
- .o-row-resizer {
51710
- position: absolute;
51711
- top: ${HEADER_HEIGHT}px;
51712
- left: 0;
51713
- bottom: ${SCROLLBAR_WIDTH}px;
51714
- width: ${HEADER_WIDTH}px;
51715
- &.o-dragging {
51716
- cursor: grabbing;
51717
- }
51718
- &.o-grab {
51719
- cursor: grab;
51720
- }
51721
- .dragging-row-line {
51722
- left: ${HEADER_WIDTH}px;
51723
- position: absolute;
51724
- width: 10000px;
51725
- height: 2px;
51726
- background-color: black;
51727
- }
51728
- .dragging-row-shadow {
51729
- left: ${HEADER_WIDTH}px;
51730
- position: absolute;
51731
- width: 10000px;
51732
- background-color: black;
51733
- opacity: 0.1;
51734
- }
51735
- .o-handle {
51736
- position: absolute;
51737
- height: 4px;
51738
- width: ${HEADER_WIDTH}px;
51739
- cursor: n-resize;
51740
- background-color: ${SELECTION_BORDER_COLOR};
51741
- }
51742
- .dragging-resizer {
51743
- left: ${HEADER_WIDTH}px;
51744
- position: absolute;
51745
- margin-top: 2px;
51746
- width: 10000px;
51747
- height: 1px;
51748
- background-color: ${SELECTION_BORDER_COLOR};
51749
- }
51750
- .o-unhide {
51751
- color: ${ICONS_COLOR};
51752
- }
51753
- .o-unhide:hover {
51754
- z-index: ${ComponentsImportance.Grid + 1};
51755
- background-color: lightgrey;
51756
- }
51757
- }
51758
- `;
51759
50672
  class RowResizer extends AbstractResizer {
51760
50673
  static props = {
51761
50674
  onOpenContextMenu: Function,
@@ -51896,18 +50809,6 @@ class RowResizer extends AbstractResizer {
51896
50809
  return this.env.model.getters.getPaneDivisions(this.sheetId).ySplit > 0;
51897
50810
  }
51898
50811
  }
51899
- css /* scss */ `
51900
- .o-overlay {
51901
- .all {
51902
- position: absolute;
51903
- top: 0;
51904
- left: 0;
51905
- right: 0;
51906
- width: ${HEADER_WIDTH}px;
51907
- height: ${HEADER_HEIGHT}px;
51908
- }
51909
- }
51910
- `;
51911
50812
  class HeadersOverlay extends Component {
51912
50813
  static props = {
51913
50814
  onOpenContextMenu: Function,
@@ -52862,17 +51763,6 @@ function useWheelHandler(handler) {
52862
51763
  return onMouseWheel;
52863
51764
  }
52864
51765
 
52865
- css /* scss */ `
52866
- .o-border {
52867
- position: absolute;
52868
- &:hover {
52869
- cursor: grab;
52870
- }
52871
- }
52872
- .o-moving {
52873
- cursor: grabbing;
52874
- }
52875
- `;
52876
51766
  class Border extends Component {
52877
51767
  static template = "o-spreadsheet-Border";
52878
51768
  static props = {
@@ -52911,32 +51801,6 @@ class Border extends Component {
52911
51801
  }
52912
51802
 
52913
51803
  const MOBILE_HANDLER_WIDTH = 40;
52914
- css /* scss */ `
52915
- .o-corner {
52916
- position: absolute;
52917
- }
52918
-
52919
- .o-corner-button {
52920
- border: 1px solid white;
52921
- height: ${AUTOFILL_EDGE_LENGTH}px;
52922
- width: ${AUTOFILL_EDGE_LENGTH}px;
52923
- }
52924
- .o-corner-nw,
52925
- .o-corner-se {
52926
- &:hover {
52927
- cursor: nwse-resize;
52928
- }
52929
- }
52930
- .o-corner-ne,
52931
- .o-corner-sw {
52932
- &:hover {
52933
- cursor: nesw-resize;
52934
- }
52935
- }
52936
- .o-resizing {
52937
- cursor: grabbing;
52938
- }
52939
- `;
52940
51804
  class Corner extends Component {
52941
51805
  static template = "o-spreadsheet-Corner";
52942
51806
  static props = {
@@ -53002,11 +51866,6 @@ function orientationToDir(or) {
53002
51866
  return { dirX, dirY };
53003
51867
  }
53004
51868
 
53005
- css /*SCSS*/ `
53006
- .o-highlight {
53007
- z-index: ${ComponentsImportance.Highlight};
53008
- }
53009
- `;
53010
51869
  class Highlight extends Component {
53011
51870
  static template = "o-spreadsheet-Highlight";
53012
51871
  static props = {
@@ -53141,24 +52000,6 @@ let ScrollBar$1 = class ScrollBar {
53141
52000
  }
53142
52001
  };
53143
52002
 
53144
- css /* scss */ `
53145
- .o-scrollbar {
53146
- position: absolute;
53147
- overflow: auto;
53148
- z-index: ${ComponentsImportance.ScrollBar};
53149
- background-color: ${BACKGROUND_GRAY_COLOR};
53150
-
53151
- &.corner {
53152
- box-sizing: content-box;
53153
- right: 0px;
53154
- bottom: 0px;
53155
- height: ${SCROLLBAR_WIDTH}px;
53156
- width: ${SCROLLBAR_WIDTH}px;
53157
- border-top: 1px solid #e2e3e3;
53158
- border-left: 1px solid #e2e3e3;
53159
- }
53160
- }
53161
- `;
53162
52003
  class ScrollBar extends Component {
53163
52004
  static props = {
53164
52005
  width: { type: Number, optional: true },
@@ -53321,24 +52162,6 @@ function useAutofocus({ refName }) {
53321
52162
  }, () => [ref.el]);
53322
52163
  }
53323
52164
 
53324
- css /* scss */ `
53325
- .o-spreadsheet {
53326
- .os-input {
53327
- border-width: 0 0 1px 0;
53328
- border-color: transparent;
53329
- outline: none;
53330
- text-overflow: ellipsis;
53331
- color: ${TEXT_BODY};
53332
- }
53333
- .os-input:hover,
53334
- .os-input.o-input-border {
53335
- border-color: ${GRAY_300};
53336
- }
53337
- .os-input:focus {
53338
- border-color: ${ACTION_COLOR};
53339
- }
53340
- }
53341
- `;
53342
52165
  class TextInput extends Component {
53343
52166
  static template = "o-spreadsheet-TextInput";
53344
52167
  static props = {
@@ -53420,21 +52243,6 @@ class TextInput extends Component {
53420
52243
  }
53421
52244
  }
53422
52245
 
53423
- css /* scss */ `
53424
- .o-menu-item-button {
53425
- display: flex;
53426
- justify-content: center;
53427
- align-items: center;
53428
- margin: 2px 1px;
53429
- padding: 0px 1px;
53430
- border-radius: 2px;
53431
- min-width: 22px;
53432
- }
53433
- .o-disabled {
53434
- opacity: 0.6;
53435
- cursor: default;
53436
- }
53437
- `;
53438
52246
  class ActionButton extends Component {
53439
52247
  static template = "o-spreadsheet-ActionButton";
53440
52248
  static props = {
@@ -53487,41 +52295,6 @@ class ActionButton extends Component {
53487
52295
  }
53488
52296
  }
53489
52297
 
53490
- css /* scss */ `
53491
- .o-color-picker-widget {
53492
- display: flex;
53493
- position: relative;
53494
- align-items: center;
53495
- height: 30px;
53496
-
53497
- .o-color-picker-button-style {
53498
- display: flex;
53499
- justify-content: center;
53500
- align-items: center;
53501
- margin: 2px;
53502
- padding: 3px;
53503
- border-radius: 2px;
53504
- cursor: pointer;
53505
- &:not([disabled]):hover {
53506
- background-color: rgba(0, 0, 0, 0.08);
53507
- }
53508
- }
53509
-
53510
- .o-color-picker-button {
53511
- > span {
53512
- border-bottom: 4px solid;
53513
- height: 20px;
53514
- margin-top: 2px;
53515
- display: block;
53516
- }
53517
-
53518
- &[disabled] {
53519
- pointer-events: none;
53520
- opacity: 0.3;
53521
- }
53522
- }
53523
- }
53524
- `;
53525
52298
  class ColorPickerWidget extends Component {
53526
52299
  static template = "o-spreadsheet-ColorPickerWidget";
53527
52300
  static props = {
@@ -53554,26 +52327,6 @@ class ColorPickerWidget extends Component {
53554
52327
  }
53555
52328
  }
53556
52329
 
53557
- css /* scss */ `
53558
- .o-font-size-editor {
53559
- width: max-content !important;
53560
- height: calc(100% - 4px);
53561
- input.o-font-size {
53562
- outline: none;
53563
- height: 20px;
53564
- width: 31px;
53565
- text-align: center;
53566
- }
53567
- }
53568
- .o-text-options > div {
53569
- cursor: pointer;
53570
- line-height: 26px;
53571
- padding: 3px 12px;
53572
- &:hover {
53573
- background-color: rgba(0, 0, 0, 0.08);
53574
- }
53575
- }
53576
- `;
53577
52330
  class FontSizeEditor extends Component {
53578
52331
  static template = "o-spreadsheet-FontSizeEditor";
53579
52332
  static props = {
@@ -53649,41 +52402,6 @@ class FontSizeEditor extends Component {
53649
52402
  }
53650
52403
  }
53651
52404
 
53652
- css /* scss */ `
53653
- .o-chart-title-designer {
53654
- .o-hoverable-button {
53655
- height: 30px;
53656
- }
53657
- .o-dropdown-content .o-hoverable-button {
53658
- height: fit-content;
53659
- }
53660
-
53661
- .o-divider {
53662
- border-right: 1px solid ${GRAY_300};
53663
- margin: 0px 4px;
53664
- height: 14px;
53665
- }
53666
-
53667
- .o-menu-item-button.active {
53668
- background-color: #e6f4ea;
53669
- color: #188038;
53670
- }
53671
-
53672
- .o-dropdown-content {
53673
- overflow-y: auto;
53674
- overflow-x: hidden;
53675
- padding: 2px;
53676
- z-index: 100;
53677
- box-shadow: 1px 2px 5px 2px rgba(51, 51, 51, 0.15);
53678
-
53679
- .o-dropdown-line {
53680
- > span {
53681
- padding: 4px;
53682
- }
53683
- }
53684
- }
53685
- }
53686
- `;
53687
52405
  class TextStyler extends Component {
53688
52406
  static template = "o-spreadsheet.TextStyler";
53689
52407
  static components = { ColorPickerWidget, ActionButton, FontSizeEditor };
@@ -54511,27 +53229,6 @@ class BarConfigPanel extends GenericChartConfigPanel {
54511
53229
  }
54512
53230
  }
54513
53231
 
54514
- css /* scss */ `
54515
- .o-badge-selection {
54516
- gap: 1px;
54517
- button.o-button {
54518
- border-radius: 0;
54519
- &.selected {
54520
- color: ${GRAY_900};
54521
- border-color: ${ACTION_COLOR};
54522
- background: ${BADGE_SELECTED_COLOR};
54523
- font-weight: 600;
54524
- }
54525
-
54526
- &:first-child {
54527
- border-radius: 4px 0 0 4px;
54528
- }
54529
- &:last-child {
54530
- border-radius: 0 4px 4px 0;
54531
- }
54532
- }
54533
- }
54534
- `;
54535
53232
  class BadgeSelection extends Component {
54536
53233
  static template = "o-spreadsheet.BadgeSelection";
54537
53234
  static props = {
@@ -54541,13 +53238,6 @@ class BadgeSelection extends Component {
54541
53238
  };
54542
53239
  }
54543
53240
 
54544
- css /* scss */ `
54545
- .o-chart-title-designer {
54546
- > span {
54547
- height: 30px;
54548
- }
54549
- }
54550
- `;
54551
53241
  class ChartTitle extends Component {
54552
53242
  static template = "o-spreadsheet.ChartTitle";
54553
53243
  static components = { Section, TextStyler };
@@ -54609,31 +53299,12 @@ class AxisDesignEditor extends Component {
54609
53299
  }
54610
53300
  }
54611
53301
 
54612
- const CIRCLE_SVG = /*xml*/ `
54613
- <svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'>
54614
- <circle r="2" fill="#FFF"/>
54615
- </svg>
54616
- `;
54617
- css /* scss */ `
54618
- .o-radio {
54619
- input {
54620
- appearance: none;
54621
- -webkit-appearance: none;
54622
- -moz-appearance: none;
54623
- width: 14px;
54624
- height: 14px;
54625
- border: 1px solid ${GRAY_300};
54626
- outline: none;
54627
- border-radius: 8px;
54628
-
54629
- &:checked {
54630
- background: url("data:image/svg+xml,${encodeURIComponent(CIRCLE_SVG)}");
54631
- background-color: ${ACTION_COLOR};
54632
- border-color: ${ACTION_COLOR};
54633
- }
54634
- }
54635
- }
54636
- `;
53302
+ // FIXME Encoding version used in css
53303
+ // const CIRCLE_SVG = /*xml*/ `
53304
+ // <svg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'>
53305
+ // <circle r="2" fill="#FFF"/>
53306
+ // </svg>
53307
+ // `;
54637
53308
  class RadioSelection extends Component {
54638
53309
  static template = "o-spreadsheet.RadioSelection";
54639
53310
  static props = {
@@ -55130,45 +53801,6 @@ class GaugeChartConfigPanel extends Component {
55130
53801
  }
55131
53802
  }
55132
53803
 
55133
- css /* scss */ `
55134
- .o-gauge-color-set {
55135
- table {
55136
- table-layout: fixed;
55137
- margin-top: 2%;
55138
- display: table;
55139
- text-align: left;
55140
- font-size: 12px;
55141
- line-height: 18px;
55142
- width: 100%;
55143
- font-size: 12px;
55144
- }
55145
-
55146
- td {
55147
- height: 30px;
55148
- padding: 6px 0;
55149
- }
55150
- th.o-gauge-color-set-colorPicker {
55151
- width: 8%;
55152
- }
55153
- th.o-gauge-color-set-text {
55154
- width: 25%;
55155
- }
55156
- th.o-gauge-color-set-operator {
55157
- width: 10%;
55158
- }
55159
- th.o-gauge-color-set-value {
55160
- width: 22%;
55161
- }
55162
- th.o-gauge-color-set-type {
55163
- width: 30%;
55164
- }
55165
- input,
55166
- select {
55167
- width: 100%;
55168
- height: 100%;
55169
- }
55170
- }
55171
- `;
55172
53804
  class GaugeChartDesignPanel extends Component {
55173
53805
  static template = "o-spreadsheet-GaugeChartDesignPanel";
55174
53806
  static components = {
@@ -55634,7 +54266,7 @@ class ScorecardChartDesignPanel extends Component {
55634
54266
  return SCORECARD_CHART_TITLE_FONT_SIZE;
55635
54267
  }
55636
54268
  translate(term) {
55637
- return _t(term);
54269
+ return this.env.model.getters.dynamicTranslate(term);
55638
54270
  }
55639
54271
  setColor(color, colorPickerId) {
55640
54272
  switch (colorPickerId) {
@@ -55974,40 +54606,6 @@ chartSidePanelComponentRegistry
55974
54606
  design: TreeMapChartDesignPanel,
55975
54607
  });
55976
54608
 
55977
- css /* scss */ `
55978
- .o-section .o-input.o-type-selector {
55979
- height: 30px;
55980
- padding-left: 35px;
55981
- padding-top: 5px;
55982
- }
55983
- .o-type-selector-preview {
55984
- left: 5px;
55985
- top: 3px;
55986
- .o-chart-preview {
55987
- width: 24px;
55988
- height: 24px;
55989
- }
55990
- }
55991
-
55992
- .o-popover .o-chart-select-popover {
55993
- background: #fff;
55994
- .o-chart-type-item {
55995
- cursor: pointer;
55996
- padding: 3px 6px;
55997
- margin: 1px 2px;
55998
- &.selected,
55999
- &:hover {
56000
- border: 1px solid ${ACTION_COLOR};
56001
- background: ${BADGE_SELECTED_COLOR};
56002
- padding: 2px 5px;
56003
- }
56004
- .o-chart-preview {
56005
- width: 48px;
56006
- height: 48px;
56007
- }
56008
- }
56009
- }
56010
- `;
56011
54609
  class ChartTypePicker extends Component {
56012
54610
  static template = "o-spreadsheet-ChartTypePicker";
56013
54611
  static components = { Section, Popover };
@@ -56110,38 +54708,6 @@ class MainChartPanelStore extends SpreadsheetStore {
56110
54708
  }
56111
54709
  }
56112
54710
 
56113
- css /* scss */ `
56114
- .o-chart {
56115
- .o-panel {
56116
- display: flex;
56117
- .o-panel-element {
56118
- flex: 1 0 auto;
56119
- padding: 8px 0px;
56120
- text-align: center;
56121
- cursor: pointer;
56122
- border-right: 1px solid ${GRAY_300};
56123
-
56124
- &.inactive {
56125
- color: ${TEXT_BODY};
56126
- background-color: ${GRAY_100};
56127
- border-bottom: 1px solid ${GRAY_300};
56128
- }
56129
-
56130
- &:not(.inactive) {
56131
- color: ${TEXT_HEADING};
56132
- border-bottom: 1px solid #fff;
56133
- }
56134
-
56135
- .fa {
56136
- margin-right: 4px;
56137
- }
56138
- }
56139
- .o-panel-element:last-child {
56140
- border-right: none;
56141
- }
56142
- }
56143
- }
56144
- `;
56145
54711
  class ChartPanel extends Component {
56146
54712
  static template = "o-spreadsheet-ChartPanel";
56147
54713
  static components = { Section, ChartTypePicker };
@@ -56230,26 +54796,6 @@ class ChartPanel extends Component {
56230
54796
  }
56231
54797
  }
56232
54798
 
56233
- css /* scss */ `
56234
- .o-icon-picker {
56235
- position: absolute;
56236
- z-index: ${ComponentsImportance.IconPicker};
56237
- box-shadow: 1px 2px 5px 2px rgba(51, 51, 51, 0.15);
56238
- background-color: white;
56239
- padding: 2px 1px;
56240
- }
56241
- .o-cf-icon-line {
56242
- display: flex;
56243
- padding: 0 6px;
56244
- }
56245
- .o-icon-picker-item {
56246
- cursor: pointer;
56247
- &:hover {
56248
- background-color: ${BADGE_SELECTED_COLOR};
56249
- outline: ${ACTION_COLOR} solid 1px;
56250
- }
56251
- }
56252
- `;
56253
54799
  class IconPicker extends Component {
56254
54800
  static template = "o-spreadsheet-IconPicker";
56255
54801
  static props = {
@@ -56287,77 +54833,6 @@ function useHighlights(highlightProvider) {
56287
54833
  }, () => [highlightProvider.highlights]);
56288
54834
  }
56289
54835
 
56290
- css /* scss */ `
56291
- .o-cf-preview {
56292
- &.o-cf-cursor-ptr {
56293
- cursor: pointer;
56294
- }
56295
-
56296
- border-bottom: 1px solid ${GRAY_300};
56297
- height: 80px;
56298
- padding: 10px;
56299
- position: relative;
56300
- cursor: pointer;
56301
- &:hover,
56302
- &.o-cf-dragging {
56303
- background-color: ${GRAY_200};
56304
- }
56305
-
56306
- &:not(:hover) .o-cf-delete-button {
56307
- display: none;
56308
- }
56309
- .o-cf-preview-icon {
56310
- border: 1px solid ${GRAY_300};
56311
- background-color: #fff;
56312
- position: absolute;
56313
- height: 50px;
56314
- width: 50px;
56315
- .o-icon {
56316
- width: ${CF_ICON_EDGE_LENGTH}px;
56317
- height: ${CF_ICON_EDGE_LENGTH}px;
56318
- }
56319
- }
56320
- .o-cf-preview-description {
56321
- left: 65px;
56322
- margin-bottom: auto;
56323
- margin-right: 8px;
56324
- margin-top: auto;
56325
- position: relative;
56326
- width: 142px;
56327
- .o-cf-preview-description-rule {
56328
- margin-bottom: 4px;
56329
- max-height: 2.8em;
56330
- line-height: 1.4em;
56331
- }
56332
- .o-cf-preview-range {
56333
- font-size: 12px;
56334
- }
56335
- }
56336
- .o-cf-delete {
56337
- left: 90%;
56338
- top: 39%;
56339
- position: absolute;
56340
- }
56341
- &:not(:hover):not(.o-cf-dragging) .o-cf-drag-handle {
56342
- display: none !important;
56343
- }
56344
- .o-cf-drag-handle {
56345
- left: -8px;
56346
- cursor: move;
56347
- .o-icon {
56348
- width: 6px;
56349
- height: 30px;
56350
- }
56351
- }
56352
-
56353
- .o-icon.arrow-down {
56354
- color: #e06666;
56355
- }
56356
- .o-icon.arrow-up {
56357
- color: #6aa84f;
56358
- }
56359
- }
56360
- `;
56361
54836
  class ConditionalFormatPreview extends Component {
56362
54837
  static template = "o-spreadsheet-ConditionalFormatPreview";
56363
54838
  icons = ICONS;
@@ -56476,95 +54951,6 @@ class ConditionalFormatPreviewList extends Component {
56476
54951
  }
56477
54952
  }
56478
54953
 
56479
- css /* scss */ `
56480
- .o-cf-ruleEditor {
56481
- .o-cf-preview-display {
56482
- border: 1px solid ${GRAY_300};
56483
- padding: 10px;
56484
- }
56485
-
56486
- .o-cf-cell-is-rule {
56487
- .o-divider {
56488
- border-right: 1px solid ${GRAY_300};
56489
- margin: 4px 6px;
56490
- }
56491
- }
56492
- .o-cf-color-scale-editor {
56493
- .o-threshold {
56494
- .o-select-with-input {
56495
- max-width: 150px;
56496
- }
56497
- .o-threshold-value {
56498
- flex-grow: 1;
56499
- flex-basis: 60%;
56500
- min-width: 0px; /* input overflows in Firefox otherwise */
56501
- }
56502
- .o-threshold-value input:disabled {
56503
- background-color: #edebed;
56504
- }
56505
- }
56506
- }
56507
- .o-cf-iconset-rule {
56508
- .o-cf-clickable-icon {
56509
- border: 1px solid ${GRAY_200};
56510
- border-radius: 4px;
56511
- cursor: pointer;
56512
- &:hover {
56513
- border-color: ${ACTION_COLOR};
56514
- background-color: ${BADGE_SELECTED_COLOR};
56515
- }
56516
- .o-icon {
56517
- width: ${CF_ICON_EDGE_LENGTH}px;
56518
- height: ${CF_ICON_EDGE_LENGTH}px;
56519
- }
56520
- }
56521
- .o-cf-iconsets {
56522
- gap: 11px;
56523
- .o-cf-iconset {
56524
- padding: 7px 8px;
56525
- width: 95px;
56526
- .o-icon {
56527
- margin: 0 3px;
56528
- }
56529
- svg {
56530
- vertical-align: baseline;
56531
- }
56532
- }
56533
- }
56534
- .o-inflection {
56535
- .o-cf-icon-button {
56536
- padding: 4px 10px;
56537
- }
56538
- table {
56539
- font-size: 13px;
56540
- td {
56541
- padding: 6px 0;
56542
- }
56543
-
56544
- th.o-cf-iconset-icons {
56545
- width: 25px;
56546
- }
56547
- th.o-cf-iconset-text {
56548
- width: 82px;
56549
- }
56550
- th.o-cf-iconset-operator {
56551
- width: 20px;
56552
- }
56553
- .o-cf-iconset-type {
56554
- min-width: 80px;
56555
- }
56556
- }
56557
- }
56558
- }
56559
-
56560
- .o-icon.arrow-down {
56561
- color: #e06666;
56562
- }
56563
- .o-icon.arrow-up {
56564
- color: #6aa84f;
56565
- }
56566
- }
56567
- `;
56568
54954
  class ConditionalFormattingEditor extends Component {
56569
54955
  static template = "o-spreadsheet-ConditionalFormattingEditor";
56570
54956
  static props = {
@@ -57094,25 +55480,6 @@ class ConditionalFormattingPanel extends Component {
57094
55480
  */
57095
55481
  const currenciesRegistry = new Registry();
57096
55482
 
57097
- css /* scss */ `
57098
- .o-custom-currency {
57099
- .o-format-proposals {
57100
- color: black;
57101
- }
57102
-
57103
- .o-format-examples {
57104
- background: #f9fafb;
57105
- padding: 8px;
57106
- border-radius: 4px;
57107
- border: 1px solid #d8dadd;
57108
- color: #374151;
57109
- }
57110
-
57111
- table {
57112
- table-layout: fixed;
57113
- }
57114
- }
57115
- `;
57116
55483
  class CustomCurrencyPanel extends Component {
57117
55484
  static template = "o-spreadsheet-CustomCurrencyPanel";
57118
55485
  static components = { Section, Checkbox };
@@ -57186,7 +55553,7 @@ class CustomCurrencyPanel extends Component {
57186
55553
  });
57187
55554
  }
57188
55555
  const emptyCurrency = {
57189
- name: _t(CustomCurrencyTerms.Custom),
55556
+ name: CustomCurrencyTerms.Custom,
57190
55557
  code: "",
57191
55558
  symbol: "",
57192
55559
  decimalPlaces: 2,
@@ -57345,31 +55712,6 @@ class DataValidationEditor extends Component {
57345
55712
  }
57346
55713
  }
57347
55714
 
57348
- css /* scss */ `
57349
- .o-sidePanel {
57350
- .o-dv-preview {
57351
- height: 70px;
57352
- cursor: pointer;
57353
- border-bottom: 1px solid ${FIGURE_BORDER_COLOR};
57354
-
57355
- .o-dv-container {
57356
- min-width: 0; /* otherwise flex won't shrink correctly */
57357
- }
57358
-
57359
- .o-dv-preview-description {
57360
- font-size: 13px;
57361
- }
57362
-
57363
- &:hover {
57364
- background-color: rgba(0, 0, 0, 0.08);
57365
- }
57366
-
57367
- &:not(:hover) .o-dv-preview-delete {
57368
- display: none !important;
57369
- }
57370
- }
57371
- }
57372
- `;
57373
55715
  class DataValidationPreview extends Component {
57374
55716
  static template = "o-spreadsheet-DataValidationPreview";
57375
55717
  static props = {
@@ -57818,38 +56160,6 @@ class FindAndReplaceStore extends SpreadsheetStore {
57818
56160
  }
57819
56161
  }
57820
56162
 
57821
- css /* scss */ `
57822
- .o-find-and-replace {
57823
- outline: none;
57824
- height: 100%;
57825
- .o-input-search-container {
57826
- display: flex;
57827
- .o-input-with-count {
57828
- flex-grow: 1;
57829
- width: auto;
57830
- }
57831
- .o-input-without-count {
57832
- width: 100%;
57833
- }
57834
- .o-input-count {
57835
- width: fit-content;
57836
- padding: 4px 0 4px 4px;
57837
- white-space: nowrap;
57838
- }
57839
- }
57840
-
57841
- .o-result-buttons {
57842
- .o-button {
57843
- height: 19px;
57844
- width: 19px;
57845
- .o-icon {
57846
- height: 14px;
57847
- width: 14px;
57848
- }
57849
- }
57850
- }
57851
- }
57852
- `;
57853
56163
  class FindAndReplacePanel extends Component {
57854
56164
  static template = "o-spreadsheet-FindAndReplacePanel";
57855
56165
  static components = { SelectionInput, Section, Checkbox, ValidationMessages };
@@ -57960,22 +56270,6 @@ class FindAndReplacePanel extends Component {
57960
56270
  }
57961
56271
  }
57962
56272
 
57963
- css /* scss */ `
57964
- .o-more-formats-panel {
57965
- .format-preview {
57966
- height: 49px;
57967
- background-color: white;
57968
- cursor: pointer;
57969
-
57970
- &:hover {
57971
- background-color: rgba(0, 0, 0, 0.08);
57972
- }
57973
- }
57974
- .check-icon {
57975
- width: 24px;
57976
- }
57977
- }
57978
- `;
57979
56273
  const DATE_FORMAT_ACTIONS = createActions([
57980
56274
  formatNumberFullDateTime,
57981
56275
  formatNumberISODate,
@@ -58133,21 +56427,6 @@ class PivotMeasureDisplayPanelStore extends SpreadsheetStore {
58133
56427
  }
58134
56428
  }
58135
56429
 
58136
- css /* scss */ `
58137
- .o-sidePanel {
58138
- .o-pivot-measure-display-field,
58139
- .o-pivot-measure-display-value {
58140
- border: solid 1px ${GRAY_300};
58141
- border-radius: 3px;
58142
- }
58143
-
58144
- .o-pivot-measure-display-description {
58145
- white-space: pre-wrap;
58146
- color: dimgray;
58147
- border-left: 2px solid ${GRAY_300};
58148
- }
58149
- }
58150
- `;
58151
56430
  class PivotMeasureDisplayPanel extends Component {
58152
56431
  static template = "o-spreadsheet-PivotMeasureDisplayPanel";
58153
56432
  static props = {
@@ -58206,11 +56485,6 @@ function getVisiblePivotCellPositions(getters, pivotId) {
58206
56485
  return positions;
58207
56486
  }
58208
56487
 
58209
- css /* scss */ `
58210
- .pivot-defer-update {
58211
- min-height: 40px;
58212
- }
58213
- `;
58214
56488
  class PivotDeferUpdate extends Component {
58215
56489
  static template = "o-spreadsheet-PivotDeferUpdate";
58216
56490
  static props = {
@@ -58299,25 +56573,6 @@ function getHtmlContentFromPattern(pattern, value, highlightColor, className) {
58299
56573
  return pendingHtmlContent.filter((content) => content.value);
58300
56574
  }
58301
56575
 
58302
- css /* scss */ `
58303
- input.pivot-dimension-search-field:focus {
58304
- outline: none;
58305
- }
58306
- .pivot-dimension-search-field-icon svg {
58307
- width: 13px;
58308
- height: 13px;
58309
- }
58310
- .pivot-dimension-search {
58311
- background-color: white;
58312
- }
58313
- .add-dimension.o-button {
58314
- padding: 2px 7px;
58315
- font-weight: 400;
58316
- font-size: 12px;
58317
- flex-grow: 0;
58318
- height: inherit;
58319
- }
58320
- `;
58321
56576
  class AddDimensionButton extends Component {
58322
56577
  static template = "o-spreadsheet-AddDimensionButton";
58323
56578
  static components = { Popover, TextValueProvider };
@@ -58411,35 +56666,6 @@ class AddDimensionButton extends Component {
58411
56666
  }
58412
56667
  }
58413
56668
 
58414
- // don't use bg-white since it's flipped to dark in dark mode and we don't support dark mode
58415
- css /* scss */ `
58416
- .pivot-dimension {
58417
- background-color: white;
58418
- border: 1px solid ${GRAY_300};
58419
- border-radius: 4px;
58420
-
58421
- select.o-input {
58422
- height: inherit;
58423
- }
58424
-
58425
- select > option {
58426
- background-color: white;
58427
- }
58428
-
58429
- .pivot-dim-operator-label {
58430
- min-width: 120px;
58431
- }
58432
-
58433
- &.pivot-dimension-invalid {
58434
- background-color: #ffdddd;
58435
- border-color: red !important;
58436
- select,
58437
- input {
58438
- background-color: #ffdddd;
58439
- }
58440
- }
58441
- }
58442
- `;
58443
56669
  class PivotDimension extends Component {
58444
56670
  static template = "o-spreadsheet-PivotDimension";
58445
56671
  static props = {
@@ -58591,19 +56817,6 @@ class PivotMeasureEditor extends Component {
58591
56817
  }
58592
56818
  }
58593
56819
 
58594
- css /* scss */ `
58595
- .o-pivot-sort {
58596
- .o-sort-card {
58597
- width: fit-content;
58598
- background-color: ${GRAY_100};
58599
- border: 1px solid ${GRAY_300};
58600
-
58601
- .o-sort-value {
58602
- color: ${PRIMARY_BUTTON_BG};
58603
- }
58604
- }
58605
- }
58606
- `;
58607
56820
  class PivotSortSection extends Component {
58608
56821
  static template = "o-spreadsheet-PivotSortSection";
58609
56822
  static components = {
@@ -58649,11 +56862,6 @@ class PivotSortSection extends Component {
58649
56862
  }
58650
56863
  }
58651
56864
 
58652
- css /* scss */ `
58653
- .add-calculated-measure {
58654
- cursor: pointer;
58655
- }
58656
- `;
58657
56865
  class PivotLayoutConfigurator extends Component {
58658
56866
  static template = "o-spreadsheet-PivotLayoutConfigurator";
58659
56867
  static components = {
@@ -58846,12 +57054,13 @@ class PivotLayoutConfigurator extends Component {
58846
57054
  addCalculatedMeasure() {
58847
57055
  const { measures } = this.props.definition;
58848
57056
  const measureName = this.env.model.getters.generateNewCalculatedMeasureName(measures);
57057
+ const aggregator = "sum";
58849
57058
  this.props.onDimensionsUpdated({
58850
57059
  measures: measures.concat([
58851
57060
  {
58852
- id: this.getMeasureId(measureName),
57061
+ id: this.getMeasureId(measureName, aggregator),
58853
57062
  fieldName: measureName,
58854
- aggregator: "sum",
57063
+ aggregator,
58855
57064
  computedBy: {
58856
57065
  sheetId: this.env.model.getters.getActiveSheetId(),
58857
57066
  formula: "=0",
@@ -59467,11 +57676,6 @@ class PivotSidePanel extends Component {
59467
57676
  }
59468
57677
  }
59469
57678
 
59470
- css /* scss */ `
59471
- .o-checkbox-selection {
59472
- max-height: 300px;
59473
- }
59474
- `;
59475
57679
  class RemoveDuplicatesPanel extends Component {
59476
57680
  static template = "o-spreadsheet-RemoveDuplicatesPanel";
59477
57681
  static components = { ValidationMessages, Section, Checkbox };
@@ -59558,12 +57762,6 @@ class RemoveDuplicatesPanel extends Component {
59558
57762
  }
59559
57763
  }
59560
57764
 
59561
- css /* scss */ `
59562
- .o-locale-preview {
59563
- border: 1px solid ${GRAY_300};
59564
- background-color: ${GRAY_100};
59565
- }
59566
- `;
59567
57765
  class SettingsPanel extends Component {
59568
57766
  static template = "o-spreadsheet-SettingsPanel";
59569
57767
  static components = { Section, ValidationMessages, BadgeSelection };
@@ -59837,34 +58035,6 @@ function drawTexts(ctx, tableStyle, colWidth, rowHeight) {
59837
58035
  ctx.restore();
59838
58036
  }
59839
58037
 
59840
- css /* scss */ `
59841
- .o-table-style-list-item {
59842
- border: 1px solid transparent;
59843
- border-radius: 4px;
59844
- &.selected {
59845
- border: 1px solid ${ACTION_COLOR};
59846
- background: ${BADGE_SELECTED_COLOR};
59847
- }
59848
-
59849
- &:hover {
59850
- background: #ddd;
59851
- .o-table-style-edit-button {
59852
- display: block !important;
59853
- right: 0;
59854
- top: 0;
59855
- background: #fff;
59856
- cursor: pointer;
59857
- border: 1px solid #ddd;
59858
- padding: 1px 1px 1px 2px;
59859
- .o-icon {
59860
- font-size: 12px;
59861
- width: 12px;
59862
- height: 12px;
59863
- }
59864
- }
59865
- }
59866
- }
59867
- `;
59868
58038
  class TableStylePreview extends Component {
59869
58039
  static template = "o-spreadsheet-TableStylePreview";
59870
58040
  static components = { MenuPopover };
@@ -59925,52 +58095,6 @@ class TableStylePreview extends Component {
59925
58095
  }
59926
58096
  }
59927
58097
 
59928
- css /* scss */ `
59929
- .o-table-style-popover {
59930
- /* 7 tables preview + padding by line */
59931
- width: calc((66px + 4px * 2) * 7 + 1.5rem * 2);
59932
- background: #fff;
59933
- font-size: 14px;
59934
- user-select: none;
59935
-
59936
- .o-notebook {
59937
- border-bottom: 1px solid ${GRAY_300};
59938
-
59939
- .o-notebook-tab {
59940
- padding: 5px 15px;
59941
- border: 1px solid ${GRAY_300};
59942
- margin-bottom: -1px;
59943
- margin-left: -1px;
59944
- color: ${TEXT_BODY};
59945
- cursor: pointer;
59946
- transition: color 0.2s, border-color 0.2s;
59947
-
59948
- &.selected {
59949
- border-bottom-color: #fff;
59950
- border-top-color: ${PRIMARY_BUTTON_BG};
59951
- color: ${TEXT_HEADING};
59952
- }
59953
- }
59954
- }
59955
-
59956
- .o-table-style-list-item {
59957
- padding: 3px;
59958
- }
59959
-
59960
- .o-table-style-popover-preview {
59961
- width: 66px;
59962
- height: 51px;
59963
- }
59964
-
59965
- .o-new-table-style {
59966
- font-size: 36px;
59967
- color: #666;
59968
- &:hover {
59969
- background: #f5f5f5;
59970
- }
59971
- }
59972
- }
59973
- `;
59974
58098
  class TableStylesPopover extends Component {
59975
58099
  static template = "o-spreadsheet-TableStylesPopover";
59976
58100
  static components = { Popover, TableStylePreview };
@@ -60010,31 +58134,6 @@ class TableStylesPopover extends Component {
60010
58134
  }
60011
58135
  }
60012
58136
 
60013
- css /* scss */ `
60014
- .o-table-style-picker {
60015
- border: 1px solid ${GRAY_300};
60016
- border-radius: 3px;
60017
-
60018
- .o-table-style-picker-arrow {
60019
- border-left: 1px solid ${GRAY_300};
60020
-
60021
- &:hover {
60022
- background: #f5f5f5;
60023
- cursor: pointer;
60024
- }
60025
- }
60026
-
60027
- .o-table-style-list-item {
60028
- padding: 5px 6px;
60029
- margin: 5px 2px;
60030
-
60031
- .o-table-style-picker-preview {
60032
- width: 51px;
60033
- height: 36px;
60034
- }
60035
- }
60036
- }
60037
- `;
60038
58137
  class TableStylePicker extends Component {
60039
58138
  static template = "o-spreadsheet-TableStylePicker";
60040
58139
  static components = { TableStylesPopover, TableStylePreview };
@@ -60078,19 +58177,6 @@ class TableStylePicker extends Component {
60078
58177
  }
60079
58178
  }
60080
58179
 
60081
- css /* scss */ `
60082
- .o-table-panel {
60083
- input.o-table-n-of-headers {
60084
- width: 14px;
60085
- text-align: center;
60086
- }
60087
-
60088
- .o-info-icon {
60089
- width: 14px;
60090
- height: 14px;
60091
- }
60092
- }
60093
- `;
60094
58180
  class TablePanel extends Component {
60095
58181
  static template = "o-spreadsheet-TablePanel";
60096
58182
  static components = { TableStylePicker, SelectionInput, ValidationMessages, Checkbox, Section };
@@ -60242,19 +58328,6 @@ class TablePanel extends Component {
60242
58328
  }
60243
58329
  }
60244
58330
 
60245
- css /* scss */ `
60246
- .o-table-style-editor-panel {
60247
- .o-table-style-list-item {
60248
- margin: 2px 7px;
60249
- padding: 6px 9px;
60250
-
60251
- .o-table-style-edit-template-preview {
60252
- width: 71px;
60253
- height: 51px;
60254
- }
60255
- }
60256
- }
60257
- `;
60258
58331
  const DEFAULT_TABLE_STYLE_COLOR = "#3C78D8";
60259
58332
  class TableStyleEditorPanel extends Component {
60260
58333
  static template = "o-spreadsheet-TableStyleEditorPanel";
@@ -60689,15 +58762,6 @@ class SidePanelStore extends SpreadsheetStore {
60689
58762
 
60690
58763
  const SIZE = 3;
60691
58764
  const COLOR = "#777";
60692
- css /* scss */ `
60693
- .o-table-resizer {
60694
- width: ${SIZE * 2}px;
60695
- height: ${SIZE * 2}px;
60696
- border-bottom: ${SIZE}px solid ${COLOR};
60697
- border-right: ${SIZE}px solid ${COLOR};
60698
- cursor: nwse-resize;
60699
- }
60700
- `;
60701
58765
  class TableResizer extends Component {
60702
58766
  static template = "o-spreadsheet-TableResizer";
60703
58767
  static props = { table: Object };
@@ -61443,14 +59507,16 @@ class ClickableCellSortIcon extends Component {
61443
59507
  "background-color": this.getBackgroundColor(cellStyle),
61444
59508
  });
61445
59509
  }
61446
- get icon() {
61447
- switch (this.props.sortDirection) {
61448
- case "asc":
61449
- return "fa-sort-asc";
61450
- case "desc":
61451
- return "fa-sort-desc";
59510
+ get verticalJustifyClass() {
59511
+ const cellStyle = this.env.model.getters.getCellComputedStyle(this.props.position);
59512
+ switch (cellStyle.verticalAlign) {
59513
+ case "top":
59514
+ return "justify-content-start";
59515
+ case "middle":
59516
+ return "justify-content-center";
59517
+ case "bottom":
61452
59518
  default:
61453
- return "fa-sort";
59519
+ return "justify-content-end";
61454
59520
  }
61455
59521
  }
61456
59522
  getBackgroundColor(cellStyle) {
@@ -61512,43 +59578,6 @@ class FullScreenChart extends Component {
61512
59578
  }
61513
59579
  }
61514
59580
 
61515
- css /* scss */ `
61516
- .o_pivot_html_renderer {
61517
- width: 100%;
61518
- border-collapse: collapse;
61519
-
61520
- &:hover {
61521
- cursor: pointer;
61522
- }
61523
-
61524
- td,
61525
- th {
61526
- border: 1px solid #dee2e6;
61527
- background-color: #fff;
61528
- padding: 0.3rem;
61529
- white-space: nowrap;
61530
-
61531
- &:hover {
61532
- filter: brightness(0.9);
61533
- }
61534
- }
61535
-
61536
- td {
61537
- text-align: right;
61538
- }
61539
-
61540
- th {
61541
- background-color: #f5f5f5;
61542
- font-weight: bold;
61543
- color: black;
61544
- }
61545
-
61546
- .o_missing_value {
61547
- color: #46646d;
61548
- background: #e7f2f6;
61549
- }
61550
- }
61551
- `;
61552
59581
  class PivotHTMLRenderer extends Component {
61553
59582
  static template = "o_spreadsheet.PivotHTMLRenderer";
61554
59583
  static components = { Checkbox };
@@ -70651,6 +68680,30 @@ function togglePivotCollapse(position, env) {
70651
68680
  pivot: { ...definition, collapsedDomains: newDomains },
70652
68681
  });
70653
68682
  }
68683
+ iconsOnCellRegistry.add("pivot_dashboard_sorting", (getters, position) => {
68684
+ if (!getters.isDashboard()) {
68685
+ return undefined;
68686
+ }
68687
+ const pivotCell = getters.getPivotCellFromPosition(position);
68688
+ if (pivotCell.type !== "MEASURE_HEADER") {
68689
+ return undefined;
68690
+ }
68691
+ const sortDirection = getters.getPivotCellSortDirection(position);
68692
+ if (sortDirection !== "asc" && sortDirection !== "desc") {
68693
+ return undefined;
68694
+ }
68695
+ const cellStyle = getters.getCellComputedStyle(position);
68696
+ return {
68697
+ type: `pivot_dashboard_sorting_${sortDirection}`,
68698
+ priority: 5,
68699
+ horizontalAlign: "right",
68700
+ size: GRID_ICON_EDGE_LENGTH,
68701
+ margin: GRID_ICON_MARGIN,
68702
+ svg: sortDirection === "asc" ? getCaretUpSvg(cellStyle) : getCaretDownSvg(cellStyle),
68703
+ position,
68704
+ onClick: undefined, // click is managed by ClickableCellSortIcon
68705
+ };
68706
+ });
70654
68707
 
70655
68708
  class CellIconPlugin extends CoreViewPlugin {
70656
68709
  static getters = ["doesCellHaveGridIcon", "getCellIcons", "getCellIconRect"];
@@ -71130,7 +69183,7 @@ function withPivotPresentationLayer (PivotClass) {
71130
69183
  return { value: 0 };
71131
69184
  }
71132
69185
  const { columns, rows } = super.definition;
71133
- if (columns.length + rows.length !== domain.length) {
69186
+ if (measure.aggregator && columns.length + rows.length !== domain.length) {
71134
69187
  const values = this.getValuesToAggregate(measure, domain);
71135
69188
  const aggregator = AGGREGATORS_FN[measure.aggregator];
71136
69189
  if (!aggregator) {
@@ -71149,11 +69202,17 @@ function withPivotPresentationLayer (PivotClass) {
71149
69202
  if (columns.find((col) => col.nameWithGranularity === symbolName)) {
71150
69203
  const { colDomain } = domainToColRowDomain(this, domain);
71151
69204
  const symbolIndex = colDomain.findIndex((node) => node.field === symbolName);
69205
+ if (symbolIndex === -1) {
69206
+ return new NotAvailableError();
69207
+ }
71152
69208
  return this.getPivotHeaderValueAndFormat(colDomain.slice(0, symbolIndex + 1));
71153
69209
  }
71154
69210
  if (rows.find((row) => row.nameWithGranularity === symbolName)) {
71155
69211
  const { rowDomain } = domainToColRowDomain(this, domain);
71156
69212
  const symbolIndex = rowDomain.findIndex((row) => row.field === symbolName);
69213
+ if (symbolIndex === -1) {
69214
+ return new NotAvailableError();
69215
+ }
71157
69216
  return this.getPivotHeaderValueAndFormat(rowDomain.slice(0, symbolIndex + 1));
71158
69217
  }
71159
69218
  return this.getPivotCellValueAndFormat(symbolName, domain);
@@ -75547,6 +73606,21 @@ class DataValidationInsertionPlugin extends UIPlugin {
75547
73606
  }
75548
73607
  }
75549
73608
 
73609
+ /**
73610
+ * This plugin provides dynamic translation getter. In o-spreadsheet, it has
73611
+ * no implementation, but this plugin can be replaced by another one to provide
73612
+ * a real implementation.
73613
+ *
73614
+ * For example, in Odoo, the plugin is replaced by a plugin that used the
73615
+ * module namespace to dynamically translate terms.
73616
+ */
73617
+ class DynamicTranslate extends UIPlugin {
73618
+ static getters = ["dynamicTranslate"];
73619
+ dynamicTranslate(term) {
73620
+ return term;
73621
+ }
73622
+ }
73623
+
75550
73624
  const genericRepeatsTransforms = [
75551
73625
  repeatSheetDependantCommand,
75552
73626
  repeatTargetDependantCommand,
@@ -77517,13 +75591,10 @@ class GridSelectionPlugin extends UIPlugin {
77517
75591
  const deltaCol = isBasedBefore && isCol ? thickness : 0;
77518
75592
  const deltaRow = isBasedBefore && !isCol ? thickness : 0;
77519
75593
  const toRemove = isBasedBefore ? cmd.elements.map((el) => el + thickness) : cmd.elements;
77520
- const originalSize = Object.fromEntries(toRemove.map((element) => {
77521
- const size = isCol
77522
- ? this.getters.getColSize(cmd.sheetId, element)
77523
- : this.getters.getUserRowSize(cmd.sheetId, element);
77524
- const isDefaultCol = isCol && size === DEFAULT_CELL_WIDTH;
77525
- return [element, isDefaultCol ? undefined : size];
77526
- }));
75594
+ const originalSize = {};
75595
+ for (const element of toRemove) {
75596
+ originalSize[element] = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, element);
75597
+ }
77527
75598
  const target = [
77528
75599
  {
77529
75600
  left: isCol ? start + deltaCol : 0,
@@ -77567,11 +75638,11 @@ class GridSelectionPlugin extends UIPlugin {
77567
75638
  for (const element of toRemove) {
77568
75639
  const size = originalSize[element];
77569
75640
  const currentSize = this.getters.getHeaderSize(cmd.sheetId, cmd.dimension, currentIndex);
77570
- if (size && size !== currentSize) {
75641
+ if (size !== currentSize) {
77571
75642
  resizingGroups[size] ??= [];
77572
75643
  resizingGroups[size].push(currentIndex);
77573
- currentIndex += 1;
77574
75644
  }
75645
+ currentIndex += 1;
77575
75646
  }
77576
75647
  for (const size in resizingGroups) {
77577
75648
  this.dispatch("RESIZE_COLUMNS_ROWS", {
@@ -79178,6 +77249,7 @@ const featurePluginRegistry = new Registry()
79178
77249
  .add("table_ui_resize", TableResizeUI)
79179
77250
  .add("datavalidation_insert", DataValidationInsertionPlugin)
79180
77251
  .add("checkbox_toggle", CheckboxTogglePlugin)
77252
+ .add("dynamic_translate", DynamicTranslate)
79181
77253
  .add("geo_features", GeoFeaturePlugin);
79182
77254
  // Plugins which have a state, but which should not be shared in collaborative
79183
77255
  const statefulUIPluginRegistry = new Registry()
@@ -80489,11 +78561,6 @@ const RIPPLE_KEY_FRAMES = [
80489
78561
  { transform: "scale(0.8)", offset: 0.33 },
80490
78562
  { opacity: "0", transform: "scale(1)", offset: 1 },
80491
78563
  ];
80492
- css /* scss */ `
80493
- .o-ripple {
80494
- z-index: 1;
80495
- }
80496
- `;
80497
78564
  class RippleEffect extends Component {
80498
78565
  static template = "o-spreadsheet-RippleEffect";
80499
78566
  static props = {
@@ -80665,59 +78732,6 @@ function interactiveRenameSheet(env, sheetId, name, errorCallback) {
80665
78732
  }
80666
78733
  }
80667
78734
 
80668
- css /* scss */ `
80669
- .o-sheet {
80670
- padding: 0 15px;
80671
- padding-right: 10px;
80672
- height: ${DESKTOP_BOTTOMBAR_HEIGHT}px;
80673
- border-left: 1px solid #c1c1c1;
80674
- border-right: 1px solid #c1c1c1;
80675
- margin-left: -1px;
80676
- cursor: pointer;
80677
- &:hover {
80678
- background-color: rgba(0, 0, 0, 0.08);
80679
- }
80680
-
80681
- &.active {
80682
- color: ${ACTION_COLOR};
80683
- background-color: #ffffff;
80684
- box-shadow: 0 1px 3px 1px rgba(60, 64, 67, 0.15);
80685
- }
80686
-
80687
- .o-sheet-icon {
80688
- z-index: 1;
80689
-
80690
- &:hover {
80691
- background-color: rgba(0, 0, 0, 0.08);
80692
- }
80693
- }
80694
-
80695
- .o-sheet-name {
80696
- outline: none;
80697
- padding: 2px 4px;
80698
-
80699
- &.o-sheet-name-editable {
80700
- border-radius: 2px;
80701
- border: 2px solid mediumblue;
80702
- /* negative margins so nothing moves when the border is added */
80703
- margin-left: -2px;
80704
- margin-right: -2px;
80705
- }
80706
- }
80707
-
80708
- .o-sheet-color {
80709
- bottom: 0;
80710
- left: 0;
80711
- height: 6px;
80712
- z-index: 1;
80713
- width: calc(100% - 1px);
80714
- }
80715
- }
80716
-
80717
- .o-spreadshet-mobile .o-sheet {
80718
- height: ${MOBILE_BOTTOMBAR_HEIGHT}px;
80719
- }
80720
- `;
80721
78735
  class BottomBarSheet extends Component {
80722
78736
  static template = "o-spreadsheet-BottomBarSheet";
80723
78737
  static props = {
@@ -80997,20 +79011,6 @@ class AggregateStatisticsStore extends SpreadsheetStore {
80997
79011
  }
80998
79012
  }
80999
79013
 
81000
- // -----------------------------------------------------------------------------
81001
- // SpreadSheet
81002
- // -----------------------------------------------------------------------------
81003
- css /* scss */ `
81004
- .o-selection-statistic {
81005
- margin-right: 20px;
81006
- padding: 4px 4px 4px 8px;
81007
- color: #333;
81008
- cursor: pointer;
81009
- &:hover {
81010
- background-color: rgba(0, 0, 0, 0.08) !important;
81011
- }
81012
- }
81013
- `;
81014
79014
  class BottomBarStatistic extends Component {
81015
79015
  static template = "o-spreadsheet-BottomBarStatistic";
81016
79016
  static props = {
@@ -81067,77 +79067,6 @@ class BottomBarStatistic extends Component {
81067
79067
  // SpreadSheet
81068
79068
  // -----------------------------------------------------------------------------
81069
79069
  const MENU_MAX_HEIGHT = 250;
81070
- css /* scss */ `
81071
- .o-spreadsheet-bottom-bar {
81072
- background-color: ${BACKGROUND_GRAY_COLOR};
81073
- padding-left: ${HEADER_WIDTH}px;
81074
- font-size: 15px;
81075
- border-top: 1px solid lightgrey;
81076
-
81077
- .o-sheet-item {
81078
- cursor: pointer;
81079
- &:hover {
81080
- background-color: rgba(0, 0, 0, 0.08);
81081
- }
81082
- }
81083
-
81084
- .o-all-sheets {
81085
- max-width: 70%;
81086
- .o-bottom-bar-fade-out {
81087
- background-image: linear-gradient(-90deg, #cfcfcf, transparent 1%);
81088
- }
81089
-
81090
- .o-bottom-bar-fade-in {
81091
- z-index: 1;
81092
- background-image: linear-gradient(90deg, #cfcfcf, transparent 1%);
81093
- }
81094
-
81095
- .o-sheet-list {
81096
- overflow-y: hidden;
81097
- overflow-x: auto;
81098
-
81099
- &::-webkit-scrollbar {
81100
- display: none; /* Chrome */
81101
- }
81102
- -ms-overflow-style: none; /* IE and Edge */
81103
- scrollbar-width: none; /* Firefox */
81104
- }
81105
- }
81106
-
81107
- .o-bottom-bar-arrows {
81108
- .o-bottom-bar-arrow {
81109
- cursor: pointer;
81110
- &:hover:not([class*="o-disabled"]) {
81111
- .o-icon {
81112
- opacity: 0.9;
81113
- }
81114
- }
81115
-
81116
- .o-icon {
81117
- height: 18px;
81118
- width: 18px;
81119
- font-size: 18px;
81120
- }
81121
- }
81122
- }
81123
- }
81124
-
81125
- .o-spreadsheet-mobile .o-spreadsheet-bottom-bar {
81126
- padding-left: 0;
81127
-
81128
- .add-sheet-container {
81129
- order: 2;
81130
- }
81131
-
81132
- .o-add-sheet {
81133
- margin-left: 0.5rem;
81134
- }
81135
-
81136
- .o-all-sheets {
81137
- max-width: none;
81138
- }
81139
- }
81140
- `;
81141
79070
  class BottomBar extends Component {
81142
79071
  static template = "o-spreadsheet-BottomBar";
81143
79072
  static props = { onClick: Function };
@@ -81393,12 +79322,6 @@ class ClickableCellsStore extends SpreadsheetStore {
81393
79322
  }
81394
79323
  }
81395
79324
 
81396
- css /* scss */ `
81397
- .o-dashboard-clickable-cell {
81398
- position: absolute;
81399
- cursor: pointer;
81400
- }
81401
- `;
81402
79325
  class SpreadsheetDashboard extends Component {
81403
79326
  static template = "o-spreadsheet-SpreadsheetDashboard";
81404
79327
  static props = { getGridSize: Function };
@@ -81490,27 +79413,6 @@ class SpreadsheetDashboard extends Component {
81490
79413
  }
81491
79414
  }
81492
79415
 
81493
- css /* scss */ `
81494
- .o-header-group {
81495
- .o-header-group-header {
81496
- z-index: ${ComponentsImportance.HeaderGroupingButton};
81497
- .o-group-fold-button {
81498
- cursor: pointer;
81499
- width: 15px;
81500
- height: 15px;
81501
- border: 1px solid ${HEADER_GROUPING_BORDER_COLOR};
81502
- .o-icon {
81503
- width: 7px;
81504
- height: 7px;
81505
- }
81506
-
81507
- &:hover {
81508
- border-color: #777;
81509
- }
81510
- }
81511
- }
81512
- }
81513
- `;
81514
79416
  class AbstractHeaderGroup extends Component {
81515
79417
  static template = "o-spreadsheet-HeaderGroup";
81516
79418
  static props = {
@@ -81661,27 +79563,6 @@ class ColGroup extends AbstractHeaderGroup {
81661
79563
  }
81662
79564
  }
81663
79565
 
81664
- css /* scss */ `
81665
- .o-header-group-frozen-pane-border {
81666
- &.o-group-rows {
81667
- margin-top: -1px;
81668
- border-bottom: 3px solid ${FROZEN_PANE_HEADER_BORDER_COLOR};
81669
- }
81670
- &.o-group-columns {
81671
- margin-left: -1px;
81672
- border-right: 3px solid ${FROZEN_PANE_HEADER_BORDER_COLOR};
81673
- }
81674
- }
81675
-
81676
- .o-header-group-main-pane {
81677
- &.o-group-rows {
81678
- margin-top: -2px; /* Counteract o-header-group-frozen-pane-border offset */
81679
- }
81680
- &.o-group-columns {
81681
- margin-left: -2px;
81682
- }
81683
- }
81684
- `;
81685
79566
  class HeaderGroupContainer extends Component {
81686
79567
  static template = "o-spreadsheet-HeaderGroupContainer";
81687
79568
  static props = {
@@ -81760,121 +79641,6 @@ function useScreenWidth() {
81760
79641
  };
81761
79642
  }
81762
79643
 
81763
- css /* scss */ `
81764
- .o-sidePanel {
81765
- display: flex;
81766
- flex-direction: column;
81767
- overflow-x: hidden;
81768
- background-color: white;
81769
- border: solid ${GRAY_300};
81770
- border-width: 1px 0 0 1px;
81771
- user-select: none;
81772
- color: ${TEXT_BODY};
81773
-
81774
- &.collapsed {
81775
- padding: 8px;
81776
- cursor: pointer;
81777
-
81778
- .o-sidePanelTitle {
81779
- writing-mode: vertical-rl;
81780
- text-orientation: mixed;
81781
- }
81782
- }
81783
-
81784
- .o-sidePanelTitle {
81785
- line-height: 20px;
81786
- font-size: 16px;
81787
- }
81788
-
81789
- .o-sidePanelHeader {
81790
- padding: 8px;
81791
- border-bottom: 1px solid ${GRAY_300};
81792
- }
81793
-
81794
- .o-sidePanelAction {
81795
- padding: 5px 10px;
81796
- cursor: pointer;
81797
-
81798
- &.active {
81799
- background-color: ${BUTTON_ACTIVE_BG};
81800
- }
81801
-
81802
- &:hover {
81803
- background-color: ${BUTTON_HOVER_BG};
81804
- }
81805
- }
81806
- .o-sidePanelBody-container {
81807
- /* This overwrites the min-height: auto; of flex. Without this, a flex div cannot be smaller than its children */
81808
- min-height: 0;
81809
- }
81810
- .o-sidePanelBody {
81811
- overflow: auto;
81812
- width: 100%;
81813
- height: 100%;
81814
-
81815
- .o-section {
81816
- padding: 16px;
81817
-
81818
- .o-section-title {
81819
- font-weight: 500;
81820
- margin-bottom: 5px;
81821
- }
81822
-
81823
- .o-section-subtitle {
81824
- font-weight: 500;
81825
- font-size: 13px;
81826
- line-height: 14px;
81827
- margin: 8px 0 4px 0;
81828
- }
81829
-
81830
- .o-subsection-left {
81831
- display: inline-block;
81832
- width: 47%;
81833
- margin-right: 3%;
81834
- }
81835
-
81836
- .o-subsection-right {
81837
- display: inline-block;
81838
- width: 47%;
81839
- margin-left: 3%;
81840
- }
81841
- }
81842
-
81843
- .o-sidePanel-composer {
81844
- color: ${TEXT_BODY};
81845
- }
81846
- }
81847
-
81848
- .o-sidePanelButtons {
81849
- display: flex;
81850
- gap: 8px;
81851
- }
81852
-
81853
- .o-invalid {
81854
- border-width: 2px;
81855
- border-color: red;
81856
- }
81857
-
81858
- .o-sidePanel-handle-container {
81859
- width: 8px;
81860
- position: fixed;
81861
- top: 50%;
81862
- z-index: 1;
81863
- }
81864
- .o-sidePanel-handle {
81865
- cursor: col-resize;
81866
- color: #a9a9a9;
81867
- .o-icon {
81868
- height: 25px;
81869
- margin-left: -5px;
81870
- }
81871
- }
81872
- }
81873
-
81874
- .o-fw-bold {
81875
- font-weight: 500;
81876
- }
81877
- `;
81878
79644
  class SidePanel extends Component {
81879
79645
  static template = "o-spreadsheet-SidePanel";
81880
79646
  static props = {
@@ -82049,11 +79815,6 @@ class RibbonMenu extends Component {
82049
79815
  }
82050
79816
  }
82051
79817
 
82052
- css `
82053
- .o-small-composer {
82054
- z-index: ${ComponentsImportance.TopBarComposer};
82055
- }
82056
- `;
82057
79818
  class SmallBottomBar extends Component {
82058
79819
  static components = { Composer, BottomBar, Ripple, RibbonMenu };
82059
79820
  static template = "o-spreadsheet-SmallBottomBar";
@@ -82141,36 +79902,12 @@ class SmallBottomBar extends Component {
82141
79902
 
82142
79903
  const COMPOSER_MAX_HEIGHT = 300;
82143
79904
  /* svg free of use from https://uxwing.com/formula-fx-icon/ */
82144
- const FX_SVG = /*xml*/ `
82145
- <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 121.8 122.9' width='16' height='16' focusable='false'>
82146
- <path d='m28 34-4 5v2h10l-6 40c-4 22-6 28-7 30-2 2-3 3-5 3-3 0-7-2-9-4H4c-2 2-4 4-4 7s4 6 8 6 9-2 15-8c8-7 13-17 18-39l7-35 13-1 3-6H49c4-23 7-27 11-27 2 0 5 2 8 6h4c1-1 4-4 4-7 0-2-3-6-9-6-5 0-13 4-20 10-6 7-9 14-11 24h-8zm41 16c4-5 7-7 8-7s2 1 5 9l3 12c-7 11-12 17-16 17l-3-1-2-1c-3 0-6 3-6 7s3 7 7 7c6 0 12-6 22-23l3 10c3 9 6 13 10 13 5 0 11-4 18-15l-3-4c-4 6-7 8-8 8-2 0-4-3-6-10l-5-15 8-10 6-4 3 1 3 2c2 0 6-3 6-7s-2-7-6-7c-6 0-11 5-21 20l-2-6c-3-9-5-14-9-14-5 0-12 6-18 15l3 3z' fill='#BDBDBD'/>
82147
- </svg>
82148
- `;
82149
- css /* scss */ `
82150
- .o-topbar-composer-container {
82151
- height: ${DESKTOP_TOPBAR_TOOLBAR_HEIGHT}px;
82152
- }
82153
-
82154
- .o-topbar-composer {
82155
- height: fit-content;
82156
- margin-top: -1px;
82157
- margin-bottom: -1px;
82158
- border: 1px solid;
82159
- font-family: ${DEFAULT_FONT};
82160
-
82161
- /* In readonly we always show the fx icon if the composer is empty, not matter the focus */
82162
- .o-composer:empty:not(:focus):not(.active)::before,
82163
- &.o-topbar-composer-readonly .o-composer:empty::before {
82164
- content: url("data:image/svg+xml,${encodeURIComponent(FX_SVG)}");
82165
- position: relative;
82166
- top: 20%;
82167
- }
82168
- }
82169
-
82170
- .user-select-text {
82171
- user-select: text;
82172
- }
82173
- `;
79905
+ // FIXME This svg is hardcoded in the css file. We should find a better way to handle it.
79906
+ // const FX_SVG = /*xml*/ `
79907
+ // <svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 121.8 122.9' width='16' height='16' focusable='false'>
79908
+ // <path d='m28 34-4 5v2h10l-6 40c-4 22-6 28-7 30-2 2-3 3-5 3-3 0-7-2-9-4H4c-2 2-4 4-4 7s4 6 8 6 9-2 15-8c8-7 13-17 18-39l7-35 13-1 3-6H49c4-23 7-27 11-27 2 0 5 2 8 6h4c1-1 4-4 4-7 0-2-3-6-9-6-5 0-13 4-20 10-6 7-9 14-11 24h-8zm41 16c4-5 7-7 8-7s2 1 5 9l3 12c-7 11-12 17-16 17l-3-1-2-1c-3 0-6 3-6 7s3 7 7 7c6 0 12-6 22-23l3 10c3 9 6 13 10 13 5 0 11-4 18-15l-3-4c-4 6-7 8-8 8-2 0-4-3-6-10l-5-15 8-10 6-4 3 1 3 2c2 0 6-3 6-7s-2-7-6-7c-6 0-11 5-21 20l-2-6c-3-9-5-14-9-14-5 0-12 6-18 15l3 3z' fill='#BDBDBD'/>
79909
+ // </svg>
79910
+ // `;
82174
79911
  class TopBarComposer extends Component {
82175
79912
  static template = "o-spreadsheet-TopBarComposer";
82176
79913
  static props = {};
@@ -82206,18 +79943,6 @@ class TopBarComposer extends Component {
82206
79943
  style.height = this.focus === "inactive" ? `${DESKTOP_TOPBAR_TOOLBAR_HEIGHT}px` : "fit-content";
82207
79944
  return cssPropertiesToCss(style);
82208
79945
  }
82209
- get containerStyle() {
82210
- if (this.focus === "inactive") {
82211
- return cssPropertiesToCss({
82212
- "border-color": SEPARATOR_COLOR,
82213
- "border-right": "none",
82214
- });
82215
- }
82216
- return cssPropertiesToCss({
82217
- "border-color": SELECTION_BORDER_COLOR,
82218
- "z-index": String(ComponentsImportance.TopBarComposer),
82219
- });
82220
- }
82221
79946
  onFocus(selection) {
82222
79947
  this.composerFocusStore.focusComposer(this.composerInterface, { selection });
82223
79948
  }
@@ -82307,79 +80032,6 @@ const BORDER_POSITIONS = [
82307
80032
  // -----------------------------------------------------------------------------
82308
80033
  // Border Editor
82309
80034
  // -----------------------------------------------------------------------------
82310
- css /* scss */ `
82311
- .o-border-selector {
82312
- padding: 4px;
82313
- background-color: white;
82314
-
82315
- .o-divider {
82316
- border-right: 1px solid ${GRAY_300};
82317
- margin: 0 6px;
82318
- }
82319
-
82320
- .o-border-selector-section {
82321
- .o-dropdown-line {
82322
- height: 30px;
82323
- margin: 1px;
82324
- .o-line-item {
82325
- padding: 4px;
82326
- width: 26px;
82327
- height: 26px;
82328
- &.active {
82329
- background-color: ${BUTTON_ACTIVE_BG};
82330
- }
82331
- }
82332
- }
82333
- .o-border-style-tool {
82334
- padding: 0px 3px;
82335
- margin: 2px;
82336
- height: 25px;
82337
- }
82338
- }
82339
- }
82340
-
82341
- .o-border-style-dropdown {
82342
- background: #ffffff;
82343
- padding: 4px;
82344
- .o-dropdown-line {
82345
- }
82346
- .o-style-preview {
82347
- margin: 7px 5px 7px 5px;
82348
- width: 60px;
82349
- height: 5px;
82350
- }
82351
- .o-style-thin {
82352
- border-bottom: 1px solid #000000;
82353
- }
82354
- .o-style-medium {
82355
- border-bottom: 2px solid #000000;
82356
- }
82357
- .o-style-thick {
82358
- border-bottom: 3px solid #000000;
82359
- }
82360
- .o-style-dashed {
82361
- border-bottom: 1px dashed #000000;
82362
- }
82363
- .o-style-dotted {
82364
- border-bottom: 1px dotted #000000;
82365
- }
82366
- .o-dropdown-border-type {
82367
- cursor: pointer;
82368
- &:not(.o-disabled):not(.active):hover {
82369
- background-color: ${BUTTON_HOVER_BG};
82370
- }
82371
- }
82372
- .o-dropdown-border-check {
82373
- width: 20px;
82374
- font-size: 12px;
82375
- }
82376
- .o-border-picker-button {
82377
- padding: 0px !important;
82378
- margin: 5px 0px 0px 0px !important;
82379
- height: 25px !important;
82380
- }
82381
- }
82382
- `;
82383
80035
  class BorderEditor extends Component {
82384
80036
  static template = "o-spreadsheet-BorderEditor";
82385
80037
  static props = {
@@ -82930,90 +80582,6 @@ topBarToolBarRegistry
82930
80582
  // -----------------------------------------------------------------------------
82931
80583
  // TopBar
82932
80584
  // -----------------------------------------------------------------------------
82933
- css /* scss */ `
82934
- .o-topbar-divider {
82935
- border-right: 1px solid ${SEPARATOR_COLOR};
82936
- width: 0;
82937
- margin: 0 6px;
82938
- height: 30px;
82939
- }
82940
-
82941
- .o-toolbar-button {
82942
- height: 30px;
82943
- }
82944
-
82945
- .o-spreadsheet-topbar {
82946
- line-height: 1.2;
82947
- font-size: 14px;
82948
- font-weight: 500;
82949
- background-color: #fff;
82950
-
82951
- .o-topbar-top {
82952
- border-bottom: 1px solid ${SEPARATOR_COLOR};
82953
- padding: 2px 10px;
82954
-
82955
- /* Menus */
82956
- .o-topbar-topleft {
82957
- .o-topbar-menu {
82958
- padding: 4px 6px;
82959
- margin: 0 2px;
82960
-
82961
- &.active {
82962
- background-color: ${BUTTON_ACTIVE_BG};
82963
- color: ${BUTTON_ACTIVE_TEXT_COLOR};
82964
- }
82965
- }
82966
- }
82967
- }
82968
-
82969
- .irregularity-map {
82970
- border-top: 1px solid ${SEPARATOR_COLOR};
82971
- height: ${DESKTOP_TOPBAR_TOOLBAR_HEIGHT}px;
82972
-
82973
- .alert-info {
82974
- border-left: 3px solid ${ALERT_INFO_BORDER};
82975
- }
82976
- }
82977
-
82978
- .o-topbar-composer {
82979
- flex-grow: 1;
82980
- }
82981
-
82982
- /* Toolbar */
82983
- .o-topbar-toolbar {
82984
- height: ${DESKTOP_TOPBAR_TOOLBAR_HEIGHT}px;
82985
-
82986
- .o-readonly-toolbar {
82987
- background-color: ${BACKGROUND_HEADER_COLOR};
82988
- padding-left: 18px;
82989
- padding-right: 18px;
82990
- }
82991
-
82992
- /* Toolbar */
82993
- .o-toolbar-tools {
82994
- cursor: default;
82995
- }
82996
- }
82997
- }
82998
-
82999
- .o-spreadsheet-mobile {
83000
- .o-topbar-toolbar {
83001
- height: ${MOBILE_TOPBAR_TOOLBAR_HEIGHT}px;
83002
- }
83003
- .o-topbar-divider {
83004
- border-width: 2px;
83005
- border-radius: 4px;
83006
- }
83007
-
83008
- .o-toolbar-button {
83009
- height: 35px;
83010
- width: 31px;
83011
- .o-toolbar-button.o-mobile-disabled * {
83012
- color: ${DISABLED_TEXT_COLOR};
83013
- cursor: not-allowed;
83014
- }
83015
- }
83016
- `;
83017
80585
  class TopBar extends Component {
83018
80586
  static template = "o-spreadsheet-TopBar";
83019
80587
  static props = {
@@ -83287,251 +80855,6 @@ class WebClipboardWrapper {
83287
80855
  }
83288
80856
  }
83289
80857
 
83290
- // -----------------------------------------------------------------------------
83291
- // SpreadSheet
83292
- // -----------------------------------------------------------------------------
83293
- const CARET_DOWN_SVG = /*xml*/ `
83294
- <svg xmlns='http://www.w3.org/2000/svg' width='7' height='4' viewBox='0 0 7 4'>
83295
- <polygon fill='%23374151' points='3.5 4 7 0 0 0'/>
83296
- </svg>
83297
- `;
83298
- css /* scss */ `
83299
- .o-spreadsheet {
83300
- position: relative;
83301
- display: grid;
83302
- font-size: 14px;
83303
-
83304
- .text-muted {
83305
- color: ${TEXT_BODY_MUTED} !important;
83306
- }
83307
- .o-disabled {
83308
- opacity: 0.4;
83309
- cursor: default;
83310
- pointer-events: none;
83311
- }
83312
-
83313
- &,
83314
- *,
83315
- *:before,
83316
- *:after {
83317
- /* rtl not supported ATM */
83318
- direction: ltr;
83319
- }
83320
- .o-separator {
83321
- border-bottom: ${MENU_SEPARATOR_BORDER_WIDTH}px solid ${SEPARATOR_COLOR};
83322
- margin-top: ${MENU_SEPARATOR_PADDING}px;
83323
- margin-bottom: ${MENU_SEPARATOR_PADDING}px;
83324
- }
83325
- .o-hoverable-button {
83326
- border-radius: 2px;
83327
- cursor: pointer;
83328
- .o-icon {
83329
- color: ${TEXT_BODY};
83330
- }
83331
- &:not(.o-disabled):not(.active):hover {
83332
- background-color: ${BUTTON_HOVER_BG};
83333
- color: ${BUTTON_HOVER_TEXT_COLOR};
83334
- .o-icon {
83335
- color: ${BUTTON_HOVER_TEXT_COLOR};
83336
- }
83337
- }
83338
- &.active {
83339
- background-color: ${BUTTON_ACTIVE_BG};
83340
- color: ${BUTTON_ACTIVE_TEXT_COLOR};
83341
- .o-icon {
83342
- color: ${BUTTON_ACTIVE_TEXT_COLOR};
83343
- }
83344
- }
83345
- }
83346
-
83347
- .o-grid-container {
83348
- display: grid;
83349
- background-color: ${HEADER_GROUPING_BACKGROUND_COLOR};
83350
-
83351
- .o-top-left {
83352
- border: 1px solid ${GRID_BORDER_COLOR};
83353
- margin-bottom: -1px;
83354
- margin-right: -1px;
83355
- }
83356
-
83357
- .o-column-groups {
83358
- grid-column-start: 2;
83359
- border-top: 1px solid ${GRID_BORDER_COLOR};
83360
- }
83361
-
83362
- .o-row-groups {
83363
- grid-row-start: 2;
83364
- }
83365
-
83366
- .o-group-grid {
83367
- border-top: 1px solid ${GRID_BORDER_COLOR};
83368
- border-left: 1px solid ${GRID_BORDER_COLOR};
83369
- }
83370
- }
83371
-
83372
- .o-input {
83373
- min-width: 0px;
83374
- padding: 1px 0;
83375
- width: 100%;
83376
- outline: none;
83377
- border-color: ${GRAY_300};
83378
- color: ${GRAY_900};
83379
-
83380
- &::placeholder {
83381
- opacity: 0.5;
83382
- }
83383
- &:focus {
83384
- border-color: ${ACTION_COLOR};
83385
- }
83386
- }
83387
-
83388
- select.o-input {
83389
- cursor: pointer;
83390
- border-width: 0 0 1px 0;
83391
- padding: 1px 6px 1px 0px;
83392
-
83393
- appearance: none;
83394
- -webkit-appearance: none;
83395
- -moz-appearance: none;
83396
- background: transparent url("data:image/svg+xml,${encodeURIComponent(CARET_DOWN_SVG)}")
83397
- no-repeat right center;
83398
- text-overflow: ellipsis;
83399
-
83400
- &:disabled {
83401
- color: ${DISABLED_TEXT_COLOR};
83402
- opacity: 0.4;
83403
- cursor: default;
83404
- }
83405
- }
83406
-
83407
- .o-input[type="text"] {
83408
- border-width: 0 0 1px 0;
83409
- }
83410
-
83411
- .o-input[type="number"],
83412
- .o-number-input {
83413
- border-width: 0 0 1px 0;
83414
- /* Remove number input arrows */
83415
- appearance: textfield;
83416
- &::-webkit-outer-spin-button,
83417
- &::-webkit-inner-spin-button {
83418
- -webkit-appearance: none;
83419
- margin: 0;
83420
- }
83421
- }
83422
- }
83423
-
83424
- .o-two-columns {
83425
- grid-column: 1 / 3;
83426
- }
83427
-
83428
- .o-text-icon {
83429
- vertical-align: middle;
83430
- }
83431
- `;
83432
- // -----------------------------------------------------------------------------
83433
- // GRID STYLE
83434
- // -----------------------------------------------------------------------------
83435
- css /* scss */ `
83436
- .o-grid {
83437
- position: relative;
83438
- overflow: hidden;
83439
- background-color: ${BACKGROUND_GRAY_COLOR};
83440
- &:focus {
83441
- outline: none;
83442
- }
83443
-
83444
- > canvas {
83445
- box-sizing: content-box;
83446
- border-bottom: 1px solid #e2e3e3;
83447
- border-right: 1px solid #e2e3e3;
83448
- }
83449
-
83450
- .o-grid-overlay {
83451
- position: absolute;
83452
- outline: none;
83453
- }
83454
- }
83455
-
83456
- .o-button {
83457
- border: 1px solid;
83458
- border-radius: 4px;
83459
- font-weight: 500;
83460
- font-size: 14px;
83461
- height: 32px;
83462
- line-height: 16px;
83463
- flex-grow: 1;
83464
- background-color: ${BUTTON_BG};
83465
- border: 1px solid ${GRAY_200};
83466
- color: ${TEXT_BODY};
83467
-
83468
- &:disabled {
83469
- color: ${DISABLED_TEXT_COLOR};
83470
- }
83471
-
83472
- &.primary {
83473
- background-color: ${PRIMARY_BUTTON_BG};
83474
- border-color: ${PRIMARY_BUTTON_BG};
83475
- color: #fff;
83476
- &:hover:enabled {
83477
- color: #fff;
83478
- background-color: ${PRIMARY_BUTTON_HOVER_BG};
83479
- }
83480
- &:active:enabled {
83481
- background-color: ${PRIMARY_BUTTON_ACTIVE_BG};
83482
- color: ${PRIMARY_BUTTON_BG};
83483
- }
83484
- &.o-disabled,
83485
- &:disabled {
83486
- opacity: 0.5;
83487
- }
83488
- }
83489
-
83490
- &:hover:enabled {
83491
- color: ${BUTTON_HOVER_TEXT_COLOR};
83492
- background-color: ${BUTTON_HOVER_BG};
83493
- }
83494
- &:active:enabled {
83495
- color: ${BUTTON_ACTIVE_TEXT_COLOR};
83496
- background-color: ${BUTTON_ACTIVE_BG};
83497
- }
83498
-
83499
- &.o-disabled,
83500
- &:disabled {
83501
- opacity: 0.8;
83502
- }
83503
-
83504
- &.o-button-danger:hover {
83505
- color: #ffffff;
83506
- background: ${ALERT_DANGER_BORDER};
83507
- }
83508
- }
83509
-
83510
- .o-button-link {
83511
- cursor: pointer;
83512
- text-decoration: none;
83513
- color: ${ACTION_COLOR};
83514
- font-weight: 500;
83515
- &:hover,
83516
- &:active {
83517
- color: ${ACTION_COLOR_HOVER};
83518
- }
83519
- }
83520
-
83521
- .o-button-icon {
83522
- cursor: pointer;
83523
- color: ${TEXT_BODY_MUTED};
83524
- font-weight: 500;
83525
- &:hover,
83526
- &:active {
83527
- color: ${TEXT_BODY};
83528
- }
83529
- }
83530
-
83531
- .o-spreadsheet-bottombar-wrapper {
83532
- z-index: ${ComponentsImportance.ScrollBar + 1};
83533
- }
83534
- `;
83535
80858
  class Spreadsheet extends Component {
83536
80859
  static template = "o-spreadsheet-Spreadsheet";
83537
80860
  static props = {
@@ -88357,9 +85680,9 @@ const constants = {
88357
85680
  };
88358
85681
  const chartHelpers = { ...CHART_HELPERS, ...CHART_RUNTIME_HELPERS };
88359
85682
 
88360
- export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
85683
+ export { AbstractCellClipboardHandler, AbstractChart, AbstractFigureClipboardHandler, CellErrorType, ClientDisconnectedError, CommandResult, CorePlugin, CoreViewPlugin, DispatchResult, EvaluationError, LocalTransportService, Model, PivotRuntimeDefinition, Registry, Revision, SPREADSHEET_DIMENSIONS, Spreadsheet, SpreadsheetPivotTable, UIPlugin, __info__, addFunction, addRenderingLayer, astToFormula, chartHelpers, compile, compileTokens, components, constants, convertAstNodes, coreTypes, findCellInNewZone, functionCache, getCaretDownSvg, getCaretUpSvg, helpers, hooks, invalidateCFEvaluationCommands, invalidateChartEvaluationCommands, invalidateDependenciesCommands, invalidateEvaluationCommands, iterateAstNodes, links, load, parse, parseTokens, readonlyAllowedCommands, registries, setDefaultSheetViewSize, setTranslationMethod, stores, tokenColors, tokenize };
88361
85684
 
88362
85685
 
88363
- __info__.version = "19.1.0-alpha.0";
88364
- __info__.date = "2025-09-11T07:49:49.483Z";
88365
- __info__.hash = "587c928";
85686
+ __info__.version = "19.1.0-alpha.2";
85687
+ __info__.date = "2025-09-19T07:26:49.306Z";
85688
+ __info__.hash = "8cc543d";