@odoo/o-spreadsheet 18.5.0-alpha.11 → 18.5.0-alpha.13

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 18.5.0-alpha.11
5
- @date 2025-08-26T10:14:56.034Z
6
- @hash b913e49
4
+ @version 18.5.0-alpha.13
5
+ @date 2025-09-05T07:42:22.231Z
6
+ @hash ae74b5b
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -53,8 +53,13 @@
53
53
  </div>
54
54
  </div>
55
55
  <!-- Toolbar and Cell Content -->
56
- <div class="d-flex o-topbar-responsive" t-ref="toolBarContainer">
57
- <div class="o-topbar-toolbar d-flex">
56
+ <div
57
+ class="d-flex o-topbar-responsive"
58
+ t-att-class="{'o-topbar-responsive': !env.model.getters.isReadonly()}"
59
+ t-ref="toolBarContainer">
60
+ <div
61
+ class="o-topbar-toolbar d-flex"
62
+ t-att-class="{'flex-shrink-0': env.model.getters.isReadonly()}">
58
63
  <!-- Toolbar -->
59
64
  <div
60
65
  t-if="env.model.getters.isReadonly()"
@@ -2341,30 +2346,6 @@
2341
2346
  </label>
2342
2347
  </t>
2343
2348
 
2344
- <t t-name="o-spreadsheet-CarouselItemTitleCollapsible">
2345
- <SidePanelCollapsible
2346
- class="'o-carousel-item-title'"
2347
- isInitiallyCollapsed="true"
2348
- title.translate="Carousel Title">
2349
- <t t-set-slot="content">
2350
- <div class="ps-4">
2351
- <TextInput
2352
- value="title"
2353
- onChange.bind="updateTitle"
2354
- placeholder.translate="Title"
2355
- alwaysShowBorder="true"
2356
- />
2357
- <TextStyler
2358
- style="style"
2359
- updateStyle.bind="updateStyle"
2360
- defaultStyle="defaultStyle"
2361
- hasHorizontalAlign="false"
2362
- />
2363
- </div>
2364
- </t>
2365
- </SidePanelCollapsible>
2366
- </t>
2367
-
2368
2349
  <t t-name="o-spreadsheet.BadgeSelection">
2369
2350
  <div class="d-flex w-100 o-badge-selection">
2370
2351
  <t t-foreach="props.choices" t-as="choice" t-key="choice.value">
@@ -4125,66 +4106,65 @@
4125
4106
 
4126
4107
  <t t-name="o-spreadsheet-CarouselPanel">
4127
4108
  <div class="o-carousel-panel h-100 overflow-auto">
4109
+ <Section title.translate="Carousel Title" class="'o-carousel-title'">
4110
+ <TextInput
4111
+ value="title?.text ?? ''"
4112
+ onChange.bind="updateTitleText"
4113
+ placeholder.translate="Add a Title"
4114
+ alwaysShowBorder="true"
4115
+ />
4116
+ <TextStyler
4117
+ style="title ?? {}"
4118
+ updateStyle.bind="updateTitleStyle"
4119
+ defaultStyle="DEFAULT_CAROUSEL_TITLE_STYLE"
4120
+ hasHorizontalAlign="false"
4121
+ />
4122
+ </Section>
4123
+ <div class="o-section pb-1 pt-0">
4124
+ <div class="o-section-title">Carousel Sections</div>
4125
+ </div>
4128
4126
  <div class="o-carousel-preview-list overflow-auto" t-ref="previewList">
4129
- <div
4130
- t-foreach="carouselItems"
4131
- t-as="item"
4132
- t-key="getItemId(item)"
4133
- class="o-carousel-preview position-relative d-flex align-items-center border-bottom ps-1 pe-2 pt-3 pb-2 w-100"
4134
- t-att-class="{ 'o-dragging': dragAndDrop.draggedItemId === getItemId(item) }"
4135
- t-att-style="getPreviewDivStyle(item)">
4127
+ <t t-foreach="carouselItems" t-as="item" t-key="getItemId(item)">
4136
4128
  <div
