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

@aws-amplify/codegen-ui

Package Overview
Dependencies
Maintainers
8
Versions
645
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@aws-amplify/codegen-ui - npm Package Compare versions

Comparing version 1.2.1-q1-release-165b6ab.0 to 1.2.1-q1-release-2a0e625.0

dist/lib/utils/component-mapping-utils.d.ts

1

dist/index.d.ts

@@ -16,1 +16,2 @@ export * from './lib/template-renderer';

export * from './lib/errors';
export * from './lib/utils';

@@ -43,2 +43,3 @@ "use strict";

__exportStar(require("./lib/errors"), exports);
__exportStar(require("./lib/utils"), exports);
//# sourceMappingURL=index.js.map

12

dist/lib/renderer-helper.d.ts

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

import { BoundStudioComponentProperty, CollectionStudioComponentProperty, ConcatenatedStudioComponentProperty, ConditionalStudioComponentProperty, FixedStudioComponentProperty, FormStudioComponentProperty, StudioComponent, StudioComponentAuthProperty, StudioComponentChild, StudioComponentDataPropertyBinding, StudioComponentEventPropertyBinding, StudioComponentSimplePropertyBinding, StudioComponentStoragePropertyBinding, WorkflowStudioComponentProperty } from './types';
import { BoundStudioComponentProperty, CollectionStudioComponentProperty, ConcatenatedStudioComponentProperty, ConditionalStudioComponentProperty, FixedStudioComponentProperty, StateStudioComponentProperty, StudioComponent, StudioComponentAuthProperty, StudioComponentChild, StudioComponentDataPropertyBinding, StudioComponentEventPropertyBinding, StudioComponentSimplePropertyBinding, StudioComponentStoragePropertyBinding, StudioComponentPropertyBinding } from './types';
export declare const StudioRendererConstants: {

@@ -7,3 +7,3 @@ unknownName: string;

export declare function hasAuthProperty(component: StudioComponent | StudioComponentChild): component is StudioComponent;
export declare type ComponentPropertyValueTypes = ConcatenatedStudioComponentProperty | ConditionalStudioComponentProperty | FixedStudioComponentProperty | BoundStudioComponentProperty | CollectionStudioComponentProperty | WorkflowStudioComponentProperty | FormStudioComponentProperty | StudioComponentAuthProperty;
export declare type ComponentPropertyValueTypes = ConcatenatedStudioComponentProperty | ConditionalStudioComponentProperty | FixedStudioComponentProperty | BoundStudioComponentProperty | CollectionStudioComponentProperty | StateStudioComponentProperty | StudioComponentAuthProperty;
export declare function isAuthProperty(prop: ComponentPropertyValueTypes): prop is StudioComponentAuthProperty;

@@ -17,5 +17,5 @@ export declare function isStudioComponentWithAuthProperty(component: StudioComponent | StudioComponentChild): component is StudioComponent;

export declare function isStudioComponentWithVariants(component: StudioComponent | StudioComponentChild): component is StudioComponent & Required<Pick<StudioComponent, 'variants'>>;
export declare function isStudioComponentWithActions(component: StudioComponent | StudioComponentChild): component is StudioComponent & Required<Pick<StudioComponent, 'actions'>>;
export declare function isDataPropertyBinding(prop: StudioComponentDataPropertyBinding | StudioComponentStoragePropertyBinding | StudioComponentEventPropertyBinding | StudioComponentSimplePropertyBinding): prop is StudioComponentDataPropertyBinding;
export declare function isStoragePropertyBinding(prop: StudioComponentDataPropertyBinding | StudioComponentStoragePropertyBinding | StudioComponentEventPropertyBinding | StudioComponentSimplePropertyBinding): prop is StudioComponentStoragePropertyBinding;
export declare function isSimplePropertyBinding(prop: StudioComponentDataPropertyBinding | StudioComponentStoragePropertyBinding | StudioComponentEventPropertyBinding | StudioComponentSimplePropertyBinding): prop is StudioComponentSimplePropertyBinding;
export declare function isDataPropertyBinding(prop: StudioComponentPropertyBinding): prop is StudioComponentDataPropertyBinding;
export declare function isStoragePropertyBinding(prop: StudioComponentPropertyBinding): prop is StudioComponentStoragePropertyBinding;
export declare function isSimplePropertyBinding(prop: StudioComponentPropertyBinding): prop is StudioComponentSimplePropertyBinding;
export declare function isEventPropertyBinding(prop: StudioComponentPropertyBinding): prop is StudioComponentEventPropertyBinding;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isSimplePropertyBinding = exports.isStoragePropertyBinding = exports.isDataPropertyBinding = exports.isStudioComponentWithActions = exports.isStudioComponentWithVariants = exports.isStudioComponentWithCollectionProperties = exports.isStudioComponentWithAuthProperty = exports.isAuthProperty = exports.hasAuthProperty = exports.isStudioComponentWithBinding = exports.StudioRendererConstants = void 0;
exports.isEventPropertyBinding = exports.isSimplePropertyBinding = exports.isStoragePropertyBinding = exports.isDataPropertyBinding = exports.isStudioComponentWithVariants = exports.isStudioComponentWithCollectionProperties = exports.isStudioComponentWithAuthProperty = exports.isAuthProperty = exports.hasAuthProperty = exports.isStudioComponentWithBinding = exports.StudioRendererConstants = void 0;
/*

@@ -57,6 +57,2 @@ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.

exports.isStudioComponentWithVariants = isStudioComponentWithVariants;
function isStudioComponentWithActions(component) {
return 'actions' in component && component.actions !== undefined;
}
exports.isStudioComponentWithActions = isStudioComponentWithActions;
function isDataPropertyBinding(prop) {

@@ -80,2 +76,6 @@ return 'type' in prop && prop.type === 'Data';

exports.isSimplePropertyBinding = isSimplePropertyBinding;
function isEventPropertyBinding(prop) {
return 'type' in prop && prop.type === 'Event';
}
exports.isEventPropertyBinding = isEventPropertyBinding;
//# sourceMappingURL=renderer-helper.js.map

@@ -53,3 +53,3 @@ export declare type FigmaMetadata = {

bindingProperties: {
[propertyName: string]: StudioComponentDataPropertyBinding | StudioComponentStoragePropertyBinding | StudioComponentSimplePropertyBinding | StudioComponentEventPropertyBinding;
[propertyName: string]: StudioComponentPropertyBinding;
};

@@ -62,8 +62,3 @@ /**

};
/**
* Component actions
*/
actions?: {
[actionName: string]: StudioComponentAction;
};
events?: StudioComponentEvents;
};

