Compare commits
5 Commits
plugin-inf
...
tenraku
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dda9b7adad | ||
|
|
5663c313ea | ||
|
|
7da9b81319 | ||
|
|
da24972482 | ||
|
|
784cb7a473 |
502
backend/Scripts/Activate.ps1
Normal file
502
backend/Scripts/Activate.ps1
Normal file
@@ -0,0 +1,502 @@
|
|||||||
|
<#
|
||||||
|
.Synopsis
|
||||||
|
Activate a Python virtual environment for the current PowerShell session.
|
||||||
|
|
||||||
|
.Description
|
||||||
|
Pushes the python executable for a virtual environment to the front of the
|
||||||
|
$Env:PATH environment variable and sets the prompt to signify that you are
|
||||||
|
in a Python virtual environment. Makes use of the command line switches as
|
||||||
|
well as the `pyvenv.cfg` file values present in the virtual environment.
|
||||||
|
|
||||||
|
.Parameter VenvDir
|
||||||
|
Path to the directory that contains the virtual environment to activate. The
|
||||||
|
default value for this is the parent of the directory that the Activate.ps1
|
||||||
|
script is located within.
|
||||||
|
|
||||||
|
.Parameter Prompt
|
||||||
|
The prompt prefix to display when this virtual environment is activated. By
|
||||||
|
default, this prompt is the name of the virtual environment folder (VenvDir)
|
||||||
|
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
|
||||||
|
|
||||||
|
.Example
|
||||||
|
Activate.ps1
|
||||||
|
Activates the Python virtual environment that contains the Activate.ps1 script.
|
||||||
|
|
||||||
|
.Example
|
||||||
|
Activate.ps1 -Verbose
|
||||||
|
Activates the Python virtual environment that contains the Activate.ps1 script,
|
||||||
|
and shows extra information about the activation as it executes.
|
||||||
|
|
||||||
|
.Example
|
||||||
|
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
|
||||||
|
Activates the Python virtual environment located in the specified location.
|
||||||
|
|
||||||
|
.Example
|
||||||
|
Activate.ps1 -Prompt "MyPython"
|
||||||
|
Activates the Python virtual environment that contains the Activate.ps1 script,
|
||||||
|
and prefixes the current prompt with the specified string (surrounded in
|
||||||
|
parentheses) while the virtual environment is active.
|
||||||
|
|
||||||
|
.Notes
|
||||||
|
On Windows, it may be required to enable this Activate.ps1 script by setting the
|
||||||
|
execution policy for the user. You can do this by issuing the following PowerShell
|
||||||
|
command:
|
||||||
|
|
||||||
|
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
|
||||||
|
|
||||||
|
For more information on Execution Policies:
|
||||||
|
https://go.microsoft.com/fwlink/?LinkID=135170
|
||||||
|
|
||||||
|
#>
|
||||||
|
Param(
|
||||||
|
[Parameter(Mandatory = $false)]
|
||||||
|
[String]
|
||||||
|
$VenvDir,
|
||||||
|
[Parameter(Mandatory = $false)]
|
||||||
|
[String]
|
||||||
|
$Prompt
|
||||||
|
)
|
||||||
|
|
||||||
|
<# Function declarations --------------------------------------------------- #>
|
||||||
|
|
||||||
|
<#
|
||||||
|
.Synopsis
|
||||||
|
Remove all shell session elements added by the Activate script, including the
|
||||||
|
addition of the virtual environment's Python executable from the beginning of
|
||||||
|
the PATH variable.
|
||||||
|
|
||||||
|
.Parameter NonDestructive
|
||||||
|
If present, do not remove this function from the global namespace for the
|
||||||
|
session.
|
||||||
|
|
||||||
|
#>
|
||||||
|
function global:deactivate ([switch]$NonDestructive) {
|
||||||
|
# Revert to original values
|
||||||
|
|
||||||
|
# The prior prompt:
|
||||||
|
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
|
||||||
|
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
|
||||||
|
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
|
||||||
|
}
|
||||||
|
|
||||||
|
# The prior PYTHONHOME:
|
||||||
|
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
|
||||||
|
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
|
||||||
|
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
|
||||||
|
}
|
||||||
|
|
||||||
|
# The prior PATH:
|
||||||
|
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
|
||||||
|
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
|
||||||
|
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
|
||||||
|
}
|
||||||
|
|
||||||
|
# Just remove the VIRTUAL_ENV altogether:
|
||||||
|
if (Test-Path -Path Env:VIRTUAL_ENV) {
|
||||||
|
Remove-Item -Path env:VIRTUAL_ENV
|
||||||
|
}
|
||||||
|
|
||||||
|
# Just remove VIRTUAL_ENV_PROMPT altogether.
|
||||||
|
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
|
||||||
|
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
|
||||||
|
}
|
||||||
|
|
||||||
|
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
|
||||||
|
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
|
||||||
|
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
|
||||||
|
}
|
||||||
|
|
||||||
|
# Leave deactivate function in the global namespace if requested:
|
||||||
|
if (-not $NonDestructive) {
|
||||||
|
Remove-Item -Path function:deactivate
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
<#
|
||||||
|
.Description
|
||||||
|
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
|
||||||
|
given folder, and returns them in a map.
|
||||||
|
|
||||||
|
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
|
||||||
|
two strings separated by `=` (with any amount of whitespace surrounding the =)
|
||||||
|
then it is considered a `key = value` line. The left hand string is the key,
|
||||||
|
the right hand is the value.
|
||||||
|
|
||||||
|
If the value starts with a `'` or a `"` then the first and last character is
|
||||||
|
stripped from the value before being captured.
|
||||||
|
|
||||||
|
.Parameter ConfigDir
|
||||||
|
Path to the directory that contains the `pyvenv.cfg` file.
|
||||||
|
#>
|
||||||
|
function Get-PyVenvConfig(
|
||||||
|
[String]
|
||||||
|
$ConfigDir
|
||||||
|
) {
|
||||||
|
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
|
||||||
|
|
||||||
|
# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
|
||||||
|
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
|
||||||
|
|
||||||
|
# An empty map will be returned if no config file is found.
|
||||||
|
$pyvenvConfig = @{ }
|
||||||
|
|
||||||
|
if ($pyvenvConfigPath) {
|
||||||
|
|
||||||
|
Write-Verbose "File exists, parse `key = value` lines"
|
||||||
|
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
|
||||||
|
|
||||||
|
$pyvenvConfigContent | ForEach-Object {
|
||||||
|
$keyval = $PSItem -split "\s*=\s*", 2
|
||||||
|
if ($keyval[0] -and $keyval[1]) {
|
||||||
|
$val = $keyval[1]
|
||||||
|
|
||||||
|
# Remove extraneous quotations around a string value.
|
||||||
|
if ("'""".Contains($val.Substring(0, 1))) {
|
||||||
|
$val = $val.Substring(1, $val.Length - 2)
|
||||||
|
}
|
||||||
|
|
||||||
|
$pyvenvConfig[$keyval[0]] = $val
|
||||||
|
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $pyvenvConfig
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
<# Begin Activate script --------------------------------------------------- #>
|
||||||
|
|
||||||
|
# Determine the containing directory of this script
|
||||||
|
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
|
||||||
|
$VenvExecDir = Get-Item -Path $VenvExecPath
|
||||||
|
|
||||||
|
Write-Verbose "Activation script is located in path: '$VenvExecPath'"
|
||||||
|
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
|
||||||
|
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
|
||||||
|
|
||||||
|
# Set values required in priority: CmdLine, ConfigFile, Default
|
||||||
|
# First, get the location of the virtual environment, it might not be
|
||||||
|
# VenvExecDir if specified on the command line.
|
||||||
|
if ($VenvDir) {
|
||||||
|
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
|
||||||
|
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
|
||||||
|
Write-Verbose "VenvDir=$VenvDir"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Next, read the `pyvenv.cfg` file to determine any required value such
|
||||||
|
# as `prompt`.
|
||||||
|
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
|
||||||
|
|
||||||
|
# Next, set the prompt from the command line, or the config file, or
|
||||||
|
# just use the name of the virtual environment folder.
|
||||||
|
if ($Prompt) {
|
||||||
|
Write-Verbose "Prompt specified as argument, using '$Prompt'"
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
|
||||||
|
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
|
||||||
|
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
|
||||||
|
$Prompt = $pyvenvCfg['prompt'];
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
|
||||||
|
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
|
||||||
|
$Prompt = Split-Path -Path $venvDir -Leaf
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Verbose "Prompt = '$Prompt'"
|
||||||
|
Write-Verbose "VenvDir='$VenvDir'"
|
||||||
|
|
||||||
|
# Deactivate any currently active virtual environment, but leave the
|
||||||
|
# deactivate function in place.
|
||||||
|
deactivate -nondestructive
|
||||||
|
|
||||||
|
# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
|
||||||
|
# that there is an activated venv.
|
||||||
|
$env:VIRTUAL_ENV = $VenvDir
|
||||||
|
|
||||||
|
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
|
||||||
|
|
||||||
|
Write-Verbose "Setting prompt to '$Prompt'"
|
||||||
|
|
||||||
|
# Set the prompt to include the env name
|
||||||
|
# Make sure _OLD_VIRTUAL_PROMPT is global
|
||||||
|
function global:_OLD_VIRTUAL_PROMPT { "" }
|
||||||
|
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
|
||||||
|
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
|
||||||
|
|
||||||
|
function global:prompt {
|
||||||
|
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
|
||||||
|
_OLD_VIRTUAL_PROMPT
|
||||||
|
}
|
||||||
|
$env:VIRTUAL_ENV_PROMPT = $Prompt
|
||||||
|
}
|
||||||
|
|
||||||
|
# Clear PYTHONHOME
|
||||||
|
if (Test-Path -Path Env:PYTHONHOME) {
|
||||||
|
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
|
||||||
|
Remove-Item -Path Env:PYTHONHOME
|
||||||
|
}
|
||||||
|
|
||||||
|
# Add the venv to the PATH
|
||||||
|
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
|
||||||
|
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"
|
||||||
|
|
||||||
|
# SIG # Begin signature block
|
||||||
|
# MIIvIgYJKoZIhvcNAQcCoIIvEzCCLw8CAQExDzANBglghkgBZQMEAgEFADB5Bgor
|
||||||
|
# BgEEAYI3AgEEoGswaTA0BgorBgEEAYI3AgEeMCYCAwEAAAQQH8w7YFlLCE63JNLG
|
||||||
|
# KX7zUQIBAAIBAAI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DmOu5tTvkpI6nj3c
|
||||||
|
# AORFJYm2mkQZK37AlLTSYW3rM9nF30sEAMx9HJXDj/chsrIRt7t/8tWMcCxBYKqx
|
||||||
|
# YxhElRp2Yn72gLD76GSmM9GJB+G9t+ZDpBi4pncB4Q+UDCEdslQpJYls5Q5SUUd0
|
||||||
|
# viastkF13nqsX40/ybzTQRESW+UQUOsxxcpyFiIJ33xMdT9j7CFfxCBRa2+xq4aL
|
||||||
|
# T8LWRV+dIPyhHsXAj6KxfgommfXkaS+YHS312amyHeUbAgMBAAGjQjBAMA8GA1Ud
|
||||||
|
# EwEB/wQFMAMBAf8wDgYDVR0PAQH/BAQDAgGGMB0GA1UdDgQWBBTs1+OC0nFdZEzf
|
||||||
|
# Lmc/57qYrhwPTzANBgkqhkiG9w0BAQwFAAOCAgEAu2HZfalsvhfEkRvDoaIAjeNk
|
||||||
|
# aA9Wz3eucPn9mkqZucl4XAwMX+TmFClWCzZJXURj4K2clhhmGyMNPXnpbWvWVPjS
|
||||||
|
# PMFDQK4dUPVS/JA7u5iZaWvHwaeoaKQn3J35J64whbn2Z006Po9ZOSJTROvIXQPK
|
||||||
|
# 7VB6fWIhCoDIc2bRoAVgX+iltKevqPdtNZx8WorWojiZ83iL9E3SIAveBO6Mm0eB
|
||||||
|
# cg3AFDLvMFkuruBx8lbkapdvklBtlo1oepqyNhR6BvIkuQkRUNcIsbiJeoQjYUIp
|
||||||
|
# 5aPNoiBB19GcZNnqJqGLFNdMGbJQQXE9P01wI4YMStyB0swylIQNCAmXHE/A7msg
|
||||||
|
# dDDS4Dk0EIUhFQEI6FUy3nFJ2SgXUE3mvk3RdazQyvtBuEOlqtPDBURPLDab4vri
|
||||||
|
# RbgjU2wGb2dVf0a1TD9uKFp5JtKkqGKX0h7i7UqLvBv9R0oN32dmfrJbQdA75PQ7
|
||||||
|
# 9ARj6e/CVABRoIoqyc54zNXqhwQYs86vSYiv85KZtrPmYQ/ShQDnUBrkG5WdGaG5
|
||||||
|
# nLGbs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|
# o/jdr3t1yqExSecge3YGCu9USfMqLtmCKzG5r2rf3xZkJ6CpvmHwji3FUY6Hl991
|
||||||
|
# Ttd0eEEpjeEse9gotnojgHTQACJntGuPcK+65jIQYNvp3JIuczjTW0JjWkJf4lqI
|
||||||
|
# hVS6rEc00D/0NsUF9BbNkjNZ0AUQeOWe2WZJnqRRFN4U3pToN51NDjpEtRjlNTkc
|
||||||
|
# SzoNO7ZyEsSXkNenlgbgS1yXEQ8v4bbnbPyyL+2yWMG1QsLv6M3OV0kXx9aow1r5
|
||||||
|
# gZ1mCjBkbtWKH58WVBoepUaPYTjFBWCT2pDrorbg6cguwBdyz7s8X+WlCD4ycFfW
|
||||||
|
# o95x7u1W9RwPPPppszr8Pd4jZSbEXEQ/G9Ke5NvTvNmK93b7/kySfNYfwW2meP6E
|
||||||
|
# JIc0R9DMSZlK+ChtU5mmvo4e6YQTLXIXQhPIz7jVNlUjXMJX7WALjE72EDdC5MpQ
|
||||||
|
# ygW7wue6EhjlUVXT4pEIySCGaXxUzRi1oh+Q+Jbe3rDvhSPZUWzCqEtOkJ35dLYh
|
||||||
|
# D9Rahi2BM1qaepfu1wVtSXbVbc0SDPjloojEmTyDnk61u5epo0E0oHqNAU8t1ZTN
|
||||||
|
# +Guptl/agMp52uRsaC5Bi276icqRtclfx9E4SfJEiw7xRlImCclMpw2dRsyzIrpb
|
||||||
|
# MKpWDAno4rClgYS3M9lqQ71RlXehghc+MIIXOgYKKwYBBAGCNwMDATGCFyowghcm
|
||||||
|
# BgkqhkiG9w0BBwKgghcXMIIXEwIBAzEPMA0GCWCGSAFlAwQCAQUAMHgGCyqGSIb3
|
||||||
|
# DQEJEAEEoGkEZzBlAgEBBglghkgBhv1sBwEwMTANBglghkgBZQMEAgEFAAQgsPGH
|
||||||
|
# UIiYgGXi/94WNZrP+V1kV/B5SVJn3ck+XzTJ0aACEQCJ79BpOkCDCW06IgZOU3EQ
|
||||||
|
# GA8yMDIzMDYwNzA1NTc0NFqgghMHMIIG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62SBs
|
||||||
|
# GFFguqaBDwklU/G/O+mrBw5qBzliGcnWhX8T2Y15z2LF7OF7ucxnEweawXjtxojI
|
||||||
|
# sG4yeccLWYONxu71LHx7jstkifGxxLjnU15fVdJ9GSlZA076XepFcxyEftfO4tQ6
|
||||||
|
# dwIDAQABo4IBizCCAYcwDgYDVR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwFgYD
|
||||||
|
# VR0lAQH/BAwwCgYIKwYBBQUHAwgwIAYDVR0gBBkwFzAIBgZngQwBBAIwCwYJYIZI
|
||||||
|
# AYb9bAcBMB8GA1UdIwQYMBaAFLoW2W1NhS9zKXaaL3WMaiCPnshvMB0GA1UdDgQW
|
||||||
|
# BBRiit7QYfyPMRTtlwvNPSqUFN9SnDBaBgNVHR8EUzBRME+gTaBLhklodHRwOi8v
|
||||||
|
# Y3JsMy5kaWdpY2VydC5jb20vRGlnaUNlcnRUcnVzdGVkRzRSU0E0MDk2U0hBMjU2
|
||||||
|
# VGltZVN0YW1waW5nQ0EuY3JsMIGQBggrBgEFBQcBAQSBgzCBgDAkBggrBgEFBQcw
|
||||||
|
# AYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMFgGCCsGAQUFBzAChkxodHRwOi8v
|
||||||
|
# Y2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRUcnVzdGVkRzRSU0E0MDk2U0hB
|
||||||
|
# MjU2VGltZVN0YW1waW5nQ0EuY3J0MA0GCSqGSIb3DQEBCwUAA4ICAQBVqioa80bz
|
||||||
|
# eFc3MPx140/WhSPx/PmVOZsl5vdyipjDd9Rk/BX7NsJJUSx4iGNVCUY5APxp1Mqb
|
||||||
|
# KfujP8DJAJsTHbCYidx48s18hc1Tna9i4mFmoxQqRYdKmEIrUPwbtZ4IMAn65C3X
|
||||||
|
# CYl5+QnmiM59G7hqopvBU2AJ6KO4ndetHxy47JhB8PYOgPvk/9+dEKfrALpfSo8a
|
||||||
|
# OlK06r8JSRU1NlmaD1T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Rp2Yn72gLD7
|
||||||
|
# 6GSmM9GJB+G9t+ZDpBi4pncB4Q+UDCEdslQpJYls5Q5SUUd0viastkF13nqsX40/
|
||||||
|
# ybzTQRESW+UQUOsxxcpyFiIJ33xMdT9j7CFfxCBRa2+xq4aLT8LWRV+dIPyhHsXA
|
||||||
|
# j6KxfgommfXkaS+YHS312amyHeUbAgMBAAGjggE6MIIBNjAPBgNVHRMBAf8EBTAD
|
||||||
|
# AQH/MB0GA1UdDgQWBBTs1+OC0nFdZEzfLmc/57qYrhwPTzAfBgNVHSMEGDAWgBRF
|
||||||
|
# 66Kv9JLLgjEtUYunpyGd823IDzAOBgNVHQ8BAf8EBAMCAYYweQYIKwYBBQUHAQEE
|
||||||
|
# bTBrMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wQwYIKwYB
|
||||||
|
# BQUHMAKGN2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydEFzc3Vy
|
||||||
|
# ZWRJRFJvb3RDQS5jcnQwRQYDVR0fBD4wPDA6oDigNoY0aHR0cDovL2NybDMuZGln
|
||||||
|
# aWNlcnQuY29tL0RpZ2lDZXJ0QXNzdXJlZElEUm9vdENBLmNybDARBgNVHSAECjAI
|
||||||
|
# MAYGBFUdIAAwDQYJKoZIhvcNAQEMBQADggEBAHCgv0NcVec4X6CjdBs9thbX979X
|
||||||
|
# B72arKGHLOyFXqkauyL4hxppVCLtpIh3bb0aFPQTSnovLbc47/T/gLn4offyct4k
|
||||||
|
# vFIDyE7QKt76LVbP+fT3rDB6mouyXtTP0UNEm0Mh65ZyoUi0mcudT6cGAxN3J0TU
|
||||||
|
# 53/oWajwvy8LpunyNDzs9wPHh6jSTEAZNUZqaVSwuKFWjuyk1T3osdz9HNj0d1pc
|
||||||
|
# VIxv76FQPfx2CWiEn2/K2yCNNWAcAgPLILCsWKAOQGPFmCLBsln1VWvPJ6tsds5v
|
||||||
|
# Iy30fnFqI2si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L6e4jVJm1aR1ebUVS4nZVZ/jbCexR/+vx
|
||||||
|
# mfSh1SezU3KlgRMDrLF+El883BFoe/99p4/QjjnELhn41lPPAYGefhMI9ioYZULQ
|
||||||
|
# xMyG6qIPA8s2tnYIL/AKvh7SUgFVtOsTKbTFXMMr20sipBQQFUOb8ZD+8u4Iyc4M
|
||||||
|
# UC4d2S6z9zwlPbSr1lk9m3R8rl+j2/VkB1S21nqda3xWFk/+n/2oEJe4gUkCiQxs
|
||||||
|
# qFaykkcAhWYdZVRRNM89ZF23DeYAEkUEaD2M1ld0CZNtvtPNmv/NZV/Xbb3H0RPR
|
||||||
|
# yDBB2JQI1BbEjl7HWy616MUsAqWA+Q==
|
||||||
|
# SIG # End signature block
|
||||||
69
backend/Scripts/activate
Normal file
69
backend/Scripts/activate
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
# This file must be used with "source bin/activate" *from bash*
|
||||||
|
# you cannot run it directly
|
||||||
|
|
||||||
|
deactivate () {
|
||||||
|
# reset old environment variables
|
||||||
|
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
|
||||||
|
PATH="${_OLD_VIRTUAL_PATH:-}"
|
||||||
|
export PATH
|
||||||
|
unset _OLD_VIRTUAL_PATH
|
||||||
|
fi
|
||||||
|
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
|
||||||
|
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
|
||||||
|
export PYTHONHOME
|
||||||
|
unset _OLD_VIRTUAL_PYTHONHOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This should detect bash and zsh, which have a hash command that must
|
||||||
|
# be called to get it to forget past commands. Without forgetting
|
||||||
|
# past commands the $PATH changes we made may not be respected
|
||||||
|
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||||
|
hash -r 2> /dev/null
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
|
||||||
|
PS1="${_OLD_VIRTUAL_PS1:-}"
|
||||||
|
export PS1
|
||||||
|
unset _OLD_VIRTUAL_PS1
|
||||||
|
fi
|
||||||
|
|
||||||
|
unset VIRTUAL_ENV
|
||||||
|
unset VIRTUAL_ENV_PROMPT
|
||||||
|
if [ ! "${1:-}" = "nondestructive" ] ; then
|
||||||
|
# Self destruct!
|
||||||
|
unset -f deactivate
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
# unset irrelevant variables
|
||||||
|
deactivate nondestructive
|
||||||
|
|
||||||
|
VIRTUAL_ENV="C:\project\Kintone\KintoneAppBuilder\backend"
|
||||||
|
export VIRTUAL_ENV
|
||||||
|
|
||||||
|
_OLD_VIRTUAL_PATH="$PATH"
|
||||||
|
PATH="$VIRTUAL_ENV/Scripts:$PATH"
|
||||||
|
export PATH
|
||||||
|
|
||||||
|
# unset PYTHONHOME if set
|
||||||
|
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
|
||||||
|
# could use `if (set -u; : $PYTHONHOME) ;` in bash
|
||||||
|
if [ -n "${PYTHONHOME:-}" ] ; then
|
||||||
|
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
|
||||||
|
unset PYTHONHOME
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
|
||||||
|
_OLD_VIRTUAL_PS1="${PS1:-}"
|
||||||
|
PS1="(backend) ${PS1:-}"
|
||||||
|
export PS1
|
||||||
|
VIRTUAL_ENV_PROMPT="(backend) "
|
||||||
|
export VIRTUAL_ENV_PROMPT
|
||||||
|
fi
|
||||||
|
|
||||||
|
# This should detect bash and zsh, which have a hash command that must
|
||||||
|
# be called to get it to forget past commands. Without forgetting
|
||||||
|
# past commands the $PATH changes we made may not be respected
|
||||||
|
if [ -n "${BASH:-}" -o -n "${ZSH_VERSION:-}" ] ; then
|
||||||
|
hash -r 2> /dev/null
|
||||||
|
fi
|
||||||
34
backend/Scripts/activate.bat
Normal file
34
backend/Scripts/activate.bat
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
rem This file is UTF-8 encoded, so we need to update the current code page while executing it
|
||||||
|
for /f "tokens=2 delims=:." %%a in ('"%SystemRoot%\System32\chcp.com"') do (
|
||||||
|
set _OLD_CODEPAGE=%%a
|
||||||
|
)
|
||||||
|
if defined _OLD_CODEPAGE (
|
||||||
|
"%SystemRoot%\System32\chcp.com" 65001 > nul
|
||||||
|
)
|
||||||
|
|
||||||
|
set VIRTUAL_ENV=C:\project\Kintone\KintoneAppBuilder\backend
|
||||||
|
|
||||||
|
if not defined PROMPT set PROMPT=$P$G
|
||||||
|
|
||||||
|
if defined _OLD_VIRTUAL_PROMPT set PROMPT=%_OLD_VIRTUAL_PROMPT%
|
||||||
|
if defined _OLD_VIRTUAL_PYTHONHOME set PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%
|
||||||
|
|
||||||
|
set _OLD_VIRTUAL_PROMPT=%PROMPT%
|
||||||
|
set PROMPT=(backend) %PROMPT%
|
||||||
|
|
||||||
|
if defined PYTHONHOME set _OLD_VIRTUAL_PYTHONHOME=%PYTHONHOME%
|
||||||
|
set PYTHONHOME=
|
||||||
|
|
||||||
|
if defined _OLD_VIRTUAL_PATH set PATH=%_OLD_VIRTUAL_PATH%
|
||||||
|
if not defined _OLD_VIRTUAL_PATH set _OLD_VIRTUAL_PATH=%PATH%
|
||||||
|
|
||||||
|
set PATH=%VIRTUAL_ENV%\Scripts;%PATH%
|
||||||
|
set VIRTUAL_ENV_PROMPT=(backend)
|
||||||
|
|
||||||
|
:END
|
||||||
|
if defined _OLD_CODEPAGE (
|
||||||
|
"%SystemRoot%\System32\chcp.com" %_OLD_CODEPAGE% > nul
|
||||||
|
set _OLD_CODEPAGE=
|
||||||
|
)
|
||||||
22
backend/Scripts/deactivate.bat
Normal file
22
backend/Scripts/deactivate.bat
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
@echo off
|
||||||
|
|
||||||
|
if defined _OLD_VIRTUAL_PROMPT (
|
||||||
|
set "PROMPT=%_OLD_VIRTUAL_PROMPT%"
|
||||||
|
)
|
||||||
|
set _OLD_VIRTUAL_PROMPT=
|
||||||
|
|
||||||
|
if defined _OLD_VIRTUAL_PYTHONHOME (
|
||||||
|
set "PYTHONHOME=%_OLD_VIRTUAL_PYTHONHOME%"
|
||||||
|
set _OLD_VIRTUAL_PYTHONHOME=
|
||||||
|
)
|
||||||
|
|
||||||
|
if defined _OLD_VIRTUAL_PATH (
|
||||||
|
set "PATH=%_OLD_VIRTUAL_PATH%"
|
||||||
|
)
|
||||||
|
|
||||||
|
set _OLD_VIRTUAL_PATH=
|
||||||
|
|
||||||
|
set VIRTUAL_ENV=
|
||||||
|
set VIRTUAL_ENV_PROMPT=
|
||||||
|
|
||||||
|
:END
|
||||||
BIN
backend/Scripts/pip.exe
Normal file
BIN
backend/Scripts/pip.exe
Normal file
Binary file not shown.
BIN
backend/Scripts/pip3.11.exe
Normal file
BIN
backend/Scripts/pip3.11.exe
Normal file
Binary file not shown.
BIN
backend/Scripts/pip3.exe
Normal file
BIN
backend/Scripts/pip3.exe
Normal file
Binary file not shown.
BIN
backend/Scripts/python.exe
Normal file
BIN
backend/Scripts/python.exe
Normal file
Binary file not shown.
BIN
backend/Scripts/pythonw.exe
Normal file
BIN
backend/Scripts/pythonw.exe
Normal file
Binary file not shown.
File diff suppressed because one or more lines are too long
@@ -12,8 +12,8 @@ API_V1_AUTH_KEY = "X-Cybozu-Authorization"
|
|||||||
|
|
||||||
DEPLOY_MODE = "DEV" #DEV,PROD
|
DEPLOY_MODE = "DEV" #DEV,PROD
|
||||||
|
|
||||||
DEPLOY_JS_URL = "https://ka-addin.azurewebsites.net/alc_runtime.js"
|
#DEPLOY_JS_URL = "https://ka-addin.azurewebsites.net/alc_runtime.js"
|
||||||
#DEPLOY_JS_URL = "https://e84c-133-139-70-142.ngrok-free.app/alc_runtime.js"
|
DEPLOY_JS_URL = "https://92dc-133-139-109-57.ngrok-free.app/alc_runtime.js"
|
||||||
|
|
||||||
KINTONE_FIELD_TYPE=["GROUP","GROUP_SELECT","CHECK_BOX","SUBTABLE","DROP_DOWN","USER_SELECT","RADIO_BUTTON","RICH_TEXT","LINK","REFERENCE_TABLE","CALC","TIME","NUMBER","ORGANIZATION_SELECT","FILE","DATETIME","DATE","MULTI_SELECT","SINGLE_LINE_TEXT","MULTI_LINE_TEXT"]
|
KINTONE_FIELD_TYPE=["GROUP","GROUP_SELECT","CHECK_BOX","SUBTABLE","DROP_DOWN","USER_SELECT","RADIO_BUTTON","RICH_TEXT","LINK","REFERENCE_TABLE","CALC","TIME","NUMBER","ORGANIZATION_SELECT","FILE","DATETIME","DATE","MULTI_SELECT","SINGLE_LINE_TEXT","MULTI_LINE_TEXT"]
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,2 @@
|
|||||||
KAB_BACKEND_URL="https://kab-backend.azurewebsites.net/"
|
# KAB_BACKEND_URL="https://kab-backend.azurewebsites.net/"
|
||||||
#KAB_BACKEND_URL="http://127.0.0.1:8000/"
|
KAB_BACKEND_URL="http://127.0.0.1:8000/"
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<html lang="ja-jp">
|
<html lang="ja-jp">
|
||||||
<head>
|
<head>
|
||||||
<title><%= productName %></title>
|
<title><%= productName %></title>
|
||||||
|
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="description" content="<%= productDescription %>">
|
<meta name="description" content="<%= productDescription %>">
|
||||||
<meta name="format-detection" content="telephone=no">
|
<meta name="format-detection" content="telephone=no">
|
||||||
|
|||||||
@@ -17,9 +17,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@quasar/extras": "^1.16.4",
|
"@quasar/extras": "^1.16.4",
|
||||||
"@vueuse/core": "^10.9.0",
|
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.4.0",
|
||||||
"pinia": "^2.1.7",
|
"pinia": "^2.1.6",
|
||||||
"quasar": "^2.6.0",
|
"quasar": "^2.6.0",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.0",
|
||||||
"vue": "^3.0.0",
|
"vue": "^3.0.0",
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { Router } from 'vue-router';
|
|||||||
import { App } from 'vue';
|
import { App } from 'vue';
|
||||||
|
|
||||||
export default boot(({ app, router }: { app: App<Element>; router: Router }) => {
|
export default boot(({ app, router }: { app: App<Element>; router: Router }) => {
|
||||||
document.documentElement.lang="ja-JP";
|
|
||||||
app.config.errorHandler = (err: any, instance: any, info: string) => {
|
app.config.errorHandler = (err: any, instance: any, info: string) => {
|
||||||
if (err.response && err.response.status === 401) {
|
if (err.response && err.response.status === 401) {
|
||||||
// 認証エラーの場合再ログインする
|
// 認証エラーの場合再ログインする
|
||||||
|
|||||||
@@ -1,152 +0,0 @@
|
|||||||
<template>
|
|
||||||
|
|
||||||
<div class="q-mx-md q-mb-lg">
|
|
||||||
<div class="q-mb-xs q-ml-md text-primary">アプリ選択</div>
|
|
||||||
|
|
||||||
<div class="q-pa-md row" style="border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 4px;">
|
|
||||||
<div v-if="selField?.app && !showSelectApp">{{ selField.app?.name }}</div>
|
|
||||||
<q-space />
|
|
||||||
<div>
|
|
||||||
<q-btn outline dense label="選 択" padding="none sm" color="primary" @click="() => {
|
|
||||||
showSelectApp = true;
|
|
||||||
}"></q-btn>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div v-if="!showSelectApp && selField.app?.name">
|
|
||||||
<div>
|
|
||||||
<div class="row q-mb-md">
|
|
||||||
<!-- <div class="col"> -->
|
|
||||||
<div class="q-mb-xs q-ml-md text-primary">フィールド選択</div>
|
|
||||||
<!-- </div> -->
|
|
||||||
<q-space />
|
|
||||||
<!-- <div class="col"> -->
|
|
||||||
<div class="q-mr-md">
|
|
||||||
<q-input dense debounce="300" v-model="fieldFilter" placeholder="フィールド検索" clearable>
|
|
||||||
<template v-slot:before>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
<field-select ref="fieldDlg" name="フィールド" :type="selectType" :updateSelects="updateItems"
|
|
||||||
:appId="selField.app?.id" not_page :filter="fieldFilter"
|
|
||||||
:selFields="selField.fields"></field-select>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div style="min-width: 45vw;" v-else>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<show-dialog v-model:visible="showSelectApp" name="アプリ選択" @close="closeAppDlg">
|
|
||||||
<template v-slot:toolbar>
|
|
||||||
<q-input dense debounce="300" v-model="filter" placeholder="検索" clearable>
|
|
||||||
<template v-slot:before>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<AppSelectBox ref="appDlg" name="アプリ" type="single" :filter="filter"
|
|
||||||
:updateExternalSelectAppInfo="updateExternalSelectAppInfo"></AppSelectBox>
|
|
||||||
</show-dialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { defineComponent, ref, watchEffect, computed ,reactive} from 'vue';
|
|
||||||
import ShowDialog from './ShowDialog.vue';
|
|
||||||
import FieldSelect from './FieldSelect.vue';
|
|
||||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
|
||||||
import AppSelectBox from './AppSelectBox.vue';
|
|
||||||
interface IApp {
|
|
||||||
id: string,
|
|
||||||
name: string
|
|
||||||
}
|
|
||||||
interface IField {
|
|
||||||
name: string,
|
|
||||||
code: string,
|
|
||||||
type: string
|
|
||||||
}
|
|
||||||
|
|
||||||
interface IAppFields {
|
|
||||||
app?: IApp,
|
|
||||||
fields: IField[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
inheritAttrs: false,
|
|
||||||
name: 'AppFieldSelectBox',
|
|
||||||
components: {
|
|
||||||
ShowDialog,
|
|
||||||
FieldSelect,
|
|
||||||
AppSelectBox,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
selectedField: {
|
|
||||||
type: Object,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
selectType: {
|
|
||||||
type: String,
|
|
||||||
default: 'single'
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
|
||||||
setup(props, { emit }) {
|
|
||||||
const appDlg = ref();
|
|
||||||
const fieldDlg = ref();
|
|
||||||
const showSelectApp = ref(false);
|
|
||||||
const selField = reactive(props.selectedField);
|
|
||||||
console.log(props.selectedField);
|
|
||||||
|
|
||||||
const store = useFlowEditorStore();
|
|
||||||
|
|
||||||
const isSelected = computed(() => {
|
|
||||||
return selField !== null && typeof selField === 'object' && ('app' in selField)
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
const closeAppDlg = (val: string) => {
|
|
||||||
if (val == 'OK') {
|
|
||||||
selField.app = appDlg.value.selected[0];
|
|
||||||
selField.fields = [];
|
|
||||||
showSelectApp.value = false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
const closeFieldDialog = (val: string) => {
|
|
||||||
if (val == 'OK') {
|
|
||||||
selField.fields = fieldDlg.value.selected;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
const updateExternalSelectAppInfo = (newAppinfo: IApp) => {
|
|
||||||
selField.app = newAppinfo
|
|
||||||
}
|
|
||||||
|
|
||||||
const updateItems = (newFields: IField[]) => {
|
|
||||||
selField.fields = newFields
|
|
||||||
}
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
emit('update:modelValue', selField);
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
appDlg,
|
|
||||||
fieldDlg,
|
|
||||||
closeAppDlg,
|
|
||||||
closeFieldDialog,
|
|
||||||
showSelectApp,
|
|
||||||
isSelected,
|
|
||||||
updateExternalSelectAppInfo,
|
|
||||||
filter: ref(),
|
|
||||||
updateItems,
|
|
||||||
fieldFilter: ref(),
|
|
||||||
selField
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -21,7 +21,7 @@ import { ref, onMounted, reactive, watchEffect } from 'vue'
|
|||||||
import { api } from 'boot/axios';
|
import { api } from 'boot/axios';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppSelectBox',
|
name: 'AppSelect',
|
||||||
props: {
|
props: {
|
||||||
name: String,
|
name: String,
|
||||||
type: String,
|
type: String,
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<show-dialog v-model:visible="showflg" name="条件エディタ" @close="closeDg" min-width="50vw" min-height="60vh">
|
<show-dialog v-model:visible="showflg" name="条件エディタ" @close="closeDg" min-width="60vw" min-height="60vh">
|
||||||
<template v-slot:toolbar>
|
<template v-slot:toolbar>
|
||||||
<q-btn flat round dense icon="more_vert" >
|
<q-btn flat round dense icon="more_vert" >
|
||||||
<q-menu auto-close anchor="bottom start">
|
<q-menu auto-close anchor="bottom start">
|
||||||
|
|||||||
@@ -6,21 +6,21 @@
|
|||||||
{{ selectedObject.name }}
|
{{ selectedObject.name }}
|
||||||
</q-chip>
|
</q-chip>
|
||||||
<q-chip color="info" text-color="white" v-if="isSelected && selectedObject.objectType==='variable'" :dense="true" class="selected-obj">
|
<q-chip color="info" text-color="white" v-if="isSelected && selectedObject.objectType==='variable'" :dense="true" class="selected-obj">
|
||||||
{{ selectedObject.name.name }}
|
{{ selectedObject.name }}
|
||||||
</q-chip>
|
</q-chip>
|
||||||
</template>
|
</template>
|
||||||
<template v-slot:append>
|
<template v-slot:append>
|
||||||
<q-icon name="search" class="cursor-pointer" @click="showDg"/>
|
<q-icon name="search" class="cursor-pointer" @click="showDg"/>
|
||||||
</template>
|
</template>
|
||||||
</q-field>
|
</q-field>
|
||||||
<show-dialog v-model:visible="show" name="設定項目一覧" @close="closeDg" min-width="400px">
|
<show-dialog v-model:visible="show" name="条件設定項目一覧" @close="closeDg" width="600px">
|
||||||
<template v-slot:toolbar>
|
<template v-slot:toolbar>
|
||||||
<q-input dense debounce="200" v-model="filter" placeholder="検索" clearable>
|
<q-input dense debounce="200" v-model="filter" placeholder="検索" clearable>
|
||||||
<template v-slot:before>
|
<template v-slot:before>
|
||||||
<q-icon name="search" />
|
<q-icon name="search" />
|
||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
<condition-objects ref="appDg" name="フィールド" type="single" :filter="filter" :appId="store.appInfo?.appId" :vars="vars"></condition-objects>
|
<condition-objects ref="appDg" name="フィールド" type="single" :filter="filter" :appId="store.appInfo?.appId" :vars="vars"></condition-objects>
|
||||||
</show-dialog>
|
</show-dialog>
|
||||||
</template>
|
</template>
|
||||||
@@ -88,9 +88,9 @@
|
|||||||
.condition-object{
|
.condition-object{
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
margin: 0 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
.selected-obj{
|
.selected-obj{
|
||||||
margin: 0 2px;
|
margin: 0px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -66,7 +66,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- condition -->
|
<!-- condition -->
|
||||||
<div @click.stop @keypress.stop v-else >
|
<div @click.stop @keypress.stop v-else >
|
||||||
<div class="row no-wrap items-center q-my-xs">
|
<div class="row no-wrap items-center">
|
||||||
<ConditionObject v-bind="prop.node" v-model="prop.node.object" class="col-4"></ConditionObject>
|
<ConditionObject v-bind="prop.node" v-model="prop.node.object" class="col-4"></ConditionObject>
|
||||||
<q-select v-model="prop.node.operator" :options="operators" class="operator" :outlined="true" :dense="true"></q-select>
|
<q-select v-model="prop.node.operator" :options="operators" class="operator" :outlined="true" :dense="true"></q-select>
|
||||||
<q-input v-if="!prop.node.object || !('options' in prop.node.object)"
|
<q-input v-if="!prop.node.object || !('options' in prop.node.object)"
|
||||||
@@ -113,7 +113,7 @@ import { finished } from 'stream';
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent,ref,reactive, computed, inject } from 'vue';
|
import { defineComponent,ref,reactive, computed } from 'vue';
|
||||||
import { INode,ConditionTree,GroupNode,ConditionNode, LogicalOperator,Operator,NodeType } from '../../types/Conditions';
|
import { INode,ConditionTree,GroupNode,ConditionNode, LogicalOperator,Operator,NodeType } from '../../types/Conditions';
|
||||||
import ConditionObject from './ConditionObject.vue';
|
import ConditionObject from './ConditionObject.vue';
|
||||||
export default defineComponent( {
|
export default defineComponent( {
|
||||||
@@ -143,9 +143,12 @@ export default defineComponent( {
|
|||||||
return opts;
|
return opts;
|
||||||
});
|
});
|
||||||
|
|
||||||
const operator = inject('Operator')
|
|
||||||
const operators =computed(()=>{
|
const operators =computed(()=>{
|
||||||
return operator ? operator : Object.values(Operator);
|
const opts=[];
|
||||||
|
for(const op in Operator){
|
||||||
|
opts.push(Operator[op as keyof typeof Operator]);
|
||||||
|
}
|
||||||
|
return opts;
|
||||||
});
|
});
|
||||||
const tree = reactive(props.conditionTree);
|
const tree = reactive(props.conditionTree);
|
||||||
|
|
||||||
@@ -254,12 +257,12 @@ export default defineComponent( {
|
|||||||
.condition-value{
|
.condition-value{
|
||||||
min-width: 200px;
|
min-width: 200px;
|
||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
margin: 0 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
.operator{
|
.operator{
|
||||||
min-width: 150px;
|
min-width: 150px;
|
||||||
max-height: 40px;
|
max-height: 40px;
|
||||||
margin: 0 2px;
|
padding: 2px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12pt;
|
font-size: 12pt;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
<q-tab-panels v-model="tab" animated>
|
<q-tab-panels v-model="tab" animated>
|
||||||
<q-tab-panel name="fields">
|
<q-tab-panel name="fields">
|
||||||
<field-list v-model="selected" type="single" :filter="filter" :appId="sourceApp ? sourceApp :appId " :fields="sourceFields"></field-list>
|
<field-list v-model="selected" type="single" :filter="filter" :appId="appId"></field-list>
|
||||||
</q-tab-panel>
|
</q-tab-panel>
|
||||||
|
|
||||||
<q-tab-panel name="vars" >
|
<q-tab-panel name="vars" >
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { ref, onMounted, reactive, inject } from 'vue'
|
import { ref, onMounted, reactive } from 'vue'
|
||||||
import FieldList from './FieldList.vue';
|
import FieldList from './FieldList.vue';
|
||||||
import VariableList from './VariableList.vue';
|
import VariableList from './VariableList.vue';
|
||||||
|
|
||||||
@@ -48,14 +48,10 @@ export default {
|
|||||||
filter:String
|
filter:String
|
||||||
},
|
},
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const selected = ref([]);
|
|
||||||
console.log(selected);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
sourceFields : inject('sourceFields'),
|
|
||||||
sourceApp : inject('sourceApp'),
|
|
||||||
tab: ref('fields'),
|
tab: ref('fields'),
|
||||||
selected
|
selected: ref([])
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -1,50 +1,50 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<q-table flat bordered :loading="!isLoaded" row-key="name" :selection="type" :selected="modelValue"
|
<q-table flat bordered :loading="!isLoaded" row-key="name" :selection="type"
|
||||||
@update:selected="$emit('update:modelValue', $event)" :filter="filter" :columns="columns" :rows="rows" />
|
:selected="modelValue"
|
||||||
|
@update:selected="$emit('update:modelValue', $event)"
|
||||||
|
:filter="filter"
|
||||||
|
:columns="columns" :rows="rows" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script>
|
||||||
import { useAsyncState } from '@vueuse/core';
|
import { ref, onMounted, reactive } from 'vue'
|
||||||
import { api } from 'boot/axios';
|
import { api } from 'boot/axios';
|
||||||
import { computed } from 'vue';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'FieldList',
|
name: 'FieldList',
|
||||||
props: {
|
props: {
|
||||||
fields: Array,
|
|
||||||
name: String,
|
name: String,
|
||||||
type: String,
|
type: String,
|
||||||
appId: Number,
|
appId: Number,
|
||||||
modelValue: Array,
|
modelValue:Array,
|
||||||
filter: String
|
filter:String
|
||||||
},
|
},
|
||||||
emits: [
|
emits:[
|
||||||
'update:modelValue'
|
'update:modelValue'
|
||||||
],
|
],
|
||||||
setup(props) {
|
setup(props) {
|
||||||
// const rows = ref([]);
|
const isLoaded = ref(false);
|
||||||
// const isLoaded = ref(false);
|
|
||||||
const columns = [
|
const columns = [
|
||||||
{ name: 'name', required: true, label: 'フィールド名', align: 'left', field: 'name', sortable: true },
|
{ name: 'name', required: true, label: 'フィールド名', align: 'left', field: row => row.name, sortable: true },
|
||||||
{ name: 'code', label: 'フィールドコード', align: 'left', field: 'code', sortable: true },
|
{ name: 'code', label: 'フィールドコード', align: 'left', field: 'code', sortable: true },
|
||||||
{ name: 'type', label: 'フィールドタイプ', align: 'left', field: 'type', sortable: true }
|
{ name: 'type', label: 'フィールドタイプ', align: 'left', field: 'type', sortable: true }
|
||||||
]
|
]
|
||||||
|
const rows = reactive([]);
|
||||||
const { state : rows, isReady: isLoaded, isLoading } = useAsyncState((args) => {
|
onMounted(async () => {
|
||||||
if (props.fields) {
|
const res = await api.get('api/v1/appfields', {
|
||||||
return props.fields.map(f => ({ name: f.label, objectType: 'field', ...f }));
|
params: {
|
||||||
} else {
|
app: props.appId
|
||||||
return api.get('api/v1/appfields', {
|
}
|
||||||
params: {
|
});
|
||||||
app: props.appId
|
let fields = res.data.properties;
|
||||||
}
|
console.log(fields);
|
||||||
}).then(res => {
|
Object.keys(fields).forEach((key) => {
|
||||||
console.log(res);
|
const fld = fields[key];
|
||||||
return Object.values(res.data.properties).map(f => ({ name: f.label, objectType: 'field', ...f }));
|
rows.push({ name: fld.label, objectType: 'field', ...fld });
|
||||||
});
|
});
|
||||||
}
|
isLoaded.value = true;
|
||||||
}, [{ name: '', objectType: '', type: '', code: '', label: '' }])
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
columns,
|
columns,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div class="q-pa-md q-gutter-sm" > -->
|
<!-- <div class="q-pa-md q-gutter-sm" > -->
|
||||||
<q-dialog :model-value="visible" persistent bordered >
|
<q-dialog :model-value="visible" persistent bordered >
|
||||||
<q-card style="min-width: 40vw; max-width: 80vw; max-height: 95vh;" :style="cardStyle">
|
<q-card :style="cardStyle" style=" min-width: 40vw; max-width: 80vw; max-height: 95vh;">
|
||||||
<q-toolbar class="bg-grey-4">
|
<q-toolbar class="bg-grey-4">
|
||||||
<q-toolbar-title>{{ name }}</q-toolbar-title>
|
<q-toolbar-title>{{ name }}</q-toolbar-title>
|
||||||
<q-space></q-space>
|
<q-space></q-space>
|
||||||
|
|||||||
@@ -1,59 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="q-pa-md">
|
<div class="q-pa-md">
|
||||||
<q-table flat bordered row-key="id" :selection="type" :selected="modelValue"
|
<q-table flat bordered row-key="name" :selection="type"
|
||||||
@update:selected="$emit('update:modelValue', $event)" :columns="columns" :rows="rows" />
|
:selected="modelValue"
|
||||||
|
@update:selected="$emit('update:modelValue', $event)"
|
||||||
|
:columns="columns" :rows="rows" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { PropType, reactive } from 'vue';
|
import { ref, reactive, PropType, compile } from 'vue';
|
||||||
import { IActionVariable } from '../types/ActionTypes';
|
import {IActionNode,IActionVariable} from '../types/ActionTypes';
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'VariableList',
|
name: 'VariableList',
|
||||||
props: {
|
props: {
|
||||||
name: String,
|
name: String,
|
||||||
type: String,
|
type: String,
|
||||||
vars: {
|
vars:{
|
||||||
type: Array as PropType<IActionVariable[]>,
|
type:Array as PropType<IActionVariable[]>,
|
||||||
reqired: true,
|
reqired:true,
|
||||||
default: () => []
|
default:()=>[]
|
||||||
},
|
},
|
||||||
modelValue: Array
|
modelValue:Array
|
||||||
},
|
},
|
||||||
emits: [
|
emits:[
|
||||||
'update:modelValue'
|
'update:modelValue'
|
||||||
],
|
],
|
||||||
setup(props) {
|
setup(props) {
|
||||||
const variableName = (field) => {
|
const columns= [
|
||||||
const name = field.name;
|
{ name: 'actionName', label: 'アクション名',align: 'left',field: 'actionName',sortable: true},
|
||||||
return name.name;
|
{ name: 'displayName', label: '変数表示名', align: 'left',field: 'displayName', sortable: true },
|
||||||
}
|
{ name: 'name', label: '変数名', align: 'left',field: 'name',required: true, sortable: true }
|
||||||
const columns = [
|
|
||||||
{ name: 'actionName', label: 'アクション名', align: 'left', field: 'actionName', sortable: true },
|
|
||||||
{ name: 'displayName', label: '変数表示名', align: 'left', field: 'displayName', sortable: true },
|
|
||||||
{ name: 'name', label: '変数名', align: 'left', field: variableName, required: true, sortable: true }
|
|
||||||
];
|
];
|
||||||
|
const rows= props.vars.map((v)=>{
|
||||||
const rows = props.vars.flatMap((v) => {
|
return {objectType:'variable',...v};
|
||||||
if (v.name.vars && v.name.vars.length > 0) {
|
|
||||||
return v.name.vars
|
|
||||||
.filter(o => o.vName && o.logicalOperator && o.field)
|
|
||||||
.map(o => ({
|
|
||||||
id: uuidv4(),
|
|
||||||
objectType: 'variable',
|
|
||||||
name: { name: `${v.name.name}.${o.vName}` },
|
|
||||||
actionName: v.name.actionName,
|
|
||||||
displayName: v.name.displayName
|
|
||||||
}));
|
|
||||||
} else {
|
|
||||||
return [{ objectType: 'variable', ...v }];
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
columns,
|
columns,
|
||||||
rows: reactive(rows)
|
rows:reactive(rows)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</q-input>
|
</q-input>
|
||||||
</template>
|
</template>
|
||||||
<AppSelectBox ref="appDg" name="アプリ" type="single" :filter="filter"></AppSelectBox>
|
<AppSelect ref="appDg" name="アプリ" type="single" :filter="filter"></AppSelect>
|
||||||
</ShowDialog>
|
</ShowDialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@
|
|||||||
import { defineComponent,ref } from 'vue';
|
import { defineComponent,ref } from 'vue';
|
||||||
import {AppInfo} from '../../types/ActionTypes'
|
import {AppInfo} from '../../types/ActionTypes'
|
||||||
import ShowDialog from '../../components/ShowDialog.vue';
|
import ShowDialog from '../../components/ShowDialog.vue';
|
||||||
import AppSelectBox from '../../components/AppSelectBox.vue';
|
import AppSelect from '../../components/AppSelect.vue';
|
||||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||||
import { useAuthStore } from 'src/stores/useAuthStore';
|
import { useAuthStore } from 'src/stores/useAuthStore';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -47,7 +47,7 @@ export default defineComponent({
|
|||||||
"appSelected"
|
"appSelected"
|
||||||
],
|
],
|
||||||
components:{
|
components:{
|
||||||
AppSelectBox,
|
AppSelect,
|
||||||
ShowDialog
|
ShowDialog
|
||||||
},
|
},
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
|
|||||||
@@ -1,55 +1,48 @@
|
|||||||
<template>
|
<template>
|
||||||
<!-- <div class="q-pa-md q-gutter-sm"> -->
|
<!-- <div class="q-pa-md q-gutter-sm"> -->
|
||||||
<q-tree :nodes="store.eventTree.screens" node-key="eventId" children-key="events" no-connectors
|
<q-tree
|
||||||
v-model:expanded="store.expandedScreen" :dense="true" :ref="tree">
|
:nodes="store.eventTree.screens"
|
||||||
<template v-slot:header-EVENT="prop">
|
node-key="eventId"
|
||||||
<div :ref="prop.node.eventId" class="row col items-center no-wrap event-node">
|
children-key="events"
|
||||||
<q-icon v-if="prop.node.eventId" name="play_circle" :color="prop.node.hasFlow ? 'green' : 'grey'" size="16px"
|
no-connectors
|
||||||
class="q-mr-sm">
|
v-model:expanded="store.expandedScreen"
|
||||||
</q-icon>
|
:dense="true"
|
||||||
<div class="no-wrap" @click="onSelected(prop.node)"
|
:ref="tree"
|
||||||
:class="selectedEvent && prop.node.eventId === selectedEvent.eventId ? 'selected-node' : ''">{{
|
>
|
||||||
prop.node.label }}</div>
|
<template v-slot:header-EVENT="prop">
|
||||||
<q-space></q-space>
|
<div class="row col items-start no-wrap event-node" @click="onSelected(prop.node)">
|
||||||
<!-- <q-icon v-if="prop.node.hasFlow" name="delete" color="negative" size="16px" class="q-mr-sm"></q-icon> -->
|
<q-icon v-if="prop.node.eventId"
|
||||||
</div>
|
name="play_circle"
|
||||||
</template>
|
:color="prop.node.hasFlow?'green':'grey'"
|
||||||
<template v-slot:header-CHANGE="prop">
|
size="16px" class="q-mr-sm">
|
||||||
<div class="row col items-center no-wrap event-node">
|
</q-icon>
|
||||||
<div class="no-wrap">{{ prop.node.label }}</div>
|
<div class="no-wrap" :class="selectedEvent && prop.node.eventId===selectedEvent.eventId?'selected-node':''">{{ prop.node.label }}</div>
|
||||||
<q-space></q-space>
|
<q-space></q-space>
|
||||||
<q-icon name="add_circle" color="primary" size="16px" class="q-mr-sm"
|
<!-- <q-icon v-if="prop.node.hasFlow" name="delete" color="negative" size="16px" class="q-mr-sm"></q-icon> -->
|
||||||
@click="addChangeEvent(prop.node)"></q-icon>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
<template v-slot:header-DELETABLE="prop">
|
|
||||||
<div class="row col items-center event-node">
|
|
||||||
<div class="row col items-center" @click="onSelected(prop.node)">
|
|
||||||
<q-icon v-if="prop.node.eventId" name="play_circle" :color="prop.node.hasFlow ? 'green' : 'grey'" size="16px"
|
|
||||||
class="q-mr-sm">
|
|
||||||
</q-icon>
|
|
||||||
<div>{{ prop.node.label }}</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
</template>
|
||||||
<q-btn class="q-mr-sm delete-btn" flat fab-mini icon="delete_forever" padding="none" color="negative"
|
<template v-slot:header-CHANGE="prop" >
|
||||||
@click="deleteEvent(prop.node)"></q-btn>
|
<div class="row col items-start no-wrap event-node" >
|
||||||
|
<div class="no-wrap">{{ prop.node.label }}</div>
|
||||||
|
<q-space></q-space>
|
||||||
|
<q-icon name="add_circle" color="primary" size="16px" class="q-mr-sm" @click="addChangeEvent(prop.node)"></q-icon>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</template>
|
||||||
</template>
|
</q-tree>
|
||||||
</q-tree>
|
<show-dialog v-model:visible="showDialog" name="フィールド選択" @close="closeDg" widht="400px">
|
||||||
<show-dialog v-model:visible="showDialog" name="フィールド選択" @close="closeDg">
|
<field-select ref="appDg" name="フィールド" type="single" :appId="store.appInfo?.appId"></field-select>
|
||||||
<field-select ref="appDg" name="フィールド" type="single" :appId="store.appInfo?.appId"></field-select>
|
</show-dialog>
|
||||||
</show-dialog>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { QTree, useQuasar } from 'quasar';
|
import { defineComponent, computed, ref } from 'vue';
|
||||||
import { ActionFlow, RootAction } from 'src/types/ActionTypes';
|
import { IKintoneEvent ,IKintoneEventGroup, IKintoneEventNode, kintoneEvent} from '../../types/KintoneEvents';
|
||||||
|
import { storeToRefs } from 'pinia';
|
||||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||||
import { defineComponent, ref } from 'vue';
|
import { ActionFlow, ActionNode, RootAction } from 'src/types/ActionTypes';
|
||||||
import { IKintoneEvent, IKintoneEventGroup, IKintoneEventNode } from '../../types/KintoneEvents';
|
|
||||||
import FieldSelect from '../FieldSelect.vue';
|
|
||||||
import ShowDialog from '../ShowDialog.vue';
|
import ShowDialog from '../ShowDialog.vue';
|
||||||
|
import FieldSelect from '../FieldSelect.vue';
|
||||||
|
import { QTree } from 'quasar';
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'EventTree',
|
name: 'EventTree',
|
||||||
components: {
|
components: {
|
||||||
@@ -57,7 +50,6 @@ export default defineComponent({
|
|||||||
FieldSelect,
|
FieldSelect,
|
||||||
},
|
},
|
||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
const $q = useQuasar();
|
|
||||||
const appDg = ref();
|
const appDg = ref();
|
||||||
const store = useFlowEditorStore();
|
const store = useFlowEditorStore();
|
||||||
const showDialog = ref(false);
|
const showDialog = ref(false);
|
||||||
@@ -66,79 +58,62 @@ export default defineComponent({
|
|||||||
// const selectedFlow = store.currentFlow;
|
// const selectedFlow = store.currentFlow;
|
||||||
|
|
||||||
// const expanded=ref();
|
// const expanded=ref();
|
||||||
const selectedEvent = ref<IKintoneEvent | null>(null);
|
const selectedEvent = ref<IKintoneEvent|null>(null);
|
||||||
const selectedChangeEvent = ref<IKintoneEventGroup | null>(null);
|
const selectedChangeEvent=ref<IKintoneEventGroup|null>(null);
|
||||||
const isFieldChange = (node: IKintoneEventNode) => {
|
const isFieldChange = (node:IKintoneEventNode)=>{
|
||||||
return node.header == 'EVENT' && node.eventId.indexOf(".change.") > -1;
|
return node.header=='EVENT' && node.eventId.indexOf(".change.")>-1;
|
||||||
}
|
}
|
||||||
//フィールド値変更イベント追加
|
//フィールド値変更イベント追加
|
||||||
const closeDg = (val: string) => {
|
const closeDg = (val:string) => {
|
||||||
if (val == 'OK') {
|
if (val == 'OK') {
|
||||||
if (!selectedChangeEvent.value) { return; }
|
if(!selectedChangeEvent.value){return;}
|
||||||
const field = appDg.value.selected[0];
|
const field = appDg.value.selected[0];
|
||||||
const eventid = `${selectedChangeEvent.value.eventId}.${field.code}`;
|
const eventid = `${selectedChangeEvent.value.eventId}.${field.code}`;
|
||||||
if (store.eventTree.findEventById(eventid)) {
|
if(store.eventTree.findEventById(eventid)){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selectedChangeEvent.value?.events.push({
|
selectedChangeEvent.value?.events.push(
|
||||||
eventId: eventid,
|
new kintoneEvent(
|
||||||
label: field.name,
|
field.label,
|
||||||
parentId: selectedChangeEvent.value.eventId,
|
eventid,
|
||||||
header: 'DELETABLE'
|
selectedChangeEvent.value.eventId)
|
||||||
});
|
);
|
||||||
tree.value?.expanded?.push(selectedChangeEvent.value.eventId);
|
tree.value?.expanded?.push(selectedChangeEvent.value.eventId);
|
||||||
tree.value?.expandAll();
|
tree.value?.expandAll();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const addChangeEvent = (node: IKintoneEventGroup) => {
|
const addChangeEvent=(node:IKintoneEventGroup)=>{
|
||||||
if (store.appInfo === undefined) {
|
if(store.appInfo===undefined){
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
selectedChangeEvent.value = node;
|
selectedChangeEvent.value=node;
|
||||||
showDialog.value = true;
|
showDialog.value=true;
|
||||||
}
|
}
|
||||||
|
const onSelected=(node:IKintoneEvent)=>{
|
||||||
const deleteEvent = (node: IKintoneEvent) => {
|
if(!node.eventId){
|
||||||
if (!node.eventId) {
|
return;
|
||||||
return;
|
}
|
||||||
}
|
selectedEvent.value=node;
|
||||||
store.deleteEvent(node);
|
if(store.appInfo===undefined){
|
||||||
store.selectFlow(undefined)
|
return;
|
||||||
|
}
|
||||||
$q.notify({
|
const screen = store.eventTree.findEventById(node.parentId);
|
||||||
type: 'positive',
|
let flow =store.findFlowByEventId(node.eventId);
|
||||||
caption: "通知",
|
let screenName=screen!==null?screen.label:"";
|
||||||
message: `イベント ${node.label} 削除`
|
let nodeLabel = node.label;
|
||||||
})
|
// if(isFieldChange(node)){
|
||||||
}
|
// screenName=nodeLabel;
|
||||||
|
// nodeLabel=`${node.label}の値を変更したとき`;
|
||||||
const onSelected = (node: IKintoneEvent) => {
|
// }
|
||||||
if (!node.eventId) {
|
if(flow!==undefined && flow!==null ){
|
||||||
return;
|
store.selectFlow(flow);
|
||||||
}
|
}else{
|
||||||
selectedEvent.value = node;
|
const root = new RootAction(node.eventId,screenName,nodeLabel)
|
||||||
if (store.appInfo === undefined) {
|
const flow =new ActionFlow(root);
|
||||||
return;
|
store.flows?.push(flow);
|
||||||
}
|
store.selectFlow(flow);
|
||||||
const screen = store.eventTree.findEventById(node.parentId);
|
selectedEvent.value.flowData=flow;
|
||||||
|
}
|
||||||
let flow = store.findFlowByEventId(node.eventId);
|
|
||||||
let screenName = screen !== null ? screen.label : "";
|
|
||||||
let nodeLabel = node.label;
|
|
||||||
// if(isFieldChange(node)){
|
|
||||||
// screenName=nodeLabel;
|
|
||||||
// nodeLabel=`${node.label}の値を変更したとき`;
|
|
||||||
// }
|
|
||||||
|
|
||||||
if (flow !== undefined && flow !== null) {
|
|
||||||
store.selectFlow(flow);
|
|
||||||
} else {
|
|
||||||
const root = new RootAction(node.eventId, screenName, nodeLabel)
|
|
||||||
const flow = new ActionFlow(root);
|
|
||||||
store.flows?.push(flow);
|
|
||||||
store.selectFlow(flow);
|
|
||||||
selectedEvent.value.flowData = flow;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
// eventTree,
|
// eventTree,
|
||||||
@@ -150,7 +125,6 @@ export default defineComponent({
|
|||||||
onSelected,
|
onSelected,
|
||||||
selectedEvent,
|
selectedEvent,
|
||||||
addChangeEvent,
|
addChangeEvent,
|
||||||
deleteEvent,
|
|
||||||
closeDg,
|
closeDg,
|
||||||
store
|
store
|
||||||
}
|
}
|
||||||
@@ -158,25 +132,20 @@ export default defineComponent({
|
|||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
.nowrap {
|
.nowrap{
|
||||||
flex-wrap: nowarp;
|
flex-wrap:nowarp;
|
||||||
text-wrap: nowarp;
|
text-wrap:nowarp;
|
||||||
}
|
}
|
||||||
|
.event-node{
|
||||||
.event-node {
|
cursor:pointer;
|
||||||
cursor: pointer;
|
|
||||||
}
|
}
|
||||||
|
.selected-node{
|
||||||
.selected-node {
|
|
||||||
color: $primary;
|
color: $primary;
|
||||||
font-weight: bolder;
|
font-weight: bolder;
|
||||||
}
|
}
|
||||||
|
.event-node:hover{
|
||||||
.event-node:hover {
|
|
||||||
background-color: $light-blue-1;
|
background-color: $light-blue-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.delete-btn {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ export default defineComponent({
|
|||||||
*/
|
*/
|
||||||
const varName =(node:IActionNode)=>{
|
const varName =(node:IActionNode)=>{
|
||||||
const prop = node.actionProps.find((prop) => prop.props.name === "verName");
|
const prop = node.actionProps.find((prop) => prop.props.name === "verName");
|
||||||
return prop?.props.modelValue.name;
|
return prop?.props.modelValue;
|
||||||
};
|
};
|
||||||
const copyFlow=()=>{
|
const copyFlow=()=>{
|
||||||
context.emit('copyFlow', props.actionNode);
|
context.emit('copyFlow', props.actionNode);
|
||||||
|
|||||||
@@ -18,68 +18,121 @@
|
|||||||
<q-separator />
|
<q-separator />
|
||||||
<q-card-section class="q-pa-none q-ma-none">
|
<q-card-section class="q-pa-none q-ma-none">
|
||||||
<div style="">
|
<div style="">
|
||||||
<div v-if="selectedField.fields && selectedField.fields.length > 0">
|
<div v-if="selectedField.fields && selectedField.fields.length > 0 ">
|
||||||
<q-list bordered>
|
<q-list bordered>
|
||||||
<q-virtual-scroll style="max-height: 160px;" :items="selectedField.fields" separator
|
<q-virtual-scroll style="max-height: 160px;" :items="selectedField.fields" separator v-slot="{ item, index }">
|
||||||
v-slot="{ item, index }">
|
<q-item :key="index" dense clickable >
|
||||||
<q-item :key="index" dense clickable>
|
<q-item-section>
|
||||||
<q-item-section>
|
<q-item-label>
|
||||||
<q-item-label>
|
{{ item.label }}
|
||||||
{{ item.label }}
|
</q-item-label>
|
||||||
</q-item-label>
|
</q-item-section>
|
||||||
</q-item-section>
|
<q-item-section side>
|
||||||
<q-item-section side>
|
<q-btn round flat size="sm" icon="clear" @click="removeField(index)" />
|
||||||
<q-btn round flat size="sm" icon="clear" @click="removeField(index)" />
|
</q-item-section>
|
||||||
</q-item-section>
|
</q-item>
|
||||||
</q-item>
|
</q-virtual-scroll>
|
||||||
</q-virtual-scroll>
|
</q-list>
|
||||||
</q-list>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <div v-else class="row q-mt-lg">
|
<!-- <div v-else class="row q-mt-lg">
|
||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
<!-- <q-separator /> -->
|
<!-- <q-separator /> -->
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
<q-card-section class="q-px-none q-py-xs" v-if="selectedField.fields && selectedField.fields.length === 0">
|
<q-card-section class="q-px-none q-py-xs" v-if="selectedField.fields && selectedField.fields.length===0">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="text-grey text-caption"> {{ $props.placeholder }}</div>
|
<div class="text-grey text-caption"> {{ $props.placeholder }}</div>
|
||||||
<!-- <q-btn flat color="grey" label="clear" @click="clear" /> -->
|
<!-- <q-btn flat color="grey" label="clear" @click="clear" /> -->
|
||||||
</div>
|
</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
</q-card>
|
</q-card>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<show-dialog v-model:visible="show" name="フィールド一覧" @close="closeFieldDialog" ref="fieldDlg">
|
<show-dialog v-model:visible="show" name="フィールド一覧" @close="closeFieldDialog" ref="fieldDlg">
|
||||||
<AppFieldSelectBox v-model:selectedField="selectedField" :selectType="selectType" />
|
|
||||||
|
<div class="q-mx-md q-mb-lg">
|
||||||
|
<div class="q-mb-xs q-ml-md text-primary">アプリ選択</div>
|
||||||
|
|
||||||
|
<div class="q-pa-md row" style="border: 1px solid rgba(0, 0, 0, 0.12); border-radius: 4px;">
|
||||||
|
<div v-if="!showSelectApp && selectedField.app">{{ selectedField.app?.name }}</div>
|
||||||
|
<q-space />
|
||||||
|
<div>
|
||||||
|
<q-btn outline dense label="選 択" padding="none sm" color="primary" @click="() => {
|
||||||
|
showSelectApp = true;
|
||||||
|
}"></q-btn>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if="!showSelectApp && selectedField.app?.name">
|
||||||
|
<div>
|
||||||
|
<div class="row q-mb-md">
|
||||||
|
<!-- <div class="col"> -->
|
||||||
|
<div class="q-mb-xs q-ml-md text-primary">フィールド選択</div>
|
||||||
|
<!-- </div> -->
|
||||||
|
<q-space />
|
||||||
|
<!-- <div class="col"> -->
|
||||||
|
<div class="q-mr-md">
|
||||||
|
<q-input dense debounce="300" v-model="fieldFilter" placeholder="フィールド検索" clearable>
|
||||||
|
<template v-slot:before>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<field-select ref="fieldDlg" name="フィールド" :type="selectType" :updateSelects="updateItems"
|
||||||
|
:appId="selectedField.app?.id" not_page :filter="fieldFilter" :selectedFields="selectedField.fields"></field-select>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="min-width: 45vw;" v-else>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</show-dialog>
|
||||||
|
|
||||||
|
<show-dialog v-model:visible="showSelectApp" name="アプリ選択" @close="closeAppDlg">
|
||||||
|
<template v-slot:toolbar>
|
||||||
|
<q-input dense debounce="300" v-model="filter" placeholder="検索" clearable>
|
||||||
|
<template v-slot:before>
|
||||||
|
<q-icon name="search" />
|
||||||
|
</template>
|
||||||
|
</q-input>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<AppSelect ref="appDlg" name="アプリ" type="single" :filter="filter"
|
||||||
|
:updateExternalSelectAppInfo="updateExternalSelectAppInfo"></AppSelect>
|
||||||
</show-dialog>
|
</show-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent, ref, watchEffect } from 'vue';
|
import { defineComponent, ref, watchEffect, computed } from 'vue';
|
||||||
import AppFieldSelectBox from '../AppFieldSelectBox.vue';
|
|
||||||
import ShowDialog from '../ShowDialog.vue';
|
import ShowDialog from '../ShowDialog.vue';
|
||||||
|
import FieldSelect from '../FieldSelect.vue';
|
||||||
import { useFlowEditorStore } from 'stores/flowEditor';
|
import { useFlowEditorStore } from 'stores/flowEditor';
|
||||||
|
import AppSelect from '../AppSelect.vue';
|
||||||
export interface IApp {
|
interface IApp{
|
||||||
id: string,
|
id:string,
|
||||||
name: string
|
name:string
|
||||||
}
|
}
|
||||||
export interface IField {
|
interface IField {
|
||||||
name: string,
|
name: string,
|
||||||
code: string,
|
code: string,
|
||||||
type: string
|
type: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IAppFields {
|
interface IAppFields{
|
||||||
app?: IApp,
|
app?:IApp,
|
||||||
fields: IField[]
|
fields:IField[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
inheritAttrs: false,
|
inheritAttrs:false,
|
||||||
name: 'AppFieldSelect',
|
name: 'FieldInput',
|
||||||
components: {
|
components: {
|
||||||
ShowDialog,
|
ShowDialog,
|
||||||
AppFieldSelectBox
|
FieldSelect,
|
||||||
|
AppSelect,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
displayName: {
|
displayName: {
|
||||||
@@ -98,30 +151,62 @@ export default defineComponent({
|
|||||||
type: Object,
|
type: Object,
|
||||||
default: null
|
default: null
|
||||||
},
|
},
|
||||||
selectType: {
|
selectType:{
|
||||||
type: String,
|
type:String,
|
||||||
default: 'single'
|
default:'single'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
|
const appDlg = ref();
|
||||||
|
const fieldDlg = ref();
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const selectedField = ref<IAppFields>({
|
const showSelectApp = ref(false);
|
||||||
app: undefined,
|
const selectedField = ref<IAppFields>({
|
||||||
fields: []
|
app:undefined,
|
||||||
});
|
fields:[]
|
||||||
if (props.modelValue && "app" in props.modelValue && "fields" in props.modelValue) {
|
});
|
||||||
selectedField.value = props.modelValue as IAppFields;
|
if(props.modelValue && "app" in props.modelValue && "fields" in props.modelValue){
|
||||||
}
|
selectedField.value=props.modelValue as IAppFields;
|
||||||
|
}
|
||||||
const store = useFlowEditorStore();
|
const store = useFlowEditorStore();
|
||||||
|
|
||||||
|
const isSelected = computed(() => {
|
||||||
|
return selectedField.value !== null && typeof selectedField.value === 'object' && ('app' in selectedField.value)
|
||||||
|
});
|
||||||
|
|
||||||
|
const showDg = () => {
|
||||||
|
show.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
const clear = () => {
|
const clear = () => {
|
||||||
selectedField.value = {
|
selectedField.value ={
|
||||||
fields: []
|
fields:[]
|
||||||
};
|
} ;
|
||||||
}
|
}
|
||||||
|
|
||||||
const removeField = (index: number) => {
|
const closeAppDlg = (val: string) => {
|
||||||
selectedField.value.fields.splice(index, 1);
|
if (val == 'OK') {
|
||||||
|
selectedField.value.app = appDlg.value.selected[0];
|
||||||
|
selectedField.value.fields=[];
|
||||||
|
showSelectApp.value=false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const closeFieldDialog=(val:string)=>{
|
||||||
|
if (val == 'OK') {
|
||||||
|
selectedField.value.fields = fieldDlg.value.selected;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const updateExternalSelectAppInfo = (newAppinfo:IApp) => {
|
||||||
|
// selectedField.value.app = newAppinfo
|
||||||
|
}
|
||||||
|
|
||||||
|
const updateItems = (newFields:IField[]) => {
|
||||||
|
// selectedField.value.fields = newFields
|
||||||
|
}
|
||||||
|
|
||||||
|
const removeField=(index:number)=>{
|
||||||
|
selectedField.value.fields.splice(index,1);
|
||||||
}
|
}
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
emit('update:modelValue', selectedField.value);
|
emit('update:modelValue', selectedField.value);
|
||||||
@@ -129,11 +214,21 @@ export default defineComponent({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
store,
|
store,
|
||||||
|
appDlg,
|
||||||
|
fieldDlg,
|
||||||
show,
|
show,
|
||||||
showDg: () => { show.value = true },
|
showDg,
|
||||||
|
closeAppDlg,
|
||||||
|
closeFieldDialog,
|
||||||
selectedField,
|
selectedField,
|
||||||
|
showSelectApp,
|
||||||
|
isSelected,
|
||||||
|
updateExternalSelectAppInfo,
|
||||||
|
filter: ref(),
|
||||||
|
updateItems,
|
||||||
clear,
|
clear,
|
||||||
removeField,
|
fieldFilter: ref(),
|
||||||
|
removeField
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,93 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<q-field :label="displayName" labelColor="primary" stack-label>
|
|
||||||
<template v-slot:control>
|
|
||||||
<q-card flat class="full-width">
|
|
||||||
<q-card-actions vertical>
|
|
||||||
<q-btn color="grey-3" text-color="black" @click="() => { dgIsShow = true }">アプリ選択</q-btn>
|
|
||||||
</q-card-actions>
|
|
||||||
<q-card-section class="text-caption">
|
|
||||||
<div v-if="selectedField.app.name">
|
|
||||||
{{ selectedField.app.name }}
|
|
||||||
</div>
|
|
||||||
<div v-else>{{ placeholder }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
</q-card>
|
|
||||||
</template>
|
|
||||||
</q-field>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<ShowDialog v-model:visible="dgIsShow" name="アプリ選択" @close="closeDg" min-width="50vw" min-height="50vh">
|
|
||||||
<template v-slot:toolbar>
|
|
||||||
<q-input dense debounce="300" v-model="filter" placeholder="検索" clearable>
|
|
||||||
<template v-slot:before>
|
|
||||||
<q-icon name="search" />
|
|
||||||
</template>
|
|
||||||
</q-input>
|
|
||||||
</template>
|
|
||||||
<AppSelectBox ref="appDg" name="アプリ" type="single" :filter="filter"></AppSelectBox>
|
|
||||||
</ShowDialog>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { computed, defineComponent, reactive, ref, watchEffect } from 'vue';
|
|
||||||
import ShowDialog from '../ShowDialog.vue';
|
|
||||||
import AppSelectBox from '../AppSelectBox.vue';
|
|
||||||
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
inheritAttrs: false,
|
|
||||||
name: 'AppSelect',
|
|
||||||
components: {
|
|
||||||
ShowDialog,
|
|
||||||
AppSelectBox
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
context: {
|
|
||||||
type: Array<Props>,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
displayName: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
placeholder: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
modelValue: {
|
|
||||||
type: Object,
|
|
||||||
default: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
setup(props, { emit }) {
|
|
||||||
const appDg = ref()
|
|
||||||
const dgIsShow = ref(false)
|
|
||||||
const selectedField = props.modelValue && props.modelValue.app ? props.modelValue : reactive({app:{}});
|
|
||||||
const closeDg = (state: string) => {
|
|
||||||
dgIsShow.value = false;
|
|
||||||
if (state == 'OK') {
|
|
||||||
selectedField.app = appDg.value.selected[0];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
console.log(selectedField);
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
emit('update:modelValue', selectedField);
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
filter: ref(''),
|
|
||||||
dgIsShow,
|
|
||||||
appDg,
|
|
||||||
closeDg,
|
|
||||||
selectedField
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-bind="$attrs">
|
<div v-bind="$attrs">
|
||||||
<q-field v-model="tree" :label="displayName" labelColor="primary" stack-label>
|
<q-field v-model="tree" :label="displayName" labelColor="primary" stack-label >
|
||||||
<template v-slot:control>
|
<template v-slot:control >
|
||||||
<q-card flat class="full-width">
|
<q-card flat class="full-width">
|
||||||
<q-card-actions vertical>
|
<q-card-actions vertical>
|
||||||
<q-btn color="grey-3" text-color="black" :disable="btnDisable" @click="showDg()">クリックで設定:{{ isSetted ?
|
<q-btn color="grey-3" text-color="black" @click="showDg()">クリックで設定:{{ isSetted?'設定済み':'未設定' }}</q-btn>
|
||||||
'設定済み' : '未設定' }}</q-btn>
|
|
||||||
</q-card-actions>
|
</q-card-actions>
|
||||||
<q-card-section class="text-caption">
|
<q-card-section class="text-caption" >
|
||||||
<div v-if="!isSetted">{{ placeholder }}</div>
|
<div v-if="!isSetted">{{ placeholder }}</div>
|
||||||
<div v-else>{{ conditionString }}</div>
|
<div v-else>{{ conditionString }}</div>
|
||||||
</q-card-section>
|
</q-card-section>
|
||||||
@@ -18,148 +17,82 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
<script lang="ts">
|
||||||
|
import { defineComponent, ref ,watchEffect,computed,reactive} from 'vue';
|
||||||
<script lang="ts">
|
import { ConditionTree,GroupNode,ConditionNode,LogicalOperator,Operator } from 'app/src/types/Conditions';
|
||||||
import { ConditionNode, ConditionTree, Operator, OperatorListItem } from 'app/src/types/Conditions';
|
import ConditionEditor from '../ConditionEditor/ConditionEditor.vue'
|
||||||
import { computed, defineComponent, provide, reactive, ref, watchEffect } from 'vue';
|
export default defineComponent({
|
||||||
import ConditionEditor from '../ConditionEditor/ConditionEditor.vue';
|
name: 'FieldInput',
|
||||||
|
inheritAttrs:false,
|
||||||
type Props = {
|
components: {
|
||||||
props?: {
|
ConditionEditor
|
||||||
name: string;
|
},
|
||||||
modelValue?: {
|
props: {
|
||||||
app: {
|
displayName:{
|
||||||
id: string;
|
type: String,
|
||||||
name: string;
|
default: '',
|
||||||
},
|
},
|
||||||
fields: {
|
name:{
|
||||||
type: string;
|
type: String,
|
||||||
label: string;
|
default: '',
|
||||||
code: string;
|
},
|
||||||
}[]
|
placeholder: {
|
||||||
}
|
type: String,
|
||||||
}
|
default: '',
|
||||||
};
|
},
|
||||||
|
hint:{
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
},
|
||||||
|
modelValue: {
|
||||||
|
type: String,
|
||||||
|
default: null
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
setup(props, { emit }) {
|
||||||
export default defineComponent({
|
const appDg = ref();
|
||||||
name: 'FieldInput',
|
const show = ref(false);
|
||||||
inheritAttrs: false,
|
const tree = reactive(new ConditionTree());
|
||||||
components: {
|
if(props.modelValue && props.modelValue!==''){
|
||||||
ConditionEditor
|
tree.fromJson(props.modelValue);
|
||||||
},
|
}else{
|
||||||
props: {
|
const newNode = new ConditionNode({},Operator.Equal,'',tree.root);
|
||||||
context: {
|
tree.addNode(tree.root,newNode);
|
||||||
type: Array<Props>,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
displayName: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
placeholder: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
hint: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
modelValue: {
|
|
||||||
type: String,
|
|
||||||
default: null
|
|
||||||
},
|
|
||||||
sourceType: {
|
|
||||||
type: String,
|
|
||||||
default: 'field'
|
|
||||||
},
|
|
||||||
onlySourceSelect: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
},
|
|
||||||
operatorList: {
|
|
||||||
type: Array,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setup(props, { emit }) {
|
|
||||||
const source = props.context.find(element => element?.props?.name === 'sources')
|
|
||||||
|
|
||||||
if (source) {
|
|
||||||
if (props.sourceType === 'field') {
|
|
||||||
provide('sourceFields', computed(() => source.props?.modelValue?.fields ?? []));
|
|
||||||
} else if (props.sourceType === 'app') {
|
|
||||||
provide('sourceApp', computed(() => source.props?.modelValue?.app?.id));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
provide('Operator', props.operatorList);
|
|
||||||
|
|
||||||
const btnDisable = computed(() => {
|
|
||||||
const onlySourceSelect = props.onlySourceSelect;
|
|
||||||
|
|
||||||
if (!onlySourceSelect) {
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.sourceType === 'field') {
|
const isSetted=ref(props.modelValue && props.modelValue!=='');
|
||||||
return source?.props?.modelValue?.fields?.length ?? 0 > 0;
|
|
||||||
} else if (props.sourceType === 'app') {
|
|
||||||
return source?.props?.modelValue?.app?.id ? false : true
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
})
|
|
||||||
|
|
||||||
const appDg = ref();
|
const conditionString = computed(()=>{
|
||||||
const show = ref(false);
|
return tree.buildConditionString(tree.root);
|
||||||
const tree = reactive(new ConditionTree());
|
});
|
||||||
if (props.modelValue && props.modelValue !== '') {
|
|
||||||
tree.fromJson(props.modelValue);
|
|
||||||
} else {
|
|
||||||
const newNode = new ConditionNode({}, (props.operatorList && props.operatorList.length > 0) ? props.operatorList[0] as OperatorListItem : Operator.Equal, '', tree.root);
|
|
||||||
tree.addNode(tree.root, newNode);
|
|
||||||
}
|
|
||||||
|
|
||||||
const isSetted = ref(props.modelValue && props.modelValue !== '');
|
const showDg = () => {
|
||||||
|
show.value = true;
|
||||||
|
};
|
||||||
|
|
||||||
const conditionString = computed(() => {
|
const onClosed = (val:string) => {
|
||||||
return tree.buildConditionString(tree.root);
|
if (val == 'OK') {
|
||||||
});
|
const conditionJson = tree.toJson();
|
||||||
|
isSetted.value=true;
|
||||||
|
emit('update:modelValue', conditionJson);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const showDg = () => {
|
watchEffect(() => {
|
||||||
show.value = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
const onClosed = (val: string) => {
|
|
||||||
if (val == 'OK') {
|
|
||||||
isSetted.value = true;
|
|
||||||
tree.setQuery(tree.buildConditionQueryString(tree.root));
|
|
||||||
const conditionJson = tree.toJson();
|
const conditionJson = tree.toJson();
|
||||||
emit('update:modelValue', conditionJson);
|
emit('update:modelValue', conditionJson);
|
||||||
}
|
});
|
||||||
};
|
|
||||||
|
|
||||||
watchEffect(() => {
|
return {
|
||||||
tree.setQuery(tree.buildConditionQueryString(tree.root));
|
appDg,
|
||||||
const conditionJson = tree.toJson();
|
isSetted,
|
||||||
emit('update:modelValue', conditionJson);
|
show,
|
||||||
});
|
showDg,
|
||||||
|
onClosed,
|
||||||
return {
|
tree,
|
||||||
appDg,
|
conditionString
|
||||||
isSetted,
|
};
|
||||||
show,
|
}
|
||||||
showDg,
|
});
|
||||||
onClosed,
|
</script>
|
||||||
tree,
|
|
||||||
conditionString,
|
|
||||||
btnDisable
|
|
||||||
};
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|||||||
@@ -1,202 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<q-field :label="displayName" labelColor="primary" stack-label>
|
|
||||||
<template v-slot:control>
|
|
||||||
<q-card flat class="full-width">
|
|
||||||
<q-card-actions vertical>
|
|
||||||
<q-btn color="grey-3" text-color="black" :disable="btnDisable"
|
|
||||||
@click="() => { dgIsShow = true }">クリックで設定</q-btn>
|
|
||||||
</q-card-actions>
|
|
||||||
<q-card-section class="text-caption">
|
|
||||||
<div v-if="mappingObjectsInputDisplay && mappingObjectsInputDisplay.length > 0">
|
|
||||||
<div v-for="(item) in mappingObjectsInputDisplay" :key="item">{{ item }}</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>{{ placeholder }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
</q-card>
|
|
||||||
</template>
|
|
||||||
</q-field>
|
|
||||||
<show-dialog v-model:visible="dgIsShow" name="データマッピング" @close="closeDg" min-width="50vw" min-height="60vh">
|
|
||||||
|
|
||||||
<div class="q-mx-md">
|
|
||||||
<div class="row q-col-gutter-x-xs flex-center">
|
|
||||||
<div class="col-5">
|
|
||||||
<div class="q-mx-xs">From</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-1">
|
|
||||||
</div>
|
|
||||||
<div class="col-5">
|
|
||||||
<div class="q-mx-xs">To</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-1"><q-btn flat round dense icon="add" size="sm" @click="addMappingObject" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="q-my-sm" v-for="(item, index) in mappingProps" :key="item.id">
|
|
||||||
<div class="row q-col-gutter-x-xs flex-center">
|
|
||||||
<div class="col-5">
|
|
||||||
<ConditionObject v-model="item.from" />
|
|
||||||
</div>
|
|
||||||
<div class="col-1">
|
|
||||||
</div>
|
|
||||||
<div class="col-5">
|
|
||||||
<q-field v-model="item.vName" type="text" outlined dense>
|
|
||||||
<template v-slot:append>
|
|
||||||
<q-icon name="search" class="cursor-pointer"
|
|
||||||
@click="() => { mappingProps[index].to.isDialogVisible = true }" />
|
|
||||||
</template>
|
|
||||||
<template v-slot:control>
|
|
||||||
<div class="self-center full-width no-outline" tabindex="0"
|
|
||||||
v-if="item.to.app?.name && item.to.fields?.length > 0 && item.to.fields[0].label">
|
|
||||||
{{ `${item.to.app?.name} : ${item.to.fields[0].label}` }}
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</q-field>
|
|
||||||
</div>
|
|
||||||
<div class="col-1">
|
|
||||||
<q-btn flat round dense icon="delete" size="sm" @click="() => deleteMappingObject(index)" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<show-dialog v-model:visible="mappingProps[index].to.isDialogVisible" name="フィールド一覧"
|
|
||||||
@close="closeToDg" ref="fieldDlg">
|
|
||||||
<FieldSelect v-if="onlySourceSelect" ref="fieldDlg" name="フィールド" :appId="sourceAppId" not_page
|
|
||||||
:selectedFields="mappingProps[index].to.fields"
|
|
||||||
:updateSelects="(fields) => { mappingProps[index].to.fields = fields; mappingProps[index].to.app = sourceApp }">
|
|
||||||
</FieldSelect>
|
|
||||||
<AppFieldSelectBox v-else v-model:selectedField="mappingProps[index].to" />
|
|
||||||
</show-dialog>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</show-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import { computed, defineComponent, reactive, ref, watchEffect } from 'vue';
|
|
||||||
import ConditionObject from '../ConditionEditor/ConditionObject.vue';
|
|
||||||
import ShowDialog from '../ShowDialog.vue';
|
|
||||||
import AppFieldSelectBox from '../AppFieldSelectBox.vue';
|
|
||||||
import FieldSelect from '../FieldSelect.vue';
|
|
||||||
import IAppFields from './AppFieldSelect.vue';
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
props?: {
|
|
||||||
name: string;
|
|
||||||
modelValue?: {
|
|
||||||
app: {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
type ValueType = {
|
|
||||||
id: string;
|
|
||||||
from: object;
|
|
||||||
to: typeof IAppFields & {
|
|
||||||
isDialogVisible: boolean;
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
const defaultMappingProp = () => ({ id: uuidv4(), to: { app: {}, fields: [], isDialogVisible: false } });
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'DataMapping',
|
|
||||||
inheritAttrs: false,
|
|
||||||
components: {
|
|
||||||
ShowDialog,
|
|
||||||
ConditionObject,
|
|
||||||
AppFieldSelectBox,
|
|
||||||
FieldSelect
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
context: {
|
|
||||||
type: Array<Props>,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
displayName: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
modelValue: {
|
|
||||||
type: Object as () => ValueType[],
|
|
||||||
},
|
|
||||||
placeholder: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
onlySourceSelect: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
setup(props, { emit }) {
|
|
||||||
const closeDg = () => {
|
|
||||||
emit('update:modelValue', mappingProps
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const closeToDg = () => {
|
|
||||||
emit('update:modelValue', mappingProps
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const mappingProps: ValueType[] = props.modelValue
|
|
||||||
? props.modelValue
|
|
||||||
: reactive([defaultMappingProp()]);
|
|
||||||
|
|
||||||
|
|
||||||
const deleteMappingObject = (index: number) => mappingProps.length === 1
|
|
||||||
? mappingProps.splice(0, mappingProps.length, defaultMappingProp())
|
|
||||||
: mappingProps.splice(index, 1);
|
|
||||||
|
|
||||||
const mappingObjectsInputDisplay = computed(() =>
|
|
||||||
mappingProps ?
|
|
||||||
mappingProps
|
|
||||||
.filter(item => item.from?.name && item.to.fields?.length > 0)
|
|
||||||
.map(item => {
|
|
||||||
const name = typeof item.from?.name === 'string'
|
|
||||||
? item.from.name
|
|
||||||
: item.from?.name.name;
|
|
||||||
return `[${name}] - (${item.to.app?.name} : ${item.to.fields[0].label})`;
|
|
||||||
})
|
|
||||||
: []
|
|
||||||
);
|
|
||||||
|
|
||||||
const source = props.context.find(element => element?.props?.name === 'sources')
|
|
||||||
|
|
||||||
const sourceApp = computed(() => source?.props?.modelValue?.app);
|
|
||||||
|
|
||||||
const sourceAppId = computed(() => sourceApp.value?.id);
|
|
||||||
|
|
||||||
const btnDisable = computed(() => props.onlySourceSelect ? !(source?.props?.modelValue?.app?.id) : false);
|
|
||||||
|
|
||||||
//集計処理方法
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
emit('update:modelValue', mappingProps);
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
uuidv4,
|
|
||||||
dgIsShow: ref(false),
|
|
||||||
closeDg,
|
|
||||||
toDgIsShow: ref(false),
|
|
||||||
closeToDg,
|
|
||||||
mappingProps,
|
|
||||||
addMappingObject: () => mappingProps.push(defaultMappingProp()),
|
|
||||||
deleteMappingObject,
|
|
||||||
mappingObjectsInputDisplay,
|
|
||||||
sourceApp,
|
|
||||||
sourceAppId,
|
|
||||||
btnDisable
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style lang="scss"></style>
|
|
||||||
@@ -1,229 +0,0 @@
|
|||||||
<template>
|
|
||||||
<div>
|
|
||||||
<q-field :label="displayName" labelColor="primary" stack-label>
|
|
||||||
<template v-slot:control>
|
|
||||||
<q-card flat class="full-width">
|
|
||||||
<q-card-actions vertical>
|
|
||||||
<q-btn color="grey-3" text-color="black" @click="() => { dgIsShow = true }">クリックで設定</q-btn>
|
|
||||||
</q-card-actions>
|
|
||||||
<q-card-section class="text-caption">
|
|
||||||
<div v-if="processingObjectsInputDisplay && processingObjectsInputDisplay.length>0">
|
|
||||||
<div v-for="(item) in processingObjectsInputDisplay" :key="item">{{ item }}</div>
|
|
||||||
</div>
|
|
||||||
<div v-else>{{ placeholder }}</div>
|
|
||||||
</q-card-section>
|
|
||||||
</q-card>
|
|
||||||
</template>
|
|
||||||
</q-field>
|
|
||||||
<show-dialog v-model:visible="dgIsShow" name="集計処理" @close="closeDg" min-width="50vw" min-height="60vh">
|
|
||||||
<div class="q-mx-md q-mb-md">
|
|
||||||
<q-input v-model="processingProps.name" type="text" label-color="primary" label="集計結果の変数名"
|
|
||||||
placeholder="集計結果を格納する変数名を入力してください" stack-label />
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="q-mx-md">
|
|
||||||
<div class="row q-col-gutter-x-xs flex-center">
|
|
||||||
<div class="col-5">
|
|
||||||
<div class="q-mx-xs">データソース</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-2">
|
|
||||||
<div class="q-mx-xs">集計計算</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<div class="q-mx-xs">集計結果変数名</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-1"><q-btn flat round dense icon="add" size="sm" @click="addProcessingObject" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="q-my-sm" v-for="(item, index) in processingObjects" :key="item.id">
|
|
||||||
<div class="row q-col-gutter-x-xs flex-center">
|
|
||||||
<div class="col-5">
|
|
||||||
<ConditionObject v-model="item.field" />
|
|
||||||
</div>
|
|
||||||
<div class="col-2">
|
|
||||||
<q-select v-model="item.logicalOperator" :options="logicalOperators" outlined dense></q-select>
|
|
||||||
</div>
|
|
||||||
<div class="col-4">
|
|
||||||
<q-input v-model="item.vName" type="text" outlined dense />
|
|
||||||
</div>
|
|
||||||
<div class="col-1">
|
|
||||||
<q-btn flat round dense icon="delete" size="sm" @click="() => deleteProcessingObject(index)" />
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</show-dialog>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { v4 as uuidv4 } from 'uuid';
|
|
||||||
import { computed, defineComponent, provide, reactive, ref, watchEffect } from 'vue';
|
|
||||||
import ConditionObject from '../ConditionEditor/ConditionObject.vue';
|
|
||||||
import ShowDialog from '../ShowDialog.vue';
|
|
||||||
|
|
||||||
type Props = {
|
|
||||||
props?: {
|
|
||||||
name: string;
|
|
||||||
modelValue?: {
|
|
||||||
fields: {
|
|
||||||
type: string;
|
|
||||||
label: string;
|
|
||||||
code: string;
|
|
||||||
}[]
|
|
||||||
} | string
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
type ProcessingObjectType = {
|
|
||||||
field?: {
|
|
||||||
name: string | {
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
objectType: string;
|
|
||||||
type: string;
|
|
||||||
code: string;
|
|
||||||
label: string;
|
|
||||||
noLabel: boolean;
|
|
||||||
};
|
|
||||||
logicalOperator?: string;
|
|
||||||
vName?: string;
|
|
||||||
id: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
type ValueType = {
|
|
||||||
name: string;
|
|
||||||
actionName: string,
|
|
||||||
displayName: string,
|
|
||||||
vars: ProcessingObjectType[];
|
|
||||||
}
|
|
||||||
|
|
||||||
export default defineComponent({
|
|
||||||
name: 'DataProcessing',
|
|
||||||
inheritAttrs: false,
|
|
||||||
components: {
|
|
||||||
ShowDialog,
|
|
||||||
ConditionObject,
|
|
||||||
},
|
|
||||||
props: {
|
|
||||||
context: {
|
|
||||||
type: Array<Props>,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
displayName: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
name: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
modelValue: {
|
|
||||||
type: Object as () => ValueType,
|
|
||||||
},
|
|
||||||
placeholder: {
|
|
||||||
type: String,
|
|
||||||
default: '',
|
|
||||||
},
|
|
||||||
},
|
|
||||||
|
|
||||||
setup(props, { emit }) {
|
|
||||||
const source = props.context.find(element => element?.props?.name === 'sources')
|
|
||||||
|
|
||||||
if (source) {
|
|
||||||
provide('sourceFields', computed(() => {
|
|
||||||
const modelValue = source.props?.modelValue;
|
|
||||||
if (modelValue && typeof modelValue !== 'string') {
|
|
||||||
return modelValue.fields;
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}));
|
|
||||||
}
|
|
||||||
|
|
||||||
const actionName = props.context.find(element => element?.props?.name === 'displayName')
|
|
||||||
|
|
||||||
const processingProps: ValueType = props.modelValue && props.modelValue.vars
|
|
||||||
? props.modelValue
|
|
||||||
: reactive({
|
|
||||||
name: '',
|
|
||||||
actionName: actionName?.props?.modelValue as string,
|
|
||||||
displayName: '結果(戻り値)',
|
|
||||||
vars: [{ id: uuidv4() }]
|
|
||||||
});
|
|
||||||
|
|
||||||
const closeDg = () => {
|
|
||||||
emit('update:modelValue', processingProps
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
const processingObjects = processingProps.vars;
|
|
||||||
|
|
||||||
const deleteProcessingObject = (index: number) => processingObjects.length === 1
|
|
||||||
? processingObjects.splice(0, processingObjects.length, { id: uuidv4() })
|
|
||||||
: processingObjects.splice(index, 1);
|
|
||||||
|
|
||||||
const processingObjectsInputDisplay = computed(() =>
|
|
||||||
processingObjects ?
|
|
||||||
processingObjects
|
|
||||||
.filter(item => item.field && item.logicalOperator && item.vName)
|
|
||||||
.map(item => {
|
|
||||||
const name = typeof item.field?.name === 'string'
|
|
||||||
? item.field.name
|
|
||||||
: item.field?.name.name;
|
|
||||||
return item.logicalOperator.operator!==''?
|
|
||||||
`${processingProps.name}.${item.vName} = ${item.logicalOperator.operator}(${name})`
|
|
||||||
:`${processingProps.name}.${item.vName} = ${name}`
|
|
||||||
})
|
|
||||||
: []
|
|
||||||
);
|
|
||||||
//集計処理方法
|
|
||||||
const logicalOperators = ref([
|
|
||||||
{
|
|
||||||
"operator": "",
|
|
||||||
"label": "なし"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"operator": "SUM",
|
|
||||||
"label": "合計"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"operator": "AVG",
|
|
||||||
"label": "平均"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"operator": "MAX",
|
|
||||||
"label": "最大値"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"operator": "MIN",
|
|
||||||
"label": "最小値"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"operator": "COUNT",
|
|
||||||
"label": "カウント"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"operator": "FIRST",
|
|
||||||
"label": "最初の値"
|
|
||||||
}
|
|
||||||
]);
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
emit('update:modelValue', processingProps);
|
|
||||||
});
|
|
||||||
return {
|
|
||||||
uuidv4,
|
|
||||||
dgIsShow: ref(false),
|
|
||||||
closeDg,
|
|
||||||
processingObjects,
|
|
||||||
processingProps,
|
|
||||||
addProcessingObject: () => processingObjects.push({ id: uuidv4() }),
|
|
||||||
deleteProcessingObject,
|
|
||||||
logicalOperators,
|
|
||||||
processingObjectsInputDisplay,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
<style lang="scss"></style>
|
|
||||||
@@ -1,7 +1,10 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-bind="$attrs">
|
<div v-bind="$attrs">
|
||||||
<q-input :label="displayName" v-model="inputValue" label-color="primary" :placeholder="placeholder" stack-label
|
<q-input :label="displayName" v-model="inputValue" label-color="primary"
|
||||||
:rules="rulesExp" :maxlength="maxLength">
|
:placeholder="placeholder" stack-label
|
||||||
|
:rules="rulesExp"
|
||||||
|
:maxlength="maxLength"
|
||||||
|
>
|
||||||
<template v-slot:append v-if="hint !== ''">
|
<template v-slot:append v-if="hint !== ''">
|
||||||
<q-icon name="help" size="22px" color="blue-8">
|
<q-icon name="help" size="22px" color="blue-8">
|
||||||
<q-tooltip class="bg-yellow-2 text-black shadow-4" anchor="bottom right">
|
<q-tooltip class="bg-yellow-2 text-black shadow-4" anchor="bottom right">
|
||||||
@@ -15,7 +18,7 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { kMaxLength } from 'buffer';
|
import { kMaxLength } from 'buffer';
|
||||||
import { defineComponent, ref, watchEffect, computed } from 'vue';
|
import { defineComponent, ref, watchEffect } from 'vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'InputText',
|
name: 'InputText',
|
||||||
@@ -37,50 +40,27 @@ export default defineComponent({
|
|||||||
type: String,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
maxLength: {
|
maxLength:{
|
||||||
type: Number,
|
type: Number,
|
||||||
default: undefined
|
default:undefined
|
||||||
},
|
},
|
||||||
//例:[val=>!!val ||'入力してください']
|
//例:[val=>!!val ||'入力してください']
|
||||||
rules: {
|
rules:{
|
||||||
type: String,
|
type:String,
|
||||||
default: undefined
|
default:undefined
|
||||||
},
|
},
|
||||||
modelValue: {
|
modelValue: {
|
||||||
// type: Any,
|
type: String,
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const inputValue = computed({
|
const inputValue = ref(props.modelValue);
|
||||||
get: () => {
|
const rulesExp = props.rules===undefined?null : eval(props.rules);
|
||||||
if (props.modelValue !== null && typeof props.modelValue === 'object' && 'name' in props.modelValue) {
|
watchEffect(() => {
|
||||||
return props.modelValue.name;
|
emit('update:modelValue', inputValue.value);
|
||||||
} else {
|
|
||||||
return props.modelValue;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
set: (val) => {
|
|
||||||
if (props.name === 'verName') {
|
|
||||||
// return props.modelValue.name;
|
|
||||||
emit('update:modelValue', { name: val });
|
|
||||||
} else {
|
|
||||||
emit('update:modelValue', val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
// const inputValue = ref(props.modelValue);
|
|
||||||
const rulesExp = props.rules === undefined ? null : eval(props.rules);
|
|
||||||
|
|
||||||
// const finalValue = computed(() => {
|
|
||||||
// return props.name !== 'verName' ? inputValue.value : {
|
|
||||||
// name: inputValue.value,
|
|
||||||
// };
|
|
||||||
// });
|
|
||||||
// watchEffect(() => {
|
|
||||||
// emit('update:modelValue', finalValue);
|
|
||||||
// });
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
inputValue,
|
inputValue,
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-for="(item, index) in properties" :key="index" >
|
<div v-for="(item, index) in properties" :key="index" >
|
||||||
<component :is="item.component" v-bind="item.props" :context="properties" :connectProps="connectProps(item.props)" v-model="item.props.modelValue"></component>
|
<component :is="item.component" v-bind="item.props" :connectProps="connectProps(item.props)" v-model="item.props.modelValue"></component>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -21,9 +21,6 @@ import ConditionInput from '../right/ConditionInput.vue';
|
|||||||
import EventSetter from '../right/EventSetter.vue';
|
import EventSetter from '../right/EventSetter.vue';
|
||||||
import ColorPicker from './ColorPicker.vue';
|
import ColorPicker from './ColorPicker.vue';
|
||||||
import NumInput from './NumInput.vue';
|
import NumInput from './NumInput.vue';
|
||||||
import DataProcessing from './DataProcessing.vue';
|
|
||||||
import DataMapping from './DataMapping.vue';
|
|
||||||
import AppSelect from './AppSelect.vue';
|
|
||||||
import { IActionNode,IActionProperty,IProp } from 'src/types/ActionTypes';
|
import { IActionNode,IActionProperty,IProp } from 'src/types/ActionTypes';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
@@ -38,10 +35,7 @@ export default defineComponent({
|
|||||||
ConditionInput,
|
ConditionInput,
|
||||||
EventSetter,
|
EventSetter,
|
||||||
ColorPicker,
|
ColorPicker,
|
||||||
NumInput,
|
NumInput
|
||||||
DataProcessing,
|
|
||||||
DataMapping,
|
|
||||||
AppSelect
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
nodeProps: {
|
nodeProps: {
|
||||||
@@ -56,7 +50,7 @@ export default defineComponent({
|
|||||||
setup(props, context) {
|
setup(props, context) {
|
||||||
const properties=ref(props.nodeProps);
|
const properties=ref(props.nodeProps);
|
||||||
const connectProps=(props:IProp)=>{
|
const connectProps=(props:IProp)=>{
|
||||||
const connProps:any={context:properties};
|
const connProps:any={};
|
||||||
if(props && "connectProps" in props && props.connectProps!=undefined){
|
if(props && "connectProps" in props && props.connectProps!=undefined){
|
||||||
for(let connProp of props.connectProps){
|
for(let connProp of props.connectProps){
|
||||||
let targetProp = properties.value.find((prop)=>prop.props.name===connProp.propName);
|
let targetProp = properties.value.find((prop)=>prop.props.name===connProp.propName);
|
||||||
|
|||||||
@@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div v-bind="$attrs">
|
<div v-bind="$attrs">
|
||||||
<q-select v-model="selectedValue" :use-chips="multiple" :label="displayName" label-color="primary" :options="options" stack-label
|
<q-select v-model="selectedValue" :label="displayName" :options="options"/>
|
||||||
:multiple="multiple"/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { defineComponent,ref,watchEffect,computed } from 'vue';
|
import { defineComponent,ref,watchEffect } from 'vue';
|
||||||
|
|
||||||
export default defineComponent({
|
export default defineComponent({
|
||||||
name: 'SelectBox',
|
name: 'SelectBox',
|
||||||
@@ -24,27 +23,20 @@ export default defineComponent({
|
|||||||
type: Array,
|
type: Array,
|
||||||
required: true,
|
required: true,
|
||||||
},
|
},
|
||||||
selectType:{
|
|
||||||
type:String,
|
|
||||||
default:'',
|
|
||||||
},
|
|
||||||
modelValue: {
|
modelValue: {
|
||||||
type: Object,
|
type: String,
|
||||||
default: null,
|
default: '',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup(props, { emit }) {
|
setup(props, { emit }) {
|
||||||
const selectedValue = ref(props.modelValue);
|
const selectedValue = ref(props.modelValue);
|
||||||
const multiple = computed(()=>{
|
|
||||||
return props.selectType==='multiple'
|
|
||||||
});
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
emit('update:modelValue', selectedValue.value);
|
emit('update:modelValue', selectedValue.value);
|
||||||
});
|
});
|
||||||
|
|
||||||
return {
|
return {
|
||||||
selectedValue,
|
selectedValue
|
||||||
multiple
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,49 +1,44 @@
|
|||||||
import { api } from 'boot/axios';
|
import { api } from 'boot/axios';
|
||||||
import { ActionFlow } from 'src/types/ActionTypes';
|
import { ActionFlow } from 'src/types/ActionTypes';
|
||||||
|
|
||||||
export class FlowCtrl {
|
export class FlowCtrl
|
||||||
async getFlows(appId: string): Promise<ActionFlow[]> {
|
{
|
||||||
const flows: ActionFlow[] = [];
|
|
||||||
try {
|
|
||||||
const result = await api.get(`api/flows/${appId}`);
|
|
||||||
//console.info(result.data);
|
|
||||||
if (!result.data || !Array.isArray(result.data)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
for (const flow of result.data) {
|
async getFlows(appId:string):Promise<ActionFlow[]>
|
||||||
flows.push(ActionFlow.fromJSON(flow.content));
|
{
|
||||||
|
const flows:ActionFlow[]=[];
|
||||||
|
try{
|
||||||
|
const result = await api.get(`api/flows/${appId}`);
|
||||||
|
//console.info(result.data);
|
||||||
|
if(!result.data || !Array.isArray(result.data)){
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
|
for(const flow of result.data){
|
||||||
|
flows.push(ActionFlow.fromJSON(flow.content));
|
||||||
|
}
|
||||||
|
return flows;
|
||||||
|
}catch(error){
|
||||||
|
console.error(error);
|
||||||
|
return flows;
|
||||||
}
|
}
|
||||||
return flows;
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
return flows;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async SaveFlow(jsonData: any): Promise<boolean> {
|
async SaveFlow(jsonData:any):Promise<boolean>
|
||||||
const result = await api.post('api/flow', jsonData);
|
{
|
||||||
console.info(result.data);
|
const result = await api.post('api/flow',jsonData);
|
||||||
return true;
|
console.info(result.data)
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* フローを更新する
|
* フローを更新する
|
||||||
* @param jsonData
|
* @param jsonData
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async UpdateFlow(jsonData: any): Promise<boolean> {
|
async UpdateFlow(jsonData:any):Promise<boolean>
|
||||||
const result = await api.put('api/flow/' + jsonData.flowid, jsonData);
|
{
|
||||||
console.info(result.data);
|
const result = await api.put('api/flow/' + jsonData.flowid,jsonData);
|
||||||
return true;
|
console.info(result.data)
|
||||||
}
|
|
||||||
/**
|
|
||||||
* フローを消去する
|
|
||||||
* @param flowId
|
|
||||||
* @returns
|
|
||||||
*/
|
|
||||||
async DeleteFlow(flowId: string): Promise<boolean> {
|
|
||||||
const result = await api.delete('api/flow/' + flowId);
|
|
||||||
console.info(result.data);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
@@ -51,9 +46,12 @@ export class FlowCtrl {
|
|||||||
* @param appid
|
* @param appid
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async depoly(appid: string): Promise<boolean> {
|
async depoly(appid:string):Promise<boolean>
|
||||||
|
{
|
||||||
const result = await api.post(`api/v1/createjstokintone?app=${appid}`);
|
const result = await api.post(`api/v1/createjstokintone?app=${appid}`);
|
||||||
console.info(result.data);
|
console.info(result.data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
<q-btn :label="model+'選択'" color="primary" @click="showDg()" />
|
<q-btn :label="model+'選択'" color="primary" @click="showDg()" />
|
||||||
<show-dialog v-model:visible="show" :name="model" @close="closeDg" width="400px">
|
<show-dialog v-model:visible="show" :name="model" @close="closeDg" width="400px">
|
||||||
<template v-if="model=='アプリ'">
|
<template v-if="model=='アプリ'">
|
||||||
<app-select-box ref="appDg" :name="model" type="single"></app-select-box>
|
<app-select ref="appDg" :name="model" type="single"></app-select>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="model=='フィールド'">
|
<template v-if="model=='フィールド'">
|
||||||
<field-select ref="appDg" :name="model" type="multiple" :appId="1"></field-select>
|
<field-select ref="appDg" :name="model" type="multiple" :appId="1"></field-select>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import ShowDialog from 'components/ShowDialog.vue';
|
import ShowDialog from 'components/ShowDialog.vue';
|
||||||
import AppSelectBox from 'components/AppSelectBox.vue';
|
import AppSelect from 'components/AppSelect.vue';
|
||||||
import FieldSelect from 'components/FieldSelect.vue';
|
import FieldSelect from 'components/FieldSelect.vue';
|
||||||
import ActionSelect from 'components/ActionSelect.vue';
|
import ActionSelect from 'components/ActionSelect.vue';
|
||||||
import { ref } from 'vue'
|
import { ref } from 'vue'
|
||||||
|
|||||||
@@ -1,142 +1,118 @@
|
|||||||
import { defineStore } from 'pinia';
|
import { defineStore } from 'pinia';
|
||||||
import { AppInfo, IActionFlow, IActionNode } from 'src/types/ActionTypes';
|
import { AppInfo ,IActionFlow, IActionNode} from 'src/types/ActionTypes';
|
||||||
import { IKintoneEvent, KintoneEventManager } from 'src/types/KintoneEvents';
|
import { IKintoneEvent,KintoneEventManager } from 'src/types/KintoneEvents';
|
||||||
import { FlowCtrl } from '../control/flowctrl';
|
import {FlowCtrl } from '../control/flowctrl';
|
||||||
|
|
||||||
export interface FlowEditorState {
|
export interface FlowEditorState{
|
||||||
flowNames1: string;
|
flowNames1:string;
|
||||||
appInfo?: AppInfo;
|
appInfo?:AppInfo;
|
||||||
flows?: IActionFlow[];
|
flows?:IActionFlow[];
|
||||||
selectedFlow?: IActionFlow | undefined;
|
selectedFlow?:IActionFlow|undefined;
|
||||||
activeNode: IActionNode | undefined;
|
activeNode:IActionNode|undefined;
|
||||||
eventTree: KintoneEventManager;
|
eventTree:KintoneEventManager;
|
||||||
selectedEvent: IKintoneEvent | undefined;
|
selectedEvent:IKintoneEvent|undefined;
|
||||||
expandedScreen: any[];
|
expandedScreen:any[];
|
||||||
}
|
}
|
||||||
const flowCtrl = new FlowCtrl();
|
const flowCtrl=new FlowCtrl();
|
||||||
const eventTree = new KintoneEventManager();
|
const eventTree = new KintoneEventManager();
|
||||||
export const useFlowEditorStore = defineStore('flowEditor', {
|
export const useFlowEditorStore = defineStore("flowEditor",{
|
||||||
state: (): FlowEditorState => ({
|
state: ():FlowEditorState => ({
|
||||||
flowNames1: '',
|
flowNames1: '',
|
||||||
appInfo: undefined,
|
appInfo:undefined,
|
||||||
flows: [],
|
flows:[],
|
||||||
selectedFlow: undefined,
|
selectedFlow:undefined,
|
||||||
activeNode: undefined,
|
activeNode:undefined,
|
||||||
eventTree: eventTree,
|
eventTree:eventTree,
|
||||||
selectedEvent: undefined,
|
selectedEvent:undefined,
|
||||||
expandedScreen: [],
|
expandedScreen:[]
|
||||||
}),
|
}),
|
||||||
getters: {
|
getters: {
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @returns 現在編集しているフロー
|
* @returns 現在編集しているフロー
|
||||||
*/
|
*/
|
||||||
currentFlow(): IActionFlow | undefined {
|
currentFlow():IActionFlow|undefined{
|
||||||
return this.selectedFlow;
|
return this.selectedFlow;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* KintoneイベントIDから、バンドしているフローを検索する
|
* KintoneイベントIDから、バンドしているフローを検索する
|
||||||
* @param state
|
* @param state
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
findFlowByEventId(state) {
|
findFlowByEventId(state){
|
||||||
return (eventId: string) => {
|
return (eventId:string)=>{
|
||||||
return state.flows?.find((flow) => {
|
return state.flows?.find((flow)=>{
|
||||||
const root = flow.getRoot();
|
const root=flow.getRoot();
|
||||||
return root?.name === eventId;
|
return root?.name===eventId
|
||||||
});
|
});
|
||||||
};
|
}
|
||||||
},
|
}
|
||||||
|
|
||||||
findEventById(state) {
|
|
||||||
return (eventId: string) => {
|
|
||||||
return state.eventTree.findEventById(eventId);
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
setFlows(flows: IActionFlow[]) {
|
setFlows(flows:IActionFlow[]){
|
||||||
this.flows = flows;
|
this.flows=flows;
|
||||||
},
|
},
|
||||||
selectFlow(flow: IActionFlow | undefined) {
|
selectFlow(flow:IActionFlow){
|
||||||
this.selectedFlow = flow;
|
this.selectedFlow=flow;
|
||||||
},
|
},
|
||||||
setActiveNode(node: IActionNode) {
|
setActiveNode(node:IActionNode){
|
||||||
this.activeNode = node;
|
this.activeNode=node;
|
||||||
},
|
},
|
||||||
setApp(app: AppInfo) {
|
setApp(app:AppInfo){
|
||||||
this.appInfo = app;
|
this.appInfo=app;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* DBからフルーを保存する
|
* DBからフルーを保存する
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
async loadFlow() {
|
async loadFlow(){
|
||||||
if (this.appInfo === undefined) return;
|
if(this.appInfo===undefined) return;
|
||||||
const actionFlows = await flowCtrl.getFlows(this.appInfo?.appId);
|
const actionFlows = await flowCtrl.getFlows(this.appInfo?.appId);
|
||||||
//eventTreeにバンドする
|
//eventTreeにバンドする
|
||||||
this.eventTree.bindFlows(actionFlows);
|
this.eventTree.bindFlows(actionFlows);
|
||||||
if (actionFlows === undefined || actionFlows.length === 0) {
|
if(actionFlows===undefined || actionFlows.length===0){
|
||||||
this.flows = [];
|
this.flows=[];
|
||||||
this.selectedFlow = undefined;
|
this.selectedFlow=undefined;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.setFlows(actionFlows);
|
this.setFlows(actionFlows);
|
||||||
if (actionFlows && actionFlows.length > 0) {
|
if(actionFlows && actionFlows.length>0){
|
||||||
this.selectFlow(actionFlows[0]);
|
this.selectFlow(actionFlows[0]);
|
||||||
}
|
}
|
||||||
const expandNames = actionFlows.map((flow) => flow.getRoot()?.title);
|
const expandNames = actionFlows.map(flow=>flow.getRoot()?.title);
|
||||||
// const expandName =actionFlows[0].getRoot()?.title;
|
// const expandName =actionFlows[0].getRoot()?.title;
|
||||||
this.expandedScreen = expandNames;
|
this.expandedScreen=expandNames;
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* フローをDBに保存及び更新する
|
* フローをDBに保存及び更新する
|
||||||
*/
|
*/
|
||||||
async saveFlow(flow: IActionFlow) {
|
async saveFlow(flow:IActionFlow){
|
||||||
const root = flow.getRoot();
|
const root=flow.getRoot();
|
||||||
const isNew = flow.id === '';
|
const isNew = flow.id==='';
|
||||||
const jsonData = {
|
const jsonData={
|
||||||
flowid: isNew ? flow.createNewId() : flow.id,
|
flowid: isNew ? flow.createNewId():flow.id,
|
||||||
appid: this.appInfo?.appId,
|
appid: this.appInfo?.appId,
|
||||||
eventid: root?.name,
|
eventid: root?.name,
|
||||||
name: root?.subTitle,
|
name: root?.subTitle,
|
||||||
content: JSON.stringify(flow),
|
content: JSON.stringify(flow)
|
||||||
};
|
|
||||||
|
|
||||||
if (isNew) {
|
|
||||||
return await flowCtrl.SaveFlow(jsonData);
|
|
||||||
} else {
|
|
||||||
return await flowCtrl.UpdateFlow(jsonData);
|
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
|
if(isNew){
|
||||||
deleteEvent(event: IKintoneEvent) {
|
return await flowCtrl.SaveFlow(jsonData);
|
||||||
const store = useFlowEditorStore();
|
}else{
|
||||||
if (event.flowData) {
|
return await flowCtrl.UpdateFlow(jsonData);
|
||||||
const flow = event.flowData;
|
|
||||||
if (flow.id === '') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
flowCtrl.DeleteFlow(flow.id)
|
|
||||||
eventTree.deleteEvent(event, store);
|
|
||||||
if(this.flows){
|
|
||||||
this.flows = this.flows.filter((f) => f.id !== flow.id);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
eventTree.deleteEvent(event, store);
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* デプロイする
|
* デプロイする
|
||||||
*/
|
*/
|
||||||
async deploy(): Promise<boolean> {
|
async deploy():Promise<boolean>{
|
||||||
if (this.appInfo === undefined) {
|
if(this.appInfo===undefined){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
return await flowCtrl.depoly(this.appInfo?.appId);
|
return await flowCtrl.depoly(this.appInfo?.appId);
|
||||||
},
|
}
|
||||||
},
|
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -45,16 +45,7 @@ export interface IActionProperty {
|
|||||||
export interface IActionVariable{
|
export interface IActionVariable{
|
||||||
actionName:string;
|
actionName:string;
|
||||||
displayName:string;
|
displayName:string;
|
||||||
name: {
|
name:string;
|
||||||
name:string;
|
|
||||||
actionName:string;
|
|
||||||
displayName:string;
|
|
||||||
vars : {
|
|
||||||
vName:string;
|
|
||||||
logicalOperator:string;
|
|
||||||
field: object;
|
|
||||||
}[]
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* アクションタイプ定義
|
* アクションタイプ定義
|
||||||
@@ -457,12 +448,6 @@ export class ActionFlow implements IActionFlow {
|
|||||||
getPrevVarNames(prevNode:IActionNode):IActionVariable[]{
|
getPrevVarNames(prevNode:IActionNode):IActionVariable[]{
|
||||||
let varNames:IActionVariable[]=[];
|
let varNames:IActionVariable[]=[];
|
||||||
if(prevNode.varName!==undefined && prevNode.varName.modelValue){
|
if(prevNode.varName!==undefined && prevNode.varName.modelValue){
|
||||||
|
|
||||||
if(prevNode.varName.modelValue ==='object'){
|
|
||||||
console.log(prevNode);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
varNames.unshift({
|
varNames.unshift({
|
||||||
actionName:prevNode.name,
|
actionName:prevNode.name,
|
||||||
displayName:prevNode.varName.displayName,
|
displayName:prevNode.varName.displayName,
|
||||||
|
|||||||
@@ -74,11 +74,6 @@ export class GroupNode implements INode {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OperatorListItem = {
|
|
||||||
label: string;
|
|
||||||
value: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 条件式ノード
|
// 条件式ノード
|
||||||
export class ConditionNode implements INode {
|
export class ConditionNode implements INode {
|
||||||
index: number;
|
index: number;
|
||||||
@@ -88,13 +83,13 @@ export class ConditionNode implements INode {
|
|||||||
return this.parent.logicalOperator;
|
return this.parent.logicalOperator;
|
||||||
};
|
};
|
||||||
object: any; // 比較元
|
object: any; // 比較元
|
||||||
operator: Operator | OperatorListItem; // 比較子
|
operator: Operator; // 比較子
|
||||||
value: any;
|
value: any;
|
||||||
get header():string{
|
get header():string{
|
||||||
return 'generic';
|
return 'generic';
|
||||||
}
|
}
|
||||||
|
|
||||||
constructor(object: any, operator: Operator | OperatorListItem, value: any, parent: GroupNode) {
|
constructor(object: any, operator: Operator, value: any, parent: GroupNode) {
|
||||||
this.index=0;
|
this.index=0;
|
||||||
this.type = NodeType.Condition;
|
this.type = NodeType.Condition;
|
||||||
this.object = object;
|
this.object = object;
|
||||||
@@ -118,12 +113,10 @@ export class ConditionNode implements INode {
|
|||||||
export class ConditionTree {
|
export class ConditionTree {
|
||||||
root: GroupNode;
|
root: GroupNode;
|
||||||
maxIndex:number;
|
maxIndex:number;
|
||||||
queryString:string;
|
|
||||||
|
|
||||||
constructor() {
|
constructor() {
|
||||||
this.maxIndex=0;
|
this.maxIndex=0;
|
||||||
this.root = new GroupNode(LogicalOperator.AND, null);
|
this.root = new GroupNode(LogicalOperator.AND, null);
|
||||||
this.queryString='';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ノード追加
|
// ノード追加
|
||||||
@@ -205,49 +198,12 @@ export class ConditionTree {
|
|||||||
if(value && typeof value ==='object' && ('label' in value)){
|
if(value && typeof value ==='object' && ('label' in value)){
|
||||||
value =condNode.value.label;
|
value =condNode.value.label;
|
||||||
}
|
}
|
||||||
return `${typeof condNode.object.name === 'object' ? condNode.object.name.name : condNode.object.name} ${typeof condNode.operator === 'object' ? condNode.operator.label : condNode.operator} '${value}'`;
|
return `${condNode.object.name} ${condNode.operator} '${value}'`;
|
||||||
} else {
|
} else {
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
buildConditionQueryString(node:INode){
|
|
||||||
if (node.type !== NodeType.Condition) {
|
|
||||||
let conditionString = '';
|
|
||||||
if(node.type !== NodeType.Root){
|
|
||||||
conditionString = '(';
|
|
||||||
}
|
|
||||||
|
|
||||||
const groupNode = node as GroupNode;
|
|
||||||
for (let i = 0; i < groupNode.children.length; i++) {
|
|
||||||
const childConditionString = this.buildConditionQueryString(groupNode.children[i]);
|
|
||||||
if (childConditionString !== '') {
|
|
||||||
conditionString += childConditionString;
|
|
||||||
if (i < groupNode.children.length - 1) {
|
|
||||||
conditionString += ` ${groupNode.logicalOperator.toLowerCase()} `;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if(node.type !== NodeType.Root){
|
|
||||||
conditionString += ')';
|
|
||||||
}
|
|
||||||
return conditionString;
|
|
||||||
} else {
|
|
||||||
const condNode=node as ConditionNode;
|
|
||||||
if (condNode.object && condNode.operator ) {
|
|
||||||
let value=condNode.value;
|
|
||||||
if(value && typeof value ==='object' && ('label' in value)){
|
|
||||||
value =condNode.value.label;
|
|
||||||
}
|
|
||||||
return `${condNode.object.code} ${typeof condNode.operator === 'object' ? condNode.operator.value : condNode.operator} "${value}"`;
|
|
||||||
} else {
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param node ノード移動
|
* @param node ノード移動
|
||||||
@@ -369,7 +325,7 @@ export class ConditionTree {
|
|||||||
}
|
}
|
||||||
|
|
||||||
toJson():string{
|
toJson():string{
|
||||||
return JSON.stringify({queryString :this.queryString, ...this.root}, (key, value) => {
|
return JSON.stringify(this.root, (key, value) => {
|
||||||
if (key === 'parent') {
|
if (key === 'parent') {
|
||||||
return value ? value.type : null;
|
return value ? value.type : null;
|
||||||
}
|
}
|
||||||
@@ -377,7 +333,4 @@ export class ConditionTree {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
setQuery(queryString:string){
|
|
||||||
this.queryString=queryString;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,9 @@
|
|||||||
import { useFlowEditorStore } from 'src/stores/flowEditor';
|
import {IActionFlow} from './ActionTypes';
|
||||||
import { IActionFlow } from './ActionTypes';
|
|
||||||
export interface IKintoneEventNode {
|
export interface IKintoneEventNode {
|
||||||
label: string;
|
label: string;
|
||||||
header: string;
|
header:string;
|
||||||
eventId: string;
|
eventId:string;
|
||||||
parentId: string;
|
parentId:string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface IKintoneEvent extends IKintoneEventNode {
|
export interface IKintoneEvent extends IKintoneEventNode {
|
||||||
@@ -16,64 +15,60 @@ export interface IKintoneEventGroup extends IKintoneEventNode {
|
|||||||
events: IKintoneEventNode[];
|
events: IKintoneEventNode[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export class kintoneEvent implements IKintoneEvent {
|
|
||||||
|
export class kintoneEvent implements IKintoneEvent{
|
||||||
eventId: string;
|
eventId: string;
|
||||||
parentId: string;
|
parentId:string;
|
||||||
get hasFlow(): boolean {
|
get hasFlow(): boolean{
|
||||||
return this.flowData !== undefined && this.flowData.actionNodes.length > 1;
|
return this.flowData!==undefined && this.flowData.actionNodes.length>1
|
||||||
}
|
};
|
||||||
flowData?: IActionFlow | undefined;
|
flowData?: IActionFlow | undefined;
|
||||||
label: string;
|
label: string;
|
||||||
header = 'EVENT';
|
get header():string{
|
||||||
constructor(label: string, eventId: string, parentId: string) {
|
return "EVENT";
|
||||||
this.eventId = eventId;
|
}
|
||||||
this.label = label;
|
constructor(label:string,eventId:string,parentId:string){
|
||||||
this.parentId = parentId;
|
this.eventId=eventId;
|
||||||
|
this.label=label;
|
||||||
|
this.parentId=parentId;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class kintoneEventGroup implements IKintoneEventGroup {
|
export class kintoneEventGroup implements IKintoneEventGroup{
|
||||||
eventId: string;
|
eventId: string;
|
||||||
parentId: string;
|
parentId:string;
|
||||||
label: string;
|
label: string;
|
||||||
events: IKintoneEventNode[];
|
events: IKintoneEventNode[];
|
||||||
get header(): string {
|
get header():string{
|
||||||
return 'EVENTGROUP';
|
return "EVENTGROUP";
|
||||||
}
|
}
|
||||||
constructor(
|
constructor(eventId:string,label:string,events:IKintoneEventNode[],parentId:string){
|
||||||
eventId: string,
|
this.eventId=eventId;
|
||||||
label: string,
|
this.label=label;
|
||||||
events: IKintoneEventNode[],
|
this.events=events;
|
||||||
parentId: string
|
this.parentId=parentId;
|
||||||
) {
|
|
||||||
this.eventId = eventId;
|
|
||||||
this.label = label;
|
|
||||||
this.events = events;
|
|
||||||
this.parentId = parentId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class kintoneEventForChange implements IKintoneEventGroup {
|
|
||||||
|
export class kintoneEventForChange implements IKintoneEventGroup{
|
||||||
eventId: string;
|
eventId: string;
|
||||||
parentId: string;
|
parentId:string;
|
||||||
label: string;
|
label: string;
|
||||||
events: IKintoneEventNode[];
|
events: IKintoneEventNode[];
|
||||||
get header(): string {
|
get header():string{
|
||||||
return 'CHANGE';
|
return "CHANGE";
|
||||||
}
|
}
|
||||||
constructor(
|
constructor(eventId:string,label:string,events:IKintoneEventNode[],parentId:string){
|
||||||
eventId: string,
|
this.eventId=eventId;
|
||||||
label: string,
|
this.label=label;
|
||||||
events: IKintoneEventNode[],
|
this.events=events;
|
||||||
parentId: string
|
this.parentId=parentId;
|
||||||
) {
|
|
||||||
this.eventId = eventId;
|
|
||||||
this.label = label;
|
|
||||||
this.events = events;
|
|
||||||
this.parentId = parentId;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export class KintoneEventManager {
|
export class KintoneEventManager {
|
||||||
public screens: IKintoneEventGroup[];
|
public screens: IKintoneEventGroup[];
|
||||||
|
|
||||||
@@ -81,35 +76,28 @@ export class KintoneEventManager {
|
|||||||
this.screens = this.getKintoneEvents();
|
this.screens = this.getKintoneEvents();
|
||||||
}
|
}
|
||||||
|
|
||||||
public bindFlows(flows: IActionFlow[]) {
|
public bindFlows(flows:IActionFlow[]){
|
||||||
this.screens = this.getKintoneEvents();
|
this.screens=this.getKintoneEvents();
|
||||||
for (const flow of flows) {
|
for (const flow of flows){
|
||||||
const eventId = flow.getRoot()?.name;
|
const eventId =flow.getRoot()?.name;
|
||||||
if (eventId !== undefined) {
|
if(eventId!==undefined){
|
||||||
const eventNode = this.findEventById(eventId);
|
const eventNode = this.findEventById(eventId);
|
||||||
if (eventNode !== null && eventNode.header === 'EVENT') {
|
if(eventNode!==null && eventNode.header==="EVENT"){
|
||||||
const event = eventNode as kintoneEvent;
|
const event =eventNode as kintoneEvent;
|
||||||
event.flowData = flow;
|
event.flowData=flow;
|
||||||
} else {
|
}else{
|
||||||
//EventGroupのIDを取得
|
//EventGroupのIDを取得
|
||||||
const lastIndex = eventId.lastIndexOf('.');
|
const lastIndex = eventId.lastIndexOf(".");
|
||||||
const groupId = eventId.substring(0, lastIndex);
|
const groupId=eventId.substring(0,lastIndex);
|
||||||
const eventNode = this.findEventById(groupId);
|
const eventNode = this.findEventById(groupId);
|
||||||
if (
|
if(eventNode && (eventNode.header==="EVENTGROUP" || eventNode.header==="CHANGE")){
|
||||||
eventNode &&
|
const groupEvent=eventNode as kintoneEventGroup;
|
||||||
(eventNode.header === 'EVENTGROUP' || eventNode.header === 'CHANGE')
|
const newEvent =new kintoneEvent(
|
||||||
) {
|
flow.getRoot()?.subTitle || "",
|
||||||
const groupEvent = eventNode as kintoneEventGroup;
|
eventId,
|
||||||
|
groupEvent.parentId
|
||||||
const newEvent = {
|
);
|
||||||
label: flow.getRoot()?.subTitle || '',
|
newEvent.flowData=flow;
|
||||||
eventId: eventId,
|
|
||||||
parentId: groupId,
|
|
||||||
header: 'DELETABLE',
|
|
||||||
hasFlow: true,
|
|
||||||
flowData: flow,
|
|
||||||
};
|
|
||||||
|
|
||||||
groupEvent.events.push(newEvent);
|
groupEvent.events.push(newEvent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -118,193 +106,61 @@ export class KintoneEventManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public findEventById(eventId: string): IKintoneEventNode | null {
|
public findEventById(eventId: string): IKintoneEventNode | null {
|
||||||
const screen = this.findScreen(eventId);
|
const screen=this.findScreen(eventId);
|
||||||
if (screen) {
|
if(screen) {return screen;}
|
||||||
return screen;
|
|
||||||
}
|
|
||||||
for (const screen of this.screens) {
|
for (const screen of this.screens) {
|
||||||
for (const event of screen.events) {
|
for (const event of screen.events) {
|
||||||
if (event.eventId === eventId) {
|
if (event.eventId === eventId) {
|
||||||
return event;
|
return event;
|
||||||
}
|
}
|
||||||
if (event.header === 'EVENTGROUP' || event.header === 'CHANGE') {
|
if(event.header==="EVENTGROUP"||event.header==="CHANGE"){
|
||||||
const eventGroup = event as IKintoneEventGroup;
|
const eventGroup = event as IKintoneEventGroup;
|
||||||
const targetEvent = eventGroup.events.find((ev) => {
|
const targetEvent = eventGroup.events.find((ev)=>{
|
||||||
return ev.eventId === eventId;
|
return ev.eventId===eventId;
|
||||||
});
|
})
|
||||||
if (targetEvent) {
|
if(targetEvent){
|
||||||
return targetEvent;
|
return targetEvent;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public findScreen(eventId: string): IKintoneEventGroup | undefined {
|
public findScreen(eventId:string):IKintoneEventGroup|undefined{
|
||||||
return this.screens.find((screen) => screen.eventId == eventId);
|
return this.screens.find(screen=>screen.eventId==eventId);
|
||||||
}
|
}
|
||||||
|
|
||||||
public deleteEvent(
|
public getKintoneEvents():IKintoneEventGroup[]{
|
||||||
event: kintoneEvent,
|
|
||||||
store: ReturnType<typeof useFlowEditorStore>
|
|
||||||
) {
|
|
||||||
if (event.header !== 'DELETABLE') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
const parent = store.findEventById(event.parentId);
|
|
||||||
if (parent?.header !== 'CHANGE' && parent?.header !== 'EVENTGROUP') {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const realParent = parent as kintoneEventForChange;
|
|
||||||
|
|
||||||
const index = realParent.events.findIndex(
|
|
||||||
(e) => e.eventId === event.eventId
|
|
||||||
);
|
|
||||||
|
|
||||||
if (index !== -1) {
|
|
||||||
realParent.events.splice(index, 1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public getKintoneEvents(): IKintoneEventGroup[] {
|
|
||||||
return [
|
return [
|
||||||
new kintoneEventGroup(
|
new kintoneEventGroup("app.record.create","レコード追加画面",[
|
||||||
'app.record.create',
|
new kintoneEvent('レコード追加画面を表示した後','app.record.create.show',"app.record.create"),
|
||||||
'レコード追加画面',
|
new kintoneEvent('保存をクリックしたとき','app.record.create.submit',"app.record.create"),
|
||||||
[
|
new kintoneEvent('保存が成功したとき','app.record.create.submit.success',"app.record.create"),
|
||||||
new kintoneEvent(
|
new kintoneEventForChange('app.record.create.change','フィールドの値を変更したとき',[],"app.record.create"),
|
||||||
'レコード追加画面を表示した後',
|
new kintoneEventGroup('app.record.create.show.customButtonClick','ボタンをクリックした時',[],"app.record.create")
|
||||||
'app.record.create.show',
|
],""),
|
||||||
'app.record.create'
|
new kintoneEventGroup("app.record.detail","レコード詳細画面",[
|
||||||
),
|
new kintoneEvent('レコード詳細画面を表示した後','app.record.detail.show',"app.record.detail"),
|
||||||
new kintoneEvent(
|
new kintoneEvent('レコードを削除するとき','app.record.detail.delete.submit',"app.record.detail"),
|
||||||
'保存をクリックしたとき',
|
new kintoneEvent('プロセス管理のアクションを実行したとき','app.record.detail.process.proceed',"app.record.detail"),
|
||||||
'app.record.create.submit',
|
new kintoneEventGroup('app.record.detail.show.customButtonClick','ボタンをクリックした時',[],"app.record.detail"),
|
||||||
'app.record.create'
|
],""),
|
||||||
),
|
new kintoneEventGroup("app.record.edit","レコード編集画面",[
|
||||||
new kintoneEvent(
|
new kintoneEvent('レコード編集画面を表示した後','app.record.edit.show',"app.record.edit"),
|
||||||
'保存が成功したとき',
|
new kintoneEvent('保存をクリックしたとき','app.record.edit.submit',"app.record.edit"),
|
||||||
'app.record.create.submit.success',
|
new kintoneEvent('保存が成功したとき','app.record.edit.submit.success',"app.record.edit"),
|
||||||
'app.record.create'
|
new kintoneEventForChange('app.record.edit.change','フィールドの値を変更したとき',[],"app.record.edit"),
|
||||||
),
|
new kintoneEventGroup('app.record.edit.show.customButtonClick','ボタンをクリックした時',[],"app.record.edit"),
|
||||||
new kintoneEventForChange(
|
],""),
|
||||||
'app.record.create.change',
|
new kintoneEventGroup("app.record.index","レコード一覧画面",[
|
||||||
'フィールドの値を変更したとき',
|
new kintoneEvent('一覧画面を表示した後', 'app.record.index.show',"app.record.index"),
|
||||||
[],
|
new kintoneEvent('インライン編集を開始したとき','app.record.index.edit.show',"app.record.index"),
|
||||||
'app.record.create'
|
new kintoneEvent('インライン編集の【保存】をクリックしたとき','app.record.index.edit.submit',"app.record.index"),
|
||||||
),
|
new kintoneEvent('インライン編集の保存が成功したとき', 'app.record.index.edit.submit.success',"app.record.index"),
|
||||||
new kintoneEventGroup(
|
new kintoneEventForChange('app.record.index.edit.change','インライン編集のフィールド値を変更したとき' ,[],"app.record.index"),
|
||||||
'app.record.create.show.customButtonClick',
|
new kintoneEventGroup('app.record.detail.show.customButtonClick','ボタンをクリックした時',[],"app.record.index"),
|
||||||
'ボタンをクリックした時',
|
],"")
|
||||||
[],
|
|
||||||
'app.record.create'
|
|
||||||
),
|
|
||||||
],
|
|
||||||
''
|
|
||||||
),
|
|
||||||
new kintoneEventGroup(
|
|
||||||
'app.record.detail',
|
|
||||||
'レコード詳細画面',
|
|
||||||
[
|
|
||||||
new kintoneEvent(
|
|
||||||
'レコード詳細画面を表示した後',
|
|
||||||
'app.record.detail.show',
|
|
||||||
'app.record.detail'
|
|
||||||
),
|
|
||||||
new kintoneEvent(
|
|
||||||
'レコードを削除するとき',
|
|
||||||
'app.record.detail.delete.submit',
|
|
||||||
'app.record.detail'
|
|
||||||
),
|
|
||||||
new kintoneEvent(
|
|
||||||
'プロセス管理のアクションを実行したとき',
|
|
||||||
'app.record.detail.process.proceed',
|
|
||||||
'app.record.detail'
|
|
||||||
),
|
|
||||||
new kintoneEventGroup(
|
|
||||||
'app.record.detail.show.customButtonClick',
|
|
||||||
'ボタンをクリックした時',
|
|
||||||
[],
|
|
||||||
'app.record.detail'
|
|
||||||
),
|
|
||||||
],
|
|
||||||
''
|
|
||||||
),
|
|
||||||
new kintoneEventGroup(
|
|
||||||
'app.record.edit',
|
|
||||||
'レコード編集画面',
|
|
||||||
[
|
|
||||||
new kintoneEvent(
|
|
||||||
'レコード編集画面を表示した後',
|
|
||||||
'app.record.edit.show',
|
|
||||||
'app.record.edit'
|
|
||||||
),
|
|
||||||
new kintoneEvent(
|
|
||||||
'保存をクリックしたとき',
|
|
||||||
'app.record.edit.submit',
|
|
||||||
'app.record.edit'
|
|
||||||
),
|
|
||||||
new kintoneEvent(
|
|
||||||
'保存が成功したとき',
|
|
||||||
'app.record.edit.submit.success',
|
|
||||||
'app.record.edit'
|
|
||||||
),
|
|
||||||
new kintoneEventForChange(
|
|
||||||
'app.record.edit.change',
|
|
||||||
'フィールドの値を変更したとき',
|
|
||||||
[],
|
|
||||||
'app.record.edit'
|
|
||||||
),
|
|
||||||
new kintoneEventGroup(
|
|
||||||
'app.record.edit.show.customButtonClick',
|
|
||||||
'ボタンをクリックした時',
|
|
||||||
[],
|
|
||||||
'app.record.edit'
|
|
||||||
),
|
|
||||||
],
|
|
||||||
''
|
|
||||||
),
|
|
||||||
new kintoneEventGroup(
|
|
||||||
'app.record.index',
|
|
||||||
'レコード一覧画面',
|
|
||||||
[
|
|
||||||
new kintoneEvent(
|
|
||||||
'一覧画面を表示した後',
|
|
||||||
'app.record.index.show',
|
|
||||||
'app.record.index'
|
|
||||||
),
|
|
||||||
new kintoneEvent(
|
|
||||||
'インライン編集を開始したとき',
|
|
||||||
'app.record.index.edit.show',
|
|
||||||
'app.record.index'
|
|
||||||
),
|
|
||||||
new kintoneEvent(
|
|
||||||
'インライン編集の【保存】をクリックしたとき',
|
|
||||||
'app.record.index.edit.submit',
|
|
||||||
'app.record.index'
|
|
||||||
),
|
|
||||||
new kintoneEvent(
|
|
||||||
'インライン編集の保存が成功したとき',
|
|
||||||
'app.record.index.edit.submit.success',
|
|
||||||
'app.record.index'
|
|
||||||
),
|
|
||||||
new kintoneEventForChange(
|
|
||||||
'app.record.index.edit.change',
|
|
||||||
'インライン編集のフィールド値を変更したとき',
|
|
||||||
[],
|
|
||||||
'app.record.index'
|
|
||||||
),
|
|
||||||
new kintoneEventGroup(
|
|
||||||
'app.record.detail.show.customButtonClick',
|
|
||||||
'ボタンをクリックした時',
|
|
||||||
[],
|
|
||||||
'app.record.index'
|
|
||||||
),
|
|
||||||
],
|
|
||||||
''
|
|
||||||
),
|
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
10
node_modules/.yarn-integrity
generated
vendored
Normal file
10
node_modules/.yarn-integrity
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"systemParams": "win32-x64-115",
|
||||||
|
"modulesFolders": [],
|
||||||
|
"flags": [],
|
||||||
|
"linkedModules": [],
|
||||||
|
"topLevelPatterns": [],
|
||||||
|
"lockfileEntries": {},
|
||||||
|
"files": [],
|
||||||
|
"artifacts": {}
|
||||||
|
}
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
VITE_SOURCE_MAP = inline
|
|
||||||
VITE_PORT = 4173
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
VITE_SOURCE_MAP = false
|
|
||||||
VITE_PORT = 4173
|
|
||||||
16
plugin/kintone-addins/package-lock.json
generated
16
plugin/kintone-addins/package-lock.json
generated
@@ -8,7 +8,8 @@
|
|||||||
"name": "kintone-addins",
|
"name": "kintone-addins",
|
||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jquery": "^3.7.1"
|
"jquery": "^3.7.1",
|
||||||
|
"yarn": "^1.22.22"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jquery": "^3.5.24",
|
"@types/jquery": "^3.5.24",
|
||||||
@@ -795,6 +796,19 @@
|
|||||||
"optional": true
|
"optional": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"node_modules/yarn": {
|
||||||
|
"version": "1.22.22",
|
||||||
|
"resolved": "https://registry.npmjs.org/yarn/-/yarn-1.22.22.tgz",
|
||||||
|
"integrity": "sha512-prL3kGtyG7o9Z9Sv8IPfBNrWTDmXB4Qbes8A9rEzt6wkJV8mUvoirjU0Mp3GGAU06Y0XQyA3/2/RQFVuK7MTfg==",
|
||||||
|
"hasInstallScript": true,
|
||||||
|
"bin": {
|
||||||
|
"yarn": "bin/yarn.js",
|
||||||
|
"yarnpkg": "bin/yarn.js"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=4.0.0"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,30 +4,22 @@
|
|||||||
"version": "0.0.0",
|
"version": "0.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "run-p watch server ngrok",
|
"dev": "tsc && set \"SOURCE_MAP=true\" && vite build && vite preview",
|
||||||
"watch": "vite build --watch --mode dev",
|
"build": "tsc && vite build && xcopy dist\\*.js ..\\..\\backend\\Temp\\ /E /I /Y",
|
||||||
"server": "vite dev --mode dev",
|
"build:dev": "tsc && set \"SOURCE_MAP=true\" && vite build && xcopy dist\\*.js ..\\..\\backend\\Temp\\ /E /I /Y",
|
||||||
"ngrok": "ngrok http 4173",
|
"preview": "vite preview",
|
||||||
"build": "run-s b:production copy:windows",
|
"ngrok":"ngrok http http://localhost:4173/",
|
||||||
"build:dev": "run-s b:dev copy:windows",
|
"vite":"vite dev"
|
||||||
"build:linux": "run-s b:production copy:linux",
|
|
||||||
"build:linux-dev": "run-s b:dev copy:linux",
|
|
||||||
"b:production": "vite build --mode production",
|
|
||||||
"b:dev": "vite build --mode dev",
|
|
||||||
"copy:windows": "xcopy dist\\*.js ..\\..\\backend\\Temp\\ /E /I /Y",
|
|
||||||
"copy:linux": "cp -ur dist/*.js ../../backend/Temp"
|
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jquery": "^3.5.24",
|
"@types/jquery": "^3.5.24",
|
||||||
"@types/node": "^20.8.9",
|
"@types/node": "^20.8.9",
|
||||||
"npm-run-all2": "^6.2.0",
|
|
||||||
"sass": "^1.69.5",
|
"sass": "^1.69.5",
|
||||||
"typescript": "^5.0.2",
|
"typescript": "^5.0.2",
|
||||||
"vite": "^4.4.5",
|
"vite": "^4.4.5"
|
||||||
"vite-plugin-checker": "^0.6.4",
|
|
||||||
"vite-plugin-lib-inject-css": "^2.1.1"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"jquery": "^3.7.1"
|
"jquery": "^3.7.1",
|
||||||
|
"yarn": "^1.22.22"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,24 +0,0 @@
|
|||||||
.alc-button-normal {
|
|
||||||
display: inline-block;
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding: 0 16px;
|
|
||||||
margin-left: 16px;
|
|
||||||
margin-top: 8px;
|
|
||||||
min-width: 100px;
|
|
||||||
outline: none;
|
|
||||||
border: 1px solid #e3e7e8;
|
|
||||||
background-color: #f7f9fa;
|
|
||||||
box-shadow: 1px 1px 1px #fff inset;
|
|
||||||
color: #3498db;
|
|
||||||
text-align: center;
|
|
||||||
line-height: 32px;
|
|
||||||
}
|
|
||||||
.alc-button-normal:hover {
|
|
||||||
background-color: #c8d6dd;
|
|
||||||
box-shadow: none;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.alc-button-normal:active {
|
|
||||||
color: #f7f9fa;
|
|
||||||
background-color: #54b8eb;
|
|
||||||
}
|
|
||||||
@@ -2,7 +2,6 @@
|
|||||||
import { actionAddins } from ".";
|
import { actionAddins } from ".";
|
||||||
import { IField, IAction,IActionResult, IActionNode, IActionProperty, IContext } from "../types/ActionTypes";
|
import { IField, IAction,IActionResult, IActionNode, IActionProperty, IContext } from "../types/ActionTypes";
|
||||||
import { Formatter } from "../util/format";
|
import { Formatter } from "../util/format";
|
||||||
import "./auto-numbering.css";
|
|
||||||
|
|
||||||
declare global {
|
declare global {
|
||||||
interface Window { $format: any; }
|
interface Window { $format: any; }
|
||||||
@@ -85,7 +84,6 @@ export class AutoNumbering implements IAction{
|
|||||||
|
|
||||||
execEval(match:string,expr:string):string{
|
execEval(match:string,expr:string):string{
|
||||||
console.log(match);
|
console.log(match);
|
||||||
// @ts-ignore
|
|
||||||
return eval(expr);
|
return eval(expr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,8 +2,6 @@
|
|||||||
import { actionAddins } from ".";
|
import { actionAddins } from ".";
|
||||||
import $ from 'jquery';
|
import $ from 'jquery';
|
||||||
import { IAction, IActionProperty, IActionNode, IActionResult } from "../types/ActionTypes";
|
import { IAction, IActionProperty, IActionNode, IActionResult } from "../types/ActionTypes";
|
||||||
import "./button-add.css";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ボタン配置属性定義
|
* ボタン配置属性定義
|
||||||
*/
|
*/
|
||||||
@@ -53,7 +51,30 @@ export class ButtonAddAction implements IAction {
|
|||||||
if(!menuSpace) return result;
|
if(!menuSpace) return result;
|
||||||
if($("style#alc-button-add").length===0){
|
if($("style#alc-button-add").length===0){
|
||||||
const css=`
|
const css=`
|
||||||
`;
|
.alc-button-normal {
|
||||||
|
display: inline-block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
padding: 0 16px;
|
||||||
|
margin-left: 16px;
|
||||||
|
margin-top: 8px;
|
||||||
|
min-width: 100px;
|
||||||
|
outline: none;
|
||||||
|
border: 1px solid #e3e7e8;
|
||||||
|
background-color: #f7f9fa;
|
||||||
|
box-shadow: 1px 1px 1px #fff inset;
|
||||||
|
color: #3498db;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 32px;
|
||||||
|
}
|
||||||
|
.alc-button-normal:hover {
|
||||||
|
background-color: #c8d6dd;
|
||||||
|
box-shadow: none;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
.alc-button-normal:active {
|
||||||
|
color: #f7f9fa;
|
||||||
|
background-color: #54b8eb;
|
||||||
|
}`;
|
||||||
const style = $("<style id='alc-button-add'>/<style>");
|
const style = $("<style id='alc-button-add'>/<style>");
|
||||||
style.text(css);
|
style.text(css);
|
||||||
$("head").append(style);
|
$("head").append(style);
|
||||||
|
|||||||
77
plugin/kintone-addins/src/actions/counter-check.ts
Normal file
77
plugin/kintone-addins/src/actions/counter-check.ts
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
import { actionAddins } from ".";
|
||||||
|
import { IAction,IActionResult, IActionNode, IActionProperty, IField} from "../types/ActionTypes";
|
||||||
|
/**
|
||||||
|
* アクションの属性定義
|
||||||
|
*/
|
||||||
|
interface IStrCountCheckProps{
|
||||||
|
field:IField;//チェックするフィールドの対象
|
||||||
|
message:string;//エラーメッセージ
|
||||||
|
strExpression:string;//
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 正規表現チェックアクション
|
||||||
|
*/
|
||||||
|
export class StrCountCheckAciton implements IAction{
|
||||||
|
name: string;
|
||||||
|
actionProps: IActionProperty[];
|
||||||
|
props:IStrCountCheckProps;
|
||||||
|
constructor(){
|
||||||
|
this.name="文字数チェック";
|
||||||
|
this.actionProps=[];
|
||||||
|
this.props={
|
||||||
|
field:{code:''},
|
||||||
|
message:'',
|
||||||
|
strExpression:''
|
||||||
|
}
|
||||||
|
//アクションを登録する
|
||||||
|
this.register();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* アクションの実行を呼び出す
|
||||||
|
* @param actionNode
|
||||||
|
* @param event
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async process(actionNode:IActionNode,event:any):Promise<IActionResult> {
|
||||||
|
let result={
|
||||||
|
canNext:true,
|
||||||
|
result:false
|
||||||
|
};
|
||||||
|
try{
|
||||||
|
//属性設定を取得する
|
||||||
|
this.actionProps=actionNode.actionProps;
|
||||||
|
if (!('field' in actionNode.ActionValue) && !('message' in actionNode.ActionValue) && !('strExpression'in actionNode.ActionValue)) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(123);
|
||||||
|
|
||||||
|
this.props = actionNode.ActionValue as IStrCountCheckProps;
|
||||||
|
//条件式の計算結果を取得
|
||||||
|
const record = event.record;
|
||||||
|
const value = record[this.props.field.code].value;
|
||||||
|
let str = value.length
|
||||||
|
record.count.value = str
|
||||||
|
const regex = new RegExp(this.props.strExpression);
|
||||||
|
if(!regex.test(value)){
|
||||||
|
record[this.props.field.code].error > this.props.message.length ;
|
||||||
|
}else{
|
||||||
|
result= {
|
||||||
|
canNext:true,
|
||||||
|
result:true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}catch(error){
|
||||||
|
event.error=error;
|
||||||
|
console.error(error);
|
||||||
|
result.canNext=false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
register(): void {
|
||||||
|
actionAddins[this.name]=this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
new StrCountCheckAciton();
|
||||||
@@ -1,182 +0,0 @@
|
|||||||
import {
|
|
||||||
IAction,
|
|
||||||
IActionResult,
|
|
||||||
IActionNode,
|
|
||||||
IActionProperty,
|
|
||||||
IContext,
|
|
||||||
} from "../types/ActionTypes";
|
|
||||||
import { actionAddins } from ".";
|
|
||||||
|
|
||||||
export type IApp = {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
export type IField = {
|
|
||||||
name: string;
|
|
||||||
code: string;
|
|
||||||
type: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export type IAppFields = {
|
|
||||||
app?: IApp;
|
|
||||||
fields: IField[];
|
|
||||||
};
|
|
||||||
|
|
||||||
type ValueType = {
|
|
||||||
id: string;
|
|
||||||
from: {
|
|
||||||
objectType: "variable" | "field";
|
|
||||||
name: { name: string };
|
|
||||||
code: string;
|
|
||||||
};
|
|
||||||
to: IAppFields & {
|
|
||||||
isDialogVisible: boolean;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type Props = { app: IApp; field: ValueType[] };
|
|
||||||
|
|
||||||
export class DataMappingAction implements IAction {
|
|
||||||
name: string;
|
|
||||||
actionProps: IActionProperty[];
|
|
||||||
dataMappingProps: Props;
|
|
||||||
constructor() {
|
|
||||||
this.name = "DataMapping";
|
|
||||||
this.actionProps = [];
|
|
||||||
this.dataMappingProps = {} as Props;
|
|
||||||
this.register();
|
|
||||||
}
|
|
||||||
|
|
||||||
async process(
|
|
||||||
prop: IActionNode,
|
|
||||||
event: any,
|
|
||||||
context: IContext
|
|
||||||
): Promise<IActionResult> {
|
|
||||||
this.initActionProps(prop);
|
|
||||||
this.initTypedActionProps();
|
|
||||||
let result = {
|
|
||||||
canNext: true,
|
|
||||||
result: "",
|
|
||||||
} as IActionResult;
|
|
||||||
try {
|
|
||||||
for (const item of this.dataMappingProps.field) {
|
|
||||||
if (item.from.objectType === "variable") {
|
|
||||||
if (
|
|
||||||
item.from.name.name &&
|
|
||||||
item.to.app &&
|
|
||||||
item.to.fields &&
|
|
||||||
item.to.fields.length > 0
|
|
||||||
) {
|
|
||||||
const value = getValueByPath(
|
|
||||||
context.variables,
|
|
||||||
item.from.name.name
|
|
||||||
);
|
|
||||||
if (value) {
|
|
||||||
await kintone.api(
|
|
||||||
kintone.api.url("/k/v1/record.json", true),
|
|
||||||
"POST",
|
|
||||||
{
|
|
||||||
app: item.to.app.id,
|
|
||||||
record: {
|
|
||||||
[item.to.fields[0].code]: {
|
|
||||||
value: value,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if (item.from.objectType === "field") {
|
|
||||||
if (
|
|
||||||
item.from.code &&
|
|
||||||
item.to.app &&
|
|
||||||
item.to.fields &&
|
|
||||||
item.to.fields.length > 0
|
|
||||||
) {
|
|
||||||
const value = await selectData(
|
|
||||||
item.to.app.id,
|
|
||||||
item.to.fields[0].code
|
|
||||||
);
|
|
||||||
if (value && value.type === context.record[item.from.code].type) {
|
|
||||||
await kintone.api(
|
|
||||||
kintone.api.url("/k/v1/records.json", true),
|
|
||||||
"POST",
|
|
||||||
{
|
|
||||||
app: item.to.app.id,
|
|
||||||
records: value.value.map((v) => ({
|
|
||||||
[item.to.fields[0].code]: {
|
|
||||||
value: v,
|
|
||||||
},
|
|
||||||
})),
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} catch (error) {
|
|
||||||
console.error("DataMappingAction error", error);
|
|
||||||
result.canNext = false;
|
|
||||||
}
|
|
||||||
console.log("dataMappingProps", this.dataMappingProps);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
private initActionProps(nodes: IActionNode) {
|
|
||||||
this.actionProps = nodes.actionProps;
|
|
||||||
}
|
|
||||||
private initTypedActionProps() {
|
|
||||||
for (const action of this.actionProps) {
|
|
||||||
if (action.component === "DataMapping") {
|
|
||||||
this.dataMappingProps.field = action.props.modelValue as ValueType[];
|
|
||||||
} else if (action.component === "AppSelect") {
|
|
||||||
this.dataMappingProps.app = action.props.modelValue.app as IApp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
register(): void {
|
|
||||||
actionAddins[this.name] = this;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
new DataMappingAction();
|
|
||||||
|
|
||||||
const getValueByPath = (obj: any, path: string) => {
|
|
||||||
return path.split(".").reduce((o, k) => (o || {})[k], obj);
|
|
||||||
};
|
|
||||||
|
|
||||||
type Resp = { records: RespRecordType[] };
|
|
||||||
|
|
||||||
type RespRecordType = {
|
|
||||||
[key: string]: {
|
|
||||||
type: string;
|
|
||||||
value: any;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type Result = {
|
|
||||||
type: string;
|
|
||||||
value: any[];
|
|
||||||
};
|
|
||||||
|
|
||||||
const selectData = async (appid: string, field: string): Promise<Result> => {
|
|
||||||
return kintone
|
|
||||||
.api(kintone.api.url("/k/v1/records", true), "GET", {
|
|
||||||
app: appid ?? kintone.app.getId(),
|
|
||||||
fields: [field],
|
|
||||||
})
|
|
||||||
.then((resp: Resp) => {
|
|
||||||
const result: Result = { type: "", value: [] };
|
|
||||||
resp.records.forEach((element) => {
|
|
||||||
for (const [key, value] of Object.entries(element)) {
|
|
||||||
if (result.type === "") {
|
|
||||||
result.type = value.type;
|
|
||||||
}
|
|
||||||
result.value.push(value.value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
@@ -1,280 +0,0 @@
|
|||||||
import {
|
|
||||||
IAction,
|
|
||||||
IActionResult,
|
|
||||||
IActionNode,
|
|
||||||
IActionProperty,
|
|
||||||
IContext,
|
|
||||||
} from "../types/ActionTypes";
|
|
||||||
import { actionAddins } from ".";
|
|
||||||
|
|
||||||
|
|
||||||
type DataProcessingProps = {
|
|
||||||
app: {
|
|
||||||
id: string;
|
|
||||||
name: string;
|
|
||||||
};
|
|
||||||
conditionsQuery: string;
|
|
||||||
propcessing: {
|
|
||||||
varRootName: string;
|
|
||||||
fields: Field[];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type Field = {
|
|
||||||
name: string;
|
|
||||||
code: string;
|
|
||||||
type: string;
|
|
||||||
varName: string;
|
|
||||||
operator: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
export class DataProcessingAction implements IAction {
|
|
||||||
name: string;
|
|
||||||
actionProps: IActionProperty[];
|
|
||||||
dataProcessingProps: DataProcessingProps | null;
|
|
||||||
constructor() {
|
|
||||||
this.name = "データ処理";
|
|
||||||
this.actionProps = [];
|
|
||||||
this.dataProcessingProps = null;
|
|
||||||
this.register();
|
|
||||||
}
|
|
||||||
|
|
||||||
async process(
|
|
||||||
nodes: IActionNode,event: any,context: IContext
|
|
||||||
): Promise<IActionResult> {
|
|
||||||
this.initActionProps(nodes);
|
|
||||||
this.initTypedActionProps();
|
|
||||||
let result = {
|
|
||||||
canNext: true,
|
|
||||||
result: "",
|
|
||||||
} as IActionResult;
|
|
||||||
try {
|
|
||||||
if (!this.dataProcessingProps) {
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
const data = await selectData(this.dataProcessingProps.conditionsQuery);
|
|
||||||
console.log("data ", data);
|
|
||||||
|
|
||||||
context.variables[this.dataProcessingProps.propcessing.varRootName] =
|
|
||||||
this.dataProcessingProps.propcessing.fields.reduce((acc, f) => {
|
|
||||||
const v = calc(f, data);
|
|
||||||
if (v) {
|
|
||||||
acc[f.varName] = calc(f, data);
|
|
||||||
}
|
|
||||||
return acc;
|
|
||||||
}, {} as Var);
|
|
||||||
|
|
||||||
console.log("context ", context);
|
|
||||||
return result;
|
|
||||||
} catch (error) {
|
|
||||||
console.error(error);
|
|
||||||
event.error=error;
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
register(): void {
|
|
||||||
actionAddins[this.name] = this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private initActionProps(nodes: IActionNode) {
|
|
||||||
this.actionProps = nodes.actionProps;
|
|
||||||
}
|
|
||||||
|
|
||||||
private initTypedActionProps() {
|
|
||||||
this.dataProcessingProps = {
|
|
||||||
app: {
|
|
||||||
id: "",
|
|
||||||
name: "",
|
|
||||||
},
|
|
||||||
conditionsQuery: "",
|
|
||||||
propcessing: {
|
|
||||||
varRootName: "",
|
|
||||||
fields: [],
|
|
||||||
},
|
|
||||||
};
|
|
||||||
for (const action of this.actionProps) {
|
|
||||||
if (action.component === "AppFieldSelect") {
|
|
||||||
this.dataProcessingProps.app.id = action.props.modelValue.app.id;
|
|
||||||
this.dataProcessingProps.app.name = action.props.modelValue.app.name;
|
|
||||||
} else if (action.component === "DataProcessing") {
|
|
||||||
this.dataProcessingProps.propcessing.varRootName =
|
|
||||||
action.props.modelValue.name;
|
|
||||||
for (const f of action.props.modelValue.vars) {
|
|
||||||
this.dataProcessingProps.propcessing.fields.push({
|
|
||||||
name: f.field.name,
|
|
||||||
code: f.field.code,
|
|
||||||
type: f.field.type,
|
|
||||||
varName: f.vName,
|
|
||||||
operator: f.logicalOperator.operator,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
} else if (action.component === "ConditionInput") {
|
|
||||||
this.dataProcessingProps.conditionsQuery = JSON.parse(
|
|
||||||
action.props.modelValue
|
|
||||||
).queryString;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
new DataProcessingAction();
|
|
||||||
|
|
||||||
const selectData = async (query?: string) => {
|
|
||||||
return kintone
|
|
||||||
.api(kintone.api.url("/k/v1/records", true), "GET", {
|
|
||||||
app: kintone.app.getId(),
|
|
||||||
query: query,
|
|
||||||
})
|
|
||||||
.then((resp: Resp) => {
|
|
||||||
const result: Result = {};
|
|
||||||
resp.records.forEach((element) => {
|
|
||||||
for (const [key, value] of Object.entries(element)) {
|
|
||||||
if (!result[key]) {
|
|
||||||
result[key] = { type: value.type, value: [] };
|
|
||||||
}
|
|
||||||
result[key].value.push(value.value);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
return result;
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|
||||||
type Resp = { records: RespRecordType[] };
|
|
||||||
|
|
||||||
type RespRecordType = {
|
|
||||||
[key: string]: {
|
|
||||||
type: string;
|
|
||||||
value: any;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type Result = {
|
|
||||||
[key: string]: {
|
|
||||||
type: string;
|
|
||||||
value: any[];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type Var = {
|
|
||||||
[key: string]: any;
|
|
||||||
};
|
|
||||||
|
|
||||||
const ERROR_TYPE = "ERROR_TYPE";
|
|
||||||
|
|
||||||
const calc = (field: Field, result: Result) => {
|
|
||||||
const type = typeCheck(field.type);
|
|
||||||
if (!type) {
|
|
||||||
return ERROR_TYPE;
|
|
||||||
}
|
|
||||||
|
|
||||||
const fun =
|
|
||||||
calcFunc[`${type}_${Operator[field.operator as keyof typeof Operator]}`];
|
|
||||||
if (!fun) {
|
|
||||||
return ERROR_TYPE;
|
|
||||||
}
|
|
||||||
const values = result[field.code].value;
|
|
||||||
if (!values) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
return fun(values);
|
|
||||||
};
|
|
||||||
|
|
||||||
const typeCheck = (type: string) => {
|
|
||||||
switch (type) {
|
|
||||||
case "RECORD_NUMBER":
|
|
||||||
case "NUMBER":
|
|
||||||
return CalcType.NUMBER;
|
|
||||||
case "SINGLE_LINE_TEXT":
|
|
||||||
case "MULTI_LINE_TEXT":
|
|
||||||
case "RICH_TEXT":
|
|
||||||
return CalcType.STRING;
|
|
||||||
case "DATE":
|
|
||||||
return CalcType.DATE;
|
|
||||||
case "TIME":
|
|
||||||
return CalcType.TIME;
|
|
||||||
case "DATETIME":
|
|
||||||
case "UPDATED_TIME":
|
|
||||||
return CalcType.DATETIME;
|
|
||||||
default:
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
enum Operator {
|
|
||||||
SUM = "SUM",
|
|
||||||
AVG = "AVG",
|
|
||||||
MAX = "MAX",
|
|
||||||
MIN = "MIN",
|
|
||||||
COUNT = "COUNT",
|
|
||||||
FIRST = "FIRST"
|
|
||||||
}
|
|
||||||
|
|
||||||
enum CalcType {
|
|
||||||
NUMBER = "number",
|
|
||||||
STRING = "string",
|
|
||||||
DATE = "date",
|
|
||||||
TIME = "time",
|
|
||||||
DATETIME = "datetime",
|
|
||||||
}
|
|
||||||
|
|
||||||
const calcFunc: Record<string, (value: string[]) => string | null> = {
|
|
||||||
[`${CalcType.NUMBER}_${Operator.COUNT}`]: (value: string[]) =>
|
|
||||||
value.length.toString(),
|
|
||||||
[`${CalcType.STRING}_${Operator.COUNT}`]: (value: string[]) =>
|
|
||||||
value.length.toString(),
|
|
||||||
[`${CalcType.DATE}_${Operator.COUNT}`]: (value: string[]) =>
|
|
||||||
value.length.toString(),
|
|
||||||
[`${CalcType.TIME}_${Operator.COUNT}`]: (value: string[]) =>
|
|
||||||
value.length.toString(),
|
|
||||||
[`${CalcType.DATETIME}_${Operator.COUNT}`]: (value: string[]) =>
|
|
||||||
value.length.toString(),
|
|
||||||
|
|
||||||
[`${CalcType.NUMBER}_${Operator.SUM}`]: (value: string[]) =>
|
|
||||||
value.reduce((acc, v) => acc + Number(v), 0).toString(),
|
|
||||||
[`${CalcType.NUMBER}_${Operator.AVG}`]: (value: string[]) =>
|
|
||||||
(value.reduce((acc, v) => acc + Number(v), 0) / value.length).toString(),
|
|
||||||
[`${CalcType.NUMBER}_${Operator.MAX}`]: (value: string[]) =>
|
|
||||||
Math.max(...value.map(Number)).toString(),
|
|
||||||
[`${CalcType.NUMBER}_${Operator.MIN}`]: (value: string[]) =>
|
|
||||||
Math.min(...value.map(Number)).toString(),
|
|
||||||
|
|
||||||
[`${CalcType.STRING}_${Operator.SUM}`]: (value: string[]) => value.join(" "),
|
|
||||||
|
|
||||||
[`${CalcType.DATE}_${Operator.MAX}`]: (value: string[]) =>
|
|
||||||
value.reduce((maxDate, currentDate) =>
|
|
||||||
maxDate > currentDate ? maxDate : currentDate
|
|
||||||
),
|
|
||||||
|
|
||||||
[`${CalcType.DATE}_${Operator.MIN}`]: (value: string[]) =>
|
|
||||||
value.reduce((minDate, currentDate) =>
|
|
||||||
minDate < currentDate ? minDate : currentDate
|
|
||||||
),
|
|
||||||
|
|
||||||
[`${CalcType.TIME}_${Operator.MAX}`]: (value: string[]) =>
|
|
||||||
value.reduce((maxTime, currentTime) =>
|
|
||||||
maxTime > currentTime ? maxTime : currentTime
|
|
||||||
),
|
|
||||||
[`${CalcType.TIME}_${Operator.MIN}`]: (value: string[]) =>
|
|
||||||
value.reduce((minTime, currentTime) =>
|
|
||||||
minTime < currentTime ? minTime : currentTime
|
|
||||||
),
|
|
||||||
|
|
||||||
[`${CalcType.DATETIME}_${Operator.MAX}`]: (value: string[]) =>
|
|
||||||
value.reduce((maxDateTime, currentDateTime) =>
|
|
||||||
new Date(maxDateTime) > new Date(currentDateTime)
|
|
||||||
? maxDateTime
|
|
||||||
: currentDateTime
|
|
||||||
),
|
|
||||||
|
|
||||||
[`${CalcType.DATETIME}_${Operator.MIN}`]: (value: string[]) =>
|
|
||||||
value.reduce((minDateTime, currentDateTime) =>
|
|
||||||
new Date(minDateTime) < new Date(currentDateTime)
|
|
||||||
? minDateTime
|
|
||||||
: currentDateTime
|
|
||||||
),
|
|
||||||
[`${CalcType.STRING}_${Operator.FIRST}`]:(value: string[])=>{
|
|
||||||
return value[0];
|
|
||||||
}
|
|
||||||
};
|
|
||||||
89
plugin/kintone-addins/src/actions/mail-check.ts
Normal file
89
plugin/kintone-addins/src/actions/mail-check.ts
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
import { actionAddins } from ".";
|
||||||
|
import { IAction, IActionResult, IActionNode, IActionProperty, IField } from "../types/ActionTypes";
|
||||||
|
/**
|
||||||
|
* アクションの属性定義
|
||||||
|
*/
|
||||||
|
interface IMailCheckProps {
|
||||||
|
field: IField;//チェックするフィールドの対象
|
||||||
|
message: string;//エラーメッセージ
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* メールアドレスチェックアクション
|
||||||
|
*/
|
||||||
|
export class MailCheckAction implements IAction {
|
||||||
|
name: string;
|
||||||
|
actionProps: IActionProperty[];
|
||||||
|
props: IMailCheckProps;
|
||||||
|
constructor() {
|
||||||
|
this.name = "メールアドレスチェック";
|
||||||
|
this.actionProps = [];
|
||||||
|
this.props = {
|
||||||
|
field: { code: '' },
|
||||||
|
message: '',
|
||||||
|
|
||||||
|
}
|
||||||
|
//アクションを登録する
|
||||||
|
this.register();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* アクションの実行を呼び出す
|
||||||
|
* @param actionNode
|
||||||
|
* @param event
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async process(actionNode: IActionNode, event: any): Promise<IActionResult> {
|
||||||
|
let result = {
|
||||||
|
canNext: true,
|
||||||
|
result: false
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
try {
|
||||||
|
//属性設定を取得する
|
||||||
|
this.actionProps = actionNode.actionProps;
|
||||||
|
|
||||||
|
const emailAction = this.actionProps.find(obj => obj.props.name === 'emailcheck')
|
||||||
|
|
||||||
|
if (!('field' in actionNode.ActionValue) && !('message' in actionNode.ActionValue) && !!!emailAction) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
console.log(actionNode);
|
||||||
|
|
||||||
|
this.props = actionNode.ActionValue as IMailCheckProps;
|
||||||
|
//条件式の計算結果を取得
|
||||||
|
const record = event.record;
|
||||||
|
const value = record[this.props.field.code].value;
|
||||||
|
|
||||||
|
if (emailAction?.props.modelValue === '厳格') {
|
||||||
|
if (!/^(([^<>()[\]\\.,;:\s@"]+(\.[^<>()[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(value)) {
|
||||||
|
console.log('厳格');
|
||||||
|
record[this.props.field.code].error = this.props.message;
|
||||||
|
}
|
||||||
|
} else if (emailAction?.props.modelValue === 'ゆるめ') {
|
||||||
|
if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(value)) {
|
||||||
|
console.log('ゆるめ');
|
||||||
|
|
||||||
|
record[this.props.field.code].error = this.props.message;
|
||||||
|
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
result = {
|
||||||
|
canNext: true,
|
||||||
|
result: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
console.log(record[this.props.field.code]);
|
||||||
|
return result;
|
||||||
|
} catch (error) {
|
||||||
|
event.error = error;
|
||||||
|
console.error(error);
|
||||||
|
result.canNext = false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
register(): void {
|
||||||
|
actionAddins[this.name] = this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
new MailCheckAction();
|
||||||
72
plugin/kintone-addins/src/actions/regular-check.ts
Normal file
72
plugin/kintone-addins/src/actions/regular-check.ts
Normal file
@@ -0,0 +1,72 @@
|
|||||||
|
import { actionAddins } from ".";
|
||||||
|
import { IAction,IActionResult, IActionNode, IActionProperty, IField} from "../types/ActionTypes";
|
||||||
|
/**
|
||||||
|
* アクションの属性定義
|
||||||
|
*/
|
||||||
|
interface IRegularCheckProps{
|
||||||
|
field:IField;//チェックするフィールドの対象
|
||||||
|
message:string;//エラーメッセージ
|
||||||
|
regExpression:string;//正規表現式
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* 正規表現チェックアクション
|
||||||
|
*/
|
||||||
|
export class RegularCheckAction implements IAction{
|
||||||
|
name: string;
|
||||||
|
actionProps: IActionProperty[];
|
||||||
|
props:IRegularCheckProps;
|
||||||
|
constructor(){
|
||||||
|
this.name="正規表現チェック";
|
||||||
|
this.actionProps=[];
|
||||||
|
this.props={
|
||||||
|
field:{code:''},
|
||||||
|
message:'',
|
||||||
|
regExpression:''
|
||||||
|
}
|
||||||
|
//アクションを登録する
|
||||||
|
this.register();
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* アクションの実行を呼び出す
|
||||||
|
* @param actionNode
|
||||||
|
* @param event
|
||||||
|
* @returns
|
||||||
|
*/
|
||||||
|
async process(actionNode:IActionNode,event:any):Promise<IActionResult> {
|
||||||
|
let result={
|
||||||
|
canNext:true,
|
||||||
|
result:false
|
||||||
|
};
|
||||||
|
try{
|
||||||
|
//属性設定を取得する
|
||||||
|
this.actionProps=actionNode.actionProps;
|
||||||
|
if (!('field' in actionNode.ActionValue) && !('message' in actionNode.ActionValue) && !('regExpression'in actionNode.ActionValue)) {
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
this.props = actionNode.ActionValue as IRegularCheckProps;
|
||||||
|
//条件式の計算結果を取得
|
||||||
|
const record = event.record;
|
||||||
|
const value = record[this.props.field.code].value;
|
||||||
|
const regex = new RegExp(this.props.regExpression);
|
||||||
|
if(!regex.test(value)){
|
||||||
|
record[this.props.field.code].error=this.props.message;
|
||||||
|
}else{
|
||||||
|
result= {
|
||||||
|
canNext:true,
|
||||||
|
result:true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}catch(error){
|
||||||
|
event.error=error;
|
||||||
|
console.error(error);
|
||||||
|
result.canNext=false;
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
register(): void {
|
||||||
|
actionAddins[this.name]=this;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
new RegularCheckAction();
|
||||||
@@ -6,8 +6,9 @@ import '../actions/field-shown';
|
|||||||
import '../actions/error-show';
|
import '../actions/error-show';
|
||||||
import '../actions/button-add';
|
import '../actions/button-add';
|
||||||
import '../actions/condition-action';
|
import '../actions/condition-action';
|
||||||
import '../actions/data-processing';
|
import '../actions/regular-check';
|
||||||
import '../actions/data-mapping';
|
import '../actions/mail-check';
|
||||||
|
import '../actions/counter-check';
|
||||||
import { ActionFlow,IActionFlow, IActionResult,IContext } from "./ActionTypes";
|
import { ActionFlow,IActionFlow, IActionResult,IContext } from "./ActionTypes";
|
||||||
|
|
||||||
export class ActionProcess{
|
export class ActionProcess{
|
||||||
|
|||||||
@@ -1,32 +1,16 @@
|
|||||||
// vite.config.js
|
// vite.config.js
|
||||||
import { defineConfig, loadEnv } from "vite";
|
import { defineConfig } from 'vite'
|
||||||
import checker from "vite-plugin-checker";
|
const sourcemap = process.env.SOURCE_MAP==='true';
|
||||||
import { libInjectCss } from 'vite-plugin-lib-inject-css';
|
|
||||||
|
|
||||||
export default ({ mode }) => {
|
export default defineConfig({
|
||||||
process.env = { ...process.env, ...loadEnv(mode, process.cwd()) };
|
build: {
|
||||||
|
rollupOptions: {
|
||||||
return defineConfig({
|
input: 'src/index.ts', // entry file
|
||||||
plugins: [
|
output:{
|
||||||
checker({
|
entryFileNames:'alc_runtime.js',
|
||||||
typescript: true,
|
// assetFileNames:'alc_kintone_style.css'
|
||||||
}),
|
}
|
||||||
libInjectCss(),
|
|
||||||
],
|
|
||||||
build: {
|
|
||||||
cssCodeSplit: false,
|
|
||||||
rollupOptions: {
|
|
||||||
input: "src/index.ts", // entry file
|
|
||||||
output: {
|
|
||||||
entryFileNames: "alc_runtime.js",
|
|
||||||
// assetFileNames:'alc_kintone_style.css'
|
|
||||||
},
|
|
||||||
},
|
|
||||||
sourcemap: process.env.VITE_SOURCE_MAP,
|
|
||||||
},
|
},
|
||||||
server: {
|
sourcemap:sourcemap
|
||||||
port: process.env.VITE_PORT,
|
}
|
||||||
// open: "/dist/alc_runtime.js",
|
})
|
||||||
},
|
|
||||||
});
|
|
||||||
};
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user