commons-shared-web-ui 0.0.52 → 0.0.54
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 +280 -14
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +348 -203
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -2843,6 +2843,18 @@ interface ConfigFieldNode {
|
|
|
2843
2843
|
lockVisibility: boolean;
|
|
2844
2844
|
/** When true, the mandatory control is locked (cannot be changed). */
|
|
2845
2845
|
lockMandatory: boolean;
|
|
2846
|
+
/**
|
|
2847
|
+
* Name of the field this one depends on, read from
|
|
2848
|
+
* `optionConfig.dependencies.parentDataCode` (e.g. a `state` dropdown depends
|
|
2849
|
+
* on `country`). When the parent is hidden, this field must be hidden too.
|
|
2850
|
+
*/
|
|
2851
|
+
parentName?: string;
|
|
2852
|
+
/**
|
|
2853
|
+
* Derived: true when this field's dependency parent is currently hidden.
|
|
2854
|
+
* While true the field is force-hidden and its visibility toggle is disabled —
|
|
2855
|
+
* the user must show the parent field before this one can be shown.
|
|
2856
|
+
*/
|
|
2857
|
+
visibilityLockedByParent: boolean;
|
|
2846
2858
|
}
|
|
2847
2859
|
/**
|
|
2848
2860
|
* A section / group in the configurator tree. Sections can nest recursively.
|
|
@@ -2890,7 +2902,11 @@ declare class FieldConfigurationService {
|
|
|
2890
2902
|
* re-enables all non-locked descendants.
|
|
2891
2903
|
*/
|
|
2892
2904
|
toggleSectionVisible(path: number[]): void;
|
|
2893
|
-
/**
|
|
2905
|
+
/**
|
|
2906
|
+
* Toggle a field's visibility. Ignored for locked fields and for fields whose
|
|
2907
|
+
* dependency parent is currently hidden (their toggle is disabled in the UI).
|
|
2908
|
+
* Hiding a field also hides every field that depends on it (transitively).
|
|
2909
|
+
*/
|
|
2894
2910
|
toggleFieldVisible(path: number[], fieldIndex: number): void;
|
|
2895
2911
|
/** Toggle a field's mandatory flag. Ignored when locked or hidden. */
|
|
2896
2912
|
toggleFieldMandatory(path: number[], fieldIndex: number): void;
|
|
@@ -2903,6 +2919,18 @@ declare class FieldConfigurationService {
|
|
|
2903
2919
|
private _updateSectionAtPath;
|
|
2904
2920
|
private _updateFieldAtPath;
|
|
2905
2921
|
private _mapSectionAtPath;
|
|
2922
|
+
/** Re-apply field dependency rules to the current tree and commit the result. */
|
|
2923
|
+
private _normalizeDependencies;
|
|
2924
|
+
/**
|
|
2925
|
+
* Enforce field dependencies expressed via `optionConfig.dependencies.parentDataCode`.
|
|
2926
|
+
* A field can only be visible when its dependency parent is visible; hiding a
|
|
2927
|
+
* parent cascades (transitively) to every dependent field. Locked-visible fields
|
|
2928
|
+
* are never force-hidden.
|
|
2929
|
+
*
|
|
2930
|
+
* Returns a new tree with each field's `visible` / `mandatory` adjusted and its
|
|
2931
|
+
* derived `visibilityLockedByParent` flag set (drives the disabled toggle in the UI).
|
|
2932
|
+
*/
|
|
2933
|
+
private _applyDependencyRules;
|
|
2906
2934
|
/** Recursively set visibility on a section and all its descendants (respecting locks). */
|
|
2907
2935
|
private _cascadeVisibility;
|
|
2908
2936
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldConfigurationService, never>;
|
|
@@ -3046,6 +3074,322 @@ declare class ConfigSchemaTreeService {
|
|
|
3046
3074
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigSchemaTreeService>;
|
|
3047
3075
|
}
|
|
3048
3076
|
|
|
3077
|
+
interface TableOption {
|
|
3078
|
+
label: string;
|
|
3079
|
+
value: any;
|
|
3080
|
+
}
|
|
3081
|
+
interface TableColumnSubField {
|
|
3082
|
+
key: string;
|
|
3083
|
+
label?: string;
|
|
3084
|
+
dataType: 'text' | 'number' | 'email' | 'select' | 'date';
|
|
3085
|
+
placeholder?: string;
|
|
3086
|
+
editable?: boolean;
|
|
3087
|
+
options?: TableOption[];
|
|
3088
|
+
editConfig?: {
|
|
3089
|
+
disabled?: boolean;
|
|
3090
|
+
defaultValue?: any;
|
|
3091
|
+
};
|
|
3092
|
+
}
|
|
3093
|
+
interface TableColumn {
|
|
3094
|
+
key: string;
|
|
3095
|
+
label: string;
|
|
3096
|
+
type: 'text' | 'number' | 'date' | 'custom' | 'html' | 'badge';
|
|
3097
|
+
sortable?: boolean;
|
|
3098
|
+
editable?: boolean;
|
|
3099
|
+
dataType?: 'text' | 'number' | 'date' | 'email' | 'select';
|
|
3100
|
+
options?: TableOption[];
|
|
3101
|
+
badgeConfig?: {
|
|
3102
|
+
[key: string]: 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
3103
|
+
};
|
|
3104
|
+
width?: string;
|
|
3105
|
+
cellClass?: string;
|
|
3106
|
+
headerClass?: string;
|
|
3107
|
+
sticky?: boolean;
|
|
3108
|
+
labelPath?: string;
|
|
3109
|
+
emptyValue?: string;
|
|
3110
|
+
dateFormat?: string;
|
|
3111
|
+
clickAction?: 'route' | 'callback';
|
|
3112
|
+
clickRoute?: string;
|
|
3113
|
+
subFields?: TableColumnSubField[];
|
|
3114
|
+
editConfig?: {
|
|
3115
|
+
disabled?: boolean;
|
|
3116
|
+
defaultValue?: any;
|
|
3117
|
+
};
|
|
3118
|
+
/** Set to false to hide this column. Default: true. Driven by the column configurator. */
|
|
3119
|
+
isEnabled?: boolean;
|
|
3120
|
+
/** Backward-compatible visibility alias, kept in sync with isEnabled by the column configurator. */
|
|
3121
|
+
visible?: boolean;
|
|
3122
|
+
/** Configurator-only flag: when true the column can never be hidden (toggle is replaced by a lock). */
|
|
3123
|
+
lockVisibility?: boolean;
|
|
3124
|
+
}
|
|
3125
|
+
interface TableFilter {
|
|
3126
|
+
key: string;
|
|
3127
|
+
label: string;
|
|
3128
|
+
type: 'select' | 'text' | 'date';
|
|
3129
|
+
options?: TableOption[];
|
|
3130
|
+
apiUrl?: string;
|
|
3131
|
+
apiMethod?: 'GET' | 'POST';
|
|
3132
|
+
apiPayload?: any;
|
|
3133
|
+
labelKey?: string;
|
|
3134
|
+
valueKey?: string;
|
|
3135
|
+
labelPath?: string;
|
|
3136
|
+
valuePath?: string;
|
|
3137
|
+
requestKey?: string;
|
|
3138
|
+
dataPath?: string;
|
|
3139
|
+
handling?: 'standard' | 'nested_string';
|
|
3140
|
+
nestedStringConfig?: NestedStringConfig;
|
|
3141
|
+
}
|
|
3142
|
+
interface TableActionItem {
|
|
3143
|
+
label: string;
|
|
3144
|
+
type: 'api' | 'callback' | 'route' | 'delete';
|
|
3145
|
+
icon?: string;
|
|
3146
|
+
apiUrl?: string;
|
|
3147
|
+
apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3148
|
+
route?: string;
|
|
3149
|
+
confirmationNeeded?: boolean;
|
|
3150
|
+
confirmationMessage?: string;
|
|
3151
|
+
callback?: (row: any) => void;
|
|
3152
|
+
/** Set to false to hide this action item. Default: true */
|
|
3153
|
+
isEnabled?: boolean;
|
|
3154
|
+
/** Config for native 'delete' action type — drives the built-in confirmation modal */
|
|
3155
|
+
deleteConfig?: {
|
|
3156
|
+
apiUrl: string;
|
|
3157
|
+
idField?: string;
|
|
3158
|
+
modalTitle?: string;
|
|
3159
|
+
modalMessage?: string;
|
|
3160
|
+
confirmLabel?: string;
|
|
3161
|
+
cancelLabel?: string;
|
|
3162
|
+
};
|
|
3163
|
+
}
|
|
3164
|
+
interface TableAction {
|
|
3165
|
+
label: string;
|
|
3166
|
+
type: 'api' | 'callback' | 'route' | 'edit' | 'dropdown';
|
|
3167
|
+
icon?: string;
|
|
3168
|
+
btnVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3169
|
+
apiUrl?: string;
|
|
3170
|
+
apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3171
|
+
route?: string;
|
|
3172
|
+
confirmationNeeded?: boolean;
|
|
3173
|
+
confirmationMessage?: string;
|
|
3174
|
+
callback?: (row: any) => void;
|
|
3175
|
+
items?: TableActionItem[];
|
|
3176
|
+
/** Set to false to hide this action. Default: true */
|
|
3177
|
+
isEnabled?: boolean;
|
|
3178
|
+
}
|
|
3179
|
+
interface PaginationConfig {
|
|
3180
|
+
enabled: boolean;
|
|
3181
|
+
pageSize: number;
|
|
3182
|
+
pageSizeOptions: number[];
|
|
3183
|
+
totalCountConfig?: {
|
|
3184
|
+
source: 'same' | 'separate';
|
|
3185
|
+
apiUrl?: string;
|
|
3186
|
+
responsePath?: string;
|
|
3187
|
+
};
|
|
3188
|
+
}
|
|
3189
|
+
interface TableTheme {
|
|
3190
|
+
primaryColor?: string;
|
|
3191
|
+
headerBg?: string;
|
|
3192
|
+
headerColor?: string;
|
|
3193
|
+
rowHoverBg?: string;
|
|
3194
|
+
borderColor?: string;
|
|
3195
|
+
}
|
|
3196
|
+
interface NestedStringConfig {
|
|
3197
|
+
paramName: string;
|
|
3198
|
+
baseValue?: string;
|
|
3199
|
+
separator: string;
|
|
3200
|
+
assignment: string;
|
|
3201
|
+
}
|
|
3202
|
+
interface QueryParamsConfig {
|
|
3203
|
+
pageKey?: string;
|
|
3204
|
+
sizeKey?: string;
|
|
3205
|
+
pageIndexOffset?: number;
|
|
3206
|
+
filterHandling?: 'standard' | 'nested_string';
|
|
3207
|
+
nestedStringConfig?: NestedStringConfig;
|
|
3208
|
+
}
|
|
3209
|
+
interface TableConfig {
|
|
3210
|
+
columns: TableColumn[];
|
|
3211
|
+
apiUrl?: string;
|
|
3212
|
+
apiMethod?: 'GET' | 'POST';
|
|
3213
|
+
apiPayload?: any;
|
|
3214
|
+
dataResponsePath?: string;
|
|
3215
|
+
filters?: TableFilter[];
|
|
3216
|
+
filterData?: {
|
|
3217
|
+
[key: string]: any[];
|
|
3218
|
+
};
|
|
3219
|
+
pagination?: PaginationConfig;
|
|
3220
|
+
actions?: TableAction[];
|
|
3221
|
+
topBarButtons?: TableAction[];
|
|
3222
|
+
sortBy?: string;
|
|
3223
|
+
orderBy?: 'ASC' | 'DESC';
|
|
3224
|
+
theme?: TableTheme;
|
|
3225
|
+
requestParams?: Function;
|
|
3226
|
+
selectable?: boolean;
|
|
3227
|
+
queryParamsConfig?: QueryParamsConfig;
|
|
3228
|
+
labels?: TableLabels;
|
|
3229
|
+
searchConfig?: SearchConfig;
|
|
3230
|
+
maxHeight?: string;
|
|
3231
|
+
stickyHeader?: boolean;
|
|
3232
|
+
stickyColumnCount?: number;
|
|
3233
|
+
token?: string;
|
|
3234
|
+
tokenHeader?: string;
|
|
3235
|
+
editingRowClass?: string;
|
|
3236
|
+
/** Fallback text for any cell whose value is null, undefined, or empty string.
|
|
3237
|
+
* Overridden per-column via TableColumn.emptyValue. Library default: '-' */
|
|
3238
|
+
emptyValue?: string;
|
|
3239
|
+
}
|
|
3240
|
+
interface SearchConfig {
|
|
3241
|
+
enabled: boolean;
|
|
3242
|
+
searchKey?: string;
|
|
3243
|
+
debounceTime?: number;
|
|
3244
|
+
handling?: 'standard' | 'nested_string';
|
|
3245
|
+
minimumCharacter?: number;
|
|
3246
|
+
}
|
|
3247
|
+
interface TableLabels {
|
|
3248
|
+
searchPlaceholder?: string;
|
|
3249
|
+
actionColumnHeader?: string;
|
|
3250
|
+
noDataMessage?: string;
|
|
3251
|
+
itemsPerPageLabel?: string;
|
|
3252
|
+
defaultConfirmationMessage?: string;
|
|
3253
|
+
saveLabel?: string;
|
|
3254
|
+
cancelLabel?: string;
|
|
3255
|
+
addLabel?: string;
|
|
3256
|
+
/** Variant for the Add button (new row). Defaults to 'danger'. */
|
|
3257
|
+
addButtonVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3258
|
+
/** Variant for the Save button (edit row). Defaults to 'primary'. */
|
|
3259
|
+
saveButtonVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3260
|
+
}
|
|
3261
|
+
/**
|
|
3262
|
+
* Emitted by the SmartTableComponent when operating in external-data mode
|
|
3263
|
+
* (i.e. when [tableData] input is provided by the parent).
|
|
3264
|
+
* The parent is responsible for fetching updated data based on this event
|
|
3265
|
+
* and providing it back via [tableData] and [totalItemsCount].
|
|
3266
|
+
*/
|
|
3267
|
+
interface TableDataChangeEvent {
|
|
3268
|
+
page: number;
|
|
3269
|
+
pageSize: number;
|
|
3270
|
+
sortBy?: string;
|
|
3271
|
+
orderBy?: 'ASC' | 'DESC';
|
|
3272
|
+
searchTerm?: string;
|
|
3273
|
+
filters?: {
|
|
3274
|
+
[key: string]: any;
|
|
3275
|
+
};
|
|
3276
|
+
}
|
|
3277
|
+
interface TableRowSaveEvent {
|
|
3278
|
+
row: any;
|
|
3279
|
+
isNew: boolean;
|
|
3280
|
+
}
|
|
3281
|
+
|
|
3282
|
+
/**
|
|
3283
|
+
* A single editable column row in the column configurator.
|
|
3284
|
+
* Wraps a TableColumn with its visibility + lock state.
|
|
3285
|
+
*
|
|
3286
|
+
* `column` is a live reference into the module's working (cloned) config, so
|
|
3287
|
+
* writing the node state back onto it is all that's needed to produce the
|
|
3288
|
+
* updated config — no fragile index re-matching required.
|
|
3289
|
+
*/
|
|
3290
|
+
interface ConfigColumnNode {
|
|
3291
|
+
/** Live reference to the TableColumn inside the working config clone. */
|
|
3292
|
+
column: TableColumn;
|
|
3293
|
+
/** Raw label (i18n key or text); resolved through the optional translate fn at render time. */
|
|
3294
|
+
label: string;
|
|
3295
|
+
/** Whether the column is shown in the table. */
|
|
3296
|
+
visible: boolean;
|
|
3297
|
+
/** When true, the visibility toggle is locked ON (column can never be hidden). */
|
|
3298
|
+
lockVisibility: boolean;
|
|
3299
|
+
}
|
|
3300
|
+
|
|
3301
|
+
/**
|
|
3302
|
+
* Signal-based store for the table-column-configuration component.
|
|
3303
|
+
* Owns the column list and the visibility toggle logic.
|
|
3304
|
+
* Provided at the component level (one store instance per configurator).
|
|
3305
|
+
*/
|
|
3306
|
+
declare class TableColumnConfigurationService {
|
|
3307
|
+
private readonly _state;
|
|
3308
|
+
readonly columns: i0.Signal<ConfigColumnNode[]>;
|
|
3309
|
+
/**
|
|
3310
|
+
* Initialise from an input table config. The config is deep-cloned so the
|
|
3311
|
+
* caller's object is never mutated; the nodes reference the clone.
|
|
3312
|
+
*/
|
|
3313
|
+
loadConfig(config: TableConfig): void;
|
|
3314
|
+
/** Toggle a column's visibility. Locked columns are ignored. */
|
|
3315
|
+
toggleColumnVisible(index: number): void;
|
|
3316
|
+
/**
|
|
3317
|
+
* Produce the updated config. Writes the current node state onto the working
|
|
3318
|
+
* clone and returns a fresh deep clone (safe to hand to the host / persist).
|
|
3319
|
+
* Returns null if no config has been loaded.
|
|
3320
|
+
*/
|
|
3321
|
+
buildUpdatedConfig(): TableConfig | null;
|
|
3322
|
+
private _buildColumn;
|
|
3323
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnConfigurationService, never>;
|
|
3324
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TableColumnConfigurationService>;
|
|
3325
|
+
}
|
|
3326
|
+
|
|
3327
|
+
/**
|
|
3328
|
+
* Table Column Configuration
|
|
3329
|
+
* --------------------------
|
|
3330
|
+
* Renders a compact list of a table config's columns, each with a **visibility**
|
|
3331
|
+
* toggle. Intended to be embedded inside a `cc-confirmation-modal` on a host page
|
|
3332
|
+
* ("Configure columns").
|
|
3333
|
+
*
|
|
3334
|
+
* Pass a `TableConfig` via `[config]`. The input is deep-cloned, so it is never
|
|
3335
|
+
* mutated. When the user confirms, call `getUpdatedConfig()` to read back the
|
|
3336
|
+
* modified config (isEnabled/visible flags updated per column).
|
|
3337
|
+
*
|
|
3338
|
+
* Columns carrying `lockVisibility: true` cannot be hidden — their toggle is
|
|
3339
|
+
* replaced by a lock icon.
|
|
3340
|
+
*
|
|
3341
|
+
* @example
|
|
3342
|
+
* ```html
|
|
3343
|
+
* <cc-confirmation-modal [isOpen]="open" (confirm)="save()" (cancel)="open = false">
|
|
3344
|
+
* <lib-table-column-configuration #cfg [config]="tableConfig" [translate]="translateFn" />
|
|
3345
|
+
* </cc-confirmation-modal>
|
|
3346
|
+
* ```
|
|
3347
|
+
* ```ts
|
|
3348
|
+
* @ViewChild('cfg') cfg!: TableColumnConfigurationComponent;
|
|
3349
|
+
* save() { this.updatedConfig = this.cfg.getUpdatedConfig(); }
|
|
3350
|
+
* ```
|
|
3351
|
+
*/
|
|
3352
|
+
declare class TableColumnConfigurationComponent implements OnChanges {
|
|
3353
|
+
/** The table config to configure. Deep-cloned internally; never mutated. */
|
|
3354
|
+
config: TableConfig;
|
|
3355
|
+
/** Optional label translator, e.g. an ngx-translate `instant` function. */
|
|
3356
|
+
translate?: (key: string) => string;
|
|
3357
|
+
/** Show the "Visible" legend row. Default true. */
|
|
3358
|
+
showLegend: boolean;
|
|
3359
|
+
protected readonly store: TableColumnConfigurationService;
|
|
3360
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
3361
|
+
/**
|
|
3362
|
+
* Returns a fresh, modified copy of the config with the current visibility
|
|
3363
|
+
* selections applied. Returns null if no config has been loaded.
|
|
3364
|
+
*/
|
|
3365
|
+
getUpdatedConfig(): TableConfig | null;
|
|
3366
|
+
onToggleVisible(index: number): void;
|
|
3367
|
+
trackByIndex(index: number): number;
|
|
3368
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnConfigurationComponent, never>;
|
|
3369
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TableColumnConfigurationComponent, "lib-table-column-configuration", never, { "config": { "alias": "config"; "required": true; }; "translate": { "alias": "translate"; "required": false; }; "showLegend": { "alias": "showLegend"; "required": false; }; }, {}, never, never, false, never>;
|
|
3370
|
+
}
|
|
3371
|
+
|
|
3372
|
+
/**
|
|
3373
|
+
* A single column row inside the table-column-configuration list.
|
|
3374
|
+
* Shows a visibility indicator + column name on the left and a visibility
|
|
3375
|
+
* toggle (or a lock, when the column is locked visible) on the right.
|
|
3376
|
+
*/
|
|
3377
|
+
declare class ConfigColumnNodeComponent {
|
|
3378
|
+
column: ConfigColumnNode;
|
|
3379
|
+
/** Optional label translator (e.g. an ngx-translate instant fn). */
|
|
3380
|
+
translate?: (key: string) => string;
|
|
3381
|
+
toggleVisible: EventEmitter<void>;
|
|
3382
|
+
get displayLabel(): string;
|
|
3383
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigColumnNodeComponent, never>;
|
|
3384
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigColumnNodeComponent, "lib-config-column-node", never, { "column": { "alias": "column"; "required": true; }; "translate": { "alias": "translate"; "required": false; }; }, { "toggleVisible": "toggleVisible"; }, never, never, false, never>;
|
|
3385
|
+
}
|
|
3386
|
+
|
|
3387
|
+
declare class TableColumnConfigurationModule {
|
|
3388
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnConfigurationModule, never>;
|
|
3389
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TableColumnConfigurationModule, [typeof TableColumnConfigurationComponent, typeof ConfigColumnNodeComponent], [typeof i2$1.CommonModule], [typeof TableColumnConfigurationComponent]>;
|
|
3390
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<TableColumnConfigurationModule>;
|
|
3391
|
+
}
|
|
3392
|
+
|
|
3049
3393
|
interface DropdownAction {
|
|
3050
3394
|
label: string;
|
|
3051
3395
|
type: 'api' | 'route' | 'callback';
|
|
@@ -3701,205 +4045,6 @@ declare class SideNavModule {
|
|
|
3701
4045
|
static ɵinj: i0.ɵɵInjectorDeclaration<SideNavModule>;
|
|
3702
4046
|
}
|
|
3703
4047
|
|
|
3704
|
-
interface TableOption {
|
|
3705
|
-
label: string;
|
|
3706
|
-
value: any;
|
|
3707
|
-
}
|
|
3708
|
-
interface TableColumnSubField {
|
|
3709
|
-
key: string;
|
|
3710
|
-
label?: string;
|
|
3711
|
-
dataType: 'text' | 'number' | 'email' | 'select' | 'date';
|
|
3712
|
-
placeholder?: string;
|
|
3713
|
-
editable?: boolean;
|
|
3714
|
-
options?: TableOption[];
|
|
3715
|
-
editConfig?: {
|
|
3716
|
-
disabled?: boolean;
|
|
3717
|
-
defaultValue?: any;
|
|
3718
|
-
};
|
|
3719
|
-
}
|
|
3720
|
-
interface TableColumn {
|
|
3721
|
-
key: string;
|
|
3722
|
-
label: string;
|
|
3723
|
-
type: 'text' | 'number' | 'date' | 'custom' | 'html' | 'badge';
|
|
3724
|
-
sortable?: boolean;
|
|
3725
|
-
editable?: boolean;
|
|
3726
|
-
dataType?: 'text' | 'number' | 'date' | 'email' | 'select';
|
|
3727
|
-
options?: TableOption[];
|
|
3728
|
-
badgeConfig?: {
|
|
3729
|
-
[key: string]: 'success' | 'warning' | 'danger' | 'info' | 'neutral';
|
|
3730
|
-
};
|
|
3731
|
-
width?: string;
|
|
3732
|
-
cellClass?: string;
|
|
3733
|
-
headerClass?: string;
|
|
3734
|
-
sticky?: boolean;
|
|
3735
|
-
labelPath?: string;
|
|
3736
|
-
emptyValue?: string;
|
|
3737
|
-
dateFormat?: string;
|
|
3738
|
-
clickAction?: 'route' | 'callback';
|
|
3739
|
-
clickRoute?: string;
|
|
3740
|
-
subFields?: TableColumnSubField[];
|
|
3741
|
-
editConfig?: {
|
|
3742
|
-
disabled?: boolean;
|
|
3743
|
-
defaultValue?: any;
|
|
3744
|
-
};
|
|
3745
|
-
}
|
|
3746
|
-
interface TableFilter {
|
|
3747
|
-
key: string;
|
|
3748
|
-
label: string;
|
|
3749
|
-
type: 'select' | 'text' | 'date';
|
|
3750
|
-
options?: TableOption[];
|
|
3751
|
-
apiUrl?: string;
|
|
3752
|
-
apiMethod?: 'GET' | 'POST';
|
|
3753
|
-
apiPayload?: any;
|
|
3754
|
-
labelKey?: string;
|
|
3755
|
-
valueKey?: string;
|
|
3756
|
-
labelPath?: string;
|
|
3757
|
-
valuePath?: string;
|
|
3758
|
-
requestKey?: string;
|
|
3759
|
-
dataPath?: string;
|
|
3760
|
-
handling?: 'standard' | 'nested_string';
|
|
3761
|
-
nestedStringConfig?: NestedStringConfig;
|
|
3762
|
-
}
|
|
3763
|
-
interface TableActionItem {
|
|
3764
|
-
label: string;
|
|
3765
|
-
type: 'api' | 'callback' | 'route' | 'delete';
|
|
3766
|
-
icon?: string;
|
|
3767
|
-
apiUrl?: string;
|
|
3768
|
-
apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3769
|
-
route?: string;
|
|
3770
|
-
confirmationNeeded?: boolean;
|
|
3771
|
-
confirmationMessage?: string;
|
|
3772
|
-
callback?: (row: any) => void;
|
|
3773
|
-
/** Set to false to hide this action item. Default: true */
|
|
3774
|
-
isEnabled?: boolean;
|
|
3775
|
-
/** Config for native 'delete' action type — drives the built-in confirmation modal */
|
|
3776
|
-
deleteConfig?: {
|
|
3777
|
-
apiUrl: string;
|
|
3778
|
-
idField?: string;
|
|
3779
|
-
modalTitle?: string;
|
|
3780
|
-
modalMessage?: string;
|
|
3781
|
-
confirmLabel?: string;
|
|
3782
|
-
cancelLabel?: string;
|
|
3783
|
-
};
|
|
3784
|
-
}
|
|
3785
|
-
interface TableAction {
|
|
3786
|
-
label: string;
|
|
3787
|
-
type: 'api' | 'callback' | 'route' | 'edit' | 'dropdown';
|
|
3788
|
-
icon?: string;
|
|
3789
|
-
btnVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3790
|
-
apiUrl?: string;
|
|
3791
|
-
apiMethod?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
3792
|
-
route?: string;
|
|
3793
|
-
confirmationNeeded?: boolean;
|
|
3794
|
-
confirmationMessage?: string;
|
|
3795
|
-
callback?: (row: any) => void;
|
|
3796
|
-
items?: TableActionItem[];
|
|
3797
|
-
/** Set to false to hide this action. Default: true */
|
|
3798
|
-
isEnabled?: boolean;
|
|
3799
|
-
}
|
|
3800
|
-
interface PaginationConfig {
|
|
3801
|
-
enabled: boolean;
|
|
3802
|
-
pageSize: number;
|
|
3803
|
-
pageSizeOptions: number[];
|
|
3804
|
-
totalCountConfig?: {
|
|
3805
|
-
source: 'same' | 'separate';
|
|
3806
|
-
apiUrl?: string;
|
|
3807
|
-
responsePath?: string;
|
|
3808
|
-
};
|
|
3809
|
-
}
|
|
3810
|
-
interface TableTheme {
|
|
3811
|
-
primaryColor?: string;
|
|
3812
|
-
headerBg?: string;
|
|
3813
|
-
headerColor?: string;
|
|
3814
|
-
rowHoverBg?: string;
|
|
3815
|
-
borderColor?: string;
|
|
3816
|
-
}
|
|
3817
|
-
interface NestedStringConfig {
|
|
3818
|
-
paramName: string;
|
|
3819
|
-
baseValue?: string;
|
|
3820
|
-
separator: string;
|
|
3821
|
-
assignment: string;
|
|
3822
|
-
}
|
|
3823
|
-
interface QueryParamsConfig {
|
|
3824
|
-
pageKey?: string;
|
|
3825
|
-
sizeKey?: string;
|
|
3826
|
-
pageIndexOffset?: number;
|
|
3827
|
-
filterHandling?: 'standard' | 'nested_string';
|
|
3828
|
-
nestedStringConfig?: NestedStringConfig;
|
|
3829
|
-
}
|
|
3830
|
-
interface TableConfig {
|
|
3831
|
-
columns: TableColumn[];
|
|
3832
|
-
apiUrl?: string;
|
|
3833
|
-
apiMethod?: 'GET' | 'POST';
|
|
3834
|
-
apiPayload?: any;
|
|
3835
|
-
dataResponsePath?: string;
|
|
3836
|
-
filters?: TableFilter[];
|
|
3837
|
-
filterData?: {
|
|
3838
|
-
[key: string]: any[];
|
|
3839
|
-
};
|
|
3840
|
-
pagination?: PaginationConfig;
|
|
3841
|
-
actions?: TableAction[];
|
|
3842
|
-
topBarButtons?: TableAction[];
|
|
3843
|
-
sortBy?: string;
|
|
3844
|
-
orderBy?: 'ASC' | 'DESC';
|
|
3845
|
-
theme?: TableTheme;
|
|
3846
|
-
requestParams?: Function;
|
|
3847
|
-
selectable?: boolean;
|
|
3848
|
-
queryParamsConfig?: QueryParamsConfig;
|
|
3849
|
-
labels?: TableLabels;
|
|
3850
|
-
searchConfig?: SearchConfig;
|
|
3851
|
-
maxHeight?: string;
|
|
3852
|
-
stickyHeader?: boolean;
|
|
3853
|
-
stickyColumnCount?: number;
|
|
3854
|
-
token?: string;
|
|
3855
|
-
tokenHeader?: string;
|
|
3856
|
-
editingRowClass?: string;
|
|
3857
|
-
/** Fallback text for any cell whose value is null, undefined, or empty string.
|
|
3858
|
-
* Overridden per-column via TableColumn.emptyValue. Library default: '-' */
|
|
3859
|
-
emptyValue?: string;
|
|
3860
|
-
}
|
|
3861
|
-
interface SearchConfig {
|
|
3862
|
-
enabled: boolean;
|
|
3863
|
-
searchKey?: string;
|
|
3864
|
-
debounceTime?: number;
|
|
3865
|
-
handling?: 'standard' | 'nested_string';
|
|
3866
|
-
minimumCharacter?: number;
|
|
3867
|
-
}
|
|
3868
|
-
interface TableLabels {
|
|
3869
|
-
searchPlaceholder?: string;
|
|
3870
|
-
actionColumnHeader?: string;
|
|
3871
|
-
noDataMessage?: string;
|
|
3872
|
-
itemsPerPageLabel?: string;
|
|
3873
|
-
defaultConfirmationMessage?: string;
|
|
3874
|
-
saveLabel?: string;
|
|
3875
|
-
cancelLabel?: string;
|
|
3876
|
-
addLabel?: string;
|
|
3877
|
-
/** Variant for the Add button (new row). Defaults to 'danger'. */
|
|
3878
|
-
addButtonVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3879
|
-
/** Variant for the Save button (edit row). Defaults to 'primary'. */
|
|
3880
|
-
saveButtonVariant?: 'primary' | 'secondary' | 'outline' | 'danger' | 'warning' | 'success' | 'danger-outline';
|
|
3881
|
-
}
|
|
3882
|
-
/**
|
|
3883
|
-
* Emitted by the SmartTableComponent when operating in external-data mode
|
|
3884
|
-
* (i.e. when [tableData] input is provided by the parent).
|
|
3885
|
-
* The parent is responsible for fetching updated data based on this event
|
|
3886
|
-
* and providing it back via [tableData] and [totalItemsCount].
|
|
3887
|
-
*/
|
|
3888
|
-
interface TableDataChangeEvent {
|
|
3889
|
-
page: number;
|
|
3890
|
-
pageSize: number;
|
|
3891
|
-
sortBy?: string;
|
|
3892
|
-
orderBy?: 'ASC' | 'DESC';
|
|
3893
|
-
searchTerm?: string;
|
|
3894
|
-
filters?: {
|
|
3895
|
-
[key: string]: any;
|
|
3896
|
-
};
|
|
3897
|
-
}
|
|
3898
|
-
interface TableRowSaveEvent {
|
|
3899
|
-
row: any;
|
|
3900
|
-
isNew: boolean;
|
|
3901
|
-
}
|
|
3902
|
-
|
|
3903
4048
|
/**
|
|
3904
4049
|
* Maps a SmartForm field name to its corresponding API query-param key.
|
|
3905
4050
|
*/
|
|
@@ -4332,7 +4477,7 @@ declare class FilterTableSelectorModule {
|
|
|
4332
4477
|
|
|
4333
4478
|
declare class SharedUiModule {
|
|
4334
4479
|
static ɵfac: i0.ɵɵFactoryDeclaration<SharedUiModule, never>;
|
|
4335
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FormFieldConfigurationModule, typeof FilterTableSelectorModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FormFieldConfigurationModule, typeof FilterTableSelectorModule]>;
|
|
4480
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<SharedUiModule, never, [typeof i2$1.CommonModule, typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FormFieldConfigurationModule, typeof TableColumnConfigurationModule, typeof FilterTableSelectorModule], [typeof MaterialModule, typeof AlertModule, typeof ButtonModule, typeof ButtonDropdownModule, typeof ConfirmationModalModule, typeof FilterSidebarModule, typeof FilterModule, typeof SummaryCardModule, typeof ConfigurableFormModule, typeof FormComponentsModule, typeof SmartFormModule, typeof SideNavModule, typeof FormBuilderModule, typeof FormFieldConfigurationModule, typeof TableColumnConfigurationModule, typeof FilterTableSelectorModule]>;
|
|
4336
4481
|
static ɵinj: i0.ɵɵInjectorDeclaration<SharedUiModule>;
|
|
4337
4482
|
}
|
|
4338
4483
|
|
|
@@ -4530,5 +4675,5 @@ declare class SnackbarModule {
|
|
|
4530
4675
|
static ɵinj: i0.ɵɵInjectorDeclaration<SnackbarModule>;
|
|
4531
4676
|
}
|
|
4532
4677
|
|
|
4533
|
-
export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, 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, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
|
|
4534
|
-
export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfigFieldNode, ConfigSectionNode, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldEventPayload, 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, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
|
|
4678
|
+
export { AlertComponent, AlertModule, ButtonComponent, ButtonDropdownComponent, ButtonDropdownModule, ButtonModule, CheckboxComponent, 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, ToggleComponent, ValidationUtils, appendBaseUrlRecursively, clearLocalStorage, clearSessionStorage, getLocalStorageItem, getSessionStorageItem, removeLocalStorageItem, removeSessionStorageItem, setLocalStorageItem, setSessionStorageItem, translateConfig };
|
|
4679
|
+
export type { AlertLabels, AlertVariant, AttachmentConfig, ButtonLabels, ButtonVariant, CheckboxConfig, CheckboxLabels, CheckboxOption, ConfigColumnNode, ConfigFieldNode, ConfigSectionNode, ConfirmationModalConfig, DateConfig, DatePickerConfig, DatepickerLabels, DropdownAction, DropdownConfig, DropdownLabels, DropdownOption, EmailConfig, FieldConfig, FieldEventPayload, 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, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules };
|