@elliemae/ds-comments 3.18.1-rc.0 → 3.19.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/DSCommentCard.js +155 -0
- package/dist/cjs/DSCommentCard.js.map +7 -0
- package/dist/cjs/DeprecatedMenu.js +73 -0
- package/dist/cjs/DeprecatedMenu.js.map +7 -0
- package/dist/cjs/{components/DSComments.js → config/DSCommentCardDefinitions.js} +18 -9
- package/dist/cjs/config/DSCommentCardDefinitions.js.map +7 -0
- package/dist/cjs/config/useCommentCard.js +57 -0
- package/dist/cjs/config/useCommentCard.js.map +7 -0
- package/dist/cjs/{components/helper.js → helpers.js} +4 -4
- package/dist/cjs/helpers.js.map +7 -0
- package/dist/cjs/index.js +9 -5
- package/dist/cjs/index.js.map +3 -3
- package/dist/cjs/react-desc-prop-types.js +99 -0
- package/dist/cjs/react-desc-prop-types.js.map +7 -0
- package/dist/cjs/styled.js +122 -0
- package/dist/cjs/styled.js.map +7 -0
- package/dist/esm/DSCommentCard.js +133 -0
- package/dist/esm/DSCommentCard.js.map +7 -0
- package/dist/esm/DeprecatedMenu.js +43 -0
- package/dist/esm/DeprecatedMenu.js.map +7 -0
- package/dist/esm/config/DSCommentCardDefinitions.js +19 -0
- package/dist/esm/config/DSCommentCardDefinitions.js.map +7 -0
- package/dist/esm/config/useCommentCard.js +27 -0
- package/dist/esm/config/useCommentCard.js.map +7 -0
- package/dist/esm/{components/helper.js → helpers.js} +1 -1
- package/dist/esm/helpers.js.map +7 -0
- package/dist/esm/index.js +7 -3
- package/dist/esm/index.js.map +3 -3
- package/dist/esm/react-desc-prop-types.js +69 -0
- package/dist/esm/react-desc-prop-types.js.map +7 -0
- package/dist/esm/styled.js +92 -0
- package/dist/esm/styled.js.map +7 -0
- package/dist/types/DSCommentCard.d.ts +4 -0
- package/dist/types/DeprecatedMenu.d.ts +10 -0
- package/dist/types/config/DSCommentCardDefinitions.d.ts +11 -0
- package/dist/types/config/useCommentCard.d.ts +9 -0
- package/dist/types/helpers.d.ts +3 -0
- package/dist/types/index.d.ts +3 -39
- package/dist/types/react-desc-prop-types.d.ts +33 -0
- package/dist/types/styled.d.ts +11 -0
- package/package.json +9 -7
- package/dist/cjs/components/CommentCard.js +0 -163
- package/dist/cjs/components/CommentCard.js.map +0 -7
- package/dist/cjs/components/DSComments.js.map +0 -7
- package/dist/cjs/components/blocks.js +0 -80
- package/dist/cjs/components/blocks.js.map +0 -7
- package/dist/cjs/components/helper.js.map +0 -7
- package/dist/esm/components/CommentCard.js +0 -141
- package/dist/esm/components/CommentCard.js.map +0 -7
- package/dist/esm/components/DSComments.js +0 -10
- package/dist/esm/components/DSComments.js.map +0 -7
- package/dist/esm/components/blocks.js +0 -50
- package/dist/esm/components/blocks.js.map +0 -7
- package/dist/esm/components/helper.js.map +0 -7
- package/dist/types/components/CommentCard.d.ts +0 -73
- package/dist/types/components/DSComments.d.ts +0 -42
- package/dist/types/components/blocks.d.ts +0 -18
- package/dist/types/components/helper.d.ts +0 -3
|
@@ -0,0 +1,155 @@
|
|
|
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 __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DSCommentCard_exports = {};
|
|
30
|
+
__export(DSCommentCard_exports, {
|
|
31
|
+
DSCommentCard: () => DSCommentCard,
|
|
32
|
+
DSCommentCardWithSchema: () => DSCommentCardWithSchema
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(DSCommentCard_exports);
|
|
35
|
+
var React = __toESM(require("react"));
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_ds_read_more = require("@elliemae/ds-read-more");
|
|
39
|
+
var import_styled = require("./styled.js");
|
|
40
|
+
var import_DSCommentCardDefinitions = require("./config/DSCommentCardDefinitions.js");
|
|
41
|
+
var import_useCommentCard = require("./config/useCommentCard.js");
|
|
42
|
+
var import_react_desc_prop_types = require("./react-desc-prop-types.js");
|
|
43
|
+
var import_DeprecatedMenu = require("./DeprecatedMenu.js");
|
|
44
|
+
const DSCommentCard = (props) => {
|
|
45
|
+
const {
|
|
46
|
+
propsWithDefault: {
|
|
47
|
+
containerProps,
|
|
48
|
+
name,
|
|
49
|
+
type,
|
|
50
|
+
content,
|
|
51
|
+
style,
|
|
52
|
+
borderBottom,
|
|
53
|
+
maxLines,
|
|
54
|
+
options,
|
|
55
|
+
selection,
|
|
56
|
+
customDropdownMenuProps,
|
|
57
|
+
Menu,
|
|
58
|
+
menuProps
|
|
59
|
+
},
|
|
60
|
+
xstyledProps,
|
|
61
|
+
getOwnerProps,
|
|
62
|
+
getOwnerPropsArguments,
|
|
63
|
+
displayDate,
|
|
64
|
+
displayTime
|
|
65
|
+
} = (0, import_useCommentCard.useCommentCard)(props);
|
|
66
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
67
|
+
import_styled.CommentCardWrapper,
|
|
68
|
+
{
|
|
69
|
+
className: `em-ds-comments__comment-card-wrapper em-ds-comments__comment-card-wrapper--default${borderBottom ? "em-ds-comments__comment-card-wrapper--borderBottom" : ""}`,
|
|
70
|
+
borderBot: borderBottom,
|
|
71
|
+
tabIndex: 0,
|
|
72
|
+
role: "listitem",
|
|
73
|
+
...containerProps,
|
|
74
|
+
...xstyledProps,
|
|
75
|
+
style: { ...style, ...containerProps.style || {} },
|
|
76
|
+
getOwnerProps,
|
|
77
|
+
getOwnerPropsArguments,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
80
|
+
import_styled.CommentCardHeader,
|
|
81
|
+
{
|
|
82
|
+
className: `em-ds-comments__comment-card-header em-ds-comments__comment-card-header--default${borderBottom ? "em-ds-comments__comment-card-header--borderBottom" : ""}`,
|
|
83
|
+
borderBottom,
|
|
84
|
+
getOwnerProps,
|
|
85
|
+
getOwnerPropsArguments,
|
|
86
|
+
children: [
|
|
87
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
88
|
+
import_styled.CommentCardLeft,
|
|
89
|
+
{
|
|
90
|
+
className: "em-ds-comments__comment-card-left",
|
|
91
|
+
getOwnerProps,
|
|
92
|
+
getOwnerPropsArguments,
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
95
|
+
import_styled.CommentCardName,
|
|
96
|
+
{
|
|
97
|
+
className: "em-ds-comments__comment-card-name",
|
|
98
|
+
getOwnerProps,
|
|
99
|
+
getOwnerPropsArguments,
|
|
100
|
+
children: name
|
|
101
|
+
}
|
|
102
|
+
),
|
|
103
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
104
|
+
import_styled.CommentCardData,
|
|
105
|
+
{
|
|
106
|
+
className: "em-ds-comments__comment-card-data",
|
|
107
|
+
getOwnerProps,
|
|
108
|
+
getOwnerPropsArguments,
|
|
109
|
+
children: [
|
|
110
|
+
displayDate,
|
|
111
|
+
displayTime && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u2022" }),
|
|
113
|
+
displayTime
|
|
114
|
+
] }),
|
|
115
|
+
type && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, { children: [
|
|
116
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { children: "\u2022" }),
|
|
117
|
+
type
|
|
118
|
+
] })
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
)
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
),
|
|
125
|
+
options && options.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
126
|
+
import_DeprecatedMenu.DeprecatedMenu,
|
|
127
|
+
{
|
|
128
|
+
getOwnerProps,
|
|
129
|
+
getOwnerPropsArguments,
|
|
130
|
+
options,
|
|
131
|
+
selection,
|
|
132
|
+
customDropdownMenuProps
|
|
133
|
+
}
|
|
134
|
+
),
|
|
135
|
+
Menu && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styled.CommentCardMenu, { getOwnerProps, getOwnerPropsArguments, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Menu, { ...menuProps }) })
|
|
136
|
+
]
|
|
137
|
+
}
|
|
138
|
+
),
|
|
139
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
140
|
+
import_styled.CommentCardContent,
|
|
141
|
+
{
|
|
142
|
+
className: "em-ds-comments__comment-card-content",
|
|
143
|
+
getOwnerProps,
|
|
144
|
+
getOwnerPropsArguments,
|
|
145
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_read_more.DSReadMore, { lines: maxLines, content: `${content} `, more: "MORE", less: "LESS", ellipsis: "... " })
|
|
146
|
+
}
|
|
147
|
+
)
|
|
148
|
+
]
|
|
149
|
+
}
|
|
150
|
+
);
|
|
151
|
+
};
|
|
152
|
+
DSCommentCard.displayName = import_DSCommentCardDefinitions.DSCommentCardName;
|
|
153
|
+
const DSCommentCardWithSchema = (0, import_ds_props_helpers.describe)(DSCommentCard);
|
|
154
|
+
DSCommentCardWithSchema.propTypes = import_react_desc_prop_types.DSCommentCardPropTypesSchema;
|
|
155
|
+
//# sourceMappingURL=DSCommentCard.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DSCommentCard.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable complexity */\nimport React from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { DSReadMore } from '@elliemae/ds-read-more';\nimport {\n CommentCardWrapper,\n CommentCardHeader,\n CommentCardContent,\n CommentCardName,\n CommentCardData,\n CommentCardMenu,\n CommentCardLeft,\n} from './styled.js';\nimport { DSCommentCardName } from './config/DSCommentCardDefinitions.js';\nimport { useCommentCard } from './config/useCommentCard.js';\nimport { DSCommentCardPropTypesSchema, type DSCommentCardT } from './react-desc-prop-types.js';\nimport { DeprecatedMenu } from './DeprecatedMenu.js';\n\nexport const DSCommentCard: React.ComponentType<DSCommentCardT.Props> = (props) => {\n const {\n propsWithDefault: {\n containerProps,\n name,\n type,\n content,\n style,\n borderBottom,\n maxLines,\n options,\n selection,\n customDropdownMenuProps,\n Menu,\n menuProps,\n },\n xstyledProps,\n getOwnerProps,\n getOwnerPropsArguments,\n displayDate,\n displayTime,\n } = useCommentCard(props);\n\n return (\n <CommentCardWrapper\n className={`em-ds-comments__comment-card-wrapper em-ds-comments__comment-card-wrapper--default${\n borderBottom ? 'em-ds-comments__comment-card-wrapper--borderBottom' : ''\n }`}\n borderBot={borderBottom}\n tabIndex={0}\n role=\"listitem\"\n {...containerProps}\n {...xstyledProps}\n style={{ ...style, ...(containerProps.style || {}) }}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <CommentCardHeader\n className={`em-ds-comments__comment-card-header em-ds-comments__comment-card-header--default${\n borderBottom ? 'em-ds-comments__comment-card-header--borderBottom' : ''\n }`}\n borderBottom={borderBottom}\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <CommentCardLeft\n className=\"em-ds-comments__comment-card-left\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <CommentCardName\n className=\"em-ds-comments__comment-card-name\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {name}\n </CommentCardName>\n <CommentCardData\n className=\"em-ds-comments__comment-card-data\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n {displayDate}\n {displayTime && (\n <>\n <span>\u2022</span>\n {displayTime}\n </>\n )}\n {type && (\n <>\n <span>\u2022</span>\n {type}\n </>\n )}\n </CommentCardData>\n </CommentCardLeft>\n {options && options.length > 0 && (\n <DeprecatedMenu\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n options={options}\n selection={selection}\n customDropdownMenuProps={customDropdownMenuProps}\n />\n )}\n {Menu && (\n <CommentCardMenu getOwnerProps={getOwnerProps} getOwnerPropsArguments={getOwnerPropsArguments}>\n <Menu {...menuProps} />\n </CommentCardMenu>\n )}\n </CommentCardHeader>\n <CommentCardContent\n className=\"em-ds-comments__comment-card-content\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <DSReadMore lines={maxLines} content={`${content} `} more=\"MORE\" less=\"LESS\" ellipsis=\"... \" />\n </CommentCardContent>\n </CommentCardWrapper>\n );\n};\n\nDSCommentCard.displayName = DSCommentCardName;\nexport const DSCommentCardWithSchema = describe(DSCommentCard);\nDSCommentCardWithSchema.propTypes = DSCommentCardPropTypesSchema;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADoEb;AAlEV,8BAAyB;AACzB,0BAA2B;AAC3B,oBAQO;AACP,sCAAkC;AAClC,4BAA+B;AAC/B,mCAAkE;AAClE,4BAA+B;AAExB,MAAM,gBAA2D,CAAC,UAAU;AACjF,QAAM;AAAA,IACJ,kBAAkB;AAAA,MAChB;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,QAAI,sCAAe,KAAK;AAExB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,qFACT,eAAe,uDAAuD;AAAA,MAExE,WAAW;AAAA,MACX,UAAU;AAAA,MACV,MAAK;AAAA,MACJ,GAAG;AAAA,MACH,GAAG;AAAA,MACJ,OAAO,EAAE,GAAG,OAAO,GAAI,eAAe,SAAS,CAAC,EAAG;AAAA,MACnD;AAAA,MACA;AAAA,MAEA;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,WAAW,mFACT,eAAe,sDAAsD;AAAA,YAEvE;AAAA,YACA;AAAA,YACA;AAAA,YAEA;AAAA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV;AAAA,kBACA;AAAA,kBAEA;AAAA;AAAA,sBAAC;AAAA;AAAA,wBACC,WAAU;AAAA,wBACV;AAAA,wBACA;AAAA,wBAEC;AAAA;AAAA,oBACH;AAAA,oBACA;AAAA,sBAAC;AAAA;AAAA,wBACC,WAAU;AAAA,wBACV;AAAA,wBACA;AAAA,wBAEC;AAAA;AAAA,0BACA,eACC,4EACE;AAAA,wEAAC,UAAK,oBAAC;AAAA,4BACN;AAAA,6BACH;AAAA,0BAED,QACC,4EACE;AAAA,wEAAC,UAAK,oBAAC;AAAA,4BACN;AAAA,6BACH;AAAA;AAAA;AAAA,oBAEJ;AAAA;AAAA;AAAA,cACF;AAAA,cACC,WAAW,QAAQ,SAAS,KAC3B;AAAA,gBAAC;AAAA;AAAA,kBACC;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA;AAAA,cACF;AAAA,cAED,QACC,4CAAC,iCAAgB,eAA8B,wBAC7C,sDAAC,QAAM,GAAG,WAAW,GACvB;AAAA;AAAA;AAAA,QAEJ;AAAA,QACA;AAAA,UAAC;AAAA;AAAA,YACC,WAAU;AAAA,YACV;AAAA,YACA;AAAA,YAEA,sDAAC,kCAAW,OAAO,UAAU,SAAS,GAAG,YAAY,MAAK,QAAO,MAAK,QAAO,UAAS,QAAO;AAAA;AAAA,QAC/F;AAAA;AAAA;AAAA,EACF;AAEJ;AAEA,cAAc,cAAc;AACrB,MAAM,8BAA0B,kCAAS,aAAa;AAC7D,wBAAwB,YAAY;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
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 __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var DeprecatedMenu_exports = {};
|
|
30
|
+
__export(DeprecatedMenu_exports, {
|
|
31
|
+
DeprecatedMenu: () => DeprecatedMenu
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(DeprecatedMenu_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var import_react = require("react");
|
|
37
|
+
var import_ds_button_v2 = require("@elliemae/ds-button-v2");
|
|
38
|
+
var import_ds_dropdownmenu = __toESM(require("@elliemae/ds-dropdownmenu"));
|
|
39
|
+
var import_ds_icons = require("@elliemae/ds-icons");
|
|
40
|
+
var import_styled = require("./styled.js");
|
|
41
|
+
const DeprecatedMenu = ({
|
|
42
|
+
getOwnerProps,
|
|
43
|
+
getOwnerPropsArguments,
|
|
44
|
+
customDropdownMenuProps,
|
|
45
|
+
options,
|
|
46
|
+
selection
|
|
47
|
+
}) => {
|
|
48
|
+
const ref = (0, import_react.useRef)(null);
|
|
49
|
+
const handleCloseMenu = (0, import_react.useCallback)(() => {
|
|
50
|
+
ref.current?.focus();
|
|
51
|
+
return null;
|
|
52
|
+
}, []);
|
|
53
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
54
|
+
import_styled.CommentCardMenu,
|
|
55
|
+
{
|
|
56
|
+
className: "em-ds-comments__comment-card-menu",
|
|
57
|
+
getOwnerProps,
|
|
58
|
+
getOwnerPropsArguments,
|
|
59
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
import_ds_dropdownmenu.default,
|
|
61
|
+
{
|
|
62
|
+
...customDropdownMenuProps,
|
|
63
|
+
onClose: handleCloseMenu,
|
|
64
|
+
options,
|
|
65
|
+
selection,
|
|
66
|
+
triggerComponent: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_button_v2.DSButtonV2, { buttonType: "icon", innerRef: ref, "aria-label": "More options", "aria-haspopup": "menu", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ds_icons.MoreOptionsVert, {}) }),
|
|
67
|
+
zIndex: 11
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
};
|
|
73
|
+
//# sourceMappingURL=DeprecatedMenu.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/DeprecatedMenu.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["// eslint-disable-next-line @typescript-eslint/ban-ts-comment\n// @ts-nocheck\nimport { useCallback, useRef } from 'react';\nimport { DSButtonV2 } from '@elliemae/ds-button-v2';\nimport DSDropdownMenu from '@elliemae/ds-dropdownmenu';\nimport { MoreOptionsVert } from '@elliemae/ds-icons';\nimport { CommentCardMenu } from './styled.js';\n\ninterface DeprecatedMenuProps {\n getOwnerProps: () => object;\n getOwnerPropsArguments: () => object;\n options: unknown[];\n selection: unknown;\n customDropdownMenuProps: Record<string, unknown>;\n}\n\nexport const DeprecatedMenu: React.ComponentType<DeprecatedMenuProps> = ({\n getOwnerProps,\n getOwnerPropsArguments,\n customDropdownMenuProps,\n options,\n selection,\n}) => {\n const ref = useRef<HTMLButtonElement | null>(null);\n\n const handleCloseMenu = useCallback(() => {\n ref.current?.focus();\n return null;\n }, []);\n\n return (\n <CommentCardMenu\n className=\"em-ds-comments__comment-card-menu\"\n getOwnerProps={getOwnerProps}\n getOwnerPropsArguments={getOwnerPropsArguments}\n >\n <DSDropdownMenu\n {...customDropdownMenuProps}\n onClose={handleCloseMenu}\n options={options}\n selection={selection}\n triggerComponent={\n <DSButtonV2 buttonType=\"icon\" innerRef={ref} aria-label=\"More options\" aria-haspopup=\"menu\">\n <MoreOptionsVert />\n </DSButtonV2>\n }\n zIndex={11} // https://jira.elliemae.io/browse/PUI-1664\n />\n </CommentCardMenu>\n );\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;AD2CX;AAzCZ,mBAAoC;AACpC,0BAA2B;AAC3B,6BAA2B;AAC3B,sBAAgC;AAChC,oBAAgC;AAUzB,MAAM,iBAA2D,CAAC;AAAA,EACvE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,UAAM,qBAAiC,IAAI;AAEjD,QAAM,sBAAkB,0BAAY,MAAM;AACxC,QAAI,SAAS,MAAM;AACnB,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV;AAAA,MACA;AAAA,MAEA;AAAA,QAAC,uBAAAA;AAAA,QAAA;AAAA,UACE,GAAG;AAAA,UACJ,SAAS;AAAA,UACT;AAAA,UACA;AAAA,UACA,kBACE,4CAAC,kCAAW,YAAW,QAAO,UAAU,KAAK,cAAW,gBAAe,iBAAc,QACnF,sDAAC,mCAAgB,GACnB;AAAA,UAEF,QAAQ;AAAA;AAAA,MACV;AAAA;AAAA,EACF;AAEJ;",
|
|
6
|
+
"names": ["DSDropdownMenu"]
|
|
7
|
+
}
|
|
@@ -26,15 +26,24 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
var DSCommentCardDefinitions_exports = {};
|
|
30
|
+
__export(DSCommentCardDefinitions_exports, {
|
|
31
|
+
DSCommentCardDataTestIds: () => DSCommentCardDataTestIds,
|
|
32
|
+
DSCommentCardName: () => DSCommentCardName,
|
|
33
|
+
DSCommentCardSlots: () => DSCommentCardSlots
|
|
33
34
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(DSCommentCardDefinitions_exports);
|
|
35
36
|
var React = __toESM(require("react"));
|
|
36
|
-
var
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
var import_ds_system = require("@elliemae/ds-system");
|
|
38
|
+
const DSCommentCardName = "DSCommentCard";
|
|
39
|
+
const DSCommentCardSlots = {
|
|
40
|
+
ROOT: "root",
|
|
41
|
+
HEADER: "header",
|
|
42
|
+
CONTENT: "content",
|
|
43
|
+
LEFT: "left",
|
|
44
|
+
NAME: "name",
|
|
45
|
+
DATA: "data",
|
|
46
|
+
MENU: "menu"
|
|
39
47
|
};
|
|
40
|
-
|
|
48
|
+
const DSCommentCardDataTestIds = (0, import_ds_system.slotObjectToDataTestIds)(DSCommentCardName, DSCommentCardSlots);
|
|
49
|
+
//# sourceMappingURL=DSCommentCardDefinitions.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/DSCommentCardDefinitions.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { slotObjectToDataTestIds } from '@elliemae/ds-system';\n\nexport const DSCommentCardName = 'DSCommentCard';\n\nexport const DSCommentCardSlots = {\n ROOT: 'root',\n HEADER: 'header',\n CONTENT: 'content',\n LEFT: 'left',\n NAME: 'name',\n DATA: 'data',\n MENU: 'menu',\n};\n\nexport const DSCommentCardDataTestIds = slotObjectToDataTestIds(DSCommentCardName, DSCommentCardSlots);\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAwC;AAEjC,MAAM,oBAAoB;AAE1B,MAAM,qBAAqB;AAAA,EAChC,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AAAA,EACN,MAAM;AACR;AAEO,MAAM,+BAA2B,0CAAwB,mBAAmB,kBAAkB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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 __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var useCommentCard_exports = {};
|
|
30
|
+
__export(useCommentCard_exports, {
|
|
31
|
+
useCommentCard: () => useCommentCard
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(useCommentCard_exports);
|
|
34
|
+
var React = __toESM(require("react"));
|
|
35
|
+
var import_react = require("react");
|
|
36
|
+
var import_lodash = require("lodash");
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
var import_helpers = require("../helpers.js");
|
|
39
|
+
var import_react_desc_prop_types = require("../react-desc-prop-types.js");
|
|
40
|
+
const useCommentCard = (props) => {
|
|
41
|
+
const propsWithDefault = (0, import_ds_props_helpers.useMemoMergePropsWithDefault)(props, import_react_desc_prop_types.defaultProps);
|
|
42
|
+
const { date, dateFormat, timeFormat } = propsWithDefault;
|
|
43
|
+
const xstyledProps = (0, import_ds_props_helpers.useGetXstyledProps)((0, import_lodash.omit)(propsWithDefault, "borderBottom"));
|
|
44
|
+
const displayDate = date ? (0, import_helpers.getDisplayDate)(date, dateFormat) : null;
|
|
45
|
+
const displayTime = date ? (0, import_helpers.getTime)(date, timeFormat) : null;
|
|
46
|
+
const getOwnerProps = (0, import_react.useCallback)(() => propsWithDefault, [propsWithDefault]);
|
|
47
|
+
const getOwnerPropsArguments = (0, import_react.useCallback)(() => ({}), []);
|
|
48
|
+
return {
|
|
49
|
+
propsWithDefault,
|
|
50
|
+
xstyledProps,
|
|
51
|
+
getOwnerProps,
|
|
52
|
+
getOwnerPropsArguments,
|
|
53
|
+
displayDate,
|
|
54
|
+
displayTime
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
//# sourceMappingURL=useCommentCard.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/config/useCommentCard.ts", "../../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import { useCallback } from 'react';\nimport { omit } from 'lodash';\nimport { useGetXstyledProps, useMemoMergePropsWithDefault } from '@elliemae/ds-props-helpers';\nimport { getTime, getDisplayDate } from '../helpers.js';\nimport { type DSCommentCardT, defaultProps } from '../react-desc-prop-types.js';\n\nexport const useCommentCard = (props: DSCommentCardT.Props) => {\n const propsWithDefault = useMemoMergePropsWithDefault<DSCommentCardT.InternalProps>(props, defaultProps);\n const { date, dateFormat, timeFormat } = propsWithDefault;\n\n const xstyledProps = useGetXstyledProps(omit(propsWithDefault, 'borderBottom'));\n\n const displayDate = date ? getDisplayDate(date, dateFormat) : null;\n const displayTime = date ? getTime(date, timeFormat) : null;\n\n const getOwnerProps = useCallback(() => propsWithDefault, [propsWithDefault]);\n const getOwnerPropsArguments = useCallback(() => ({}), []);\n\n return {\n propsWithDefault,\n xstyledProps,\n getOwnerProps,\n getOwnerPropsArguments,\n displayDate,\n displayTime,\n };\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAA4B;AAC5B,oBAAqB;AACrB,8BAAiE;AACjE,qBAAwC;AACxC,mCAAkD;AAE3C,MAAM,iBAAiB,CAAC,UAAgC;AAC7D,QAAM,uBAAmB,sDAA2D,OAAO,yCAAY;AACvG,QAAM,EAAE,MAAM,YAAY,WAAW,IAAI;AAEzC,QAAM,mBAAe,gDAAmB,oBAAK,kBAAkB,cAAc,CAAC;AAE9E,QAAM,cAAc,WAAO,+BAAe,MAAM,UAAU,IAAI;AAC9D,QAAM,cAAc,WAAO,wBAAQ,MAAM,UAAU,IAAI;AAEvD,QAAM,oBAAgB,0BAAY,MAAM,kBAAkB,CAAC,gBAAgB,CAAC;AAC5E,QAAM,6BAAyB,0BAAY,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzD,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -26,13 +26,13 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var helpers_exports = {};
|
|
30
|
+
__export(helpers_exports, {
|
|
31
31
|
getDisplayDate: () => getDisplayDate,
|
|
32
32
|
getMaxSize: () => getMaxSize,
|
|
33
33
|
getTime: () => getTime
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(helpers_exports);
|
|
36
36
|
var React = __toESM(require("react"));
|
|
37
37
|
var import_moment = __toESM(require("moment"));
|
|
38
38
|
function getMaxSize() {
|
|
@@ -44,4 +44,4 @@ function getTime(date, formatString = "hh:mm a") {
|
|
|
44
44
|
function getDisplayDate(date, formatString = "MM/DD/YYYY") {
|
|
45
45
|
return (0, import_moment.default)(date).format(formatString);
|
|
46
46
|
}
|
|
47
|
-
//# sourceMappingURL=
|
|
47
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/helpers.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["import moment from 'moment';\n\nexport function getMaxSize() {\n return 113;\n}\nexport function getTime(date: Date, formatString = 'hh:mm a') {\n return moment(date).format(formatString);\n}\nexport function getDisplayDate(date: Date, formatString = 'MM/DD/YYYY') {\n return moment(date).format(formatString);\n}\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,oBAAmB;AAEZ,SAAS,aAAa;AAC3B,SAAO;AACT;AACO,SAAS,QAAQ,MAAY,eAAe,WAAW;AAC5D,aAAO,cAAAA,SAAO,IAAI,EAAE,OAAO,YAAY;AACzC;AACO,SAAS,eAAe,MAAY,eAAe,cAAc;AACtE,aAAO,cAAAA,SAAO,IAAI,EAAE,OAAO,YAAY;AACzC;",
|
|
6
|
+
"names": ["moment"]
|
|
7
|
+
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -28,13 +28,17 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
29
|
var src_exports = {};
|
|
30
30
|
__export(src_exports, {
|
|
31
|
-
DSCommentCard: () => DSCommentCard,
|
|
32
|
-
|
|
31
|
+
DSCommentCard: () => import_DSCommentCard2.DSCommentCard,
|
|
32
|
+
DSCommentCardDataTestIds: () => import_DSCommentCardDefinitions.DSCommentCardDataTestIds,
|
|
33
|
+
DSCommentCardName: () => import_DSCommentCardDefinitions.DSCommentCardName,
|
|
34
|
+
DSCommentCardSlots: () => import_DSCommentCardDefinitions.DSCommentCardSlots,
|
|
35
|
+
DSCommentCardWithSchema: () => import_DSCommentCard2.DSCommentCardWithSchema,
|
|
33
36
|
default: () => src_default
|
|
34
37
|
});
|
|
35
38
|
module.exports = __toCommonJS(src_exports);
|
|
36
39
|
var React = __toESM(require("react"));
|
|
37
|
-
var
|
|
38
|
-
|
|
39
|
-
var
|
|
40
|
+
var import_DSCommentCard = require("./DSCommentCard.js");
|
|
41
|
+
var import_DSCommentCard2 = require("./DSCommentCard.js");
|
|
42
|
+
var import_DSCommentCardDefinitions = require("./config/DSCommentCardDefinitions.js");
|
|
43
|
+
var src_default = import_DSCommentCard.DSCommentCard;
|
|
40
44
|
//# sourceMappingURL=index.js.map
|
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": ["
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;
|
|
6
|
-
"names": ["
|
|
4
|
+
"sourcesContent": ["// Workaround for TS2742\nimport type {} from '@xstyled/system';\nimport type {} from '@xstyled/util';\n\nimport { DSCommentCard } from './DSCommentCard.js';\n\nexport { DSCommentCard, DSCommentCardWithSchema } from './DSCommentCard.js';\nexport { DSCommentCardName, DSCommentCardSlots, DSCommentCardDataTestIds } from './config/DSCommentCardDefinitions.js';\nexport default DSCommentCard;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADIvB,2BAA8B;AAE9B,IAAAA,wBAAuD;AACvD,sCAAgF;AAChF,IAAO,cAAQ;",
|
|
6
|
+
"names": ["import_DSCommentCard"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,99 @@
|
|
|
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 __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var react_desc_prop_types_exports = {};
|
|
30
|
+
__export(react_desc_prop_types_exports, {
|
|
31
|
+
DSCommentCardPropTypes: () => DSCommentCardPropTypes,
|
|
32
|
+
DSCommentCardPropTypesSchema: () => DSCommentCardPropTypesSchema,
|
|
33
|
+
defaultProps: () => defaultProps
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(react_desc_prop_types_exports);
|
|
36
|
+
var React = __toESM(require("react"));
|
|
37
|
+
var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
|
|
38
|
+
const defaultProps = {
|
|
39
|
+
containerProps: {},
|
|
40
|
+
name: "",
|
|
41
|
+
date: /* @__PURE__ */ new Date(),
|
|
42
|
+
type: "",
|
|
43
|
+
content: "",
|
|
44
|
+
style: {},
|
|
45
|
+
options: [],
|
|
46
|
+
selection: { "single-selection-internal-external": ["set-as-internal"] },
|
|
47
|
+
customDropdownMenuProps: {
|
|
48
|
+
focusOnOpen: true
|
|
49
|
+
},
|
|
50
|
+
borderBottom: false,
|
|
51
|
+
dateFormat: "MM/DD/YYYY",
|
|
52
|
+
timeFormat: "hh:mm a",
|
|
53
|
+
maxLines: 2
|
|
54
|
+
};
|
|
55
|
+
const DSCommentCardPropTypes = {
|
|
56
|
+
...import_ds_props_helpers.globalAttributesPropTypes,
|
|
57
|
+
...import_ds_props_helpers.xstyledPropTypes,
|
|
58
|
+
/** props to inject to comment card wrapper */
|
|
59
|
+
containerProps: import_ds_props_helpers.PropTypes.shape({
|
|
60
|
+
id: import_ds_props_helpers.PropTypes.string,
|
|
61
|
+
"data-testid": import_ds_props_helpers.PropTypes.string
|
|
62
|
+
}).description("props to inject to comment card wrapper"),
|
|
63
|
+
/** form name */
|
|
64
|
+
name: import_ds_props_helpers.PropTypes.string.description("form name"),
|
|
65
|
+
/** style object */
|
|
66
|
+
style: import_ds_props_helpers.PropTypes.object.description(" style object "),
|
|
67
|
+
/** date object */
|
|
68
|
+
date: import_ds_props_helpers.PropTypes.instanceOf(Date).description("date object"),
|
|
69
|
+
/** comment type string */
|
|
70
|
+
type: import_ds_props_helpers.PropTypes.string.description("comment type string"),
|
|
71
|
+
/** comment content */
|
|
72
|
+
content: import_ds_props_helpers.PropTypes.string.description("comment content"),
|
|
73
|
+
/** dropdown menu options */
|
|
74
|
+
options: import_ds_props_helpers.PropTypes.arrayOf(import_ds_props_helpers.PropTypes.object).description("dropdown menu options").deprecated({ version: "4.x", message: "use Menu and menuProps instead" }),
|
|
75
|
+
/** dropdown selection */
|
|
76
|
+
selection: import_ds_props_helpers.PropTypes.object.description("dropdown selection").deprecated({ version: "4.x", message: "use Menu and menuProps instead" }),
|
|
77
|
+
/** pass down props to dropdown */
|
|
78
|
+
customDropdownMenuProps: import_ds_props_helpers.PropTypes.shape({
|
|
79
|
+
focusOnOpen: import_ds_props_helpers.PropTypes.bool
|
|
80
|
+
}).description("pass down props to dropdown").deprecated({ version: "4.x", message: "use Menu and menuProps instead" }),
|
|
81
|
+
/** toggle border bottom for card */
|
|
82
|
+
borderBottom: import_ds_props_helpers.PropTypes.bool.description("toggle border bottom for card"),
|
|
83
|
+
/** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
84
|
+
dateFormat: import_ds_props_helpers.PropTypes.oneOf(["MM/DD/YYYY", "MM DD YYYY"]).description(
|
|
85
|
+
"moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/"
|
|
86
|
+
),
|
|
87
|
+
/** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */
|
|
88
|
+
timeFormat: import_ds_props_helpers.PropTypes.oneOf(["hh:mm a", "HH:mm"]).description(
|
|
89
|
+
"moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/"
|
|
90
|
+
),
|
|
91
|
+
/**
|
|
92
|
+
* Max lines
|
|
93
|
+
*/
|
|
94
|
+
maxLines: import_ds_props_helpers.PropTypes.number.description("Max lines"),
|
|
95
|
+
Menu: import_ds_props_helpers.PropTypes.func.description("Menu component"),
|
|
96
|
+
menuProps: import_ds_props_helpers.PropTypes.object.description("Props that will be received by the Menu component")
|
|
97
|
+
};
|
|
98
|
+
const DSCommentCardPropTypesSchema = DSCommentCardPropTypes;
|
|
99
|
+
//# sourceMappingURL=react-desc-prop-types.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/react-desc-prop-types.ts", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
|
+
"sourcesContent": ["/* eslint-disable @typescript-eslint/no-empty-interface */\nimport { globalAttributesPropTypes, PropTypes, xstyledPropTypes } from '@elliemae/ds-props-helpers';\nimport type { WeakValidationMap } from 'react';\nimport type { GlobalAttributesT, XstyledProps, DSPropTypesSchema } from '@elliemae/ds-props-helpers';\n\nexport namespace DSCommentCardT {\n type PropsT<D, R, O, E> = Partial<D> &\n R &\n O &\n Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> &\n Omit<XstyledProps, keyof D | keyof R | keyof O>;\n type InternalPropsT<D, R, O, E> = D &\n R &\n O &\n Omit<GlobalAttributesT<E>, keyof D | keyof R | keyof O> &\n Omit<XstyledProps, keyof D | keyof R | keyof O>;\n\n export interface DefaultProps {\n containerProps: React.HTMLAttributes<HTMLDivElement>;\n name: string;\n date: Date;\n type: string;\n content: string;\n style: React.CSSProperties;\n options: unknown[];\n selection: unknown;\n customDropdownMenuProps: Record<string, unknown>;\n borderBottom: boolean;\n dateFormat: string;\n timeFormat: string;\n maxLines: number;\n }\n\n export interface OptionalProps {\n Menu?: React.ComponentType;\n menuProps?: object;\n }\n\n export interface RequiredProps {}\n\n export type Props = PropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n\n export type InternalProps = InternalPropsT<DefaultProps, RequiredProps, OptionalProps, HTMLDivElement>;\n}\n\nexport const defaultProps: DSCommentCardT.DefaultProps = {\n containerProps: {},\n name: '',\n date: new Date(),\n type: '',\n content: '',\n style: {},\n options: [],\n selection: { 'single-selection-internal-external': ['set-as-internal'] },\n customDropdownMenuProps: {\n focusOnOpen: true,\n },\n borderBottom: false,\n dateFormat: 'MM/DD/YYYY',\n timeFormat: 'hh:mm a',\n maxLines: 2,\n};\n\nexport const DSCommentCardPropTypes: DSPropTypesSchema<DSCommentCardT.Props> = {\n ...globalAttributesPropTypes,\n ...xstyledPropTypes,\n /** props to inject to comment card wrapper */\n containerProps: PropTypes.shape({\n id: PropTypes.string,\n 'data-testid': PropTypes.string,\n }).description('props to inject to comment card wrapper'),\n /** form name */\n name: PropTypes.string.description('form name'),\n /** style object */\n style: PropTypes.object.description(' style object '),\n /** date object */\n date: PropTypes.instanceOf(Date).description('date object'),\n /** comment type string */\n type: PropTypes.string.description('comment type string'),\n /** comment content */\n content: PropTypes.string.description('comment content'),\n /** dropdown menu options */\n options: PropTypes.arrayOf(PropTypes.object)\n .description('dropdown menu options')\n .deprecated({ version: '4.x', message: 'use Menu and menuProps instead' }),\n /** dropdown selection */\n selection: PropTypes.object\n .description('dropdown selection')\n .deprecated({ version: '4.x', message: 'use Menu and menuProps instead' }),\n /** pass down props to dropdown */\n customDropdownMenuProps: PropTypes.shape({\n focusOnOpen: PropTypes.bool,\n })\n .description('pass down props to dropdown')\n .deprecated({ version: '4.x', message: 'use Menu and menuProps instead' }),\n /** toggle border bottom for card */\n borderBottom: PropTypes.bool.description('toggle border bottom for card'),\n /** moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/ */\n dateFormat: PropTypes.oneOf(['MM/DD/YYYY', 'MM DD YYYY']).description(\n 'moment Year, month, and day tokens https://momentjs.com/docs/#/parsing/string-format/',\n ),\n /** moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/ */\n timeFormat: PropTypes.oneOf(['hh:mm a', 'HH:mm']).description(\n 'moment Hour, minute, second, millisecond, and offset tokens https://momentjs.com/docs/#/parsing/string-format/',\n ),\n /**\n * Max lines\n */\n maxLines: PropTypes.number.description('Max lines'),\n Menu: PropTypes.func.description('Menu component'),\n menuProps: PropTypes.object.description('Props that will be received by the Menu component'),\n};\n\nexport const DSCommentCardPropTypesSchema =\n DSCommentCardPropTypes as unknown as WeakValidationMap<DSCommentCardT.Props>;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAAuE;AA4ChE,MAAM,eAA4C;AAAA,EACvD,gBAAgB,CAAC;AAAA,EACjB,MAAM;AAAA,EACN,MAAM,oBAAI,KAAK;AAAA,EACf,MAAM;AAAA,EACN,SAAS;AAAA,EACT,OAAO,CAAC;AAAA,EACR,SAAS,CAAC;AAAA,EACV,WAAW,EAAE,sCAAsC,CAAC,iBAAiB,EAAE;AAAA,EACvE,yBAAyB;AAAA,IACvB,aAAa;AAAA,EACf;AAAA,EACA,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,UAAU;AACZ;AAEO,MAAM,yBAAkE;AAAA,EAC7E,GAAG;AAAA,EACH,GAAG;AAAA;AAAA,EAEH,gBAAgB,kCAAU,MAAM;AAAA,IAC9B,IAAI,kCAAU;AAAA,IACd,eAAe,kCAAU;AAAA,EAC3B,CAAC,EAAE,YAAY,yCAAyC;AAAA;AAAA,EAExD,MAAM,kCAAU,OAAO,YAAY,WAAW;AAAA;AAAA,EAE9C,OAAO,kCAAU,OAAO,YAAY,gBAAgB;AAAA;AAAA,EAEpD,MAAM,kCAAU,WAAW,IAAI,EAAE,YAAY,aAAa;AAAA;AAAA,EAE1D,MAAM,kCAAU,OAAO,YAAY,qBAAqB;AAAA;AAAA,EAExD,SAAS,kCAAU,OAAO,YAAY,iBAAiB;AAAA;AAAA,EAEvD,SAAS,kCAAU,QAAQ,kCAAU,MAAM,EACxC,YAAY,uBAAuB,EACnC,WAAW,EAAE,SAAS,OAAO,SAAS,iCAAiC,CAAC;AAAA;AAAA,EAE3E,WAAW,kCAAU,OAClB,YAAY,oBAAoB,EAChC,WAAW,EAAE,SAAS,OAAO,SAAS,iCAAiC,CAAC;AAAA;AAAA,EAE3E,yBAAyB,kCAAU,MAAM;AAAA,IACvC,aAAa,kCAAU;AAAA,EACzB,CAAC,EACE,YAAY,6BAA6B,EACzC,WAAW,EAAE,SAAS,OAAO,SAAS,iCAAiC,CAAC;AAAA;AAAA,EAE3E,cAAc,kCAAU,KAAK,YAAY,+BAA+B;AAAA;AAAA,EAExE,YAAY,kCAAU,MAAM,CAAC,cAAc,YAAY,CAAC,EAAE;AAAA,IACxD;AAAA,EACF;AAAA;AAAA,EAEA,YAAY,kCAAU,MAAM,CAAC,WAAW,OAAO,CAAC,EAAE;AAAA,IAChD;AAAA,EACF;AAAA;AAAA;AAAA;AAAA,EAIA,UAAU,kCAAU,OAAO,YAAY,WAAW;AAAA,EAClD,MAAM,kCAAU,KAAK,YAAY,gBAAgB;AAAA,EACjD,WAAW,kCAAU,OAAO,YAAY,mDAAmD;AAC7F;AAEO,MAAM,+BACX;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|