@nice2dev/ui-buildings 1.1.9 → 1.2.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 +145 -0
- package/README.md +0 -6
- package/dist/index.cjs +19 -19
- package/dist/index.d.ts +11 -63
- package/dist/index.mjs +3236 -3105
- package/dist/ui-buildings.css +1 -1
- package/package.json +4 -4
package/dist/index.d.ts
CHANGED
|
@@ -64,22 +64,13 @@ export declare interface BlindState {
|
|
|
64
64
|
|
|
65
65
|
export declare type BmsProtocol = 'bacnet' | 'dali' | 'lonworks' | 'opc-ua' | 'knx' | 'modbus';
|
|
66
66
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
floors: BuildingFloor[];
|
|
75
|
-
rooms: BuildingZone[];
|
|
76
|
-
devices: BuildingDevice[];
|
|
77
|
-
scenes: BuildingScene[];
|
|
78
|
-
automations: BuildingAutomation[];
|
|
79
|
-
floorPlan?: FloorPlanFloor[];
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
/** Root aggregated building model used as top-level prop for most components */
|
|
67
|
+
/**
|
|
68
|
+
* Root aggregated building model used as top-level prop for most components.
|
|
69
|
+
*
|
|
70
|
+
* Declared once since 1.2.0. Until then a second `interface Building` earlier in this file
|
|
71
|
+
* merged with this one, which is how `rooms` came to sit next to `zones` — both stay required,
|
|
72
|
+
* exactly as the merged type had them.
|
|
73
|
+
*/
|
|
83
74
|
export declare interface Building {
|
|
84
75
|
id: BuildingId;
|
|
85
76
|
name: string;
|
|
@@ -90,6 +81,8 @@ export declare interface Building {
|
|
|
90
81
|
longitude?: number;
|
|
91
82
|
floors: BuildingFloor[];
|
|
92
83
|
zones: BuildingZone[];
|
|
84
|
+
/** Rooms as zones — kept from the second declaration this type used to merge with. */
|
|
85
|
+
rooms: BuildingZone[];
|
|
93
86
|
devices: BuildingDevice[];
|
|
94
87
|
scenes: BuildingScene[];
|
|
95
88
|
automations: BuildingAutomation[];
|
|
@@ -168,8 +161,6 @@ export declare interface BuildingScene {
|
|
|
168
161
|
description?: string;
|
|
169
162
|
/** Per-device target states applied when the scene activates. */
|
|
170
163
|
deviceTargets: SceneDeviceTarget[];
|
|
171
|
-
/** @deprecated alias for {@link deviceTargets}. */
|
|
172
|
-
devices?: SceneDeviceTarget[];
|
|
173
164
|
isActive?: boolean;
|
|
174
165
|
favorite?: boolean;
|
|
175
166
|
category?: string;
|
|
@@ -352,8 +343,6 @@ export declare interface FloorPlanFloor {
|
|
|
352
343
|
scale?: number;
|
|
353
344
|
/** Floor zones (preferred). */
|
|
354
345
|
zones: FloorPlanZone[];
|
|
355
|
-
/** @deprecated alias for {@link zones}. */
|
|
356
|
-
rooms?: FloorPlanZone[];
|
|
357
346
|
}
|
|
358
347
|
|
|
359
348
|
export declare interface FloorPlanSelection {
|
|
@@ -414,9 +403,6 @@ declare interface HistoryAction {
|
|
|
414
403
|
after: unknown;
|
|
415
404
|
}
|
|
416
405
|
|
|
417
|
-
/** @deprecated Use OccupancyMode instead */
|
|
418
|
-
export declare type HomeMode = OccupancyMode;
|
|
419
|
-
|
|
420
406
|
export declare const LayerPanel: default_2.FC<LayerPanelProps>;
|
|
421
407
|
|
|
422
408
|
declare interface LayerPanelProps {
|
|
@@ -537,10 +523,8 @@ export declare interface NiceAutomationEditorProps {
|
|
|
537
523
|
/** Initial automations when uncontrolled. */
|
|
538
524
|
defaultAutomations?: BuildingAutomation[];
|
|
539
525
|
devices?: BuildingDevice[];
|
|
540
|
-
zones?: BuildingZone[];
|
|
541
526
|
scenes?: BuildingScene[];
|
|
542
527
|
onAutomationsChange?: (automations: BuildingAutomation[]) => void;
|
|
543
|
-
onSave?: (automation: BuildingAutomation) => Promise<void> | void;
|
|
544
528
|
onDelete?: (id: BuildingId) => Promise<void> | void;
|
|
545
529
|
onToggle?: (id: BuildingId, enabled: boolean) => Promise<void> | void;
|
|
546
530
|
readOnly?: boolean;
|
|
@@ -556,25 +540,16 @@ export declare const NiceBuildingDashboard: default_2.FC<NiceBuildingDashboardPr
|
|
|
556
540
|
export declare interface NiceBuildingDashboardProps {
|
|
557
541
|
/** Building model (preferred). */
|
|
558
542
|
building: Building;
|
|
559
|
-
/** @deprecated alias for {@link building}. */
|
|
560
|
-
home?: Building;
|
|
561
543
|
state?: BuildingState;
|
|
562
544
|
onDeviceControl?: (deviceId: BuildingId, state: Partial<DeviceState>) => Promise<void> | void;
|
|
563
545
|
onSceneActivate?: (sceneId: BuildingId) => Promise<void> | void;
|
|
564
546
|
onModeChange?: (mode: OccupancyMode) => void;
|
|
565
|
-
/** @deprecated use {@link onModeChange}. */
|
|
566
|
-
onHomeModeChange?: (mode: OccupancyMode) => void;
|
|
567
547
|
onZoneClick?: (zoneId: BuildingId) => void;
|
|
568
548
|
/** Optional weather widget data. */
|
|
569
549
|
weather?: {
|
|
570
550
|
temperature?: number;
|
|
571
551
|
description?: string;
|
|
572
552
|
};
|
|
573
|
-
showEnergy?: boolean;
|
|
574
|
-
showMap?: boolean;
|
|
575
|
-
showWeather?: boolean;
|
|
576
|
-
density?: DisplayDensity;
|
|
577
|
-
favoriteDeviceIds?: BuildingId[];
|
|
578
553
|
className?: string;
|
|
579
554
|
style?: CSSProperties;
|
|
580
555
|
theme?: 'light' | 'dark';
|
|
@@ -645,11 +620,9 @@ export declare interface NiceSceneEditorProps {
|
|
|
645
620
|
/** Initial scenes when uncontrolled. */
|
|
646
621
|
defaultScenes?: BuildingScene[];
|
|
647
622
|
devices?: BuildingDevice[];
|
|
648
|
-
zones?: BuildingZone[];
|
|
649
623
|
/** Currently active scene ids (highlighted). */
|
|
650
624
|
activeSceneIds?: BuildingId[];
|
|
651
625
|
onScenesChange?: (scenes: BuildingScene[]) => void;
|
|
652
|
-
onSave?: (scene: BuildingScene) => Promise<void> | void;
|
|
653
626
|
onDelete?: (id: BuildingId) => Promise<void> | void;
|
|
654
627
|
onActivate?: (id: BuildingId) => Promise<void> | void;
|
|
655
628
|
readOnly?: boolean;
|
|
@@ -717,8 +690,8 @@ export declare interface NiceSpatialEditorProps extends TracelessStorageProps {
|
|
|
717
690
|
export declare const NiceSpatialViewer: default_2.FC<NiceSpatialViewerProps>;
|
|
718
691
|
|
|
719
692
|
declare interface NiceSpatialViewerProps {
|
|
720
|
-
/** Floor plan document to display. */
|
|
721
|
-
document
|
|
693
|
+
/** Floor plan document to display. Optional: without one the viewer shows an empty plan. */
|
|
694
|
+
document?: FloorPlanDocument;
|
|
722
695
|
/** Initial floor ID to show. */
|
|
723
696
|
initialFloorId?: string;
|
|
724
697
|
/** Show navigation panel. */
|
|
@@ -769,10 +742,6 @@ export declare interface NiceThermostatControlProps {
|
|
|
769
742
|
device: BuildingDevice;
|
|
770
743
|
state?: ThermostatState;
|
|
771
744
|
onControl?: (deviceId: BuildingId, state: Partial<ThermostatState>) => Promise<void> | void;
|
|
772
|
-
showSchedule?: boolean;
|
|
773
|
-
showHumidity?: boolean;
|
|
774
|
-
size?: 'sm' | 'md' | 'lg';
|
|
775
|
-
unit?: 'C' | 'F';
|
|
776
745
|
compact?: boolean;
|
|
777
746
|
className?: string;
|
|
778
747
|
style?: CSSProperties;
|
|
@@ -784,16 +753,12 @@ export declare const NiceZoneCard: default_2.FC<NiceZoneCardProps>;
|
|
|
784
753
|
export declare interface NiceZoneCardProps {
|
|
785
754
|
/** Zone metadata (preferred). */
|
|
786
755
|
zone: FloorPlanZone | BuildingZone;
|
|
787
|
-
/** @deprecated alias for {@link zone}. */
|
|
788
|
-
room?: BuildingZone;
|
|
789
756
|
devices?: BuildingDevice[];
|
|
790
757
|
temperature?: number;
|
|
791
758
|
humidity?: number;
|
|
792
759
|
expanded?: boolean;
|
|
793
760
|
onExpand?: () => void;
|
|
794
761
|
onDeviceControl?: (deviceId: BuildingId, state: Partial<DeviceState>) => Promise<void> | void;
|
|
795
|
-
/** @deprecated use {@link onDeviceControl}. */
|
|
796
|
-
onControl?: (deviceId: BuildingId, state: Partial<DeviceState>) => Promise<void> | void;
|
|
797
762
|
onClick?: () => void;
|
|
798
763
|
onRoomClick?: (roomId: BuildingId) => void;
|
|
799
764
|
density?: DisplayDensity;
|
|
@@ -925,12 +890,6 @@ declare interface SensorThresholdTrigger {
|
|
|
925
890
|
hysteresis?: number;
|
|
926
891
|
}
|
|
927
892
|
|
|
928
|
-
/** @deprecated Use Building instead */
|
|
929
|
-
export declare type SmartHome = Building;
|
|
930
|
-
|
|
931
|
-
/** @deprecated Use BuildingDevice instead */
|
|
932
|
-
export declare type SmartHomeDevice = BuildingDevice;
|
|
933
|
-
|
|
934
893
|
/**
|
|
935
894
|
* Editor modes — each mode provides different tools and UI
|
|
936
895
|
*/
|
|
@@ -1027,10 +986,6 @@ export declare interface ThermostatState {
|
|
|
1027
986
|
temperature: number;
|
|
1028
987
|
/** Target setpoint in °C. */
|
|
1029
988
|
targetTemperature: number;
|
|
1030
|
-
/** @deprecated use {@link temperature} */
|
|
1031
|
-
currentTemp?: number;
|
|
1032
|
-
/** @deprecated use {@link targetTemperature} */
|
|
1033
|
-
targetTemp?: number;
|
|
1034
989
|
mode: 'heat' | 'cool' | 'auto' | 'off' | 'fan_only' | 'dry';
|
|
1035
990
|
fanMode?: 'auto' | 'low' | 'medium' | 'high';
|
|
1036
991
|
humidity?: number;
|
|
@@ -1204,13 +1159,6 @@ export declare interface ViewportState {
|
|
|
1204
1159
|
snapModes: SnapMode[];
|
|
1205
1160
|
}
|
|
1206
1161
|
|
|
1207
|
-
/**
|
|
1208
|
-
* @deprecated Use `BuildingZoneOccupancy`. `@nice2dev/events` exports a different
|
|
1209
|
-
* `ZoneOccupancy` (venue capacity), so importing both packages collided; this alias is
|
|
1210
|
-
* removed in 1.2.0.
|
|
1211
|
-
*/
|
|
1212
|
-
export declare type ZoneOccupancy = BuildingZoneOccupancy;
|
|
1213
|
-
|
|
1214
1162
|
export declare type ZoneType = 'living_room' | 'bedroom' | 'master_bedroom' | 'kids_room' | 'bathroom' | 'kitchen' | 'dining_room' | 'hallway' | 'office' | 'garage' | 'basement' | 'attic' | 'balcony' | 'garden' | 'laundry' | 'storage' | 'gym' | 'cinema' | 'open_office' | 'private_office' | 'meeting_room' | 'boardroom' | 'reception' | 'waiting_area' | 'server_room' | 'it_room' | 'break_room' | 'lobby' | 'corridor' | 'stairwell' | 'parking' | 'cafeteria' | 'mechanical_room' | 'other';
|
|
1215
1163
|
|
|
1216
1164
|
export { }
|