@objectstack/platform-objects 14.6.0 → 14.8.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.
@@ -22,7 +22,7 @@ var SysOrganizationDetailPage = {
22
22
  position: "top",
23
23
  items: [
24
24
  {
25
- label: "Members",
25
+ label: { en: "Members", "zh-CN": "\u6210\u5458", "ja-JP": "\u30E1\u30F3\u30D0\u30FC", "es-ES": "Miembros" },
26
26
  icon: "users",
27
27
  children: [
28
28
  {
@@ -34,13 +34,13 @@ var SysOrganizationDetailPage = {
34
34
  sort: [{ field: "created_at", order: "desc" }],
35
35
  limit: 25,
36
36
  showViewAll: true,
37
- title: "Members"
37
+ title: { en: "Members", "zh-CN": "\u6210\u5458", "ja-JP": "\u30E1\u30F3\u30D0\u30FC", "es-ES": "Miembros" }
38
38
  }
39
39
  }
40
40
  ]
41
41
  },
42
42
  {
43
- label: "Invitations",
43
+ label: { en: "Invitations", "zh-CN": "\u9080\u8BF7", "ja-JP": "\u62DB\u5F85", "es-ES": "Invitaciones" },
44
44
  icon: "mail",
45
45
  children: [
46
46
  {
@@ -52,13 +52,13 @@ var SysOrganizationDetailPage = {
52
52
  sort: [{ field: "created_at", order: "desc" }],
53
53
  limit: 25,
54
54
  showViewAll: true,
55
- title: "Invitations"
55
+ title: { en: "Invitations", "zh-CN": "\u9080\u8BF7", "ja-JP": "\u62DB\u5F85", "es-ES": "Invitaciones" }
56
56
  }
57
57
  }
58
58
  ]
59
59
  },
60
60
  {
61
- label: "Teams",
61
+ label: { en: "Teams", "zh-CN": "\u56E2\u961F", "ja-JP": "\u30C1\u30FC\u30E0", "es-ES": "Equipos" },
62
62
  icon: "users-round",
63
63
  children: [
64
64
  {
@@ -70,7 +70,7 @@ var SysOrganizationDetailPage = {
70
70
  sort: [{ field: "name", order: "asc" }],
71
71
  limit: 25,
72
72
  showViewAll: true,
73
- title: "Teams"
73
+ title: { en: "Teams", "zh-CN": "\u56E2\u961F", "ja-JP": "\u30C1\u30FC\u30E0", "es-ES": "Equipos" }
74
74
  }
75
75
  }
76
76
  ]
@@ -103,13 +103,30 @@ var SysUserDetailPage = {
103
103
  properties: {
104
104
  severity: "warning",
105
105
  icon: "mail",
106
- title: "\u90AE\u7BB1\u672A\u9A8C\u8BC1",
107
- body: "\u9A8C\u8BC1\u4F60\u7684\u90AE\u7BB1\u4EE5\u63A5\u6536\u5BC6\u7801\u91CD\u7F6E\u548C\u91CD\u8981\u7684\u7CFB\u7EDF\u901A\u77E5\u3002",
106
+ // Inline-i18n object labels: the renderer resolves them with
107
+ // pickLocalized (exact → base → default → en → first).
108
+ title: {
109
+ en: "Email not verified",
110
+ "zh-CN": "\u90AE\u7BB1\u672A\u9A8C\u8BC1",
111
+ "ja-JP": "\u30E1\u30FC\u30EB\u304C\u672A\u8A8D\u8A3C\u3067\u3059",
112
+ "es-ES": "Correo no verificado"
113
+ },
114
+ body: {
115
+ en: "Verify your email to receive password resets and important system notifications.",
116
+ "zh-CN": "\u9A8C\u8BC1\u4F60\u7684\u90AE\u7BB1\u4EE5\u63A5\u6536\u5BC6\u7801\u91CD\u7F6E\u548C\u91CD\u8981\u7684\u7CFB\u7EDF\u901A\u77E5\u3002",
117
+ "ja-JP": "\u30D1\u30B9\u30EF\u30FC\u30C9\u30EA\u30BB\u30C3\u30C8\u3084\u91CD\u8981\u306A\u30B7\u30B9\u30C6\u30E0\u901A\u77E5\u3092\u53D7\u3051\u53D6\u308B\u306B\u306F\u3001\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u8A8D\u8A3C\u3057\u3066\u304F\u3060\u3055\u3044\u3002",
118
+ "es-ES": "Verifica tu correo para recibir restablecimientos de contrase\xF1a y notificaciones importantes del sistema."
119
+ },
108
120
  visible: "record.id == ctx.user.id && record.email_verified == false",
109
121
  dismissible: false,
110
122
  action: {
111
123
  actionName: "resend_verification_email",
112
- label: "\u91CD\u65B0\u53D1\u9001\u9A8C\u8BC1\u90AE\u4EF6"
124
+ label: {
125
+ en: "Resend verification email",
126
+ "zh-CN": "\u91CD\u65B0\u53D1\u9001\u9A8C\u8BC1\u90AE\u4EF6",
127
+ "ja-JP": "\u8A8D\u8A3C\u30E1\u30FC\u30EB\u3092\u518D\u9001\u4FE1",
128
+ "es-ES": "Reenviar correo de verificaci\xF3n"
129
+ }
113
130
  }
114
131
  }
115
132
  }
@@ -138,11 +155,11 @@ var SysUserDetailPage = {
138
155
  ],
139
156
  sections: [
140
157
  {
141
- label: "Identity",
158
+ label: { en: "Identity", "zh-CN": "\u8EAB\u4EFD", "ja-JP": "\u30A2\u30A4\u30C7\u30F3\u30C6\u30A3\u30C6\u30A3", "es-ES": "Identidad" },
142
159
  fields: ["name", "image"]
143
160
  },
144
161
  {
145
- label: "Audit",
162
+ label: { en: "Audit", "zh-CN": "\u5BA1\u8BA1", "ja-JP": "\u76E3\u67FB", "es-ES": "Auditor\xEDa" },
146
163
  fields: ["created_at", "updated_at"]
147
164
  }
148
165
  ]
@@ -160,7 +177,7 @@ var SysUserDetailPage = {
160
177
  position: "top",
161
178
  items: [
162
179
  {
163
- label: "Positions",
180
+ label: { en: "Positions", "zh-CN": "\u5C97\u4F4D", "ja-JP": "\u30DD\u30B8\u30B7\u30E7\u30F3", "es-ES": "Puestos" },
164
181
  icon: "shield-check",
165
182
  children: [
166
183
  {
@@ -177,7 +194,7 @@ var SysUserDetailPage = {
177
194
  sort: [{ field: "created_at", order: "desc" }],
178
195
  limit: 25,
179
196
  showViewAll: true,
180
- title: "Positions",
197
+ title: { en: "Positions", "zh-CN": "\u5C97\u4F4D", "ja-JP": "\u30DD\u30B8\u30B7\u30E7\u30F3", "es-ES": "Puestos" },
181
198
  add: {
182
199
  picker: {
183
200
  object: "sys_position",
@@ -185,14 +202,19 @@ var SysUserDetailPage = {
185
202
  labelField: "label"
186
203
  },
187
204
  linkField: "position",
188
- label: "Assign position"
205
+ label: {
206
+ en: "Assign position",
207
+ "zh-CN": "\u5206\u914D\u5C97\u4F4D",
208
+ "ja-JP": "\u30DD\u30B8\u30B7\u30E7\u30F3\u3092\u5272\u308A\u5F53\u3066",
209
+ "es-ES": "Asignar puesto"
210
+ }
189
211
  }
190
212
  }
191
213
  }
192
214
  ]
193
215
  },
194
216
  {
195
- label: "Sessions",
217
+ label: { en: "Sessions", "zh-CN": "\u4F1A\u8BDD", "ja-JP": "\u30BB\u30C3\u30B7\u30E7\u30F3", "es-ES": "Sesiones" },
196
218
  icon: "monitor",
197
219
  children: [
198
220
  {
@@ -204,13 +226,13 @@ var SysUserDetailPage = {
204
226
  sort: [{ field: "created_at", order: "desc" }],
205
227
  limit: 25,
206
228
  showViewAll: true,
207
- title: "Sessions"
229
+ title: { en: "Sessions", "zh-CN": "\u4F1A\u8BDD", "ja-JP": "\u30BB\u30C3\u30B7\u30E7\u30F3", "es-ES": "Sesiones" }
208
230
  }
209
231
  }
210
232
  ]
211
233
  },
212
234
  {
213
- label: "Linked Accounts",
235
+ label: { en: "Linked Accounts", "zh-CN": "\u5173\u8054\u8D26\u53F7", "ja-JP": "\u9023\u643A\u30A2\u30AB\u30A6\u30F3\u30C8", "es-ES": "Cuentas vinculadas" },
214
236
  icon: "link",
215
237
  children: [
216
238
  {
@@ -222,13 +244,13 @@ var SysUserDetailPage = {
222
244
  sort: [{ field: "created_at", order: "desc" }],
223
245
  limit: 25,
224
246
  showViewAll: true,
225
- title: "Linked Accounts"
247
+ title: { en: "Linked Accounts", "zh-CN": "\u5173\u8054\u8D26\u53F7", "ja-JP": "\u9023\u643A\u30A2\u30AB\u30A6\u30F3\u30C8", "es-ES": "Cuentas vinculadas" }
226
248
  }
227
249
  }
228
250
  ]
229
251
  },
230
252
  {
231
- label: "Organizations",
253
+ label: { en: "Organizations", "zh-CN": "\u7EC4\u7EC7", "ja-JP": "\u7D44\u7E54", "es-ES": "Organizaciones" },
232
254
  icon: "building-2",
233
255
  children: [
234
256
  {
@@ -240,13 +262,13 @@ var SysUserDetailPage = {
240
262
  sort: [{ field: "created_at", order: "desc" }],
241
263
  limit: 25,
242
264
  showViewAll: true,
243
- title: "Organizations"
265
+ title: { en: "Organizations", "zh-CN": "\u7EC4\u7EC7", "ja-JP": "\u7D44\u7E54", "es-ES": "Organizaciones" }
244
266
  }
245
267
  }
246
268
  ]
247
269
  },
248
270
  {
249
- label: "OAuth Apps",
271
+ label: { en: "OAuth Apps", "zh-CN": "OAuth \u5E94\u7528", "ja-JP": "OAuth \u30A2\u30D7\u30EA", "es-ES": "Aplicaciones OAuth" },
250
272
  icon: "key-square",
251
273
  children: [
252
274
  {
@@ -258,7 +280,7 @@ var SysUserDetailPage = {
258
280
  sort: [{ field: "created_at", order: "desc" }],
259
281
  limit: 25,
260
282
  showViewAll: true,
261
- title: "OAuth Apps"
283
+ title: { en: "OAuth Apps", "zh-CN": "OAuth \u5E94\u7528", "ja-JP": "OAuth \u30A2\u30D7\u30EA", "es-ES": "Aplicaciones OAuth" }
262
284
  }
263
285
  }
264
286
  ]
@@ -270,21 +292,31 @@ var SysUserDetailPage = {
270
292
  // `location: 'record_section'` so they only render here, not
271
293
  // in the global header row.
272
294
  {
273
- label: "Security",
295
+ label: { en: "Security", "zh-CN": "\u5B89\u5168", "ja-JP": "\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3", "es-ES": "Seguridad" },
274
296
  icon: "shield",
275
297
  children: [
276
298
  {
277
299
  type: "element:text",
278
300
  properties: {
279
301
  variant: "subheading",
280
- content: "Password & Sign-in"
302
+ content: {
303
+ en: "Password & Sign-in",
304
+ "zh-CN": "\u5BC6\u7801\u4E0E\u767B\u5F55",
305
+ "ja-JP": "\u30D1\u30B9\u30EF\u30FC\u30C9\u3068\u30B5\u30A4\u30F3\u30A4\u30F3",
306
+ "es-ES": "Contrase\xF1a e inicio de sesi\xF3n"
307
+ }
281
308
  }
282
309
  },
283
310
  {
284
311
  type: "element:text",
285
312
  properties: {
286
313
  variant: "caption",
287
- content: "Change your password or the email address associated with this account."
314
+ content: {
315
+ en: "Change your password or the email address associated with this account.",
316
+ "zh-CN": "\u4FEE\u6539\u5BC6\u7801\u6216\u6B64\u8D26\u53F7\u7ED1\u5B9A\u7684\u90AE\u7BB1\u5730\u5740\u3002",
317
+ "ja-JP": "\u30D1\u30B9\u30EF\u30FC\u30C9\u3001\u307E\u305F\u306F\u3053\u306E\u30A2\u30AB\u30A6\u30F3\u30C8\u306B\u95A2\u9023\u4ED8\u3051\u3089\u308C\u305F\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u5909\u66F4\u3057\u307E\u3059\u3002",
318
+ "es-ES": "Cambia tu contrase\xF1a o la direcci\xF3n de correo asociada a esta cuenta."
319
+ }
288
320
  }
289
321
  },
290
322
  {
@@ -300,14 +332,24 @@ var SysUserDetailPage = {
300
332
  type: "element:text",
301
333
  properties: {
302
334
  variant: "subheading",
303
- content: "Two-Factor Authentication"
335
+ content: {
336
+ en: "Two-Factor Authentication",
337
+ "zh-CN": "\u4E24\u6B65\u9A8C\u8BC1",
338
+ "ja-JP": "\u4E8C\u8981\u7D20\u8A8D\u8A3C",
339
+ "es-ES": "Autenticaci\xF3n de dos factores"
340
+ }
304
341
  }
305
342
  },
306
343
  {
307
344
  type: "element:text",
308
345
  properties: {
309
346
  variant: "caption",
310
- content: "Add a second layer of security using a TOTP authenticator app. Backup codes let you sign in if you lose your device."
347
+ content: {
348
+ en: "Add a second layer of security using a TOTP authenticator app. Backup codes let you sign in if you lose your device.",
349
+ "zh-CN": "\u4F7F\u7528 TOTP \u9A8C\u8BC1\u5668\u5E94\u7528\u6DFB\u52A0\u7B2C\u4E8C\u5C42\u5B89\u5168\u9632\u62A4\u3002\u5907\u7528\u9A8C\u8BC1\u7801\u53EF\u5728\u8BBE\u5907\u4E22\u5931\u65F6\u7528\u4E8E\u767B\u5F55\u3002",
350
+ "ja-JP": "TOTP \u8A8D\u8A3C\u30A2\u30D7\u30EA\u3067\u30BB\u30AD\u30E5\u30EA\u30C6\u30A3\u3092\u3082\u3046\u4E00\u6BB5\u5F37\u5316\u3057\u307E\u3059\u3002\u30D0\u30C3\u30AF\u30A2\u30C3\u30D7\u30B3\u30FC\u30C9\u304C\u3042\u308C\u3070\u3001\u30C7\u30D0\u30A4\u30B9\u3092\u7D1B\u5931\u3057\u3066\u3082\u30B5\u30A4\u30F3\u30A4\u30F3\u3067\u304D\u307E\u3059\u3002",
351
+ "es-ES": "A\xF1ade una segunda capa de seguridad con una app de autenticaci\xF3n TOTP. Los c\xF3digos de respaldo te permiten iniciar sesi\xF3n si pierdes tu dispositivo."
352
+ }
311
353
  }
312
354
  },
313
355
  {
@@ -323,14 +365,24 @@ var SysUserDetailPage = {
323
365
  type: "element:text",
324
366
  properties: {
325
367
  variant: "subheading",
326
- content: "Email Verification"
368
+ content: {
369
+ en: "Email Verification",
370
+ "zh-CN": "\u90AE\u7BB1\u9A8C\u8BC1",
371
+ "ja-JP": "\u30E1\u30FC\u30EB\u8A8D\u8A3C",
372
+ "es-ES": "Verificaci\xF3n de correo"
373
+ }
327
374
  }
328
375
  },
329
376
  {
330
377
  type: "element:text",
331
378
  properties: {
332
379
  variant: "caption",
333
- content: "Verify your email so password resets and notifications reach you. The button appears only while verification is pending."
380
+ content: {
381
+ en: "Verify your email so password resets and notifications reach you. The button appears only while verification is pending.",
382
+ "zh-CN": "\u9A8C\u8BC1\u4F60\u7684\u90AE\u7BB1,\u4EE5\u4FBF\u63A5\u6536\u5BC6\u7801\u91CD\u7F6E\u548C\u7CFB\u7EDF\u901A\u77E5\u3002\u6309\u94AE\u4EC5\u5728\u90AE\u7BB1\u5F85\u9A8C\u8BC1\u65F6\u663E\u793A\u3002",
383
+ "ja-JP": "\u30D1\u30B9\u30EF\u30FC\u30C9\u30EA\u30BB\u30C3\u30C8\u3084\u901A\u77E5\u3092\u53D7\u3051\u53D6\u308C\u308B\u3088\u3046\u3001\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092\u8A8D\u8A3C\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30DC\u30BF\u30F3\u306F\u672A\u8A8D\u8A3C\u306E\u9593\u306E\u307F\u8868\u793A\u3055\u308C\u307E\u3059\u3002",
384
+ "es-ES": "Verifica tu correo para recibir restablecimientos de contrase\xF1a y notificaciones. El bot\xF3n solo aparece mientras la verificaci\xF3n est\xE1 pendiente."
385
+ }
334
386
  }
335
387
  },
336
388
  {
@@ -346,7 +398,12 @@ var SysUserDetailPage = {
346
398
  type: "element:text",
347
399
  properties: {
348
400
  variant: "subheading",
349
- content: "Danger Zone"
401
+ content: {
402
+ en: "Danger Zone",
403
+ "zh-CN": "\u5371\u9669\u64CD\u4F5C",
404
+ "ja-JP": "\u5371\u967A\u306A\u64CD\u4F5C",
405
+ "es-ES": "Zona de peligro"
406
+ }
350
407
  },
351
408
  className: "text-destructive"
352
409
  },
@@ -354,7 +411,12 @@ var SysUserDetailPage = {
354
411
  type: "element:text",
355
412
  properties: {
356
413
  variant: "caption",
357
- content: "Permanent. Once deleted, your account cannot be recovered."
414
+ content: {
415
+ en: "Permanent. Once deleted, your account cannot be recovered.",
416
+ "zh-CN": "\u6B64\u64CD\u4F5C\u4E0D\u53EF\u9006,\u8D26\u53F7\u4E00\u7ECF\u5220\u9664\u5C06\u65E0\u6CD5\u6062\u590D\u3002",
417
+ "ja-JP": "\u3053\u306E\u64CD\u4F5C\u306F\u53D6\u308A\u6D88\u305B\u307E\u305B\u3093\u3002\u524A\u9664\u3055\u308C\u305F\u30A2\u30AB\u30A6\u30F3\u30C8\u306F\u5FA9\u5143\u3067\u304D\u307E\u305B\u3093\u3002",
418
+ "es-ES": "Permanente. Una vez eliminada, tu cuenta no se puede recuperar."
419
+ }
358
420
  }
359
421
  },
360
422
  {
@@ -372,7 +434,7 @@ var SysUserDetailPage = {
372
434
  // user_id FK; the sys_api_key object's own list-item actions
373
435
  // (revoke / restore) handle row operations.
374
436
  {
375
- label: "API Keys",
437
+ label: { en: "API Keys", "zh-CN": "API \u5BC6\u94A5", "ja-JP": "API \u30AD\u30FC", "es-ES": "Claves de API" },
376
438
  icon: "key-round",
377
439
  children: [
378
440
  {
@@ -384,7 +446,7 @@ var SysUserDetailPage = {
384
446
  sort: [{ field: "created_at", order: "desc" }],
385
447
  limit: 25,
386
448
  showViewAll: true,
387
- title: "API Keys"
449
+ title: { en: "API Keys", "zh-CN": "API \u5BC6\u94A5", "ja-JP": "API \u30AD\u30FC", "es-ES": "Claves de API" }
388
450
  }
389
451
  }
390
452
  ]
@@ -415,7 +477,7 @@ var SysPositionDetailPage = {
415
477
  position: "top",
416
478
  items: [
417
479
  {
418
- label: "Holders",
480
+ label: { en: "Holders", "zh-CN": "\u4EFB\u804C\u4EBA\u5458", "ja-JP": "\u5728\u4EFB\u8005", "es-ES": "Titulares" },
419
481
  icon: "users",
420
482
  children: [
421
483
  {
@@ -428,21 +490,21 @@ var SysPositionDetailPage = {
428
490
  sort: [{ field: "created_at", order: "desc" }],
429
491
  limit: 25,
430
492
  showViewAll: true,
431
- title: "Holders",
493
+ title: { en: "Holders", "zh-CN": "\u4EFB\u804C\u4EBA\u5458", "ja-JP": "\u5728\u4EFB\u8005", "es-ES": "Titulares" },
432
494
  add: {
433
495
  picker: {
434
496
  object: "sys_user",
435
497
  labelField: "name"
436
498
  },
437
499
  linkField: "user_id",
438
- label: "Assign user"
500
+ label: { en: "Assign user", "zh-CN": "\u5206\u914D\u7528\u6237", "ja-JP": "\u30E6\u30FC\u30B6\u30FC\u3092\u5272\u308A\u5F53\u3066", "es-ES": "Asignar usuario" }
439
501
  }
440
502
  }
441
503
  }
442
504
  ]
443
505
  },
444
506
  {
445
- label: "Permission Sets",
507
+ label: { en: "Permission Sets", "zh-CN": "\u6743\u9650\u96C6", "ja-JP": "\u6A29\u9650\u30BB\u30C3\u30C8", "es-ES": "Conjuntos de permisos" },
446
508
  icon: "lock",
447
509
  children: [
448
510
  {
@@ -454,14 +516,14 @@ var SysPositionDetailPage = {
454
516
  sort: [{ field: "created_at", order: "desc" }],
455
517
  limit: 25,
456
518
  showViewAll: true,
457
- title: "Permission Sets",
519
+ title: { en: "Permission Sets", "zh-CN": "\u6743\u9650\u96C6", "ja-JP": "\u6A29\u9650\u30BB\u30C3\u30C8", "es-ES": "Conjuntos de permisos" },
458
520
  add: {
459
521
  picker: {
460
522
  object: "sys_permission_set",
461
523
  labelField: "label"
462
524
  },
463
525
  linkField: "permission_set_id",
464
- label: "Bind permission set"
526
+ label: { en: "Bind permission set", "zh-CN": "\u7ED1\u5B9A\u6743\u9650\u96C6", "ja-JP": "\u6A29\u9650\u30BB\u30C3\u30C8\u3092\u30D0\u30A4\u30F3\u30C9", "es-ES": "Vincular conjunto de permisos" }
465
527
  }
466
528
  }
467
529
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/pages/sys-organization.page.ts","../../src/pages/sys-user.page.ts","../../src/pages/sys-position.page.ts"],"names":[],"mappings":";;;AAiCO,IAAM,yBAAA,GAAkC;AAAA,EAC7C,IAAA,EAAM,yBAAA;AAAA,EACN,KAAA,EAAO,cAAA;AAAA,EACP,IAAA,EAAM,QAAA;AAAA,EACN,MAAA,EAAQ,kBAAA;AAAA,EACR,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKX,SAAS,EAAC;AAAA,EACV,KAAA,EAAO;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,WAAA;AAAA,MACN,UAAA,EAAY;AAAA,QACV,IAAA,EAAM,MAAA;AAAA,QACN,QAAA,EAAU,KAAA;AAAA,QACV,KAAA,EAAO;AAAA,UACL;AAAA,YACE,KAAA,EAAO,SAAA;AAAA,YACP,IAAA,EAAM,OAAA;AAAA,YACN,QAAA,EAAU;AAAA,cACR;AAAA,gBACE,IAAA,EAAM,qBAAA;AAAA,gBACN,UAAA,EAAY;AAAA,kBACV,UAAA,EAAY,YAAA;AAAA,kBACZ,iBAAA,EAAmB,iBAAA;AAAA,kBACnB,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AA;AAAA,oBACX,KAAA,EAAO;AAAA;AACT;AACF;AACF;AACF;AACF;AACF;AACF,KACF;AAAA;AAAA,IAGA,YAAY;AAAC;AAEjB","file":"index.js","sourcesContent":["// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Page } from '@objectstack/spec/ui';\n\n/**\n * sys_organization — Record Detail Page (slotted)\n *\n * Adds Members / Invitations / Teams tabs to the organization detail\n * page so an admin can manage the membership graph from a single place\n * instead of switching between three separate Setup list views.\n *\n * The page is `kind: 'slotted'` and overrides only the `tabs` slot —\n * header, actions, highlights, details and discussion fall through to\n * the synthesized default, so the organization's own fields and the\n * existing record-header actions (Set Active, Edit, Delete, Leave) are\n * preserved.\n *\n * Each tab is a `record:related_list` over a child object that already\n * has `organization_id` as a `Field.lookup('sys_organization')` — the\n * renderer scopes the list to the current organization automatically\n * (the related-list runtime uses the parent record id from the page\n * context as the filter value for `relationshipField`). The per-row\n * actions defined on each child object (invite_user, cancel_invitation,\n * remove_member, transfer_ownership, create_team, …) are inherited\n * unchanged — no admin endpoint has to be re-declared here.\n *\n * Notable omissions:\n * - **OAuth Apps**: `sys_oauth_application` is owned by `user_id`, not\n * `organization_id`. They surface on the user's Account → Developer\n * section instead of the org detail.\n * - **SSO**: no `sys_sso*` object exists yet. When the SSO plugin lands,\n * add a fourth tab here.\n */\nexport const SysOrganizationDetailPage: Page = {\n name: 'sys_organization_detail',\n label: 'Organization',\n type: 'record',\n object: 'sys_organization',\n template: 'default',\n kind: 'slotted',\n isDefault: true,\n // `regions` is required by the Page schema even for slotted pages —\n // empty array lets the synthesizer fill in header/details/discussion\n // while the `slots.tabs` override below replaces the synthesized\n // tabs strip.\n regions: [],\n slots: {\n tabs: {\n type: 'page:tabs',\n properties: {\n type: 'line',\n position: 'top',\n items: [\n {\n label: 'Members',\n icon: 'users',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_member',\n relationshipField: 'organization_id',\n columns: ['user_id', 'role', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Members',\n },\n },\n ],\n },\n {\n label: 'Invitations',\n icon: 'mail',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_invitation',\n relationshipField: 'organization_id',\n columns: ['email', 'role', 'status', 'expires_at', 'inviter_id'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Invitations',\n },\n },\n ],\n },\n {\n label: 'Teams',\n icon: 'users-round',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_team',\n relationshipField: 'organization_id',\n columns: ['name', 'created_at', 'updated_at'],\n sort: [{ field: 'name', order: 'asc' }],\n limit: 25,\n showViewAll: true,\n title: 'Teams',\n },\n },\n ],\n },\n ],\n },\n },\n },\n};\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Page } from '@objectstack/spec/ui';\n\n/**\n * sys_user — Record Detail Page (slotted, default for ALL sys_user records)\n *\n * **Audience**: admins browsing user records from Setup.\n *\n * The Account App's \"Profile\" entry no longer routes here — it points at\n * the `account:profile_card` Console component for a settings-form-style\n * personal profile. This page therefore optimizes for the admin\n * use case: scanning a user's signals (email/verification/2FA/role),\n * reviewing related sessions/orgs/oauth/api-keys, and triggering\n * admin actions (ban / impersonate / set_role).\n *\n * Strategy\n * --------\n * - `kind: 'slotted'` + `isDefault: true`: overrides `highlights`,\n * `details`, `tabs` and `discussion`. Header / actions fall through\n * to the synthesizer so the object's declared actions\n * (`update_my_profile / change_my_password / resend_verification_email\n * / ban_user / set_user_role / impersonate_user / …`) still appear\n * in the header overflow menu automatically.\n * - `highlights` promotes the four signals worth scanning at the top:\n * email, verification state, 2FA, platform role. Highlight fields\n * are auto-dropped from the details grid below.\n * - `details` re-groups remaining fields into sections and hides\n * admin-internal audit columns. Banned / ban metadata is still\n * editable from the header actions — we just don't show it in\n * every user's body.\n * - `tabs` is **explicitly curated** to the 5 related lists that matter\n * on a user profile (Positions / Sessions / Linked Accounts / Organizations /\n * Personal OAuth Apps). Without this override, the synthesizer\n * auto-generates a tab per object that has a FK to sys_user\n * (sys_position.created_by, sys_email.updated_by, sys_user_preference,\n * sys_email_template.created_by, …) producing dozens of noisy\n * \"查看全部\" cards on every profile.\n * - `discussion: []` removes the Chatter feed — it has no business\n * on a personal profile.\n */\nexport const SysUserDetailPage: Page = {\n name: 'sys_user_detail',\n label: 'User',\n type: 'record',\n object: 'sys_user',\n template: 'default',\n kind: 'slotted',\n isDefault: true,\n\n regions: [],\n\n slots: {\n // ── Alert banners ─────────────────────────────────────────────\n // Conditional notices rendered between the page header and the\n // highlight strip. The unverified-email banner only shows for the\n // current user viewing their own profile (admins looking at other\n // users see nothing — they can use Setup actions instead).\n alerts: [\n {\n type: 'record:alert',\n properties: {\n severity: 'warning',\n icon: 'mail',\n title: '邮箱未验证',\n body: '验证你的邮箱以接收密码重置和重要的系统通知。',\n visible: 'record.id == ctx.user.id && record.email_verified == false',\n dismissible: false,\n action: {\n actionName: 'resend_verification_email',\n label: '重新发送验证邮件',\n },\n },\n },\n ],\n\n // ── Highlight chips above the fold ────────────────────────────\n highlights: {\n type: 'record:highlights',\n properties: {\n fields: ['email', 'email_verified', 'two_factor_enabled', 'role'],\n },\n },\n\n // ── Body / details grid ───────────────────────────────────────\n details: {\n type: 'record:details',\n properties: {\n hideFields: [\n 'id',\n 'banned',\n 'ban_reason',\n 'ban_expires',\n // already promoted to highlights:\n 'email',\n 'email_verified',\n 'two_factor_enabled',\n 'role',\n ],\n sections: [\n {\n label: 'Identity',\n fields: ['name', 'image'],\n },\n {\n label: 'Audit',\n fields: ['created_at', 'updated_at'],\n },\n ],\n },\n },\n\n // ── Tabs: curated related lists ───────────────────────────────\n // Only the 4 lists that are semantically about THIS user account.\n // Everything else (sys_position created_by, sys_email_template\n // updated_by, …) is incidental authorship metadata and would only\n // create noise.\n tabs: {\n type: 'page:tabs',\n properties: {\n type: 'line',\n position: 'top',\n items: [\n {\n label: 'Positions',\n icon: 'shield-check',\n children: [\n {\n // [ADR-0090 D3] Position assignments (岗位分派) — pure SDUI:\n // the Add picker creates sys_user_position rows storing the\n // position's MACHINE NAME (valueField: 'name'), and every\n // server-side rule (the D12 delegated-admin gate, audience-\n // anchor rejection) surfaces its error in the dialog.\n type: 'record:related_list',\n properties: {\n objectName: 'sys_user_position',\n relationshipField: 'user_id',\n columns: ['position', 'business_unit_id', 'granted_by', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Positions',\n add: {\n picker: {\n object: 'sys_position',\n valueField: 'name',\n labelField: 'label',\n },\n linkField: 'position',\n label: 'Assign position',\n },\n },\n },\n ],\n },\n {\n label: 'Sessions',\n icon: 'monitor',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_session',\n relationshipField: 'user_id',\n columns: ['user_agent', 'ip_address', 'created_at', 'expires_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Sessions',\n },\n },\n ],\n },\n {\n label: 'Linked Accounts',\n icon: 'link',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_account',\n relationshipField: 'user_id',\n columns: ['provider_id', 'account_id', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Linked Accounts',\n },\n },\n ],\n },\n {\n label: 'Organizations',\n icon: 'building-2',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_member',\n relationshipField: 'user_id',\n columns: ['organization_id', 'role', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Organizations',\n },\n },\n ],\n },\n {\n label: 'OAuth Apps',\n icon: 'key-square',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_oauth_application',\n relationshipField: 'user_id',\n columns: ['name', 'client_id', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'OAuth Apps',\n },\n },\n ],\n },\n // ── Security ──────────────────────────────────────────────\n // Grouped self-service security controls. Each `record:quick_actions`\n // pulls its actions by name from the sys_user object metadata\n // (DRY — definitions stay on the object) and filters by\n // `location: 'record_section'` so they only render here, not\n // in the global header row.\n {\n label: 'Security',\n icon: 'shield',\n children: [\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: 'Password & Sign-in',\n },\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: 'Change your password or the email address associated with this account.',\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['change_my_password', 'change_my_email'],\n },\n },\n { type: 'element:divider' },\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: 'Two-Factor Authentication',\n },\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: 'Add a second layer of security using a TOTP authenticator app. Backup codes let you sign in if you lose your device.',\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['enable_two_factor', 'disable_two_factor', 'generate_backup_codes'],\n },\n },\n { type: 'element:divider' },\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: 'Email Verification',\n },\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: 'Verify your email so password resets and notifications reach you. The button appears only while verification is pending.',\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['resend_verification_email'],\n },\n },\n { type: 'element:divider' },\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: 'Danger Zone',\n },\n className: 'text-destructive',\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: 'Permanent. Once deleted, your account cannot be recovered.',\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['delete_my_account'],\n },\n },\n ],\n },\n // ── API Keys ──────────────────────────────────────────────\n // Programmatic credentials issued for this user. Filtered by\n // user_id FK; the sys_api_key object's own list-item actions\n // (revoke / restore) handle row operations.\n {\n label: 'API Keys',\n icon: 'key-round',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_api_key',\n relationshipField: 'user_id',\n columns: ['name', 'prefix', 'expires_at', 'revoked', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'API Keys',\n },\n },\n ],\n },\n ],\n },\n },\n\n // ── Suppress the Discussion / Chatter thread ──────────────────\n discussion: [],\n },\n};\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Page } from '@objectstack/spec/ui';\n\n/**\n * sys_position — Record Detail Page (slotted, default for ALL sys_position\n * records)\n *\n * **Audience**: admins managing capability distribution from Setup.\n *\n * A position (岗位, ADR-0090 D3) is the flat distribution group: users hold\n * it (`sys_user_position`), and it binds permission sets\n * (`sys_position_permission_set`). This page makes both edges manageable\n * as PURE SDUI — two `record:related_list` tabs with Add pickers; no\n * bespoke React:\n *\n * - **Holders** — who holds this position. `sys_user_position.position`\n * stores the position's MACHINE NAME, so the list keys on\n * `relationshipValueField: 'name'` (the generic name-keyed-junction\n * affordance this page motivated). Assigning here inserts an ordinary\n * assignment row; the ADR-0090 D12 delegated-admin gate governs the\n * write and its denial reason surfaces in the Add dialog. The\n * `business_unit_id` column is the assignment-level BU anchor\n * (ADR-0090 Addendum); `valid_from`/`valid_until` columns join it when\n * ADR-0091 L1 lands.\n * - **Permission Sets** — what the position distributes\n * (`sys_position_permission_set`, ordinary id-keyed junction). Binding\n * is guarded by BOTH the audience-anchor gate (D5/D9 — high-privilege\n * sets never bind to everyone/guest) and the D12 gate.\n *\n * Header/actions fall through to the synthesizer, so the object's declared\n * row actions (activate/deactivate/clone/set-default) keep working.\n */\nexport const SysPositionDetailPage: Page = {\n name: 'sys_position_detail',\n label: 'Position',\n type: 'record',\n object: 'sys_position',\n template: 'default',\n kind: 'slotted',\n isDefault: true,\n\n regions: [],\n\n slots: {\n tabs: {\n type: 'page:tabs',\n properties: {\n type: 'line',\n position: 'top',\n items: [\n {\n label: 'Holders',\n icon: 'users',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_user_position',\n relationshipField: 'position',\n relationshipValueField: 'name',\n columns: ['user_id', 'business_unit_id', 'granted_by', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Holders',\n add: {\n picker: {\n object: 'sys_user',\n labelField: 'name',\n },\n linkField: 'user_id',\n label: 'Assign user',\n },\n },\n },\n ],\n },\n {\n label: 'Permission Sets',\n icon: 'lock',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_position_permission_set',\n relationshipField: 'position_id',\n columns: ['permission_set_id', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: 'Permission Sets',\n add: {\n picker: {\n object: 'sys_permission_set',\n labelField: 'label',\n },\n linkField: 'permission_set_id',\n label: 'Bind permission set',\n },\n },\n },\n ],\n },\n ],\n },\n },\n\n // No Chatter feed on an RBAC primitive.\n discussion: [],\n },\n};\n"]}
1
+ {"version":3,"sources":["../../src/pages/sys-organization.page.ts","../../src/pages/sys-user.page.ts","../../src/pages/sys-position.page.ts"],"names":[],"mappings":";;;AAiCO,IAAM,yBAAA,GAAkC;AAAA,EAC7C,IAAA,EAAM,yBAAA;AAAA,EACN,KAAA,EAAO,cAAA;AAAA,EACP,IAAA,EAAM,QAAA;AAAA,EACN,MAAA,EAAQ,kBAAA;AAAA,EACR,QAAA,EAAU,SAAA;AAAA,EACV,IAAA,EAAM,SAAA;AAAA,EACN,SAAA,EAAW,IAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKX,SAAS,EAAC;AAAA,EACV,KAAA,EAAO;AAAA,IACL,IAAA,EAAM;AAAA,MACJ,IAAA,EAAM,WAAA;AAAA,MACN,UAA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,IAAA,EAAM,qBAAA;AAAA,gBACN,UAAA,EAAY;AAAA,kBACV,UAAA,EAAY,6BAAA;AAAA,kBACZ,iBAAA,EAAmB,aAAA;AAAA,kBACnB,OAAA,EAAS,CAAC,mBAAA,EAAqB,YAAY,CAAA;AAAA,kBAC3C,MAAM,CAAC,EAAE,OAAO,YAAA,EAAc,KAAA,EAAO,QAAQ,CAAA;AAAA,kBAC7C,KAAA,EAAO,EAAA;AAAA,kBACP,WAAA,EAAa,IAAA;AAAA,kBACb,KAAA,EAAO,EAAE,EAAA,EAAI,iBAAA,EAAmB,SAAS,oBAAA,EAAO,OAAA,EAAS,gCAAA,EAAS,OAAA,EAAS,uBAAA,EAAwB;AAAA,kBACnG,GAAA,EAAK;AAAA,oBACH,MAAA,EAAQ;AAAA,sBACN,MAAA,EAAQ,oBAAA;AAAA,sBACR,UAAA,EAAY;AAAA,qBACd;AAAA,oBACA,SAAA,EAAW,mBAAA;AAAA,oBACX,KAAA,EAAO,EAAE,EAAA,EAAI,qBAAA,EAAuB,SAAS,gCAAA,EAAS,OAAA,EAAS,8DAAA,EAAc,OAAA,EAAS,+BAAA;AAAgC;AACxH;AACF;AACF;AACF;AACF;AACF;AACF,KACF;AAAA;AAAA,IAGA,YAAY;AAAC;AAEjB","file":"index.js","sourcesContent":["// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Page } from '@objectstack/spec/ui';\n\n/**\n * sys_organization — Record Detail Page (slotted)\n *\n * Adds Members / Invitations / Teams tabs to the organization detail\n * page so an admin can manage the membership graph from a single place\n * instead of switching between three separate Setup list views.\n *\n * The page is `kind: 'slotted'` and overrides only the `tabs` slot —\n * header, actions, highlights, details and discussion fall through to\n * the synthesized default, so the organization's own fields and the\n * existing record-header actions (Set Active, Edit, Delete, Leave) are\n * preserved.\n *\n * Each tab is a `record:related_list` over a child object that already\n * has `organization_id` as a `Field.lookup('sys_organization')` — the\n * renderer scopes the list to the current organization automatically\n * (the related-list runtime uses the parent record id from the page\n * context as the filter value for `relationshipField`). The per-row\n * actions defined on each child object (invite_user, cancel_invitation,\n * remove_member, transfer_ownership, create_team, …) are inherited\n * unchanged — no admin endpoint has to be re-declared here.\n *\n * Notable omissions:\n * - **OAuth Apps**: `sys_oauth_application` is owned by `user_id`, not\n * `organization_id`. They surface on the user's Account → Developer\n * section instead of the org detail.\n * - **SSO**: no `sys_sso*` object exists yet. When the SSO plugin lands,\n * add a fourth tab here.\n */\nexport const SysOrganizationDetailPage: Page = {\n name: 'sys_organization_detail',\n label: 'Organization',\n type: 'record',\n object: 'sys_organization',\n template: 'default',\n kind: 'slotted',\n isDefault: true,\n // `regions` is required by the Page schema even for slotted pages —\n // empty array lets the synthesizer fill in header/details/discussion\n // while the `slots.tabs` override below replaces the synthesized\n // tabs strip.\n regions: [],\n slots: {\n tabs: {\n type: 'page:tabs',\n properties: {\n type: 'line',\n position: 'top',\n items: [\n {\n label: { en: 'Members', 'zh-CN': '成员', 'ja-JP': 'メンバー', 'es-ES': 'Miembros' },\n icon: 'users',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_member',\n relationshipField: 'organization_id',\n columns: ['user_id', 'role', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Members', 'zh-CN': '成员', 'ja-JP': 'メンバー', 'es-ES': 'Miembros' },\n },\n },\n ],\n },\n {\n label: { en: 'Invitations', 'zh-CN': '邀请', 'ja-JP': '招待', 'es-ES': 'Invitaciones' },\n icon: 'mail',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_invitation',\n relationshipField: 'organization_id',\n columns: ['email', 'role', 'status', 'expires_at', 'inviter_id'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Invitations', 'zh-CN': '邀请', 'ja-JP': '招待', 'es-ES': 'Invitaciones' },\n },\n },\n ],\n },\n {\n label: { en: 'Teams', 'zh-CN': '团队', 'ja-JP': 'チーム', 'es-ES': 'Equipos' },\n icon: 'users-round',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_team',\n relationshipField: 'organization_id',\n columns: ['name', 'created_at', 'updated_at'],\n sort: [{ field: 'name', order: 'asc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Teams', 'zh-CN': '团队', 'ja-JP': 'チーム', 'es-ES': 'Equipos' },\n },\n },\n ],\n },\n ],\n },\n },\n },\n};\n","// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Page } from '@objectstack/spec/ui';\n\n/**\n * sys_user — Record Detail Page (slotted, default for ALL sys_user records)\n *\n * **Audience**: admins browsing user records from Setup.\n *\n * The Account App's \"Profile\" entry no longer routes here — it points at\n * the `account:profile_card` Console component for a settings-form-style\n * personal profile. This page therefore optimizes for the admin\n * use case: scanning a user's signals (email/verification/2FA/role),\n * reviewing related sessions/orgs/oauth/api-keys, and triggering\n * admin actions (ban / impersonate / set_role).\n *\n * Strategy\n * --------\n * - `kind: 'slotted'` + `isDefault: true`: overrides `highlights`,\n * `details`, `tabs` and `discussion`. Header / actions fall through\n * to the synthesizer so the object's declared actions\n * (`update_my_profile / change_my_password / resend_verification_email\n * / ban_user / set_user_role / impersonate_user / …`) still appear\n * in the header overflow menu automatically.\n * - `highlights` promotes the four signals worth scanning at the top:\n * email, verification state, 2FA, platform role. Highlight fields\n * are auto-dropped from the details grid below.\n * - `details` re-groups remaining fields into sections and hides\n * admin-internal audit columns. Banned / ban metadata is still\n * editable from the header actions — we just don't show it in\n * every user's body.\n * - `tabs` is **explicitly curated** to the 5 related lists that matter\n * on a user profile (Positions / Sessions / Linked Accounts / Organizations /\n * Personal OAuth Apps). Without this override, the synthesizer\n * auto-generates a tab per object that has a FK to sys_user\n * (sys_position.created_by, sys_email.updated_by, sys_user_preference,\n * sys_email_template.created_by, …) producing dozens of noisy\n * \"查看全部\" cards on every profile.\n * - `discussion: []` removes the Chatter feed — it has no business\n * on a personal profile.\n */\nexport const SysUserDetailPage: Page = {\n name: 'sys_user_detail',\n label: 'User',\n type: 'record',\n object: 'sys_user',\n template: 'default',\n kind: 'slotted',\n isDefault: true,\n\n regions: [],\n\n slots: {\n // ── Alert banners ─────────────────────────────────────────────\n // Conditional notices rendered between the page header and the\n // highlight strip. The unverified-email banner only shows for the\n // current user viewing their own profile (admins looking at other\n // users see nothing — they can use Setup actions instead).\n alerts: [\n {\n type: 'record:alert',\n properties: {\n severity: 'warning',\n icon: 'mail',\n // Inline-i18n object labels: the renderer resolves them with\n // pickLocalized (exact → base → default → en → first).\n title: {\n en: 'Email not verified',\n 'zh-CN': '邮箱未验证',\n 'ja-JP': 'メールが未認証です',\n 'es-ES': 'Correo no verificado',\n },\n body: {\n en: 'Verify your email to receive password resets and important system notifications.',\n 'zh-CN': '验证你的邮箱以接收密码重置和重要的系统通知。',\n 'ja-JP': 'パスワードリセットや重要なシステム通知を受け取るには、メールアドレスを認証してください。',\n 'es-ES': 'Verifica tu correo para recibir restablecimientos de contraseña y notificaciones importantes del sistema.',\n },\n visible: 'record.id == ctx.user.id && record.email_verified == false',\n dismissible: false,\n action: {\n actionName: 'resend_verification_email',\n label: {\n en: 'Resend verification email',\n 'zh-CN': '重新发送验证邮件',\n 'ja-JP': '認証メールを再送信',\n 'es-ES': 'Reenviar correo de verificación',\n },\n },\n },\n },\n ],\n\n // ── Highlight chips above the fold ────────────────────────────\n highlights: {\n type: 'record:highlights',\n properties: {\n fields: ['email', 'email_verified', 'two_factor_enabled', 'role'],\n },\n },\n\n // ── Body / details grid ───────────────────────────────────────\n details: {\n type: 'record:details',\n properties: {\n hideFields: [\n 'id',\n 'banned',\n 'ban_reason',\n 'ban_expires',\n // already promoted to highlights:\n 'email',\n 'email_verified',\n 'two_factor_enabled',\n 'role',\n ],\n sections: [\n {\n label: { en: 'Identity', 'zh-CN': '身份', 'ja-JP': 'アイデンティティ', 'es-ES': 'Identidad' },\n fields: ['name', 'image'],\n },\n {\n label: { en: 'Audit', 'zh-CN': '审计', 'ja-JP': '監査', 'es-ES': 'Auditoría' },\n fields: ['created_at', 'updated_at'],\n },\n ],\n },\n },\n\n // ── Tabs: curated related lists ───────────────────────────────\n // Only the 4 lists that are semantically about THIS user account.\n // Everything else (sys_position created_by, sys_email_template\n // updated_by, …) is incidental authorship metadata and would only\n // create noise.\n tabs: {\n type: 'page:tabs',\n properties: {\n type: 'line',\n position: 'top',\n items: [\n {\n label: { en: 'Positions', 'zh-CN': '岗位', 'ja-JP': 'ポジション', 'es-ES': 'Puestos' },\n icon: 'shield-check',\n children: [\n {\n // [ADR-0090 D3] Position assignments (岗位分派) — pure SDUI:\n // the Add picker creates sys_user_position rows storing the\n // position's MACHINE NAME (valueField: 'name'), and every\n // server-side rule (the D12 delegated-admin gate, audience-\n // anchor rejection) surfaces its error in the dialog.\n type: 'record:related_list',\n properties: {\n objectName: 'sys_user_position',\n relationshipField: 'user_id',\n columns: ['position', 'business_unit_id', 'granted_by', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Positions', 'zh-CN': '岗位', 'ja-JP': 'ポジション', 'es-ES': 'Puestos' },\n add: {\n picker: {\n object: 'sys_position',\n valueField: 'name',\n labelField: 'label',\n },\n linkField: 'position',\n label: {\n en: 'Assign position',\n 'zh-CN': '分配岗位',\n 'ja-JP': 'ポジションを割り当て',\n 'es-ES': 'Asignar puesto',\n },\n },\n },\n },\n ],\n },\n {\n label: { en: 'Sessions', 'zh-CN': '会话', 'ja-JP': 'セッション', 'es-ES': 'Sesiones' },\n icon: 'monitor',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_session',\n relationshipField: 'user_id',\n columns: ['user_agent', 'ip_address', 'created_at', 'expires_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Sessions', 'zh-CN': '会话', 'ja-JP': 'セッション', 'es-ES': 'Sesiones' },\n },\n },\n ],\n },\n {\n label: { en: 'Linked Accounts', 'zh-CN': '关联账号', 'ja-JP': '連携アカウント', 'es-ES': 'Cuentas vinculadas' },\n icon: 'link',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_account',\n relationshipField: 'user_id',\n columns: ['provider_id', 'account_id', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Linked Accounts', 'zh-CN': '关联账号', 'ja-JP': '連携アカウント', 'es-ES': 'Cuentas vinculadas' },\n },\n },\n ],\n },\n {\n label: { en: 'Organizations', 'zh-CN': '组织', 'ja-JP': '組織', 'es-ES': 'Organizaciones' },\n icon: 'building-2',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_member',\n relationshipField: 'user_id',\n columns: ['organization_id', 'role', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Organizations', 'zh-CN': '组织', 'ja-JP': '組織', 'es-ES': 'Organizaciones' },\n },\n },\n ],\n },\n {\n label: { en: 'OAuth Apps', 'zh-CN': 'OAuth 应用', 'ja-JP': 'OAuth アプリ', 'es-ES': 'Aplicaciones OAuth' },\n icon: 'key-square',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_oauth_application',\n relationshipField: 'user_id',\n columns: ['name', 'client_id', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'OAuth Apps', 'zh-CN': 'OAuth 应用', 'ja-JP': 'OAuth アプリ', 'es-ES': 'Aplicaciones OAuth' },\n },\n },\n ],\n },\n // ── Security ──────────────────────────────────────────────\n // Grouped self-service security controls. Each `record:quick_actions`\n // pulls its actions by name from the sys_user object metadata\n // (DRY — definitions stay on the object) and filters by\n // `location: 'record_section'` so they only render here, not\n // in the global header row.\n {\n label: { en: 'Security', 'zh-CN': '安全', 'ja-JP': 'セキュリティ', 'es-ES': 'Seguridad' },\n icon: 'shield',\n children: [\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: {\n en: 'Password & Sign-in',\n 'zh-CN': '密码与登录',\n 'ja-JP': 'パスワードとサインイン',\n 'es-ES': 'Contraseña e inicio de sesión',\n },\n },\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: {\n en: 'Change your password or the email address associated with this account.',\n 'zh-CN': '修改密码或此账号绑定的邮箱地址。',\n 'ja-JP': 'パスワード、またはこのアカウントに関連付けられたメールアドレスを変更します。',\n 'es-ES': 'Cambia tu contraseña o la dirección de correo asociada a esta cuenta.',\n },\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['change_my_password', 'change_my_email'],\n },\n },\n { type: 'element:divider' },\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: {\n en: 'Two-Factor Authentication',\n 'zh-CN': '两步验证',\n 'ja-JP': '二要素認証',\n 'es-ES': 'Autenticación de dos factores',\n },\n },\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: {\n en: 'Add a second layer of security using a TOTP authenticator app. Backup codes let you sign in if you lose your device.',\n 'zh-CN': '使用 TOTP 验证器应用添加第二层安全防护。备用验证码可在设备丢失时用于登录。',\n 'ja-JP': 'TOTP 認証アプリでセキュリティをもう一段強化します。バックアップコードがあれば、デバイスを紛失してもサインインできます。',\n 'es-ES': 'Añade una segunda capa de seguridad con una app de autenticación TOTP. Los códigos de respaldo te permiten iniciar sesión si pierdes tu dispositivo.',\n },\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['enable_two_factor', 'disable_two_factor', 'generate_backup_codes'],\n },\n },\n { type: 'element:divider' },\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: {\n en: 'Email Verification',\n 'zh-CN': '邮箱验证',\n 'ja-JP': 'メール認証',\n 'es-ES': 'Verificación de correo',\n },\n },\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: {\n en: 'Verify your email so password resets and notifications reach you. The button appears only while verification is pending.',\n 'zh-CN': '验证你的邮箱,以便接收密码重置和系统通知。按钮仅在邮箱待验证时显示。',\n 'ja-JP': 'パスワードリセットや通知を受け取れるよう、メールアドレスを認証してください。ボタンは未認証の間のみ表示されます。',\n 'es-ES': 'Verifica tu correo para recibir restablecimientos de contraseña y notificaciones. El botón solo aparece mientras la verificación está pendiente.',\n },\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['resend_verification_email'],\n },\n },\n { type: 'element:divider' },\n {\n type: 'element:text',\n properties: {\n variant: 'subheading',\n content: {\n en: 'Danger Zone',\n 'zh-CN': '危险操作',\n 'ja-JP': '危険な操作',\n 'es-ES': 'Zona de peligro',\n },\n },\n className: 'text-destructive',\n },\n {\n type: 'element:text',\n properties: {\n variant: 'caption',\n content: {\n en: 'Permanent. Once deleted, your account cannot be recovered.',\n 'zh-CN': '此操作不可逆,账号一经删除将无法恢复。',\n 'ja-JP': 'この操作は取り消せません。削除されたアカウントは復元できません。',\n 'es-ES': 'Permanente. Una vez eliminada, tu cuenta no se puede recuperar.',\n },\n },\n },\n {\n type: 'record:quick_actions',\n properties: {\n location: 'record_section',\n align: 'start',\n actionNames: ['delete_my_account'],\n },\n },\n ],\n },\n // ── API Keys ──────────────────────────────────────────────\n // Programmatic credentials issued for this user. Filtered by\n // user_id FK; the sys_api_key object's own list-item actions\n // (revoke / restore) handle row operations.\n {\n label: { en: 'API Keys', 'zh-CN': 'API 密钥', 'ja-JP': 'API キー', 'es-ES': 'Claves de API' },\n icon: 'key-round',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_api_key',\n relationshipField: 'user_id',\n columns: ['name', 'prefix', 'expires_at', 'revoked', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'API Keys', 'zh-CN': 'API 密钥', 'ja-JP': 'API キー', 'es-ES': 'Claves de API' },\n },\n },\n ],\n },\n ],\n },\n },\n\n // ── Suppress the Discussion / Chatter thread ──────────────────\n discussion: [],\n },\n};\n","// Copyright (c) 2026 ObjectStack. Licensed under the Apache-2.0 license.\n\nimport type { Page } from '@objectstack/spec/ui';\n\n/**\n * sys_position — Record Detail Page (slotted, default for ALL sys_position\n * records)\n *\n * **Audience**: admins managing capability distribution from Setup.\n *\n * A position (岗位, ADR-0090 D3) is the flat distribution group: users hold\n * it (`sys_user_position`), and it binds permission sets\n * (`sys_position_permission_set`). This page makes both edges manageable\n * as PURE SDUI — two `record:related_list` tabs with Add pickers; no\n * bespoke React:\n *\n * - **Holders** — who holds this position. `sys_user_position.position`\n * stores the position's MACHINE NAME, so the list keys on\n * `relationshipValueField: 'name'` (the generic name-keyed-junction\n * affordance this page motivated). Assigning here inserts an ordinary\n * assignment row; the ADR-0090 D12 delegated-admin gate governs the\n * write and its denial reason surfaces in the Add dialog. The\n * `business_unit_id` column is the assignment-level BU anchor\n * (ADR-0090 Addendum); `valid_from`/`valid_until` columns join it when\n * ADR-0091 L1 lands.\n * - **Permission Sets** — what the position distributes\n * (`sys_position_permission_set`, ordinary id-keyed junction). Binding\n * is guarded by BOTH the audience-anchor gate (D5/D9 — high-privilege\n * sets never bind to everyone/guest) and the D12 gate.\n *\n * Header/actions fall through to the synthesizer, so the object's declared\n * row actions (activate/deactivate/clone/set-default) keep working.\n */\nexport const SysPositionDetailPage: Page = {\n name: 'sys_position_detail',\n label: 'Position',\n type: 'record',\n object: 'sys_position',\n template: 'default',\n kind: 'slotted',\n isDefault: true,\n\n regions: [],\n\n slots: {\n tabs: {\n type: 'page:tabs',\n properties: {\n type: 'line',\n position: 'top',\n items: [\n {\n label: { en: 'Holders', 'zh-CN': '任职人员', 'ja-JP': '在任者', 'es-ES': 'Titulares' },\n icon: 'users',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_user_position',\n relationshipField: 'position',\n relationshipValueField: 'name',\n columns: ['user_id', 'business_unit_id', 'granted_by', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Holders', 'zh-CN': '任职人员', 'ja-JP': '在任者', 'es-ES': 'Titulares' },\n add: {\n picker: {\n object: 'sys_user',\n labelField: 'name',\n },\n linkField: 'user_id',\n label: { en: 'Assign user', 'zh-CN': '分配用户', 'ja-JP': 'ユーザーを割り当て', 'es-ES': 'Asignar usuario' },\n },\n },\n },\n ],\n },\n {\n label: { en: 'Permission Sets', 'zh-CN': '权限集', 'ja-JP': '権限セット', 'es-ES': 'Conjuntos de permisos' },\n icon: 'lock',\n children: [\n {\n type: 'record:related_list',\n properties: {\n objectName: 'sys_position_permission_set',\n relationshipField: 'position_id',\n columns: ['permission_set_id', 'created_at'],\n sort: [{ field: 'created_at', order: 'desc' }],\n limit: 25,\n showViewAll: true,\n title: { en: 'Permission Sets', 'zh-CN': '权限集', 'ja-JP': '権限セット', 'es-ES': 'Conjuntos de permisos' },\n add: {\n picker: {\n object: 'sys_permission_set',\n labelField: 'label',\n },\n linkField: 'permission_set_id',\n label: { en: 'Bind permission set', 'zh-CN': '绑定权限集', 'ja-JP': '権限セットをバインド', 'es-ES': 'Vincular conjunto de permisos' },\n },\n },\n },\n ],\n },\n ],\n },\n },\n\n // No Chatter feed on an RBAC primitive.\n discussion: [],\n },\n};\n"]}