cm-reporting 0.3.2 → 0.4.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/dist/index.d.ts CHANGED
@@ -1804,6 +1804,15 @@ export declare interface ReportSnapshotV1 {
1804
1804
  data: FormData_2;
1805
1805
  }
1806
1806
 
1807
+ declare interface SmelterExternalContextBase {
1808
+ templateType: TemplateType;
1809
+ versionId: string;
1810
+ locale: Locale;
1811
+ versionDef: TemplateVersionDef;
1812
+ config: SmelterListConfig;
1813
+ currentRows: ReadonlyArray<SmelterRow>;
1814
+ }
1815
+
1807
1816
  /**
1808
1817
  * 导出接口类型:SmelterListConfig。
1809
1818
  */
@@ -1823,16 +1832,10 @@ declare interface SmelterListConfig {
1823
1832
  }
1824
1833
 
1825
1834
  export declare interface SmelterListIntegration {
1826
- /** 新增行为模式:默认 'append-empty-row'(保持现状)。 */
1827
- addMode?: ExternalAddMode;
1828
- /** 外部选择按钮文案(默认 '从外部选择')。 */
1829
- label?: string;
1830
1835
  /** 是否在触发外部选择时展示按钮 loading(默认 false)。 */
1831
1836
  showLoadingIndicator?: boolean;
1832
1837
  /** 表格行样式:返回 className,交由宿主自行提供 CSS(不内置任何表现)。 */
1833
1838
  rowClassName?: (record: SmelterRow, index: number) => string;
1834
- /** 宿主接管外部选择并返回要回写的行数据。 */
1835
- onPickSmelters?: (ctx: SmelterPickContext) => Promise<ExternalPickResult<Partial<SmelterRow>>>;
1836
1839
  /**
1837
1840
  * 行内外部选择:先在表格中选择 metal,再为当前行选择冶炼厂并回写。
1838
1841
  * - 返回 null/undefined 表示取消
@@ -1845,15 +1848,6 @@ export declare interface SmelterListIntegration {
1845
1848
 
1846
1849
  export declare type SmelterLookupMode = 'internal' | 'external' | 'hybrid';
1847
1850
 
1848
- export declare interface SmelterPickContext {
1849
- templateType: TemplateType;
1850
- versionId: string;
1851
- locale: Locale;
1852
- versionDef: TemplateVersionDef;
1853
- config: SmelterListConfig;
1854
- currentRows: ReadonlyArray<SmelterRow>;
1855
- }
1856
-
1857
1851
  /**
1858
1852
  * @file core/types/tableRows.ts
1859
1853
  * @description 模块实现。
@@ -1885,7 +1879,7 @@ export declare interface SmelterRow {
1885
1879
  [key: string]: string | undefined;
1886
1880
  }
1887
1881
 
1888
- export declare interface SmelterRowPickContext extends SmelterPickContext {
1882
+ export declare interface SmelterRowPickContext extends SmelterExternalContextBase {
1889
1883
  rowId: string;
1890
1884
  row: Readonly<SmelterRow>;
1891
1885
  metal: string;