@ailife-dev-vue/uiplus 0.0.10-snapshot → 0.0.12-snapshot

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.d.ts CHANGED
@@ -276,31 +276,57 @@ declare const commonBannerNewProps: {
276
276
  };
277
277
  };
278
278
 
279
- export declare type CommonInfoItem = {
280
- key: string | number;
281
- label: string;
282
- value: string | number;
279
+ declare type CommonInfoCharType = 'int' | 'float' | 'enum';
280
+
281
+ export declare type CommonInfoEnumItemConfig = CommonInfoItemConfigBase & {
282
+ enumColorMap?: Record<string, string>;
283
+ };
284
+
285
+ export declare type CommonInfoIntFloatItemConfig = CommonInfoItemConfigBase & {
286
+ valueMode?: CommonInfoValueMode;
287
+ asTimeFormat?: boolean;
288
+ timeUnit?: 'minute' | 'second';
283
289
  unit?: string;
284
- clickable?: boolean;
290
+ };
291
+
292
+ export declare type CommonInfoItemConfig = CommonInfoIntFloatItemConfig | CommonInfoEnumItemConfig;
293
+
294
+ declare type CommonInfoItemConfigBase = {
295
+ sid: string;
296
+ cid?: string;
297
+ label?: string;
298
+ infoContent?: string;
285
299
  };
286
300
 
287
301
  export declare type CommonInfoProps = ExtractPropTypes<typeof commonInfoProps>;
288
302
 
289
303
  declare const commonInfoProps: {
290
- items: {
291
- type: PropType<CommonInfoItem[]>;
304
+ subscribes: {
305
+ type: PropType<ProductSubscribe[]>;
292
306
  default: () => never[];
293
307
  };
294
- minVisibleItems: {
295
- type: NumberConstructor;
296
- default: number;
297
- };
298
- itemsPerPage: {
299
- type: NumberConstructor;
300
- default: number;
308
+ itemConfigs: {
309
+ type: PropType<CommonInfoItemConfig[]>;
310
+ default: () => never[];
301
311
  };
302
312
  };
303
313
 
314
+ export declare type CommonInfoValueMode = 'current' | 'todaySum' | 'weekSum' | 'monthSum' | 'yearSum' | 'last7DaysSum' | 'last30DaysSum';
315
+
316
+ export declare type CommonInfoViewItem = {
317
+ key: string;
318
+ sid: string;
319
+ cid: string;
320
+ charType: CommonInfoCharType;
321
+ label: string;
322
+ valueText: string;
323
+ unitText: string;
324
+ valueColor?: string;
325
+ showInfo: boolean;
326
+ infoContent: string;
327
+ isEnum: boolean;
328
+ };
329
+
304
330
  /** 解析 HiLink 桥接层返回的 JSON 字符串(与历史记录等回调格式一致)。 */
305
331
  export declare function dataChange(result: string): unknown;
306
332
 
@@ -716,6 +742,10 @@ export declare const enUS: {
716
742
  clear: string;
717
743
  manualInput: string;
718
744
  };
745
+ commonInfo: {
746
+ infoTitle: string;
747
+ statPlaceholder: string;
748
+ };
719
749
  lampColour: {
720
750
  cardTitle: string;
721
751
  cardSubtitle: string;
@@ -751,6 +781,15 @@ declare const firmwareUpdatesProps: {
751
781
  };
752
782
  };
753
783
 
784
+ export declare const formatCommonInfoMinutesAsHHMM: (totalMinutes: number) => string;
785
+
786
+ export declare const formatCommonInfoNumericDisplay: (value: number, step: number) => string;
787
+
788
+ export declare const formatCommonInfoSecondsAsHHMMSS: (totalSeconds: number) => string;
789
+
790
+ /** 总秒数 → `MM:SS`(分秒) */
791
+ export declare const formatCommonInfoSecondsAsMMSS: (totalSeconds: number) => string;
792
+
754
793
  export declare const formatNumericDisplay: (value: number, step: number) => string;
755
794
 
756
795
  /**
@@ -929,7 +968,7 @@ export declare interface GeneralHistoricalRecordConfigItem {
929
968
  /** 二级页 tab 标题 */
930
969
  tabTitle: string;
931
970
  /**
932
- * 允许展示的记录值(仅 enumVal 字符串,与 HiLink 历史 `data` 一致)
971
+ * 允许展示的记录值
933
972
  * 为空数组时展示该项全部记录
934
973
  */
935
974
  enabledValues?: Array<string | number>;
@@ -1092,7 +1131,6 @@ declare const generalReminderProps: {
1092
1131
  export declare interface GeneralReminderRelation {
1093
1132
  sid: string;
1094
1133
  cid: string;
1095
- expectedValues: Array<string | number | boolean>;
1096
1134
  }
1097
1135
 
1098
1136
  export declare interface GeneralScreenFilterElementItemConfig {
@@ -1203,6 +1241,8 @@ declare const generalWarnProps: {
1203
1241
  };
1204
1242
  };
1205
1243
 
1244
+ export declare const getCommonInfoDisplayPrecision: (step: number) => number;
1245
+
1206
1246
  export declare function getHilinkDevHistory(params: HilinkDevHistoryParams): Promise<HilinkDevHistoryRecord[]>;
1207
1247
 
1208
1248
  export declare const getNumericPrecision: (n: number) => number;
@@ -1571,10 +1611,16 @@ declare type StatusBarBinaryState = 0 | 1;
1571
1611
  /** 与 `sendHilinkDeviceControl` / `window.hilink._deviceControlInner` 约定一致 */
1572
1612
  export declare type StatusBarCommandPayload = HilinkDeviceControlPayload;
1573
1613
 
1614
+ export declare type StatusBarMiddleTimeUnit = 'second' | 'mmss';
1615
+
1574
1616
  export declare type StatusBarProps = ExtractPropTypes<typeof statusBarProps>;
1575
1617
 
1576
1618
  declare const statusBarProps: {
1577
- subscribes: {
1619
+ subscribesLeft: {
1620
+ type: PropType<ProductSubscribe[]>;
1621
+ default: () => never[];
1622
+ };
1623
+ subscribesRight: {
1578
1624
  type: PropType<ProductSubscribe[]>;
1579
1625
  default: () => never[];
1580
1626
  };
@@ -1590,6 +1636,14 @@ declare const statusBarProps: {
1590
1636
  type: BooleanConstructor;
1591
1637
  default: boolean;
1592
1638
  };
1639
+ middleAsTimeFormat: {
1640
+ type: BooleanConstructor;
1641
+ default: boolean;
1642
+ };
1643
+ middleTimeUnit: {
1644
+ type: PropType<StatusBarMiddleTimeUnit>;
1645
+ default: string;
1646
+ };
1593
1647
  enableOpenDialog: {
1594
1648
  type: BooleanConstructor;
1595
1649
  default: boolean;
@@ -2684,31 +2738,18 @@ showBottomWhenOff: boolean;
2684
2738
 
2685
2739
  export declare const UpCommonInfo: {
2686
2740
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
2687
- items: {
2688
- type: PropType<CommonInfoItem[]>;
2741
+ subscribes: {
2742
+ type: PropType<ProductSubscribe[]>;
2689
2743
  default: () => never[];
2690
2744
  };
2691
- minVisibleItems: {
2692
- type: NumberConstructor;
2693
- default: number;
2694
- };
2695
- itemsPerPage: {
2696
- type: NumberConstructor;
2697
- default: number;
2745
+ itemConfigs: {
2746
+ type: PropType<CommonInfoItemConfig[]>;
2747
+ default: () => never[];
2698
2748
  };
2699
- }>> & Readonly<{
2700
- "onItem-click"?: ((payload: {
2701
- item: CommonInfoItem;
2702
- }) => any) | undefined;
2703
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2704
- "item-click": (payload: {
2705
- item: CommonInfoItem;
2706
- }) => any;
2707
- }, PublicProps, {
2708
- items: CommonInfoItem[];
2709
- minVisibleItems: number;
2710
- itemsPerPage: number;
2711
- }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
2749
+ }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
2750
+ subscribes: ProductSubscribe[];
2751
+ itemConfigs: CommonInfoItemConfig[];
2752
+ }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
2712
2753
  P: {};
2713
2754
  B: {};
2714
2755
  D: {};
@@ -2716,55 +2757,33 @@ export declare const UpCommonInfo: {
2716
2757
  M: {};
2717
2758
  Defaults: {};
2718
2759
  }, Readonly<ExtractPropTypes< {
2719
- items: {
2720
- type: PropType<CommonInfoItem[]>;
2760
+ subscribes: {
2761
+ type: PropType<ProductSubscribe[]>;
2721
2762
  default: () => never[];
2722
2763
  };
2723
- minVisibleItems: {
2724
- type: NumberConstructor;
2725
- default: number;
2726
- };
2727
- itemsPerPage: {
2728
- type: NumberConstructor;
2729
- default: number;
2764
+ itemConfigs: {
2765
+ type: PropType<CommonInfoItemConfig[]>;
2766
+ default: () => never[];
2730
2767
  };
2731
- }>> & Readonly<{
2732
- "onItem-click"?: ((payload: {
2733
- item: CommonInfoItem;
2734
- }) => any) | undefined;
2735
- }>, {}, {}, {}, {}, {
2736
- items: CommonInfoItem[];
2737
- minVisibleItems: number;
2738
- itemsPerPage: number;
2768
+ }>> & Readonly<{}>, {}, {}, {}, {}, {
2769
+ subscribes: ProductSubscribe[];
2770
+ itemConfigs: CommonInfoItemConfig[];
2739
2771
  }>;
2740
2772
  __isFragment?: never;
2741
2773
  __isTeleport?: never;
2742
2774
  __isSuspense?: never;
2743
2775
  } & ComponentOptionsBase<Readonly<ExtractPropTypes< {
2744
- items: {
2745
- type: PropType<CommonInfoItem[]>;
2776
+ subscribes: {
2777
+ type: PropType<ProductSubscribe[]>;
2746
2778
  default: () => never[];
2747
2779
  };
2748
- minVisibleItems: {
2749
- type: NumberConstructor;
2750
- default: number;
2751
- };
2752
- itemsPerPage: {
2753
- type: NumberConstructor;
2754
- default: number;
2780
+ itemConfigs: {
2781
+ type: PropType<CommonInfoItemConfig[]>;
2782
+ default: () => never[];
2755
2783
  };
2756
- }>> & Readonly<{
2757
- "onItem-click"?: ((payload: {
2758
- item: CommonInfoItem;
2759
- }) => any) | undefined;
2760
- }>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {} & {
2761
- "item-click": (payload: {
2762
- item: CommonInfoItem;
2763
- }) => any;
2764
- }, string, {
2765
- items: CommonInfoItem[];
2766
- minVisibleItems: number;
2767
- itemsPerPage: number;
2784
+ }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
2785
+ subscribes: ProductSubscribe[];
2786
+ itemConfigs: CommonInfoItemConfig[];
2768
2787
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & Plugin_2;
2769
2788
 
2770
2789
  export declare const UpConfigProvider: {
@@ -4717,7 +4736,11 @@ zIndex: number;
4717
4736
 
4718
4737
  export declare const UpStatusBar: {
4719
4738
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly<ExtractPropTypes< {
4720
- subscribes: {
4739
+ subscribesLeft: {
4740
+ type: PropType<ProductSubscribe[]>;
4741
+ default: () => never[];
4742
+ };
4743
+ subscribesRight: {
4721
4744
  type: PropType<ProductSubscribe[]>;
4722
4745
  default: () => never[];
4723
4746
  };
@@ -4733,6 +4756,14 @@ export declare const UpStatusBar: {
4733
4756
  type: BooleanConstructor;
4734
4757
  default: boolean;
4735
4758
  };
4759
+ middleAsTimeFormat: {
4760
+ type: BooleanConstructor;
4761
+ default: boolean;
4762
+ };
4763
+ middleTimeUnit: {
4764
+ type: PropType<StatusBarMiddleTimeUnit>;
4765
+ default: string;
4766
+ };
4736
4767
  enableOpenDialog: {
4737
4768
  type: BooleanConstructor;
4738
4769
  default: boolean;
@@ -4766,7 +4797,6 @@ export declare const UpStatusBar: {
4766
4797
  default: string;
4767
4798
  };
4768
4799
  }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
4769
- subscribes: ProductSubscribe[];
4770
4800
  enableOpenDialog: boolean;
4771
4801
  openDialogShowTitle: boolean;
4772
4802
  openDialogTitle: string;
@@ -4775,9 +4805,13 @@ export declare const UpStatusBar: {
4775
4805
  closeDialogShowTitle: boolean;
4776
4806
  closeDialogTitle: string;
4777
4807
  closeDialogContent: string;
4808
+ subscribesLeft: ProductSubscribe[];
4809
+ subscribesRight: ProductSubscribe[];
4778
4810
  subscribesCenter: ProductSubscribe[];
4779
4811
  showMiddle: boolean;
4780
4812
  showMiddleWhenOff: boolean;
4813
+ middleAsTimeFormat: boolean;
4814
+ middleTimeUnit: StatusBarMiddleTimeUnit;
4781
4815
  }, true, {}, {}, GlobalComponents, GlobalDirectives, string, {}, HTMLDivElement, ComponentProvideOptions, {
4782
4816
  P: {};
4783
4817
  B: {};
@@ -4786,7 +4820,11 @@ export declare const UpStatusBar: {
4786
4820
  M: {};
4787
4821
  Defaults: {};
4788
4822
  }, Readonly<ExtractPropTypes< {
4789
- subscribes: {
4823
+ subscribesLeft: {
4824
+ type: PropType<ProductSubscribe[]>;
4825
+ default: () => never[];
4826
+ };
4827
+ subscribesRight: {
4790
4828
  type: PropType<ProductSubscribe[]>;
4791
4829
  default: () => never[];
4792
4830
  };
@@ -4802,6 +4840,14 @@ export declare const UpStatusBar: {
4802
4840
  type: BooleanConstructor;
4803
4841
  default: boolean;
4804
4842
  };
4843
+ middleAsTimeFormat: {
4844
+ type: BooleanConstructor;
4845
+ default: boolean;
4846
+ };
4847
+ middleTimeUnit: {
4848
+ type: PropType<StatusBarMiddleTimeUnit>;
4849
+ default: string;
4850
+ };
4805
4851
  enableOpenDialog: {
4806
4852
  type: BooleanConstructor;
4807
4853
  default: boolean;
@@ -4835,7 +4881,6 @@ export declare const UpStatusBar: {
4835
4881
  default: string;
4836
4882
  };
4837
4883
  }>> & Readonly<{}>, {}, {}, {}, {}, {
4838
- subscribes: ProductSubscribe[];
4839
4884
  enableOpenDialog: boolean;
4840
4885
  openDialogShowTitle: boolean;
4841
4886
  openDialogTitle: string;
@@ -4844,15 +4889,23 @@ export declare const UpStatusBar: {
4844
4889
  closeDialogShowTitle: boolean;
4845
4890
  closeDialogTitle: string;
4846
4891
  closeDialogContent: string;
4892
+ subscribesLeft: ProductSubscribe[];
4893
+ subscribesRight: ProductSubscribe[];
4847
4894
  subscribesCenter: ProductSubscribe[];
4848
4895
  showMiddle: boolean;
4849
4896
  showMiddleWhenOff: boolean;
4897
+ middleAsTimeFormat: boolean;
4898
+ middleTimeUnit: StatusBarMiddleTimeUnit;
4850
4899
  }>;
4851
4900
  __isFragment?: never;
4852
4901
  __isTeleport?: never;
4853
4902
  __isSuspense?: never;
4854
4903
  } & ComponentOptionsBase<Readonly<ExtractPropTypes< {
4855
- subscribes: {
4904
+ subscribesLeft: {
4905
+ type: PropType<ProductSubscribe[]>;
4906
+ default: () => never[];
4907
+ };
4908
+ subscribesRight: {
4856
4909
  type: PropType<ProductSubscribe[]>;
4857
4910
  default: () => never[];
4858
4911
  };
@@ -4868,6 +4921,14 @@ showMiddleWhenOff: {
4868
4921
  type: BooleanConstructor;
4869
4922
  default: boolean;
4870
4923
  };
4924
+ middleAsTimeFormat: {
4925
+ type: BooleanConstructor;
4926
+ default: boolean;
4927
+ };
4928
+ middleTimeUnit: {
4929
+ type: PropType<StatusBarMiddleTimeUnit>;
4930
+ default: string;
4931
+ };
4871
4932
  enableOpenDialog: {
4872
4933
  type: BooleanConstructor;
4873
4934
  default: boolean;
@@ -4901,7 +4962,6 @@ type: StringConstructor;
4901
4962
  default: string;
4902
4963
  };
4903
4964
  }>> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
4904
- subscribes: ProductSubscribe[];
4905
4965
  enableOpenDialog: boolean;
4906
4966
  openDialogShowTitle: boolean;
4907
4967
  openDialogTitle: string;
@@ -4910,12 +4970,15 @@ enableCloseDialog: boolean;
4910
4970
  closeDialogShowTitle: boolean;
4911
4971
  closeDialogTitle: string;
4912
4972
  closeDialogContent: string;
4973
+ subscribesLeft: ProductSubscribe[];
4974
+ subscribesRight: ProductSubscribe[];
4913
4975
  subscribesCenter: ProductSubscribe[];
4914
4976
  showMiddle: boolean;
4915
4977
  showMiddleWhenOff: boolean;
4978
+ middleAsTimeFormat: boolean;
4979
+ middleTimeUnit: StatusBarMiddleTimeUnit;
4916
4980
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & (new () => {
4917
4981
  $slots: {
4918
- middle?(_: {}): any;
4919
4982
  icon?(_: {}): any;
4920
4983
  };
4921
4984
  }) & Plugin_2;
@@ -5770,6 +5833,10 @@ export declare const zhCN: {
5770
5833
  clear: string;
5771
5834
  manualInput: string;
5772
5835
  };
5836
+ commonInfo: {
5837
+ infoTitle: string;
5838
+ statPlaceholder: string;
5839
+ };
5773
5840
  lampColour: {
5774
5841
  cardTitle: string;
5775
5842
  cardSubtitle: string;