inviton-powerduck 0.0.189 → 0.0.191

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.
@@ -35,6 +35,10 @@ export default class PowerduckState {
35
35
  }
36
36
  }
37
37
 
38
+ static getIsDebugMode(): boolean {
39
+ return null;
40
+ }
41
+
38
42
  static getAppPrefix(): string {
39
43
  return PowerduckState._prefix;
40
44
  }
@@ -11,6 +11,11 @@ export class UploadImageHelperConfig {
11
11
  * The base path for uploaded files.
12
12
  */
13
13
  static basePath: string = 'files';
14
+
15
+ /**
16
+ * Indicates whether to include credentials such as cookies in the upload request.
17
+ */
18
+ static includeCredentials: boolean = false;
14
19
  }
15
20
 
16
21
  export class UploadImageHelper {
@@ -41,6 +46,7 @@ export class UploadImageHelper {
41
46
  [AppHttpProvider.authorizationHeaderName]: `Bearer ${AppHttpProvider.bearerToken}`,
42
47
  'Accept-Language': PowerduckState.getCurrentLanguage(),
43
48
  },
49
+ credentials: UploadImageHelperConfig.includeCredentials ? PowerduckState.getIsDebugMode() ? 'include' : 'same-origin' : 'omit',
44
50
  });
45
51
 
46
52
  return (await response.json()) as ImageResponse;
@@ -1044,7 +1044,7 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
1044
1044
  }
1045
1045
 
1046
1046
  const modalContent = $(this.$el).closest('.modal-content');
1047
- if (modalContent.length > 0) {
1047
+ if (modalContent.length > 0 && !isInline) {
1048
1048
  s2Args.dropdownParent = modalContent;
1049
1049
  }
1050
1050
 
@@ -1303,14 +1303,16 @@ class DropdownListComponent extends TsxComponent<DropdownListArgs> implements Dr
1303
1303
  instance.dropdown._attachPositioningHandler = () => { };
1304
1304
  instance.results.ensureHighlightVisible = () => { };
1305
1305
 
1306
- const oldTrigger = instance.dropdown.$search.trigger;
1307
- instance.dropdown.$search.trigger = (ev: string) => {
1308
- if (ev == 'focus') {
1309
- return;
1310
- }
1306
+ const oldTrigger = instance.dropdown.$search?.trigger;
1307
+ if (oldTrigger != null) {
1308
+ instance.dropdown.$search.trigger = (ev: string) => {
1309
+ if (ev == 'focus') {
1310
+ return;
1311
+ }
1311
1312
 
1312
- oldTrigger.call(instance.dropdown.$search, ev);
1313
- };
1313
+ oldTrigger.call(instance.dropdown.$search, ev);
1314
+ };
1315
+ }
1314
1316
 
1315
1317
  setTimeout(() => {
1316
1318
  instance.open();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "inviton-powerduck",
3
3
  "type": "module",
4
- "version": "0.0.189",
4
+ "version": "0.0.191",
5
5
  "files": [
6
6
  "app/",
7
7
  "common/",