@@ -104,3 +99,3 @@ /**

bindingProperties: {
[propertyName: string]: StudioComponentDataPropertyBinding | StudioComponentStoragePropertyBinding | StudioComponentSimplePropertyBinding | StudioComponentEventPropertyBinding;
[propertyName: string]: StudioComponentPropertyBinding;
};

@@ -113,2 +108,3 @@ /**

};
events?: StudioComponentEvents;
};

@@ -144,9 +140,3 @@ export declare type StudioComponentSimplePropertyBinding = {

children?: StudioComponentChild[];
/**
* Event <-> Action mapping (e.g click => SignOutAction)
* When an event is triggered, an action is executed
*/
events?: {
[eventName: string]: string;
};
events?: StudioComponentEvents;
};

@@ -204,3 +194,3 @@ /**

};
export declare type StudioComponentProperty = (FixedStudioComponentProperty | BoundStudioComponentProperty | CollectionStudioComponentProperty | ConcatenatedStudioComponentProperty | ConditionalStudioComponentProperty | WorkflowStudioComponentProperty | FormStudioComponentProperty | StudioComponentAuthProperty) & CommonPropertyValues;
export declare type StudioComponentProperty = (FixedStudioComponentProperty | BoundStudioComponentProperty | CollectionStudioComponentProperty | ConcatenatedStudioComponentProperty | ConditionalStudioComponentProperty | StudioComponentAuthProperty | StateStudioComponentProperty) & CommonPropertyValues;
/**

@@ -275,25 +265,7 @@ * This represents a component property that is configured with either

};
/**
* This represents a component property that is configured with either
* data bound values
*/
export declare type WorkflowStudioComponentProperty = {
event: string;
export declare type StateStudioComponentProperty = {
componentName: string;
property: string;
};
/**
* This is the configuration for a form binding. This is
* technically an extension of Workflows but because it is
* pretty unique, it should be separated out with its own definition
*/
export declare type FormStudioComponentProperty = {
/**
* The model of the DataStore object
*/
model: string;
/**
* The binding configuration for the form
*/
bindings: FormBindings;
};
/**
* This represent the configuration for binding a component property

@@ -316,2 +288,3 @@ * to Amplify specific information

};
export declare type StudioComponentPropertyBinding = StudioComponentDataPropertyBinding | StudioComponentStoragePropertyBinding | StudioComponentSimplePropertyBinding | StudioComponentEventPropertyBinding;
/**

@@ -341,15 +314,2 @@ * This represent the configuration for binding a component property

};
export declare type FormBindings = {
[key: string]: FormBindingElement;
};
export declare type FormBindingElement = {
/**
* The name of the component to fetch a value from
*/
element: string;
/**
* The property component to get the value from.
*/
property: string;
};
/**

@@ -394,4 +354,23 @@ * This represent the configuration for binding a component property

Authentication = "Authentication",
Storage = "Storage"
Storage = "Storage",
Event = "Event"
}
export declare enum StudioGenericEvent {
click = "click",
doubleclick = "doubleclick",
mousedown = "mousedown",
mouseenter = "mouseenter",
mouseleave = "mouseleave",
mousemove = "mousemove",
mouseout = "mouseout",
mouseover = "mouseover",
mouseup = "mouseup",
change = "change",
input = "input",
focus = "focus",
blur = "blur",
keydown = "keydown",
keypress = "keypress",
keyup = "keyup"
}
/**

@@ -428,2 +407,63 @@ * This represents the model and field you want to bind

};
export declare type StudioComponentEvent = BoundStudioComponentEvent | ActionStudioComponentEvent;
export declare type BoundStudioComponentEvent = {
bindingEvent: string;
};
export declare type ActionStudioComponentEvent = NavigationAction | AuthSignOutAction | DataStoreCreateItemAction | DataStoreUpdateItemAction | DataStoreDeleteItemAction | MutationAction;
export declare type NavigationAction = {
action: 'Amplify.Navigation';
parameters: {
type: StudioComponentProperty;
url?: StudioComponentProperty;
anchor?: StudioComponentProperty;
target?: StudioComponentProperty;
};
};
export declare type AuthSignOutAction = {
action: 'Amplify.AuthSignOut';
parameters: {
global: StudioComponentProperty;
};
};
export declare type DataStoreCreateItemAction = {
action: 'Amplify.DataStoreCreateItemAction';
parameters: {
model: string;
fields: {
[propertyName: string]: StudioComponentProperty;
};
};
};
export declare type DataStoreUpdateItemAction = {
action: 'Amplify.DataStoreUpdateItemAction';
parameters: {
model: string;
id: StudioComponentProperty;
fields: {
[propertyName: string]: StudioComponentProperty;
};
};
};
export declare type DataStoreDeleteItemAction = {
action: 'Amplify.DataStoreDeleteItemAction';
parameters: {
model: string;
id: StudioComponentProperty;
};
};
export declare type MutationAction = {
action: 'Amplify.Mutation';
parameters: {
state: MutationActionSetStateParameter;
};
};
export declare type MutationActionSetStateParameter = {
componentName: string;
property: string;
set: StudioComponentProperty;
};
export declare type StateReference = StateStudioComponentProperty | MutationActionSetStateParameter;
export declare type StudioComponentEvents = {
[eventName: string]: StudioComponentEvent;
};
export declare type StudioTheme = {

@@ -443,40 +483,1 @@ name: string;

};
/**
* Component action types
*/
export declare type StudioComponentAction = AmplifyAuthSignOutAction | NavigationAction;
/**
* Amplify Auth signout Action type
*/
export declare type AmplifyAuthSignOutAction = {
type: 'Amplify.Auth.SignOut';
parameters?: {
global: boolean;
};
};
/**
* Navigation related action types.
*/
export declare type NavigationAction = NavigationRedirectAction | NavigationOpenAction | NavigationRefreshAction;
/**
* Redirect action type
*/
export declare type NavigationRedirectAction = {
type: 'Navigation.Redirect';
parameters: {
href: string;
replaceHistory?: boolean;
};
};
/**
* Redirect action type
*/
export declare type NavigationOpenAction = {
type: 'Navigation.Open';
parameters: {
href: string;
};
};
export declare type NavigationRefreshAction = {
type: 'Navigation.Refresh';
};
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.StudioComponentPropertyBindingType = exports.StudioComponentPropertyType = void 0;
exports.StudioGenericEvent = exports.StudioComponentPropertyBindingType = exports.StudioComponentPropertyType = void 0;
/**

@@ -22,3 +22,23 @@ * These are the primitive value types

StudioComponentPropertyBindingType["Storage"] = "Storage";
StudioComponentPropertyBindingType["Event"] = "Event";
})(StudioComponentPropertyBindingType = exports.StudioComponentPropertyBindingType || (exports.StudioComponentPropertyBindingType = {}));
var StudioGenericEvent;
(function (StudioGenericEvent) {
StudioGenericEvent["click"] = "click";
StudioGenericEvent["doubleclick"] = "doubleclick";
StudioGenericEvent["mousedown"] = "mousedown";
StudioGenericEvent["mouseenter"] = "mouseenter";
StudioGenericEvent["mouseleave"] = "mouseleave";
StudioGenericEvent["mousemove"] = "mousemove";
StudioGenericEvent["mouseout"] = "mouseout";
StudioGenericEvent["mouseover"] = "mouseover";
StudioGenericEvent["mouseup"] = "mouseup";
StudioGenericEvent["change"] = "change";
StudioGenericEvent["input"] = "input";
StudioGenericEvent["focus"] = "focus";
StudioGenericEvent["blur"] = "blur";
StudioGenericEvent["keydown"] = "keydown";
StudioGenericEvent["keypress"] = "keypress";
StudioGenericEvent["keyup"] = "keyup";
})(StudioGenericEvent = exports.StudioGenericEvent || (exports.StudioGenericEvent = {}));
//# sourceMappingURL=studio-types.js.map

@@ -40,2 +40,3 @@ "use strict";

const errors_1 = require("./errors");
const types_1 = require("./types");
const alphaNumString = () => {

@@ -58,2 +59,7 @@ return yup.string().matches(/^[a-zA-Z0-9]*$/, { message: 'Expected an alphanumeric string' });

};
const eventsSchema = yup
.object(Object.fromEntries(Object.keys(types_1.StudioGenericEvent)
.filter((eventType) => Number.isNaN(Number(eventType)))
.map((eventType) => [eventType, yup.object().nullable()])))
.noUnknown();
/**

@@ -75,2 +81,3 @@ * Component Schema Definitions

actions: yup.object().nullable(),
events: eventsSchema.nullable(),
});

@@ -91,2 +98,3 @@ const studioComponentSchema = yup

actions: yup.object().nullable(),
events: eventsSchema.nullable(),
})

@@ -93,0 +101,0 @@ // eslint-disable-next-line func-names

{
"name": "@aws-amplify/codegen-ui",
"version": "1.2.1-q1-release-165b6ab.0",
"version": "1.2.1-q1-release-2a0e625.0",
"description": "generic component code generation interface definitions",

@@ -53,3 +53,3 @@ "author": "Amazon Web Services",

},
"gitHead": "59d502fd9db48c7d2066167c48174dddd09636c5"
"gitHead": "86f5dbe57b71568de50ee716ee29bb745e21d362"
}

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

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