commons-shared-web-ui 0.0.79 → 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/fesm2022/commons-shared-web-ui.mjs +303 -660
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +132 -118
- package/package.json +1 -1
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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; };
|
|
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
|
|
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
|
}
|
|
@@ -3770,6 +3717,70 @@ interface TableColumnSubField {
|
|
|
3770
3717
|
defaultValue?: any;
|
|
3771
3718
|
};
|
|
3772
3719
|
}
|
|
3720
|
+
/**
|
|
3721
|
+
* Resolves raw codes returned by the row API into human-readable labels by
|
|
3722
|
+
* calling a secondary "lookup" API (roles, MDM master data, statuses, ...).
|
|
3723
|
+
*
|
|
3724
|
+
* Works for BOTH shapes of row value:
|
|
3725
|
+
* - a single code -> `gender: "GENDER.FEMALE"` => "Female"
|
|
3726
|
+
* - an array of codes -> `roleCodes: ["role.a", "role.b"]` => "Role A, Role B"
|
|
3727
|
+
* An object value (e.g. `{ code: 'X' }`) is normalized to its `code`/`value`/`id`
|
|
3728
|
+
* before matching, so the same config works regardless of the API shape.
|
|
3729
|
+
*
|
|
3730
|
+
* The lookup API is called ONCE per distinct endpoint (not per row, not per cell)
|
|
3731
|
+
* and the resulting code -> label map is cached for the life of the component.
|
|
3732
|
+
* Columns pointing at the same endpoint share the same cache entry.
|
|
3733
|
+
*
|
|
3734
|
+
* Any HTTP verb is supported (`apiMethod`), with free-form `queryParams`,
|
|
3735
|
+
* `apiPayload` and `headers` — this is not limited to plain GET endpoints.
|
|
3736
|
+
*/
|
|
3737
|
+
interface ColumnLookupConfig {
|
|
3738
|
+
/**
|
|
3739
|
+
* Name of a shared lookup declared in `TableConfig.lookups`. Any property set
|
|
3740
|
+
* here overrides the shared definition, so `{ "ref": "roles" }` alone is enough
|
|
3741
|
+
* to reuse one lookup across several columns.
|
|
3742
|
+
*/
|
|
3743
|
+
ref?: string;
|
|
3744
|
+
/** Lookup endpoint. Supports a `{codes}` / `{value}` placeholder (see `paramName`). */
|
|
3745
|
+
apiUrl?: string;
|
|
3746
|
+
/** HTTP verb. Default: 'GET'. */
|
|
3747
|
+
apiMethod?: 'GET' | 'POST' | 'PUT' | 'PATCH';
|
|
3748
|
+
/** Static request body for non-GET verbs. Merged with `paramName` in targeted mode. */
|
|
3749
|
+
apiPayload?: any;
|
|
3750
|
+
/** Static query params, e.g. `{ classCode: 'CLASS.GENDER', size: 200 }`. Array values are repeated. */
|
|
3751
|
+
queryParams?: {
|
|
3752
|
+
[key: string]: any;
|
|
3753
|
+
};
|
|
3754
|
+
/** Extra headers, merged on top of the table's auth header. */
|
|
3755
|
+
headers?: {
|
|
3756
|
+
[key: string]: string;
|
|
3757
|
+
};
|
|
3758
|
+
/** Path to the array inside the response. Omit (or '') when the response IS the array. e.g. 'elements'. */
|
|
3759
|
+
dataPath?: string;
|
|
3760
|
+
/** Path inside each lookup item holding the code matched against the row value. Default: 'code'. */
|
|
3761
|
+
valueKey?: string;
|
|
3762
|
+
/** Path inside each lookup item holding the label. Supports array indexes, e.g. 'name[0].text'. Default: 'name'. */
|
|
3763
|
+
labelKey?: string;
|
|
3764
|
+
/**
|
|
3765
|
+
* TARGETED MODE. When set, the full list is NOT downloaded: only the distinct
|
|
3766
|
+
* codes present on the current page are requested, under this key.
|
|
3767
|
+
* GET -> query param (`?codes=A,B`); non-GET -> body key (`{ "codes": ["A","B"] }`).
|
|
3768
|
+
* Leave unset to fetch the whole list once and resolve everything client-side.
|
|
3769
|
+
*/
|
|
3770
|
+
paramName?: string;
|
|
3771
|
+
/** How multiple codes are sent in targeted mode. Default: 'csv' for GET, 'array' otherwise. */
|
|
3772
|
+
paramFormat?: 'csv' | 'repeat' | 'array';
|
|
3773
|
+
/** Separator used when codes are joined into a CSV param / the `{codes}` placeholder. Default: ','. */
|
|
3774
|
+
paramSeparator?: string;
|
|
3775
|
+
/** Joins the labels when the row value is an array. Default: ', '. */
|
|
3776
|
+
separator?: string;
|
|
3777
|
+
/** Match codes case-insensitively. Default: true. */
|
|
3778
|
+
caseInsensitive?: boolean;
|
|
3779
|
+
/** What to show for a code with no match: 'code' shows the raw code (default), 'empty' drops it. */
|
|
3780
|
+
fallback?: 'code' | 'empty';
|
|
3781
|
+
/** Explicit cache bucket. Defaults to `ref`, else derived from method + url + params + payload. */
|
|
3782
|
+
cacheKey?: string;
|
|
3783
|
+
}
|
|
3773
3784
|
interface TableColumn {
|
|
3774
3785
|
key: string;
|
|
3775
3786
|
label: string;
|
|
@@ -3791,6 +3802,11 @@ interface TableColumn {
|
|
|
3791
3802
|
clickAction?: 'route' | 'callback';
|
|
3792
3803
|
clickRoute?: string;
|
|
3793
3804
|
subFields?: TableColumnSubField[];
|
|
3805
|
+
/**
|
|
3806
|
+
* Resolves the code(s) held in this column into display labels via a secondary API.
|
|
3807
|
+
* Handles both a single code and an array of codes. See {@link ColumnLookupConfig}.
|
|
3808
|
+
*/
|
|
3809
|
+
lookupConfig?: ColumnLookupConfig;
|
|
3794
3810
|
editConfig?: {
|
|
3795
3811
|
disabled?: boolean;
|
|
3796
3812
|
defaultValue?: any;
|
|
@@ -3934,6 +3950,13 @@ interface TableConfig {
|
|
|
3934
3950
|
filterData?: {
|
|
3935
3951
|
[key: string]: any[];
|
|
3936
3952
|
};
|
|
3953
|
+
/**
|
|
3954
|
+
* Reusable lookup definitions, referenced from a column via
|
|
3955
|
+
* `lookupConfig: { "ref": "<key>" }`. Columns may override any property inline.
|
|
3956
|
+
*/
|
|
3957
|
+
lookups?: {
|
|
3958
|
+
[key: string]: ColumnLookupConfig;
|
|
3959
|
+
};
|
|
3937
3960
|
pagination?: PaginationConfig;
|
|
3938
3961
|
actions?: TableAction[];
|
|
3939
3962
|
topBarButtons?: TableAction[];
|
|
@@ -4938,8 +4961,14 @@ declare class FilterTableSelectorComponent implements OnInit, OnChanges, OnDestr
|
|
|
4938
4961
|
*/
|
|
4939
4962
|
private applyFilterParamsToTable;
|
|
4940
4963
|
/**
|
|
4941
|
-
* Converts a flat form-value map to API param key/value pairs
|
|
4942
|
-
*
|
|
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.
|
|
4943
4972
|
*/
|
|
4944
4973
|
private buildFilterParams;
|
|
4945
4974
|
/**
|
|
@@ -5073,6 +5102,12 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
5073
5102
|
deleteModalOpen: boolean;
|
|
5074
5103
|
deleteModalConfig: any;
|
|
5075
5104
|
private pendingDeleteAction;
|
|
5105
|
+
/** code -> label maps for column lookups, bucketed by lookup cache key. */
|
|
5106
|
+
private lookupMaps;
|
|
5107
|
+
/** Guards against firing the same lookup request twice. */
|
|
5108
|
+
private lookupInFlight;
|
|
5109
|
+
/** Full-list lookups already attempted — stops an empty/failed list refetching on every page. */
|
|
5110
|
+
private lookupLoaded;
|
|
5076
5111
|
searchSubject: Subject<string>;
|
|
5077
5112
|
stickyHeaders: QueryList<ElementRef>;
|
|
5078
5113
|
private resizeObserver;
|
|
@@ -5130,6 +5165,40 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
5130
5165
|
getAscOpacity(key: string): number;
|
|
5131
5166
|
getDescOpacity(key: string): number;
|
|
5132
5167
|
private replaceParams;
|
|
5168
|
+
/**
|
|
5169
|
+
* Merges a column's inline lookup config with the shared definition it
|
|
5170
|
+
* references (`TableConfig.lookups`). Inline properties win.
|
|
5171
|
+
*/
|
|
5172
|
+
private getLookupConfig;
|
|
5173
|
+
/** Bucket the resolved code -> label map lives in. Identical endpoints share one. */
|
|
5174
|
+
private getLookupCacheKey;
|
|
5175
|
+
/**
|
|
5176
|
+
* Fires the lookup request for every column that declares one.
|
|
5177
|
+
* - Full-list mode (no `paramName`): one request per endpoint, ever.
|
|
5178
|
+
* - Targeted mode (`paramName` set): requests only the codes on the current
|
|
5179
|
+
* page that are not cached yet, so it re-runs as the user pages/searches.
|
|
5180
|
+
*/
|
|
5181
|
+
private loadColumnLookups;
|
|
5182
|
+
/** Distinct, non-empty codes held by `col` across the rows currently loaded. */
|
|
5183
|
+
private collectColumnCodes;
|
|
5184
|
+
/** Substitutes the `{codes}` / `{value}` placeholder in a url or param value. */
|
|
5185
|
+
private applyLookupPlaceholders;
|
|
5186
|
+
/**
|
|
5187
|
+
* Issues the lookup request with any verb, then folds the response into the
|
|
5188
|
+
* code -> label map. `codes` is null in full-list mode.
|
|
5189
|
+
*/
|
|
5190
|
+
private fetchLookup;
|
|
5191
|
+
/** A label must be printable — objects/arrays degrade to the raw code. */
|
|
5192
|
+
private coerceLookupLabel;
|
|
5193
|
+
/** Map key for a code, honouring `caseInsensitive` (default true). */
|
|
5194
|
+
private normalizeLookupKey;
|
|
5195
|
+
/**
|
|
5196
|
+
* Turns the raw cell value into its label(s). Accepts a single code, an array
|
|
5197
|
+
* of codes, or objects wrapping a code. Unresolved codes are shown as-is
|
|
5198
|
+
* (`fallback: 'code'`, the default) or dropped (`fallback: 'empty'`).
|
|
5199
|
+
* Returns null when nothing is left, so the caller applies `emptyValue`.
|
|
5200
|
+
*/
|
|
5201
|
+
private resolveLookupLabel;
|
|
5133
5202
|
private loadFilterOptions;
|
|
5134
5203
|
private getValueByPath;
|
|
5135
5204
|
private calculateStickyPositions;
|
|
@@ -5382,61 +5451,6 @@ declare const DEFAULT_SIDE_NAV_TOOLTIP_POSITION = "right";
|
|
|
5382
5451
|
|
|
5383
5452
|
declare function appendBaseUrlRecursively(obj: any, baseURL: string): void;
|
|
5384
5453
|
|
|
5385
|
-
interface HierarchyCfg {
|
|
5386
|
-
templateApiUrl: string;
|
|
5387
|
-
templateListPath: string | null;
|
|
5388
|
-
templateSelect: 'default' | 'first' | 'byCode' | 'byId';
|
|
5389
|
-
templateSelectField: string;
|
|
5390
|
-
templateSelectCode?: string;
|
|
5391
|
-
/** Used when templateSelect === 'byId' — matches a template by its numeric `id`, since
|
|
5392
|
-
* multiple templates can share the same templateCode (distinguished by templateName). */
|
|
5393
|
-
templateSelectId?: number;
|
|
5394
|
-
/**
|
|
5395
|
-
* When set, the caller already has the resolved MdmClassHierarchyTemplateDTO-shaped object
|
|
5396
|
-
* (e.g. it fetched and picked it client-side already) — used as-is, skipping the runtime's
|
|
5397
|
-
* own HTTP GET to templateApiUrl and the templateSelect/templateSelectId matching entirely.
|
|
5398
|
-
* Trades the always-live "re-fetch and re-match by id" behavior for zero extra network
|
|
5399
|
-
* round-trips; the caller is responsible for re-supplying fresh data if the underlying
|
|
5400
|
-
* template changes later. Analogous to how optionConfig.optionList is a static alternative
|
|
5401
|
-
* to optionConfig.apiUrl for dropdown fields.
|
|
5402
|
-
*/
|
|
5403
|
-
templateData?: any;
|
|
5404
|
-
rootCodePath: string;
|
|
5405
|
-
templateCodePath: string;
|
|
5406
|
-
hierarchyListPath: string;
|
|
5407
|
-
parentField: string;
|
|
5408
|
-
childField: string;
|
|
5409
|
-
dataApiUrl: string;
|
|
5410
|
-
dataPath: string;
|
|
5411
|
-
labelPath: string;
|
|
5412
|
-
valuePath: string;
|
|
5413
|
-
colSpan: number;
|
|
5414
|
-
payloadPrefix: string;
|
|
5415
|
-
dependencyParam: string;
|
|
5416
|
-
/**
|
|
5417
|
-
* Per-classCode overrides, keyed by the template's classCode (e.g. "GREF.REGION_DISTRICT").
|
|
5418
|
-
* Recognized keys: name, label, placeholder, payloadField, colSpan, required, errorMessage,
|
|
5419
|
-
* noDependency, hidden (skip this node but keep walking its children), disabled (render the
|
|
5420
|
-
* generated field as disabled — e.g. to lock a level to a known value), and leaf (stop
|
|
5421
|
-
* descending past this classCode, so deeper template levels — e.g. Ward below District —
|
|
5422
|
-
* are never generated for this consumer).
|
|
5423
|
-
*/
|
|
5424
|
-
nodes: Record<string, any>;
|
|
5425
|
-
branchSubType: string;
|
|
5426
|
-
showLoader: boolean;
|
|
5427
|
-
/** Passed straight through onto every generated level's DROPDOWN optionConfig — same shape as
|
|
5428
|
-
* optionConfig.searchConfig documented in smart-form.md. Lets a large flat MDM level (e.g.
|
|
5429
|
-
* hundreds of districts) be searched instead of scrolled through in full. */
|
|
5430
|
-
searchConfig?: any;
|
|
5431
|
-
/** Passed straight through onto every generated level's DROPDOWN optionConfig — same shape as
|
|
5432
|
-
* optionConfig.pagination documented in smart-form.md (loadMore/infiniteScroll). */
|
|
5433
|
-
pagination?: any;
|
|
5434
|
-
/** optionConfig.sortBy path applied to every generated level (Country/State/District/...).
|
|
5435
|
-
* Defaults to `labelPath` when not set — see _buildHierarchyFields(). Set explicitly (or to
|
|
5436
|
-
* an empty string to opt out) if a template needs different, or no, ordering. */
|
|
5437
|
-
sortBy?: string;
|
|
5438
|
-
}
|
|
5439
|
-
|
|
5440
5454
|
declare class ValidationUtils {
|
|
5441
5455
|
static email(): ValidatorFn;
|
|
5442
5456
|
static phone(): ValidatorFn;
|
|
@@ -5485,4 +5499,4 @@ declare class SnackbarModule {
|
|
|
5485
5499
|
}
|
|
5486
5500
|
|
|
5487
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 };
|
|
5488
|
-
export type { ActionVisibility, AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, 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,
|
|
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 };
|