@yomotech/view-toolkit 1.0.41 → 1.0.43

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.
@@ -7,8 +7,8 @@ import { HttpClient, HttpHeaders } from '@angular/common/http';
7
7
  import { OAuthService } from 'angular-oauth2-oidc';
8
8
  import { NzModalService } from 'ng-zorro-antd/modal';
9
9
  import { ToastrService } from 'ngx-toastr';
10
- import { OktaAuthStateService } from '@okta/okta-angular';
11
10
  import { NgForm } from '@angular/forms';
11
+ import { OktaAuthStateService } from '@okta/okta-angular';
12
12
  import { DynamicDialogRef, DynamicDialogConfig, DialogService } from 'primeng/dynamicdialog';
13
13
  import { NzI18nService } from 'ng-zorro-antd/i18n';
14
14
  import * as catalog from '@yomotech/view-toolkit/catalog';
@@ -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
  }
@@ -120,6 +118,9 @@ declare class UtilityService {
120
118
  private platform;
121
119
  private requestService;
122
120
  stripe: any;
121
+ cardElement: any;
122
+ /** Stripe says the card field holds a whole card (number, date, CVC) - a signal, so a locked button follows it */
123
+ readonly cardComplete: i0.WritableSignal<boolean>;
123
124
  constructor(platform: Platform, requestService: RequestService);
124
125
  getScope(scope: any): string;
125
126
  getProperty(scope: any, itemInfo?: any): {
@@ -146,7 +147,20 @@ declare class UtilityService {
146
147
  getTotalQuantity(tableitemInfo: any): number;
147
148
  replacePaginationParams(url: string, currentPage: number, pageSize: number): string;
148
149
  customButton(option: any, propertySchema: any, projectSeleted: any, environment: any): void;
150
+ /**
151
+ * The page an entry opens for this user. The app settings form (Main with center.appSettings,
152
+ * OFFENE-PUNKTE 109): the start page is center.option; a role with its own start page in
153
+ * appSettings.login.roles wins (startPageFor of the catalog) - the role read through roleKey from the
154
+ * sign-in answer or the token's claims (Keycloak "realm_access.roles", Okta "groups"). The older form
155
+ * (the role pages in option.userRoleMapping) is read as before until every app is converted.
156
+ */
149
157
  setDefaultUser(item: any, userInfo: any, environment: any): any;
158
+ /**
159
+ * The user as the roles are looked up in: the sign-in answer or user info, together with the claims of
160
+ * its access token (token, authToken, access_token or keycloakInfo.access_token) - Keycloak and Okta keep
161
+ * the roles there. The user's own fields win over a claim of the same name.
162
+ */
163
+ userClaims(userInfo: any): any;
150
164
  setTableData(data: any, option: any | undefined, tableitemInfo: any, projectSeleted: any): any;
151
165
  setOktaWebCredential(environment: any, projectName: any): {
152
166
  logo: string;
@@ -173,11 +187,27 @@ declare class UtilityService {
173
187
  /** OAuth scope as the space separated string the OAuth2 plugin expects. */
174
188
  private oauthScope;
175
189
  setupStripePaymentForm(environment: any, form: any, onCardChange: (message: string) => void): Promise<void>;
190
+ /**
191
+ * A required card field (option.required in the layout) without a whole card: the card is no field of
192
+ * the Angular form (Stripe's own frame), so the form's validity does not see it.
193
+ */
194
+ requiredCardMissing(layoutSchema: any, propertySchema: any): boolean;
195
+ /**
196
+ * Pays a payment intent with the card field of the page. ok false with the reason in error when the
197
+ * field is not there yet or Stripe refuses the card; the card data never leaves Stripe's own frame.
198
+ */
199
+ confirmCardPayment(clientSecret: string, billingDetails?: any): Promise<{
200
+ ok: boolean;
201
+ error?: string;
202
+ paymentIntent?: any;
203
+ }>;
176
204
  formData(form: any, environment: any, cartInfo: any): Promise<void>;
177
205
  normalizeDatesForStorage(obj: any): any;
178
206
  isDateLike(value: any): boolean;
179
207
  toLocalISOString(date: Date): string;
208
+ /** Dates of stored records back to Date objects - date, time, date and time, period (date-format.ts). */
180
209
  restoreDatesFromStorage(records: any[], propertySchema: any): any[];
210
+ /** A stored date text as the wall time it names (date-format.ts). */
181
211
  parseLocalISODate(value: string): Date;
182
212
  convertToDailyLogs(cardOrCards: any | any[]): any[];
183
213
  private applyTimeToDay;
@@ -518,6 +548,89 @@ declare class DateTimePickerService {
518
548
  static ɵprov: i0.ɵɵInjectableDeclaration<DateTimePickerService>;
519
549
  }
520
550
 
551
+ /** Where a page keeps its records: storageType + data_url (backend URL or storage key). */
552
+ interface DataSource {
553
+ storageType?: string;
554
+ data_url?: string;
555
+ /** older Designer versions: localStorage: true / sessionStorage: true instead of storageType */
556
+ localStorage?: boolean;
557
+ sessionStorage?: boolean;
558
+ }
559
+ type StorageKind = 'localstorage' | 'sessionstorage' | 'filter' | 'database' | '';
560
+ /** The kind of a data source, lowercase - "localStorage" of older Designer versions counts as "localstorage". */
561
+ declare function storageKind(source: DataSource | null | undefined): StorageKind;
562
+ /** True when the records of the source live in the browser (local or session storage). */
563
+ declare function isBrowserSource(source: DataSource | null | undefined): boolean;
564
+ /**
565
+ * The records of a stored value: a list stays a list, a JSON text is read - also when it is the
566
+ * JSON text of a JSON text. Anything else (nothing, broken JSON, an object) gives an empty list.
567
+ */
568
+ declare function parseRecords(value: unknown): any[];
569
+ /**
570
+ * The record of a form, dialog or grid row: every field's value exactly as its control holds it - text,
571
+ * number, date, period (a list), yes/no, selection - nothing unpacked, no exception by type. The same
572
+ * for every container; dates are turned into storage text later, in one place (RecordStore).
573
+ * fields: only these names (a grid row's editable columns); without, every field of the data objects.
574
+ */
575
+ declare function recordOf(propertySchema: Record<string, any> | null | undefined, fields?: string[]): Record<string, any>;
576
+
577
+ /** What PageData needs from the app: storage, backend, the question before deleting, a message. */
578
+ interface PageDataDeps {
579
+ readRecords(source: DataSource): Promise<any[]>;
580
+ writeRecords(source: DataSource, records: any[]): Promise<boolean>;
581
+ /** GET/POST of the page's own source (option), with extra placeholders (filter, pageNumber, pageSize). */
582
+ loadBackend(option: any, extra: any): Promise<any>;
583
+ /** The call a button describes, with the records ({{records}}) or one record ({{record.x}}). */
584
+ sendBackend(option: any, records: any[], extra: any): Promise<any>;
585
+ /** The question before deleting; true = delete. */
586
+ confirmDelete(button: any): Promise<boolean>;
587
+ /** A message to the user, by text key (saveFailed, deleteFailed, loadFailed). */
588
+ failed(key: string, error: unknown): void;
589
+ /** Dates of browser records back to Date objects (optional). */
590
+ restoreDates?(records: any[]): any[];
591
+ }
592
+ declare class PageData {
593
+ records: any[];
594
+ visible: any[];
595
+ page: number;
596
+ pageSize: number;
597
+ pageCount: number;
598
+ totalItems: number;
599
+ loading: boolean;
600
+ filter: Record<string, any>;
601
+ /** Called after every change of the state above - the container redraws. */
602
+ onChange: () => void;
603
+ readonly source: DataSource & Record<string, any>;
604
+ private readonly deps;
605
+ constructor(source: DataSource & Record<string, any>, deps: PageDataDeps, pageSize?: number);
606
+ /** Browser list and filter page: all records are here and paged in the app; a backend pages itself. */
607
+ get clientPaging(): boolean;
608
+ load(): Promise<void>;
609
+ /** Records the app loaded itself (a backend page with images, its own paging). */
610
+ useRecords(records: any[]): void;
611
+ setFilter(values: Record<string, any>): Promise<void>;
612
+ goTo(page: number): Promise<void>;
613
+ setPageSize(size: number): Promise<void>;
614
+ /** A record from a dialog or form: replaces record index, else is appended (and its page shown). */
615
+ saveRecord(record: any, index?: number | null): Promise<boolean>;
616
+ /** Deletes record index after the question; browser list, or the button's backend (then reloads). */
617
+ remove(index: number, button?: any): Promise<boolean>;
618
+ /** Sends one record (index) or all ('all') to the backend the button describes; afterSuccess removeLocal. */
619
+ send(button: any, index: number | 'all'): Promise<boolean>;
620
+ /** Filter fields are the keys set by setFilter; a filter page loads only when none is empty. */
621
+ private filterComplete;
622
+ private loadBackendRecords;
623
+ /** A filter date goes on as a Date - the call writes it by the page's dateFormat. */
624
+ private filterValue;
625
+ private removeLocal;
626
+ /** The old delete address "orders/{{id}}" took record[button.key] for any placeholder. */
627
+ private legacyUrl;
628
+ private setRecords;
629
+ /** Browser list and filter page: the current page out of all records; a backend page is shown as it came. */
630
+ private slice;
631
+ private setLoading;
632
+ }
633
+
521
634
  declare class CardComponent {
522
635
  private utilityService;
523
636
  private platform;
@@ -551,6 +664,8 @@ declare class CardComponent {
551
664
  /** "datetime" for a value with date and time (type datetime or control dateTimepicker), else "date". */
552
665
  cardDateKind(field: any): 'date' | 'datetime';
553
666
  itemInfo: any;
667
+ /** The records of the page and what is done with them (PageData, shared with the grid). */
668
+ pageData: PageData | null;
554
669
  currentPage: number;
555
670
  pageSize: number;
556
671
  selectedLanguageInfo: any;
@@ -565,10 +680,6 @@ declare class CardComponent {
565
680
  onPageChange: EventEmitter<any>;
566
681
  paginationMode: 'client' | 'server';
567
682
  paginationLoading: boolean;
568
- cardDataChange: EventEmitter<{
569
- records: any[];
570
- resetPage?: boolean;
571
- }>;
572
683
  scrollPaginationSentinel?: ElementRef<HTMLElement>;
573
684
  private scrollObserver?;
574
685
  private requestedScrollPage;
@@ -591,8 +702,6 @@ declare class CardComponent {
591
702
  ngOnDestroy(): void;
592
703
  ngAfterViewInit(): void;
593
704
  getRecordIndex(record: any): number;
594
- private publishCardDataChange;
595
- private setFilteredCardData;
596
705
  private updateDeviceMode;
597
706
  private safeUpdate;
598
707
  getHorizontalLayoutCaption(layout: any): any;
@@ -602,22 +711,18 @@ declare class CardComponent {
602
711
  updatebuttonLanguage<T>(schema: T, translations: Record<string, string>): T;
603
712
  updateLayoutLanguage<T>(schema: T, translations: Record<string, string>): T;
604
713
  dateChangeEvent(filter: any, value: any): void;
714
+ /** The filter values go to the page's data; it loads once every filter field is set. */
605
715
  applyDateFilter(filters: any): Promise<void>;
606
- getSaveOrder(token: string, userInfo: any, fromDate: any, toDate: any): Promise<any>;
607
- formatToOffsetISO(date: Date): string;
716
+ /** Every filter field of the page, an unset one as null - the page loads only when none is empty. */
608
717
  extractFilterValues(schema: Record<string, any>): Record<string, any>;
609
718
  invokeOnPageSizeChange(pageSize: any): void;
610
719
  invokeGoToPage(page: number): void;
611
720
  invokeOnCardHeader(element: any): void;
612
721
  invokeOnCardFooter(element: any): void;
722
+ /** Delete (asks first) and save to a backend go to the page's data; anything else to the app. */
613
723
  invokeButtonClick(layout: any, record: any, recordIndex: any): Promise<void>;
614
- showConfirm(option: any, recordIndex: any): void;
615
- d4_SaveAll(): Promise<void>;
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>;
724
+ /** "Save all": every record of the page in one call. */
725
+ saveAllData(option: any): Promise<void>;
621
726
  showLinkDetails(option: any, record: any): void;
622
727
  showImageDetails(option: any, record: any): void;
623
728
  getProperty(scope: any): {
@@ -645,9 +750,44 @@ declare class CardComponent {
645
750
  */
646
751
  keyboardTypeFor(field: any, propertySchema: any): CustomKeyboardType | null;
647
752
  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"; "cardDataChange": "cardDataChange"; }, never, never, true, never>;
753
+ 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
754
  }
650
755
 
756
+ /**
757
+ * Signed in only with a real value: the app sets { authToken: undefined } for Okta before any sign-in,
758
+ * so an object with keys is not enough. Any key counts, so a login of any backend works
759
+ * ({ jwt }, { accessToken }, { userId }, Keycloak, OAuth2): a non-empty text, a number, or an object
760
+ * or list holding such a value; true / false say nothing about a user.
761
+ */
762
+ declare function isSignedIn(userInfo: any, now?: number): boolean;
763
+ type LockReason = 'login' | 'valid' | null;
764
+ /** Why a button is locked: needsLogin without a signed-in user first, then needsValid with a broken rule. */
765
+ declare function lockReason(option: any, state: {
766
+ signedIn: boolean;
767
+ valid: boolean;
768
+ }): LockReason;
769
+ /** Every reason a button is locked, the sign-in first: both show their hint under the button. */
770
+ declare function lockReasons(option: any, state: {
771
+ signedIn: boolean;
772
+ valid: boolean;
773
+ }): Array<'login' | 'valid'>;
774
+ /** A hint under a locked button: the layout's text; for 'login' a link to the sign-in. */
775
+ interface LockHint {
776
+ reason: 'login' | 'valid';
777
+ text: string;
778
+ }
779
+ /** Whether a button is locked: needsLogin without a signed-in user, needsValid with a broken rule. */
780
+ declare function buttonLocked(option: any, state: {
781
+ signedIn: boolean;
782
+ valid: boolean;
783
+ }): boolean;
784
+ /**
785
+ * The hint under a locked button: the layout's caption for the reason (option.needsLoginHint.caption /
786
+ * needsValidHint.caption), in the app's language when the language file has it (the caption is its key).
787
+ * Empty when the layout gives none.
788
+ */
789
+ declare function lockHint(option: any, reason: LockReason, translations?: Record<string, string> | null): string;
790
+
651
791
  declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
652
792
  /** Marks for the app's test runner (#166): field key and button action. */
653
793
  readonly vlFieldKey: typeof testFieldKey;
@@ -672,6 +812,7 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
672
812
  /** Date and time picker behaviour shared by all containers. */
673
813
  readonly picker: DateTimePickerService;
674
814
  private readonly host;
815
+ private readonly utility;
675
816
  ngOnDestroy(): void;
676
817
  customEmailPattern: string;
677
818
  showPassword: boolean;
@@ -680,8 +821,12 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
680
821
  creditCardError: any;
681
822
  form: any;
682
823
  selectedLanguageInfo: any;
824
+ /** the signed-in user, for needsLogin on a button */
825
+ userInfo: any;
683
826
  formButtonClick: EventEmitter<any>;
684
827
  checkBoxChangeEvent: EventEmitter<any>;
828
+ /** the hint of a button locked for a missing sign-in was clicked: the app starts its sign-in */
829
+ signIn: EventEmitter<void>;
685
830
  ngOnInit(): void;
686
831
  ngOnChanges(changes: SimpleChanges): void;
687
832
  ngAfterViewInit(): void;
@@ -692,10 +837,43 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
692
837
  classes: string;
693
838
  style: any;
694
839
  };
840
+ /** A section's width in the form's 12 columns (layout gridSpan). */
841
+ sectionSpanOf(formSection: any): number;
842
+ /** A section's width on a tablet (layout tabletGridSpan, else gridSpan). */
843
+ sectionTabletSpanOf(formSection: any): number;
844
+ /** The sticky column's width on a tablet: the widest of its sections; 12 puts it under the others there. */
845
+ stickyTabletSpan(): number;
846
+ /** The sections that stay in view (true) or flow (false), in the order of the layout - the same list while the layout is the same. */
847
+ sectionsIn(sticky: boolean): any[];
848
+ private sectionSplit;
849
+ /** The width of the sticky column: the widest of its sections (gridSpan), 4 when none says. */
850
+ stickySpan(): number;
851
+ /** A section with visibleWhen is shown only while its field holds the value. */
852
+ sectionShown(formSection: any): boolean;
695
853
  getSectionBodyStyle(formSection: any): any;
696
854
  getFieldWrapperStyle(formField: any): any;
697
855
  getScope(scope: any): string;
698
856
  togglePasswordVisibility(): void;
857
+ /** A button grey and without click: needsLogin without a user, needsValid with a broken field rule. */
858
+ isLocked(formField: any, form: NgForm | null): boolean;
859
+ /** Why a button is locked: 'login' (needsLogin, nobody signed in) or 'valid' (needsValid, a field or the required card missing). */
860
+ lockReasonOf(formField: any, form: NgForm | null): LockReason;
861
+ /** Under a locked button: one hint per reason (sign-in, fields), the layout's texts only. */
862
+ lockHintsOf(formField: any, form: NgForm | null): LockHint[];
863
+ private readonly lockHintCache;
864
+ /**
865
+ * The fields that keep a needsValid button locked, in the order of the page: a field whose control
866
+ * breaks a rule, and a required card field without a whole card (named by its section). Only shown
867
+ * sections count; none missing means the form is valid for needsValid.
868
+ */
869
+ missingFields(form: NgForm | null): Array<{
870
+ key: string;
871
+ label: string;
872
+ }>;
873
+ /**
874
+ * A click on a locked button: nothing is sent; every field shows its message. The page stays where it is.
875
+ */
876
+ showMissing(form: NgForm | null): void;
699
877
  invokeFormBtnClick(option: any, propertySchema: any): void;
700
878
  setformData(): void;
701
879
  setErroMessage(formField: any, errorMessages: any, field: any): string;
@@ -708,7 +886,7 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
708
886
  saveTried: boolean;
709
887
  showError(control: any): boolean;
710
888
  static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
711
- static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "vl-form", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "creditCardError": { "alias": "creditCardError"; "required": false; }; "form": { "alias": "form"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; }, { "formButtonClick": "formButtonClick"; "checkBoxChangeEvent": "checkBoxChangeEvent"; }, never, never, true, never>;
889
+ static ɵcmp: i0.ɵɵComponentDeclaration<FormComponent, "vl-form", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "creditCardError": { "alias": "creditCardError"; "required": false; }; "form": { "alias": "form"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; }, { "formButtonClick": "formButtonClick"; "checkBoxChangeEvent": "checkBoxChangeEvent"; "signIn": "signIn"; }, never, never, true, never>;
712
890
  }
713
891
 
714
892
  interface GridColumnFilterState {
@@ -755,6 +933,19 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
755
933
  currentPage: number;
756
934
  pages: number[];
757
935
  userInfo: any;
936
+ /** A page from browser storage or a filter (A4): its records, delete and paging go through PageData. */
937
+ pageData: PageData | null;
938
+ /** "dialog" edit: the app opens the page's dialog with the record (like a card's showModal). */
939
+ editRow: EventEmitter<{
940
+ option: any;
941
+ record: any;
942
+ recordIndex: number;
943
+ }>;
944
+ gridForm?: NgForm;
945
+ /** The row being edited ("row" mode), its own copy of the data objects with the row's values. */
946
+ editingRow: any;
947
+ rowSchema: any;
948
+ rowSaveTried: boolean;
758
949
  onPageChange: EventEmitter<any>;
759
950
  onPageSizeChange: EventEmitter<any>;
760
951
  onGridScroll: EventEmitter<any>;
@@ -794,6 +985,26 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
794
985
  decrementQuantity(index: any, field: any, option: any): void;
795
986
  invokeOnPageSizeChange(pageSize: any): void;
796
987
  invokeGoToPage(page: any): void;
988
+ /** layoutSchema.edit: { mode: "row" | "dialog", layout_url?, property_url?, modalTitle?, data_url?, method? } */
989
+ get editConfig(): any;
990
+ get editMode(): 'row' | 'dialog' | null;
991
+ /** The edit column shows when the page sets a mode and has at least one unlocked field. */
992
+ get canEdit(): boolean;
993
+ /** A column whose cells can be edited: it has a field and the field is not locked. */
994
+ editableCol(col: any): boolean;
995
+ /** A cell is an input only in the row being edited, and only when its field is not locked. */
996
+ cellEditing(col: any, data: any): boolean;
997
+ /** A cell that needs more room while edited: multi-line text, a period, date and time. */
998
+ wideEditCell(col: any): boolean;
999
+ /** The project's text for a fixed key (Edit, Save, Cancel), else the key. */
1000
+ t(key: string): string;
1001
+ private recordIndexOf;
1002
+ startEdit(data: any): void;
1003
+ cancelEdit(): void;
1004
+ /** ✓: checks the row's controls like the dialog, then saves the record (browser list or backend). */
1005
+ saveRow(): Promise<void>;
1006
+ /** The delete icon of a row: a browser list deletes through PageData (asks first), a backend as before. */
1007
+ deleteRow(option: any, data: any): void;
797
1008
  authenticating(): void;
798
1009
  private readonly sortFunctionCache;
799
1010
  getColumnSortFn(column: any): ((firstRow: any, secondRow: any) => number) | boolean;
@@ -841,15 +1052,8 @@ declare class GridComponent implements AfterViewInit, OnDestroy {
841
1052
  propertyType(col: any): string;
842
1053
  /** The DTO type of a column as the data object declares it ("string", "quantity" ...). */
843
1054
  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
1055
  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>;
1056
+ 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
1057
  }
854
1058
 
855
1059
  declare class HeaderMenuComponent implements AfterViewInit {
@@ -873,6 +1077,7 @@ declare class HeaderMenuComponent implements AfterViewInit {
873
1077
  buttonClick: EventEmitter<any>;
874
1078
  showTableContent: EventEmitter<any>;
875
1079
  searchItems: EventEmitter<any>;
1080
+ private readonly cdr;
876
1081
  constructor(oktaAuthService: OktaAuthStateService, requestService: RequestService, utilityService: UtilityService, couchdbService: Couchdb, platform: Platform);
877
1082
  ngOnChanges(changes: SimpleChanges): void;
878
1083
  ngAfterViewInit(): void;
@@ -941,8 +1146,7 @@ declare class ModelComponent implements OnChanges, OnDestroy {
941
1146
  /** The field's backend list (RemoteListService - shared by every container). */
942
1147
  fetchAutocompleteData(formField: any): Promise<any[]>;
943
1148
  /** Resolves {{...}} against the user info (RemoteListService). */
944
- resolveToken(template: string, context: any): string;
945
- buildCompany(userInfo: any): string;
1149
+ resolveToken(template: string, context: any): any;
946
1150
  getScope(scope: any): string;
947
1151
  /** The autocomplete asked last, so a list that arrives later can still be shown for it. */
948
1152
  private lastAutocomplete;
@@ -972,6 +1176,15 @@ declare class ModelComponent implements OnChanges, OnDestroy {
972
1176
  applyDurationRule(rule: any, formField: any): void;
973
1177
  invokeSetformData(): void;
974
1178
  invokeFormBtnClick(option: any, propertySchema: any, form: NgForm): void;
1179
+ /** A button grey and without click: needsLogin without a user, needsValid with a broken field rule. */
1180
+ isLocked(formField: any, form: NgForm | null): boolean;
1181
+ /** Why a button is locked: 'login' (needsLogin, nobody signed in) or 'valid' (needsValid, a field rule broken). */
1182
+ lockReasonOf(formField: any, form: NgForm | null): LockReason;
1183
+ /** Under a locked button: the fields hint (a dialog has no sign-in link), the same list while nothing changed. */
1184
+ lockHintsOf(formField: any, form: NgForm | null): LockHint[];
1185
+ private readonly lockHintCache;
1186
+ /** A click on a locked button: nothing is sent; every field shows its message, the first missing one comes into view. */
1187
+ showMissing(form: NgForm | null): void;
975
1188
  checkValidty(form: NgForm): boolean;
976
1189
  onCancel(): void;
977
1190
  /**
@@ -1016,6 +1229,32 @@ declare class PaginationComponent implements OnInit {
1016
1229
  static ɵcmp: i0.ɵɵComponentDeclaration<PaginationComponent, "vl-pagination", never, { "itemInfo": { "alias": "itemInfo"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "currentPage": { "alias": "currentPage"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "pages": { "alias": "pages"; "required": false; }; }, { "pageSizeChange": "pageSizeChange"; "onGoToPage": "onGoToPage"; }, never, never, true, never>;
1017
1230
  }
1018
1231
 
1232
+ interface TermsDialogDocument {
1233
+ name: string;
1234
+ caption: string;
1235
+ kind: string;
1236
+ value: string;
1237
+ }
1238
+ declare class TermsDialog {
1239
+ /** the documents; to confirm, the terms (agb) come first, imprint and privacy as links */
1240
+ set documents(docs: TermsDialogDocument[] | null);
1241
+ /** true: Accept / Decline before the sign-in; false: a document to read */
1242
+ confirm: boolean;
1243
+ /** the app's language (selectedLanguage) */
1244
+ translations: Record<string, string> | null;
1245
+ accepted: EventEmitter<void>;
1246
+ declined: EventEmitter<void>;
1247
+ closed: EventEmitter<void>;
1248
+ docs: TermsDialogDocument[];
1249
+ main: TermsDialogDocument | null;
1250
+ current: TermsDialogDocument | null;
1251
+ get others(): TermsDialogDocument[];
1252
+ show(doc: TermsDialogDocument | null): void;
1253
+ t(key: string, english: string): string;
1254
+ static ɵfac: i0.ɵɵFactoryDeclaration<TermsDialog, never>;
1255
+ static ɵcmp: i0.ɵɵComponentDeclaration<TermsDialog, "vl-terms-dialog", never, { "documents": { "alias": "documents"; "required": false; }; "confirm": { "alias": "confirm"; "required": false; }; "translations": { "alias": "translations"; "required": false; }; }, { "accepted": "accepted"; "declined": "declined"; "closed": "closed"; }, never, never, true, never>;
1256
+ }
1257
+
1019
1258
  /** What a project's login configuration has to say about its identity provider. */
1020
1259
  interface OidcProvider {
1021
1260
  /** e.g. https://keycloak-poc.wilken.de/realms/p5, https://integrator-1772139.okta.com/oauth2/default */
@@ -1125,7 +1364,7 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
1125
1364
  settingMenu: any;
1126
1365
  setLanguage: boolean;
1127
1366
  /** Translations of the last language change, for menu items that arrive after it. */
1128
- private lastMenuTranslations;
1367
+ lastMenuTranslations: Record<string, string> | null;
1129
1368
  tenantKey: string;
1130
1369
  scrollPagination: any;
1131
1370
  private oktaAuthStateSubscription?;
@@ -1140,6 +1379,16 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
1140
1379
  environment: any;
1141
1380
  projectSeleted: any;
1142
1381
  appVersionInfo: any;
1382
+ /** Languages to start in, best first (language codes "de", "en" ...); the first the project has wins. */
1383
+ startLanguages: string[];
1384
+ /** Main's start page area (center) - with appSettings the library adds the setting entries itself (OFFENE-PUNKTE 106/108). */
1385
+ mainCenter: any;
1386
+ /** The menu as the app hands it over, before the setting entries are added. */
1387
+ private rawMenuItems;
1388
+ /** The codes of the project's language files ("en", "de") for the entry Languages. */
1389
+ private projectLanguages;
1390
+ /** Set once the user picks a language in the menu - the start language then no longer applies. */
1391
+ private languageChosenByUser;
1143
1392
  languageChange: EventEmitter<any>;
1144
1393
  invokeMenu: EventEmitter<any>;
1145
1394
  menuToggle: EventEmitter<any>;
@@ -1177,8 +1426,17 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
1177
1426
  constructor(i18n: NzI18nService, mobileKeycloakService: MobileKeycloakService, couchdbService: Couchdb, oauthService: OAuthService, platform: Platform, requestService: RequestService, utilityService: UtilityService, dialogService: DialogService, notificationService: NotificationService, injector: Injector);
1178
1427
  ngOnInit(): Promise<void>;
1179
1428
  ngOnChanges(changes: SimpleChanges): void;
1429
+ /** The setting entries of the app settings added to the menu as the app handed it over. */
1430
+ private addSettingEntries;
1431
+ /** The languages of the project - its files languages/<code>.json, not the error messages. */
1432
+ private loadProjectLanguages;
1180
1433
  getPaginationType(): Promise<void>;
1181
1434
  ngAfterViewInit(): Promise<void>;
1435
+ /**
1436
+ * The first language of startLanguages the project has a file for - without startLanguages the
1437
+ * device language - and English as the last resort.
1438
+ */
1439
+ private applyStartLanguage;
1182
1440
  ngOnDestroy(): void;
1183
1441
  /**
1184
1442
  * Mobile menu (overlay when open, no width when closed, styles under :host(.sidemenu-mobile)):
@@ -1212,11 +1470,19 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
1212
1470
  openLogsTable(): void;
1213
1471
  deleteMenuItem(subChild: any, index: number, event: Event): void;
1214
1472
  navigateToProject(project: any): void;
1215
- changeLanguage(lang: string): Promise<void>;
1473
+ /**
1474
+ * A document of Terms & Conditions: a link opens in a new window, a PDF from the project's Media as
1475
+ * well, a written text is shown as a message.
1476
+ */
1477
+ private openTermsDocument;
1478
+ /** The text document of Terms & Conditions open now (vl-terms-dialog), null when none. */
1479
+ termsDocument: TermsDialogDocument[] | null;
1480
+ /** Loads a language of the project; false when the project has no such language file. */
1481
+ changeLanguage(lang: string): Promise<boolean>;
1216
1482
  private applyMenuTranslations;
1217
1483
  private applySettingTranslations;
1218
1484
  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>;
1485
+ 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; }; "mainCenter": { "alias": "mainCenter"; "required": false; }; }, { "languageChange": "languageChange"; "invokeMenu": "invokeMenu"; "menuToggle": "menuToggle"; "invokeProject": "invokeProject"; "errorMessage": "errorMessage"; "deleteProject": "deleteProject"; "paginationType": "paginationType"; }, never, never, true, never>;
1220
1486
  }
1221
1487
 
1222
1488
  declare class Autocomplete implements OnChanges {
@@ -1635,16 +1901,25 @@ declare class RemoteListService {
1635
1901
  /** The signed-in user (claims + token), set by the app; used when a caller has none. */
1636
1902
  private currentUser;
1637
1903
  setUser(userInfo: any): void;
1904
+ /** The app's environment (apiUrl): a relative list address goes after it, like every other call. */
1905
+ private environment;
1906
+ setEnvironment(environment: any): void;
1907
+ /** The signed-in user the app handed over, or null. */
1908
+ user(): any;
1638
1909
  /** Lists already loaded, by request (url + params), so a page does not ask twice. */
1639
1910
  private readonly cache;
1640
1911
  /** Like load(), with the current user and one request per source while the app runs. */
1641
1912
  loadShared(config: any): Promise<any[]>;
1642
1913
  /** Loads the list a field's source describes (option.autocomplete: url, method, params). */
1643
1914
  load(config: any, userInfo?: any): Promise<any[]>;
1915
+ /**
1916
+ * The request of a field's list, described like every backend call of a page (backend-call.ts):
1917
+ * url with {{placeholders}} from the signed-in user, method, params, passToken.
1918
+ */
1644
1919
  resolveAutocompleteConfig(config: any, userInfo: any): {
1645
1920
  url: string;
1646
- method: any;
1647
- params: any;
1921
+ method: string;
1922
+ params: Record<string, string>;
1648
1923
  headers: {
1649
1924
  Authorization: string;
1650
1925
  Accept: string;
@@ -1653,9 +1928,8 @@ declare class RemoteListService {
1653
1928
  Accept?: undefined;
1654
1929
  };
1655
1930
  };
1656
- private getAutocompleteRequestUrl;
1657
- buildCompany(userInfo: any): string;
1658
- resolveToken(template: string, context: any): string;
1931
+ /** Fills {{...}} from the user info (backend-call.ts). */
1932
+ resolveToken(template: string, context: any): any;
1659
1933
  /** Suggestions of `list` whose `field` starts with the typed `query` (case-insensitive). */
1660
1934
  filter(list: any[] | undefined, field: string | undefined, query: string | undefined): any[];
1661
1935
  static ɵfac: i0.ɵɵFactoryDeclaration<RemoteListService, never>;
@@ -1670,6 +1944,96 @@ declare const BACKEND_PROXY_PREFIX = "/api/proxy";
1670
1944
  */
1671
1945
  declare function backendUrl(url: string): string;
1672
1946
 
1947
+ declare class RecordStore {
1948
+ private utilityService;
1949
+ constructor(utilityService: UtilityService);
1950
+ /** The records of the source; an empty list when it has none or is not kept in the browser. */
1951
+ read(source: DataSource | null | undefined): Promise<any[]>;
1952
+ /**
1953
+ * Stores the records as a plain JSON list, dates as local ISO text. False when the source is not
1954
+ * kept in the browser (a backend source is written by its own call).
1955
+ */
1956
+ write(source: DataSource | null | undefined, records: any[]): Promise<boolean>;
1957
+ /** Removes the record at index from the stored list. */
1958
+ remove(source: DataSource | null | undefined, index: number): Promise<boolean>;
1959
+ /** Empties the stored list. */
1960
+ clear(source: DataSource | null | undefined): Promise<boolean>;
1961
+ static ɵfac: i0.ɵɵFactoryDeclaration<RecordStore, never>;
1962
+ static ɵprov: i0.ɵɵInjectableDeclaration<RecordStore>;
1963
+ }
1964
+
1965
+ /** Values the placeholders of a call are taken from. */
1966
+ interface CallContext {
1967
+ userInfo?: any;
1968
+ record?: any;
1969
+ records?: any[];
1970
+ filter?: any;
1971
+ env?: any;
1972
+ /** Further values a button hands in (purchase: form, cart, response); one more key is {{item.x}} inside $each. */
1973
+ [key: string]: any;
1974
+ }
1975
+ /** A call ready to send. */
1976
+ interface BackendCall {
1977
+ url: string;
1978
+ method: string;
1979
+ params: Record<string, string>;
1980
+ body: any;
1981
+ }
1982
+ /**
1983
+ * A template with its placeholders filled in. A string that is only one placeholder gives the value
1984
+ * itself (a list stays a list); inside a longer text a missing value becomes empty. Objects and
1985
+ * lists are filled in deeply.
1986
+ */
1987
+ declare function resolveTemplate(template: any, context: CallContext): any;
1988
+ /** True when the option describes a backend call (it has an address). */
1989
+ declare function hasBackendCall(option: any): boolean;
1990
+ /**
1991
+ * The call of an option: address, method, URL parameters and content with the placeholders filled in.
1992
+ * A relative address is put after env.apiUrl. Without an address there is no call (null).
1993
+ */
1994
+ declare function buildBackendCall(option: any, context: CallContext): BackendCall | null;
1995
+
1996
+ declare class BackendCallService {
1997
+ private readonly remoteLists;
1998
+ private readonly utilityService;
1999
+ private readonly oauthService;
2000
+ /** The signed-in user (claims + token): from the app, else the stored sign-in. */
2001
+ currentUser(): Promise<any>;
2002
+ /** The records after the option's named conversion; unknown names change nothing. */
2003
+ transform(option: any, records: any[]): any[];
2004
+ /** Sends the records to the option's backend; true on success. */
2005
+ saveData(option: any, records: any[], extra?: CallContext): Promise<any>;
2006
+ /** Loads from the option's backend with the given context (e.g. filter values). */
2007
+ loadData(option: any, extra?: CallContext): Promise<any>;
2008
+ /** Sends a call; the answer's data, an error from status 400 on. */
2009
+ send(call: BackendCall, option: any, userInfo: any): Promise<any>;
2010
+ static ɵfac: i0.ɵɵFactoryDeclaration<BackendCallService, never>;
2011
+ static ɵprov: i0.ɵɵInjectableDeclaration<BackendCallService>;
2012
+ }
2013
+
2014
+ declare const DEFAULT_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ssxxx";
2015
+ /** The date written by the pattern, in the device's local time. */
2016
+ declare function formatDate(date: Date, pattern?: string): string;
2017
+ /** How the app keeps a date in browser storage: local time without time zone. */
2018
+ declare const STORAGE_DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss";
2019
+ /**
2020
+ * A field's value as it goes into browser storage: a Date as local time without zone, a list (a
2021
+ * period) element by element - JSON wrote the dates of a list as UTC ("…T22:00:00.000Z", a day early).
2022
+ */
2023
+ declare function storageValue(value: any): any;
2024
+ /**
2025
+ * A stored date text as the wall time it names: Z or an offset (+02:00, what the app itself sends) is
2026
+ * dropped, so 2026-10-18T08:00:00+02:00 reads 08:00 like 2026-10-18T08:00:00 from P5W1.
2027
+ */
2028
+ declare function parseStorageDate(value: string): Date;
2029
+ /**
2030
+ * A stored value back as the field's control expects it, by the field's type: date, time and date and
2031
+ * time as a Date, a period as a list of Dates; anything else unchanged.
2032
+ */
2033
+ declare function fromStorageValue(value: any, type: string | undefined): any;
2034
+ /** Every Date inside a value (object, list) written by the pattern; everything else stays. */
2035
+ declare function formatDates(value: any, pattern?: string): any;
2036
+
1673
2037
  interface NumberShape {
1674
2038
  style: 'decimal' | 'currency' | 'percent' | 'unit';
1675
2039
  currency: string | null;
@@ -2005,6 +2369,10 @@ declare class ControlComponent implements OnChanges {
2005
2369
  container: 'dialog' | 'form';
2006
2370
  /** the button's type: 'submit' lets Enter in a field press it (form) */
2007
2371
  buttonType: 'button' | 'submit';
2372
+ /** the button is grey and sends nothing (needsLogin / needsValid of its layout); a click is lockedClick */
2373
+ locked: boolean;
2374
+ /** the hints under a locked button: one per reason (sign-in, fields), the fields hint with the missing fields */
2375
+ lockHints: LockHint[];
2008
2376
  /** 'edit': the field to type in (dialog, form); 'display': a record's value shown (card, grid) */
2009
2377
  mode: 'edit' | 'display';
2010
2378
  /** display mode: the record whose value is shown (record[name]) */
@@ -2035,6 +2403,10 @@ declare class ControlComponent implements OnChanges {
2035
2403
  mediaClicked: EventEmitter<any>;
2036
2404
  /** a button was clicked; its option (innerAction, action ...) */
2037
2405
  buttonClick: EventEmitter<any>;
2406
+ /** a click on a locked button: nothing is sent, the container shows the missing fields */
2407
+ lockedClick: EventEmitter<void>;
2408
+ /** a click on the hint of a button locked for a missing sign-in */
2409
+ signIn: EventEmitter<void>;
2038
2410
  kind: ControlKind;
2039
2411
  property: any;
2040
2412
  /** the property's object ({ fromDate: {...}, toDate: {...} }), for amounts with a currency field */
@@ -2044,6 +2416,8 @@ declare class ControlComponent implements OnChanges {
2044
2416
  textboxInfo: any;
2045
2417
  readonly vlAction: typeof testAction;
2046
2418
  readonly vlWrites: typeof testWrites;
2419
+ /** the field with the rules of its data object - what the building blocks get */
2420
+ ruleField: any;
2047
2421
  /** the property's name in a record ("fromDate") */
2048
2422
  name: string;
2049
2423
  ngOnChanges(): void;
@@ -2073,6 +2447,10 @@ declare class ControlComponent implements OnChanges {
2073
2447
  get messages(): any;
2074
2448
  /** label.value, the layout's label.caption, then the data object's caption - translated */
2075
2449
  get label(): string;
2450
+ /** a required field (option.required true) shows a red * after its label */
2451
+ get required(): boolean;
2452
+ /** a button click: a locked one sends nothing (no submit either) and asks the container to show what is missing */
2453
+ onButton(event: Event): void;
2076
2454
  /** a check box carries its own caption; every other control gets the label above or beside it */
2077
2455
  get showLabel(): boolean;
2078
2456
  /** text flag (string "Y"/"N" ...) or Boolean, for check box, switch and radio buttons */
@@ -2098,8 +2476,76 @@ declare class ControlComponent implements OnChanges {
2098
2476
  style: Record<string, any>;
2099
2477
  };
2100
2478
  static ɵfac: i0.ɵɵFactoryDeclaration<ControlComponent, never>;
2101
- 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>;
2479
+ 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; }; "locked": { "alias": "locked"; "required": false; }; "lockHints": { "alias": "lockHints"; "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"; "lockedClick": "lockedClick"; "signIn": "signIn"; }, never, never, true, never>;
2480
+ }
2481
+
2482
+ /**
2483
+ * The layout's start values into the data objects' properties ({ object: { name: property } }).
2484
+ * asValue: a plain start value fills an empty field (form, list); otherwise it is the property's default,
2485
+ * used for a new record only (dialog). A placeholder always becomes the value.
2486
+ */
2487
+ declare function applyLayoutDefaults(schemas: Record<string, any>, layout: any, asValue: boolean): void;
2488
+
2489
+ /** How many of the form's 12 columns a section takes: gridSpan 1..12, else the whole width. */
2490
+ declare function sectionSpan(section: any): number;
2491
+ /** A section's width on a tablet (768-1023px): tabletGridSpan 1..12, else its desktop width. */
2492
+ declare function sectionTabletSpan(section: any): number;
2493
+ /** A section that stays in view while the page scrolls (sticky true). */
2494
+ declare function sectionSticky(section: any): boolean;
2495
+ /**
2496
+ * Whether a section is shown: without visibleWhen always; with it only while the field (scope reference
2497
+ * "#/<object>/properties/<name>") holds the value. A true/false condition compares on/off, so a check box
2498
+ * kept as "Y"/"N" counts too; an empty field equals false.
2499
+ */
2500
+ declare function sectionVisible(section: any, propertySchema: any): boolean;
2501
+
2502
+ /** The terms part of the app settings as readAppSettings gives it. */
2503
+ interface TermsSettings {
2504
+ enabled: boolean;
2505
+ confirmOnStart: boolean;
2506
+ documents: Record<string, {
2507
+ kind: string;
2508
+ value: string;
2509
+ } | undefined>;
2510
+ version: string;
2511
+ backend: {
2512
+ enabled: boolean;
2513
+ statusUrl: string;
2514
+ acceptUrl: string;
2515
+ };
2516
+ }
2517
+ /** What the browser keeps: the state accepted and when. */
2518
+ interface TermsAcceptance {
2519
+ stamp: string;
2520
+ acceptedAt: string;
2102
2521
  }
2522
+ /** The terms must be confirmed before anything else: switched on and something to read. */
2523
+ declare function termsToConfirm(terms: TermsSettings | null | undefined): boolean;
2524
+ /**
2525
+ * The state of the terms: the version of the layout, else a short checksum of the documents - a changed text is
2526
+ * a new state without anybody counting versions.
2527
+ */
2528
+ declare function termsStamp(terms: TermsSettings): string;
2529
+ /** The browser's key for an app's acceptance. */
2530
+ declare function termsStorageKey(project: string): string;
2531
+ /** Whether the browser's acceptance covers this state. */
2532
+ declare function acceptedLocally(stored: TermsAcceptance | null | undefined, stamp: string): boolean;
2533
+ /** An address with {{user}}, {{version}} and {{env.x}} filled in (URL-encoded); a relative one goes after apiUrl. */
2534
+ declare function termsUrl(url: string, values: {
2535
+ user: string;
2536
+ version: string;
2537
+ env?: Record<string, any>;
2538
+ }): string;
2539
+ /**
2540
+ * The backend's answer to the status question: { version, accepted }. The backend's version is the state that
2541
+ * counts then; accepted false (or a newer version than the browser knows) means: ask again.
2542
+ */
2543
+ declare function backendTermsState(answer: any, stamp: string): {
2544
+ version: string;
2545
+ accepted: boolean;
2546
+ };
2547
+ /** The user the acceptance belongs to: e-mail, user name or subject of the sign-in. */
2548
+ declare function termsUser(userInfo: any): string;
2103
2549
 
2104
- 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 };
2105
- export type { ControlKind, CustomKeyboardTarget, CustomKeyboardType, FieldKind, FieldModel, FieldRules, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, RequestTimeoutMessages, StagedReadOptions };
2550
+ 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, TermsDialog, TextareaControl, Textbox, UtilityService, ViewToolkitModule, VisiblePipe, acceptedLocally, applyLayoutDefaults, backendTermsState, backendUrl, buildBackendCall, buttonLocked, controlKind, controlProperty, currencyDigits, currentDateLanguage, dateDigitCount, dateInputPattern, displayDateValue, displayNumber, fieldInnerLayoutStyle, fieldModel, fieldRules, fixedTimeText, formatDate, formatDates, fromStorageValue, hasBackendCall, inputFormatHint, isBrowserSource, isNativeMobile, isNativePhone, isSignedIn, languageDatePattern, layoutPlaceholder, lockHint, lockReason, lockReasons, mediaKind, normalizeCustomKeyboardType, numberShape, numberStep, numberSuffix, parseRecords, parseStorageDate, primeDatePattern, recordOf, resolveCustomKeyboardType, resolvePlaceholder, resolveTemplate, ruleMessage, sectionSpan, sectionSticky, sectionTabletSpan, sectionVisible, setDateLanguage, setInputHintLanguage, setToolkitKeyboardOnWeb, shapeDateDigits, shapeTimeText, sideDockWidth, splitReference, stagedRead, stagedRequest, storageKind, storageValue, storedToTyped, styleParts, termsStamp, termsStorageKey, termsToConfirm, termsUrl, termsUser, testAction, testFieldKey, testWrites, timeHourFormat, toggleMeridiem, toolkitKeyboardActive, typedToStored, usesTwelveHours, visibleFields, whenOnline };
2551
+ export type { BackendCall, CallContext, ControlKind, CustomKeyboardTarget, CustomKeyboardType, DataSource, FieldKind, FieldModel, FieldRules, LockHint, LockReason, MediaKind, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, NumberShape, OidcProvider, OidcRefresh, OidcTokens, PageDataDeps, RequestTimeoutMessages, StagedReadOptions, StorageKind, TermsAcceptance, TermsDialogDocument, TermsSettings };