commons-shared-web-ui 0.0.80 → 0.0.81

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/index.d.ts CHANGED
@@ -910,10 +910,6 @@ interface SelectionFieldNode {
910
910
  selected: boolean;
911
911
  /** If true, the field cannot be deselected by the user */
912
912
  isLocked: boolean;
913
- /** True for a synthetic per-level node under a GEOGRAPHY_DYNAMIC master field (Country/State/
914
- * District/...) — lets the UI render it nested under its master and disable it while the
915
- * master is off, instead of showing it as an unrelated flat sibling. */
916
- isGeographyLevel?: boolean;
917
913
  }
918
914
  /**
919
915
  * Wraps a section (SUBFIELDS / nested sectionConfig) with toggle + tree metadata.
@@ -1093,7 +1089,7 @@ interface ConfiguratorTreeNode {
1093
1089
  label: string;
1094
1090
  /** Node type */
1095
1091
  type: ConfiguratorNodeType;
1096
- /** Whether the node is expanded (for groups/sections, and for a 'field' node with children — see geoClassCode) */
1092
+ /** Whether the node is expanded (for groups/sections, and for a 'field' node with children) */
1097
1093
  expanded: boolean;
1098
1094
  /** Reference to the FieldConfig (only for field nodes) */
1099
1095
  fieldConfig: FieldConfig | null;
@@ -1101,14 +1097,6 @@ interface ConfiguratorTreeNode {
1101
1097
  path: number[];
1102
1098
  /** Child nodes */
1103
1099
  children: ConfiguratorTreeNode[];
1104
- /**
1105
- * Set only on synthetic geography-hierarchy-level nodes (children of a GEOGRAPHY_DYNAMIC
1106
- * field, e.g. Country/State/District). These don't exist as real schema array children —
1107
- * they live in the parent field's nested `geographyConfig.field.nodes` map — so `path` on
1108
- * these nodes equals the PARENT GEOGRAPHY_DYNAMIC field's own path, and `geoClassCode` is
1109
- * what actually distinguishes one level (and the parent itself, where it's undefined).
1110
- */
1111
- geoClassCode?: string;
1112
1100
  }
1113
1101
 
1114
1102
  /**
@@ -1121,16 +1109,7 @@ declare class FieldConfiguratorService {
1121
1109
  readonly tree: i0.Signal<ConfiguratorTreeNode[]>;
1122
1110
  readonly schema: i0.Signal<FormSchema>;
1123
1111
  readonly selectedFieldPath: i0.Signal<number[]>;
1124
- readonly selectedGeoClassCode: i0.Signal<string>;
1125
- /**
1126
- * Resolves to the real FieldConfig at the selected path — UNLESS the selection is a
1127
- * synthetic geography-hierarchy-level node (selectedGeoClassCode set), in which case this
1128
- * returns a small synthetic FieldConfig built from that level's entry in the parent
1129
- * GEOGRAPHY_DYNAMIC field's `geographyConfig.field.nodes` map instead. Every downstream
1130
- * consumer (selectedFieldInfo, selectedFieldBuilderType, the config panel itself) works
1131
- * against whichever shape comes out of here unchanged — mapFieldTypeToBuilderType('GEOGRAPHY_NODE')
1132
- * resolves the right minimal config schema (label/colSpan only, see field-type-schema.map.ts).
1133
- */
1112
+ /** Resolves to the FieldConfig at the selected path. */
1134
1113
  readonly selectedField: i0.Signal<FieldConfig>;
1135
1114
  readonly selectedFieldInfo: i0.Signal<ConfiguratorFieldInfo>;
1136
1115
  /**
@@ -1142,12 +1121,8 @@ declare class FieldConfiguratorService {
1142
1121
  * Initialize the store from a FormSchema.
1143
1122
  */
1144
1123
  loadSchema(schema: FormSchema, preserveSelection?: boolean): void;
1145
- /**
1146
- * Select a field by its path. Pass null to deselect. `geoClassCode` selects a synthetic
1147
- * geography-hierarchy-level child of the GEOGRAPHY_DYNAMIC field at `path` instead of the
1148
- * field itself — see ConfiguratorTreeNode.geoClassCode / selectedField above.
1149
- */
1150
- selectField(path: number[] | null, geoClassCode?: string | null): void;
1124
+ /** Select a field by its path. Pass null to deselect. */
1125
+ selectField(path: number[] | null): void;
1151
1126
  /**
1152
1127
  * Toggle a tree node's expanded state.
1153
1128
  */
