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

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.
@@ -1,9 +1,9 @@
1
1
  <!--
2
2
  This file is generated by o-spreadsheet build tools. Do not edit it.
3
3
  @see https://github.com/odoo/o-spreadsheet
4
- @version 19.1.0-alpha.2
5
- @date 2025-09-19T07:27:40.524Z
6
- @hash 8cc543d
4
+ @version 19.1.0-alpha.4
5
+ @date 2025-10-07T10:04:11.357Z
6
+ @hash b7cfed8
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -361,7 +361,7 @@
361
361
  t-att-style="getStyle()">
362
362
  <t t-if="env.isDashboard()">
363
363
  <SpreadsheetDashboard getGridSize.bind="getGridSize"/>
364
- <FullScreenChart/>
364
+ <FullScreenFigure/>
365
365
  </t>
366
366
  <t t-else="">
367
367
  <div class="o-spreadsheet-topbar-wrapper o-two-columns">
@@ -398,9 +398,14 @@
398
398
  <RibbonMenu onClose="() => this.menuState.isOpen=false"/>
399
399
  </t>
400
400
  <t t-else="">
401
- <div class="o-small-composer px-2 py-2">
401
+ <div class="o-small-composer px-2 py-2 position-relative">
402
402
  <div class="w-100" t-ref="bottombarComposer">
403
403
  <Composer t-props="composerProps"/>
404
+ <span
405
+ t-if="showFxIcon"
406
+ class="position-absolute top-50 translate-middle-y ps-2 pe-none">
407
+ <t t-call="o-spreadsheet-Icon.FX_SVG"/>
408
+ </span>
404
409
  </div>
405
410
  <span
406
411
  class="align-items-center d-flex justify-content-center o-selection-button"
@@ -4154,7 +4159,7 @@
4154
4159
  />
4155
4160
  </div>
4156
4161
  <div class="ms-auto"/>
4157
- <div class="flex-shrink-0 d-flex align-self-start me-1">
4162
+ <div class="flex-shrink-0 d-flex me-1">
4158
4163
  <CogWheelMenu items="getCogWheelMenuItems(item)"/>
4159
4164
  </div>
4160
4165
  </div>
@@ -5552,6 +5557,14 @@
5552
5557
  />
5553
5558
  </svg>
5554
5559
  </t>
5560
+ <t t-name="o-spreadsheet-Icon.FX_SVG">
5561
+ <svg class="o-icon" viewBox="0 0 121.8 122.9">
5562
+ <path
5563
+ fill="#BDBDBD"
5564
+ 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'
5565
+ />
5566
+ </svg>
5567
+ </t>
5555
5568
 
5556
5569
  <t t-name="o-spreadsheet-IconPicker">
5557
5570
  <div class="o-icon-picker">
@@ -6029,8 +6042,8 @@
6029
6042
  </div>
6030
6043
  </t>
6031
6044
 
6032
- <t t-name="o-spreadsheet-FullScreenChart">
6033
- <div class="position-absolute o-fullscreen-chart-overlay w-100 h-100 d-flex" t-if="chartId">
6045
+ <t t-name="o-spreadsheet-FullScreenFigure">
6046
+ <div class="position-absolute o-fullscreen-figure-overlay w-100 h-100 d-flex" t-if="figureUI">
6034
6047
  <div
6035
6048
  class="position-absolute top-0 start-0 end-0 bottom-0"
6036
6049
  t-on-click="exitFullScreen"
@@ -6043,15 +6056,20 @@
6043
6056
  </button>
6044
6057
  <div class="flex-fill">
6045
6058
  <div
6046
- class="o-fullscreen-chart o-figure position-relative border rounded shadow"
6059
+ class="o-fullscreen-figure o-figure position-relative border rounded shadow"
6047
6060
  tabindex="1"
6048
- t-ref="fullScreenChart"
6061
+ t-ref="fullScreenFigure"
6049
6062
  t-on-click.stop=""
6050
6063
  t-on-keydown="(ev) => this.onKeyDown(ev)">
6051
- <t t-component="chartComponent" chartId="chartId" isFullScreen="true" t-key="chartId"/>
6052
- <div class="position-absolute top-0 end-0">
6053
- <ChartDashboardMenu chartId="chartId"/>
6054
- </div>
6064
+ <t>
6065
+ <t
6066
+ t-component="figureComponent"
6067
+ figureUI="figureUI"
6068
+ isFullScreen="true"
6069
+ onFigureDeleted="() => {}"
6070
+ t-key="figureUI.id"
6071
+ />
6072
+ </t>
6055
6073
  </div>
6056
6074
  </div>
6057
6075
  </div>
@@ -6136,7 +6154,7 @@
6136
6154
  </div>
