@odoo/o-spreadsheet 19.1.0-alpha.10 → 19.1.0-alpha.11

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.10
5
- @date 2025-10-30T12:27:22.089Z
6
- @hash d0b65e9
4
+ @version 19.1.0-alpha.11
5
+ @date 2025-11-03T12:35:22.290Z
6
+ @hash d9230f3
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ValidationMessages">
@@ -153,6 +153,21 @@
153
153
  </Popover>
154
154
  </t>
155
155
 
156
+ <div t-name="o-spreadsheet-TopBarZoom" t-ref="buttonRef" t-on-click.stop="">
157
+ <NumberEditor
158
+ currentValue="currentFontSize"
159
+ onValueChange.bind="this.setZoom"
160
+ class="props.class"
161
+ onToggle.bind="this.toggle"
162
+ onFocusInput.bind="this.onFocusInput"
163
+ valueIcon="'%'"
164
+ min="25"
165
+ max="300"
166
+ valueList="valueList"
167
+ title.translate="Zoom"
168
+ />
169
+ </div>
170
+
156
171
  <div t-name="o-spreadsheet-NumberFormatsTool" t-ref="buttonRef" t-on-click.stop="">
157
172
  <ActionButton
158
173
  action="formatNumberMenuItemSpec"
@@ -4474,6 +4489,43 @@
4474
4489
  />
4475
4490
  </t>
4476
4491
 
4492
+ <t t-name="o-spreadsheet-NumberEditor">
4493
+ <div class="o-dropdown" t-ref="NumberEditor">
4494
+ <div
4495
+ class="o-number-editor d-flex align-items-center"
4496
+ t-att-class="props.class"
4497
+ t-att-title="props.title"
4498
+ t-on-click="this.toggleList">
4499
+ <input
4500
+ type="number"
4501
+ t-att-min="props.min"
4502
+ t-att-max="props.max"
4503
+ class="o-font-size o-number-input bg-transparent border-0"
4504
+ t-on-keydown="onInputKeydown"
4505
+ t-on-wheel.prevent.stop=""
4506
+ t-on-click.stop="props.onFocusInput"
4507
+ t-on-focus.stop="onInputFocused"
4508
+ t-on-change="setValueFromInput"
4509
+ t-ref="inputNumber"
4510
+ />
4511
+ <t t-esc="props.valueIcon"/>
4512
+ <span>
4513
+ <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
4514
+ </span>
4515
+ </div>
4516
+ <Popover t-if="dropdown.isOpen" t-props="popoverProps">
4517
+ <div class="o-text-options bg-white" t-on-click.stop="" t-ref="numberList">
4518
+ <t t-foreach="props.valueList" t-as="value" t-key="value">
4519
+ <div t-att-data-size="value" t-on-click="() => this.setValueFromList(value)">
4520
+ <t t-esc="value"/>
4521
+ <t t-esc="props.valueIcon"/>
4522
+ </div>
4523
+ </t>
4524
+ </div>
4525
+ </Popover>
4526
+ </div>
4527
+ </t>
4528
+
4477
4529
  <t t-name="o-spreadsheet-Menu-Popover">
4478
4530
  <Popover t-if="props.menuItems" t-props="popoverProps">
4479
4531
  <div t-ref="menu" class="o-menu-wrapper" t-on-mouseover="() => this.onMouseOverMainMenu()">
@@ -5410,6 +5462,11 @@
5410
5462
  <i class="fa fa-search"/>
5411
5463
  </div>
5412
5464
  </t>
5465
+ <t t-name="o-spreadsheet-Icon.ZOOM">
5466
+ <div class="o-icon">
5467
+ <i class="fa fa-search-plus"/>
5468
+ </div>
5469
+ </t>
5413
5470
  <t t-name="o-spreadsheet-Icon.CHECK">
5414
5471
  <svg class="o-icon" viewBox="0 0 24 24">
5415
5472
  <path
@@ -5873,7 +5930,7 @@
5873
5930
 
5874
5931
  <t t-name="o-spreadsheet-RowResizer">
