A toolkit for Kintone JavaScript customization
Explore the docs »
View Demo
·
Report Bug
·
Request Feature
Table of Contents
Kintool is a development toolkit for Kintone JavaScript customization. It provides a cross-platform JavaScript API, an integrated UI Component library, and a REST API Client.
// Initialization
(async () => {
await kintool.init();
// REST API Client
const getDropdownItems = async () => {
const response = await kintool.api.record.getRecords({
app: "1",
query: 'Account_Status in ("Active")',
});
const items = response.records.map((rec) => rec.Name.value);
return items;
};
// JavaScript API
kintool.events.on("app.record.create.show", async (event) => {
// UI Component
const space = kintool.app.record.getSpaceElement("Name_Space");
const dropdown = new kintool.ui.Dropdown({
label: "Name",
items: await getDropdownItems(),
});
space.appendChild(dropdown);
return event;
});
})();- Kintone App
- Download the latest assets
kintool.zipfrom Releases. - Go to JavaScript and CSS Customization in Kintone App settings.
- Upload
kintool.iife.min.js. - Click on Save and Update App.
CDN is not recommended for production environment. Please download
kintool.iife.min.jsfrom GitHub Releases to prevent any failures and problems associated with CDN.
- Copy the CDN URL.
- Go to JavaScript and CSS Customization in Kintone App settings.
- Paste the CDN URL.
- Click on Save and Update App.
https://cdn.jsdelivr.net/npm/[email protected]/dist/kintool.iife.min.js
https://cdn.jsdelivr.net/npm/[email protected]/dist/kintool.iife.min.js
https://cdn.jsdelivr.net/npm/kintool@x/dist/kintool.iife.min.js
https://cdn.jsdelivr.net/npm/kintool/dist/kintool.iife.min.js
https://unpkg.com/[email protected]/dist/kintool.iife.min.js
https://unpkg.com/[email protected]/dist/kintool.iife.min.js
https://unpkg.com/kintool@x/dist/kintool.iife.min.js
https://unpkg.com/kintool/dist/kintool.iife.min.js
- Install package.
npm install kintool
pnpm add kintool
yarn add kintool
- Import package.
import kintool from "kintool";
(async () => {
await kintool.init();
kintool.events.on("app.record.create.show", (event) => {
return event;
});
})();(async () => {
await kintool.init();
// Access Kintone JavaScript API with kintool
kintool.events.on("app.record.create.show", (event) => {
console.log(kintool.app);
console.log(kintool.space);
console.log(kintool.portal);
console.log(kintool.isMobileApp);
console.log(kintool.events.on);
console.log(kintool.events.off);
return event;
});
})();| API | Description |
|---|---|
| kintool.init({}) | Initialize kintool with optional configuration |
| kintool.events.on(type, handler) | Resolves to app or mobile.app |
| kintool.events.off(type, handler) | Resolves to app or mobile.app |
| kintool.app | Resolves to kintone.app or kintone.mobile.app |
| kintool.space | Resolves to kintone.space or kintone.mobile.space |
| kintool.portal | Resolves to kintone.portal or kintone.mobile.portal |
| kintool.isMobileApp | Boolean indicating mobile environment |
Please refer to Kintone JavaScript API Docs
// Access Kintone UI Component with kintool.ui
const dropdown = new kintool.ui.Dropdown({
label: "Name",
items: users,
});
console.log(dropdown);Please refer to Kintone UI Component Docs
// Access Kintone REST API Client with kintool.api
const response = await kintool.api.record.getRecords({
app: "1",
query: 'Account_Status in ("Active")',
});
console.log(response);Please refer to Kintone REST API Client References
await kintool.init({
api: {
// Kintone REST API Client Parameters
baseUrl: "https://example.kintone.com",
},
});Please refer to Kintone REST API Client Parameters
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feat/amazing-feature) - Commit your Changes (
git commit -m 'feat: add some amazing feature') - Push to the Branch (
git push origin feat/amazing-feature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
Fathul Fahmy - LinkedIn - [email protected]
Project Link: https://github.com/fathulfahmy/kintool