@odoo/o-spreadsheet 18.1.0-alpha.0 → 18.1.0-alpha.1

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.1.0-alpha.0
5
- @date 2024-09-25T13:18:46.133Z
6
- @hash 288f0b7
4
+ @version 18.1.0-alpha.1
5
+ @date 2024-10-14T07:54:16.437Z
6
+ @hash e9ce3aa
7
7
  -->
8
8
  <odoo>
9
9
  <t t-name="o-spreadsheet-ActionButton">
@@ -688,12 +688,11 @@
688
688
  </t>
689
689
 
690
690
  <t t-name="o-spreadsheet-DataValidationCheckbox">
691
- <input
692
- type="checkbox"
693
- class="o-dv-checkbox"
694
- t-att-class="{'pe-none': isDisabled}"
695
- t-on-change="onCheckboxChange"
696
- t-att-checked="checkBoxValue"
691
+ <Checkbox
692
+ name="'data-validation-checkbox'"
693
+ value="checkBoxValue"
694
+ onChange.bind="onCheckboxChange"
695
+ className="isDisabled ? 'pe-none o-dv-checkbox' : 'o-dv-checkbox'"
697
696
  />
698
697
  </t>
699
698
 
@@ -3292,6 +3291,152 @@
3292
3291
  </div>
3293
3292
  </t>
3294
3293
 
3294
+ <t t-name="o-spreadsheet-ComboChartDesignPanel">
3295
+ <GeneralDesignEditor
3296
+ figureId="props.figureId"
3297
+ definition="props.definition"
3298
+ updateChart="props.updateChart">
3299
+ <t t-set-slot="general-extension">
3300
+ <Section class="'pt-0'">
3301
+ <t t-set-slot="title">Legend position</t>
3302
+ <select
3303
+ t-att-value="props.definition.legendPosition ?? 'top'"
3304
+ class="o-input"
3305
+ t-on-change="this.updateLegendPosition">
3306
+ <option value="none">None</option>
3307
+ <option value="top">Top</option>
3308
+ <option value="bottom">Bottom</option>
3309
+ <option value="left">Left</option>
3310
+ <option value="right">Right</option>
3311
+ </select>
3312
+ </Section>
3313
+ <Section class="'pt-0'">
3314
+ <t t-set-slot="title">Values</t>
3315
+ <Checkbox
3316
+ name="'showValues'"
3317
+ label="showValuesLabel"
3318
+ value="props.definition.showValues"
3319
+ onChange="showValues => props.updateChart(this.props.figureId, {showValues})"
3320
+ />
3321
+ </Section>
3322
+ </t>
3323
+ </GeneralDesignEditor>
3324
+ <SidePanelCollapsible collapsedAtInit="true">
3325
+ <t t-set-slot="title">Data series</t>
3326
+ <t t-set-slot="content">
3327
+ <Section class="'pt-0 pb-0'">
3328
+ <select
3329
+ class="o-input data-series-selector"
3330
+ t-model="state.label"
3331
+ t-on-change="(ev) => this.updateSerieEditor(ev)">
3332
+ <t t-foreach="getDataSeries()" t-as="serie" t-key="serie_index">
3333
+ <option
3334
+ t-att-value="serie"
3335
+ t-att-selected="state.index === serie_index"
3336
+ t-esc="serie"
3337
+ />
3338
+ </t>
3339
+ </select>
3340
+ <Section class="'px-0'">
3341
+ <div class="d-flex align-items-center">
3342
+ <t t-set-slot="title">Series color</t>
3343
+ <RoundColorPicker
3344
+ currentColor="getDataSerieColor()"
3345
+ onColorPicked.bind="updateDataSeriesColor"
3346
+ />
3347
+ </div>
3348
+ </Section>
3349
+ <Section class="'pt-0 px-0 o-vertical-axis-selection'" t-if="canHaveTwoVerticalAxis">
3350
+ <t t-set-slot="title">Vertical axis</t>
3351
+ <RadioSelection
3352
+ choices="axisChoices"
3353
+ selectedValue="getDataSerieAxis()"
3354
+ name="'axis'"
3355
+ onChange.bind="updateDataSeriesAxis"
3356
+ />
3357
+ </Section>
3358
+ <Section class="'pt-0 px-0 o-series-type-selection'">
3359
+ <t t-set-slot="title">Serie type</t>
3360
+ <RadioSelection
3361
+ choices="seriesTypeChoices"
3362
+ selectedValue="getDataSeriesType()"
3363
+ name="'seriesType'"
3364
+ onChange.bind="updateDataSeriesType"
3365
+ />
3366
+ </Section>
3367
+ <Section class="'pt-0 px-0'">
3368
+ <t t-set-slot="title">Series name</t>
3369
+ <input
3370
+ class="o-input o-serie-label-editor"
3371
+ type="text"
3372
+ t-att-value="getDataSerieLabel()"
3373
+ t-on-change="(ev) => this.updateDataSeriesLabel(ev)"
3374
+ />
3375
+ </Section>
3376
+ <Section class="'pt-0 px-0 o-show-trend-line'" t-if="!props.definition.horizontal">
3377
+ <t t-set-slot="title">Trend line</t>
3378
+ <t t-set="showTrendLineLabel">Show trend line</t>
3379
+ <t t-set="trend" t-value="getTrendLineConfiguration()"/>
3380
+ <t t-set="trendType" t-value="getTrendType(trend)"/>
3381
+ <Checkbox
3382
+ name="'showTrendLine'"
3383
+ label="showTrendLineLabel"
3384
+ value="trend !== undefined and trend.display"
3385
+ onChange.bind="toggleDataTrend"
3386
+ />
3387
+ <div t-if="trend !== undefined and trend.display">
3388
+ <div class="d-flex py-2">
3389
+ <div class="w-100">
3390
+ <span class="o-section-subtitle">Type</span>
3391
+ <select class="o-input trend-type-selector" t-on-change="this.onChangeTrendType">
3392
+ <option value="linear" t-att-selected="trendType === 'linear'">Linear</option>
3393
+ <option value="exponential" t-att-selected="trendType === 'exponential'">
3394
+ Exponential
3395
+ </option>
3396
+ <option value="polynomial" t-att-selected="trendType === 'polynomial'">
3397
+ Polynomial
3398
+ </option>
3399
+ <option value="logarithmic" t-att-selected="trendType === 'logarithmic'">
3400
+ Logarithmic
3401
+ </option>
3402
+ </select>
3403
+ </div>
3404
+ <div class="w-50 ms-3" t-if="trendType === 'polynomial'">
3405
+ <span class="o-section-subtitle">Degree</span>
3406
+ <input
3407
+ t-att-value="trend.order"
3408
+ type="number"
3409
+ class="w-100 o-input trend-order-input"
3410
+ t-on-change="this.onChangePolynomialDegree"
3411
+ min="1"
3412
+ />
3413
+ </div>
3414
+ </div>
3415
+ <div class="d-flex align-items-center">
3416
+ <span class="o-section-subtitle my-0 pe-2">Trend line color</span>
3417
+ <RoundColorPicker
3418
+ currentColor="getTrendLineColor()"
3419
+ onColorPicked.bind="updateTrendLineColor"
3420
+ />
3421
+ </div>
3422
+ </div>
3423
+ </Section>
3424
+ </Section>
3425
+ </t>
3426
+ </SidePanelCollapsible>
3427
+ <SidePanelCollapsible collapsedAtInit="true">
3428
+ <t t-set-slot="title">Axes</t>
3429
+ <t t-set-slot="content">
3430
+ <AxisDesignEditor
3431
+ axesList="axesList"
3432
+ figureId="props.figureId"
3433
+ definition="props.definition"
3434
+ updateChart="props.updateChart"
3435
+ />
3436
+ </t>
3437
+ </SidePanelCollapsible>
3438
+ </t>
3439
+
3295
3440
  <t t-name="o-spreadsheet-GaugeChartConfigPanel">
