osl-base-extended 17.7.1 → 18.2.1
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/package.json
CHANGED
|
@@ -424,6 +424,11 @@ declare class DynamicForm implements OnInit, OnChanges {
|
|
|
424
424
|
private loadApiDatasources;
|
|
425
425
|
private _loadForList;
|
|
426
426
|
onModelChange(event: any, key: any): void;
|
|
427
|
+
private resolvedDatasources;
|
|
428
|
+
/** The list a field should render: datasourceIf(model) when set, otherwise the static datasource. */
|
|
429
|
+
getDatasource(elem: elements): any[];
|
|
430
|
+
/** Autocomplete writes its own list back (API search). Ignored when datasourceIf drives the list. */
|
|
431
|
+
onAutocompleteDatasourceChange(elem: elements, value: any[]): void;
|
|
427
432
|
onSelectChange(elem: elements, value: any): void;
|
|
428
433
|
onFieldChange(elem: elements, value: any): void;
|
|
429
434
|
private _refreshDependents;
|
|
@@ -431,6 +436,11 @@ declare class DynamicForm implements OnInit, OnChanges {
|
|
|
431
436
|
static ɵfac: i0.ɵɵFactoryDeclaration<DynamicForm, never>;
|
|
432
437
|
static ɵcmp: i0.ɵɵComponentDeclaration<DynamicForm, "osl-dynamic-form", never, { "elements": { "alias": "elements"; "required": false; }; "model": { "alias": "model"; "required": false; }; "skeletonLoading": { "alias": "skeletonLoading"; "required": false; }; "skeletonTheme": { "alias": "skeletonTheme"; "required": false; }; }, { "modelChange": "modelChange"; }, never, never, false, never>;
|
|
433
438
|
}
|
|
439
|
+
/**
|
|
440
|
+
* Returns `prev` when `next` holds the same items in the same order, so a callback that
|
|
441
|
+
* filters into a new array each change-detection cycle doesn't re-trigger child inputs.
|
|
442
|
+
*/
|
|
443
|
+
declare function stableArray(prev: any[] | undefined, next: any[]): any[];
|
|
434
444
|
interface elements {
|
|
435
445
|
columns: number;
|
|
436
446
|
label: string;
|
|
@@ -446,6 +456,13 @@ interface elements {
|
|
|
446
456
|
minDateIf?: (model: any) => string;
|
|
447
457
|
maxDateIf?: (model: any) => string;
|
|
448
458
|
datasource?: any[];
|
|
459
|
+
/**
|
|
460
|
+
* Computed datasource — takes precedence over `datasource` when set.
|
|
461
|
+
* dynamic-form calls it as (model); form-grid calls it as (row, rowIndex, gridDatasource).
|
|
462
|
+
* Returning a freshly filtered array each call is fine: results that are shallow-equal
|
|
463
|
+
* to the previous call keep the previous array reference.
|
|
464
|
+
*/
|
|
465
|
+
datasourceIf?: (model: any, index?: number, arr?: any[]) => any[];
|
|
449
466
|
displayField?: string;
|
|
450
467
|
valueField?: string;
|
|
451
468
|
required?: boolean;
|
|
@@ -1117,6 +1134,24 @@ interface OslFormGridRowEvent {
|
|
|
1117
1134
|
row: any;
|
|
1118
1135
|
index: number;
|
|
1119
1136
|
}
|
|
1137
|
+
interface OslFormGridGroup {
|
|
1138
|
+
/** Stable identity of the group (serialized groupBy values, or the new-records key). */
|
|
1139
|
+
key: string;
|
|
1140
|
+
/** Header text for the group. */
|
|
1141
|
+
label: string;
|
|
1142
|
+
/** Rows of this group shown on the current page. */
|
|
1143
|
+
rows: any[];
|
|
1144
|
+
/** datasource index of each entry in `rows` (same order). */
|
|
1145
|
+
indices: number[];
|
|
1146
|
+
/** Total rows in the group across all pages. */
|
|
1147
|
+
total: number;
|
|
1148
|
+
/** True for the trailing group holding rows added since the last regroup. */
|
|
1149
|
+
isNew: boolean;
|
|
1150
|
+
/** Flat index (within pagedData) of the first row of this group on the current page. */
|
|
1151
|
+
startIndex: number;
|
|
1152
|
+
/** Shallow copy of the first row at regroup time — holds the group's key values. */
|
|
1153
|
+
sample: any;
|
|
1154
|
+
}
|
|
1120
1155
|
interface DragItem {
|
|
1121
1156
|
id: string;
|
|
1122
1157
|
label: string;
|
|
@@ -1170,6 +1205,16 @@ declare class OslFormGrid implements OnChanges {
|
|
|
1170
1205
|
highlightedRow: boolean;
|
|
1171
1206
|
rowAdd: EventEmitter<any>;
|
|
1172
1207
|
rowDelete: EventEmitter<OslFormGridRowEvent>;
|
|
1208
|
+
/** Row keys to group by. Empty (default) = no grouping, grid behaves exactly as before. */
|
|
1209
|
+
groupBy: string[];
|
|
1210
|
+
/** Custom group header text. Receives a snapshot of the group's first row and the groupBy keys. */
|
|
1211
|
+
groupLabelFn?: (sample: any, keys: string[]) => string;
|
|
1212
|
+
/** Header text of the trailing group that collects rows added since the last regroup. */
|
|
1213
|
+
newGroupLabel: string;
|
|
1214
|
+
/** Initial expanded state of groups. The new-records group always opens when a row is added. */
|
|
1215
|
+
groupsExpanded: boolean;
|
|
1216
|
+
/** Custom group header content. Context: { $implicit: group, expanded }. */
|
|
1217
|
+
groupHeaderTemplate?: TemplateRef<any>;
|
|
1173
1218
|
enableDragDrop: boolean;
|
|
1174
1219
|
draggingList: DragItem[];
|
|
1175
1220
|
draggingColumns: DragColumn[];
|
|
@@ -1217,6 +1262,30 @@ declare class OslFormGrid implements OnChanges {
|
|
|
1217
1262
|
isLastColumn(col: OslFormGridColumn): boolean;
|
|
1218
1263
|
currentPage: number;
|
|
1219
1264
|
pageSizeOptions: number[];
|
|
1265
|
+
readonly NEW_GROUP_KEY = "__osl_fg_new__";
|
|
1266
|
+
/** The datasource reference this grid last emitted — its echo back via [(datasource)] must not regroup. */
|
|
1267
|
+
private ownDatasourceRef;
|
|
1268
|
+
private groupSnapshot;
|
|
1269
|
+
private groupMeta;
|
|
1270
|
+
/** Groups whose expanded state differs from groupsExpanded. */
|
|
1271
|
+
private toggledGroups;
|
|
1272
|
+
get isGrouped(): boolean;
|
|
1273
|
+
get totalColspan(): number;
|
|
1274
|
+
/** Re-buckets every current row (including new ones) by the groupBy keys. */
|
|
1275
|
+
regroup(): void;
|
|
1276
|
+
private buildGroupKey;
|
|
1277
|
+
private getGroupLabel;
|
|
1278
|
+
/** All groups in snapshot order (new-records group last), unpaginated. */
|
|
1279
|
+
private get allGroups();
|
|
1280
|
+
/** Groups sliced to the current page (pagination runs over the grouped row order). */
|
|
1281
|
+
get pagedGroups(): OslFormGridGroup[];
|
|
1282
|
+
isGroupExpanded(key: string): boolean;
|
|
1283
|
+
toggleGroup(key: string): void;
|
|
1284
|
+
private expandGroup;
|
|
1285
|
+
/** Maps an index within pagedData to the datasource index. */
|
|
1286
|
+
private resolveActualIndex;
|
|
1287
|
+
/** Reorder inside one group (cross-group drags are not connected, so they snap back). */
|
|
1288
|
+
onGroupReorder(event: CdkDragDrop<any[]>, group: OslFormGridGroup): void;
|
|
1220
1289
|
get _total(): number;
|
|
1221
1290
|
get totalPages(): number;
|
|
1222
1291
|
get pagedData(): any[];
|
|
@@ -1234,6 +1303,9 @@ declare class OslFormGrid implements OnChanges {
|
|
|
1234
1303
|
onCellChange(row: any, col: OslFormGridColumn, value: any): void;
|
|
1235
1304
|
private autocompleteDatasources;
|
|
1236
1305
|
getAutocompleteDatasource(row: any, col: OslFormGridColumn): any[];
|
|
1306
|
+
private resolvedCellDatasources;
|
|
1307
|
+
/** The list a select / radio / local autocomplete cell renders for this row. */
|
|
1308
|
+
getCellDatasource(row: any, col: OslFormGridColumn, index?: number): any[];
|
|
1237
1309
|
onAutocompleteDatasourceChange(row: any, col: OslFormGridColumn, value: any[]): void;
|
|
1238
1310
|
goToPage(page: number): void;
|
|
1239
1311
|
onPageSizeChange(size: number): void;
|
|
@@ -1261,7 +1333,7 @@ declare class OslFormGrid implements OnChanges {
|
|
|
1261
1333
|
onDragEnteredEvent(event: CdkDragEnter, target: string): void;
|
|
1262
1334
|
onDragExitedEvent(event: CdkDragExit, target: string): void;
|
|
1263
1335
|
static ɵfac: i0.ɵɵFactoryDeclaration<OslFormGrid, never>;
|
|
1264
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<OslFormGrid, "osl-form-grid", never, { "columns": { "alias": "columns"; "required": false; }; "datasource": { "alias": "datasource"; "required": false; }; "isPaginated": { "alias": "isPaginated"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "canAdd": { "alias": "canAdd"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "tableHeight": { "alias": "tableHeight"; "required": false; }; "footerColumns": { "alias": "footerColumns"; "required": false; }; "highlightedRow": { "alias": "highlightedRow"; "required": false; }; "enableDragDrop": { "alias": "enableDragDrop"; "required": false; }; "draggingList": { "alias": "draggingList"; "required": false; }; "draggingColumns": { "alias": "draggingColumns"; "required": false; }; "leftPanelWidth": { "alias": "leftPanelWidth"; "required": false; }; "dragTitle": { "alias": "dragTitle"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "allowReorder": { "alias": "allowReorder"; "required": false; }; "allowRemove": { "alias": "allowRemove"; "required": false; }; "reorderDisabledIf": { "alias": "reorderDisabledIf"; "required": false; }; "panelSearchType": { "alias": "panelSearchType"; "required": false; }; "panelLoading": { "alias": "panelLoading"; "required": false; }; "panelTotalRecords": { "alias": "panelTotalRecords"; "required": false; }; "panelPageSize": { "alias": "panelPageSize"; "required": false; }; }, { "datasourceChange": "datasourceChange"; "rowAdd": "rowAdd"; "rowDelete": "rowDelete"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "dragEntered": "dragEntered"; "dragExited": "dragExited"; "itemDropped": "itemDropped"; "itemMoved": "itemMoved"; "itemRemoved": "itemRemoved"; "itemSelected": "itemSelected"; "gridChanged": "gridChanged"; "panelSearch": "panelSearch"; "panelPageChange": "panelPageChange"; }, never, never, false, never>;
|
|
1336
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<OslFormGrid, "osl-form-grid", never, { "columns": { "alias": "columns"; "required": false; }; "datasource": { "alias": "datasource"; "required": false; }; "isPaginated": { "alias": "isPaginated"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "canAdd": { "alias": "canAdd"; "required": false; }; "canDelete": { "alias": "canDelete"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "tableHeight": { "alias": "tableHeight"; "required": false; }; "footerColumns": { "alias": "footerColumns"; "required": false; }; "highlightedRow": { "alias": "highlightedRow"; "required": false; }; "groupBy": { "alias": "groupBy"; "required": false; }; "groupLabelFn": { "alias": "groupLabelFn"; "required": false; }; "newGroupLabel": { "alias": "newGroupLabel"; "required": false; }; "groupsExpanded": { "alias": "groupsExpanded"; "required": false; }; "groupHeaderTemplate": { "alias": "groupHeaderTemplate"; "required": false; }; "enableDragDrop": { "alias": "enableDragDrop"; "required": false; }; "draggingList": { "alias": "draggingList"; "required": false; }; "draggingColumns": { "alias": "draggingColumns"; "required": false; }; "leftPanelWidth": { "alias": "leftPanelWidth"; "required": false; }; "dragTitle": { "alias": "dragTitle"; "required": false; }; "showSearch": { "alias": "showSearch"; "required": false; }; "allowReorder": { "alias": "allowReorder"; "required": false; }; "allowRemove": { "alias": "allowRemove"; "required": false; }; "reorderDisabledIf": { "alias": "reorderDisabledIf"; "required": false; }; "panelSearchType": { "alias": "panelSearchType"; "required": false; }; "panelLoading": { "alias": "panelLoading"; "required": false; }; "panelTotalRecords": { "alias": "panelTotalRecords"; "required": false; }; "panelPageSize": { "alias": "panelPageSize"; "required": false; }; }, { "datasourceChange": "datasourceChange"; "rowAdd": "rowAdd"; "rowDelete": "rowDelete"; "dragStarted": "dragStarted"; "dragEnded": "dragEnded"; "dragEntered": "dragEntered"; "dragExited": "dragExited"; "itemDropped": "itemDropped"; "itemMoved": "itemMoved"; "itemRemoved": "itemRemoved"; "itemSelected": "itemSelected"; "gridChanged": "gridChanged"; "panelSearch": "panelSearch"; "panelPageChange": "panelPageChange"; }, never, never, false, never>;
|
|
1265
1337
|
}
|
|
1266
1338
|
|
|
1267
1339
|
interface oslListerData {
|
|
@@ -2801,5 +2873,5 @@ declare class ErrorDialog {
|
|
|
2801
2873
|
static ɵcmp: i0.ɵɵComponentDeclaration<ErrorDialog, "error-dialog", never, {}, {}, never, never, true, never>;
|
|
2802
2874
|
}
|
|
2803
2875
|
|
|
2804
|
-
export { array_util_d as ArrayUtil, date_util_d as DateUtil, DeleteConfirmation, DeleteConfirmationData, Dialog, DialogWrapper, DirtyStateService, DynamicForm, ErrorDialog, FormStructureModule, Httpbase, number_util_d as NumberUtil, OSL_ATTACH_CALLER_IP, object_util_d as ObjectUtil, OslAutocomplete, OslAutocompleteLister, OslBaseExtended, OslButton, OslCheckbox, OslChipsInput, OslDatepicker, OslDatetimepicker, OslDocumentUploader, OslEmailDialog, OslEmailDialogData, OslFileUpload, OslFormGrid, OslGrid, OslMenu, OslMenuItem, OslMenuTriggerFor, OslRadio, OslReportForm, OslReportGrid, OslSearchbar, OslSelect, OslSetup, OslSkeletonDirective, OslSkeletonModule, OslSkeletonThemeService, OslSlideToggle, OslTooltipDirective, OslUserLog, Oslinput, Osltextarea, storage_util_d as StorageUtil, string_util_d as StringUtil, UnsavedChangesDialog, validation_util_d as ValidationUtil, WarningDialog, WarningDialogData, baseComponent, provideCallerIpHeader, unsavedChangesGuard };
|
|
2805
|
-
export type { ButtonSize, ButtonVariant, ChipsReturnType, DateInputType, DragColumn, DragDropPayload, DragItem, ErrorDialogData, FlatRow, HttpResponse, InputType, InternalColumn, OslDisplayType, OslEmailAttachment, OslEmailSendResult, OslFileValue, OslFormGridColumn, OslFormGridFooterColumn, OslFormGridHeaderCell, OslFormGridRowEvent, OslGridColumn, OslMenuAction, OslMenuPosition, OslPageEvent, OslPdfConfig, OslPdfFooterColumn, OslReportColumn, OslReportEmailConfig, OslReportPageEvent, OslReportSortEvent, OslSavedDocument, OslSetupSaveEvent, OslSortEvent, PanelPageEvent, PanelSearchEvent, PasswordOptions, ReportGenerateType, SkeletonAnimation, SkeletonTheme, SkeletonType, TextareaResize, UnsavedChangesDialogData, UserLogMeta, elements, myParams, oslListerData };
|
|
2876
|
+
export { array_util_d as ArrayUtil, date_util_d as DateUtil, DeleteConfirmation, DeleteConfirmationData, Dialog, DialogWrapper, DirtyStateService, DynamicForm, ErrorDialog, FormStructureModule, Httpbase, number_util_d as NumberUtil, OSL_ATTACH_CALLER_IP, object_util_d as ObjectUtil, OslAutocomplete, OslAutocompleteLister, OslBaseExtended, OslButton, OslCheckbox, OslChipsInput, OslDatepicker, OslDatetimepicker, OslDocumentUploader, OslEmailDialog, OslEmailDialogData, OslFileUpload, OslFormGrid, OslGrid, OslMenu, OslMenuItem, OslMenuTriggerFor, OslRadio, OslReportForm, OslReportGrid, OslSearchbar, OslSelect, OslSetup, OslSkeletonDirective, OslSkeletonModule, OslSkeletonThemeService, OslSlideToggle, OslTooltipDirective, OslUserLog, Oslinput, Osltextarea, storage_util_d as StorageUtil, string_util_d as StringUtil, UnsavedChangesDialog, validation_util_d as ValidationUtil, WarningDialog, WarningDialogData, baseComponent, provideCallerIpHeader, stableArray, unsavedChangesGuard };
|
|
2877
|
+
export type { ButtonSize, ButtonVariant, ChipsReturnType, DateInputType, DragColumn, DragDropPayload, DragItem, ErrorDialogData, FlatRow, HttpResponse, InputType, InternalColumn, OslDisplayType, OslEmailAttachment, OslEmailSendResult, OslFileValue, OslFormGridColumn, OslFormGridFooterColumn, OslFormGridGroup, OslFormGridHeaderCell, OslFormGridRowEvent, OslGridColumn, OslMenuAction, OslMenuPosition, OslPageEvent, OslPdfConfig, OslPdfFooterColumn, OslReportColumn, OslReportEmailConfig, OslReportPageEvent, OslReportSortEvent, OslSavedDocument, OslSetupSaveEvent, OslSortEvent, PanelPageEvent, PanelSearchEvent, PasswordOptions, ReportGenerateType, SkeletonAnimation, SkeletonTheme, SkeletonType, TextareaResize, UnsavedChangesDialogData, UserLogMeta, elements, myParams, oslListerData };
|