Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More β†’
Socket
Sign inDemoInstall
Socket

@apollo-elements/fast

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@apollo-elements/fast - npm Package Compare versions

Comparing version 3.0.1 to 3.0.2

6

apollo-mutation-behavior.d.ts
import type { ComponentDocument, Data, Variables, VariablesOf } from '@apollo-elements/core/types';
import type { Behavior, ExecutionContext, FASTElement } from '@microsoft/fast-element';
import { ApolloMutationController, ApolloMutationControllerOptions } from '@apollo-elements/core/apollo-mutation-controller';
import { ApolloMutationController as AMC, ApolloMutationControllerOptions } from '@apollo-elements/core/apollo-mutation-controller';
/**

@@ -9,3 +9,4 @@ * `ApolloMutationBehavior`

*/
export declare class ApolloMutationBehavior<D, V = VariablesOf<D>> extends ApolloMutationController<D, V> implements Behavior {
export declare class ApolloMutationBehavior<D, V = VariablesOf<D>> extends AMC<D, V> implements Behavior {
hostElement: FASTElement & HTMLElement;
/**

@@ -15,2 +16,3 @@ * Latest query data.

data: Data<D> | null;
called: boolean;
loading: boolean;

@@ -17,0 +19,0 @@ error: null;

import { __decorate } from "tslib";
import { ApolloMutationController, } from '@apollo-elements/core/apollo-mutation-controller';
import { ApolloMutationController as AMC, } from '@apollo-elements/core/apollo-mutation-controller';
import { Observable, observable } from '@microsoft/fast-element';

@@ -10,5 +10,6 @@ import { FASTControllerHost } from './fast-controller-host';

*/
export class ApolloMutationBehavior extends ApolloMutationController {
export class ApolloMutationBehavior extends AMC {
constructor(hostElement, mutation, options) {
super(new FASTControllerHost(hostElement), mutation, { ...options, hostElement });
this.hostElement = hostElement;
/**

@@ -18,2 +19,3 @@ * Latest query data.

this.data = null;
this.called = false;
this.loading = false;

@@ -46,2 +48,5 @@ this.error = null;

observable
], ApolloMutationBehavior.prototype, "called", void 0);
__decorate([
observable
], ApolloMutationBehavior.prototype, "loading", void 0);

@@ -48,0 +53,0 @@ __decorate([

import type { ComponentDocument, Data, GraphQLError, Variables, VariablesOf } from '@apollo-elements/core/types';
import type * as C from '@apollo/client/core';
import { FASTElement } from '@microsoft/fast-element';
import { ApolloController, update } from '@apollo-elements/core/apollo-controller';
import { ApolloController } from '@apollo-elements/core/apollo-controller';
/**

@@ -39,4 +39,2 @@ * `ApolloElement`

errors: readonly GraphQLError[];
/** @internal */
[update](properties: Partial<this>): void;
}
import { __decorate } from "tslib";
import { FASTElement, attr, observable } from '@microsoft/fast-element';
import { update } from '@apollo-elements/core/apollo-controller';
import { FASTElement, observable } from '@microsoft/fast-element';
import { ApolloElementEvent } from '@apollo-elements/core/events';

@@ -50,7 +49,2 @@ import { controlled } from '@apollo-elements/core/decorators';

}
/** @internal */
[update](properties) {
for (const [k, v] of Object.entries(properties))
(this[k] !== v) && (this[k] = v);
}
}

@@ -71,5 +65,3 @@ __decorate([

__decorate([
attr({ mode: 'boolean' }),
hosted(),
controlled()
controlled({ onSet(v) { this.toggleAttribute('loading', v); } })
], ApolloElement.prototype, "loading", void 0);

@@ -76,0 +68,0 @@ __decorate([

@@ -7,3 +7,2 @@ import { __decorate } from "tslib";

import { hosted } from './decorators.js';
import { update } from '@apollo-elements/core/apollo-controller';
import { controlled } from '@apollo-elements/core/decorators';

@@ -24,4 +23,3 @@ /**

onCompleted: data => this.onCompleted?.(data),
onError: error => this.onError?.(error),
[update]: (x) => this[update](x),
onError: error => this.onError?.(error), /* c8 ignore next */ // covered
});

@@ -55,5 +53,5 @@ /**

__decorate([
hosted(),
controlled(),
attr({ mode: 'boolean' })
controlled({ onSet(v) {
this.toggleAttribute('called', v);
} })
], ApolloMutation.prototype, "called", void 0);

@@ -60,0 +58,0 @@ __decorate([

@@ -8,3 +8,2 @@ import { __decorate } from "tslib";

import { controlled } from '@apollo-elements/core/decorators';
import { update } from '@apollo-elements/core/apollo-controller';
/**

@@ -26,4 +25,3 @@ * `ApolloQuery`

onData: data => this.onData?.(data),
onError: error => this.onError?.(error),
[update]: (x) => this[update](x),
onError: error => this.onError?.(error), /* c8 ignore next */ // covered
});

@@ -30,0 +28,0 @@ /** @summary Flags an element that's ready and able to auto subscribe */

@@ -15,3 +15,3 @@ import { Observable } from '@microsoft/fast-element';

set.call(this, v);
Observable.notify(this, v);
Observable.notify(this, key);
},

@@ -18,0 +18,0 @@ });

{
"name": "@apollo-elements/fast",
"version": "3.0.1",
"version": "3.0.2",
"description": "πŸ‘©β€πŸš€πŸŒ› FastElements for Apollo GraphQL πŸš€πŸ‘¨β€πŸš€",

@@ -66,3 +66,3 @@ "main": "index.js",

"dependencies": {
"@apollo-elements/core": "^2.0.1",
"@apollo-elements/core": "^2.1.1",
"@apollo-elements/mixins": "^5.0.1",

@@ -69,0 +69,0 @@ "@microsoft/fast-element": "^1.6.2",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚑️ by Socket Inc