@odoo/o-spreadsheet 17.4.0-alpha.1 → 17.4.0-alpha.3

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.4.0-alpha.1
5
- @date 2024-06-03T15:31:14.056Z
6
- @hash cb56c37
4
+ @version 17.4.0-alpha.3
5
+ @date 2024-06-10T09:39:39.895Z
6
+ @hash a45ed6a
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -2780,7 +2780,7 @@
2780
2780
  class="o-input data-series-selector"
2781
2781
  t-model="state.label"
2782
2782
  t-on-change="(ev) => this.updateSerieEditor(ev)">
2783
- <t t-foreach="getDataSeries()" t-as="serie" t-key="serie" t-index="index">
2783
+ <t t-foreach="getDataSeries()" t-as="serie" t-key="serie_index">
2784
2784
  <option
2785
2785
  t-att-value="serie"
2786
2786
  t-att-selected="state.index === serie_index"
@@ -4286,6 +4286,31 @@
4286
4286
  </t>
4287
4287
  </t>
4288
4288
 
4289
+ <t t-name="o-spreadsheet-PivotDeferUpdate">
4290
+ <Section
4291
+ class="'align-items-center border-top d-flex flex-row justify-content-between py-1 pivot-defer-update'">
4292
+ <Checkbox
4293
+ label="deferUpdatesLabel"
4294
+ title="deferUpdatesTooltip"
4295
+ value="props.deferUpdate"
4296
+ onChange="(value) => props.toggleDeferUpdate(value)"
4297
+ />
4298
+ <div t-if="props.isDirty">
4299
+ <i
4300
+ class="btn btn-sm pe-0 fa fa-undo"
4301
+ title="Discard all changes"
4302
+ t-on-click="() => props.discard()"
4303
+ />
4304
+ <span
4305
+ class="btn btm-sm btn-link sp_apply_update"
4306
+ title="Apply all changes"
4307
+ t-on-click="() => props.apply()">
4308
+ Update
4309
+ </span>
4310
+ </div>
4311
+ </Section>
4312
+ </t>
4313
+
4289
4314
  <t t-name="o-spreadsheet-AddDimensionButton">
4290
4315
  <span class="btn btn-sm btn-link add-dimension" t-on-click="togglePopover" t-ref="button">
4291
4316
  Add
@@ -4332,9 +4357,9 @@
4332
4357
  <div class="d-flex flex-row">
4333
4358
  <div class="d-flex flex-row py-1 px-2 w-100 small">
4334
4359
  <t t-set="granularity" t-value="props.dimension.granularity"/>
4335
- <div class="flex-basis-50">Granularity</div>
4360
+ <div class="pivot-dim-operator-label">Granularity</div>
4336
4361
  <select
4337
- class="o_input flex-basis-50"
4362
+ class="o_input flex-grow-1"
4338
4363
  t-on-change="(ev) => props.onUpdated(props.dimension, ev.target.value)">
4339
4364
  <option
4340
4365
  t-foreach="props.allGranularities"
@@ -4353,9 +4378,9 @@
4353
4378
  <t t-name="o-spreadsheet-PivotDimensionOrder">
4354
4379
  <div class="d-flex">
4355
4380
  <div class="d-flex py-1 px-2 w-100 small">
4356
- <div class="flex-basis-50">Order by</div>
4381
+ <div class="pivot-dim-operator-label">Order by</div>
4357
4382
  <select
4358
- class="o_input flex-basis-50"
4383
+ class="o_input flex-grow-1"
4359
4384
  t-on-change="(ev) => props.onUpdated(props.dimension, ev.target.value)">
4360
4385
  <option value="asc" t-att-selected="props.dimension.order === 'asc'">Ascending</option>
4361
4386
  <option value="desc" t-att-selected="props.dimension.order === 'desc'">Descending</option>
@@ -4439,9 +4464,9 @@
4439
4464
  <PivotDimension dimension="measure" onRemoved.bind="removeMeasureDimension">
4440
4465
  <div class="d-flex flex-row small">
4441
4466
  <div class="d-flex flex-row py-1 px-2 w-100">
4442
- <div class="flex-basis-50">Aggregated by</div>
4467
+ <div class="pivot-dim-operator-label">Aggregated by</div>
4443
4468
  <select
