@canton-network/core-wallet-ui-components 0.6.0 → 0.8.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../src/components/AppHeader.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,qBACa,SAAU,SAAQ,WAAW;IACV,OAAO,EAAE,MAAM,CAAoB;IACtD,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAA2C;IAEpE,MAAM,CAAC,MAAM,iCAyIZ;IAED,iBAAiB;IAKjB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,UAAU;IAIlB,2FAA2F;IAC3F,OAAO,CAAC,MAAM;IAKd,MAAM;CAsCT"}
1
+ {"version":3,"file":"AppHeader.d.ts","sourceRoot":"","sources":["../../src/components/AppHeader.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,qBACa,SAAU,SAAQ,WAAW;IACV,OAAO,EAAE,MAAM,CAAoB;IACtD,OAAO,CAAC,QAAQ,CAAQ;IACxB,OAAO,CAAC,QAAQ,CAA2C;IAEpE,MAAM,CAAC,MAAM,iCAyIZ;IAED,iBAAiB;IAKjB,OAAO,CAAC,oBAAoB;IAQ5B,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,UAAU;IAIlB,2FAA2F;IAC3F,OAAO,CAAC,MAAM;IAKd,MAAM;CAuCT"}
@@ -0,0 +1,13 @@
1
+ import { BaseElement } from '../internal/BaseElement.js';
2
+ export declare class Toast extends BaseElement {
3
+ static styles: import("lit").CSSResultGroup[];
4
+ title: string;
5
+ message: string;
6
+ buttonText: string;
7
+ type: 'info' | 'success' | 'error';
8
+ closing: boolean;
9
+ private closeToast;
10
+ connectedCallback(): void;
11
+ render(): import("lit-html").TemplateResult<1>;
12
+ }
13
+ //# sourceMappingURL=CustomToast.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomToast.d.ts","sourceRoot":"","sources":["../../src/components/CustomToast.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,qBACa,KAAM,SAAQ,WAAW;IAClC,MAAM,CAAC,MAAM,iCA8FZ;IAE2B,KAAK,SAAK;IACV,OAAO,SAAK;IACZ,UAAU,SAAS;IACnB,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAU;IAC3C,OAAO,UAAQ;IAE5C,OAAO,CAAC,UAAU;IAQlB,iBAAiB;IAKjB,MAAM;CAgCT"}
@@ -1,4 +1,3 @@
1
- import { DiscoverResult } from '@canton-network/core-types';
2
1
  /**
3
2
  * Discovery implements the view of the Wallet Gateway selection window.
4
3
  *
@@ -13,11 +12,17 @@ export declare class Discovery extends HTMLElement {
13
12
  get walletExtensionLoaded(): boolean;
14
13
  set walletExtensionLoaded(val: boolean);
15
14
  private root;
15
+ private selectedTabId;
16
+ private verifiedKernels?;
16
17
  constructor();
17
- verifiedKernels(): DiscoverResult[];
18
+ tabs(): {
19
+ label: string;
20
+ id: string;
21
+ }[];
22
+ private renderExtensionOption;
18
23
  private renderKernelOption;
19
24
  private selectKernel;
20
- private mkButton;
25
+ private mkElement;
21
26
  render(): void;
22
27
  connectedCallback(): void;
23
28
  attributeChangedCallback(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"Discovery.d.ts","sourceRoot":"","sources":["../../src/components/Discovery.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAsB,MAAM,4BAA4B,CAAA;AAsC/E;;;;;;;GAOG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACtC,MAAM,CAAC,kBAAkB,WAA8B;IAEvD,MAAM,CAAC,MAAM,SAAoB;IAEjC,IAAI,qBAAqB,YAExB;IAED,IAAI,qBAAqB,CAAC,GAAG,SAAA,EAM5B;IAED,OAAO,CAAC,IAAI,CAAa;;IA+BzB,eAAe,IAAI,cAAc,EAAE;IAInC,OAAO,CAAC,kBAAkB;IA6B1B,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,QAAQ;IAWhB,MAAM;IAmDN,iBAAiB;IAIjB,wBAAwB;CAG3B"}
1
+ {"version":3,"file":"Discovery.d.ts","sourceRoot":"","sources":["../../src/components/Discovery.ts"],"names":[],"mappings":"AA6EA;;;;;;;GAOG;AACH,qBAAa,SAAU,SAAQ,WAAW;IACtC,MAAM,CAAC,kBAAkB,WAA8B;IAEvD,MAAM,CAAC,MAAM,SAAoB;IAEjC,IAAI,qBAAqB,YAExB;IAED,IAAI,qBAAqB,CAAC,GAAG,SAAA,EAM5B;IAED,OAAO,CAAC,IAAI,CAAa;IACzB,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,eAAe,CAAC,CAAc;;IA2CtC,IAAI;;;;IAaJ,OAAO,CAAC,qBAAqB;IAqB7B,OAAO,CAAC,kBAAkB;IAmC1B,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,SAAS;IAkBjB,MAAM;IA2FN,iBAAiB;IAIjB,wBAAwB;CAG3B"}
@@ -0,0 +1,18 @@
1
+ import { BaseElement } from '../internal/BaseElement';
2
+ import { Network } from '@canton-network/core-wallet-store';
3
+ /** Emitted when the user clicks the "Delete" button on a network card */
4
+ export declare class NetworkCardDeleteEvent extends Event {
5
+ network: Network;
6
+ constructor(network: Network);
7
+ }
8
+ /** Emitted when the user clicks the "Update" button on a network card */
9
+ export declare class NetworkCardUpdateEvent extends Event {
10
+ constructor();
11
+ }
12
+ export declare class NetworkCard extends BaseElement {
13
+ network: Network | null;
14
+ private _editing;
15
+ static styles: import("lit").CSSResultGroup[];
16
+ render(): import("lit-html").TemplateResult<1>;
17
+ }
18
+ //# sourceMappingURL=NetworkCard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworkCard.d.ts","sourceRoot":"","sources":["../../src/components/NetworkCard.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAErD,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAE3D,yEAAyE;AACzE,qBAAa,sBAAuB,SAAQ,KAAK;IAC1B,OAAO,EAAE,OAAO;gBAAhB,OAAO,EAAE,OAAO;CAGtC;AAED,yEAAyE;AACzE,qBAAa,sBAAuB,SAAQ,KAAK;;CAIhD;AAED,qBACa,WAAY,SAAQ,WAAW;IACZ,OAAO,EAAE,OAAO,GAAG,IAAI,CAAO;IAEjD,OAAO,CAAC,QAAQ,CAAQ;IAEjC,MAAM,CAAC,MAAM,iCAwBZ;IAED,MAAM;CA8CT"}
@@ -1,12 +1,40 @@
1
- import { Network } from '@canton-network/core-wallet-store';
1
+ import { ClientCredentials, Network, PasswordAuth } from '@canton-network/core-wallet-store';
2
2
  import { BaseElement } from '../internal/BaseElement.js';
3
+ import { NetworkInputChangedEvent } from './NetworkFormInput.js';
4
+ /**
5
+ * Emitted when the user clicks the Cancel button on the form
6
+ */
7
+ export declare class NetworkEditCancelEvent extends Event {
8
+ constructor();
9
+ }
10
+ /**
11
+ * Emitted when the user clicks the Save button on the form
12
+ */
13
+ export declare class NetworkEditSaveEvent extends Event {
14
+ network: Network;
15
+ constructor(network: Network);
16
+ }
17
+ type NetworkKeys = Exclude<keyof Network, 'auth' | 'ledgerApi'>;
18
+ type LedgerApiKeys = keyof Network['ledgerApi'];
19
+ type CommonAuth = Exclude<keyof Network['auth'], 'type' | 'admin'>;
20
+ type AdminAuth = keyof ClientCredentials;
21
+ type PasswordAuthKeys = Exclude<keyof PasswordAuth, 'type' | 'admin'>;
3
22
  export declare class NetworkForm extends BaseElement {
4
- editingNetwork: Network | null;
23
+ network: Network;
5
24
  authType: string;
25
+ private _error;
6
26
  static styles: import("lit").CSSResultGroup[];
7
- private getAuthField;
27
+ connectedCallback(): void;
8
28
  onAuthTypeChange(e: Event): void;
29
+ updateAuthStructure(): void;
9
30
  handleSubmit(e: Event): void;
31
+ setNetwork(field: NetworkKeys): (ev: NetworkInputChangedEvent) => void;
32
+ setLedgerApi(field: LedgerApiKeys): (ev: NetworkInputChangedEvent) => void;
33
+ setAuth(field: CommonAuth): (ev: NetworkInputChangedEvent) => void;
34
+ setAdminAuth(field: AdminAuth): (ev: NetworkInputChangedEvent) => void;
35
+ setPasswordAuth(field: PasswordAuthKeys): (ev: NetworkInputChangedEvent) => void;
36
+ renderAuthForm(): import("lit-html").TemplateResult<1>;
10
37
  render(): import("lit-html").TemplateResult<1>;
11
38
  }
39
+ export {};
12
40
  //# sourceMappingURL=NetworkForm.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkForm.d.ts","sourceRoot":"","sources":["../../src/components/NetworkForm.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAG3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,qBACa,WAAY,SAAQ,WAAW;IACZ,cAAc,EAAE,OAAO,GAAG,IAAI,CAAO;IACrC,QAAQ,EAAE,MAAM,CAAa;IAEzD,MAAM,CAAC,MAAM,iCAAuB;IAEpC,OAAO,CAAC,YAAY;IAOpB,gBAAgB,CAAC,CAAC,EAAE,KAAK;IAKzB,YAAY,CAAC,CAAC,EAAE,KAAK;IAerB,MAAM;CA6GT"}
1
+ {"version":3,"file":"NetworkForm.d.ts","sourceRoot":"","sources":["../../src/components/NetworkForm.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,iBAAiB,EACjB,OAAO,EAEP,YAAY,EACf,MAAM,mCAAmC,CAAA;AAG1C,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AACxD,OAAO,EAAE,wBAAwB,EAAE,MAAM,uBAAuB,CAAA;AAE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
4
+ */
5
+ export declare class NetworkInputChangedEvent extends Event {
6
+ value: string;
7
+ constructor(value: string);
8
+ }
9
+ /**
10
+ * An individual input field in the network form
11
+ */
12
+ export declare class NetworkFormInput extends BaseElement {
13
+ label: string;
14
+ value: string;
15
+ text: string;
16
+ required: boolean;
17
+ hideable: boolean;
18
+ /** Only takes effect if hideable is true */
19
+ hidden: boolean;
20
+ static styles: import("lit").CSSResultGroup[];
21
+ render(): import("lit-html").TemplateResult<1>;
22
+ }
23
+ //# sourceMappingURL=NetworkFormInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NetworkFormInput.d.ts","sourceRoot":"","sources":["../../src/components/NetworkFormInput.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAA;AAIrD;;GAEG;AACH,qBAAa,wBAAyB,SAAQ,KAAK;IAC/C,KAAK,EAAE,MAAM,CAAA;gBAED,KAAK,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBACa,gBAAiB,SAAQ,WAAW;IACjB,KAAK,SAAK;IACV,KAAK,SAAK;IACV,IAAI,SAAK;IACR,QAAQ,UAAQ;IAChB,QAAQ,UAAQ;IAE7C,4CAA4C;IACf,MAAM,UAAO;IAE1C,MAAM,CAAC,MAAM,iCAAuB;IAEpC,MAAM;CAwCT"}
@@ -1 +1 @@
1
- {"version":3,"file":"NetworkTable.d.ts","sourceRoot":"","sources":["../../src/components/NetworkTable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAI3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,qBACa,YAAa,SAAQ,WAAW;IACd,QAAQ,EAAE,OAAO,EAAE,CAAK;IAEnD,MAAM,CAAC,MAAM,iCAwBZ;IAED,MAAM;CAgDT"}
1
+ {"version":3,"file":"NetworkTable.d.ts","sourceRoot":"","sources":["../../src/components/NetworkTable.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAI3D,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,qBACa,YAAa,SAAQ,WAAW;IACd,QAAQ,EAAE,OAAO,EAAE,CAAK;IAEnD,MAAM,CAAC,MAAM,iCAAuB;IAEpC,MAAM;CAeT"}
@@ -0,0 +1,6 @@
1
+ import { BaseElement } from '../internal/BaseElement.js';
2
+ export declare class NotFound extends BaseElement {
3
+ static styles: import("lit").CSSResultGroup[];
4
+ render(): import("lit-html").TemplateResult<1>;
5
+ }
6
+ //# sourceMappingURL=NotFound.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NotFound.d.ts","sourceRoot":"","sources":["../../src/components/NotFound.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAA;AAExD,qBACa,QAAS,SAAQ,WAAW;IACrC,MAAM,CAAC,MAAM,iCAuBZ;IAED,MAAM;CAcT"}
@@ -0,0 +1,3 @@
1
+ export declare const eyeFillIcon: import("lit-html").TemplateResult<1>;
2
+ export declare const eyeSlashIcon: import("lit-html").TemplateResult<1>;
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/icons/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,sCAcvB,CAAA;AAED,eAAO,MAAM,YAAY,sCAmBxB,CAAA"}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,12 @@
1
1
  export * from './components/AppHeader.js';
2
2
  export * from './components/AppLayout.js';
3
+ export * from './components/CustomToast.js';
3
4
  export * from './components/Discovery.js';
4
5
  export * from './components/NetworkTable.js';
6
+ export * from './components/NetworkCard.js';
5
7
  export * from './components/NetworkForm.js';
8
+ export * from './components/NetworkFormInput.js';
9
+ export * from './components/NotFound.js';
6
10
  export * from './windows/discovery.js';
7
11
  export * from './windows/popup.js';
8
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAE3C,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,8BAA8B,CAAA;AAC5C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kCAAkC,CAAA;AAChD,cAAc,0BAA0B,CAAA;AAExC,cAAc,wBAAwB,CAAA;AACtC,cAAc,oBAAoB,CAAA"}