@@ -1160,8 +1135,7 @@ declare class FieldConfiguratorService {
1160
1135
  /**
1161
1136
  * Change the type (and optionally subType) of the currently selected field.
1162
1137
  * Mapping goes from builderType keys (e.g. 'richText') → {type, subType?}.
1163
- * DROPDOWN fields cannot be changed and are guarded here as well — same for a synthetic
1164
- * geography-hierarchy-level selection, which has no real `type` to switch at all.
1138
+ * DROPDOWN fields cannot be changed and are guarded here as well.
1165
1139
  */
1166
1140
  changeFieldType(builderType: string): void;
1167
1141
  /**
@@ -1204,7 +1178,6 @@ declare class FieldConfiguratorComponent implements OnChanges {
1204
1178
  ngOnChanges(changes: SimpleChanges): void;
1205
1179
  onFieldSelected(selection: {
1206
1180
  path: number[];
1207
- geoClassCode?: string;
1208
1181
  }): void;
1209
1182
  onNodeToggleExpanded(nodeId: string): void;
1210
1183
  onConfigChange(patch: Record<string, unknown>): void;
@@ -1263,17 +1236,6 @@ declare class SelectionSectionNodeComponent {
1263
1236
  get selectedCount(): number;
1264
1237
  get isLocked(): boolean;
1265
1238
  trackByFieldIndex(index: number): number;
1266
- /**
1267
- * A GEOGRAPHY_DYNAMIC field's per-level nodes (Country/State/District/...) are built as flat
1268
- * entries immediately following their master in `section.fields` (see
1269
- * FormSchemaTreeService._buildGeographyFieldNodes) — there's no real nested schema structure
1270
- * to walk, so "master" here just means the nearest preceding non-level field.
1271
- */
1272
- private masterFieldFor;
1273
- /** True for a geography level whose master field is currently unselected — locked out so the
1274
- * user can't leave an individually-checked level under an unchecked (and therefore pruned)
1275
- * master; see masterFieldFor(). */
1276
- isFieldDisabled(field: SelectionFieldNode, index: number): boolean;
1277
1239
  trackBySubsectionIndex(index: number): number;
1278
1240
  static ɵfac: i0.ɵɵFactoryDeclaration<SelectionSectionNodeComponent, never>;
1279
1241
  static ɵcmp: i0.ɵɵComponentDeclaration<SelectionSectionNodeComponent, "lib-selection-section-node", never, { "section": { "alias": "section"; "required": true; }; "sectionIndex": { "alias": "sectionIndex"; "required": true; }; "depth": { "alias": "depth"; "required": false; }; "hideToggleForOptionTypes": { "alias": "hideToggleForOptionTypes"; "required": false; }; }, { "toggleEnabled": "toggleEnabled"; "toggleExpanded": "toggleExpanded"; "fieldToggle": "fieldToggle"; }, never, never, false, never>;
@@ -1304,12 +1266,8 @@ declare class SelectionFieldNodeComponent {
1304
1266
  declare class ConfiguratorTreeComponent {
1305
1267
  tree: ConfiguratorTreeNode[];
1306
1268
  selectedFieldPath: number[] | null;
1307
- /** Distinguishes a GEOGRAPHY_DYNAMIC field itself from one of its synthetic hierarchy-level
1308
- * children — both share the same `path`, so `path` alone can't tell them apart. */
1309
- selectedGeoClassCode: string | null;
1310
1269
  selectField: EventEmitter<{
1311
1270
  path: number[];
1312
- geoClassCode?: string;
1313
1271
  }>;
1314
1272
  toggleExpanded: EventEmitter<string>;
1315
1273
  onNodeClick(node: ConfiguratorTreeNode): void;
@@ -1319,7 +1277,7 @@ declare class ConfiguratorTreeComponent {
1319
1277
  trackByNodeId(_index: number, node: ConfiguratorTreeNode): string;
1320
1278
  private pathsEqual;
1321
1279
  static ɵfac: i0.ɵɵFactoryDeclaration<ConfiguratorTreeComponent, never>;
1322
- static ɵcmp: i0.ɵɵComponentDeclaration<ConfiguratorTreeComponent, "lib-configurator-tree", never, { "tree": { "alias": "tree"; "required": false; }; "selectedFieldPath": { "alias": "selectedFieldPath"; "required": false; }; "selectedGeoClassCode": { "alias": "selectedGeoClassCode"; "required": false; }; }, { "selectField": "selectField"; "toggleExpanded": "toggleExpanded"; }, never, never, false, never>;
1280
+ static ɵcmp: i0.ɵɵComponentDeclaration<ConfiguratorTreeComponent, "lib-configurator-tree", never, { "tree": { "alias": "tree"; "required": false; }; "selectedFieldPath": { "alias": "selectedFieldPath"; "required": false; }; }, { "selectField": "selectField"; "toggleExpanded": "toggleExpanded"; }, never, never, false, never>;
1323
1281
  }
1324
1282
 
1325
1283
  type SnackbarVariant = 'success' | 'error' | 'warning' | 'info';
@@ -1382,8 +1340,7 @@ declare class ConfiguratorConfigPanelComponent implements OnChanges {
1382
1340
  currentBuilderType: string | null;
1383
1341
  /** Identity key of the currently rendered field — used to detect real field switches. */
1384
1342
  private _currentFieldKey;
1385
- /** True when type switching should be disabled — DROPDOWN-based fields, and synthetic
1386
- * geography-hierarchy-level nodes (GEOGRAPHY_NODE), which have no real `type` to switch. */
1343
+ /** True when type switching should be disabled — DROPDOWN-based fields. */
1387
1344
  get isDropdownType(): boolean;
1388
1345
  ngOnChanges(changes: SimpleChanges): void;
1389
1346
  /**
@@ -2311,16 +2268,6 @@ declare class SmartFormComponent implements OnInit, OnChanges, OnDestroy {
2311
2268
  isButtonDisabled(btn: ActionButtonConfig): boolean;
2312
2269
  private getButtonByActionKind;
2313
2270
  private navigateTo;
2314
- private _hasHierarchyDynamic;
2315
- private _expandHierarchyNodes;
2316
- private _expandNodeRecursive;
2317
- private _expandSingleNode;
2318
- private _normalizeHierarchyCfg;
2319
- private _fetchHierarchyTemplate;
2320
- private _buildHierarchyFields;
2321
- private _getPathValue;
2322
- private _codeToFieldName;
2323
- private _codeToLabel;
2324
2271
  static ɵfac: i0.ɵɵFactoryDeclaration<SmartFormComponent, never>;
2325
2272
  static ɵcmp: i0.ɵɵComponentDeclaration<SmartFormComponent, "lib-smart-form", never, { "formJson": { "alias": "formJson"; "required": false; }; "initialValues": { "alias": "initialValues"; "required": false; }; "enableDraftAutoSave": { "alias": "enableDraftAutoSave"; "required": false; }; "labels": { "alias": "labels"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "readOnly": { "alias": "readOnly"; "required": false; }; "selectedOptionsData": { "alias": "selectedOptionsData"; "required": false; }; }, { "submit": "submit"; "draftSave": "draftSave"; "actionClick": "actionClick"; "valueChange": "valueChange"; "fileAdded": "fileAdded"; "fileUploadFinished": "fileUploadFinished"; "fileRemoved": "fileRemoved"; "suffixActionClick": "suffixActionClick"; "stepChange": "stepChange"; }, never, never, false, never>;
2326
2273
  }
@@ -5014,8 +4961,14 @@ declare class FilterTableSelectorComponent implements OnInit, OnChanges, OnDestr
5014
4961
  */
5015
4962
  private applyFilterParamsToTable;
5016
4963
  /**
5017
- * Converts a flat form-value map to API param key/value pairs
5018
- * using the configured filterParamMapping.
4964
+ * Converts a flat form-value map to API param key/value pairs using the configured
4965
+ * filterParamMapping, PLUS an identity fallback (formFieldName used as-is for apiParamKey)
4966
+ * for any form field that mapping doesn't explicitly cover. Without that fallback, a field a
4967
+ * consuming MFE adds to its smartFormConfig — e.g. an address dropdown chain injected from the
4968
+ * app's own TS — could never be forwarded to the API unless someone went back and hand-added a
4969
+ * filterParamMapping entry for it. An explicit mapping entry still wins whenever both exist (e.g.
4970
+ * remapping "country" to "currentCountryCode"), so nothing already relying on a renamed key
4971
+ * changes behavior.
5019
4972
  */
5020
4973
  private buildFilterParams;
5021
4974
  /**
@@ -5498,61 +5451,6 @@ declare const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = "right";
5498
5451
 
5499
5452
  declare function appendBaseUrlRecursively(obj: any, baseURL: string): void;
5500
5453
 
5501
- interface HierarchyCfg {
5502
- templateApiUrl: string;
5503
- templateListPath: string | null;
5504
- templateSelect: 'default' | 'first' | 'byCode' | 'byId';
5505
- templateSelectField: string;
5506
- templateSelectCode?: string;
5507
- /** Used when templateSelect === 'byId' — matches a template by its numeric `id`, since
5508
- * multiple templates can share the same templateCode (distinguished by templateName). */
5509
- templateSelectId?: number;
5510
- /**
5511
- * When set, the caller already has the resolved MdmClassHierarchyTemplateDTO-shaped object
5512
- * (e.g. it fetched and picked it client-side already) — used as-is, skipping the runtime's
5513
- * own HTTP GET to templateApiUrl and the templateSelect/templateSelectId matching entirely.
5514
- * Trades the always-live "re-fetch and re-match by id" behavior for zero extra network
5515
- * round-trips; the caller is responsible for re-supplying fresh data if the underlying
5516
- * template changes later. Analogous to how optionConfig.optionList is a static alternative
5517
- * to optionConfig.apiUrl for dropdown fields.
5518
- */
5519
- templateData?: any;
5520
- rootCodePath: string;
5521
- templateCodePath: string;
5522
- hierarchyListPath: string;
5523
- parentField: string;
5524
- childField: string;
5525
- dataApiUrl: string;
5526
- dataPath: string;
5527
- labelPath: string;
5528
- valuePath: string;
5529
- colSpan: number;
5530
- payloadPrefix: string;
5531
- dependencyParam: string;
5532
- /**
5533
- * Per-classCode overrides, keyed by the template's classCode (e.g. "GREF.REGION_DISTRICT").
5534
- * Recognized keys: name, label, placeholder, payloadField, colSpan, required, errorMessage,
5535
- * noDependency, hidden (skip this node but keep walking its children), disabled (render the
5536
- * generated field as disabled — e.g. to lock a level to a known value), and leaf (stop
5537
- * descending past this classCode, so deeper template levels — e.g. Ward below District —
5538
- * are never generated for this consumer).
5539
- */
5540
- nodes: Record<string, any>;
5541
- branchSubType: string;
5542
- showLoader: boolean;
5543
- /** Passed straight through onto every generated level's DROPDOWN optionConfig — same shape as
5544
- * optionConfig.searchConfig documented in smart-form.md. Lets a large flat MDM level (e.g.
5545
- * hundreds of districts) be searched instead of scrolled through in full. */
5546
- searchConfig?: any;
5547
- /** Passed straight through onto every generated level's DROPDOWN optionConfig — same shape as
5548
- * optionConfig.pagination documented in smart-form.md (loadMore/infiniteScroll). */
5549
- pagination?: any;
5550
- /** optionConfig.sortBy path applied to every generated level (Country/State/District/...).
5551
- * Defaults to `labelPath` when not set — see _buildHierarchyFields(). Set explicitly (or to
5552
- * an empty string to opt out) if a template needs different, or no, ordering. */
5553
- sortBy?: string;
5554
- }
5555
-
5556
5454
  declare class ValidationUtils {
5557
5455
  static email(): ValidatorFn;
5558
5456
  static phone(): ValidatorFn;
@@ -5601,4 +5499,4 @@ declare class SnackbarModule {
5601
5499
  }
5602
5500
 
5603
5501
  export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, ClickOutsideDirective, ConfigColumnNodeComponent, ConfigFieldNodeComponent, ConfigSchemaTreeService, ConfigSectionNodeComponent, ConfigurableFormComponent, configurableForm_examples_d as ConfigurableFormExamples, ConfigurableFormModule, ConfirmationModalComponent, ConfirmationModalModule, DEFAULT_ITEMS_PER_PAGE, DEFAULT_PAGE_SIZE_OPTIONS, DEFAULT_SIDE_NAV_TOOLTIP_POSITION, DatepickerComponent, DropdownComponent, ExpressionService, FieldConfigurationService, FieldConfiguratorComponent, FieldSelectionComponent, FilterComponent, FilterModule, FilterSidebarComponent, FilterSidebarModule, FilterTableSelectorComponent, FilterTableSelectorModule, FormBuilderModule, FormComponentsModule, FormFieldConfigurationComponent, FormFieldConfigurationModule, InputComponent, MaterialModule, NAV_ORIENTATION_DEFAULT, NAV_VARIANT_DEFAULT, NavComponent, NavModule, PAGINATION_THEME_DARK, PAGINATION_THEME_DEFAULT, PaginationComponent, PaginationModule, RadioComponent, SearchComponent, SharedUiModule, SideNavComponent, SideNavModule, SmartFormComponent, SmartFormController, smartForm_examples_d as SmartFormExamples, SmartFormModule, SmartTableComponent, SmartTableModule, SnackbarComponent, SnackbarModule, SnackbarService, StringUtils, SummaryCardComponent, SummaryCardModule, TableColumnConfigurationComponent, TableColumnConfigurationModule, TableColumnConfigurationService, TimePickerComponent, TimePickerModule, TimeWheelPanelComponent, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
5604
- export type { ActionVisibility, AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ColumnLookupConfig, ConfigColumnNode, ConfigFieldNode, ConfigSectionNode, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldColSpanPayload, FieldConfig, FieldEventPayload, FieldReorderPayload, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, HierarchyCfg, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SuffixActionIcon, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableColumnSubField, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableRowSaveEvent, TableTheme, TextConfig, TimeMode, TimePickerConfig, TimePickerLabels, TimePickerVariant, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules, VisibilityRule };
5502
+ export type { ActionVisibility, AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ColumnLookupConfig, ConfigColumnNode, ConfigFieldNode, ConfigSectionNode, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldColSpanPayload, FieldConfig, FieldEventPayload, FieldReorderPayload, FieldType, FilterChangeEvent, FilterConfig, FilterItem, FilterItemType, FilterOutput, FilterPanelConfig, FilterParamMap, FilterSearchConfig, FilterSidebarChangeEvent, FilterSidebarConfig, FilterSidebarOutput, FilterTableConfig, FilterTableSelectorConfig, FormConfig, FormField, FormOption, FormSchema, FormSection, GeneratedConfig, IconInput, InputConfig, InputLabels, InputType, JsonFieldConfig, JsonFormConfig, KeyType, LengthConstraint, LocationConfig, NavItem, NavStyleConfig, NestedStringConfig, NumberConfig, OptionConfig, OptionDTO, OptionItem, PaginationConfig, PaginationLabels, PhoneConfig, QueryParamsConfig, RadioConfig, RadioLabels, RadioOption, RangeConfig, RatingConfig, SearchConfig, SearchLabels, SectionConfig, SelectionConfig, SideNavItem, SideNavSection, SideNavStyleConfig, SnackbarConfig, SnackbarVariant, StepperConfig, SubmitConfig, SuffixActionIcon, SummaryCardConfig, SummaryCardLabels, SummaryCardMeta, TableAction, TableActionItem, TableColumn, TableColumnSubField, TableConfig, TableDataChangeEvent, TableFilter, TableFilterChangeEvent, TableFilterColumn, TableFilterConfig, TableFilterItem, TableFilterLabels, TableFilterOutput, TableLabels, TableOption, TableRowSaveEvent, TableTheme, TextConfig, TimeMode, TimePickerConfig, TimePickerLabels, TimePickerVariant, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules, VisibilityRule };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commons-shared-web-ui",
3
- "version": "0.0.80",
3
+ "version": "0.0.81",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "20.3.15",
6
6
  "@angular/cdk": "20.2.14",