@odoo/o-spreadsheet 17.3.0-alpha.0 → 17.3.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.
@@ -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 17.3.0-alpha.0
5
- @date 2024-03-20T13:43:11.141Z
6
- @hash 073e154
4
+ @version 17.3.0-alpha.2
5
+ @date 2024-04-05T14:01:48.832Z
6
+ @hash 8c5a229
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -276,7 +276,7 @@
276
276
  t-on-dblclick="() => this.onDblClick()"
277
277
  t-on-focusout="() => this.onFocusOut()"
278
278
  t-on-keydown="(ev) => this.onKeyDown(ev)"
279
- t-att-contenteditable="state.isEditing ? 'plaintext-only': 'false'"
279
+ t-att-contenteditable="state.isEditing ? 'true': 'false'"
280
280
  />
281
281
  <span class="o-sheet-icon ms-1" t-on-click.stop="(ev) => this.onIconClick(ev)">
282
282
  <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
@@ -285,7 +285,7 @@
285
285
  </Ripple>
286
286
  </t>
287
287
 
288
- <t t-name="o-spreadsheet-BottomBarStatisic">
288
+ <t t-name="o-spreadsheet-BottomBarStatistic">
289
289
  <t t-set="selectedStatistic" t-value="getSelectedStatistic()"/>
290
290
  <Ripple class="'ms-auto'" t-if="selectedStatistic !== undefined">
291
291
  <div
@@ -507,7 +507,7 @@
507
507
  }">
508
508
  <t t-set="context" t-value="getContext()"/>
509
509
  <div
510
- class="o-formula-assistant bg-white"
510
+ class="o-formula-assistant"
511
511
  t-if="context.functionName"
512
512
  t-on-pointermove="onMouseMove"
513
513
  t-att-class="{'opacity-25': assistantState.allowCellSelectionBehind}">
@@ -515,7 +515,7 @@
515
515
  <span t-esc="context.functionName"/>