3296
3441
  <div>
3297
3442
  <ChartDataSeries
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@odoo/o-spreadsheet",
3
- "version": "18.1.0-alpha.0",
3
+ "version": "18.1.0-alpha.1",
4
4
  "description": "A spreadsheet component",
5
5
  "type": "module",
6
6
  "main": "dist/o-spreadsheet.cjs.js",
@@ -13,27 +13,27 @@
13
13
  "dist/*.xml"
14
14
  ],
15
15
  "scripts": {
16
- "serve-static": "live-server --open=demo --watch=build/o_spreadsheet.dev.js,build/o_spreadsheet.xml,demo",
17
- "dev": "npm-run-all --print-label buildDev --parallel server serve-static watch:*",
16
+ "serve-static": "live-server --open=demo --watch=build/o_spreadsheet.iife.js,build/o_spreadsheet.xml,demo",
17
+ "dev": "npm-run-all --print-label bundle:dev --parallel server serve-static watch",
18
18
  "server": "node tools/server/main.cjs",
19
19
  "build:js": "tsc --module es6 --incremental",
20
- "build:bundleJsDev": "rollup -c -m --configDev",
21
- "build:bundleJs": "rollup -c -m --configDist",
22
- "build:bundleXml": "node tools/bundle_xml/main.cjs",
23
- "buildDev": "npm-run-all build:js build:bundleJsDev \"build:bundleXml -- --outDir build\"",
24
- "build": "npm-run-all build:js build:bundleJs \"build:bundleXml -- --outDir build\"",
25
- "precommit": "npm run prettier && npm run doc",
20
+ "bundle:iife": "rollup -c -m -- --format iife",
21
+ "bundle:esm": "rollup -c -m -- --format esm",
22
+ "bundle:xml": "node tools/bundle_xml/main.cjs",
23
+ "bundle:dev": "npm-run-all build:js bundle:iife \"bundle:xml -- --outDir build\"",
24
+ "dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run bundle:xml -- --outDir dist",
26
25
  "test": "tsc --noEmit --project tsconfig.jest.json && jest",
27
26
  "test:watch": "jest --watch",
28
27
  "prettier": "prettier . --write",
29
28
  "check-formatting": "prettier . --check",
30
- "dist": "tsc --module es6 --declaration --declarationDir dist/types && rollup -c && npm run build:bundleXml -- --outDir dist",
31
29
  "prepare": "husky install",
32
- "watch:bundle": "npm run build:bundleJsDev -- --watch",
30
+ "watch": "npm-run-all -p watch:*",
31
+ "watch:bundle": "npm run bundle:iife -- --watch",
33
32
  "watch:ts": "npm run build:js -- --watch",
34
33
  "watch:xml": "node tools/bundle_xml/watch_xml_templates.cjs",
35
34
  "unzipXlsx": "node tools/bundle_xlsx/unzip_xlsx_demo.cjs",
36
- "zipXlsx": "node tools/bundle_xlsx/zip_xlsx_demo.cjs"
35
+ "zipXlsx": "node tools/bundle_xlsx/zip_xlsx_demo.cjs",
36
+ "build": "npm-run-all build:js bundle:esm \"bundle:xml -- --outDir build\""
37
37
  },
38
38
  "browserslist": [
39
39
  "last 1 Chrome versions"