6137
6155
  <div
6138
6156
  t-if="state.displayedValues.length === 0"
6139
- class="o-filter-menu-no-values d-flex align-items-center justify-content-center w-100 h-100 ">
6157
+ class="o-filter-menu-no-values d-flex align-items-center justify-content-center w-100 h-100 text-muted fst-italic">
6140
6158
  No results
6141
6159
  </div>
6142
6160
  </div>
@@ -6278,7 +6296,12 @@
6278
6296
 
6279
6297
  <t t-name="o-spreadsheet-ChartFigure">
6280
6298
  <div class="o-chart-container w-100 h-100" t-on-dblclick="onDoubleClick">
6281
- <t t-component="chartComponent" chartId="chartId" t-key="chartId"/>
6299
+ <t
6300
+ t-component="chartComponent"
6301
+ chartId="chartId"
6302
+ t-key="chartId"
6303
+ isFullScreen="props.isFullScreen"
6304
+ />
6282
6305
  </div>
6283
6306
  <div t-if="env.isDashboard()" class="position-absolute top-0 end-0">
6284
6307
  <ChartDashboardMenu chartId="chartId"/>
@@ -6302,7 +6325,7 @@
6302
6325
  t-att-style="titleStyle"
6303
6326
  />
6304
6327
  <div class="o-carousel-tabs d-flex flex-fill justify-content-end" t-ref="carouselTabs">
6305
- <t t-foreach="carousel.items" t-as="item" t-key="item_index">
6328
+ <t t-foreach="visibleCarouselItems" t-as="item" t-key="item_index">
6306
6329
  <div
6307
6330
  class="o-carousel-tab text-truncate px-2 mt-1 flex-shrink-0"
6308
6331
  t-att-class="{ 'selected': isItemSelected(item) }"
@@ -6312,7 +6335,7 @@
6312
6335
  </t>
6313
6336
  </div>
6314
6337
  <div
6315
- class="o-carousel-tabs-dropdown flex-shrink-0 rounded"
6338
+ class="o-carousel-tabs-dropdown o-carousel-button flex-shrink-0 rounded p-1"
6316
6339
  t-att-class="{'active': menuState.isOpen}"
6317
6340
  t-ref="carouselTabsDropdown"
6318
6341
  t-on-click="toggleMenu">
@@ -6326,6 +6349,17 @@
6326
6349
  popoverPositioning="'bottom-left'"
6327
6350
  />
6328
6351
  </div>
6352
+ <div
6353
+ t-if="env.isDashboard()"
6354
+ t-att-title="fullScreenButtonTitle"
6355
+ class="o-carousel-full-screen-button fa o-carousel-button rounded p-1 ms-1"
6356
+ t-att-class="{
6357
+ 'fa-compress': props.isFullScreen,
6358
+ 'fa-expand': !props.isFullScreen,
6359
+ 'invisible': selectedCarouselItem?.type !== 'chart',
6360
+ }"
6361
+ t-on-click="toggleFullScreen"
6362
+ />
6329
6363
  </div>
6330
6364
  <div
6331
6365
  t-if="!selectedItem"
@@ -6339,12 +6373,14 @@
6339
6373
  <t
6340
6374
  t-component="chartComponent"
6341
6375
  chartId="selectedItem.chartId"
6376
+ isFullScreen="props.isFullScreen"
6342
6377
  t-key="selectedItem.chartId"
6343
6378
  />
6344
6379
  </div>
6345
6380
  <ChartDashboardMenu
6346
6381
  t-if="env.isDashboard()"
6347
6382
  chartId="selectedItem.chartId"
6383
+ hasFullScreenButton="false"
6348
6384
  t-key="selectedItem.chartId"
6349
6385
  />
6350
6386
  </div>
@@ -6395,18 +6431,22 @@
6395
6431
  <div t-if="!env.isDashboard()" class="position-absolute top-0 start-0 pe-none w-100 h-100">
6396
6432
  <div
6397
6433
  class="o-figure-border pe-auto w-100 h-0 position-absolute pb-2"
6434
+ t-att-class="{'o-selected': isSelected}"
6398
6435
  t-att-style="getBorderStyle('top')"
6399
6436
  />
6400
6437
  <div
6401
6438
  class="o-figure-border pe-auto h-100 position-absolute start-0 ps-2"
6439
+ t-att-class="{'o-selected': isSelected}"
6402
6440
  t-att-style="getBorderStyle('left')"
6403
6441
  />
6404
6442
  <div
6405
6443
  class="o-figure-border pe-auto w-100 position-absolute bottom-0 pt-2"
6444
+ t-att-class="{'o-selected': isSelected}"
6406
6445
  t-att-style="getBorderStyle('bottom')"