5875
5932
  <div
5876
- class="o-row-resizer"
5933
+ class="o-row-resizer o-zoomable"
5877
5934
  t-ref="rowResizer"
5878
5935
  t-on-pointermove.self="onMouseMove"
5879
5936
  t-on-mouseleave="onMouseLeave"
@@ -5917,7 +5974,7 @@
5917
5974
 
5918
5975
  <t t-name="o-spreadsheet-ColResizer">
5919
5976
  <div
5920
- class="o-col-resizer d-flex"
5977
+ class="o-col-resizer d-flex o-zoomable"
5921
5978
  t-ref="colResizer"
5922
5979
  t-on-pointermove.self="onMouseMove"
5923
5980
  t-on-mouseleave="onMouseLeave"
@@ -6076,7 +6133,7 @@
6076
6133
  </div>
6077
6134
  <div
6078
6135
  t-ref="gridOverlay"
6079
- class="o-grid-overlay overflow-hidden"
6136
+ class="o-grid-overlay overflow-hidden o-zoomable"
6080
6137
  t-att-class="{'o-paint-format-cursor': isPaintingFormat}"
6081
6138
  t-att-style="style"
6082
6139
  t-on-pointerdown="onPointerDown"
@@ -6121,7 +6178,7 @@
6121
6178
 
6122
6179
  <t t-name="o-spreadsheet-Grid">
6123
6180
  <div
6124
- class="o-grid w-100 h-100"
6181
+ class="o-grid w-100 h-100 o-zoomable"
6125
6182
  tabindex="-1"
6126
6183
  composerFocusableElement="true"
6127
6184
  t-on-click="focusDefaultElement"
@@ -6222,40 +6279,17 @@
6222
6279
  </t>
6223
6280
 
6224
6281
  <t t-name="o-spreadsheet-FontSizeEditor">
6225
- <div class="o-dropdown" t-ref="FontSizeEditor">
6226
- <div
6227
- class=" o-font-size-editor d-flex align-items-center"
6228
- t-att-class="props.class"
6229
- title="Font Size"
6230
- t-on-click="this.toggleFontList">
6231
- <input
6232
- type="number"
6233
- min="1"
6234
- max="400"
6235
- class="o-font-size o-number-input bg-transparent border-0"
6236
- t-on-keydown="onInputKeydown"
6237
- t-on-wheel.prevent.stop=""
6238
- t-on-click.stop="props.onFocusInput"
6239
- t-on-focus.stop="onInputFocused"
6240
- t-on-change="setSizeFromInput"
6241
- t-ref="inputFontSize"
6242
- />
6243
- <span>
6244
- <t t-call="o-spreadsheet-Icon.CARET_DOWN"/>
6245
- </span>
6246
- </div>
6247
- <Popover t-if="dropdown.isOpen" t-props="popoverProps">
6248
- <div class="o-text-options bg-white" t-on-click.stop="" t-ref="fontSizeList">
6249
- <t t-foreach="fontSizes" t-as="fontSize" t-key="fontSize">
6250
- <div
6251
- t-esc="fontSize"
6252
- t-att-data-size="fontSize"
6253
- t-on-click="() => this.setSizeFromList(fontSize)"
6254
- />
6255
- </t>
6256
- </div>
6257
- </Popover>
6258
- </div>
6282
+ <NumberEditor
6283
+ currentValue="props.currentFontSize"
6284
+ onValueChange="props.onFontSizeChanged"
6285
+ class="props.class"
6286
+ onToggle="props.onToggle"
6287
+ onFocusInput="props.onFocusInput"
6288
+ min="1"
6289
+ max="400"
6290
+ valueList="fontSizes"
6291
+ title.translate="Font Size"
6292
+ />
6259
6293
  </t>
6260
6294
 
6261
6295
  <t t-name="o-spreadsheet-FilterMenuValueList">
@@ -6851,21 +6885,12 @@
6851
6885
  <div class="o-formula-assistant" t-if="context.functionDescription.name">
