@elliemae/ds-chat-empty-state 3.28.1-rc.2 → 3.29.0-next.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.
- package/dist/cjs/ChatEmptyState.js.map +2 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/react-desc-prop-types.js.map +2 -2
- package/dist/cjs/typescript-testing/typescript-chat-empty-state-valid.js +71 -0
- package/dist/cjs/typescript-testing/typescript-chat-empty-state-valid.js.map +7 -0
- package/dist/esm/ChatEmptyState.js.map +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/react-desc-prop-types.js.map +2 -2
- package/dist/esm/typescript-testing/typescript-chat-empty-state-valid.js +48 -0
- package/dist/esm/typescript-testing/typescript-chat-empty-state-valid.js.map +7 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/react-desc-prop-types.d.ts +3 -1
- package/dist/types/typescript-testing/typescript-chat-empty-state-valid.d.ts +1 -0
- package/package.json +6 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ChatEmptyState.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { useMemo } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Communications } from '@elliemae/ds-icons';\nimport type { DSChatEmptyStateT } from './react-desc-prop-types.js';\nimport { emptyStateProps, defaultProps } from './react-desc-prop-types.js';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled.js';\nimport { DSChatEmptyStateName } from './DSChatEmptyStateDefinitions.js';\n\nconst ChatEmptyState: React.ComponentType<DSChatEmptyStateT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatEmptyStateT.
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAhBN,mBAA+B;AAC/B,8BAAuF;AACvF,qBAAqB;AACrB,sBAA+B;AAE/B,mCAA8C;AAC9C,oBAAsD;AACtD,yCAAqC;AAErC,MAAM,iBAA+D,CAAC,UAAU;AAC9E,QAAM,uBAAmB,
|
|
4
|
+
"sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport React, { useMemo } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Communications } from '@elliemae/ds-icons';\nimport type { DSChatEmptyStateT } from './react-desc-prop-types.js';\nimport { emptyStateProps, defaultProps } from './react-desc-prop-types.js';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled.js';\nimport { DSChatEmptyStateName } from './DSChatEmptyStateDefinitions.js';\n\nconst ChatEmptyState: React.ComponentType<DSChatEmptyStateT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatEmptyStateT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, emptyStateProps, DSChatEmptyStateName);\n\n const { label, action } = propsWithDefault;\n const MainContent = useMemo(\n () => (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Communications size=\"xxl\" color={['neutral', '400']} />\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <MessageWrapper>{label}</MessageWrapper>\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {action}\n </Grid>\n </Grid>\n ),\n [label, action],\n );\n return (\n <ChatEmptyStateWrapper alignItems=\"center\" justifyContent=\"center\">\n {MainContent}\n </ChatEmptyStateWrapper>\n );\n};\n\nChatEmptyState.propTypes = emptyStateProps as WeakValidationMap<unknown>;\nChatEmptyState.displayName = DSChatEmptyStateName;\nconst ChatEmptyStateWithSchema = describe(ChatEmptyState);\nChatEmptyStateWithSchema.propTypes = emptyStateProps as WeakValidationMap<unknown>;\n\nexport { ChatEmptyState, ChatEmptyStateWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADiBjB;AAhBN,mBAA+B;AAC/B,8BAAuF;AACvF,qBAAqB;AACrB,sBAA+B;AAE/B,mCAA8C;AAC9C,oBAAsD;AACtD,yCAAqC;AAErC,MAAM,iBAA+D,CAAC,UAAU;AAC9E,QAAM,uBAAmB,sDAA8D,OAAO,yCAAY;AAC1G,8DAA+B,kBAAkB,8CAAiB,uDAAoB;AAEtF,QAAM,EAAE,OAAO,OAAO,IAAI;AAC1B,QAAM,kBAAc;AAAA,IAClB,MACE,6CAAC,uBAAK,YAAW,UAAS,gBAAe,UACvC;AAAA,kDAAC,uBAAK,YAAW,UAAS,gBAAe,UACvC,sDAAC,kCAAe,MAAK,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG,GACxD;AAAA,MACA,4CAAC,uBAAK,YAAW,UAAS,gBAAe,UACvC,sDAAC,gCAAgB,iBAAM,GACzB;AAAA,MACA,4CAAC,uBAAK,YAAW,UAAS,gBAAe,UACtC,kBACH;AAAA,OACF;AAAA,IAEF,CAAC,OAAO,MAAM;AAAA,EAChB;AACA,SACE,4CAAC,uCAAsB,YAAW,UAAS,gBAAe,UACvD,uBACH;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,+BAA2B,kCAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import type {} from '@elliemae/ds-props-helpers';\nexport { ChatEmptyState, ChatEmptyStateWithSchema } from './ChatEmptyState.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
4
|
+
"sourcesContent": ["import type {} from '@elliemae/ds-props-helpers';\nexport { ChatEmptyState, ChatEmptyStateWithSchema } from './ChatEmptyState.js';\nexport type { DSChatEmptyStateT } from './react-desc-prop-types.js';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,4BAAyD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/react-desc-prop-types.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
-
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatEmptyStateT {\n export interface DefaultProps {\n label: string;\n }\n\n export interface OptionalProps {\n action?: JSX.Element;\n }\n\n export interface Props extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatEmptyStateT.DefaultProps = {\n label: 'No Messages Yet',\n};\n\nexport const emptyStateProps = {\n label: PropTypes.string.description('No Message to show text helper').defaultValue(defaultProps.label),\n action: PropTypes.node.description('action element'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;
|
|
4
|
+
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatEmptyStateT {\n export interface DefaultProps {\n label: string;\n }\n\n export interface OptionalProps {\n action?: JSX.Element;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatEmptyStateT.DefaultProps = {\n label: 'No Messages Yet',\n};\n\nexport const emptyStateProps = {\n label: PropTypes.string.description('No Message to show text helper').defaultValue(defaultProps.label),\n action: PropTypes.node.description('action element'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAgBnB,MAAM,eAA+C;AAAA,EAC1D,OAAO;AACT;AAEO,MAAM,kBAAkB;AAAA,EAC7B,OAAO,kCAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,aAAa,KAAK;AAAA,EACrG,QAAQ,kCAAU,KAAK,YAAY,gBAAgB;AACrD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
24
|
+
var React = __toESM(require("react"));
|
|
25
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
26
|
+
var import__ = require("../index.js");
|
|
27
|
+
const MockAction = () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", {});
|
|
28
|
+
const testOptionalProps = {
|
|
29
|
+
action: MockAction()
|
|
30
|
+
};
|
|
31
|
+
const testPartialDefaults = {
|
|
32
|
+
label: ""
|
|
33
|
+
};
|
|
34
|
+
const testProps = {
|
|
35
|
+
...testOptionalProps,
|
|
36
|
+
...testPartialDefaults
|
|
37
|
+
};
|
|
38
|
+
const testPropsAsSyntax = {
|
|
39
|
+
...testOptionalProps,
|
|
40
|
+
...testPartialDefaults
|
|
41
|
+
};
|
|
42
|
+
const testCompleteDefaults = {
|
|
43
|
+
label: ""
|
|
44
|
+
};
|
|
45
|
+
const testInternalProps = {
|
|
46
|
+
...testOptionalProps,
|
|
47
|
+
...testCompleteDefaults
|
|
48
|
+
};
|
|
49
|
+
const testInternalPropsAsSyntax = {
|
|
50
|
+
...testOptionalProps,
|
|
51
|
+
...testCompleteDefaults
|
|
52
|
+
};
|
|
53
|
+
const testExplicitDefinition = {
|
|
54
|
+
label: "",
|
|
55
|
+
action: MockAction()
|
|
56
|
+
};
|
|
57
|
+
const testInferedTypeCompatibility = {
|
|
58
|
+
label: "",
|
|
59
|
+
action: MockAction()
|
|
60
|
+
};
|
|
61
|
+
const testDefinitionAsConst = {
|
|
62
|
+
label: "",
|
|
63
|
+
action: MockAction()
|
|
64
|
+
};
|
|
65
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
66
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatEmptyState, { ...testExplicitDefinition }),
|
|
67
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatEmptyState, { ...testInferedTypeCompatibility }),
|
|
68
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatEmptyState, { ...testDefinitionAsConst }),
|
|
69
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.ChatEmptyState, { label: "No messages yet", action: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MockAction, {}) })
|
|
70
|
+
] });
|
|
71
|
+
//# sourceMappingURL=typescript-chat-empty-state-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-chat-empty-state-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { ChatEmptyState } from '../index.js';\nimport type { DSChatEmptyStateT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatEmptyStateT.Props;\ntype ComponentPropsInternals = DSChatEmptyStateT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatEmptyStateT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatEmptyStateT.OptionalProps;\n\nconst MockAction = () => <div></div>;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n action: MockAction(),\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n label: '',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n label: '',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n label: '',\n action: MockAction(),\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n label: '',\n action: MockAction(),\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n label: '',\n action: MockAction(),\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <ChatEmptyState {...testExplicitDefinition} />\n <ChatEmptyState {...testInferedTypeCompatibility} />\n <ChatEmptyState {...testDefinitionAsConst} />\n {/* works with inline values */}\n <ChatEmptyState label=\"No messages yet\" action={<MockAction />} />\n </>\n);\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA,YAAuB;ACUE;AATzB,eAA+B;AAS/B,MAAM,aAAa,MAAM,4CAAC,SAAI;AAE9B,MAAM,oBAAiD;AAAA,EACrD,QAAQ,WAAW;AACrB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,OAAO;AACT;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,OAAO;AACT;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,OAAO;AAAA,EACP,QAAQ,WAAW;AACrB;AAGA,MAAM,+BAA+B;AAAA,EACnC,OAAO;AAAA,EACP,QAAQ,WAAW;AACrB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,QAAQ,WAAW;AACrB;AAEA,MAAM,wBAAwB,MAC5B,4EAEE;AAAA,8CAAC,2BAAgB,GAAG,wBAAwB;AAAA,EAC5C,4CAAC,2BAAgB,GAAG,8BAA8B;AAAA,EAClD,4CAAC,2BAAgB,GAAG,uBAAuB;AAAA,EAE3C,4CAAC,2BAAe,OAAM,mBAAkB,QAAQ,4CAAC,cAAW,GAAI;AAAA,GAClE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/ChatEmptyState.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React, { useMemo } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Communications } from '@elliemae/ds-icons';\nimport type { DSChatEmptyStateT } from './react-desc-prop-types.js';\nimport { emptyStateProps, defaultProps } from './react-desc-prop-types.js';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled.js';\nimport { DSChatEmptyStateName } from './DSChatEmptyStateDefinitions.js';\n\nconst ChatEmptyState: React.ComponentType<DSChatEmptyStateT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatEmptyStateT.
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACiBjB,SAEI,KAFJ;AAhBN,SAAgB,eAAe;AAC/B,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAE/B,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,uBAAuB,sBAAsB;AACtD,SAAS,4BAA4B;AAErC,MAAM,iBAA+D,CAAC,UAAU;AAC9E,QAAM,mBAAmB,
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type { WeakValidationMap } from 'react';\nimport React, { useMemo } from 'react';\nimport { describe, useValidateTypescriptPropTypes, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { Grid } from '@elliemae/ds-grid';\nimport { Communications } from '@elliemae/ds-icons';\nimport type { DSChatEmptyStateT } from './react-desc-prop-types.js';\nimport { emptyStateProps, defaultProps } from './react-desc-prop-types.js';\nimport { ChatEmptyStateWrapper, MessageWrapper } from './styled.js';\nimport { DSChatEmptyStateName } from './DSChatEmptyStateDefinitions.js';\n\nconst ChatEmptyState: React.ComponentType<DSChatEmptyStateT.Props> = (props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSChatEmptyStateT.InternalProps>(props, defaultProps);\n useValidateTypescriptPropTypes(propsWithDefault, emptyStateProps, DSChatEmptyStateName);\n\n const { label, action } = propsWithDefault;\n const MainContent = useMemo(\n () => (\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <Communications size=\"xxl\" color={['neutral', '400']} />\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n <MessageWrapper>{label}</MessageWrapper>\n </Grid>\n <Grid alignItems=\"center\" justifyContent=\"center\">\n {action}\n </Grid>\n </Grid>\n ),\n [label, action],\n );\n return (\n <ChatEmptyStateWrapper alignItems=\"center\" justifyContent=\"center\">\n {MainContent}\n </ChatEmptyStateWrapper>\n );\n};\n\nChatEmptyState.propTypes = emptyStateProps as WeakValidationMap<unknown>;\nChatEmptyState.displayName = DSChatEmptyStateName;\nconst ChatEmptyStateWithSchema = describe(ChatEmptyState);\nChatEmptyStateWithSchema.propTypes = emptyStateProps as WeakValidationMap<unknown>;\n\nexport { ChatEmptyState, ChatEmptyStateWithSchema };\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACiBjB,SAEI,KAFJ;AAhBN,SAAgB,eAAe;AAC/B,SAAS,UAAU,gCAAgC,oCAAoC;AACvF,SAAS,YAAY;AACrB,SAAS,sBAAsB;AAE/B,SAAS,iBAAiB,oBAAoB;AAC9C,SAAS,uBAAuB,sBAAsB;AACtD,SAAS,4BAA4B;AAErC,MAAM,iBAA+D,CAAC,UAAU;AAC9E,QAAM,mBAAmB,6BAA8D,OAAO,YAAY;AAC1G,iCAA+B,kBAAkB,iBAAiB,oBAAoB;AAEtF,QAAM,EAAE,OAAO,OAAO,IAAI;AAC1B,QAAM,cAAc;AAAA,IAClB,MACE,qBAAC,QAAK,YAAW,UAAS,gBAAe,UACvC;AAAA,0BAAC,QAAK,YAAW,UAAS,gBAAe,UACvC,8BAAC,kBAAe,MAAK,OAAM,OAAO,CAAC,WAAW,KAAK,GAAG,GACxD;AAAA,MACA,oBAAC,QAAK,YAAW,UAAS,gBAAe,UACvC,8BAAC,kBAAgB,iBAAM,GACzB;AAAA,MACA,oBAAC,QAAK,YAAW,UAAS,gBAAe,UACtC,kBACH;AAAA,OACF;AAAA,IAEF,CAAC,OAAO,MAAM;AAAA,EAChB;AACA,SACE,oBAAC,yBAAsB,YAAW,UAAS,gBAAe,UACvD,uBACH;AAEJ;AAEA,eAAe,YAAY;AAC3B,eAAe,cAAc;AAC7B,MAAM,2BAA2B,SAAS,cAAc;AACxD,yBAAyB,YAAY;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-props-helpers';\nexport { ChatEmptyState, ChatEmptyStateWithSchema } from './ChatEmptyState.js';\n"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type {} from '@elliemae/ds-props-helpers';\nexport { ChatEmptyState, ChatEmptyStateWithSchema } from './ChatEmptyState.js';\nexport type { DSChatEmptyStateT } from './react-desc-prop-types.js';\n"],
|
|
5
5
|
"mappings": "AAAA,YAAY,WAAW;ACCvB,SAAS,gBAAgB,gCAAgC;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../src/react-desc-prop-types.tsx"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatEmptyStateT {\n export interface DefaultProps {\n label: string;\n }\n\n export interface OptionalProps {\n action?: JSX.Element;\n }\n\n export interface Props extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatEmptyStateT.DefaultProps = {\n label: 'No Messages Yet',\n};\n\nexport const emptyStateProps = {\n label: PropTypes.string.description('No Message to show text helper').defaultValue(defaultProps.label),\n action: PropTypes.node.description('action element'),\n};\n"],
|
|
5
|
-
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-props-helpers';\n\nexport declare namespace DSChatEmptyStateT {\n export interface DefaultProps {\n label: string;\n }\n\n export interface OptionalProps {\n action?: JSX.Element;\n }\n\n export interface Props extends Partial<DefaultProps>, OptionalProps {}\n\n export interface InternalProps extends DefaultProps, OptionalProps {}\n}\n\nexport const defaultProps: DSChatEmptyStateT.DefaultProps = {\n label: 'No Messages Yet',\n};\n\nexport const emptyStateProps = {\n label: PropTypes.string.description('No Message to show text helper').defaultValue(defaultProps.label),\n action: PropTypes.node.description('action element'),\n};\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAgBnB,MAAM,eAA+C;AAAA,EAC1D,OAAO;AACT;AAEO,MAAM,kBAAkB;AAAA,EAC7B,OAAO,UAAU,OAAO,YAAY,gCAAgC,EAAE,aAAa,aAAa,KAAK;AAAA,EACrG,QAAQ,UAAU,KAAK,YAAY,gBAAgB;AACrD;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChatEmptyState } from "../index.js";
|
|
4
|
+
const MockAction = () => /* @__PURE__ */ jsx("div", {});
|
|
5
|
+
const testOptionalProps = {
|
|
6
|
+
action: MockAction()
|
|
7
|
+
};
|
|
8
|
+
const testPartialDefaults = {
|
|
9
|
+
label: ""
|
|
10
|
+
};
|
|
11
|
+
const testProps = {
|
|
12
|
+
...testOptionalProps,
|
|
13
|
+
...testPartialDefaults
|
|
14
|
+
};
|
|
15
|
+
const testPropsAsSyntax = {
|
|
16
|
+
...testOptionalProps,
|
|
17
|
+
...testPartialDefaults
|
|
18
|
+
};
|
|
19
|
+
const testCompleteDefaults = {
|
|
20
|
+
label: ""
|
|
21
|
+
};
|
|
22
|
+
const testInternalProps = {
|
|
23
|
+
...testOptionalProps,
|
|
24
|
+
...testCompleteDefaults
|
|
25
|
+
};
|
|
26
|
+
const testInternalPropsAsSyntax = {
|
|
27
|
+
...testOptionalProps,
|
|
28
|
+
...testCompleteDefaults
|
|
29
|
+
};
|
|
30
|
+
const testExplicitDefinition = {
|
|
31
|
+
label: "",
|
|
32
|
+
action: MockAction()
|
|
33
|
+
};
|
|
34
|
+
const testInferedTypeCompatibility = {
|
|
35
|
+
label: "",
|
|
36
|
+
action: MockAction()
|
|
37
|
+
};
|
|
38
|
+
const testDefinitionAsConst = {
|
|
39
|
+
label: "",
|
|
40
|
+
action: MockAction()
|
|
41
|
+
};
|
|
42
|
+
const ExampleUsageComponent = () => /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
43
|
+
/* @__PURE__ */ jsx(ChatEmptyState, { ...testExplicitDefinition }),
|
|
44
|
+
/* @__PURE__ */ jsx(ChatEmptyState, { ...testInferedTypeCompatibility }),
|
|
45
|
+
/* @__PURE__ */ jsx(ChatEmptyState, { ...testDefinitionAsConst }),
|
|
46
|
+
/* @__PURE__ */ jsx(ChatEmptyState, { label: "No messages yet", action: /* @__PURE__ */ jsx(MockAction, {}) })
|
|
47
|
+
] });
|
|
48
|
+
//# sourceMappingURL=typescript-chat-empty-state-valid.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../../../scripts/build/transpile/react-shim.js", "../../../src/typescript-testing/typescript-chat-empty-state-valid.tsx"],
|
|
4
|
+
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable @typescript-eslint/no-unused-vars, no-unused-vars */\nimport { ChatEmptyState } from '../index.js';\nimport type { DSChatEmptyStateT } from '../index.js';\n\n// test we expose the namespace and the namespace follows our deliverable conventions\ntype ComponentPropsForApp = DSChatEmptyStateT.Props;\ntype ComponentPropsInternals = DSChatEmptyStateT.InternalProps;\ntype ComponentPropsDefaultProps = DSChatEmptyStateT.DefaultProps;\ntype ComponentPropsOptionalProps = DSChatEmptyStateT.OptionalProps;\n\nconst MockAction = () => <div></div>;\n\nconst testOptionalProps: ComponentPropsOptionalProps = {\n action: MockAction(),\n};\n\n// difference Props and InternalProps is that InternalProps has all the default props filled in\n// Props allows for partial defaults\nconst testPartialDefaults: Partial<ComponentPropsDefaultProps> = {\n label: '',\n};\n\nconst testProps: ComponentPropsForApp = {\n ...testOptionalProps,\n ...testPartialDefaults,\n};\n\nconst testPropsAsSyntax = {\n ...testOptionalProps,\n ...testPartialDefaults,\n} as ComponentPropsForApp;\n\n// InternalProps requires all defaults to be filled in\nconst testCompleteDefaults: Required<ComponentPropsDefaultProps> = {\n label: '',\n};\n\nconst testInternalProps: ComponentPropsInternals = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n};\n\nconst testInternalPropsAsSyntax = {\n ...testOptionalProps,\n ...testCompleteDefaults,\n} as ComponentPropsInternals;\n\n// using the explicit type definition, if there is an error, it will be marked on the key that is wrong\nconst testExplicitDefinition: ComponentPropsForApp = {\n label: '',\n action: MockAction(),\n};\n\n// using the \"as\" syntax, if there is an error, it will be marking the whole object as wrong because it is not compatible with the type\nconst testInferedTypeCompatibility = {\n label: '',\n action: MockAction(),\n} as ComponentPropsForApp;\n\nconst testDefinitionAsConst = {\n label: '',\n action: MockAction(),\n} as const;\n\nconst ExampleUsageComponent = () => (\n <>\n {/* works with explicitly casted props, all syntaxes */}\n <ChatEmptyState {...testExplicitDefinition} />\n <ChatEmptyState {...testInferedTypeCompatibility} />\n <ChatEmptyState {...testDefinitionAsConst} />\n {/* works with inline values */}\n <ChatEmptyState label=\"No messages yet\" action={<MockAction />} />\n </>\n);\n"],
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACUE,SAuDvB,UAvDuB,KAuDvB,YAvDuB;AATzB,SAAS,sBAAsB;AAS/B,MAAM,aAAa,MAAM,oBAAC,SAAI;AAE9B,MAAM,oBAAiD;AAAA,EACrD,QAAQ,WAAW;AACrB;AAIA,MAAM,sBAA2D;AAAA,EAC/D,OAAO;AACT;AAEA,MAAM,YAAkC;AAAA,EACtC,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,oBAAoB;AAAA,EACxB,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,uBAA6D;AAAA,EACjE,OAAO;AACT;AAEA,MAAM,oBAA6C;AAAA,EACjD,GAAG;AAAA,EACH,GAAG;AACL;AAEA,MAAM,4BAA4B;AAAA,EAChC,GAAG;AAAA,EACH,GAAG;AACL;AAGA,MAAM,yBAA+C;AAAA,EACnD,OAAO;AAAA,EACP,QAAQ,WAAW;AACrB;AAGA,MAAM,+BAA+B;AAAA,EACnC,OAAO;AAAA,EACP,QAAQ,WAAW;AACrB;AAEA,MAAM,wBAAwB;AAAA,EAC5B,OAAO;AAAA,EACP,QAAQ,WAAW;AACrB;AAEA,MAAM,wBAAwB,MAC5B,iCAEE;AAAA,sBAAC,kBAAgB,GAAG,wBAAwB;AAAA,EAC5C,oBAAC,kBAAgB,GAAG,8BAA8B;AAAA,EAClD,oBAAC,kBAAgB,GAAG,uBAAuB;AAAA,EAE3C,oBAAC,kBAAe,OAAM,mBAAkB,QAAQ,oBAAC,cAAW,GAAI;AAAA,GAClE;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -6,7 +6,9 @@ export declare namespace DSChatEmptyStateT {
|
|
|
6
6
|
interface OptionalProps {
|
|
7
7
|
action?: JSX.Element;
|
|
8
8
|
}
|
|
9
|
-
interface Props extends DefaultProps
|
|
9
|
+
interface Props extends Partial<DefaultProps>, OptionalProps {
|
|
10
|
+
}
|
|
11
|
+
interface InternalProps extends DefaultProps, OptionalProps {
|
|
10
12
|
}
|
|
11
13
|
}
|
|
12
14
|
export declare const defaultProps: DSChatEmptyStateT.DefaultProps;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-chat-empty-state",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.29.0-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Chat Empty State",
|
|
6
6
|
"files": [
|
|
@@ -47,15 +47,15 @@
|
|
|
47
47
|
"typeSafety": true
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@elliemae/ds-grid": "3.
|
|
51
|
-
"@elliemae/ds-icons": "3.
|
|
52
|
-
"@elliemae/ds-props-helpers": "3.
|
|
53
|
-
"@elliemae/ds-system": "3.
|
|
50
|
+
"@elliemae/ds-grid": "3.29.0-next.0",
|
|
51
|
+
"@elliemae/ds-icons": "3.29.0-next.0",
|
|
52
|
+
"@elliemae/ds-props-helpers": "3.29.0-next.0",
|
|
53
|
+
"@elliemae/ds-system": "3.29.0-next.0"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@elliemae/pui-cli": "~9.0.0-next.31",
|
|
57
57
|
"styled-components": "~5.3.9",
|
|
58
|
-
"@elliemae/ds-monorepo-devops": "3.
|
|
58
|
+
"@elliemae/ds-monorepo-devops": "3.29.0-next.0"
|
|
59
59
|
},
|
|
60
60
|
"peerDependencies": {
|
|
61
61
|
"lodash": "^4.17.21",
|