6407
6446
  />
6408
6447
  <div
6409
6448
  class="o-figure-border pe-auto h-100 position-absolute end-0 pe-2"
6449
+ t-att-class="{'o-selected': isSelected}"
6410
6450
  t-att-style="getBorderStyle('right')"
6411
6451
  />
6412
6452
  </div>
@@ -6609,6 +6649,9 @@
6609
6649
  composerStore="composerStore"
6610
6650
  placeholder="composerStore.placeholder"
6611
6651
  />
6652
+ <span t-if="showFxIcon" class="position-absolute top-50 translate-middle-y ps-2 pe-none">
6653
+ <t t-call="o-spreadsheet-Icon.FX_SVG"/>
6654
+ </span>
6612
6655
  </div>
6613
6656
  </div>
6614
6657
  </t>
@@ -7087,6 +7130,7 @@
7087
7130
  t-ref="sheetNameSpan"
7088
7131
  t-esc="sheetName"
7089
7132
  t-on-pointerdown="(ev) => this.onMouseEventSheetName(ev)"
7133
+ t-on-click="(ev) => this.onMouseEventSheetName(ev)"
7090
7134
  t-on-dblclick="() => this.onDblClick()"
7091
7135
  t-on-focusout="() => this.onFocusOut()"
7092
7136
  t-on-keydown="(ev) => this.onKeyDown(ev)"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.1.0-alpha.2",
3
+ "version": "19.1.0-alpha.4",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -12,6 +12,9 @@
12
12
  "dist/*.d.ts",
13
13
  "dist/*.xml"
14
14
  ],
15
+ "engines": {
16
+ "node": ">=22.0.0"
17
+ },
15
18
  "scripts": {
16
19
  "serve-static": "live-server --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,build/o_spreadsheet.css,main.css,demo",
17
20
  "dev": "npm-run-all --print-label bundle:dev --parallel server serve-static watch",
@@ -20,8 +23,8 @@
20
23
  "bundle:iife": "rollup -c -m -- --format iife",
21
24
  "bundle:esm": "rollup -c -m -- --format esm",
22
25
  "bundle:xml": "node tools/bundle_xml/main.cjs",
23
- "bundle:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build",
24
- "dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run bundle:xml -- --outDir dist && node tools/bundle_scss/main.cjs --out dist",
26
+ "bundle:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\" && node tools/bundle_css/main.cjs --out build",
27
+ "dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run bundle:xml -- --outDir dist && node tools/bundle_css/main.cjs --out dist",
25
28
  "monkey": "SPREADSHEET_MONKEY_COUNT=$npm_config_monkey_count jest 'tests/collaborative/collaborative_monkey_party.test.ts'",
26
29
  "test": "tsc --noEmit --project tsconfig.jest.json && jest",
27
30
  "test:watch": "jest --watch",
@@ -32,10 +35,10 @@
32
35
  "watch:bundle": "npm run bundle:iife -- --watch",
33
36
  "watch:ts": "npm run build:js -- --watch",
34
37
  "watch:xml": "node tools/bundle_xml/watch_xml_templates.cjs",
35
- "watch:scss": "node tools/bundle_scss/watch_scss_files.cjs",
38
+ "watch:css": "node tools/bundle_css/watch_css_files.cjs",
36
39
  "unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.cjs",
37
40
  "zipXlsx": "node tools/bundle_xlsx/zip_xlsx_demo.cjs",
38
- "build": "npm-run-all build:js bundle:esm \"bundle:xml -- --outDir build\" && node tools/bundle_scss/main.cjs --out build",
41
+ "build": "npm-run-all build:js bundle:esm \"bundle:xml -- --outDir build\" && node tools/bundle_css/main.cjs --out build",
39
42
  "lint": "eslint --fix"
40
43
  },
41
44
  "browserslist": [
@@ -85,7 +88,7 @@
85
88
  "jszip": "^3.6.0",
86
89
  "lint-staged": "^12.1.2",
87
90
  "live-server": "^1.2.1",
88
- "luxon": "^3.5.0",
91
+ "luxon": "^3.7.2",
89
92
  "minimist": "^1.2.8",
90
93
  "mockdate": "^3.0.2",
91
94
  "node-watch": "^0.7.3",
@@ -95,7 +98,6 @@
95
98
  "rollup": "^3.28.0",
96
99
  "rollup-plugin-dts": "^5.3.1",
97
100
  "rollup-plugin-typescript2": "^0.35.0",
98
- "sass": "^1.62.1",
99
101
  "seedrandom": "^3.0.5",
100
102
  "typescript": "^5.8.2",
101
103
  "typescript-eslint": "^8.30.1",