commons-shared-web-ui 0.0.71 → 0.0.73
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 +269 -46
- package/fesm2022/commons-shared-web-ui.mjs.map +1 -1
- package/index.d.ts +119 -17
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -11,6 +11,8 @@ import { Router, ActivatedRoute } from '@angular/router';
|
|
|
11
11
|
import { BehaviorSubject, Subject, Observable } from 'rxjs';
|
|
12
12
|
import * as i8$1 from '@angular/cdk/overlay';
|
|
13
13
|
import { ScrollStrategy, Overlay, ConnectedPosition } from '@angular/cdk/overlay';
|
|
14
|
+
import * as i10 from '@angular/material/core';
|
|
15
|
+
import { DateAdapter } from '@angular/material/core';
|
|
14
16
|
import { DomSanitizer, SafeResourceUrl, SafeHtml } from '@angular/platform-browser';
|
|
15
17
|
import * as i1 from '@angular/material/card';
|
|
16
18
|
import * as i3 from '@angular/material/checkbox';
|
|
@@ -20,7 +22,6 @@ import * as i6 from '@angular/material/radio';
|
|
|
20
22
|
import * as i7 from '@angular/material/dialog';
|
|
21
23
|
import * as i8 from '@angular/material/form-field';
|
|
22
24
|
import * as i9 from '@angular/material/datepicker';
|
|
23
|
-
import * as i10 from '@angular/material/core';
|
|
24
25
|
import * as i11 from '@angular/material/input';
|
|
25
26
|
import * as i12 from '@angular/material/icon';
|
|
26
27
|
import * as i13 from '@angular/material/progress-spinner';
|
|
@@ -44,6 +45,8 @@ import * as i29 from '@angular/cdk/accordion';
|
|
|
44
45
|
import * as i11$2 from 'ngx-quill';
|
|
45
46
|
import * as i11$1 from '@angular/cdk/scrolling';
|
|
46
47
|
import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
|
|
48
|
+
import * as i5$1 from '@angular/cdk/drag-drop';
|
|
49
|
+
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
47
50
|
|
|
48
51
|
type ButtonVariant = 'primary' | 'warning' | 'outline' | 'secondary' | 'success' | 'danger' | 'danger-outline' | 'text';
|
|
49
52
|
interface ButtonLabels {
|
|
@@ -1504,6 +1507,7 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1504
1507
|
private http;
|
|
1505
1508
|
private hostRef;
|
|
1506
1509
|
private overlay;
|
|
1510
|
+
private dateAdapter;
|
|
1507
1511
|
config: FieldConfig;
|
|
1508
1512
|
controller: SmartFormController;
|
|
1509
1513
|
/**
|
|
@@ -1688,7 +1692,7 @@ declare class FormFieldComponent implements OnInit, AfterViewInit, OnDestroy {
|
|
|
1688
1692
|
*/
|
|
1689
1693
|
get groupKey(): string;
|
|
1690
1694
|
readonly dropdownScrollStrategy: ScrollStrategy;
|
|
1691
|
-
constructor(fb: FormBuilder, expressionService: ExpressionService, http: HttpClient, hostRef: ElementRef<HTMLElement>, overlay: Overlay);
|
|
1695
|
+
constructor(fb: FormBuilder, expressionService: ExpressionService, http: HttpClient, hostRef: ElementRef<HTMLElement>, overlay: Overlay, dateAdapter: DateAdapter<Date>);
|
|
1692
1696
|
isFieldVisible(field: FieldConfig, rowController?: SmartFormController): boolean;
|
|
1693
1697
|
/** Portal root, resolved from this component's own node rather than the global document. */
|
|
1694
1698
|
private get portalRoot();
|
|
@@ -3304,6 +3308,8 @@ interface ConfigFieldNode {
|
|
|
3304
3308
|
visible: boolean;
|
|
3305
3309
|
/** Whether the field is mandatory (required). Only meaningful when `visible` is true. */
|
|
3306
3310
|
mandatory: boolean;
|
|
3311
|
+
/** Column span in the section's 12-column grid (1-12). Freely editable. */
|
|
3312
|
+
colSpan: number;
|
|
3307
3313
|
/** When true, the visibility toggle is locked ON (cannot be hidden). */
|
|
3308
3314
|
lockVisibility: boolean;
|
|
3309
3315
|
/** When true, the mandatory control is locked (cannot be changed). */
|
|
@@ -3343,6 +3349,21 @@ interface ConfigSectionNode {
|
|
|
3343
3349
|
fields: ConfigFieldNode[];
|
|
3344
3350
|
/** Recursively nested child sections. */
|
|
3345
3351
|
subsections: ConfigSectionNode[];
|
|
3352
|
+
/**
|
|
3353
|
+
* Live reference to the schema array `fields` was parsed from (e.g. a section's
|
|
3354
|
+
* `sectionConfig.children`, or the top-level `sectionConfig.children` for a
|
|
3355
|
+
* synthetic bundle). Reordering writes directly into this array so the schema's
|
|
3356
|
+
* own field order — not a separate `sequence` property — drives render order.
|
|
3357
|
+
* Null when there is nothing to reorder into (e.g. an empty section).
|
|
3358
|
+
*/
|
|
3359
|
+
fieldsSource: FieldConfig[] | null;
|
|
3360
|
+
/**
|
|
3361
|
+
* False when this section's own children include a `ROW` wrapper. Reordering is
|
|
3362
|
+
* disabled in that case — flattening a ROW's grouped children into plain
|
|
3363
|
+
* siblings would silently break the row layout, so dragging is turned off
|
|
3364
|
+
* instead of risking a corrupted schema.
|
|
3365
|
+
*/
|
|
3366
|
+
reorderable: boolean;
|
|
3346
3367
|
}
|
|
3347
3368
|
|
|
3348
3369
|
/**
|
|
@@ -3375,6 +3396,16 @@ declare class FieldConfigurationService {
|
|
|
3375
3396
|
toggleFieldVisible(path: number[], fieldIndex: number): void;
|
|
3376
3397
|
/** Toggle a field's mandatory flag. Ignored when locked or hidden. */
|
|
3377
3398
|
toggleFieldMandatory(path: number[], fieldIndex: number): void;
|
|
3399
|
+
/** Set a field's column span, clamped to the 1-12 grid range. */
|
|
3400
|
+
setFieldColSpan(path: number[], fieldIndex: number, colSpan: number): void;
|
|
3401
|
+
/**
|
|
3402
|
+
* Reorder a field within its own section (drag-and-drop). Reordering is scoped to
|
|
3403
|
+
* one section's direct fields — dragging never moves a field across sections.
|
|
3404
|
+
* Rejected (no-op) if the move would place a field above the field it depends on
|
|
3405
|
+
* via `optionConfig.dependencies` (e.g. a "state" field can never sort above the
|
|
3406
|
+
* "country" field it depends on).
|
|
3407
|
+
*/
|
|
3408
|
+
reorderField(path: number[], previousIndex: number, currentIndex: number): void;
|
|
3378
3409
|
/**
|
|
3379
3410
|
* Produce the updated schema. Writes the current tree state onto the working
|
|
3380
3411
|
* clone and returns a fresh deep clone (safe to hand to the host / submit).
|
|
@@ -3396,6 +3427,12 @@ declare class FieldConfigurationService {
|
|
|
3396
3427
|
* derived `visibilityLockedByParent` flag set (drives the disabled toggle in the UI).
|
|
3397
3428
|
*/
|
|
3398
3429
|
private _applyDependencyRules;
|
|
3430
|
+
/**
|
|
3431
|
+
* True when every field with a dependency parent (`parentName`) sorts after that
|
|
3432
|
+
* parent within the given list. Fields whose parent isn't a sibling in this same
|
|
3433
|
+
* list (cross-section dependency, or no such field) are unconstrained here.
|
|
3434
|
+
*/
|
|
3435
|
+
private _isValidFieldOrder;
|
|
3399
3436
|
/** Recursively set visibility on a section and all its descendants (respecting locks). */
|
|
3400
3437
|
private _cascadeVisibility;
|
|
3401
3438
|
static ɵfac: i0.ɵɵFactoryDeclaration<FieldConfigurationService, never>;
|
|
@@ -3407,6 +3444,16 @@ interface FieldEventPayload {
|
|
|
3407
3444
|
sectionPath: number[];
|
|
3408
3445
|
fieldIndex: number;
|
|
3409
3446
|
}
|
|
3447
|
+
/** Payload for a field colSpan change, carrying the sub-path from this section down. */
|
|
3448
|
+
interface FieldColSpanPayload extends FieldEventPayload {
|
|
3449
|
+
colSpan: number;
|
|
3450
|
+
}
|
|
3451
|
+
/** Payload for a field drag-reorder, carrying the sub-path from this section down. */
|
|
3452
|
+
interface FieldReorderPayload {
|
|
3453
|
+
sectionPath: number[];
|
|
3454
|
+
previousIndex: number;
|
|
3455
|
+
currentIndex: number;
|
|
3456
|
+
}
|
|
3410
3457
|
/**
|
|
3411
3458
|
* A recursive section/group node in the form-field-configuration tree.
|
|
3412
3459
|
* Emits path-relative events that parents prefix with their own index before
|
|
@@ -3421,6 +3468,8 @@ declare class ConfigSectionNodeComponent {
|
|
|
3421
3468
|
toggleExpanded: EventEmitter<number[]>;
|
|
3422
3469
|
fieldToggleVisible: EventEmitter<FieldEventPayload>;
|
|
3423
3470
|
fieldToggleMandatory: EventEmitter<FieldEventPayload>;
|
|
3471
|
+
fieldColSpanChange: EventEmitter<FieldColSpanPayload>;
|
|
3472
|
+
fieldReorder: EventEmitter<FieldReorderPayload>;
|
|
3424
3473
|
get displayLabel(): string;
|
|
3425
3474
|
get visibleFieldCount(): number;
|
|
3426
3475
|
get hasToggle(): boolean;
|
|
@@ -3428,29 +3477,41 @@ declare class ConfigSectionNodeComponent {
|
|
|
3428
3477
|
onToggleExpanded(): void;
|
|
3429
3478
|
onFieldToggleVisible(fieldIndex: number): void;
|
|
3430
3479
|
onFieldToggleMandatory(fieldIndex: number): void;
|
|
3480
|
+
onFieldColSpanChange(fieldIndex: number, colSpan: number): void;
|
|
3481
|
+
onFieldDrop(event: CdkDragDrop<unknown>): void;
|
|
3431
3482
|
onSubToggleVisible(subIndex: number, subPath: number[]): void;
|
|
3432
3483
|
onSubToggleExpanded(subIndex: number, subPath: number[]): void;
|
|
3433
3484
|
onSubFieldToggleVisible(subIndex: number, payload: FieldEventPayload): void;
|
|
3434
3485
|
onSubFieldToggleMandatory(subIndex: number, payload: FieldEventPayload): void;
|
|
3486
|
+
onSubFieldColSpanChange(subIndex: number, payload: FieldColSpanPayload): void;
|
|
3487
|
+
onSubFieldReorder(subIndex: number, payload: FieldReorderPayload): void;
|
|
3435
3488
|
trackByIndex(index: number): number;
|
|
3436
3489
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigSectionNodeComponent, never>;
|
|
3437
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigSectionNodeComponent, "lib-config-section-node", never, { "section": { "alias": "section"; "required": true; }; "depth": { "alias": "depth"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; }, { "toggleVisible": "toggleVisible"; "toggleExpanded": "toggleExpanded"; "fieldToggleVisible": "fieldToggleVisible"; "fieldToggleMandatory": "fieldToggleMandatory"; }, never, never, false, never>;
|
|
3490
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigSectionNodeComponent, "lib-config-section-node", never, { "section": { "alias": "section"; "required": true; }; "depth": { "alias": "depth"; "required": false; }; "translate": { "alias": "translate"; "required": false; }; }, { "toggleVisible": "toggleVisible"; "toggleExpanded": "toggleExpanded"; "fieldToggleVisible": "fieldToggleVisible"; "fieldToggleMandatory": "fieldToggleMandatory"; "fieldColSpanChange": "fieldColSpanChange"; "fieldReorder": "fieldReorder"; }, never, never, false, never>;
|
|
3438
3491
|
}
|
|
3439
3492
|
|
|
3440
3493
|
/**
|
|
3441
3494
|
* Form Field Configuration
|
|
3442
3495
|
* ------------------------
|
|
3443
3496
|
* Renders a compact tree of a form schema's sections and fields, each with a
|
|
3444
|
-
* **visibility** toggle
|
|
3445
|
-
*
|
|
3497
|
+
* **visibility** toggle, a **mandatory** control, an editable **column span**,
|
|
3498
|
+
* and a drag handle to **reorder** fields within their own section. Intended to
|
|
3499
|
+
* be embedded inside a `cc-confirmation-modal` on a host page ("Configure fields").
|
|
3446
3500
|
*
|
|
3447
3501
|
* Pass a `FormSchema` via `[schema]`. The input is deep-cloned, so it is never
|
|
3448
3502
|
* mutated. When the user confirms, call `getUpdatedSchema()` to read back the
|
|
3449
|
-
* modified schema (visible/isEnabled/disabled and
|
|
3503
|
+
* modified schema (visible/isEnabled/disabled, required, and colSpan flags
|
|
3504
|
+
* updated, and each section's own children reordered to match the tree).
|
|
3450
3505
|
*
|
|
3451
3506
|
* Fields/sections carrying `lockVisibility: true` cannot be hidden, and
|
|
3452
3507
|
* `lockMandatory: true` freezes their required state.
|
|
3453
3508
|
*
|
|
3509
|
+
* Reordering is scoped to one section's direct fields — a field can never be
|
|
3510
|
+
* dragged into another section, and a field can never be dragged above a field
|
|
3511
|
+
* it depends on via `optionConfig.dependencies` (e.g. "state" can't sort above
|
|
3512
|
+
* "country"). Sections whose children include a `ROW` wrapper can't be
|
|
3513
|
+
* reordered at all (dragging is disabled) to avoid flattening the row layout.
|
|
3514
|
+
*
|
|
3454
3515
|
* @example
|
|
3455
3516
|
* ```html
|
|
3456
3517
|
* <cc-confirmation-modal [isOpen]="open" (confirm)="save()" (cancel)="open = false">
|
|
@@ -3480,6 +3541,8 @@ declare class FormFieldConfigurationComponent implements OnChanges {
|
|
|
3480
3541
|
onToggleExpanded(sectionIndex: number, subPath: number[]): void;
|
|
3481
3542
|
onFieldToggleVisible(sectionIndex: number, payload: FieldEventPayload): void;
|
|
3482
3543
|
onFieldToggleMandatory(sectionIndex: number, payload: FieldEventPayload): void;
|
|
3544
|
+
onFieldColSpanChange(sectionIndex: number, payload: FieldColSpanPayload): void;
|
|
3545
|
+
onFieldReorder(sectionIndex: number, payload: FieldReorderPayload): void;
|
|
3483
3546
|
trackByIndex(index: number): number;
|
|
3484
3547
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldConfigurationComponent, never>;
|
|
3485
3548
|
static ɵcmp: i0.ɵɵComponentDeclaration<FormFieldConfigurationComponent, "lib-form-field-configuration", never, { "schema": { "alias": "schema"; "required": true; }; "translate": { "alias": "translate"; "required": false; }; "showLegend": { "alias": "showLegend"; "required": false; }; }, {}, never, never, false, never>;
|
|
@@ -3496,14 +3559,16 @@ declare class ConfigFieldNodeComponent {
|
|
|
3496
3559
|
translate?: (key: string) => string;
|
|
3497
3560
|
toggleVisible: EventEmitter<void>;
|
|
3498
3561
|
toggleMandatory: EventEmitter<void>;
|
|
3562
|
+
colSpanChange: EventEmitter<number>;
|
|
3499
3563
|
get displayLabel(): string;
|
|
3564
|
+
onColSpanInput(value: string): void;
|
|
3500
3565
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigFieldNodeComponent, never>;
|
|
3501
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigFieldNodeComponent, "lib-config-field-node", never, { "field": { "alias": "field"; "required": true; }; "translate": { "alias": "translate"; "required": false; }; }, { "toggleVisible": "toggleVisible"; "toggleMandatory": "toggleMandatory"; }, never, never, false, never>;
|
|
3566
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ConfigFieldNodeComponent, "lib-config-field-node", never, { "field": { "alias": "field"; "required": true; }; "translate": { "alias": "translate"; "required": false; }; }, { "toggleVisible": "toggleVisible"; "toggleMandatory": "toggleMandatory"; "colSpanChange": "colSpanChange"; }, never, never, false, never>;
|
|
3502
3567
|
}
|
|
3503
3568
|
|
|
3504
3569
|
declare class FormFieldConfigurationModule {
|
|
3505
3570
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormFieldConfigurationModule, never>;
|
|
3506
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldConfigurationModule, [typeof FormFieldConfigurationComponent, typeof ConfigSectionNodeComponent, typeof ConfigFieldNodeComponent], [typeof i2$1.CommonModule], [typeof FormFieldConfigurationComponent]>;
|
|
3571
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<FormFieldConfigurationModule, [typeof FormFieldConfigurationComponent, typeof ConfigSectionNodeComponent, typeof ConfigFieldNodeComponent], [typeof i2$1.CommonModule, typeof i5$1.DragDropModule], [typeof FormFieldConfigurationComponent]>;
|
|
3507
3572
|
static ɵinj: i0.ɵɵInjectorDeclaration<FormFieldConfigurationModule>;
|
|
3508
3573
|
}
|
|
3509
3574
|
|
|
@@ -3515,6 +3580,11 @@ declare class FormFieldConfigurationModule {
|
|
|
3515
3580
|
* clone, so `applyTreeToSchema` simply walks the tree and assigns the node state
|
|
3516
3581
|
* onto those references — there is no positional re-matching, which keeps it robust
|
|
3517
3582
|
* against ROWs, nested groups, and mixed leaf/section children.
|
|
3583
|
+
*
|
|
3584
|
+
* Field order is a plain property of the schema — there is no separate `sequence`
|
|
3585
|
+
* field. Reordering rewrites the schema's own children array in place, so render
|
|
3586
|
+
* order (which simply follows array order, as it always has) reflects the
|
|
3587
|
+
* configurator's choices with no extra sorting logic anywhere else.
|
|
3518
3588
|
*/
|
|
3519
3589
|
declare class ConfigSchemaTreeService {
|
|
3520
3590
|
/**
|
|
@@ -3524,8 +3594,9 @@ declare class ConfigSchemaTreeService {
|
|
|
3524
3594
|
parseSchema(schema: FormSchema): ConfigSectionNode[];
|
|
3525
3595
|
/**
|
|
3526
3596
|
* Write the current tree state back onto the schema the nodes reference.
|
|
3527
|
-
* Sets isEnabled/visible/disabled for visibility
|
|
3528
|
-
*
|
|
3597
|
+
* Sets isEnabled/visible/disabled for visibility, required for mandatory, and
|
|
3598
|
+
* colSpan; and physically reorders each section's own children array to match
|
|
3599
|
+
* the tree's current field order.
|
|
3529
3600
|
*/
|
|
3530
3601
|
applyTreeToSchema(sections: ConfigSectionNode[]): void;
|
|
3531
3602
|
private _buildSections;
|
|
@@ -3534,6 +3605,13 @@ declare class ConfigSchemaTreeService {
|
|
|
3534
3605
|
private _buildField;
|
|
3535
3606
|
private _isSection;
|
|
3536
3607
|
private _applySection;
|
|
3608
|
+
/**
|
|
3609
|
+
* Rewrites `slots` in place so its leaf-field entries follow `fields`' current
|
|
3610
|
+
* order. Section entries (GROUP/SUBFIELDS) keep their original array position —
|
|
3611
|
+
* only the leaf fields move. Safe to call whenever `slots` contains no ROW
|
|
3612
|
+
* (guaranteed by the `reorderable` flag the caller checks).
|
|
3613
|
+
*/
|
|
3614
|
+
private _reorderChildren;
|
|
3537
3615
|
private _applyField;
|
|
3538
3616
|
static ɵfac: i0.ɵɵFactoryDeclaration<ConfigSchemaTreeService, never>;
|
|
3539
3617
|
static ɵprov: i0.ɵɵInjectableDeclaration<ConfigSchemaTreeService>;
|
|
@@ -3586,6 +3664,12 @@ interface TableColumn {
|
|
|
3586
3664
|
visible?: boolean;
|
|
3587
3665
|
/** Configurator-only flag: when true the column can never be hidden (toggle is replaced by a lock). */
|
|
3588
3666
|
lockVisibility?: boolean;
|
|
3667
|
+
/**
|
|
3668
|
+
* Explicit display order (lower renders first). Columns without a sequence keep their
|
|
3669
|
+
* original relative order, placed after any columns that do have one. Set automatically
|
|
3670
|
+
* by the column configurator when the user reorders columns.
|
|
3671
|
+
*/
|
|
3672
|
+
sequence?: number;
|
|
3589
3673
|
}
|
|
3590
3674
|
interface TableFilter {
|
|
3591
3675
|
key: string;
|
|
@@ -3816,6 +3900,8 @@ declare class TableColumnConfigurationService {
|
|
|
3816
3900
|
loadConfig(config: TableConfig): void;
|
|
3817
3901
|
/** Toggle a column's visibility. Locked columns are ignored. */
|
|
3818
3902
|
toggleColumnVisible(index: number): void;
|
|
3903
|
+
/** Move a column from `previousIndex` to `currentIndex` (drag-and-drop reorder). */
|
|
3904
|
+
reorderColumn(previousIndex: number, currentIndex: number): void;
|
|
3819
3905
|
/**
|
|
3820
3906
|
* Produce the updated config. Writes the current node state onto the working
|
|
3821
3907
|
* clone and returns a fresh deep clone (safe to hand to the host / persist).
|
|
@@ -3823,6 +3909,12 @@ declare class TableColumnConfigurationService {
|
|
|
3823
3909
|
*/
|
|
3824
3910
|
buildUpdatedConfig(): TableConfig | null;
|
|
3825
3911
|
private _buildColumn;
|
|
3912
|
+
/**
|
|
3913
|
+
* Orders columns by `sequence` (ascending). Columns without a `sequence` keep their
|
|
3914
|
+
* original relative order, placed after any columns that do have one — so configs that
|
|
3915
|
+
* never set `sequence` come back untouched (stable sort).
|
|
3916
|
+
*/
|
|
3917
|
+
private _sortBySequence;
|
|
3826
3918
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnConfigurationService, never>;
|
|
3827
3919
|
static ɵprov: i0.ɵɵInjectableDeclaration<TableColumnConfigurationService>;
|
|
3828
3920
|
}
|
|
@@ -3831,15 +3923,17 @@ declare class TableColumnConfigurationService {
|
|
|
3831
3923
|
* Table Column Configuration
|
|
3832
3924
|
* --------------------------
|
|
3833
3925
|
* Renders a compact list of a table config's columns, each with a **visibility**
|
|
3834
|
-
* toggle
|
|
3835
|
-
* ("Configure columns").
|
|
3926
|
+
* toggle and a drag handle for **reordering**. Intended to be embedded inside a
|
|
3927
|
+
* `cc-confirmation-modal` on a host page ("Configure columns").
|
|
3836
3928
|
*
|
|
3837
3929
|
* Pass a `TableConfig` via `[config]`. The input is deep-cloned, so it is never
|
|
3838
|
-
* mutated.
|
|
3839
|
-
*
|
|
3930
|
+
* mutated. Columns load pre-sorted by `sequence` (if set); columns without a
|
|
3931
|
+
* `sequence` keep their original relative order. When the user confirms, call
|
|
3932
|
+
* `getUpdatedConfig()` to read back the modified config (isEnabled/visible flags
|
|
3933
|
+
* and `sequence` updated per column, in the new order).
|
|
3840
3934
|
*
|
|
3841
3935
|
* Columns carrying `lockVisibility: true` cannot be hidden — their toggle is
|
|
3842
|
-
* replaced by a lock icon.
|
|
3936
|
+
* replaced by a lock icon. They can still be dragged to reorder.
|
|
3843
3937
|
*
|
|
3844
3938
|
* @example
|
|
3845
3939
|
* ```html
|
|
@@ -3867,6 +3961,8 @@ declare class TableColumnConfigurationComponent implements OnChanges {
|
|
|
3867
3961
|
*/
|
|
3868
3962
|
getUpdatedConfig(): TableConfig | null;
|
|
3869
3963
|
onToggleVisible(index: number): void;
|
|
3964
|
+
/** Drag-and-drop reorder. Written back as `sequence` on each column by `getUpdatedConfig()`. */
|
|
3965
|
+
onDrop(event: CdkDragDrop<ConfigColumnNode[]>): void;
|
|
3870
3966
|
trackByIndex(index: number): number;
|
|
3871
3967
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnConfigurationComponent, never>;
|
|
3872
3968
|
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>;
|
|
@@ -3889,7 +3985,7 @@ declare class ConfigColumnNodeComponent {
|
|
|
3889
3985
|
|
|
3890
3986
|
declare class TableColumnConfigurationModule {
|
|
3891
3987
|
static ɵfac: i0.ɵɵFactoryDeclaration<TableColumnConfigurationModule, never>;
|
|
3892
|
-
static ɵmod: i0.ɵɵNgModuleDeclaration<TableColumnConfigurationModule, [typeof TableColumnConfigurationComponent, typeof ConfigColumnNodeComponent], [typeof i2$1.CommonModule], [typeof TableColumnConfigurationComponent]>;
|
|
3988
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<TableColumnConfigurationModule, [typeof TableColumnConfigurationComponent, typeof ConfigColumnNodeComponent], [typeof i2$1.CommonModule, typeof i5$1.DragDropModule], [typeof TableColumnConfigurationComponent]>;
|
|
3893
3989
|
static ɵinj: i0.ɵɵInjectorDeclaration<TableColumnConfigurationModule>;
|
|
3894
3990
|
}
|
|
3895
3991
|
|
|
@@ -4901,6 +4997,12 @@ declare class SmartTableComponent implements OnInit, OnChanges, AfterViewInit, O
|
|
|
4901
4997
|
private calculateStickyPositions;
|
|
4902
4998
|
private toTitleCase;
|
|
4903
4999
|
get columnCount(): number;
|
|
5000
|
+
/**
|
|
5001
|
+
* Orders `config.columns` by their `sequence` value (ascending). Columns without a
|
|
5002
|
+
* `sequence` are left in their original relative order, placed after any columns that
|
|
5003
|
+
* do have one — so configs that never set `sequence` are left untouched (stable sort).
|
|
5004
|
+
*/
|
|
5005
|
+
private sortColumnsBySequence;
|
|
4904
5006
|
/**
|
|
4905
5007
|
* Filters out actions/action-items that are either explicitly disabled via
|
|
4906
5008
|
* `isEnabled: false` or hidden for the given row by their `visibleWhen` /
|
|
@@ -5226,4 +5328,4 @@ declare class SnackbarModule {
|
|
|
5226
5328
|
}
|
|
5227
5329
|
|
|
5228
5330
|
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 };
|
|
5229
|
-
export type { ActionVisibility, 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, TimeMode, TimePickerConfig, TimePickerLabels, TimePickerVariant, ToggleConfig, ToggleLabels, UIConfig, UISubType, UIType, UploadedFile, ValidationResult, ValidationRules, VisibilityRule };
|
|
5331
|
+
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, 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 };
|