4137
- class="o-drag-handle position-absolute ps-1 flex-shrink-0"
4138
- t-on-pointerdown.stop.prevent="(ev) => this.onDragHandleMouseDown(item, ev)">
4139
- <t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/>
4140
- </div>
4141
- <div class="flex-grow-1">
4142
- <div class="d-flex align-items-center">
4143
- <div
4144
- class="o-carousel-preview-icon ms-3 flex-shrink-0 d-flex align-items-center justify-content-center">
4145
- <t t-call="{{getItemPreview(item)}}"/>
4146
- </div>
4147
- <div class="o-carousel-preview-title text-truncate ms-2">
4148
- <TextInput
4149
- value="getItemTitle(item)"
4150
- onChange="(newName) => this.renameCarouselItem(item, newName)"
4151
- />
4152
- </div>
4153
- <div class="ms-auto"/>
4154
- <div
4155
- t-if="item.type === 'chart'"
4156
- class="o-edit-button o-button-icon pe-2 ps-1 flex-shrink-0 fa fa-pencil"
4157
- t-on-click.stop="(ev) => this.editCarouselItem(item, ev)"
4158
- title="Edit chart"
4159
- />
4160
- <div
4161
- class="o-delete-button o-button-icon pe-2 ps-1 flex-shrink-0"
4162
- t-on-click.stop="(ev) => this.deleteCarouselItem(item, ev)"
4163
- title="Remove chart">
4164
- <t t-call="o-spreadsheet-Icon.TRASH_FILLED"/>
4165
- </div>
4129
+ class="o-carousel-preview border-bottom pe-2 position-relative w-100 d-flex align-items-center"
4130
+ t-att-class="{
4131
+ 'o-dragging': dragAndDrop.draggedItemId === getItemId(item),
4132
+ 'o-selected': isCarouselItemActive(item)
4133
+ }"
4134
+ t-att-style="getPreviewDivStyle(item)">
4135
+ <div
4136
+ class="o-drag-handle h-100 position-absolute d-flex align-items-center o-button-icon ps-1 flex-shrink-0"
4137
+ t-on-pointerdown.stop.prevent="(ev) => this.onDragHandleMouseDown(item, ev)">
4138
+ <t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/>
4139
+ </div>
4140
+ <div
4141
+ class="o-carousel-preview-icon ms-3 flex-shrink-0 d-flex align-items-center justify-content-center">
4142
+ <t t-call="{{getItemPreview(item)}}"/>
4166
4143
  </div>
4167
- <div class="ms-3">
4168
- <CarouselItemTitleCollapsible
4169
- carouselTitle="item.carouselTitle"
4170
- onUpdateCarouselTitle="(style) => this.onUpdateCarouselTitle(item_index, style)"
4144
+ <div class="o-carousel-preview-title text-truncate ms-2">
4145
+ <TextInput
4146
+ value="getItemTitle(item)"
4147
+ onChange="(newName) => this.renameCarouselItem(item, newName)"
4171
4148
  />
4172
4149
  </div>
4150
+ <div class="ms-auto"/>
4151
+ <div class="flex-shrink-0 d-flex align-self-start me-1">
4152
+ <CogWheelMenu items="getCogWheelMenuItems(item)"/>
4153
+ </div>
4173
4154
  </div>
4174
- </div>
4155
+ </t>
4175
4156
  </div>
4176
4157
  <div
4177
- class="o-button-link o-carousel-add-chart float-end d-flex align-items-center pt-4 pe-4 gap-2"
4178
- t-on-click="addNewChartToCarousel">
4158
+ class="o-button-link o-carousel-add-chart float-end d-flex align-items-center py-4 pe-4 gap-2"
4159
+ t-on-click="addNewChartToCarousel"
4160
+ t-att-title="carouselAddChartInfoMessage">
4179
4161
  + Add chart
