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

@manifoldco/web-components

Package Overview
Dependencies
Maintainers
11
Versions
49
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@manifoldco/web-components - npm Package Compare versions

Comparing version 0.0.16 to 0.0.17

dist/manifold/p-6baa8501.system.entry.js

2

dist/cjs/loader.cjs.js

@@ -8,5 +8,5 @@ 'use strict';

const defineCustomElements = (win, options) => index.patchEsm().then(() => {
return index.bootstrapLazy([["manifold-plan-table.cjs",[[1,"manifold-plan-table",{"slug":[1],"clientKey":[1,"client-key"],"ctaText":[1,"cta-text"],"baseUrl":[1,"base-url"],"productData":[16],"env":[1],"product":[32],"client":[32]}]]]], options);
return index.bootstrapLazy([["manifold-plan-table.cjs",[[1,"manifold-plan-table",{"embed":[1],"ctaText":[1,"cta-text"],"baseUrl":[1,"base-url"],"productData":[16],"env":[1],"product":[32],"client":[32]}]]]], options);
});
exports.defineCustomElements = defineCustomElements;

@@ -6,3 +6,3 @@ 'use strict';

index.patchBrowser().then(options => {
return index.bootstrapLazy([["manifold-plan-table.cjs",[[1,"manifold-plan-table",{"slug":[1],"clientKey":[1,"client-key"],"ctaText":[1,"cta-text"],"baseUrl":[1,"base-url"],"productData":[16],"env":[1],"product":[32],"client":[32]}]]]], options);
return index.bootstrapLazy([["manifold-plan-table.cjs",[[1,"manifold-plan-table",{"embed":[1],"ctaText":[1,"cta-text"],"baseUrl":[1,"base-url"],"productData":[16],"env":[1],"product":[32],"client":[32]}]]]], options);
});
import { Component, Event, Host, State, Prop, h, Watch, } from '@stencil/core';
import { createClient } from '@urql/core';
import checkIcon from '@manifoldco/mercury/icons/check.svg';
import query from '../../graphql/GetProduct.graphql';
import query from '../../graphql/EmbeddedProduct.graphql';
import { toUSD, displayRange } from '../../utils/cost';
import sampleProduct from './data.json';
export class ManifoldPlanTable {

@@ -15,27 +14,18 @@ constructor() {

componentWillLoad() {
if (this.slug && this.clientKey) {
if (this.slug === '___manifold-sample-product___') {
this.product = sampleProduct.data.product;
if (this.embed) {
let url = 'https://graphql.manifold.co/graphql';
if (this.env === 'local') {
url = 'http://localhost:8080/graphql';
}
else {
let url = 'https://graphql.manifold.co/graphql';
if (this.env === 'local') {
url = 'http://localhost:8080/graphql';
}
this.client = createClient({
url,
fetchOptions: {
headers: {
'Manifold-Client-Key': this.clientKey,
},
},
});
this.client
.query(query, { slug: this.slug })
.toPromise()
.then((result) => {
var _a;
this.product = (_a = result.data) === null || _a === void 0 ? void 0 : _a.product;
});
}
this.client = createClient({
url,
preferGetMethod: true,
});
this.client
.query(query, { embedId: this.embed })
.toPromise()
.then((result) => {
var _a;
this.product = (_a = result.data) === null || _a === void 0 ? void 0 : _a.embeddedProduct;
});
}

@@ -169,3 +159,3 @@ else if (this.productData) {

static get properties() { return {
"slug": {
"embed": {
"type": "string",

@@ -184,22 +174,5 @@ "mutable": false,

},
"attribute": "slug",
"attribute": "embed",
"reflect": false
},
"clientKey": {
"type": "string",
"mutable": false,
"complexType": {
"original": "string",
"resolved": "string",
"references": {}
},
"required": false,
"optional": false,
"docs": {
"tags": [],
"text": ""
},
"attribute": "client-key",
"reflect": false
},
"ctaText": {

@@ -243,6 +216,6 @@ "type": "string",

"complexType": {
"original": "GetProductQuery['product']",
"resolved": "null | undefined | { __typename?: \"Product\" | undefined; } & Pick<Product, \"slug\" | \"name\"> & { featureSlugs?: ({ __typename?: \"FeatureSlugPage\" | undefined; } & { featureSlugs: ({ __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\" | \"name\">)[]; }) | null | undefined; plans?: ({ __typename?: \"PlanPage\" | undefined; } & { plans: ({ __typename?: \"Plan\" | undefined; } & Pick<Plan, \"slug\" | \"name\" | \"cost\"> & { features?: ({ __typename?: \"FeaturePage\" | undefined; } & { features: (({ __typename: \"IntRangeFeature\"; } & Pick<IntRangeFeature, \"class\"> & { intRangeValues: ({ __typename?: \"IntRangeFeatureValue\" | undefined; } & Pick<IntRangeFeatureValue, \"cost\" | \"min\" | \"max\" | \"increments\">)[]; units?: ({ __typename?: \"Units\" | undefined; } & Pick<Units, \"single\" | \"plural\">) | null | undefined; featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"ExcludedFeature\"; } & Pick<ExcludedFeature, \"class\"> & { featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"StringFeature\"; } & Pick<StringFeature, \"class\"> & { stringValues: ({ __typename?: \"StringFeatureValue\" | undefined; } & Pick<StringFeatureValue, \"cost\" | \"display\" | \"value\">)[]; featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"BooleanFeature\"; } & Pick<BooleanFeature, \"class\"> & { booleanValues: ({ __typename?: \"BooleanFeatureValue\" | undefined; } & Pick<BooleanFeatureValue, \"cost\" | \"display\" | \"value\">)[]; featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"IntFeature\"; } & Pick<IntFeature, \"class\"> & { featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }))[]; }) | null | undefined; cta?: ({ __typename?: \"Cta\" | undefined; } & Pick<Cta, \"text\" | \"uri\">) | null | undefined; })[]; }) | null | undefined; }",
"original": "EmbeddedProductQuery['embeddedProduct']",
"resolved": "null | undefined | { __typename?: \"EmbeddedProduct\" | undefined; } & Pick<EmbeddedProduct, \"slug\" | \"name\"> & { featureSlugs?: ({ __typename?: \"FeatureSlugPage\" | undefined; } & { featureSlugs: ({ __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\" | \"name\">)[]; }) | null | undefined; plans?: ({ __typename?: \"PlanPage\" | undefined; } & { plans: ({ __typename?: \"Plan\" | undefined; } & Pick<Plan, \"slug\" | \"name\" | \"cost\"> & { features?: ({ __typename?: \"FeaturePage\" | undefined; } & { features: (({ __typename: \"BooleanFeature\"; } & Pick<BooleanFeature, \"class\"> & { booleanValues: ({ __typename?: \"BooleanFeatureValue\" | undefined; } & Pick<BooleanFeatureValue, \"cost\" | \"display\" | \"value\">)[]; featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"IntFeature\"; } & Pick<IntFeature, \"class\"> & { featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"ExcludedFeature\"; } & Pick<ExcludedFeature, \"class\"> & { featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"StringFeature\"; } & Pick<StringFeature, \"class\"> & { stringValues: ({ __typename?: \"StringFeatureValue\" | undefined; } & Pick<StringFeatureValue, \"cost\" | \"display\" | \"value\">)[]; featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }) | ({ __typename: \"IntRangeFeature\"; } & Pick<IntRangeFeature, \"class\"> & { intRangeValues: ({ __typename?: \"IntRangeFeatureValue\" | undefined; } & Pick<IntRangeFeatureValue, \"cost\" | \"min\" | \"max\" | \"increments\">)[]; units?: ({ __typename?: \"Units\" | undefined; } & Pick<Units, \"single\" | \"plural\">) | null | undefined; featureSlug: { __typename?: \"FeatureSlug\" | undefined; } & Pick<FeatureSlug, \"slug\">; }))[]; }) | null | undefined; cta?: ({ __typename?: \"Cta\" | undefined; } & Pick<Cta, \"text\" | \"uri\">) | null | undefined; })[]; }) | null | undefined; }",
"references": {
"GetProductQuery": {
"EmbeddedProductQuery": {
"location": "import",

@@ -249,0 +222,0 @@ "path": "../../types/graphql"

import sampleProduct from './data.json';
const demoSlug = 'jul-3-demo';
const demoClientKey = 'pub-4dcf6fa7c7709a7e';
const demoEmbedId = 'emb-7mbxd2jxrzw83nf6';
export default { title: '<manifold-plan-table>' };
export const withFetchedData = () => `<manifold-plan-table slug="${demoSlug}" client-key="${demoClientKey}"></manifold-plan-table>`;
export const withFetchedData = () => `<manifold-plan-table embed="${demoEmbedId}"></manifold-plan-table>`;
export const withProvidedData = () => {

@@ -11,4 +10,4 @@ const table = document.createElement('manifold-plan-table');

};
export const withCustomCTAText = () => `<manifold-plan-table slug="${demoSlug}" client-key="${demoClientKey}" cta-text="Custom text"></manifold-plan-table>`;
export const withURL = () => `<manifold-plan-table slug="${demoSlug}" client-key="${demoClientKey}" base-url="https://app.manifold.co"></manifold-plan-table>`;
export const withCTATextOverride = () => `<manifold-plan-table embed="${demoEmbedId}" cta-text="Custom text"></manifold-plan-table>`;
export const withURLOverride = () => `<manifold-plan-table embed="${demoEmbedId}" base-url="https://app.manifold.co"></manifold-plan-table>`;
export const withCTAEventHandler = () => {

@@ -15,0 +14,0 @@ const table = document.createElement('manifold-plan-table');

@@ -9,2 +9,15 @@ /** PlanOrderByField is the field by which the plan list will be ordered. */

})(PlanOrderByField || (PlanOrderByField = {}));
/** FilterBy values for feature slug visibility */
export var FeatureSlugVisibilityFilter;
(function (FeatureSlugVisibilityFilter) {
FeatureSlugVisibilityFilter["All"] = "ALL";
FeatureSlugVisibilityFilter["Visible"] = "VISIBLE";
FeatureSlugVisibilityFilter["Hidden"] = "HIDDEN";
})(FeatureSlugVisibilityFilter || (FeatureSlugVisibilityFilter = {}));
/** Plan visibility options */
export var PlanVisibility;
(function (PlanVisibility) {
PlanVisibility["Visible"] = "VISIBLE";
PlanVisibility["Hidden"] = "HIDDEN";
})(PlanVisibility || (PlanVisibility = {}));
/** FeatureSlugOrderByField is the field by which the feature slug list will be ordered. */

@@ -17,2 +30,8 @@ export var FeatureSlugOrderByField;

})(FeatureSlugOrderByField || (FeatureSlugOrderByField = {}));
/** visibility options for feature slugs */
export var FeatureSlugVisibility;
(function (FeatureSlugVisibility) {
FeatureSlugVisibility["Visible"] = "VISIBLE";
FeatureSlugVisibility["Hidden"] = "HIDDEN";
})(FeatureSlugVisibility || (FeatureSlugVisibility = {}));
/** FeatureOrderByField is the field by which the feature list will be ordered. */

@@ -24,11 +43,9 @@ export var FeatureOrderByField;

})(FeatureOrderByField || (FeatureOrderByField = {}));
/**
* OrderByDirection is used in all paginated queries to order by a specific
* field's direction.
*/
export var OrderByDirection;
(function (OrderByDirection) {
OrderByDirection["Asc"] = "ASC";
OrderByDirection["Desc"] = "DESC";
})(OrderByDirection || (OrderByDirection = {}));
/** FilterBy values for plan visibility */
export var PlanVisibilityFilter;
(function (PlanVisibilityFilter) {
PlanVisibilityFilter["All"] = "ALL";
PlanVisibilityFilter["Visible"] = "VISIBLE";
PlanVisibilityFilter["Hidden"] = "HIDDEN";
})(PlanVisibilityFilter || (PlanVisibilityFilter = {}));
export var CostType;

@@ -54,2 +71,11 @@ (function (CostType) {

})(FeatureClass || (FeatureClass = {}));
/**
* OrderByDirection is used in all paginated queries to order by a specific
* field's direction.
*/
export var OrderByDirection;
(function (OrderByDirection) {
OrderByDirection["Asc"] = "ASC";
OrderByDirection["Desc"] = "DESC";
})(OrderByDirection || (OrderByDirection = {}));
export var FeatureType;

@@ -56,0 +82,0 @@ (function (FeatureType) {

@@ -1,1 +0,1 @@

import{p as t,b as e}from"./p-8df06789.js";t().then(t=>e([["p-c5e3ccd5",[[1,"manifold-plan-table",{slug:[1],clientKey:[1,"client-key"],ctaText:[1,"cta-text"],baseUrl:[1,"base-url"],productData:[16],env:[1],product:[32],client:[32]}]]]],t));
import{p as a,b as t}from"./p-8df06789.js";a().then(a=>t([["p-7bde516c",[[1,"manifold-plan-table",{embed:[1],ctaText:[1,"cta-text"],baseUrl:[1,"base-url"],productData:[16],env:[1],product:[32],client:[32]}]]]],a));

@@ -1,1 +0,1 @@

System.register(["./p-40a5fb4b.system.js"],(function(){"use strict";var t,e;return{setters:[function(n){t=n.p;e=n.b}],execute:function(){t().then((function(t){return e([["p-425f3d3c.system",[[1,"manifold-plan-table",{slug:[1],clientKey:[1,"client-key"],ctaText:[1,"cta-text"],baseUrl:[1,"base-url"],productData:[16],env:[1],product:[32],client:[32]}]]]],t)}))}}}));
System.register(["./p-40a5fb4b.system.js"],(function(){"use strict";var t,e;return{setters:[function(n){t=n.p;e=n.b}],execute:function(){t().then((function(t){return e([["p-6baa8501.system",[[1,"manifold-plan-table",{embed:[1],ctaText:[1,"cta-text"],baseUrl:[1,"base-url"],productData:[16],env:[1],product:[32],client:[32]}]]]],t)}))}}}));

@@ -8,3 +8,3 @@ /* eslint-disable */

import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
import { GetProductQuery, } from "./types/graphql";
import { EmbeddedProductQuery, } from "./types/graphql";
import { PlanTableEvent, } from "./components/manifold-plan-table/manifold-plan-table";

@@ -14,7 +14,6 @@ export namespace Components {

"baseUrl"?: string;
"clientKey": string;
"ctaText"?: string;
"embed": string;
"env": "prod" | "local";
"productData"?: GetProductQuery["product"];
"slug": string;
"productData"?: EmbeddedProductQuery["embeddedProduct"];
}

@@ -36,8 +35,7 @@ }

"baseUrl"?: string;
"clientKey"?: string;
"ctaText"?: string;
"embed"?: string;
"env"?: "prod" | "local";
"onCtaClick"?: (event: CustomEvent<PlanTableEvent>) => void;
"productData"?: GetProductQuery["product"];
"slug"?: string;
"productData"?: EmbeddedProductQuery["embeddedProduct"];
}

@@ -44,0 +42,0 @@ interface IntrinsicElements {

import { ComponentInterface, EventEmitter } from '../../stencil-public-runtime';
import { Client } from '@urql/core';
import { GetProductQuery } from '../../types/graphql';
import { EmbeddedProductQuery } from '../../types/graphql';
export interface PlanTableEvent {

@@ -10,11 +10,10 @@ planSlug: string;

ctaClick: EventEmitter<PlanTableEvent>;
slug: string;
clientKey: string;
embed: string;
ctaText?: string;
baseUrl?: string;
productData?: GetProductQuery['product'];
productData?: EmbeddedProductQuery['embeddedProduct'];
env: 'prod' | 'local';
product: GetProductQuery['product'];
product: EmbeddedProductQuery['embeddedProduct'];
client: Client;
updateProductData(newValue: GetProductQuery['product']): void;
updateProductData(newValue: EmbeddedProductQuery['embeddedProduct']): void;
componentWillLoad(): void;

@@ -28,10 +27,7 @@ get plans(): ({

features: (({
__typename: "IntRangeFeature";
} & Pick<import("../../types/graphql").IntRangeFeature, "class"> & {
intRangeValues: ({
__typename?: "IntRangeFeatureValue" | undefined;
} & Pick<import("../../types/graphql").IntRangeFeatureValue, "cost" | "min" | "max" | "increments">)[];
units?: ({
__typename?: "Units" | undefined;
} & Pick<import("../../types/graphql").Units, "single" | "plural">) | null | undefined;
__typename: "BooleanFeature";
} & Pick<import("../../types/graphql").BooleanFeature, "class"> & {
booleanValues: ({
__typename?: "BooleanFeatureValue" | undefined;
} & Pick<import("../../types/graphql").BooleanFeatureValue, "cost" | "value" | "display">)[];
featureSlug: {

@@ -41,2 +37,8 @@ __typename?: "FeatureSlug" | undefined;

}) | ({
__typename: "IntFeature";
} & Pick<import("../../types/graphql").IntFeature, "class"> & {
featureSlug: {
__typename?: "FeatureSlug" | undefined;
} & Pick<import("../../types/graphql").FeatureSlug, "slug">;
}) | ({
__typename: "ExcludedFeature";

@@ -57,16 +59,13 @@ } & Pick<import("../../types/graphql").ExcludedFeature, "class"> & {

}) | ({
__typename: "BooleanFeature";
} & Pick<import("../../types/graphql").BooleanFeature, "class"> & {
booleanValues: ({
__typename?: "BooleanFeatureValue" | undefined;
} & Pick<import("../../types/graphql").BooleanFeatureValue, "cost" | "value" | "display">)[];
__typename: "IntRangeFeature";
} & Pick<import("../../types/graphql").IntRangeFeature, "class"> & {
intRangeValues: ({
__typename?: "IntRangeFeatureValue" | undefined;
} & Pick<import("../../types/graphql").IntRangeFeatureValue, "cost" | "min" | "max" | "increments">)[];
units?: ({
__typename?: "Units" | undefined;
} & Pick<import("../../types/graphql").Units, "single" | "plural">) | null | undefined;
featureSlug: {
__typename?: "FeatureSlug" | undefined;
} & Pick<import("../../types/graphql").FeatureSlug, "slug">;
}) | ({
__typename: "IntFeature";
} & Pick<import("../../types/graphql").IntFeature, "class"> & {
featureSlug: {
__typename?: "FeatureSlug" | undefined;
} & Pick<import("../../types/graphql").FeatureSlug, "slug">;
}))[];

@@ -73,0 +72,0 @@ }) | null | undefined;

@@ -7,4 +7,4 @@ declare const _default: {

export declare const withProvidedData: () => HTMLManifoldPlanTableElement;
export declare const withCustomCTAText: () => string;
export declare const withURL: () => string;
export declare const withCTATextOverride: () => string;
export declare const withURLOverride: () => string;
export declare const withCTAEventHandler: () => HTMLDivElement;

@@ -15,28 +15,2 @@ export declare type Maybe<T> = T | null;

};
/** A FeatureSlugPage is a page of queried feature slugs. */
export declare type FeatureSlugPage = {
__typename?: 'FeatureSlugPage';
totalCount: Scalars['Int'];
featureSlugs: Array<FeatureSlug>;
};
export declare type IntFeatureValue = {
__typename?: 'IntFeatureValue';
/** Unset means infinity. Negative infinity is not supported. */
value?: Maybe<Scalars['Int']>;
display?: Maybe<Scalars['String']>;
cost: Scalars['Int'];
default: Scalars['Boolean'];
};
/** PlanOrderBy defines how a list of queried plans are to be ordered. */
export declare type PlanOrderBy = {
field: PlanOrderByField;
direction: OrderByDirection;
};
/** PlanOrderByField is the field by which the plan list will be ordered. */
export declare enum PlanOrderByField {
Slug = "SLUG",
Name = "NAME",
Cost = "COST",
Position = "POSITION"
}
/** Product represents a product for sale. */

@@ -57,2 +31,3 @@ export declare type Product = {

orderBy?: Maybe<Array<PlanOrderBy>>;
filterBy?: Maybe<PlanFilterBy>;
};

@@ -64,12 +39,65 @@ /** Product represents a product for sale. */

orderBy?: Maybe<Array<FeatureSlugOrderBy>>;
filterBy?: Maybe<FeatureSlugFilterBy>;
};
/** FeatureSlugOrderByField is the field by which the feature slug list will be ordered. */
export declare enum FeatureSlugOrderByField {
export declare type BooleanFeature = Feature & {
__typename?: 'BooleanFeature';
featureSlug: FeatureSlug;
/** METERED is not a valid class for Boolean features. */
class: FeatureClass;
/**
* value is a convenience field.
*
* It is only populated when the feature's class is FIXED.
*/
value?: Maybe<BooleanFeatureValue>;
/**
* values is the list of FeatureValues for this feature. CONFIGURED and METERED
* classes can have at most 25 feature values. FIXED types can have at most 1
* feature value.
*
* TODO: add a note about when publishing you must have exactly one value for FIXED,
* at least 2 for CONFIGURED BOOL and STRING, and at least 1 for CONFIGURED and
* METERED INT.
*/
values: Array<BooleanFeatureValue>;
};
/** Cta is the plan's call-to-action */
export declare type Cta = {
__typename?: 'Cta';
text: Scalars['String'];
uri?: Maybe<Scalars['String']>;
};
/** PlanOrderByField is the field by which the plan list will be ordered. */
export declare enum PlanOrderByField {
Slug = "SLUG",
Name = "NAME",
Cost = "COST",
Position = "POSITION"
}
export declare type IntRangeFeature = Feature & {
__typename?: 'IntRangeFeature';
export declare type IntFeatureValue = {
__typename?: 'IntFeatureValue';
/** Unset means infinity. Negative infinity is not supported. */
value?: Maybe<Scalars['Int']>;
display?: Maybe<Scalars['String']>;
cost: Scalars['Int'];
default: Scalars['Boolean'];
};
/** A FeatureSlugPage is a page of queried feature slugs. */
export declare type FeatureSlugPage = {
__typename?: 'FeatureSlugPage';
totalCount: Scalars['Int'];
featureSlugs: Array<FeatureSlug>;
};
/** FeatureSlugFilterBy defines filter rules for listing feature slugs */
export declare type FeatureSlugFilterBy = {
/**
* provide this value to filter the result by feature slug's visibility
* defaults to VISIBLE
*/
visibility?: Maybe<FeatureSlugVisibilityFilter>;
};
export declare type IntFeature = Feature & {
__typename?: 'IntFeature';
featureSlug: FeatureSlug;
/** METERED is not a valid class for Int features. */
class: FeatureClass;

@@ -82,3 +110,3 @@ units?: Maybe<Units>;

*/
value?: Maybe<IntRangeFeatureValue>;
value?: Maybe<IntFeatureValue>;
/**

@@ -90,38 +118,12 @@ * values is the list of FeatureValues for this feature. CONFIGURED and METERED

* TODO: add a note about when publishing you must have exactly one value for FIXED,
* at least 2 for CONFIGURED BOOL and STRING, and at least 1 for CONFIGURED and
* METERED INT.
* at least 2 for CONFIGURED Boolean and String, and at least 1 for CONFIGURED and
* METERED Int
*/
values: Array<IntRangeFeatureValue>;
values: Array<IntFeatureValue>;
};
/**
* FeatureSelection. for cost estimation, and eventual subscription.
*
* Exactly one of booleanSelection, intSelection, or stringSelection must be
* present.
*/
export declare type FeatureSelection = {
slug: Scalars['String'];
/** For a BOOLEAN feature */
booleanSelection?: Maybe<Scalars['Boolean']>;
/** For an INT or INT_RANGE feature */
intSelection?: Maybe<Scalars['Int']>;
/** For a STRING feature. */
stringSelection?: Maybe<Scalars['String']>;
};
export declare type FeatureSlug = {
__typename?: 'FeatureSlug';
/** The URL-friendly slug of this feature slug */
slug: Scalars['String'];
/** The human-readable name of this feature slug */
name: Scalars['String'];
};
/** FeatureSlugOrderBy defines how a list of queried feature slugs are to be ordered. */
export declare type FeatureSlugOrderBy = {
field: FeatureSlugOrderByField;
direction: OrderByDirection;
};
/** FeatureOrderByField is the field by which the feature list will be ordered. */
export declare enum FeatureOrderByField {
Class = "CLASS",
Type = "TYPE"
/** FilterBy values for feature slug visibility */
export declare enum FeatureSlugVisibilityFilter {
All = "ALL",
Visible = "VISIBLE",
Hidden = "HIDDEN"
}

@@ -134,3 +136,3 @@ export declare type Query = {

/** Look up a Product variant by it's embed id. */
productByEmbed?: Maybe<Product>;
embeddedProduct?: Maybe<EmbeddedProduct>;
};

@@ -143,36 +145,20 @@ export declare type QueryHelloArgs = {

};
export declare type QueryProductByEmbedArgs = {
export declare type QueryEmbeddedProductArgs = {
embedId: Scalars['ID'];
};
/**
* OrderByDirection is used in all paginated queries to order by a specific
* field's direction.
*/
export declare enum OrderByDirection {
Asc = "ASC",
Desc = "DESC"
/** Plan visibility options */
export declare enum PlanVisibility {
Visible = "VISIBLE",
Hidden = "HIDDEN"
}
/** FeaturerderBy defines how a list of queried features are to be ordered. */
export declare type FeatureOrderBy = {
field: FeatureOrderByField;
direction: OrderByDirection;
export declare type BooleanFeatureValue = {
__typename?: 'BooleanFeatureValue';
value: Scalars['Boolean'];
display?: Maybe<Scalars['String']>;
cost: Scalars['Int'];
default: Scalars['Boolean'];
};
export declare enum CostType {
/** A cost is per unit. All units are priced at the cost within this range. */
PerUnit = "PER_UNIT",
/** A cost is fixed for any number of units within the IntRangeFeatureValue. */
PerValue = "PER_VALUE",
/** A cost is per unit within the range. Lower ranges are priced seperately. */
PerUnitDistinct = "PER_UNIT_DISTINCT",
/**
* A cost is fixed for any number of units within the IntRangeFeatureValue.
* Lower ranges are priced seperately.
*/
PerValueDistinct = "PER_VALUE_DISTINCT"
}
/** Cta is the plan's call-to-action */
export declare type Cta = {
__typename?: 'Cta';
text: Scalars['String'];
uri?: Maybe<Scalars['String']>;
export declare type Greeting = {
__typename?: 'Greeting';
output: Scalars['String'];
};

@@ -185,2 +171,66 @@ /** A PlanPage is a page of queried plans. */

};
/** PlanOrderBy defines how a list of queried plans are to be ordered. */
export declare type PlanOrderBy = {
field: PlanOrderByField;
direction: OrderByDirection;
};
/** FeatureSlugOrderByField is the field by which the feature slug list will be ordered. */
export declare enum FeatureSlugOrderByField {
Slug = "SLUG",
Name = "NAME",
Position = "POSITION"
}
/** visibility options for feature slugs */
export declare enum FeatureSlugVisibility {
Visible = "VISIBLE",
Hidden = "HIDDEN"
}
/** FeatureSlugOrderBy defines how a list of queried feature slugs are to be ordered. */
export declare type FeatureSlugOrderBy = {
field: FeatureSlugOrderByField;
direction: OrderByDirection;
};
/** FeatureOrderByField is the field by which the feature list will be ordered. */
export declare enum FeatureOrderByField {
Class = "CLASS",
Type = "TYPE"
}
/** A FeaturePage is a page of queried feature pages. */
export declare type FeaturePage = {
__typename?: 'FeaturePage';
totalCount: Scalars['Int'];
features: Array<Feature>;
};
export declare type IntRangeFeatureValue = {
__typename?: 'IntRangeFeatureValue';
/** Negative infinity not supported. */
min: Scalars['Int'];
/** Unset means no maximum (eg infinity). */
max?: Maybe<Scalars['Int']>;
cost: Scalars['Int'];
/**
* costExpoent is an exponent used to calculate the final cost for this feature
* value, of the form: cost x 10^(costExponent).
*
* It defaults to zero, meaning the cost is used as entered. It can be used with
* a negative value to charge fractions of a cent (or appropriate currency) per
* unit. Only values between 0 and 10 (inclusive) are valid for costExponent.
*/
costExponent: Scalars['Int'];
costType: CostType;
/**
* Optional value to express a step-based incrementing for
* configuration/metering.
*
* Must be a positive integer. Defaults to 1.
*/
increments: Scalars['Int'];
default: Scalars['Boolean'];
};
/** FilterBy values for plan visibility */
export declare enum PlanVisibilityFilter {
All = "ALL",
Visible = "VISIBLE",
Hidden = "HIDDEN"
}
/**

@@ -218,15 +268,47 @@ * ExcludedFeature is a special class of feature to explicitly exclude it from a

};
/** A FeaturePage is a page of queried feature pages. */
export declare type FeaturePage = {
__typename?: 'FeaturePage';
totalCount: Scalars['Int'];
features: Array<Feature>;
export declare enum CostType {
/** A cost is per unit. All units are priced at the cost within this range. */
PerUnit = "PER_UNIT",
/** A cost is fixed for any number of units within the IntRangeFeatureValue. */
PerValue = "PER_VALUE",
/** A cost is per unit within the range. Lower ranges are priced seperately. */
PerUnitDistinct = "PER_UNIT_DISTINCT",
/**
* A cost is fixed for any number of units within the IntRangeFeatureValue.
* Lower ranges are priced seperately.
*/
PerValueDistinct = "PER_VALUE_DISTINCT"
}
/** PlanFilterBy defines filter rules for listing plans. */
export declare type PlanFilterBy = {
/**
* provide this value to filter the result by plan's visibility
* defaults to VISIBLE
*/
visibility?: Maybe<PlanVisibilityFilter>;
};
export declare type StringFeatureValue = {
__typename?: 'StringFeatureValue';
value: Scalars['String'];
display?: Maybe<Scalars['String']>;
cost: Scalars['Int'];
default: Scalars['Boolean'];
/** EmbeddedProduct represents a product for sale. */
export declare type EmbeddedProduct = {
__typename?: 'EmbeddedProduct';
slug: Scalars['String'];
name: Scalars['String'];
/** List Plans associated with the EmbeddedProduct */
plans?: Maybe<PlanPage>;
/** List FeatureSlugs associated with the EmbeddedProduct */
featureSlugs?: Maybe<FeatureSlugPage>;
};
/** EmbeddedProduct represents a product for sale. */
export declare type EmbeddedProductPlansArgs = {
limit: Scalars['Int'];
offset: Scalars['Int'];
orderBy?: Maybe<Array<PlanOrderBy>>;
filterBy?: Maybe<PlanFilterBy>;
};
/** EmbeddedProduct represents a product for sale. */
export declare type EmbeddedProductFeatureSlugsArgs = {
limit: Scalars['Int'];
offset: Scalars['Int'];
orderBy?: Maybe<Array<FeatureSlugOrderBy>>;
filterBy?: Maybe<FeatureSlugFilterBy>;
};
export declare enum FeatureClass {

@@ -237,5 +319,16 @@ Fixed = "FIXED",

}
export declare type BooleanFeatureValue = {
__typename?: 'BooleanFeatureValue';
value: Scalars['Boolean'];
/** Units defines an optional unit suffix for Int or IntRange features. */
export declare type Units = {
__typename?: 'Units';
single: Scalars['String'];
plural: Scalars['String'];
};
/** FeaturerderBy defines how a list of queried features are to be ordered. */
export declare type FeatureOrderBy = {
field: FeatureOrderByField;
direction: OrderByDirection;
};
export declare type StringFeatureValue = {
__typename?: 'StringFeatureValue';
value: Scalars['String'];
display?: Maybe<Scalars['String']>;

@@ -245,27 +338,35 @@ cost: Scalars['Int'];

};
export declare type IntRangeFeatureValue = {
__typename?: 'IntRangeFeatureValue';
/** Negative infinity not supported. */
min: Scalars['Int'];
/** Unset means no maximum (eg infinity). */
max?: Maybe<Scalars['Int']>;
cost: Scalars['Int'];
/**
* OrderByDirection is used in all paginated queries to order by a specific
* field's direction.
*/
export declare enum OrderByDirection {
Asc = "ASC",
Desc = "DESC"
}
export declare type Feature = {
featureSlug: FeatureSlug;
class?: Maybe<FeatureClass>;
};
export declare type IntRangeFeature = Feature & {
__typename?: 'IntRangeFeature';
featureSlug: FeatureSlug;
class: FeatureClass;
units?: Maybe<Units>;
/**
* costExpoent is an exponent used to calculate the final cost for this feature
* value, of the form: cost x 10^(costExponent).
* value is a convenience field.
*
* It defaults to zero, meaning the cost is used as entered. It can be used with
* a negative value to charge fractions of a cent (or appropriate currency) per
* unit. Only values between 0 and 10 (inclusive) are valid for costExponent.
* It is only populated when the feature's class is FIXED.
*/
costExponent: Scalars['Int'];
costType: CostType;
value?: Maybe<IntRangeFeatureValue>;
/**
* Optional value to express a step-based incrementing for
* configuration/metering.
* values is the list of FeatureValues for this feature. CONFIGURED and METERED
* classes can have at most 25 feature values. FIXED types can have at most 1
* feature value.
*
* Must be a positive integer. Defaults to 1.
* TODO: add a note about when publishing you must have exactly one value for FIXED,
* at least 2 for CONFIGURED BOOL and STRING, and at least 1 for CONFIGURED and
* METERED INT.
*/
increments: Scalars['Int'];
default: Scalars['Boolean'];
values: Array<IntRangeFeatureValue>;
};

@@ -300,2 +401,4 @@ export declare enum FeatureType {

cta?: Maybe<Cta>;
/** The plan's visibility */
visibility: PlanVisibility;
};

@@ -312,70 +415,35 @@ /** Plan is the product plan. */

};
export declare type Feature = {
featureSlug: FeatureSlug;
class?: Maybe<FeatureClass>;
export declare type FeatureSlug = {
__typename?: 'FeatureSlug';
/** The URL-friendly slug of this feature slug */
slug: Scalars['String'];
/** The human-readable name of this feature slug */
name: Scalars['String'];
/** visiblity of this feature slug */
visibility: FeatureSlugVisibility;
};
export declare type BooleanFeature = Feature & {
__typename?: 'BooleanFeature';
featureSlug: FeatureSlug;
/** METERED is not a valid class for Boolean features. */
class: FeatureClass;
/**
* value is a convenience field.
*
* It is only populated when the feature's class is FIXED.
*/
value?: Maybe<BooleanFeatureValue>;
/**
* values is the list of FeatureValues for this feature. CONFIGURED and METERED
* classes can have at most 25 feature values. FIXED types can have at most 1
* feature value.
*
* TODO: add a note about when publishing you must have exactly one value for FIXED,
* at least 2 for CONFIGURED BOOL and STRING, and at least 1 for CONFIGURED and
* METERED INT.
*/
values: Array<BooleanFeatureValue>;
/**
* FeatureSelection. for cost estimation, and eventual subscription.
*
* Exactly one of booleanSelection, intSelection, or stringSelection must be
* present.
*/
export declare type FeatureSelection = {
slug: Scalars['String'];
/** For a BOOLEAN feature */
booleanSelection?: Maybe<Scalars['Boolean']>;
/** For an INT or INT_RANGE feature */
intSelection?: Maybe<Scalars['Int']>;
/** For a STRING feature. */
stringSelection?: Maybe<Scalars['String']>;
};
export declare type IntFeature = Feature & {
__typename?: 'IntFeature';
featureSlug: FeatureSlug;
/** METERED is not a valid class for Int features. */
class: FeatureClass;
units?: Maybe<Units>;
/**
* value is a convenience field.
*
* It is only populated when the feature's class is FIXED.
*/
value?: Maybe<IntFeatureValue>;
/**
* values is the list of FeatureValues for this feature. CONFIGURED and METERED
* classes can have at most 25 feature values. FIXED types can have at most 1
* feature value.
*
* TODO: add a note about when publishing you must have exactly one value for FIXED,
* at least 2 for CONFIGURED Boolean and String, and at least 1 for CONFIGURED and
* METERED Int
*/
values: Array<IntFeatureValue>;
};
/** Units defines an optional unit suffix for Int or IntRange features. */
export declare type Units = {
__typename?: 'Units';
single: Scalars['String'];
plural: Scalars['String'];
};
export declare type Greeting = {
__typename?: 'Greeting';
output: Scalars['String'];
};
export declare type GetProductQueryVariables = Exact<{
slug: Scalars['String'];
export declare type EmbeddedProductQueryVariables = Exact<{
embedId: Scalars['ID'];
}>;
export declare type GetProductQuery = ({
export declare type EmbeddedProductQuery = ({
__typename?: 'Query';
} & {
product?: Maybe<({
__typename?: 'Product';
} & Pick<Product, 'slug' | 'name'> & {
embeddedProduct?: Maybe<({
__typename?: 'EmbeddedProduct';
} & Pick<EmbeddedProduct, 'slug' | 'name'> & {
featureSlugs?: Maybe<({

@@ -398,10 +466,7 @@ __typename?: 'FeatureSlugPage';

features: Array<({
__typename: 'IntRangeFeature';
} & Pick<IntRangeFeature, 'class'> & {
intRangeValues: Array<({
__typename?: 'IntRangeFeatureValue';
} & Pick<IntRangeFeatureValue, 'min' | 'max' | 'increments' | 'cost'>)>;
units?: Maybe<({
__typename?: 'Units';
} & Pick<Units, 'single' | 'plural'>)>;
__typename: 'BooleanFeature';
} & Pick<BooleanFeature, 'class'> & {
booleanValues: Array<({
__typename?: 'BooleanFeatureValue';
} & Pick<BooleanFeatureValue, 'display' | 'value' | 'cost'>)>;
featureSlug: ({

@@ -411,2 +476,8 @@ __typename?: 'FeatureSlug';

}) | ({
__typename: 'IntFeature';
} & Pick<IntFeature, 'class'> & {
featureSlug: ({
__typename?: 'FeatureSlug';
} & Pick<FeatureSlug, 'slug'>);
}) | ({
__typename: 'ExcludedFeature';

@@ -427,16 +498,13 @@ } & Pick<ExcludedFeature, 'class'> & {

}) | ({
__typename: 'BooleanFeature';
} & Pick<BooleanFeature, 'class'> & {
booleanValues: Array<({
__typename?: 'BooleanFeatureValue';
} & Pick<BooleanFeatureValue, 'display' | 'value' | 'cost'>)>;
__typename: 'IntRangeFeature';
} & Pick<IntRangeFeature, 'class'> & {
intRangeValues: Array<({
__typename?: 'IntRangeFeatureValue';
} & Pick<IntRangeFeatureValue, 'min' | 'max' | 'increments' | 'cost'>)>;
units?: Maybe<({
__typename?: 'Units';
} & Pick<Units, 'single' | 'plural'>)>;
featureSlug: ({
__typename?: 'FeatureSlug';
} & Pick<FeatureSlug, 'slug'>);
}) | ({
__typename: 'IntFeature';
} & Pick<IntFeature, 'class'> & {
featureSlug: ({
__typename?: 'FeatureSlug';
} & Pick<FeatureSlug, 'slug'>);
})>;

@@ -443,0 +511,0 @@ })>;

{
"name": "@manifoldco/web-components",
"version": "0.0.16",
"version": "0.0.17",
"description": "Manifold's Web Components",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

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

Sorry, the diff of this file is not supported yet

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

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

Sorry, the diff of this file is not supported yet

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