6852
6886
  <div class="o-formula-assistant-head d-flex flex-row justify-content-between">
6853
6887
  <div>
6854
- <span t-esc="context.functionDescription.name"/>
6855
- (
6856
- <t t-foreach="context.functionDescription.args" t-as="arg" t-key="arg.name">
6857
- <span t-if="arg_index > '0'" t-esc="formulaArgSeparator"/>
6888
+ <t t-foreach="formulaHeaderContent" t-as="part" t-key="part_index">
6858
6889
  <span
6859
- t-att-class="{ 'o-formula-assistant-focus': context.argsToFocus.includes(arg_index) }">
6860
- <span>
6861
- <span t-if="arg.optional || arg.repeating || arg.default">[</span>
6862
- <span t-esc="arg.name"/>
6863
- <span t-if="arg.repeating">, ...</span>
6864
- <span t-if="arg.optional || arg.repeating || arg.default">]</span>
6865
- </span>
6866
- </span>
6890
+ t-esc="part.content"
6891
+ t-att-class="part.focused ? 'o-formula-assistant-focus' : ''"
6892
+ />
6867
6893
  </t>
6868
- )
6869
6894
  </div>
6870
6895
  <div
6871
6896
  class="collapsor px-2 d-flex align-items-center rounded"
@@ -6883,22 +6908,29 @@
6883
6908
  <div t-esc="context.functionDescription.description"/>
6884
6909
  </div>
6885
6910
 
6911
+ <t
6912
+ t-set="firstRepeatableGroupOptional"
6913
+ t-value="context.functionDescription.args.some(arg => arg.repeating and arg.optional)"
6914
+ />
6915
+
6886
6916
  <t t-foreach="context.functionDescription.args" t-as="arg" t-key="arg.name">
6887
6917
  <div
6888
6918
  class="o-formula-assistant-arg p-3 pt-0 display-flex flex-column"
6889
- t-att-class="{
6890
- 'o-formula-assistant-gray': context.argsToFocus.length > 0,
6891
- 'o-formula-assistant-focus': context.argsToFocus.includes(arg_index),
6892
- }">
6893
- <div>
6894
- <span t-esc="arg.name"/>
6919
+ t-att-class="{'o-formula-assistant-gray': context.argsToFocus.length > 0}">
6920
+ <div
6921
+ t-att-class="{'o-formula-assistant-focus': context.argsToFocus.includes(arg_index)}">
6922
+ <span t-if="arg.repeating">
6923
+ <span t-esc="arg.name + (context.repeatingArgGroupIndex + 1)"/>
6924
+ </span>
6925
+ <span t-else="">
6926
+ <span t-esc="arg.name"/>
6927
+ </span>
6895
6928
  <span
6896
- t-if="arg.optional || arg.repeating || arg.default ">&#xA0;- [optional]&#xA0;</span>
6929
+ t-if="arg.optional || arg.default || (arg.repeating and (firstRepeatableGroupOptional or context.repeatingArgGroupIndex > 0))">&#xA0;- [optional]&#xA0;</span>
6897
6930
  <span t-if="arg.default">
6898
6931
  <span>default:&#xA0;</span>
6899
6932
  <t t-esc="arg.defaultValue"/>
6900
6933
  </span>
6901
- <span t-if="arg.repeating">repeatable</span>
6902
6934
  </div>
6903
6935
  <div class="o-formula-assistant-arg-description" t-esc="arg.description"/>
6904
6936
  </div>
@@ -6976,6 +7008,7 @@
6976
7008
  t-if="functionDescriptionState.showDescription"
6977
7009
  functionDescription="functionDescriptionState.functionDescription"
6978
7010
  argsToFocus="functionDescriptionState.argsToFocus"
7011
+ repeatingArgGroupIndex="functionDescriptionState.repeatingArgGroupIndex"
6979
7012
  />
6980
7013
  <div
6981
7014
  t-if="functionDescriptionState.showDescription and autoCompleteProposals.length"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "19.1.0-alpha.10",
3
+ "version": "19.1.0-alpha.11",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",