@api-client/ui 0.0.13 → 0.0.14
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/dist/define/http/http-body-editor.d.ts.map +1 -1
- package/dist/define/http/http-body-editor.js +1 -1
- package/dist/define/http/http-body-editor.js.map +1 -1
- package/dist/elements/http/BodyEditor.js +5 -5
- package/dist/elements/http/BodyEditor.js.map +1 -1
- package/dist/elements/http/BodyEditor.styles.d.ts +1 -1
- package/dist/elements/http/BodyEditor.styles.d.ts.map +1 -1
- package/dist/elements/http/BodyEditor.styles.js +5 -19
- package/dist/elements/http/BodyEditor.styles.js.map +1 -1
- package/dist/elements/store/FilesLib.d.ts +2 -2
- package/dist/elements/store/FilesLib.d.ts.map +1 -1
- package/dist/elements/store/FilesLib.js.map +1 -1
- package/dist/http-client/store/Cursor.js +2 -2
- package/dist/http-client/store/Cursor.js.map +1 -1
- package/dist/http-client/store/HttpClientIdbDatabase.d.ts.map +1 -1
- package/dist/http-client/store/HttpClientIdbDatabase.js +2 -6
- package/dist/http-client/store/HttpClientIdbDatabase.js.map +1 -1
- package/dist/http-client/store/State.d.ts +1 -3
- package/dist/http-client/store/State.d.ts.map +1 -1
- package/dist/http-client/store/State.js.map +1 -1
- package/dist/http-client/store/idb/IdbStore.d.ts +1 -10
- package/dist/http-client/store/idb/IdbStore.d.ts.map +1 -1
- package/dist/http-client/store/idb/IdbStore.js +0 -48
- package/dist/http-client/store/idb/IdbStore.js.map +1 -1
- package/dist/http-client/store/types.d.ts +2 -56
- package/dist/http-client/store/types.d.ts.map +1 -1
- package/dist/http-client/store/types.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/pages/api-client/ApiClient.screen.d.ts +4 -4
- package/dist/pages/api-client/ApiClient.screen.d.ts.map +1 -1
- package/dist/pages/api-client/ApiClient.screen.js +2 -2
- package/dist/pages/api-client/ApiClient.screen.js.map +1 -1
- package/dist/pages/api-client/pages/Trash.page.d.ts.map +1 -1
- package/dist/pages/api-client/pages/Trash.page.js +3 -11
- package/dist/pages/api-client/pages/Trash.page.js.map +1 -1
- package/dist/ui/list/UiDropdownList.js +1 -1
- package/dist/ui/list/UiDropdownList.js.map +1 -1
- package/package.json +2 -2
- package/src/define/http/http-body-editor.ts +1 -1
- package/src/elements/http/BodyEditor.styles.ts +5 -19
- package/src/elements/http/BodyEditor.ts +5 -5
- package/src/elements/store/FilesLib.ts +2 -2
- package/src/http-client/store/Cursor.ts +2 -2
- package/src/http-client/store/HttpClientIdbDatabase.ts +5 -9
- package/src/http-client/store/State.ts +1 -5
- package/src/http-client/store/idb/IdbStore.ts +1 -51
- package/src/http-client/store/types.ts +2 -57
- package/src/index.ts +3 -0
- package/src/pages/api-client/ApiClient.screen.ts +7 -7
- package/src/pages/api-client/pages/Trash.page.ts +3 -10
- package/src/ui/list/UiDropdownList.ts +1 -1
- package/web-test-runner.config.mjs +2 -2
- package/dist/http-client/store/Validator.d.ts +0 -4
- package/dist/http-client/store/Validator.d.ts.map +0 -1
- package/dist/http-client/store/Validator.js +0 -32
- package/dist/http-client/store/Validator.js.map +0 -1
- package/src/http-client/store/Validator.ts +0 -33
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { EventUtils, TrashEntry, ContextSpaceListOptions, IFile, BroadcastEvent, BroadcastCreatedEvent } from "@api-client/core/build/browser.js";
|
|
2
2
|
import { html, TemplateResult } from "lit";
|
|
3
3
|
import '@github/relative-time-element';
|
|
4
|
-
import { IconType } from "../../../ui/icons/Icons.js";
|
|
5
4
|
import { navigate } from "../../../lib/route.js";
|
|
6
5
|
import { SnackNotifications } from "../../../ui/notification/SnackNotifications.js";
|
|
7
6
|
import { DataTable } from "../../../ui/table/DataTable.js";
|
|
7
|
+
import { fileIcon } from "../../../elements/store/FilesLib.js";
|
|
8
8
|
import type ApiClientScreen from "../ApiClient.screen.js";
|
|
9
9
|
import '../../../define/ui/ui-icon.js';
|
|
10
10
|
|
|
@@ -249,14 +249,7 @@ export class TrashPage {
|
|
|
249
249
|
|
|
250
250
|
protected renderTableItem(item: TrashEntry): TemplateResult[] {
|
|
251
251
|
const { kind, name, info } = item;
|
|
252
|
-
|
|
253
|
-
if (kind === ProjectKind) {
|
|
254
|
-
icon = 'collectionsBookmark';
|
|
255
|
-
} else if (kind === FolderKind) {
|
|
256
|
-
icon = 'folder';
|
|
257
|
-
} else if (kind === DataFileKind) {
|
|
258
|
-
icon = 'schema';
|
|
259
|
-
}
|
|
252
|
+
const icon = fileIcon(item);
|
|
260
253
|
|
|
261
254
|
const nameCell = this.dt.cell(html`
|
|
262
255
|
${icon ? html`<ui-icon icon="${icon}" class="cell-icon"></ui-icon>` : ''}
|
|
@@ -150,10 +150,10 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
|
|
|
150
150
|
|
|
151
151
|
testFramework: {
|
|
152
152
|
config: {
|
|
153
|
-
timeout:
|
|
153
|
+
timeout: 60000,
|
|
154
154
|
},
|
|
155
155
|
},
|
|
156
156
|
browserStartTimeout: 20000,
|
|
157
157
|
testsStartTimeout: 20000,
|
|
158
|
-
testsFinishTimeout:
|
|
158
|
+
testsFinishTimeout: 60000,
|
|
159
159
|
});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../../src/http-client/store/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAGzE,wBAAgB,aAAa,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAQpD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,IAAI,CAmBpD"}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ApiError } from '@api-client/core/build/browser.js';
|
|
2
|
-
import { Patch } from '@api-client/json';
|
|
3
|
-
export function validateKinds(kinds) {
|
|
4
|
-
if (!Array.isArray(kinds) || !kinds.length) {
|
|
5
|
-
return;
|
|
6
|
-
}
|
|
7
|
-
const notString = kinds.some(i => typeof i !== 'string');
|
|
8
|
-
if (notString) {
|
|
9
|
-
throw new ApiError(`Only strings are allowed in the "kinds".`, 400);
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
export function validatePatch(info) {
|
|
13
|
-
const { app, appVersion, id, patch } = info;
|
|
14
|
-
const prefix = `Invalid patch schema.`;
|
|
15
|
-
if (!app) {
|
|
16
|
-
throw new ApiError(`${prefix} Missing "app" property.`, 400);
|
|
17
|
-
}
|
|
18
|
-
if (!appVersion) {
|
|
19
|
-
throw new ApiError(`${prefix} Missing "appVersion" property.`, 400);
|
|
20
|
-
}
|
|
21
|
-
if (!id) {
|
|
22
|
-
throw new ApiError(`${prefix} Missing "id" property.`, 400);
|
|
23
|
-
}
|
|
24
|
-
if (!patch) {
|
|
25
|
-
throw new ApiError(`${prefix} Missing "patch" property.`, 400);
|
|
26
|
-
}
|
|
27
|
-
const isValid = Patch.valid(patch);
|
|
28
|
-
if (!isValid) {
|
|
29
|
-
throw new ApiError(`Malformed patch information.`, 400);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
//# sourceMappingURL=Validator.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Validator.js","sourceRoot":"","sources":["../../../src/http-client/store/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAc,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAEzC,MAAM,UAAU,aAAa,CAAC,KAAgB;IAC5C,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,EAAE;QAC1C,OAAO;KACR;IACD,MAAM,SAAS,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;IACzD,IAAI,SAAS,EAAE;QACb,MAAM,IAAI,QAAQ,CAAC,0CAA0C,EAAE,GAAG,CAAC,CAAC;KACrE;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAgB;IAC5C,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAC5C,MAAM,MAAM,GAAG,uBAAuB,CAAC;IACvC,IAAI,CAAC,GAAG,EAAE;QACR,MAAM,IAAI,QAAQ,CAAC,GAAG,MAAM,0BAA0B,EAAE,GAAG,CAAC,CAAC;KAC9D;IACD,IAAI,CAAC,UAAU,EAAE;QACf,MAAM,IAAI,QAAQ,CAAC,GAAG,MAAM,iCAAiC,EAAE,GAAG,CAAC,CAAC;KACrE;IACD,IAAI,CAAC,EAAE,EAAE;QACP,MAAM,IAAI,QAAQ,CAAC,GAAG,MAAM,yBAAyB,EAAE,GAAG,CAAC,CAAC;KAC7D;IACD,IAAI,CAAC,KAAK,EAAE;QACV,MAAM,IAAI,QAAQ,CAAC,GAAG,MAAM,4BAA4B,EAAE,GAAG,CAAC,CAAC;KAChE;IACD,MAAM,OAAO,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACnC,IAAI,CAAC,OAAO,EAAE;QACZ,MAAM,IAAI,QAAQ,CAAC,8BAA8B,EAAE,GAAG,CAAC,CAAC;KACzD;AACH,CAAC","sourcesContent":["import { ApiError, IPatchInfo } from '@api-client/core/build/browser.js';\nimport { Patch } from '@api-client/json';\n\nexport function validateKinds(kinds?: string[]): void {\n if (!Array.isArray(kinds) || !kinds.length) {\n return;\n }\n const notString = kinds.some(i => typeof i !== 'string');\n if (notString) {\n throw new ApiError(`Only strings are allowed in the \"kinds\".`, 400);\n }\n}\n\nexport function validatePatch(info: IPatchInfo): void {\n const { app, appVersion, id, patch } = info;\n const prefix = `Invalid patch schema.`;\n if (!app) {\n throw new ApiError(`${prefix} Missing \"app\" property.`, 400);\n }\n if (!appVersion) {\n throw new ApiError(`${prefix} Missing \"appVersion\" property.`, 400);\n }\n if (!id) {\n throw new ApiError(`${prefix} Missing \"id\" property.`, 400);\n }\n if (!patch) {\n throw new ApiError(`${prefix} Missing \"patch\" property.`, 400);\n }\n const isValid = Patch.valid(patch);\n if (!isValid) {\n throw new ApiError(`Malformed patch information.`, 400);\n }\n}\n"]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ApiError, IPatchInfo } from '@api-client/core/build/browser.js';
|
|
2
|
-
import { Patch } from '@api-client/json';
|
|
3
|
-
|
|
4
|
-
export function validateKinds(kinds?: string[]): void {
|
|
5
|
-
if (!Array.isArray(kinds) || !kinds.length) {
|
|
6
|
-
return;
|
|
7
|
-
}
|
|
8
|
-
const notString = kinds.some(i => typeof i !== 'string');
|
|
9
|
-
if (notString) {
|
|
10
|
-
throw new ApiError(`Only strings are allowed in the "kinds".`, 400);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
export function validatePatch(info: IPatchInfo): void {
|
|
15
|
-
const { app, appVersion, id, patch } = info;
|
|
16
|
-
const prefix = `Invalid patch schema.`;
|
|
17
|
-
if (!app) {
|
|
18
|
-
throw new ApiError(`${prefix} Missing "app" property.`, 400);
|
|
19
|
-
}
|
|
20
|
-
if (!appVersion) {
|
|
21
|
-
throw new ApiError(`${prefix} Missing "appVersion" property.`, 400);
|
|
22
|
-
}
|
|
23
|
-
if (!id) {
|
|
24
|
-
throw new ApiError(`${prefix} Missing "id" property.`, 400);
|
|
25
|
-
}
|
|
26
|
-
if (!patch) {
|
|
27
|
-
throw new ApiError(`${prefix} Missing "patch" property.`, 400);
|
|
28
|
-
}
|
|
29
|
-
const isValid = Patch.valid(patch);
|
|
30
|
-
if (!isValid) {
|
|
31
|
-
throw new ApiError(`Malformed patch information.`, 400);
|
|
32
|
-
}
|
|
33
|
-
}
|