@rex0220/formula-authoring-tools 0.2.1 → 0.3.0
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 +3 -1
- package/dist/cli.mjs +3837 -54
- package/dist/core.mjs +3792 -70
- package/dist/eval-worker.mjs +3710 -31
- 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 +115 -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/eval-worker.mjs
CHANGED
|
@@ -93,7 +93,7 @@ function devMeta() {
|
|
|
93
93
|
return { toolsVersion: pkg.version, pluginId: FORMULA_PLUGIN_ID, minPluginVersion: MIN_PLUGIN_VERSION, supportedApiVersions: [...SUPPORTED_API_VERSIONS], commit: gitCommit(AUTHORING_ROOT), builtAt: "", mode: "dev" };
|
|
94
94
|
}
|
|
95
95
|
function toolsMeta() {
|
|
96
|
-
if (true) return JSON.parse('{"toolsVersion":"0.
|
|
96
|
+
if (true) return JSON.parse('{"toolsVersion":"0.3.0","pluginId":"dhgihghfgfmibkdldkeibboabfnmdpke","minPluginVersion":101,"supportedApiVersions":[1],"commit":"cfbd850","builtAt":"2026-10-18T05:24:49.527Z","mode":"build"}');
|
|
97
97
|
return devMeta();
|
|
98
98
|
}
|
|
99
99
|
|
|
@@ -637,11 +637,11 @@ function jsonDiff(a, b, pathStr, out) {
|
|
|
637
637
|
a.forEach((x, i) => jsonDiff(x, b[i], `${pathStr}[${i}]`, out));
|
|
638
638
|
return;
|
|
639
639
|
}
|
|
640
|
-
const
|
|
640
|
+
const short3 = (v) => {
|
|
641
641
|
const s = JSON.stringify(v);
|
|
642
642
|
return s === void 0 ? "undefined" : s.length > 100 ? s.slice(0, 100) + "…" : s;
|
|
643
643
|
};
|
|
644
|
-
out.push(`${pathStr}: ${
|
|
644
|
+
out.push(`${pathStr}: ${short3(a)} → ${short3(b)}`);
|
|
645
645
|
}
|
|
646
646
|
function quiet(fn) {
|
|
647
647
|
const saved = { log: console.log, warn: console.warn, error: console.error };
|
|
@@ -750,7 +750,7 @@ var DEFAULT_POLICY = { allowFunctions: [], allowMiscChanges: false };
|
|
|
750
750
|
// src/scan.ts
|
|
751
751
|
var IDENT = /[A-Za-z0-9_$\u0080-]/;
|
|
752
752
|
var KEYWORDS = /* @__PURE__ */ new Set(["true", "false", "TRUE", "FALSE", "null"]);
|
|
753
|
-
function scanFormula(
|
|
753
|
+
function scanFormula(text2) {
|
|
754
754
|
const functions = {};
|
|
755
755
|
const identifiers = /* @__PURE__ */ new Set();
|
|
756
756
|
const strings = [];
|
|
@@ -759,24 +759,24 @@ function scanFormula(text) {
|
|
|
759
759
|
const calls = [];
|
|
760
760
|
let depth = 0;
|
|
761
761
|
let i = 0;
|
|
762
|
-
const n =
|
|
762
|
+
const n = text2.length;
|
|
763
763
|
while (i < n) {
|
|
764
|
-
const ch =
|
|
764
|
+
const ch = text2[i];
|
|
765
765
|
if (ch === '"') {
|
|
766
766
|
let j = i + 1;
|
|
767
767
|
let s = "";
|
|
768
768
|
let closed = false;
|
|
769
769
|
while (j < n) {
|
|
770
|
-
if (
|
|
770
|
+
if (text2[j] === "\\" && text2[j + 1] === '"') {
|
|
771
771
|
s += '\\"';
|
|
772
772
|
j += 2;
|
|
773
773
|
continue;
|
|
774
774
|
}
|
|
775
|
-
if (
|
|
775
|
+
if (text2[j] === '"') {
|
|
776
776
|
closed = true;
|
|
777
777
|
break;
|
|
778
778
|
}
|
|
779
|
-
s +=
|
|
779
|
+
s += text2[j];
|
|
780
780
|
j++;
|
|
781
781
|
}
|
|
782
782
|
if (!closed) problems.push(`閉じていない文字列(${i} 文字目から)`);
|
|
@@ -803,11 +803,11 @@ function scanFormula(text) {
|
|
|
803
803
|
}
|
|
804
804
|
if (IDENT.test(ch)) {
|
|
805
805
|
let j = i;
|
|
806
|
-
while (j < n && IDENT.test(
|
|
807
|
-
const word =
|
|
806
|
+
while (j < n && IDENT.test(text2[j])) j++;
|
|
807
|
+
const word = text2.slice(i, j);
|
|
808
808
|
let k = j;
|
|
809
|
-
while (k < n && (
|
|
810
|
-
if (
|
|
809
|
+
while (k < n && (text2[k] === " " || text2[k] === " ")) k++;
|
|
810
|
+
if (text2[k] === "(") {
|
|
811
811
|
functions[word] = (functions[word] ?? 0) + 1;
|
|
812
812
|
depth++;
|
|
813
813
|
calls.push(word);
|
|
@@ -824,20 +824,20 @@ function scanFormula(text) {
|
|
|
824
824
|
if (depth > 0) problems.push(`閉じていない ( が ${depth} 個`);
|
|
825
825
|
return { functions, identifiers, strings, stringArgs, problems };
|
|
826
826
|
}
|
|
827
|
-
function staticArgsOf(
|
|
827
|
+
function staticArgsOf(text2, fn) {
|
|
828
828
|
const out = [];
|
|
829
829
|
const re = new RegExp(`(?<![A-Za-z0-9_$\\u0080-\\uFFFF])${fn}\\s*\\(\\s*([A-Za-z0-9_$\\u0080-\\uFFFF]+)\\s*[,)]`, "g");
|
|
830
830
|
let m;
|
|
831
|
-
while (m = re.exec(
|
|
831
|
+
while (m = re.exec(text2)) out.push(m[1]);
|
|
832
832
|
return out;
|
|
833
833
|
}
|
|
834
834
|
|
|
835
835
|
// src/commands/users.ts
|
|
836
836
|
var USER_INFO_FUNCTIONS = { UINFO: "users", OINFO: "orgs", OUSERS: "orgs", GINFO: "groups", GUSERS: "groups" };
|
|
837
837
|
var CALL_RE = /(?<![A-Za-z0-9_$\u0080-\uFFFF])(UINFO|OINFO|GINFO|OUSERS|GUSERS)\s*\(\s*("(?:\\"|[^"])*"|[^,()]*)/g;
|
|
838
|
-
function scanUserInfoCalls(
|
|
838
|
+
function scanUserInfoCalls(text2) {
|
|
839
839
|
const out = { users: [], orgs: [], groups: [], dynamic: [] };
|
|
840
|
-
for (const m of
|
|
840
|
+
for (const m of text2.matchAll(CALL_RE)) {
|
|
841
841
|
const fn = m[1];
|
|
842
842
|
const arg = m[2].trim();
|
|
843
843
|
const kind = USER_INFO_FUNCTIONS[fn];
|
|
@@ -861,9 +861,9 @@ var isPlain = (v) => !!v && typeof v === "object" && !Array.isArray(v);
|
|
|
861
861
|
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"]);
|
|
862
862
|
function codesInStrings(scan, userInfoFns) {
|
|
863
863
|
const out = [];
|
|
864
|
-
for (const { text, call } of scan.stringArgs) {
|
|
864
|
+
for (const { text: text2, call } of scan.stringArgs) {
|
|
865
865
|
if (!userInfoFns.includes(call)) continue;
|
|
866
|
-
for (const c of
|
|
866
|
+
for (const c of text2.split(",")) {
|
|
867
867
|
const t = c.trim();
|
|
868
868
|
if (t && !t.startsWith("#") && !UINFO_OPTIONS.has(t) && /^[^\s"]{1,128}$/.test(t) && !out.includes(t)) out.push(t);
|
|
869
869
|
}
|
|
@@ -1180,7 +1180,7 @@ function calcSettings(input) {
|
|
|
1180
1180
|
engine.setContext({ appId: input.appId, mobile: !!input.mobile, loginUser, lookupTargets: targets.lookupTargets, relatedTargets: targets.relatedTargets, usersInfo: table, usersOrigin: table ? input.usersOrigin : { kind: "none" } });
|
|
1181
1181
|
const needs = normalized.contextNeeds;
|
|
1182
1182
|
const ctx = engine.context();
|
|
1183
|
-
if (needs.appUrl.length && ctx.baseUrl === DEFAULT_CONTEXT_BASE_URL) throw new InputError(`APP_URL を使う項目(${needs.appUrl.join(", ")})があるが、接続先の URL が無い(.env の KINTONE_BASE_URL)`);
|
|
1183
|
+
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)`);
|
|
1184
1184
|
if (needs.login.length && !loginUser) throw new InputError(`ログインユーザーを使う項目(${needs.login.join(", ")})があるが、ユーザーが決まらない(--user <code>。既定の authoring が ${input.usersOrigin.kind === "file" ? input.usersOrigin.file : "テストデータ"} に居ない)`);
|
|
1185
1185
|
for (const l of needs.lookups) if (!(l.arg in targets.lookupTargets)) throw new InputError(`${l.fieldcode} の LOOKUP_GETID(${l.arg}): ${l.arg} はルックアップ項目でないか、参照先のアプリを参照する権限が無い(fields を取り直す)`);
|
|
1186
1186
|
for (const l of needs.related) if (!(l.arg in targets.relatedTargets)) throw new InputError(`${l.fieldcode} の RELATED_GETID(${l.arg}): ${l.arg} は関連レコード一覧でないか、参照先のアプリを参照する権限が無い`);
|
|
@@ -1225,44 +1225,3698 @@ function calcSettings(input) {
|
|
|
1225
1225
|
results.push({ id, lines, changed: lines.filter((l) => l.changed).length, errors, sinks, failed: sinks.length > 0 });
|
|
1226
1226
|
}
|
|
1227
1227
|
engine.clearSinkCalls();
|
|
1228
|
-
const
|
|
1228
|
+
const text2 = [notice, contextLine];
|
|
1229
1229
|
for (const res of results) {
|
|
1230
|
-
|
|
1230
|
+
text2.push(`レコード ${res.id}: 計算対象 ${res.lines.length} 項目、変わる ${res.changed}${res.errors.length ? `、エラー ${res.errors.length}` : ""}`);
|
|
1231
1231
|
for (const l of res.lines) {
|
|
1232
1232
|
const marks = l.marks.length ? ` [${l.marks.join("、")}]` : "";
|
|
1233
1233
|
if (isTable(l.before) && isTable(l.after)) {
|
|
1234
1234
|
const rows = Math.max(l.before.length, l.after.length);
|
|
1235
|
-
|
|
1235
|
+
text2.push(` ${l.changed ? "★" : " "} ${l.fieldcode}: テーブル ${l.before.length} 行 → ${l.after.length} 行${marks}`);
|
|
1236
1236
|
for (let i = 0; i < rows; i++) {
|
|
1237
1237
|
if (i >= l.after.length) {
|
|
1238
|
-
|
|
1238
|
+
text2.push(` 行 ${i + 1}(削除)`);
|
|
1239
1239
|
continue;
|
|
1240
1240
|
}
|
|
1241
1241
|
const av = l.after[i]?.value ?? {};
|
|
1242
1242
|
if (i >= l.before.length) {
|
|
1243
1243
|
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)}`);
|
|
1244
|
-
|
|
1244
|
+
text2.push(` 行 ${i + 1}(追加): ${cells2.join("、") || "(空)"}`);
|
|
1245
1245
|
continue;
|
|
1246
1246
|
}
|
|
1247
1247
|
const bv = l.before[i]?.value ?? {};
|
|
1248
1248
|
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)}`);
|
|
1249
|
-
if (cells.length)
|
|
1249
|
+
if (cells.length) text2.push(` 行 ${i + 1}: ${cells.join("、")}`);
|
|
1250
1250
|
}
|
|
1251
1251
|
continue;
|
|
1252
1252
|
}
|
|
1253
|
-
|
|
1253
|
+
text2.push(` ${l.changed ? "★" : " "} ${l.fieldcode}: ${short(l.before)} → ${short(l.after)}${marks}`);
|
|
1254
1254
|
}
|
|
1255
|
-
for (const e of res.errors)
|
|
1256
|
-
if (res.failed)
|
|
1255
|
+
for (const e of res.errors) text2.push(` ! ${e.fieldcode}(${e.phases.join(", ")}): ${e.message}`);
|
|
1256
|
+
if (res.failed) text2.push(" ! このレコードの結果は採らない(実行時の sink)");
|
|
1257
1257
|
}
|
|
1258
1258
|
let summary = "";
|
|
1259
1259
|
if (results.length > 1) {
|
|
1260
1260
|
const changedRecords = results.filter((r) => r.changed > 0).length;
|
|
1261
1261
|
const changedFields = new Set(results.flatMap((r) => r.lines.filter((l) => l.changed).map((l) => l.fieldcode)));
|
|
1262
1262
|
summary = `入力した ${results.length} 件中 ${changedRecords} 件の模擬差分。変わる項目: ${[...changedFields].join(", ") || "なし"}(この件数は入力したレコードとこの文脈でのもの。アプリ全体の件数ではない)`;
|
|
1263
|
-
|
|
1263
|
+
text2.push(summary);
|
|
1264
1264
|
}
|
|
1265
|
-
return { contextLine, notice, records: results, summary, text:
|
|
1265
|
+
return { contextLine, notice, records: results, summary, text: text2.join("\n") };
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
// src/sample-app/fields.json
|
|
1269
|
+
var fields_default = {
|
|
1270
|
+
tool: "formula-authoring fields",
|
|
1271
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
1272
|
+
baseUrl: "https://example.cybozu.com",
|
|
1273
|
+
appId: 4329,
|
|
1274
|
+
appName: "計算式サンプル",
|
|
1275
|
+
preview: false,
|
|
1276
|
+
lang: "ja",
|
|
1277
|
+
revision: "1",
|
|
1278
|
+
properties: {
|
|
1279
|
+
チェック2: {
|
|
1280
|
+
type: "CHECK_BOX",
|
|
1281
|
+
code: "チェック2",
|
|
1282
|
+
label: "チェック2",
|
|
1283
|
+
noLabel: false,
|
|
1284
|
+
required: false,
|
|
1285
|
+
options: {
|
|
1286
|
+
甲: {
|
|
1287
|
+
label: "甲",
|
|
1288
|
+
index: "0"
|
|
1289
|
+
},
|
|
1290
|
+
乙: {
|
|
1291
|
+
label: "乙",
|
|
1292
|
+
index: "1"
|
|
1293
|
+
},
|
|
1294
|
+
丙: {
|
|
1295
|
+
label: "丙",
|
|
1296
|
+
index: "2"
|
|
1297
|
+
}
|
|
1298
|
+
},
|
|
1299
|
+
defaultValue: [],
|
|
1300
|
+
align: "HORIZONTAL"
|
|
1301
|
+
},
|
|
1302
|
+
レコード番号: {
|
|
1303
|
+
type: "RECORD_NUMBER",
|
|
1304
|
+
code: "レコード番号",
|
|
1305
|
+
label: "レコード番号",
|
|
1306
|
+
noLabel: false
|
|
1307
|
+
},
|
|
1308
|
+
ドロップダウン2: {
|
|
1309
|
+
type: "DROP_DOWN",
|
|
1310
|
+
code: "ドロップダウン2",
|
|
1311
|
+
label: "ドロップダウン2",
|
|
1312
|
+
noLabel: false,
|
|
1313
|
+
required: false,
|
|
1314
|
+
options: {
|
|
1315
|
+
甲: {
|
|
1316
|
+
label: "甲",
|
|
1317
|
+
index: "0"
|
|
1318
|
+
},
|
|
1319
|
+
乙: {
|
|
1320
|
+
label: "乙",
|
|
1321
|
+
index: "1"
|
|
1322
|
+
},
|
|
1323
|
+
丙: {
|
|
1324
|
+
label: "丙",
|
|
1325
|
+
index: "2"
|
|
1326
|
+
}
|
|
1327
|
+
},
|
|
1328
|
+
defaultValue: ""
|
|
1329
|
+
},
|
|
1330
|
+
ユーザー2: {
|
|
1331
|
+
type: "USER_SELECT",
|
|
1332
|
+
code: "ユーザー2",
|
|
1333
|
+
label: "ユーザー2",
|
|
1334
|
+
noLabel: false,
|
|
1335
|
+
required: false,
|
|
1336
|
+
entities: [],
|
|
1337
|
+
defaultValue: []
|
|
1338
|
+
},
|
|
1339
|
+
組織1: {
|
|
1340
|
+
type: "ORGANIZATION_SELECT",
|
|
1341
|
+
code: "組織1",
|
|
1342
|
+
label: "組織1",
|
|
1343
|
+
noLabel: false,
|
|
1344
|
+
required: false,
|
|
1345
|
+
entities: [],
|
|
1346
|
+
defaultValue: []
|
|
1347
|
+
},
|
|
1348
|
+
ドロップダウン1: {
|
|
1349
|
+
type: "DROP_DOWN",
|
|
1350
|
+
code: "ドロップダウン1",
|
|
1351
|
+
label: "ドロップダウン1",
|
|
1352
|
+
noLabel: false,
|
|
1353
|
+
required: false,
|
|
1354
|
+
options: {
|
|
1355
|
+
A: {
|
|
1356
|
+
label: "A",
|
|
1357
|
+
index: "0"
|
|
1358
|
+
},
|
|
1359
|
+
B: {
|
|
1360
|
+
label: "B",
|
|
1361
|
+
index: "1"
|
|
1362
|
+
},
|
|
1363
|
+
C: {
|
|
1364
|
+
label: "C",
|
|
1365
|
+
index: "2"
|
|
1366
|
+
}
|
|
1367
|
+
},
|
|
1368
|
+
defaultValue: ""
|
|
1369
|
+
},
|
|
1370
|
+
更新者: {
|
|
1371
|
+
type: "MODIFIER",
|
|
1372
|
+
code: "更新者",
|
|
1373
|
+
label: "更新者",
|
|
1374
|
+
noLabel: false
|
|
1375
|
+
},
|
|
1376
|
+
ユーザー1: {
|
|
1377
|
+
type: "USER_SELECT",
|
|
1378
|
+
code: "ユーザー1",
|
|
1379
|
+
label: "ユーザー1",
|
|
1380
|
+
noLabel: false,
|
|
1381
|
+
required: false,
|
|
1382
|
+
entities: [],
|
|
1383
|
+
defaultValue: []
|
|
1384
|
+
},
|
|
1385
|
+
組織2: {
|
|
1386
|
+
type: "ORGANIZATION_SELECT",
|
|
1387
|
+
code: "組織2",
|
|
1388
|
+
label: "組織2",
|
|
1389
|
+
noLabel: false,
|
|
1390
|
+
required: false,
|
|
1391
|
+
entities: [],
|
|
1392
|
+
defaultValue: []
|
|
1393
|
+
},
|
|
1394
|
+
テーブル2: {
|
|
1395
|
+
type: "SUBTABLE",
|
|
1396
|
+
code: "テーブル2",
|
|
1397
|
+
noLabel: false,
|
|
1398
|
+
label: "テーブル2",
|
|
1399
|
+
fields: {
|
|
1400
|
+
T2_複数選択: {
|
|
1401
|
+
type: "MULTI_SELECT",
|
|
1402
|
+
code: "T2_複数選択",
|
|
1403
|
+
label: "T2_複数選択",
|
|
1404
|
+
noLabel: false,
|
|
1405
|
+
required: false,
|
|
1406
|
+
options: {
|
|
1407
|
+
A: {
|
|
1408
|
+
label: "A",
|
|
1409
|
+
index: "0"
|
|
1410
|
+
},
|
|
1411
|
+
B: {
|
|
1412
|
+
label: "B",
|
|
1413
|
+
index: "1"
|
|
1414
|
+
},
|
|
1415
|
+
C: {
|
|
1416
|
+
label: "C",
|
|
1417
|
+
index: "2"
|
|
1418
|
+
}
|
|
1419
|
+
},
|
|
1420
|
+
defaultValue: []
|
|
1421
|
+
},
|
|
1422
|
+
T2_文字列複数行: {
|
|
1423
|
+
type: "MULTI_LINE_TEXT",
|
|
1424
|
+
code: "T2_文字列複数行",
|
|
1425
|
+
label: "T2_文字列複数行",
|
|
1426
|
+
noLabel: false,
|
|
1427
|
+
required: false,
|
|
1428
|
+
defaultValue: ""
|
|
1429
|
+
},
|
|
1430
|
+
T2_リンク: {
|
|
1431
|
+
type: "LINK",
|
|
1432
|
+
code: "T2_リンク",
|
|
1433
|
+
label: "T2_リンク",
|
|
1434
|
+
noLabel: false,
|
|
1435
|
+
required: false,
|
|
1436
|
+
protocol: "WEB",
|
|
1437
|
+
minLength: "",
|
|
1438
|
+
maxLength: "",
|
|
1439
|
+
unique: false,
|
|
1440
|
+
defaultValue: ""
|
|
1441
|
+
},
|
|
1442
|
+
T2_リッチ: {
|
|
1443
|
+
type: "RICH_TEXT",
|
|
1444
|
+
code: "T2_リッチ",
|
|
1445
|
+
label: "T2_リッチ",
|
|
1446
|
+
noLabel: false,
|
|
1447
|
+
required: false,
|
|
1448
|
+
defaultValue: ""
|
|
1449
|
+
},
|
|
1450
|
+
T2_文字列: {
|
|
1451
|
+
type: "SINGLE_LINE_TEXT",
|
|
1452
|
+
code: "T2_文字列",
|
|
1453
|
+
label: "T2_文字列",
|
|
1454
|
+
noLabel: false,
|
|
1455
|
+
required: false,
|
|
1456
|
+
minLength: "",
|
|
1457
|
+
maxLength: "",
|
|
1458
|
+
expression: "",
|
|
1459
|
+
hideExpression: false,
|
|
1460
|
+
unique: false,
|
|
1461
|
+
defaultValue: ""
|
|
1462
|
+
},
|
|
1463
|
+
T2_チェック: {
|
|
1464
|
+
type: "CHECK_BOX",
|
|
1465
|
+
code: "T2_チェック",
|
|
1466
|
+
label: "T2_チェック",
|
|
1467
|
+
noLabel: false,
|
|
1468
|
+
required: false,
|
|
1469
|
+
options: {
|
|
1470
|
+
A: {
|
|
1471
|
+
label: "A",
|
|
1472
|
+
index: "0"
|
|
1473
|
+
},
|
|
1474
|
+
B: {
|
|
1475
|
+
label: "B",
|
|
1476
|
+
index: "1"
|
|
1477
|
+
},
|
|
1478
|
+
C: {
|
|
1479
|
+
label: "C",
|
|
1480
|
+
index: "2"
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1483
|
+
defaultValue: [],
|
|
1484
|
+
align: "HORIZONTAL"
|
|
1485
|
+
},
|
|
1486
|
+
T2_ユーザー: {
|
|
1487
|
+
type: "USER_SELECT",
|
|
1488
|
+
code: "T2_ユーザー",
|
|
1489
|
+
label: "T2_ユーザー",
|
|
1490
|
+
noLabel: false,
|
|
1491
|
+
required: false,
|
|
1492
|
+
entities: [],
|
|
1493
|
+
defaultValue: []
|
|
1494
|
+
},
|
|
1495
|
+
T2_グループ: {
|
|
1496
|
+
type: "GROUP_SELECT",
|
|
1497
|
+
code: "T2_グループ",
|
|
1498
|
+
label: "T2_グループ",
|
|
1499
|
+
noLabel: false,
|
|
1500
|
+
required: false,
|
|
1501
|
+
entities: [],
|
|
1502
|
+
defaultValue: []
|
|
1503
|
+
},
|
|
1504
|
+
T2_日付: {
|
|
1505
|
+
type: "DATE",
|
|
1506
|
+
code: "T2_日付",
|
|
1507
|
+
label: "T2_日付",
|
|
1508
|
+
noLabel: false,
|
|
1509
|
+
required: false,
|
|
1510
|
+
unique: false,
|
|
1511
|
+
defaultValue: "",
|
|
1512
|
+
defaultNowValue: false
|
|
1513
|
+
},
|
|
1514
|
+
T2_数値: {
|
|
1515
|
+
type: "NUMBER",
|
|
1516
|
+
code: "T2_数値",
|
|
1517
|
+
label: "T2_数値",
|
|
1518
|
+
noLabel: false,
|
|
1519
|
+
required: false,
|
|
1520
|
+
minValue: "",
|
|
1521
|
+
maxValue: "",
|
|
1522
|
+
digit: false,
|
|
1523
|
+
unique: false,
|
|
1524
|
+
defaultValue: "",
|
|
1525
|
+
displayScale: "",
|
|
1526
|
+
unit: "",
|
|
1527
|
+
unitPosition: "BEFORE"
|
|
1528
|
+
},
|
|
1529
|
+
T2_ドロップダウン: {
|
|
1530
|
+
type: "DROP_DOWN",
|
|
1531
|
+
code: "T2_ドロップダウン",
|
|
1532
|
+
label: "T2_ドロップダウン",
|
|
1533
|
+
noLabel: false,
|
|
1534
|
+
required: false,
|
|
1535
|
+
options: {
|
|
1536
|
+
A: {
|
|
1537
|
+
label: "A",
|
|
1538
|
+
index: "0"
|
|
1539
|
+
},
|
|
1540
|
+
B: {
|
|
1541
|
+
label: "B",
|
|
1542
|
+
index: "1"
|
|
1543
|
+
},
|
|
1544
|
+
C: {
|
|
1545
|
+
label: "C",
|
|
1546
|
+
index: "2"
|
|
1547
|
+
}
|
|
1548
|
+
},
|
|
1549
|
+
defaultValue: ""
|
|
1550
|
+
},
|
|
1551
|
+
T2_組織: {
|
|
1552
|
+
type: "ORGANIZATION_SELECT",
|
|
1553
|
+
code: "T2_組織",
|
|
1554
|
+
label: "T2_組織",
|
|
1555
|
+
noLabel: false,
|
|
1556
|
+
required: false,
|
|
1557
|
+
entities: [],
|
|
1558
|
+
defaultValue: []
|
|
1559
|
+
},
|
|
1560
|
+
T2_計算: {
|
|
1561
|
+
type: "CALC",
|
|
1562
|
+
code: "T2_計算",
|
|
1563
|
+
label: "T2_計算",
|
|
1564
|
+
noLabel: false,
|
|
1565
|
+
required: false,
|
|
1566
|
+
expression: "T2_数値 * 2",
|
|
1567
|
+
format: "NUMBER",
|
|
1568
|
+
displayScale: "",
|
|
1569
|
+
hideExpression: false,
|
|
1570
|
+
unit: "",
|
|
1571
|
+
unitPosition: "BEFORE"
|
|
1572
|
+
},
|
|
1573
|
+
T2_ラジオ: {
|
|
1574
|
+
type: "RADIO_BUTTON",
|
|
1575
|
+
code: "T2_ラジオ",
|
|
1576
|
+
label: "T2_ラジオ",
|
|
1577
|
+
noLabel: false,
|
|
1578
|
+
required: true,
|
|
1579
|
+
options: {
|
|
1580
|
+
A: {
|
|
1581
|
+
label: "A",
|
|
1582
|
+
index: "0"
|
|
1583
|
+
},
|
|
1584
|
+
B: {
|
|
1585
|
+
label: "B",
|
|
1586
|
+
index: "1"
|
|
1587
|
+
},
|
|
1588
|
+
C: {
|
|
1589
|
+
label: "C",
|
|
1590
|
+
index: "2"
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
defaultValue: "A",
|
|
1594
|
+
align: "HORIZONTAL"
|
|
1595
|
+
},
|
|
1596
|
+
T2_日時: {
|
|
1597
|
+
type: "DATETIME",
|
|
1598
|
+
code: "T2_日時",
|
|
1599
|
+
label: "T2_日時",
|
|
1600
|
+
noLabel: false,
|
|
1601
|
+
required: false,
|
|
1602
|
+
unique: false,
|
|
1603
|
+
defaultValue: "",
|
|
1604
|
+
defaultNowValue: false
|
|
1605
|
+
},
|
|
1606
|
+
T2_添付: {
|
|
1607
|
+
type: "FILE",
|
|
1608
|
+
code: "T2_添付",
|
|
1609
|
+
label: "T2_添付",
|
|
1610
|
+
noLabel: false,
|
|
1611
|
+
required: false,
|
|
1612
|
+
thumbnailSize: "50"
|
|
1613
|
+
},
|
|
1614
|
+
T2_時刻: {
|
|
1615
|
+
type: "TIME",
|
|
1616
|
+
code: "T2_時刻",
|
|
1617
|
+
label: "T2_時刻",
|
|
1618
|
+
noLabel: false,
|
|
1619
|
+
required: false,
|
|
1620
|
+
defaultValue: "",
|
|
1621
|
+
defaultNowValue: false
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
},
|
|
1625
|
+
ステータス: {
|
|
1626
|
+
type: "STATUS",
|
|
1627
|
+
code: "ステータス",
|
|
1628
|
+
label: "ステータス",
|
|
1629
|
+
enabled: true
|
|
1630
|
+
},
|
|
1631
|
+
グループ1: {
|
|
1632
|
+
type: "GROUP_SELECT",
|
|
1633
|
+
code: "グループ1",
|
|
1634
|
+
label: "グループ1",
|
|
1635
|
+
noLabel: false,
|
|
1636
|
+
required: false,
|
|
1637
|
+
entities: [],
|
|
1638
|
+
defaultValue: []
|
|
1639
|
+
},
|
|
1640
|
+
テーブル1: {
|
|
1641
|
+
type: "SUBTABLE",
|
|
1642
|
+
code: "テーブル1",
|
|
1643
|
+
noLabel: false,
|
|
1644
|
+
label: "テーブル1",
|
|
1645
|
+
fields: {
|
|
1646
|
+
T1_ユーザー: {
|
|
1647
|
+
type: "USER_SELECT",
|
|
1648
|
+
code: "T1_ユーザー",
|
|
1649
|
+
label: "T1_ユーザー",
|
|
1650
|
+
noLabel: false,
|
|
1651
|
+
required: false,
|
|
1652
|
+
entities: [],
|
|
1653
|
+
defaultValue: []
|
|
1654
|
+
},
|
|
1655
|
+
T1_文字列複数行: {
|
|
1656
|
+
type: "MULTI_LINE_TEXT",
|
|
1657
|
+
code: "T1_文字列複数行",
|
|
1658
|
+
label: "T1_文字列複数行",
|
|
1659
|
+
noLabel: false,
|
|
1660
|
+
required: false,
|
|
1661
|
+
defaultValue: ""
|
|
1662
|
+
},
|
|
1663
|
+
T1_ラジオ: {
|
|
1664
|
+
type: "RADIO_BUTTON",
|
|
1665
|
+
code: "T1_ラジオ",
|
|
1666
|
+
label: "T1_ラジオ",
|
|
1667
|
+
noLabel: false,
|
|
1668
|
+
required: true,
|
|
1669
|
+
options: {
|
|
1670
|
+
A: {
|
|
1671
|
+
label: "A",
|
|
1672
|
+
index: "0"
|
|
1673
|
+
},
|
|
1674
|
+
B: {
|
|
1675
|
+
label: "B",
|
|
1676
|
+
index: "1"
|
|
1677
|
+
},
|
|
1678
|
+
C: {
|
|
1679
|
+
label: "C",
|
|
1680
|
+
index: "2"
|
|
1681
|
+
}
|
|
1682
|
+
},
|
|
1683
|
+
defaultValue: "A",
|
|
1684
|
+
align: "HORIZONTAL"
|
|
1685
|
+
},
|
|
1686
|
+
T1_複数選択: {
|
|
1687
|
+
type: "MULTI_SELECT",
|
|
1688
|
+
code: "T1_複数選択",
|
|
1689
|
+
label: "T1_複数選択",
|
|
1690
|
+
noLabel: false,
|
|
1691
|
+
required: false,
|
|
1692
|
+
options: {
|
|
1693
|
+
A: {
|
|
1694
|
+
label: "A",
|
|
1695
|
+
index: "0"
|
|
1696
|
+
},
|
|
1697
|
+
B: {
|
|
1698
|
+
label: "B",
|
|
1699
|
+
index: "1"
|
|
1700
|
+
},
|
|
1701
|
+
C: {
|
|
1702
|
+
label: "C",
|
|
1703
|
+
index: "2"
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
defaultValue: []
|
|
1707
|
+
},
|
|
1708
|
+
T1_日付: {
|
|
1709
|
+
type: "DATE",
|
|
1710
|
+
code: "T1_日付",
|
|
1711
|
+
label: "T1_日付",
|
|
1712
|
+
noLabel: false,
|
|
1713
|
+
required: false,
|
|
1714
|
+
unique: false,
|
|
1715
|
+
defaultValue: "",
|
|
1716
|
+
defaultNowValue: false
|
|
1717
|
+
},
|
|
1718
|
+
T1_ドロップダウン: {
|
|
1719
|
+
type: "DROP_DOWN",
|
|
1720
|
+
code: "T1_ドロップダウン",
|
|
1721
|
+
label: "T1_ドロップダウン",
|
|
1722
|
+
noLabel: false,
|
|
1723
|
+
required: false,
|
|
1724
|
+
options: {
|
|
1725
|
+
A: {
|
|
1726
|
+
label: "A",
|
|
1727
|
+
index: "0"
|
|
1728
|
+
},
|
|
1729
|
+
B: {
|
|
1730
|
+
label: "B",
|
|
1731
|
+
index: "1"
|
|
1732
|
+
},
|
|
1733
|
+
C: {
|
|
1734
|
+
label: "C",
|
|
1735
|
+
index: "2"
|
|
1736
|
+
}
|
|
1737
|
+
},
|
|
1738
|
+
defaultValue: ""
|
|
1739
|
+
},
|
|
1740
|
+
T1_リッチ: {
|
|
1741
|
+
type: "RICH_TEXT",
|
|
1742
|
+
code: "T1_リッチ",
|
|
1743
|
+
label: "T1_リッチ",
|
|
1744
|
+
noLabel: false,
|
|
1745
|
+
required: false,
|
|
1746
|
+
defaultValue: ""
|
|
1747
|
+
},
|
|
1748
|
+
T1_数値: {
|
|
1749
|
+
type: "NUMBER",
|
|
1750
|
+
code: "T1_数値",
|
|
1751
|
+
label: "T1_数値",
|
|
1752
|
+
noLabel: false,
|
|
1753
|
+
required: false,
|
|
1754
|
+
minValue: "",
|
|
1755
|
+
maxValue: "",
|
|
1756
|
+
digit: false,
|
|
1757
|
+
unique: false,
|
|
1758
|
+
defaultValue: "",
|
|
1759
|
+
displayScale: "",
|
|
1760
|
+
unit: "",
|
|
1761
|
+
unitPosition: "BEFORE"
|
|
1762
|
+
},
|
|
1763
|
+
T1_組織: {
|
|
1764
|
+
type: "ORGANIZATION_SELECT",
|
|
1765
|
+
code: "T1_組織",
|
|
1766
|
+
label: "T1_組織",
|
|
1767
|
+
noLabel: false,
|
|
1768
|
+
required: false,
|
|
1769
|
+
entities: [],
|
|
1770
|
+
defaultValue: []
|
|
1771
|
+
},
|
|
1772
|
+
T1_リンク: {
|
|
1773
|
+
type: "LINK",
|
|
1774
|
+
code: "T1_リンク",
|
|
1775
|
+
label: "T1_リンク",
|
|
1776
|
+
noLabel: false,
|
|
1777
|
+
required: false,
|
|
1778
|
+
protocol: "WEB",
|
|
1779
|
+
minLength: "",
|
|
1780
|
+
maxLength: "",
|
|
1781
|
+
unique: false,
|
|
1782
|
+
defaultValue: ""
|
|
1783
|
+
},
|
|
1784
|
+
T1_文字列: {
|
|
1785
|
+
type: "SINGLE_LINE_TEXT",
|
|
1786
|
+
code: "T1_文字列",
|
|
1787
|
+
label: "T1_文字列",
|
|
1788
|
+
noLabel: false,
|
|
1789
|
+
required: false,
|
|
1790
|
+
minLength: "",
|
|
1791
|
+
maxLength: "",
|
|
1792
|
+
expression: "",
|
|
1793
|
+
hideExpression: false,
|
|
1794
|
+
unique: false,
|
|
1795
|
+
defaultValue: ""
|
|
1796
|
+
},
|
|
1797
|
+
T1_計算: {
|
|
1798
|
+
type: "CALC",
|
|
1799
|
+
code: "T1_計算",
|
|
1800
|
+
label: "T1_計算",
|
|
1801
|
+
noLabel: false,
|
|
1802
|
+
required: false,
|
|
1803
|
+
expression: "T1_数値 * 2",
|
|
1804
|
+
format: "NUMBER",
|
|
1805
|
+
displayScale: "",
|
|
1806
|
+
hideExpression: false,
|
|
1807
|
+
unit: "",
|
|
1808
|
+
unitPosition: "BEFORE"
|
|
1809
|
+
},
|
|
1810
|
+
T1_添付: {
|
|
1811
|
+
type: "FILE",
|
|
1812
|
+
code: "T1_添付",
|
|
1813
|
+
label: "T1_添付",
|
|
1814
|
+
noLabel: false,
|
|
1815
|
+
required: false,
|
|
1816
|
+
thumbnailSize: "50"
|
|
1817
|
+
},
|
|
1818
|
+
T1_日時: {
|
|
1819
|
+
type: "DATETIME",
|
|
1820
|
+
code: "T1_日時",
|
|
1821
|
+
label: "T1_日時",
|
|
1822
|
+
noLabel: false,
|
|
1823
|
+
required: false,
|
|
1824
|
+
unique: false,
|
|
1825
|
+
defaultValue: "",
|
|
1826
|
+
defaultNowValue: false
|
|
1827
|
+
},
|
|
1828
|
+
T1_グループ: {
|
|
1829
|
+
type: "GROUP_SELECT",
|
|
1830
|
+
code: "T1_グループ",
|
|
1831
|
+
label: "T1_グループ",
|
|
1832
|
+
noLabel: false,
|
|
1833
|
+
required: false,
|
|
1834
|
+
entities: [],
|
|
1835
|
+
defaultValue: []
|
|
1836
|
+
},
|
|
1837
|
+
T1_チェック: {
|
|
1838
|
+
type: "CHECK_BOX",
|
|
1839
|
+
code: "T1_チェック",
|
|
1840
|
+
label: "T1_チェック",
|
|
1841
|
+
noLabel: false,
|
|
1842
|
+
required: false,
|
|
1843
|
+
options: {
|
|
1844
|
+
A: {
|
|
1845
|
+
label: "A",
|
|
1846
|
+
index: "0"
|
|
1847
|
+
},
|
|
1848
|
+
B: {
|
|
1849
|
+
label: "B",
|
|
1850
|
+
index: "1"
|
|
1851
|
+
},
|
|
1852
|
+
C: {
|
|
1853
|
+
label: "C",
|
|
1854
|
+
index: "2"
|
|
1855
|
+
}
|
|
1856
|
+
},
|
|
1857
|
+
defaultValue: [],
|
|
1858
|
+
align: "HORIZONTAL"
|
|
1859
|
+
},
|
|
1860
|
+
T1_時刻: {
|
|
1861
|
+
type: "TIME",
|
|
1862
|
+
code: "T1_時刻",
|
|
1863
|
+
label: "T1_時刻",
|
|
1864
|
+
noLabel: false,
|
|
1865
|
+
required: false,
|
|
1866
|
+
defaultValue: "",
|
|
1867
|
+
defaultNowValue: false
|
|
1868
|
+
}
|
|
1869
|
+
}
|
|
1870
|
+
},
|
|
1871
|
+
ラジオ1: {
|
|
1872
|
+
type: "RADIO_BUTTON",
|
|
1873
|
+
code: "ラジオ1",
|
|
1874
|
+
label: "ラジオ1",
|
|
1875
|
+
noLabel: false,
|
|
1876
|
+
required: true,
|
|
1877
|
+
options: {
|
|
1878
|
+
A: {
|
|
1879
|
+
label: "A",
|
|
1880
|
+
index: "0"
|
|
1881
|
+
},
|
|
1882
|
+
B: {
|
|
1883
|
+
label: "B",
|
|
1884
|
+
index: "1"
|
|
1885
|
+
},
|
|
1886
|
+
C: {
|
|
1887
|
+
label: "C",
|
|
1888
|
+
index: "2"
|
|
1889
|
+
}
|
|
1890
|
+
},
|
|
1891
|
+
defaultValue: "A",
|
|
1892
|
+
align: "HORIZONTAL"
|
|
1893
|
+
},
|
|
1894
|
+
グループ2: {
|
|
1895
|
+
type: "GROUP_SELECT",
|
|
1896
|
+
code: "グループ2",
|
|
1897
|
+
label: "グループ2",
|
|
1898
|
+
noLabel: false,
|
|
1899
|
+
required: false,
|
|
1900
|
+
entities: [],
|
|
1901
|
+
defaultValue: []
|
|
1902
|
+
},
|
|
1903
|
+
ラジオ2: {
|
|
1904
|
+
type: "RADIO_BUTTON",
|
|
1905
|
+
code: "ラジオ2",
|
|
1906
|
+
label: "ラジオ2",
|
|
1907
|
+
noLabel: false,
|
|
1908
|
+
required: true,
|
|
1909
|
+
options: {
|
|
1910
|
+
甲: {
|
|
1911
|
+
label: "甲",
|
|
1912
|
+
index: "0"
|
|
1913
|
+
},
|
|
1914
|
+
乙: {
|
|
1915
|
+
label: "乙",
|
|
1916
|
+
index: "1"
|
|
1917
|
+
},
|
|
1918
|
+
丙: {
|
|
1919
|
+
label: "丙",
|
|
1920
|
+
index: "2"
|
|
1921
|
+
}
|
|
1922
|
+
},
|
|
1923
|
+
defaultValue: "甲",
|
|
1924
|
+
align: "HORIZONTAL"
|
|
1925
|
+
},
|
|
1926
|
+
リッチ1: {
|
|
1927
|
+
type: "RICH_TEXT",
|
|
1928
|
+
code: "リッチ1",
|
|
1929
|
+
label: "リッチ1",
|
|
1930
|
+
noLabel: false,
|
|
1931
|
+
required: false,
|
|
1932
|
+
defaultValue: ""
|
|
1933
|
+
},
|
|
1934
|
+
時刻2: {
|
|
1935
|
+
type: "TIME",
|
|
1936
|
+
code: "時刻2",
|
|
1937
|
+
label: "時刻2",
|
|
1938
|
+
noLabel: false,
|
|
1939
|
+
required: false,
|
|
1940
|
+
defaultValue: "",
|
|
1941
|
+
defaultNowValue: false
|
|
1942
|
+
},
|
|
1943
|
+
カテゴリー: {
|
|
1944
|
+
type: "CATEGORY",
|
|
1945
|
+
code: "カテゴリー",
|
|
1946
|
+
label: "カテゴリー",
|
|
1947
|
+
enabled: true
|
|
1948
|
+
},
|
|
1949
|
+
時刻1: {
|
|
1950
|
+
type: "TIME",
|
|
1951
|
+
code: "時刻1",
|
|
1952
|
+
label: "時刻1",
|
|
1953
|
+
noLabel: false,
|
|
1954
|
+
required: false,
|
|
1955
|
+
defaultValue: "",
|
|
1956
|
+
defaultNowValue: false
|
|
1957
|
+
},
|
|
1958
|
+
リンク1: {
|
|
1959
|
+
type: "LINK",
|
|
1960
|
+
code: "リンク1",
|
|
1961
|
+
label: "リンク1(Web)",
|
|
1962
|
+
noLabel: false,
|
|
1963
|
+
required: false,
|
|
1964
|
+
protocol: "WEB",
|
|
1965
|
+
minLength: "",
|
|
1966
|
+
maxLength: "",
|
|
1967
|
+
unique: false,
|
|
1968
|
+
defaultValue: ""
|
|
1969
|
+
},
|
|
1970
|
+
リッチ2: {
|
|
1971
|
+
type: "RICH_TEXT",
|
|
1972
|
+
code: "リッチ2",
|
|
1973
|
+
label: "リッチ2",
|
|
1974
|
+
noLabel: false,
|
|
1975
|
+
required: false,
|
|
1976
|
+
defaultValue: ""
|
|
1977
|
+
},
|
|
1978
|
+
リンク2: {
|
|
1979
|
+
type: "LINK",
|
|
1980
|
+
code: "リンク2",
|
|
1981
|
+
label: "リンク2(メール)",
|
|
1982
|
+
noLabel: false,
|
|
1983
|
+
required: false,
|
|
1984
|
+
protocol: "MAIL",
|
|
1985
|
+
minLength: "",
|
|
1986
|
+
maxLength: "",
|
|
1987
|
+
unique: false,
|
|
1988
|
+
defaultValue: ""
|
|
1989
|
+
},
|
|
1990
|
+
計算2: {
|
|
1991
|
+
type: "CALC",
|
|
1992
|
+
code: "計算2",
|
|
1993
|
+
label: "計算2(日付の差の日数)",
|
|
1994
|
+
noLabel: false,
|
|
1995
|
+
required: false,
|
|
1996
|
+
expression: "(日付1 - 日付2) / 86400",
|
|
1997
|
+
format: "NUMBER",
|
|
1998
|
+
displayScale: "",
|
|
1999
|
+
hideExpression: false,
|
|
2000
|
+
unit: "",
|
|
2001
|
+
unitPosition: "BEFORE"
|
|
2002
|
+
},
|
|
2003
|
+
計算1: {
|
|
2004
|
+
type: "CALC",
|
|
2005
|
+
code: "計算1",
|
|
2006
|
+
label: "計算1",
|
|
2007
|
+
noLabel: false,
|
|
2008
|
+
required: false,
|
|
2009
|
+
expression: "数値1 + 数値2",
|
|
2010
|
+
format: "NUMBER",
|
|
2011
|
+
displayScale: "",
|
|
2012
|
+
hideExpression: false,
|
|
2013
|
+
unit: "",
|
|
2014
|
+
unitPosition: "BEFORE"
|
|
2015
|
+
},
|
|
2016
|
+
複数選択2: {
|
|
2017
|
+
type: "MULTI_SELECT",
|
|
2018
|
+
code: "複数選択2",
|
|
2019
|
+
label: "複数選択2",
|
|
2020
|
+
noLabel: false,
|
|
2021
|
+
required: false,
|
|
2022
|
+
options: {
|
|
2023
|
+
甲: {
|
|
2024
|
+
label: "甲",
|
|
2025
|
+
index: "0"
|
|
2026
|
+
},
|
|
2027
|
+
乙: {
|
|
2028
|
+
label: "乙",
|
|
2029
|
+
index: "1"
|
|
2030
|
+
},
|
|
2031
|
+
丙: {
|
|
2032
|
+
label: "丙",
|
|
2033
|
+
index: "2"
|
|
2034
|
+
}
|
|
2035
|
+
},
|
|
2036
|
+
defaultValue: []
|
|
2037
|
+
},
|
|
2038
|
+
日時1: {
|
|
2039
|
+
type: "DATETIME",
|
|
2040
|
+
code: "日時1",
|
|
2041
|
+
label: "日時1",
|
|
2042
|
+
noLabel: false,
|
|
2043
|
+
required: false,
|
|
2044
|
+
unique: false,
|
|
2045
|
+
defaultValue: "",
|
|
2046
|
+
defaultNowValue: false
|
|
2047
|
+
},
|
|
2048
|
+
複数選択1: {
|
|
2049
|
+
type: "MULTI_SELECT",
|
|
2050
|
+
code: "複数選択1",
|
|
2051
|
+
label: "複数選択1",
|
|
2052
|
+
noLabel: false,
|
|
2053
|
+
required: false,
|
|
2054
|
+
options: {
|
|
2055
|
+
A: {
|
|
2056
|
+
label: "A",
|
|
2057
|
+
index: "0"
|
|
2058
|
+
},
|
|
2059
|
+
B: {
|
|
2060
|
+
label: "B",
|
|
2061
|
+
index: "1"
|
|
2062
|
+
},
|
|
2063
|
+
C: {
|
|
2064
|
+
label: "C",
|
|
2065
|
+
index: "2"
|
|
2066
|
+
}
|
|
2067
|
+
},
|
|
2068
|
+
defaultValue: []
|
|
2069
|
+
},
|
|
2070
|
+
日時2: {
|
|
2071
|
+
type: "DATETIME",
|
|
2072
|
+
code: "日時2",
|
|
2073
|
+
label: "日時2",
|
|
2074
|
+
noLabel: false,
|
|
2075
|
+
required: false,
|
|
2076
|
+
unique: false,
|
|
2077
|
+
defaultValue: "",
|
|
2078
|
+
defaultNowValue: false
|
|
2079
|
+
},
|
|
2080
|
+
枠内数値1: {
|
|
2081
|
+
type: "NUMBER",
|
|
2082
|
+
code: "枠内数値1",
|
|
2083
|
+
label: "枠内数値1",
|
|
2084
|
+
noLabel: false,
|
|
2085
|
+
required: false,
|
|
2086
|
+
minValue: "",
|
|
2087
|
+
maxValue: "",
|
|
2088
|
+
digit: false,
|
|
2089
|
+
unique: false,
|
|
2090
|
+
defaultValue: "",
|
|
2091
|
+
displayScale: "",
|
|
2092
|
+
unit: "",
|
|
2093
|
+
unitPosition: "BEFORE"
|
|
2094
|
+
},
|
|
2095
|
+
作業者: {
|
|
2096
|
+
type: "STATUS_ASSIGNEE",
|
|
2097
|
+
code: "作業者",
|
|
2098
|
+
label: "作業者",
|
|
2099
|
+
enabled: true
|
|
2100
|
+
},
|
|
2101
|
+
作成者: {
|
|
2102
|
+
type: "CREATOR",
|
|
2103
|
+
code: "作成者",
|
|
2104
|
+
label: "作成者",
|
|
2105
|
+
noLabel: false
|
|
2106
|
+
},
|
|
2107
|
+
文字列2: {
|
|
2108
|
+
type: "SINGLE_LINE_TEXT",
|
|
2109
|
+
code: "文字列2",
|
|
2110
|
+
label: "文字列2",
|
|
2111
|
+
noLabel: false,
|
|
2112
|
+
required: false,
|
|
2113
|
+
minLength: "",
|
|
2114
|
+
maxLength: "",
|
|
2115
|
+
expression: "",
|
|
2116
|
+
hideExpression: false,
|
|
2117
|
+
unique: false,
|
|
2118
|
+
defaultValue: ""
|
|
2119
|
+
},
|
|
2120
|
+
文字列1: {
|
|
2121
|
+
type: "SINGLE_LINE_TEXT",
|
|
2122
|
+
code: "文字列1",
|
|
2123
|
+
label: "文字列1",
|
|
2124
|
+
noLabel: false,
|
|
2125
|
+
required: false,
|
|
2126
|
+
minLength: "",
|
|
2127
|
+
maxLength: "",
|
|
2128
|
+
expression: "",
|
|
2129
|
+
hideExpression: false,
|
|
2130
|
+
unique: false,
|
|
2131
|
+
defaultValue: ""
|
|
2132
|
+
},
|
|
2133
|
+
更新日時: {
|
|
2134
|
+
type: "UPDATED_TIME",
|
|
2135
|
+
code: "更新日時",
|
|
2136
|
+
label: "更新日時",
|
|
2137
|
+
noLabel: false
|
|
2138
|
+
},
|
|
2139
|
+
添付1: {
|
|
2140
|
+
type: "FILE",
|
|
2141
|
+
code: "添付1",
|
|
2142
|
+
label: "添付1",
|
|
2143
|
+
noLabel: false,
|
|
2144
|
+
required: false,
|
|
2145
|
+
thumbnailSize: "50"
|
|
2146
|
+
},
|
|
2147
|
+
添付2: {
|
|
2148
|
+
type: "FILE",
|
|
2149
|
+
code: "添付2",
|
|
2150
|
+
label: "添付2",
|
|
2151
|
+
noLabel: false,
|
|
2152
|
+
required: false,
|
|
2153
|
+
thumbnailSize: "50"
|
|
2154
|
+
},
|
|
2155
|
+
文字列複数行2: {
|
|
2156
|
+
type: "MULTI_LINE_TEXT",
|
|
2157
|
+
code: "文字列複数行2",
|
|
2158
|
+
label: "文字列複数行2",
|
|
2159
|
+
noLabel: false,
|
|
2160
|
+
required: false,
|
|
2161
|
+
defaultValue: ""
|
|
2162
|
+
},
|
|
2163
|
+
グループ枠1: {
|
|
2164
|
+
type: "GROUP",
|
|
2165
|
+
code: "グループ枠1",
|
|
2166
|
+
label: "グループ枠1",
|
|
2167
|
+
noLabel: false,
|
|
2168
|
+
openGroup: true
|
|
2169
|
+
},
|
|
2170
|
+
日付1: {
|
|
2171
|
+
type: "DATE",
|
|
2172
|
+
code: "日付1",
|
|
2173
|
+
label: "日付1",
|
|
2174
|
+
noLabel: false,
|
|
2175
|
+
required: false,
|
|
2176
|
+
unique: false,
|
|
2177
|
+
defaultValue: "",
|
|
2178
|
+
defaultNowValue: false
|
|
2179
|
+
},
|
|
2180
|
+
枠内文字列1: {
|
|
2181
|
+
type: "SINGLE_LINE_TEXT",
|
|
2182
|
+
code: "枠内文字列1",
|
|
2183
|
+
label: "枠内文字列1",
|
|
2184
|
+
noLabel: false,
|
|
2185
|
+
required: false,
|
|
2186
|
+
minLength: "",
|
|
2187
|
+
maxLength: "",
|
|
2188
|
+
expression: "",
|
|
2189
|
+
hideExpression: false,
|
|
2190
|
+
unique: false,
|
|
2191
|
+
defaultValue: ""
|
|
2192
|
+
},
|
|
2193
|
+
文字列複数行1: {
|
|
2194
|
+
type: "MULTI_LINE_TEXT",
|
|
2195
|
+
code: "文字列複数行1",
|
|
2196
|
+
label: "文字列複数行1",
|
|
2197
|
+
noLabel: false,
|
|
2198
|
+
required: false,
|
|
2199
|
+
defaultValue: ""
|
|
2200
|
+
},
|
|
2201
|
+
日付2: {
|
|
2202
|
+
type: "DATE",
|
|
2203
|
+
code: "日付2",
|
|
2204
|
+
label: "日付2",
|
|
2205
|
+
noLabel: false,
|
|
2206
|
+
required: false,
|
|
2207
|
+
unique: false,
|
|
2208
|
+
defaultValue: "",
|
|
2209
|
+
defaultNowValue: false
|
|
2210
|
+
},
|
|
2211
|
+
数値2: {
|
|
2212
|
+
type: "NUMBER",
|
|
2213
|
+
code: "数値2",
|
|
2214
|
+
label: "数値2",
|
|
2215
|
+
noLabel: false,
|
|
2216
|
+
required: false,
|
|
2217
|
+
minValue: "",
|
|
2218
|
+
maxValue: "",
|
|
2219
|
+
digit: true,
|
|
2220
|
+
unique: false,
|
|
2221
|
+
defaultValue: "",
|
|
2222
|
+
displayScale: "2",
|
|
2223
|
+
unit: "",
|
|
2224
|
+
unitPosition: "BEFORE"
|
|
2225
|
+
},
|
|
2226
|
+
数値1: {
|
|
2227
|
+
type: "NUMBER",
|
|
2228
|
+
code: "数値1",
|
|
2229
|
+
label: "数値1",
|
|
2230
|
+
noLabel: false,
|
|
2231
|
+
required: false,
|
|
2232
|
+
minValue: "",
|
|
2233
|
+
maxValue: "",
|
|
2234
|
+
digit: false,
|
|
2235
|
+
unique: false,
|
|
2236
|
+
defaultValue: "",
|
|
2237
|
+
displayScale: "",
|
|
2238
|
+
unit: "",
|
|
2239
|
+
unitPosition: "BEFORE"
|
|
2240
|
+
},
|
|
2241
|
+
チェック1: {
|
|
2242
|
+
type: "CHECK_BOX",
|
|
2243
|
+
code: "チェック1",
|
|
2244
|
+
label: "チェック1",
|
|
2245
|
+
noLabel: false,
|
|
2246
|
+
required: false,
|
|
2247
|
+
options: {
|
|
2248
|
+
A: {
|
|
2249
|
+
label: "A",
|
|
2250
|
+
index: "0"
|
|
2251
|
+
},
|
|
2252
|
+
B: {
|
|
2253
|
+
label: "B",
|
|
2254
|
+
index: "1"
|
|
2255
|
+
},
|
|
2256
|
+
C: {
|
|
2257
|
+
label: "C",
|
|
2258
|
+
index: "2"
|
|
2259
|
+
}
|
|
2260
|
+
},
|
|
2261
|
+
defaultValue: [],
|
|
2262
|
+
align: "HORIZONTAL"
|
|
2263
|
+
},
|
|
2264
|
+
作成日時: {
|
|
2265
|
+
type: "CREATED_TIME",
|
|
2266
|
+
code: "作成日時",
|
|
2267
|
+
label: "作成日時",
|
|
2268
|
+
noLabel: false
|
|
2269
|
+
}
|
|
2270
|
+
},
|
|
2271
|
+
layout: [
|
|
2272
|
+
{
|
|
2273
|
+
type: "ROW",
|
|
2274
|
+
fields: [
|
|
2275
|
+
{
|
|
2276
|
+
type: "LABEL",
|
|
2277
|
+
label: "計算式プラグインのサンプルアプリ(全項目タイプ × 2、テーブル 2 つ)",
|
|
2278
|
+
elementId: "",
|
|
2279
|
+
size: {
|
|
2280
|
+
width: "600"
|
|
2281
|
+
}
|
|
2282
|
+
}
|
|
2283
|
+
]
|
|
2284
|
+
},
|
|
2285
|
+
{
|
|
2286
|
+
type: "ROW",
|
|
2287
|
+
fields: [
|
|
2288
|
+
{
|
|
2289
|
+
type: "SINGLE_LINE_TEXT",
|
|
2290
|
+
code: "文字列1",
|
|
2291
|
+
size: {
|
|
2292
|
+
width: "250"
|
|
2293
|
+
}
|
|
2294
|
+
},
|
|
2295
|
+
{
|
|
2296
|
+
type: "SINGLE_LINE_TEXT",
|
|
2297
|
+
code: "文字列2",
|
|
2298
|
+
size: {
|
|
2299
|
+
width: "250"
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
]
|
|
2303
|
+
},
|
|
2304
|
+
{
|
|
2305
|
+
type: "ROW",
|
|
2306
|
+
fields: [
|
|
2307
|
+
{
|
|
2308
|
+
type: "MULTI_LINE_TEXT",
|
|
2309
|
+
code: "文字列複数行1",
|
|
2310
|
+
size: {
|
|
2311
|
+
width: "250",
|
|
2312
|
+
innerHeight: "125"
|
|
2313
|
+
}
|
|
2314
|
+
},
|
|
2315
|
+
{
|
|
2316
|
+
type: "MULTI_LINE_TEXT",
|
|
2317
|
+
code: "文字列複数行2",
|
|
2318
|
+
size: {
|
|
2319
|
+
width: "250",
|
|
2320
|
+
innerHeight: "125"
|
|
2321
|
+
}
|
|
2322
|
+
}
|
|
2323
|
+
]
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
type: "ROW",
|
|
2327
|
+
fields: [
|
|
2328
|
+
{
|
|
2329
|
+
type: "RICH_TEXT",
|
|
2330
|
+
code: "リッチ1",
|
|
2331
|
+
size: {
|
|
2332
|
+
width: "250",
|
|
2333
|
+
innerHeight: "125"
|
|
2334
|
+
}
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
type: "RICH_TEXT",
|
|
2338
|
+
code: "リッチ2",
|
|
2339
|
+
size: {
|
|
2340
|
+
width: "250",
|
|
2341
|
+
innerHeight: "125"
|
|
2342
|
+
}
|
|
2343
|
+
}
|
|
2344
|
+
]
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
type: "ROW",
|
|
2348
|
+
fields: [
|
|
2349
|
+
{
|
|
2350
|
+
type: "NUMBER",
|
|
2351
|
+
code: "数値1",
|
|
2352
|
+
size: {
|
|
2353
|
+
width: "250"
|
|
2354
|
+
}
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
type: "NUMBER",
|
|
2358
|
+
code: "数値2",
|
|
2359
|
+
size: {
|
|
2360
|
+
width: "250"
|
|
2361
|
+
}
|
|
2362
|
+
}
|
|
2363
|
+
]
|
|
2364
|
+
},
|
|
2365
|
+
{
|
|
2366
|
+
type: "ROW",
|
|
2367
|
+
fields: [
|
|
2368
|
+
{
|
|
2369
|
+
type: "CALC",
|
|
2370
|
+
code: "計算1",
|
|
2371
|
+
size: {
|
|
2372
|
+
width: "250"
|
|
2373
|
+
}
|
|
2374
|
+
},
|
|
2375
|
+
{
|
|
2376
|
+
type: "CALC",
|
|
2377
|
+
code: "計算2",
|
|
2378
|
+
size: {
|
|
2379
|
+
width: "250"
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
]
|
|
2383
|
+
},
|
|
2384
|
+
{
|
|
2385
|
+
type: "ROW",
|
|
2386
|
+
fields: [
|
|
2387
|
+
{
|
|
2388
|
+
type: "RADIO_BUTTON",
|
|
2389
|
+
code: "ラジオ1",
|
|
2390
|
+
size: {
|
|
2391
|
+
width: "250"
|
|
2392
|
+
}
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
type: "RADIO_BUTTON",
|
|
2396
|
+
code: "ラジオ2",
|
|
2397
|
+
size: {
|
|
2398
|
+
width: "250"
|
|
2399
|
+
}
|
|
2400
|
+
}
|
|
2401
|
+
]
|
|
2402
|
+
},
|
|
2403
|
+
{
|
|
2404
|
+
type: "ROW",
|
|
2405
|
+
fields: [
|
|
2406
|
+
{
|
|
2407
|
+
type: "CHECK_BOX",
|
|
2408
|
+
code: "チェック1",
|
|
2409
|
+
size: {
|
|
2410
|
+
width: "250"
|
|
2411
|
+
}
|
|
2412
|
+
},
|
|
2413
|
+
{
|
|
2414
|
+
type: "CHECK_BOX",
|
|
2415
|
+
code: "チェック2",
|
|
2416
|
+
size: {
|
|
2417
|
+
width: "250"
|
|
2418
|
+
}
|
|
2419
|
+
}
|
|
2420
|
+
]
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
type: "ROW",
|
|
2424
|
+
fields: [
|
|
2425
|
+
{
|
|
2426
|
+
type: "MULTI_SELECT",
|
|
2427
|
+
code: "複数選択1",
|
|
2428
|
+
size: {
|
|
2429
|
+
width: "250"
|
|
2430
|
+
}
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
type: "MULTI_SELECT",
|
|
2434
|
+
code: "複数選択2",
|
|
2435
|
+
size: {
|
|
2436
|
+
width: "250"
|
|
2437
|
+
}
|
|
2438
|
+
}
|
|
2439
|
+
]
|
|
2440
|
+
},
|
|
2441
|
+
{
|
|
2442
|
+
type: "ROW",
|
|
2443
|
+
fields: [
|
|
2444
|
+
{
|
|
2445
|
+
type: "DROP_DOWN",
|
|
2446
|
+
code: "ドロップダウン1",
|
|
2447
|
+
size: {
|
|
2448
|
+
width: "250"
|
|
2449
|
+
}
|
|
2450
|
+
},
|
|
2451
|
+
{
|
|
2452
|
+
type: "DROP_DOWN",
|
|
2453
|
+
code: "ドロップダウン2",
|
|
2454
|
+
size: {
|
|
2455
|
+
width: "250"
|
|
2456
|
+
}
|
|
2457
|
+
}
|
|
2458
|
+
]
|
|
2459
|
+
},
|
|
2460
|
+
{
|
|
2461
|
+
type: "ROW",
|
|
2462
|
+
fields: [
|
|
2463
|
+
{
|
|
2464
|
+
type: "DATE",
|
|
2465
|
+
code: "日付1",
|
|
2466
|
+
size: {
|
|
2467
|
+
width: "250"
|
|
2468
|
+
}
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
type: "DATE",
|
|
2472
|
+
code: "日付2",
|
|
2473
|
+
size: {
|
|
2474
|
+
width: "250"
|
|
2475
|
+
}
|
|
2476
|
+
}
|
|
2477
|
+
]
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
type: "ROW",
|
|
2481
|
+
fields: [
|
|
2482
|
+
{
|
|
2483
|
+
type: "TIME",
|
|
2484
|
+
code: "時刻1",
|
|
2485
|
+
size: {
|
|
2486
|
+
width: "250"
|
|
2487
|
+
}
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
type: "TIME",
|
|
2491
|
+
code: "時刻2",
|
|
2492
|
+
size: {
|
|
2493
|
+
width: "250"
|
|
2494
|
+
}
|
|
2495
|
+
}
|
|
2496
|
+
]
|
|
2497
|
+
},
|
|
2498
|
+
{
|
|
2499
|
+
type: "ROW",
|
|
2500
|
+
fields: [
|
|
2501
|
+
{
|
|
2502
|
+
type: "DATETIME",
|
|
2503
|
+
code: "日時1",
|
|
2504
|
+
size: {
|
|
2505
|
+
width: "250"
|
|
2506
|
+
}
|
|
2507
|
+
},
|
|
2508
|
+
{
|
|
2509
|
+
type: "DATETIME",
|
|
2510
|
+
code: "日時2",
|
|
2511
|
+
size: {
|
|
2512
|
+
width: "250"
|
|
2513
|
+
}
|
|
2514
|
+
}
|
|
2515
|
+
]
|
|
2516
|
+
},
|
|
2517
|
+
{
|
|
2518
|
+
type: "ROW",
|
|
2519
|
+
fields: [
|
|
2520
|
+
{
|
|
2521
|
+
type: "HR",
|
|
2522
|
+
elementId: "",
|
|
2523
|
+
size: {
|
|
2524
|
+
width: "600"
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
]
|
|
2528
|
+
},
|
|
2529
|
+
{
|
|
2530
|
+
type: "ROW",
|
|
2531
|
+
fields: [
|
|
2532
|
+
{
|
|
2533
|
+
type: "FILE",
|
|
2534
|
+
code: "添付1",
|
|
2535
|
+
size: {
|
|
2536
|
+
width: "250"
|
|
2537
|
+
}
|
|
2538
|
+
},
|
|
2539
|
+
{
|
|
2540
|
+
type: "FILE",
|
|
2541
|
+
code: "添付2",
|
|
2542
|
+
size: {
|
|
2543
|
+
width: "250"
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
]
|
|
2547
|
+
},
|
|
2548
|
+
{
|
|
2549
|
+
type: "ROW",
|
|
2550
|
+
fields: [
|
|
2551
|
+
{
|
|
2552
|
+
type: "LINK",
|
|
2553
|
+
code: "リンク1",
|
|
2554
|
+
size: {
|
|
2555
|
+
width: "250"
|
|
2556
|
+
}
|
|
2557
|
+
},
|
|
2558
|
+
{
|
|
2559
|
+
type: "LINK",
|
|
2560
|
+
code: "リンク2",
|
|
2561
|
+
size: {
|
|
2562
|
+
width: "250"
|
|
2563
|
+
}
|
|
2564
|
+
}
|
|
2565
|
+
]
|
|
2566
|
+
},
|
|
2567
|
+
{
|
|
2568
|
+
type: "ROW",
|
|
2569
|
+
fields: [
|
|
2570
|
+
{
|
|
2571
|
+
type: "USER_SELECT",
|
|
2572
|
+
code: "ユーザー1",
|
|
2573
|
+
size: {
|
|
2574
|
+
width: "250"
|
|
2575
|
+
}
|
|
2576
|
+
},
|
|
2577
|
+
{
|
|
2578
|
+
type: "USER_SELECT",
|
|
2579
|
+
code: "ユーザー2",
|
|
2580
|
+
size: {
|
|
2581
|
+
width: "250"
|
|
2582
|
+
}
|
|
2583
|
+
}
|
|
2584
|
+
]
|
|
2585
|
+
},
|
|
2586
|
+
{
|
|
2587
|
+
type: "ROW",
|
|
2588
|
+
fields: [
|
|
2589
|
+
{
|
|
2590
|
+
type: "ORGANIZATION_SELECT",
|
|
2591
|
+
code: "組織1",
|
|
2592
|
+
size: {
|
|
2593
|
+
width: "250"
|
|
2594
|
+
}
|
|
2595
|
+
},
|
|
2596
|
+
{
|
|
2597
|
+
type: "ORGANIZATION_SELECT",
|
|
2598
|
+
code: "組織2",
|
|
2599
|
+
size: {
|
|
2600
|
+
width: "250"
|
|
2601
|
+
}
|
|
2602
|
+
}
|
|
2603
|
+
]
|
|
2604
|
+
},
|
|
2605
|
+
{
|
|
2606
|
+
type: "ROW",
|
|
2607
|
+
fields: [
|
|
2608
|
+
{
|
|
2609
|
+
type: "GROUP_SELECT",
|
|
2610
|
+
code: "グループ1",
|
|
2611
|
+
size: {
|
|
2612
|
+
width: "250"
|
|
2613
|
+
}
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
type: "GROUP_SELECT",
|
|
2617
|
+
code: "グループ2",
|
|
2618
|
+
size: {
|
|
2619
|
+
width: "250"
|
|
2620
|
+
}
|
|
2621
|
+
}
|
|
2622
|
+
]
|
|
2623
|
+
},
|
|
2624
|
+
{
|
|
2625
|
+
type: "GROUP",
|
|
2626
|
+
code: "グループ枠1",
|
|
2627
|
+
layout: [
|
|
2628
|
+
{
|
|
2629
|
+
type: "ROW",
|
|
2630
|
+
fields: [
|
|
2631
|
+
{
|
|
2632
|
+
type: "SINGLE_LINE_TEXT",
|
|
2633
|
+
code: "枠内文字列1",
|
|
2634
|
+
size: {
|
|
2635
|
+
width: "250"
|
|
2636
|
+
}
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
type: "NUMBER",
|
|
2640
|
+
code: "枠内数値1",
|
|
2641
|
+
size: {
|
|
2642
|
+
width: "250"
|
|
2643
|
+
}
|
|
2644
|
+
}
|
|
2645
|
+
]
|
|
2646
|
+
}
|
|
2647
|
+
]
|
|
2648
|
+
},
|
|
2649
|
+
{
|
|
2650
|
+
type: "ROW",
|
|
2651
|
+
fields: [
|
|
2652
|
+
{
|
|
2653
|
+
type: "SPACER",
|
|
2654
|
+
elementId: "",
|
|
2655
|
+
size: {
|
|
2656
|
+
width: "600",
|
|
2657
|
+
height: "20"
|
|
2658
|
+
}
|
|
2659
|
+
}
|
|
2660
|
+
]
|
|
2661
|
+
},
|
|
2662
|
+
{
|
|
2663
|
+
type: "SUBTABLE",
|
|
2664
|
+
code: "テーブル1",
|
|
2665
|
+
fields: [
|
|
2666
|
+
{
|
|
2667
|
+
type: "SINGLE_LINE_TEXT",
|
|
2668
|
+
code: "T1_文字列",
|
|
2669
|
+
size: {
|
|
2670
|
+
width: "150"
|
|
2671
|
+
}
|
|
2672
|
+
},
|
|
2673
|
+
{
|
|
2674
|
+
type: "MULTI_LINE_TEXT",
|
|
2675
|
+
code: "T1_文字列複数行",
|
|
2676
|
+
size: {
|
|
2677
|
+
width: "150",
|
|
2678
|
+
innerHeight: "125"
|
|
2679
|
+
}
|
|
2680
|
+
},
|
|
2681
|
+
{
|
|
2682
|
+
type: "RICH_TEXT",
|
|
2683
|
+
code: "T1_リッチ",
|
|
2684
|
+
size: {
|
|
2685
|
+
width: "150",
|
|
2686
|
+
innerHeight: "125"
|
|
2687
|
+
}
|
|
2688
|
+
},
|
|
2689
|
+
{
|
|
2690
|
+
type: "NUMBER",
|
|
2691
|
+
code: "T1_数値",
|
|
2692
|
+
size: {
|
|
2693
|
+
width: "150"
|
|
2694
|
+
}
|
|
2695
|
+
},
|
|
2696
|
+
{
|
|
2697
|
+
type: "CALC",
|
|
2698
|
+
code: "T1_計算",
|
|
2699
|
+
size: {
|
|
2700
|
+
width: "150"
|
|
2701
|
+
}
|
|
2702
|
+
},
|
|
2703
|
+
{
|
|
2704
|
+
type: "RADIO_BUTTON",
|
|
2705
|
+
code: "T1_ラジオ",
|
|
2706
|
+
size: {
|
|
2707
|
+
width: "150"
|
|
2708
|
+
}
|
|
2709
|
+
},
|
|
2710
|
+
{
|
|
2711
|
+
type: "CHECK_BOX",
|
|
2712
|
+
code: "T1_チェック",
|
|
2713
|
+
size: {
|
|
2714
|
+
width: "150"
|
|
2715
|
+
}
|
|
2716
|
+
},
|
|
2717
|
+
{
|
|
2718
|
+
type: "MULTI_SELECT",
|
|
2719
|
+
code: "T1_複数選択",
|
|
2720
|
+
size: {
|
|
2721
|
+
width: "150"
|
|
2722
|
+
}
|
|
2723
|
+
},
|
|
2724
|
+
{
|
|
2725
|
+
type: "DROP_DOWN",
|
|
2726
|
+
code: "T1_ドロップダウン",
|
|
2727
|
+
size: {
|
|
2728
|
+
width: "150"
|
|
2729
|
+
}
|
|
2730
|
+
},
|
|
2731
|
+
{
|
|
2732
|
+
type: "DATE",
|
|
2733
|
+
code: "T1_日付",
|
|
2734
|
+
size: {
|
|
2735
|
+
width: "150"
|
|
2736
|
+
}
|
|
2737
|
+
},
|
|
2738
|
+
{
|
|
2739
|
+
type: "TIME",
|
|
2740
|
+
code: "T1_時刻",
|
|
2741
|
+
size: {
|
|
2742
|
+
width: "150"
|
|
2743
|
+
}
|
|
2744
|
+
},
|
|
2745
|
+
{
|
|
2746
|
+
type: "DATETIME",
|
|
2747
|
+
code: "T1_日時",
|
|
2748
|
+
size: {
|
|
2749
|
+
width: "150"
|
|
2750
|
+
}
|
|
2751
|
+
},
|
|
2752
|
+
{
|
|
2753
|
+
type: "FILE",
|
|
2754
|
+
code: "T1_添付",
|
|
2755
|
+
size: {
|
|
2756
|
+
width: "150"
|
|
2757
|
+
}
|
|
2758
|
+
},
|
|
2759
|
+
{
|
|
2760
|
+
type: "LINK",
|
|
2761
|
+
code: "T1_リンク",
|
|
2762
|
+
size: {
|
|
2763
|
+
width: "150"
|
|
2764
|
+
}
|
|
2765
|
+
},
|
|
2766
|
+
{
|
|
2767
|
+
type: "USER_SELECT",
|
|
2768
|
+
code: "T1_ユーザー",
|
|
2769
|
+
size: {
|
|
2770
|
+
width: "150"
|
|
2771
|
+
}
|
|
2772
|
+
},
|
|
2773
|
+
{
|
|
2774
|
+
type: "ORGANIZATION_SELECT",
|
|
2775
|
+
code: "T1_組織",
|
|
2776
|
+
size: {
|
|
2777
|
+
width: "150"
|
|
2778
|
+
}
|
|
2779
|
+
},
|
|
2780
|
+
{
|
|
2781
|
+
type: "GROUP_SELECT",
|
|
2782
|
+
code: "T1_グループ",
|
|
2783
|
+
size: {
|
|
2784
|
+
width: "150"
|
|
2785
|
+
}
|
|
2786
|
+
}
|
|
2787
|
+
]
|
|
2788
|
+
},
|
|
2789
|
+
{
|
|
2790
|
+
type: "SUBTABLE",
|
|
2791
|
+
code: "テーブル2",
|
|
2792
|
+
fields: [
|
|
2793
|
+
{
|
|
2794
|
+
type: "SINGLE_LINE_TEXT",
|
|
2795
|
+
code: "T2_文字列",
|
|
2796
|
+
size: {
|
|
2797
|
+
width: "150"
|
|
2798
|
+
}
|
|
2799
|
+
},
|
|
2800
|
+
{
|
|
2801
|
+
type: "MULTI_LINE_TEXT",
|
|
2802
|
+
code: "T2_文字列複数行",
|
|
2803
|
+
size: {
|
|
2804
|
+
width: "150",
|
|
2805
|
+
innerHeight: "125"
|
|
2806
|
+
}
|
|
2807
|
+
},
|
|
2808
|
+
{
|
|
2809
|
+
type: "RICH_TEXT",
|
|
2810
|
+
code: "T2_リッチ",
|
|
2811
|
+
size: {
|
|
2812
|
+
width: "150",
|
|
2813
|
+
innerHeight: "125"
|
|
2814
|
+
}
|
|
2815
|
+
},
|
|
2816
|
+
{
|
|
2817
|
+
type: "NUMBER",
|
|
2818
|
+
code: "T2_数値",
|
|
2819
|
+
size: {
|
|
2820
|
+
width: "150"
|
|
2821
|
+
}
|
|
2822
|
+
},
|
|
2823
|
+
{
|
|
2824
|
+
type: "CALC",
|
|
2825
|
+
code: "T2_計算",
|
|
2826
|
+
size: {
|
|
2827
|
+
width: "150"
|
|
2828
|
+
}
|
|
2829
|
+
},
|
|
2830
|
+
{
|
|
2831
|
+
type: "RADIO_BUTTON",
|
|
2832
|
+
code: "T2_ラジオ",
|
|
2833
|
+
size: {
|
|
2834
|
+
width: "150"
|
|
2835
|
+
}
|
|
2836
|
+
},
|
|
2837
|
+
{
|
|
2838
|
+
type: "CHECK_BOX",
|
|
2839
|
+
code: "T2_チェック",
|
|
2840
|
+
size: {
|
|
2841
|
+
width: "150"
|
|
2842
|
+
}
|
|
2843
|
+
},
|
|
2844
|
+
{
|
|
2845
|
+
type: "MULTI_SELECT",
|
|
2846
|
+
code: "T2_複数選択",
|
|
2847
|
+
size: {
|
|
2848
|
+
width: "150"
|
|
2849
|
+
}
|
|
2850
|
+
},
|
|
2851
|
+
{
|
|
2852
|
+
type: "DROP_DOWN",
|
|
2853
|
+
code: "T2_ドロップダウン",
|
|
2854
|
+
size: {
|
|
2855
|
+
width: "150"
|
|
2856
|
+
}
|
|
2857
|
+
},
|
|
2858
|
+
{
|
|
2859
|
+
type: "DATE",
|
|
2860
|
+
code: "T2_日付",
|
|
2861
|
+
size: {
|
|
2862
|
+
width: "150"
|
|
2863
|
+
}
|
|
2864
|
+
},
|
|
2865
|
+
{
|
|
2866
|
+
type: "TIME",
|
|
2867
|
+
code: "T2_時刻",
|
|
2868
|
+
size: {
|
|
2869
|
+
width: "150"
|
|
2870
|
+
}
|
|
2871
|
+
},
|
|
2872
|
+
{
|
|
2873
|
+
type: "DATETIME",
|
|
2874
|
+
code: "T2_日時",
|
|
2875
|
+
size: {
|
|
2876
|
+
width: "150"
|
|
2877
|
+
}
|
|
2878
|
+
},
|
|
2879
|
+
{
|
|
2880
|
+
type: "FILE",
|
|
2881
|
+
code: "T2_添付",
|
|
2882
|
+
size: {
|
|
2883
|
+
width: "150"
|
|
2884
|
+
}
|
|
2885
|
+
},
|
|
2886
|
+
{
|
|
2887
|
+
type: "LINK",
|
|
2888
|
+
code: "T2_リンク",
|
|
2889
|
+
size: {
|
|
2890
|
+
width: "150"
|
|
2891
|
+
}
|
|
2892
|
+
},
|
|
2893
|
+
{
|
|
2894
|
+
type: "USER_SELECT",
|
|
2895
|
+
code: "T2_ユーザー",
|
|
2896
|
+
size: {
|
|
2897
|
+
width: "150"
|
|
2898
|
+
}
|
|
2899
|
+
},
|
|
2900
|
+
{
|
|
2901
|
+
type: "ORGANIZATION_SELECT",
|
|
2902
|
+
code: "T2_組織",
|
|
2903
|
+
size: {
|
|
2904
|
+
width: "150"
|
|
2905
|
+
}
|
|
2906
|
+
},
|
|
2907
|
+
{
|
|
2908
|
+
type: "GROUP_SELECT",
|
|
2909
|
+
code: "T2_グループ",
|
|
2910
|
+
size: {
|
|
2911
|
+
width: "150"
|
|
2912
|
+
}
|
|
2913
|
+
}
|
|
2914
|
+
]
|
|
2915
|
+
},
|
|
2916
|
+
{
|
|
2917
|
+
type: "ROW",
|
|
2918
|
+
fields: [
|
|
2919
|
+
{
|
|
2920
|
+
type: "RECORD_NUMBER",
|
|
2921
|
+
code: "レコード番号",
|
|
2922
|
+
size: {
|
|
2923
|
+
width: "250"
|
|
2924
|
+
}
|
|
2925
|
+
},
|
|
2926
|
+
{
|
|
2927
|
+
type: "CREATOR",
|
|
2928
|
+
code: "作成者",
|
|
2929
|
+
size: {
|
|
2930
|
+
width: "250"
|
|
2931
|
+
}
|
|
2932
|
+
}
|
|
2933
|
+
]
|
|
2934
|
+
},
|
|
2935
|
+
{
|
|
2936
|
+
type: "ROW",
|
|
2937
|
+
fields: [
|
|
2938
|
+
{
|
|
2939
|
+
type: "CREATED_TIME",
|
|
2940
|
+
code: "作成日時",
|
|
2941
|
+
size: {
|
|
2942
|
+
width: "250"
|
|
2943
|
+
}
|
|
2944
|
+
},
|
|
2945
|
+
{
|
|
2946
|
+
type: "MODIFIER",
|
|
2947
|
+
code: "更新者",
|
|
2948
|
+
size: {
|
|
2949
|
+
width: "250"
|
|
2950
|
+
}
|
|
2951
|
+
}
|
|
2952
|
+
]
|
|
2953
|
+
},
|
|
2954
|
+
{
|
|
2955
|
+
type: "ROW",
|
|
2956
|
+
fields: [
|
|
2957
|
+
{
|
|
2958
|
+
type: "UPDATED_TIME",
|
|
2959
|
+
code: "更新日時",
|
|
2960
|
+
size: {
|
|
2961
|
+
width: "250"
|
|
2962
|
+
}
|
|
2963
|
+
}
|
|
2964
|
+
]
|
|
2965
|
+
}
|
|
2966
|
+
],
|
|
2967
|
+
views: {
|
|
2968
|
+
"(作業者が自分)": {
|
|
2969
|
+
type: "LIST",
|
|
2970
|
+
name: "(作業者が自分)",
|
|
2971
|
+
id: "16550400",
|
|
2972
|
+
filterCond: "作業者 in (LOGINUSER())",
|
|
2973
|
+
sort: "レコード番号 desc",
|
|
2974
|
+
index: "0",
|
|
2975
|
+
fields: [
|
|
2976
|
+
"レコード番号",
|
|
2977
|
+
"文字列1",
|
|
2978
|
+
"文字列2",
|
|
2979
|
+
"文字列複数行1",
|
|
2980
|
+
"文字列複数行2",
|
|
2981
|
+
"リッチ1",
|
|
2982
|
+
"リッチ2",
|
|
2983
|
+
"数値1",
|
|
2984
|
+
"数値2",
|
|
2985
|
+
"計算1",
|
|
2986
|
+
"計算2",
|
|
2987
|
+
"ラジオ1",
|
|
2988
|
+
"ラジオ2",
|
|
2989
|
+
"チェック1",
|
|
2990
|
+
"チェック2",
|
|
2991
|
+
"複数選択1",
|
|
2992
|
+
"複数選択2",
|
|
2993
|
+
"ドロップダウン1",
|
|
2994
|
+
"ドロップダウン2",
|
|
2995
|
+
"日付1",
|
|
2996
|
+
"日付2",
|
|
2997
|
+
"時刻1",
|
|
2998
|
+
"時刻2",
|
|
2999
|
+
"日時1",
|
|
3000
|
+
"日時2",
|
|
3001
|
+
"添付1",
|
|
3002
|
+
"添付2",
|
|
3003
|
+
"リンク1",
|
|
3004
|
+
"リンク2",
|
|
3005
|
+
"ユーザー1",
|
|
3006
|
+
"ユーザー2",
|
|
3007
|
+
"組織1",
|
|
3008
|
+
"組織2",
|
|
3009
|
+
"グループ1",
|
|
3010
|
+
"グループ2",
|
|
3011
|
+
"枠内文字列1",
|
|
3012
|
+
"枠内数値1",
|
|
3013
|
+
"ステータス",
|
|
3014
|
+
"作業者"
|
|
3015
|
+
],
|
|
3016
|
+
builtinType: "ASSIGNEE"
|
|
3017
|
+
}
|
|
3018
|
+
}
|
|
3019
|
+
};
|
|
3020
|
+
|
|
3021
|
+
// src/sample-app/record-1.json
|
|
3022
|
+
var record_1_default = {
|
|
3023
|
+
tool: "formula-authoring record",
|
|
3024
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
3025
|
+
baseUrl: "https://example.cybozu.com",
|
|
3026
|
+
appId: 4329,
|
|
3027
|
+
id: 1,
|
|
3028
|
+
record: {
|
|
3029
|
+
チェック2: {
|
|
3030
|
+
type: "CHECK_BOX",
|
|
3031
|
+
value: [
|
|
3032
|
+
"甲"
|
|
3033
|
+
]
|
|
3034
|
+
},
|
|
3035
|
+
レコード番号: {
|
|
3036
|
+
type: "RECORD_NUMBER",
|
|
3037
|
+
value: "1"
|
|
3038
|
+
},
|
|
3039
|
+
ドロップダウン2: {
|
|
3040
|
+
type: "DROP_DOWN",
|
|
3041
|
+
value: "乙"
|
|
3042
|
+
},
|
|
3043
|
+
ユーザー2: {
|
|
3044
|
+
type: "USER_SELECT",
|
|
3045
|
+
value: [
|
|
3046
|
+
{
|
|
3047
|
+
code: "demo_user01",
|
|
3048
|
+
name: "架空 社長"
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
code: "demo_user02",
|
|
3052
|
+
name: "架空 営業部長"
|
|
3053
|
+
}
|
|
3054
|
+
]
|
|
3055
|
+
},
|
|
3056
|
+
組織1: {
|
|
3057
|
+
type: "ORGANIZATION_SELECT",
|
|
3058
|
+
value: [
|
|
3059
|
+
{
|
|
3060
|
+
code: "demo_hq",
|
|
3061
|
+
name: "架空本社"
|
|
3062
|
+
}
|
|
3063
|
+
]
|
|
3064
|
+
},
|
|
3065
|
+
ドロップダウン1: {
|
|
3066
|
+
type: "DROP_DOWN",
|
|
3067
|
+
value: "A"
|
|
3068
|
+
},
|
|
3069
|
+
更新者: {
|
|
3070
|
+
type: "MODIFIER",
|
|
3071
|
+
value: {
|
|
3072
|
+
code: "demo_user02",
|
|
3073
|
+
name: "架空 営業部長"
|
|
3074
|
+
}
|
|
3075
|
+
},
|
|
3076
|
+
ユーザー1: {
|
|
3077
|
+
type: "USER_SELECT",
|
|
3078
|
+
value: [
|
|
3079
|
+
{
|
|
3080
|
+
code: "demo_user01",
|
|
3081
|
+
name: "架空 社長"
|
|
3082
|
+
}
|
|
3083
|
+
]
|
|
3084
|
+
},
|
|
3085
|
+
組織2: {
|
|
3086
|
+
type: "ORGANIZATION_SELECT",
|
|
3087
|
+
value: [
|
|
3088
|
+
{
|
|
3089
|
+
code: "demo_sales",
|
|
3090
|
+
name: "架空営業部"
|
|
3091
|
+
}
|
|
3092
|
+
]
|
|
3093
|
+
},
|
|
3094
|
+
テーブル2: {
|
|
3095
|
+
type: "SUBTABLE",
|
|
3096
|
+
value: [
|
|
3097
|
+
{
|
|
3098
|
+
id: "7727389",
|
|
3099
|
+
value: {
|
|
3100
|
+
T2_複数選択: {
|
|
3101
|
+
type: "MULTI_SELECT",
|
|
3102
|
+
value: [
|
|
3103
|
+
"B"
|
|
3104
|
+
]
|
|
3105
|
+
},
|
|
3106
|
+
T2_文字列複数行: {
|
|
3107
|
+
type: "MULTI_LINE_TEXT",
|
|
3108
|
+
value: "T2 行 1\n2 行目"
|
|
3109
|
+
},
|
|
3110
|
+
T2_リンク: {
|
|
3111
|
+
type: "LINK",
|
|
3112
|
+
value: "https://example.com/"
|
|
3113
|
+
},
|
|
3114
|
+
T2_リッチ: {
|
|
3115
|
+
type: "RICH_TEXT",
|
|
3116
|
+
value: "<div>T2 行 1</div>"
|
|
3117
|
+
},
|
|
3118
|
+
T2_文字列: {
|
|
3119
|
+
type: "SINGLE_LINE_TEXT",
|
|
3120
|
+
value: "T2 行 1"
|
|
3121
|
+
},
|
|
3122
|
+
T2_チェック: {
|
|
3123
|
+
type: "CHECK_BOX",
|
|
3124
|
+
value: [
|
|
3125
|
+
"A"
|
|
3126
|
+
]
|
|
3127
|
+
},
|
|
3128
|
+
T2_ユーザー: {
|
|
3129
|
+
type: "USER_SELECT",
|
|
3130
|
+
value: [
|
|
3131
|
+
{
|
|
3132
|
+
code: "demo_user01",
|
|
3133
|
+
name: "架空 社長"
|
|
3134
|
+
}
|
|
3135
|
+
]
|
|
3136
|
+
},
|
|
3137
|
+
T2_グループ: {
|
|
3138
|
+
type: "GROUP_SELECT",
|
|
3139
|
+
value: [
|
|
3140
|
+
{
|
|
3141
|
+
code: "demo_managers",
|
|
3142
|
+
name: "架空管理職"
|
|
3143
|
+
}
|
|
3144
|
+
]
|
|
3145
|
+
},
|
|
3146
|
+
T2_日付: {
|
|
3147
|
+
type: "DATE",
|
|
3148
|
+
value: "2026-02-01"
|
|
3149
|
+
},
|
|
3150
|
+
T2_数値: {
|
|
3151
|
+
type: "NUMBER",
|
|
3152
|
+
value: "10"
|
|
3153
|
+
},
|
|
3154
|
+
T2_ドロップダウン: {
|
|
3155
|
+
type: "DROP_DOWN",
|
|
3156
|
+
value: "C"
|
|
3157
|
+
},
|
|
3158
|
+
T2_組織: {
|
|
3159
|
+
type: "ORGANIZATION_SELECT",
|
|
3160
|
+
value: [
|
|
3161
|
+
{
|
|
3162
|
+
code: "demo_hq",
|
|
3163
|
+
name: "架空本社"
|
|
3164
|
+
}
|
|
3165
|
+
]
|
|
3166
|
+
},
|
|
3167
|
+
T2_計算: {
|
|
3168
|
+
type: "CALC",
|
|
3169
|
+
value: "20"
|
|
3170
|
+
},
|
|
3171
|
+
T2_ラジオ: {
|
|
3172
|
+
type: "RADIO_BUTTON",
|
|
3173
|
+
value: "A"
|
|
3174
|
+
},
|
|
3175
|
+
T2_日時: {
|
|
3176
|
+
type: "DATETIME",
|
|
3177
|
+
value: "2026-02-01T00:30:00Z"
|
|
3178
|
+
},
|
|
3179
|
+
T2_添付: {
|
|
3180
|
+
type: "FILE",
|
|
3181
|
+
value: []
|
|
3182
|
+
},
|
|
3183
|
+
T2_時刻: {
|
|
3184
|
+
type: "TIME",
|
|
3185
|
+
value: "09:30"
|
|
3186
|
+
}
|
|
3187
|
+
}
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
id: "7727392",
|
|
3191
|
+
value: {
|
|
3192
|
+
T2_複数選択: {
|
|
3193
|
+
type: "MULTI_SELECT",
|
|
3194
|
+
value: [
|
|
3195
|
+
"B"
|
|
3196
|
+
]
|
|
3197
|
+
},
|
|
3198
|
+
T2_文字列複数行: {
|
|
3199
|
+
type: "MULTI_LINE_TEXT",
|
|
3200
|
+
value: "T2 行 2\n2 行目"
|
|
3201
|
+
},
|
|
3202
|
+
T2_リンク: {
|
|
3203
|
+
type: "LINK",
|
|
3204
|
+
value: "https://example.com/"
|
|
3205
|
+
},
|
|
3206
|
+
T2_リッチ: {
|
|
3207
|
+
type: "RICH_TEXT",
|
|
3208
|
+
value: "<div>T2 行 2</div>"
|
|
3209
|
+
},
|
|
3210
|
+
T2_文字列: {
|
|
3211
|
+
type: "SINGLE_LINE_TEXT",
|
|
3212
|
+
value: "T2 行 2"
|
|
3213
|
+
},
|
|
3214
|
+
T2_チェック: {
|
|
3215
|
+
type: "CHECK_BOX",
|
|
3216
|
+
value: [
|
|
3217
|
+
"A"
|
|
3218
|
+
]
|
|
3219
|
+
},
|
|
3220
|
+
T2_ユーザー: {
|
|
3221
|
+
type: "USER_SELECT",
|
|
3222
|
+
value: [
|
|
3223
|
+
{
|
|
3224
|
+
code: "demo_user01",
|
|
3225
|
+
name: "架空 社長"
|
|
3226
|
+
}
|
|
3227
|
+
]
|
|
3228
|
+
},
|
|
3229
|
+
T2_グループ: {
|
|
3230
|
+
type: "GROUP_SELECT",
|
|
3231
|
+
value: [
|
|
3232
|
+
{
|
|
3233
|
+
code: "demo_managers",
|
|
3234
|
+
name: "架空管理職"
|
|
3235
|
+
}
|
|
3236
|
+
]
|
|
3237
|
+
},
|
|
3238
|
+
T2_日付: {
|
|
3239
|
+
type: "DATE",
|
|
3240
|
+
value: "2026-02-02"
|
|
3241
|
+
},
|
|
3242
|
+
T2_数値: {
|
|
3243
|
+
type: "NUMBER",
|
|
3244
|
+
value: "20"
|
|
3245
|
+
},
|
|
3246
|
+
T2_ドロップダウン: {
|
|
3247
|
+
type: "DROP_DOWN",
|
|
3248
|
+
value: "B"
|
|
3249
|
+
},
|
|
3250
|
+
T2_組織: {
|
|
3251
|
+
type: "ORGANIZATION_SELECT",
|
|
3252
|
+
value: [
|
|
3253
|
+
{
|
|
3254
|
+
code: "demo_hq",
|
|
3255
|
+
name: "架空本社"
|
|
3256
|
+
}
|
|
3257
|
+
]
|
|
3258
|
+
},
|
|
3259
|
+
T2_計算: {
|
|
3260
|
+
type: "CALC",
|
|
3261
|
+
value: "40"
|
|
3262
|
+
},
|
|
3263
|
+
T2_ラジオ: {
|
|
3264
|
+
type: "RADIO_BUTTON",
|
|
3265
|
+
value: "A"
|
|
3266
|
+
},
|
|
3267
|
+
T2_日時: {
|
|
3268
|
+
type: "DATETIME",
|
|
3269
|
+
value: "2026-02-02T00:30:00Z"
|
|
3270
|
+
},
|
|
3271
|
+
T2_添付: {
|
|
3272
|
+
type: "FILE",
|
|
3273
|
+
value: []
|
|
3274
|
+
},
|
|
3275
|
+
T2_時刻: {
|
|
3276
|
+
type: "TIME",
|
|
3277
|
+
value: "09:30"
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
]
|
|
3282
|
+
},
|
|
3283
|
+
ステータス: {
|
|
3284
|
+
type: "STATUS",
|
|
3285
|
+
value: "未処理"
|
|
3286
|
+
},
|
|
3287
|
+
グループ1: {
|
|
3288
|
+
type: "GROUP_SELECT",
|
|
3289
|
+
value: [
|
|
3290
|
+
{
|
|
3291
|
+
code: "demo_managers",
|
|
3292
|
+
name: "架空管理職"
|
|
3293
|
+
}
|
|
3294
|
+
]
|
|
3295
|
+
},
|
|
3296
|
+
テーブル1: {
|
|
3297
|
+
type: "SUBTABLE",
|
|
3298
|
+
value: [
|
|
3299
|
+
{
|
|
3300
|
+
id: "7727380",
|
|
3301
|
+
value: {
|
|
3302
|
+
T1_ユーザー: {
|
|
3303
|
+
type: "USER_SELECT",
|
|
3304
|
+
value: [
|
|
3305
|
+
{
|
|
3306
|
+
code: "demo_user01",
|
|
3307
|
+
name: "架空 社長"
|
|
3308
|
+
}
|
|
3309
|
+
]
|
|
3310
|
+
},
|
|
3311
|
+
T1_文字列複数行: {
|
|
3312
|
+
type: "MULTI_LINE_TEXT",
|
|
3313
|
+
value: "行 1\n2 行目"
|
|
3314
|
+
},
|
|
3315
|
+
T1_ラジオ: {
|
|
3316
|
+
type: "RADIO_BUTTON",
|
|
3317
|
+
value: "A"
|
|
3318
|
+
},
|
|
3319
|
+
T1_複数選択: {
|
|
3320
|
+
type: "MULTI_SELECT",
|
|
3321
|
+
value: [
|
|
3322
|
+
"B"
|
|
3323
|
+
]
|
|
3324
|
+
},
|
|
3325
|
+
T1_日付: {
|
|
3326
|
+
type: "DATE",
|
|
3327
|
+
value: "2026-01-10"
|
|
3328
|
+
},
|
|
3329
|
+
T1_ドロップダウン: {
|
|
3330
|
+
type: "DROP_DOWN",
|
|
3331
|
+
value: "A"
|
|
3332
|
+
},
|
|
3333
|
+
T1_リッチ: {
|
|
3334
|
+
type: "RICH_TEXT",
|
|
3335
|
+
value: "<div>行 1</div>"
|
|
3336
|
+
},
|
|
3337
|
+
T1_数値: {
|
|
3338
|
+
type: "NUMBER",
|
|
3339
|
+
value: "100"
|
|
3340
|
+
},
|
|
3341
|
+
T1_組織: {
|
|
3342
|
+
type: "ORGANIZATION_SELECT",
|
|
3343
|
+
value: [
|
|
3344
|
+
{
|
|
3345
|
+
code: "demo_hq",
|
|
3346
|
+
name: "架空本社"
|
|
3347
|
+
}
|
|
3348
|
+
]
|
|
3349
|
+
},
|
|
3350
|
+
T1_リンク: {
|
|
3351
|
+
type: "LINK",
|
|
3352
|
+
value: "https://example.com/"
|
|
3353
|
+
},
|
|
3354
|
+
T1_文字列: {
|
|
3355
|
+
type: "SINGLE_LINE_TEXT",
|
|
3356
|
+
value: "行 1"
|
|
3357
|
+
},
|
|
3358
|
+
T1_計算: {
|
|
3359
|
+
type: "CALC",
|
|
3360
|
+
value: "200"
|
|
3361
|
+
},
|
|
3362
|
+
T1_添付: {
|
|
3363
|
+
type: "FILE",
|
|
3364
|
+
value: []
|
|
3365
|
+
},
|
|
3366
|
+
T1_日時: {
|
|
3367
|
+
type: "DATETIME",
|
|
3368
|
+
value: "2026-01-10T00:30:00Z"
|
|
3369
|
+
},
|
|
3370
|
+
T1_グループ: {
|
|
3371
|
+
type: "GROUP_SELECT",
|
|
3372
|
+
value: [
|
|
3373
|
+
{
|
|
3374
|
+
code: "demo_managers",
|
|
3375
|
+
name: "架空管理職"
|
|
3376
|
+
}
|
|
3377
|
+
]
|
|
3378
|
+
},
|
|
3379
|
+
T1_チェック: {
|
|
3380
|
+
type: "CHECK_BOX",
|
|
3381
|
+
value: [
|
|
3382
|
+
"A"
|
|
3383
|
+
]
|
|
3384
|
+
},
|
|
3385
|
+
T1_時刻: {
|
|
3386
|
+
type: "TIME",
|
|
3387
|
+
value: "09:30"
|
|
3388
|
+
}
|
|
3389
|
+
}
|
|
3390
|
+
},
|
|
3391
|
+
{
|
|
3392
|
+
id: "7727383",
|
|
3393
|
+
value: {
|
|
3394
|
+
T1_ユーザー: {
|
|
3395
|
+
type: "USER_SELECT",
|
|
3396
|
+
value: [
|
|
3397
|
+
{
|
|
3398
|
+
code: "demo_user01",
|
|
3399
|
+
name: "架空 社長"
|
|
3400
|
+
}
|
|
3401
|
+
]
|
|
3402
|
+
},
|
|
3403
|
+
T1_文字列複数行: {
|
|
3404
|
+
type: "MULTI_LINE_TEXT",
|
|
3405
|
+
value: "行 2\n2 行目"
|
|
3406
|
+
},
|
|
3407
|
+
T1_ラジオ: {
|
|
3408
|
+
type: "RADIO_BUTTON",
|
|
3409
|
+
value: "A"
|
|
3410
|
+
},
|
|
3411
|
+
T1_複数選択: {
|
|
3412
|
+
type: "MULTI_SELECT",
|
|
3413
|
+
value: [
|
|
3414
|
+
"B"
|
|
3415
|
+
]
|
|
3416
|
+
},
|
|
3417
|
+
T1_日付: {
|
|
3418
|
+
type: "DATE",
|
|
3419
|
+
value: "2026-01-20"
|
|
3420
|
+
},
|
|
3421
|
+
T1_ドロップダウン: {
|
|
3422
|
+
type: "DROP_DOWN",
|
|
3423
|
+
value: "B"
|
|
3424
|
+
},
|
|
3425
|
+
T1_リッチ: {
|
|
3426
|
+
type: "RICH_TEXT",
|
|
3427
|
+
value: "<div>行 2</div>"
|
|
3428
|
+
},
|
|
3429
|
+
T1_数値: {
|
|
3430
|
+
type: "NUMBER",
|
|
3431
|
+
value: "200"
|
|
3432
|
+
},
|
|
3433
|
+
T1_組織: {
|
|
3434
|
+
type: "ORGANIZATION_SELECT",
|
|
3435
|
+
value: [
|
|
3436
|
+
{
|
|
3437
|
+
code: "demo_hq",
|
|
3438
|
+
name: "架空本社"
|
|
3439
|
+
}
|
|
3440
|
+
]
|
|
3441
|
+
},
|
|
3442
|
+
T1_リンク: {
|
|
3443
|
+
type: "LINK",
|
|
3444
|
+
value: "https://example.com/"
|
|
3445
|
+
},
|
|
3446
|
+
T1_文字列: {
|
|
3447
|
+
type: "SINGLE_LINE_TEXT",
|
|
3448
|
+
value: "行 2"
|
|
3449
|
+
},
|
|
3450
|
+
T1_計算: {
|
|
3451
|
+
type: "CALC",
|
|
3452
|
+
value: "400"
|
|
3453
|
+
},
|
|
3454
|
+
T1_添付: {
|
|
3455
|
+
type: "FILE",
|
|
3456
|
+
value: []
|
|
3457
|
+
},
|
|
3458
|
+
T1_日時: {
|
|
3459
|
+
type: "DATETIME",
|
|
3460
|
+
value: "2026-01-20T00:30:00Z"
|
|
3461
|
+
},
|
|
3462
|
+
T1_グループ: {
|
|
3463
|
+
type: "GROUP_SELECT",
|
|
3464
|
+
value: [
|
|
3465
|
+
{
|
|
3466
|
+
code: "demo_managers",
|
|
3467
|
+
name: "架空管理職"
|
|
3468
|
+
}
|
|
3469
|
+
]
|
|
3470
|
+
},
|
|
3471
|
+
T1_チェック: {
|
|
3472
|
+
type: "CHECK_BOX",
|
|
3473
|
+
value: [
|
|
3474
|
+
"A"
|
|
3475
|
+
]
|
|
3476
|
+
},
|
|
3477
|
+
T1_時刻: {
|
|
3478
|
+
type: "TIME",
|
|
3479
|
+
value: "09:30"
|
|
3480
|
+
}
|
|
3481
|
+
}
|
|
3482
|
+
},
|
|
3483
|
+
{
|
|
3484
|
+
id: "7727386",
|
|
3485
|
+
value: {
|
|
3486
|
+
T1_ユーザー: {
|
|
3487
|
+
type: "USER_SELECT",
|
|
3488
|
+
value: [
|
|
3489
|
+
{
|
|
3490
|
+
code: "demo_user01",
|
|
3491
|
+
name: "架空 社長"
|
|
3492
|
+
}
|
|
3493
|
+
]
|
|
3494
|
+
},
|
|
3495
|
+
T1_文字列複数行: {
|
|
3496
|
+
type: "MULTI_LINE_TEXT",
|
|
3497
|
+
value: "行 3\n2 行目"
|
|
3498
|
+
},
|
|
3499
|
+
T1_ラジオ: {
|
|
3500
|
+
type: "RADIO_BUTTON",
|
|
3501
|
+
value: "A"
|
|
3502
|
+
},
|
|
3503
|
+
T1_複数選択: {
|
|
3504
|
+
type: "MULTI_SELECT",
|
|
3505
|
+
value: [
|
|
3506
|
+
"B"
|
|
3507
|
+
]
|
|
3508
|
+
},
|
|
3509
|
+
T1_日付: {
|
|
3510
|
+
type: "DATE",
|
|
3511
|
+
value: "2026-01-30"
|
|
3512
|
+
},
|
|
3513
|
+
T1_ドロップダウン: {
|
|
3514
|
+
type: "DROP_DOWN",
|
|
3515
|
+
value: "A"
|
|
3516
|
+
},
|
|
3517
|
+
T1_リッチ: {
|
|
3518
|
+
type: "RICH_TEXT",
|
|
3519
|
+
value: "<div>行 3</div>"
|
|
3520
|
+
},
|
|
3521
|
+
T1_数値: {
|
|
3522
|
+
type: "NUMBER",
|
|
3523
|
+
value: "300"
|
|
3524
|
+
},
|
|
3525
|
+
T1_組織: {
|
|
3526
|
+
type: "ORGANIZATION_SELECT",
|
|
3527
|
+
value: [
|
|
3528
|
+
{
|
|
3529
|
+
code: "demo_hq",
|
|
3530
|
+
name: "架空本社"
|
|
3531
|
+
}
|
|
3532
|
+
]
|
|
3533
|
+
},
|
|
3534
|
+
T1_リンク: {
|
|
3535
|
+
type: "LINK",
|
|
3536
|
+
value: "https://example.com/"
|
|
3537
|
+
},
|
|
3538
|
+
T1_文字列: {
|
|
3539
|
+
type: "SINGLE_LINE_TEXT",
|
|
3540
|
+
value: "行 3"
|
|
3541
|
+
},
|
|
3542
|
+
T1_計算: {
|
|
3543
|
+
type: "CALC",
|
|
3544
|
+
value: "600"
|
|
3545
|
+
},
|
|
3546
|
+
T1_添付: {
|
|
3547
|
+
type: "FILE",
|
|
3548
|
+
value: []
|
|
3549
|
+
},
|
|
3550
|
+
T1_日時: {
|
|
3551
|
+
type: "DATETIME",
|
|
3552
|
+
value: "2026-01-30T00:30:00Z"
|
|
3553
|
+
},
|
|
3554
|
+
T1_グループ: {
|
|
3555
|
+
type: "GROUP_SELECT",
|
|
3556
|
+
value: [
|
|
3557
|
+
{
|
|
3558
|
+
code: "demo_managers",
|
|
3559
|
+
name: "架空管理職"
|
|
3560
|
+
}
|
|
3561
|
+
]
|
|
3562
|
+
},
|
|
3563
|
+
T1_チェック: {
|
|
3564
|
+
type: "CHECK_BOX",
|
|
3565
|
+
value: [
|
|
3566
|
+
"A"
|
|
3567
|
+
]
|
|
3568
|
+
},
|
|
3569
|
+
T1_時刻: {
|
|
3570
|
+
type: "TIME",
|
|
3571
|
+
value: "09:30"
|
|
3572
|
+
}
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
]
|
|
3576
|
+
},
|
|
3577
|
+
ラジオ1: {
|
|
3578
|
+
type: "RADIO_BUTTON",
|
|
3579
|
+
value: "B"
|
|
3580
|
+
},
|
|
3581
|
+
グループ2: {
|
|
3582
|
+
type: "GROUP_SELECT",
|
|
3583
|
+
value: [
|
|
3584
|
+
{
|
|
3585
|
+
code: "demo_approvers",
|
|
3586
|
+
name: "架空承認者"
|
|
3587
|
+
}
|
|
3588
|
+
]
|
|
3589
|
+
},
|
|
3590
|
+
ラジオ2: {
|
|
3591
|
+
type: "RADIO_BUTTON",
|
|
3592
|
+
value: "乙"
|
|
3593
|
+
},
|
|
3594
|
+
リッチ1: {
|
|
3595
|
+
type: "RICH_TEXT",
|
|
3596
|
+
value: "<div><b>太字</b>と<i>斜体</i></div>"
|
|
3597
|
+
},
|
|
3598
|
+
時刻2: {
|
|
3599
|
+
type: "TIME",
|
|
3600
|
+
value: "17:45"
|
|
3601
|
+
},
|
|
3602
|
+
カテゴリー: {
|
|
3603
|
+
type: "CATEGORY",
|
|
3604
|
+
value: []
|
|
3605
|
+
},
|
|
3606
|
+
時刻1: {
|
|
3607
|
+
type: "TIME",
|
|
3608
|
+
value: "09:30"
|
|
3609
|
+
},
|
|
3610
|
+
リンク1: {
|
|
3611
|
+
type: "LINK",
|
|
3612
|
+
value: "https://example.com/sample"
|
|
3613
|
+
},
|
|
3614
|
+
リッチ2: {
|
|
3615
|
+
type: "RICH_TEXT",
|
|
3616
|
+
value: "<div>リッチ 2</div>"
|
|
3617
|
+
},
|
|
3618
|
+
リンク2: {
|
|
3619
|
+
type: "LINK",
|
|
3620
|
+
value: "sample@example.com"
|
|
3621
|
+
},
|
|
3622
|
+
計算2: {
|
|
3623
|
+
type: "CALC",
|
|
3624
|
+
value: "-75"
|
|
3625
|
+
},
|
|
3626
|
+
計算1: {
|
|
3627
|
+
type: "CALC",
|
|
3628
|
+
value: "1290.78"
|
|
3629
|
+
},
|
|
3630
|
+
複数選択2: {
|
|
3631
|
+
type: "MULTI_SELECT",
|
|
3632
|
+
value: [
|
|
3633
|
+
"丙"
|
|
3634
|
+
]
|
|
3635
|
+
},
|
|
3636
|
+
日時1: {
|
|
3637
|
+
type: "DATETIME",
|
|
3638
|
+
value: "2026-01-15T00:30:00Z"
|
|
3639
|
+
},
|
|
3640
|
+
複数選択1: {
|
|
3641
|
+
type: "MULTI_SELECT",
|
|
3642
|
+
value: [
|
|
3643
|
+
"A",
|
|
3644
|
+
"B"
|
|
3645
|
+
]
|
|
3646
|
+
},
|
|
3647
|
+
日時2: {
|
|
3648
|
+
type: "DATETIME",
|
|
3649
|
+
value: "2026-03-31T08:45:00Z"
|
|
3650
|
+
},
|
|
3651
|
+
枠内数値1: {
|
|
3652
|
+
type: "NUMBER",
|
|
3653
|
+
value: "42"
|
|
3654
|
+
},
|
|
3655
|
+
作業者: {
|
|
3656
|
+
type: "STATUS_ASSIGNEE",
|
|
3657
|
+
value: []
|
|
3658
|
+
},
|
|
3659
|
+
作成者: {
|
|
3660
|
+
type: "CREATOR",
|
|
3661
|
+
value: {
|
|
3662
|
+
code: "demo_user01",
|
|
3663
|
+
name: "架空 社長"
|
|
3664
|
+
}
|
|
3665
|
+
},
|
|
3666
|
+
$revision: {
|
|
3667
|
+
type: "__REVISION__",
|
|
3668
|
+
value: "2"
|
|
3669
|
+
},
|
|
3670
|
+
文字列2: {
|
|
3671
|
+
type: "SINGLE_LINE_TEXT",
|
|
3672
|
+
value: "サンプル文字列 2"
|
|
3673
|
+
},
|
|
3674
|
+
文字列1: {
|
|
3675
|
+
type: "SINGLE_LINE_TEXT",
|
|
3676
|
+
value: "サンプル文字列 1"
|
|
3677
|
+
},
|
|
3678
|
+
更新日時: {
|
|
3679
|
+
type: "UPDATED_TIME",
|
|
3680
|
+
value: "2026-01-15T00:00:00Z"
|
|
3681
|
+
},
|
|
3682
|
+
添付1: {
|
|
3683
|
+
type: "FILE",
|
|
3684
|
+
value: []
|
|
3685
|
+
},
|
|
3686
|
+
添付2: {
|
|
3687
|
+
type: "FILE",
|
|
3688
|
+
value: []
|
|
3689
|
+
},
|
|
3690
|
+
文字列複数行2: {
|
|
3691
|
+
type: "MULTI_LINE_TEXT",
|
|
3692
|
+
value: "複数行 2"
|
|
3693
|
+
},
|
|
3694
|
+
日付1: {
|
|
3695
|
+
type: "DATE",
|
|
3696
|
+
value: "2026-01-15"
|
|
3697
|
+
},
|
|
3698
|
+
枠内文字列1: {
|
|
3699
|
+
type: "SINGLE_LINE_TEXT",
|
|
3700
|
+
value: "枠の中の文字列"
|
|
3701
|
+
},
|
|
3702
|
+
文字列複数行1: {
|
|
3703
|
+
type: "MULTI_LINE_TEXT",
|
|
3704
|
+
value: "1 行目\n2 行目\n3 行目"
|
|
3705
|
+
},
|
|
3706
|
+
日付2: {
|
|
3707
|
+
type: "DATE",
|
|
3708
|
+
value: "2026-03-31"
|
|
3709
|
+
},
|
|
3710
|
+
数値2: {
|
|
3711
|
+
type: "NUMBER",
|
|
3712
|
+
value: "56.78"
|
|
3713
|
+
},
|
|
3714
|
+
数値1: {
|
|
3715
|
+
type: "NUMBER",
|
|
3716
|
+
value: "1234"
|
|
3717
|
+
},
|
|
3718
|
+
チェック1: {
|
|
3719
|
+
type: "CHECK_BOX",
|
|
3720
|
+
value: [
|
|
3721
|
+
"A",
|
|
3722
|
+
"C"
|
|
3723
|
+
]
|
|
3724
|
+
},
|
|
3725
|
+
作成日時: {
|
|
3726
|
+
type: "CREATED_TIME",
|
|
3727
|
+
value: "2026-01-15T00:00:00Z"
|
|
3728
|
+
},
|
|
3729
|
+
$id: {
|
|
3730
|
+
type: "__ID__",
|
|
3731
|
+
value: "1"
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
};
|
|
3735
|
+
|
|
3736
|
+
// src/sample-app/record-2.json
|
|
3737
|
+
var record_2_default = {
|
|
3738
|
+
tool: "formula-authoring record",
|
|
3739
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
3740
|
+
baseUrl: "https://example.cybozu.com",
|
|
3741
|
+
appId: 4329,
|
|
3742
|
+
id: 2,
|
|
3743
|
+
record: {
|
|
3744
|
+
チェック2: {
|
|
3745
|
+
type: "CHECK_BOX",
|
|
3746
|
+
value: []
|
|
3747
|
+
},
|
|
3748
|
+
レコード番号: {
|
|
3749
|
+
type: "RECORD_NUMBER",
|
|
3750
|
+
value: "2"
|
|
3751
|
+
},
|
|
3752
|
+
ドロップダウン2: {
|
|
3753
|
+
type: "DROP_DOWN",
|
|
3754
|
+
value: "丙"
|
|
3755
|
+
},
|
|
3756
|
+
ユーザー2: {
|
|
3757
|
+
type: "USER_SELECT",
|
|
3758
|
+
value: []
|
|
3759
|
+
},
|
|
3760
|
+
組織1: {
|
|
3761
|
+
type: "ORGANIZATION_SELECT",
|
|
3762
|
+
value: []
|
|
3763
|
+
},
|
|
3764
|
+
ドロップダウン1: {
|
|
3765
|
+
type: "DROP_DOWN",
|
|
3766
|
+
value: null
|
|
3767
|
+
},
|
|
3768
|
+
更新者: {
|
|
3769
|
+
type: "MODIFIER",
|
|
3770
|
+
value: {
|
|
3771
|
+
code: "demo_user02",
|
|
3772
|
+
name: "架空 営業部長"
|
|
3773
|
+
}
|
|
3774
|
+
},
|
|
3775
|
+
ユーザー1: {
|
|
3776
|
+
type: "USER_SELECT",
|
|
3777
|
+
value: []
|
|
3778
|
+
},
|
|
3779
|
+
組織2: {
|
|
3780
|
+
type: "ORGANIZATION_SELECT",
|
|
3781
|
+
value: []
|
|
3782
|
+
},
|
|
3783
|
+
テーブル2: {
|
|
3784
|
+
type: "SUBTABLE",
|
|
3785
|
+
value: []
|
|
3786
|
+
},
|
|
3787
|
+
ステータス: {
|
|
3788
|
+
type: "STATUS",
|
|
3789
|
+
value: "未処理"
|
|
3790
|
+
},
|
|
3791
|
+
グループ1: {
|
|
3792
|
+
type: "GROUP_SELECT",
|
|
3793
|
+
value: []
|
|
3794
|
+
},
|
|
3795
|
+
テーブル1: {
|
|
3796
|
+
type: "SUBTABLE",
|
|
3797
|
+
value: [
|
|
3798
|
+
{
|
|
3799
|
+
id: "7727396",
|
|
3800
|
+
value: {
|
|
3801
|
+
T1_ユーザー: {
|
|
3802
|
+
type: "USER_SELECT",
|
|
3803
|
+
value: []
|
|
3804
|
+
},
|
|
3805
|
+
T1_文字列複数行: {
|
|
3806
|
+
type: "MULTI_LINE_TEXT",
|
|
3807
|
+
value: "\n2 行目"
|
|
3808
|
+
},
|
|
3809
|
+
T1_ラジオ: {
|
|
3810
|
+
type: "RADIO_BUTTON",
|
|
3811
|
+
value: "A"
|
|
3812
|
+
},
|
|
3813
|
+
T1_複数選択: {
|
|
3814
|
+
type: "MULTI_SELECT",
|
|
3815
|
+
value: [
|
|
3816
|
+
"B"
|
|
3817
|
+
]
|
|
3818
|
+
},
|
|
3819
|
+
T1_日付: {
|
|
3820
|
+
type: "DATE",
|
|
3821
|
+
value: "2026-02-28"
|
|
3822
|
+
},
|
|
3823
|
+
T1_ドロップダウン: {
|
|
3824
|
+
type: "DROP_DOWN",
|
|
3825
|
+
value: null
|
|
3826
|
+
},
|
|
3827
|
+
T1_リッチ: {
|
|
3828
|
+
type: "RICH_TEXT",
|
|
3829
|
+
value: "<div></div>"
|
|
3830
|
+
},
|
|
3831
|
+
T1_数値: {
|
|
3832
|
+
type: "NUMBER",
|
|
3833
|
+
value: "0"
|
|
3834
|
+
},
|
|
3835
|
+
T1_組織: {
|
|
3836
|
+
type: "ORGANIZATION_SELECT",
|
|
3837
|
+
value: []
|
|
3838
|
+
},
|
|
3839
|
+
T1_リンク: {
|
|
3840
|
+
type: "LINK",
|
|
3841
|
+
value: "https://example.com/"
|
|
3842
|
+
},
|
|
3843
|
+
T1_文字列: {
|
|
3844
|
+
type: "SINGLE_LINE_TEXT",
|
|
3845
|
+
value: ""
|
|
3846
|
+
},
|
|
3847
|
+
T1_計算: {
|
|
3848
|
+
type: "CALC",
|
|
3849
|
+
value: "0"
|
|
3850
|
+
},
|
|
3851
|
+
T1_添付: {
|
|
3852
|
+
type: "FILE",
|
|
3853
|
+
value: []
|
|
3854
|
+
},
|
|
3855
|
+
T1_日時: {
|
|
3856
|
+
type: "DATETIME",
|
|
3857
|
+
value: "2026-02-28T00:30:00Z"
|
|
3858
|
+
},
|
|
3859
|
+
T1_グループ: {
|
|
3860
|
+
type: "GROUP_SELECT",
|
|
3861
|
+
value: []
|
|
3862
|
+
},
|
|
3863
|
+
T1_チェック: {
|
|
3864
|
+
type: "CHECK_BOX",
|
|
3865
|
+
value: [
|
|
3866
|
+
"A"
|
|
3867
|
+
]
|
|
3868
|
+
},
|
|
3869
|
+
T1_時刻: {
|
|
3870
|
+
type: "TIME",
|
|
3871
|
+
value: "09:30"
|
|
3872
|
+
}
|
|
3873
|
+
}
|
|
3874
|
+
}
|
|
3875
|
+
]
|
|
3876
|
+
},
|
|
3877
|
+
ラジオ1: {
|
|
3878
|
+
type: "RADIO_BUTTON",
|
|
3879
|
+
value: "C"
|
|
3880
|
+
},
|
|
3881
|
+
グループ2: {
|
|
3882
|
+
type: "GROUP_SELECT",
|
|
3883
|
+
value: []
|
|
3884
|
+
},
|
|
3885
|
+
ラジオ2: {
|
|
3886
|
+
type: "RADIO_BUTTON",
|
|
3887
|
+
value: "甲"
|
|
3888
|
+
},
|
|
3889
|
+
リッチ1: {
|
|
3890
|
+
type: "RICH_TEXT",
|
|
3891
|
+
value: ""
|
|
3892
|
+
},
|
|
3893
|
+
時刻2: {
|
|
3894
|
+
type: "TIME",
|
|
3895
|
+
value: "23:59"
|
|
3896
|
+
},
|
|
3897
|
+
カテゴリー: {
|
|
3898
|
+
type: "CATEGORY",
|
|
3899
|
+
value: []
|
|
3900
|
+
},
|
|
3901
|
+
時刻1: {
|
|
3902
|
+
type: "TIME",
|
|
3903
|
+
value: "00:00"
|
|
3904
|
+
},
|
|
3905
|
+
リンク1: {
|
|
3906
|
+
type: "LINK",
|
|
3907
|
+
value: ""
|
|
3908
|
+
},
|
|
3909
|
+
リッチ2: {
|
|
3910
|
+
type: "RICH_TEXT",
|
|
3911
|
+
value: ""
|
|
3912
|
+
},
|
|
3913
|
+
リンク2: {
|
|
3914
|
+
type: "LINK",
|
|
3915
|
+
value: ""
|
|
3916
|
+
},
|
|
3917
|
+
計算2: {
|
|
3918
|
+
type: "CALC",
|
|
3919
|
+
value: "-306"
|
|
3920
|
+
},
|
|
3921
|
+
計算1: {
|
|
3922
|
+
type: "CALC",
|
|
3923
|
+
value: "-12.345"
|
|
3924
|
+
},
|
|
3925
|
+
複数選択2: {
|
|
3926
|
+
type: "MULTI_SELECT",
|
|
3927
|
+
value: []
|
|
3928
|
+
},
|
|
3929
|
+
日時1: {
|
|
3930
|
+
type: "DATETIME",
|
|
3931
|
+
value: "2026-12-31T14:59:00Z"
|
|
3932
|
+
},
|
|
3933
|
+
複数選択1: {
|
|
3934
|
+
type: "MULTI_SELECT",
|
|
3935
|
+
value: []
|
|
3936
|
+
},
|
|
3937
|
+
日時2: {
|
|
3938
|
+
type: "DATETIME",
|
|
3939
|
+
value: ""
|
|
3940
|
+
},
|
|
3941
|
+
枠内数値1: {
|
|
3942
|
+
type: "NUMBER",
|
|
3943
|
+
value: ""
|
|
3944
|
+
},
|
|
3945
|
+
作業者: {
|
|
3946
|
+
type: "STATUS_ASSIGNEE",
|
|
3947
|
+
value: []
|
|
3948
|
+
},
|
|
3949
|
+
作成者: {
|
|
3950
|
+
type: "CREATOR",
|
|
3951
|
+
value: {
|
|
3952
|
+
code: "demo_user01",
|
|
3953
|
+
name: "架空 社長"
|
|
3954
|
+
}
|
|
3955
|
+
},
|
|
3956
|
+
$revision: {
|
|
3957
|
+
type: "__REVISION__",
|
|
3958
|
+
value: "2"
|
|
3959
|
+
},
|
|
3960
|
+
文字列2: {
|
|
3961
|
+
type: "SINGLE_LINE_TEXT",
|
|
3962
|
+
value: ""
|
|
3963
|
+
},
|
|
3964
|
+
文字列1: {
|
|
3965
|
+
type: "SINGLE_LINE_TEXT",
|
|
3966
|
+
value: "端の値"
|
|
3967
|
+
},
|
|
3968
|
+
更新日時: {
|
|
3969
|
+
type: "UPDATED_TIME",
|
|
3970
|
+
value: "2026-01-15T00:00:00Z"
|
|
3971
|
+
},
|
|
3972
|
+
添付1: {
|
|
3973
|
+
type: "FILE",
|
|
3974
|
+
value: []
|
|
3975
|
+
},
|
|
3976
|
+
添付2: {
|
|
3977
|
+
type: "FILE",
|
|
3978
|
+
value: []
|
|
3979
|
+
},
|
|
3980
|
+
文字列複数行2: {
|
|
3981
|
+
type: "MULTI_LINE_TEXT",
|
|
3982
|
+
value: ""
|
|
3983
|
+
},
|
|
3984
|
+
日付1: {
|
|
3985
|
+
type: "DATE",
|
|
3986
|
+
value: "2026-02-28"
|
|
3987
|
+
},
|
|
3988
|
+
枠内文字列1: {
|
|
3989
|
+
type: "SINGLE_LINE_TEXT",
|
|
3990
|
+
value: ""
|
|
3991
|
+
},
|
|
3992
|
+
文字列複数行1: {
|
|
3993
|
+
type: "MULTI_LINE_TEXT",
|
|
3994
|
+
value: "1\n\n3\n"
|
|
3995
|
+
},
|
|
3996
|
+
日付2: {
|
|
3997
|
+
type: "DATE",
|
|
3998
|
+
value: "2026-12-31"
|
|
3999
|
+
},
|
|
4000
|
+
数値2: {
|
|
4001
|
+
type: "NUMBER",
|
|
4002
|
+
value: "-12.345"
|
|
4003
|
+
},
|
|
4004
|
+
数値1: {
|
|
4005
|
+
type: "NUMBER",
|
|
4006
|
+
value: "0"
|
|
4007
|
+
},
|
|
4008
|
+
チェック1: {
|
|
4009
|
+
type: "CHECK_BOX",
|
|
4010
|
+
value: []
|
|
4011
|
+
},
|
|
4012
|
+
作成日時: {
|
|
4013
|
+
type: "CREATED_TIME",
|
|
4014
|
+
value: "2026-01-15T00:00:00Z"
|
|
4015
|
+
},
|
|
4016
|
+
$id: {
|
|
4017
|
+
type: "__ID__",
|
|
4018
|
+
value: "2"
|
|
4019
|
+
}
|
|
4020
|
+
}
|
|
4021
|
+
};
|
|
4022
|
+
|
|
4023
|
+
// src/sample-app/record-3.json
|
|
4024
|
+
var record_3_default = {
|
|
4025
|
+
tool: "formula-authoring record",
|
|
4026
|
+
fetchedAt: "2026-01-15T00:00:00.000Z",
|
|
4027
|
+
baseUrl: "https://example.cybozu.com",
|
|
4028
|
+
appId: 4329,
|
|
4029
|
+
id: 3,
|
|
4030
|
+
record: {
|
|
4031
|
+
チェック2: {
|
|
4032
|
+
type: "CHECK_BOX",
|
|
4033
|
+
value: []
|
|
4034
|
+
},
|
|
4035
|
+
レコード番号: {
|
|
4036
|
+
type: "RECORD_NUMBER",
|
|
4037
|
+
value: "3"
|
|
4038
|
+
},
|
|
4039
|
+
ドロップダウン2: {
|
|
4040
|
+
type: "DROP_DOWN",
|
|
4041
|
+
value: null
|
|
4042
|
+
},
|
|
4043
|
+
ユーザー2: {
|
|
4044
|
+
type: "USER_SELECT",
|
|
4045
|
+
value: []
|
|
4046
|
+
},
|
|
4047
|
+
組織1: {
|
|
4048
|
+
type: "ORGANIZATION_SELECT",
|
|
4049
|
+
value: []
|
|
4050
|
+
},
|
|
4051
|
+
ドロップダウン1: {
|
|
4052
|
+
type: "DROP_DOWN",
|
|
4053
|
+
value: null
|
|
4054
|
+
},
|
|
4055
|
+
更新者: {
|
|
4056
|
+
type: "MODIFIER",
|
|
4057
|
+
value: {
|
|
4058
|
+
code: "demo_user02",
|
|
4059
|
+
name: "架空 営業部長"
|
|
4060
|
+
}
|
|
4061
|
+
},
|
|
4062
|
+
ユーザー1: {
|
|
4063
|
+
type: "USER_SELECT",
|
|
4064
|
+
value: []
|
|
4065
|
+
},
|
|
4066
|
+
組織2: {
|
|
4067
|
+
type: "ORGANIZATION_SELECT",
|
|
4068
|
+
value: []
|
|
4069
|
+
},
|
|
4070
|
+
テーブル2: {
|
|
4071
|
+
type: "SUBTABLE",
|
|
4072
|
+
value: []
|
|
4073
|
+
},
|
|
4074
|
+
ステータス: {
|
|
4075
|
+
type: "STATUS",
|
|
4076
|
+
value: "未処理"
|
|
4077
|
+
},
|
|
4078
|
+
グループ1: {
|
|
4079
|
+
type: "GROUP_SELECT",
|
|
4080
|
+
value: []
|
|
4081
|
+
},
|
|
4082
|
+
テーブル1: {
|
|
4083
|
+
type: "SUBTABLE",
|
|
4084
|
+
value: []
|
|
4085
|
+
},
|
|
4086
|
+
ラジオ1: {
|
|
4087
|
+
type: "RADIO_BUTTON",
|
|
4088
|
+
value: "A"
|
|
4089
|
+
},
|
|
4090
|
+
グループ2: {
|
|
4091
|
+
type: "GROUP_SELECT",
|
|
4092
|
+
value: []
|
|
4093
|
+
},
|
|
4094
|
+
ラジオ2: {
|
|
4095
|
+
type: "RADIO_BUTTON",
|
|
4096
|
+
value: "甲"
|
|
4097
|
+
},
|
|
4098
|
+
リッチ1: {
|
|
4099
|
+
type: "RICH_TEXT",
|
|
4100
|
+
value: ""
|
|
4101
|
+
},
|
|
4102
|
+
時刻2: {
|
|
4103
|
+
type: "TIME",
|
|
4104
|
+
value: null
|
|
4105
|
+
},
|
|
4106
|
+
カテゴリー: {
|
|
4107
|
+
type: "CATEGORY",
|
|
4108
|
+
value: []
|
|
4109
|
+
},
|
|
4110
|
+
時刻1: {
|
|
4111
|
+
type: "TIME",
|
|
4112
|
+
value: null
|
|
4113
|
+
},
|
|
4114
|
+
リンク1: {
|
|
4115
|
+
type: "LINK",
|
|
4116
|
+
value: ""
|
|
4117
|
+
},
|
|
4118
|
+
リッチ2: {
|
|
4119
|
+
type: "RICH_TEXT",
|
|
4120
|
+
value: ""
|
|
4121
|
+
},
|
|
4122
|
+
リンク2: {
|
|
4123
|
+
type: "LINK",
|
|
4124
|
+
value: ""
|
|
4125
|
+
},
|
|
4126
|
+
計算2: {
|
|
4127
|
+
type: "CALC",
|
|
4128
|
+
value: "0"
|
|
4129
|
+
},
|
|
4130
|
+
計算1: {
|
|
4131
|
+
type: "CALC",
|
|
4132
|
+
value: "0"
|
|
4133
|
+
},
|
|
4134
|
+
複数選択2: {
|
|
4135
|
+
type: "MULTI_SELECT",
|
|
4136
|
+
value: []
|
|
4137
|
+
},
|
|
4138
|
+
日時1: {
|
|
4139
|
+
type: "DATETIME",
|
|
4140
|
+
value: ""
|
|
4141
|
+
},
|
|
4142
|
+
複数選択1: {
|
|
4143
|
+
type: "MULTI_SELECT",
|
|
4144
|
+
value: []
|
|
4145
|
+
},
|
|
4146
|
+
日時2: {
|
|
4147
|
+
type: "DATETIME",
|
|
4148
|
+
value: ""
|
|
4149
|
+
},
|
|
4150
|
+
枠内数値1: {
|
|
4151
|
+
type: "NUMBER",
|
|
4152
|
+
value: ""
|
|
4153
|
+
},
|
|
4154
|
+
作業者: {
|
|
4155
|
+
type: "STATUS_ASSIGNEE",
|
|
4156
|
+
value: []
|
|
4157
|
+
},
|
|
4158
|
+
作成者: {
|
|
4159
|
+
type: "CREATOR",
|
|
4160
|
+
value: {
|
|
4161
|
+
code: "demo_user01",
|
|
4162
|
+
name: "架空 社長"
|
|
4163
|
+
}
|
|
4164
|
+
},
|
|
4165
|
+
$revision: {
|
|
4166
|
+
type: "__REVISION__",
|
|
4167
|
+
value: "2"
|
|
4168
|
+
},
|
|
4169
|
+
文字列2: {
|
|
4170
|
+
type: "SINGLE_LINE_TEXT",
|
|
4171
|
+
value: ""
|
|
4172
|
+
},
|
|
4173
|
+
文字列1: {
|
|
4174
|
+
type: "SINGLE_LINE_TEXT",
|
|
4175
|
+
value: "空のレコード"
|
|
4176
|
+
},
|
|
4177
|
+
更新日時: {
|
|
4178
|
+
type: "UPDATED_TIME",
|
|
4179
|
+
value: "2026-01-15T00:00:00Z"
|
|
4180
|
+
},
|
|
4181
|
+
添付1: {
|
|
4182
|
+
type: "FILE",
|
|
4183
|
+
value: []
|
|
4184
|
+
},
|
|
4185
|
+
添付2: {
|
|
4186
|
+
type: "FILE",
|
|
4187
|
+
value: []
|
|
4188
|
+
},
|
|
4189
|
+
文字列複数行2: {
|
|
4190
|
+
type: "MULTI_LINE_TEXT",
|
|
4191
|
+
value: ""
|
|
4192
|
+
},
|
|
4193
|
+
日付1: {
|
|
4194
|
+
type: "DATE",
|
|
4195
|
+
value: null
|
|
4196
|
+
},
|
|
4197
|
+
枠内文字列1: {
|
|
4198
|
+
type: "SINGLE_LINE_TEXT",
|
|
4199
|
+
value: ""
|
|
4200
|
+
},
|
|
4201
|
+
文字列複数行1: {
|
|
4202
|
+
type: "MULTI_LINE_TEXT",
|
|
4203
|
+
value: ""
|
|
4204
|
+
},
|
|
4205
|
+
日付2: {
|
|
4206
|
+
type: "DATE",
|
|
4207
|
+
value: null
|
|
4208
|
+
},
|
|
4209
|
+
数値2: {
|
|
4210
|
+
type: "NUMBER",
|
|
4211
|
+
value: ""
|
|
4212
|
+
},
|
|
4213
|
+
数値1: {
|
|
4214
|
+
type: "NUMBER",
|
|
4215
|
+
value: ""
|
|
4216
|
+
},
|
|
4217
|
+
チェック1: {
|
|
4218
|
+
type: "CHECK_BOX",
|
|
4219
|
+
value: []
|
|
4220
|
+
},
|
|
4221
|
+
作成日時: {
|
|
4222
|
+
type: "CREATED_TIME",
|
|
4223
|
+
value: "2026-01-15T00:00:00Z"
|
|
4224
|
+
},
|
|
4225
|
+
$id: {
|
|
4226
|
+
type: "__ID__",
|
|
4227
|
+
value: "3"
|
|
4228
|
+
}
|
|
4229
|
+
}
|
|
4230
|
+
};
|
|
4231
|
+
|
|
4232
|
+
// src/sample-app.ts
|
|
4233
|
+
var LABELS = {
|
|
4234
|
+
1: "典型(全項目に値)",
|
|
4235
|
+
2: "端(0・負の小数・改行・未選択・月末と年末の日付)",
|
|
4236
|
+
3: "空(ほぼ全部空)"
|
|
4237
|
+
};
|
|
4238
|
+
function sampleRecord(data, id) {
|
|
4239
|
+
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)`);
|
|
4240
|
+
return { id, label: LABELS[id] ?? "", record: data.record };
|
|
4241
|
+
}
|
|
4242
|
+
var SAMPLE_APP = {
|
|
4243
|
+
fields: fields_default,
|
|
4244
|
+
records: [sampleRecord(record_1_default, 1), sampleRecord(record_2_default, 2), sampleRecord(record_3_default, 3)]
|
|
4245
|
+
};
|
|
4246
|
+
function sampleApp() {
|
|
4247
|
+
return structuredClone(SAMPLE_APP);
|
|
4248
|
+
}
|
|
4249
|
+
|
|
4250
|
+
// src/commands/try-data.ts
|
|
4251
|
+
var TRY_MAX_EXTRA_FIELDS = 20;
|
|
4252
|
+
var TRY_MAX_DATA = 5;
|
|
4253
|
+
var TRY_MAX_TABLE_ROWS = 20;
|
|
4254
|
+
var TRY_MAX_OPTIONS = 50;
|
|
4255
|
+
var TRY_MAX_VALUE_CHARS = 2e3;
|
|
4256
|
+
var TYPE_ALIASES = {
|
|
4257
|
+
TEXT: "SINGLE_LINE_TEXT",
|
|
4258
|
+
STRING: "SINGLE_LINE_TEXT",
|
|
4259
|
+
TEXTAREA: "MULTI_LINE_TEXT",
|
|
4260
|
+
MULTILINE: "MULTI_LINE_TEXT",
|
|
4261
|
+
RICH: "RICH_TEXT",
|
|
4262
|
+
NUM: "NUMBER",
|
|
4263
|
+
DROPDOWN: "DROP_DOWN",
|
|
4264
|
+
RADIO: "RADIO_BUTTON",
|
|
4265
|
+
CHECKBOX: "CHECK_BOX",
|
|
4266
|
+
MULTISELECT: "MULTI_SELECT",
|
|
4267
|
+
USER: "USER_SELECT",
|
|
4268
|
+
ORG: "ORGANIZATION_SELECT",
|
|
4269
|
+
ORGANIZATION: "ORGANIZATION_SELECT",
|
|
4270
|
+
URL: "LINK",
|
|
4271
|
+
TABLE: "SUBTABLE"
|
|
4272
|
+
};
|
|
4273
|
+
var EXTRA_TYPES = [
|
|
4274
|
+
"SINGLE_LINE_TEXT",
|
|
4275
|
+
"MULTI_LINE_TEXT",
|
|
4276
|
+
"RICH_TEXT",
|
|
4277
|
+
"NUMBER",
|
|
4278
|
+
"DATE",
|
|
4279
|
+
"DATETIME",
|
|
4280
|
+
"TIME",
|
|
4281
|
+
"DROP_DOWN",
|
|
4282
|
+
"RADIO_BUTTON",
|
|
4283
|
+
"CHECK_BOX",
|
|
4284
|
+
"MULTI_SELECT",
|
|
4285
|
+
"USER_SELECT",
|
|
4286
|
+
"ORGANIZATION_SELECT",
|
|
4287
|
+
"GROUP_SELECT",
|
|
4288
|
+
"LINK",
|
|
4289
|
+
"SUBTABLE"
|
|
4290
|
+
];
|
|
4291
|
+
var CHOICE_TYPES = /* @__PURE__ */ new Set(["DROP_DOWN", "RADIO_BUTTON", "CHECK_BOX", "MULTI_SELECT"]);
|
|
4292
|
+
var CODE_RE = /^[\p{L}_・$¥][\p{L}\p{N}_・$¥]{0,127}$/u;
|
|
4293
|
+
function canonicalType(type) {
|
|
4294
|
+
const upper = String(type).trim().toUpperCase();
|
|
4295
|
+
return TYPE_ALIASES[upper] ?? upper;
|
|
4296
|
+
}
|
|
4297
|
+
function propertyOf(code, type, label, options) {
|
|
4298
|
+
const base = { type, code, label, noLabel: false, required: false };
|
|
4299
|
+
const opts = options ? { options: Object.fromEntries(options.map((o, i) => [o, { label: o, index: String(i) }])) } : {};
|
|
4300
|
+
switch (type) {
|
|
4301
|
+
case "NUMBER":
|
|
4302
|
+
return { ...base, minValue: "", maxValue: "", digit: false, unique: false, defaultValue: "", displayScale: "", unit: "", unitPosition: "BEFORE" };
|
|
4303
|
+
case "SINGLE_LINE_TEXT":
|
|
4304
|
+
return { ...base, minLength: "", maxLength: "", expression: "", hideExpression: false, unique: false, defaultValue: "" };
|
|
4305
|
+
case "LINK":
|
|
4306
|
+
return { ...base, protocol: "WEB", minLength: "", maxLength: "", unique: false, defaultValue: "" };
|
|
4307
|
+
case "MULTI_LINE_TEXT":
|
|
4308
|
+
case "RICH_TEXT":
|
|
4309
|
+
return { ...base, defaultValue: "" };
|
|
4310
|
+
case "DATE":
|
|
4311
|
+
case "DATETIME":
|
|
4312
|
+
return { ...base, unique: false, defaultValue: "", defaultNowValue: false };
|
|
4313
|
+
case "TIME":
|
|
4314
|
+
return { ...base, defaultValue: "", defaultNowValue: false };
|
|
4315
|
+
case "DROP_DOWN":
|
|
4316
|
+
return { ...base, ...opts, defaultValue: "" };
|
|
4317
|
+
case "RADIO_BUTTON":
|
|
4318
|
+
return { ...base, ...opts, defaultValue: options?.[0] ?? "", align: "HORIZONTAL" };
|
|
4319
|
+
case "CHECK_BOX":
|
|
4320
|
+
case "MULTI_SELECT":
|
|
4321
|
+
return { ...base, ...opts, defaultValue: [], align: "HORIZONTAL" };
|
|
4322
|
+
case "USER_SELECT":
|
|
4323
|
+
case "ORGANIZATION_SELECT":
|
|
4324
|
+
case "GROUP_SELECT":
|
|
4325
|
+
return { ...base, entities: [], defaultValue: [] };
|
|
4326
|
+
case "SUBTABLE":
|
|
4327
|
+
return { type, code, label, noLabel: false, fields: {} };
|
|
4328
|
+
default:
|
|
4329
|
+
throw new InputError(`項目 ${code} の型 ${type} は足せない(${EXTRA_TYPES.join(", ")})`);
|
|
4330
|
+
}
|
|
4331
|
+
}
|
|
4332
|
+
function layoutTableOf(layout, code) {
|
|
4333
|
+
for (const row of layout) {
|
|
4334
|
+
if (row.type === "SUBTABLE" && row.code === code) return row;
|
|
4335
|
+
if (row.type === "GROUP" && Array.isArray(row.layout)) {
|
|
4336
|
+
const hit = layoutTableOf(row.layout, code);
|
|
4337
|
+
if (hit) return hit;
|
|
4338
|
+
}
|
|
4339
|
+
}
|
|
4340
|
+
return void 0;
|
|
4341
|
+
}
|
|
4342
|
+
var sizeOf = (type) => type === "MULTI_LINE_TEXT" || type === "RICH_TEXT" ? { width: "250", innerHeight: "125" } : { width: "200" };
|
|
4343
|
+
function allCodesOf(fields) {
|
|
4344
|
+
const codes = /* @__PURE__ */ new Set();
|
|
4345
|
+
for (const p of Object.values(fields.properties)) {
|
|
4346
|
+
codes.add(p.code);
|
|
4347
|
+
for (const c of Object.values(p.fields ?? {})) codes.add(c.code);
|
|
4348
|
+
}
|
|
4349
|
+
return codes;
|
|
4350
|
+
}
|
|
4351
|
+
function checkOptions(def, type, where) {
|
|
4352
|
+
if (!CHOICE_TYPES.has(type)) {
|
|
4353
|
+
if (def.options !== void 0) throw new InputError(`${where}: ${type} に options は付けない`);
|
|
4354
|
+
return void 0;
|
|
4355
|
+
}
|
|
4356
|
+
if (!Array.isArray(def.options) || !def.options.length) throw new InputError(`${where}: ${type} には options(選択肢の配列)が要る`);
|
|
4357
|
+
if (def.options.length > TRY_MAX_OPTIONS) throw new InputError(`${where}: options は ${TRY_MAX_OPTIONS} 個まで`);
|
|
4358
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4359
|
+
for (const o of def.options) {
|
|
4360
|
+
if (typeof o !== "string" || !o.trim() || [...o].length > 100) throw new InputError(`${where}: options は空でない文字列(100 文字まで): ${JSON.stringify(o)}`);
|
|
4361
|
+
if (seen.has(o)) throw new InputError(`${where}: options が重複: ${o}`);
|
|
4362
|
+
seen.add(o);
|
|
4363
|
+
}
|
|
4364
|
+
return def.options;
|
|
4365
|
+
}
|
|
4366
|
+
function extendFields(fields, defs) {
|
|
4367
|
+
const out = structuredClone(fields);
|
|
4368
|
+
const codes = allCodesOf(out);
|
|
4369
|
+
const added = [];
|
|
4370
|
+
let count = 0;
|
|
4371
|
+
const describe = (type, options, children) => `${type}${options ? `: ${options.join(" / ")}` : ""}${children ? `: ${children.join(", ")}` : ""}`;
|
|
4372
|
+
const takeCode = (def, where) => {
|
|
4373
|
+
if (typeof def.code !== "string" || !CODE_RE.test(def.code)) throw new InputError(`${where}: code はフィールドコード(文字・数字・_ で、数字で始まらない。128 文字まで): ${JSON.stringify(def.code)}`);
|
|
4374
|
+
if (codes.has(def.code)) throw new InputError(`${where}: ${def.code} は既にある項目(標本の項目と重ならないコードにする)`);
|
|
4375
|
+
if (++count > TRY_MAX_EXTRA_FIELDS) throw new InputError(`足す項目は ${TRY_MAX_EXTRA_FIELDS} 個まで(テーブルの子も数える)`);
|
|
4376
|
+
codes.add(def.code);
|
|
4377
|
+
return def.code;
|
|
4378
|
+
};
|
|
4379
|
+
const labelOf = (def, where) => {
|
|
4380
|
+
if (def.label !== void 0 && (typeof def.label !== "string" || [...def.label].length > 128)) throw new InputError(`${where}: label は 128 文字まで`);
|
|
4381
|
+
return def.label ?? def.code;
|
|
4382
|
+
};
|
|
4383
|
+
defs.forEach((def, i) => {
|
|
4384
|
+
const where = `fields[${i}]`;
|
|
4385
|
+
if (!def || typeof def !== "object") throw new InputError(`${where}: 項目はオブジェクト({ code, type, options?, table?, fields? })`);
|
|
4386
|
+
const type = canonicalType(def.type ?? "");
|
|
4387
|
+
if (!EXTRA_TYPES.includes(type)) throw new InputError(`${where}: 型 ${JSON.stringify(def.type)} は足せない(${EXTRA_TYPES.join(", ")})`);
|
|
4388
|
+
if (def.table !== void 0 && type === "SUBTABLE") throw new InputError(`${where}: テーブルの中にテーブルは置けない(table と type SUBTABLE は一緒に書かない)`);
|
|
4389
|
+
if (def.fields !== void 0 && type !== "SUBTABLE") throw new InputError(`${where}: fields(子)は type SUBTABLE のときだけ`);
|
|
4390
|
+
const code = takeCode(def, where);
|
|
4391
|
+
const label = labelOf(def, where);
|
|
4392
|
+
const options = checkOptions(def, type, where);
|
|
4393
|
+
if (def.table !== void 0) {
|
|
4394
|
+
const parent = out.properties[def.table];
|
|
4395
|
+
if (!parent || parent.type !== "SUBTABLE") throw new InputError(`${where}: table ${JSON.stringify(def.table)} はテーブルでない(標本のテーブル1 / テーブル2 か、先に足したテーブル)`);
|
|
4396
|
+
parent.fields ??= {};
|
|
4397
|
+
parent.fields[code] = propertyOf(code, type, label, options);
|
|
4398
|
+
const slot = layoutTableOf(out.layout, def.table);
|
|
4399
|
+
if (!slot) throw new InputError(`${where}: テーブル ${def.table} がレイアウトに無い`);
|
|
4400
|
+
slot.fields ??= [];
|
|
4401
|
+
slot.fields.push({ type, code, size: sizeOf(type) });
|
|
4402
|
+
added.push(`${code}(${describe(type, options)}。${def.table} の子)`);
|
|
4403
|
+
return;
|
|
4404
|
+
}
|
|
4405
|
+
if (type === "SUBTABLE") {
|
|
4406
|
+
if (!Array.isArray(def.fields) || !def.fields.length) throw new InputError(`${where}: SUBTABLE には fields(子の配列。1 つ以上)が要る`);
|
|
4407
|
+
const table = propertyOf(code, type, label, void 0);
|
|
4408
|
+
const slot = { type: "SUBTABLE", code, fields: [] };
|
|
4409
|
+
const names = [];
|
|
4410
|
+
def.fields.forEach((child, j) => {
|
|
4411
|
+
const cw = `${where}.fields[${j}]`;
|
|
4412
|
+
if (!child || typeof child !== "object") throw new InputError(`${cw}: 子はオブジェクト({ code, type, options? })`);
|
|
4413
|
+
const ct = canonicalType(child.type ?? "");
|
|
4414
|
+
if (!EXTRA_TYPES.includes(ct) || ct === "SUBTABLE") throw new InputError(`${cw}: 型 ${JSON.stringify(child.type)} はテーブルの子にできない`);
|
|
4415
|
+
if (child.table !== void 0 || child.fields !== void 0) throw new InputError(`${cw}: 子に table / fields は書けない`);
|
|
4416
|
+
const cc = takeCode(child, cw);
|
|
4417
|
+
table.fields[cc] = propertyOf(cc, ct, labelOf(child, cw), checkOptions(child, ct, cw));
|
|
4418
|
+
slot.fields.push({ type: ct, code: cc, size: sizeOf(ct) });
|
|
4419
|
+
names.push(cc);
|
|
4420
|
+
});
|
|
4421
|
+
out.properties[code] = table;
|
|
4422
|
+
out.layout.push(slot);
|
|
4423
|
+
added.push(`${code}(${describe(type, void 0, names)})`);
|
|
4424
|
+
return;
|
|
4425
|
+
}
|
|
4426
|
+
out.properties[code] = propertyOf(code, type, label, options);
|
|
4427
|
+
out.layout.push({ type: "ROW", fields: [{ type, code, size: sizeOf(type) }] });
|
|
4428
|
+
added.push(`${code}(${describe(type, options)})`);
|
|
4429
|
+
});
|
|
4430
|
+
return { fields: out, added };
|
|
4431
|
+
}
|
|
4432
|
+
function normalizeDefaults(fields) {
|
|
4433
|
+
const out = structuredClone(fields);
|
|
4434
|
+
const fix = (p) => {
|
|
4435
|
+
if (p.type === "SUBTABLE") {
|
|
4436
|
+
for (const c of Object.values(p.fields ?? {})) fix(c);
|
|
4437
|
+
return;
|
|
4438
|
+
}
|
|
4439
|
+
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;
|
|
4440
|
+
const arrayType = /^(CHECK_BOX|MULTI_SELECT|USER_SELECT|ORGANIZATION_SELECT|GROUP_SELECT)$/.test(p.type);
|
|
4441
|
+
if (arrayType) {
|
|
4442
|
+
if (!Array.isArray(p.defaultValue)) p.defaultValue = [];
|
|
4443
|
+
} else if (p.defaultValue === void 0 || p.defaultValue === null) p.defaultValue = "";
|
|
4444
|
+
};
|
|
4445
|
+
for (const p of Object.values(out.properties)) fix(p);
|
|
4446
|
+
return out;
|
|
4447
|
+
}
|
|
4448
|
+
function emptyValueOf(type) {
|
|
4449
|
+
switch (type) {
|
|
4450
|
+
case "CHECK_BOX":
|
|
4451
|
+
case "MULTI_SELECT":
|
|
4452
|
+
case "USER_SELECT":
|
|
4453
|
+
case "ORGANIZATION_SELECT":
|
|
4454
|
+
case "GROUP_SELECT":
|
|
4455
|
+
case "FILE":
|
|
4456
|
+
case "STATUS_ASSIGNEE":
|
|
4457
|
+
case "CATEGORY":
|
|
4458
|
+
case "SUBTABLE":
|
|
4459
|
+
return [];
|
|
4460
|
+
case "CREATOR":
|
|
4461
|
+
case "MODIFIER":
|
|
4462
|
+
return { code: "", name: "" };
|
|
4463
|
+
default:
|
|
4464
|
+
return "";
|
|
4465
|
+
}
|
|
4466
|
+
}
|
|
4467
|
+
var NO_VALUE_TYPES = /* @__PURE__ */ new Set(["GROUP", "REFERENCE_TABLE", "LABEL", "SPACER", "HR"]);
|
|
4468
|
+
function emptyRecordOf(fields, id) {
|
|
4469
|
+
const rec = { $id: { type: "__ID__", value: id }, $revision: { type: "__REVISION__", value: "1" } };
|
|
4470
|
+
for (const p of Object.values(fields.properties)) {
|
|
4471
|
+
if (NO_VALUE_TYPES.has(p.type)) continue;
|
|
4472
|
+
const value = p.type === "RECORD_NUMBER" ? id : p.type === "CREATED_TIME" || p.type === "UPDATED_TIME" ? "2026-01-15T00:00:00Z" : emptyValueOf(p.type);
|
|
4473
|
+
rec[p.code] = { type: p.type, value };
|
|
4474
|
+
}
|
|
4475
|
+
return rec;
|
|
4476
|
+
}
|
|
4477
|
+
function fillMissing(fields, record) {
|
|
4478
|
+
const out = structuredClone(record);
|
|
4479
|
+
for (const p of Object.values(fields.properties)) {
|
|
4480
|
+
if (NO_VALUE_TYPES.has(p.type)) continue;
|
|
4481
|
+
if (!(p.code in out)) out[p.code] = { type: p.type, value: emptyValueOf(p.type) };
|
|
4482
|
+
if (p.type === "SUBTABLE") {
|
|
4483
|
+
const rows = out[p.code].value;
|
|
4484
|
+
if (Array.isArray(rows)) {
|
|
4485
|
+
for (const row of rows) {
|
|
4486
|
+
row.value ??= {};
|
|
4487
|
+
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) };
|
|
4488
|
+
}
|
|
4489
|
+
}
|
|
4490
|
+
}
|
|
4491
|
+
}
|
|
4492
|
+
return out;
|
|
4493
|
+
}
|
|
4494
|
+
var NUMBER_RE = /^[+-]?(\d+\.?\d*|\.\d+)([eE][+-]?\d+)?$/;
|
|
4495
|
+
var DATE_RE = /^\d{4}-\d{2}-\d{2}$/;
|
|
4496
|
+
var TIME_RE = /^\d{2}:\d{2}$/;
|
|
4497
|
+
var DATETIME_RE = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}(:\d{2})?(Z|[+-]\d{2}:\d{2})$/;
|
|
4498
|
+
var isEmpty = (v) => v === "" || v === null || v === void 0;
|
|
4499
|
+
function text(v, where) {
|
|
4500
|
+
if (isEmpty(v)) return "";
|
|
4501
|
+
if (typeof v === "string" || typeof v === "number" || typeof v === "boolean") {
|
|
4502
|
+
const s = String(v);
|
|
4503
|
+
if ([...s].length > TRY_MAX_VALUE_CHARS) throw new InputError(`${where}: 文字列は ${TRY_MAX_VALUE_CHARS} 文字まで`);
|
|
4504
|
+
return s;
|
|
4505
|
+
}
|
|
4506
|
+
throw new InputError(`${where}: 文字列を書く(${JSON.stringify(v).slice(0, 40)})`);
|
|
4507
|
+
}
|
|
4508
|
+
function codeList(v, where, kind, users) {
|
|
4509
|
+
if (isEmpty(v)) return [];
|
|
4510
|
+
const list = Array.isArray(v) ? v : [v];
|
|
4511
|
+
const table = kind === "org" ? users?.orgCodes : kind === "group" ? users?.groupCodes : users?.userCodes;
|
|
4512
|
+
return list.map((e, i) => {
|
|
4513
|
+
const code = typeof e === "string" ? e : e && typeof e === "object" && typeof e.code === "string" ? e.code : void 0;
|
|
4514
|
+
if (code === void 0 || !code.trim() || [...code].length > 128) throw new InputError(`${where}[${i}]: コード(文字列)か { code, name? } を書く`);
|
|
4515
|
+
const given = e && typeof e === "object" ? e.name : void 0;
|
|
4516
|
+
const name = typeof given === "string" ? given : typeof table?.[code]?.name === "string" ? String(table[code].name) : code;
|
|
4517
|
+
return { code, name };
|
|
4518
|
+
});
|
|
4519
|
+
}
|
|
4520
|
+
function stringList(v, where, options) {
|
|
4521
|
+
if (isEmpty(v)) return [];
|
|
4522
|
+
const list = Array.isArray(v) ? v : [v];
|
|
4523
|
+
return list.map((e, i) => {
|
|
4524
|
+
if (typeof e !== "string") throw new InputError(`${where}[${i}]: 文字列を書く`);
|
|
4525
|
+
if (options && !(e in options)) throw new InputError(`${where}[${i}]: 選択肢に無い値 ${JSON.stringify(e)}(${Object.keys(options).join(" / ")})`);
|
|
4526
|
+
return e;
|
|
4527
|
+
});
|
|
4528
|
+
}
|
|
4529
|
+
function convertValue(prop, v, where, users) {
|
|
4530
|
+
const options = prop.options;
|
|
4531
|
+
switch (prop.type) {
|
|
4532
|
+
case "NUMBER": {
|
|
4533
|
+
if (isEmpty(v)) return "";
|
|
4534
|
+
if (typeof v === "number") {
|
|
4535
|
+
if (!Number.isFinite(v)) throw new InputError(`${where}: NUMBER は有限の数`);
|
|
4536
|
+
return String(v);
|
|
4537
|
+
}
|
|
4538
|
+
if (typeof v === "string" && NUMBER_RE.test(v.trim())) return v.trim();
|
|
4539
|
+
throw new InputError(`${where}: NUMBER は数か数字の文字列(${JSON.stringify(v).slice(0, 40)})`);
|
|
4540
|
+
}
|
|
4541
|
+
case "SINGLE_LINE_TEXT":
|
|
4542
|
+
case "MULTI_LINE_TEXT":
|
|
4543
|
+
case "RICH_TEXT":
|
|
4544
|
+
case "LINK":
|
|
4545
|
+
case "CALC":
|
|
4546
|
+
case "STATUS":
|
|
4547
|
+
case "RECORD_NUMBER":
|
|
4548
|
+
case "__ID__":
|
|
4549
|
+
case "__REVISION__":
|
|
4550
|
+
return text(v, where);
|
|
4551
|
+
case "DATE": {
|
|
4552
|
+
const s = text(v, where);
|
|
4553
|
+
if (s && !DATE_RE.test(s)) throw new InputError(`${where}: DATE は "YYYY-MM-DD"(${JSON.stringify(s)})`);
|
|
4554
|
+
return s;
|
|
4555
|
+
}
|
|
4556
|
+
case "TIME": {
|
|
4557
|
+
const s = text(v, where);
|
|
4558
|
+
if (s && !TIME_RE.test(s)) throw new InputError(`${where}: TIME は "HH:mm"(${JSON.stringify(s)})`);
|
|
4559
|
+
return s;
|
|
4560
|
+
}
|
|
4561
|
+
case "DATETIME":
|
|
4562
|
+
case "CREATED_TIME":
|
|
4563
|
+
case "UPDATED_TIME": {
|
|
4564
|
+
const s = text(v, where);
|
|
4565
|
+
if (s && !DATETIME_RE.test(s)) throw new InputError(`${where}: ${prop.type} は "YYYY-MM-DDTHH:mm:ssZ"(${JSON.stringify(s)})`);
|
|
4566
|
+
return s;
|
|
4567
|
+
}
|
|
4568
|
+
case "DROP_DOWN":
|
|
4569
|
+
case "RADIO_BUTTON": {
|
|
4570
|
+
const s = text(v, where);
|
|
4571
|
+
if (s && options && !(s in options)) throw new InputError(`${where}: 選択肢に無い値 ${JSON.stringify(s)}(${Object.keys(options).join(" / ")})`);
|
|
4572
|
+
return s;
|
|
4573
|
+
}
|
|
4574
|
+
case "CHECK_BOX":
|
|
4575
|
+
case "MULTI_SELECT":
|
|
4576
|
+
return stringList(v, where, options);
|
|
4577
|
+
case "CATEGORY":
|
|
4578
|
+
return stringList(v, where, void 0);
|
|
4579
|
+
case "USER_SELECT":
|
|
4580
|
+
case "STATUS_ASSIGNEE":
|
|
4581
|
+
return codeList(v, where, "user", users);
|
|
4582
|
+
case "ORGANIZATION_SELECT":
|
|
4583
|
+
return codeList(v, where, "org", users);
|
|
4584
|
+
case "GROUP_SELECT":
|
|
4585
|
+
return codeList(v, where, "group", users);
|
|
4586
|
+
case "CREATOR":
|
|
4587
|
+
case "MODIFIER": {
|
|
4588
|
+
const one = codeList(v, where, "user", users);
|
|
4589
|
+
if (one.length !== 1) throw new InputError(`${where}: ${prop.type} はユーザーのコード 1 つ`);
|
|
4590
|
+
return one[0];
|
|
4591
|
+
}
|
|
4592
|
+
case "FILE": {
|
|
4593
|
+
if (isEmpty(v)) return [];
|
|
4594
|
+
const list = Array.isArray(v) ? v : [v];
|
|
4595
|
+
return list.map((e, i) => {
|
|
4596
|
+
const name = typeof e === "string" ? e : e && typeof e === "object" && typeof e.name === "string" ? e.name : void 0;
|
|
4597
|
+
if (name === void 0 || !name.trim() || [...name].length > 255) throw new InputError(`${where}[${i}]: ファイルは名前(文字列)か { name, size? }`);
|
|
4598
|
+
const size = e && typeof e === "object" && e.size !== void 0 ? String(e.size) : "0";
|
|
4599
|
+
return { contentType: "application/octet-stream", fileKey: "", name, size };
|
|
4600
|
+
});
|
|
4601
|
+
}
|
|
4602
|
+
case "SUBTABLE":
|
|
4603
|
+
throw new InputError(`${where}: テーブルは行の配列([{ 子のコード: 値, … }])`);
|
|
4604
|
+
default:
|
|
4605
|
+
if (NO_VALUE_TYPES.has(prop.type)) throw new InputError(`${where}: ${prop.type} は値を持たない`);
|
|
4606
|
+
throw new InputError(`${where}: 型 ${prop.type} の値は書けない`);
|
|
4607
|
+
}
|
|
4608
|
+
}
|
|
4609
|
+
function applyData(fields, base, data, where, users) {
|
|
4610
|
+
if (!data || typeof data !== "object" || Array.isArray(data)) throw new InputError(`${where}: レコードはオブジェクト({ 項目コード: 値, … })`);
|
|
4611
|
+
const rec = fillMissing(fields, base);
|
|
4612
|
+
const children = /* @__PURE__ */ new Map();
|
|
4613
|
+
for (const p of Object.values(fields.properties)) for (const c of Object.values(p.fields ?? {})) children.set(c.code, p.code);
|
|
4614
|
+
for (const [code, v] of Object.entries(data)) {
|
|
4615
|
+
const w = `${where}.${code}`;
|
|
4616
|
+
const prop = fields.properties[code];
|
|
4617
|
+
if (!prop) {
|
|
4618
|
+
if (children.has(code)) throw new InputError(`${w}: テーブルの子はテーブルの行の中に書く(${children.get(code)}: [{ ${code}: … }])`);
|
|
4619
|
+
throw new InputError(`${w}: 無い項目(標本に無ければ fields で足す。項目の一覧は describe)`);
|
|
4620
|
+
}
|
|
4621
|
+
if (NO_VALUE_TYPES.has(prop.type)) throw new InputError(`${w}: ${prop.type} は値を持たない`);
|
|
4622
|
+
if (prop.type === "SUBTABLE") {
|
|
4623
|
+
if (isEmpty(v)) {
|
|
4624
|
+
rec[code] = { type: "SUBTABLE", value: [] };
|
|
4625
|
+
continue;
|
|
4626
|
+
}
|
|
4627
|
+
if (!Array.isArray(v)) throw new InputError(`${w}: テーブルは行の配列([{ 子のコード: 値, … }])`);
|
|
4628
|
+
if (v.length > TRY_MAX_TABLE_ROWS) throw new InputError(`${w}: テーブルの行は ${TRY_MAX_TABLE_ROWS} 行まで`);
|
|
4629
|
+
const kids = prop.fields ?? {};
|
|
4630
|
+
const rows = v.map((row, i) => {
|
|
4631
|
+
const rw = `${w}[${i}]`;
|
|
4632
|
+
if (!row || typeof row !== "object" || Array.isArray(row)) throw new InputError(`${rw}: 行はオブジェクト({ 子のコード: 値, … })`);
|
|
4633
|
+
const value = {};
|
|
4634
|
+
for (const c of Object.values(kids)) value[c.code] = { type: c.type, value: emptyValueOf(c.type) };
|
|
4635
|
+
for (const [cc, cv] of Object.entries(row)) {
|
|
4636
|
+
const child = kids[cc];
|
|
4637
|
+
if (!child) throw new InputError(`${rw}.${cc}: テーブル ${code} に無い子(${Object.keys(kids).join(", ")})`);
|
|
4638
|
+
value[cc] = { type: child.type, value: convertValue(child, cv, `${rw}.${cc}`, users) };
|
|
4639
|
+
}
|
|
4640
|
+
return { id: String(i + 1), value };
|
|
4641
|
+
});
|
|
4642
|
+
rec[code] = { type: "SUBTABLE", value: rows };
|
|
4643
|
+
continue;
|
|
4644
|
+
}
|
|
4645
|
+
rec[code] = { type: prop.type, value: convertValue(prop, v, w, users) };
|
|
4646
|
+
}
|
|
4647
|
+
return rec;
|
|
4648
|
+
}
|
|
4649
|
+
function checkDataList(data) {
|
|
4650
|
+
if (!Array.isArray(data)) throw new InputError("data はレコード({ 項目コード: 値 })の配列");
|
|
4651
|
+
if (!data.length) throw new InputError("data が空");
|
|
4652
|
+
if (data.length > TRY_MAX_DATA) throw new InputError(`data は ${TRY_MAX_DATA} 件まで`);
|
|
4653
|
+
const bytes = Buffer.byteLength(JSON.stringify(data), "utf8");
|
|
4654
|
+
if (bytes > 64 * 1024) throw new InputError(`data が大きすぎる(${bytes.toLocaleString()} バイト。64 KiB まで)`);
|
|
4655
|
+
return data;
|
|
4656
|
+
}
|
|
4657
|
+
|
|
4658
|
+
// src/commands/try.ts
|
|
4659
|
+
var TRY_MAX_FORMULAS = 10;
|
|
4660
|
+
var TRY_MAX_FORMULA_CHARS = 4e3;
|
|
4661
|
+
var TRY_DEFAULT_AS = "TEXT";
|
|
4662
|
+
var TRY_OWN_RULES = /* @__PURE__ */ new Set(["misc.changed", "fieldno.screen", "size.bytes", "schema.derived"]);
|
|
4663
|
+
var isTable2 = (v) => Array.isArray(v) && v.every((r) => r && typeof r === "object" && "value" in r);
|
|
4664
|
+
function resolveTryTarget(fields, targetTypes, as, table, referenced = /* @__PURE__ */ new Set()) {
|
|
4665
|
+
const props = fields.properties;
|
|
4666
|
+
const tables = Object.values(props).filter((p) => p.type === "SUBTABLE").map((p) => p.code).sort();
|
|
4667
|
+
const want = (as ?? TRY_DEFAULT_AS).trim();
|
|
4668
|
+
if (!want) throw new InputError("as が空(型 NUMBER / TEXT / DATE … か項目コード)");
|
|
4669
|
+
const upper = want.toUpperCase();
|
|
4670
|
+
const type = TYPE_ALIASES[upper] ?? (targetTypes.has(upper) ? upper : void 0);
|
|
4671
|
+
let scope = props;
|
|
4672
|
+
let tableCode;
|
|
4673
|
+
if (table !== void 0) {
|
|
4674
|
+
const t = props[table];
|
|
4675
|
+
if (!t || t.type !== "SUBTABLE") throw new InputError(`table ${JSON.stringify(table)} はサンプルアプリのテーブルでない(${tables.join(" / ")})`);
|
|
4676
|
+
scope = t.fields ?? {};
|
|
4677
|
+
tableCode = table;
|
|
4678
|
+
}
|
|
4679
|
+
const byCode = (code, p, inTable) => {
|
|
4680
|
+
if (!targetTypes.has(p.type)) throw new InputError(`${code} の型 ${p.type} には計算式を設定できない(使える型: ${[...targetTypes].join(", ")})`);
|
|
4681
|
+
return { code, type: p.type, ...inTable ? { table: inTable } : {} };
|
|
4682
|
+
};
|
|
4683
|
+
if (Object.prototype.hasOwnProperty.call(scope, want)) return byCode(want, scope[want], tableCode);
|
|
4684
|
+
if (tableCode === void 0) {
|
|
4685
|
+
for (const t of tables) {
|
|
4686
|
+
const child = props[t].fields?.[want];
|
|
4687
|
+
if (child) return byCode(want, child, t);
|
|
4688
|
+
}
|
|
4689
|
+
}
|
|
4690
|
+
if (!type) {
|
|
4691
|
+
const all = /* @__PURE__ */ new Set();
|
|
4692
|
+
for (const p of Object.values(props)) {
|
|
4693
|
+
all.add(p.type);
|
|
4694
|
+
for (const c of Object.values(p.fields ?? {})) all.add(c.type);
|
|
4695
|
+
}
|
|
4696
|
+
if (all.has(upper)) throw new InputError(`${upper} の項目には計算式を設定できない(使える型: ${[...targetTypes].join(", ")})`);
|
|
4697
|
+
throw new InputError(`as ${JSON.stringify(want)} は型でも項目コードでもない(型: ${[...targetTypes].join(", ")}。項目は try --describe / fml_try の describe で)`);
|
|
4698
|
+
}
|
|
4699
|
+
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));
|
|
4700
|
+
if (!candidates.length) throw new InputError(`${tableCode ? `テーブル ${tableCode} の中` : "サンプルアプリ"}に ${type} の項目が無い`);
|
|
4701
|
+
const free = candidates.find((p) => !referenced.has(p.code)) ?? candidates[0];
|
|
4702
|
+
return { code: free.code, type, ...tableCode ? { table: tableCode } : {} };
|
|
4703
|
+
}
|
|
4704
|
+
function buildTryEnvelope(engine, fields, code, formula, lang) {
|
|
4705
|
+
const api = engine.api;
|
|
4706
|
+
const source = api.defaultSource(lang);
|
|
4707
|
+
return {
|
|
4708
|
+
date: "2026-01-15 00:00:00",
|
|
4709
|
+
pluginName: "計算式プラグイン",
|
|
4710
|
+
pluginID: api.pluginId,
|
|
4711
|
+
PluginVersion: engine.source.pluginVersion,
|
|
4712
|
+
appId: fields.appId,
|
|
4713
|
+
appName: fields.appName,
|
|
4714
|
+
...source,
|
|
4715
|
+
toolEnable: true,
|
|
4716
|
+
pluginMiscInfo: { ...source.pluginMiscInfo, circular_refer: true },
|
|
4717
|
+
pluginInfos: [{ fieldcode: code, state: true, formulaSet: formula, edit: false, hide: false, rank: "" }]
|
|
4718
|
+
};
|
|
4719
|
+
}
|
|
4720
|
+
function plain(v) {
|
|
4721
|
+
try {
|
|
4722
|
+
const s = JSON.stringify(v);
|
|
4723
|
+
return s === void 0 ? v === void 0 ? null : String(v) : JSON.parse(s);
|
|
4724
|
+
} catch {
|
|
4725
|
+
return String(v);
|
|
4726
|
+
}
|
|
4727
|
+
}
|
|
4728
|
+
function rawValueOf(engine, pp, record, formula, target, evType, event) {
|
|
4729
|
+
const api = engine.api;
|
|
4730
|
+
const run = (kf2) => {
|
|
4731
|
+
try {
|
|
4732
|
+
return plain(quiet(() => kf2.dq(formula)));
|
|
4733
|
+
} catch {
|
|
4734
|
+
return null;
|
|
4735
|
+
}
|
|
4736
|
+
};
|
|
4737
|
+
const kf = api.createRunner(pp, record, evType ?? "allUpdate", event);
|
|
4738
|
+
if (!target.table) {
|
|
4739
|
+
kf.initTableInfo("");
|
|
4740
|
+
return run(kf);
|
|
4741
|
+
}
|
|
4742
|
+
const rows = record[target.table];
|
|
4743
|
+
const list = Array.isArray(rows?.value) ? rows.value : [];
|
|
4744
|
+
kf.initTableInfo(target.table);
|
|
4745
|
+
return list.map((_r, i) => {
|
|
4746
|
+
kf.currRow(i);
|
|
4747
|
+
return run(kf);
|
|
4748
|
+
});
|
|
4749
|
+
}
|
|
4750
|
+
var short2 = (v) => {
|
|
4751
|
+
const s = JSON.stringify(v);
|
|
4752
|
+
return s === void 0 ? "undefined" : [...s].length > 200 ? [...s].slice(0, 200).join("") + "…" : s;
|
|
4753
|
+
};
|
|
4754
|
+
async function trySettings(input) {
|
|
4755
|
+
const { engine } = input;
|
|
4756
|
+
const api = engine.api;
|
|
4757
|
+
const lang = input.lang ?? "ja";
|
|
4758
|
+
if (!Array.isArray(input.formulas) || !input.formulas.length) throw new InputError("式が無い(formulas)");
|
|
4759
|
+
if (input.formulas.length > TRY_MAX_FORMULAS) throw new InputError(`式は 1 回 ${TRY_MAX_FORMULAS} 個まで(${input.formulas.length})`);
|
|
4760
|
+
const app = sampleApp();
|
|
4761
|
+
const source = input.appFields ? "app" : "sample";
|
|
4762
|
+
let fields = input.appFields ? normalizeDefaults(input.appFields) : app.fields;
|
|
4763
|
+
let extraFields = [];
|
|
4764
|
+
if (input.fields !== void 0) {
|
|
4765
|
+
if (!Array.isArray(input.fields)) throw new InputError("fields は項目({ code, type, options?, table?, fields? })の配列");
|
|
4766
|
+
const ext = extendFields(fields, input.fields);
|
|
4767
|
+
fields = ext.fields;
|
|
4768
|
+
extraFields = ext.added;
|
|
4769
|
+
}
|
|
4770
|
+
const picked = [];
|
|
4771
|
+
if (input.appFields) {
|
|
4772
|
+
if (input.records !== void 0) throw new InputError("appFields(利用者のアプリの項目定義)のときは標本のレコード(records)は使えない(data で架空の値を書く)");
|
|
4773
|
+
if (input.data === void 0) throw new InputError("appFields(利用者のアプリの項目定義)には data(架空の値のレコード)が要る");
|
|
4774
|
+
} else {
|
|
4775
|
+
const ids2 = input.records === void 0 ? input.data === void 0 ? app.records.map((r) => r.id) : [] : [...new Set(input.records)];
|
|
4776
|
+
if (!ids2.length && input.data === void 0) throw new InputError("records が空(1〜3)");
|
|
4777
|
+
for (const id of ids2) if (!app.records.some((r) => r.id === id)) throw new InputError(`records は 1〜${app.records.length}(${id})`);
|
|
4778
|
+
for (const id of ids2) {
|
|
4779
|
+
const r = app.records.find((x) => x.id === id);
|
|
4780
|
+
picked.push({ id: String(id), label: r.label, record: extraFields.length ? fillMissing(fields, r.record) : r.record });
|
|
4781
|
+
}
|
|
4782
|
+
}
|
|
4783
|
+
if (input.data !== void 0) {
|
|
4784
|
+
const list = checkDataList(input.data);
|
|
4785
|
+
let base;
|
|
4786
|
+
if (input.appFields) base = emptyRecordOf(fields, "0");
|
|
4787
|
+
else {
|
|
4788
|
+
const b = input.base ?? 3;
|
|
4789
|
+
const br = app.records.find((x) => x.id === b);
|
|
4790
|
+
if (!br) throw new InputError(`base は標本のレコードの番号(1〜${app.records.length}): ${b}`);
|
|
4791
|
+
base = br.record;
|
|
4792
|
+
}
|
|
4793
|
+
list.forEach((d, i) => {
|
|
4794
|
+
const id = `d${i + 1}`;
|
|
4795
|
+
const rec = applyData(fields, base, d, `data[${i}]`, input.usersInfo);
|
|
4796
|
+
rec.$id = { type: "__ID__", value: String(100 + i + 1) };
|
|
4797
|
+
if (fields.properties["レコード番号"]?.type === "RECORD_NUMBER" && input.appFields) rec["レコード番号"] = { type: "RECORD_NUMBER", value: String(100 + i + 1) };
|
|
4798
|
+
picked.push({ id, label: `架空の値(${Object.keys(d).join(", ") || "空"})`, record: rec });
|
|
4799
|
+
});
|
|
4800
|
+
}
|
|
4801
|
+
if (!picked.length) throw new InputError("計算するレコードが無い(records か data)");
|
|
4802
|
+
const targetTypes = new Set(api.TARGET_TYPES);
|
|
4803
|
+
const policy = { ...input.policy ?? DEFAULT_POLICY, allowMiscChanges: true };
|
|
4804
|
+
let contextLine = "";
|
|
4805
|
+
let calcNotice = "";
|
|
4806
|
+
const results = [];
|
|
4807
|
+
for (let i = 0; i < input.formulas.length; i++) {
|
|
4808
|
+
const f = input.formulas[i];
|
|
4809
|
+
const where = `try[${i + 1}]`;
|
|
4810
|
+
const res = { index: i + 1, formula: typeof f?.formula === "string" ? f.formula : "", status: "ok", findings: [], values: [], marks: [] };
|
|
4811
|
+
results.push(res);
|
|
4812
|
+
const fail = (rule, message) => {
|
|
4813
|
+
res.status = "invalid";
|
|
4814
|
+
res.findings.push({ level: "error", rule, where, message });
|
|
4815
|
+
};
|
|
4816
|
+
if (!f || typeof f.formula !== "string" || !f.formula.trim()) {
|
|
4817
|
+
fail("try.formula", "式が空");
|
|
4818
|
+
continue;
|
|
4819
|
+
}
|
|
4820
|
+
if ([...f.formula].length > TRY_MAX_FORMULA_CHARS) {
|
|
4821
|
+
fail("try.formula", `式が長すぎる(${TRY_MAX_FORMULA_CHARS} 文字まで)`);
|
|
4822
|
+
continue;
|
|
4823
|
+
}
|
|
4824
|
+
let target;
|
|
4825
|
+
const referenced = scanFormula(api.stripFormula(f.formula)).identifiers;
|
|
4826
|
+
try {
|
|
4827
|
+
target = resolveTryTarget(fields, targetTypes, f.as, f.table, referenced);
|
|
4828
|
+
} catch (e) {
|
|
4829
|
+
if (e instanceof InputError) {
|
|
4830
|
+
fail("try.target", e.message);
|
|
4831
|
+
continue;
|
|
4832
|
+
}
|
|
4833
|
+
throw e;
|
|
4834
|
+
}
|
|
4835
|
+
res.target = target;
|
|
4836
|
+
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 で式が使わない項目を選ぶ)` });
|
|
4837
|
+
const envelope = buildTryEnvelope(engine, fields, target.code, f.formula, lang);
|
|
4838
|
+
const n = await normalizeSettings({
|
|
4839
|
+
settingsText: JSON.stringify(envelope),
|
|
4840
|
+
settingsFile: where,
|
|
4841
|
+
fields,
|
|
4842
|
+
engine,
|
|
4843
|
+
policy,
|
|
4844
|
+
lang,
|
|
4845
|
+
usersInfo: input.usersInfo,
|
|
4846
|
+
usersLabel: input.usersLabel,
|
|
4847
|
+
usersOrigin: input.usersOrigin.kind === "none" ? void 0 : input.usersOrigin
|
|
4848
|
+
});
|
|
4849
|
+
res.findings.push(...n.findings.items.filter((x) => !TRY_OWN_RULES.has(x.rule)));
|
|
4850
|
+
if (n.findings.hasErrors || !n.saved) {
|
|
4851
|
+
res.status = "invalid";
|
|
4852
|
+
continue;
|
|
4853
|
+
}
|
|
4854
|
+
const stripped = String(n.saved.pluginFields[0]?.formula ?? "");
|
|
4855
|
+
const records = picked.map((r) => ({ id: r.id, record: structuredClone(r.record), fileAppId: fields.appId }));
|
|
4856
|
+
let c;
|
|
4857
|
+
try {
|
|
4858
|
+
c = calcSettings({
|
|
4859
|
+
normalized: n,
|
|
4860
|
+
engine,
|
|
4861
|
+
fields,
|
|
4862
|
+
appId: fields.appId,
|
|
4863
|
+
records,
|
|
4864
|
+
evType: input.evType,
|
|
4865
|
+
event: input.event,
|
|
4866
|
+
mobile: input.mobile,
|
|
4867
|
+
user: input.user,
|
|
4868
|
+
usersInfo: input.usersInfo,
|
|
4869
|
+
usersOrigin: input.usersOrigin,
|
|
4870
|
+
allowDefaultBaseUrl: true
|
|
4871
|
+
});
|
|
4872
|
+
} catch (e) {
|
|
4873
|
+
if (e instanceof InputError) {
|
|
4874
|
+
fail("calc.context", e.message);
|
|
4875
|
+
continue;
|
|
4876
|
+
}
|
|
4877
|
+
throw e;
|
|
4878
|
+
}
|
|
4879
|
+
contextLine ||= c.contextLine;
|
|
4880
|
+
calcNotice ||= c.notice;
|
|
4881
|
+
const lineCode = target.table ?? target.code;
|
|
4882
|
+
for (const r of c.records) {
|
|
4883
|
+
const line = r.lines.find((l) => l.fieldcode === lineCode);
|
|
4884
|
+
let value = line?.after;
|
|
4885
|
+
if (target.table && isTable2(value)) value = value.map((row) => row.value?.[target.code]?.value);
|
|
4886
|
+
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}`);
|
|
4887
|
+
const v = { record: r.id, value, ...errs.length ? { error: errs.join(" / ") } : {}, ...r.failed ? { failed: true } : {} };
|
|
4888
|
+
if (!r.failed && !errs.length) {
|
|
4889
|
+
const src = picked.find((p) => p.id === r.id);
|
|
4890
|
+
engine.clearSinkCalls();
|
|
4891
|
+
const raw = src ? rawValueOf(engine, n.saved.pluginPP, structuredClone(src.record), stripped, target, input.evType, input.event) : void 0;
|
|
4892
|
+
if (engine.sinkCalls().length) {
|
|
4893
|
+
v.failed = true;
|
|
4894
|
+
v.error = `実行時の sink が呼ばれた(生の値の評価): ${engine.sinkCalls().map((s) => `${s.sink} ${s.detail}`.trim()).join(", ")}`;
|
|
4895
|
+
} else if (raw !== void 0 && JSON.stringify(raw) !== JSON.stringify(value)) v.raw = raw;
|
|
4896
|
+
engine.clearSinkCalls();
|
|
4897
|
+
}
|
|
4898
|
+
res.values.push(v);
|
|
4899
|
+
if (line) res.marks = line.marks;
|
|
4900
|
+
if (v.failed) res.status = "failed";
|
|
4901
|
+
}
|
|
4902
|
+
}
|
|
4903
|
+
const okCount = results.filter((r) => r.status === "ok").length;
|
|
4904
|
+
const ids = picked.map((r) => r.id);
|
|
4905
|
+
const appLabel = source === "sample" ? `サンプルアプリ「${fields.appName}」` : `アプリ ${fields.appId}「${fields.appName}」の項目定義(値は架空)`;
|
|
4906
|
+
const summary = `試し計算 ${results.length} 式: ok ${okCount}${results.length - okCount ? `、エラー ${results.length - okCount}` : ""}(${appLabel}、レコード ${ids.join(", ")})`;
|
|
4907
|
+
if (!contextLine) contextLine = `文脈: アプリ ${fields.appId}(計算していない式だけ)`;
|
|
4908
|
+
const notice = `${source === "sample" ? "サンプルアプリ(架空)での模擬。利用者のアプリ・レコードは使っていない" : "利用者のアプリの項目定義に架空の値を当てた模擬。レコードは更新していない"}${calcNotice ? `。${calcNotice}` : ""}`;
|
|
4909
|
+
const text2 = [summary, notice, contextLine];
|
|
4910
|
+
if (extraFields.length) text2.push(`足した項目(架空): ${extraFields.join("、")}`);
|
|
4911
|
+
for (const r of picked) if (r.id.startsWith("d")) text2.push(`レコード ${r.id}: ${r.label}`);
|
|
4912
|
+
for (const r of results) {
|
|
4913
|
+
const head = r.target ? `${r.target.code}(${r.target.type}${r.target.table ? `。${r.target.table} の中` : ""})← ` : "";
|
|
4914
|
+
text2.push(`[${r.index}] ${head}${r.formula.replace(/\s*\n\s*/g, " ")}`);
|
|
4915
|
+
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)" : ""}`);
|
|
4916
|
+
if (r.marks.length) text2.push(` 印: ${r.marks.join("、")}`);
|
|
4917
|
+
for (const f of r.findings) if (f.level !== "info") text2.push(` ${f.level === "error" ? "エラー" : "警告"} ${f.rule}: ${f.message}`);
|
|
4918
|
+
}
|
|
4919
|
+
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") };
|
|
1266
4920
|
}
|
|
1267
4921
|
|
|
1268
4922
|
// src/worker/eval-run.ts
|
|
@@ -1287,6 +4941,31 @@ async function runEvalJob(job) {
|
|
|
1287
4941
|
if (job.baseUrl) engine.setContext({ baseUrl: job.baseUrl });
|
|
1288
4942
|
const usersInfo = buildUsersInfo(job.usersSource);
|
|
1289
4943
|
const usersLabel = job.usersOrigin.kind === "file" ? job.usersOrigin.file : "既定のテストデータ(架空)";
|
|
4944
|
+
if (job.kind === "try") {
|
|
4945
|
+
if (!job.try) throw new InputError("try の仕事に式が無い(try.formulas)");
|
|
4946
|
+
const t = job.try;
|
|
4947
|
+
const r = await trySettings({
|
|
4948
|
+
engine,
|
|
4949
|
+
formulas: t.formulas,
|
|
4950
|
+
records: t.records,
|
|
4951
|
+
fields: t.fields,
|
|
4952
|
+
data: t.data,
|
|
4953
|
+
base: t.base,
|
|
4954
|
+
appFields: t.appFields,
|
|
4955
|
+
evType: t.evType,
|
|
4956
|
+
event: t.event,
|
|
4957
|
+
mobile: t.mobile,
|
|
4958
|
+
user: t.user,
|
|
4959
|
+
usersInfo,
|
|
4960
|
+
usersOrigin: job.usersOrigin,
|
|
4961
|
+
usersLabel,
|
|
4962
|
+
policy: job.policy,
|
|
4963
|
+
lang: job.lang
|
|
4964
|
+
});
|
|
4965
|
+
const warnings = r.results.reduce((n, x) => n + x.findings.filter((f) => f.level === "warning").length, 0);
|
|
4966
|
+
return { normalize: { summary: r.summary, hasErrors: r.results.some((x) => x.status !== "ok"), warnings, findings: [] }, try: r, engineWarnings: [...engine.warnings] };
|
|
4967
|
+
}
|
|
4968
|
+
if (job.settingsText === void 0 || job.settingsFile === void 0 || !job.fields) throw new InputError(`${job.kind} の仕事に設定か項目定義が無い(settingsText / settingsFile / fields)`);
|
|
1290
4969
|
const res = await normalizeSettings({
|
|
1291
4970
|
settingsText: job.settingsText,
|
|
1292
4971
|
settingsFile: job.settingsFile,
|