@finsys/core 1.4.1 → 1.5.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.cts CHANGED
@@ -377,4 +377,59 @@ declare function getBaseCategories(): Category[];
377
377
  declare function getBaseFieldSpecMap(): Map<string, FieldData>;
378
378
  declare function getBaseFieldNames(): string[];
379
379
 
380
- export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, evaluateExpression, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupFieldsByCategory, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
380
+ declare enum IhsValueFormat {
381
+ STRING = "string",
382
+ CURRENCY = "currency",
383
+ NUMBER = "number",
384
+ PERCENTAGE = "percentage",
385
+ DATE = "date",
386
+ TABLE = "table"
387
+ }
388
+ interface IhsFieldDetail {
389
+ name: string;
390
+ displayName: string;
391
+ category: string;
392
+ value: unknown;
393
+ valueFormat: IhsValueFormat;
394
+ }
395
+ interface IhsDetailCategory {
396
+ category: string;
397
+ items: {
398
+ name: string;
399
+ displayName: string;
400
+ value: unknown;
401
+ valueFormat: IhsValueFormat;
402
+ }[];
403
+ }
404
+ declare enum FileFieldTableType {
405
+ TIME_SERIES = "timeSeries",
406
+ KEY_VALUE = "keyValue"
407
+ }
408
+ interface FileFieldTableItem {
409
+ displayName: string;
410
+ timePeriods: string[];
411
+ data: Record<string, unknown>;
412
+ formattedData: Record<string, string>;
413
+ type: FileFieldTableType;
414
+ isNumeric: boolean;
415
+ }
416
+ interface FileFieldTableData {
417
+ name: string;
418
+ displayName: string;
419
+ type: FileFieldTableType;
420
+ items: FileFieldTableItem[];
421
+ hasData: boolean;
422
+ }
423
+
424
+ /** Returns the full display name registry (extraction column → human label). */
425
+ declare function getDisplayNames(): Record<string, string>;
426
+ /** Looks up a display name. Falls back to camelCase → Title Case conversion. */
427
+ declare function getDisplayName(fieldName: string): string;
428
+ declare function extractTimePeriods(columnNames: string[]): string[];
429
+ declare function groupColumnsByTimePeriod(columnNames: string[]): Record<string, Record<string, string>>;
430
+ declare function groupFieldsByPattern(fields: FieldData[]): Record<string, FieldData[]>;
431
+ declare function buildFileFieldTables(ihsData: Record<string, unknown>): Record<string, FileFieldTableData>;
432
+ declare function processIhsDetails(ihsData: Record<string, unknown>): IhsFieldDetail[];
433
+ declare function groupDetailsByCategory(details: IhsFieldDetail[]): IhsDetailCategory[];
434
+
435
+ export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type IhsDetailCategory, type IhsFieldDetail, IhsValueFormat, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, buildFileFieldTables, evaluateExpression, extractTimePeriods, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, processIhsDetails, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
package/dist/index.d.ts CHANGED
@@ -377,4 +377,59 @@ declare function getBaseCategories(): Category[];
377
377
  declare function getBaseFieldSpecMap(): Map<string, FieldData>;
378
378
  declare function getBaseFieldNames(): string[];
379
379
 
380
- export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, evaluateExpression, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupFieldsByCategory, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };
380
+ declare enum IhsValueFormat {
381
+ STRING = "string",
382
+ CURRENCY = "currency",
383
+ NUMBER = "number",
384
+ PERCENTAGE = "percentage",
385
+ DATE = "date",
386
+ TABLE = "table"
387
+ }
388
+ interface IhsFieldDetail {
389
+ name: string;
390
+ displayName: string;
391
+ category: string;
392
+ value: unknown;
393
+ valueFormat: IhsValueFormat;
394
+ }
395
+ interface IhsDetailCategory {
396
+ category: string;
397
+ items: {
398
+ name: string;
399
+ displayName: string;
400
+ value: unknown;
401
+ valueFormat: IhsValueFormat;
402
+ }[];
403
+ }
404
+ declare enum FileFieldTableType {
405
+ TIME_SERIES = "timeSeries",
406
+ KEY_VALUE = "keyValue"
407
+ }
408
+ interface FileFieldTableItem {
409
+ displayName: string;
410
+ timePeriods: string[];
411
+ data: Record<string, unknown>;
412
+ formattedData: Record<string, string>;
413
+ type: FileFieldTableType;
414
+ isNumeric: boolean;
415
+ }
416
+ interface FileFieldTableData {
417
+ name: string;
418
+ displayName: string;
419
+ type: FileFieldTableType;
420
+ items: FileFieldTableItem[];
421
+ hasData: boolean;
422
+ }
423
+
424
+ /** Returns the full display name registry (extraction column → human label). */
425
+ declare function getDisplayNames(): Record<string, string>;
426
+ /** Looks up a display name. Falls back to camelCase → Title Case conversion. */
427
+ declare function getDisplayName(fieldName: string): string;
428
+ declare function extractTimePeriods(columnNames: string[]): string[];
429
+ declare function groupColumnsByTimePeriod(columnNames: string[]): Record<string, Record<string, string>>;
430
+ declare function groupFieldsByPattern(fields: FieldData[]): Record<string, FieldData[]>;
431
+ declare function buildFileFieldTables(ihsData: Record<string, unknown>): Record<string, FileFieldTableData>;
432
+ declare function processIhsDetails(ihsData: Record<string, unknown>): IhsFieldDetail[];
433
+ declare function groupDetailsByCategory(details: IhsFieldDetail[]): IhsDetailCategory[];
434
+
435
+ export { BASE_FIELD_SPECS, BasicFormField, type Category, type Choice, DEFAULT_VALIDATOR_DEFINITIONS, type DropdownOption, type EditorValidator, FIELD_TYPE_DEFINITIONS, type FieldData, type FieldGroup, type FieldReference, FieldType, type FileFieldTableData, type FileFieldTableItem, FileFieldTableType, FileFormField, FormField, FormFieldCategory, type FormFieldInputType, type FormFieldType, type FormFieldTypeDefinitions, FormFieldValidator, FormSpec, type FormValidatorDefinitions, type IhsDetailCategory, type IhsFieldDetail, IhsValueFormat, type PageConfig, type RHFSchemaOutput, type RHFStep, type ResolvedField, type SurveyElementJSON, type SurveyJSON, type SurveyPageJSON, type UnifiedFormConfig, type Validator, applyDynamicTitles, buildFileFieldTables, evaluateExpression, extractTimePeriods, generateRHFSchema, generateSurveyJson, getBaseCategories, getBaseFieldNames, getBaseFieldSpecMap, getBaseFieldSpecs, getCategoryName, getDisplayName, getDisplayNames, getPastMonthLabel, getPastYearLabel, getStepDefaultValues, getStepSchema, groupColumnsByTimePeriod, groupDetailsByCategory, groupFieldsByCategory, groupFieldsByPattern, processIhsDetails, resolvePageFields, validateFormConfig, validateFormSpec, validatePagesConfig };