@rex0220/formula-authoring-tools 0.2.1 → 0.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -2
- package/dist/cli.mjs +3906 -55
- package/dist/core.mjs +3862 -71
- package/dist/eval-worker.mjs +3767 -32
- package/dist/types/commands/calc.d.ts +2 -0
- package/dist/types/commands/try-data.d.ts +54 -0
- package/dist/types/commands/try.d.ts +121 -0
- package/dist/types/core.d.ts +4 -0
- package/dist/types/sample-app.d.ts +19 -0
- package/dist/types/worker/eval-job.d.ts +26 -4
- package/package.json +1 -1
package/dist/core.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @rex0220/formula-authoring-tools/core 0.
|
|
1
|
+
/*! @rex0220/formula-authoring-tools/core 0.3.1 (c) rex0220. MIT License. 計算式エンジンと計算式プラグインのコードは利用者の計算式プラグインプラグインの zip から読む(このファイルには含まれない)。commit 3788114. */
|
|
2
2
|
|
|
3
3
|
// src/safe-path.ts
|
|
4
4
|
import { lstatSync, realpathSync } from "node:fs";
|
|
@@ -190,7 +190,7 @@ function devMeta() {
|
|
|
190
190
|
return { toolsVersion: pkg.version, pluginId: FORMULA_PLUGIN_ID, minPluginVersion: MIN_PLUGIN_VERSION, supportedApiVersions: [...SUPPORTED_API_VERSIONS], commit: gitCommit(AUTHORING_ROOT), builtAt: "", mode: "dev" };
|
|
191
191
|
}
|
|
192
192
|
function toolsMeta() {
|
|
193
|
-
if (true) return JSON.parse('{"toolsVersion":"0.
|
|
193
|
+
if (true) return JSON.parse('{"toolsVersion":"0.3.1","pluginId":"dhgihghfgfmibkdldkeibboabfnmdpke","minPluginVersion":101,"supportedApiVersions":[1],"commit":"3788114","builtAt":"2026-10-18T08:08:27.541Z","mode":"build"}');
|
|
194
194
|
return devMeta();
|
|
195
195
|
}
|
|
196
196
|
|
|
@@ -766,12 +766,12 @@ var KINTONE_HOST_SUFFIXES = [".cybozu.com", ".kintone.com", ".cybozu.cn"];
|
|
|
766
766
|
var KintoneUrlError = class extends Error {
|
|
767
767
|
};
|
|
768
768
|
function normalizeKintoneBaseUrl(raw) {
|
|
769
|
-
const
|
|
769
|
+
const text2 = String(raw ?? "").trim();
|
|
770
770
|
let u2;
|
|
771
771
|
try {
|
|
772
|
-
u2 = new URL(
|
|
772
|
+
u2 = new URL(text2);
|
|
773
773
|
} catch {
|
|
774
|
-
throw new KintoneUrlError(`kintone の URL として読めない: ${
|
|
774
|
+
throw new KintoneUrlError(`kintone の URL として読めない: ${text2.slice(0, 80)}`);
|
|
775
775
|
}
|
|
776
776
|
if (u2.protocol !== "https:") throw new KintoneUrlError("kintone の URL は https で始める");
|
|
777
777
|
if (u2.username || u2.password) throw new KintoneUrlError("kintone の URL にユーザー名やパスワード(@)を入れない");
|
|
@@ -810,9 +810,9 @@ function unquote(raw) {
|
|
|
810
810
|
if (value.length >= 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) return value.slice(1, -1);
|
|
811
811
|
return value;
|
|
812
812
|
}
|
|
813
|
-
function parseDotEnv(
|
|
813
|
+
function parseDotEnv(text2) {
|
|
814
814
|
const out = {};
|
|
815
|
-
for (const raw of
|
|
815
|
+
for (const raw of text2.split(/\r?\n/)) {
|
|
816
816
|
const line = raw.trim();
|
|
817
817
|
if (!line || line.startsWith("#")) continue;
|
|
818
818
|
const m = line.match(/^(?:export\s+)?([A-Za-z_][A-Za-z0-9_]*)\s*=\s*(.*)$/);
|
|
@@ -938,11 +938,11 @@ function jsonDiff(a, b, pathStr, out) {
|
|
|
938
938
|
a.forEach((x, i) => jsonDiff(x, b[i], `${pathStr}[${i}]`, out));
|
|
939
939
|
return;
|
|
940
940
|
}
|
|
941
|
-
const
|
|
941
|
+
const short3 = (v) => {
|
|
942
942
|
const s = JSON.stringify(v);
|
|
943
943
|
return s === void 0 ? "undefined" : s.length > 100 ? s.slice(0, 100) + "…" : s;
|
|
944
944
|
};
|
|
945
|
-
out.push(`${pathStr}: ${
|
|
945
|
+
out.push(`${pathStr}: ${short3(a)} → ${short3(b)}`);
|
|
946
946
|
}
|
|
947
947
|
function readTextLimited(file, maxBytes = MAX_INPUT_BYTES) {
|
|
948
948
|
const size = statSync3(file).size;
|
|
@@ -1086,11 +1086,11 @@ function createRestClient(auth, fetchImpl = fetch) {
|
|
|
1086
1086
|
setQuery(url, params);
|
|
1087
1087
|
if (url.origin !== baseUrl || url.username || url.password) throw new NotAllowedError(`送信先が kintone の接続先と違うので送らない: ${url.origin}`);
|
|
1088
1088
|
const res = await fetchImpl(url.href, { method: "GET", headers });
|
|
1089
|
-
const
|
|
1089
|
+
const text2 = await readCapped(res, RECEIVE_LIMITS[api], apiPath);
|
|
1090
1090
|
if (!res.ok) {
|
|
1091
1091
|
let code;
|
|
1092
1092
|
try {
|
|
1093
|
-
const body = JSON.parse(
|
|
1093
|
+
const body = JSON.parse(text2);
|
|
1094
1094
|
code = typeof body.code === "string" ? body.code.slice(0, 40) : void 0;
|
|
1095
1095
|
} catch {
|
|
1096
1096
|
}
|
|
@@ -1098,9 +1098,9 @@ function createRestClient(auth, fetchImpl = fetch) {
|
|
|
1098
1098
|
throw new RestError(`kintone ${apiPath} が HTTP ${res.status}${code ? ` ${code}` : ""}${hint}`, res.status, code, apiPath);
|
|
1099
1099
|
}
|
|
1100
1100
|
try {
|
|
1101
|
-
return JSON.parse(
|
|
1101
|
+
return JSON.parse(text2);
|
|
1102
1102
|
} catch {
|
|
1103
|
-
throw new RestError(`kintone ${apiPath} の応答が JSON でない${
|
|
1103
|
+
throw new RestError(`kintone ${apiPath} の応答が JSON でない${text2 ? "" : "(本文が空)"}`, res.status, "ResponseError", apiPath);
|
|
1104
1104
|
}
|
|
1105
1105
|
},
|
|
1106
1106
|
async getUser(api, params) {
|
|
@@ -1111,18 +1111,18 @@ function createRestClient(auth, fetchImpl = fetch) {
|
|
|
1111
1111
|
setQuery(url, params);
|
|
1112
1112
|
if (url.origin !== baseUrl || url.username || url.password) throw new NotAllowedError(`送信先が kintone の接続先と違うので送らない: ${url.origin}`);
|
|
1113
1113
|
const res = await fetchImpl(url.href, { method: "GET", headers });
|
|
1114
|
-
const
|
|
1114
|
+
const text2 = await readCapped(res, USER_API_RECEIVE_LIMIT, apiPath);
|
|
1115
1115
|
if (!res.ok) {
|
|
1116
1116
|
let code;
|
|
1117
1117
|
try {
|
|
1118
|
-
code = typeof JSON.parse(
|
|
1118
|
+
code = typeof JSON.parse(text2).code === "string" ? JSON.parse(text2).code.slice(0, 40) : void 0;
|
|
1119
1119
|
} catch {
|
|
1120
1120
|
}
|
|
1121
1121
|
const hint = res.status === 401 ? "(認証情報を確かめる。cybozu.com 共通の API トークンかログインユーザー。アプリの API トークンでは呼べない)" : res.status === 403 ? "(アクセス権が無い)" : res.status === 400 ? "(パラメーターの誤り。--only-referenced なら、式が参照しているコードが存在しないかもしれない)" : "";
|
|
1122
1122
|
throw new RestError(`cybozu.com ${apiPath} が HTTP ${res.status}${code ? ` ${code}` : ""}${hint}`, res.status, code, apiPath);
|
|
1123
1123
|
}
|
|
1124
1124
|
try {
|
|
1125
|
-
return JSON.parse(
|
|
1125
|
+
return JSON.parse(text2);
|
|
1126
1126
|
} catch {
|
|
1127
1127
|
throw new RestError(`cybozu.com ${apiPath} の応答が JSON でない`, res.status, "ResponseError", apiPath);
|
|
1128
1128
|
}
|
|
@@ -1133,7 +1133,7 @@ function createRestClient(auth, fetchImpl = fetch) {
|
|
|
1133
1133
|
// src/scan.ts
|
|
1134
1134
|
var IDENT = /[A-Za-z0-9_$\u0080-]/;
|
|
1135
1135
|
var KEYWORDS = /* @__PURE__ */ new Set(["true", "false", "TRUE", "FALSE", "null"]);
|
|
1136
|
-
function scanFormula(
|
|
1136
|
+
function scanFormula(text2) {
|
|
1137
1137
|
const functions = {};
|
|
1138
1138
|
const identifiers = /* @__PURE__ */ new Set();
|
|
1139
1139
|
const strings = [];
|
|
@@ -1142,24 +1142,24 @@ function scanFormula(text) {
|
|
|
1142
1142
|
const calls = [];
|
|
1143
1143
|
let depth = 0;
|
|
1144
1144
|
let i = 0;
|
|
1145
|
-
const n =
|
|
1145
|
+
const n = text2.length;
|
|
1146
1146
|
while (i < n) {
|
|
1147
|
-
const ch =
|
|
1147
|
+
const ch = text2[i];
|
|
1148
1148
|
if (ch === '"') {
|
|
1149
1149
|
let j = i + 1;
|
|
1150
1150
|
let s = "";
|
|
1151
1151
|
let closed = false;
|
|
1152
1152
|
while (j < n) {
|
|
1153
|
-
if (
|
|
1153
|
+
if (text2[j] === "\\" && text2[j + 1] === '"') {
|
|
1154
1154
|
s += '\\"';
|
|
1155
1155
|
j += 2;
|
|
1156
1156
|
continue;
|
|
1157
1157
|
}
|
|
1158
|
-
if (
|
|
1158
|
+
if (text2[j] === '"') {
|
|
1159
1159
|
closed = true;
|
|
1160
1160
|
break;
|
|
1161
1161
|
}
|
|
1162
|
-
s +=
|
|
1162
|
+
s += text2[j];
|
|
1163
1163
|
j++;
|
|
1164
1164
|
}
|
|
1165
1165
|
if (!closed) problems.push(`閉じていない文字列(${i} 文字目から)`);
|
|
@@ -1186,11 +1186,11 @@ function scanFormula(text) {
|
|
|
1186
1186
|
}
|
|
1187
1187
|
if (IDENT.test(ch)) {
|
|
1188
1188
|
let j = i;
|
|
1189
|
-
while (j < n && IDENT.test(
|
|
1190
|
-
const word =
|
|
1189
|
+
while (j < n && IDENT.test(text2[j])) j++;
|
|
1190
|
+
const word = text2.slice(i, j);
|
|
1191
1191
|
let k = j;
|
|
1192
|
-
while (k < n && (
|
|
1193
|
-
if (
|
|
1192
|
+
while (k < n && (text2[k] === " " || text2[k] === " ")) k++;
|
|
1193
|
+
if (text2[k] === "(") {
|
|
1194
1194
|
functions[word] = (functions[word] ?? 0) + 1;
|
|
1195
1195
|
depth++;
|
|
1196
1196
|
calls.push(word);
|
|
@@ -1207,11 +1207,11 @@ function scanFormula(text) {
|
|
|
1207
1207
|
if (depth > 0) problems.push(`閉じていない ( が ${depth} 個`);
|
|
1208
1208
|
return { functions, identifiers, strings, stringArgs, problems };
|
|
1209
1209
|
}
|
|
1210
|
-
function staticArgsOf(
|
|
1210
|
+
function staticArgsOf(text2, fn) {
|
|
1211
1211
|
const out = [];
|
|
1212
1212
|
const re = new RegExp(`(?<![A-Za-z0-9_$\\u0080-\\uFFFF])${fn}\\s*\\(\\s*([A-Za-z0-9_$\\u0080-\\uFFFF]+)\\s*[,)]`, "g");
|
|
1213
1213
|
let m;
|
|
1214
|
-
while (m = re.exec(
|
|
1214
|
+
while (m = re.exec(text2)) out.push(m[1]);
|
|
1215
1215
|
return out;
|
|
1216
1216
|
}
|
|
1217
1217
|
function scanFormulas(formulas) {
|
|
@@ -1717,9 +1717,9 @@ async function pullUsers(client, opt = {}) {
|
|
|
1717
1717
|
}
|
|
1718
1718
|
var USER_INFO_FUNCTIONS = { UINFO: "users", OINFO: "orgs", OUSERS: "orgs", GINFO: "groups", GUSERS: "groups" };
|
|
1719
1719
|
var CALL_RE = /(?<![A-Za-z0-9_$\u0080-\uFFFF])(UINFO|OINFO|GINFO|OUSERS|GUSERS)\s*\(\s*("(?:\\"|[^"])*"|[^,()]*)/g;
|
|
1720
|
-
function scanUserInfoCalls(
|
|
1720
|
+
function scanUserInfoCalls(text2) {
|
|
1721
1721
|
const out = { users: [], orgs: [], groups: [], dynamic: [] };
|
|
1722
|
-
for (const m of
|
|
1722
|
+
for (const m of text2.matchAll(CALL_RE)) {
|
|
1723
1723
|
const fn = m[1];
|
|
1724
1724
|
const arg = m[2].trim();
|
|
1725
1725
|
const kind = USER_INFO_FUNCTIONS[fn];
|
|
@@ -1906,10 +1906,10 @@ var POLICY_FILE = path7.join("policy", "authoring-policy.json");
|
|
|
1906
1906
|
var MAX_POLICY_BYTES = 64 * 1024;
|
|
1907
1907
|
var FUNCTION_NAME = /^[A-Z][A-Z0-9_]{0,40}$/;
|
|
1908
1908
|
var DEFAULT_POLICY = { allowFunctions: [], allowMiscChanges: false };
|
|
1909
|
-
function parsePolicy(
|
|
1909
|
+
function parsePolicy(text2, file) {
|
|
1910
1910
|
let raw;
|
|
1911
1911
|
try {
|
|
1912
|
-
raw = JSON.parse(
|
|
1912
|
+
raw = JSON.parse(text2.replace(/^/, ""));
|
|
1913
1913
|
} catch (e) {
|
|
1914
1914
|
throw new PolicyError(`${file} を JSON として読めない: ${e instanceof Error ? e.message : String(e)}`);
|
|
1915
1915
|
}
|
|
@@ -1943,9 +1943,9 @@ var isPlain = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
|
1943
1943
|
var UINFO_OPTIONS = /* @__PURE__ */ new Set(["id", "code", "ctime", "mtime", "valid", "name", "surName", "givenName", "surNameReading", "givenNameReading", "localName", "localNameLocale", "timezone", "locale", "description", "phone", "mobilePhone", "extensionNumber", "email", "callto", "url", "employeeNumber", "birthDate", "joinDate", "groups", "orgs", "primaryOrganization", "sortOrder", "setData", "parentCode", "users", "children"]);
|
|
1944
1944
|
function codesInStrings(scan, userInfoFns) {
|
|
1945
1945
|
const out = [];
|
|
1946
|
-
for (const { text, call } of scan.stringArgs) {
|
|
1946
|
+
for (const { text: text2, call } of scan.stringArgs) {
|
|
1947
1947
|
if (!userInfoFns.includes(call)) continue;
|
|
1948
|
-
for (const c of
|
|
1948
|
+
for (const c of text2.split(",")) {
|
|
1949
1949
|
const t = c.trim();
|
|
1950
1950
|
if (t && !t.startsWith("#") && !UINFO_OPTIONS.has(t) && /^[^\s"]{1,128}$/.test(t) && !out.includes(t)) out.push(t);
|
|
1951
1951
|
}
|
|
@@ -2078,7 +2078,7 @@ async function normalizeSettings(input) {
|
|
|
2078
2078
|
for (const r of rows) {
|
|
2079
2079
|
const where = `${file} ${r.fieldcode}`;
|
|
2080
2080
|
const t = typeOf(r);
|
|
2081
|
-
if (r.formulaSet && r.formulaSet.trim() && !targetTypes.has(t)) findings.error("field.type", where, `${t} の項目には計算式を設定できない`);
|
|
2081
|
+
if (r.formulaSet && r.formulaSet.trim() && !targetTypes.has(t) && !isSpacerRow(r) && !isHeaderRow(r)) findings.error("field.type", where, `${t} の項目には計算式を設定できない`);
|
|
2082
2082
|
if (r.edit && (isHeaderRow(r) || isSpacerRow(r) || isGroupRow(r))) findings.error("field.flag", where, `${t} に「編集」は付けられない`);
|
|
2083
2083
|
if (r.hide && (isHeaderRow(r) || isSpacerRow(r))) findings.error("field.flag", where, `${t} に「非表示」は付けられない`);
|
|
2084
2084
|
if (r.state && r.formulaSet && isLookupRow(r)) findings.warning("field.lookup", where, "ルックアップ項目に計算式(ルックアップの値を上書きする)");
|
|
@@ -2282,7 +2282,7 @@ function calcSettings(input) {
|
|
|
2282
2282
|
engine.setContext({ appId: input.appId, mobile: !!input.mobile, loginUser, lookupTargets: targets.lookupTargets, relatedTargets: targets.relatedTargets, usersInfo: table, usersOrigin: table ? input.usersOrigin : { kind: "none" } });
|
|
2283
2283
|
const needs = normalized.contextNeeds;
|
|
2284
2284
|
const ctx = engine.context();
|
|
2285
|
-
if (needs.appUrl.length && ctx.baseUrl === DEFAULT_CONTEXT_BASE_URL) throw new InputError(`APP_URL を使う項目(${needs.appUrl.join(", ")})があるが、接続先の URL が無い(.env の KINTONE_BASE_URL)`);
|
|
2285
|
+
if (needs.appUrl.length && ctx.baseUrl === DEFAULT_CONTEXT_BASE_URL && !input.allowDefaultBaseUrl) throw new InputError(`APP_URL を使う項目(${needs.appUrl.join(", ")})があるが、接続先の URL が無い(.env の KINTONE_BASE_URL)`);
|
|
2286
2286
|
if (needs.login.length && !loginUser) throw new InputError(`ログインユーザーを使う項目(${needs.login.join(", ")})があるが、ユーザーが決まらない(--user <code>。既定の authoring が ${input.usersOrigin.kind === "file" ? input.usersOrigin.file : "テストデータ"} に居ない)`);
|
|
2287
2287
|
for (const l of needs.lookups) if (!(l.arg in targets.lookupTargets)) throw new InputError(`${l.fieldcode} の LOOKUP_GETID(${l.arg}): ${l.arg} はルックアップ項目でないか、参照先のアプリを参照する権限が無い(fields を取り直す)`);
|
|
2288
2288
|
for (const l of needs.related) if (!(l.arg in targets.relatedTargets)) throw new InputError(`${l.fieldcode} の RELATED_GETID(${l.arg}): ${l.arg} は関連レコード一覧でないか、参照先のアプリを参照する権限が無い`);
|
|
@@ -2327,44 +2327,44 @@ function calcSettings(input) {
|
|
|
2327
2327
|
results.push({ id, lines, changed: lines.filter((l) => l.changed).length, errors, sinks, failed: sinks.length > 0 });
|
|
2328
2328
|
}
|
|
2329
2329
|
engine.clearSinkCalls();
|
|
2330
|
-
const
|
|
2330
|
+
const text2 = [notice, contextLine];
|
|
2331
2331
|
for (const res of results) {
|
|
2332
|
-
|
|
2332
|
+
text2.push(`レコード ${res.id}: 計算対象 ${res.lines.length} 項目、変わる ${res.changed}${res.errors.length ? `、エラー ${res.errors.length}` : ""}`);
|
|
2333
2333
|
for (const l of res.lines) {
|
|
2334
2334
|
const marks = l.marks.length ? ` [${l.marks.join("、")}]` : "";
|
|
2335
2335
|
if (isTable(l.before) && isTable(l.after)) {
|
|
2336
2336
|
const rows = Math.max(l.before.length, l.after.length);
|
|
2337
|
-
|
|
2337
|
+
text2.push(` ${l.changed ? "★" : " "} ${l.fieldcode}: テーブル ${l.before.length} 行 → ${l.after.length} 行${marks}`);
|
|
2338
2338
|
for (let i = 0; i < rows; i++) {
|
|
2339
2339
|
if (i >= l.after.length) {
|
|
2340
|
-
|
|
2340
|
+
text2.push(` 行 ${i + 1}(削除)`);
|
|
2341
2341
|
continue;
|
|
2342
2342
|
}
|
|
2343
2343
|
const av = l.after[i]?.value ?? {};
|
|
2344
2344
|
if (i >= l.before.length) {
|
|
2345
2345
|
const cells2 = Object.keys(av).filter((c) => av[c]?.value !== void 0 && av[c]?.value !== "" && !(Array.isArray(av[c]?.value) && (av[c]?.value).length === 0)).map((c) => `${c} ${short(av[c]?.value)}`);
|
|
2346
|
-
|
|
2346
|
+
text2.push(` 行 ${i + 1}(追加): ${cells2.join("、") || "(空)"}`);
|
|
2347
2347
|
continue;
|
|
2348
2348
|
}
|
|
2349
2349
|
const bv = l.before[i]?.value ?? {};
|
|
2350
2350
|
const cells = [.../* @__PURE__ */ new Set([...Object.keys(bv), ...Object.keys(av)])].filter((c) => JSON.stringify(bv[c]?.value) !== JSON.stringify(av[c]?.value)).map((c) => `${c} ${short(bv[c]?.value)} → ${short(av[c]?.value)}`);
|
|
2351
|
-
if (cells.length)
|
|
2351
|
+
if (cells.length) text2.push(` 行 ${i + 1}: ${cells.join("、")}`);
|
|
2352
2352
|
}
|
|
2353
2353
|
continue;
|
|
2354
2354
|
}
|
|
2355
|
-
|
|
2355
|
+
text2.push(` ${l.changed ? "★" : " "} ${l.fieldcode}: ${short(l.before)} → ${short(l.after)}${marks}`);
|
|
2356
2356
|
}
|
|
2357
|
-
for (const e of res.errors)
|
|
2358
|
-
if (res.failed)
|
|
2357
|
+
for (const e of res.errors) text2.push(` ! ${e.fieldcode}(${e.phases.join(", ")}): ${e.message}`);
|
|
2358
|
+
if (res.failed) text2.push(" ! このレコードの結果は採らない(実行時の sink)");
|
|
2359
2359
|
}
|
|
2360
2360
|
let summary = "";
|
|
2361
2361
|
if (results.length > 1) {
|
|
2362
2362
|
const changedRecords = results.filter((r) => r.changed > 0).length;
|
|
2363
2363
|
const changedFields = new Set(results.flatMap((r) => r.lines.filter((l) => l.changed).map((l) => l.fieldcode)));
|
|
2364
2364
|
summary = `入力した ${results.length} 件中 ${changedRecords} 件の模擬差分。変わる項目: ${[...changedFields].join(", ") || "なし"}(この件数は入力したレコードとこの文脈でのもの。アプリ全体の件数ではない)`;
|
|
2365
|
-
|
|
2365
|
+
text2.push(summary);
|
|
2366
2366
|
}
|
|
2367
|
-
return { contextLine, notice, records: results, summary, text:
|
|
2367
|
+
return { contextLine, notice, records: results, summary, text: text2.join("\n") };
|
|
2368
2368
|
}
|
|
2369
2369
|
|
|
2370
2370
|
// src/commands/take.ts
|
|
@@ -2984,14 +2984,14 @@ function placeNew(tmp, target, link = linkSync) {
|
|
|
2984
2984
|
throw e;
|
|
2985
2985
|
}
|
|
2986
2986
|
}
|
|
2987
|
-
function writeNewFile(target,
|
|
2987
|
+
function writeNewFile(target, text2, recheck = () => {
|
|
2988
2988
|
}) {
|
|
2989
2989
|
const tmp = tempPathFor(target);
|
|
2990
2990
|
let placed = false;
|
|
2991
2991
|
let failure;
|
|
2992
2992
|
try {
|
|
2993
2993
|
recheck();
|
|
2994
|
-
writeFileSync2(tmp,
|
|
2994
|
+
writeFileSync2(tmp, text2, { encoding: "utf8", flag: "wx" });
|
|
2995
2995
|
recheck();
|
|
2996
2996
|
placeNew(tmp, target);
|
|
2997
2997
|
placed = true;
|
|
@@ -3105,15 +3105,15 @@ function readInbox(src) {
|
|
|
3105
3105
|
} finally {
|
|
3106
3106
|
if (fd !== void 0) closeSync2(fd);
|
|
3107
3107
|
}
|
|
3108
|
-
const
|
|
3108
|
+
const text2 = bytes.toString("utf8");
|
|
3109
3109
|
let data;
|
|
3110
3110
|
try {
|
|
3111
|
-
data = JSON.parse(
|
|
3111
|
+
data = JSON.parse(text2);
|
|
3112
3112
|
} catch (e) {
|
|
3113
3113
|
return { reason: `JSON として読めない${jsonErrorWhere(e)}(中身は返さない)` };
|
|
3114
3114
|
}
|
|
3115
3115
|
if (!data || typeof data !== "object" || Array.isArray(data)) return { reason: "JSON の最上位がオブジェクトでない" };
|
|
3116
|
-
return { text, data };
|
|
3116
|
+
return { text: text2, data };
|
|
3117
3117
|
}
|
|
3118
3118
|
function takeInbox(cwdIn, mode, profile) {
|
|
3119
3119
|
const connections = requireProfiles(mode, "take");
|
|
@@ -3215,6 +3215,3748 @@ function takeInbox(cwdIn, mode, profile) {
|
|
|
3215
3215
|
return result;
|
|
3216
3216
|
}
|
|
3217
3217
|
|
|
3218
|
+
// src/sample-app/fields.json
|
|
3219
|
+
var fields_default = {
|
|
3220
|
+
tool: "formula-authoring fields",
|
|
3221
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
3222
|
+
baseUrl: "https://example.cybozu.com",
|
|
3223
|
+
appId: 4329,
|
|
3224
|
+
appName: "計算式サンプル",
|
|
3225
|
+
preview: false,
|
|
3226
|
+
lang: "ja",
|
|
3227
|
+
revision: "1",
|
|
3228
|
+
properties: {
|
|
3229
|
+
チェック2: {
|
|
3230
|
+
type: "CHECK_BOX",
|
|
3231
|
+
code: "チェック2",
|
|
3232
|
+
label: "チェック2",
|
|
3233
|
+
noLabel: false,
|
|
3234
|
+
required: false,
|
|
3235
|
+
options: {
|
|
3236
|
+
甲: {
|
|
3237
|
+
label: "甲",
|
|
3238
|
+
index: "0"
|
|
3239
|
+
},
|
|
3240
|
+
乙: {
|
|
3241
|
+
label: "乙",
|
|
3242
|
+
index: "1"
|
|
3243
|
+
},
|
|
3244
|
+
丙: {
|
|
3245
|
+
label: "丙",
|
|
3246
|
+
index: "2"
|
|
3247
|
+
}
|
|
3248
|
+
},
|
|
3249
|
+
defaultValue: [],
|
|
3250
|
+
align: "HORIZONTAL"
|
|
3251
|
+
},
|
|
3252
|
+
レコード番号: {
|
|
3253
|
+
type: "RECORD_NUMBER",
|
|
3254
|
+
code: "レコード番号",
|
|
3255
|
+
label: "レコード番号",
|
|
3256
|
+
noLabel: false
|
|
3257
|
+
},
|
|
3258
|
+
ドロップダウン2: {
|
|
3259
|
+
type: "DROP_DOWN",
|
|
3260
|
+
code: "ドロップダウン2",
|
|
3261
|
+
label: "ドロップダウン2",
|
|
3262
|
+
noLabel: false,
|
|
3263
|
+
required: false,
|
|
3264
|
+
options: {
|
|
3265
|
+
甲: {
|
|
3266
|
+
label: "甲",
|
|
3267
|
+
index: "0"
|
|
3268
|
+
},
|
|
3269
|
+
乙: {
|
|
3270
|
+
label: "乙",
|
|
3271
|
+
index: "1"
|
|
3272
|
+
},
|
|
3273
|
+
丙: {
|
|
3274
|
+
label: "丙",
|
|
3275
|
+
index: "2"
|
|
3276
|
+
}
|
|
3277
|
+
},
|
|
3278
|
+
defaultValue: ""
|
|
3279
|
+
},
|
|
3280
|
+
ユーザー2: {
|
|
3281
|
+
type: "USER_SELECT",
|
|
3282
|
+
code: "ユーザー2",
|
|
3283
|
+
label: "ユーザー2",
|
|
3284
|
+
noLabel: false,
|
|
3285
|
+
required: false,
|
|
3286
|
+
entities: [],
|
|
3287
|
+
defaultValue: []
|
|
3288
|
+
},
|
|
3289
|
+
組織1: {
|
|
3290
|
+
type: "ORGANIZATION_SELECT",
|
|
3291
|
+
code: "組織1",
|
|
3292
|
+
label: "組織1",
|
|
3293
|
+
noLabel: false,
|
|
3294
|
+
required: false,
|
|
3295
|
+
entities: [],
|
|
3296
|
+
defaultValue: []
|
|
3297
|
+
},
|
|
3298
|
+
ドロップダウン1: {
|
|
3299
|
+
type: "DROP_DOWN",
|
|
3300
|
+
code: "ドロップダウン1",
|
|
3301
|
+
label: "ドロップダウン1",
|
|
3302
|
+
noLabel: false,
|
|
3303
|
+
required: false,
|
|
3304
|
+
options: {
|
|
3305
|
+
A: {
|
|
3306
|
+
label: "A",
|
|
3307
|
+
index: "0"
|
|
3308
|
+
},
|
|
3309
|
+
B: {
|
|
3310
|
+
label: "B",
|
|
3311
|
+
index: "1"
|
|
3312
|
+
},
|
|
3313
|
+
C: {
|
|
3314
|
+
label: "C",
|
|
3315
|
+
index: "2"
|
|
3316
|
+
}
|
|
3317
|
+
},
|
|
3318
|
+
defaultValue: ""
|
|
3319
|
+
},
|
|
3320
|
+
更新者: {
|
|
3321
|
+
type: "MODIFIER",
|
|
3322
|
+
code: "更新者",
|
|
3323
|
+
label: "更新者",
|
|
3324
|
+
noLabel: false
|
|
3325
|
+
},
|
|
3326
|
+
ユーザー1: {
|
|
3327
|
+
type: "USER_SELECT",
|
|
3328
|
+
code: "ユーザー1",
|
|
3329
|
+
label: "ユーザー1",
|
|
3330
|
+
noLabel: false,
|
|
3331
|
+
required: false,
|
|
3332
|
+
entities: [],
|
|
3333
|
+
defaultValue: []
|
|
3334
|
+
},
|
|
3335
|
+
組織2: {
|
|
3336
|
+
type: "ORGANIZATION_SELECT",
|
|
3337
|
+
code: "組織2",
|
|
3338
|
+
label: "組織2",
|
|
3339
|
+
noLabel: false,
|
|
3340
|
+
required: false,
|
|
3341
|
+
entities: [],
|
|
3342
|
+
defaultValue: []
|
|
3343
|
+
},
|
|
3344
|
+
テーブル2: {
|
|
3345
|
+
type: "SUBTABLE",
|
|
3346
|
+
code: "テーブル2",
|
|
3347
|
+
noLabel: false,
|
|
3348
|
+
label: "テーブル2",
|
|
3349
|
+
fields: {
|
|
3350
|
+
T2_複数選択: {
|
|
3351
|
+
type: "MULTI_SELECT",
|
|
3352
|
+
code: "T2_複数選択",
|
|
3353
|
+
label: "T2_複数選択",
|
|
3354
|
+
noLabel: false,
|
|
3355
|
+
required: false,
|
|
3356
|
+
options: {
|
|
3357
|
+
A: {
|
|
3358
|
+
label: "A",
|
|
3359
|
+
index: "0"
|
|
3360
|
+
},
|
|
3361
|
+
B: {
|
|
3362
|
+
label: "B",
|
|
3363
|
+
index: "1"
|
|
3364
|
+
},
|
|
3365
|
+
C: {
|
|
3366
|
+
label: "C",
|
|
3367
|
+
index: "2"
|
|
3368
|
+
}
|
|
3369
|
+
},
|
|
3370
|
+
defaultValue: []
|
|
3371
|
+
},
|
|
3372
|
+
T2_文字列複数行: {
|
|
3373
|
+
type: "MULTI_LINE_TEXT",
|
|
3374
|
+
code: "T2_文字列複数行",
|
|
3375
|
+
label: "T2_文字列複数行",
|
|
3376
|
+
noLabel: false,
|
|
3377
|
+
required: false,
|
|
3378
|
+
defaultValue: ""
|
|
3379
|
+
},
|
|
3380
|
+
T2_リンク: {
|
|
3381
|
+
type: "LINK",
|
|
3382
|
+
code: "T2_リンク",
|
|
3383
|
+
label: "T2_リンク",
|
|
3384
|
+
noLabel: false,
|
|
3385
|
+
required: false,
|
|
3386
|
+
protocol: "WEB",
|
|
3387
|
+
minLength: "",
|
|
3388
|
+
maxLength: "",
|
|
3389
|
+
unique: false,
|
|
3390
|
+
defaultValue: ""
|
|
3391
|
+
},
|
|
3392
|
+
T2_リッチ: {
|
|
3393
|
+
type: "RICH_TEXT",
|
|
3394
|
+
code: "T2_リッチ",
|
|
3395
|
+
label: "T2_リッチ",
|
|
3396
|
+
noLabel: false,
|
|
3397
|
+
required: false,
|
|
3398
|
+
defaultValue: ""
|
|
3399
|
+
},
|
|
3400
|
+
T2_文字列: {
|
|
3401
|
+
type: "SINGLE_LINE_TEXT",
|
|
3402
|
+
code: "T2_文字列",
|
|
3403
|
+
label: "T2_文字列",
|
|
3404
|
+
noLabel: false,
|
|
3405
|
+
required: false,
|
|
3406
|
+
minLength: "",
|
|
3407
|
+
maxLength: "",
|
|
3408
|
+
expression: "",
|
|
3409
|
+
hideExpression: false,
|
|
3410
|
+
unique: false,
|
|
3411
|
+
defaultValue: ""
|
|
3412
|
+
},
|
|
3413
|
+
T2_チェック: {
|
|
3414
|
+
type: "CHECK_BOX",
|
|
3415
|
+
code: "T2_チェック",
|
|
3416
|
+
label: "T2_チェック",
|
|
3417
|
+
noLabel: false,
|
|
3418
|
+
required: false,
|
|
3419
|
+
options: {
|
|
3420
|
+
A: {
|
|
3421
|
+
label: "A",
|
|
3422
|
+
index: "0"
|
|
3423
|
+
},
|
|
3424
|
+
B: {
|
|
3425
|
+
label: "B",
|
|
3426
|
+
index: "1"
|
|
3427
|
+
},
|
|
3428
|
+
C: {
|
|
3429
|
+
label: "C",
|
|
3430
|
+
index: "2"
|
|
3431
|
+
}
|
|
3432
|
+
},
|
|
3433
|
+
defaultValue: [],
|
|
3434
|
+
align: "HORIZONTAL"
|
|
3435
|
+
},
|
|
3436
|
+
T2_ユーザー: {
|
|
3437
|
+
type: "USER_SELECT",
|
|
3438
|
+
code: "T2_ユーザー",
|
|
3439
|
+
label: "T2_ユーザー",
|
|
3440
|
+
noLabel: false,
|
|
3441
|
+
required: false,
|
|
3442
|
+
entities: [],
|
|
3443
|
+
defaultValue: []
|
|
3444
|
+
},
|
|
3445
|
+
T2_グループ: {
|
|
3446
|
+
type: "GROUP_SELECT",
|
|
3447
|
+
code: "T2_グループ",
|
|
3448
|
+
label: "T2_グループ",
|
|
3449
|
+
noLabel: false,
|
|
3450
|
+
required: false,
|
|
3451
|
+
entities: [],
|
|
3452
|
+
defaultValue: []
|
|
3453
|
+
},
|
|
3454
|
+
T2_日付: {
|
|
3455
|
+
type: "DATE",
|
|
3456
|
+
code: "T2_日付",
|
|
3457
|
+
label: "T2_日付",
|
|
3458
|
+
noLabel: false,
|
|
3459
|
+
required: false,
|
|
3460
|
+
unique: false,
|
|
3461
|
+
defaultValue: "",
|
|
3462
|
+
defaultNowValue: false
|
|
3463
|
+
},
|
|
3464
|
+
T2_数値: {
|
|
3465
|
+
type: "NUMBER",
|
|
3466
|
+
code: "T2_数値",
|
|
3467
|
+
label: "T2_数値",
|
|
3468
|
+
noLabel: false,
|
|
3469
|
+
required: false,
|
|
3470
|
+
minValue: "",
|
|
3471
|
+
maxValue: "",
|
|
3472
|
+
digit: false,
|
|
3473
|
+
unique: false,
|
|
3474
|
+
defaultValue: "",
|
|
3475
|
+
displayScale: "",
|
|
3476
|
+
unit: "",
|
|
3477
|
+
unitPosition: "BEFORE"
|
|
3478
|
+
},
|
|
3479
|
+
T2_ドロップダウン: {
|
|
3480
|
+
type: "DROP_DOWN",
|
|
3481
|
+
code: "T2_ドロップダウン",
|
|
3482
|
+
label: "T2_ドロップダウン",
|
|
3483
|
+
noLabel: false,
|
|
3484
|
+
required: false,
|
|
3485
|
+
options: {
|
|
3486
|
+
A: {
|
|
3487
|
+
label: "A",
|
|
3488
|
+
index: "0"
|
|
3489
|
+
},
|
|
3490
|
+
B: {
|
|
3491
|
+
label: "B",
|
|
3492
|
+
index: "1"
|
|
3493
|
+
},
|
|
3494
|
+
C: {
|
|
3495
|
+
label: "C",
|
|
3496
|
+
index: "2"
|
|
3497
|
+
}
|
|
3498
|
+
},
|
|
3499
|
+
defaultValue: ""
|
|
3500
|
+
},
|
|
3501
|
+
T2_組織: {
|
|
3502
|
+
type: "ORGANIZATION_SELECT",
|
|
3503
|
+
code: "T2_組織",
|
|
3504
|
+
label: "T2_組織",
|
|
3505
|
+
noLabel: false,
|
|
3506
|
+
required: false,
|
|
3507
|
+
entities: [],
|
|
3508
|
+
defaultValue: []
|
|
3509
|
+
},
|
|
3510
|
+
T2_計算: {
|
|
3511
|
+
type: "CALC",
|
|
3512
|
+
code: "T2_計算",
|
|
3513
|
+
label: "T2_計算",
|
|
3514
|
+
noLabel: false,
|
|
3515
|
+
required: false,
|
|
3516
|
+
expression: "T2_数値 * 2",
|
|
3517
|
+
format: "NUMBER",
|
|
3518
|
+
displayScale: "",
|
|
3519
|
+
hideExpression: false,
|
|
3520
|
+
unit: "",
|
|
3521
|
+
unitPosition: "BEFORE"
|
|
3522
|
+
},
|
|
3523
|
+
T2_ラジオ: {
|
|
3524
|
+
type: "RADIO_BUTTON",
|
|
3525
|
+
code: "T2_ラジオ",
|
|
3526
|
+
label: "T2_ラジオ",
|
|
3527
|
+
noLabel: false,
|
|
3528
|
+
required: true,
|
|
3529
|
+
options: {
|
|
3530
|
+
A: {
|
|
3531
|
+
label: "A",
|
|
3532
|
+
index: "0"
|
|
3533
|
+
},
|
|
3534
|
+
B: {
|
|
3535
|
+
label: "B",
|
|
3536
|
+
index: "1"
|
|
3537
|
+
},
|
|
3538
|
+
C: {
|
|
3539
|
+
label: "C",
|
|
3540
|
+
index: "2"
|
|
3541
|
+
}
|
|
3542
|
+
},
|
|
3543
|
+
defaultValue: "A",
|
|
3544
|
+
align: "HORIZONTAL"
|
|
3545
|
+
},
|
|
3546
|
+
T2_日時: {
|
|
3547
|
+
type: "DATETIME",
|
|
3548
|
+
code: "T2_日時",
|
|
3549
|
+
label: "T2_日時",
|
|
3550
|
+
noLabel: false,
|
|
3551
|
+
required: false,
|
|
3552
|
+
unique: false,
|
|
3553
|
+
defaultValue: "",
|
|
3554
|
+
defaultNowValue: false
|
|
3555
|
+
},
|
|
3556
|
+
T2_添付: {
|
|
3557
|
+
type: "FILE",
|
|
3558
|
+
code: "T2_添付",
|
|
3559
|
+
label: "T2_添付",
|
|
3560
|
+
noLabel: false,
|
|
3561
|
+
required: false,
|
|
3562
|
+
thumbnailSize: "50"
|
|
3563
|
+
},
|
|
3564
|
+
T2_時刻: {
|
|
3565
|
+
type: "TIME",
|
|
3566
|
+
code: "T2_時刻",
|
|
3567
|
+
label: "T2_時刻",
|
|
3568
|
+
noLabel: false,
|
|
3569
|
+
required: false,
|
|
3570
|
+
defaultValue: "",
|
|
3571
|
+
defaultNowValue: false
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
},
|
|
3575
|
+
ステータス: {
|
|
3576
|
+
type: "STATUS",
|
|
3577
|
+
code: "ステータス",
|
|
3578
|
+
label: "ステータス",
|
|
3579
|
+
enabled: true
|
|
3580
|
+
},
|
|
3581
|
+
グループ1: {
|
|
3582
|
+
type: "GROUP_SELECT",
|
|
3583
|
+
code: "グループ1",
|
|
3584
|
+
label: "グループ1",
|
|
3585
|
+
noLabel: false,
|
|
3586
|
+
required: false,
|
|
3587
|
+
entities: [],
|
|
3588
|
+
defaultValue: []
|
|
3589
|
+
},
|
|
3590
|
+
テーブル1: {
|
|
3591
|
+
type: "SUBTABLE",
|
|
3592
|
+
code: "テーブル1",
|
|
3593
|
+
noLabel: false,
|
|
3594
|
+
label: "テーブル1",
|
|
3595
|
+
fields: {
|
|
3596
|
+
T1_ユーザー: {
|
|
3597
|
+
type: "USER_SELECT",
|
|
3598
|
+
code: "T1_ユーザー",
|
|
3599
|
+
label: "T1_ユーザー",
|
|
3600
|
+
noLabel: false,
|
|
3601
|
+
required: false,
|
|
3602
|
+
entities: [],
|
|
3603
|
+
defaultValue: []
|
|
3604
|
+
},
|
|
3605
|
+
T1_文字列複数行: {
|
|
3606
|
+
type: "MULTI_LINE_TEXT",
|
|
3607
|
+
code: "T1_文字列複数行",
|
|
3608
|
+
label: "T1_文字列複数行",
|
|
3609
|
+
noLabel: false,
|
|
3610
|
+
required: false,
|
|
3611
|
+
defaultValue: ""
|
|
3612
|
+
},
|
|
3613
|
+
T1_ラジオ: {
|
|
3614
|
+
type: "RADIO_BUTTON",
|
|
3615
|
+
code: "T1_ラジオ",
|
|
3616
|
+
label: "T1_ラジオ",
|
|
3617
|
+
noLabel: false,
|
|
3618
|
+
required: true,
|
|
3619
|
+
options: {
|
|
3620
|
+
A: {
|
|
3621
|
+
label: "A",
|
|
3622
|
+
index: "0"
|
|
3623
|
+
},
|
|
3624
|
+
B: {
|
|
3625
|
+
label: "B",
|
|
3626
|
+
index: "1"
|
|
3627
|
+
},
|
|
3628
|
+
C: {
|
|
3629
|
+
label: "C",
|
|
3630
|
+
index: "2"
|
|
3631
|
+
}
|
|
3632
|
+
},
|
|
3633
|
+
defaultValue: "A",
|
|
3634
|
+
align: "HORIZONTAL"
|
|
3635
|
+
},
|
|
3636
|
+
T1_複数選択: {
|
|
3637
|
+
type: "MULTI_SELECT",
|
|
3638
|
+
code: "T1_複数選択",
|
|
3639
|
+
label: "T1_複数選択",
|
|
3640
|
+
noLabel: false,
|
|
3641
|
+
required: false,
|
|
3642
|
+
options: {
|
|
3643
|
+
A: {
|
|
3644
|
+
label: "A",
|
|
3645
|
+
index: "0"
|
|
3646
|
+
},
|
|
3647
|
+
B: {
|
|
3648
|
+
label: "B",
|
|
3649
|
+
index: "1"
|
|
3650
|
+
},
|
|
3651
|
+
C: {
|
|
3652
|
+
label: "C",
|
|
3653
|
+
index: "2"
|
|
3654
|
+
}
|
|
3655
|
+
},
|
|
3656
|
+
defaultValue: []
|
|
3657
|
+
},
|
|
3658
|
+
T1_日付: {
|
|
3659
|
+
type: "DATE",
|
|
3660
|
+
code: "T1_日付",
|
|
3661
|
+
label: "T1_日付",
|
|
3662
|
+
noLabel: false,
|
|
3663
|
+
required: false,
|
|
3664
|
+
unique: false,
|
|
3665
|
+
defaultValue: "",
|
|
3666
|
+
defaultNowValue: false
|
|
3667
|
+
},
|
|
3668
|
+
T1_ドロップダウン: {
|
|
3669
|
+
type: "DROP_DOWN",
|
|
3670
|
+
code: "T1_ドロップダウン",
|
|
3671
|
+
label: "T1_ドロップダウン",
|
|
3672
|
+
noLabel: false,
|
|
3673
|
+
required: false,
|
|
3674
|
+
options: {
|
|
3675
|
+
A: {
|
|
3676
|
+
label: "A",
|
|
3677
|
+
index: "0"
|
|
3678
|
+
},
|
|
3679
|
+
B: {
|
|
3680
|
+
label: "B",
|
|
3681
|
+
index: "1"
|
|
3682
|
+
},
|
|
3683
|
+
C: {
|
|
3684
|
+
label: "C",
|
|
3685
|
+
index: "2"
|
|
3686
|
+
}
|
|
3687
|
+
},
|
|
3688
|
+
defaultValue: ""
|
|
3689
|
+
},
|
|
3690
|
+
T1_リッチ: {
|
|
3691
|
+
type: "RICH_TEXT",
|
|
3692
|
+
code: "T1_リッチ",
|
|
3693
|
+
label: "T1_リッチ",
|
|
3694
|
+
noLabel: false,
|
|
3695
|
+
required: false,
|
|
3696
|
+
defaultValue: ""
|
|
3697
|
+
},
|
|
3698
|
+
T1_数値: {
|
|
3699
|
+
type: "NUMBER",
|
|
3700
|
+
code: "T1_数値",
|
|
3701
|
+
label: "T1_数値",
|
|
3702
|
+
noLabel: false,
|
|
3703
|
+
required: false,
|
|
3704
|
+
minValue: "",
|
|
3705
|
+
maxValue: "",
|
|
3706
|
+
digit: false,
|
|
3707
|
+
unique: false,
|
|
3708
|
+
defaultValue: "",
|
|
3709
|
+
displayScale: "",
|
|
3710
|
+
unit: "",
|
|
3711
|
+
unitPosition: "BEFORE"
|
|
3712
|
+
},
|
|
3713
|
+
T1_組織: {
|
|
3714
|
+
type: "ORGANIZATION_SELECT",
|
|
3715
|
+
code: "T1_組織",
|
|
3716
|
+
label: "T1_組織",
|
|
3717
|
+
noLabel: false,
|
|
3718
|
+
required: false,
|
|
3719
|
+
entities: [],
|
|
3720
|
+
defaultValue: []
|
|
3721
|
+
},
|
|
3722
|
+
T1_リンク: {
|
|
3723
|
+
type: "LINK",
|
|
3724
|
+
code: "T1_リンク",
|
|
3725
|
+
label: "T1_リンク",
|
|
3726
|
+
noLabel: false,
|
|
3727
|
+
required: false,
|
|
3728
|
+
protocol: "WEB",
|
|
3729
|
+
minLength: "",
|
|
3730
|
+
maxLength: "",
|
|
3731
|
+
unique: false,
|
|
3732
|
+
defaultValue: ""
|
|
3733
|
+
},
|
|
3734
|
+
T1_文字列: {
|
|
3735
|
+
type: "SINGLE_LINE_TEXT",
|
|
3736
|
+
code: "T1_文字列",
|
|
3737
|
+
label: "T1_文字列",
|
|
3738
|
+
noLabel: false,
|
|
3739
|
+
required: false,
|
|
3740
|
+
minLength: "",
|
|
3741
|
+
maxLength: "",
|
|
3742
|
+
expression: "",
|
|
3743
|
+
hideExpression: false,
|
|
3744
|
+
unique: false,
|
|
3745
|
+
defaultValue: ""
|
|
3746
|
+
},
|
|
3747
|
+
T1_計算: {
|
|
3748
|
+
type: "CALC",
|
|
3749
|
+
code: "T1_計算",
|
|
3750
|
+
label: "T1_計算",
|
|
3751
|
+
noLabel: false,
|
|
3752
|
+
required: false,
|
|
3753
|
+
expression: "T1_数値 * 2",
|
|
3754
|
+
format: "NUMBER",
|
|
3755
|
+
displayScale: "",
|
|
3756
|
+
hideExpression: false,
|
|
3757
|
+
unit: "",
|
|
3758
|
+
unitPosition: "BEFORE"
|
|
3759
|
+
},
|
|
3760
|
+
T1_添付: {
|
|
3761
|
+
type: "FILE",
|
|
3762
|
+
code: "T1_添付",
|
|
3763
|
+
label: "T1_添付",
|
|
3764
|
+
noLabel: false,
|
|
3765
|
+
required: false,
|
|
3766
|
+
thumbnailSize: "50"
|
|
3767
|
+
},
|
|
3768
|
+
T1_日時: {
|
|
3769
|
+
type: "DATETIME",
|
|
3770
|
+
code: "T1_日時",
|
|
3771
|
+
label: "T1_日時",
|
|
3772
|
+
noLabel: false,
|
|
3773
|
+
required: false,
|
|
3774
|
+
unique: false,
|
|
3775
|
+
defaultValue: "",
|
|
3776
|
+
defaultNowValue: false
|
|
3777
|
+
},
|
|
3778
|
+
T1_グループ: {
|
|
3779
|
+
type: "GROUP_SELECT",
|
|
3780
|
+
code: "T1_グループ",
|
|
3781
|
+
label: "T1_グループ",
|
|
3782
|
+
noLabel: false,
|
|
3783
|
+
required: false,
|
|
3784
|
+
entities: [],
|
|
3785
|
+
defaultValue: []
|
|
3786
|
+
},
|
|
3787
|
+
T1_チェック: {
|
|
3788
|
+
type: "CHECK_BOX",
|
|
3789
|
+
code: "T1_チェック",
|
|
3790
|
+
label: "T1_チェック",
|
|
3791
|
+
noLabel: false,
|
|
3792
|
+
required: false,
|
|
3793
|
+
options: {
|
|
3794
|
+
A: {
|
|
3795
|
+
label: "A",
|
|
3796
|
+
index: "0"
|
|
3797
|
+
},
|
|
3798
|
+
B: {
|
|
3799
|
+
label: "B",
|
|
3800
|
+
index: "1"
|
|
3801
|
+
},
|
|
3802
|
+
C: {
|
|
3803
|
+
label: "C",
|
|
3804
|
+
index: "2"
|
|
3805
|
+
}
|
|
3806
|
+
},
|
|
3807
|
+
defaultValue: [],
|
|
3808
|
+
align: "HORIZONTAL"
|
|
3809
|
+
},
|
|
3810
|
+
T1_時刻: {
|
|
3811
|
+
type: "TIME",
|
|
3812
|
+
code: "T1_時刻",
|
|
3813
|
+
label: "T1_時刻",
|
|
3814
|
+
noLabel: false,
|
|
3815
|
+
required: false,
|
|
3816
|
+
defaultValue: "",
|
|
3817
|
+
defaultNowValue: false
|
|
3818
|
+
}
|
|
3819
|
+
}
|
|
3820
|
+
},
|
|
3821
|
+
ラジオ1: {
|
|
3822
|
+
type: "RADIO_BUTTON",
|
|
3823
|
+
code: "ラジオ1",
|
|
3824
|
+
label: "ラジオ1",
|
|
3825
|
+
noLabel: false,
|
|
3826
|
+
required: true,
|
|
3827
|
+
options: {
|
|
3828
|
+
A: {
|
|
3829
|
+
label: "A",
|
|
3830
|
+
index: "0"
|
|
3831
|
+
},
|
|
3832
|
+
B: {
|
|
3833
|
+
label: "B",
|
|
3834
|
+
index: "1"
|
|
3835
|
+
},
|
|
3836
|
+
C: {
|
|
3837
|
+
label: "C",
|
|
3838
|
+
index: "2"
|
|
3839
|
+
}
|
|
3840
|
+
},
|
|
3841
|
+
defaultValue: "A",
|
|
3842
|
+
align: "HORIZONTAL"
|
|
3843
|
+
},
|
|
3844
|
+
グループ2: {
|
|
3845
|
+
type: "GROUP_SELECT",
|
|
3846
|
+
code: "グループ2",
|
|
3847
|
+
label: "グループ2",
|
|
3848
|
+
noLabel: false,
|
|
3849
|
+
required: false,
|
|
3850
|
+
entities: [],
|
|
3851
|
+
defaultValue: []
|
|
3852
|
+
},
|
|
3853
|
+
ラジオ2: {
|
|
3854
|
+
type: "RADIO_BUTTON",
|
|
3855
|
+
code: "ラジオ2",
|
|
3856
|
+
label: "ラジオ2",
|
|
3857
|
+
noLabel: false,
|
|
3858
|
+
required: true,
|
|
3859
|
+
options: {
|
|
3860
|
+
甲: {
|
|
3861
|
+
label: "甲",
|
|
3862
|
+
index: "0"
|
|
3863
|
+
},
|
|
3864
|
+
乙: {
|
|
3865
|
+
label: "乙",
|
|
3866
|
+
index: "1"
|
|
3867
|
+
},
|
|
3868
|
+
丙: {
|
|
3869
|
+
label: "丙",
|
|
3870
|
+
index: "2"
|
|
3871
|
+
}
|
|
3872
|
+
},
|
|
3873
|
+
defaultValue: "甲",
|
|
3874
|
+
align: "HORIZONTAL"
|
|
3875
|
+
},
|
|
3876
|
+
リッチ1: {
|
|
3877
|
+
type: "RICH_TEXT",
|
|
3878
|
+
code: "リッチ1",
|
|
3879
|
+
label: "リッチ1",
|
|
3880
|
+
noLabel: false,
|
|
3881
|
+
required: false,
|
|
3882
|
+
defaultValue: ""
|
|
3883
|
+
},
|
|
3884
|
+
時刻2: {
|
|
3885
|
+
type: "TIME",
|
|
3886
|
+
code: "時刻2",
|
|
3887
|
+
label: "時刻2",
|
|
3888
|
+
noLabel: false,
|
|
3889
|
+
required: false,
|
|
3890
|
+
defaultValue: "",
|
|
3891
|
+
defaultNowValue: false
|
|
3892
|
+
},
|
|
3893
|
+
カテゴリー: {
|
|
3894
|
+
type: "CATEGORY",
|
|
3895
|
+
code: "カテゴリー",
|
|
3896
|
+
label: "カテゴリー",
|
|
3897
|
+
enabled: true
|
|
3898
|
+
},
|
|
3899
|
+
時刻1: {
|
|
3900
|
+
type: "TIME",
|
|
3901
|
+
code: "時刻1",
|
|
3902
|
+
label: "時刻1",
|
|
3903
|
+
noLabel: false,
|
|
3904
|
+
required: false,
|
|
3905
|
+
defaultValue: "",
|
|
3906
|
+
defaultNowValue: false
|
|
3907
|
+
},
|
|
3908
|
+
リンク1: {
|
|
3909
|
+
type: "LINK",
|
|
3910
|
+
code: "リンク1",
|
|
3911
|
+
label: "リンク1(Web)",
|
|
3912
|
+
noLabel: false,
|
|
3913
|
+
required: false,
|
|
3914
|
+
protocol: "WEB",
|
|
3915
|
+
minLength: "",
|
|
3916
|
+
maxLength: "",
|
|
3917
|
+
unique: false,
|
|
3918
|
+
defaultValue: ""
|
|
3919
|
+
},
|
|
3920
|
+
リッチ2: {
|
|
3921
|
+
type: "RICH_TEXT",
|
|
3922
|
+
code: "リッチ2",
|
|
3923
|
+
label: "リッチ2",
|
|
3924
|
+
noLabel: false,
|
|
3925
|
+
required: false,
|
|
3926
|
+
defaultValue: ""
|
|
3927
|
+
},
|
|
3928
|
+
リンク2: {
|
|
3929
|
+
type: "LINK",
|
|
3930
|
+
code: "リンク2",
|
|
3931
|
+
label: "リンク2(メール)",
|
|
3932
|
+
noLabel: false,
|
|
3933
|
+
required: false,
|
|
3934
|
+
protocol: "MAIL",
|
|
3935
|
+
minLength: "",
|
|
3936
|
+
maxLength: "",
|
|
3937
|
+
unique: false,
|
|
3938
|
+
defaultValue: ""
|
|
3939
|
+
},
|
|
3940
|
+
計算2: {
|
|
3941
|
+
type: "CALC",
|
|
3942
|
+
code: "計算2",
|
|
3943
|
+
label: "計算2(日付の差の日数)",
|
|
3944
|
+
noLabel: false,
|
|
3945
|
+
required: false,
|
|
3946
|
+
expression: "(日付1 - 日付2) / 86400",
|
|
3947
|
+
format: "NUMBER",
|
|
3948
|
+
displayScale: "",
|
|
3949
|
+
hideExpression: false,
|
|
3950
|
+
unit: "",
|
|
3951
|
+
unitPosition: "BEFORE"
|
|
3952
|
+
},
|
|
3953
|
+
計算1: {
|
|
3954
|
+
type: "CALC",
|
|
3955
|
+
code: "計算1",
|
|
3956
|
+
label: "計算1",
|
|
3957
|
+
noLabel: false,
|
|
3958
|
+
required: false,
|
|
3959
|
+
expression: "数値1 + 数値2",
|
|
3960
|
+
format: "NUMBER",
|
|
3961
|
+
displayScale: "",
|
|
3962
|
+
hideExpression: false,
|
|
3963
|
+
unit: "",
|
|
3964
|
+
unitPosition: "BEFORE"
|
|
3965
|
+
},
|
|
3966
|
+
複数選択2: {
|
|
3967
|
+
type: "MULTI_SELECT",
|
|
3968
|
+
code: "複数選択2",
|
|
3969
|
+
label: "複数選択2",
|
|
3970
|
+
noLabel: false,
|
|
3971
|
+
required: false,
|
|
3972
|
+
options: {
|
|
3973
|
+
甲: {
|
|
3974
|
+
label: "甲",
|
|
3975
|
+
index: "0"
|
|
3976
|
+
},
|
|
3977
|
+
乙: {
|
|
3978
|
+
label: "乙",
|
|
3979
|
+
index: "1"
|
|
3980
|
+
},
|
|
3981
|
+
丙: {
|
|
3982
|
+
label: "丙",
|
|
3983
|
+
index: "2"
|
|
3984
|
+
}
|
|
3985
|
+
},
|
|
3986
|
+
defaultValue: []
|
|
3987
|
+
},
|
|
3988
|
+
日時1: {
|
|
3989
|
+
type: "DATETIME",
|
|
3990
|
+
code: "日時1",
|
|
3991
|
+
label: "日時1",
|
|
3992
|
+
noLabel: false,
|
|
3993
|
+
required: false,
|
|
3994
|
+
unique: false,
|
|
3995
|
+
defaultValue: "",
|
|
3996
|
+
defaultNowValue: false
|
|
3997
|
+
},
|
|
3998
|
+
複数選択1: {
|
|
3999
|
+
type: "MULTI_SELECT",
|
|
4000
|
+
code: "複数選択1",
|
|
4001
|
+
label: "複数選択1",
|
|
4002
|
+
noLabel: false,
|
|
4003
|
+
required: false,
|
|
4004
|
+
options: {
|
|
4005
|
+
A: {
|
|
4006
|
+
label: "A",
|
|
4007
|
+
index: "0"
|
|
4008
|
+
},
|
|
4009
|
+
B: {
|
|
4010
|
+
label: "B",
|
|
4011
|
+
index: "1"
|
|
4012
|
+
},
|
|
4013
|
+
C: {
|
|
4014
|
+
label: "C",
|
|
4015
|
+
index: "2"
|
|
4016
|
+
}
|
|
4017
|
+
},
|
|
4018
|
+
defaultValue: []
|
|
4019
|
+
},
|
|
4020
|
+
日時2: {
|
|
4021
|
+
type: "DATETIME",
|
|
4022
|
+
code: "日時2",
|
|
4023
|
+
label: "日時2",
|
|
4024
|
+
noLabel: false,
|
|
4025
|
+
required: false,
|
|
4026
|
+
unique: false,
|
|
4027
|
+
defaultValue: "",
|
|
4028
|
+
defaultNowValue: false
|
|
4029
|
+
},
|
|
4030
|
+
枠内数値1: {
|
|
4031
|
+
type: "NUMBER",
|
|
4032
|
+
code: "枠内数値1",
|
|
4033
|
+
label: "枠内数値1",
|
|
4034
|
+
noLabel: false,
|
|
4035
|
+
required: false,
|
|
4036
|
+
minValue: "",
|
|
4037
|
+
maxValue: "",
|
|
4038
|
+
digit: false,
|
|
4039
|
+
unique: false,
|
|
4040
|
+
defaultValue: "",
|
|
4041
|
+
displayScale: "",
|
|
4042
|
+
unit: "",
|
|
4043
|
+
unitPosition: "BEFORE"
|
|
4044
|
+
},
|
|
4045
|
+
作業者: {
|
|
4046
|
+
type: "STATUS_ASSIGNEE",
|
|
4047
|
+
code: "作業者",
|
|
4048
|
+
label: "作業者",
|
|
4049
|
+
enabled: true
|
|
4050
|
+
},
|
|
4051
|
+
作成者: {
|
|
4052
|
+
type: "CREATOR",
|
|
4053
|
+
code: "作成者",
|
|
4054
|
+
label: "作成者",
|
|
4055
|
+
noLabel: false
|
|
4056
|
+
},
|
|
4057
|
+
文字列2: {
|
|
4058
|
+
type: "SINGLE_LINE_TEXT",
|
|
4059
|
+
code: "文字列2",
|
|
4060
|
+
label: "文字列2",
|
|
4061
|
+
noLabel: false,
|
|
4062
|
+
required: false,
|
|
4063
|
+
minLength: "",
|
|
4064
|
+
maxLength: "",
|
|
4065
|
+
expression: "",
|
|
4066
|
+
hideExpression: false,
|
|
4067
|
+
unique: false,
|
|
4068
|
+
defaultValue: ""
|
|
4069
|
+
},
|
|
4070
|
+
文字列1: {
|
|
4071
|
+
type: "SINGLE_LINE_TEXT",
|
|
4072
|
+
code: "文字列1",
|
|
4073
|
+
label: "文字列1",
|
|
4074
|
+
noLabel: false,
|
|
4075
|
+
required: false,
|
|
4076
|
+
minLength: "",
|
|
4077
|
+
maxLength: "",
|
|
4078
|
+
expression: "",
|
|
4079
|
+
hideExpression: false,
|
|
4080
|
+
unique: false,
|
|
4081
|
+
defaultValue: ""
|
|
4082
|
+
},
|
|
4083
|
+
更新日時: {
|
|
4084
|
+
type: "UPDATED_TIME",
|
|
4085
|
+
code: "更新日時",
|
|
4086
|
+
label: "更新日時",
|
|
4087
|
+
noLabel: false
|
|
4088
|
+
},
|
|
4089
|
+
添付1: {
|
|
4090
|
+
type: "FILE",
|
|
4091
|
+
code: "添付1",
|
|
4092
|
+
label: "添付1",
|
|
4093
|
+
noLabel: false,
|
|
4094
|
+
required: false,
|
|
4095
|
+
thumbnailSize: "50"
|
|
4096
|
+
},
|
|
4097
|
+
添付2: {
|
|
4098
|
+
type: "FILE",
|
|
4099
|
+
code: "添付2",
|
|
4100
|
+
label: "添付2",
|
|
4101
|
+
noLabel: false,
|
|
4102
|
+
required: false,
|
|
4103
|
+
thumbnailSize: "50"
|
|
4104
|
+
},
|
|
4105
|
+
文字列複数行2: {
|
|
4106
|
+
type: "MULTI_LINE_TEXT",
|
|
4107
|
+
code: "文字列複数行2",
|
|
4108
|
+
label: "文字列複数行2",
|
|
4109
|
+
noLabel: false,
|
|
4110
|
+
required: false,
|
|
4111
|
+
defaultValue: ""
|
|
4112
|
+
},
|
|
4113
|
+
グループ枠1: {
|
|
4114
|
+
type: "GROUP",
|
|
4115
|
+
code: "グループ枠1",
|
|
4116
|
+
label: "グループ枠1",
|
|
4117
|
+
noLabel: false,
|
|
4118
|
+
openGroup: true
|
|
4119
|
+
},
|
|
4120
|
+
日付1: {
|
|
4121
|
+
type: "DATE",
|
|
4122
|
+
code: "日付1",
|
|
4123
|
+
label: "日付1",
|
|
4124
|
+
noLabel: false,
|
|
4125
|
+
required: false,
|
|
4126
|
+
unique: false,
|
|
4127
|
+
defaultValue: "",
|
|
4128
|
+
defaultNowValue: false
|
|
4129
|
+
},
|
|
4130
|
+
枠内文字列1: {
|
|
4131
|
+
type: "SINGLE_LINE_TEXT",
|
|
4132
|
+
code: "枠内文字列1",
|
|
4133
|
+
label: "枠内文字列1",
|
|
4134
|
+
noLabel: false,
|
|
4135
|
+
required: false,
|
|
4136
|
+
minLength: "",
|
|
4137
|
+
maxLength: "",
|
|
4138
|
+
expression: "",
|
|
4139
|
+
hideExpression: false,
|
|
4140
|
+
unique: false,
|
|
4141
|
+
defaultValue: ""
|
|
4142
|
+
},
|
|
4143
|
+
文字列複数行1: {
|
|
4144
|
+
type: "MULTI_LINE_TEXT",
|
|
4145
|
+
code: "文字列複数行1",
|
|
4146
|
+
label: "文字列複数行1",
|
|
4147
|
+
noLabel: false,
|
|
4148
|
+
required: false,
|
|
4149
|
+
defaultValue: ""
|
|
4150
|
+
},
|
|
4151
|
+
日付2: {
|
|
4152
|
+
type: "DATE",
|
|
4153
|
+
code: "日付2",
|
|
4154
|
+
label: "日付2",
|
|
4155
|
+
noLabel: false,
|
|
4156
|
+
required: false,
|
|
4157
|
+
unique: false,
|
|
4158
|
+
defaultValue: "",
|
|
4159
|
+
defaultNowValue: false
|
|
4160
|
+
},
|
|
4161
|
+
数値2: {
|
|
4162
|
+
type: "NUMBER",
|
|
4163
|
+
code: "数値2",
|
|
4164
|
+
label: "数値2",
|
|
4165
|
+
noLabel: false,
|
|
4166
|
+
required: false,
|
|
4167
|
+
minValue: "",
|
|
4168
|
+
maxValue: "",
|
|
4169
|
+
digit: true,
|
|
4170
|
+
unique: false,
|
|
4171
|
+
defaultValue: "",
|
|
4172
|
+
displayScale: "2",
|
|
4173
|
+
unit: "",
|
|
4174
|
+
unitPosition: "BEFORE"
|
|
4175
|
+
},
|
|
4176
|
+
数値1: {
|
|
4177
|
+
type: "NUMBER",
|
|
4178
|
+
code: "数値1",
|
|
4179
|
+
label: "数値1",
|
|
4180
|
+
noLabel: false,
|
|
4181
|
+
required: false,
|
|
4182
|
+
minValue: "",
|
|
4183
|
+
maxValue: "",
|
|
4184
|
+
digit: false,
|
|
4185
|
+
unique: false,
|
|
4186
|
+
defaultValue: "",
|
|
4187
|
+
displayScale: "",
|
|
4188
|
+
unit: "",
|
|
4189
|
+
unitPosition: "BEFORE"
|
|
4190
|
+
},
|
|
4191
|
+
チェック1: {
|
|
4192
|
+
type: "CHECK_BOX",
|
|
4193
|
+
code: "チェック1",
|
|
4194
|
+
label: "チェック1",
|
|
4195
|
+
noLabel: false,
|
|
4196
|
+
required: false,
|
|
4197
|
+
options: {
|
|
4198
|
+
A: {
|
|
4199
|
+
label: "A",
|
|
4200
|
+
index: "0"
|
|
4201
|
+
},
|
|
4202
|
+
B: {
|
|
4203
|
+
label: "B",
|
|
4204
|
+
index: "1"
|
|
4205
|
+
},
|
|
4206
|
+
C: {
|
|
4207
|
+
label: "C",
|
|
4208
|
+
index: "2"
|
|
4209
|
+
}
|
|
4210
|
+
},
|
|
4211
|
+
defaultValue: [],
|
|
4212
|
+
align: "HORIZONTAL"
|
|
4213
|
+
},
|
|
4214
|
+
作成日時: {
|
|
4215
|
+
type: "CREATED_TIME",
|
|
4216
|
+
code: "作成日時",
|
|
4217
|
+
label: "作成日時",
|
|
4218
|
+
noLabel: false
|
|
4219
|
+
}
|
|
4220
|
+
},
|
|
4221
|
+
layout: [
|
|
4222
|
+
{
|
|
4223
|
+
type: "ROW",
|
|
4224
|
+
fields: [
|
|
4225
|
+
{
|
|
4226
|
+
type: "LABEL",
|
|
4227
|
+
label: "計算式プラグインのサンプルアプリ(全項目タイプ × 2、テーブル 2 つ)",
|
|
4228
|
+
elementId: "",
|
|
4229
|
+
size: {
|
|
4230
|
+
width: "600"
|
|
4231
|
+
}
|
|
4232
|
+
}
|
|
4233
|
+
]
|
|
4234
|
+
},
|
|
4235
|
+
{
|
|
4236
|
+
type: "ROW",
|
|
4237
|
+
fields: [
|
|
4238
|
+
{
|
|
4239
|
+
type: "SINGLE_LINE_TEXT",
|
|
4240
|
+
code: "文字列1",
|
|
4241
|
+
size: {
|
|
4242
|
+
width: "250"
|
|
4243
|
+
}
|
|
4244
|
+
},
|
|
4245
|
+
{
|
|
4246
|
+
type: "SINGLE_LINE_TEXT",
|
|
4247
|
+
code: "文字列2",
|
|
4248
|
+
size: {
|
|
4249
|
+
width: "250"
|
|
4250
|
+
}
|
|
4251
|
+
}
|
|
4252
|
+
]
|
|
4253
|
+
},
|
|
4254
|
+
{
|
|
4255
|
+
type: "ROW",
|
|
4256
|
+
fields: [
|
|
4257
|
+
{
|
|
4258
|
+
type: "MULTI_LINE_TEXT",
|
|
4259
|
+
code: "文字列複数行1",
|
|
4260
|
+
size: {
|
|
4261
|
+
width: "250",
|
|
4262
|
+
innerHeight: "125"
|
|
4263
|
+
}
|
|
4264
|
+
},
|
|
4265
|
+
{
|
|
4266
|
+
type: "MULTI_LINE_TEXT",
|
|
4267
|
+
code: "文字列複数行2",
|
|
4268
|
+
size: {
|
|
4269
|
+
width: "250",
|
|
4270
|
+
innerHeight: "125"
|
|
4271
|
+
}
|
|
4272
|
+
},
|
|
4273
|
+
{
|
|
4274
|
+
type: "SPACER",
|
|
4275
|
+
elementId: "sp1",
|
|
4276
|
+
size: {
|
|
4277
|
+
width: "458",
|
|
4278
|
+
height: "163"
|
|
4279
|
+
}
|
|
4280
|
+
}
|
|
4281
|
+
]
|
|
4282
|
+
},
|
|
4283
|
+
{
|
|
4284
|
+
type: "ROW",
|
|
4285
|
+
fields: [
|
|
4286
|
+
{
|
|
4287
|
+
type: "RICH_TEXT",
|
|
4288
|
+
code: "リッチ1",
|
|
4289
|
+
size: {
|
|
4290
|
+
width: "250",
|
|
4291
|
+
innerHeight: "125"
|
|
4292
|
+
}
|
|
4293
|
+
},
|
|
4294
|
+
{
|
|
4295
|
+
type: "RICH_TEXT",
|
|
4296
|
+
code: "リッチ2",
|
|
4297
|
+
size: {
|
|
4298
|
+
width: "250",
|
|
4299
|
+
innerHeight: "125"
|
|
4300
|
+
}
|
|
4301
|
+
}
|
|
4302
|
+
]
|
|
4303
|
+
},
|
|
4304
|
+
{
|
|
4305
|
+
type: "ROW",
|
|
4306
|
+
fields: [
|
|
4307
|
+
{
|
|
4308
|
+
type: "NUMBER",
|
|
4309
|
+
code: "数値1",
|
|
4310
|
+
size: {
|
|
4311
|
+
width: "250"
|
|
4312
|
+
}
|
|
4313
|
+
},
|
|
4314
|
+
{
|
|
4315
|
+
type: "NUMBER",
|
|
4316
|
+
code: "数値2",
|
|
4317
|
+
size: {
|
|
4318
|
+
width: "250"
|
|
4319
|
+
}
|
|
4320
|
+
}
|
|
4321
|
+
]
|
|
4322
|
+
},
|
|
4323
|
+
{
|
|
4324
|
+
type: "ROW",
|
|
4325
|
+
fields: [
|
|
4326
|
+
{
|
|
4327
|
+
type: "CALC",
|
|
4328
|
+
code: "計算1",
|
|
4329
|
+
size: {
|
|
4330
|
+
width: "250"
|
|
4331
|
+
}
|
|
4332
|
+
},
|
|
4333
|
+
{
|
|
4334
|
+
type: "CALC",
|
|
4335
|
+
code: "計算2",
|
|
4336
|
+
size: {
|
|
4337
|
+
width: "250"
|
|
4338
|
+
}
|
|
4339
|
+
}
|
|
4340
|
+
]
|
|
4341
|
+
},
|
|
4342
|
+
{
|
|
4343
|
+
type: "ROW",
|
|
4344
|
+
fields: [
|
|
4345
|
+
{
|
|
4346
|
+
type: "RADIO_BUTTON",
|
|
4347
|
+
code: "ラジオ1",
|
|
4348
|
+
size: {
|
|
4349
|
+
width: "250"
|
|
4350
|
+
}
|
|
4351
|
+
},
|
|
4352
|
+
{
|
|
4353
|
+
type: "RADIO_BUTTON",
|
|
4354
|
+
code: "ラジオ2",
|
|
4355
|
+
size: {
|
|
4356
|
+
width: "250"
|
|
4357
|
+
}
|
|
4358
|
+
}
|
|
4359
|
+
]
|
|
4360
|
+
},
|
|
4361
|
+
{
|
|
4362
|
+
type: "ROW",
|
|
4363
|
+
fields: [
|
|
4364
|
+
{
|
|
4365
|
+
type: "CHECK_BOX",
|
|
4366
|
+
code: "チェック1",
|
|
4367
|
+
size: {
|
|
4368
|
+
width: "250"
|
|
4369
|
+
}
|
|
4370
|
+
},
|
|
4371
|
+
{
|
|
4372
|
+
type: "CHECK_BOX",
|
|
4373
|
+
code: "チェック2",
|
|
4374
|
+
size: {
|
|
4375
|
+
width: "250"
|
|
4376
|
+
}
|
|
4377
|
+
}
|
|
4378
|
+
]
|
|
4379
|
+
},
|
|
4380
|
+
{
|
|
4381
|
+
type: "ROW",
|
|
4382
|
+
fields: [
|
|
4383
|
+
{
|
|
4384
|
+
type: "MULTI_SELECT",
|
|
4385
|
+
code: "複数選択1",
|
|
4386
|
+
size: {
|
|
4387
|
+
width: "250"
|
|
4388
|
+
}
|
|
4389
|
+
},
|
|
4390
|
+
{
|
|
4391
|
+
type: "MULTI_SELECT",
|
|
4392
|
+
code: "複数選択2",
|
|
4393
|
+
size: {
|
|
4394
|
+
width: "250"
|
|
4395
|
+
}
|
|
4396
|
+
}
|
|
4397
|
+
]
|
|
4398
|
+
},
|
|
4399
|
+
{
|
|
4400
|
+
type: "ROW",
|
|
4401
|
+
fields: [
|
|
4402
|
+
{
|
|
4403
|
+
type: "DROP_DOWN",
|
|
4404
|
+
code: "ドロップダウン1",
|
|
4405
|
+
size: {
|
|
4406
|
+
width: "250"
|
|
4407
|
+
}
|
|
4408
|
+
},
|
|
4409
|
+
{
|
|
4410
|
+
type: "DROP_DOWN",
|
|
4411
|
+
code: "ドロップダウン2",
|
|
4412
|
+
size: {
|
|
4413
|
+
width: "250"
|
|
4414
|
+
}
|
|
4415
|
+
}
|
|
4416
|
+
]
|
|
4417
|
+
},
|
|
4418
|
+
{
|
|
4419
|
+
type: "ROW",
|
|
4420
|
+
fields: [
|
|
4421
|
+
{
|
|
4422
|
+
type: "DATE",
|
|
4423
|
+
code: "日付1",
|
|
4424
|
+
size: {
|
|
4425
|
+
width: "250"
|
|
4426
|
+
}
|
|
4427
|
+
},
|
|
4428
|
+
{
|
|
4429
|
+
type: "DATE",
|
|
4430
|
+
code: "日付2",
|
|
4431
|
+
size: {
|
|
4432
|
+
width: "250"
|
|
4433
|
+
}
|
|
4434
|
+
}
|
|
4435
|
+
]
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
type: "ROW",
|
|
4439
|
+
fields: [
|
|
4440
|
+
{
|
|
4441
|
+
type: "TIME",
|
|
4442
|
+
code: "時刻1",
|
|
4443
|
+
size: {
|
|
4444
|
+
width: "250"
|
|
4445
|
+
}
|
|
4446
|
+
},
|
|
4447
|
+
{
|
|
4448
|
+
type: "TIME",
|
|
4449
|
+
code: "時刻2",
|
|
4450
|
+
size: {
|
|
4451
|
+
width: "250"
|
|
4452
|
+
}
|
|
4453
|
+
}
|
|
4454
|
+
]
|
|
4455
|
+
},
|
|
4456
|
+
{
|
|
4457
|
+
type: "ROW",
|
|
4458
|
+
fields: [
|
|
4459
|
+
{
|
|
4460
|
+
type: "DATETIME",
|
|
4461
|
+
code: "日時1",
|
|
4462
|
+
size: {
|
|
4463
|
+
width: "250"
|
|
4464
|
+
}
|
|
4465
|
+
},
|
|
4466
|
+
{
|
|
4467
|
+
type: "DATETIME",
|
|
4468
|
+
code: "日時2",
|
|
4469
|
+
size: {
|
|
4470
|
+
width: "250"
|
|
4471
|
+
}
|
|
4472
|
+
}
|
|
4473
|
+
]
|
|
4474
|
+
},
|
|
4475
|
+
{
|
|
4476
|
+
type: "ROW",
|
|
4477
|
+
fields: [
|
|
4478
|
+
{
|
|
4479
|
+
type: "HR",
|
|
4480
|
+
elementId: "",
|
|
4481
|
+
size: {
|
|
4482
|
+
width: "600"
|
|
4483
|
+
}
|
|
4484
|
+
}
|
|
4485
|
+
]
|
|
4486
|
+
},
|
|
4487
|
+
{
|
|
4488
|
+
type: "ROW",
|
|
4489
|
+
fields: [
|
|
4490
|
+
{
|
|
4491
|
+
type: "FILE",
|
|
4492
|
+
code: "添付1",
|
|
4493
|
+
size: {
|
|
4494
|
+
width: "250"
|
|
4495
|
+
}
|
|
4496
|
+
},
|
|
4497
|
+
{
|
|
4498
|
+
type: "FILE",
|
|
4499
|
+
code: "添付2",
|
|
4500
|
+
size: {
|
|
4501
|
+
width: "250"
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4504
|
+
]
|
|
4505
|
+
},
|
|
4506
|
+
{
|
|
4507
|
+
type: "ROW",
|
|
4508
|
+
fields: [
|
|
4509
|
+
{
|
|
4510
|
+
type: "LINK",
|
|
4511
|
+
code: "リンク1",
|
|
4512
|
+
size: {
|
|
4513
|
+
width: "250"
|
|
4514
|
+
}
|
|
4515
|
+
},
|
|
4516
|
+
{
|
|
4517
|
+
type: "LINK",
|
|
4518
|
+
code: "リンク2",
|
|
4519
|
+
size: {
|
|
4520
|
+
width: "250"
|
|
4521
|
+
}
|
|
4522
|
+
}
|
|
4523
|
+
]
|
|
4524
|
+
},
|
|
4525
|
+
{
|
|
4526
|
+
type: "ROW",
|
|
4527
|
+
fields: [
|
|
4528
|
+
{
|
|
4529
|
+
type: "USER_SELECT",
|
|
4530
|
+
code: "ユーザー1",
|
|
4531
|
+
size: {
|
|
4532
|
+
width: "250"
|
|
4533
|
+
}
|
|
4534
|
+
},
|
|
4535
|
+
{
|
|
4536
|
+
type: "USER_SELECT",
|
|
4537
|
+
code: "ユーザー2",
|
|
4538
|
+
size: {
|
|
4539
|
+
width: "250"
|
|
4540
|
+
}
|
|
4541
|
+
}
|
|
4542
|
+
]
|
|
4543
|
+
},
|
|
4544
|
+
{
|
|
4545
|
+
type: "ROW",
|
|
4546
|
+
fields: [
|
|
4547
|
+
{
|
|
4548
|
+
type: "ORGANIZATION_SELECT",
|
|
4549
|
+
code: "組織1",
|
|
4550
|
+
size: {
|
|
4551
|
+
width: "250"
|
|
4552
|
+
}
|
|
4553
|
+
},
|
|
4554
|
+
{
|
|
4555
|
+
type: "ORGANIZATION_SELECT",
|
|
4556
|
+
code: "組織2",
|
|
4557
|
+
size: {
|
|
4558
|
+
width: "250"
|
|
4559
|
+
}
|
|
4560
|
+
}
|
|
4561
|
+
]
|
|
4562
|
+
},
|
|
4563
|
+
{
|
|
4564
|
+
type: "ROW",
|
|
4565
|
+
fields: [
|
|
4566
|
+
{
|
|
4567
|
+
type: "GROUP_SELECT",
|
|
4568
|
+
code: "グループ1",
|
|
4569
|
+
size: {
|
|
4570
|
+
width: "250"
|
|
4571
|
+
}
|
|
4572
|
+
},
|
|
4573
|
+
{
|
|
4574
|
+
type: "GROUP_SELECT",
|
|
4575
|
+
code: "グループ2",
|
|
4576
|
+
size: {
|
|
4577
|
+
width: "250"
|
|
4578
|
+
}
|
|
4579
|
+
}
|
|
4580
|
+
]
|
|
4581
|
+
},
|
|
4582
|
+
{
|
|
4583
|
+
type: "GROUP",
|
|
4584
|
+
code: "グループ枠1",
|
|
4585
|
+
layout: [
|
|
4586
|
+
{
|
|
4587
|
+
type: "ROW",
|
|
4588
|
+
fields: [
|
|
4589
|
+
{
|
|
4590
|
+
type: "SINGLE_LINE_TEXT",
|
|
4591
|
+
code: "枠内文字列1",
|
|
4592
|
+
size: {
|
|
4593
|
+
width: "250"
|
|
4594
|
+
}
|
|
4595
|
+
},
|
|
4596
|
+
{
|
|
4597
|
+
type: "NUMBER",
|
|
4598
|
+
code: "枠内数値1",
|
|
4599
|
+
size: {
|
|
4600
|
+
width: "250"
|
|
4601
|
+
}
|
|
4602
|
+
}
|
|
4603
|
+
]
|
|
4604
|
+
}
|
|
4605
|
+
]
|
|
4606
|
+
},
|
|
4607
|
+
{
|
|
4608
|
+
type: "ROW",
|
|
4609
|
+
fields: [
|
|
4610
|
+
{
|
|
4611
|
+
type: "SPACER",
|
|
4612
|
+
elementId: "",
|
|
4613
|
+
size: {
|
|
4614
|
+
width: "600",
|
|
4615
|
+
height: "20"
|
|
4616
|
+
}
|
|
4617
|
+
}
|
|
4618
|
+
]
|
|
4619
|
+
},
|
|
4620
|
+
{
|
|
4621
|
+
type: "SUBTABLE",
|
|
4622
|
+
code: "テーブル1",
|
|
4623
|
+
fields: [
|
|
4624
|
+
{
|
|
4625
|
+
type: "SINGLE_LINE_TEXT",
|
|
4626
|
+
code: "T1_文字列",
|
|
4627
|
+
size: {
|
|
4628
|
+
width: "150"
|
|
4629
|
+
}
|
|
4630
|
+
},
|
|
4631
|
+
{
|
|
4632
|
+
type: "MULTI_LINE_TEXT",
|
|
4633
|
+
code: "T1_文字列複数行",
|
|
4634
|
+
size: {
|
|
4635
|
+
width: "150",
|
|
4636
|
+
innerHeight: "125"
|
|
4637
|
+
}
|
|
4638
|
+
},
|
|
4639
|
+
{
|
|
4640
|
+
type: "RICH_TEXT",
|
|
4641
|
+
code: "T1_リッチ",
|
|
4642
|
+
size: {
|
|
4643
|
+
width: "150",
|
|
4644
|
+
innerHeight: "125"
|
|
4645
|
+
}
|
|
4646
|
+
},
|
|
4647
|
+
{
|
|
4648
|
+
type: "NUMBER",
|
|
4649
|
+
code: "T1_数値",
|
|
4650
|
+
size: {
|
|
4651
|
+
width: "150"
|
|
4652
|
+
}
|
|
4653
|
+
},
|
|
4654
|
+
{
|
|
4655
|
+
type: "CALC",
|
|
4656
|
+
code: "T1_計算",
|
|
4657
|
+
size: {
|
|
4658
|
+
width: "150"
|
|
4659
|
+
}
|
|
4660
|
+
},
|
|
4661
|
+
{
|
|
4662
|
+
type: "RADIO_BUTTON",
|
|
4663
|
+
code: "T1_ラジオ",
|
|
4664
|
+
size: {
|
|
4665
|
+
width: "227"
|
|
4666
|
+
}
|
|
4667
|
+
},
|
|
4668
|
+
{
|
|
4669
|
+
type: "CHECK_BOX",
|
|
4670
|
+
code: "T1_チェック",
|
|
4671
|
+
size: {
|
|
4672
|
+
width: "227"
|
|
4673
|
+
}
|
|
4674
|
+
},
|
|
4675
|
+
{
|
|
4676
|
+
type: "MULTI_SELECT",
|
|
4677
|
+
code: "T1_複数選択",
|
|
4678
|
+
size: {
|
|
4679
|
+
width: "150"
|
|
4680
|
+
}
|
|
4681
|
+
},
|
|
4682
|
+
{
|
|
4683
|
+
type: "DROP_DOWN",
|
|
4684
|
+
code: "T1_ドロップダウン",
|
|
4685
|
+
size: {
|
|
4686
|
+
width: "158"
|
|
4687
|
+
}
|
|
4688
|
+
},
|
|
4689
|
+
{
|
|
4690
|
+
type: "DATE",
|
|
4691
|
+
code: "T1_日付",
|
|
4692
|
+
size: {
|
|
4693
|
+
width: "150"
|
|
4694
|
+
}
|
|
4695
|
+
},
|
|
4696
|
+
{
|
|
4697
|
+
type: "TIME",
|
|
4698
|
+
code: "T1_時刻",
|
|
4699
|
+
size: {
|
|
4700
|
+
width: "150"
|
|
4701
|
+
}
|
|
4702
|
+
},
|
|
4703
|
+
{
|
|
4704
|
+
type: "DATETIME",
|
|
4705
|
+
code: "T1_日時",
|
|
4706
|
+
size: {
|
|
4707
|
+
width: "150"
|
|
4708
|
+
}
|
|
4709
|
+
},
|
|
4710
|
+
{
|
|
4711
|
+
type: "FILE",
|
|
4712
|
+
code: "T1_添付",
|
|
4713
|
+
size: {
|
|
4714
|
+
width: "150"
|
|
4715
|
+
}
|
|
4716
|
+
},
|
|
4717
|
+
{
|
|
4718
|
+
type: "LINK",
|
|
4719
|
+
code: "T1_リンク",
|
|
4720
|
+
size: {
|
|
4721
|
+
width: "150"
|
|
4722
|
+
}
|
|
4723
|
+
},
|
|
4724
|
+
{
|
|
4725
|
+
type: "USER_SELECT",
|
|
4726
|
+
code: "T1_ユーザー",
|
|
4727
|
+
size: {
|
|
4728
|
+
width: "150"
|
|
4729
|
+
}
|
|
4730
|
+
},
|
|
4731
|
+
{
|
|
4732
|
+
type: "ORGANIZATION_SELECT",
|
|
4733
|
+
code: "T1_組織",
|
|
4734
|
+
size: {
|
|
4735
|
+
width: "150"
|
|
4736
|
+
}
|
|
4737
|
+
},
|
|
4738
|
+
{
|
|
4739
|
+
type: "GROUP_SELECT",
|
|
4740
|
+
code: "T1_グループ",
|
|
4741
|
+
size: {
|
|
4742
|
+
width: "150"
|
|
4743
|
+
}
|
|
4744
|
+
}
|
|
4745
|
+
]
|
|
4746
|
+
},
|
|
4747
|
+
{
|
|
4748
|
+
type: "SUBTABLE",
|
|
4749
|
+
code: "テーブル2",
|
|
4750
|
+
fields: [
|
|
4751
|
+
{
|
|
4752
|
+
type: "SINGLE_LINE_TEXT",
|
|
4753
|
+
code: "T2_文字列",
|
|
4754
|
+
size: {
|
|
4755
|
+
width: "150"
|
|
4756
|
+
}
|
|
4757
|
+
},
|
|
4758
|
+
{
|
|
4759
|
+
type: "MULTI_LINE_TEXT",
|
|
4760
|
+
code: "T2_文字列複数行",
|
|
4761
|
+
size: {
|
|
4762
|
+
width: "150",
|
|
4763
|
+
innerHeight: "125"
|
|
4764
|
+
}
|
|
4765
|
+
},
|
|
4766
|
+
{
|
|
4767
|
+
type: "RICH_TEXT",
|
|
4768
|
+
code: "T2_リッチ",
|
|
4769
|
+
size: {
|
|
4770
|
+
width: "150",
|
|
4771
|
+
innerHeight: "125"
|
|
4772
|
+
}
|
|
4773
|
+
},
|
|
4774
|
+
{
|
|
4775
|
+
type: "NUMBER",
|
|
4776
|
+
code: "T2_数値",
|
|
4777
|
+
size: {
|
|
4778
|
+
width: "150"
|
|
4779
|
+
}
|
|
4780
|
+
},
|
|
4781
|
+
{
|
|
4782
|
+
type: "CALC",
|
|
4783
|
+
code: "T2_計算",
|
|
4784
|
+
size: {
|
|
4785
|
+
width: "150"
|
|
4786
|
+
}
|
|
4787
|
+
},
|
|
4788
|
+
{
|
|
4789
|
+
type: "RADIO_BUTTON",
|
|
4790
|
+
code: "T2_ラジオ",
|
|
4791
|
+
size: {
|
|
4792
|
+
width: "227"
|
|
4793
|
+
}
|
|
4794
|
+
},
|
|
4795
|
+
{
|
|
4796
|
+
type: "CHECK_BOX",
|
|
4797
|
+
code: "T2_チェック",
|
|
4798
|
+
size: {
|
|
4799
|
+
width: "227"
|
|
4800
|
+
}
|
|
4801
|
+
},
|
|
4802
|
+
{
|
|
4803
|
+
type: "MULTI_SELECT",
|
|
4804
|
+
code: "T2_複数選択",
|
|
4805
|
+
size: {
|
|
4806
|
+
width: "150"
|
|
4807
|
+
}
|
|
4808
|
+
},
|
|
4809
|
+
{
|
|
4810
|
+
type: "DROP_DOWN",
|
|
4811
|
+
code: "T2_ドロップダウン",
|
|
4812
|
+
size: {
|
|
4813
|
+
width: "158"
|
|
4814
|
+
}
|
|
4815
|
+
},
|
|
4816
|
+
{
|
|
4817
|
+
type: "DATE",
|
|
4818
|
+
code: "T2_日付",
|
|
4819
|
+
size: {
|
|
4820
|
+
width: "150"
|
|
4821
|
+
}
|
|
4822
|
+
},
|
|
4823
|
+
{
|
|
4824
|
+
type: "TIME",
|
|
4825
|
+
code: "T2_時刻",
|
|
4826
|
+
size: {
|
|
4827
|
+
width: "150"
|
|
4828
|
+
}
|
|
4829
|
+
},
|
|
4830
|
+
{
|
|
4831
|
+
type: "DATETIME",
|
|
4832
|
+
code: "T2_日時",
|
|
4833
|
+
size: {
|
|
4834
|
+
width: "150"
|
|
4835
|
+
}
|
|
4836
|
+
},
|
|
4837
|
+
{
|
|
4838
|
+
type: "FILE",
|
|
4839
|
+
code: "T2_添付",
|
|
4840
|
+
size: {
|
|
4841
|
+
width: "150"
|
|
4842
|
+
}
|
|
4843
|
+
},
|
|
4844
|
+
{
|
|
4845
|
+
type: "LINK",
|
|
4846
|
+
code: "T2_リンク",
|
|
4847
|
+
size: {
|
|
4848
|
+
width: "150"
|
|
4849
|
+
}
|
|
4850
|
+
},
|
|
4851
|
+
{
|
|
4852
|
+
type: "USER_SELECT",
|
|
4853
|
+
code: "T2_ユーザー",
|
|
4854
|
+
size: {
|
|
4855
|
+
width: "150"
|
|
4856
|
+
}
|
|
4857
|
+
},
|
|
4858
|
+
{
|
|
4859
|
+
type: "ORGANIZATION_SELECT",
|
|
4860
|
+
code: "T2_組織",
|
|
4861
|
+
size: {
|
|
4862
|
+
width: "150"
|
|
4863
|
+
}
|
|
4864
|
+
},
|
|
4865
|
+
{
|
|
4866
|
+
type: "GROUP_SELECT",
|
|
4867
|
+
code: "T2_グループ",
|
|
4868
|
+
size: {
|
|
4869
|
+
width: "150"
|
|
4870
|
+
}
|
|
4871
|
+
}
|
|
4872
|
+
]
|
|
4873
|
+
},
|
|
4874
|
+
{
|
|
4875
|
+
type: "ROW",
|
|
4876
|
+
fields: [
|
|
4877
|
+
{
|
|
4878
|
+
type: "RECORD_NUMBER",
|
|
4879
|
+
code: "レコード番号",
|
|
4880
|
+
size: {
|
|
4881
|
+
width: "250"
|
|
4882
|
+
}
|
|
4883
|
+
},
|
|
4884
|
+
{
|
|
4885
|
+
type: "CREATOR",
|
|
4886
|
+
code: "作成者",
|
|
4887
|
+
size: {
|
|
4888
|
+
width: "250"
|
|
4889
|
+
}
|
|
4890
|
+
}
|
|
4891
|
+
]
|
|
4892
|
+
},
|
|
4893
|
+
{
|
|
4894
|
+
type: "ROW",
|
|
4895
|
+
fields: [
|
|
4896
|
+
{
|
|
4897
|
+
type: "CREATED_TIME",
|
|
4898
|
+
code: "作成日時",
|
|
4899
|
+
size: {
|
|
4900
|
+
width: "250"
|
|
4901
|
+
}
|
|
4902
|
+
},
|
|
4903
|
+
{
|
|
4904
|
+
type: "MODIFIER",
|
|
4905
|
+
code: "更新者",
|
|
4906
|
+
size: {
|
|
4907
|
+
width: "250"
|
|
4908
|
+
}
|
|
4909
|
+
}
|
|
4910
|
+
]
|
|
4911
|
+
},
|
|
4912
|
+
{
|
|
4913
|
+
type: "ROW",
|
|
4914
|
+
fields: [
|
|
4915
|
+
{
|
|
4916
|
+
type: "UPDATED_TIME",
|
|
4917
|
+
code: "更新日時",
|
|
4918
|
+
size: {
|
|
4919
|
+
width: "250"
|
|
4920
|
+
}
|
|
4921
|
+
}
|
|
4922
|
+
]
|
|
4923
|
+
}
|
|
4924
|
+
],
|
|
4925
|
+
views: {
|
|
4926
|
+
"(作業者が自分)": {
|
|
4927
|
+
type: "LIST",
|
|
4928
|
+
name: "(作業者が自分)",
|
|
4929
|
+
id: "16550400",
|
|
4930
|
+
filterCond: "作業者 in (LOGINUSER())",
|
|
4931
|
+
sort: "レコード番号 desc",
|
|
4932
|
+
index: "0",
|
|
4933
|
+
fields: [
|
|
4934
|
+
"レコード番号",
|
|
4935
|
+
"文字列1",
|
|
4936
|
+
"文字列2",
|
|
4937
|
+
"文字列複数行1",
|
|
4938
|
+
"文字列複数行2",
|
|
4939
|
+
"リッチ1",
|
|
4940
|
+
"リッチ2",
|
|
4941
|
+
"数値1",
|
|
4942
|
+
"数値2",
|
|
4943
|
+
"計算1",
|
|
4944
|
+
"計算2",
|
|
4945
|
+
"ラジオ1",
|
|
4946
|
+
"ラジオ2",
|
|
4947
|
+
"チェック1",
|
|
4948
|
+
"チェック2",
|
|
4949
|
+
"複数選択1",
|
|
4950
|
+
"複数選択2",
|
|
4951
|
+
"ドロップダウン1",
|
|
4952
|
+
"ドロップダウン2",
|
|
4953
|
+
"日付1",
|
|
4954
|
+
"日付2",
|
|
4955
|
+
"時刻1",
|
|
4956
|
+
"時刻2",
|
|
4957
|
+
"日時1",
|
|
4958
|
+
"日時2",
|
|
4959
|
+
"添付1",
|
|
4960
|
+
"添付2",
|
|
4961
|
+
"リンク1",
|
|
4962
|
+
"リンク2",
|
|
4963
|
+
"ユーザー1",
|
|
4964
|
+
"ユーザー2",
|
|
4965
|
+
"組織1",
|
|
4966
|
+
"組織2",
|
|
4967
|
+
"グループ1",
|
|
4968
|
+
"グループ2",
|
|
4969
|
+
"枠内文字列1",
|
|
4970
|
+
"枠内数値1",
|
|
4971
|
+
"ステータス",
|
|
4972
|
+
"作業者"
|
|
4973
|
+
],
|
|
4974
|
+
builtinType: "ASSIGNEE"
|
|
4975
|
+
}
|
|
4976
|
+
}
|
|
4977
|
+
};
|
|
4978
|
+
|
|
4979
|
+
// src/sample-app/record-1.json
|
|
4980
|
+
var record_1_default = {
|
|
4981
|
+
tool: "formula-authoring record",
|
|
4982
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
4983
|
+
baseUrl: "https://example.cybozu.com",
|
|
4984
|
+
appId: 4329,
|
|
4985
|
+
id: 1,
|
|
4986
|
+
record: {
|
|
4987
|
+
チェック2: {
|
|
4988
|
+
type: "CHECK_BOX",
|
|
4989
|
+
value: [
|
|
4990
|
+
"甲"
|
|
4991
|
+
]
|
|
4992
|
+
},
|
|
4993
|
+
レコード番号: {
|
|
4994
|
+
type: "RECORD_NUMBER",
|
|
4995
|
+
value: "1"
|
|
4996
|
+
},
|
|
4997
|
+
ドロップダウン2: {
|
|
4998
|
+
type: "DROP_DOWN",
|
|
4999
|
+
value: "乙"
|
|
5000
|
+
},
|
|
5001
|
+
ユーザー2: {
|
|
5002
|
+
type: "USER_SELECT",
|
|
5003
|
+
value: [
|
|
5004
|
+
{
|
|
5005
|
+
code: "demo_user01",
|
|
5006
|
+
name: "架空 社長"
|
|
5007
|
+
},
|
|
5008
|
+
{
|
|
5009
|
+
code: "demo_user02",
|
|
5010
|
+
name: "架空 営業部長"
|
|
5011
|
+
}
|
|
5012
|
+
]
|
|
5013
|
+
},
|
|
5014
|
+
組織1: {
|
|
5015
|
+
type: "ORGANIZATION_SELECT",
|
|
5016
|
+
value: [
|
|
5017
|
+
{
|
|
5018
|
+
code: "demo_hq",
|
|
5019
|
+
name: "架空本社"
|
|
5020
|
+
}
|
|
5021
|
+
]
|
|
5022
|
+
},
|
|
5023
|
+
ドロップダウン1: {
|
|
5024
|
+
type: "DROP_DOWN",
|
|
5025
|
+
value: "A"
|
|
5026
|
+
},
|
|
5027
|
+
更新者: {
|
|
5028
|
+
type: "MODIFIER",
|
|
5029
|
+
value: {
|
|
5030
|
+
code: "demo_user02",
|
|
5031
|
+
name: "架空 営業部長"
|
|
5032
|
+
}
|
|
5033
|
+
},
|
|
5034
|
+
ユーザー1: {
|
|
5035
|
+
type: "USER_SELECT",
|
|
5036
|
+
value: [
|
|
5037
|
+
{
|
|
5038
|
+
code: "demo_user01",
|
|
5039
|
+
name: "架空 社長"
|
|
5040
|
+
}
|
|
5041
|
+
]
|
|
5042
|
+
},
|
|
5043
|
+
組織2: {
|
|
5044
|
+
type: "ORGANIZATION_SELECT",
|
|
5045
|
+
value: [
|
|
5046
|
+
{
|
|
5047
|
+
code: "demo_sales",
|
|
5048
|
+
name: "架空営業部"
|
|
5049
|
+
}
|
|
5050
|
+
]
|
|
5051
|
+
},
|
|
5052
|
+
テーブル2: {
|
|
5053
|
+
type: "SUBTABLE",
|
|
5054
|
+
value: [
|
|
5055
|
+
{
|
|
5056
|
+
id: "7727389",
|
|
5057
|
+
value: {
|
|
5058
|
+
T2_複数選択: {
|
|
5059
|
+
type: "MULTI_SELECT",
|
|
5060
|
+
value: [
|
|
5061
|
+
"B"
|
|
5062
|
+
]
|
|
5063
|
+
},
|
|
5064
|
+
T2_文字列複数行: {
|
|
5065
|
+
type: "MULTI_LINE_TEXT",
|
|
5066
|
+
value: "T2 行 1\n2 行目"
|
|
5067
|
+
},
|
|
5068
|
+
T2_リンク: {
|
|
5069
|
+
type: "LINK",
|
|
5070
|
+
value: "https://example.com/"
|
|
5071
|
+
},
|
|
5072
|
+
T2_リッチ: {
|
|
5073
|
+
type: "RICH_TEXT",
|
|
5074
|
+
value: "<div>T2 行 1</div>"
|
|
5075
|
+
},
|
|
5076
|
+
T2_文字列: {
|
|
5077
|
+
type: "SINGLE_LINE_TEXT",
|
|
5078
|
+
value: "T2 行 1"
|
|
5079
|
+
},
|
|
5080
|
+
T2_チェック: {
|
|
5081
|
+
type: "CHECK_BOX",
|
|
5082
|
+
value: [
|
|
5083
|
+
"A"
|
|
5084
|
+
]
|
|
5085
|
+
},
|
|
5086
|
+
T2_ユーザー: {
|
|
5087
|
+
type: "USER_SELECT",
|
|
5088
|
+
value: [
|
|
5089
|
+
{
|
|
5090
|
+
code: "demo_user01",
|
|
5091
|
+
name: "架空 社長"
|
|
5092
|
+
}
|
|
5093
|
+
]
|
|
5094
|
+
},
|
|
5095
|
+
T2_グループ: {
|
|
5096
|
+
type: "GROUP_SELECT",
|
|
5097
|
+
value: [
|
|
5098
|
+
{
|
|
5099
|
+
code: "demo_managers",
|
|
5100
|
+
name: "架空管理職"
|
|
5101
|
+
}
|
|
5102
|
+
]
|
|
5103
|
+
},
|
|
5104
|
+
T2_日付: {
|
|
5105
|
+
type: "DATE",
|
|
5106
|
+
value: "2026-02-01"
|
|
5107
|
+
},
|
|
5108
|
+
T2_数値: {
|
|
5109
|
+
type: "NUMBER",
|
|
5110
|
+
value: "10"
|
|
5111
|
+
},
|
|
5112
|
+
T2_ドロップダウン: {
|
|
5113
|
+
type: "DROP_DOWN",
|
|
5114
|
+
value: "C"
|
|
5115
|
+
},
|
|
5116
|
+
T2_組織: {
|
|
5117
|
+
type: "ORGANIZATION_SELECT",
|
|
5118
|
+
value: [
|
|
5119
|
+
{
|
|
5120
|
+
code: "demo_hq",
|
|
5121
|
+
name: "架空本社"
|
|
5122
|
+
}
|
|
5123
|
+
]
|
|
5124
|
+
},
|
|
5125
|
+
T2_計算: {
|
|
5126
|
+
type: "CALC",
|
|
5127
|
+
value: "20"
|
|
5128
|
+
},
|
|
5129
|
+
T2_ラジオ: {
|
|
5130
|
+
type: "RADIO_BUTTON",
|
|
5131
|
+
value: "A"
|
|
5132
|
+
},
|
|
5133
|
+
T2_日時: {
|
|
5134
|
+
type: "DATETIME",
|
|
5135
|
+
value: "2026-02-01T00:30:00Z"
|
|
5136
|
+
},
|
|
5137
|
+
T2_添付: {
|
|
5138
|
+
type: "FILE",
|
|
5139
|
+
value: []
|
|
5140
|
+
},
|
|
5141
|
+
T2_時刻: {
|
|
5142
|
+
type: "TIME",
|
|
5143
|
+
value: "09:30"
|
|
5144
|
+
}
|
|
5145
|
+
}
|
|
5146
|
+
},
|
|
5147
|
+
{
|
|
5148
|
+
id: "7727392",
|
|
5149
|
+
value: {
|
|
5150
|
+
T2_複数選択: {
|
|
5151
|
+
type: "MULTI_SELECT",
|
|
5152
|
+
value: [
|
|
5153
|
+
"B"
|
|
5154
|
+
]
|
|
5155
|
+
},
|
|
5156
|
+
T2_文字列複数行: {
|
|
5157
|
+
type: "MULTI_LINE_TEXT",
|
|
5158
|
+
value: "T2 行 2\n2 行目"
|
|
5159
|
+
},
|
|
5160
|
+
T2_リンク: {
|
|
5161
|
+
type: "LINK",
|
|
5162
|
+
value: "https://example.com/"
|
|
5163
|
+
},
|
|
5164
|
+
T2_リッチ: {
|
|
5165
|
+
type: "RICH_TEXT",
|
|
5166
|
+
value: "<div>T2 行 2</div>"
|
|
5167
|
+
},
|
|
5168
|
+
T2_文字列: {
|
|
5169
|
+
type: "SINGLE_LINE_TEXT",
|
|
5170
|
+
value: "T2 行 2"
|
|
5171
|
+
},
|
|
5172
|
+
T2_チェック: {
|
|
5173
|
+
type: "CHECK_BOX",
|
|
5174
|
+
value: [
|
|
5175
|
+
"A"
|
|
5176
|
+
]
|
|
5177
|
+
},
|
|
5178
|
+
T2_ユーザー: {
|
|
5179
|
+
type: "USER_SELECT",
|
|
5180
|
+
value: [
|
|
5181
|
+
{
|
|
5182
|
+
code: "demo_user01",
|
|
5183
|
+
name: "架空 社長"
|
|
5184
|
+
}
|
|
5185
|
+
]
|
|
5186
|
+
},
|
|
5187
|
+
T2_グループ: {
|
|
5188
|
+
type: "GROUP_SELECT",
|
|
5189
|
+
value: [
|
|
5190
|
+
{
|
|
5191
|
+
code: "demo_managers",
|
|
5192
|
+
name: "架空管理職"
|
|
5193
|
+
}
|
|
5194
|
+
]
|
|
5195
|
+
},
|
|
5196
|
+
T2_日付: {
|
|
5197
|
+
type: "DATE",
|
|
5198
|
+
value: "2026-02-02"
|
|
5199
|
+
},
|
|
5200
|
+
T2_数値: {
|
|
5201
|
+
type: "NUMBER",
|
|
5202
|
+
value: "20"
|
|
5203
|
+
},
|
|
5204
|
+
T2_ドロップダウン: {
|
|
5205
|
+
type: "DROP_DOWN",
|
|
5206
|
+
value: "B"
|
|
5207
|
+
},
|
|
5208
|
+
T2_組織: {
|
|
5209
|
+
type: "ORGANIZATION_SELECT",
|
|
5210
|
+
value: [
|
|
5211
|
+
{
|
|
5212
|
+
code: "demo_hq",
|
|
5213
|
+
name: "架空本社"
|
|
5214
|
+
}
|
|
5215
|
+
]
|
|
5216
|
+
},
|
|
5217
|
+
T2_計算: {
|
|
5218
|
+
type: "CALC",
|
|
5219
|
+
value: "40"
|
|
5220
|
+
},
|
|
5221
|
+
T2_ラジオ: {
|
|
5222
|
+
type: "RADIO_BUTTON",
|
|
5223
|
+
value: "A"
|
|
5224
|
+
},
|
|
5225
|
+
T2_日時: {
|
|
5226
|
+
type: "DATETIME",
|
|
5227
|
+
value: "2026-02-02T00:30:00Z"
|
|
5228
|
+
},
|
|
5229
|
+
T2_添付: {
|
|
5230
|
+
type: "FILE",
|
|
5231
|
+
value: []
|
|
5232
|
+
},
|
|
5233
|
+
T2_時刻: {
|
|
5234
|
+
type: "TIME",
|
|
5235
|
+
value: "09:30"
|
|
5236
|
+
}
|
|
5237
|
+
}
|
|
5238
|
+
}
|
|
5239
|
+
]
|
|
5240
|
+
},
|
|
5241
|
+
ステータス: {
|
|
5242
|
+
type: "STATUS",
|
|
5243
|
+
value: "未処理"
|
|
5244
|
+
},
|
|
5245
|
+
グループ1: {
|
|
5246
|
+
type: "GROUP_SELECT",
|
|
5247
|
+
value: [
|
|
5248
|
+
{
|
|
5249
|
+
code: "demo_managers",
|
|
5250
|
+
name: "架空管理職"
|
|
5251
|
+
}
|
|
5252
|
+
]
|
|
5253
|
+
},
|
|
5254
|
+
テーブル1: {
|
|
5255
|
+
type: "SUBTABLE",
|
|
5256
|
+
value: [
|
|
5257
|
+
{
|
|
5258
|
+
id: "7727380",
|
|
5259
|
+
value: {
|
|
5260
|
+
T1_ユーザー: {
|
|
5261
|
+
type: "USER_SELECT",
|
|
5262
|
+
value: [
|
|
5263
|
+
{
|
|
5264
|
+
code: "demo_user01",
|
|
5265
|
+
name: "架空 社長"
|
|
5266
|
+
}
|
|
5267
|
+
]
|
|
5268
|
+
},
|
|
5269
|
+
T1_文字列複数行: {
|
|
5270
|
+
type: "MULTI_LINE_TEXT",
|
|
5271
|
+
value: "行 1\n2 行目"
|
|
5272
|
+
},
|
|
5273
|
+
T1_ラジオ: {
|
|
5274
|
+
type: "RADIO_BUTTON",
|
|
5275
|
+
value: "A"
|
|
5276
|
+
},
|
|
5277
|
+
T1_複数選択: {
|
|
5278
|
+
type: "MULTI_SELECT",
|
|
5279
|
+
value: [
|
|
5280
|
+
"B"
|
|
5281
|
+
]
|
|
5282
|
+
},
|
|
5283
|
+
T1_日付: {
|
|
5284
|
+
type: "DATE",
|
|
5285
|
+
value: "2026-01-10"
|
|
5286
|
+
},
|
|
5287
|
+
T1_ドロップダウン: {
|
|
5288
|
+
type: "DROP_DOWN",
|
|
5289
|
+
value: "A"
|
|
5290
|
+
},
|
|
5291
|
+
T1_リッチ: {
|
|
5292
|
+
type: "RICH_TEXT",
|
|
5293
|
+
value: "<div>行 1</div>"
|
|
5294
|
+
},
|
|
5295
|
+
T1_数値: {
|
|
5296
|
+
type: "NUMBER",
|
|
5297
|
+
value: "100"
|
|
5298
|
+
},
|
|
5299
|
+
T1_組織: {
|
|
5300
|
+
type: "ORGANIZATION_SELECT",
|
|
5301
|
+
value: [
|
|
5302
|
+
{
|
|
5303
|
+
code: "demo_hq",
|
|
5304
|
+
name: "架空本社"
|
|
5305
|
+
}
|
|
5306
|
+
]
|
|
5307
|
+
},
|
|
5308
|
+
T1_リンク: {
|
|
5309
|
+
type: "LINK",
|
|
5310
|
+
value: "https://example.com/"
|
|
5311
|
+
},
|
|
5312
|
+
T1_文字列: {
|
|
5313
|
+
type: "SINGLE_LINE_TEXT",
|
|
5314
|
+
value: "行 1"
|
|
5315
|
+
},
|
|
5316
|
+
T1_計算: {
|
|
5317
|
+
type: "CALC",
|
|
5318
|
+
value: "200"
|
|
5319
|
+
},
|
|
5320
|
+
T1_添付: {
|
|
5321
|
+
type: "FILE",
|
|
5322
|
+
value: []
|
|
5323
|
+
},
|
|
5324
|
+
T1_日時: {
|
|
5325
|
+
type: "DATETIME",
|
|
5326
|
+
value: "2026-01-10T00:30:00Z"
|
|
5327
|
+
},
|
|
5328
|
+
T1_グループ: {
|
|
5329
|
+
type: "GROUP_SELECT",
|
|
5330
|
+
value: [
|
|
5331
|
+
{
|
|
5332
|
+
code: "demo_managers",
|
|
5333
|
+
name: "架空管理職"
|
|
5334
|
+
}
|
|
5335
|
+
]
|
|
5336
|
+
},
|
|
5337
|
+
T1_チェック: {
|
|
5338
|
+
type: "CHECK_BOX",
|
|
5339
|
+
value: [
|
|
5340
|
+
"A"
|
|
5341
|
+
]
|
|
5342
|
+
},
|
|
5343
|
+
T1_時刻: {
|
|
5344
|
+
type: "TIME",
|
|
5345
|
+
value: "09:30"
|
|
5346
|
+
}
|
|
5347
|
+
}
|
|
5348
|
+
},
|
|
5349
|
+
{
|
|
5350
|
+
id: "7727383",
|
|
5351
|
+
value: {
|
|
5352
|
+
T1_ユーザー: {
|
|
5353
|
+
type: "USER_SELECT",
|
|
5354
|
+
value: [
|
|
5355
|
+
{
|
|
5356
|
+
code: "demo_user01",
|
|
5357
|
+
name: "架空 社長"
|
|
5358
|
+
}
|
|
5359
|
+
]
|
|
5360
|
+
},
|
|
5361
|
+
T1_文字列複数行: {
|
|
5362
|
+
type: "MULTI_LINE_TEXT",
|
|
5363
|
+
value: "行 2\n2 行目"
|
|
5364
|
+
},
|
|
5365
|
+
T1_ラジオ: {
|
|
5366
|
+
type: "RADIO_BUTTON",
|
|
5367
|
+
value: "A"
|
|
5368
|
+
},
|
|
5369
|
+
T1_複数選択: {
|
|
5370
|
+
type: "MULTI_SELECT",
|
|
5371
|
+
value: [
|
|
5372
|
+
"B"
|
|
5373
|
+
]
|
|
5374
|
+
},
|
|
5375
|
+
T1_日付: {
|
|
5376
|
+
type: "DATE",
|
|
5377
|
+
value: "2026-01-20"
|
|
5378
|
+
},
|
|
5379
|
+
T1_ドロップダウン: {
|
|
5380
|
+
type: "DROP_DOWN",
|
|
5381
|
+
value: "B"
|
|
5382
|
+
},
|
|
5383
|
+
T1_リッチ: {
|
|
5384
|
+
type: "RICH_TEXT",
|
|
5385
|
+
value: "<div>行 2</div>"
|
|
5386
|
+
},
|
|
5387
|
+
T1_数値: {
|
|
5388
|
+
type: "NUMBER",
|
|
5389
|
+
value: "200"
|
|
5390
|
+
},
|
|
5391
|
+
T1_組織: {
|
|
5392
|
+
type: "ORGANIZATION_SELECT",
|
|
5393
|
+
value: [
|
|
5394
|
+
{
|
|
5395
|
+
code: "demo_hq",
|
|
5396
|
+
name: "架空本社"
|
|
5397
|
+
}
|
|
5398
|
+
]
|
|
5399
|
+
},
|
|
5400
|
+
T1_リンク: {
|
|
5401
|
+
type: "LINK",
|
|
5402
|
+
value: "https://example.com/"
|
|
5403
|
+
},
|
|
5404
|
+
T1_文字列: {
|
|
5405
|
+
type: "SINGLE_LINE_TEXT",
|
|
5406
|
+
value: "行 2"
|
|
5407
|
+
},
|
|
5408
|
+
T1_計算: {
|
|
5409
|
+
type: "CALC",
|
|
5410
|
+
value: "400"
|
|
5411
|
+
},
|
|
5412
|
+
T1_添付: {
|
|
5413
|
+
type: "FILE",
|
|
5414
|
+
value: []
|
|
5415
|
+
},
|
|
5416
|
+
T1_日時: {
|
|
5417
|
+
type: "DATETIME",
|
|
5418
|
+
value: "2026-01-20T00:30:00Z"
|
|
5419
|
+
},
|
|
5420
|
+
T1_グループ: {
|
|
5421
|
+
type: "GROUP_SELECT",
|
|
5422
|
+
value: [
|
|
5423
|
+
{
|
|
5424
|
+
code: "demo_managers",
|
|
5425
|
+
name: "架空管理職"
|
|
5426
|
+
}
|
|
5427
|
+
]
|
|
5428
|
+
},
|
|
5429
|
+
T1_チェック: {
|
|
5430
|
+
type: "CHECK_BOX",
|
|
5431
|
+
value: [
|
|
5432
|
+
"A"
|
|
5433
|
+
]
|
|
5434
|
+
},
|
|
5435
|
+
T1_時刻: {
|
|
5436
|
+
type: "TIME",
|
|
5437
|
+
value: "09:30"
|
|
5438
|
+
}
|
|
5439
|
+
}
|
|
5440
|
+
},
|
|
5441
|
+
{
|
|
5442
|
+
id: "7727386",
|
|
5443
|
+
value: {
|
|
5444
|
+
T1_ユーザー: {
|
|
5445
|
+
type: "USER_SELECT",
|
|
5446
|
+
value: [
|
|
5447
|
+
{
|
|
5448
|
+
code: "demo_user01",
|
|
5449
|
+
name: "架空 社長"
|
|
5450
|
+
}
|
|
5451
|
+
]
|
|
5452
|
+
},
|
|
5453
|
+
T1_文字列複数行: {
|
|
5454
|
+
type: "MULTI_LINE_TEXT",
|
|
5455
|
+
value: "行 3\n2 行目"
|
|
5456
|
+
},
|
|
5457
|
+
T1_ラジオ: {
|
|
5458
|
+
type: "RADIO_BUTTON",
|
|
5459
|
+
value: "A"
|
|
5460
|
+
},
|
|
5461
|
+
T1_複数選択: {
|
|
5462
|
+
type: "MULTI_SELECT",
|
|
5463
|
+
value: [
|
|
5464
|
+
"B"
|
|
5465
|
+
]
|
|
5466
|
+
},
|
|
5467
|
+
T1_日付: {
|
|
5468
|
+
type: "DATE",
|
|
5469
|
+
value: "2026-01-30"
|
|
5470
|
+
},
|
|
5471
|
+
T1_ドロップダウン: {
|
|
5472
|
+
type: "DROP_DOWN",
|
|
5473
|
+
value: "A"
|
|
5474
|
+
},
|
|
5475
|
+
T1_リッチ: {
|
|
5476
|
+
type: "RICH_TEXT",
|
|
5477
|
+
value: "<div>行 3</div>"
|
|
5478
|
+
},
|
|
5479
|
+
T1_数値: {
|
|
5480
|
+
type: "NUMBER",
|
|
5481
|
+
value: "300"
|
|
5482
|
+
},
|
|
5483
|
+
T1_組織: {
|
|
5484
|
+
type: "ORGANIZATION_SELECT",
|
|
5485
|
+
value: [
|
|
5486
|
+
{
|
|
5487
|
+
code: "demo_hq",
|
|
5488
|
+
name: "架空本社"
|
|
5489
|
+
}
|
|
5490
|
+
]
|
|
5491
|
+
},
|
|
5492
|
+
T1_リンク: {
|
|
5493
|
+
type: "LINK",
|
|
5494
|
+
value: "https://example.com/"
|
|
5495
|
+
},
|
|
5496
|
+
T1_文字列: {
|
|
5497
|
+
type: "SINGLE_LINE_TEXT",
|
|
5498
|
+
value: "行 3"
|
|
5499
|
+
},
|
|
5500
|
+
T1_計算: {
|
|
5501
|
+
type: "CALC",
|
|
5502
|
+
value: "600"
|
|
5503
|
+
},
|
|
5504
|
+
T1_添付: {
|
|
5505
|
+
type: "FILE",
|
|
5506
|
+
value: []
|
|
5507
|
+
},
|
|
5508
|
+
T1_日時: {
|
|
5509
|
+
type: "DATETIME",
|
|
5510
|
+
value: "2026-01-30T00:30:00Z"
|
|
5511
|
+
},
|
|
5512
|
+
T1_グループ: {
|
|
5513
|
+
type: "GROUP_SELECT",
|
|
5514
|
+
value: [
|
|
5515
|
+
{
|
|
5516
|
+
code: "demo_managers",
|
|
5517
|
+
name: "架空管理職"
|
|
5518
|
+
}
|
|
5519
|
+
]
|
|
5520
|
+
},
|
|
5521
|
+
T1_チェック: {
|
|
5522
|
+
type: "CHECK_BOX",
|
|
5523
|
+
value: [
|
|
5524
|
+
"A"
|
|
5525
|
+
]
|
|
5526
|
+
},
|
|
5527
|
+
T1_時刻: {
|
|
5528
|
+
type: "TIME",
|
|
5529
|
+
value: "09:30"
|
|
5530
|
+
}
|
|
5531
|
+
}
|
|
5532
|
+
}
|
|
5533
|
+
]
|
|
5534
|
+
},
|
|
5535
|
+
ラジオ1: {
|
|
5536
|
+
type: "RADIO_BUTTON",
|
|
5537
|
+
value: "B"
|
|
5538
|
+
},
|
|
5539
|
+
グループ2: {
|
|
5540
|
+
type: "GROUP_SELECT",
|
|
5541
|
+
value: [
|
|
5542
|
+
{
|
|
5543
|
+
code: "demo_approvers",
|
|
5544
|
+
name: "架空承認者"
|
|
5545
|
+
}
|
|
5546
|
+
]
|
|
5547
|
+
},
|
|
5548
|
+
ラジオ2: {
|
|
5549
|
+
type: "RADIO_BUTTON",
|
|
5550
|
+
value: "乙"
|
|
5551
|
+
},
|
|
5552
|
+
リッチ1: {
|
|
5553
|
+
type: "RICH_TEXT",
|
|
5554
|
+
value: "<div><b>太字</b>と<i>斜体</i></div>"
|
|
5555
|
+
},
|
|
5556
|
+
時刻2: {
|
|
5557
|
+
type: "TIME",
|
|
5558
|
+
value: "17:45"
|
|
5559
|
+
},
|
|
5560
|
+
カテゴリー: {
|
|
5561
|
+
type: "CATEGORY",
|
|
5562
|
+
value: []
|
|
5563
|
+
},
|
|
5564
|
+
時刻1: {
|
|
5565
|
+
type: "TIME",
|
|
5566
|
+
value: "09:30"
|
|
5567
|
+
},
|
|
5568
|
+
リンク1: {
|
|
5569
|
+
type: "LINK",
|
|
5570
|
+
value: "https://example.com/sample"
|
|
5571
|
+
},
|
|
5572
|
+
リッチ2: {
|
|
5573
|
+
type: "RICH_TEXT",
|
|
5574
|
+
value: "<div>リッチ 2</div>"
|
|
5575
|
+
},
|
|
5576
|
+
リンク2: {
|
|
5577
|
+
type: "LINK",
|
|
5578
|
+
value: "sample@example.com"
|
|
5579
|
+
},
|
|
5580
|
+
計算2: {
|
|
5581
|
+
type: "CALC",
|
|
5582
|
+
value: "-75"
|
|
5583
|
+
},
|
|
5584
|
+
計算1: {
|
|
5585
|
+
type: "CALC",
|
|
5586
|
+
value: "1290.78"
|
|
5587
|
+
},
|
|
5588
|
+
複数選択2: {
|
|
5589
|
+
type: "MULTI_SELECT",
|
|
5590
|
+
value: [
|
|
5591
|
+
"丙"
|
|
5592
|
+
]
|
|
5593
|
+
},
|
|
5594
|
+
日時1: {
|
|
5595
|
+
type: "DATETIME",
|
|
5596
|
+
value: "2026-01-15T00:30:00Z"
|
|
5597
|
+
},
|
|
5598
|
+
複数選択1: {
|
|
5599
|
+
type: "MULTI_SELECT",
|
|
5600
|
+
value: [
|
|
5601
|
+
"A",
|
|
5602
|
+
"B"
|
|
5603
|
+
]
|
|
5604
|
+
},
|
|
5605
|
+
日時2: {
|
|
5606
|
+
type: "DATETIME",
|
|
5607
|
+
value: "2026-03-31T08:45:00Z"
|
|
5608
|
+
},
|
|
5609
|
+
枠内数値1: {
|
|
5610
|
+
type: "NUMBER",
|
|
5611
|
+
value: "42"
|
|
5612
|
+
},
|
|
5613
|
+
作業者: {
|
|
5614
|
+
type: "STATUS_ASSIGNEE",
|
|
5615
|
+
value: []
|
|
5616
|
+
},
|
|
5617
|
+
作成者: {
|
|
5618
|
+
type: "CREATOR",
|
|
5619
|
+
value: {
|
|
5620
|
+
code: "demo_user01",
|
|
5621
|
+
name: "架空 社長"
|
|
5622
|
+
}
|
|
5623
|
+
},
|
|
5624
|
+
$revision: {
|
|
5625
|
+
type: "__REVISION__",
|
|
5626
|
+
value: "2"
|
|
5627
|
+
},
|
|
5628
|
+
文字列2: {
|
|
5629
|
+
type: "SINGLE_LINE_TEXT",
|
|
5630
|
+
value: "サンプル文字列 2"
|
|
5631
|
+
},
|
|
5632
|
+
文字列1: {
|
|
5633
|
+
type: "SINGLE_LINE_TEXT",
|
|
5634
|
+
value: "サンプル文字列 1"
|
|
5635
|
+
},
|
|
5636
|
+
更新日時: {
|
|
5637
|
+
type: "UPDATED_TIME",
|
|
5638
|
+
value: "2026-01-15T00:00:00Z"
|
|
5639
|
+
},
|
|
5640
|
+
添付1: {
|
|
5641
|
+
type: "FILE",
|
|
5642
|
+
value: []
|
|
5643
|
+
},
|
|
5644
|
+
添付2: {
|
|
5645
|
+
type: "FILE",
|
|
5646
|
+
value: []
|
|
5647
|
+
},
|
|
5648
|
+
文字列複数行2: {
|
|
5649
|
+
type: "MULTI_LINE_TEXT",
|
|
5650
|
+
value: "複数行 2"
|
|
5651
|
+
},
|
|
5652
|
+
日付1: {
|
|
5653
|
+
type: "DATE",
|
|
5654
|
+
value: "2026-01-15"
|
|
5655
|
+
},
|
|
5656
|
+
枠内文字列1: {
|
|
5657
|
+
type: "SINGLE_LINE_TEXT",
|
|
5658
|
+
value: "枠の中の文字列"
|
|
5659
|
+
},
|
|
5660
|
+
文字列複数行1: {
|
|
5661
|
+
type: "MULTI_LINE_TEXT",
|
|
5662
|
+
value: "1 行目\n2 行目\n3 行目"
|
|
5663
|
+
},
|
|
5664
|
+
日付2: {
|
|
5665
|
+
type: "DATE",
|
|
5666
|
+
value: "2026-03-31"
|
|
5667
|
+
},
|
|
5668
|
+
数値2: {
|
|
5669
|
+
type: "NUMBER",
|
|
5670
|
+
value: "56.78"
|
|
5671
|
+
},
|
|
5672
|
+
数値1: {
|
|
5673
|
+
type: "NUMBER",
|
|
5674
|
+
value: "1234"
|
|
5675
|
+
},
|
|
5676
|
+
チェック1: {
|
|
5677
|
+
type: "CHECK_BOX",
|
|
5678
|
+
value: [
|
|
5679
|
+
"A",
|
|
5680
|
+
"C"
|
|
5681
|
+
]
|
|
5682
|
+
},
|
|
5683
|
+
作成日時: {
|
|
5684
|
+
type: "CREATED_TIME",
|
|
5685
|
+
value: "2026-01-15T00:00:00Z"
|
|
5686
|
+
},
|
|
5687
|
+
$id: {
|
|
5688
|
+
type: "__ID__",
|
|
5689
|
+
value: "1"
|
|
5690
|
+
}
|
|
5691
|
+
}
|
|
5692
|
+
};
|
|
5693
|
+
|
|
5694
|
+
// src/sample-app/record-2.json
|
|
5695
|
+
var record_2_default = {
|
|
5696
|
+
tool: "formula-authoring record",
|
|
5697
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
5698
|
+
baseUrl: "https://example.cybozu.com",
|
|
5699
|
+
appId: 4329,
|
|
5700
|
+
id: 2,
|
|
5701
|
+
record: {
|
|
5702
|
+
チェック2: {
|
|
5703
|
+
type: "CHECK_BOX",
|
|
5704
|
+
value: []
|
|
5705
|
+
},
|
|
5706
|
+
レコード番号: {
|
|
5707
|
+
type: "RECORD_NUMBER",
|
|
5708
|
+
value: "2"
|
|
5709
|
+
},
|
|
5710
|
+
ドロップダウン2: {
|
|
5711
|
+
type: "DROP_DOWN",
|
|
5712
|
+
value: "丙"
|
|
5713
|
+
},
|
|
5714
|
+
ユーザー2: {
|
|
5715
|
+
type: "USER_SELECT",
|
|
5716
|
+
value: []
|
|
5717
|
+
},
|
|
5718
|
+
組織1: {
|
|
5719
|
+
type: "ORGANIZATION_SELECT",
|
|
5720
|
+
value: []
|
|
5721
|
+
},
|
|
5722
|
+
ドロップダウン1: {
|
|
5723
|
+
type: "DROP_DOWN",
|
|
5724
|
+
value: null
|
|
5725
|
+
},
|
|
5726
|
+
更新者: {
|
|
5727
|
+
type: "MODIFIER",
|
|
5728
|
+
value: {
|
|
5729
|
+
code: "demo_user02",
|
|
5730
|
+
name: "架空 営業部長"
|
|
5731
|
+
}
|
|
5732
|
+
},
|
|
5733
|
+
ユーザー1: {
|
|
5734
|
+
type: "USER_SELECT",
|
|
5735
|
+
value: []
|
|
5736
|
+
},
|
|
5737
|
+
組織2: {
|
|
5738
|
+
type: "ORGANIZATION_SELECT",
|
|
5739
|
+
value: []
|
|
5740
|
+
},
|
|
5741
|
+
テーブル2: {
|
|
5742
|
+
type: "SUBTABLE",
|
|
5743
|
+
value: []
|
|
5744
|
+
},
|
|
5745
|
+
ステータス: {
|
|
5746
|
+
type: "STATUS",
|
|
5747
|
+
value: "未処理"
|
|
5748
|
+
},
|
|
5749
|
+
グループ1: {
|
|
5750
|
+
type: "GROUP_SELECT",
|
|
5751
|
+
value: []
|
|
5752
|
+
},
|
|
5753
|
+
テーブル1: {
|
|
5754
|
+
type: "SUBTABLE",
|
|
5755
|
+
value: [
|
|
5756
|
+
{
|
|
5757
|
+
id: "7727396",
|
|
5758
|
+
value: {
|
|
5759
|
+
T1_ユーザー: {
|
|
5760
|
+
type: "USER_SELECT",
|
|
5761
|
+
value: []
|
|
5762
|
+
},
|
|
5763
|
+
T1_文字列複数行: {
|
|
5764
|
+
type: "MULTI_LINE_TEXT",
|
|
5765
|
+
value: "\n2 行目"
|
|
5766
|
+
},
|
|
5767
|
+
T1_ラジオ: {
|
|
5768
|
+
type: "RADIO_BUTTON",
|
|
5769
|
+
value: "A"
|
|
5770
|
+
},
|
|
5771
|
+
T1_複数選択: {
|
|
5772
|
+
type: "MULTI_SELECT",
|
|
5773
|
+
value: [
|
|
5774
|
+
"B"
|
|
5775
|
+
]
|
|
5776
|
+
},
|
|
5777
|
+
T1_日付: {
|
|
5778
|
+
type: "DATE",
|
|
5779
|
+
value: "2026-02-28"
|
|
5780
|
+
},
|
|
5781
|
+
T1_ドロップダウン: {
|
|
5782
|
+
type: "DROP_DOWN",
|
|
5783
|
+
value: null
|
|
5784
|
+
},
|
|
5785
|
+
T1_リッチ: {
|
|
5786
|
+
type: "RICH_TEXT",
|
|
5787
|
+
value: "<div></div>"
|
|
5788
|
+
},
|
|
5789
|
+
T1_数値: {
|
|
5790
|
+
type: "NUMBER",
|
|
5791
|
+
value: "0"
|
|
5792
|
+
},
|
|
5793
|
+
T1_組織: {
|
|
5794
|
+
type: "ORGANIZATION_SELECT",
|
|
5795
|
+
value: []
|
|
5796
|
+
},
|
|
5797
|
+
T1_リンク: {
|
|
5798
|
+
type: "LINK",
|
|
5799
|
+
value: "https://example.com/"
|
|
5800
|
+
},
|
|
5801
|
+
T1_文字列: {
|
|
5802
|
+
type: "SINGLE_LINE_TEXT",
|
|
5803
|
+
value: ""
|
|
5804
|
+
},
|
|
5805
|
+
T1_計算: {
|
|
5806
|
+
type: "CALC",
|
|
5807
|
+
value: "0"
|
|
5808
|
+
},
|
|
5809
|
+
T1_添付: {
|
|
5810
|
+
type: "FILE",
|
|
5811
|
+
value: []
|
|
5812
|
+
},
|
|
5813
|
+
T1_日時: {
|
|
5814
|
+
type: "DATETIME",
|
|
5815
|
+
value: "2026-02-28T00:30:00Z"
|
|
5816
|
+
},
|
|
5817
|
+
T1_グループ: {
|
|
5818
|
+
type: "GROUP_SELECT",
|
|
5819
|
+
value: []
|
|
5820
|
+
},
|
|
5821
|
+
T1_チェック: {
|
|
5822
|
+
type: "CHECK_BOX",
|
|
5823
|
+
value: [
|
|
5824
|
+
"A"
|
|
5825
|
+
]
|
|
5826
|
+
},
|
|
5827
|
+
T1_時刻: {
|
|
5828
|
+
type: "TIME",
|
|
5829
|
+
value: "09:30"
|
|
5830
|
+
}
|
|
5831
|
+
}
|
|
5832
|
+
}
|
|
5833
|
+
]
|
|
5834
|
+
},
|
|
5835
|
+
ラジオ1: {
|
|
5836
|
+
type: "RADIO_BUTTON",
|
|
5837
|
+
value: "C"
|
|
5838
|
+
},
|
|
5839
|
+
グループ2: {
|
|
5840
|
+
type: "GROUP_SELECT",
|
|
5841
|
+
value: []
|
|
5842
|
+
},
|
|
5843
|
+
ラジオ2: {
|
|
5844
|
+
type: "RADIO_BUTTON",
|
|
5845
|
+
value: "甲"
|
|
5846
|
+
},
|
|
5847
|
+
リッチ1: {
|
|
5848
|
+
type: "RICH_TEXT",
|
|
5849
|
+
value: ""
|
|
5850
|
+
},
|
|
5851
|
+
時刻2: {
|
|
5852
|
+
type: "TIME",
|
|
5853
|
+
value: "23:59"
|
|
5854
|
+
},
|
|
5855
|
+
カテゴリー: {
|
|
5856
|
+
type: "CATEGORY",
|
|
5857
|
+
value: []
|
|
5858
|
+
},
|
|
5859
|
+
時刻1: {
|
|
5860
|
+
type: "TIME",
|
|
5861
|
+
value: "00:00"
|
|
5862
|
+
},
|
|
5863
|
+
リンク1: {
|
|
5864
|
+
type: "LINK",
|
|
5865
|
+
value: ""
|
|
5866
|
+
},
|
|
5867
|
+
リッチ2: {
|
|
5868
|
+
type: "RICH_TEXT",
|
|
5869
|
+
value: ""
|
|
5870
|
+
},
|
|
5871
|
+
リンク2: {
|
|
5872
|
+
type: "LINK",
|
|
5873
|
+
value: ""
|
|
5874
|
+
},
|
|
5875
|
+
計算2: {
|
|
5876
|
+
type: "CALC",
|
|
5877
|
+
value: "-306"
|
|
5878
|
+
},
|
|
5879
|
+
計算1: {
|
|
5880
|
+
type: "CALC",
|
|
5881
|
+
value: "-12.345"
|
|
5882
|
+
},
|
|
5883
|
+
複数選択2: {
|
|
5884
|
+
type: "MULTI_SELECT",
|
|
5885
|
+
value: []
|
|
5886
|
+
},
|
|
5887
|
+
日時1: {
|
|
5888
|
+
type: "DATETIME",
|
|
5889
|
+
value: "2026-12-31T14:59:00Z"
|
|
5890
|
+
},
|
|
5891
|
+
複数選択1: {
|
|
5892
|
+
type: "MULTI_SELECT",
|
|
5893
|
+
value: []
|
|
5894
|
+
},
|
|
5895
|
+
日時2: {
|
|
5896
|
+
type: "DATETIME",
|
|
5897
|
+
value: ""
|
|
5898
|
+
},
|
|
5899
|
+
枠内数値1: {
|
|
5900
|
+
type: "NUMBER",
|
|
5901
|
+
value: ""
|
|
5902
|
+
},
|
|
5903
|
+
作業者: {
|
|
5904
|
+
type: "STATUS_ASSIGNEE",
|
|
5905
|
+
value: []
|
|
5906
|
+
},
|
|
5907
|
+
作成者: {
|
|
5908
|
+
type: "CREATOR",
|
|
5909
|
+
value: {
|
|
5910
|
+
code: "demo_user01",
|
|
5911
|
+
name: "架空 社長"
|
|
5912
|
+
}
|
|
5913
|
+
},
|
|
5914
|
+
$revision: {
|
|
5915
|
+
type: "__REVISION__",
|
|
5916
|
+
value: "2"
|
|
5917
|
+
},
|
|
5918
|
+
文字列2: {
|
|
5919
|
+
type: "SINGLE_LINE_TEXT",
|
|
5920
|
+
value: ""
|
|
5921
|
+
},
|
|
5922
|
+
文字列1: {
|
|
5923
|
+
type: "SINGLE_LINE_TEXT",
|
|
5924
|
+
value: "端の値"
|
|
5925
|
+
},
|
|
5926
|
+
更新日時: {
|
|
5927
|
+
type: "UPDATED_TIME",
|
|
5928
|
+
value: "2026-01-15T00:00:00Z"
|
|
5929
|
+
},
|
|
5930
|
+
添付1: {
|
|
5931
|
+
type: "FILE",
|
|
5932
|
+
value: []
|
|
5933
|
+
},
|
|
5934
|
+
添付2: {
|
|
5935
|
+
type: "FILE",
|
|
5936
|
+
value: []
|
|
5937
|
+
},
|
|
5938
|
+
文字列複数行2: {
|
|
5939
|
+
type: "MULTI_LINE_TEXT",
|
|
5940
|
+
value: ""
|
|
5941
|
+
},
|
|
5942
|
+
日付1: {
|
|
5943
|
+
type: "DATE",
|
|
5944
|
+
value: "2026-02-28"
|
|
5945
|
+
},
|
|
5946
|
+
枠内文字列1: {
|
|
5947
|
+
type: "SINGLE_LINE_TEXT",
|
|
5948
|
+
value: ""
|
|
5949
|
+
},
|
|
5950
|
+
文字列複数行1: {
|
|
5951
|
+
type: "MULTI_LINE_TEXT",
|
|
5952
|
+
value: "1\n\n3\n"
|
|
5953
|
+
},
|
|
5954
|
+
日付2: {
|
|
5955
|
+
type: "DATE",
|
|
5956
|
+
value: "2026-12-31"
|
|
5957
|
+
},
|
|
5958
|
+
数値2: {
|
|
5959
|
+
type: "NUMBER",
|
|
5960
|
+
value: "-12.345"
|
|
5961
|
+
},
|
|
5962
|
+
数値1: {
|
|
5963
|
+
type: "NUMBER",
|
|
5964
|
+
value: "0"
|
|
5965
|
+
},
|
|
5966
|
+
チェック1: {
|
|
5967
|
+
type: "CHECK_BOX",
|
|
5968
|
+
value: []
|
|
5969
|
+
},
|
|
5970
|
+
作成日時: {
|
|
5971
|
+
type: "CREATED_TIME",
|
|
5972
|
+
value: "2026-01-15T00:00:00Z"
|
|
5973
|
+
},
|
|
5974
|
+
$id: {
|
|
5975
|
+
type: "__ID__",
|
|
5976
|
+
value: "2"
|
|
5977
|
+
}
|
|
5978
|
+
}
|
|
5979
|
+
};
|
|
5980
|
+
|
|
5981
|
+
// src/sample-app/record-3.json
|
|
5982
|
+
var record_3_default = {
|
|
5983
|
+
tool: "formula-authoring record",
|
|
5984
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
5985
|
+
baseUrl: "https://example.cybozu.com",
|
|
5986
|
+
appId: 4329,
|
|
5987
|
+
id: 3,
|
|
5988
|
+
record: {
|
|
5989
|
+
チェック2: {
|
|
5990
|
+
type: "CHECK_BOX",
|
|
5991
|
+
value: []
|
|
5992
|
+
},
|
|
5993
|
+
レコード番号: {
|
|
5994
|
+
type: "RECORD_NUMBER",
|
|
5995
|
+
value: "3"
|
|
5996
|
+
},
|
|
5997
|
+
ドロップダウン2: {
|
|
5998
|
+
type: "DROP_DOWN",
|
|
5999
|
+
value: null
|
|
6000
|
+
},
|
|
6001
|
+
ユーザー2: {
|
|
6002
|
+
type: "USER_SELECT",
|
|
6003
|
+
value: []
|
|
6004
|
+
},
|
|
6005
|
+
組織1: {
|
|
6006
|
+
type: "ORGANIZATION_SELECT",
|
|
6007
|
+
value: []
|
|
6008
|
+
},
|
|
6009
|
+
ドロップダウン1: {
|
|
6010
|
+
type: "DROP_DOWN",
|
|
6011
|
+
value: null
|
|
6012
|
+
},
|
|
6013
|
+
更新者: {
|
|
6014
|
+
type: "MODIFIER",
|
|
6015
|
+
value: {
|
|
6016
|
+
code: "demo_user02",
|
|
6017
|
+
name: "架空 営業部長"
|
|
6018
|
+
}
|
|
6019
|
+
},
|
|
6020
|
+
ユーザー1: {
|
|
6021
|
+
type: "USER_SELECT",
|
|
6022
|
+
value: []
|
|
6023
|
+
},
|
|
6024
|
+
組織2: {
|
|
6025
|
+
type: "ORGANIZATION_SELECT",
|
|
6026
|
+
value: []
|
|
6027
|
+
},
|
|
6028
|
+
テーブル2: {
|
|
6029
|
+
type: "SUBTABLE",
|
|
6030
|
+
value: []
|
|
6031
|
+
},
|
|
6032
|
+
ステータス: {
|
|
6033
|
+
type: "STATUS",
|
|
6034
|
+
value: "未処理"
|
|
6035
|
+
},
|
|
6036
|
+
グループ1: {
|
|
6037
|
+
type: "GROUP_SELECT",
|
|
6038
|
+
value: []
|
|
6039
|
+
},
|
|
6040
|
+
テーブル1: {
|
|
6041
|
+
type: "SUBTABLE",
|
|
6042
|
+
value: []
|
|
6043
|
+
},
|
|
6044
|
+
ラジオ1: {
|
|
6045
|
+
type: "RADIO_BUTTON",
|
|
6046
|
+
value: "A"
|
|
6047
|
+
},
|
|
6048
|
+
グループ2: {
|
|
6049
|
+
type: "GROUP_SELECT",
|
|
6050
|
+
value: []
|
|
6051
|
+
},
|
|
6052
|
+
ラジオ2: {
|
|
6053
|
+
type: "RADIO_BUTTON",
|
|
6054
|
+
value: "甲"
|
|
6055
|
+
},
|
|
6056
|
+
リッチ1: {
|
|
6057
|
+
type: "RICH_TEXT",
|
|
6058
|
+
value: ""
|
|
6059
|
+
},
|
|
6060
|
+
時刻2: {
|
|
6061
|
+
type: "TIME",
|
|
6062
|
+
value: null
|
|
6063
|
+
},
|
|
6064
|
+
カテゴリー: {
|
|
6065
|
+
type: "CATEGORY",
|
|
6066
|
+
value: []
|
|
6067
|
+
},
|
|
6068
|
+
時刻1: {
|
|
6069
|
+
type: "TIME",
|
|
6070
|
+
value: null
|
|
6071
|
+
},
|
|
6072
|
+
リンク1: {
|
|
6073
|
+
type: "LINK",
|
|
6074
|
+
value: ""
|
|
6075
|
+
},
|
|
6076
|
+
リッチ2: {
|
|
6077
|
+
type: "RICH_TEXT",
|
|
6078
|
+
value: ""
|
|
6079
|
+
},
|
|
6080
|
+
リンク2: {
|
|
6081
|
+
type: "LINK",
|
|
6082
|
+
value: ""
|
|
6083
|
+
},
|
|
6084
|
+
計算2: {
|
|
6085
|
+
type: "CALC",
|
|
6086
|
+
value: "0"
|
|
6087
|
+
},
|
|
6088
|
+
計算1: {
|
|
6089
|
+
type: "CALC",
|
|
6090
|
+
value: "0"
|
|
6091
|
+
},
|
|
6092
|
+
複数選択2: {
|
|
6093
|
+
type: "MULTI_SELECT",
|
|
6094
|
+
value: []
|
|
6095
|
+
},
|
|
6096
|
+
日時1: {
|
|
6097
|
+
type: "DATETIME",
|
|
6098
|
+
value: ""
|
|
6099
|
+
},
|
|
6100
|
+
複数選択1: {
|
|
6101
|
+
type: "MULTI_SELECT",
|
|
6102
|
+
value: []
|
|
6103
|
+
},
|
|
6104
|
+
日時2: {
|
|
6105
|
+
type: "DATETIME",
|
|
6106
|
+
value: ""
|
|
6107
|
+
},
|
|
6108
|
+
枠内数値1: {
|
|
6109
|
+
type: "NUMBER",
|
|
6110
|
+
value: ""
|
|
6111
|
+
},
|
|
6112
|
+
作業者: {
|
|
6113
|
+
type: "STATUS_ASSIGNEE",
|
|
6114
|
+
value: []
|
|
6115
|
+
},
|
|
6116
|
+
作成者: {
|
|
6117
|
+
type: "CREATOR",
|
|
6118
|
+
value: {
|
|
6119
|
+
code: "demo_user01",
|
|
6120
|
+
name: "架空 社長"
|
|
6121
|
+
}
|
|
6122
|
+
},
|
|
6123
|
+
$revision: {
|
|
6124
|
+
type: "__REVISION__",
|
|
6125
|
+
value: "2"
|
|
6126
|
+
},
|
|
6127
|
+
文字列2: {
|
|
6128
|
+
type: "SINGLE_LINE_TEXT",
|
|
6129
|
+
value: ""
|
|
6130
|
+
},
|
|
6131
|
+
文字列1: {
|
|
6132
|
+
type: "SINGLE_LINE_TEXT",
|
|
6133
|
+
value: "空のレコード"
|
|
6134
|
+
},
|
|
6135
|
+
更新日時: {
|
|
6136
|
+
type: "UPDATED_TIME",
|
|
6137
|
+
value: "2026-01-15T00:00:00Z"
|
|
6138
|
+
},
|
|
6139
|
+
添付1: {
|
|
6140
|
+
type: "FILE",
|
|
6141
|
+
value: []
|
|
6142
|
+
},
|
|
6143
|
+
添付2: {
|
|
6144
|
+
type: "FILE",
|
|
6145
|
+
value: []
|
|
6146
|
+
},
|
|
6147
|
+
文字列複数行2: {
|
|
6148
|
+
type: "MULTI_LINE_TEXT",
|
|
6149
|
+
value: ""
|
|
6150
|
+
},
|
|
6151
|
+
日付1: {
|
|
6152
|
+
type: "DATE",
|
|
6153
|
+
value: null
|
|
6154
|
+
},
|
|
6155
|
+
枠内文字列1: {
|
|
6156
|
+
type: "SINGLE_LINE_TEXT",
|
|
6157
|
+
value: ""
|
|
6158
|
+
},
|
|
6159
|
+
文字列複数行1: {
|
|
6160
|
+
type: "MULTI_LINE_TEXT",
|
|
6161
|
+
value: ""
|
|
6162
|
+
},
|
|
6163
|
+
日付2: {
|
|
6164
|
+
type: "DATE",
|
|
6165
|
+
value: null
|
|
6166
|
+
},
|
|
6167
|
+
数値2: {
|
|
6168
|
+
type: "NUMBER",
|
|
6169
|
+
value: ""
|
|
6170
|
+
},
|
|
6171
|
+
数値1: {
|
|
6172
|
+
type: "NUMBER",
|
|
6173
|
+
value: ""
|
|
6174
|
+
},
|
|
6175
|
+
チェック1: {
|
|
6176
|
+
type: "CHECK_BOX",
|
|
6177
|
+
value: []
|
|
6178
|
+
},
|
|
6179
|
+
作成日時: {
|
|
6180
|
+
type: "CREATED_TIME",
|
|
6181
|
+
value: "2026-01-15T00:00:00Z"
|
|
6182
|
+
},
|
|
6183
|
+
$id: {
|
|
6184
|
+
type: "__ID__",
|
|
6185
|
+
value: "3"
|
|
6186
|
+
}
|
|
6187
|
+
}
|
|
6188
|
+
};
|
|
6189
|
+
|
|
6190
|
+
// src/sample-app.ts
|
|
6191
|
+
var LABELS = {
|
|
6192
|
+
1: "典型(全項目に値)",
|
|
6193
|
+
2: "端(0・負の小数・改行・未選択・月末と年末の日付)",
|
|
6194
|
+
3: "空(ほぼ全部空)"
|
|
6195
|
+
};
|
|
6196
|
+
function sampleRecord(data, id) {
|
|
6197
|
+
if (data.appId !== fields_default.appId || data.id !== id || !data.record || typeof data.record !== "object") throw new Error(`サンプルレコード ${id} の形が違う(src/sample-app/record-${id}.json)`);
|
|
6198
|
+
return { id, label: LABELS[id] ?? "", record: data.record };
|
|
6199
|
+
}
|
|
6200
|
+
var SAMPLE_APP = {
|
|
6201
|
+
fields: fields_default,
|
|
6202
|
+
records: [sampleRecord(record_1_default, 1), sampleRecord(record_2_default, 2), sampleRecord(record_3_default, 3)]
|
|
6203
|
+
};
|
|
6204
|
+
function sampleApp() {
|
|
6205
|
+
return structuredClone(SAMPLE_APP);
|
|
6206
|
+
}
|
|
6207
|
+
function spacerIds(layout) {
|
|
6208
|
+
const out = [];
|
|
6209
|
+
for (const row of layout) {
|
|
6210
|
+
if (row.type === "GROUP" && Array.isArray(row.layout)) {
|
|
6211
|
+
out.push(...spacerIds(row.layout));
|
|
6212
|
+
continue;
|
|
6213
|
+
}
|
|
6214
|
+
for (const f of row.fields ?? []) if (f.type === "SPACER" && typeof f.elementId === "string" && f.elementId) out.push(f.elementId);
|
|
6215
|
+
}
|
|
6216
|
+
return out;
|
|
6217
|
+
}
|
|
6218
|
+
var tableRows = (record, code) => {
|
|
6219
|
+
const v = record[code]?.value;
|
|
6220
|
+
return Array.isArray(v) ? v.length : 0;
|
|
6221
|
+
};
|
|
6222
|
+
function describeSampleApp(targetTypes) {
|
|
6223
|
+
const { fields, records } = SAMPLE_APP;
|
|
6224
|
+
const tables = Object.values(fields.properties).filter((p) => p.type === "SUBTABLE").map((p) => p.code).sort();
|
|
6225
|
+
const lines = [
|
|
6226
|
+
`サンプルアプリ「${fields.appName}」(try / fml_try の試し計算に使う架空のアプリ。接続先 ${fields.baseUrl}。利用者のアプリではない)`,
|
|
6227
|
+
summarizeFields(fields),
|
|
6228
|
+
"",
|
|
6229
|
+
"項目(1 項目 1 行。○ = 計算式を設定できる型。テーブルの子は T1_ / T2_ の接頭辞):",
|
|
6230
|
+
listFields(fields, { targetTypes }),
|
|
6231
|
+
"",
|
|
6232
|
+
`スペース項目(要素 ID。as に要素 ID か SPACER。レコードに値は無く、式の返り値をそのまま返す): ${spacerIds(fields.layout).join(", ") || "無し"}`,
|
|
6233
|
+
"レコード(try の records で選ぶ。既定は 3 件とも):",
|
|
6234
|
+
...records.map((r) => ` ${r.id}: ${r.label}。${tables.map((t) => `${t} ${tableRows(r.record, t)} 行`).join("、")}`),
|
|
6235
|
+
"ユーザー・組織・グループの値は既定のテストデータ(架空の 10 人。demo_user01 …)のコード"
|
|
6236
|
+
];
|
|
6237
|
+
return lines.join("\n");
|
|
6238
|
+
}
|
|
6239
|
+
|
|
6240
|
+
// src/commands/try-data.ts
|
|
6241
|
+
var TRY_MAX_EXTRA_FIELDS = 20;
|
|
6242
|
+
var TRY_MAX_DATA = 5;
|
|
6243
|
+
var TRY_MAX_TABLE_ROWS = 20;
|
|
6244
|
+
var TRY_MAX_OPTIONS = 50;
|
|
6245
|
+
var TRY_MAX_VALUE_CHARS = 2e3;
|
|
6246
|
+
var TYPE_ALIASES = {
|
|
6247
|
+
TEXT: "SINGLE_LINE_TEXT",
|
|
6248
|
+
STRING: "SINGLE_LINE_TEXT",
|
|
6249
|
+
TEXTAREA: "MULTI_LINE_TEXT",
|
|
6250
|
+
MULTILINE: "MULTI_LINE_TEXT",
|
|
6251
|
+
RICH: "RICH_TEXT",
|
|
6252
|
+
NUM: "NUMBER",
|
|
6253
|
+
DROPDOWN: "DROP_DOWN",
|
|
6254
|
+
RADIO: "RADIO_BUTTON",
|
|
6255
|
+
CHECKBOX: "CHECK_BOX",
|
|
6256
|
+
MULTISELECT: "MULTI_SELECT",
|
|
6257
|
+
USER: "USER_SELECT",
|
|
6258
|
+
ORG: "ORGANIZATION_SELECT",
|
|
6259
|
+
ORGANIZATION: "ORGANIZATION_SELECT",
|
|
6260
|
+
URL: "LINK",
|
|
6261
|
+
TABLE: "SUBTABLE"
|
|
6262
|
+
};
|
|
6263
|
+
var EXTRA_TYPES = [
|
|
6264
|
+
"SINGLE_LINE_TEXT",
|
|
6265
|
+
"MULTI_LINE_TEXT",
|
|
6266
|
+
"RICH_TEXT",
|
|
6267
|
+
"NUMBER",
|
|
6268
|
+
"DATE",
|
|
6269
|
+
"DATETIME",
|
|
6270
|
+
"TIME",
|
|
6271
|
+
"DROP_DOWN",
|
|
6272
|
+
"RADIO_BUTTON",
|
|
6273
|
+
"CHECK_BOX",
|
|
6274
|
+
"MULTI_SELECT",
|
|
6275
|
+
"USER_SELECT",
|
|
6276
|
+
"ORGANIZATION_SELECT",
|
|
6277
|
+
"GROUP_SELECT",
|
|
6278
|
+
"LINK",
|
|
6279
|
+
"SUBTABLE"
|
|
6280
|
+
];
|
|
6281
|
+
var CHOICE_TYPES = /* @__PURE__ */ new Set(["DROP_DOWN", "RADIO_BUTTON", "CHECK_BOX", "MULTI_SELECT"]);
|
|
6282
|
+
var CODE_RE = /^[\p{L}_・$¥][\p{L}\p{N}_・$¥]{0,127}$/u;
|
|
6283
|
+
function canonicalType(type) {
|
|
6284
|
+
const upper = String(type).trim().toUpperCase();
|
|
6285
|
+
return TYPE_ALIASES[upper] ?? upper;
|
|
6286
|
+
}
|
|
6287
|
+
function propertyOf(code, type, label, options) {
|
|
6288
|
+
const base = { type, code, label, noLabel: false, required: false };
|
|
6289
|
+
const opts = options ? { options: Object.fromEntries(options.map((o, i) => [o, { label: o, index: String(i) }])) } : {};
|
|
6290
|
+
switch (type) {
|
|
6291
|
+
case "NUMBER":
|
|
6292
|
+
return { ...base, minValue: "", maxValue: "", digit: false, unique: false, defaultValue: "", displayScale: "", unit: "", unitPosition: "BEFORE" };
|
|
6293
|
+
case "SINGLE_LINE_TEXT":
|
|
6294
|
+
return { ...base, minLength: "", maxLength: "", expression: "", hideExpression: false, unique: false, defaultValue: "" };
|
|
6295
|
+
case "LINK":
|
|
6296
|
+
return { ...base, protocol: "WEB", minLength: "", maxLength: "", unique: false, defaultValue: "" };
|
|
6297
|
+
case "MULTI_LINE_TEXT":
|
|
6298
|
+
case "RICH_TEXT":
|
|
6299
|
+
return { ...base, defaultValue: "" };
|
|
6300
|
+
case "DATE":
|
|
6301
|
+
case "DATETIME":
|
|
6302
|
+
return { ...base, unique: false, defaultValue: "", defaultNowValue: false };
|
|
6303
|
+
case "TIME":
|
|
6304
|
+
return { ...base, defaultValue: "", defaultNowValue: false };
|
|
6305
|
+
case "DROP_DOWN":
|
|
6306
|
+
return { ...base, ...opts, defaultValue: "" };
|
|
6307
|
+
case "RADIO_BUTTON":
|
|
6308
|
+
return { ...base, ...opts, defaultValue: options?.[0] ?? "", align: "HORIZONTAL" };
|
|
6309
|
+
case "CHECK_BOX":
|
|
6310
|
+
case "MULTI_SELECT":
|
|
6311
|
+
return { ...base, ...opts, defaultValue: [], align: "HORIZONTAL" };
|
|
6312
|
+
case "USER_SELECT":
|
|
6313
|
+
case "ORGANIZATION_SELECT":
|
|
6314
|
+
case "GROUP_SELECT":
|
|
6315
|
+
return { ...base, entities: [], defaultValue: [] };
|
|
6316
|
+
case "SUBTABLE":
|
|
6317
|
+
return { type, code, label, noLabel: false, fields: {} };
|
|
6318
|
+
default:
|
|
6319
|
+
throw new InputError(`項目 ${code} の型 ${type} は足せない(${EXTRA_TYPES.join(", ")})`);
|
|
6320
|
+
}
|
|
6321
|
+
}
|
|
6322
|
+
function layoutTableOf(layout, code) {
|
|
6323
|
+
for (const row of layout) {
|
|
6324
|
+
if (row.type === "SUBTABLE" && row.code === code) return row;
|
|
6325
|
+
if (row.type === "GROUP" && Array.isArray(row.layout)) {
|
|
6326
|
+
const hit = layoutTableOf(row.layout, code);
|
|
6327
|
+
if (hit) return hit;
|
|
6328
|
+
}
|
|
6329
|
+
}
|
|
6330
|
+
return void 0;
|
|
6331
|
+
}
|
|
6332
|
+
var sizeOf = (type) => type === "MULTI_LINE_TEXT" || type === "RICH_TEXT" ? { width: "250", innerHeight: "125" } : { width: "200" };
|
|
6333
|
+
function allCodesOf(fields) {
|
|
6334
|
+
const codes = /* @__PURE__ */ new Set();
|
|
6335
|
+
for (const p of Object.values(fields.properties)) {
|
|
6336
|
+
codes.add(p.code);
|
|
6337
|
+
for (const c of Object.values(p.fields ?? {})) codes.add(c.code);
|
|
6338
|
+
}
|
|
6339
|
+
return codes;
|
|
6340
|
+
}
|
|
6341
|
+
function checkOptions(def, type, where) {
|
|
6342
|
+
if (!CHOICE_TYPES.has(type)) {
|
|
6343
|
+
if (def.options !== void 0) throw new InputError(`${where}: ${type} に options は付けない`);
|
|
6344
|
+
return void 0;
|
|
6345
|
+
}
|
|
6346
|
+
if (!Array.isArray(def.options) || !def.options.length) throw new InputError(`${where}: ${type} には options(選択肢の配列)が要る`);
|
|
6347
|
+
if (def.options.length > TRY_MAX_OPTIONS) throw new InputError(`${where}: options は ${TRY_MAX_OPTIONS} 個まで`);
|
|
6348
|
+
const seen = /* @__PURE__ */ new Set();
|
|
6349
|
+
for (const o of def.options) {
|
|
6350
|
+
if (typeof o !== "string" || !o.trim() || [...o].length > 100) throw new InputError(`${where}: options は空でない文字列(100 文字まで): ${JSON.stringify(o)}`);
|
|
6351
|
+
if (seen.has(o)) throw new InputError(`${where}: options が重複: ${o}`);
|
|
6352
|
+
seen.add(o);
|
|
6353
|
+
}
|
|
6354
|
+
return def.options;
|
|
6355
|
+
}
|
|
6356
|
+
function extendFields(fields, defs) {
|
|
6357
|
+
const out = structuredClone(fields);
|
|
6358
|
+
const codes = allCodesOf(out);
|
|
6359
|
+
const added = [];
|
|
6360
|
+
let count = 0;
|
|
6361
|
+
const describe = (type, options, children) => `${type}${options ? `: ${options.join(" / ")}` : ""}${children ? `: ${children.join(", ")}` : ""}`;
|
|
6362
|
+
const takeCode = (def, where) => {
|
|
6363
|
+
if (typeof def.code !== "string" || !CODE_RE.test(def.code)) throw new InputError(`${where}: code はフィールドコード(文字・数字・_ で、数字で始まらない。128 文字まで): ${JSON.stringify(def.code)}`);
|
|
6364
|
+
if (codes.has(def.code)) throw new InputError(`${where}: ${def.code} は既にある項目(標本の項目と重ならないコードにする)`);
|
|
6365
|
+
if (++count > TRY_MAX_EXTRA_FIELDS) throw new InputError(`足す項目は ${TRY_MAX_EXTRA_FIELDS} 個まで(テーブルの子も数える)`);
|
|
6366
|
+
codes.add(def.code);
|
|
6367
|
+
return def.code;
|
|
6368
|
+
};
|
|
6369
|
+
const labelOf = (def, where) => {
|
|
6370
|
+
if (def.label !== void 0 && (typeof def.label !== "string" || [...def.label].length > 128)) throw new InputError(`${where}: label は 128 文字まで`);
|
|
6371
|
+
return def.label ?? def.code;
|
|
6372
|
+
};
|
|
6373
|
+
defs.forEach((def, i) => {
|
|
6374
|
+
const where = `fields[${i}]`;
|
|
6375
|
+
if (!def || typeof def !== "object") throw new InputError(`${where}: 項目はオブジェクト({ code, type, options?, table?, fields? })`);
|
|
6376
|
+
const type = canonicalType(def.type ?? "");
|
|
6377
|
+
if (!EXTRA_TYPES.includes(type)) throw new InputError(`${where}: 型 ${JSON.stringify(def.type)} は足せない(${EXTRA_TYPES.join(", ")})`);
|
|
6378
|
+
if (def.table !== void 0 && type === "SUBTABLE") throw new InputError(`${where}: テーブルの中にテーブルは置けない(table と type SUBTABLE は一緒に書かない)`);
|
|
6379
|
+
if (def.fields !== void 0 && type !== "SUBTABLE") throw new InputError(`${where}: fields(子)は type SUBTABLE のときだけ`);
|
|
6380
|
+
const code = takeCode(def, where);
|
|
6381
|
+
const label = labelOf(def, where);
|
|
6382
|
+
const options = checkOptions(def, type, where);
|
|
6383
|
+
if (def.table !== void 0) {
|
|
6384
|
+
const parent = out.properties[def.table];
|
|
6385
|
+
if (!parent || parent.type !== "SUBTABLE") throw new InputError(`${where}: table ${JSON.stringify(def.table)} はテーブルでない(標本のテーブル1 / テーブル2 か、先に足したテーブル)`);
|
|
6386
|
+
parent.fields ??= {};
|
|
6387
|
+
parent.fields[code] = propertyOf(code, type, label, options);
|
|
6388
|
+
const slot = layoutTableOf(out.layout, def.table);
|
|
6389
|
+
if (!slot) throw new InputError(`${where}: テーブル ${def.table} がレイアウトに無い`);
|
|
6390
|
+
slot.fields ??= [];
|
|
6391
|
+
slot.fields.push({ type, code, size: sizeOf(type) });
|
|
6392
|
+
added.push(`${code}(${describe(type, options)}。${def.table} の子)`);
|
|
6393
|
+
return;
|
|
6394
|
+
}
|
|
6395
|
+
if (type === "SUBTABLE") {
|
|
6396
|
+
if (!Array.isArray(def.fields) || !def.fields.length) throw new InputError(`${where}: SUBTABLE には fields(子の配列。1 つ以上)が要る`);
|
|
6397
|
+
const table = propertyOf(code, type, label, void 0);
|
|
6398
|
+
const slot = { type: "SUBTABLE", code, fields: [] };
|
|
6399
|
+
const names = [];
|
|
6400
|
+
def.fields.forEach((child, j) => {
|
|
6401
|
+
const cw = `${where}.fields[${j}]`;
|
|
6402
|
+
if (!child || typeof child !== "object") throw new InputError(`${cw}: 子はオブジェクト({ code, type, options? })`);
|
|
6403
|
+
const ct = canonicalType(child.type ?? "");
|
|
6404
|
+
if (!EXTRA_TYPES.includes(ct) || ct === "SUBTABLE") throw new InputError(`${cw}: 型 ${JSON.stringify(child.type)} はテーブルの子にできない`);
|
|
6405
|
+
if (child.table !== void 0 || child.fields !== void 0) throw new InputError(`${cw}: 子に table / fields は書けない`);
|
|
6406
|
+
const cc = takeCode(child, cw);
|
|
6407
|
+
table.fields[cc] = propertyOf(cc, ct, labelOf(child, cw), checkOptions(child, ct, cw));
|
|
6408
|
+
slot.fields.push({ type: ct, code: cc, size: sizeOf(ct) });
|
|
6409
|
+
names.push(cc);
|
|
6410
|
+
});
|
|
6411
|
+
out.properties[code] = table;
|
|
6412
|
+
out.layout.push(slot);
|
|
6413
|
+
added.push(`${code}(${describe(type, void 0, names)})`);
|
|
6414
|
+
return;
|
|
6415
|
+
}
|
|
6416
|
+
out.properties[code] = propertyOf(code, type, label, options);
|
|
6417
|
+
out.layout.push({ type: "ROW", fields: [{ type, code, size: sizeOf(type) }] });
|
|
6418
|
+
added.push(`${code}(${describe(type, options)})`);
|
|
6419
|
+
});
|
|
6420
|
+
return { fields: out, added };
|
|
6421
|
+
}
|
|
6422
|
+
function normalizeDefaults(fields) {
|
|
6423
|
+
const out = structuredClone(fields);
|
|
6424
|
+
const fix = (p) => {
|
|
6425
|
+
if (p.type === "SUBTABLE") {
|
|
6426
|
+
for (const c of Object.values(p.fields ?? {})) fix(c);
|
|
6427
|
+
return;
|
|
6428
|
+
}
|
|
6429
|
+
if (NO_VALUE_TYPES.has(p.type) || p.type === "CALC" || /^(RECORD_NUMBER|CREATOR|MODIFIER|CREATED_TIME|UPDATED_TIME|STATUS|STATUS_ASSIGNEE|CATEGORY|FILE)$/.test(p.type)) return;
|
|
6430
|
+
const arrayType = /^(CHECK_BOX|MULTI_SELECT|USER_SELECT|ORGANIZATION_SELECT|GROUP_SELECT)$/.test(p.type);
|
|
6431
|
+
if (arrayType) {
|
|
6432
|
+
if (!Array.isArray(p.defaultValue)) p.defaultValue = [];
|
|
6433
|
+
} else if (p.defaultValue === void 0 || p.defaultValue === null) p.defaultValue = "";
|
|
6434
|
+
};
|
|
6435
|
+
for (const p of Object.values(out.properties)) fix(p);
|
|
6436
|
+
return out;
|
|
6437
|
+
}
|
|
6438
|
+
function emptyValueOf(type) {
|
|
6439
|
+
switch (type) {
|
|
6440
|
+
case "CHECK_BOX":
|
|
6441
|
+
case "MULTI_SELECT":
|
|
6442
|
+
case "USER_SELECT":
|
|
6443
|
+
case "ORGANIZATION_SELECT":
|
|
6444
|
+
case "GROUP_SELECT":
|
|
6445
|
+
case "FILE":
|
|
6446
|
+
case "STATUS_ASSIGNEE":
|
|
6447
|
+
case "CATEGORY":
|
|
6448
|
+
case "SUBTABLE":
|
|
6449
|
+
return [];
|
|
6450
|
+
case "CREATOR":
|
|
6451
|
+
case "MODIFIER":
|
|
6452
|
+
return { code: "", name: "" };
|
|
6453
|
+
default:
|
|
6454
|
+
return "";
|
|
6455
|
+
}
|
|
6456
|
+
}
|
|
6457
|
+
var NO_VALUE_TYPES = /* @__PURE__ */ new Set(["GROUP", "REFERENCE_TABLE", "LABEL", "SPACER", "HR"]);
|
|
6458
|
+
function emptyRecordOf(fields, id) {
|
|
6459
|
+
const rec = { $id: { type: "__ID__", value: id }, $revision: { type: "__REVISION__", value: "1" } };
|
|
6460
|
+
for (const p of Object.values(fields.properties)) {
|
|
6461
|
+
if (NO_VALUE_TYPES.has(p.type)) continue;
|
|
6462
|
+
const value = p.type === "RECORD_NUMBER" ? id : p.type === "CREATED_TIME" || p.type === "UPDATED_TIME" ? "2026-01-15T00:00:00Z" : emptyValueOf(p.type);
|
|
6463
|
+
rec[p.code] = { type: p.type, value };
|
|
6464
|
+
}
|
|
6465
|
+
return rec;
|
|
6466
|
+
}
|
|
6467
|
+
function fillMissing(fields, record) {
|
|
6468
|
+
const out = structuredClone(record);
|
|
6469
|
+
for (const p of Object.values(fields.properties)) {
|
|
6470
|
+
if (NO_VALUE_TYPES.has(p.type)) continue;
|
|
6471
|
+
if (!(p.code in out)) out[p.code] = { type: p.type, value: emptyValueOf(p.type) };
|
|
6472
|
+
if (p.type === "SUBTABLE") {
|
|
6473
|
+
const rows = out[p.code].value;
|
|
6474
|
+
if (Array.isArray(rows)) {
|
|
6475
|
+
for (const row of rows) {
|
|
6476
|
+
row.value ??= {};
|
|
6477
|
+
for (const c of Object.values(p.fields ?? {})) if (!(c.code in row.value)) row.value[c.code] = { type: c.type, value: emptyValueOf(c.type) };
|
|
6478
|
+
}
|
|
6479
|
+
}
|
|
6480
|
+
}
|
|
6481
|
+
}
|
|
6482
|
+
return out;
|
|
6483
|
+
}
|
|
6484
|
+
var NUMBER_RE = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/;
|
|
6485
|
+
var DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
6486
|
+
var TIME_RE = /^\d{2}:\d{2}$/;
|
|
6487
|
+
var DATETIME_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(Z|[+-]\d{2}:\d{2})$/;
|
|
6488
|
+
var isEmpty = (v) => v === "" || v === null || v === void 0;
|
|
6489
|
+
function text(v, where) {
|
|
6490
|
+
if (isEmpty(v)) return "";
|
|
6491
|
+
if (typeof v === "string" || typeof v === "number" || typeof v === "boolean") {
|
|
6492
|
+
const s = String(v);
|
|
6493
|
+
if ([...s].length > TRY_MAX_VALUE_CHARS) throw new InputError(`${where}: 文字列は ${TRY_MAX_VALUE_CHARS} 文字まで`);
|
|
6494
|
+
return s;
|
|
6495
|
+
}
|
|
6496
|
+
throw new InputError(`${where}: 文字列を書く(${JSON.stringify(v).slice(0, 40)})`);
|
|
6497
|
+
}
|
|
6498
|
+
function codeList(v, where, kind, users) {
|
|
6499
|
+
if (isEmpty(v)) return [];
|
|
6500
|
+
const list = Array.isArray(v) ? v : [v];
|
|
6501
|
+
const table = kind === "org" ? users?.orgCodes : kind === "group" ? users?.groupCodes : users?.userCodes;
|
|
6502
|
+
return list.map((e, i) => {
|
|
6503
|
+
const code = typeof e === "string" ? e : e && typeof e === "object" && typeof e.code === "string" ? e.code : void 0;
|
|
6504
|
+
if (code === void 0 || !code.trim() || [...code].length > 128) throw new InputError(`${where}[${i}]: コード(文字列)か { code, name? } を書く`);
|
|
6505
|
+
const given = e && typeof e === "object" ? e.name : void 0;
|
|
6506
|
+
const name = typeof given === "string" ? given : typeof table?.[code]?.name === "string" ? String(table[code].name) : code;
|
|
6507
|
+
return { code, name };
|
|
6508
|
+
});
|
|
6509
|
+
}
|
|
6510
|
+
function stringList(v, where, options) {
|
|
6511
|
+
if (isEmpty(v)) return [];
|
|
6512
|
+
const list = Array.isArray(v) ? v : [v];
|
|
6513
|
+
return list.map((e, i) => {
|
|
6514
|
+
if (typeof e !== "string") throw new InputError(`${where}[${i}]: 文字列を書く`);
|
|
6515
|
+
if (options && !(e in options)) throw new InputError(`${where}[${i}]: 選択肢に無い値 ${JSON.stringify(e)}(${Object.keys(options).join(" / ")})`);
|
|
6516
|
+
return e;
|
|
6517
|
+
});
|
|
6518
|
+
}
|
|
6519
|
+
function convertValue(prop, v, where, users) {
|
|
6520
|
+
const options = prop.options;
|
|
6521
|
+
switch (prop.type) {
|
|
6522
|
+
case "NUMBER": {
|
|
6523
|
+
if (isEmpty(v)) return "";
|
|
6524
|
+
if (typeof v === "number") {
|
|
6525
|
+
if (!Number.isFinite(v)) throw new InputError(`${where}: NUMBER は有限の数`);
|
|
6526
|
+
return String(v);
|
|
6527
|
+
}
|
|
6528
|
+
if (typeof v === "string" && NUMBER_RE.test(v.trim())) return v.trim();
|
|
6529
|
+
throw new InputError(`${where}: NUMBER は数か数字の文字列(${JSON.stringify(v).slice(0, 40)})`);
|
|
6530
|
+
}
|
|
6531
|
+
case "SINGLE_LINE_TEXT":
|
|
6532
|
+
case "MULTI_LINE_TEXT":
|
|
6533
|
+
case "RICH_TEXT":
|
|
6534
|
+
case "LINK":
|
|
6535
|
+
case "CALC":
|
|
6536
|
+
case "STATUS":
|
|
6537
|
+
case "RECORD_NUMBER":
|
|
6538
|
+
case "__ID__":
|
|
6539
|
+
case "__REVISION__":
|
|
6540
|
+
return text(v, where);
|
|
6541
|
+
case "DATE": {
|
|
6542
|
+
const s = text(v, where);
|
|
6543
|
+
if (s && !DATE_RE.test(s)) throw new InputError(`${where}: DATE は "YYYY-MM-DD"(${JSON.stringify(s)})`);
|
|
6544
|
+
return s;
|
|
6545
|
+
}
|
|
6546
|
+
case "TIME": {
|
|
6547
|
+
const s = text(v, where);
|
|
6548
|
+
if (s && !TIME_RE.test(s)) throw new InputError(`${where}: TIME は "HH:mm"(${JSON.stringify(s)})`);
|
|
6549
|
+
return s;
|
|
6550
|
+
}
|
|
6551
|
+
case "DATETIME":
|
|
6552
|
+
case "CREATED_TIME":
|
|
6553
|
+
case "UPDATED_TIME": {
|
|
6554
|
+
const s = text(v, where);
|
|
6555
|
+
if (s && !DATETIME_RE.test(s)) throw new InputError(`${where}: ${prop.type} は "YYYY-MM-DDTHH:mm:ssZ"(${JSON.stringify(s)})`);
|
|
6556
|
+
return s;
|
|
6557
|
+
}
|
|
6558
|
+
case "DROP_DOWN":
|
|
6559
|
+
case "RADIO_BUTTON": {
|
|
6560
|
+
const s = text(v, where);
|
|
6561
|
+
if (s && options && !(s in options)) throw new InputError(`${where}: 選択肢に無い値 ${JSON.stringify(s)}(${Object.keys(options).join(" / ")})`);
|
|
6562
|
+
return s;
|
|
6563
|
+
}
|
|
6564
|
+
case "CHECK_BOX":
|
|
6565
|
+
case "MULTI_SELECT":
|
|
6566
|
+
return stringList(v, where, options);
|
|
6567
|
+
case "CATEGORY":
|
|
6568
|
+
return stringList(v, where, void 0);
|
|
6569
|
+
case "USER_SELECT":
|
|
6570
|
+
case "STATUS_ASSIGNEE":
|
|
6571
|
+
return codeList(v, where, "user", users);
|
|
6572
|
+
case "ORGANIZATION_SELECT":
|
|
6573
|
+
return codeList(v, where, "org", users);
|
|
6574
|
+
case "GROUP_SELECT":
|
|
6575
|
+
return codeList(v, where, "group", users);
|
|
6576
|
+
case "CREATOR":
|
|
6577
|
+
case "MODIFIER": {
|
|
6578
|
+
const one = codeList(v, where, "user", users);
|
|
6579
|
+
if (one.length !== 1) throw new InputError(`${where}: ${prop.type} はユーザーのコード 1 つ`);
|
|
6580
|
+
return one[0];
|
|
6581
|
+
}
|
|
6582
|
+
case "FILE": {
|
|
6583
|
+
if (isEmpty(v)) return [];
|
|
6584
|
+
const list = Array.isArray(v) ? v : [v];
|
|
6585
|
+
return list.map((e, i) => {
|
|
6586
|
+
const name = typeof e === "string" ? e : e && typeof e === "object" && typeof e.name === "string" ? e.name : void 0;
|
|
6587
|
+
if (name === void 0 || !name.trim() || [...name].length > 255) throw new InputError(`${where}[${i}]: ファイルは名前(文字列)か { name, size? }`);
|
|
6588
|
+
const size = e && typeof e === "object" && e.size !== void 0 ? String(e.size) : "0";
|
|
6589
|
+
return { contentType: "application/octet-stream", fileKey: "", name, size };
|
|
6590
|
+
});
|
|
6591
|
+
}
|
|
6592
|
+
case "SUBTABLE":
|
|
6593
|
+
throw new InputError(`${where}: テーブルは行の配列([{ 子のコード: 値, … }])`);
|
|
6594
|
+
default:
|
|
6595
|
+
if (NO_VALUE_TYPES.has(prop.type)) throw new InputError(`${where}: ${prop.type} は値を持たない`);
|
|
6596
|
+
throw new InputError(`${where}: 型 ${prop.type} の値は書けない`);
|
|
6597
|
+
}
|
|
6598
|
+
}
|
|
6599
|
+
function applyData(fields, base, data, where, users) {
|
|
6600
|
+
if (!data || typeof data !== "object" || Array.isArray(data)) throw new InputError(`${where}: レコードはオブジェクト({ 項目コード: 値, … })`);
|
|
6601
|
+
const rec = fillMissing(fields, base);
|
|
6602
|
+
const children = /* @__PURE__ */ new Map();
|
|
6603
|
+
for (const p of Object.values(fields.properties)) for (const c of Object.values(p.fields ?? {})) children.set(c.code, p.code);
|
|
6604
|
+
for (const [code, v] of Object.entries(data)) {
|
|
6605
|
+
const w = `${where}.${code}`;
|
|
6606
|
+
const prop = fields.properties[code];
|
|
6607
|
+
if (!prop) {
|
|
6608
|
+
if (children.has(code)) throw new InputError(`${w}: テーブルの子はテーブルの行の中に書く(${children.get(code)}: [{ ${code}: … }])`);
|
|
6609
|
+
throw new InputError(`${w}: 無い項目(標本に無ければ fields で足す。項目の一覧は describe)`);
|
|
6610
|
+
}
|
|
6611
|
+
if (NO_VALUE_TYPES.has(prop.type)) throw new InputError(`${w}: ${prop.type} は値を持たない`);
|
|
6612
|
+
if (prop.type === "SUBTABLE") {
|
|
6613
|
+
if (isEmpty(v)) {
|
|
6614
|
+
rec[code] = { type: "SUBTABLE", value: [] };
|
|
6615
|
+
continue;
|
|
6616
|
+
}
|
|
6617
|
+
if (!Array.isArray(v)) throw new InputError(`${w}: テーブルは行の配列([{ 子のコード: 値, … }])`);
|
|
6618
|
+
if (v.length > TRY_MAX_TABLE_ROWS) throw new InputError(`${w}: テーブルの行は ${TRY_MAX_TABLE_ROWS} 行まで`);
|
|
6619
|
+
const kids = prop.fields ?? {};
|
|
6620
|
+
const rows = v.map((row, i) => {
|
|
6621
|
+
const rw = `${w}[${i}]`;
|
|
6622
|
+
if (!row || typeof row !== "object" || Array.isArray(row)) throw new InputError(`${rw}: 行はオブジェクト({ 子のコード: 値, … })`);
|
|
6623
|
+
const value = {};
|
|
6624
|
+
for (const c of Object.values(kids)) value[c.code] = { type: c.type, value: emptyValueOf(c.type) };
|
|
6625
|
+
for (const [cc, cv] of Object.entries(row)) {
|
|
6626
|
+
const child = kids[cc];
|
|
6627
|
+
if (!child) throw new InputError(`${rw}.${cc}: テーブル ${code} に無い子(${Object.keys(kids).join(", ")})`);
|
|
6628
|
+
value[cc] = { type: child.type, value: convertValue(child, cv, `${rw}.${cc}`, users) };
|
|
6629
|
+
}
|
|
6630
|
+
return { id: String(i + 1), value };
|
|
6631
|
+
});
|
|
6632
|
+
rec[code] = { type: "SUBTABLE", value: rows };
|
|
6633
|
+
continue;
|
|
6634
|
+
}
|
|
6635
|
+
rec[code] = { type: prop.type, value: convertValue(prop, v, w, users) };
|
|
6636
|
+
}
|
|
6637
|
+
return rec;
|
|
6638
|
+
}
|
|
6639
|
+
function checkDataList(data) {
|
|
6640
|
+
if (!Array.isArray(data)) throw new InputError("data はレコード({ 項目コード: 値 })の配列");
|
|
6641
|
+
if (!data.length) throw new InputError("data が空");
|
|
6642
|
+
if (data.length > TRY_MAX_DATA) throw new InputError(`data は ${TRY_MAX_DATA} 件まで`);
|
|
6643
|
+
const bytes = Buffer.byteLength(JSON.stringify(data), "utf8");
|
|
6644
|
+
if (bytes > 64 * 1024) throw new InputError(`data が大きすぎる(${bytes.toLocaleString()} バイト。64 KiB まで)`);
|
|
6645
|
+
return data;
|
|
6646
|
+
}
|
|
6647
|
+
|
|
6648
|
+
// src/commands/try.ts
|
|
6649
|
+
var TRY_MAX_FORMULAS = 10;
|
|
6650
|
+
var TRY_MAX_FORMULA_CHARS = 4e3;
|
|
6651
|
+
var TRY_DEFAULT_AS = "TEXT";
|
|
6652
|
+
var TRY_OWN_RULES = /* @__PURE__ */ new Set(["misc.changed", "fieldno.screen", "size.bytes", "schema.derived"]);
|
|
6653
|
+
var isTable2 = (v) => Array.isArray(v) && v.every((r) => r && typeof r === "object" && "value" in r);
|
|
6654
|
+
function spacersOf(fields) {
|
|
6655
|
+
const out = [];
|
|
6656
|
+
const walk = (rows) => {
|
|
6657
|
+
for (const row of rows) {
|
|
6658
|
+
if (row.type === "GROUP" && Array.isArray(row.layout)) {
|
|
6659
|
+
walk(row.layout);
|
|
6660
|
+
continue;
|
|
6661
|
+
}
|
|
6662
|
+
for (const f of row.fields ?? []) if (f.type === "SPACER" && typeof f.elementId === "string" && f.elementId) out.push(f.elementId);
|
|
6663
|
+
}
|
|
6664
|
+
};
|
|
6665
|
+
walk(fields.layout);
|
|
6666
|
+
return out;
|
|
6667
|
+
}
|
|
6668
|
+
function resolveTryTarget(fields, targetTypes, as, table, referenced = /* @__PURE__ */ new Set()) {
|
|
6669
|
+
const props = fields.properties;
|
|
6670
|
+
const tables = Object.values(props).filter((p) => p.type === "SUBTABLE").map((p) => p.code).sort();
|
|
6671
|
+
const want = (as ?? TRY_DEFAULT_AS).trim();
|
|
6672
|
+
if (!want) throw new InputError("as が空(型 NUMBER / TEXT / DATE … か項目コード)");
|
|
6673
|
+
const upper = want.toUpperCase();
|
|
6674
|
+
const spacers = spacersOf(fields);
|
|
6675
|
+
const spacer = upper === "SPACER" || upper === "SPACE" ? spacers[0] : spacers.find((id) => id === want || `(${id})` === want);
|
|
6676
|
+
if (upper === "SPACER" || upper === "SPACE" || spacer !== void 0) {
|
|
6677
|
+
if (table !== void 0) throw new InputError("スペース項目はテーブルの中に置けない(table を外す)");
|
|
6678
|
+
if (spacer === void 0) throw new InputError("サンプルアプリに要素 ID のあるスペース項目が無い");
|
|
6679
|
+
return { code: `(${spacer})`, type: "SPACER", elementId: spacer };
|
|
6680
|
+
}
|
|
6681
|
+
const type = TYPE_ALIASES[upper] ?? (targetTypes.has(upper) ? upper : void 0);
|
|
6682
|
+
let scope = props;
|
|
6683
|
+
let tableCode;
|
|
6684
|
+
if (table !== void 0) {
|
|
6685
|
+
const t = props[table];
|
|
6686
|
+
if (!t || t.type !== "SUBTABLE") throw new InputError(`table ${JSON.stringify(table)} はサンプルアプリのテーブルでない(${tables.join(" / ")})`);
|
|
6687
|
+
scope = t.fields ?? {};
|
|
6688
|
+
tableCode = table;
|
|
6689
|
+
}
|
|
6690
|
+
const byCode = (code, p, inTable) => {
|
|
6691
|
+
if (!targetTypes.has(p.type)) throw new InputError(`${code} の型 ${p.type} には計算式を設定できない(使える型: ${[...targetTypes].join(", ")})`);
|
|
6692
|
+
return { code, type: p.type, ...inTable ? { table: inTable } : {} };
|
|
6693
|
+
};
|
|
6694
|
+
if (Object.prototype.hasOwnProperty.call(scope, want)) return byCode(want, scope[want], tableCode);
|
|
6695
|
+
if (tableCode === void 0) {
|
|
6696
|
+
for (const t of tables) {
|
|
6697
|
+
const child = props[t].fields?.[want];
|
|
6698
|
+
if (child) return byCode(want, child, t);
|
|
6699
|
+
}
|
|
6700
|
+
}
|
|
6701
|
+
if (!type) {
|
|
6702
|
+
const all2 = /* @__PURE__ */ new Set();
|
|
6703
|
+
for (const p of Object.values(props)) {
|
|
6704
|
+
all2.add(p.type);
|
|
6705
|
+
for (const c of Object.values(p.fields ?? {})) all2.add(c.type);
|
|
6706
|
+
}
|
|
6707
|
+
if (all2.has(upper)) throw new InputError(`${upper} の項目には計算式を設定できない(使える型: ${[...targetTypes].join(", ")})`);
|
|
6708
|
+
throw new InputError(`as ${JSON.stringify(want)} は型でも項目コードでもない(型: ${[...targetTypes].join(", ")}。項目は try --describe / fml_try の describe で)`);
|
|
6709
|
+
}
|
|
6710
|
+
const candidates = Object.values(scope).filter((p) => p.type === type && !p.lookup).sort((a, b) => a.code.length - b.code.length || (a.code < b.code ? -1 : a.code > b.code ? 1 : 0));
|
|
6711
|
+
if (!candidates.length) throw new InputError(`${tableCode ? `テーブル ${tableCode} の中` : "サンプルアプリ"}に ${type} の項目が無い`);
|
|
6712
|
+
const free = candidates.find((p) => !referenced.has(p.code)) ?? candidates[0];
|
|
6713
|
+
return { code: free.code, type, ...tableCode ? { table: tableCode } : {} };
|
|
6714
|
+
}
|
|
6715
|
+
function buildTryEnvelope(engine, fields, code, formula, lang) {
|
|
6716
|
+
const api = engine.api;
|
|
6717
|
+
const source = api.defaultSource(lang);
|
|
6718
|
+
return {
|
|
6719
|
+
date: "2026-01-15 00:00:00",
|
|
6720
|
+
pluginName: "計算式プラグイン",
|
|
6721
|
+
pluginID: api.pluginId,
|
|
6722
|
+
PluginVersion: engine.source.pluginVersion,
|
|
6723
|
+
appId: fields.appId,
|
|
6724
|
+
appName: fields.appName,
|
|
6725
|
+
...source,
|
|
6726
|
+
toolEnable: true,
|
|
6727
|
+
pluginMiscInfo: { ...source.pluginMiscInfo, circular_refer: true },
|
|
6728
|
+
pluginInfos: [{ fieldcode: code, state: true, formulaSet: formula, edit: false, hide: false, rank: "" }]
|
|
6729
|
+
};
|
|
6730
|
+
}
|
|
6731
|
+
function normalizedMarks(n, code) {
|
|
6732
|
+
const scan = n.scans.get(code);
|
|
6733
|
+
if (!scan) return [];
|
|
6734
|
+
const used = Object.keys(scan.functions);
|
|
6735
|
+
const marks = [];
|
|
6736
|
+
if (used.some((f) => /^(UINFO|OINFO|GINFO|OUSERS|GUSERS)$/.test(f))) marks.push("ユーザー情報は既定のテストデータ(架空)で計算(実機では変わる)");
|
|
6737
|
+
if (used.includes("EV_INFO")) marks.push("イベントに依る");
|
|
6738
|
+
if (used.some((f) => /^(RAND|RANDBETWEEN|NOW|TODAY|UUID)$/.test(f))) marks.push("再計算で変わる");
|
|
6739
|
+
return marks;
|
|
6740
|
+
}
|
|
6741
|
+
function plain(v) {
|
|
6742
|
+
try {
|
|
6743
|
+
const s = JSON.stringify(v);
|
|
6744
|
+
return s === void 0 ? v === void 0 ? null : String(v) : JSON.parse(s);
|
|
6745
|
+
} catch {
|
|
6746
|
+
return String(v);
|
|
6747
|
+
}
|
|
6748
|
+
}
|
|
6749
|
+
function rawValueOf(engine, pp, record, formula, target, evType, event) {
|
|
6750
|
+
const api = engine.api;
|
|
6751
|
+
const run = (kf2) => {
|
|
6752
|
+
try {
|
|
6753
|
+
return plain(quiet(() => kf2.dq(formula)));
|
|
6754
|
+
} catch {
|
|
6755
|
+
return null;
|
|
6756
|
+
}
|
|
6757
|
+
};
|
|
6758
|
+
const kf = api.createRunner(pp, record, evType ?? "allUpdate", event);
|
|
6759
|
+
if (!target.table) {
|
|
6760
|
+
kf.initTableInfo("");
|
|
6761
|
+
return run(kf);
|
|
6762
|
+
}
|
|
6763
|
+
const rows = record[target.table];
|
|
6764
|
+
const list = Array.isArray(rows?.value) ? rows.value : [];
|
|
6765
|
+
kf.initTableInfo(target.table);
|
|
6766
|
+
return list.map((_r, i) => {
|
|
6767
|
+
kf.currRow(i);
|
|
6768
|
+
return run(kf);
|
|
6769
|
+
});
|
|
6770
|
+
}
|
|
6771
|
+
var short2 = (v) => {
|
|
6772
|
+
const s = JSON.stringify(v);
|
|
6773
|
+
return s === void 0 ? "undefined" : [...s].length > 200 ? [...s].slice(0, 200).join("") + "…" : s;
|
|
6774
|
+
};
|
|
6775
|
+
async function trySettings(input) {
|
|
6776
|
+
const { engine } = input;
|
|
6777
|
+
const api = engine.api;
|
|
6778
|
+
const lang = input.lang ?? "ja";
|
|
6779
|
+
if (!Array.isArray(input.formulas) || !input.formulas.length) throw new InputError("式が無い(formulas)");
|
|
6780
|
+
if (input.formulas.length > TRY_MAX_FORMULAS) throw new InputError(`式は 1 回 ${TRY_MAX_FORMULAS} 個まで(${input.formulas.length})`);
|
|
6781
|
+
const app = sampleApp();
|
|
6782
|
+
const source = input.appFields ? "app" : "sample";
|
|
6783
|
+
let fields = input.appFields ? normalizeDefaults(input.appFields) : app.fields;
|
|
6784
|
+
let extraFields = [];
|
|
6785
|
+
if (input.fields !== void 0) {
|
|
6786
|
+
if (!Array.isArray(input.fields)) throw new InputError("fields は項目({ code, type, options?, table?, fields? })の配列");
|
|
6787
|
+
const ext = extendFields(fields, input.fields);
|
|
6788
|
+
fields = ext.fields;
|
|
6789
|
+
extraFields = ext.added;
|
|
6790
|
+
}
|
|
6791
|
+
const picked = [];
|
|
6792
|
+
if (input.appFields) {
|
|
6793
|
+
if (input.records !== void 0) throw new InputError("appFields(利用者のアプリの項目定義)のときは標本のレコード(records)は使えない(data で架空の値を書く)");
|
|
6794
|
+
if (input.data === void 0) throw new InputError("appFields(利用者のアプリの項目定義)には data(架空の値のレコード)が要る");
|
|
6795
|
+
} else {
|
|
6796
|
+
const ids2 = input.records === void 0 ? input.data === void 0 ? app.records.map((r) => r.id) : [] : [...new Set(input.records)];
|
|
6797
|
+
if (!ids2.length && input.data === void 0) throw new InputError("records が空(1〜3)");
|
|
6798
|
+
for (const id of ids2) if (!app.records.some((r) => r.id === id)) throw new InputError(`records は 1〜${app.records.length}(${id})`);
|
|
6799
|
+
for (const id of ids2) {
|
|
6800
|
+
const r = app.records.find((x) => x.id === id);
|
|
6801
|
+
picked.push({ id: String(id), label: r.label, record: extraFields.length ? fillMissing(fields, r.record) : r.record });
|
|
6802
|
+
}
|
|
6803
|
+
}
|
|
6804
|
+
if (input.data !== void 0) {
|
|
6805
|
+
const list = checkDataList(input.data);
|
|
6806
|
+
let base;
|
|
6807
|
+
if (input.appFields) base = emptyRecordOf(fields, "0");
|
|
6808
|
+
else {
|
|
6809
|
+
const b = input.base ?? 3;
|
|
6810
|
+
const br = app.records.find((x) => x.id === b);
|
|
6811
|
+
if (!br) throw new InputError(`base は標本のレコードの番号(1〜${app.records.length}): ${b}`);
|
|
6812
|
+
base = br.record;
|
|
6813
|
+
}
|
|
6814
|
+
list.forEach((d, i) => {
|
|
6815
|
+
const id = `d${i + 1}`;
|
|
6816
|
+
const rec = applyData(fields, base, d, `data[${i}]`, input.usersInfo);
|
|
6817
|
+
rec.$id = { type: "__ID__", value: String(100 + i + 1) };
|
|
6818
|
+
if (fields.properties["レコード番号"]?.type === "RECORD_NUMBER" && input.appFields) rec["レコード番号"] = { type: "RECORD_NUMBER", value: String(100 + i + 1) };
|
|
6819
|
+
picked.push({ id, label: `架空の値(${Object.keys(d).join(", ") || "空"})`, record: rec });
|
|
6820
|
+
});
|
|
6821
|
+
}
|
|
6822
|
+
if (!picked.length) throw new InputError("計算するレコードが無い(records か data)");
|
|
6823
|
+
const targetTypes = new Set(api.TARGET_TYPES);
|
|
6824
|
+
const policy = { ...input.policy ?? DEFAULT_POLICY, allowMiscChanges: true };
|
|
6825
|
+
let contextLine = "";
|
|
6826
|
+
let calcNotice = "";
|
|
6827
|
+
const results = [];
|
|
6828
|
+
for (let i = 0; i < input.formulas.length; i++) {
|
|
6829
|
+
const f = input.formulas[i];
|
|
6830
|
+
const where = `try[${i + 1}]`;
|
|
6831
|
+
const res = { index: i + 1, formula: typeof f?.formula === "string" ? f.formula : "", status: "ok", findings: [], values: [], marks: [] };
|
|
6832
|
+
results.push(res);
|
|
6833
|
+
const fail = (rule, message) => {
|
|
6834
|
+
res.status = "invalid";
|
|
6835
|
+
res.findings.push({ level: "error", rule, where, message });
|
|
6836
|
+
};
|
|
6837
|
+
if (!f || typeof f.formula !== "string" || !f.formula.trim()) {
|
|
6838
|
+
fail("try.formula", "式が空");
|
|
6839
|
+
continue;
|
|
6840
|
+
}
|
|
6841
|
+
if ([...f.formula].length > TRY_MAX_FORMULA_CHARS) {
|
|
6842
|
+
fail("try.formula", `式が長すぎる(${TRY_MAX_FORMULA_CHARS} 文字まで)`);
|
|
6843
|
+
continue;
|
|
6844
|
+
}
|
|
6845
|
+
let target;
|
|
6846
|
+
const referenced = scanFormula(api.stripFormula(f.formula)).identifiers;
|
|
6847
|
+
try {
|
|
6848
|
+
target = resolveTryTarget(fields, targetTypes, f.as, f.table, referenced);
|
|
6849
|
+
} catch (e) {
|
|
6850
|
+
if (e instanceof InputError) {
|
|
6851
|
+
fail("try.target", e.message);
|
|
6852
|
+
continue;
|
|
6853
|
+
}
|
|
6854
|
+
throw e;
|
|
6855
|
+
}
|
|
6856
|
+
res.target = target;
|
|
6857
|
+
if (referenced.has(target.code)) res.findings.push({ level: "warning", rule: "try.self-reference", where, message: `対象 ${target.code} を式が参照している(${target.table ? "行ごとに 1 回" : "テーブルの外の項目は 1 段目と 2 段目の 2 回計算されるので、値が 2 回分になる"}。as で式が使わない項目を選ぶ)` });
|
|
6858
|
+
const envelope = buildTryEnvelope(engine, fields, target.code, f.formula, lang);
|
|
6859
|
+
const n = await normalizeSettings({
|
|
6860
|
+
settingsText: JSON.stringify(envelope),
|
|
6861
|
+
settingsFile: where,
|
|
6862
|
+
fields,
|
|
6863
|
+
engine,
|
|
6864
|
+
policy,
|
|
6865
|
+
lang,
|
|
6866
|
+
usersInfo: input.usersInfo,
|
|
6867
|
+
usersLabel: input.usersLabel,
|
|
6868
|
+
usersOrigin: input.usersOrigin.kind === "none" ? void 0 : input.usersOrigin
|
|
6869
|
+
});
|
|
6870
|
+
res.findings.push(...n.findings.items.filter((x) => !TRY_OWN_RULES.has(x.rule)));
|
|
6871
|
+
if (n.findings.hasErrors || !n.saved) {
|
|
6872
|
+
res.status = "invalid";
|
|
6873
|
+
continue;
|
|
6874
|
+
}
|
|
6875
|
+
const stripped = String(n.saved.pluginFields[0]?.formula ?? "");
|
|
6876
|
+
const records = picked.map((r) => ({ id: r.id, record: structuredClone(r.record), fileAppId: fields.appId }));
|
|
6877
|
+
let c;
|
|
6878
|
+
try {
|
|
6879
|
+
c = calcSettings({
|
|
6880
|
+
normalized: n,
|
|
6881
|
+
engine,
|
|
6882
|
+
fields,
|
|
6883
|
+
appId: fields.appId,
|
|
6884
|
+
records,
|
|
6885
|
+
evType: input.evType,
|
|
6886
|
+
event: input.event,
|
|
6887
|
+
mobile: input.mobile,
|
|
6888
|
+
user: input.user,
|
|
6889
|
+
usersInfo: input.usersInfo,
|
|
6890
|
+
usersOrigin: input.usersOrigin,
|
|
6891
|
+
allowDefaultBaseUrl: true
|
|
6892
|
+
});
|
|
6893
|
+
} catch (e) {
|
|
6894
|
+
if (e instanceof InputError) {
|
|
6895
|
+
fail("calc.context", e.message);
|
|
6896
|
+
continue;
|
|
6897
|
+
}
|
|
6898
|
+
throw e;
|
|
6899
|
+
}
|
|
6900
|
+
contextLine ||= c.contextLine;
|
|
6901
|
+
calcNotice ||= c.notice;
|
|
6902
|
+
if (target.type === "SPACER") {
|
|
6903
|
+
for (const r of c.records) {
|
|
6904
|
+
const src = picked.find((p) => p.id === r.id);
|
|
6905
|
+
engine.clearSinkCalls();
|
|
6906
|
+
const raw = src ? rawValueOf(engine, n.saved.pluginPP, structuredClone(src.record), stripped, target, input.evType, input.event) : null;
|
|
6907
|
+
const v = { record: r.id, value: raw };
|
|
6908
|
+
if (engine.sinkCalls().length) {
|
|
6909
|
+
v.failed = true;
|
|
6910
|
+
v.error = `実行時の sink が呼ばれた: ${engine.sinkCalls().map((s) => `${s.sink} ${s.detail}`.trim()).join(", ")}`;
|
|
6911
|
+
res.status = "failed";
|
|
6912
|
+
}
|
|
6913
|
+
engine.clearSinkCalls();
|
|
6914
|
+
res.values.push(v);
|
|
6915
|
+
}
|
|
6916
|
+
res.marks = [...normalizedMarks(n, target.code), "スペース項目(返り値をそのまま。表示は実機で)"];
|
|
6917
|
+
continue;
|
|
6918
|
+
}
|
|
6919
|
+
const lineCode = target.table ?? target.code;
|
|
6920
|
+
for (const r of c.records) {
|
|
6921
|
+
const line = r.lines.find((l) => l.fieldcode === lineCode);
|
|
6922
|
+
let value = line?.after;
|
|
6923
|
+
if (target.table && isTable2(value)) value = value.map((row) => row.value?.[target.code]?.value);
|
|
6924
|
+
const errs = r.errors.filter((e) => e.fieldcode === target.code || e.fieldcode === lineCode || e.fieldcode === "(全体)" || e.fieldcode === "(sink)").map((e) => `${e.phases.join(", ")}: ${e.message}`);
|
|
6925
|
+
const v = { record: r.id, value, ...errs.length ? { error: errs.join(" / ") } : {}, ...r.failed ? { failed: true } : {} };
|
|
6926
|
+
if (!r.failed && !errs.length) {
|
|
6927
|
+
const src = picked.find((p) => p.id === r.id);
|
|
6928
|
+
engine.clearSinkCalls();
|
|
6929
|
+
const raw = src ? rawValueOf(engine, n.saved.pluginPP, structuredClone(src.record), stripped, target, input.evType, input.event) : void 0;
|
|
6930
|
+
if (engine.sinkCalls().length) {
|
|
6931
|
+
v.failed = true;
|
|
6932
|
+
v.error = `実行時の sink が呼ばれた(生の値の評価): ${engine.sinkCalls().map((s) => `${s.sink} ${s.detail}`.trim()).join(", ")}`;
|
|
6933
|
+
} else if (raw !== void 0 && JSON.stringify(raw) !== JSON.stringify(value)) v.raw = raw;
|
|
6934
|
+
engine.clearSinkCalls();
|
|
6935
|
+
}
|
|
6936
|
+
res.values.push(v);
|
|
6937
|
+
if (line) res.marks = line.marks;
|
|
6938
|
+
if (v.failed) res.status = "failed";
|
|
6939
|
+
}
|
|
6940
|
+
}
|
|
6941
|
+
const okCount = results.filter((r) => r.status === "ok").length;
|
|
6942
|
+
const ids = picked.map((r) => r.id);
|
|
6943
|
+
const appLabel = source === "sample" ? `サンプルアプリ「${fields.appName}」` : `アプリ ${fields.appId}「${fields.appName}」の項目定義(値は架空)`;
|
|
6944
|
+
const summary = `試し計算 ${results.length} 式: ok ${okCount}${results.length - okCount ? `、エラー ${results.length - okCount}` : ""}(${appLabel}、レコード ${ids.join(", ")})`;
|
|
6945
|
+
if (!contextLine) contextLine = `文脈: アプリ ${fields.appId}(計算していない式だけ)`;
|
|
6946
|
+
const notice = `${source === "sample" ? "サンプルアプリ(架空)での模擬。利用者のアプリ・レコードは使っていない" : "利用者のアプリの項目定義に架空の値を当てた模擬。レコードは更新していない"}${calcNotice ? `。${calcNotice}` : ""}`;
|
|
6947
|
+
const text2 = [summary, notice, contextLine];
|
|
6948
|
+
if (extraFields.length) text2.push(`足した項目(架空): ${extraFields.join("、")}`);
|
|
6949
|
+
for (const r of picked) if (r.id.startsWith("d")) text2.push(`レコード ${r.id}: ${r.label}`);
|
|
6950
|
+
for (const r of results) {
|
|
6951
|
+
const head = r.target ? `${r.target.type === "SPACER" ? `スペース項目 ${r.target.elementId}` : r.target.code}(${r.target.type}${r.target.table ? `。${r.target.table} の中` : ""})← ` : "";
|
|
6952
|
+
text2.push(`[${r.index}] ${head}${r.formula.replace(/\s*\n\s*/g, " ")}`);
|
|
6953
|
+
for (const v of r.values) text2.push(` レコード ${v.record}: ${short2(v.value)}${v.raw !== void 0 ? `(生の値 ${short2(v.raw)})` : ""}${v.error ? ` ! ${v.error}` : ""}${v.failed ? " ! 結果を採らない(実行時の sink)" : ""}`);
|
|
6954
|
+
if (r.marks.length) text2.push(` 印: ${r.marks.join("、")}`);
|
|
6955
|
+
for (const f of r.findings) if (f.level !== "info") text2.push(` ${f.level === "error" ? "エラー" : "警告"} ${f.rule}: ${f.message}`);
|
|
6956
|
+
}
|
|
6957
|
+
return { app: { appId: fields.appId, appName: fields.appName, fieldCount: Object.keys(fields.properties).length, source, records: ids, extraFields }, contextLine, notice, results, summary, text: text2.join("\n") };
|
|
6958
|
+
}
|
|
6959
|
+
|
|
3218
6960
|
// src/commands/save.ts
|
|
3219
6961
|
import { createHash as createHash4 } from "node:crypto";
|
|
3220
6962
|
import { existsSync as existsSync8, mkdirSync as mkdirSync2, readFileSync as readFileSync10, renameSync as renameSync3, rmSync as rmSync3, writeFileSync as writeFileSync3 } from "node:fs";
|
|
@@ -3248,6 +6990,31 @@ async function runEvalJob(job) {
|
|
|
3248
6990
|
if (job.baseUrl) engine.setContext({ baseUrl: job.baseUrl });
|
|
3249
6991
|
const usersInfo = buildUsersInfo(job.usersSource);
|
|
3250
6992
|
const usersLabel = job.usersOrigin.kind === "file" ? job.usersOrigin.file : "既定のテストデータ(架空)";
|
|
6993
|
+
if (job.kind === "try") {
|
|
6994
|
+
if (!job.try) throw new InputError("try の仕事に式が無い(try.formulas)");
|
|
6995
|
+
const t = job.try;
|
|
6996
|
+
const r = await trySettings({
|
|
6997
|
+
engine,
|
|
6998
|
+
formulas: t.formulas,
|
|
6999
|
+
records: t.records,
|
|
7000
|
+
fields: t.fields,
|
|
7001
|
+
data: t.data,
|
|
7002
|
+
base: t.base,
|
|
7003
|
+
appFields: t.appFields,
|
|
7004
|
+
evType: t.evType,
|
|
7005
|
+
event: t.event,
|
|
7006
|
+
mobile: t.mobile,
|
|
7007
|
+
user: t.user,
|
|
7008
|
+
usersInfo,
|
|
7009
|
+
usersOrigin: job.usersOrigin,
|
|
7010
|
+
usersLabel,
|
|
7011
|
+
policy: job.policy,
|
|
7012
|
+
lang: job.lang
|
|
7013
|
+
});
|
|
7014
|
+
const warnings = r.results.reduce((n, x) => n + x.findings.filter((f) => f.level === "warning").length, 0);
|
|
7015
|
+
return { normalize: { summary: r.summary, hasErrors: r.results.some((x) => x.status !== "ok"), warnings, findings: [] }, try: r, engineWarnings: [...engine.warnings] };
|
|
7016
|
+
}
|
|
7017
|
+
if (job.settingsText === void 0 || job.settingsFile === void 0 || !job.fields) throw new InputError(`${job.kind} の仕事に設定か項目定義が無い(settingsText / settingsFile / fields)`);
|
|
3251
7018
|
const res = await normalizeSettings({
|
|
3252
7019
|
settingsText: job.settingsText,
|
|
3253
7020
|
settingsFile: job.settingsFile,
|
|
@@ -3368,8 +7135,8 @@ async function runEval(job, opt = {}) {
|
|
|
3368
7135
|
var MAX_SAVE_INPUT_BYTES = 256 * 1024;
|
|
3369
7136
|
var MAX_UPDATE_ROWS = 50;
|
|
3370
7137
|
var COMMON_KEYS2 = ["pluginEnable", "pluginProductEnv", "toolEnable", "pluginComment", "pluginDescription", "pluginBtnInfo", "pluginListInfo", "authority", "pluginMiscInfo"];
|
|
3371
|
-
function digestOf(
|
|
3372
|
-
return createHash4("sha256").update(
|
|
7138
|
+
function digestOf(text2) {
|
|
7139
|
+
return createHash4("sha256").update(text2).digest("hex");
|
|
3373
7140
|
}
|
|
3374
7141
|
var rel = (root, abs) => path14.relative(root, abs).replace(/\\/g, "/");
|
|
3375
7142
|
var SaveDenied = class extends Error {
|
|
@@ -3377,15 +7144,15 @@ var SaveDenied = class extends Error {
|
|
|
3377
7144
|
var ConflictError = class extends Error {
|
|
3378
7145
|
};
|
|
3379
7146
|
var isPlainObject2 = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
3380
|
-
function parseInput(
|
|
7147
|
+
function parseInput(text2, what) {
|
|
3381
7148
|
try {
|
|
3382
|
-
return JSON.parse(
|
|
7149
|
+
return JSON.parse(text2);
|
|
3383
7150
|
} catch (e) {
|
|
3384
7151
|
throw new InputError(`${what} を JSON として読めない${jsonErrorWhere(e)}(中身は返さない)`);
|
|
3385
7152
|
}
|
|
3386
7153
|
}
|
|
3387
|
-
function tooLarge(
|
|
3388
|
-
return Buffer.byteLength(
|
|
7154
|
+
function tooLarge(text2) {
|
|
7155
|
+
return Buffer.byteLength(text2, "utf8") > MAX_SAVE_INPUT_BYTES;
|
|
3389
7156
|
}
|
|
3390
7157
|
function fieldsFileFor(ctx, target, fields, envelope) {
|
|
3391
7158
|
const folder = appFolderOfFile(ctx.root, target);
|
|
@@ -3404,7 +7171,7 @@ function fieldsFileFor(ctx, target, fields, envelope) {
|
|
|
3404
7171
|
if (!existsSync8(file)) throw new InputError(`項目定義のファイルが無い: ${rel(ctx.root, file)}(fields コマンドか fml_fields で取る)`);
|
|
3405
7172
|
return file;
|
|
3406
7173
|
}
|
|
3407
|
-
async function normalizeText(ctx, target,
|
|
7174
|
+
async function normalizeText(ctx, target, text2, fieldsFile) {
|
|
3408
7175
|
const job = {
|
|
3409
7176
|
kind: "normalize",
|
|
3410
7177
|
pluginZip: ctx.source.pluginZip,
|
|
@@ -3412,7 +7179,7 @@ async function normalizeText(ctx, target, text, fieldsFile) {
|
|
|
3412
7179
|
mode: ctx.source.mode,
|
|
3413
7180
|
vendorDir: ctx.source.vendorDir,
|
|
3414
7181
|
baseUrl: ctx.baseUrl,
|
|
3415
|
-
settingsText:
|
|
7182
|
+
settingsText: text2,
|
|
3416
7183
|
settingsFile: rel(ctx.root, target),
|
|
3417
7184
|
fields: readFieldsFile(fieldsFile),
|
|
3418
7185
|
usersSource: ctx.usersSource ?? DEFAULT_USERS,
|
|
@@ -3422,7 +7189,7 @@ async function normalizeText(ctx, target, text, fieldsFile) {
|
|
|
3422
7189
|
};
|
|
3423
7190
|
return runEval(job, ctx.run);
|
|
3424
7191
|
}
|
|
3425
|
-
function commit(ctx, target,
|
|
7192
|
+
function commit(ctx, target, text2, mode, recheck) {
|
|
3426
7193
|
const tmp = tempPathFor(target);
|
|
3427
7194
|
let lock;
|
|
3428
7195
|
let digest;
|
|
@@ -3435,14 +7202,14 @@ function commit(ctx, target, text, mode, recheck) {
|
|
|
3435
7202
|
try {
|
|
3436
7203
|
checkTarget();
|
|
3437
7204
|
mkdirSync2(path14.dirname(target), { recursive: true });
|
|
3438
|
-
writeFileSync3(tmp,
|
|
7205
|
+
writeFileSync3(tmp, text2, { encoding: "utf8", flag: "wx" });
|
|
3439
7206
|
lock = acquireLock(target);
|
|
3440
7207
|
checkTarget();
|
|
3441
7208
|
recheck();
|
|
3442
7209
|
if (!lock.owned()) throw new ConflictError("ロックを失った(保存が 60 秒より長く止まった)。fml_summary で読み直してやり直す");
|
|
3443
7210
|
if (mode === "new") withRetry(() => placeNew(tmp, target));
|
|
3444
7211
|
else withRetry(() => renameSync3(tmp, target));
|
|
3445
|
-
digest = digestOf(
|
|
7212
|
+
digest = digestOf(text2);
|
|
3446
7213
|
ctx.afterPlace?.();
|
|
3447
7214
|
} catch (e) {
|
|
3448
7215
|
failure = e;
|
|
@@ -3534,18 +7301,18 @@ async function saveNewSettings(ctx, opt) {
|
|
|
3534
7301
|
return errorResult(ctx.root, target, e);
|
|
3535
7302
|
}
|
|
3536
7303
|
if (outcome.normalize.hasErrors || !outcome.normalize.output) return { status: "invalid", code: "NormalizeError", path: rel(ctx.root, target), findings: outcome.normalize.findings, summary: outcome.normalize.summary, message: "normalize のエラーがあるので保存しない" };
|
|
3537
|
-
const
|
|
7304
|
+
const text2 = JSON.stringify(outcome.normalize.output, null, 2) + "\n";
|
|
3538
7305
|
return finish(
|
|
3539
7306
|
ctx,
|
|
3540
7307
|
target,
|
|
3541
7308
|
outcome,
|
|
3542
|
-
() => commit(ctx, target,
|
|
7309
|
+
() => commit(ctx, target, text2, "new", () => {
|
|
3543
7310
|
if (existsSync8(target)) throw new ConflictError("確定の直前に同じ名前のファイルができた");
|
|
3544
7311
|
})
|
|
3545
7312
|
);
|
|
3546
7313
|
}
|
|
3547
|
-
function parseRows(
|
|
3548
|
-
const v = parseInput(
|
|
7314
|
+
function parseRows(text2, current) {
|
|
7315
|
+
const v = parseInput(text2, "rows");
|
|
3549
7316
|
if (!Array.isArray(v)) throw new InputError("rows は行(fieldcode を持つオブジェクト)の配列");
|
|
3550
7317
|
if (v.length === 0) throw new InputError("rows が空");
|
|
3551
7318
|
if (v.length > MAX_UPDATE_ROWS) throw new InputError(`rows は 1 回に ${MAX_UPDATE_ROWS} 行まで(${v.length} 行)`);
|
|
@@ -3564,8 +7331,8 @@ function parseRows(text, current) {
|
|
|
3564
7331
|
});
|
|
3565
7332
|
return out;
|
|
3566
7333
|
}
|
|
3567
|
-
function parseCommon(
|
|
3568
|
-
const v = parseInput(
|
|
7334
|
+
function parseCommon(text2) {
|
|
7335
|
+
const v = parseInput(text2, "common");
|
|
3569
7336
|
if (!isPlainObject2(v)) throw new InputError(`common は共通の設定のキー(${COMMON_KEYS2.join("、")})を持つオブジェクト`);
|
|
3570
7337
|
const fixed = Object.keys(v).filter((k) => k === "pluginInfos" || ENVELOPE_KEYS2.includes(k));
|
|
3571
7338
|
if (fixed.length) throw new InputError(`common で変えられないキー: ${fixed.join(", ")}(項目の行は rows、封筒(appId など)は変えない)`);
|
|
@@ -3622,14 +7389,14 @@ async function updateFields(ctx, opt) {
|
|
|
3622
7389
|
}
|
|
3623
7390
|
if (outcome.normalize.hasErrors || !outcome.normalize.output) return { status: "invalid", code: "NormalizeError", path: rel(ctx.root, target), findings: outcome.normalize.findings, summary: outcome.normalize.summary, message: "normalize のエラーがあるので保存しない(ファイルは変えていない)" };
|
|
3624
7391
|
const output = outcome.normalize.output;
|
|
3625
|
-
const
|
|
7392
|
+
const text2 = JSON.stringify(output, null, 2) + "\n";
|
|
3626
7393
|
const name = rel(ctx.root, target);
|
|
3627
7394
|
const d = diffSettings(settings, output, { before: `${name}(前)`, after: name });
|
|
3628
7395
|
return finish(
|
|
3629
7396
|
ctx,
|
|
3630
7397
|
target,
|
|
3631
7398
|
outcome,
|
|
3632
|
-
() => commit(ctx, target,
|
|
7399
|
+
() => commit(ctx, target, text2, "replace", () => {
|
|
3633
7400
|
if (digestOf(readFileSync10(target)) !== opt.expectedDigest) throw new ConflictError("確定の直前にファイルが変わった(digest が違う)。fml_summary で読み直す");
|
|
3634
7401
|
}),
|
|
3635
7402
|
{ diff: { fields: d.fields, common: d.common } }
|
|
@@ -3656,6 +7423,7 @@ export {
|
|
|
3656
7423
|
EDIT_RE,
|
|
3657
7424
|
ENVELOPE_KEYS2 as ENVELOPE_KEYS,
|
|
3658
7425
|
EVENT_RE,
|
|
7426
|
+
EXTRA_TYPES,
|
|
3659
7427
|
EvalError,
|
|
3660
7428
|
EvalTimeoutError,
|
|
3661
7429
|
FALLBACK_PROFILE,
|
|
@@ -3693,11 +7461,21 @@ export {
|
|
|
3693
7461
|
ROW_SCREEN_KEYS,
|
|
3694
7462
|
ROW_SOURCE_KEYS,
|
|
3695
7463
|
RestError,
|
|
7464
|
+
SAMPLE_APP,
|
|
3696
7465
|
SENTINEL_USER,
|
|
3697
7466
|
SHAPE_TEXT_MAX,
|
|
3698
7467
|
SNAPSHOT_PREFIX,
|
|
3699
7468
|
SNAPSHOT_RE,
|
|
3700
7469
|
SUPPORTED_API_VERSIONS,
|
|
7470
|
+
TRY_DEFAULT_AS,
|
|
7471
|
+
TRY_MAX_DATA,
|
|
7472
|
+
TRY_MAX_EXTRA_FIELDS,
|
|
7473
|
+
TRY_MAX_FORMULAS,
|
|
7474
|
+
TRY_MAX_FORMULA_CHARS,
|
|
7475
|
+
TRY_MAX_OPTIONS,
|
|
7476
|
+
TRY_MAX_TABLE_ROWS,
|
|
7477
|
+
TRY_MAX_VALUE_CHARS,
|
|
7478
|
+
TYPE_ALIASES,
|
|
3701
7479
|
USER_INFO_FUNCTIONS,
|
|
3702
7480
|
UsersDataError,
|
|
3703
7481
|
UsersPullError,
|
|
@@ -3707,6 +7485,7 @@ export {
|
|
|
3707
7485
|
appDirFor,
|
|
3708
7486
|
appFolderOfFile,
|
|
3709
7487
|
appFoldersOf,
|
|
7488
|
+
applyData,
|
|
3710
7489
|
assertAppMark,
|
|
3711
7490
|
assertChangeAllowed,
|
|
3712
7491
|
assertInsideWorkspace,
|
|
@@ -3715,24 +7494,31 @@ export {
|
|
|
3715
7494
|
authFor,
|
|
3716
7495
|
baseUrlFromEnv,
|
|
3717
7496
|
bodyOf,
|
|
7497
|
+
buildTryEnvelope,
|
|
3718
7498
|
buildUsersInfo,
|
|
3719
7499
|
builtinErrorName,
|
|
3720
7500
|
calcSettings,
|
|
7501
|
+
canonicalType,
|
|
7502
|
+
checkDataList,
|
|
3721
7503
|
classOfAppPath,
|
|
3722
7504
|
classifyEvalError,
|
|
3723
7505
|
cleanupAll,
|
|
3724
7506
|
connectionStatusOf,
|
|
3725
7507
|
contextTargetsOf,
|
|
7508
|
+
convertValue,
|
|
3726
7509
|
createContext,
|
|
3727
7510
|
createRestClient,
|
|
3728
7511
|
defaultPullName,
|
|
3729
7512
|
defaultUsersInfo,
|
|
3730
7513
|
describeAuth,
|
|
3731
7514
|
describeRecord,
|
|
7515
|
+
describeSampleApp,
|
|
3732
7516
|
diffSettings,
|
|
3733
7517
|
digestOf,
|
|
3734
7518
|
editNameOf,
|
|
7519
|
+
emptyRecordOf,
|
|
3735
7520
|
ensureAppFolder,
|
|
7521
|
+
extendFields,
|
|
3736
7522
|
fetchFields,
|
|
3737
7523
|
fetchRecord,
|
|
3738
7524
|
findAppDir,
|
|
@@ -3764,6 +7550,7 @@ export {
|
|
|
3764
7550
|
modeOf,
|
|
3765
7551
|
momentFileOf,
|
|
3766
7552
|
narrowRecord,
|
|
7553
|
+
normalizeDefaults,
|
|
3767
7554
|
normalizeKintoneBaseUrl,
|
|
3768
7555
|
normalizeSettings,
|
|
3769
7556
|
parsePolicy,
|
|
@@ -3787,6 +7574,7 @@ export {
|
|
|
3787
7574
|
requireProfiles,
|
|
3788
7575
|
resolvePluginSources,
|
|
3789
7576
|
resolveRead,
|
|
7577
|
+
resolveTryTarget,
|
|
3790
7578
|
resolveWrite,
|
|
3791
7579
|
resolveWriteDir,
|
|
3792
7580
|
rowsOf,
|
|
@@ -3794,6 +7582,7 @@ export {
|
|
|
3794
7582
|
runEvalJob,
|
|
3795
7583
|
safeFileName,
|
|
3796
7584
|
sameIdentity,
|
|
7585
|
+
sampleApp,
|
|
3797
7586
|
saveNewSettings,
|
|
3798
7587
|
scanFormula,
|
|
3799
7588
|
scanFormulas,
|
|
@@ -3803,6 +7592,7 @@ export {
|
|
|
3803
7592
|
shapeLines,
|
|
3804
7593
|
snapshotNameOf,
|
|
3805
7594
|
snapshotOf,
|
|
7595
|
+
spacersOf,
|
|
3806
7596
|
stronglyConnected,
|
|
3807
7597
|
summarizeFields,
|
|
3808
7598
|
summarizeRecord,
|
|
@@ -3811,6 +7601,7 @@ export {
|
|
|
3811
7601
|
takeInbox,
|
|
3812
7602
|
tempPathFor,
|
|
3813
7603
|
toolsMeta,
|
|
7604
|
+
trySettings,
|
|
3814
7605
|
unquote,
|
|
3815
7606
|
unusedProfileDirs,
|
|
3816
7607
|
updateFields,
|