@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.
Files changed (60) hide show
  1. package/dist/define/http/http-body-editor.d.ts.map +1 -1
  2. package/dist/define/http/http-body-editor.js +1 -1
  3. package/dist/define/http/http-body-editor.js.map +1 -1
  4. package/dist/elements/http/BodyEditor.js +5 -5
  5. package/dist/elements/http/BodyEditor.js.map +1 -1
  6. package/dist/elements/http/BodyEditor.styles.d.ts +1 -1
  7. package/dist/elements/http/BodyEditor.styles.d.ts.map +1 -1
  8. package/dist/elements/http/BodyEditor.styles.js +5 -19
  9. package/dist/elements/http/BodyEditor.styles.js.map +1 -1
  10. package/dist/elements/store/FilesLib.d.ts +2 -2
  11. package/dist/elements/store/FilesLib.d.ts.map +1 -1
  12. package/dist/elements/store/FilesLib.js.map +1 -1
  13. package/dist/http-client/store/Cursor.js +2 -2
  14. package/dist/http-client/store/Cursor.js.map +1 -1
  15. package/dist/http-client/store/HttpClientIdbDatabase.d.ts.map +1 -1
  16. package/dist/http-client/store/HttpClientIdbDatabase.js +2 -6
  17. package/dist/http-client/store/HttpClientIdbDatabase.js.map +1 -1
  18. package/dist/http-client/store/State.d.ts +1 -3
  19. package/dist/http-client/store/State.d.ts.map +1 -1
  20. package/dist/http-client/store/State.js.map +1 -1
  21. package/dist/http-client/store/idb/IdbStore.d.ts +1 -10
  22. package/dist/http-client/store/idb/IdbStore.d.ts.map +1 -1
  23. package/dist/http-client/store/idb/IdbStore.js +0 -48
  24. package/dist/http-client/store/idb/IdbStore.js.map +1 -1
  25. package/dist/http-client/store/types.d.ts +2 -56
  26. package/dist/http-client/store/types.d.ts.map +1 -1
  27. package/dist/http-client/store/types.js.map +1 -1
  28. package/dist/index.d.ts +1 -0
  29. package/dist/index.d.ts.map +1 -1
  30. package/dist/index.js +2 -0
  31. package/dist/index.js.map +1 -1
  32. package/dist/pages/api-client/ApiClient.screen.d.ts +4 -4
  33. package/dist/pages/api-client/ApiClient.screen.d.ts.map +1 -1
  34. package/dist/pages/api-client/ApiClient.screen.js +2 -2
  35. package/dist/pages/api-client/ApiClient.screen.js.map +1 -1
  36. package/dist/pages/api-client/pages/Trash.page.d.ts.map +1 -1
  37. package/dist/pages/api-client/pages/Trash.page.js +3 -11
  38. package/dist/pages/api-client/pages/Trash.page.js.map +1 -1
  39. package/dist/ui/list/UiDropdownList.js +1 -1
  40. package/dist/ui/list/UiDropdownList.js.map +1 -1
  41. package/package.json +2 -2
  42. package/src/define/http/http-body-editor.ts +1 -1
  43. package/src/elements/http/BodyEditor.styles.ts +5 -19
  44. package/src/elements/http/BodyEditor.ts +5 -5
  45. package/src/elements/store/FilesLib.ts +2 -2
  46. package/src/http-client/store/Cursor.ts +2 -2
  47. package/src/http-client/store/HttpClientIdbDatabase.ts +5 -9
  48. package/src/http-client/store/State.ts +1 -5
  49. package/src/http-client/store/idb/IdbStore.ts +1 -51
  50. package/src/http-client/store/types.ts +2 -57
  51. package/src/index.ts +3 -0
  52. package/src/pages/api-client/ApiClient.screen.ts +7 -7
  53. package/src/pages/api-client/pages/Trash.page.ts +3 -10
  54. package/src/ui/list/UiDropdownList.ts +1 -1
  55. package/web-test-runner.config.mjs +2 -2
  56. package/dist/http-client/store/Validator.d.ts +0 -4
  57. package/dist/http-client/store/Validator.d.ts.map +0 -1
  58. package/dist/http-client/store/Validator.js +0 -32
  59. package/dist/http-client/store/Validator.js.map +0 -1
  60. package/src/http-client/store/Validator.ts +0 -33
@@ -1,10 +1,10 @@
1
- import { ProjectKind, EventUtils, FolderKind, TrashEntry, ContextSpaceListOptions, IFile, BroadcastEvent, BroadcastCreatedEvent, DataFileKind } from "@api-client/core/build/browser.js";
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
- let icon: IconType | undefined;
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>` : ''}
@@ -352,7 +352,7 @@ export default class UiDropdownList extends LitElement {
352
352
  }
353
353
  const event = new CustomEvent<UiDropdownListSelection>('select', {
354
354
  cancelable: true,
355
- composed: true,
355
+ // composed: true,
356
356
  detail: {
357
357
  item,
358
358
  },
@@ -150,10 +150,10 @@ export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
150
150
 
151
151
  testFramework: {
152
152
  config: {
153
- timeout: 600000,
153
+ timeout: 60000,
154
154
  },
155
155
  },
156
156
  browserStartTimeout: 20000,
157
157
  testsStartTimeout: 20000,
158
- testsFinishTimeout: 600000,
158
+ testsFinishTimeout: 60000,
159
159
  });
@@ -1,4 +0,0 @@
1
- import { IPatchInfo } from '@api-client/core/build/browser.js';
2
- export declare function validateKinds(kinds?: string[]): void;
3
- export declare function validatePatch(info: IPatchInfo): void;
4
- //# sourceMappingURL=Validator.d.ts.map
@@ -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
- }