@yomotech/view-toolkit 1.0.30 → 1.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -73,7 +73,7 @@ declare class UtilityService {
|
|
|
73
73
|
authParams: {
|
|
74
74
|
pkce: boolean;
|
|
75
75
|
issuer: any;
|
|
76
|
-
scopes:
|
|
76
|
+
scopes: string[] | undefined;
|
|
77
77
|
};
|
|
78
78
|
};
|
|
79
79
|
setOktaMobileCredential(environment: any): {
|
|
@@ -85,6 +85,8 @@ declare class UtilityService {
|
|
|
85
85
|
responseType: any;
|
|
86
86
|
pkceEnabled: any;
|
|
87
87
|
};
|
|
88
|
+
/** OAuth scopes as the list okta-auth-js expects; undefined lets it use its default. */
|
|
89
|
+
private oauthScopeList;
|
|
88
90
|
/** OAuth scope as the space separated string the OAuth2 plugin expects. */
|
|
89
91
|
private oauthScope;
|
|
90
92
|
setupStripePaymentForm(environment: any, form: any, onCardChange: (message: string) => void): Promise<void>;
|
|
@@ -131,8 +133,37 @@ declare class Couchdb {
|
|
|
131
133
|
* classifying it as text would change the shape they receive.
|
|
132
134
|
*/
|
|
133
135
|
private isTextFile;
|
|
136
|
+
/** Ids of the files under a folder of the project, e.g. listFiles(db, 'ssl/mobile/'). Empty on any error. */
|
|
137
|
+
listFiles(dbName: string, prefix: string): Promise<string[]>;
|
|
134
138
|
private getDocumentUrl;
|
|
135
139
|
private getDbUrl;
|
|
140
|
+
private isAttachmentMedia;
|
|
141
|
+
/** Signed links by "db/doc/name", reused until a minute before they run out. */
|
|
142
|
+
private mediaLinks;
|
|
143
|
+
/**
|
|
144
|
+
* A signed link for one media attachment (#145). A <video>/<audio src> sends no tenant header,
|
|
145
|
+
* so POST /media-token is asked with it instead - the same header every read already carries,
|
|
146
|
+
* nothing else is needed - and answers the path it signed plus a token for that one file
|
|
147
|
+
* (8 hours). The player then reads couchdb.yomotech.de<path>?token=... with Range itself.
|
|
148
|
+
*/
|
|
149
|
+
getMediaStreamUrl(dbName: string, docId: string, name: string): Promise<string>;
|
|
150
|
+
/**
|
|
151
|
+
* What a media field holds, made playable: a URL (http, https, data, blob) stays as it is; a
|
|
152
|
+
* file name ("clip.mp4", also "Media/clip.mp4") is read from Media/ of the selected project -
|
|
153
|
+
* a signed link for an attachment, a data URL for an older Base64 document. '' when unknown.
|
|
154
|
+
*/
|
|
155
|
+
resolveMediaSource(source: string): Promise<string>;
|
|
156
|
+
/** Media prepared at the start, by "db/name": an object URL (loaded whole) or a signed link. */
|
|
157
|
+
private preloadedMedia;
|
|
158
|
+
/**
|
|
159
|
+
* Prepares the project's video and audio at the start of the app, in the background (#145): only
|
|
160
|
+
* the files in environments/media.json - the media the pages use, written by the Designer on
|
|
161
|
+
* export; without that list nothing is preloaded. Per file the signed link; a file up to maxBytes
|
|
162
|
+
* (20 MB) is loaded whole and kept as an object URL, so Play starts at once and without network. A
|
|
163
|
+
* larger one keeps only the link. A failure is no error for the app: resolveMediaSource then asks
|
|
164
|
+
* for the link as before.
|
|
165
|
+
*/
|
|
166
|
+
preloadProjectMedia(dbName: string, maxBytes?: number): Promise<void>;
|
|
136
167
|
private getReadHeaders;
|
|
137
168
|
private buildTenantHeaders;
|
|
138
169
|
getImageSrcFromCouchDb(couchDbName: string, filePath: string): Promise<string>;
|
|
@@ -321,9 +352,9 @@ declare class CustomKeyboardService {
|
|
|
321
352
|
declare class DateTimePickerService {
|
|
322
353
|
private readonly keyboard;
|
|
323
354
|
/** On the devices the date picker docks at the bottom like a keyboard; in a browser it drops down. */
|
|
324
|
-
|
|
355
|
+
get isNativeMobile(): boolean;
|
|
325
356
|
/** panelStyleClass of a date picker. */
|
|
326
|
-
|
|
357
|
+
get datePanelClass(): string;
|
|
327
358
|
/** panelStyleClass of a time picker: compact and attached to its field everywhere. */
|
|
328
359
|
readonly timePanelClass = "model-datepicker-panel model-timepicker-panel";
|
|
329
360
|
/**
|
|
@@ -331,7 +362,7 @@ declare class DateTimePickerService {
|
|
|
331
362
|
* wrapper around the panel, and a transformed wrapper becomes the reference of the panel's
|
|
332
363
|
* position: fixed - the docked calendar flew up next to its field while closing.
|
|
333
364
|
*/
|
|
334
|
-
|
|
365
|
+
get dockedMotion(): {
|
|
335
366
|
disabled: boolean;
|
|
336
367
|
} | undefined;
|
|
337
368
|
private activePicker;
|
|
@@ -527,6 +558,15 @@ declare class FormComponent implements OnInit, OnChanges, AfterViewInit, OnDestr
|
|
|
527
558
|
remoteSuggestions: Record<string, any[]>;
|
|
528
559
|
/** Loads every backend list the given layout nodes describe; dropdown/combobox get their items. */
|
|
529
560
|
loadRemoteLists(nodes: any[], propertySchema: any): Promise<void>;
|
|
561
|
+
/** Backend lists still on the way, by field reference. */
|
|
562
|
+
remoteLoading: Record<string, boolean>;
|
|
563
|
+
private lastRemoteQuery;
|
|
564
|
+
/**
|
|
565
|
+
* What an autocomplete shows when it has no entries: "loading" while its list is on the way,
|
|
566
|
+
* "no results" after - in the project's language (autocompleteLoading, autocompleteNoResults),
|
|
567
|
+
* English when the project has no text for it.
|
|
568
|
+
*/
|
|
569
|
+
autocompleteEmptyText(node: any): string;
|
|
530
570
|
/** (completeMethod) of an autocomplete with a backend list. */
|
|
531
571
|
completeRemote(event: any, node: any): void;
|
|
532
572
|
/** Date and time picker behaviour shared by all containers. */
|
|
@@ -801,7 +841,6 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
801
841
|
resetRule(rule: any, formField: any): void;
|
|
802
842
|
isRuleTriggered(rule: any, formField: any): boolean;
|
|
803
843
|
applyDurationRule(rule: any, formField: any): void;
|
|
804
|
-
private ruleClock;
|
|
805
844
|
invokeSetformData(): void;
|
|
806
845
|
invokeFormBtnClick(option: any, propertySchema: any, form: NgForm): void;
|
|
807
846
|
checkValidty(form: NgForm): boolean;
|
|
@@ -810,11 +849,6 @@ declare class ModelComponent implements OnChanges, OnDestroy {
|
|
|
810
849
|
getMediaSource(field: any): string;
|
|
811
850
|
getMediaLabel(field: any): string;
|
|
812
851
|
getMediaKind(field: any): 'image' | 'video' | 'audio' | 'pdf' | 'file';
|
|
813
|
-
sharedErrorsVisible: boolean;
|
|
814
|
-
sharedProperty(field: any): any;
|
|
815
|
-
usesSharedField(field: any): boolean;
|
|
816
|
-
private initializeSharedDefaults;
|
|
817
|
-
onSharedFieldChange(field: any, value: any): void;
|
|
818
852
|
static ɵfac: i0.ɵɵFactoryDeclaration<ModelComponent, never>;
|
|
819
853
|
static ɵcmp: i0.ɵɵComponentDeclaration<ModelComponent, "vl-model", never, { "errorMessages": { "alias": "errorMessages"; "required": false; }; "modalItemInfo": { "alias": "modalItemInfo"; "required": false; }; "selectedLanguageInfo": { "alias": "selectedLanguageInfo"; "required": false; }; "userInfo": { "alias": "userInfo"; "required": false; }; "setFormDataHandler": { "alias": "setFormDataHandler"; "required": false; }; }, {}, never, never, true, never>;
|
|
820
854
|
}
|
|
@@ -1228,6 +1262,11 @@ declare class CustomKeyboardDirective implements OnDestroy {
|
|
|
1228
1262
|
static ɵdir: i0.ɵɵDirectiveDeclaration<CustomKeyboardDirective, "[vlCustomKeyboard]", never, { "keyboardType": { "alias": "vlCustomKeyboard"; "required": false; }; }, {}, never, never, true, never>;
|
|
1229
1263
|
}
|
|
1230
1264
|
|
|
1265
|
+
/** Turns the toolkit keyboards on or off in a browser (the Designer's preview, Mobile/Tablet). */
|
|
1266
|
+
declare function setToolkitKeyboardOnWeb(on: boolean): void;
|
|
1267
|
+
/** Whether fields get the toolkit keyboards: on the devices always, in a browser when switched on. */
|
|
1268
|
+
declare function toolkitKeyboardActive(): boolean;
|
|
1269
|
+
|
|
1231
1270
|
/**
|
|
1232
1271
|
* The placeholder of the field `reference` in `propertySchema`, translated when the selected
|
|
1233
1272
|
* language has an entry for it; empty when the project defines none.
|
|
@@ -1240,6 +1279,17 @@ declare class PlaceholderPipe implements PipeTransform {
|
|
|
1240
1279
|
static ɵpipe: i0.ɵɵPipeDeclaration<PlaceholderPipe, "vlPlaceholder", true>;
|
|
1241
1280
|
}
|
|
1242
1281
|
|
|
1282
|
+
/** [src]="source | vlMedia | async" - the same Promise for the same source, so no request loop. */
|
|
1283
|
+
declare class MediaSourcePipe implements PipeTransform {
|
|
1284
|
+
private couchdb;
|
|
1285
|
+
/** Kept one hour: a signed link lasts eight, a page lives shorter. */
|
|
1286
|
+
private static readonly known;
|
|
1287
|
+
constructor(couchdb: Couchdb);
|
|
1288
|
+
transform(source: string | null | undefined): Promise<string>;
|
|
1289
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<MediaSourcePipe, never>;
|
|
1290
|
+
static ɵpipe: i0.ɵɵPipeDeclaration<MediaSourcePipe, "vlMedia", true>;
|
|
1291
|
+
}
|
|
1292
|
+
|
|
1243
1293
|
interface RequestTimeoutMessages {
|
|
1244
1294
|
requestSlow: string;
|
|
1245
1295
|
requestStillSlow: string;
|
|
@@ -1309,5 +1359,13 @@ declare class RemoteListService {
|
|
|
1309
1359
|
static ɵprov: i0.ɵɵInjectableDeclaration<RemoteListService>;
|
|
1310
1360
|
}
|
|
1311
1361
|
|
|
1312
|
-
|
|
1362
|
+
/** Prefix of the forwarding path on the app's own origin. */
|
|
1363
|
+
declare const BACKEND_PROXY_PREFIX = "/api/proxy";
|
|
1364
|
+
/**
|
|
1365
|
+
* The address to call for a backend URL: unchanged on the devices and for relative URLs; in the web
|
|
1366
|
+
* https://p5w1.wilken.de/p5ws/x?y=1 becomes <origin>/api/proxy/p5w1.wilken.de/p5ws/x?y=1.
|
|
1367
|
+
*/
|
|
1368
|
+
declare function backendUrl(url: string): string;
|
|
1369
|
+
|
|
1370
|
+
export { AppVersionResetService, BACKEND_PROXY_PREFIX, CardComponent, ConfigService, Couchdb, CustomKeyboardComponent, CustomKeyboardDirective, CustomKeyboardService, FormComponent, GridComponent, HeaderMenuComponent, LogsComponent, MediaSourcePipe, MobileKeycloakService, MobileOidcService, MobileOktaService, ModelComponent, NetworkLogService, NotificationService, PaginationComponent, PlaceholderPipe, REQUEST_STAGES, RemoteListService, RequestService, RequestTimeoutError, RequestTimeoutService, SIDE_DOCK_CLASS, SideMenuComponent, UtilityService, ViewToolkitModule, backendUrl, isNativeMobile, isNativePhone, normalizeCustomKeyboardType, resolveCustomKeyboardType, resolvePlaceholder, setToolkitKeyboardOnWeb, sideDockWidth, stagedRequest, toolkitKeyboardActive };
|
|
1313
1371
|
export type { CustomKeyboardTarget, CustomKeyboardType, MobileAuthTokens, MobileOktaRefresh, MobileOktaTokens, OidcProvider, OidcRefresh, OidcTokens, RequestTimeoutMessages };
|