Files
KintoneAppBuilder/plugin/kintone-addins/src/index.ts

27 lines
749 B
TypeScript

// 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;
});
});