516
516
  (
517
517
  <t t-foreach="context.functionDescription.args" t-as="arg" t-key="arg.name">
518
- <span t-if="arg_index > '0'">,&#xA0;</span>
518
+ <span t-if="arg_index > '0'" t-esc="formulaArgSeparator"/>
519
519
  <span t-att-class="{ 'o-formula-assistant-focus': context.argToFocus === arg_index }">
520
520
  <span>
521
521
  <span t-if="arg.optional || arg.repeating || arg.default">[</span>
@@ -1008,7 +1008,12 @@
1008
1008
  class="o-grid-add-rows mt-2 ms-2 w-100 d-flex position-relative align-items-center"
1009
1009
  t-att-style="addRowsPosition"
1010
1010
  t-on-pointerdown.stop.prevent="">
1011
- <button t-on-click="onConfirm" t-att-disabled="state.errorFlag" class="o-button">Add</button>
1011
+ <button
1012
+ t-on-click="onConfirm"
1013
+ t-att-disabled="state.errorFlag"
1014
+ class="o-button o-button-grey">
1015
+ Add
1016
+ </button>
1012
1017
  <input
1013
1018
  type="text"
1014
1019
  class="o-grid-add-rows-input o-input mt-0 me-2"
@@ -1204,25 +1209,22 @@
1204
1209
  t-as="hiddenItem"
1205
1210
  t-key="hiddenItem_index">
1206
1211
  <div
1207
- class="o-unhide-buttons position-relative float-end"
1212
+ class="position-absolute end-0 translate-middle-y"
1208
1213
  t-att-style="getUnhideButtonStyle(hiddenItem[0])">
1209
- <t t-if="!hiddenItem.includes(0)">
1210
- <div
1211
- class="o-unhide rounded mb-1"
1212
- t-att-data-index="hiddenItem_index"
1213
- t-on-click="() => this.unhide(hiddenItem)">
1214
- <t t-call="o-spreadsheet-Icon.TRIANGLE_UP"/>
1215
- </div>
1216
- </t>
1217
- <t
1218
- t-if="!hiddenItem.includes(env.model.getters.getNumberRows(env.model.getters.getActiveSheetId())-1)">
1219
- <div
1220
- class="o-unhide rounded"
1221
- t-att-data-index="hiddenItem_index"
1222
- t-on-click="() => this.unhide(hiddenItem)">
1223
- <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1224
- </div>
1225
- </t>
1214
+ <div
1215
+ class="o-unhide rounded mb-1"
1216
+ t-att-class="{'invisible': hiddenItem.includes(0)}"
1217
+ t-att-data-index="hiddenItem_index"
1218
+ t-on-click="() => this.unhide(hiddenItem)">
1219
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_UP"/>
1220
+ </div>
1221
+ <div
1222
+ class="o-unhide rounded"
1223
+ t-att-class="{'invisible': hiddenItem.includes(env.model.getters.getNumberRows(env.model.getters.getActiveSheetId())-1)}"
1224
+ t-att-data-index="hiddenItem_index"
1225
+ t-on-click="() => this.unhide(hiddenItem)">
1226
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_DOWN"/>
1227
+ </div>
1226
1228
  </div>
1227
1229
  </t>
1228
1230
  </div>
@@ -1263,25 +1265,22 @@
1263
1265
  t-as="hiddenItem"
1264
1266
  t-key="hiddenItem_index">
1265
1267
  <div
1266
- class="o-unhide-buttons position-relative h-100 d-flex align-items-center"
1268
+ class="position-absolute h-100 d-flex align-items-center translate-middle-x gap-2"
1267
1269
  t-att-style="getUnhideButtonStyle(hiddenItem[0])">
1268
- <t t-if="!hiddenItem.includes(0)">
1269
- <div
1270
- class="o-unhide rounded"
1271
- t-att-data-index="hiddenItem_index"
1272
- t-on-click="() => this.unhide(hiddenItem)">
1273
- <t t-call="o-spreadsheet-Icon.TRIANGLE_LEFT"/>
1274
- </div>
1275
- </t>
1276
- <t
1277
- t-if="!hiddenItem.includes(env.model.getters.getNumberCols(env.model.getters.getActiveSheetId())-1)">
1278
- <div
1279
- class="o-unhide rounded"
1280
- t-att-data-index="hiddenItem_index"
1281
- t-on-click="() => this.unhide(hiddenItem)">
1282
- <t t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"/>
1283
- </div>
1284
- </t>
1270
+ <div
1271
+ class="o-unhide rounded"
1272
+ t-att-class="{'invisible': hiddenItem.includes(0)}"
1273
+ t-att-data-index="hiddenItem_index"
1274
+ t-on-click="() => this.unhide(hiddenItem)">
1275
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_LEFT"/>
1276
+ </div>
1277
+ <div
1278
+ class="o-unhide rounded"
1279
+ t-att-class="{'invisible': hiddenItem.includes(env.model.getters.getNumberCols(env.model.getters.getActiveSheetId())-1)}"
1280
+ t-att-data-index="hiddenItem_index"
1281
+ t-on-click="() => this.unhide(hiddenItem)">
1282
+ <t t-call="o-spreadsheet-Icon.TRIANGLE_RIGHT"/>
1283
+ </div>
1285
1284
  </div>
1286
1285
  </t>
1287
1286
  </div>
@@ -2158,7 +2157,7 @@ https://fontawesome.com/license -->
2158
2157
  <svg class="o-icon" viewBox="0 0 24 24">
2159
2158
  <path
2160
2159
  fill="currentColor"
2161
- d="M18.707 7.293a1 1 0 0 1 0 1.414L11.414 16a2 2 0 0 1-2.828 0l-3.293-3.293a1 1 0 1 1 1.414-1.414L10 14.586l7.293-7.293a1 1 0 0 1 1.414 0z"
2160
+ d="M18.707 7.293a1 1 0 0 1 0 1.414L11.414 16a1.8 2 0 0 1-2.828 0l-3.293-3.293a1 1 0 1 1 1.414-1.414L10 14.586l7.293-7.293a1 1 0 0 1 1.414 0z"
2162
2161
  />
2163
2162
  </svg>
2164
2163
  </t>
@@ -2312,6 +2311,14 @@ https://fontawesome.com/license -->
2312
2311
  />
2313
2312
  </svg>
2314
2313
  </t>
2314
+ <t t-name="o-spreadsheet-Icon.CIRCLE_INFO">
2315
+ <svg class="o-icon" viewBox="0 0 18 18" xmlns="http://www.w3.org/2000/svg">
2316
+ <path
2317
+ fill="currentColor"
2318
+ d="M9 .55a8.4 8.4 0 1 0 8.4 8.4A8.4 8.4 0 0 0 9 .55M7.6 4.155a1.4 1.4 0 1 1 1.4 1.4 1.4 1.4 0 0 1-1.4-1.4m4.9 8.995a.7.7 0 0 1-.7.7H6.9a.7.7 0 1 1 0-1.4h1.4v-4.2h-.7a.7.7 0 0 1 0-1.4h2.8v5.6h1.4a.7.7 0 0 1 .7.7"
2319
+ />
2320
+ </svg>
2321
+ </t>
2315
2322
 
2316
2323
  <t t-name="o-spreadsheet-LinkDisplay">
2317
2324
  <div class="o-link-tool d-flex align-items-center">
@@ -2394,8 +2401,8 @@ https://fontawesome.com/license -->
2394
2401
  onClose="() => this.menu.isOpen=false"
2395
2402
  />
2396
2403
  <div class="o-buttons">
2397
- <button t-on-click="cancel" class="o-button o-cancel">Cancel</button>
2398
- <button t-on-click="save" class="o-button o-save" t-att-disabled="!link.url">
2404
+ <button t-on-click="cancel" class="o-button o-button-grey o-cancel">Cancel</button>
2405
+ <button t-on-click="save" class="o-button o-button-grey o-save" t-att-disabled="!link.url">
2399
2406
  Confirm
2400
2407
  </button>
2401
2408
  </div>
@@ -2428,7 +2435,7 @@ https://fontawesome.com/license -->
2428
2435
  t-att-class="{'disabled': !isMenuEnabled, 'o-menu-item-active': isActive(menuItem)}"
2429
2436
  t-att-style="getColor(menuItem)">
2430
2437
  <div class="d-flex w-100">
2431
- <div t-if="childrenHaveIcon" class="o-menu-item-icon align-middle">
2438
+ <div t-if="childrenHaveIcon" class="o-menu-item-icon align-middle flex-shrink-0">
2432
2439
  <t t-if="getIconName(menuItem)" t-call="{{getIconName(menuItem)}}"/>
2433
2440
  </div>
2434
2441
  <div class="o-menu-item-name align-middle text-truncate" t-esc="getName(menuItem)"/>
@@ -2707,6 +2714,74 @@ https://fontawesome.com/license -->
2707
2714
  </Section>
2708
2715
  </t>
2709
2716
 
2717
+ <t t-name="o-spreadsheet-ComboChartConfigPanel">
2718
+ <div>
2719
+ <ChartDataSeries
2720
+ ranges="this.getDataSeriesRanges()"
2721
+ onSelectionChanged="(ranges) => this.onDataSeriesRangesChanged(ranges)"
2722
+ onSelectionConfirmed="() => this.onDataSeriesConfirmed()"
2723
+ />
2724
+ <ChartLabelRange
2725
+ range="this.getLabelRange()"
2726
+ isInvalid="isLabelInvalid"
2727
+ onSelectionChanged="(ranges) => this.onLabelRangeChanged(ranges)"
2728
+ onSelectionConfirmed="() => this.onLabelRangeConfirmed()"
2729
+ options="this.getLabelRangeOptions()"
2730
+ />
2731
+ <Section class="'o-use-right-axis py-0'">
2732
+ <Checkbox
2733
+ name="'shouldUseRightAxis'"
2734
+ label="shouldUseRightAxis"
2735
+ value="props.definition.useBothYAxis"
2736
+ onChange.bind="onUpdateUseRightAxis"
2737
+ />
2738
+ </Section>
2739
+ <Section class="'o-use-row-as-headers py-0'" t-if="calculateHeaderPosition()">
2740
+ <Checkbox
2741
+ name="'dataSetsHaveTitle'"
2742
+ label="dataSetsHaveTitleLabel"
2743
+ value="props.definition.dataSetsHaveTitle"
2744
+ onChange.bind="onUpdateDataSetsHaveTitle"
2745
+ />
2746
+ </Section>
2747
+
2748
+ <ChartErrorSection t-if="errorMessages.length" messages="errorMessages"/>
2749
+ </div>
2750
+ </t>
2751
+
2752
+ <t t-name="o-spreadsheet-ComboChartDesignPanel">
2753
+ <div>
2754
+ <ChartColor
2755
+ currentColor="props.definition.background"
2756
+ onColorPicked.bind="updateBackgroundColor"
2757
+ />
2758
+ <ChartTitle title="title" update.bind="updateTitle"/>
2759
+ <Section t-if="!props.definition.useBothYAxis">
2760
+ <t t-set-slot="title">Vertical axis position</t>
2761
+ <select
2762
+ t-att-value="props.definition.verticalAxisPosition"
2763
+ class="o-input"
2764
+ t-on-change="(ev) => this.updateSelect('verticalAxisPosition', ev)">
2765
+ <option value="left">Left</option>
2766
+ <option value="right">Right</option>
2767
+ </select>
2768
+ </Section>
2769
+ <Section>
2770
+ <t t-set-slot="title">Legend position</t>
2771
+ <select
2772
+ t-att-value="props.definition.legendPosition"
2773
+ class="o-input"
2774
+ t-on-change="(ev) => this.updateSelect('legendPosition', ev)">
2775
+ <option value="none">None</option>
2776
+ <option value="top">Top</option>
2777
+ <option value="bottom">Bottom</option>
2778
+ <option value="left">Left</option>
2779
+ <option value="right">Right</option>
2780
+ </select>
2781
+ </Section>
2782
+ </div>
2783
+ </t>
2784
+
2710
2785
  <t t-name="o-spreadsheet-GaugeChartConfigPanel">
2711
2786
  <div>
2712
2787
  <ChartDataSeries
@@ -3145,7 +3220,8 @@ https://fontawesome.com/license -->
3145
3220
  <label
3146
3221
  class="o-checkbox"
3147
3222
  t-att-title="props.title"
3148
- t-att-class="{'text-muted': props.disabled }">
3223
+ t-att-class="{'text-muted': props.disabled }"
3224
+ t-attf-class="{{props.className}}">
3149
3225
  <input
3150
3226
  type="checkbox"
3151
3227
  t-att-disabled="props.disabled"
@@ -3340,8 +3416,12 @@ https://fontawesome.com/license -->
3340
3416
  <t t-set="rule" t-value="state.rules.iconSet"/>
3341
3417
  </t>
3342
3418
  <div class="o-sidePanelButtons">
3343
- <button t-on-click="props.onExitEdition" class="o-button o-cf-cancel">Cancel</button>
3344
- <button t-on-click="saveConditionalFormat" class="o-button primary o-cf-save">
3419
+ <button t-on-click="props.onExitEdition" class="o-button o-button-grey o-cf-cancel">
3420
+ Cancel
3421
+ </button>
3422
+ <button
3423
+ t-on-click="saveConditionalFormat"
3424
+ class="o-button o-button-grey primary o-cf-save">
3345
3425
  Save
3346
3426
  </button>
3347
3427
  </div>
@@ -3685,7 +3765,7 @@ https://fontawesome.com/license -->
3685
3765
  </Section>
3686
3766
  <div class="o-sidePanelButtons">
3687
3767
  <button
3688
- class="o-button"
3768
+ class="o-button o-button-grey"
3689
3769
  t-on-click="() => this.apply()"
3690
3770
  t-att-disabled="!formatProposals.length || isSameFormat">
3691
3771
  Apply
@@ -3804,7 +3884,7 @@ https://fontawesome.com/license -->
3804
3884
  </div>
3805
3885
  <div class="mb-2"/>
3806
3886
  </t>
3807
- <button class="o-dv-list-add-value o-button mb-3" t-on-click="onAddAnotherValue">
3887
+ <button class="o-dv-list-add-value o-button o-button-grey mb-3" t-on-click="onAddAnotherValue">
3808
3888
  Add another item
3809
3889
  </button>
3810
3890
 
@@ -3871,10 +3951,10 @@ https://fontawesome.com/license -->
3871
3951
  </Section>
3872
3952
 
3873
3953
  <div class="o-sidePanelButtons">
3874
- <button t-on-click="props.onExit" class="o-dv-cancel o-button">Cancel</button>
3954
+ <button t-on-click="props.onExit" class="o-dv-cancel o-button o-button-grey">Cancel</button>
3875
3955
  <button
3876
3956
  t-on-click="onSave"
3877
- class="o-dv-save o-button primary"
3957
+ class="o-dv-save o-button o-button-grey primary"
3878
3958
  t-att-class="{'o-disabled': !canSave }">
3879
3959
  Save
3880
3960
  </button>
@@ -3973,13 +4053,13 @@ https://fontawesome.com/license -->
3973
4053
  <button
3974
4054
  t-att-disabled="!hasSearchResult"
3975
4055
  t-on-click="() => store.selectPreviousMatch()"
3976
- class="o-button">
4056
+ class="o-button o-button-grey">
3977
4057
  Previous
3978
4058
  </button>
3979
4059
  <button
3980
4060
  t-att-disabled="!hasSearchResult"
3981
4061
  t-on-click="() => store.selectNextMatch()"
3982
- class="o-button">
4062
+ class="o-button o-button-grey">
3983
4063
  Next
3984
4064
  </button>
3985
4065
  </div>
@@ -3999,13 +4079,13 @@ https://fontawesome.com/license -->
3999
4079
  <button
4000
4080
  t-att-disabled="store.selectedMatchIndex === null"
4001
4081
  t-on-click="() => store.replace()"
4002
- class="o-button">
4082
+ class="o-button o-button-grey">
4003
4083
  Replace
4004
4084
  </button>
4005
4085
  <button
4006
4086
  t-att-disabled="store.selectedMatchIndex === null"
4007
4087
  t-on-click="() => store.replaceAll()"
4008
- class="o-button">
4088
+ class="o-button o-button-grey">
4009
4089
  Replace all
4010
4090
  </button>
4011
4091
  </div>
@@ -4063,7 +4143,7 @@ https://fontawesome.com/license -->
4063
4143
 
4064
4144
  <div class="o-sidePanelButtons">
4065
4145
  <button
4066
- class="o-button"
4146
+ class="o-button o-button-grey"
4067
4147
  t-att-class="{'o-disabled': !canConfirm}"
4068
4148
  t-on-click="onRemoveDuplicates">
4069
4149
  Remove duplicates
@@ -4181,7 +4261,7 @@ https://fontawesome.com/license -->
4181
4261
 
4182
4262
  <div class="o-sidePanelButtons">
4183
4263
  <button
4184
- class="o-button"
4264
+ class="o-button o-button-grey"
4185
4265
  t-att-class="{'o-disabled': isConfirmDisabled}"
4186
4266
  t-on-click="confirm">
4187
4267
  Confirm
@@ -4264,7 +4344,7 @@ https://fontawesome.com/license -->
4264
4344
  <Section>
4265
4345
  <t t-set-slot="title">Data range</t>
4266
4346
  <SelectionInput
4267
- t-key="props.table.id"
4347
+ t-key="props.table.type"
4268
4348
  ranges="[this.state.tableXc]"
4269
4349
  hasSingleRange="true"
4270
4350
  onSelectionChanged="(ranges) => this.onRangeChanged(ranges)"
@@ -4277,6 +4357,20 @@ https://fontawesome.com/license -->
4277
4357
  value="tableConfig.automaticAutofill"
4278
4358
  onChange="(val) => this.updateTableConfig('automaticAutofill', val)"
4279
4359
  />
4360
+ <div class="d-flex flex-row align-items-center">
4361
+ <Checkbox
4362
+ label="getCheckboxLabel('isDynamic')"
4363
+ name="'isDynamic'"
4364
+ value="props.table.type === 'dynamic'"
4365
+ onChange.bind="this.updateTableIsDynamic"
4366
+ disabled="!this.canBeDynamic"
4367
+ />
4368
+ <div
4369
+ class="o-info-icon d-flex flex-row align-items-center text-muted ps-1"
4370
+ t-att-title="dynamicTableTooltip">
4371
+ <t t-call="o-spreadsheet-Icon.CIRCLE_INFO"/>
4372
+ </div>
4373
+ </div>
4280
4374
  </Section>
4281
4375
  <div class="o-sidePanelButtons">
4282
4376
  <button t-on-click="deleteTable" class="o-table-delete o-button">Delete table</button>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "17.3.0-alpha.0",
3
+ "version": "17.3.0-alpha.2",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -88,9 +88,9 @@
88
88
  "rollup-plugin-dts": "^5.3.1",
89
89
  "rollup-plugin-typescript2": "^0.35.0",
90
90
  "ts-jest": "^29.1.0",
91
- "typedoc": "0.24.8",
92
- "typedoc-plugin-markdown": "3.11.1",
93
- "typescript": "^5.1.6",
91
+ "typedoc": "0.25.12",
92
+ "typedoc-plugin-markdown": "3.17.1",
93
+ "typescript": "^5.4.3",
94
94
  "xml-formatter": "^2.4.0"
95
95
  },
96
96
  "prettier": {
@@ -100,7 +100,7 @@
100
100
  "xmlSelfClosingSpace": false
101
101
  },
102
102
  "dependencies": {
103
- "@odoo/owl": "2.2.7",
103
+ "@odoo/owl": "2.2.10",
104
104
  "bootstrap": "^5.1.3",
105
105
  "rbush": "^3.0.1"
106
106
  },