@aws-amplify/ui-react 2.0.1-next.6 → 2.1.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.
@@ -0,0 +1,107 @@
1
+ import { CognitoUser } from '@aws-amplify/auth';
2
+ import { PersistentModel, ProducerModelPredicate } from '@aws-amplify/datastore';
3
+ import { a as DataStoreCollectionProps, c as DataStoreCollectionResult, D as DataStoreItemProps, b as DataStoreItemResult, d as DataStoreBindingProps, e as DataStorePredicateObject } from './datastore-c12b9c7a';
4
+ import { S3ProviderGetConfig } from '@aws-amplify/storage';
5
+
6
+ interface AuthUser extends CognitoUser {
7
+ username: string;
8
+ attributes: Record<string, string>;
9
+ }
10
+ interface UseAuthResult {
11
+ user?: AuthUser;
12
+ isLoading: boolean;
13
+ error?: Error;
14
+ fetch?: () => void;
15
+ }
16
+ /**
17
+ * Amplify Auth React hook
18
+ * @internal
19
+ */
20
+ declare const useAuth: () => UseAuthResult;
21
+
22
+ /**
23
+ * Perform a collection query against a DataStore model
24
+ * @internal
25
+ */
26
+ declare const useDataStoreCollection: <M extends Readonly<{
27
+ id: string;
28
+ } & Record<string, any>>>({ model, criteria, pagination, }: DataStoreCollectionProps<M>) => DataStoreCollectionResult<M>;
29
+ /**
30
+ * Perform a single record query against a DataStore model
31
+ * @internal
32
+ */
33
+ declare const useDataStoreItem: <M extends Readonly<{
34
+ id: string;
35
+ } & Record<string, any>>>({ model, id, }: DataStoreItemProps<M>) => DataStoreItemResult<M>;
36
+ /**
37
+ * Perform a query against a DataStore model
38
+ * @internal
39
+ */
40
+ declare function useDataStoreBinding<Model extends PersistentModel>(props: DataStoreBindingProps<Model, 'record'>): DataStoreItemResult<Model>;
41
+ declare function useDataStoreBinding<Model extends PersistentModel>(props: DataStoreBindingProps<Model, 'collection'>): DataStoreCollectionResult<Model>;
42
+
43
+ interface UseStorageURLResult {
44
+ url?: string;
45
+ error?: Error;
46
+ isLoading: boolean;
47
+ }
48
+ /**
49
+ * Computes a public URL for an Amplify Storage file
50
+ * @internal
51
+ */
52
+ declare const useStorageURL: (key: string, options?: S3ProviderGetConfig) => {
53
+ fetch: () => () => void;
54
+ url?: string;
55
+ error?: Error;
56
+ isLoading: boolean;
57
+ };
58
+
59
+ /**
60
+ * Creates a DataStore compatible predicate function from an object representation
61
+ * @internal
62
+ */
63
+ declare const createDataStorePredicate: <Model extends Readonly<{
64
+ id: string;
65
+ } & Record<string, any>>>(predicateObject: DataStorePredicateObject) => ProducerModelPredicate<Model>;
66
+
67
+ /**
68
+ * This method is used to parse through all of the overrides and
69
+ * only pass the relevant child overrides for a given component.
70
+ * @internal
71
+ * @param overrides escape hatch props
72
+ * @param elementHierarchy
73
+ * @returns overrides only for specified element
74
+ */
75
+ declare const findChildOverrides: (overrides: EscapeHatchProps | null | undefined, elementHierarchy: string) => any;
76
+ /**
77
+ * This helper method is used to get the overrides
78
+ * that will be applied to a component
79
+ * @internal
80
+ * @param overrides escape hatch props
81
+ * @param elementHierarchy
82
+ * @returns component overrides
83
+ */
84
+ declare const getOverrideProps: (overrides: EscapeHatchProps | null | undefined, elementHierarchy: string) => {
85
+ [k: string]: string;
86
+ };
87
+ declare type EscapeHatchProps = {
88
+ [elementHierarchy: string]: Record<string, string>;
89
+ };
90
+ declare type VariantValues = {
91
+ [key: string]: string;
92
+ };
93
+ declare type Variant = {
94
+ variantValues: VariantValues;
95
+ overrides: EscapeHatchProps;
96
+ };
97
+ /**
98
+ * Given a list of style variants, select a given one based on input props
99
+ * @internal
100
+ * @param variants list of style variants to select from
101
+ * @param props variant values to select from the list, may include additional props, to tidy up usage upstream
102
+ */
103
+ declare function getOverridesFromVariants(variants: Variant[], props: {
104
+ [key: string]: any;
105
+ }): {};
106
+
107
+ export { EscapeHatchProps, UseAuthResult, UseStorageURLResult, Variant, createDataStorePredicate, findChildOverrides, getOverrideProps, getOverridesFromVariants, useAuth, useDataStoreBinding, useDataStoreCollection, useDataStoreItem, useStorageURL };
@@ -0,0 +1 @@
1
+ var k=Object.create;var f=Object.defineProperty,w=Object.defineProperties,B=Object.getOwnPropertyDescriptor,F=Object.getOwnPropertyDescriptors,H=Object.getOwnPropertyNames,O=Object.getOwnPropertySymbols,_=Object.getPrototypeOf,R=Object.prototype.hasOwnProperty,G=Object.prototype.propertyIsEnumerable;var b=(e,t,r)=>t in e?f(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,u=(e,t)=>{for(var r in t||(t={}))R.call(t,r)&&b(e,r,t[r]);if(O)for(var r of O(t))G.call(t,r)&&b(e,r,t[r]);return e},m=(e,t)=>w(e,F(t)),L=e=>f(e,"__esModule",{value:!0}),a=(e,t)=>f(e,"name",{value:t,configurable:!0});var N=(e,t)=>{L(e);for(var r in t)f(e,r,{get:t[r],enumerable:!0})},q=(e,t,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of H(t))!R.call(e,o)&&o!=="default"&&f(e,o,{get:()=>t[o],enumerable:!(r=B(t,o))||r.enumerable});return e},l=e=>q(L(f(e!=null?k(_(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);N(exports,{createDataStorePredicate:()=>y,findChildOverrides:()=>I,getOverrideProps:()=>U,getOverridesFromVariants:()=>C,useAuth:()=>T,useDataStoreBinding:()=>z,useDataStoreCollection:()=>E,useDataStoreItem:()=>v,useStorageURL:()=>J});var p=l(require("react"));var A=l(require("@aws-amplify/auth")),P=l(require("@aws-amplify/core")),h=l(require("react")),T=a(()=>{let[e,t]=(0,h.useState)({error:void 0,isLoading:!0,user:void 0}),r=a(({payload:i})=>{switch(i.event){case"signIn":return t({user:i.data,isLoading:!1});case"signOut":return t({isLoading:!1});default:break}},"handleAuth"),o=a(()=>(t({isLoading:!0}),A.default.currentAuthenticatedUser().then(i=>t({user:i,isLoading:!1})).catch(i=>t({error:i,isLoading:!1})),P.Hub.listen("auth",r),()=>P.Hub.remove("auth",r)),"fetch");return(0,h.useEffect)(o,[]),m(u({},e),{fetch:o})},"useAuth");var S=l(require("@aws-amplify/datastore")),c=l(require("react")),E=a(({model:e,criteria:t,pagination:r})=>{let[o,i]=(0,c.useState)([]),[n,s]=(0,c.useState)(!1),[d,g]=(0,c.useState)(),D=a(()=>{s(!0),S.DataStore.query(e,t,r).then(i).catch(g).finally(()=>s(!1))},"fetch");return(0,c.useEffect)(D,[]),{error:d,fetch:D,items:o,isLoading:n}},"useDataStoreCollection"),v=a(({model:e,id:t})=>{let[r,o]=(0,c.useState)(),[i,n]=(0,c.useState)(!1),[s,d]=(0,c.useState)(),g=a(()=>{n(!0),S.DataStore.query(e,t).then(o).catch(d).finally(()=>n(!1))},"fetch");return(0,c.useEffect)(g,[]),{error:s,fetch:g,item:r,isLoading:i}},"useDataStoreItem");function z(e){return e.type==="record"?v(e):E(e)}a(z,"useDataStoreBinding");var x=l(require("@aws-amplify/storage")),M=l(require("react")),J=a((e,t)=>{let[r,o]=(0,M.useState)({isLoading:!0}),i=JSON.stringify(t),n=a(()=>{o({isLoading:!0});let s=x.Storage.get(e,t);return s.then(d=>o({url:d,isLoading:!1})).catch(d=>o({error:d,isLoading:!1})),()=>x.Storage.cancel(s)},"fetch");return(0,M.useEffect)(n,[e,i]),m(u({},r),{fetch:n})},"useStorageURL");var K=l(require("@radix-ui/react-id"));var V=a(e=>typeof e=="function","isFunction");var I=a((e,t)=>{if(!e)return null;let r=Object.entries(e).filter(o=>o[0].startsWith(t));return Object.assign({},...Array.from(r,([o,i])=>({[o.replace(t,"")]:i})))},"findChildOverrides"),U=a((e,t)=>{if(!e)return null;let r=Object.entries(e).filter(([o])=>o===t).flatMap(([,o])=>Object.entries(o)).filter(o=>o==null?void 0:o[0]);return Object.fromEntries(r)},"getOverrideProps");function C(e,t){let r=[...new Set(e.flatMap(n=>Object.keys(n.variantValues)))],o=Object.keys(t).filter(n=>r.includes(n)&&t[n]).reduce((n,s)=>(n[s]=t[s],n),{});return e.filter(({variantValues:n})=>Object.keys(n).length===Object.keys(o).length&&Object.entries(n).every(([s,d])=>o[s]===d)).reduce((n,s)=>u(u({},n),s.overrides),{})}a(C,"getOverridesFromVariants");var j=a(e=>e.reduce((t,r)=>o=>r(t(o)),t=>t),"mergePredicates"),y=a(e=>{let{and:t,or:r,field:o,operator:i,operand:n}=e;if(Array.isArray(t)){let s=t.map(d=>y(d));return d=>d.and(j(s))}else if(Array.isArray(r)){let s=r.map(d=>y(d));return d=>d.or(j(s))}return s=>V(s[o])?s[o].call(s,i,n):s},"createDataStorePredicate");0&&(module.exports={createDataStorePredicate,findChildOverrides,getOverrideProps,getOverridesFromVariants,useAuth,useDataStoreBinding,useDataStoreCollection,useDataStoreItem,useStorageURL});
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../src/internal.tsx", "../src/globals.js", "../src/hooks/useAuth.ts", "../src/hooks/useDataStore.tsx", "../src/hooks/useStorageURL.ts", "../src/primitives/shared/utils.ts", "../src/primitives/shared/datastore.ts"],
4
+ "sourcesContent": ["export * from './hooks/useAuth';\nexport * from './hooks/useDataStore';\nexport * from './hooks/useStorageURL';\nexport * from './primitives/shared/datastore';\nexport {\n EscapeHatchProps,\n Variant,\n findChildOverrides,\n getOverridesFromVariants,\n getOverrideProps,\n} from './primitives/shared/utils';\n", "/**\n * This shim exists for `esbuild` to `inject` into every .tsx file.\n * Otherwise, `import * as React from 'react'` would need to be added manually\n *\n * See: https://esbuild.github.io/content-types/#auto-import-for-jsx\n * See: https://github.com/egoist/tsup/issues/390\n */\n\nimport * as React from 'react';\nexport { React };\n", "import Auth, { CognitoUser } from '@aws-amplify/auth';\nimport { Hub } from '@aws-amplify/core';\nimport { useEffect, useState } from 'react';\n\n// Exposes relevant CognitoUser properties\ninterface AuthUser extends CognitoUser {\n username: string;\n attributes: Record<string, string>;\n}\n\nexport interface UseAuthResult {\n user?: AuthUser;\n isLoading: boolean;\n error?: Error;\n fetch?: () => void;\n}\n\n/**\n * Amplify Auth React hook\n * @internal\n */\nexport const useAuth = (): UseAuthResult => {\n const [result, setResult] = useState<UseAuthResult>({\n error: undefined,\n isLoading: true,\n user: undefined,\n });\n\n const handleAuth = ({ payload }) => {\n switch (payload.event) {\n case 'signIn':\n return setResult({ user: payload.data, isLoading: false });\n case 'signOut':\n return setResult({ isLoading: false });\n default:\n break;\n }\n };\n\n const fetch = () => {\n setResult({ isLoading: true });\n\n Auth.currentAuthenticatedUser()\n .then((user) => setResult({ user, isLoading: false }))\n .catch((error) => setResult({ error, isLoading: false }));\n\n // Handle Hub Auth events\n Hub.listen('auth', handleAuth);\n\n // Stop listening events on unmount\n return () => Hub.remove('auth', handleAuth);\n };\n\n useEffect(fetch, []);\n\n return { ...result, fetch };\n};\n", "import { DataStore, PersistentModel } from '@aws-amplify/datastore';\nimport { useEffect, useState } from 'react';\nimport {\n DataStoreBindingProps,\n DataStoreCollectionProps,\n DataStoreCollectionResult,\n DataStoreItemProps,\n DataStoreItemResult,\n} from '../primitives/types/datastore';\n\n/**\n * Perform a collection query against a DataStore model\n * @internal\n */\nexport const useDataStoreCollection = <M extends PersistentModel>({\n model,\n criteria,\n pagination,\n}: DataStoreCollectionProps<M>): DataStoreCollectionResult<M> => {\n const [items, setItems] = useState<M[]>([]);\n const [isLoading, setLoading] = useState<boolean>(false);\n const [error, setError] = useState<Error>();\n\n const fetch = () => {\n setLoading(true);\n\n DataStore.query(model, criteria, pagination)\n .then(setItems)\n .catch(setError)\n .finally(() => setLoading(false));\n };\n\n // Fetch on next render cycle\n useEffect(fetch, []);\n\n return {\n error,\n fetch,\n items,\n isLoading,\n };\n};\n\n/**\n * Perform a single record query against a DataStore model\n * @internal\n */\nexport const useDataStoreItem = <M extends PersistentModel>({\n model,\n id,\n}: DataStoreItemProps<M>): DataStoreItemResult<M> => {\n const [item, setItem] = useState<M>();\n const [isLoading, setLoading] = useState<boolean>(false);\n const [error, setError] = useState<Error>();\n\n const fetch = () => {\n setLoading(true);\n\n DataStore.query(model, id)\n .then(setItem)\n .catch(setError)\n .finally(() => setLoading(false));\n };\n\n // Fetch on next render cycle\n useEffect(fetch, []);\n\n return {\n error,\n fetch,\n item,\n isLoading,\n };\n};\n\n/**\n * Perform a query against a DataStore model\n * @internal\n */\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props: DataStoreBindingProps<Model, 'record'>\n): DataStoreItemResult<Model>;\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props: DataStoreBindingProps<Model, 'collection'>\n): DataStoreCollectionResult<Model>;\nexport function useDataStoreBinding<Model extends PersistentModel>(\n props:\n | DataStoreBindingProps<Model, 'record'>\n | DataStoreBindingProps<Model, 'collection'>\n): DataStoreItemResult<Model> | DataStoreCollectionResult<Model> {\n return props.type === 'record'\n ? useDataStoreItem(props)\n : useDataStoreCollection(props);\n}\n", "import { S3ProviderGetConfig, Storage } from '@aws-amplify/storage';\nimport { useEffect, useState } from 'react';\n\nexport interface UseStorageURLResult {\n url?: string;\n error?: Error;\n isLoading: boolean;\n}\n\n/**\n * Computes a public URL for an Amplify Storage file\n * @internal\n */\nexport const useStorageURL = (key: string, options?: S3ProviderGetConfig) => {\n const [result, setResult] = useState<UseStorageURLResult>({\n isLoading: true,\n });\n\n // Used to prevent an infinite loop on useEffect, because `options`\n // will have a different reference on every render\n const serializedOptions = JSON.stringify(options);\n\n const fetch = () => {\n setResult({ isLoading: true });\n\n const promise = Storage.get(key, options);\n\n // Attempt to fetch storage object url\n promise\n .then((url) => setResult({ url, isLoading: false }))\n .catch((error) => setResult({ error, isLoading: false }));\n\n // Cancel current promise on unmount\n return () => Storage.cancel(promise);\n };\n\n useEffect(fetch, [key, serializedOptions]);\n\n return { ...result, fetch };\n};\n", "import { useId } from '@radix-ui/react-id';\n\nexport const strHasLength = (str: unknown): str is string =>\n typeof str === 'string' && str.length > 0;\n\nexport const isFunction = (fn: unknown): fn is Function =>\n typeof fn === 'function';\n\nexport const isNullOrEmptyString = (value: unknown) =>\n value == null || (typeof value === 'string' && value.length === 0);\n\n/**\n * Create a consecutive integer array from start value to end value.\n * @param start start value\n * @param end end value\n * @returns an integer array with elements from start to end consecutively\n */\nexport const getConsecutiveIntArray = (start: number, end: number) => {\n const length = end - start + 1;\n return Array.from({ length }, (_, idx) => idx + start);\n};\n\n/**\n * Create a uuid to use with amplify fields unless\n * an id is provided\n * @param id user specified id\n * @returns string\n */\nexport const useStableId = (id?: string) => useId(id);\n\n// Prefixed autogenerated id created by useStableId\nexport const AUTO_GENERATED_ID_PREFIX = 'radix-id-';\n\n/**\n * This method is used to parse through all of the overrides and\n * only pass the relevant child overrides for a given component.\n * @internal\n * @param overrides escape hatch props\n * @param elementHierarchy\n * @returns overrides only for specified element\n */\nexport const findChildOverrides = (\n overrides: EscapeHatchProps | null | undefined,\n elementHierarchy: string\n) => {\n if (!overrides) {\n return null;\n }\n\n const filteredOverrides = Object.entries(overrides).filter((m) =>\n m[0].startsWith(elementHierarchy)\n );\n\n return Object.assign(\n {},\n ...Array.from(filteredOverrides, ([k, v]) => ({\n [k.replace(elementHierarchy, '')]: v,\n }))\n );\n};\n\n/**\n * This helper method is used to get the overrides\n * that will be applied to a component\n * @internal\n * @param overrides escape hatch props\n * @param elementHierarchy\n * @returns component overrides\n */\nexport const getOverrideProps = (\n overrides: EscapeHatchProps | null | undefined,\n elementHierarchy: string\n) => {\n if (!overrides) {\n return null;\n }\n\n const componentOverrides = Object.entries(overrides)\n .filter(([key]) => key === elementHierarchy)\n .flatMap(([, value]) => Object.entries(value))\n .filter((m) => m?.[0]);\n\n return Object.fromEntries(componentOverrides);\n};\n\nexport type EscapeHatchProps = {\n [elementHierarchy: string]: Record<string, string>;\n};\n\ntype VariantValues = { [key: string]: string };\nexport type Variant = {\n variantValues: VariantValues;\n overrides: EscapeHatchProps;\n};\n\n/**\n * Given a list of style variants, select a given one based on input props\n * @internal\n * @param variants list of style variants to select from\n * @param props variant values to select from the list, may include additional props, to tidy up usage upstream\n */\nexport function getOverridesFromVariants(\n variants: Variant[],\n props: { [key: string]: any }\n) {\n // Get unique keys from the provided variants\n const variantValueKeys = [\n ...new Set(\n variants.flatMap((variant) => Object.keys(variant.variantValues))\n ),\n ];\n\n // Get variant value object from provided props, dropping keys that aren't in variantValueKeys, or whose vals are falsey\n const variantValuesFromProps: VariantValues = Object.keys(props)\n .filter((i) => variantValueKeys.includes(i) && props[i])\n .reduce((acc, key) => {\n acc[key] = props[key];\n return acc;\n }, {});\n\n const matchedVariants = variants.filter(({ variantValues }) => {\n return (\n Object.keys(variantValues).length ===\n Object.keys(variantValuesFromProps).length &&\n Object.entries(variantValues).every(\n ([key, value]) => variantValuesFromProps[key] === value\n )\n );\n });\n\n return matchedVariants.reduce((overrides, variant) => {\n return { ...overrides, ...variant.overrides };\n }, {});\n}\n", "import {\n ModelPredicate,\n PersistentModel,\n ProducerModelPredicate,\n} from '@aws-amplify/datastore';\nimport { DataStorePredicateObject } from '../types/datastore';\nimport { isFunction } from './utils';\n\n/**\n * Given an array of predicates, compose them in sequential order\n */\nconst mergePredicates = <Model extends PersistentModel>(\n predicates: ProducerModelPredicate<Model>[]\n): ProducerModelPredicate<Model> =>\n predicates.reduce(\n (previous, current) => (predicate) => current(previous(predicate)),\n (predicate) => predicate\n );\n\n/**\n * Creates a DataStore compatible predicate function from an object representation\n * @internal\n */\nexport const createDataStorePredicate = <Model extends PersistentModel>(\n predicateObject: DataStorePredicateObject\n): ProducerModelPredicate<Model> => {\n const {\n and: groupAnd,\n or: groupOr,\n field,\n operator,\n operand,\n } = predicateObject;\n\n if (Array.isArray(groupAnd)) {\n const predicates = groupAnd.map((condition) =>\n createDataStorePredicate<Model>(condition)\n );\n\n return (p: ModelPredicate<Model>) => p.and(mergePredicates(predicates));\n } else if (Array.isArray(groupOr)) {\n const predicates = groupOr.map((condition) =>\n createDataStorePredicate<Model>(condition)\n );\n\n return (p: ModelPredicate<Model>) => p.or(mergePredicates(predicates));\n }\n\n return (predicate: ModelPredicate<Model>) => {\n if (isFunction(predicate[field])) {\n return predicate[field].call(predicate, operator, operand);\n }\n\n return predic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D,OAAO,AAAC,GAAM,EAAiB,SAAS,IAAM,EAAM,IACpD,OAAO,CAAC,EAAK,IACZ,GAAI,GAAO,EAAM,GACV,GACN,IAYL,MAAO,AAViB,GAAS,OAAO,CAAC,CAAE,mBAEvC,OAAO,KAAK,GAAe,SACzB,OAAO,KAAK,GAAwB,QACtC,OAAO,QAAQ,GAAe,MAC5B,CAAC,CAAC,EAAK,KAAW,EAAuB,KAAS,IAKjC,OAAO,CAAC,EAAW,IACjC,OAAK,GAAc,EAAQ,WACjC,IA/BW,gCC1FhB,GAAM,GAAkB,EACtB,GAEA,EAAW,OACT,CAAC,EAAU,IAAY,AAAC,GAAc,EAAQ,EAAS,IACvD,AAAC,GAAc,GALK,mBAYX,EAA2B,EACtC,GACkC,CAClC,GAAM,CACJ,IAAK,EACL,GAAI,EACJ,QACA,WACA,WACE,EAEJ,GAAI,MAAM,QAAQ,GAAW,CAC3B,GAAM,GAAa,EAAS,IAAI,AAAC,GAC/B,EAAgC,IAGlC,MAAO,AAAC,IAA6B,EAAE,IAAI,EAAgB,YAClD,MAAM,QAAQ,GAAU,CACjC,GAAM,GAAa,EAAQ,IAAI,AAAC,GAC9B,EAAgC,IAGlC,MAAO,AAAC,IAA6B,EAAE,GAAG,EAAgB,IAG5D,MAAO,AAAC,IACF,EAAW,EAAU,IAChB,EAAU,GAAO,KAAK,EAAW,EAAU,GAG7C,GA9B6B",
6
+ "names": []
7
+ }
package/dist/legacy.d.ts CHANGED
@@ -1 +1 @@
1
- export { AmplifyAuthenticator, AmplifyChatbot, AmplifyPhotoPicker, AmplifyPicker, AmplifyS3Album, AmplifyS3Image, AmplifyS3ImagePicker, AmplifyS3Text, AmplifyS3TextPicker, withAuthenticator } from '@aws-amplify/ui-react-v1';
1
+ export { AmplifyAuthenticator, AmplifyChatbot, AmplifyPhotoPicker, AmplifyPicker, AmplifyS3Album, AmplifyS3Image, AmplifyS3ImagePicker, AmplifyS3Text, AmplifyS3TextPicker, AmplifySignIn, AmplifySignOut, withAuthenticator } from '@aws-amplify/ui-react-v1';
package/dist/legacy.js CHANGED
@@ -1 +1 @@
1
- var a=Object.create;var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var y=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var f=t=>r(t,"__esModule",{value:!0});var h=(t,m)=>{f(t);for(var e in m)r(t,e,{get:m[e],enumerable:!0})},P=(t,m,e)=>{if(m&&typeof m=="object"||typeof m=="function")for(let p of o(m))!c.call(t,p)&&p!=="default"&&r(t,p,{get:()=>m[p],enumerable:!(e=l(m,p))||e.enumerable});return t},A=t=>P(f(r(t!=null?a(y(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);h(exports,{AmplifyAuthenticator:()=>i.AmplifyAuthenticator,AmplifyChatbot:()=>i.AmplifyChatbot,AmplifyPhotoPicker:()=>i.AmplifyPhotoPicker,AmplifyPicker:()=>i.AmplifyPicker,AmplifyS3Album:()=>i.AmplifyS3Album,AmplifyS3Image:()=>i.AmplifyS3Image,AmplifyS3ImagePicker:()=>i.AmplifyS3ImagePicker,AmplifyS3Text:()=>i.AmplifyS3Text,AmplifyS3TextPicker:()=>i.AmplifyS3TextPicker,withAuthenticator:()=>i.withAuthenticator});var S=A(require("react"));var i=A(require("@aws-amplify/ui-react-v1"));0&&(module.exports={AmplifyAuthenticator,AmplifyChatbot,AmplifyPhotoPicker,AmplifyPicker,AmplifyS3Album,AmplifyS3Image,AmplifyS3ImagePicker,AmplifyS3Text,AmplifyS3TextPicker,withAuthenticator});
1
+ var r=Object.create;var f=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var o=Object.getPrototypeOf,c=Object.prototype.hasOwnProperty;var A=t=>f(t,"__esModule",{value:!0});var S=(t,m)=>{A(t);for(var e in m)f(t,e,{get:m[e],enumerable:!0})},h=(t,m,e)=>{if(m&&typeof m=="object"||typeof m=="function")for(let p of a(m))!c.call(t,p)&&p!=="default"&&f(t,p,{get:()=>m[p],enumerable:!(e=y(m,p))||e.enumerable});return t},l=t=>h(A(f(t!=null?r(o(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);S(exports,{AmplifyAuthenticator:()=>i.AmplifyAuthenticator,AmplifyChatbot:()=>i.AmplifyChatbot,AmplifyPhotoPicker:()=>i.AmplifyPhotoPicker,AmplifyPicker:()=>i.AmplifyPicker,AmplifyS3Album:()=>i.AmplifyS3Album,AmplifyS3Image:()=>i.AmplifyS3Image,AmplifyS3ImagePicker:()=>i.AmplifyS3ImagePicker,AmplifyS3Text:()=>i.AmplifyS3Text,AmplifyS3TextPicker:()=>i.AmplifyS3TextPicker,AmplifySignIn:()=>i.AmplifySignIn,AmplifySignOut:()=>i.AmplifySignOut,withAuthenticator:()=>i.withAuthenticator});var n=l(require("react"));var i=l(require("@aws-amplify/ui-react-v1"));0&&(module.exports={AmplifyAuthenticator,AmplifyChatbot,AmplifyPhotoPicker,AmplifyPicker,AmplifyS3Album,AmplifyS3Image,AmplifyS3ImagePicker,AmplifyS3Text,AmplifyS3TextPicker,AmplifySignIn,AmplifySignOut,withAuthenticator});
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/legacy.tsx", "../src/globals.js"],
4
- "sourcesContent": ["export {\n /** @deprecated `AmplifyAuthenticator` is the v1 release. Prefer the latest `Authenticator` for continued support. */\n AmplifyAuthenticator,\n AmplifyChatbot,\n AmplifyPhotoPicker,\n AmplifyPicker,\n AmplifyS3Album,\n AmplifyS3Image,\n AmplifyS3ImagePicker,\n AmplifyS3Text,\n AmplifyS3TextPicker,\n /** @deprecated `withAuthenticator` from legacy. Prefer the latest `withAuthenticator` release for continued support. */\n withAuthenticator,\n} from '@aws-amplify/ui-react-v1';\n", "/**\n * This shim exists for `esbuild` to `inject` into every .tsx file.\n * Otherwise, `import * as React from 'react'` would need to be added manually\n *\n * See: https://esbuild.github.io/content-types/#auto-import-for-jsx\n * See: https://github.com/egoist/tsup/issues/390\n */\n\nimport * as React from 'react';\nexport { React };\n"],
5
- "mappings": "mlBAAA,iaCQA,MAAuB,oBDRvB,MAaO",
4
+ "sourcesContent": ["export {\n /** @deprecated `AmplifyAuthenticator` is the v1 release. Prefer the latest `Authenticator` for continued support. */\n AmplifyAuthenticator,\n AmplifySignIn,\n AmplifySignOut,\n AmplifyChatbot,\n AmplifyPhotoPicker,\n AmplifyPicker,\n AmplifyS3Album,\n AmplifyS3Image,\n AmplifyS3ImagePicker,\n AmplifyS3Text,\n AmplifyS3TextPicker,\n /** @deprecated `withAuthenticator` from legacy. Prefer the latest `withAuthenticator` release for continued support. */\n withAuthenticator,\n} from '@aws-amplify/ui-react-v1';\n", "/**\n * This shim exists for `esbuild` to `inject` into every .tsx file.\n * Otherwise, `import * as React from 'react'` would need to be added manually\n *\n * See: https://esbuild.github.io/content-types/#auto-import-for-jsx\n * See: https://github.com/egoist/tsup/issues/390\n */\n\nimport * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "mlBAAA,ueCQA,MAAuB,oBDRvB,MAeO",
6
6
  "names": []
7
7
  }