Kintone plugin 実装
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -47,7 +47,7 @@ export default defineComponent({
|
|||||||
|
|
||||||
const closeDg = (val:string) => {
|
const closeDg = (val:string) => {
|
||||||
if (val == 'OK') {
|
if (val == 'OK') {
|
||||||
selectedField.value = appDg.value.selected[0].name;
|
selectedField.value = appDg.value.selected[0].code;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
32
plugin/kintone-addin/.github/workflows/main.yml
vendored
32
plugin/kintone-addin/.github/workflows/main.yml
vendored
@@ -1,32 +0,0 @@
|
|||||||
name: CI
|
|
||||||
on: [push]
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
name: Build, lint, and test on Node ${{ matrix.node }} and ${{ matrix.os }}
|
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
node: ['10.x', '12.x', '14.x']
|
|
||||||
os: [ubuntu-latest, windows-latest, macOS-latest]
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout repo
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
|
|
||||||
- name: Use Node ${{ matrix.node }}
|
|
||||||
uses: actions/setup-node@v1
|
|
||||||
with:
|
|
||||||
node-version: ${{ matrix.node }}
|
|
||||||
|
|
||||||
- name: Install deps and build (with cache)
|
|
||||||
uses: bahmutov/npm-install@v1
|
|
||||||
|
|
||||||
- name: Lint
|
|
||||||
run: yarn lint
|
|
||||||
|
|
||||||
- name: Test
|
|
||||||
run: yarn test --ci --coverage --maxWorkers=2
|
|
||||||
|
|
||||||
- name: Build
|
|
||||||
run: yarn build
|
|
||||||
12
plugin/kintone-addin/.github/workflows/size.yml
vendored
12
plugin/kintone-addin/.github/workflows/size.yml
vendored
@@ -1,12 +0,0 @@
|
|||||||
name: size
|
|
||||||
on: [pull_request]
|
|
||||||
jobs:
|
|
||||||
size:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
env:
|
|
||||||
CI_JOB_NUMBER: 1
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- uses: andresz1/size-limit-action@v1
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
4
plugin/kintone-addin/.gitignore
vendored
4
plugin/kintone-addin/.gitignore
vendored
@@ -1,4 +0,0 @@
|
|||||||
*.log
|
|
||||||
.DS_Store
|
|
||||||
node_modules
|
|
||||||
dist
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2023 maxiaozhe@alicorns.co.jp
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
@@ -1,103 +0,0 @@
|
|||||||
# TSDX User Guide
|
|
||||||
|
|
||||||
Congrats! You just saved yourself hours of work by bootstrapping this project with TSDX. Let’s get you oriented with what’s here and how to use it.
|
|
||||||
|
|
||||||
> This TSDX setup is meant for developing libraries (not apps!) that can be published to NPM. If you’re looking to build a Node app, you could use `ts-node-dev`, plain `ts-node`, or simple `tsc`.
|
|
||||||
|
|
||||||
> If you’re new to TypeScript, checkout [this handy cheatsheet](https://devhints.io/typescript)
|
|
||||||
|
|
||||||
## Commands
|
|
||||||
|
|
||||||
TSDX scaffolds your new library inside `/src`.
|
|
||||||
|
|
||||||
To run TSDX, use:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm start # or yarn start
|
|
||||||
```
|
|
||||||
|
|
||||||
This builds to `/dist` and runs the project in watch mode so any edits you save inside `src` causes a rebuild to `/dist`.
|
|
||||||
|
|
||||||
To do a one-off build, use `npm run build` or `yarn build`.
|
|
||||||
|
|
||||||
To run tests, use `npm test` or `yarn test`.
|
|
||||||
|
|
||||||
## Configuration
|
|
||||||
|
|
||||||
Code quality is set up for you with `prettier`, `husky`, and `lint-staged`. Adjust the respective fields in `package.json` accordingly.
|
|
||||||
|
|
||||||
### Jest
|
|
||||||
|
|
||||||
Jest tests are set up to run with `npm test` or `yarn test`.
|
|
||||||
|
|
||||||
### Bundle Analysis
|
|
||||||
|
|
||||||
[`size-limit`](https://github.com/ai/size-limit) is set up to calculate the real cost of your library with `npm run size` and visualize the bundle with `npm run analyze`.
|
|
||||||
|
|
||||||
#### Setup Files
|
|
||||||
|
|
||||||
This is the folder structure we set up for you:
|
|
||||||
|
|
||||||
```txt
|
|
||||||
/src
|
|
||||||
index.tsx # EDIT THIS
|
|
||||||
/test
|
|
||||||
blah.test.tsx # EDIT THIS
|
|
||||||
.gitignore
|
|
||||||
package.json
|
|
||||||
README.md # EDIT THIS
|
|
||||||
tsconfig.json
|
|
||||||
```
|
|
||||||
|
|
||||||
### Rollup
|
|
||||||
|
|
||||||
TSDX uses [Rollup](https://rollupjs.org) as a bundler and generates multiple rollup configs for various module formats and build settings. See [Optimizations](#optimizations) for details.
|
|
||||||
|
|
||||||
### TypeScript
|
|
||||||
|
|
||||||
`tsconfig.json` is set up to interpret `dom` and `esnext` types, as well as `react` for `jsx`. Adjust according to your needs.
|
|
||||||
|
|
||||||
## Continuous Integration
|
|
||||||
|
|
||||||
### GitHub Actions
|
|
||||||
|
|
||||||
Two actions are added by default:
|
|
||||||
|
|
||||||
- `main` which installs deps w/ cache, lints, tests, and builds on all pushes against a Node and OS matrix
|
|
||||||
- `size` which comments cost comparison of your library on every pull request using [`size-limit`](https://github.com/ai/size-limit)
|
|
||||||
|
|
||||||
## Optimizations
|
|
||||||
|
|
||||||
Please see the main `tsdx` [optimizations docs](https://github.com/palmerhq/tsdx#optimizations). In particular, know that you can take advantage of development-only optimizations:
|
|
||||||
|
|
||||||
```js
|
|
||||||
// ./types/index.d.ts
|
|
||||||
declare var __DEV__: boolean;
|
|
||||||
|
|
||||||
// inside your code...
|
|
||||||
if (__DEV__) {
|
|
||||||
console.log('foo');
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
You can also choose to install and use [invariant](https://github.com/palmerhq/tsdx#invariant) and [warning](https://github.com/palmerhq/tsdx#warning) functions.
|
|
||||||
|
|
||||||
## Module Formats
|
|
||||||
|
|
||||||
CJS, ESModules, and UMD module formats are supported.
|
|
||||||
|
|
||||||
The appropriate paths are configured in `package.json` and `dist/index.js` accordingly. Please report if any issues are found.
|
|
||||||
|
|
||||||
## Named Exports
|
|
||||||
|
|
||||||
Per Palmer Group guidelines, [always use named exports.](https://github.com/palmerhq/typescript#exports) Code split inside your React app instead of your React library.
|
|
||||||
|
|
||||||
## Including Styles
|
|
||||||
|
|
||||||
There are many ways to ship styles, including with CSS-in-JS. TSDX has no opinion on this, configure how you like.
|
|
||||||
|
|
||||||
For vanilla CSS, you can include it at the root directory and add it to the `files` section in your `package.json`, so that it can be imported separately by your users and run through their bundler's loader.
|
|
||||||
|
|
||||||
## Publishing to NPM
|
|
||||||
|
|
||||||
We recommend using [np](https://github.com/sindresorhus/np).
|
|
||||||
12945
plugin/kintone-addin/package-lock.json
generated
12945
plugin/kintone-addin/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,57 +0,0 @@
|
|||||||
{
|
|
||||||
"version": "0.1.0",
|
|
||||||
"license": "MIT",
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"typings": "dist/index.d.ts",
|
|
||||||
"files": [
|
|
||||||
"dist",
|
|
||||||
"src"
|
|
||||||
],
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"scripts": {
|
|
||||||
"start": "tsdx watch",
|
|
||||||
"build": "tsdx build",
|
|
||||||
"test": "tsdx test",
|
|
||||||
"lint": "tsdx lint",
|
|
||||||
"prepare": "tsdx build",
|
|
||||||
"size": "size-limit",
|
|
||||||
"analyze": "size-limit --why"
|
|
||||||
},
|
|
||||||
"husky": {
|
|
||||||
"hooks": {
|
|
||||||
"pre-commit": "tsdx lint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"prettier": {
|
|
||||||
"printWidth": 80,
|
|
||||||
"semi": true,
|
|
||||||
"singleQuote": true,
|
|
||||||
"trailingComma": "es5"
|
|
||||||
},
|
|
||||||
"name": "kintone-addin",
|
|
||||||
"author": "maxiaozhe@alicorns.co.jp",
|
|
||||||
"module": "dist/kintone-addin.esm.js",
|
|
||||||
"size-limit": [
|
|
||||||
{
|
|
||||||
"path": "dist/kintone-addin.cjs.production.min.js",
|
|
||||||
"limit": "10 KB"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"path": "dist/kintone-addin.esm.js",
|
|
||||||
"limit": "10 KB"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"devDependencies": {
|
|
||||||
"@size-limit/preset-small-lib": "^9.0.0",
|
|
||||||
"husky": "^8.0.3",
|
|
||||||
"size-limit": "^9.0.0",
|
|
||||||
"tsdx": "^0.14.1",
|
|
||||||
"tslib": "^2.6.2",
|
|
||||||
"typescript": "^5.2.2"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"jquery": "^3.7.1"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,6 +0,0 @@
|
|||||||
export const sum = (a: number, b: number) => {
|
|
||||||
if ('development' === process.env.NODE_ENV) {
|
|
||||||
console.log('boop');
|
|
||||||
}
|
|
||||||
return a + b;
|
|
||||||
};
|
|
||||||
@@ -1,7 +0,0 @@
|
|||||||
import { sum } from '../src';
|
|
||||||
|
|
||||||
describe('blah', () => {
|
|
||||||
it('works', () => {
|
|
||||||
expect(sum(1, 1)).toEqual(2);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
// see https://www.typescriptlang.org/tsconfig to better understand tsconfigs
|
|
||||||
"include": ["src", "types"],
|
|
||||||
"compilerOptions": {
|
|
||||||
"module": "ES2015",
|
|
||||||
"lib": ["dom", "esnext"],
|
|
||||||
"importHelpers": true,
|
|
||||||
// output .d.ts declaration files for consumers
|
|
||||||
"declaration": true,
|
|
||||||
// output .js.map sourcemap files for consumers
|
|
||||||
"sourceMap": true,
|
|
||||||
// match output dir to input dir. e.g. dist/index instead of dist/src/index
|
|
||||||
"rootDir": "./src",
|
|
||||||
// stricter type-checking for stronger correctness. Recommended by TS
|
|
||||||
"strict": true,
|
|
||||||
// linter checks for common issues
|
|
||||||
"noImplicitReturns": true,
|
|
||||||
"noFallthroughCasesInSwitch": true,
|
|
||||||
// noUnused* overlap with @typescript-eslint/no-unused-vars, can disable if duplicative
|
|
||||||
"noUnusedLocals": true,
|
|
||||||
"noUnusedParameters": true,
|
|
||||||
// use Node's module resolution algorithm, instead of the legacy TS one
|
|
||||||
"moduleResolution": "node",
|
|
||||||
// transpile JSX to React.createElement
|
|
||||||
"jsx": "react",
|
|
||||||
// interop between ESM and CJS modules. Recommended by TS
|
|
||||||
"esModuleInterop": true,
|
|
||||||
// significant perf increase by skipping checking .d.ts files, particularly those in node_modules. Recommended by TS
|
|
||||||
"skipLibCheck": true,
|
|
||||||
// error out if import and file system have a casing mismatch. Recommended by TS
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
// `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc`
|
|
||||||
"noEmit": true,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
24
plugin/kintone-addins/.gitignore
vendored
Normal file
24
plugin/kintone-addins/.gitignore
vendored
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
# Logs
|
||||||
|
logs
|
||||||
|
*.log
|
||||||
|
npm-debug.log*
|
||||||
|
yarn-debug.log*
|
||||||
|
yarn-error.log*
|
||||||
|
pnpm-debug.log*
|
||||||
|
lerna-debug.log*
|
||||||
|
|
||||||
|
node_modules
|
||||||
|
dist
|
||||||
|
dist-ssr
|
||||||
|
*.local
|
||||||
|
|
||||||
|
# Editor directories and files
|
||||||
|
.vscode/*
|
||||||
|
!.vscode/extensions.json
|
||||||
|
.idea
|
||||||
|
.DS_Store
|
||||||
|
*.suo
|
||||||
|
*.ntvs*
|
||||||
|
*.njsproj
|
||||||
|
*.sln
|
||||||
|
*.sw?
|
||||||
588
plugin/kintone-addins/package-lock.json
generated
Normal file
588
plugin/kintone-addins/package-lock.json
generated
Normal file
@@ -0,0 +1,588 @@
|
|||||||
|
{
|
||||||
|
"name": "kintone-addins",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"lockfileVersion": 3,
|
||||||
|
"requires": true,
|
||||||
|
"packages": {
|
||||||
|
"": {
|
||||||
|
"name": "kintone-addins",
|
||||||
|
"version": "0.0.0",
|
||||||
|
"dependencies": {
|
||||||
|
"jquery": "^3.7.1"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/jquery": "^3.5.24",
|
||||||
|
"typescript": "^5.0.2",
|
||||||
|
"vite": "^4.4.5"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-arm": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-arm64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/android-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"android"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/darwin-arm64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/darwin-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/freebsd-arm64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/freebsd-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"freebsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-arm": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-arm64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-ia32": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-loong64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
|
||||||
|
"cpu": [
|
||||||
|
"loong64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-mips64el": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
|
||||||
|
"cpu": [
|
||||||
|
"mips64el"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-ppc64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
|
||||||
|
"cpu": [
|
||||||
|
"ppc64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-riscv64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
|
||||||
|
"cpu": [
|
||||||
|
"riscv64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-s390x": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
|
||||||
|
"cpu": [
|
||||||
|
"s390x"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/linux-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"linux"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/netbsd-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"netbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/openbsd-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"openbsd"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/sunos-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"sunos"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-arm64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
|
||||||
|
"cpu": [
|
||||||
|
"arm64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-ia32": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
|
||||||
|
"cpu": [
|
||||||
|
"ia32"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@esbuild/win32-x64": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
|
||||||
|
"cpu": [
|
||||||
|
"x64"
|
||||||
|
],
|
||||||
|
"dev": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"win32"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/jquery": {
|
||||||
|
"version": "3.5.24",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/jquery/-/jquery-3.5.24.tgz",
|
||||||
|
"integrity": "sha512-V/TG69ge5amcr8Ap7vY3SObqKfZlV7ttqcYnNcYnndI77ySIRi05+3GjvfwRtE2qalAC2ySLIL1ker512sI20g==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"@types/sizzle": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@types/sizzle": {
|
||||||
|
"version": "2.3.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/sizzle/-/sizzle-2.3.5.tgz",
|
||||||
|
"integrity": "sha512-tAe4Q+OLFOA/AMD+0lq8ovp8t3ysxAOeaScnfNdZpUxaGl51ZMDEITxkvFl1STudQ58mz6gzVGl9VhMKhwRnZQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/esbuild": {
|
||||||
|
"version": "0.18.20",
|
||||||
|
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
|
||||||
|
"integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
|
||||||
|
"dev": true,
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"bin": {
|
||||||
|
"esbuild": "bin/esbuild"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=12"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"@esbuild/android-arm": "0.18.20",
|
||||||
|
"@esbuild/android-arm64": "0.18.20",
|
||||||
|
"@esbuild/android-x64": "0.18.20",
|
||||||
|
"@esbuild/darwin-arm64": "0.18.20",
|
||||||
|
"@esbuild/darwin-x64": "0.18.20",
|
||||||
|
"@esbuild/freebsd-arm64": "0.18.20",
|
||||||
|
"@esbuild/freebsd-x64": "0.18.20",
|
||||||
|
"@esbuild/linux-arm": "0.18.20",
|
||||||
|
"@esbuild/linux-arm64": "0.18.20",
|
||||||
|
"@esbuild/linux-ia32": "0.18.20",
|
||||||
|
"@esbuild/linux-loong64": "0.18.20",
|
||||||
|
"@esbuild/linux-mips64el": "0.18.20",
|
||||||
|
"@esbuild/linux-ppc64": "0.18.20",
|
||||||
|
"@esbuild/linux-riscv64": "0.18.20",
|
||||||
|
"@esbuild/linux-s390x": "0.18.20",
|
||||||
|
"@esbuild/linux-x64": "0.18.20",
|
||||||
|
"@esbuild/netbsd-x64": "0.18.20",
|
||||||
|
"@esbuild/openbsd-x64": "0.18.20",
|
||||||
|
"@esbuild/sunos-x64": "0.18.20",
|
||||||
|
"@esbuild/win32-arm64": "0.18.20",
|
||||||
|
"@esbuild/win32-ia32": "0.18.20",
|
||||||
|
"@esbuild/win32-x64": "0.18.20"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/fsevents": {
|
||||||
|
"version": "2.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
|
||||||
|
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
|
||||||
|
"dev": true,
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"optional": true,
|
||||||
|
"os": [
|
||||||
|
"darwin"
|
||||||
|
],
|
||||||
|
"engines": {
|
||||||
|
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/jquery": {
|
||||||
|
"version": "3.7.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz",
|
||||||
|
"integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg=="
|
||||||
|
},
|
||||||
|
"node_modules/nanoid": {
|
||||||
|
"version": "3.3.6",
|
||||||
|
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz",
|
||||||
|
"integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/ai"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"bin": {
|
||||||
|
"nanoid": "bin/nanoid.cjs"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/picocolors": {
|
||||||
|
"version": "1.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
|
||||||
|
"integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
|
||||||
|
"dev": true
|
||||||
|
},
|
||||||
|
"node_modules/postcss": {
|
||||||
|
"version": "8.4.31",
|
||||||
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz",
|
||||||
|
"integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"funding": [
|
||||||
|
{
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/postcss/"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "tidelift",
|
||||||
|
"url": "https://tidelift.com/funding/github/npm/postcss"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "github",
|
||||||
|
"url": "https://github.com/sponsors/ai"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"dependencies": {
|
||||||
|
"nanoid": "^3.3.6",
|
||||||
|
"picocolors": "^1.0.0",
|
||||||
|
"source-map-js": "^1.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^10 || ^12 || >=14"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/rollup": {
|
||||||
|
"version": "3.29.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
|
||||||
|
"integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"rollup": "dist/bin/rollup"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.18.0",
|
||||||
|
"npm": ">=8.0.0"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"fsevents": "~2.3.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/source-map-js": {
|
||||||
|
"version": "1.0.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
|
||||||
|
"integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=0.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/typescript": {
|
||||||
|
"version": "5.2.2",
|
||||||
|
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz",
|
||||||
|
"integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==",
|
||||||
|
"dev": true,
|
||||||
|
"bin": {
|
||||||
|
"tsc": "bin/tsc",
|
||||||
|
"tsserver": "bin/tsserver"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=14.17"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/vite": {
|
||||||
|
"version": "4.5.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/vite/-/vite-4.5.0.tgz",
|
||||||
|
"integrity": "sha512-ulr8rNLA6rkyFAlVWw2q5YJ91v098AFQ2R0PRFwPzREXOUJQPtFUG0t+/ZikhaOCDqFoDhN6/v8Sq0o4araFAw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"esbuild": "^0.18.10",
|
||||||
|
"postcss": "^8.4.27",
|
||||||
|
"rollup": "^3.27.1"
|
||||||
|
},
|
||||||
|
"bin": {
|
||||||
|
"vite": "bin/vite.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": "^14.18.0 || >=16.0.0"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/vitejs/vite?sponsor=1"
|
||||||
|
},
|
||||||
|
"optionalDependencies": {
|
||||||
|
"fsevents": "~2.3.2"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@types/node": ">= 14",
|
||||||
|
"less": "*",
|
||||||
|
"lightningcss": "^1.21.0",
|
||||||
|
"sass": "*",
|
||||||
|
"stylus": "*",
|
||||||
|
"sugarss": "*",
|
||||||
|
"terser": "^5.4.0"
|
||||||
|
},
|
||||||
|
"peerDependenciesMeta": {
|
||||||
|
"@types/node": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"less": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"lightningcss": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"sass": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"stylus": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"sugarss": {
|
||||||
|
"optional": true
|
||||||
|
},
|
||||||
|
"terser": {
|
||||||
|
"optional": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
19
plugin/kintone-addins/package.json
Normal file
19
plugin/kintone-addins/package.json
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
{
|
||||||
|
"name": "kintone-addins",
|
||||||
|
"private": true,
|
||||||
|
"version": "0.0.0",
|
||||||
|
"type": "module",
|
||||||
|
"scripts": {
|
||||||
|
"dev": "vite",
|
||||||
|
"build": "tsc && vite build && xcopy dist\\*.js ..\\..\\backend\\Temp\\ /E /I /Y",
|
||||||
|
"preview": "vite preview"
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"@types/jquery": "^3.5.24",
|
||||||
|
"typescript": "^5.0.2",
|
||||||
|
"vite": "^4.4.5"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"jquery": "^3.7.1"
|
||||||
|
}
|
||||||
|
}
|
||||||
1
plugin/kintone-addins/public/vite.svg
Normal file
1
plugin/kintone-addins/public/vite.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.5 KiB |
2
plugin/kintone-addins/src/actions/index.ts
Normal file
2
plugin/kintone-addins/src/actions/index.ts
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
import { IAction } from "../types/ActionTypes";
|
||||||
|
export const actionAddins :Record<string,IAction>={};
|
||||||
53
plugin/kintone-addins/src/actions/must-input.ts
Normal file
53
plugin/kintone-addins/src/actions/must-input.ts
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
|
||||||
|
import { actionAddins } from ".";
|
||||||
|
import { IAction,IActionResult, IActionNode, IActionProperty } from "../types/ActionTypes";
|
||||||
|
|
||||||
|
interface IMustInputProps{
|
||||||
|
field:string;
|
||||||
|
message:string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class MustInputAction implements IAction{
|
||||||
|
name: string;
|
||||||
|
actionProps: IActionProperty[];
|
||||||
|
props:IMustInputProps;
|
||||||
|
constructor(){
|
||||||
|
this.name="必須チェック";
|
||||||
|
this.actionProps=[];
|
||||||
|
this.register();
|
||||||
|
this.props={
|
||||||
|
field:'',
|
||||||
|
message:''
|
||||||
|
}
|
||||||
|
this.register();
|
||||||
|
}
|
||||||
|
|
||||||
|
process(actionNode:IActionNode,event:any):IActionResult {
|
||||||
|
let result={
|
||||||
|
canNext:true,
|
||||||
|
result:false
|
||||||
|
};
|
||||||
|
this.actionProps=actionNode.actionProps;
|
||||||
|
if (!('field' in actionNode.ActionValue) && !('message' in actionNode.ActionValue)) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
this.props = actionNode.ActionValue as IMustInputProps;
|
||||||
|
const record = event.record;
|
||||||
|
const value = record[this.props.field]?.value;
|
||||||
|
if(value===undefined || value===''){
|
||||||
|
record[this.props.field].error=this.props.message;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
result= {
|
||||||
|
canNext:true,
|
||||||
|
result:true
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
register(): void {
|
||||||
|
actionAddins[this.name]=this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
new MustInputAction();
|
||||||
27
plugin/kintone-addins/src/index.ts
Normal file
27
plugin/kintone-addins/src/index.ts
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
// export const sum = (a: number, b: number) => {
|
||||||
|
// if ('development' === process.env.NODE_ENV) {
|
||||||
|
// console.log('boop');
|
||||||
|
// }
|
||||||
|
// return a + b;
|
||||||
|
// };
|
||||||
|
import $ from 'jquery';
|
||||||
|
import { ActionProcess } from './types/action-process';
|
||||||
|
import { ActionFlow } from './types/ActionTypes';
|
||||||
|
import { FlowInfo } from './types/flowSetting';
|
||||||
|
|
||||||
|
declare const alcflow : {
|
||||||
|
[key:string]:FlowInfo
|
||||||
|
};
|
||||||
|
|
||||||
|
$(function (){
|
||||||
|
const events=Object.keys(alcflow);
|
||||||
|
kintone.events.on(events,(event:any)=>{
|
||||||
|
const flowinfo = alcflow[event.type];
|
||||||
|
const flow=ActionFlow.fromJSON(flowinfo.content);
|
||||||
|
if(flow!==undefined){
|
||||||
|
const process = new ActionProcess(event.type,flow,event);
|
||||||
|
process.exec();
|
||||||
|
}
|
||||||
|
return event;
|
||||||
|
});
|
||||||
|
});
|
||||||
402
plugin/kintone-addins/src/kintone.d.ts
vendored
Normal file
402
plugin/kintone-addins/src/kintone.d.ts
vendored
Normal file
@@ -0,0 +1,402 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* Kintone APIタイプ定義
|
||||||
|
*/
|
||||||
|
declare namespace kintone {
|
||||||
|
namespace events {
|
||||||
|
function on(event: string | string[], handler: (event: any) => any): void;
|
||||||
|
function off(
|
||||||
|
event: string | string[],
|
||||||
|
handler: (event: any) => any
|
||||||
|
): boolean;
|
||||||
|
function off(event: string | string[]): boolean;
|
||||||
|
function off(): boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace api {
|
||||||
|
function url(path: string, detectGuestSpace?: boolean): string;
|
||||||
|
function urlForGet(
|
||||||
|
path: string,
|
||||||
|
params: any,
|
||||||
|
detectGuestSpace?: boolean
|
||||||
|
): string;
|
||||||
|
|
||||||
|
function getConcurrencyLimit(): Promise<{
|
||||||
|
limit: number;
|
||||||
|
running: number;
|
||||||
|
}>;
|
||||||
|
}
|
||||||
|
|
||||||
|
function api(pathOrUrl: string, method: string, params: any): Promise<any>;
|
||||||
|
|
||||||
|
function api(
|
||||||
|
pathOrUrl: string,
|
||||||
|
method: string,
|
||||||
|
params: any,
|
||||||
|
callback: (resp: any) => void,
|
||||||
|
errback: (err: any) => void
|
||||||
|
): void;
|
||||||
|
|
||||||
|
function getRequestToken(): string;
|
||||||
|
|
||||||
|
function proxy(
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any
|
||||||
|
): Promise<any>;
|
||||||
|
|
||||||
|
function proxy(
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any,
|
||||||
|
callback: (resp: any) => void,
|
||||||
|
errback: (err: any) => void
|
||||||
|
): void;
|
||||||
|
|
||||||
|
class Promise<T> {
|
||||||
|
constructor(
|
||||||
|
callback: (
|
||||||
|
resolve: (resolved: T) => any,
|
||||||
|
reject: (rejected: any) => any
|
||||||
|
) => void
|
||||||
|
);
|
||||||
|
|
||||||
|
then(callback: (resolved: T) => any): Promise<any>;
|
||||||
|
catch(callback: (rejected: any) => any): Promise<any>;
|
||||||
|
|
||||||
|
static resolve(resolved: any): Promise<any>;
|
||||||
|
static reject(rejected: any): Promise<any>;
|
||||||
|
static all(listOfPromise: Array<Promise<any>>): Promise<any>;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace proxy {
|
||||||
|
function upload(
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any,
|
||||||
|
callback: (resp: any) => void,
|
||||||
|
errback: (err: any) => void
|
||||||
|
): void;
|
||||||
|
|
||||||
|
function upload(
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any
|
||||||
|
): Promise<any>;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace app {
|
||||||
|
function getFieldElements(fieldCode: string): HTMLElement[] | null;
|
||||||
|
function getHeaderMenuSpaceElement(): HTMLElement | null;
|
||||||
|
function getHeaderSpaceElement(): HTMLElement | null;
|
||||||
|
function getId(): number | null;
|
||||||
|
function getLookupTargetAppId(fieldCode: string): string | null;
|
||||||
|
function getQuery(): string | null;
|
||||||
|
function getQueryCondition(): string | null;
|
||||||
|
function getRelatedRecordsTargetAppId(fieldCode: string): string | null;
|
||||||
|
|
||||||
|
namespace record {
|
||||||
|
function getId(): number | null;
|
||||||
|
function get(): any | null;
|
||||||
|
function getHeaderMenuSpaceElement(): HTMLElement | null;
|
||||||
|
function getFieldElement(fieldCode: string): HTMLElement | null;
|
||||||
|
function set(record: any): void;
|
||||||
|
function getSpaceElement(id: string): HTMLElement | null;
|
||||||
|
function setFieldShown(fieldCode: string, isShown: boolean): void;
|
||||||
|
function setGroupFieldOpen(fieldCode: string, isOpen: boolean): void;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace mobile {
|
||||||
|
namespace app {
|
||||||
|
function getFieldElements(fieldCode: string): HTMLElement[] | null;
|
||||||
|
function getHeaderSpaceElement(): HTMLElement | null;
|
||||||
|
function getId(): number | null;
|
||||||
|
function getLookupTargetAppId(fieldCode: string): string | null;
|
||||||
|
function getQuery(): string | null;
|
||||||
|
function getQueryCondition(): string | null;
|
||||||
|
function getRelatedRecordsTargetAppId(fieldCode: string): string | null;
|
||||||
|
|
||||||
|
namespace record {
|
||||||
|
function getId(): number | null;
|
||||||
|
function get(): any | null;
|
||||||
|
function getFieldElement(fieldCode: string): HTMLElement | null;
|
||||||
|
function set(record: any): void;
|
||||||
|
function getSpaceElement(id: string): HTMLElement | null;
|
||||||
|
function setFieldShown(fieldCode: string, isShown: boolean): void;
|
||||||
|
function setGroupFieldOpen(fieldCode: string, isOpen: boolean): void;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace portal {
|
||||||
|
function getContentSpaceElement(): HTMLElement | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace space {
|
||||||
|
namespace portal {
|
||||||
|
function getContentSpaceElement(): HTMLElement | null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace plugin {
|
||||||
|
namespace app {
|
||||||
|
function getConfig(pluginId: string): any;
|
||||||
|
function setConfig(config: any, callback?: () => void): void;
|
||||||
|
|
||||||
|
function proxy(
|
||||||
|
pluginId: string,
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any
|
||||||
|
): Promise<any>;
|
||||||
|
|
||||||
|
function proxy(
|
||||||
|
pluginId: string,
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any,
|
||||||
|
callback: (resp: any) => void,
|
||||||
|
error: (err: any) => void
|
||||||
|
): void;
|
||||||
|
|
||||||
|
function setProxyConfig(
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any,
|
||||||
|
callback?: () => void
|
||||||
|
): void;
|
||||||
|
|
||||||
|
function getProxyConfig(url: string, method: string): any;
|
||||||
|
|
||||||
|
namespace proxy {
|
||||||
|
function upload(
|
||||||
|
pluginId: any,
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any
|
||||||
|
): Promise<any>;
|
||||||
|
|
||||||
|
function upload(
|
||||||
|
pluginId: any,
|
||||||
|
url: string,
|
||||||
|
method: string,
|
||||||
|
headers: any,
|
||||||
|
data: any,
|
||||||
|
callback: (resp: any) => void,
|
||||||
|
error: (err: any) => void
|
||||||
|
): void;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace portal {
|
||||||
|
function getContentSpaceElement(): HTMLElement | null;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace space {
|
||||||
|
namespace portal {
|
||||||
|
function getContentSpaceElement(): HTMLElement | null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
interface LoginUser {
|
||||||
|
id: string;
|
||||||
|
code: string;
|
||||||
|
name: string;
|
||||||
|
email: string;
|
||||||
|
url: string;
|
||||||
|
employeeNumber: string;
|
||||||
|
phone: string;
|
||||||
|
mobilePhone: string;
|
||||||
|
extensionNumber: string;
|
||||||
|
timezone: string;
|
||||||
|
isGuest: boolean;
|
||||||
|
language: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
function getLoginUser(): LoginUser;
|
||||||
|
function getUiVersion(): 1 | 2;
|
||||||
|
|
||||||
|
const $PLUGIN_ID: string;
|
||||||
|
|
||||||
|
namespace fieldTypes {
|
||||||
|
interface SingleLineText {
|
||||||
|
type?: "SINGLE_LINE_TEXT";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RichText {
|
||||||
|
type?: "RICH_TEXT";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MultiLineText {
|
||||||
|
type?: "MULTI_LINE_TEXT";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Number {
|
||||||
|
type?: "NUMBER";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Calc {
|
||||||
|
type: "CALC";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RadioButton {
|
||||||
|
type?: "RADIO_BUTTON";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DropDown {
|
||||||
|
type?: "DROP_DOWN";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Date {
|
||||||
|
type?: "DATE";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Time {
|
||||||
|
type?: "TIME";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface DateTime {
|
||||||
|
type?: "DATETIME";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Link {
|
||||||
|
type?: "LINK";
|
||||||
|
value: string;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CheckBox {
|
||||||
|
type?: "CHECK_BOX";
|
||||||
|
value: string[];
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface MultiSelect {
|
||||||
|
type?: "MULTI_SELECT";
|
||||||
|
value: string[];
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface UserSelect {
|
||||||
|
type?: "USER_SELECT";
|
||||||
|
value: Array<{ code: string; name: string }>;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface OrganizationSelect {
|
||||||
|
type?: "ORGANIZATION_SELECT";
|
||||||
|
value: Array<{ code: string; name: string }>;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface GroupSelect {
|
||||||
|
type?: "GROUP_SELECT";
|
||||||
|
value: Array<{ code: string; name: string }>;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface File {
|
||||||
|
type: "FILE";
|
||||||
|
value: Array<{
|
||||||
|
contentType: string;
|
||||||
|
fileKey: string;
|
||||||
|
name: string;
|
||||||
|
size: string;
|
||||||
|
}>;
|
||||||
|
disabled?: boolean;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Id {
|
||||||
|
type: "__ID__";
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface Revision {
|
||||||
|
type: "__REVISION__";
|
||||||
|
value: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* field type of UserField is MODIFIER.
|
||||||
|
* So error property not exists.
|
||||||
|
*/
|
||||||
|
interface Modifier {
|
||||||
|
type: "MODIFIER";
|
||||||
|
value: { code: string; name: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* field type of UserField is CREATOR.
|
||||||
|
* So error property not exists.
|
||||||
|
*/
|
||||||
|
interface Creator {
|
||||||
|
type: "CREATOR";
|
||||||
|
value: { code: string; name: string };
|
||||||
|
}
|
||||||
|
|
||||||
|
interface RecordNumber {
|
||||||
|
type: "RECORD_NUMBER";
|
||||||
|
value: string;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface UpdatedTime {
|
||||||
|
type: "UPDATED_TIME";
|
||||||
|
value: string;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
interface CreatedTime {
|
||||||
|
type: "CREATED_TIME";
|
||||||
|
value: string;
|
||||||
|
error?: string;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
247
plugin/kintone-addins/src/types/ActionTypes.ts
Normal file
247
plugin/kintone-addins/src/types/ActionTypes.ts
Normal file
@@ -0,0 +1,247 @@
|
|||||||
|
|
||||||
|
/**
|
||||||
|
* アプリ情報
|
||||||
|
*/
|
||||||
|
export interface AppInfo {
|
||||||
|
appId: string;
|
||||||
|
code?: string;
|
||||||
|
name: string;
|
||||||
|
description?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* アクションのプロパティ定義
|
||||||
|
*/
|
||||||
|
export interface IActionProperty {
|
||||||
|
component: string;
|
||||||
|
props: {
|
||||||
|
//プロパティ名
|
||||||
|
name: string;
|
||||||
|
//プロパティ表示名
|
||||||
|
displayName: string;
|
||||||
|
placeholder: string;
|
||||||
|
//プロパティ設定値
|
||||||
|
modelValue: any;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* アクションタイプ定義
|
||||||
|
*/
|
||||||
|
export interface IActionNode {
|
||||||
|
id: string;
|
||||||
|
//アクション名
|
||||||
|
name: string;
|
||||||
|
title: string;
|
||||||
|
subTitle: string;
|
||||||
|
inputPoint: string;
|
||||||
|
//出力ポイント(条件分岐以外未使用)
|
||||||
|
outputPoints: Array<string>;
|
||||||
|
//ルートアクション(Kintone event)
|
||||||
|
isRoot: boolean;
|
||||||
|
//アクションのプロパティ定義
|
||||||
|
actionProps: Array<IActionProperty>;
|
||||||
|
//アクションのプロパティ設定値抽出
|
||||||
|
ActionValue: object
|
||||||
|
prevNodeId?: string;
|
||||||
|
nextNodeIds: Map<string, string>;
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* アクションフローの定義
|
||||||
|
*/
|
||||||
|
export interface IActionFlow {
|
||||||
|
id: string;
|
||||||
|
actionNodes: IActionNode[];
|
||||||
|
findNodeById(id: string): IActionNode | undefined;
|
||||||
|
toJSON(): any;
|
||||||
|
getRoot(): IActionNode | undefined;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IActionResult{
|
||||||
|
canNext:boolean;
|
||||||
|
result?:any;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IAction{
|
||||||
|
name:string;
|
||||||
|
actionProps: Array<IActionProperty>;
|
||||||
|
process(prop:IActionNode,event:any):IActionResult;
|
||||||
|
register():void;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* アクションのプロパティ定義に基づいたクラス
|
||||||
|
*/
|
||||||
|
export class ActionProperty implements IActionProperty {
|
||||||
|
component: string;
|
||||||
|
props: {
|
||||||
|
// プロパティ名
|
||||||
|
name: string;
|
||||||
|
// プロパティ表示名
|
||||||
|
displayName: string;
|
||||||
|
placeholder: string;
|
||||||
|
// プロパティ設定値
|
||||||
|
modelValue: any;
|
||||||
|
};
|
||||||
|
|
||||||
|
static defaultProperty(): IActionProperty {
|
||||||
|
return new ActionProperty('InputText', 'displayName', '表示名', '表示を入力してください', '');
|
||||||
|
};
|
||||||
|
|
||||||
|
constructor(
|
||||||
|
component: string,
|
||||||
|
name: string,
|
||||||
|
displayName: string,
|
||||||
|
placeholder: string,
|
||||||
|
modelValue: any
|
||||||
|
) {
|
||||||
|
this.component = component;
|
||||||
|
this.props = {
|
||||||
|
name: name,
|
||||||
|
displayName: displayName,
|
||||||
|
placeholder: placeholder,
|
||||||
|
modelValue: modelValue
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* IActionNodeの実装、RootActionNode以外のアクション定義
|
||||||
|
*/
|
||||||
|
export class ActionNode implements IActionNode {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
get title(): string {
|
||||||
|
const prop = this.actionProps.find((prop) => prop.props.name === "displayName");
|
||||||
|
return prop?.props.modelValue;
|
||||||
|
};
|
||||||
|
get subTitle(): string {
|
||||||
|
return this.name;
|
||||||
|
};
|
||||||
|
inputPoint: string;
|
||||||
|
//出力ポイント(条件分岐以外未使用)
|
||||||
|
outputPoints: Array<string>;
|
||||||
|
actionProps: Array<IActionProperty>;
|
||||||
|
get isRoot(): boolean {
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
get ActionValue(): object {
|
||||||
|
const propValue: any = {};
|
||||||
|
this.actionProps.forEach((value) => {
|
||||||
|
propValue[value.props.name] = value.props.modelValue
|
||||||
|
});
|
||||||
|
return propValue;
|
||||||
|
};
|
||||||
|
prevNodeId?: string;
|
||||||
|
nextNodeIds: Map<string, string>;
|
||||||
|
constructor(
|
||||||
|
{id,name,title,inputPoint,outputPoint,actionProps}:
|
||||||
|
{
|
||||||
|
id:string,
|
||||||
|
name: string,
|
||||||
|
title: string,
|
||||||
|
inputPoint: string,
|
||||||
|
outputPoint: Array<string>,
|
||||||
|
actionProps: Array<IActionProperty>}
|
||||||
|
) {
|
||||||
|
this.id=id;
|
||||||
|
this.name = name;
|
||||||
|
this.inputPoint = inputPoint;
|
||||||
|
this.outputPoints = outputPoint;
|
||||||
|
const defProp = ActionProperty.defaultProperty();
|
||||||
|
defProp.props.modelValue = title;
|
||||||
|
this.actionProps = actionProps;
|
||||||
|
this.nextNodeIds = new Map<string, string>();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* ルートアクション定義
|
||||||
|
*/
|
||||||
|
export class RootAction implements IActionNode {
|
||||||
|
id: string;
|
||||||
|
name: string;
|
||||||
|
title: string;
|
||||||
|
subTitle: string;
|
||||||
|
inputPoint: string;
|
||||||
|
//出力ポイント(条件分岐以外未使用)
|
||||||
|
outputPoints: Array<string>;
|
||||||
|
isRoot: boolean;
|
||||||
|
actionProps: Array<IActionProperty>;
|
||||||
|
ActionValue: object;
|
||||||
|
prevNodeId?: string = undefined;
|
||||||
|
nextNodeIds: Map<string, string>;
|
||||||
|
constructor(
|
||||||
|
{id,name,title,subTitle}:{
|
||||||
|
id:string,
|
||||||
|
name: string,
|
||||||
|
title: string,
|
||||||
|
subTitle: string}
|
||||||
|
) {
|
||||||
|
this.id = id;
|
||||||
|
this.name = name;
|
||||||
|
this.title = title;
|
||||||
|
this.subTitle = subTitle;
|
||||||
|
this.inputPoint = '';
|
||||||
|
this.outputPoints = [];
|
||||||
|
this.isRoot = true;
|
||||||
|
this.actionProps = [];
|
||||||
|
this.ActionValue = {};
|
||||||
|
this.nextNodeIds = new Map<string, string>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* アクションフローの定義
|
||||||
|
*/
|
||||||
|
export class ActionFlow implements IActionFlow {
|
||||||
|
id: string;
|
||||||
|
actionNodes: Array<IActionNode>;
|
||||||
|
constructor(actionNodes: Array<IActionNode> | RootAction) {
|
||||||
|
if (actionNodes instanceof Array) {
|
||||||
|
this.actionNodes = actionNodes;
|
||||||
|
} else {
|
||||||
|
this.actionNodes = [actionNodes];
|
||||||
|
}
|
||||||
|
this.id = '';
|
||||||
|
}
|
||||||
|
/***
|
||||||
|
* IDでActionNodeを取得する
|
||||||
|
*/
|
||||||
|
findNodeById(id: string): IActionNode | undefined {
|
||||||
|
return this.actionNodes.find((node) => node.id === id);
|
||||||
|
}
|
||||||
|
|
||||||
|
toJSON() {
|
||||||
|
return {
|
||||||
|
id: this.id,
|
||||||
|
actionNodes: this.actionNodes.map(node => {
|
||||||
|
const { nextNodeIds, ...rest } = node;
|
||||||
|
return {
|
||||||
|
...rest,
|
||||||
|
nextNodeIds: Array.from(nextNodeIds.entries())
|
||||||
|
};
|
||||||
|
})
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
getRoot(): IActionNode | undefined {
|
||||||
|
return this.actionNodes.find(node => node.isRoot)
|
||||||
|
}
|
||||||
|
|
||||||
|
static fromJSON(json: string): ActionFlow {
|
||||||
|
const parsedObject = JSON.parse(json);
|
||||||
|
|
||||||
|
const actionNodes = parsedObject.actionNodes.map((node: any) => {
|
||||||
|
const nodeClass = !node.isRoot ? new ActionNode(node)
|
||||||
|
: new RootAction(node);
|
||||||
|
nodeClass.nextNodeIds = new Map(node.nextNodeIds);
|
||||||
|
nodeClass.prevNodeId = node.prevNodeId;
|
||||||
|
nodeClass.id = node.id;
|
||||||
|
return nodeClass;
|
||||||
|
});
|
||||||
|
const actionFlow = new ActionFlow(actionNodes);
|
||||||
|
actionFlow.id = parsedObject.id;
|
||||||
|
return actionFlow;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
38
plugin/kintone-addins/src/types/action-process.ts
Normal file
38
plugin/kintone-addins/src/types/action-process.ts
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
|
||||||
|
import { actionAddins } from "../actions";
|
||||||
|
import '../actions/must-input';
|
||||||
|
import { ActionFlow,IActionFlow, IActionResult } from "./ActionTypes";
|
||||||
|
|
||||||
|
export class ActionProcess{
|
||||||
|
eventId:string;
|
||||||
|
flow:IActionFlow;
|
||||||
|
event:any;
|
||||||
|
constructor(eventId:string,flow:ActionFlow,event:any){
|
||||||
|
this.eventId=eventId;
|
||||||
|
this.flow=flow;
|
||||||
|
this.event=event;
|
||||||
|
}
|
||||||
|
exec(){
|
||||||
|
const root = this.flow.getRoot();
|
||||||
|
if(root===undefined || root.nextNodeIds.size===0){
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
let id=root.nextNodeIds.get('');
|
||||||
|
if(id===undefined) return;
|
||||||
|
let nextAction = this.flow.findNodeById(id);
|
||||||
|
let result:IActionResult={
|
||||||
|
canNext:true
|
||||||
|
};
|
||||||
|
while(nextAction!==undefined && result.canNext){
|
||||||
|
const action = actionAddins[nextAction.name];
|
||||||
|
if(action!==undefined){
|
||||||
|
result = action.process(nextAction,this.event)
|
||||||
|
}
|
||||||
|
const nextInput = nextAction.outputPoints!==undefined?result.result||'':'';
|
||||||
|
id=nextAction.nextNodeIds.get(nextInput);
|
||||||
|
if(id===undefined) return;
|
||||||
|
nextAction = this.flow.findNodeById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
23
plugin/kintone-addins/src/types/flowSetting.ts
Normal file
23
plugin/kintone-addins/src/types/flowSetting.ts
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
import { ActionFlow } from "./ActionTypes";
|
||||||
|
|
||||||
|
export interface IFlowInfo {
|
||||||
|
flowid: string;
|
||||||
|
name:string;
|
||||||
|
content: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export class FlowInfo implements IFlowInfo{
|
||||||
|
flowid: string;
|
||||||
|
name:string;
|
||||||
|
content: string;
|
||||||
|
constructor({flowid,name,content}:{flowid: string,
|
||||||
|
name:string,
|
||||||
|
content: string,}) {
|
||||||
|
this.flowid=flowid;
|
||||||
|
this.name=name;
|
||||||
|
this.content=content;
|
||||||
|
}
|
||||||
|
getFlow():ActionFlow {
|
||||||
|
return ActionFlow.fromJSON(this.content)
|
||||||
|
}
|
||||||
|
}
|
||||||
23
plugin/kintone-addins/tsconfig.json
Normal file
23
plugin/kintone-addins/tsconfig.json
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"target": "ES2020",
|
||||||
|
"useDefineForClassFields": true,
|
||||||
|
"module": "ESNext",
|
||||||
|
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
||||||
|
"skipLibCheck": true,
|
||||||
|
|
||||||
|
/* Bundler mode */
|
||||||
|
"moduleResolution": "bundler",
|
||||||
|
"allowImportingTsExtensions": true,
|
||||||
|
"resolveJsonModule": true,
|
||||||
|
"isolatedModules": true,
|
||||||
|
"noEmit": true,
|
||||||
|
|
||||||
|
/* Linting */
|
||||||
|
"strict": true,
|
||||||
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true,
|
||||||
|
"noFallthroughCasesInSwitch": true
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
14
plugin/kintone-addins/vite.config.js
Normal file
14
plugin/kintone-addins/vite.config.js
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// vite.config.js
|
||||||
|
import { defineConfig } from 'vite'
|
||||||
|
|
||||||
|
export default defineConfig({
|
||||||
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
|
input: 'src/index.ts', // entry file
|
||||||
|
output:{
|
||||||
|
entryFileNames:'alc_runtime.js'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
sourcemap:true
|
||||||
|
}
|
||||||
|
})
|
||||||
@@ -13,7 +13,7 @@
|
|||||||
"props": {
|
"props": {
|
||||||
"displayName": "エラーメッセージ",
|
"displayName": "エラーメッセージ",
|
||||||
"modelValue": "",
|
"modelValue": "",
|
||||||
"name": "format",
|
"name": "message",
|
||||||
"placeholder": "エラーメッセージを入力してください"
|
"placeholder": "エラーメッセージを入力してください"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user