4444
- class="o_input flex-basis-50"
4469
+ class="o_input flex-grow-1"
4445
4470
  t-on-change="(ev) => this.updateAggregator(measure, ev.target.value)">
4446
4471
  <option
4447
4472
  t-foreach="Object.keys(AGGREGATORS[measure.type])"
@@ -4520,30 +4545,13 @@
4520
4545
  <button class="btn btn-link sp_delete" t-on-click="delete">Delete</button>
4521
4546
  </Section>
4522
4547
  </div>
4523
- <Section
4524
- class="'align-items-center border-top d-flex flex-row justify-content-between py-1 pivot-defer-update'">
4525
- <Checkbox
4526
- label="deferUpdatesLabel"
4527
- title="deferUpdatesTooltip"
4528
- value="store.updatesAreDeferred"
4529
- onChange="(value) => store.deferUpdates(value)"
4530
- />
4531
- <div>
4532
- <i
4533
- t-if="store.isDirty"
4534
- class="btn btn-sm pe-0 fa fa-undo"
4535
- title="Discard all changes"
4536
- t-on-click="() => store.discardPendingUpdate()"
4537
- />
4538
- <span
4539
- t-if="store.isDirty"
4540
- class="btn btm-sm btn-link sp_apply_update"
4541
- title="Apply all changes"
4542
- t-on-click="() => store.applyUpdate()">
4543
- Update
4544
- </span>
4545
- </div>
4546
- </Section>
4548
+ <PivotDeferUpdate
4549
+ deferUpdate="store.updatesAreDeferred"
4550
+ toggleDeferUpdate="(value) => store.deferUpdates(value)"
4551
+ isDirty="store.isDirty"
4552
+ discard="store.discardPendingUpdate"
4553
+ apply="store.applyUpdate"
4554
+ />
4547
4555
  </div>
4548
4556
  </t>
4549
4557
 
@@ -4648,20 +4656,30 @@
4648
4656
  <div class="o-sidePanelTitle" t-esc="getTitle()"/>
4649
4657
  <div class="o-sidePanelClose" t-on-click="close">✕</div>
4650
4658
  </div>
4651
- <div class="o-sidePanelBody">
4652
- <t
4653
- t-component="panel.Body"
4654
- t-props="sidePanelStore.panelProps"
4655
- onCloseSidePanel.bind="close"
4656
- t-key="'Body_' + sidePanelStore.componentTag + sidePanelStore.panelKey"
4657
- />
4658
- </div>
4659
- <div class="o-sidePanelFooter" t-if="panel?.Footer">
4660
- <t
4661
- t-component="panel.Footer"
4662
- t-props="sidePanelStore.panelProps"
4663
- t-key="'Footer_' + sidePanelStore.componentTag"
4664
- />
4659
+ <div class="o-sidePanelBody-container d-flex flex-grow-1 ">
4660
+ <div class="o-sidePanel-handle-container d-flex align-items-center">
4661
+ <div
4662
+ class="o-sidePanel-handle"
4663
+ t-on-pointerdown="startHandleDrag"
4664
+ t-on-dblclick="sidePanelStore.resetPanelSize">
4665
+ <t t-call="o-spreadsheet-Icon.THIN_DRAG_HANDLE"/>
4666
+ </div>
4667
+ </div>
4668
+ <div class="o-sidePanelBody">
4669
+ <t
4670
+ t-component="panel.Body"
4671
+ t-props="sidePanelStore.panelProps"
4672
+ onCloseSidePanel.bind="close"
4673
+ t-key="'Body_' + sidePanelStore.componentTag + sidePanelStore.panelKey"
4674
+ />
4675
+ </div>
4676
+ <div class="o-sidePanelFooter" t-if="panel?.Footer">
4677
+ <t
4678
+ t-component="panel.Footer"
4679
+ t-props="sidePanelStore.panelProps"
4680
+ t-key="'Footer_' + sidePanelStore.componentTag"
4681
+ />
4682
+ </div>
4665
4683
  </div>
4666
4684
  </div>
4667
4685
  </t>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "17.4.0-alpha.1",
3
+ "version": "17.4.0-alpha.3",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",