diff --git a/README.md b/README.md index 423e7a76..06014855 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,14 @@ We hope to use it in the Odoo web client soon. --- -# Core Utility for Odoo Web Client +# 🦉 Odoo Web Lab 🦉 ## Overview -This repository contains some useful building block for building web applications. -We made some efforts to make sure the code is reusable and generic. However, since this is the basis for the Odoo web client, we will not hesitate to design +Odoo Web Lab (OWL) is a project to collect some useful, reusable, well designed +building block for building web applications. + +However, since this is the basis for the Odoo web client, we will not hesitate to design the code here to better match the Odoo architecture/design principles. Currently, this repository contains: diff --git a/examples/benchmarks/app.js b/examples/benchmarks/app.js index fbd7f5e9..2551c70d 100644 --- a/examples/benchmarks/app.js +++ b/examples/benchmarks/app.js @@ -25,7 +25,7 @@ const template = ` `; -export class App extends odoo.core.Component { +export class App extends owl.core.Component { constructor(parent, props) { super(parent, props); this.inlineTemplate = template; diff --git a/examples/benchmarks/counter.js b/examples/benchmarks/counter.js index be951a18..48686d6c 100644 --- a/examples/benchmarks/counter.js +++ b/examples/benchmarks/counter.js @@ -1,4 +1,4 @@ -export class Counter extends odoo.core.Component { +export class Counter extends owl.core.Component { inlineTemplate = `
diff --git a/examples/benchmarks/main.js b/examples/benchmarks/main.js index 00fee608..ab4b5a20 100644 --- a/examples/benchmarks/main.js +++ b/examples/benchmarks/main.js @@ -2,7 +2,7 @@ import { App } from "./app.js"; function createApp(el) { const env = { - qweb: new odoo.core.QWeb() + qweb: new owl.core.QWeb() }; const app = new App(env, { initialState: 13 }); app.mount(el); diff --git a/examples/benchmarks/message.js b/examples/benchmarks/message.js index 3efec87b..982d8f6e 100644 --- a/examples/benchmarks/message.js +++ b/examples/benchmarks/message.js @@ -1,6 +1,6 @@ import { Counter } from "./counter.js"; -export class Message extends odoo.core.Component { +export class Message extends owl.core.Component { inlineTemplate = `
diff --git a/examples/todoapp/components/TodoApp.js b/examples/todoapp/components/TodoApp.js index 52be9e08..b6be49ca 100644 --- a/examples/todoapp/components/TodoApp.js +++ b/examples/todoapp/components/TodoApp.js @@ -1,7 +1,7 @@ import { TodoItem } from "./TodoItem.js"; -const { Component } = odoo.core; -const { connect } = odoo.extras; +const { Component } = owl.core; +const { connect } = owl.extras; const ENTER_KEY = 13; diff --git a/examples/todoapp/components/TodoItem.js b/examples/todoapp/components/TodoItem.js index c47932b3..6d4e60e3 100644 --- a/examples/todoapp/components/TodoItem.js +++ b/examples/todoapp/components/TodoItem.js @@ -1,7 +1,7 @@ const ENTER_KEY = 13; const ESC_KEY = 27; -export class TodoItem extends odoo.core.Component { +export class TodoItem extends owl.core.Component { template = "todoitem"; state = { isEditing: false }; diff --git a/examples/todoapp/main.js b/examples/todoapp/main.js index 342511b7..c5c83331 100644 --- a/examples/todoapp/main.js +++ b/examples/todoapp/main.js @@ -8,7 +8,7 @@ async function makeEnv() { } let templates = await result.text(); templates = templates.replace(//g, ""); - const qweb = new odoo.core.QWeb(); + const qweb = new owl.core.QWeb(); qweb.loadTemplates(templates); return { qweb, diff --git a/examples/todoapp/store.js b/examples/todoapp/store.js index fb201a09..44d061a1 100644 --- a/examples/todoapp/store.js +++ b/examples/todoapp/store.js @@ -66,7 +66,7 @@ export function makeStore() { ); const nextId = Math.max(0, ...todos.map(t => t.id || 0)) + 1; const state = { todos, nextId }; - const store = new odoo.extras.Store({ state, actions, mutations }); + const store = new owl.extras.Store({ state, actions, mutations }); store.on("update", null, () => { const state = JSON.stringify(store.state.todos); window.localStorage.setItem(LOCALSTORAGE_KEY, state); diff --git a/package.json b/package.json index b7a846bd..6e0469d0 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { - "name": "web-core", + "name": "owl", "version": "0.3.0", - "description": "Core Utils for Odoo Web Client", + "description": "Odoo Web Lab", "main": "src/index.ts", "scripts": { "build:js": "tsc --lib es2017,dom --target esnext --outDir dist/core src/*", diff --git a/rollup.config.js b/rollup.config.js index 8c82d743..7632c971 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -7,8 +7,8 @@ export default { output: { file: "dist/core.js", format: "iife", - name: "odoo", + name: "owl", extend: true, - outro: `exports.core._version = '${version}';\nexports.core._date = '${new Date().toISOString()}';\nexports.core._hash = '${git.short()}';` + outro: `exports._version = '${version}';\nexports._date = '${new Date().toISOString()}';\nexports._hash = '${git.short()}';` } };