@tsi-developpement/tsi-shared-ui 1.9.2 → 1.9.4
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/esm2022/lib/enums/grid-sizing-mode.mjs +15 -0
- package/esm2022/lib/enums/index.mjs +2 -2
- package/esm2022/lib/interfaces/grid/grid-configuration.mjs +1 -1
- package/esm2022/lib/interfaces/index.mjs +1 -2
- package/esm2022/lib/tsi-components/create-or-edit-entity-informations/create-or-edit-entity-informations.component.mjs +1 -1
- package/esm2022/lib/tsi-components/create-or-edit-modele-import/create-or-edit-modele-import.component.mjs +4 -5
- package/esm2022/lib/tsi-components/input-components/editable-grid/editable-grid.component.mjs +61 -3
- package/esm2022/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.mjs +41 -12
- package/esm2022/lib/tsi-components/manage-import-export/manage-import-export.component.mjs +1 -1
- package/esm2022/lib/tsi-components/manage-reporting/manage-reporting.component.mjs +3 -5
- package/esm2022/lib/tsi-components/modal-component/modal.component.mjs +1 -1
- package/esm2022/lib/tsi-components/output-components/tsi-generic-grid/tsi-generic-grid.component.mjs +71 -78
- package/esm2022/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.mjs +15 -5
- package/esm2022/lib/tsi-components/output-components/tsi-view-grid/tsi-view-grid.component.mjs +7 -4
- package/esm2022/lib/tsi-components/tsi-action-erp-create-or-edit/tsi-action-erp-create-or-edit.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-action-erp-list/tsi-action-erp-list.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-dynamic-form/dynamic-form-list/dynamic-form-list.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-generic-crud/tsi-generic-crud.component.mjs +7 -3
- package/esm2022/lib/tsi-components/tsi-notes-grid/tsi-notes-grid.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-popup-text-viewer/tsi-popup-text-viewer.component.mjs +1 -1
- package/esm2022/lib/tsi-components/tsi-upload-grid/tsi-upload-grid.component.mjs +1 -1
- package/esm2022/lib/tsi-helpers/column-width.controller.mjs +97 -0
- package/esm2022/lib/tsi-helpers/grid-col-style.helper.mjs +28 -5
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs +4039 -3839
- package/fesm2022/tsi-developpement-tsi-shared-ui.mjs.map +1 -1
- package/lib/consts/app-providers.d.ts +1 -1
- package/lib/enums/grid-sizing-mode.d.ts +13 -0
- package/lib/enums/index.d.ts +1 -1
- package/lib/interfaces/grid/grid-configuration.d.ts +7 -2
- package/lib/interfaces/index.d.ts +0 -1
- package/lib/tsi-components/input-components/editable-grid/editable-grid.component.d.ts +45 -1
- package/lib/tsi-components/input-components/tsi-rate-input/tsi-rate-input.component.d.ts +24 -3
- package/lib/tsi-components/output-components/tsi-generic-grid/tsi-generic-grid.component.d.ts +48 -2
- package/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.d.ts +7 -1
- package/lib/tsi-components/output-components/tsi-view-grid/tsi-view-grid.component.d.ts +3 -2
- package/lib/tsi-components/tsi-generic-crud/tsi-generic-crud.component.d.ts +3 -1
- package/lib/tsi-helpers/column-width.controller.d.ts +67 -0
- package/lib/tsi-helpers/grid-col-style.helper.d.ts +16 -5
- package/package.json +1 -1
- package/esm2022/lib/enums/css-units.mjs +0 -10
- package/esm2022/lib/interfaces/styles/css-size-property.mjs +0 -17
- package/lib/enums/css-units.d.ts +0 -8
- package/lib/interfaces/styles/css-size-property.d.ts +0 -10
|
@@ -3,4 +3,4 @@ import { FormStateService } from "../services/form/form-state.service";
|
|
|
3
3
|
import { PresentationDesignerBaseService } from "../services/presentation-setting/presentation-designer-base.service";
|
|
4
4
|
import { GenericValidationStateService } from "../services/validation/generic-validation-state.service";
|
|
5
5
|
import { InputRegistryService } from "../services/validation/input-registry.service";
|
|
6
|
-
export declare const appProviders: (typeof
|
|
6
|
+
export declare const appProviders: (typeof PresentationDesignerBaseService | typeof GenericValidationStateService | typeof InputRegistryService | typeof DynamicFormService | typeof FormStateService)[];
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* How a grid distributes horizontal space across its columns.
|
|
3
|
+
*
|
|
4
|
+
* - `Fill` (default): the table stretches to fill its container. Leftover space is
|
|
5
|
+
* spread across the auto-sized columns — the historical behavior.
|
|
6
|
+
* - `Hug`: the table shrinks to what its columns need (`width: auto`, capped at the
|
|
7
|
+
* container with `max-width: 100%`). Columns keep their natural/defined size and any
|
|
8
|
+
* leftover container width stays empty on the right, instead of inflating columns.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum GridSizingMode {
|
|
11
|
+
Fill = "fill",
|
|
12
|
+
Hug = "hug"
|
|
13
|
+
}
|
package/lib/enums/index.d.ts
CHANGED
|
@@ -2,12 +2,12 @@ export * from './auto-complete';
|
|
|
2
2
|
export * from './claim-types';
|
|
3
3
|
export * from './code-format';
|
|
4
4
|
export * from './component-use-modes-enum';
|
|
5
|
-
export * from './css-units';
|
|
6
5
|
export * from './decimal-format';
|
|
7
6
|
export * from './display-types';
|
|
8
7
|
export * from './filter-operator-type';
|
|
9
8
|
export * from './form-validation-error';
|
|
10
9
|
export * from './grid-selection-mode';
|
|
10
|
+
export * from './grid-sizing-mode';
|
|
11
11
|
export * from './grid-sort-mode';
|
|
12
12
|
export * from './http-method-types';
|
|
13
13
|
export * from './input-types';
|
|
@@ -22,8 +22,13 @@ export interface GridColumn {
|
|
|
22
22
|
isFrozen?: boolean;
|
|
23
23
|
type?: DisplayTypes | InputTypes;
|
|
24
24
|
view?: string;
|
|
25
|
-
|
|
26
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Developer-preferred column width. A bare `number` is interpreted as `rem`
|
|
27
|
+
* (the natural default); a `string` is used verbatim (any CSS unit/keyword,
|
|
28
|
+
* e.g. `'200px'`, `'20%'`, `'calc(100% - 4rem)'`). An end user's remembered
|
|
29
|
+
* width (and live resize) always takes precedence over this.
|
|
30
|
+
*/
|
|
31
|
+
width?: number | string;
|
|
27
32
|
enabled?: boolean;
|
|
28
33
|
align?: string;
|
|
29
34
|
showTotalSummary?: boolean;
|
|
@@ -8,6 +8,7 @@ import { LocalizePipe } from '../../../pipes/localize.pipe';
|
|
|
8
8
|
import { ObservableCollection } from '../../../models/collection/observable-collection';
|
|
9
9
|
import { FormState } from '../../../models/form/form-state';
|
|
10
10
|
import { TsiInputBase } from '../../../tsi-base/tsi-input-base/tsi-input-base.component';
|
|
11
|
+
import { GridSizingMode } from '../../../enums/grid-sizing-mode';
|
|
11
12
|
import * as i0 from "@angular/core";
|
|
12
13
|
export declare class EditableGridComponent extends TsiInputBase implements OnInit, OnDestroy {
|
|
13
14
|
private _localizePipe;
|
|
@@ -65,6 +66,25 @@ export declare class EditableGridComponent extends TsiInputBase implements OnIni
|
|
|
65
66
|
showEditButton: boolean;
|
|
66
67
|
showRowSummary: boolean;
|
|
67
68
|
scrollHeight: string;
|
|
69
|
+
/**
|
|
70
|
+
* Fill (default): the table stretches to fill its container. Hug: the table shrinks to
|
|
71
|
+
* its columns' size (never wider than the container), leaving leftover width empty.
|
|
72
|
+
*/
|
|
73
|
+
sizingMode: GridSizingMode;
|
|
74
|
+
/**
|
|
75
|
+
* Sizing style bound to the p-table's `[tableStyle]` — the single lever that distinguishes
|
|
76
|
+
* Fill from Hug (see GridSizingMode). Applied inline on the PrimeNG table, so it beats
|
|
77
|
+
* PrimeNG's default `.p-datatable-table { width: 100% }` with no `!important`/`::ng-deep`.
|
|
78
|
+
* - Fill: default (no forced width; PrimeNG fills the container).
|
|
79
|
+
* - Hug: `width:auto` shrinks the table to its columns; `max-width:100%` keeps it inside the
|
|
80
|
+
* page (overflow scrolls); `min-width:0` avoids any inherited floor.
|
|
81
|
+
*
|
|
82
|
+
* Hug + `columnResizeMode="expand"`: dragging a column resizes that column, but `width:auto`
|
|
83
|
+
* is re-asserted on change detection, so the table itself stays hugged and never expands.
|
|
84
|
+
*/
|
|
85
|
+
get tableStyle(): {
|
|
86
|
+
[key: string]: string;
|
|
87
|
+
};
|
|
68
88
|
rowPerPage: number[];
|
|
69
89
|
pageSize: number;
|
|
70
90
|
entityPrimaryKeyName: string;
|
|
@@ -129,6 +149,30 @@ export declare class EditableGridComponent extends TsiInputBase implements OnIni
|
|
|
129
149
|
getReorderedColumns(columnOrder: string[]): any[];
|
|
130
150
|
resetSelectedColumns(configuration: string): void;
|
|
131
151
|
getState(): TableState | undefined;
|
|
152
|
+
/**
|
|
153
|
+
* Shared model for the developer-width / wrapping / resize-priority behavior. Action/button
|
|
154
|
+
* columns and frozen columns are excluded (frozen columns must keep their sticky-offset
|
|
155
|
+
* width or later frozen columns misalign); all other columns are eligible.
|
|
156
|
+
*/
|
|
157
|
+
private readonly columnWidth;
|
|
158
|
+
/** Remember which column the user resized so its developer-preferred width yields. */
|
|
159
|
+
onColResize(event: {
|
|
160
|
+
element?: HTMLElement;
|
|
161
|
+
delta?: number;
|
|
162
|
+
}): void;
|
|
163
|
+
/** Whether a column's content should wrap to stay inside its constrained width. */
|
|
164
|
+
shouldWrapColumn(col: GridColumn): boolean;
|
|
165
|
+
/**
|
|
166
|
+
* Developer size style only, bound via `[ngStyle]` on the header/summary cells alongside
|
|
167
|
+
* their untouched `[style]="col.style"` (so a string `col.style` is never spread/broken).
|
|
168
|
+
*/
|
|
169
|
+
getColumnSizeStyle(col: GridColumn): {
|
|
170
|
+
[key: string]: string;
|
|
171
|
+
};
|
|
172
|
+
/** Body `<td>` style: RTL alignment + top-align (eligible cells) + developer size style. */
|
|
173
|
+
getBodyColumnStyle(col: GridColumn): {
|
|
174
|
+
[key: string]: any;
|
|
175
|
+
};
|
|
132
176
|
isDeleteButtonDisabled(item: any): any;
|
|
133
177
|
ngOnDestroy(): void;
|
|
134
178
|
private _onColumnsChanged;
|
|
@@ -168,5 +212,5 @@ export declare class EditableGridComponent extends TsiInputBase implements OnIni
|
|
|
168
212
|
private _cleanGridDataForEmit;
|
|
169
213
|
private _getShadowSearchColumnLabel;
|
|
170
214
|
static ɵfac: i0.ɵɵFactoryDeclaration<EditableGridComponent, never>;
|
|
171
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<EditableGridComponent, "Tsi-Generic-Editable-Grid", never, { "selectedItems": { "alias": "selectedItems"; "required": false; }; "configuration": { "alias": "configuration"; "required": false; }; "key": { "alias": "key"; "required": false; }; "items": { "alias": "items"; "required": false; }; "saveEvent": { "alias": "saveEvent"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showAddButton": { "alias": "showAddButton"; "required": false; }; "showDeleteButton": { "alias": "showDeleteButton"; "required": false; }; "showEditButton": { "alias": "showEditButton"; "required": false; }; "showRowSummary": { "alias": "showRowSummary"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "rowPerPage": { "alias": "rowPerPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "entityPrimaryKeyName": { "alias": "entityPrimaryKeyName"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "gridData": { "alias": "gridData"; "required": false; }; "isTableLoading": { "alias": "isTableLoading"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "enableRowDisabling": { "alias": "enableRowDisabling"; "required": false; }; "rowSummaryConfig": { "alias": "rowSummaryConfig"; "required": false; }; "showHaveSumary": { "alias": "showHaveSumary"; "required": false; }; "showRowSumary": { "alias": "showRowSumary"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "showConsultButton": { "alias": "showConsultButton"; "required": false; }; "editableGridBusinessClass": { "alias": "editableGridBusinessClass"; "required": false; }; "orderColumn": { "alias": "orderColumn"; "required": false; }; "deleteLineButtonDisabled": { "alias": "deleteLineButtonDisabled"; "required": false; }; "showDuplicateButton": { "alias": "showDuplicateButton"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "refreshEventEmitter": "refreshEventEmitter"; "saveDataEventEmitter": "saveDataEventEmitter"; "rowChangedEventEmitter": "rowChangedEventEmitter"; "selectedRowEventEmitter": "selectedRowEventEmitter"; "addedRowEventEmitter": "addedRowEventEmitter"; "focusOutEventEmitter": "focusOutEventEmitter"; "cellChanged": "cellChanged"; "rowDeletedEventEmitter": "rowDeletedEventEmitter"; "selectedItemsChange": "selectedItemsChange"; "onRowSelect": "onRowSelect"; "focusOutRow": "focusOutRow"; "onConsultClicked": "onConsultClicked"; "rowDuplicatedEventEmitter": "rowDuplicatedEventEmitter"; }, never, never, false, never>;
|
|
215
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<EditableGridComponent, "Tsi-Generic-Editable-Grid", never, { "selectedItems": { "alias": "selectedItems"; "required": false; }; "configuration": { "alias": "configuration"; "required": false; }; "key": { "alias": "key"; "required": false; }; "items": { "alias": "items"; "required": false; }; "saveEvent": { "alias": "saveEvent"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showAddButton": { "alias": "showAddButton"; "required": false; }; "showDeleteButton": { "alias": "showDeleteButton"; "required": false; }; "showEditButton": { "alias": "showEditButton"; "required": false; }; "showRowSummary": { "alias": "showRowSummary"; "required": false; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; }; "sizingMode": { "alias": "sizingMode"; "required": false; }; "rowPerPage": { "alias": "rowPerPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "entityPrimaryKeyName": { "alias": "entityPrimaryKeyName"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "gridData": { "alias": "gridData"; "required": false; }; "isTableLoading": { "alias": "isTableLoading"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; "showSaveButton": { "alias": "showSaveButton"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "enableRowDisabling": { "alias": "enableRowDisabling"; "required": false; }; "rowSummaryConfig": { "alias": "rowSummaryConfig"; "required": false; }; "showHaveSumary": { "alias": "showHaveSumary"; "required": false; }; "showRowSumary": { "alias": "showRowSumary"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "showConsultButton": { "alias": "showConsultButton"; "required": false; }; "editableGridBusinessClass": { "alias": "editableGridBusinessClass"; "required": false; }; "orderColumn": { "alias": "orderColumn"; "required": false; }; "deleteLineButtonDisabled": { "alias": "deleteLineButtonDisabled"; "required": false; }; "showDuplicateButton": { "alias": "showDuplicateButton"; "required": false; }; "id": { "alias": "id"; "required": false; }; }, { "refreshEventEmitter": "refreshEventEmitter"; "saveDataEventEmitter": "saveDataEventEmitter"; "rowChangedEventEmitter": "rowChangedEventEmitter"; "selectedRowEventEmitter": "selectedRowEventEmitter"; "addedRowEventEmitter": "addedRowEventEmitter"; "focusOutEventEmitter": "focusOutEventEmitter"; "cellChanged": "cellChanged"; "rowDeletedEventEmitter": "rowDeletedEventEmitter"; "selectedItemsChange": "selectedItemsChange"; "onRowSelect": "onRowSelect"; "focusOutRow": "focusOutRow"; "onConsultClicked": "onConsultClicked"; "rowDuplicatedEventEmitter": "rowDuplicatedEventEmitter"; }, never, never, false, never>;
|
|
172
216
|
}
|
|
@@ -1,16 +1,37 @@
|
|
|
1
|
-
import { EventEmitter
|
|
1
|
+
import { EventEmitter } from '@angular/core';
|
|
2
2
|
import { TsiInputBase } from '../../../tsi-base/tsi-input-base/tsi-input-base.component';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
|
-
export declare class TsiRateInputComponent extends TsiInputBase<number | undefined>
|
|
4
|
+
export declare class TsiRateInputComponent extends TsiInputBase<number | undefined> {
|
|
5
5
|
required?: boolean;
|
|
6
|
+
/**
|
|
7
|
+
* Governs how the percentage the user sees/edits relates to the value stored in the model.
|
|
8
|
+
* The user always reads and types a percentage; this flag only changes what is persisted.
|
|
9
|
+
*
|
|
10
|
+
* - false (default): "2 %" on screen is stored as the whole percent `2`.
|
|
11
|
+
* - true : "2 %" on screen is stored as the fraction `0.02`.
|
|
12
|
+
*
|
|
13
|
+
* Must match the `isFraction` given to the mirror `Tsi-Rate-Display` so the pair
|
|
14
|
+
* interprets a stored value identically.
|
|
15
|
+
*/
|
|
6
16
|
isFraction?: boolean;
|
|
7
17
|
numOfDecimal?: number;
|
|
8
18
|
newItemEvent: EventEmitter<number>;
|
|
9
19
|
inputFieldChange: EventEmitter<number>;
|
|
10
20
|
private isValueChanged;
|
|
11
|
-
|
|
21
|
+
/**
|
|
22
|
+
* The percentage shown in / typed into the p-inputNumber. It is a view-only
|
|
23
|
+
* projection of the stored model value (`inputField`), converted according to
|
|
24
|
+
* `isFraction`. The model remains the single source of truth.
|
|
25
|
+
*/
|
|
26
|
+
get displayValue(): number | undefined;
|
|
12
27
|
valueChanged(event: any): void;
|
|
13
28
|
onChangeofOptions(): void;
|
|
29
|
+
/** stored model value -> on-screen percentage */
|
|
30
|
+
private toDisplay;
|
|
31
|
+
/** on-screen percentage -> stored model value */
|
|
32
|
+
private toModel;
|
|
33
|
+
/** Rounds to a fixed number of decimals, guarding against binary-float drift introduced by the x100 conversion. */
|
|
34
|
+
private round;
|
|
14
35
|
static ɵfac: i0.ɵɵFactoryDeclaration<TsiRateInputComponent, never>;
|
|
15
36
|
static ɵcmp: i0.ɵɵComponentDeclaration<TsiRateInputComponent, "Tsi-Rate-Input", never, { "required": { "alias": "required"; "required": false; }; "isFraction": { "alias": "isFraction"; "required": false; }; "numOfDecimal": { "alias": "numOfDecimal"; "required": false; }; }, { "newItemEvent": "newItemEvent"; "inputFieldChange": "inputFieldChange"; }, never, never, false, never>;
|
|
16
37
|
}
|
package/lib/tsi-components/output-components/tsi-generic-grid/tsi-generic-grid.component.d.ts
CHANGED
|
@@ -21,6 +21,7 @@ import { AppSettingsService } from '../../../services/settings/app-settings.serv
|
|
|
21
21
|
import { StatusColorService } from '../../../services/status/status-color.service';
|
|
22
22
|
import { Menu } from 'primeng/menu';
|
|
23
23
|
import { ActionPlacement } from '../../../enums/action-placement';
|
|
24
|
+
import { GridSizingMode } from '../../../enums/grid-sizing-mode';
|
|
24
25
|
import { EventSchema } from '../../../models/common/event-schema';
|
|
25
26
|
import * as i0 from "@angular/core";
|
|
26
27
|
export declare class TsiGenericGridComponent implements OnInit, AfterViewInit {
|
|
@@ -46,6 +47,28 @@ export declare class TsiGenericGridComponent implements OnInit, AfterViewInit {
|
|
|
46
47
|
showUploadButton: boolean;
|
|
47
48
|
showNoteButton: boolean;
|
|
48
49
|
showActionButton: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Fill (default): the table stretches to fill its container and auto columns share the
|
|
52
|
+
* leftover space. Hug: the table shrinks to its columns' size (never wider than the
|
|
53
|
+
* container), so leftover width stays empty rather than inflating columns.
|
|
54
|
+
*/
|
|
55
|
+
sizingMode: GridSizingMode;
|
|
56
|
+
/**
|
|
57
|
+
* Sizing style bound to the p-table's `[tableStyle]`. This is the single lever that
|
|
58
|
+
* distinguishes Fill from Hug (see GridSizingMode) — everything else (per-column widths,
|
|
59
|
+
* wrapping) is identical between modes. Applied inline on the table PrimeNG owns, so it
|
|
60
|
+
* beats PrimeNG's default `.p-datatable-table { width: 100% }` with no `!important`/`::ng-deep`.
|
|
61
|
+
* - Fill: keep the 50rem floor and let the table fill its container (width defaults to 100%).
|
|
62
|
+
* - Hug: `width:auto` shrinks the table to its columns; `min-width:0` drops the floor so a
|
|
63
|
+
* narrow table isn't stuck at 50rem; `max-width:100%` keeps it inside the page (overflow scrolls).
|
|
64
|
+
*
|
|
65
|
+
* Hug + `columnResizeMode="expand"`: dragging a column resizes that column (PrimeNG's
|
|
66
|
+
* per-column `!important` rules still win), but `width:auto` is re-asserted on change
|
|
67
|
+
* detection, so the table itself never expands past its content — it stays hugged by design.
|
|
68
|
+
*/
|
|
69
|
+
get tableStyle(): {
|
|
70
|
+
[key: string]: string;
|
|
71
|
+
};
|
|
49
72
|
onSave: EventEmitter<any>;
|
|
50
73
|
filterMatchMode: typeof FilterMatchMode;
|
|
51
74
|
tooltipPosition: typeof TooltipPosition;
|
|
@@ -185,7 +208,6 @@ export declare class TsiGenericGridComponent implements OnInit, AfterViewInit {
|
|
|
185
208
|
overflowColumnClicked(menu: Menu, event: Event, row: any): void;
|
|
186
209
|
onOverflowActionClicked(row: any, menuItem: MenuItem): void;
|
|
187
210
|
importantColumns: string[];
|
|
188
|
-
isFirstLoadOfPage: boolean;
|
|
189
211
|
private titleCache;
|
|
190
212
|
constructor(_statusColorService: StatusColorService, _fichierService: FichierService, _htmlTemplateGeneratorService: HtmlTemplateGeneratorService, datePipe: DatePipe, _messageService: TsiNotificationService, localize: LocalizePipe, layoutHelperService: LayoutHelperService, _layoutService: LayoutService, _primengConfig: PrimeNGConfig, appSettingsService: AppSettingsService, _errorResponseManagerService: ErrorResponseManagerService, _injector: EnvironmentInjector, config?: DynamicDialogConfig<any> | undefined, _ref?: DynamicDialogRef<any> | undefined);
|
|
191
213
|
ngAfterViewInit(): void;
|
|
@@ -208,6 +230,30 @@ export declare class TsiGenericGridComponent implements OnInit, AfterViewInit {
|
|
|
208
230
|
resetSelectedColumns(configuration: string): void;
|
|
209
231
|
notInSpecifiedColumn(field: string): boolean;
|
|
210
232
|
isOverflowColumn(field: string): boolean;
|
|
233
|
+
/**
|
|
234
|
+
* A column is eligible for a developer-preferred width, wrapping and top-align only
|
|
235
|
+
* when it is a regular data column. Action/button columns, the synthetic overflow
|
|
236
|
+
* column, image columns and frozen columns keep their own fixed, predictable size:
|
|
237
|
+
* frozen columns must keep their sticky-offset width or later frozen columns misalign (UC-7).
|
|
238
|
+
*/
|
|
239
|
+
private isWidthEligible;
|
|
240
|
+
/** Shared model for the developer-width / wrapping / resize-priority behavior. */
|
|
241
|
+
private readonly columnWidth;
|
|
242
|
+
/** Remember which column the user resized so its developer-preferred width yields (UC-4). */
|
|
243
|
+
onColResize(event: {
|
|
244
|
+
element?: HTMLElement;
|
|
245
|
+
delta?: number;
|
|
246
|
+
}): void;
|
|
247
|
+
/** Whether a column's content should wrap to stay inside its constrained width. */
|
|
248
|
+
shouldWrapColumn(col: GridColumn): boolean;
|
|
249
|
+
/** Header `<th>` style: column header style merged with the developer size style. */
|
|
250
|
+
getHeaderColumnStyle(col: GridColumn): {
|
|
251
|
+
[key: string]: any;
|
|
252
|
+
};
|
|
253
|
+
/** Body `<td>` style: column body style + top-align (eligible cells) + developer size style. */
|
|
254
|
+
getBodyColumnStyle(col: GridColumn): {
|
|
255
|
+
[key: string]: any;
|
|
256
|
+
};
|
|
211
257
|
processStickyColumns(columns: GridColumn[]): void;
|
|
212
258
|
getCheckboxStyle(): {
|
|
213
259
|
right: string;
|
|
@@ -298,5 +344,5 @@ export declare class TsiGenericGridComponent implements OnInit, AfterViewInit {
|
|
|
298
344
|
getEventDateCalendar(): EventSchema;
|
|
299
345
|
handlePageChange(): void;
|
|
300
346
|
static ɵfac: i0.ɵɵFactoryDeclaration<TsiGenericGridComponent, never>;
|
|
301
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TsiGenericGridComponent, "Tsi-Generic-Grid", never, { "cudComponent": { "alias": "cudComponent"; "required": false; }; "modalSize": { "alias": "modalSize"; "required": false; }; "showInfoButton": { "alias": "showInfoButton"; "required": false; }; "showDownloadButton": { "alias": "showDownloadButton"; "required": false; }; "showUploadButton": { "alias": "showUploadButton"; "required": false; }; "showNoteButton": { "alias": "showNoteButton"; "required": false; }; "showActionButton": { "alias": "showActionButton"; "required": false; }; "formName": { "alias": "formName"; "required": false; }; "id": { "alias": "id"; "required": false; }; "pagedRequest": { "alias": "pagedRequest"; "required": false; }; "configuration": { "alias": "configuration"; "required": false; }; "page": { "alias": "page"; "required": false; }; "key": { "alias": "key"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "isSearchButtonDisabled": { "alias": "isSearchButtonDisabled"; "required": false; }; "filteredColumns": { "alias": "filteredColumns"; "required": false; }; "gridData": { "alias": "gridData"; "required": false; }; "isTableLoading": { "alias": "isTableLoading"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; "showSearchBox": { "alias": "showSearchBox"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "showHeaderFilters": { "alias": "showHeaderFilters"; "required": false; }; "showFilterButton": { "alias": "showFilterButton"; "required": false; }; "isGridDataPagedInApi": { "alias": "isGridDataPagedInApi"; "required": false; }; "header": { "alias": "header"; "required": false; }; "ShowFilterColumns": { "alias": "ShowFilterColumns"; "required": false; }; "showImportExportButton": { "alias": "showImportExportButton"; "required": false; }; "crudService": { "alias": "crudService"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "sortMode": { "alias": "sortMode"; "required": false; }; "filtersHtmlTemplate": { "alias": "filtersHtmlTemplate"; "required": false; }; "presentationSettings": { "alias": "presentationSettings"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "searchOnInit": { "alias": "searchOnInit"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showExportButton": { "alias": "showExportButton"; "required": false; }; "showSearchField": { "alias": "showSearchField"; "required": false; }; "showCalenderView": { "alias": "showCalenderView"; "required": false; }; "calenderSchema": { "alias": "calenderSchema"; "required": false; }; "showCardView": { "alias": "showCardView"; "required": false; }; "showKanbanView": { "alias": "showKanbanView"; "required": false; }; "showKanbanViewOfWorkFlowEtat": { "alias": "showKanbanViewOfWorkFlowEtat"; "required": false; }; "page$": { "alias": "page$"; "required": false; }; "checkedByField": { "alias": "checkedByField"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "targetBusinessClass": { "alias": "targetBusinessClass"; "required": false; }; "descriminatorValue": { "alias": "descriminatorValue"; "required": false; }; "businessClass": { "alias": "businessClass"; "required": false; }; "entityInfo": { "alias": "entityInfo"; "required": false; }; }, { "onSave": "onSave"; "editRow": "editRow"; "deleteRow": "deleteRow"; "load": "load"; "buttonColumnClicked": "buttonColumnClicked"; "filtersHtmlTemplateChange": "filtersHtmlTemplateChange"; "selectedItemsChange": "selectedItemsChange"; "searchFieldsValueChanged": "searchFieldsValueChanged"; "calendarEventClick": "calendarEventClick"; "statusFilterChanged": "statusFilterChanged"; }, never, never, false, never>;
|
|
347
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TsiGenericGridComponent, "Tsi-Generic-Grid", never, { "cudComponent": { "alias": "cudComponent"; "required": false; }; "modalSize": { "alias": "modalSize"; "required": false; }; "showInfoButton": { "alias": "showInfoButton"; "required": false; }; "showDownloadButton": { "alias": "showDownloadButton"; "required": false; }; "showUploadButton": { "alias": "showUploadButton"; "required": false; }; "showNoteButton": { "alias": "showNoteButton"; "required": false; }; "showActionButton": { "alias": "showActionButton"; "required": false; }; "sizingMode": { "alias": "sizingMode"; "required": false; }; "formName": { "alias": "formName"; "required": false; }; "id": { "alias": "id"; "required": false; }; "pagedRequest": { "alias": "pagedRequest"; "required": false; }; "configuration": { "alias": "configuration"; "required": false; }; "page": { "alias": "page"; "required": false; }; "key": { "alias": "key"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "isSearchButtonDisabled": { "alias": "isSearchButtonDisabled"; "required": false; }; "filteredColumns": { "alias": "filteredColumns"; "required": false; }; "gridData": { "alias": "gridData"; "required": false; }; "isTableLoading": { "alias": "isTableLoading"; "required": false; }; "parent": { "alias": "parent"; "required": false; }; "showSearchBox": { "alias": "showSearchBox"; "required": false; }; "showActionColumn": { "alias": "showActionColumn"; "required": false; }; "showHeaderFilters": { "alias": "showHeaderFilters"; "required": false; }; "showFilterButton": { "alias": "showFilterButton"; "required": false; }; "isGridDataPagedInApi": { "alias": "isGridDataPagedInApi"; "required": false; }; "header": { "alias": "header"; "required": false; }; "ShowFilterColumns": { "alias": "ShowFilterColumns"; "required": false; }; "showImportExportButton": { "alias": "showImportExportButton"; "required": false; }; "crudService": { "alias": "crudService"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "sortMode": { "alias": "sortMode"; "required": false; }; "filtersHtmlTemplate": { "alias": "filtersHtmlTemplate"; "required": false; }; "presentationSettings": { "alias": "presentationSettings"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "searchOnInit": { "alias": "searchOnInit"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showExportButton": { "alias": "showExportButton"; "required": false; }; "showSearchField": { "alias": "showSearchField"; "required": false; }; "showCalenderView": { "alias": "showCalenderView"; "required": false; }; "calenderSchema": { "alias": "calenderSchema"; "required": false; }; "showCardView": { "alias": "showCardView"; "required": false; }; "showKanbanView": { "alias": "showKanbanView"; "required": false; }; "showKanbanViewOfWorkFlowEtat": { "alias": "showKanbanViewOfWorkFlowEtat"; "required": false; }; "page$": { "alias": "page$"; "required": false; }; "checkedByField": { "alias": "checkedByField"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "targetBusinessClass": { "alias": "targetBusinessClass"; "required": false; }; "descriminatorValue": { "alias": "descriminatorValue"; "required": false; }; "businessClass": { "alias": "businessClass"; "required": false; }; "entityInfo": { "alias": "entityInfo"; "required": false; }; }, { "onSave": "onSave"; "editRow": "editRow"; "deleteRow": "deleteRow"; "load": "load"; "buttonColumnClicked": "buttonColumnClicked"; "filtersHtmlTemplateChange": "filtersHtmlTemplateChange"; "selectedItemsChange": "selectedItemsChange"; "searchFieldsValueChanged": "searchFieldsValueChanged"; "calendarEventClick": "calendarEventClick"; "statusFilterChanged": "statusFilterChanged"; }, never, never, false, never>;
|
|
302
348
|
}
|
package/lib/tsi-components/output-components/tsi-rate-display/tsi-rate-display.component.d.ts
CHANGED
|
@@ -3,11 +3,17 @@ import * as i0 from "@angular/core";
|
|
|
3
3
|
export declare class TsiRateDisplayComponent {
|
|
4
4
|
private _localizationService;
|
|
5
5
|
protected locale: LocaleCode;
|
|
6
|
+
/**
|
|
7
|
+
* How to interpret `inputData` as a percentage. Must match the `isFraction`
|
|
8
|
+
* of the mirror `Tsi-Rate-Input`.
|
|
9
|
+
* - false (default): `inputData` is a whole percent (`2` shows as "2 %").
|
|
10
|
+
* - true : `inputData` is a fraction (`0.02` shows as "2 %").
|
|
11
|
+
*/
|
|
6
12
|
isFraction: boolean;
|
|
7
13
|
inputData?: number;
|
|
8
14
|
numOfDecimal?: number;
|
|
9
15
|
constructor();
|
|
10
|
-
getToFraction(): number;
|
|
16
|
+
getToFraction(): number | null;
|
|
11
17
|
getFormat(): string;
|
|
12
18
|
static ɵfac: i0.ɵɵFactoryDeclaration<TsiRateDisplayComponent, never>;
|
|
13
19
|
static ɵcmp: i0.ɵɵComponentDeclaration<TsiRateDisplayComponent, "Tsi-Rate-Display", never, { "isFraction": { "alias": "isFraction"; "required": false; }; "inputData": { "alias": "inputData"; "required": false; }; "numOfDecimal": { "alias": "numOfDecimal"; "required": false; }; }, {}, never, never, false, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ChangeDetectorRef, EventEmitter, OnInit } from '@angular/core';
|
|
2
|
-
import { GridSelectionMode, GridSortMode, TooltipPosition } from '../../../enums';
|
|
2
|
+
import { GridSelectionMode, GridSizingMode, GridSortMode, TooltipPosition } from '../../../enums';
|
|
3
3
|
import { ButtonClickResult, GridColumn, IGridConfiguration, IModalSize } from '../../../interfaces';
|
|
4
4
|
import { IPage, IPagedRequest, ISummaryForProprety } from '../../../interfaces/pagination/pagination-base';
|
|
5
5
|
import { SearchField } from '../../../models';
|
|
@@ -64,6 +64,7 @@ export declare class TsiViewGridComponent implements OnInit {
|
|
|
64
64
|
selectAll: boolean;
|
|
65
65
|
checkedByField: string;
|
|
66
66
|
sortMode: GridSortMode | any;
|
|
67
|
+
sizingMode: GridSizingMode;
|
|
67
68
|
set searchOnInit(value: boolean);
|
|
68
69
|
get searchOnInit(): boolean;
|
|
69
70
|
summariesChange: EventEmitter<Array<ISummaryForProprety>>;
|
|
@@ -98,5 +99,5 @@ export declare class TsiViewGridComponent implements OnInit {
|
|
|
98
99
|
toggleCalenderView(): void;
|
|
99
100
|
handleCalendarEventClick(item: any): void;
|
|
100
101
|
static ɵfac: i0.ɵɵFactoryDeclaration<TsiViewGridComponent, never>;
|
|
101
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TsiViewGridComponent, "tsi-view-grid", never, { "columns": { "alias": "columns"; "required": false; }; "gridConfiguration": { "alias": "gridConfiguration"; "required": false; }; "viewComponent": { "alias": "viewComponent"; "required": false; }; "crudService": { "alias": "crudService"; "required": false; }; "header": { "alias": "header"; "required": false; }; "modalSize": { "alias": "modalSize"; "required": false; }; "showConsultButton": { "alias": "showConsultButton"; "required": false; }; "showSearchField": { "alias": "showSearchField"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "formEndpoint": { "alias": "formEndpoint"; "required": false; }; "formName": { "alias": "formName"; "required": false; }; "id": { "alias": "id"; "required": false; }; "showImportExportButton": { "alias": "showImportExportButton"; "required": false; }; "targetBusinessClass": { "alias": "targetBusinessClass"; "required": false; }; "getDataFromApi": { "alias": "getDataFromApi"; "required": false; }; "gridData": { "alias": "gridData"; "required": false; }; "isSearchButtonDisabled": { "alias": "isSearchButtonDisabled"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "key": { "alias": "key"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showExportButton": { "alias": "showExportButton"; "required": false; }; "showCalenderView": { "alias": "showCalenderView"; "required": false; }; "showHeaderFilters": { "alias": "showHeaderFilters"; "required": false; }; "showFilterButton": { "alias": "showFilterButton"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "checkedByField": { "alias": "checkedByField"; "required": false; }; "sortMode": { "alias": "sortMode"; "required": false; }; "searchOnInit": { "alias": "searchOnInit"; "required": false; }; }, { "summariesChange": "summariesChange"; "selectedItemsChange": "selectedItemsChange"; "buttonColumnClicked": "buttonColumnClicked"; "searchFieldsValueChanged": "searchFieldsValueChanged"; "getAllPagedResultChanged": "getAllPagedResultChanged"; }, never, never, false, never>;
|
|
102
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TsiViewGridComponent, "tsi-view-grid", never, { "columns": { "alias": "columns"; "required": false; }; "gridConfiguration": { "alias": "gridConfiguration"; "required": false; }; "viewComponent": { "alias": "viewComponent"; "required": false; }; "crudService": { "alias": "crudService"; "required": false; }; "header": { "alias": "header"; "required": false; }; "modalSize": { "alias": "modalSize"; "required": false; }; "showConsultButton": { "alias": "showConsultButton"; "required": false; }; "showSearchField": { "alias": "showSearchField"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "formEndpoint": { "alias": "formEndpoint"; "required": false; }; "formName": { "alias": "formName"; "required": false; }; "id": { "alias": "id"; "required": false; }; "showImportExportButton": { "alias": "showImportExportButton"; "required": false; }; "targetBusinessClass": { "alias": "targetBusinessClass"; "required": false; }; "getDataFromApi": { "alias": "getDataFromApi"; "required": false; }; "gridData": { "alias": "gridData"; "required": false; }; "isSearchButtonDisabled": { "alias": "isSearchButtonDisabled"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "key": { "alias": "key"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showExportButton": { "alias": "showExportButton"; "required": false; }; "showCalenderView": { "alias": "showCalenderView"; "required": false; }; "showHeaderFilters": { "alias": "showHeaderFilters"; "required": false; }; "showFilterButton": { "alias": "showFilterButton"; "required": false; }; "selectAll": { "alias": "selectAll"; "required": false; }; "checkedByField": { "alias": "checkedByField"; "required": false; }; "sortMode": { "alias": "sortMode"; "required": false; }; "sizingMode": { "alias": "sizingMode"; "required": false; }; "searchOnInit": { "alias": "searchOnInit"; "required": false; }; }, { "summariesChange": "summariesChange"; "selectedItemsChange": "selectedItemsChange"; "buttonColumnClicked": "buttonColumnClicked"; "searchFieldsValueChanged": "searchFieldsValueChanged"; "getAllPagedResultChanged": "getAllPagedResultChanged"; }, never, never, false, never>;
|
|
102
103
|
}
|
|
@@ -3,6 +3,7 @@ import { MenuItem, MessageService } from 'primeng/api';
|
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
4
|
import { ButtonType } from '../../enums/button-type.enum';
|
|
5
5
|
import { GridSelectionMode } from '../../enums/grid-selection-mode';
|
|
6
|
+
import { GridSizingMode } from '../../enums/grid-sizing-mode';
|
|
6
7
|
import { TooltipPosition } from '../../enums/tooltipPosition.enum';
|
|
7
8
|
import { ButtonClickResult, GridColumn, IGridConfiguration, IModalSize, IPage, IPagedRequest } from '../../interfaces';
|
|
8
9
|
import { SearchField, workflowInstanceInformationResponse } from '../../models';
|
|
@@ -95,6 +96,7 @@ export declare class TsiGenericCrudComponent implements OnInit, AfterContentChec
|
|
|
95
96
|
searchFields: SearchField[] | undefined;
|
|
96
97
|
calenderSchema: EventSchema | undefined;
|
|
97
98
|
showActionButton: boolean;
|
|
99
|
+
sizingMode: GridSizingMode;
|
|
98
100
|
selectKeyOnly: boolean;
|
|
99
101
|
selectionMode: GridSelectionMode;
|
|
100
102
|
selectedItems: Array<any>;
|
|
@@ -167,5 +169,5 @@ export declare class TsiGenericCrudComponent implements OnInit, AfterContentChec
|
|
|
167
169
|
initialiseShowKanbanViewOfWorkFlowEtat(): void;
|
|
168
170
|
private getDiscriminator;
|
|
169
171
|
static ɵfac: i0.ɵɵFactoryDeclaration<TsiGenericCrudComponent, never>;
|
|
170
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<TsiGenericCrudComponent, "Tsi-Generic-Crud", never, { "entityInfo": { "alias": "entityInfo"; "required": false; }; "modalData": { "alias": "modalData"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "gridConfiguration": { "alias": "gridConfiguration"; "required": false; }; "cudComponent": { "alias": "cudComponent"; "required": false; }; "crudService": { "alias": "crudService"; "required": false; }; "header": { "alias": "header"; "required": false; }; "modalSize": { "alias": "modalSize"; "required": false; }; "descriminatorValue": { "alias": "descriminatorValue"; "required": false; }; "presentationSettings": { "alias": "presentationSettings"; "required": false; }; "preventAddEvent": { "alias": "preventAddEvent"; "required": false; }; "formEndpoint": { "alias": "formEndpoint"; "required": false; }; "formName": { "alias": "formName"; "required": false; }; "isSearchButtonDisabled": { "alias": "isSearchButtonDisabled"; "required": false; }; "showHeaderFilters": { "alias": "showHeaderFilters"; "required": false; }; "showEditButton": { "alias": "showEditButton"; "required": false; }; "showDeleteButton": { "alias": "showDeleteButton"; "required": false; }; "showAddButton": { "alias": "showAddButton"; "required": false; }; "showConsultButton": { "alias": "showConsultButton"; "required": false; }; "showUploadButton": { "alias": "showUploadButton"; "required": false; }; "showNoteButton": { "alias": "showNoteButton"; "required": false; }; "showDownloadButton": { "alias": "showDownloadButton"; "required": false; }; "showInfoButton": { "alias": "showInfoButton"; "required": false; }; "showDuplicateButton": { "alias": "showDuplicateButton"; "required": false; }; "showFormButton": { "alias": "showFormButton"; "required": false; }; "showCalenderView": { "alias": "showCalenderView"; "required": false; }; "showCardView": { "alias": "showCardView"; "required": false; }; "showImportFromOutlookButton": { "alias": "showImportFromOutlookButton"; "required": false; }; "showKanbanView": { "alias": "showKanbanView"; "required": false; }; "showKanbanViewOfWorkFlowEtat": { "alias": "showKanbanViewOfWorkFlowEtat"; "required": false; }; "showSearchField": { "alias": "showSearchField"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "calenderSchema": { "alias": "calenderSchema"; "required": false; }; "showActionButton": { "alias": "showActionButton"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "key": { "alias": "key"; "required": false; }; "id": { "alias": "id"; "required": false; }; "businessClass": { "alias": "businessClass"; "required": false; }; "searchOnInit": { "alias": "searchOnInit"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showExportButton": { "alias": "showExportButton"; "required": false; }; "showReporting": { "alias": "showReporting"; "required": false; }; }, { "selectedItemsChange": "selectedItemsChange"; "searchFieldsValueChanged": "searchFieldsValueChanged"; "buttonColumnClicked": "buttonColumnClicked"; "onImportFromOutlookClicked": "onImportFromOutlookClicked"; }, never, never, false, never>;
|
|
172
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<TsiGenericCrudComponent, "Tsi-Generic-Crud", never, { "entityInfo": { "alias": "entityInfo"; "required": false; }; "modalData": { "alias": "modalData"; "required": false; }; "columns": { "alias": "columns"; "required": false; }; "gridConfiguration": { "alias": "gridConfiguration"; "required": false; }; "cudComponent": { "alias": "cudComponent"; "required": false; }; "crudService": { "alias": "crudService"; "required": false; }; "header": { "alias": "header"; "required": false; }; "modalSize": { "alias": "modalSize"; "required": false; }; "descriminatorValue": { "alias": "descriminatorValue"; "required": false; }; "presentationSettings": { "alias": "presentationSettings"; "required": false; }; "preventAddEvent": { "alias": "preventAddEvent"; "required": false; }; "formEndpoint": { "alias": "formEndpoint"; "required": false; }; "formName": { "alias": "formName"; "required": false; }; "isSearchButtonDisabled": { "alias": "isSearchButtonDisabled"; "required": false; }; "showHeaderFilters": { "alias": "showHeaderFilters"; "required": false; }; "showEditButton": { "alias": "showEditButton"; "required": false; }; "showDeleteButton": { "alias": "showDeleteButton"; "required": false; }; "showAddButton": { "alias": "showAddButton"; "required": false; }; "showConsultButton": { "alias": "showConsultButton"; "required": false; }; "showUploadButton": { "alias": "showUploadButton"; "required": false; }; "showNoteButton": { "alias": "showNoteButton"; "required": false; }; "showDownloadButton": { "alias": "showDownloadButton"; "required": false; }; "showInfoButton": { "alias": "showInfoButton"; "required": false; }; "showDuplicateButton": { "alias": "showDuplicateButton"; "required": false; }; "showFormButton": { "alias": "showFormButton"; "required": false; }; "showCalenderView": { "alias": "showCalenderView"; "required": false; }; "showCardView": { "alias": "showCardView"; "required": false; }; "showImportFromOutlookButton": { "alias": "showImportFromOutlookButton"; "required": false; }; "showKanbanView": { "alias": "showKanbanView"; "required": false; }; "showKanbanViewOfWorkFlowEtat": { "alias": "showKanbanViewOfWorkFlowEtat"; "required": false; }; "showSearchField": { "alias": "showSearchField"; "required": false; }; "searchFields": { "alias": "searchFields"; "required": false; }; "calenderSchema": { "alias": "calenderSchema"; "required": false; }; "showActionButton": { "alias": "showActionButton"; "required": false; }; "sizingMode": { "alias": "sizingMode"; "required": false; }; "selectKeyOnly": { "alias": "selectKeyOnly"; "required": false; }; "selectionMode": { "alias": "selectionMode"; "required": false; }; "selectedItems": { "alias": "selectedItems"; "required": false; }; "key": { "alias": "key"; "required": false; }; "id": { "alias": "id"; "required": false; }; "businessClass": { "alias": "businessClass"; "required": false; }; "searchOnInit": { "alias": "searchOnInit"; "required": false; }; "showGlobalSearch": { "alias": "showGlobalSearch"; "required": false; }; "showExportButton": { "alias": "showExportButton"; "required": false; }; "showReporting": { "alias": "showReporting"; "required": false; }; }, { "selectedItemsChange": "selectedItemsChange"; "searchFieldsValueChanged": "searchFieldsValueChanged"; "buttonColumnClicked": "buttonColumnClicked"; "onImportFromOutlookClicked": "onImportFromOutlookClicked"; }, never, never, false, never>;
|
|
171
173
|
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { GridColumn } from '../interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Single source of truth for the grid column-width feature, shared by every grid
|
|
4
|
+
* (`TsiGenericGridComponent`, `EditableGridComponent`, ...) so the sizing rules never
|
|
5
|
+
* drift between them.
|
|
6
|
+
*
|
|
7
|
+
* Width priority, highest to lowest: (1) the end user's width — a remembered layout
|
|
8
|
+
* or an in-session resize, (2) the developer-preferred width, (3) automatic sizing.
|
|
9
|
+
* Tier (1) is applied by PrimeNG with `!important`; this controller only decides whether
|
|
10
|
+
* the developer width is emitted at all — it yields entirely once the user has taken
|
|
11
|
+
* control, letting PrimeNG's rules win.
|
|
12
|
+
*
|
|
13
|
+
* Eligibility (which columns may receive a developer width / wrapping / top-align) is
|
|
14
|
+
* grid-specific and injected, so each grid keeps its own exclusion set (UC-7).
|
|
15
|
+
*/
|
|
16
|
+
export declare class ColumnWidthController {
|
|
17
|
+
private readonly isEligible;
|
|
18
|
+
/** True once a saved layout carrying per-column widths has been restored. */
|
|
19
|
+
private hasRememberedWidths;
|
|
20
|
+
/** Fields the end user has manually resized during this session. */
|
|
21
|
+
private readonly userSizedFields;
|
|
22
|
+
constructor(isEligible: (col: GridColumn) => boolean);
|
|
23
|
+
/**
|
|
24
|
+
* Record whether a restored layout carried the user's remembered column widths.
|
|
25
|
+
* PrimeNG's `TableState.columnWidths` is a comma-separated string; an array is also
|
|
26
|
+
* accepted. Either way an empty/absent value means "no remembered widths".
|
|
27
|
+
*/
|
|
28
|
+
setRemembered(columnWidths: string | unknown[] | null | undefined): void;
|
|
29
|
+
/** Remember a column the user just resized so its developer-preferred width yields. */
|
|
30
|
+
onResize(field: string | null | undefined): void;
|
|
31
|
+
/**
|
|
32
|
+
* Forget all end-user width choices (session resizes + remembered layout), so the
|
|
33
|
+
* developer-preferred widths take over again. Call when resetting a grid to its default
|
|
34
|
+
* layout; `setRemembered` is expected to run afterwards to re-seed from the reset config.
|
|
35
|
+
*/
|
|
36
|
+
reset(): void;
|
|
37
|
+
/**
|
|
38
|
+
* The developer-preferred width as an inline style, or `{}` when it must not apply.
|
|
39
|
+
* A pinnable length (see `isPinnableCssSize`) is pinned with equal
|
|
40
|
+
* `width`/`min-width`/`max-width` so content can't collapse or grow the column; a
|
|
41
|
+
* non-pinnable value (`%`, `calc()`, keyword) degrades to a plain `width` preference.
|
|
42
|
+
*/
|
|
43
|
+
sizeStyle(col: GridColumn): {
|
|
44
|
+
[key: string]: string;
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Whether a column's content should wrap to stay inside its width. True for any
|
|
48
|
+
* eligible column with a constrained width — developer-preferred, user-resized, or
|
|
49
|
+
* restored from a saved layout — regardless of which one currently drives the size.
|
|
50
|
+
*/
|
|
51
|
+
shouldWrap(col: GridColumn): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Top-align for eligible data cells, so short cells line up with the first line of a
|
|
54
|
+
* wrapped/multi-line cell in the same (now taller) row. Ineligible columns (per the
|
|
55
|
+
* injected predicate — e.g. action/button/image) get `{}` and keep their default
|
|
56
|
+
* centered alignment.
|
|
57
|
+
*/
|
|
58
|
+
verticalAlign(col: GridColumn): {
|
|
59
|
+
[key: string]: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* The developer width may drive the column only while the user has not taken control
|
|
63
|
+
* (no remembered layout, no in-session resize) and the column is eligible. Whether a
|
|
64
|
+
* usable width actually exists is checked by the caller, which resolves it once.
|
|
65
|
+
*/
|
|
66
|
+
private developerControls;
|
|
67
|
+
}
|
|
@@ -1,5 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Resolves a developer-supplied column width into a CSS length string.
|
|
3
|
+
* - a bare `number` is interpreted as `rem` (the natural default)
|
|
4
|
+
* - a `string` is used verbatim (any explicit CSS unit/keyword: px, %, rem, calc(), fit-content, ...)
|
|
5
|
+
* Returns `undefined` when no usable width is provided, so callers can skip the binding entirely.
|
|
6
|
+
*/
|
|
7
|
+
export declare function resolveCssSize(width?: number | string | null): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Whether a resolved CSS size can be used as a hard column floor (min-width) and to
|
|
10
|
+
* cap/wrap the column. True only for definite absolute/viewport lengths (`px`, `rem`,
|
|
11
|
+
* `vw`, ...). False for percentages, `calc()`, and keywords (`auto`, `fit-content`, ...):
|
|
12
|
+
* in a scrollable auto-layout table their base isn't definite, so pinning them collapses
|
|
13
|
+
* the column to its `break-word` min-content (one character). Such widths degrade to a
|
|
14
|
+
* plain `width` preference with no pin and no forced wrap.
|
|
15
|
+
*/
|
|
16
|
+
export declare function isPinnableCssSize(resolved?: string | null): boolean;
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
export var CSSUnits;
|
|
2
|
-
(function (CSSUnits) {
|
|
3
|
-
CSSUnits["PRECENT"] = "%";
|
|
4
|
-
CSSUnits["EM"] = "em";
|
|
5
|
-
CSSUnits["REM"] = "rem";
|
|
6
|
-
CSSUnits["PX"] = "px";
|
|
7
|
-
CSSUnits["VH"] = "vh";
|
|
8
|
-
CSSUnits["VW"] = "vw";
|
|
9
|
-
})(CSSUnits || (CSSUnits = {}));
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3NzLXVuaXRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHNpLXNoYXJlZC11aS9zcmMvbGliL2VudW1zL2Nzcy11bml0cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxNQUFNLENBQU4sSUFBWSxRQU9YO0FBUEQsV0FBWSxRQUFRO0lBQ2hCLHlCQUFhLENBQUE7SUFDYixxQkFBUyxDQUFBO0lBQ1QsdUJBQVcsQ0FBQTtJQUNYLHFCQUFTLENBQUE7SUFDVCxxQkFBUyxDQUFBO0lBQ1QscUJBQVMsQ0FBQTtBQUNiLENBQUMsRUFQVyxRQUFRLEtBQVIsUUFBUSxRQU9uQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIENTU1VuaXRzIHtcclxuICAgIFBSRUNFTlQgPSBcIiVcIixcclxuICAgIEVNID0gXCJlbVwiLFxyXG4gICAgUkVNID0gXCJyZW1cIixcclxuICAgIFBYID0gXCJweFwiLFxyXG4gICAgVkggPSBcInZoXCIsXHJcbiAgICBWVyA9IFwidndcIlxyXG59XHJcbiJdfQ==
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { CSSUnits } from "../../enums/css-units";
|
|
2
|
-
export class CSSSizeProperty {
|
|
3
|
-
getCSSValue() {
|
|
4
|
-
if (this.value && this.unit)
|
|
5
|
-
return this.value.toString() + this.unit;
|
|
6
|
-
return "";
|
|
7
|
-
}
|
|
8
|
-
/**
|
|
9
|
-
*
|
|
10
|
-
*/
|
|
11
|
-
constructor(value, unit) {
|
|
12
|
-
this.unit = CSSUnits.PX;
|
|
13
|
-
this.value = value;
|
|
14
|
-
this.unit = unit;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3NzLXNpemUtcHJvcGVydHkuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9wcm9qZWN0cy90c2ktc2hhcmVkLXVpL3NyYy9saWIvaW50ZXJmYWNlcy9zdHlsZXMvY3NzLXNpemUtcHJvcGVydHkudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBRWpELE1BQU0sT0FBTyxlQUFlO0lBR2pCLFdBQVc7UUFDZCxJQUFHLElBQUksQ0FBQyxLQUFLLElBQUksSUFBSSxDQUFDLElBQUk7WUFDMUIsT0FBTyxJQUFJLENBQUMsS0FBSyxDQUFDLFFBQVEsRUFBRSxHQUFDLElBQUksQ0FBQyxJQUFJLENBQUM7UUFDdEMsT0FBUSxFQUFFLENBQUM7SUFDWixDQUFDO0lBQ0w7O09BRUc7SUFDSCxZQUFZLEtBQWMsRUFBRSxJQUFjO1FBVG5DLFNBQUksR0FBZSxRQUFRLENBQUMsRUFBRSxDQUFDO1FBVWxDLElBQUksQ0FBQyxLQUFLLEdBQUcsS0FBSyxDQUFDO1FBQ25CLElBQUksQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFDO0lBQ3JCLENBQUM7Q0FDSiIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IENTU1VuaXRzIH0gZnJvbSBcIi4uLy4uL2VudW1zL2Nzcy11bml0c1wiO1xyXG5cclxuZXhwb3J0IGNsYXNzIENTU1NpemVQcm9wZXJ0eXtcclxuICAgIHB1YmxpYyB2YWx1ZT8gOiBudW1iZXI7XHJcbiAgICBwdWJsaWMgdW5pdCA/OiBDU1NVbml0cyA9IENTU1VuaXRzLlBYO1xyXG4gICAgcHVibGljIGdldENTU1ZhbHVlKCk6IHN0cmluZ3tcclxuICAgICAgICBpZih0aGlzLnZhbHVlICYmIHRoaXMudW5pdClcclxuICAgICAgICByZXR1cm4gdGhpcy52YWx1ZS50b1N0cmluZygpK3RoaXMudW5pdDtcclxuICAgICAgICAgcmV0dXJuICBcIlwiO1xyXG4gICAgICAgIH1cclxuICAgIC8qKlxyXG4gICAgICpcclxuICAgICAqL1xyXG4gICAgY29uc3RydWN0b3IodmFsdWUgOiBudW1iZXIsIHVuaXQ6IENTU1VuaXRzKSB7XHJcbiAgICAgICAgdGhpcy52YWx1ZSA9IHZhbHVlO1xyXG4gICAgICAgIHRoaXMudW5pdCA9IHVuaXQ7ICAgICAgICBcclxuICAgIH1cclxufSJdfQ==
|
package/lib/enums/css-units.d.ts
DELETED