@tensor_1/react 2.12.0 → 2.14.2
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 +16 -0
- package/dist/calendar-model.d.ts +31 -0
- package/dist/calendar-model.js +89 -0
- package/dist/color-model.d.ts +20 -0
- package/dist/color-model.js +74 -0
- package/dist/components/BrandProfiles.d.ts +45 -0
- package/dist/components/BrandProfiles.js +150 -0
- package/dist/components/BuilderCanvas.d.ts +34 -0
- package/dist/components/BuilderCanvas.js +117 -0
- package/dist/components/ColorPicker.d.ts +17 -0
- package/dist/components/ColorPicker.js +158 -0
- package/dist/components/DateRangePicker.d.ts +23 -0
- package/dist/components/DateRangePicker.js +123 -0
- package/dist/components/DiffViewer.d.ts +18 -0
- package/dist/components/DiffViewer.js +93 -0
- package/dist/components/LicensePositionBar.d.ts +17 -0
- package/dist/components/LicensePositionBar.js +50 -0
- package/dist/components/MatchReview.d.ts +39 -0
- package/dist/components/MatchReview.js +120 -0
- package/dist/components/MetricInput.d.ts +23 -0
- package/dist/components/MetricInput.js +92 -0
- package/dist/components/RelationshipGraph.d.ts +30 -0
- package/dist/components/RelationshipGraph.js +138 -0
- package/dist/components/RuleBuilder.d.ts +45 -0
- package/dist/components/RuleBuilder.js +163 -0
- package/dist/components/SchedulingCalendar.d.ts +42 -0
- package/dist/components/SchedulingCalendar.js +124 -0
- package/dist/diff-model.d.ts +23 -0
- package/dist/diff-model.js +50 -0
- package/dist/index.cjs +1753 -2
- package/dist/index.d.cts +439 -1
- package/dist/index.d.ts +18 -0
- package/dist/index.js +91 -1
- package/dist/json-value.d.ts +10 -0
- package/dist/json-value.js +19 -0
- package/dist/metric-model.d.ts +9 -0
- package/dist/metric-model.js +25 -0
- package/dist/relationship-graph-model.d.ts +31 -0
- package/dist/relationship-graph-model.js +68 -0
- package/dist/rule-builder-model.d.ts +41 -0
- package/dist/rule-builder-model.js +101 -0
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1294,4 +1294,442 @@ interface StatusRowProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
1294
1294
|
/** Status row — indicator + name + trailing meta (`.uix-status-row`). */
|
|
1295
1295
|
declare function StatusRow({ indicator, name, meta, className, ...props }: StatusRowProps): react.JSX.Element;
|
|
1296
1296
|
|
|
1297
|
-
|
|
1297
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
1298
|
+
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
1299
|
+
[key: string]: JsonValue;
|
|
1300
|
+
};
|
|
1301
|
+
|
|
1302
|
+
interface RuleCondition {
|
|
1303
|
+
id: string;
|
|
1304
|
+
field: string;
|
|
1305
|
+
operator: string;
|
|
1306
|
+
value?: JsonValue;
|
|
1307
|
+
}
|
|
1308
|
+
interface RuleGroup {
|
|
1309
|
+
id: string;
|
|
1310
|
+
combinator: 'and' | 'or';
|
|
1311
|
+
conditions: Array<RuleCondition | RuleGroup>;
|
|
1312
|
+
}
|
|
1313
|
+
interface RuleAction {
|
|
1314
|
+
id: string;
|
|
1315
|
+
type: string;
|
|
1316
|
+
parameters: Record<string, JsonValue>;
|
|
1317
|
+
}
|
|
1318
|
+
interface RuleDefinition {
|
|
1319
|
+
when: RuleGroup;
|
|
1320
|
+
then: RuleAction[];
|
|
1321
|
+
}
|
|
1322
|
+
interface RuleValidationIssue {
|
|
1323
|
+
path: string;
|
|
1324
|
+
message: string;
|
|
1325
|
+
}
|
|
1326
|
+
declare function isRuleGroup(node: RuleCondition | RuleGroup): node is RuleGroup;
|
|
1327
|
+
declare function ruleDepth(group: RuleGroup): number;
|
|
1328
|
+
declare function findRuleNodeDepth(group: RuleGroup, id: string, depth?: number): number | undefined;
|
|
1329
|
+
declare function mapRuleGroup(group: RuleGroup, id: string, update: (node: RuleCondition | RuleGroup) => RuleCondition | RuleGroup): RuleGroup;
|
|
1330
|
+
declare function appendRuleNode(group: RuleGroup, parentId: string, node: RuleCondition | RuleGroup, maxDepth?: number): RuleGroup;
|
|
1331
|
+
declare function removeRuleNode(group: RuleGroup, id: string): RuleGroup;
|
|
1332
|
+
declare function moveRuleNode(group: RuleGroup, id: string, direction: -1 | 1): RuleGroup;
|
|
1333
|
+
declare function validateRuleDefinition(value: RuleDefinition, maxDepth?: number): RuleValidationIssue[];
|
|
1334
|
+
declare function summarizeRule(value: RuleDefinition, labels?: {
|
|
1335
|
+
fields?: Record<string, string>;
|
|
1336
|
+
operators?: Record<string, string>;
|
|
1337
|
+
actions?: Record<string, string>;
|
|
1338
|
+
}): string;
|
|
1339
|
+
|
|
1340
|
+
interface RuleValueEditorProps {
|
|
1341
|
+
condition: RuleCondition;
|
|
1342
|
+
onChange: (value: JsonValue | undefined) => void;
|
|
1343
|
+
disabled?: boolean;
|
|
1344
|
+
}
|
|
1345
|
+
interface RuleFieldDefinition {
|
|
1346
|
+
id: string;
|
|
1347
|
+
label: string;
|
|
1348
|
+
description?: string;
|
|
1349
|
+
operators?: string[];
|
|
1350
|
+
renderValueEditor?: (props: RuleValueEditorProps) => ReactNode;
|
|
1351
|
+
}
|
|
1352
|
+
interface RuleOperatorDefinition {
|
|
1353
|
+
id: string;
|
|
1354
|
+
label: string;
|
|
1355
|
+
requiresValue?: boolean;
|
|
1356
|
+
}
|
|
1357
|
+
interface RuleActionDefinition {
|
|
1358
|
+
id: string;
|
|
1359
|
+
label: string;
|
|
1360
|
+
renderParameters?: (action: RuleAction, onChange: (parameters: Record<string, JsonValue>) => void, disabled: boolean) => ReactNode;
|
|
1361
|
+
}
|
|
1362
|
+
interface RuleBuilderProps {
|
|
1363
|
+
value: RuleDefinition;
|
|
1364
|
+
onChange: (value: RuleDefinition) => void;
|
|
1365
|
+
fields: RuleFieldDefinition[];
|
|
1366
|
+
operators: RuleOperatorDefinition[];
|
|
1367
|
+
actions: RuleActionDefinition[];
|
|
1368
|
+
maxDepth?: number;
|
|
1369
|
+
readOnly?: boolean;
|
|
1370
|
+
validate?: (value: RuleDefinition) => RuleValidationIssue[];
|
|
1371
|
+
className?: string;
|
|
1372
|
+
addConditionLabel?: string;
|
|
1373
|
+
addGroupLabel?: string;
|
|
1374
|
+
addActionLabel?: string;
|
|
1375
|
+
}
|
|
1376
|
+
/** Declarative controlled when-conditions-to-actions editor with bounded nesting. */
|
|
1377
|
+
declare function RuleBuilder({ value, onChange, fields, operators, actions, maxDepth, readOnly, validate, className, addConditionLabel, addGroupLabel, addActionLabel, }: RuleBuilderProps): react.JSX.Element;
|
|
1378
|
+
|
|
1379
|
+
interface BuilderCanvasItem {
|
|
1380
|
+
id: string;
|
|
1381
|
+
type: string;
|
|
1382
|
+
label: string;
|
|
1383
|
+
description?: string;
|
|
1384
|
+
properties?: Record<string, unknown>;
|
|
1385
|
+
}
|
|
1386
|
+
interface BuilderPaletteItem {
|
|
1387
|
+
id: string;
|
|
1388
|
+
label: string;
|
|
1389
|
+
description?: string;
|
|
1390
|
+
create: () => BuilderCanvasItem;
|
|
1391
|
+
}
|
|
1392
|
+
interface BuilderCanvasProps {
|
|
1393
|
+
items: BuilderCanvasItem[];
|
|
1394
|
+
onItemsChange: (items: BuilderCanvasItem[]) => void;
|
|
1395
|
+
palette: BuilderPaletteItem[];
|
|
1396
|
+
selectedId?: string;
|
|
1397
|
+
onSelect?: (id: string | undefined) => void;
|
|
1398
|
+
renderItem?: (item: BuilderCanvasItem, selected: boolean) => ReactNode;
|
|
1399
|
+
renderProperties?: (item: BuilderCanvasItem, onChange: (item: BuilderCanvasItem) => void) => ReactNode;
|
|
1400
|
+
loading?: boolean;
|
|
1401
|
+
error?: string;
|
|
1402
|
+
onRetry?: () => void;
|
|
1403
|
+
emptyMessage?: string;
|
|
1404
|
+
className?: string;
|
|
1405
|
+
}
|
|
1406
|
+
/** Palette + sortable canvas + property panel scaffold. Owns interaction, never persistence. */
|
|
1407
|
+
declare function BuilderCanvas({ items, onItemsChange, palette, selectedId: controlledSelectedId, onSelect, renderItem, renderProperties, loading, error, onRetry, emptyMessage, className, }: BuilderCanvasProps): react.JSX.Element;
|
|
1408
|
+
|
|
1409
|
+
type SchedulingCalendarView = 'month' | 'week' | 'agenda';
|
|
1410
|
+
type SchedulingEntryState = 'scheduled' | 'conflicted' | 'in-progress' | 'blackout-violation';
|
|
1411
|
+
type SchedulingOverlayKind = 'maintenance' | 'blackout';
|
|
1412
|
+
interface SchedulingCalendarEntry {
|
|
1413
|
+
id: string;
|
|
1414
|
+
title: string;
|
|
1415
|
+
start: string;
|
|
1416
|
+
end: string;
|
|
1417
|
+
state?: SchedulingEntryState;
|
|
1418
|
+
meta?: string;
|
|
1419
|
+
}
|
|
1420
|
+
interface SchedulingCalendarOverlay {
|
|
1421
|
+
id: string;
|
|
1422
|
+
label: string;
|
|
1423
|
+
start: string;
|
|
1424
|
+
end: string;
|
|
1425
|
+
kind: SchedulingOverlayKind;
|
|
1426
|
+
}
|
|
1427
|
+
interface SchedulingCalendarProps {
|
|
1428
|
+
entries: SchedulingCalendarEntry[];
|
|
1429
|
+
anchorDate: string;
|
|
1430
|
+
timeZone: string;
|
|
1431
|
+
view?: SchedulingCalendarView;
|
|
1432
|
+
onViewChange?: (view: SchedulingCalendarView) => void;
|
|
1433
|
+
onAnchorDateChange?: (date: string) => void;
|
|
1434
|
+
onSelectEntry?: (entry: SchedulingCalendarEntry) => void;
|
|
1435
|
+
overlays?: SchedulingCalendarOverlay[];
|
|
1436
|
+
filter?: (entry: SchedulingCalendarEntry) => boolean;
|
|
1437
|
+
renderEntry?: (entry: SchedulingCalendarEntry) => ReactNode;
|
|
1438
|
+
locale?: string;
|
|
1439
|
+
loading?: boolean;
|
|
1440
|
+
error?: string;
|
|
1441
|
+
onRetry?: () => void;
|
|
1442
|
+
className?: string;
|
|
1443
|
+
}
|
|
1444
|
+
/** Month/week/agenda calendar for UTC ranges rendered in an explicit IANA time zone. */
|
|
1445
|
+
declare function SchedulingCalendar({ entries, anchorDate, timeZone, view: controlledView, onViewChange, onAnchorDateChange, onSelectEntry, overlays, filter, renderEntry, locale, loading, error, onRetry, className, }: SchedulingCalendarProps): react.JSX.Element;
|
|
1446
|
+
|
|
1447
|
+
interface CalendarDay {
|
|
1448
|
+
date: string;
|
|
1449
|
+
day: number;
|
|
1450
|
+
inMonth: boolean;
|
|
1451
|
+
weekday: number;
|
|
1452
|
+
}
|
|
1453
|
+
interface DateRangeValue {
|
|
1454
|
+
start?: string;
|
|
1455
|
+
end?: string;
|
|
1456
|
+
}
|
|
1457
|
+
interface ZonedDateSpan {
|
|
1458
|
+
start: string;
|
|
1459
|
+
end: string;
|
|
1460
|
+
}
|
|
1461
|
+
declare function toDateKey(date: Date): string;
|
|
1462
|
+
declare function addCalendarDays(value: string, amount: number): string;
|
|
1463
|
+
declare function addCalendarMonths(value: string, amount: number): string;
|
|
1464
|
+
declare function startOfMonth(value: string): string;
|
|
1465
|
+
declare function buildMonthGrid(month: string, weekStartsOn?: 0 | 1): CalendarDay[];
|
|
1466
|
+
declare function zonedDateKey(instant: string | Date, timeZone: string): string;
|
|
1467
|
+
declare function zonedDateSpan(start: string, end: string, timeZone: string): ZonedDateSpan;
|
|
1468
|
+
declare function enumerateDateSpan(span: ZonedDateSpan, limit?: number): string[];
|
|
1469
|
+
declare function selectRangeDate(current: DateRangeValue, date: string): DateRangeValue;
|
|
1470
|
+
declare function isDateInRange(date: string, value: DateRangeValue): boolean;
|
|
1471
|
+
declare function isDateUnavailable(date: string, options: {
|
|
1472
|
+
min?: string;
|
|
1473
|
+
max?: string;
|
|
1474
|
+
isDisabled?: (date: string) => boolean;
|
|
1475
|
+
}): boolean;
|
|
1476
|
+
|
|
1477
|
+
interface DateRangePickerProps {
|
|
1478
|
+
value: DateRangeValue;
|
|
1479
|
+
onChange: (value: DateRangeValue) => void;
|
|
1480
|
+
visibleMonth?: string;
|
|
1481
|
+
onVisibleMonthChange?: (month: string) => void;
|
|
1482
|
+
months?: number;
|
|
1483
|
+
min?: string;
|
|
1484
|
+
max?: string;
|
|
1485
|
+
isDateDisabled?: (date: string) => boolean;
|
|
1486
|
+
locale?: string;
|
|
1487
|
+
label?: string;
|
|
1488
|
+
invalid?: boolean;
|
|
1489
|
+
invalidMessage?: string;
|
|
1490
|
+
disabled?: boolean;
|
|
1491
|
+
className?: string;
|
|
1492
|
+
}
|
|
1493
|
+
/** Controlled, two-month range picker using the UIx calendar language. */
|
|
1494
|
+
declare function DateRangePicker({ value, onChange, visibleMonth: controlledMonth, onVisibleMonthChange, months, min, max, isDateDisabled, locale, label, invalid, invalidMessage, disabled, className, }: DateRangePickerProps): react.JSX.Element;
|
|
1495
|
+
|
|
1496
|
+
interface RelationshipGraphNode {
|
|
1497
|
+
id: string;
|
|
1498
|
+
label: string;
|
|
1499
|
+
type?: string;
|
|
1500
|
+
description?: string;
|
|
1501
|
+
x?: number;
|
|
1502
|
+
y?: number;
|
|
1503
|
+
}
|
|
1504
|
+
interface RelationshipGraphEdge {
|
|
1505
|
+
id: string;
|
|
1506
|
+
source: string;
|
|
1507
|
+
target: string;
|
|
1508
|
+
type?: string;
|
|
1509
|
+
label?: string;
|
|
1510
|
+
}
|
|
1511
|
+
interface PositionedRelationshipNode extends RelationshipGraphNode {
|
|
1512
|
+
x: number;
|
|
1513
|
+
y: number;
|
|
1514
|
+
depth: number;
|
|
1515
|
+
}
|
|
1516
|
+
interface BoundedRelationshipGraph {
|
|
1517
|
+
nodes: RelationshipGraphNode[];
|
|
1518
|
+
edges: RelationshipGraphEdge[];
|
|
1519
|
+
omittedNodeCount: number;
|
|
1520
|
+
}
|
|
1521
|
+
declare function boundRelationshipGraph(nodes: RelationshipGraphNode[], edges: RelationshipGraphEdge[], maxNodes?: number): BoundedRelationshipGraph;
|
|
1522
|
+
declare function relationshipNeighbors(nodeId: string, edges: RelationshipGraphEdge[]): string[];
|
|
1523
|
+
declare function layoutRelationshipGraph(nodes: RelationshipGraphNode[], edges: RelationshipGraphEdge[], rootId?: string): PositionedRelationshipNode[];
|
|
1524
|
+
declare function traverseRelationshipNode(nodes: RelationshipGraphNode[], currentId: string | undefined, direction: -1 | 1): string | undefined;
|
|
1525
|
+
|
|
1526
|
+
interface RelationshipGraphLegendItem {
|
|
1527
|
+
id: string;
|
|
1528
|
+
label: string;
|
|
1529
|
+
}
|
|
1530
|
+
interface RelationshipGraphProps {
|
|
1531
|
+
nodes: RelationshipGraphNode[];
|
|
1532
|
+
edges: RelationshipGraphEdge[];
|
|
1533
|
+
selectedId?: string;
|
|
1534
|
+
onSelect?: (node: RelationshipGraphNode) => void;
|
|
1535
|
+
onExpandNeighbors?: (node: RelationshipGraphNode) => void;
|
|
1536
|
+
onOpenDetails?: (node: RelationshipGraphNode) => void;
|
|
1537
|
+
maxNodes?: number;
|
|
1538
|
+
density?: 'compact' | 'standard';
|
|
1539
|
+
highlightedNodeIds?: ReadonlySet<string>;
|
|
1540
|
+
conflictedNodeIds?: ReadonlySet<string>;
|
|
1541
|
+
highlightedEdgeIds?: ReadonlySet<string>;
|
|
1542
|
+
conflictedEdgeIds?: ReadonlySet<string>;
|
|
1543
|
+
legend?: RelationshipGraphLegendItem[];
|
|
1544
|
+
loading?: boolean;
|
|
1545
|
+
error?: string;
|
|
1546
|
+
onRetry?: () => void;
|
|
1547
|
+
className?: string;
|
|
1548
|
+
}
|
|
1549
|
+
/** Bounded, deterministic SVG relationship view with an equivalent accessible list. */
|
|
1550
|
+
declare function RelationshipGraph({ nodes, edges, selectedId, onSelect, onExpandNeighbors, onOpenDetails, maxNodes, density, highlightedNodeIds, conflictedNodeIds, highlightedEdgeIds, conflictedEdgeIds, legend, loading, error, onRetry, className, }: RelationshipGraphProps): react.JSX.Element;
|
|
1551
|
+
|
|
1552
|
+
interface MatchReviewField {
|
|
1553
|
+
id: string;
|
|
1554
|
+
label: string;
|
|
1555
|
+
render?: (value: JsonValue | undefined, record: Record<string, JsonValue>) => ReactNode;
|
|
1556
|
+
}
|
|
1557
|
+
interface MatchReviewCandidate {
|
|
1558
|
+
id: string;
|
|
1559
|
+
record: Record<string, JsonValue>;
|
|
1560
|
+
confidence?: number;
|
|
1561
|
+
status?: 'pending' | 'resolved';
|
|
1562
|
+
decision?: 'accepted' | 'dismissed' | 'split' | 'other';
|
|
1563
|
+
}
|
|
1564
|
+
type MatchReviewAction = 'accept' | 'dismiss' | 'split' | 'pick-other';
|
|
1565
|
+
interface MatchBulkResult {
|
|
1566
|
+
succeeded: number;
|
|
1567
|
+
failed?: number;
|
|
1568
|
+
}
|
|
1569
|
+
interface MatchReviewProps {
|
|
1570
|
+
incoming: Record<string, JsonValue>;
|
|
1571
|
+
incomingLabel?: string;
|
|
1572
|
+
fields: MatchReviewField[];
|
|
1573
|
+
candidates: MatchReviewCandidate[];
|
|
1574
|
+
selectedIds?: Set<string>;
|
|
1575
|
+
onSelectionChange?: (ids: Set<string>) => void;
|
|
1576
|
+
onDecision: (candidateId: string, action: MatchReviewAction) => void;
|
|
1577
|
+
onBulkDecision?: (candidateIds: string[], action: Extract<MatchReviewAction, 'accept' | 'dismiss'>) => void | MatchBulkResult | Promise<void | MatchBulkResult>;
|
|
1578
|
+
loading?: boolean;
|
|
1579
|
+
error?: string;
|
|
1580
|
+
onRetry?: () => void;
|
|
1581
|
+
className?: string;
|
|
1582
|
+
}
|
|
1583
|
+
/** Generic descriptor-driven incoming-record to candidate-match decision surface. */
|
|
1584
|
+
declare function MatchReview({ incoming, incomingLabel, fields, candidates, selectedIds, onSelectionChange, onDecision, onBulkDecision, loading, error, onRetry, className, }: MatchReviewProps): react.JSX.Element;
|
|
1585
|
+
|
|
1586
|
+
interface MetricInputProps {
|
|
1587
|
+
value: number | null;
|
|
1588
|
+
onValueChange: (value: number | null) => void;
|
|
1589
|
+
min?: number;
|
|
1590
|
+
max?: number;
|
|
1591
|
+
step?: number;
|
|
1592
|
+
unit?: string;
|
|
1593
|
+
label: string;
|
|
1594
|
+
invalid?: boolean;
|
|
1595
|
+
errorMessage?: string;
|
|
1596
|
+
disabled?: boolean;
|
|
1597
|
+
readOnly?: boolean;
|
|
1598
|
+
parse?: (input: string) => number | null;
|
|
1599
|
+
format?: (value: number | null) => string;
|
|
1600
|
+
className?: string;
|
|
1601
|
+
id?: string;
|
|
1602
|
+
}
|
|
1603
|
+
/** Accessible numeric recipe composed from Input and the UIx stepper controls. */
|
|
1604
|
+
declare function MetricInput({ value, onValueChange, min, max, step, unit, label, invalid, errorMessage, disabled, readOnly, parse, format, className, id: providedId, }: MetricInputProps): react.JSX.Element;
|
|
1605
|
+
|
|
1606
|
+
declare function clampMetricValue(value: number, min?: number, max?: number): number;
|
|
1607
|
+
declare function stepMetricValue(value: number | null, direction: -1 | 1, options?: {
|
|
1608
|
+
min?: number;
|
|
1609
|
+
max?: number;
|
|
1610
|
+
step?: number;
|
|
1611
|
+
}): number;
|
|
1612
|
+
declare function parseMetricValue(value: string): number | null;
|
|
1613
|
+
|
|
1614
|
+
interface LicensePositionBarProps extends Omit<HTMLAttributes<HTMLDivElement>, 'children'> {
|
|
1615
|
+
consumed: number;
|
|
1616
|
+
entitled: number;
|
|
1617
|
+
consumedLabel?: string;
|
|
1618
|
+
entitledLabel?: string;
|
|
1619
|
+
availableLabel?: string;
|
|
1620
|
+
overLabel?: string;
|
|
1621
|
+
unit?: string;
|
|
1622
|
+
formatValue?: (value: number) => string;
|
|
1623
|
+
}
|
|
1624
|
+
/** Capacity-versus-limit recipe with a visible and textual over-allocation state. */
|
|
1625
|
+
declare function LicensePositionBar({ consumed, entitled, consumedLabel, entitledLabel, availableLabel, overLabel, unit, formatValue, className, ...props }: LicensePositionBarProps): react.JSX.Element;
|
|
1626
|
+
|
|
1627
|
+
interface BrandProfileTypography {
|
|
1628
|
+
sans?: string;
|
|
1629
|
+
heading?: string;
|
|
1630
|
+
mono?: string;
|
|
1631
|
+
}
|
|
1632
|
+
interface BrandProfileLogo {
|
|
1633
|
+
src: string;
|
|
1634
|
+
alt: string;
|
|
1635
|
+
}
|
|
1636
|
+
interface BrandProfile {
|
|
1637
|
+
id: string;
|
|
1638
|
+
name: string;
|
|
1639
|
+
brand: string;
|
|
1640
|
+
brandForeground: string;
|
|
1641
|
+
typography?: BrandProfileTypography;
|
|
1642
|
+
logo?: BrandProfileLogo;
|
|
1643
|
+
}
|
|
1644
|
+
interface AppliedBrandProfileSnapshot {
|
|
1645
|
+
profileId?: string;
|
|
1646
|
+
properties: Record<string, string>;
|
|
1647
|
+
logoSrc?: string;
|
|
1648
|
+
logoAlt?: string;
|
|
1649
|
+
}
|
|
1650
|
+
/** Apply only the existing UIx brand/font slots and readable logo metadata. */
|
|
1651
|
+
declare function applyBrandProfile(profile: BrandProfile, target?: HTMLElement | null): AppliedBrandProfileSnapshot | undefined;
|
|
1652
|
+
declare function restoreBrandProfile(snapshot: AppliedBrandProfileSnapshot, target?: HTMLElement | null): void;
|
|
1653
|
+
interface BrandProfileEditorProps {
|
|
1654
|
+
value: BrandProfile;
|
|
1655
|
+
onChange: (profile: BrandProfile) => void;
|
|
1656
|
+
profiles?: BrandProfile[];
|
|
1657
|
+
onSelectProfile?: (profile: BrandProfile) => void;
|
|
1658
|
+
onApply?: (profile: BrandProfile) => void;
|
|
1659
|
+
applyTarget?: HTMLElement | null;
|
|
1660
|
+
onLogoFile?: (file: File) => void;
|
|
1661
|
+
colorPresets?: string[];
|
|
1662
|
+
className?: string;
|
|
1663
|
+
}
|
|
1664
|
+
/** Small controlled editor composition for serializable UIx brand profiles. */
|
|
1665
|
+
declare function BrandProfileEditor({ value, onChange, profiles, onSelectProfile, onApply, applyTarget, onLogoFile, colorPresets, className, }: BrandProfileEditorProps): react.JSX.Element;
|
|
1666
|
+
/** Canonical Phase 46.9 export; equivalent to BrandProfileEditor. */
|
|
1667
|
+
declare const BrandProfiles: typeof BrandProfileEditor;
|
|
1668
|
+
|
|
1669
|
+
type DiffKind = 'added' | 'removed' | 'changed' | 'conflicted';
|
|
1670
|
+
type DiffResolution = 'accept' | 'skip' | 'pending';
|
|
1671
|
+
interface DiffEntry {
|
|
1672
|
+
path: string;
|
|
1673
|
+
kind: DiffKind;
|
|
1674
|
+
base?: JsonValue;
|
|
1675
|
+
current?: JsonValue;
|
|
1676
|
+
incoming?: JsonValue;
|
|
1677
|
+
}
|
|
1678
|
+
interface DiffSummary {
|
|
1679
|
+
added: number;
|
|
1680
|
+
removed: number;
|
|
1681
|
+
changed: number;
|
|
1682
|
+
conflicted: number;
|
|
1683
|
+
resolved: number;
|
|
1684
|
+
pending: number;
|
|
1685
|
+
}
|
|
1686
|
+
declare function buildThreeWayDiff(base: JsonValue | undefined, current: JsonValue | undefined, incoming: JsonValue | undefined, path?: string): DiffEntry[];
|
|
1687
|
+
declare function summarizeDiff(entries: DiffEntry[], resolutions?: Record<string, DiffResolution>): DiffSummary;
|
|
1688
|
+
|
|
1689
|
+
interface DiffViewerProps {
|
|
1690
|
+
base?: JsonValue;
|
|
1691
|
+
current?: JsonValue;
|
|
1692
|
+
incoming?: JsonValue;
|
|
1693
|
+
entries?: DiffEntry[];
|
|
1694
|
+
resolutions?: Record<string, DiffResolution>;
|
|
1695
|
+
onResolutionChange?: (path: string, resolution: DiffResolution) => void;
|
|
1696
|
+
labels?: Partial<Record<'base' | 'current' | 'incoming', string>>;
|
|
1697
|
+
className?: string;
|
|
1698
|
+
}
|
|
1699
|
+
/** Three-way configuration diff with per-entry keyboard-operable resolution. */
|
|
1700
|
+
declare function DiffViewer({ base, current, incoming, entries: providedEntries, resolutions: controlledResolutions, onResolutionChange, labels, className, }: DiffViewerProps): react.JSX.Element;
|
|
1701
|
+
|
|
1702
|
+
interface ColorPickerProps {
|
|
1703
|
+
value: string;
|
|
1704
|
+
onChange: (value: string) => void;
|
|
1705
|
+
foreground: string;
|
|
1706
|
+
presets?: string[];
|
|
1707
|
+
recent?: string[];
|
|
1708
|
+
minimumContrast?: number;
|
|
1709
|
+
label?: string;
|
|
1710
|
+
disabled?: boolean;
|
|
1711
|
+
className?: string;
|
|
1712
|
+
}
|
|
1713
|
+
/** Token-friendly HSV/hex picker with a fully keyboard-operable path and contrast feedback. */
|
|
1714
|
+
declare function ColorPicker({ value, onChange, foreground, presets, recent, minimumContrast, label, disabled, className, }: ColorPickerProps): react.JSX.Element;
|
|
1715
|
+
|
|
1716
|
+
interface RgbColor {
|
|
1717
|
+
r: number;
|
|
1718
|
+
g: number;
|
|
1719
|
+
b: number;
|
|
1720
|
+
}
|
|
1721
|
+
interface HsvColor {
|
|
1722
|
+
h: number;
|
|
1723
|
+
s: number;
|
|
1724
|
+
v: number;
|
|
1725
|
+
}
|
|
1726
|
+
declare function normalizeHex(value: string): string | undefined;
|
|
1727
|
+
declare function hexToRgb(value: string): RgbColor | undefined;
|
|
1728
|
+
declare function rgbToHex({ r, g, b }: RgbColor): string;
|
|
1729
|
+
declare function rgbToHsv({ r, g, b }: RgbColor): HsvColor;
|
|
1730
|
+
declare function hsvToRgb({ h, s, v }: HsvColor): RgbColor;
|
|
1731
|
+
declare function hsvToHex(value: HsvColor): string;
|
|
1732
|
+
declare function contrastRatio(background: string, foreground: string): number | undefined;
|
|
1733
|
+
declare function meetsContrast(background: string, foreground: string, minimum?: number): boolean;
|
|
1734
|
+
|
|
1735
|
+
export { Alert, type AlertProps, type AlertTone, type Align, AppShell, type AppShellProps, type AppliedBrandProfileSnapshot, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, type BoundedRelationshipGraph, type BrandProfile, BrandProfileEditor, type BrandProfileEditorProps, type BrandProfileLogo, type BrandProfileTypography, BrandProfiles, BuilderCanvas, type BuilderCanvasItem, type BuilderCanvasProps, type BuilderPaletteItem, BulkBar, type BulkBarProps, Button, ButtonGroup, type ButtonGroupProps, type ButtonProps, type CalendarDay, Card, type CardProps, CellStrong, CellSub, Checkbox, type CheckboxProps, ColorPicker, type ColorPickerProps, type ColumnFilter, CommandGroup, type CommandGroupProps, CommandItem, type CommandItemProps, CommandPalette, type CommandPaletteProps, Comment, type CommentProps, Comments, type CommentsProps, Composer, ComposerBar, type ComposerBarProps, type ComposerProps, ContentList, ContentListItem, type ContentListItemProps, type ContentListProps, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DescriptionItem, type DescriptionItemProps, DescriptionList, type DescriptionListItem, type DescriptionListProps, DetailLayout, type DetailLayoutProps, type DiffEntry, type DiffKind, type DiffResolution, type DiffSummary, DiffViewer, type DiffViewerProps, Drawer, type DrawerProps, EmptyState, type EmptyStateProps, ErrorState, type ErrorStateProps, EventRow, type EventRowProps, ExpandToggle, type ExpandToggleProps, FeaturedRundown, FeaturedRundownItem, type FeaturedRundownItemProps, type FeaturedRundownProps, FeaturedStage, type FeaturedStageProps, Field, type FieldProps, type FilterKind, type FilterOp, type FlatNode, Highlighted, type HighlightedProps, type HsvColor, Inbox, InboxDetail, type InboxDetailProps, InboxItem, type InboxItemProps, InboxList, type InboxListProps, type InboxProps, Input, InputGroup, type InputGroupProps, type InputProps, type JsonPrimitive, type JsonValue, Kanban, KanbanCard, type KanbanCardProps, KanbanColumn, type KanbanColumnProps, type KanbanProps, Label, type LabelProps, LicensePositionBar, type LicensePositionBarProps, List, ListItem, type ListItemProps, type ListProps, LoadingState, type LoadingStateProps, Mark, type MarkProps, type MatchBulkResult, MatchReview, type MatchReviewAction, type MatchReviewCandidate, type MatchReviewField, type MatchReviewProps, Meter, type MeterProps, type MeterTone, MetricInput, type MetricInputProps, Modal, type ModalProps, type NavFavouriteItem, NavFavourites, type NavFavouritesLabels, type NavFavouritesProps, NavGroup, type NavGroupProps, NavItem, type NavItemProps, NewsLead, type NewsLeadProps, Note, type NoteProps, type NoteTone, NoticeQueue, type NoticeQueueProps, PageHeader, type PageHeaderProps, PageIntro, type PageIntroProps, Pagination, type PaginationProps, Peek, type PeekProps, type PillTone, type PillTreatment, type Placement, Popover, type PopoverProps, type PositionOptions, type PositionResult, type PositionedRelationshipNode, type Primitive, Progress, type ProgressProps, Prose, type ProseProps, Radio, RadioGroup, type RadioGroupProps, type RadioProps, type Rect, RelationshipGraph, type RelationshipGraphEdge, type RelationshipGraphLegendItem, type RelationshipGraphNode, type RelationshipGraphProps, ResourceGrid, type ResourceGridProps, type RgbColor, type Row, RowAction, type RowActionProps, RowActions, type RowActionsProps, type RuleAction, type RuleActionDefinition, RuleBuilder, type RuleBuilderProps, type RuleCondition, type RuleDefinition, type RuleFieldDefinition, type RuleGroup, type RuleOperatorDefinition, type RuleValidationIssue, type RuleValueEditorProps, SchedulingCalendar, type SchedulingCalendarEntry, type SchedulingCalendarOverlay, type SchedulingCalendarProps, type SchedulingCalendarView, type SchedulingEntryState, type SchedulingOverlayKind, SectionHead, type SectionHeadProps, type Segment, Segmented, SegmentedOption, type SegmentedOptionProps, type SegmentedProps, Select, type SelectAllState, type SelectProps, type ShellNav, type Side, Sidebar, type SidebarProps, SidebarSection, type SidebarSectionProps, type Size, Skeleton, type SkeletonProps, type SortDir, type SortDirection, type SortKey, Spinner, type SpinnerProps, StarButton, type StarButtonProps, Stat, StatLine, type StatLineItem, type StatLineProps, type StatProps, type StatTrend, StatusPill, type StatusPillProps, StatusRow, type StatusRowProps, SubNavItem, type SubNavItemProps, Switch, type SwitchProps, Tab, type TabProps, Table, type TableDensity, type TableProps, TableWrap, type TableWrapProps, Tabs, type TabsProps, Td, type TdProps, Textarea, type TextareaProps, Th, type ThProps, Timeline, TimelineItem, type TimelineItemProps, type TimelineProps, Toast, type ToastProps, type ToastTone, Toaster, type ToasterProps, Tooltip, type TooltipProps, Tr, type TrProps, Tree, type TreeLike, type TreeNavAction, type TreeNodeData, type TreeNodeProps, type TreeProps, type UseAnchoredPositionOptions, type UseTableOptions, type UseTableResult, type UseVirtualRowsOptions, type UseVirtualRowsResult, UserChip, type UserChipProps, type ViewState, type VirtualWindow, type ZonedDateSpan, addCalendarDays, addCalendarMonths, appendRuleNode, applyBrandProfile, applyFilters, boundRelationshipGraph, buildMonthGrid, buildThreeWayDiff, clampMetricValue, clampWidth, computePosition, contrastRatio, cx, enumerateDateSpan, findRuleNodeDepth, flattenTree, hexToRgb, highlightSegments, hsvToHex, hsvToRgb, isDateInRange, isDateUnavailable, isRuleGroup, layoutRelationshipGraph, mapRuleGroup, matchFilter, meetsContrast, mergePinned, moveRuleNode, multiSort, nextSortDir, normalizeHex, parseMetricValue, parseView, relationshipNeighbors, removeRuleNode, reorder, restoreBrandProfile, rgbToHex, rgbToHsv, ruleDepth, searchRows, selectAllState, selectRangeDate, serializeView, shouldVirtualize, startOfMonth, stepMetricValue, summarizeDiff, summarizeRule, toDateKey, toggleId, togglePage, toggleSort, traverseRelationshipNode, treeNav, useAnchoredPosition, useDialog, useTable, useVirtualRows, validateRuleDefinition, virtualWindow, zonedDateKey, zonedDateSpan };
|
package/dist/index.d.ts
CHANGED
|
@@ -51,4 +51,22 @@ export { Kanban, KanbanCard, KanbanCardProps, KanbanColumn, KanbanColumnProps, K
|
|
|
51
51
|
export { Tree, TreeNodeData, TreeNodeProps, TreeProps } from './components/Tree.js';
|
|
52
52
|
export { FlatNode, TreeLike, TreeNavAction, flattenTree, treeNav } from './tree-model.js';
|
|
53
53
|
export { ContentList, ContentListItem, ContentListItemProps, ContentListProps, EventRow, EventRowProps, FeaturedRundown, FeaturedRundownItem, FeaturedRundownItemProps, FeaturedRundownProps, FeaturedStage, FeaturedStageProps, NewsLead, NewsLeadProps, NoticeQueue, NoticeQueueProps, PageIntro, PageIntroProps, ResourceGrid, ResourceGridProps, SectionHead, SectionHeadProps, StatLine, StatLineItem, StatLineProps, StatusRow, StatusRowProps } from './components/EditorialHome.js';
|
|
54
|
+
export { JsonPrimitive, JsonValue } from './json-value.js';
|
|
55
|
+
export { RuleActionDefinition, RuleBuilder, RuleBuilderProps, RuleFieldDefinition, RuleOperatorDefinition, RuleValueEditorProps } from './components/RuleBuilder.js';
|
|
56
|
+
export { RuleAction, RuleCondition, RuleDefinition, RuleGroup, RuleValidationIssue, appendRuleNode, findRuleNodeDepth, isRuleGroup, mapRuleGroup, moveRuleNode, removeRuleNode, ruleDepth, summarizeRule, validateRuleDefinition } from './rule-builder-model.js';
|
|
57
|
+
export { BuilderCanvas, BuilderCanvasItem, BuilderCanvasProps, BuilderPaletteItem } from './components/BuilderCanvas.js';
|
|
58
|
+
export { SchedulingCalendar, SchedulingCalendarEntry, SchedulingCalendarOverlay, SchedulingCalendarProps, SchedulingCalendarView, SchedulingEntryState, SchedulingOverlayKind } from './components/SchedulingCalendar.js';
|
|
59
|
+
export { DateRangePicker, DateRangePickerProps } from './components/DateRangePicker.js';
|
|
60
|
+
export { CalendarDay, DateRangeValue, ZonedDateSpan, addCalendarDays, addCalendarMonths, buildMonthGrid, enumerateDateSpan, isDateInRange, isDateUnavailable, selectRangeDate, startOfMonth, toDateKey, zonedDateKey, zonedDateSpan } from './calendar-model.js';
|
|
61
|
+
export { RelationshipGraph, RelationshipGraphLegendItem, RelationshipGraphProps } from './components/RelationshipGraph.js';
|
|
62
|
+
export { BoundedRelationshipGraph, PositionedRelationshipNode, RelationshipGraphEdge, RelationshipGraphNode, boundRelationshipGraph, layoutRelationshipGraph, relationshipNeighbors, traverseRelationshipNode } from './relationship-graph-model.js';
|
|
63
|
+
export { MatchBulkResult, MatchReview, MatchReviewAction, MatchReviewCandidate, MatchReviewField, MatchReviewProps } from './components/MatchReview.js';
|
|
64
|
+
export { MetricInput, MetricInputProps } from './components/MetricInput.js';
|
|
65
|
+
export { clampMetricValue, parseMetricValue, stepMetricValue } from './metric-model.js';
|
|
66
|
+
export { LicensePositionBar, LicensePositionBarProps } from './components/LicensePositionBar.js';
|
|
67
|
+
export { AppliedBrandProfileSnapshot, BrandProfile, BrandProfileEditor, BrandProfileEditorProps, BrandProfileLogo, BrandProfileTypography, BrandProfiles, applyBrandProfile, restoreBrandProfile } from './components/BrandProfiles.js';
|
|
68
|
+
export { DiffViewer, DiffViewerProps } from './components/DiffViewer.js';
|
|
69
|
+
export { DiffEntry, DiffKind, DiffResolution, DiffSummary, buildThreeWayDiff, summarizeDiff } from './diff-model.js';
|
|
70
|
+
export { ColorPicker, ColorPickerProps } from './components/ColorPicker.js';
|
|
71
|
+
export { HsvColor, RgbColor, contrastRatio, hexToRgb, hsvToHex, hsvToRgb, meetsContrast, normalizeHex, rgbToHex, rgbToHsv } from './color-model.js';
|
|
54
72
|
import 'react';
|
package/dist/index.js
CHANGED
|
@@ -79,11 +79,53 @@ import {
|
|
|
79
79
|
EventRow,
|
|
80
80
|
StatusRow
|
|
81
81
|
} from "./components/EditorialHome.js";
|
|
82
|
+
import { RuleBuilder } from "./components/RuleBuilder.js";
|
|
83
|
+
import {
|
|
84
|
+
appendRuleNode,
|
|
85
|
+
findRuleNodeDepth,
|
|
86
|
+
isRuleGroup,
|
|
87
|
+
mapRuleGroup,
|
|
88
|
+
moveRuleNode,
|
|
89
|
+
removeRuleNode,
|
|
90
|
+
ruleDepth,
|
|
91
|
+
summarizeRule,
|
|
92
|
+
validateRuleDefinition
|
|
93
|
+
} from "./rule-builder-model.js";
|
|
94
|
+
import { BuilderCanvas } from "./components/BuilderCanvas.js";
|
|
95
|
+
import { SchedulingCalendar } from "./components/SchedulingCalendar.js";
|
|
96
|
+
import { DateRangePicker } from "./components/DateRangePicker.js";
|
|
97
|
+
import {
|
|
98
|
+
addCalendarDays,
|
|
99
|
+
addCalendarMonths,
|
|
100
|
+
buildMonthGrid,
|
|
101
|
+
enumerateDateSpan,
|
|
102
|
+
isDateInRange,
|
|
103
|
+
isDateUnavailable,
|
|
104
|
+
selectRangeDate,
|
|
105
|
+
startOfMonth,
|
|
106
|
+
toDateKey,
|
|
107
|
+
zonedDateKey,
|
|
108
|
+
zonedDateSpan
|
|
109
|
+
} from "./calendar-model.js";
|
|
110
|
+
import { RelationshipGraph } from "./components/RelationshipGraph.js";
|
|
111
|
+
import { boundRelationshipGraph, layoutRelationshipGraph, relationshipNeighbors, traverseRelationshipNode } from "./relationship-graph-model.js";
|
|
112
|
+
import { MatchReview } from "./components/MatchReview.js";
|
|
113
|
+
import { MetricInput } from "./components/MetricInput.js";
|
|
114
|
+
import { clampMetricValue, parseMetricValue, stepMetricValue } from "./metric-model.js";
|
|
115
|
+
import { LicensePositionBar } from "./components/LicensePositionBar.js";
|
|
116
|
+
import { BrandProfiles, BrandProfileEditor, applyBrandProfile, restoreBrandProfile } from "./components/BrandProfiles.js";
|
|
117
|
+
import { DiffViewer } from "./components/DiffViewer.js";
|
|
118
|
+
import { buildThreeWayDiff, summarizeDiff } from "./diff-model.js";
|
|
119
|
+
import { ColorPicker } from "./components/ColorPicker.js";
|
|
120
|
+
import { contrastRatio, hexToRgb, hsvToHex, hsvToRgb, meetsContrast, normalizeHex, rgbToHex, rgbToHsv } from "./color-model.js";
|
|
82
121
|
export {
|
|
83
122
|
Alert,
|
|
84
123
|
AppShell,
|
|
85
124
|
Avatar,
|
|
86
125
|
AvatarGroup,
|
|
126
|
+
BrandProfileEditor,
|
|
127
|
+
BrandProfiles,
|
|
128
|
+
BuilderCanvas,
|
|
87
129
|
BulkBar,
|
|
88
130
|
Button,
|
|
89
131
|
ButtonGroup,
|
|
@@ -91,6 +133,7 @@ export {
|
|
|
91
133
|
CellStrong,
|
|
92
134
|
CellSub,
|
|
93
135
|
Checkbox,
|
|
136
|
+
ColorPicker,
|
|
94
137
|
CommandGroup,
|
|
95
138
|
CommandItem,
|
|
96
139
|
CommandPalette,
|
|
@@ -100,9 +143,11 @@ export {
|
|
|
100
143
|
ComposerBar,
|
|
101
144
|
ContentList,
|
|
102
145
|
ContentListItem,
|
|
146
|
+
DateRangePicker,
|
|
103
147
|
DescriptionItem,
|
|
104
148
|
DescriptionList,
|
|
105
149
|
DetailLayout,
|
|
150
|
+
DiffViewer,
|
|
106
151
|
Drawer,
|
|
107
152
|
EmptyState,
|
|
108
153
|
ErrorState,
|
|
@@ -123,11 +168,14 @@ export {
|
|
|
123
168
|
KanbanCard,
|
|
124
169
|
KanbanColumn,
|
|
125
170
|
Label,
|
|
171
|
+
LicensePositionBar,
|
|
126
172
|
List,
|
|
127
173
|
ListItem,
|
|
128
174
|
LoadingState,
|
|
129
175
|
Mark,
|
|
176
|
+
MatchReview,
|
|
130
177
|
Meter,
|
|
178
|
+
MetricInput,
|
|
131
179
|
Modal,
|
|
132
180
|
NavFavourites,
|
|
133
181
|
NavGroup,
|
|
@@ -144,9 +192,12 @@ export {
|
|
|
144
192
|
Prose,
|
|
145
193
|
Radio,
|
|
146
194
|
RadioGroup,
|
|
195
|
+
RelationshipGraph,
|
|
147
196
|
ResourceGrid,
|
|
148
197
|
RowAction,
|
|
149
198
|
RowActions,
|
|
199
|
+
RuleBuilder,
|
|
200
|
+
SchedulingCalendar,
|
|
150
201
|
SectionHead,
|
|
151
202
|
Segmented,
|
|
152
203
|
SegmentedOption,
|
|
@@ -177,12 +228,51 @@ export {
|
|
|
177
228
|
Tr,
|
|
178
229
|
Tree,
|
|
179
230
|
UserChip,
|
|
231
|
+
addCalendarDays,
|
|
232
|
+
addCalendarMonths,
|
|
233
|
+
appendRuleNode,
|
|
234
|
+
applyBrandProfile,
|
|
235
|
+
boundRelationshipGraph,
|
|
236
|
+
buildMonthGrid,
|
|
237
|
+
buildThreeWayDiff,
|
|
238
|
+
clampMetricValue,
|
|
180
239
|
computePosition,
|
|
240
|
+
contrastRatio,
|
|
181
241
|
cx,
|
|
242
|
+
enumerateDateSpan,
|
|
243
|
+
findRuleNodeDepth,
|
|
182
244
|
flattenTree,
|
|
245
|
+
hexToRgb,
|
|
246
|
+
hsvToHex,
|
|
247
|
+
hsvToRgb,
|
|
248
|
+
isDateInRange,
|
|
249
|
+
isDateUnavailable,
|
|
250
|
+
isRuleGroup,
|
|
251
|
+
layoutRelationshipGraph,
|
|
252
|
+
mapRuleGroup,
|
|
253
|
+
meetsContrast,
|
|
254
|
+
moveRuleNode,
|
|
255
|
+
normalizeHex,
|
|
256
|
+
parseMetricValue,
|
|
257
|
+
relationshipNeighbors,
|
|
258
|
+
removeRuleNode,
|
|
259
|
+
restoreBrandProfile,
|
|
260
|
+
rgbToHex,
|
|
261
|
+
rgbToHsv,
|
|
262
|
+
ruleDepth,
|
|
263
|
+
selectRangeDate,
|
|
264
|
+
startOfMonth,
|
|
265
|
+
stepMetricValue,
|
|
266
|
+
summarizeDiff,
|
|
267
|
+
summarizeRule,
|
|
268
|
+
toDateKey,
|
|
269
|
+
traverseRelationshipNode,
|
|
183
270
|
treeNav,
|
|
184
271
|
useAnchoredPosition,
|
|
185
272
|
useDialog,
|
|
186
273
|
useTable,
|
|
187
|
-
useVirtualRows
|
|
274
|
+
useVirtualRows,
|
|
275
|
+
validateRuleDefinition,
|
|
276
|
+
zonedDateKey,
|
|
277
|
+
zonedDateSpan
|
|
188
278
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
type JsonValue = JsonPrimitive | JsonValue[] | {
|
|
3
|
+
[key: string]: JsonValue;
|
|
4
|
+
};
|
|
5
|
+
declare function isJsonObject(value: JsonValue | undefined): value is {
|
|
6
|
+
[key: string]: JsonValue;
|
|
7
|
+
};
|
|
8
|
+
declare function jsonEqual(a: JsonValue | undefined, b: JsonValue | undefined): boolean;
|
|
9
|
+
|
|
10
|
+
export { type JsonPrimitive, type JsonValue, isJsonObject, jsonEqual };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
function isJsonObject(value) {
|
|
2
|
+
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
3
|
+
}
|
|
4
|
+
function jsonEqual(a, b) {
|
|
5
|
+
if (a === b) return true;
|
|
6
|
+
if (Array.isArray(a) && Array.isArray(b)) {
|
|
7
|
+
return a.length === b.length && a.every((value, index) => jsonEqual(value, b[index]));
|
|
8
|
+
}
|
|
9
|
+
if (isJsonObject(a) && isJsonObject(b)) {
|
|
10
|
+
const aKeys = Object.keys(a).sort();
|
|
11
|
+
const bKeys = Object.keys(b).sort();
|
|
12
|
+
return aKeys.length === bKeys.length && aKeys.every((key, index) => key === bKeys[index] && jsonEqual(a[key], b[key]));
|
|
13
|
+
}
|
|
14
|
+
return false;
|
|
15
|
+
}
|
|
16
|
+
export {
|
|
17
|
+
isJsonObject,
|
|
18
|
+
jsonEqual
|
|
19
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare function clampMetricValue(value: number, min?: number, max?: number): number;
|
|
2
|
+
declare function stepMetricValue(value: number | null, direction: -1 | 1, options?: {
|
|
3
|
+
min?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
step?: number;
|
|
6
|
+
}): number;
|
|
7
|
+
declare function parseMetricValue(value: string): number | null;
|
|
8
|
+
|
|
9
|
+
export { clampMetricValue, parseMetricValue, stepMetricValue };
|