-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[MIG] web_widget_bokeh_chart: Migration to 16.0
- Loading branch information
1 parent
c6e2c39
commit 4639a13
Showing
18 changed files
with
1,451 additions
and
1,334 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
# generated from manifests external_dependencies | ||
bokeh==3.1.1 | ||
plotly==5.13.1 | ||
bokeh==2.4.2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,6 @@ | |
* Lois Rilo Antelo <[email protected]> | ||
* Artem Kostyuk <[email protected]> | ||
* Christopher Ormaza <[email protected]> | ||
* Enric Tobella <[email protected]> | ||
* Oriol Miranda Garrido <[email protected]> | ||
* Bernat Puig Font <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
You need to install the python bokeh library:: | ||
|
||
pip3 install bokeh==2.4.2 | ||
pip3 install bokeh==3.1.1 |
56 changes: 28 additions & 28 deletions
56
web_widget_bokeh_chart/static/src/js/web_widget_bokeh_chart.esm.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
/** @odoo-module **/ | ||
|
||
import basicFields from "web.basic_fields"; | ||
import fieldRegistry from "web.field_registry"; | ||
|
||
const BokehChartWidget = basicFields.FieldChar.extend({ | ||
jsLibs: [ | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-2.4.2.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-api-2.4.2.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-widgets-2.4.2.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-tables-2.4.2.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-mathjax-2.4.2.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-gl-2.4.2.min.js", | ||
], | ||
_renderReadonly: function () { | ||
try { | ||
const val = JSON.parse(this.value); | ||
this.$el.html(val.div); | ||
const script = document.createElement("script"); | ||
script.setAttribute("type", "text/javascript"); | ||
if ("textContent" in script) script.textContent = val.script; | ||
else script.text = val.script; | ||
this.$el.append(script); | ||
} catch (error) { | ||
return this._super(...arguments); | ||
} | ||
}, | ||
}); | ||
|
||
fieldRegistry.add("bokeh_chart", BokehChartWidget); | ||
import {CharField} from "@web/views/fields/char/char_field"; | ||
import {registry} from "@web/core/registry"; | ||
import {loadBundle} from "@web/core/assets"; | ||
const {onWillStart, markup} = owl; | ||
class BokehChartWidget extends CharField { | ||
setup() { | ||
super.setup(); | ||
onWillStart(() => | ||
loadBundle({ | ||
jsLibs: [ | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-3.1.1.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-api-3.1.1.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-widgets-3.1.1.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-tables-3.1.1.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-mathjax-3.1.1.min.js", | ||
"/web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-gl-3.1.1.min.js", | ||
], | ||
}) | ||
); | ||
} | ||
get json_value() { | ||
var value = JSON.parse(this.props.value); | ||
value.div = markup(value.div.trim()); | ||
return value; | ||
} | ||
} | ||
BokehChartWidget.template = "web_widget_bokeh_chart.BokehChartField"; | ||
registry.category("fields").add("bokeh_chart", BokehChartWidget); | ||
|
||
export default BokehChartWidget; |
596 changes: 0 additions & 596 deletions
596
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-2.4.2.min.js
This file was deleted.
Oops, something went wrong.
690 changes: 690 additions & 0 deletions
690
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-3.1.1.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
53 changes: 0 additions & 53 deletions
53
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-api-2.4.2.min.js
This file was deleted.
Oops, something went wrong.
60 changes: 60 additions & 0 deletions
60
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-api-3.1.1.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
74 changes: 0 additions & 74 deletions
74
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-gl-2.4.2.min.js
This file was deleted.
Oops, something went wrong.
67 changes: 67 additions & 0 deletions
67
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-gl-3.1.1.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
328 changes: 0 additions & 328 deletions
328
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-mathjax-2.4.2.min.js
This file was deleted.
Oops, something went wrong.
329 changes: 329 additions & 0 deletions
329
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-mathjax-3.1.1.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
132 changes: 0 additions & 132 deletions
132
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-tables-2.4.2.min.js
This file was deleted.
Oops, something went wrong.
132 changes: 132 additions & 0 deletions
132
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-tables-3.1.1.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
118 changes: 0 additions & 118 deletions
118
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-widgets-2.4.2.min.js
This file was deleted.
Oops, something went wrong.
129 changes: 129 additions & 0 deletions
129
web_widget_bokeh_chart/static/src/lib/bokeh/bokeh-widgets-3.1.1.min.js
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8" ?> | ||
<templates xml:space="preserve"> | ||
<t t-name="web_widget_bokeh_chart.BokehChartField" owl="1"> | ||
<t t-out="json_value.div" /> | ||
<script type="text/javascript" t-out="json_value.script" /> | ||
</t> | ||
</templates> |