@yomotech/view-toolkit 1.0.42 → 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.
- package/fesm2022/yomotech-view-toolkit-catalog.mjs +659 -1
- package/fesm2022/yomotech-view-toolkit-catalog.mjs.map +1 -1
- package/fesm2022/yomotech-view-toolkit.mjs +921 -93
- package/fesm2022/yomotech-view-toolkit.mjs.map +1 -1
- package/package.json +1 -1
- package/types/yomotech-view-toolkit-catalog.d.ts +205 -2
- package/types/yomotech-view-toolkit.d.ts +247 -7
|
@@ -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';
|
|
@@ -118,6 +118,9 @@ declare class UtilityService {
|
|
|
118
118
|
private platform;
|
|
119
119
|
private requestService;
|
|
120
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>;
|
|
121
124
|
constructor(platform: Platform, requestService: RequestService);
|
|
122
125
|
getScope(scope: any): string;
|
|
123
126
|
getProperty(scope: any, itemInfo?: any): {
|
|
@@ -144,7 +147,20 @@ declare class UtilityService {
|
|
|
144
147
|
getTotalQuantity(tableitemInfo: any): number;
|
|
145
148
|
replacePaginationParams(url: string, currentPage: number, pageSize: number): string;
|
|
146
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
|
+
*/
|
|
147
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;
|
|
148
164
|
setTableData(data: any, option: any | undefined, tableitemInfo: any, projectSeleted: any): any;
|
|
149
165
|
setOktaWebCredential(environment: any, projectName: any): {
|
|
150
166
|
logo: string;
|
|
@@ -171,6 +187,20 @@ declare class UtilityService {
|
|
|
171
187
|
/** OAuth scope as the space separated string the OAuth2 plugin expects. */
|
|
172
188
|
private oauthScope;
|
|
173
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
|
+
}>;
|
|
174
204
|
formData(form: any, environment: any, cartInfo: any): Promise<void>;
|
|
175
205
|
normalizeDatesForStorage(obj: any): any;
|
|
176
206
|
isDateLike(value: any): boolean;
|
|
@@ -723,6 +753,41 @@ declare class CardComponent {
|
|
|
723
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>;
|
|
724
754
|
}
|
|
725
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
|
+
|
|
726
791
|
declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestroy {
|
|
727
792
|
/** Marks for the app's test runner (#166): field key and button action. */
|
|
728
793
|
readonly vlFieldKey: typeof testFieldKey;
|
|
@@ -747,6 +812,7 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
|
|
|
747
812
|
/** Date and time picker behaviour shared by all containers. */
|
|
748
813
|
readonly picker: DateTimePickerService;
|
|
749
814
|
private readonly host;
|
|
815
|
+
private readonly utility;
|
|
750
816
|
ngOnDestroy(): void;
|
|
751
817
|
customEmailPattern: string;
|
|
752
818
|
showPassword: boolean;
|
|
@@ -755,8 +821,12 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
|
|
|
755
821
|
creditCardError: any;
|
|
756
822
|
form: any;
|
|
757
823
|
selectedLanguageInfo: any;
|
|
824
|
+
/** the signed-in user, for needsLogin on a button */
|
|
825
|
+
userInfo: any;
|
|
758
826
|
formButtonClick: EventEmitter<any>;
|
|
759
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>;
|
|
760
830
|
ngOnInit(): void;
|
|
761
831
|
ngOnChanges(changes: SimpleChanges): void;
|
|
762
832
|
ngAfterViewInit(): void;
|
|
@@ -767,10 +837,43 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
|
|
|
767
837
|
classes: string;
|
|
768
838
|
style: any;
|
|
769
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;
|
|
770
853
|
getSectionBodyStyle(formSection: any): any;
|
|
771
854
|
getFieldWrapperStyle(formField: any): any;
|
|
772
855
|
getScope(scope: any): string;
|
|
773
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;
|
|
774
877
|
invokeFormBtnClick(option: any, propertySchema: any): void;
|
|
775
878
|
setformData(): void;
|
|
776
879
|
setErroMessage(formField: any, errorMessages: any, field: any): string;
|
|
@@ -783,7 +886,7 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
|
|
|
783
886
|
saveTried: boolean;
|
|
784
887
|
showError(control: any): boolean;
|
|
785
888
|
static ɵfac: i0.ɵɵFactoryDeclaration<FormComponent, never>;
|
|
786
|
-
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>;
|
|
787
890
|
}
|
|
788
891
|
|
|
789
892
|
interface GridColumnFilterState {
|
|
@@ -974,6 +1077,7 @@ declare class HeaderMenuComponent implements AfterViewInit {
|
|
|
974
1077
|
buttonClick: EventEmitter<any>;
|
|
975
1078
|
showTableContent: EventEmitter<any>;
|
|
976
1079
|
searchItems: EventEmitter<any>;
|
|
1080
|
+
private readonly cdr;
|
|
977
1081
|
constructor(oktaAuthService: OktaAuthStateService, requestService: RequestService, utilityService: UtilityService, couchdbService: Couchdb, platform: Platform);
|
|
978
1082
|
ngOnChanges(changes: SimpleChanges): void;
|
|
979
1083
|
ngAfterViewInit(): void;
|
|
@@ -1072,6 +1176,15 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
1072
1176
|
applyDurationRule(rule: any, formField: any): void;
|
|
1073
1177
|
invokeSetformData(): void;
|
|
1074
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;
|
|
1075
1188
|
checkValidty(form: NgForm): boolean;
|
|
1076
1189
|
onCancel(): void;
|
|
1077
1190
|
/**
|
|
@@ -1116,6 +1229,32 @@ declare class PaginationComponent implements OnInit {
|
|
|
1116
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>;
|
|
1117
1230
|
}
|
|
1118
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
|
+
|
|
1119
1258
|
/** What a project's login configuration has to say about its identity provider. */
|
|
1120
1259
|
interface OidcProvider {
|
|
1121
1260
|
/** e.g. https://keycloak-poc.wilken.de/realms/p5, https://integrator-1772139.okta.com/oauth2/default */
|
|
@@ -1225,7 +1364,7 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1225
1364
|
settingMenu: any;
|
|
1226
1365
|
setLanguage: boolean;
|
|
1227
1366
|
/** Translations of the last language change, for menu items that arrive after it. */
|
|
1228
|
-
|
|
1367
|
+
lastMenuTranslations: Record<string, string> | null;
|
|
1229
1368
|
tenantKey: string;
|
|
1230
1369
|
scrollPagination: any;
|
|
1231
1370
|
private oktaAuthStateSubscription?;
|
|
@@ -1242,6 +1381,12 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1242
1381
|
appVersionInfo: any;
|
|
1243
1382
|
/** Languages to start in, best first (language codes "de", "en" ...); the first the project has wins. */
|
|
1244
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;
|
|
1245
1390
|
/** Set once the user picks a language in the menu - the start language then no longer applies. */
|
|
1246
1391
|
private languageChosenByUser;
|
|
1247
1392
|
languageChange: EventEmitter<any>;
|
|
@@ -1281,6 +1426,10 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1281
1426
|
constructor(i18n: NzI18nService, mobileKeycloakService: MobileKeycloakService, couchdbService: Couchdb, oauthService: OAuthService, platform: Platform, requestService: RequestService, utilityService: UtilityService, dialogService: DialogService, notificationService: NotificationService, injector: Injector);
|
|
1282
1427
|
ngOnInit(): Promise<void>;
|
|
1283
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;
|
|
1284
1433
|
getPaginationType(): Promise<void>;
|
|
1285
1434
|
ngAfterViewInit(): Promise<void>;
|
|
1286
1435
|
/**
|
|
@@ -1321,12 +1470,19 @@ declare class SideMenuComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
|
1321
1470
|
openLogsTable(): void;
|
|
1322
1471
|
deleteMenuItem(subChild: any, index: number, event: Event): void;
|
|
1323
1472
|
navigateToProject(project: any): 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;
|
|
1324
1480
|
/** Loads a language of the project; false when the project has no such language file. */
|
|
1325
1481
|
changeLanguage(lang: string): Promise<boolean>;
|
|
1326
1482
|
private applyMenuTranslations;
|
|
1327
1483
|
private applySettingTranslations;
|
|
1328
1484
|
static ɵfac: i0.ɵɵFactoryDeclaration<SideMenuComponent, 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>;
|
|
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>;
|
|
1330
1486
|
}
|
|
1331
1487
|
|
|
1332
1488
|
declare class Autocomplete implements OnChanges {
|
|
@@ -1813,6 +1969,8 @@ interface CallContext {
|
|
|
1813
1969
|
records?: any[];
|
|
1814
1970
|
filter?: any;
|
|
1815
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;
|
|
1816
1974
|
}
|
|
1817
1975
|
/** A call ready to send. */
|
|
1818
1976
|
interface BackendCall {
|
|
@@ -2211,6 +2369,10 @@ declare class ControlComponent implements OnChanges {
|
|
|
2211
2369
|
container: 'dialog' | 'form';
|
|
2212
2370
|
/** the button's type: 'submit' lets Enter in a field press it (form) */
|
|
2213
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[];
|
|
2214
2376
|
/** 'edit': the field to type in (dialog, form); 'display': a record's value shown (card, grid) */
|
|
2215
2377
|
mode: 'edit' | 'display';
|
|
2216
2378
|
/** display mode: the record whose value is shown (record[name]) */
|
|
@@ -2241,6 +2403,10 @@ declare class ControlComponent implements OnChanges {
|
|
|
2241
2403
|
mediaClicked: EventEmitter<any>;
|
|
2242
2404
|
/** a button was clicked; its option (innerAction, action ...) */
|
|
2243
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>;
|
|
2244
2410
|
kind: ControlKind;
|
|
2245
2411
|
property: any;
|
|
2246
2412
|
/** the property's object ({ fromDate: {...}, toDate: {...} }), for amounts with a currency field */
|
|
@@ -2250,6 +2416,8 @@ declare class ControlComponent implements OnChanges {
|
|
|
2250
2416
|
textboxInfo: any;
|
|
2251
2417
|
readonly vlAction: typeof testAction;
|
|
2252
2418
|
readonly vlWrites: typeof testWrites;
|
|
2419
|
+
/** the field with the rules of its data object - what the building blocks get */
|
|
2420
|
+
ruleField: any;
|
|
2253
2421
|
/** the property's name in a record ("fromDate") */
|
|
2254
2422
|
name: string;
|
|
2255
2423
|
ngOnChanges(): void;
|
|
@@ -2279,6 +2447,10 @@ declare class ControlComponent implements OnChanges {
|
|
|
2279
2447
|
get messages(): any;
|
|
2280
2448
|
/** label.value, the layout's label.caption, then the data object's caption - translated */
|
|
2281
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;
|
|
2282
2454
|
/** a check box carries its own caption; every other control gets the label above or beside it */
|
|
2283
2455
|
get showLabel(): boolean;
|
|
2284
2456
|
/** text flag (string "Y"/"N" ...) or Boolean, for check box, switch and radio buttons */
|
|
@@ -2304,8 +2476,76 @@ declare class ControlComponent implements OnChanges {
|
|
|
2304
2476
|
style: Record<string, any>;
|
|
2305
2477
|
};
|
|
2306
2478
|
static ɵfac: i0.ɵɵFactoryDeclaration<ControlComponent, never>;
|
|
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>;
|
|
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>;
|
|
2308
2480
|
}
|
|
2309
2481
|
|
|
2310
|
-
|
|
2311
|
-
|
|
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;
|
|
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;
|
|
2549
|
+
|
|
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 };
|