myio-js-library 0.1.197 → 0.1.198
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/dist/index.cjs +1381 -372
- package/dist/index.d.cts +96 -1
- package/dist/index.js +1380 -372
- package/dist/myio-js-library.umd.js +1380 -372
- package/dist/myio-js-library.umd.min.js +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -3785,6 +3785,101 @@ declare const TempSensorSummaryTooltip: {
|
|
|
3785
3785
|
attach(triggerElement: HTMLElement, getData: () => TempSensorSummaryData): () => void;
|
|
3786
3786
|
};
|
|
3787
3787
|
|
|
3788
|
+
/**
|
|
3789
|
+
* ContractSummaryTooltip - Premium Contract Summary Tooltip Component
|
|
3790
|
+
* RFC-0107: Welcome and Loading Modal for Shopping Dashboard
|
|
3791
|
+
*
|
|
3792
|
+
* Features:
|
|
3793
|
+
* - Draggable header
|
|
3794
|
+
* - PIN button (creates independent clone)
|
|
3795
|
+
* - Maximize/restore button
|
|
3796
|
+
* - Close button
|
|
3797
|
+
* - Delayed hide (1.5s) with hover detection
|
|
3798
|
+
* - Smooth animations
|
|
3799
|
+
* - Dark theme (#2d1458)
|
|
3800
|
+
*
|
|
3801
|
+
* Shows:
|
|
3802
|
+
* - Contract validation status
|
|
3803
|
+
* - Device counts by domain (Energy, Water, Temperature)
|
|
3804
|
+
* - Detailed breakdown by group (Entries, Common Area, Stores)
|
|
3805
|
+
*
|
|
3806
|
+
* @example
|
|
3807
|
+
* // Attach to an element
|
|
3808
|
+
* const cleanup = ContractSummaryTooltip.attach(triggerElement, getDataFn);
|
|
3809
|
+
* // Later: cleanup();
|
|
3810
|
+
*
|
|
3811
|
+
* // Or manual control
|
|
3812
|
+
* ContractSummaryTooltip.show(element, data);
|
|
3813
|
+
* ContractSummaryTooltip.hide();
|
|
3814
|
+
*/
|
|
3815
|
+
interface ContractDomainCounts {
|
|
3816
|
+
total: number;
|
|
3817
|
+
entries: number;
|
|
3818
|
+
commonArea: number;
|
|
3819
|
+
stores: number;
|
|
3820
|
+
}
|
|
3821
|
+
interface ContractTemperatureCounts {
|
|
3822
|
+
total: number;
|
|
3823
|
+
internal: number;
|
|
3824
|
+
stores: number;
|
|
3825
|
+
}
|
|
3826
|
+
interface ContractSummaryData {
|
|
3827
|
+
/** Whether contract is loaded */
|
|
3828
|
+
isLoaded: boolean;
|
|
3829
|
+
/** Whether validation passed */
|
|
3830
|
+
isValid: boolean;
|
|
3831
|
+
/** Load timestamp */
|
|
3832
|
+
timestamp: string | null;
|
|
3833
|
+
/** Energy domain counts */
|
|
3834
|
+
energy: ContractDomainCounts;
|
|
3835
|
+
/** Water domain counts */
|
|
3836
|
+
water: ContractDomainCounts;
|
|
3837
|
+
/** Temperature domain counts */
|
|
3838
|
+
temperature: ContractTemperatureCounts;
|
|
3839
|
+
/** Validation discrepancies (if any) */
|
|
3840
|
+
discrepancies?: Array<{
|
|
3841
|
+
domain: string;
|
|
3842
|
+
expected: number;
|
|
3843
|
+
actual: number;
|
|
3844
|
+
}>;
|
|
3845
|
+
}
|
|
3846
|
+
declare const ContractSummaryTooltip: {
|
|
3847
|
+
containerId: string;
|
|
3848
|
+
/**
|
|
3849
|
+
* Get or create container
|
|
3850
|
+
*/
|
|
3851
|
+
getContainer(): HTMLElement;
|
|
3852
|
+
/**
|
|
3853
|
+
* Show tooltip
|
|
3854
|
+
*/
|
|
3855
|
+
show(triggerElement: HTMLElement, data: ContractSummaryData): void;
|
|
3856
|
+
/**
|
|
3857
|
+
* Start delayed hide
|
|
3858
|
+
*/
|
|
3859
|
+
startDelayedHide(): void;
|
|
3860
|
+
/**
|
|
3861
|
+
* Hide immediately
|
|
3862
|
+
*/
|
|
3863
|
+
hide(): void;
|
|
3864
|
+
/**
|
|
3865
|
+
* Close and reset all states
|
|
3866
|
+
*/
|
|
3867
|
+
close(): void;
|
|
3868
|
+
/**
|
|
3869
|
+
* Attach tooltip to trigger element with click behavior
|
|
3870
|
+
*/
|
|
3871
|
+
attach(triggerElement: HTMLElement, getDataFn: () => ContractSummaryData | null): () => void;
|
|
3872
|
+
/**
|
|
3873
|
+
* Attach tooltip with hover behavior
|
|
3874
|
+
*/
|
|
3875
|
+
attachHover(triggerElement: HTMLElement, getDataFn: () => ContractSummaryData | null): () => void;
|
|
3876
|
+
/**
|
|
3877
|
+
* Build contract data from window.CONTRACT_STATE
|
|
3878
|
+
* Helper method to build the data structure from global state
|
|
3879
|
+
*/
|
|
3880
|
+
buildFromGlobalState(): ContractSummaryData | null;
|
|
3881
|
+
};
|
|
3882
|
+
|
|
3788
3883
|
/**
|
|
3789
3884
|
* MyIO Modal Header Component
|
|
3790
3885
|
*
|
|
@@ -4926,4 +5021,4 @@ declare function getThemeColors(theme: ThemeMode): DistributionThemeColors;
|
|
|
4926
5021
|
*/
|
|
4927
5022
|
declare function getHashColor(str: string): string;
|
|
4928
5023
|
|
|
4929
|
-
export { ANNOTATION_TYPE_COLORS, ANNOTATION_TYPE_LABELS, ANNOTATION_TYPE_LABELS_EN, type Annotation, type AnnotationFilterState, AnnotationIndicator, type AnnotationIndicatorConfig, type AnnotationIndicatorTheme, type AnnotationStatus, type AnnotationSummary, type AnnotationType, type AuditAction, type AuditEntry, type BuildTemplateExportParams, CHART_COLORS, DEFAULT_COLORS as CONSUMPTION_CHART_COLORS, DEFAULT_CONFIG as CONSUMPTION_CHART_DEFAULTS, THEME_COLORS as CONSUMPTION_THEME_COLORS, type CategorySummary, type ChartDomain, type ClampRange, ConnectionStatusType, type Consumption7DaysColors, type Consumption7DaysConfig, type Consumption7DaysData, type Consumption7DaysInstance, type ChartType as ConsumptionChartType, type ConsumptionDataPoint, type IdealRangeConfig as ConsumptionIdealRangeConfig, type ConsumptionModalConfig, type ConsumptionModalInstance, type TemperatureConfig as ConsumptionTemperatureConfig, type TemperatureReferenceLine as ConsumptionTemperatureReferenceLine, type ThemeColors as ConsumptionThemeColors, type ThemeMode$1 as ConsumptionThemeMode, type VizMode as ConsumptionVizMode, type ConsumptionWidgetConfig, type ConsumptionWidgetInstance, type CreateDateRangePickerOptions, type CreateInputDateRangePickerInsideDIVParams, DEFAULT_CLAMP_RANGE, DEFAULT_ENERGY_GROUP_COLORS, DEFAULT_GAS_GROUP_COLORS, DEFAULT_SHOPPING_COLORS, DEFAULT_WATER_GROUP_COLORS, type DashboardEnergySummary, type DashboardWaterSummary, type DateRangeControl, type DateRangeInputController, type DateRangeResult, type DemandModalInstance, type DemandModalParams, type DemandModalPdfConfig, type DemandModalStyles, type DeviceComparisonData, DeviceComparisonTooltip, type DeviceInfo$1 as DeviceInfo, type DeviceStatusName, DeviceStatusType, type DeviceTypeLimits, type DistributionChartConfig, type DistributionChartInstance, type DistributionData, type DistributionDomain, type DistributionMode, type DistributionThemeColors, EXPORT_DEFAULT_COLORS, EXPORT_DOMAIN_ICONS, EXPORT_DOMAIN_LABELS, EXPORT_DOMAIN_UNITS, type EnergyEntityData, type EnergyModalContext, type EnergyModalError, type EnergyModalI18n, type EnergyModalStyleOverrides, EnergyRangeTooltip, type EnergyStatus, type EnergyStatusResult, EnergySummaryTooltip, type ExportColorsPallet, type ExportComparisonData, type ExportConfigTemplate, type ExportCustomerData, type ExportCustomerInfo, type ExportData, type ExportDataInput, type ExportDataInstance, type ExportDataPoint, type ExportDeviceInfo, type ExportDomain, type ExportFormat, type ExportGroupData, type ExportOptions, type ExportProgressCallback, type ExportResult, type ExportStats, type ExportType, type GroupColors, IMPORTANCE_COLORS, IMPORTANCE_LABELS, IMPORTANCE_LABELS_EN, type ImportanceLevel, InfoTooltip, type InstantaneousPowerLimits, type LogAnnotationsAttribute, type ExportFormat$1 as ModalExportFormat, type ModalHeaderConfig, type ModalHeaderInstance, type ModalTheme, type MyIOAuthConfig, type MyIOAuthInstance, MyIOChartModal, MyIODraggableCard, MyIOSelectionStore, MyIOSelectionStoreClass, MyIOToast, type NewAnnotationData, type OpenDashboardPopupEnergyOptions, type OpenDashboardPopupSettingsParams, type OpenDashboardPopupWaterTankOptions, DEVICE_TYPES as POWER_LIMITS_DEVICE_TYPES, STATUS_CONFIG as POWER_LIMITS_STATUS_CONFIG, TELEMETRY_TYPES as POWER_LIMITS_TELEMETRY_TYPES, type PaginationState, type PermissionSet, type PersistResult, type PowerLimitsError, type PowerLimitsFormData, type PowerLimitsModalInstance, type PowerLimitsModalParams, type PowerLimitsModalStyles, type PowerRange, type PowerRanges, type RealTimeTelemetryInstance, type RealTimeTelemetryParams, STATUS_COLORS, STATUS_LABELS, STATUS_LABELS_EN, type SettingsError, type SettingsEvent, type ShoppingColors, type ShoppingDataPoint, type StatusLimits, type StatusSummary$1 as StatusSummary, type StoreRow, type TbScope, type TelemetryFetcher, type TelemetryTypeLimits, type TempComparisonData, TempComparisonTooltip, type TempEntityData, TempRangeTooltip, type TempSensorDevice, type TempSensorSummaryData, TempSensorSummaryTooltip, type TempStatus, type TempStatusResult, type TemperatureComparisonModalInstance, type TemperatureComparisonModalParams, type TemperatureDevice, type TemperatureGranularity, type TemperatureModalInstance, type TemperatureModalParams, type TemperatureSettingsInstance, type TemperatureSettingsParams, type TemperatureStats, type TemperatureTelemetry, type ThingsboardCustomerAttrsConfig, type TimedValue, type UserInfo, type WaterCategorySummary, type WaterRow, WaterSummaryTooltip, type WaterTankDataPoint, type WaterTankModalContext, type WaterTankModalError, type WaterTankModalI18n, type WaterTankModalStyleOverrides, type WaterTankTelemetryData, addDetectionContext, addNamespace, aggregateByDay, assignShoppingColors, averageByDay, buildListItemsThingsboardByUniqueDatasource, buildMyioIngestionAuth, buildTemplateExport, buildWaterReportCSV, buildWaterStoresCSV, calcDeltaPercent, calculateDeviceStatus, calculateDeviceStatusWithRanges, calculateStats as calculateExportStats, calculateStats$1 as calculateStats, canModifyAnnotation, clampTemperature, classify, classifyWaterLabel, classifyWaterLabels, clearAllAuthCaches, connectionStatusIcons, createAnnotationIndicator, createConsumption7DaysChart, createConsumptionChartWidget, createConsumptionModal, createDateRangePicker, createDistributionChartWidget, createInputDateRangePickerInsideDIV, createModalHeader, decodePayload, decodePayloadBase64Xor, detectDeviceType, detectSuperAdminHolding, detectSuperAdminMyio, determineInterval, deviceStatusIcons, exportTemperatureCSV, exportToCSV, exportToCSVAll, extractMyIOCredentials, fetchCurrentUserInfo, fetchTemperatureData, fetchThingsboardCustomerAttrsFromStorage, fetchThingsboardCustomerServerScopeAttrs, findValue, findValueWithDefault, fmtPerc$1 as fmtPerc, fmtPerc as fmtPercLegacy, formatAllInSameUnit, formatAllInSameWaterUnit, formatDateForInput, formatDateToYMD, formatDateWithTimezoneOffset, formatDuration, formatEnergy, formatNumberReadable, formatRelativeTime, formatTankHeadFromCm, formatTemperature, formatWater, formatWaterByGroup, formatWaterVolumeM3, formatarDuracao, generateFilename as generateExportFilename, getAnnotationPermissions, getAuthCacheStats, getAvailableContexts, getConnectionStatusIcon, getDateRangeArray, getDefaultGroupColors, getDeviceStatusIcon, getDeviceStatusInfo, getThemeColors as getDistributionThemeColors, getGroupColor, getHashColor, getModalHeaderStyles, getSaoPauloISOString, getSaoPauloISOStringFixed, getShoppingColor, getValueByDatakey, getValueByDatakeyLegacy, getWaterCategories, groupByDay, interpolateTemperature, isDeviceOffline, isValidConnectionStatus, isValidDeviceStatus, isWaterCategory, mapConnectionStatus, mapDeviceStatusToCardStatus, mapDeviceToConnectionStatus, myioExportData, normalizeRecipients, numbers, openDashboardPopup, openDashboardPopupAllReport, openDashboardPopupEnergy, openDashboardPopupReport, openDashboardPopupSettings, openDashboardPopupWaterTank, openDemandModal, openGoalsPanel, openPowerLimitsSetupModal, openRealTimeTelemetryModal, openTemperatureComparisonModal, openTemperatureModal, openTemperatureSettingsModal, parseInputDateToDate, renderCardComponent$2 as renderCardComponent, renderCardComponent$1 as renderCardComponentEnhanced, renderCardComponentHeadOffice, renderCardComponentLegacy, renderCardComponentV2, renderCardComponent as renderCardComponentV5, renderCardComponentV5 as renderCardV5, shouldFlashIcon, strings, timeWindowFromInputYMD, toCSV, toFixedSafe, waterDeviceStatusIcons };
|
|
5024
|
+
export { ANNOTATION_TYPE_COLORS, ANNOTATION_TYPE_LABELS, ANNOTATION_TYPE_LABELS_EN, type Annotation, type AnnotationFilterState, AnnotationIndicator, type AnnotationIndicatorConfig, type AnnotationIndicatorTheme, type AnnotationStatus, type AnnotationSummary, type AnnotationType, type AuditAction, type AuditEntry, type BuildTemplateExportParams, CHART_COLORS, DEFAULT_COLORS as CONSUMPTION_CHART_COLORS, DEFAULT_CONFIG as CONSUMPTION_CHART_DEFAULTS, THEME_COLORS as CONSUMPTION_THEME_COLORS, type CategorySummary, type ChartDomain, type ClampRange, ConnectionStatusType, type Consumption7DaysColors, type Consumption7DaysConfig, type Consumption7DaysData, type Consumption7DaysInstance, type ChartType as ConsumptionChartType, type ConsumptionDataPoint, type IdealRangeConfig as ConsumptionIdealRangeConfig, type ConsumptionModalConfig, type ConsumptionModalInstance, type TemperatureConfig as ConsumptionTemperatureConfig, type TemperatureReferenceLine as ConsumptionTemperatureReferenceLine, type ThemeColors as ConsumptionThemeColors, type ThemeMode$1 as ConsumptionThemeMode, type VizMode as ConsumptionVizMode, type ConsumptionWidgetConfig, type ConsumptionWidgetInstance, type ContractDomainCounts, type ContractSummaryData, ContractSummaryTooltip, type ContractTemperatureCounts, type CreateDateRangePickerOptions, type CreateInputDateRangePickerInsideDIVParams, DEFAULT_CLAMP_RANGE, DEFAULT_ENERGY_GROUP_COLORS, DEFAULT_GAS_GROUP_COLORS, DEFAULT_SHOPPING_COLORS, DEFAULT_WATER_GROUP_COLORS, type DashboardEnergySummary, type DashboardWaterSummary, type DateRangeControl, type DateRangeInputController, type DateRangeResult, type DemandModalInstance, type DemandModalParams, type DemandModalPdfConfig, type DemandModalStyles, type DeviceComparisonData, DeviceComparisonTooltip, type DeviceInfo$1 as DeviceInfo, type DeviceStatusName, DeviceStatusType, type DeviceTypeLimits, type DistributionChartConfig, type DistributionChartInstance, type DistributionData, type DistributionDomain, type DistributionMode, type DistributionThemeColors, EXPORT_DEFAULT_COLORS, EXPORT_DOMAIN_ICONS, EXPORT_DOMAIN_LABELS, EXPORT_DOMAIN_UNITS, type EnergyEntityData, type EnergyModalContext, type EnergyModalError, type EnergyModalI18n, type EnergyModalStyleOverrides, EnergyRangeTooltip, type EnergyStatus, type EnergyStatusResult, EnergySummaryTooltip, type ExportColorsPallet, type ExportComparisonData, type ExportConfigTemplate, type ExportCustomerData, type ExportCustomerInfo, type ExportData, type ExportDataInput, type ExportDataInstance, type ExportDataPoint, type ExportDeviceInfo, type ExportDomain, type ExportFormat, type ExportGroupData, type ExportOptions, type ExportProgressCallback, type ExportResult, type ExportStats, type ExportType, type GroupColors, IMPORTANCE_COLORS, IMPORTANCE_LABELS, IMPORTANCE_LABELS_EN, type ImportanceLevel, InfoTooltip, type InstantaneousPowerLimits, type LogAnnotationsAttribute, type ExportFormat$1 as ModalExportFormat, type ModalHeaderConfig, type ModalHeaderInstance, type ModalTheme, type MyIOAuthConfig, type MyIOAuthInstance, MyIOChartModal, MyIODraggableCard, MyIOSelectionStore, MyIOSelectionStoreClass, MyIOToast, type NewAnnotationData, type OpenDashboardPopupEnergyOptions, type OpenDashboardPopupSettingsParams, type OpenDashboardPopupWaterTankOptions, DEVICE_TYPES as POWER_LIMITS_DEVICE_TYPES, STATUS_CONFIG as POWER_LIMITS_STATUS_CONFIG, TELEMETRY_TYPES as POWER_LIMITS_TELEMETRY_TYPES, type PaginationState, type PermissionSet, type PersistResult, type PowerLimitsError, type PowerLimitsFormData, type PowerLimitsModalInstance, type PowerLimitsModalParams, type PowerLimitsModalStyles, type PowerRange, type PowerRanges, type RealTimeTelemetryInstance, type RealTimeTelemetryParams, STATUS_COLORS, STATUS_LABELS, STATUS_LABELS_EN, type SettingsError, type SettingsEvent, type ShoppingColors, type ShoppingDataPoint, type StatusLimits, type StatusSummary$1 as StatusSummary, type StoreRow, type TbScope, type TelemetryFetcher, type TelemetryTypeLimits, type TempComparisonData, TempComparisonTooltip, type TempEntityData, TempRangeTooltip, type TempSensorDevice, type TempSensorSummaryData, TempSensorSummaryTooltip, type TempStatus, type TempStatusResult, type TemperatureComparisonModalInstance, type TemperatureComparisonModalParams, type TemperatureDevice, type TemperatureGranularity, type TemperatureModalInstance, type TemperatureModalParams, type TemperatureSettingsInstance, type TemperatureSettingsParams, type TemperatureStats, type TemperatureTelemetry, type ThingsboardCustomerAttrsConfig, type TimedValue, type UserInfo, type WaterCategorySummary, type WaterRow, WaterSummaryTooltip, type WaterTankDataPoint, type WaterTankModalContext, type WaterTankModalError, type WaterTankModalI18n, type WaterTankModalStyleOverrides, type WaterTankTelemetryData, addDetectionContext, addNamespace, aggregateByDay, assignShoppingColors, averageByDay, buildListItemsThingsboardByUniqueDatasource, buildMyioIngestionAuth, buildTemplateExport, buildWaterReportCSV, buildWaterStoresCSV, calcDeltaPercent, calculateDeviceStatus, calculateDeviceStatusWithRanges, calculateStats as calculateExportStats, calculateStats$1 as calculateStats, canModifyAnnotation, clampTemperature, classify, classifyWaterLabel, classifyWaterLabels, clearAllAuthCaches, connectionStatusIcons, createAnnotationIndicator, createConsumption7DaysChart, createConsumptionChartWidget, createConsumptionModal, createDateRangePicker, createDistributionChartWidget, createInputDateRangePickerInsideDIV, createModalHeader, decodePayload, decodePayloadBase64Xor, detectDeviceType, detectSuperAdminHolding, detectSuperAdminMyio, determineInterval, deviceStatusIcons, exportTemperatureCSV, exportToCSV, exportToCSVAll, extractMyIOCredentials, fetchCurrentUserInfo, fetchTemperatureData, fetchThingsboardCustomerAttrsFromStorage, fetchThingsboardCustomerServerScopeAttrs, findValue, findValueWithDefault, fmtPerc$1 as fmtPerc, fmtPerc as fmtPercLegacy, formatAllInSameUnit, formatAllInSameWaterUnit, formatDateForInput, formatDateToYMD, formatDateWithTimezoneOffset, formatDuration, formatEnergy, formatNumberReadable, formatRelativeTime, formatTankHeadFromCm, formatTemperature, formatWater, formatWaterByGroup, formatWaterVolumeM3, formatarDuracao, generateFilename as generateExportFilename, getAnnotationPermissions, getAuthCacheStats, getAvailableContexts, getConnectionStatusIcon, getDateRangeArray, getDefaultGroupColors, getDeviceStatusIcon, getDeviceStatusInfo, getThemeColors as getDistributionThemeColors, getGroupColor, getHashColor, getModalHeaderStyles, getSaoPauloISOString, getSaoPauloISOStringFixed, getShoppingColor, getValueByDatakey, getValueByDatakeyLegacy, getWaterCategories, groupByDay, interpolateTemperature, isDeviceOffline, isValidConnectionStatus, isValidDeviceStatus, isWaterCategory, mapConnectionStatus, mapDeviceStatusToCardStatus, mapDeviceToConnectionStatus, myioExportData, normalizeRecipients, numbers, openDashboardPopup, openDashboardPopupAllReport, openDashboardPopupEnergy, openDashboardPopupReport, openDashboardPopupSettings, openDashboardPopupWaterTank, openDemandModal, openGoalsPanel, openPowerLimitsSetupModal, openRealTimeTelemetryModal, openTemperatureComparisonModal, openTemperatureModal, openTemperatureSettingsModal, parseInputDateToDate, renderCardComponent$2 as renderCardComponent, renderCardComponent$1 as renderCardComponentEnhanced, renderCardComponentHeadOffice, renderCardComponentLegacy, renderCardComponentV2, renderCardComponent as renderCardComponentV5, renderCardComponentV5 as renderCardV5, shouldFlashIcon, strings, timeWindowFromInputYMD, toCSV, toFixedSafe, waterDeviceStatusIcons };
|