4180
- <span t-att-title="carouselAddChartInfoMessage">
4181
- <t t-call="o-spreadsheet-Icon.CIRCLE_INFO"/>
4182
- </span>
4183
4162
  </div>
4184
4163
  <div
4185
4164
  t-if="!hasDataView"
4186
- class="o-button-link o-carousel-add-data-view float-end pt-4 pe-4"
4187
- t-on-click="addDataViewToCarousel">
4165
+ class="o-button-link o-carousel-add-data-view float-end py-4 pe-4"
4166
+ t-on-click="addDataViewToCarousel"
4167
+ t-att-title="carouselDataViewMessage">
4188
4168
  + Add data view
4189
4169
  </div>
4190
4170
  </div>
@@ -5117,6 +5097,11 @@
5117
5097
  <i class="fa fa-pencil-square-o"/>
5118
5098
  </div>
5119
5099
  </t>
5100
+ <t t-name="o-spreadsheet-Icon.EXTERNAL">
5101
+ <div class="o-icon">
5102
+ <i class="fa fa-external-link"/>
5103
+ </div>
5104
+ </t>
5120
5105
  <t t-name="o-spreadsheet-Icon.UNLINK">
5121
5106
  <div class="o-icon">
5122
5107
  <i class="fa fa-chain-broken"/>
@@ -5557,6 +5542,14 @@
5557
5542
  />
5558
5543
  </svg>
5559
5544
  </t>
5545
+ <t t-name="o-spreadsheet-Icon.DATA">
5546
+ <svg class="o-icon" viewBox="0 0 18 18">
5547
+ <path
5548
+ fill="currentColor"
5549
+ d="M.5 1.5a1 1 0 0 1 1-1h15a1 1 0 0 1 1 1v15a1 1 0 0 1-1 1h-15a1 1 0 0 1-1-1zM6 6V1.5H1.5V6m10 0V1.5h-5V6m10 0V1.5H12V6m-6 5.5v-5H1.5v5m10 0v-5h-5v5m10 0v-5H12v5m-6 5V12H1.5v4.5m10 0V12h-5v4.5m10 0V12H12v4.5"
5550
+ />
5551
+ </svg>
5552
+ </t>
5560
5553
 
5561
5554
  <t t-name="o-spreadsheet-IconPicker">
5562
5555
  <div class="o-icon-picker">
@@ -6035,10 +6028,12 @@
6035
6028
  </t>
6036
6029
 
6037
6030
  <t t-name="o-spreadsheet-FullScreenChart">
6038
- <div
6039
- class="position-absolute o-fullscreen-chart-overlay w-100 h-100 d-flex"
6040
- t-if="chartId"
6041
- t-on-click="exitFullScreen">
6031
+ <div class="position-absolute o-fullscreen-chart-overlay w-100 h-100 d-flex" t-if="chartId">
6032
+ <div
6033
+ class="position-absolute top-0 start-0 end-0 bottom-0"
6034
+ t-on-click="exitFullScreen"
6035
+ aria-hidden="true"
6036
+ />
6042
6037
  <button
6043
6038
  class="o-exit top-0 end-0 position-absolute o-button primary m-1 shadow"
6044
6039
  t-on-click="exitFullScreen">
@@ -6292,20 +6287,17 @@
6292
6287
  <div class="o-carousel w-100 h-100 d-flex flex-column" t-on-dblclick="onCarouselDoubleClick">
6293
6288
  <t t-set="selectedItem" t-value="selectedCarouselItem"/>
6294
6289
  <div
6295
- class="o-carousel-header d-flex flex-shrink-0 pe-1 rounded pe-auto"
6290
+ class="o-carousel-header d-flex align-items-baseline flex-shrink-0 pe-1 pe-auto"
6296
6291
  t-att-class="{
