@yomotech/view-toolkit 1.0.10 → 1.0.13

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yomotech/view-toolkit",
3
- "version": "1.0.10",
3
+ "version": "1.0.13",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": "^21.0.0",
6
6
  "@angular/common": "^21.0.0",
@@ -26,7 +26,7 @@ declare class RequestService {
26
26
  getInfo(url: string): rxjs.Observable<Object>;
27
27
  dynamicCall(method: string | undefined, body: any | undefined, url: string, passToken?: boolean, selectedProject?: string, userInfo?: any): rxjs.Observable<Object>;
28
28
  createAuthorizationHeader(userInfo: any, tokenExist?: boolean): HttpHeaders;
29
- getLoginUser(token: any): rxjs.Observable<Object>;
29
+ getLoginUser(token: any, issuer: string): rxjs.Observable<Object>;
30
30
  saveDb(token: any, userInfo: any, order?: any): void;
31
31
  getSaveOrder(token: string, userInfo: any, fromDate: string, toDate: string): rxjs.Observable<Object>;
32
32
  static ɵfac: i0.ɵɵFactoryDeclaration<RequestService, never>;
@@ -112,11 +112,38 @@ declare class Couchdb {
112
112
  private getImageMimeType;
113
113
  private fromBase64;
114
114
  private isJsonFile;
115
+ /**
116
+ * Decides whether a stored file may be decoded as UTF-8 text.
117
+ *
118
+ * Only what is recognised here is decoded; everything else is handed back as
119
+ * binary. Note that SVG counts as binary on purpose even though it is text:
120
+ * callers such as the menu icons expect the media object with a `src`, and
121
+ * classifying it as text would change the shape they receive.
122
+ */
123
+ private isTextFile;
115
124
  private getDocumentUrl;
116
125
  private getDbUrl;
117
126
  private getReadHeaders;
118
127
  private buildTenantHeaders;
119
128
  getImageSrcFromCouchDb(couchDbName: string, filePath: string): Promise<string>;
129
+ /**
130
+ * Returns a URL that a <video>, <audio> or <img> element can load directly.
131
+ *
132
+ * Unlike getImageSrcFromCouchDb above, this never reads the file. It asks
133
+ * jwt-auth for a short-lived signed URL and hands that back, so the browser
134
+ * fetches the attachment itself - with Range requests, so a video starts on
135
+ * the first chunk and a seek costs one request instead of the whole file.
136
+ *
137
+ * The reason a signed URL is needed at all: a media element issues its own
138
+ * HTTP requests, for the initial load and again for every seek, and those
139
+ * requests carry none of the tenant headers buildTenantHeaders adds here.
140
+ * The token in the query string is the only credential the element can pass.
141
+ *
142
+ * The path comes back from the endpoint and is used as given. The signature
143
+ * covers the raw, still-encoded path, so rebuilding it here with a different
144
+ * encoding would produce a URL that fails with a bare 403.
145
+ */
146
+ getMediaUrlFromCouchDb(couchDbName: string, filePath: string, attachmentName?: string): Promise<string>;
120
147
  static ɵfac: i0.ɵɵFactoryDeclaration<Couchdb, never>;
121
148
  static ɵprov: i0.ɵɵInjectableDeclaration<Couchdb>;
122
149
  }
@@ -172,6 +199,8 @@ declare class CardComponent {
172
199
  private notificationService;
173
200
  private oauthService;
174
201
  private requestService;
202
+ /** Keep existing checkbox data objects usable; new objects use boolean. */
203
+ renderFieldType(type: string | undefined): string | undefined;
175
204
  itemInfo: any;
176
205
  currentPage: number;
177
206
  pageSize: number;
@@ -263,6 +292,8 @@ declare class CardComponent {
263
292
  }
264
293
 
265
294
  declare class FormComponent implements OnInit, OnChanges, AfterViewInit {
295
+ /** Keep existing checkbox data objects usable; new objects use boolean. */
296
+ renderFieldType(type: string | undefined): string | undefined;
266
297
  customEmailPattern: string;
267
298
  showPassword: boolean;
268
299
  formCopy: any;
@@ -319,6 +350,8 @@ declare class GridComponent implements AfterViewInit {
319
350
  private utilityService;
320
351
  private notificationService;
321
352
  private oktaAuthService;
353
+ /** New data objects use boolean; older projects may still use checkbox. */
354
+ isLegacyCheckboxFieldType(type: string | undefined): boolean;
322
355
  isLogined: boolean;
323
356
  tableitemInfoCopy: any;
324
357
  errorMessages: any;
@@ -502,6 +535,8 @@ declare class ModelComponent implements OnChanges {
502
535
  private readonly dialogConfig;
503
536
  private utilityService;
504
537
  private readonly customKeyboardService;
538
+ /** Keep existing checkbox data objects usable; new objects use boolean. */
539
+ renderFieldType(type: string | undefined): string | undefined;
505
540
  matchData: any[];
506
541
  date2: Date | undefined;
507
542
  private pickerOpening;