altair-static 7.2.3 → 7.2.4
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/build/dist/237.js +3 -3
- package/build/dist/342.js +3 -3
- package/build/dist/929.js +3 -3
- package/build/dist/981.js +3 -3
- package/build/dist/common.js +2 -2
- package/build/dist/iframe-sandbox/assets/_commonjsHelpers-Cpj98o6Y.js +1 -0
- package/build/dist/iframe-sandbox/assets/index-CpKv2VDw.js +1 -0
- package/build/dist/iframe-sandbox/assets/index-Cz4zGhbH.css +1 -0
- package/build/dist/iframe-sandbox/assets/index-DGxSkqdS.js +12 -0
- package/build/dist/iframe-sandbox/assets/index-yFZ5sogW.js +14 -0
- package/build/dist/iframe-sandbox/index.html +15 -0
- package/build/dist/iframe-sandbox/vite.svg +1 -0
- package/build/dist/main.js +4 -4
- package/build/index.d.ts +71 -58
- package/package.json +4 -4
- package/src/index.ts +1 -1
package/build/index.d.ts
CHANGED
|
@@ -114,6 +114,77 @@ export type RecursivePartial<T> = {
|
|
|
114
114
|
[P in keyof T]?: T[P] extends (infer U)[] ? RecursivePartial<U>[] : T[P] extends object ? RecursivePartial<T[P]> : T[P];
|
|
115
115
|
};
|
|
116
116
|
export type ICustomTheme = RecursivePartial<ITheme>;
|
|
117
|
+
export type ConfigEnvironment = "development" | "production" | "testing";
|
|
118
|
+
export interface UrlConfig {
|
|
119
|
+
api: string;
|
|
120
|
+
loginClient: string;
|
|
121
|
+
sandbox: string;
|
|
122
|
+
}
|
|
123
|
+
declare class AltairConfig {
|
|
124
|
+
private localSandboxUrl;
|
|
125
|
+
private useLocalSandboxUrl;
|
|
126
|
+
donation: {
|
|
127
|
+
url: string;
|
|
128
|
+
action_count_threshold: number;
|
|
129
|
+
};
|
|
130
|
+
ga: string;
|
|
131
|
+
add_query_depth_limit: number;
|
|
132
|
+
tab_size: number;
|
|
133
|
+
max_windows: number;
|
|
134
|
+
default_language: string;
|
|
135
|
+
languages: {
|
|
136
|
+
"en-US": string;
|
|
137
|
+
"fr-FR": string;
|
|
138
|
+
"es-ES": string;
|
|
139
|
+
"cs-CZ": string;
|
|
140
|
+
"de-DE": string;
|
|
141
|
+
"pt-BR": string;
|
|
142
|
+
"ru-RU": string;
|
|
143
|
+
"uk-UA": string;
|
|
144
|
+
"zh-CN": string;
|
|
145
|
+
"ja-JP": string;
|
|
146
|
+
"sr-SP": string;
|
|
147
|
+
"it-IT": string;
|
|
148
|
+
"pl-PL": string;
|
|
149
|
+
"ko-KR": string;
|
|
150
|
+
"ro-RO": string;
|
|
151
|
+
"vi-VN": string;
|
|
152
|
+
};
|
|
153
|
+
query_history_depth: number;
|
|
154
|
+
disableLineNumbers: boolean;
|
|
155
|
+
defaultTheme: string;
|
|
156
|
+
themes: string[];
|
|
157
|
+
isTranslateMode: any;
|
|
158
|
+
isWebApp: any;
|
|
159
|
+
initialData: {
|
|
160
|
+
url: string;
|
|
161
|
+
subscriptionsEndpoint: string;
|
|
162
|
+
subscriptionsProtocol: string;
|
|
163
|
+
query: string;
|
|
164
|
+
variables: string;
|
|
165
|
+
headers: IDictionary;
|
|
166
|
+
environments: IInitialEnvironments;
|
|
167
|
+
preRequestScript: string;
|
|
168
|
+
postRequestScript: string;
|
|
169
|
+
instanceStorageNamespace: string;
|
|
170
|
+
settings: Partial<SettingsState> | undefined;
|
|
171
|
+
persistedSettings: Partial<SettingsState> | undefined;
|
|
172
|
+
initialSubscriptionRequestHandlerId: RequestHandlerIds | undefined;
|
|
173
|
+
initialSubscriptionsPayload: IDictionary;
|
|
174
|
+
initialRequestHandlerId: RequestHandlerIds;
|
|
175
|
+
initialRequestHandlerAdditionalParams: Record<string, unknown>;
|
|
176
|
+
initialHttpMethod: "POST" | "GET" | "PUT" | "DELETE";
|
|
177
|
+
preserveState: boolean;
|
|
178
|
+
windows: AltairWindowOptions[];
|
|
179
|
+
disableAccount: boolean;
|
|
180
|
+
};
|
|
181
|
+
constructor({ endpointURL, subscriptionsEndpoint, subscriptionsProtocol, initialQuery, initialHeaders, initialEnvironments, initialVariables, initialPreRequestScript, initialPostRequestScript, instanceStorageNamespace, initialSettings, persistedSettings, initialRequestHandlerId, initialRequestHandlerAdditionalParams, initialSubscriptionRequestHandlerId, initialSubscriptionsPayload, initialHttpMethod, preserveState, initialWindows, disableAccount, }?: AltairConfigOptions);
|
|
182
|
+
private getPossibleLocalSandBoxUrl;
|
|
183
|
+
private getLocalSandBoxUrl;
|
|
184
|
+
getUrlConfig(environment?: ConfigEnvironment): UrlConfig;
|
|
185
|
+
getUrlConfigWithLocal(environment?: ConfigEnvironment): Promise<UrlConfig>;
|
|
186
|
+
getUrl(name: keyof UrlConfig, environment?: ConfigEnvironment): Promise<string>;
|
|
187
|
+
}
|
|
117
188
|
declare const config: AltairConfig;
|
|
118
189
|
export type SettingsLanguage = keyof typeof config.languages;
|
|
119
190
|
export interface SettingsState {
|
|
@@ -378,64 +449,6 @@ export interface AltairConfigOptions extends AltairWindowOptions {
|
|
|
378
449
|
*/
|
|
379
450
|
disableAccount?: boolean;
|
|
380
451
|
}
|
|
381
|
-
declare class AltairConfig {
|
|
382
|
-
donation: {
|
|
383
|
-
url: string;
|
|
384
|
-
action_count_threshold: number;
|
|
385
|
-
};
|
|
386
|
-
ga: string;
|
|
387
|
-
add_query_depth_limit: number;
|
|
388
|
-
tab_size: number;
|
|
389
|
-
max_windows: number;
|
|
390
|
-
default_language: string;
|
|
391
|
-
languages: {
|
|
392
|
-
"en-US": string;
|
|
393
|
-
"fr-FR": string;
|
|
394
|
-
"es-ES": string;
|
|
395
|
-
"cs-CZ": string;
|
|
396
|
-
"de-DE": string;
|
|
397
|
-
"pt-BR": string;
|
|
398
|
-
"ru-RU": string;
|
|
399
|
-
"uk-UA": string;
|
|
400
|
-
"zh-CN": string;
|
|
401
|
-
"ja-JP": string;
|
|
402
|
-
"sr-SP": string;
|
|
403
|
-
"it-IT": string;
|
|
404
|
-
"pl-PL": string;
|
|
405
|
-
"ko-KR": string;
|
|
406
|
-
"ro-RO": string;
|
|
407
|
-
"vi-VN": string;
|
|
408
|
-
};
|
|
409
|
-
query_history_depth: number;
|
|
410
|
-
disableLineNumbers: boolean;
|
|
411
|
-
defaultTheme: string;
|
|
412
|
-
themes: string[];
|
|
413
|
-
isTranslateMode: any;
|
|
414
|
-
isWebApp: any;
|
|
415
|
-
initialData: {
|
|
416
|
-
url: string;
|
|
417
|
-
subscriptionsEndpoint: string;
|
|
418
|
-
subscriptionsProtocol: string;
|
|
419
|
-
query: string;
|
|
420
|
-
variables: string;
|
|
421
|
-
headers: IDictionary;
|
|
422
|
-
environments: IInitialEnvironments;
|
|
423
|
-
preRequestScript: string;
|
|
424
|
-
postRequestScript: string;
|
|
425
|
-
instanceStorageNamespace: string;
|
|
426
|
-
settings: Partial<SettingsState> | undefined;
|
|
427
|
-
persistedSettings: Partial<SettingsState> | undefined;
|
|
428
|
-
initialSubscriptionRequestHandlerId: RequestHandlerIds | undefined;
|
|
429
|
-
initialSubscriptionsPayload: IDictionary;
|
|
430
|
-
initialRequestHandlerId: RequestHandlerIds;
|
|
431
|
-
initialRequestHandlerAdditionalParams: Record<string, unknown>;
|
|
432
|
-
initialHttpMethod: "POST" | "GET" | "PUT" | "DELETE";
|
|
433
|
-
preserveState: boolean;
|
|
434
|
-
windows: AltairWindowOptions[];
|
|
435
|
-
disableAccount: boolean;
|
|
436
|
-
};
|
|
437
|
-
constructor({ endpointURL, subscriptionsEndpoint, subscriptionsProtocol, initialQuery, initialHeaders, initialEnvironments, initialVariables, initialPreRequestScript, initialPostRequestScript, instanceStorageNamespace, initialSettings, persistedSettings, initialRequestHandlerId, initialRequestHandlerAdditionalParams, initialSubscriptionRequestHandlerId, initialSubscriptionsPayload, initialHttpMethod, preserveState, initialWindows, disableAccount, }?: AltairConfigOptions);
|
|
438
|
-
}
|
|
439
452
|
/**
|
|
440
453
|
* Returns the path to Altair assets, for resolving the assets when rendering Altair
|
|
441
454
|
*/
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "altair-static",
|
|
3
3
|
"description": "Static package for altair graphql client",
|
|
4
|
-
"version": "7.2.
|
|
4
|
+
"version": "7.2.4",
|
|
5
5
|
"author": "Samuel Imolorhe <altair@sirmuel.design> (https://sirmuel.design)",
|
|
6
6
|
"bugs": "https://github.com/altair-graphql/altair/issues",
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@altairgraphql/app": "^7.2.
|
|
8
|
+
"@altairgraphql/app": "^7.2.4",
|
|
9
9
|
"@types/jest": "^24.0.23",
|
|
10
|
-
"altair-graphql-core": "^7.2.
|
|
10
|
+
"altair-graphql-core": "^7.2.4",
|
|
11
11
|
"dts-bundle-generator": "^6.11.0",
|
|
12
12
|
"esbuild": "^0.14.43",
|
|
13
13
|
"jest": "29.4.1",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type": "opencollective",
|
|
22
22
|
"url": "https://opencollective.com/altair"
|
|
23
23
|
},
|
|
24
|
-
"gitHead": "
|
|
24
|
+
"gitHead": "99ad41572f40136876cff51027eca0e575092441",
|
|
25
25
|
"homepage": "https://github.com/altair-graphql/altair#readme",
|
|
26
26
|
"keywords": [
|
|
27
27
|
"altair",
|
package/src/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import getAltairHtml from './get-altair-html';
|
|
2
|
-
import type { AltairConfigOptions } from 'altair-graphql-core/build/config';
|
|
2
|
+
import type { AltairConfigOptions } from 'altair-graphql-core/build/config/options';
|
|
3
3
|
|
|
4
4
|
export interface RenderOptions extends AltairConfigOptions {
|
|
5
5
|
/**
|