@yomotech/view-toolkit 1.0.40 → 1.0.42
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
|
@@ -110,8 +110,6 @@ declare class RequestService {
|
|
|
110
110
|
dynamicCall(method: string | undefined, body: any | undefined, url: string, passToken?: boolean, selectedProject?: string, userInfo?: any): rxjs.Observable<Object>;
|
|
111
111
|
createAuthorizationHeader(userInfo: any, tokenExist?: boolean): HttpHeaders;
|
|
112
112
|
getLoginUser(token: any, issuer: string): rxjs.Observable<Object>;
|
|
113
|
-
saveDb(token: any, userInfo: any, order?: any): void;
|
|
114
|
-
getSaveOrder(token: string, userInfo: any, fromDate: string, toDate: string): rxjs.Observable<Object>;
|
|
115
113
|
static ɵfac: i0.ɵɵFactoryDeclaration<RequestService, never>;
|
|
116
114
|
static ɵprov: i0.ɵɵInjectableDeclaration<RequestService>;
|
|
117
115
|
}
|
|
@@ -177,7 +175,9 @@ declare class UtilityService {
|
|
|
177
175
|
normalizeDatesForStorage(obj: any): any;
|
|
178
176
|
isDateLike(value: any): boolean;
|
|
179
177
|
toLocalISOString(date: Date): string;
|
|
178
|
+
/** Dates of stored records back to Date objects - date, time, date and time, period (date-format.ts). */
|
|
180
179
|
restoreDatesFromStorage(records: any[], propertySchema: any): any[];
|
|
180
|
+
/** A stored date text as the wall time it names (date-format.ts). */
|
|
181
181
|
parseLocalISODate(value: string): Date;
|
|
182
182
|
convertToDailyLogs(cardOrCards: any | any[]): any[];
|
|
183
183
|
private applyTimeToDay;
|
|
@@ -518,6 +518,89 @@ declare class DateTimePickerService {
|
|
|
518
518
|
static ɵprov: i0.ɵɵInjectableDeclaration<DateTimePickerService>;
|
|
519
519
|
}
|
|
520
520
|
|
|
521
|
+
/** Where a page keeps its records: storageType + data_url (backend URL or storage key). */
|
|
522
|
+
interface DataSource {
|
|
523
|
+
storageType?: string;
|
|
524
|
+
data_url?: string;
|
|
525
|
+
/** older Designer versions: localStorage: true / sessionStorage: true instead of storageType */
|
|
526
|
+
localStorage?: boolean;
|
|
527
|
+
sessionStorage?: boolean;
|
|
528
|
+
}
|
|
529
|
+
type StorageKind = 'localstorage' | 'sessionstorage' | 'filter' | 'database' | '';
|
|
530
|
+
/** The kind of a data source, lowercase - "localStorage" of older Designer versions counts as "localstorage". */
|
|
531
|
+
declare function storageKind(source: DataSource | null | undefined): StorageKind;
|
|
532
|
+
/** True when the records of the source live in the browser (local or session storage). */
|
|
533
|
+
declare function isBrowserSource(source: DataSource | null | undefined): boolean;
|
|
534
|
+
/**
|
|
535
|
+
* The records of a stored value: a list stays a list, a JSON text is read - also when it is the
|
|
536
|
+
* JSON text of a JSON text. Anything else (nothing, broken JSON, an object) gives an empty list.
|
|
537
|
+
*/
|
|
538
|
+
declare function parseRecords(value: unknown): any[];
|
|
539
|
+
/**
|
|
540
|
+
* The record of a form, dialog or grid row: every field's value exactly as its control holds it - text,
|
|
541
|
+
* number, date, period (a list), yes/no, selection - nothing unpacked, no exception by type. The same
|
|
542
|
+
* for every container; dates are turned into storage text later, in one place (RecordStore).
|
|
543
|
+
* fields: only these names (a grid row's editable columns); without, every field of the data objects.
|
|
544
|
+
*/
|
|
545
|
+
declare function recordOf(propertySchema: Record<string, any> | null | undefined, fields?: string[]): Record<string, any>;
|
|
546
|
+
|
|
547
|
+
/** What PageData needs from the app: storage, backend, the question before deleting, a message. */
|
|
548
|
+
interface PageDataDeps {
|
|
549
|
+
readRecords(source: DataSource): Promise<any[]>;
|
|
550
|
+
writeRecords(source: DataSource, records: any[]): Promise<boolean>;
|
|
551
|
+
/** GET/POST of the page's own source (option), with extra placeholders (filter, pageNumber, pageSize). */
|
|
552
|
+
loadBackend(option: any, extra: any): Promise<any>;
|
|
553
|
+
/** The call a button describes, with the records ({{records}}) or one record ({{record.x}}). */
|
|
554
|
+
sendBackend(option: any, records: any[], extra: any): Promise<any>;
|
|
555
|
+
/** The question before deleting; true = delete. */
|
|
556
|
+
confirmDelete(button: any): Promise<boolean>;
|
|
557
|
+
/** A message to the user, by text key (saveFailed, deleteFailed, loadFailed). */
|
|
558
|
+
failed(key: string, error: unknown): void;
|
|
559
|
+
/** Dates of browser records back to Date objects (optional). */
|
|
560
|
+
restoreDates?(records: any[]): any[];
|
|
561
|
+
}
|
|
562
|
+
declare class PageData {
|
|
563
|
+
records: any[];
|
|
564
|
+
visible: any[];
|
|
565
|
+
page: number;
|
|
566
|
+
pageSize: number;
|
|
567
|
+
pageCount: number;
|
|
568
|
+
totalItems: number;
|
|
569
|
+
loading: boolean;
|
|
570
|
+
filter: Record<string, any>;
|
|
571
|
+
/** Called after every change of the state above - the container redraws. */
|
|
572
|
+
onChange: () => void;
|
|
573
|
+
readonly source: DataSource & Record<string, any>;
|
|
574
|
+
private readonly deps;
|
|
575
|
+
constructor(source: DataSource & Record<string, any>, deps: PageDataDeps, pageSize?: number);
|
|
576
|
+
/** Browser list and filter page: all records are here and paged in the app; a backend pages itself. */
|
|
577
|
+
get clientPaging(): boolean;
|
|
578
|
+
load(): Promise<void>;
|
|
579
|
+
/** Records the app loaded itself (a backend page with images, its own paging). */
|
|
580
|
+
useRecords(records: any[]): void;
|
|
581
|
+
setFilter(values: Record<string, any>): Promise<void>;
|
|
582
|
+
goTo(page: number): Promise<void>;
|
|
583
|
+
setPageSize(size: number): Promise<void>;
|
|
584
|
+
/** A record from a dialog or form: replaces record index, else is appended (and its page shown). */
|
|
585
|
+
saveRecord(record: any, index?: number | null): Promise<boolean>;
|
|
586
|
+
/** Deletes record index after the question; browser list, or the button's backend (then reloads). */
|
|
587
|
+
remove(index: number, button?: any): Promise<boolean>;
|
|
588
|
+
/** Sends one record (index) or all ('all') to the backend the button describes; afterSuccess removeLocal. */
|
|
589
|
+
send(button: any, index: number | 'all'): Promise<boolean>;
|
|
590
|
+
/** Filter fields are the keys set by setFilter; a filter page loads only when none is empty. */
|
|
591
|
+
private filterComplete;
|
|
592
|
+
private loadBackendRecords;
|
|
593
|
+
/** A filter date goes on as a Date - the call writes it by the page's dateFormat. */
|
|
594
|
+
private filterValue;
|
|
595
|
+
private removeLocal;
|
|
596
|
+
/** The old delete address "orders/{{id}}" took record[button.key] for any placeholder. */
|
|
597
|
+
private legacyUrl;
|
|
598
|
+
private setRecords;
|
|
599
|
+
/** Browser list and filter page: the current page out of all records; a backend page is shown as it came. */
|
|
600
|
+
private slice;
|
|
601
|
+
private setLoading;
|
|
602
|
+
}
|
|
603
|
+
|
|
521
604
|
declare class CardComponent {
|
|
522
605
|
private utilityService;
|
|
523
606
|
private platform;
|
|
@@ -551,6 +634,8 @@ declare class CardComponent {
|
|
|
551
634
|
/** "datetime" for a value with date and time (type datetime or control dateTimepicker), else "date". */
|
|
552
635
|
cardDateKind(field: any): 'date' | 'datetime';
|
|
553
636
|
itemInfo: any;
|
|
637
|
+
/** The records of the page and what is done with them (PageData, shared with the grid). */
|
|
638
|
+
pageData: PageData | null;
|
|
554
639
|
currentPage: number;
|
|
555
640
|
pageSize: number;
|
|
556
641
|
selectedLanguageInfo: any;
|
|
@@ -565,10 +650,6 @@ declare class CardComponent {
|
|
|
565
650
|
onPageChange: EventEmitter<any>;
|
|
566
651
|
paginationMode: 'client' | 'server';
|
|
567
652
|
paginationLoading: boolean;
|
|
568
|
-
cardDataChange: EventEmitter<{
|
|
569
|
-
records: any[];
|
|
570
|
-
resetPage?: boolean;
|
|
571
|
-
}>;
|
|
572
653
|
scrollPaginationSentinel?: ElementRef<HTMLElement>;
|
|
573
654
|
private scrollObserver?;
|
|
574
655
|
private requestedScrollPage;
|
|
@@ -591,8 +672,6 @@ declare class CardComponent {
|
|
|
591
672
|
ngOnDestroy(): void;
|
|
592
673
|
ngAfterViewInit(): void;
|
|
593
674
|
getRecordIndex(record: any): number;
|
|
594
|
-
private publishCardDataChange;
|
|
595
|
-
private setFilteredCardData;
|
|
596
675
|
private updateDeviceMode;
|
|
597
676
|
private safeUpdate;
|
|
598
677
|
getHorizontalLayoutCaption(layout: any): any;
|
|
@@ -602,22 +681,18 @@ declare class CardComponent {
|
|
|
602
681
|
updatebuttonLanguage<T>(schema: T, translations: Record<string, string>): T;
|
|
603
682
|
updateLayoutLanguage<T>(schema: T, translations: Record<string, string>): T;
|
|
604
683
|
dateChangeEvent(filter: any, value: any): void;
|
|
684
|
+
/** The filter values go to the page's data; it loads once every filter field is set. */
|
|
605
685
|
applyDateFilter(filters: any): Promise<void>;
|
|
606
|
-
|
|
607
|
-
formatToOffsetISO(date: Date): string;
|
|
686
|
+
/** Every filter field of the page, an unset one as null - the page loads only when none is empty. */
|
|
608
687
|
extractFilterValues(schema: Record<string, any>): Record<string, any>;
|
|
609
688
|
invokeOnPageSizeChange(pageSize: any): void;
|
|
610
689
|
invokeGoToPage(page: number): void;
|
|
611
690
|
invokeOnCardHeader(element: any): void;
|
|
612
691
|
invokeOnCardFooter(element: any): void;
|
|
692
|
+
/** Delete (asks first) and save to a backend go to the page's data; anything else to the app. */
|
|
613
693
|
invokeButtonClick(layout: any, record: any, recordIndex: any): Promise<void>;
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
deleteRecord(recordIndex: number): Promise<void>;
|
|
617
|
-
deleteAllRecord(): Promise<void>;
|
|
618
|
-
saveToDb(orders: any, orderIndex?: any, data_url?: any, deleteAll?: boolean): Promise<void>;
|
|
619
|
-
webSaveDb(token: any, userInfo: any, order?: any, orderIndex?: any, dataUrl?: any, deleteAll?: boolean): void;
|
|
620
|
-
mobileSaveDb(token: string, userInfo: any, order: any | undefined, orderIndex: number, dataUrl: any, deleteAll?: boolean): Promise<any>;
|
|
694
|
+
/** "Save all": every record of the page in one call. */
|
|
695
|
+
saveAllData(option: any): Promise<void>;
|
|
621
696
|
showLinkDetails(option: any, record: any): void;
|
|
622
697
|
showImageDetails(option: any, record: any): void;
|
|
623
698
|
getProperty(scope: any): {
|
|
@@ -645,7 +720,7 @@ declare class CardComponent {
|
|
|
645
720
|
*/
|
|
646
721
|
keyboardTypeFor(field: any, propertySchema: any): CustomKeyboardType | null;
|
|
647
722
|
static ɵfac: i0.ɵɵFactoryDeclaration<CardComponent, never>;
|
|
648
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "vl-card", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "mobileDisplay": { "alias": "mobileDisplay"; "required": false; }; "scrollPagination": { "alias": "scrollPagination"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "paginationMode": { "alias": "paginationMode"; "required": false; }; "paginationLoading": { "alias": "paginationLoading"; "required": false; }; }, { "cardButtonClick": "cardButtonClick"; "cardHeaderButtonClick": "cardHeaderButtonClick"; "linkDetails": "linkDetails"; "imageDetails": "imageDetails"; "onPageSizeChange": "onPageSizeChange"; "onPageChange": "onPageChange";
|
|
723
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<CardComponent, "vl-card", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "pageData": { "alias": "pageData"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "mobileDisplay": { "alias": "mobileDisplay"; "required": false; }; "scrollPagination": { "alias": "scrollPagination"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "paginationMode": { "alias": "paginationMode"; "required": false; }; "paginationLoading": { "alias": "paginationLoading"; "required": false; }; }, { "cardButtonClick": "cardButtonClick"; "cardHeaderButtonClick": "cardHeaderButtonClick"; "linkDetails": "linkDetails"; "imageDetails": "imageDetails"; "onPageSizeChange": "onPageSizeChange"; "onPageChange": "onPageChange"; }, never, never, true, never>;
|
|
649
724
|
}
|
|
650
725
|
|
|
651
726
|
declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
@@ -755,6 +830,19 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
|
|
|
755
830
|
currentPage: number;
|
|
756
831
|
pages: number[];
|
|
757
832
|
userInfo: any;
|
|
833
|
+
/** A page from browser storage or a filter (A4): its records, delete and paging go through PageData. */
|
|
834
|
+
pageData: PageData | null;
|
|
835
|
+
/** "dialog" edit: the app opens the page's dialog with the record (like a card's showModal). */
|
|
836
|
+
editRow: EventEmitter<{
|
|
837
|
+
option: any;
|
|
838
|
+
record: any;
|
|
839
|
+
recordIndex: number;
|
|
840
|
+
}>;
|
|
841
|
+
gridForm?: NgForm;
|
|
842
|
+
/** The row being edited ("row" mode), its own copy of the data objects with the row's values. */
|
|
843
|
+
editingRow: any;
|
|
844
|
+
rowSchema: any;
|
|
845
|
+
rowSaveTried: boolean;
|
|
758
846
|
onPageChange: EventEmitter<any>;
|
|
759
847
|
onPageSizeChange: EventEmitter<any>;
|
|
760
848
|
onGridScroll: EventEmitter<any>;
|
|
@@ -794,6 +882,26 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
|
|
|
794
882
|
decrementQuantity(index: any, field: any, option: any): void;
|
|
795
883
|
invokeOnPageSizeChange(pageSize: any): void;
|
|
796
884
|
invokeGoToPage(page: any): void;
|
|
885
|
+
/** layoutSchema.edit: { mode: "row" | "dialog", layout_url?, property_url?, modalTitle?, data_url?, method? } */
|
|
886
|
+
get editConfig(): any;
|
|
887
|
+
get editMode(): 'row' | 'dialog' | null;
|
|
888
|
+
/** The edit column shows when the page sets a mode and has at least one unlocked field. */
|
|
889
|
+
get canEdit(): boolean;
|
|
890
|
+
/** A column whose cells can be edited: it has a field and the field is not locked. */
|
|
891
|
+
editableCol(col: any): boolean;
|
|
892
|
+
/** A cell is an input only in the row being edited, and only when its field is not locked. */
|
|
893
|
+
cellEditing(col: any, data: any): boolean;
|
|
894
|
+
/** A cell that needs more room while edited: multi-line text, a period, date and time. */
|
|
895
|
+
wideEditCell(col: any): boolean;
|
|
896
|
+
/** The project's text for a fixed key (Edit, Save, Cancel), else the key. */
|
|
897
|
+
t(key: string): string;
|
|
898
|
+
private recordIndexOf;
|
|
899
|
+
startEdit(data: any): void;
|
|
900
|
+
cancelEdit(): void;
|
|
901
|
+
/** ✓: checks the row's controls like the dialog, then saves the record (browser list or backend). */
|
|
902
|
+
saveRow(): Promise<void>;
|
|
903
|
+
/** The delete icon of a row: a browser list deletes through PageData (asks first), a backend as before. */
|
|
904
|
+
deleteRow(option: any, data: any): void;
|
|
797
905
|
authenticating(): void;
|
|
798
906
|
private readonly sortFunctionCache;
|
|
799
907
|
getColumnSortFn(column: any): ((firstRow: any, secondRow: any) => number) | boolean;
|
|
@@ -841,15 +949,8 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
|
|
|
841
949
|
propertyType(col: any): string;
|
|
842
950
|
/** The DTO type of a column as the data object declares it ("string", "quantity" ...). */
|
|
843
951
|
cellType(col: any): string;
|
|
844
|
-
/**
|
|
845
|
-
* An unlocked text or number cell is typed in; the action column saves the row. A column with a
|
|
846
|
-
* shared control (password, text area, switch, combobox, radio) is shown, not typed in.
|
|
847
|
-
*/
|
|
848
|
-
inlineEditable(col: any): boolean;
|
|
849
|
-
/** An unlocked Boolean column without switch or radio ticks the row's value. */
|
|
850
|
-
checkboxEditable(col: any): boolean;
|
|
851
952
|
static ɵfac: i0.ɵɵFactoryDeclaration<GridComponent, never>;
|
|
852
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "vl-grid", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "tableitemInfo": { "alias": "tableitemInfo"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isTableDataLoad": { "alias": "isTableDataLoad"; "required": false; }; "currenTableOptions": { "alias": "currenTableOptions"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; }, { "onPageChange": "onPageChange"; "onPageSizeChange": "onPageSizeChange"; "onGridScroll": "onGridScroll"; "showGridLink": "showGridLink"; "gridButtonClick": "gridButtonClick"; "gridIncreamentClick": "gridIncreamentClick"; "gridDecreamentClick": "gridDecreamentClick"; "gridImgClick": "gridImgClick"; }, never, never, true, never>;
|
|
953
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<GridComponent, "vl-grid", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "tableitemInfo": { "alias": "tableitemInfo"; "required": false; }; "form": { "alias": "form"; "required": false; }; "isTableDataLoad": { "alias": "isTableDataLoad"; "required": false; }; "currenTableOptions": { "alias": "currenTableOptions"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "pageData": { "alias": "pageData"; "required": false; }; }, { "editRow": "editRow"; "onPageChange": "onPageChange"; "onPageSizeChange": "onPageSizeChange"; "onGridScroll": "onGridScroll"; "showGridLink": "showGridLink"; "gridButtonClick": "gridButtonClick"; "gridIncreamentClick": "gridIncreamentClick"; "gridDecreamentClick": "gridDecreamentClick"; "gridImgClick": "gridImgClick"; }, never, never, true, never>;
|
|
853
954
|
}
|
|
854
955
|
|
|
855
956
|
declare class HeaderMenuComponent implements AfterViewInit {
|
|
@@ -941,8 +1042,7 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
941
1042
|
/** The field's backend list (RemoteListService - shared by every container). */
|
|
942
1043
|
fetchAutocompleteData(formField: any): Promise<any[]>;
|
|
943
1044
|
/** Resolves {{...}} against the user info (RemoteListService). */
|
|
944
|
-
resolveToken(template: string, context: any):
|
|
945
|
-
buildCompany(userInfo: any): string;
|
|
1045
|
+
resolveToken(template: string, context: any): any;
|
|
946
1046
|
getScope(scope: any): string;
|
|
947
1047
|
/** The autocomplete asked last, so a list that arrives later can still be shown for it. */
|
|
948
1048
|
private lastAutocomplete;
|
|
@@ -1140,6 +1240,10 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1140
1240
|
environment: any;
|
|
1141
1241
|
projectSeleted: any;
|
|
1142
1242
|
appVersionInfo: any;
|
|
1243
|
+
/** Languages to start in, best first (language codes "de", "en" ...); the first the project has wins. */
|
|
1244
|
+
startLanguages: string[];
|
|
1245
|
+
/** Set once the user picks a language in the menu - the start language then no longer applies. */
|
|
1246
|
+
private languageChosenByUser;
|
|
1143
1247
|
languageChange: EventEmitter<any>;
|
|
1144
1248
|
invokeMenu: EventEmitter<any>;
|
|
1145
1249
|
menuToggle: EventEmitter<any>;
|
|
@@ -1179,6 +1283,11 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1179
1283
|
ngOnChanges(changes: SimpleChanges): void;
|
|
1180
1284
|
getPaginationType(): Promise<void>;
|
|
1181
1285
|
ngAfterViewInit(): Promise<void>;
|
|
1286
|
+
/**
|
|
1287
|
+
* The first language of startLanguages the project has a file for - without startLanguages the
|
|
1288
|
+
* device language - and English as the last resort.
|
|
1289
|
+
*/
|
|
1290
|
+
private applyStartLanguage;
|
|
1182
1291
|
ngOnDestroy(): void;
|
|
1183
1292
|
/**
|
|
1184
1293
|
* Mobile menu (overlay when open, no width when closed, styles under :host(.sidemenu-mobile)):
|
|
@@ -1212,11 +1321,12 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1212
1321
|
openLogsTable(): void;
|
|
1213
1322
|
deleteMenuItem(subChild: any, index: number, event: Event): void;
|
|
1214
1323
|
navigateToProject(project: any): void;
|
|
1215
|
-
|
|
1324
|
+
/** Loads a language of the project; false when the project has no such language file. */
|
|
1325
|
+
changeLanguage(lang: string): Promise<boolean>;
|
|
1216
1326
|
private applyMenuTranslations;
|
|
1217
1327
|
private applySettingTranslations;
|
|
1218
1328
|
static ɵfac: i0.ɵɵFactoryDeclaration<SideMenuComponent, never>;
|
|
1219
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SideMenuComponent, "vl-side-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "projects": { "alias": "projects"; "required": false; }; "tenantName": { "alias": "tenantName"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; "appVersionInfo": { "alias": "appVersionInfo"; "required": false; }; }, { "languageChange": "languageChange"; "invokeMenu": "invokeMenu"; "menuToggle": "menuToggle"; "invokeProject": "invokeProject"; "errorMessage": "errorMessage"; "deleteProject": "deleteProject"; "paginationType": "paginationType"; }, never, never, true, never>;
|
|
1329
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SideMenuComponent, "vl-side-menu", never, { "menuItems": { "alias": "menuItems"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "settings": { "alias": "settings"; "required": false; }; "projects": { "alias": "projects"; "required": false; }; "tenantName": { "alias": "tenantName"; "required": false; }; "environment": { "alias": "environment"; "required": false; }; "projectSeleted": { "alias": "projectSeleted"; "required": false; }; "appVersionInfo": { "alias": "appVersionInfo"; "required": false; }; "startLanguages": { "alias": "startLanguages"; "required": false; }; }, { "languageChange": "languageChange"; "invokeMenu": "invokeMenu"; "menuToggle": "menuToggle"; "invokeProject": "invokeProject"; "errorMessage": "errorMessage"; "deleteProject": "deleteProject"; "paginationType": "paginationType"; }, never, never, true, never>;
|
|
1220
1330
|
}
|
|
1221
1331
|
|
|
1222
1332
|
declare class Autocomplete implements OnChanges {
|
|
@@ -1305,7 +1415,6 @@ declare class DropdownControl {
|
|
|
1305
1415
|
private control?;
|
|
1306
1416
|
private cache;
|
|
1307
1417
|
private get option();
|
|
1308
|
-
private caption;
|
|
1309
1418
|
/** { label, value } entries - the same array while the source does not change */
|
|
1310
1419
|
entries(): {
|
|
1311
1420
|
label: string;
|
|
@@ -1636,16 +1745,25 @@ declare class RemoteListService {
|
|
|
1636
1745
|
/** The signed-in user (claims + token), set by the app; used when a caller has none. */
|
|
1637
1746
|
private currentUser;
|
|
1638
1747
|
setUser(userInfo: any): void;
|
|
1748
|
+
/** The app's environment (apiUrl): a relative list address goes after it, like every other call. */
|
|
1749
|
+
private environment;
|
|
1750
|
+
setEnvironment(environment: any): void;
|
|
1751
|
+
/** The signed-in user the app handed over, or null. */
|
|
1752
|
+
user(): any;
|
|
1639
1753
|
/** Lists already loaded, by request (url + params), so a page does not ask twice. */
|
|
1640
1754
|
private readonly cache;
|
|
1641
1755
|
/** Like load(), with the current user and one request per source while the app runs. */
|
|
1642
1756
|
loadShared(config: any): Promise<any[]>;
|
|
1643
1757
|
/** Loads the list a field's source describes (option.autocomplete: url, method, params). */
|
|
1644
1758
|
load(config: any, userInfo?: any): Promise<any[]>;
|
|
1759
|
+
/**
|
|
1760
|
+
* The request of a field's list, described like every backend call of a page (backend-call.ts):
|
|
1761
|
+
* url with {{placeholders}} from the signed-in user, method, params, passToken.
|
|
1762
|
+
*/
|
|
1645
1763
|
resolveAutocompleteConfig(config: any, userInfo: any): {
|
|
1646
1764
|
url: string;
|
|
1647
|
-
method:
|
|
1648
|
-
params:
|
|
1765
|
+
method: string;
|
|
1766
|
+
params: Record<string, string>;
|
|
1649
1767
|
headers: {
|
|
1650
1768
|
Authorization: string;
|
|
1651
1769
|
Accept: string;
|
|
@@ -1654,9 +1772,8 @@ declare class RemoteListService {
|
|
|
1654
1772
|
Accept?: undefined;
|
|
1655
1773
|
};
|
|
1656
1774
|
};
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
resolveToken(template: string, context: any): string;
|
|
1775
|
+
/** Fills {{...}} from the user info (backend-call.ts). */
|
|
1776
|
+
resolveToken(template: string, context: any): any;
|
|
1660
1777
|
/** Suggestions of `list` whose `field` starts with the typed `query` (case-insensitive). */
|
|
1661
1778
|
filter(list: any[] | undefined, field: string | undefined, query: string | undefined): any[];
|
|
1662
1779
|
static ɵfac: i0.ɵɵFactoryDeclaration<RemoteListService, never>;
|
|
@@ -1671,6 +1788,94 @@ declare const BACKEND_PROXY_PREFIX = "/api/proxy";
|
|
|
1671
1788
|
*/
|
|
1672
1789
|
declare function backendUrl(url: string): string;
|
|
1673
1790
|
|
|
1791
|
+
declare class RecordStore {
|
|
1792
|
+
private utilityService;
|
|
1793
|
+
constructor(utilityService: UtilityService);
|
|
1794
|
+
/** The records of the source; an empty list when it has none or is not kept in the browser. */
|
|
1795
|
+
read(source: DataSource | null | undefined): Promise<any[]>;
|
|
1796
|
+
/**
|
|
1797
|
+
* Stores the records as a plain JSON list, dates as local ISO text. False when the source is not
|
|
1798
|
+
* kept in the browser (a backend source is written by its own call).
|
|
1799
|
+
*/
|
|
1800
|
+
write(source: DataSource | null | undefined, records: any[]): Promise<boolean>;
|
|
1801
|
+
/** Removes the record at index from the stored list. */
|
|
1802
|
+
remove(source: DataSource | null | undefined, index: number): Promise<boolean>;
|
|
1803
|
+
/** Empties the stored list. */
|
|
1804
|
+
clear(source: DataSource | null | undefined): Promise<boolean>;
|
|
1805
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<RecordStore, never>;
|
|
1806
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<RecordStore>;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/** Values the placeholders of a call are taken from. */
|
|
1810
|
+
interface CallContext {
|
|
1811
|
+
userInfo?: any;
|
|
1812
|
+
record?: any;
|
|
1813
|
+
records?: any[];
|
|
1814
|
+
filter?: any;
|
|
1815
|
+
env?: any;
|
|
1816
|
+
}
|
|
1817
|
+
/** A call ready to send. */
|
|
1818
|
+
interface BackendCall {
|
|
1819
|
+
url: string;
|
|
1820
|
+
method: string;
|
|
1821
|
+
params: Record<string, string>;
|
|
1822
|
+
body: any;
|
|
1823
|
+
}
|
|
1824
|
+
/**
|
|
1825
|
+
* A template with its placeholders filled in. A string that is only one placeholder gives the value
|
|
1826
|
+
* itself (a list stays a list); inside a longer text a missing value becomes empty. Objects and
|
|
1827
|
+
* lists are filled in deeply.
|
|
1828
|
+
*/
|
|
1829
|
+
declare function resolveTemplate(template: any, context: CallContext): any;
|
|
1830
|
+
/** True when the option describes a backend call (it has an address). */
|
|
1831
|
+
declare function hasBackendCall(option: any): boolean;
|
|
1832
|
+
/**
|
|
1833
|
+
* The call of an option: address, method, URL parameters and content with the placeholders filled in.
|
|
1834
|
+
* A relative address is put after env.apiUrl. Without an address there is no call (null).
|
|
1835
|
+
*/
|
|
1836
|
+
declare function buildBackendCall(option: any, context: CallContext): BackendCall | null;
|
|
1837
|
+
|
|
1838
|
+
declare class BackendCallService {
|
|
1839
|
+
private readonly remoteLists;
|
|
1840
|
+
private readonly utilityService;
|
|
1841
|
+
private readonly oauthService;
|
|
1842
|
+
/** The signed-in user (claims + token): from the app, else the stored sign-in. */
|
|
1843
|
+
currentUser(): Promise<any>;
|
|
1844
|
+
/** The records after the option's named conversion; unknown names change nothing. */
|
|
1845
|
+
transform(option: any, records: any[]): any[];
|
|
1846
|
+
/** Sends the records to the option's backend; true on success. */
|
|
1847
|
+
saveData(option: any, records: any[], extra?: CallContext): Promise<any>;
|
|
1848
|
+
/** Loads from the option's backend with the given context (e.g. filter values). */
|
|
1849
|
+
loadData(option: any, extra?: CallContext): Promise<any>;
|
|
1850
|
+
/** Sends a call; the answer's data, an error from status 400 on. */
|
|
1851
|
+
send(call: BackendCall, option: any, userInfo: any): Promise<any>;
|
|
1852
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BackendCallService, never>;
|
|
1853
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<BackendCallService>;
|
|
1854
|
+
}
|
|
1855
|
+
|
|
1856
|
+
declare const DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssxxx";
|
|
1857
|
+
/** The date written by the pattern, in the device's local time. */
|
|
1858
|
+
declare function formatDate(date: Date, pattern?: string): string;
|
|
1859
|
+
/** How the app keeps a date in browser storage: local time without time zone. */
|
|
1860
|
+
declare const STORAGE_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
|
|
1861
|
+
/**
|
|
1862
|
+
* A field's value as it goes into browser storage: a Date as local time without zone, a list (a
|
|
1863
|
+
* period) element by element - JSON wrote the dates of a list as UTC ("…T22:00:00.000Z", a day early).
|
|
1864
|
+
*/
|
|
1865
|
+
declare function storageValue(value: any): any;
|
|
1866
|
+
/**
|
|
1867
|
+
* A stored date text as the wall time it names: Z or an offset (+02:00, what the app itself sends) is
|
|
1868
|
+
* dropped, so 2026-10-18T08:00:00+02:00 reads 08:00 like 2026-10-18T08:00:00 from P5W1.
|
|
1869
|
+
*/
|
|
1870
|
+
declare function parseStorageDate(value: string): Date;
|
|
1871
|
+
/**
|
|
1872
|
+
* A stored value back as the field's control expects it, by the field's type: date, time and date and
|
|
1873
|
+
* time as a Date, a period as a list of Dates; anything else unchanged.
|
|
1874
|
+
*/
|
|
1875
|
+
declare function fromStorageValue(value: any, type: string | undefined): any;
|
|
1876
|
+
/** Every Date inside a value (object, list) written by the pattern; everything else stays. */
|
|
1877
|
+
declare function formatDates(value: any, pattern?: string): any;
|
|
1878
|
+
|
|
1674
1879
|
interface NumberShape {
|
|
1675
1880
|
style: 'decimal' | 'currency' | 'percent' | 'unit';
|
|
1676
1881
|
currency: string | null;
|
|
@@ -2051,11 +2256,16 @@ declare class ControlComponent implements OnChanges {
|
|
|
2051
2256
|
get display(): boolean;
|
|
2052
2257
|
/** protected in the layout, or a list: the value is shown, not typed in */
|
|
2053
2258
|
get readonly(): boolean;
|
|
2054
|
-
/**
|
|
2259
|
+
/**
|
|
2260
|
+
* the value shown: in a list what the record stores (never the property's default - that belongs
|
|
2261
|
+
* to a new record in the dialog), the property's otherwise
|
|
2262
|
+
*/
|
|
2055
2263
|
get value(): any;
|
|
2264
|
+
/** a plain value of a list as text, "--" when empty */
|
|
2265
|
+
get text(): string;
|
|
2056
2266
|
/** the row a number reads its currency field from: the record in a list */
|
|
2057
2267
|
get numberRow(): any;
|
|
2058
|
-
/** a date or time of a list as text
|
|
2268
|
+
/** a date or time of a list as text, "--" when empty */
|
|
2059
2269
|
get dateText(): string;
|
|
2060
2270
|
/** an older layout's own date pattern (Angular date pipe: option.dateFormat / timeFormat) */
|
|
2061
2271
|
get legacyDateFormat(): string;
|
|
@@ -2097,5 +2307,5 @@ declare class ControlComponent implements OnChanges {
|
|
|
2097
2307
|
static ɵcmp: i0.ɵɵComponentDeclaration<ControlComponent, "vl-control", never, { "field": { "alias": "field"; "required": false; }; "propertySchema": { "alias": "propertySchema"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "errorMessages": { "alias": "errorMessages"; "required": false; }; "saveTried": { "alias": "saveTried"; "required": false; }; "container": { "alias": "container"; "required": false; }; "buttonType": { "alias": "buttonType"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "record": { "alias": "record"; "required": false; }; "hideLabel": { "alias": "hideLabel"; "required": false; }; "styleValue": { "alias": "styleValue"; "required": false; }; "compact": { "alias": "compact"; "required": false; }; "list": { "alias": "list"; "required": false; }; "listLoading": { "alias": "listLoading"; "required": false; }; "creditCardError": { "alias": "creditCardError"; "required": false; }; }, { "picked": "picked"; "changed": "changed"; "opened": "opened"; "toggled": "toggled"; "linkClicked": "linkClicked"; "mediaClicked": "mediaClicked"; "buttonClick": "buttonClick"; }, never, never, true, never>;
|
|
2098
2308
|
}
|
|
2099
2309
|
|
|
2100
|
-
export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, SideMenuComponent, SwitchControl, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, backendUrl, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fixedTimeText, inputFormatHint, isNativeMobile, isNativePhone, languageDatePattern, layoutPlaceholder, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, primeDatePattern, resolveCustomKeyboardType, resolvePlaceholder, ruleMessage, setDateLanguage, setInputHintLanguage, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storedToTyped, styleParts, testAction, testFieldKey, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
|
|
2101
|
-
export type { ControlKind, CustomKeyboardTarget, CustomKeyboardType, FieldKind, FieldModel, FieldRules, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, RequestTimeoutMessages, StagedReadOptions };
|
|
2310
|
+
export { AppVersionResetService, Autocomplete, BACKEND_PROXY_PREFIX, BackendCallService, CardComponent, CheckboxControl, ConfigService, ControlComponent, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, DEFAULT_DATE_FORMAT, DateFormatPipe, DateHintPipe, DateRangeControl, DateTextPipe, DateTimeControl, DropdownControl, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaControl, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, NumberControl, PageData, PaginationComponent, PasswordControl, PlaceholderPipe, READ_ATTEMPT_TIMEOUT, REQUEST_STAGES, RETRY_PAUSES, RETRY_STATUSES, RadioControl, RecordStore, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, RulesPipe, SIDE_DOCK_CLASS, STORAGE_DATE_FORMAT, SideMenuComponent, SwitchControl, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, backendUrl, buildBackendCall, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, inputFormatHint, isBrowserSource, isNativeMobile, isNativePhone, languageDatePattern, layoutPlaceholder, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, recordOf, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, setDateLanguage, setInputHintLanguage, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, testAction, testFieldKey, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
|
|
2311
|
+
export type { BackendCall, CallContext, ControlKind, CustomKeyboardTarget, CustomKeyboardType, DataSource, FieldKind, FieldModel, FieldRules, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, PageDataDeps, RequestTimeoutMessages, StagedReadOptions, StorageKind };
|