6292
+ 'border-bottom': env.isDashboard(),
6297
6293
  'o-carousel-header-floating': !env.isDashboard() and selectedItem?.type === 'carouselDataView',
6298
6294
  }"
6299
6295
  t-att-style="headerStyle">
6300
- <div
6301
- class="o-carousel-title d-flex align-items-center"
6302
- t-esc="title"
6303
- t-att-style="titleStyle"
6304
- />
6296
+ <div class="o-carousel-title text-truncate" t-esc="title" t-att-style="titleStyle"/>
6305
6297
  <div class="ms-auto d-flex">
6306
6298
  <t t-foreach="carousel.items" t-as="item" t-key="item_index">
6307
6299
  <div
6308
- class="o-carousel-tab text-truncate px-2 mt-1 mb-1 flex-shrink-0"
6300
+ class="o-carousel-tab text-truncate px-2 mt-1 flex-shrink-0"
6309
6301
  t-att-class="{ 'selected': isItemSelected(item) }"
6310
6302
  t-esc="getItemTitle(item)"
6311
6303
  t-on-click.stop="() => this.onCarouselTabClick(item)"
@@ -6318,7 +6310,9 @@
6318
6310
  class="o-carousel-empty w-100 flex-fill d-flex align-items-center justify-content-center">
6319
6311
  <t t-call="o-spreadsheet-Icon.CAROUSEL"/>
6320
6312
  </div>
6321
- <div t-elif="selectedItem.type === 'chart'" class="o-carousel-content w-100 flex-fill">
6313
+ <div
6314
+ t-elif="selectedItem.type === 'chart'"
6315
+ class="o-carousel-content w-100 flex-fill position-relative">
6322
6316
  <div class="o-chart-container w-100 h-100">
6323
6317
  <t
6324
6318
  t-component="chartComponent"
@@ -6326,6 +6320,11 @@
6326
6320
  t-key="selectedItem.chartId"
6327
6321
  />
6328
6322
  </div>
6323
+ <ChartDashboardMenu
6324
+ t-if="env.isDashboard()"
6325
+ chartId="selectedItem.chartId"
6326
+ t-key="selectedItem.chartId"
6327
+ />
6329
6328
  </div>
6330
6329
  </div>
6331
6330
  </t>
@@ -6535,8 +6534,13 @@
6535
6534
  t-on-click="(ev) => this.selectClickableCell(ev, clickableCell)"
6536
6535
  t-on-auxclick="(ev) => this.selectClickableCell(ev, clickableCell)"
6537
6536
  t-on-contextmenu.prevent=""
6538
- t-att-style="getCellClickableStyle(clickableCell.coordinates)"
6539
- />
6537
+ t-att-style="getCellClickableStyle(clickableCell.coordinates)">
6538
+ <t
6539
+ t-if="clickableCell.component"
6540
+ t-component="clickableCell.component"
6541
+ t-props="clickableCell.componentProps"
6542
+ />
6543
+ </div>
6540
6544
  </GridOverlay>
6541
6545
  <canvas t-ref="canvas"/>
6542
6546
  <GridPopover
@@ -6551,6 +6555,14 @@
6551
6555
  </div>
6552
6556
  </t>
6553
6557
 
6558
+ <t t-name="o-spreadsheet-ClickableCellSortIcon">
6559
+ <div class="w-100 h-100 d-flex flex-column align-items-end justify-content-end">
6560
+ <span class="o-icon h-100 sorting-icon pb-1" t-att-style="style">
6561
+ <i class="fa fa-small" t-att-class="icon"/>
6562
+ </span>
6563
+ </div>
6564
+ </t>
6565
+
6554
6566
  <t t-name="o-spreadsheet-TopBarComposer">
6555
6567
  <div class="o-topbar-composer-container w-100">
6556
6568
  <div
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.5.0-alpha.11",
3
+ "version": "18.5.0-alpha.13",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",