@object-ui/plugin-detail 17.7.0 → 18.0.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/CHANGELOG.md +1014 -0
- package/README.md +153 -0
- package/dist/CommentAuthorControls.d.ts +40 -0
- package/dist/CommentAuthorControls.d.ts.map +1 -0
- package/dist/ConcurrentUpdateDialog.d.ts +1 -2
- package/dist/ConcurrentUpdateDialog.d.ts.map +1 -1
- package/dist/DetailSection.d.ts.map +1 -1
- package/dist/DetailSectionNode.d.ts +2 -2
- package/dist/DetailView.d.ts +13 -0
- package/dist/DetailView.d.ts.map +1 -1
- package/dist/HeaderHighlight.d.ts.map +1 -1
- package/dist/HistoryTimeline.d.ts +13 -3
- package/dist/HistoryTimeline.d.ts.map +1 -1
- package/dist/InlineEditSaveBar.d.ts.map +1 -1
- package/dist/InlineFieldInput.d.ts +1 -1
- package/dist/InlineFieldInput.d.ts.map +1 -1
- package/dist/RecordActivityTimeline.d.ts +13 -0
- package/dist/RecordActivityTimeline.d.ts.map +1 -1
- package/dist/RecordChatterPanel.d.ts +4 -0
- package/dist/RecordChatterPanel.d.ts.map +1 -1
- package/dist/RecordDetailPanel.d.ts.map +1 -1
- package/dist/RelatedList.d.ts.map +1 -1
- package/dist/ThreadedReplies.d.ts +8 -0
- package/dist/ThreadedReplies.d.ts.map +1 -1
- package/dist/fieldEnrichment.d.ts +3 -2
- package/dist/fieldEnrichment.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2509 -1931
- package/dist/index.umd.cjs +2 -2
- package/dist/recordPageProvenance.d.ts +39 -0
- package/dist/recordPageProvenance.d.ts.map +1 -0
- package/dist/renderers/record-activity.d.ts.map +1 -1
- package/dist/renderers/record-alert.d.ts.map +1 -1
- package/dist/renderers/record-chatter.d.ts.map +1 -1
- package/dist/renderers/record-details.d.ts +10 -0
- package/dist/renderers/record-details.d.ts.map +1 -1
- package/dist/renderers/record-highlights.d.ts +10 -0
- package/dist/renderers/record-highlights.d.ts.map +1 -1
- package/dist/renderers/record-history.d.ts.map +1 -1
- package/dist/renderers/record-path.d.ts.map +1 -1
- package/dist/renderers/record-quick-actions.d.ts +10 -0
- package/dist/renderers/record-quick-actions.d.ts.map +1 -1
- package/dist/renderers/record-reference-rail.d.ts.map +1 -1
- package/dist/renderers/record-related-list.d.ts +14 -4
- package/dist/renderers/record-related-list.d.ts.map +1 -1
- package/dist/renderers/recordActivityFeed.d.ts +69 -11
- package/dist/renderers/recordActivityFeed.d.ts.map +1 -1
- package/dist/renderers/recordBinding.d.ts +180 -0
- package/dist/renderers/recordBinding.d.ts.map +1 -0
- package/dist/synth/buildDefaultPageSchema.d.ts +90 -4
- package/dist/synth/buildDefaultPageSchema.d.ts.map +1 -1
- package/dist/useDetailTranslation.d.ts.map +1 -1
- package/dist/useRecordEditable.d.ts +4 -1
- package/dist/useRecordEditable.d.ts.map +1 -1
- package/package.json +16 -16
- package/dist/renderers/PermissionFacetLink.d.ts +0 -38
- package/dist/renderers/PermissionFacetLink.d.ts.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ServiceObject } from '@objectstack/spec/data';
|
|
1
|
+
import { SelectOptionKind, ServiceObject } from '@objectstack/spec/data';
|
|
2
2
|
import { detectStatusField } from '@object-ui/types';
|
|
3
3
|
/** Minimal shape of an object definition we read here. We deliberately
|
|
4
4
|
* duck-type so this helper has zero hard dependency on a specific
|
|
@@ -99,9 +99,17 @@ export interface ObjectDefFieldLike {
|
|
|
99
99
|
name?: string;
|
|
100
100
|
label?: string;
|
|
101
101
|
type?: string;
|
|
102
|
+
/**
|
|
103
|
+
* The picklist. `kind` is the option's declared lifecycle category
|
|
104
|
+
* (`SelectOption.kind` in `@objectstack/spec/data`, objectstack#23809):
|
|
105
|
+
* {@link deriveStages} carries a `won` / `lost` kind onto the derived stage
|
|
106
|
+
* as its `terminal`, and `record:path` lets any declared kind (`open`
|
|
107
|
+
* included) win over its spelling heuristic (objectui#12907).
|
|
108
|
+
*/
|
|
102
109
|
options?: Array<{
|
|
103
110
|
value: any;
|
|
104
111
|
label: string;
|
|
112
|
+
kind?: SelectOptionKind;
|
|
105
113
|
}>;
|
|
106
114
|
/** Declared group membership — matches a `fieldGroups[].key`. */
|
|
107
115
|
group?: string;
|
|
@@ -324,13 +332,40 @@ export interface BuildPageOptions {
|
|
|
324
332
|
* long-standing plugin-detail import path.
|
|
325
333
|
*/
|
|
326
334
|
export { detectStatusField };
|
|
335
|
+
/**
|
|
336
|
+
* The `record:path` terminal a declared option `kind` stands for: `won` and
|
|
337
|
+
* `lost` are the spec's `stages[].terminal` values verbatim (the vocabulary
|
|
338
|
+
* objectstack#23809 chose to match), and `open` is no terminal.
|
|
339
|
+
*/
|
|
340
|
+
export declare function stageTerminalOfKind(kind: SelectOptionKind | undefined): 'won' | 'lost' | undefined;
|
|
327
341
|
/**
|
|
328
342
|
* Derive stage values from an object field's `options` (picklist).
|
|
343
|
+
*
|
|
344
|
+
* A stage carries `terminal` from its option's declared `kind`
|
|
345
|
+
* ({@link stageTerminalOfKind}, objectui#12907), so a `won` option is the
|
|
346
|
+
* path's forward terminus and a `lost` one sits in the separated group
|
|
347
|
+
* whatever it is called. An option that declares no kind, or `open`, gets no
|
|
348
|
+
* `terminal` key: the stage shape is the spec's strict `stages[]` row, which
|
|
349
|
+
* has no way to say "declared open" — `record:path` reads that off the field
|
|
350
|
+
* itself ({@link declaredStageKinds}).
|
|
329
351
|
*/
|
|
330
352
|
export declare function deriveStages(def: ObjectDefLike | undefined, statusField: string | null): Array<{
|
|
331
353
|
value: any;
|
|
332
354
|
label: string;
|
|
355
|
+
terminal?: 'won' | 'lost';
|
|
333
356
|
}> | null;
|
|
357
|
+
/**
|
|
358
|
+
* The lifecycle `kind` each option of `statusField` declares, keyed by option
|
|
359
|
+
* value — only the options that declare one (objectui#12907).
|
|
360
|
+
*
|
|
361
|
+
* ⚠️ Package-internal: exported for `renderers/record-path.tsx`, NOT
|
|
362
|
+
* re-exported from the package entry. `record:path` consults it after a
|
|
363
|
+
* stage's explicit `terminal` and before its spelling heuristic, because the
|
|
364
|
+
* spec's strict `stages[]` row can carry `won` / `lost` but not `open`: a
|
|
365
|
+
* declared `open` on a value spelled `closed_won` has to beat the heuristic
|
|
366
|
+
* from here. Returns `null` when there is nothing to consult.
|
|
367
|
+
*/
|
|
368
|
+
export declare function declaredStageKinds(def: ObjectDefLike | undefined, statusField: string | null): Map<unknown, SelectOptionKind> | null;
|
|
334
369
|
/**
|
|
335
370
|
* WHICH FIELD titles this record — the field whose value the page renders as
|
|
336
371
|
* its H1, in NAME space.
|
|
@@ -367,6 +402,8 @@ export declare function resolveTitleField(def: ObjectDefLike | undefined): strin
|
|
|
367
402
|
/**
|
|
368
403
|
* Pick up to N "highlight" fields by name. Skips the status field
|
|
369
404
|
* (already shown in `record:path`) and obvious junk like id / created_at.
|
|
405
|
+
* Members of a group gated by `visibleWhen` are never picked
|
|
406
|
+
* ({@link membersOfGatedFieldGroups}, objectui#12720).
|
|
370
407
|
*/
|
|
371
408
|
export declare function deriveHighlightFields(def: ObjectDefLike | undefined, statusField: string | null, max?: number): string[];
|
|
372
409
|
/**
|
|
@@ -394,6 +431,40 @@ export declare function buildDefaultActions(_def: ObjectDefLike | undefined, hea
|
|
|
394
431
|
* two adjacent nodes.
|
|
395
432
|
*/
|
|
396
433
|
export declare function buildDefaultHighlights(def: ObjectDefLike | undefined, options?: Pick<BuildPageOptions, 'highlightFields' | 'statusField' | 'stages' | 'hideHighlights' | 'hidePath'>): any[];
|
|
434
|
+
/**
|
|
435
|
+
* One field group, resolved — the section a `record:details` `{ group }`
|
|
436
|
+
* reference stands for — plus the group's own ADR-0089 `visibleWhen`
|
|
437
|
+
* (objectui#11630).
|
|
438
|
+
*
|
|
439
|
+
* ⚠️ Package-internal. It is exported from this module for
|
|
440
|
+
* `renderers/record-details.tsx` and is NOT re-exported from the package entry.
|
|
441
|
+
* The predicate travels BESIDE the section, never on it: `section` is exactly
|
|
442
|
+
* what the public {@link deriveFieldGroupDetailSections} returns, so no caller
|
|
443
|
+
* of the public function can copy a `visibleWhen` onto an enumerated
|
|
444
|
+
* `record:details` section. `@objectstack/spec`'s `RecordDetailsProps.sections[]`
|
|
445
|
+
* is strict and refuses that key on parse; the spec's way to gate a section is
|
|
446
|
+
* to reference the gated group with `{ group }`, which inherits its predicate.
|
|
447
|
+
*/
|
|
448
|
+
export interface FieldGroupDetailEntry {
|
|
449
|
+
/** The group key. Absent on the trailing ungrouped bucket. */
|
|
450
|
+
key?: string;
|
|
451
|
+
/**
|
|
452
|
+
* The group's `visibleWhen`, verbatim and unevaluated — a bare CEL string or
|
|
453
|
+
* an Expression envelope, as `deriveFieldGroupLayout` passes it through.
|
|
454
|
+
* Never present on the ungrouped bucket.
|
|
455
|
+
*/
|
|
456
|
+
visibleWhen?: unknown;
|
|
457
|
+
/** The resolved section, in DetailSection's shape. */
|
|
458
|
+
section: Record<string, any>;
|
|
459
|
+
}
|
|
460
|
+
/**
|
|
461
|
+
* The derivation behind both {@link deriveFieldGroupDetailSections} and the
|
|
462
|
+
* `{ group }` references {@link resolveDetailSections} emits — one code path,
|
|
463
|
+
* so a reference and the section it resolves to cannot disagree.
|
|
464
|
+
*
|
|
465
|
+
* Package-internal; see {@link FieldGroupDetailEntry}.
|
|
466
|
+
*/
|
|
467
|
+
export declare function deriveFieldGroupDetailEntries(def: ObjectDefLike | undefined): FieldGroupDetailEntry[] | null;
|
|
397
468
|
/**
|
|
398
469
|
* Derive detail sections from the object's declared `fieldGroups` plus each
|
|
399
470
|
* field's `group` membership. The grouping SEMANTICS (declared order, empty
|
|
@@ -409,14 +480,29 @@ export declare function buildDefaultHighlights(def: ObjectDefLike | undefined, o
|
|
|
409
480
|
* Section fields are emitted as rich descriptors (`{ name, label, type,
|
|
410
481
|
* options }`) so DetailSection renders typed values without re-resolving
|
|
411
482
|
* the object definition.
|
|
483
|
+
*
|
|
484
|
+
* ⚠️ This is the RESOLVED form of a group — what `record:details` renders for
|
|
485
|
+
* a `{ group }` reference — and not a page section to write into a
|
|
486
|
+
* `record:details` node: the rich `fields` descriptors are refused by
|
|
487
|
+
* `@objectstack/spec`'s `RecordDetailsProps.sections[].fields` (bare names), and
|
|
488
|
+
* a group's `visibleWhen` is deliberately not on it. A page references the group
|
|
489
|
+
* instead, which is what {@link resolveDetailSections} emits (objectui#11630).
|
|
412
490
|
*/
|
|
413
491
|
export declare function deriveFieldGroupDetailSections(def: ObjectDefLike | undefined): Array<Record<string, any>> | null;
|
|
414
492
|
/**
|
|
415
493
|
* Resolve the sections for the Details tab body:
|
|
416
494
|
* 1) explicit `options.sections` from the caller (programmatic API —
|
|
417
495
|
* Studio preview / metadata-admin anchors);
|
|
418
|
-
* 2) else
|
|
419
|
-
*
|
|
496
|
+
* 2) else the object's `fieldGroups` semantic role, as `{ group }`
|
|
497
|
+
* references plus the ungrouped bucket's field names
|
|
498
|
+
* (`fieldGroupSectionReferences`, objectui#11630);
|
|
499
|
+
* 3) else `undefined` — a bare `record:details`, which draws the object's
|
|
500
|
+
* `highlightFields` (the spec's declared fallback for a node with
|
|
501
|
+
* neither `sections` nor `fields`, objectui#12433), and an empty body
|
|
502
|
+
* when the object declares none. It does NOT draw every field: a caller
|
|
503
|
+
* that wants the running app's default body passes that body's sections
|
|
504
|
+
* in (1) — app-shell's `RecordDetailView`, and Studio's page-create seed
|
|
505
|
+
* and slotted preview, take them from one derivation (objectui#12442).
|
|
420
506
|
*/
|
|
421
507
|
export declare function resolveDetailSections(def: ObjectDefLike | undefined, sections?: BuildPageOptions['sections']): BuildPageOptions['sections'] | undefined;
|
|
422
508
|
/**
|
|
@@ -447,7 +533,7 @@ export declare function buildDefaultAttachments(): any;
|
|
|
447
533
|
* page.
|
|
448
534
|
*
|
|
449
535
|
* Shape:
|
|
450
|
-
* { type:'record', template:'
|
|
536
|
+
* { type:'record', template:'default', regions:[ { name:'main',
|
|
451
537
|
* components: [page:header, record:highlights?, record:path?,
|
|
452
538
|
* page:tabs, record:discussion?] } ] }
|
|
453
539
|
* For `enable.files: true` objects the tabs node carries a peer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"buildDefaultPageSchema.d.ts","sourceRoot":"","sources":["../../src/synth/buildDefaultPageSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"buildDefaultPageSchema.d.ts","sourceRoot":"","sources":["../../src/synth/buildDefaultPageSchema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAGH,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAQrD;;2BAE2B;AAC3B,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,kBAAkB,CAAC,CAAC;IAC5C;;mEAE+D;IAC/D,UAAU,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC;IAC5B,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,GAAG,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9C;gDAC4C;IAC5C,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B;;;;;;;;;;;;;;;;;;OAkBG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;8EAC0E;IAC1E,QAAQ,CAAC,EAAE,KAAK,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,GAAG,EAAE,CAAA;KAAE,CAAC,CAAC;I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AG,CA0KL"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDetailTranslation.d.ts","sourceRoot":"","sources":["../src/useDetailTranslation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,8BAAwB,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"useDetailTranslation.d.ts","sourceRoot":"","sources":["../src/useDetailTranslation.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,yBAAyB,8BAAwB,CAAC;AAE/D;;;;;;;;;;GAUG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAmP9D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB;4BAvRhC,CAAC;;;;;CA0RD,CAAC"}
|
|
@@ -7,6 +7,9 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export type RecordOperation = 'update' | 'delete';
|
|
9
9
|
export declare function useRecordEditable(objectName: string | undefined, recordId: string | undefined, operation?: RecordOperation, enabled?: boolean): boolean;
|
|
10
|
-
/**
|
|
10
|
+
/**
|
|
11
|
+
* Test seam — drops the memoised verdicts, the unanswered questions waiting
|
|
12
|
+
* on the wire, AND the principal they were for.
|
|
13
|
+
*/
|
|
11
14
|
export declare function __clearRecordEditableCache(): void;
|
|
12
15
|
//# sourceMappingURL=useRecordEditable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRecordEditable.d.ts","sourceRoot":"","sources":["../src/useRecordEditable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"useRecordEditable.d.ts","sourceRoot":"","sources":["../src/useRecordEditable.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAiQH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElD,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,QAAQ,EAAE,MAAM,GAAG,SAAS,EAC5B,SAAS,GAAE,eAA0B,EACrC,OAAO,UAAO,GACb,OAAO,CAqDT;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,IAAI,IAAI,CAIjD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@object-ui/plugin-detail",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "18.0.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"description": "DetailView plugin for Object UI - comprehensive detail page with sections, tabs, and related lists",
|
|
@@ -24,20 +24,20 @@
|
|
|
24
24
|
}
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@objectstack/spec": "^
|
|
27
|
+
"@objectstack/spec": "^18.0.0",
|
|
28
28
|
"lucide-react": "^1.43.0",
|
|
29
|
-
"@object-ui/i18n": "
|
|
29
|
+
"@object-ui/i18n": "18.0.0"
|
|
30
30
|
},
|
|
31
31
|
"peerDependencies": {
|
|
32
32
|
"react": "^18.0.0 || ^19.0.0",
|
|
33
33
|
"react-dom": "^18.0.0 || ^19.0.0",
|
|
34
34
|
"react-router-dom": "^6.0.0 || ^7.0.0",
|
|
35
|
-
"@object-ui/components": "^
|
|
36
|
-
"@object-ui/core": "^
|
|
37
|
-
"@object-ui/fields": "^
|
|
38
|
-
"@object-ui/permissions": "^
|
|
39
|
-
"@object-ui/react": "^
|
|
40
|
-
"@object-ui/types": "^
|
|
35
|
+
"@object-ui/components": "^18.0.0",
|
|
36
|
+
"@object-ui/core": "^18.0.0",
|
|
37
|
+
"@object-ui/fields": "^18.0.0",
|
|
38
|
+
"@object-ui/permissions": "^18.0.0",
|
|
39
|
+
"@object-ui/react": "^18.0.0",
|
|
40
|
+
"@object-ui/types": "^18.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/react": "19.2.18",
|
|
@@ -47,14 +47,14 @@
|
|
|
47
47
|
"vite": "^8.2.1",
|
|
48
48
|
"vite-plugin-dts": "^5.0.3",
|
|
49
49
|
"vitest": "^4.1.10",
|
|
50
|
-
"@object-ui/components": "
|
|
51
|
-
"@object-ui/core": "
|
|
52
|
-
"@object-ui/fields": "
|
|
53
|
-
"@object-ui/permissions": "
|
|
50
|
+
"@object-ui/components": "18.0.0",
|
|
51
|
+
"@object-ui/core": "18.0.0",
|
|
52
|
+
"@object-ui/fields": "18.0.0",
|
|
53
|
+
"@object-ui/permissions": "18.0.0",
|
|
54
54
|
"@object-ui/test-support": "17.4.0",
|
|
55
|
-
"@object-ui/react": "
|
|
56
|
-
"@object-ui/
|
|
57
|
-
"@object-ui/
|
|
55
|
+
"@object-ui/react": "18.0.0",
|
|
56
|
+
"@object-ui/types": "18.0.0",
|
|
57
|
+
"@object-ui/sdui-parser": "18.0.0"
|
|
58
58
|
},
|
|
59
59
|
"keywords": [
|
|
60
60
|
"objectui",
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* ObjectUI
|
|
3
|
-
* Copyright (c) 2024-present ObjectStack Inc.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the MIT license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*/
|
|
8
|
-
import * as React from 'react';
|
|
9
|
-
/**
|
|
10
|
-
* PermissionFacetLink — read-only summary + "Design in Studio →" deep-link for
|
|
11
|
-
* the six authorization facets on a `sys_permission_set` record (ADR-0056 /
|
|
12
|
-
* epic #2398, phase P1).
|
|
13
|
-
*
|
|
14
|
-
* In the pure model an app developer *designs* every permission facet in
|
|
15
|
-
* Studio's structured editors; a system admin only *assigns users* in Setup.
|
|
16
|
-
* So Setup must never render a facet as raw `[Object]`/JSON or let it be edited
|
|
17
|
-
* inline — it shows a compact summary of the current grant plus a deep-link
|
|
18
|
-
* into the structured editor for that set:
|
|
19
|
-
*
|
|
20
|
-
* /apps/:appName/metadata/permission/:setName (env scope; :name = api name)
|
|
21
|
-
*
|
|
22
|
-
* Registered as the `permission-facet-link` field widget (so the record form
|
|
23
|
-
* and inline edit render it) and special-cased in DetailSection's read branch,
|
|
24
|
-
* so all three surfaces render read-only and identically. The renderer pulls
|
|
25
|
-
* the set's api-name from `useRecordContext()` and the app from `useParams()`
|
|
26
|
-
* — the same pattern the reference rail uses.
|
|
27
|
-
*/
|
|
28
|
-
type FacetValue = unknown;
|
|
29
|
-
export interface PermissionFacetLinkProps {
|
|
30
|
-
value: FacetValue;
|
|
31
|
-
field?: {
|
|
32
|
-
name?: string;
|
|
33
|
-
label?: string;
|
|
34
|
-
} | null;
|
|
35
|
-
}
|
|
36
|
-
export declare function PermissionFacetLink({ value, field, }: PermissionFacetLinkProps): React.ReactElement;
|
|
37
|
-
export default PermissionFacetLink;
|
|
38
|
-
//# sourceMappingURL=PermissionFacetLink.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PermissionFacetLink.d.ts","sourceRoot":"","sources":["../../src/renderers/PermissionFacetLink.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B;;;;;;;;;;;;;;;;;;GAkBG;AAEH,KAAK,UAAU,GAAG,OAAO,CAAC;AAyB1B,MAAM,WAAW,wBAAwB;IACvC,KAAK,EAAE,UAAU,CAAC;IAClB,KAAK,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAClD;AAED,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,KAAK,GACN,EAAE,wBAAwB,GAAG,KAAK,CAAC,YAAY,CA2F/C;AAED,eAAe,mBAAmB,CAAC"}
|