@elliemae/ds-text-wrapper 3.5.0-rc.2 → 3.5.0-rc.5
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/DSTextWrapper.js +23 -13
- package/dist/cjs/DSTextWrapper.js.map +2 -2
- package/dist/cjs/defaultProps.js +4 -1
- package/dist/cjs/defaultProps.js.map +1 -1
- package/dist/cjs/index.js +4 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/props.js +13 -4
- package/dist/cjs/props.js.map +1 -1
- package/dist/esm/DSTextWrapper.js +19 -12
- package/dist/esm/DSTextWrapper.js.map +2 -2
- package/dist/esm/defaultProps.js.map +1 -1
- package/dist/esm/index.js.map +2 -2
- package/dist/esm/props.js +9 -3
- package/dist/esm/props.js.map +1 -1
- package/package.json +3 -3
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var DSTextWrapper_exports = {};
|
|
23
26
|
__export(DSTextWrapper_exports, {
|
|
@@ -43,18 +46,25 @@ const DSTextWrapper = ({
|
|
|
43
46
|
textAlignment,
|
|
44
47
|
wordBreak
|
|
45
48
|
}) => {
|
|
46
|
-
const { cssClassName, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
49
|
+
const { cssClassName, classNameElement } = (0, import_ds_classnames.convertPropToCssClassName)(
|
|
50
|
+
"text-wrapperRef",
|
|
51
|
+
className,
|
|
52
|
+
{
|
|
53
|
+
textEllipsis,
|
|
54
|
+
textAlignment,
|
|
55
|
+
wordBreak
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
const limitPerCharacter = () => text.split(" ").reduce(
|
|
59
|
+
(result, word) => {
|
|
60
|
+
let resultIndex = result.length - 1;
|
|
61
|
+
if (result[resultIndex].length + word.length > maxCharacters)
|
|
62
|
+
resultIndex += 1;
|
|
63
|
+
result[resultIndex] = `${result[resultIndex] || ""} ${word}`;
|
|
64
|
+
return result;
|
|
65
|
+
},
|
|
66
|
+
[""]
|
|
67
|
+
);
|
|
58
68
|
let displayText = text;
|
|
59
69
|
if (textEllipsis)
|
|
60
70
|
displayText = maxCharacters > 0 ? displayText.substring(0, maxCharacters) : displayText;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/DSTextWrapper.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["/* eslint-disable react/no-array-index-key */\nimport React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { textProps } from './props';\nimport { defaultProps } from './defaultProps';\n\n/**\n * if we don't care about word break\n * const regx = new RegExp(`.{1,${maxCharacters}}`, 'g')\n * text.match(regx)\n *\n * @param {*} param0\n */\nconst DSTextWrapper = ({\n containerProps,\n className,\n style,\n text,\n maxCharacters,\n maxWidth,\n textEllipsis,\n textAlignment,\n wordBreak,\n}) => {\n const { cssClassName, classNameElement } = convertPropToCssClassName(\n 'text-wrapperRef',\n className,\n {\n textEllipsis,\n textAlignment,\n wordBreak,\n },\n );\n const limitPerCharacter = () =>\n text.split(' ').reduce(\n (result, word) => {\n let resultIndex = result.length - 1;\n if (result[resultIndex].length + word.length > maxCharacters)\n resultIndex += 1;\n result[resultIndex] = `${result[resultIndex] || ''} ${word}`;\n return result;\n },\n [''],\n );\n\n let displayText = text;\n\n if (textEllipsis)\n displayText =\n maxCharacters > 0 ? displayText.substring(0, maxCharacters) : displayText;\n else if (maxCharacters > 0) {\n displayText = limitPerCharacter().map((textpart, index) => (\n <span key={index} className={classNameElement('line')}>\n {textpart}\n </span>\n ));\n }\n\n return (\n <span\n {...containerProps}\n className={cssClassName}\n style={{\n maxWidth: maxCharacters < 1 ? maxWidth : null,\n ...style,\n }}\n >\n {textEllipsis ? (\n <span className={classNameElement('ellipsis-wrapperRef')}>\n {displayText}\n </span>\n ) : (\n displayText\n )}\n </span>\n );\n};\n\nDSTextWrapper.propTypes = textProps;\nDSTextWrapper.defaultProps = defaultProps;\nDSTextWrapper.displayName = 'DSTextWrapper';\nconst TextWrapperWithSchema = describe(DSTextWrapper);\nTextWrapperWithSchema.propTypes = textProps;\n\nexport { DSTextWrapper, TextWrapperWithSchema };\nexport default DSTextWrapper;\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,mBAAkB;AAClB,0BAAyB;AACzB,2BAA0C;AAC1C,mBAA0B;AAC1B,0BAA6B;AAS7B,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,cAAc,iBAAiB,QAAI;AAAA,IACzC;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,QAAM,oBAAoB,MACxB,KAAK,MAAM,GAAG,EAAE;AAAA,IACd,CAAC,QAAQ,SAAS;AAChB,UAAI,cAAc,OAAO,SAAS;AAClC,UAAI,OAAO,aAAa,SAAS,KAAK,SAAS;AAC7C,uBAAe;AACjB,aAAO,eAAe,GAAG,OAAO,gBAAgB,MAAM;AACtD,aAAO;AAAA,IACT;AAAA,IACA,CAAC,EAAE;AAAA,EACL;AAEF,MAAI,cAAc;AAElB,MAAI;AACF,kBACE,gBAAgB,IAAI,YAAY,UAAU,GAAG,aAAa,IAAI;AAAA,WACzD,gBAAgB,GAAG;AAC1B,kBAAc,kBAAkB,EAAE,IAAI,CAAC,UAAU,UAC/C,6BAAAA,QAAA,cAAC;AAAA,MAAK,KAAK;AAAA,MAAO,WAAW,iBAAiB,MAAM;AAAA,OACjD,QACH,CACD;AAAA,EACH;AAEA,SACE,6BAAAA,QAAA,cAAC;AAAA,IACE,GAAG;AAAA,IACJ,WAAW;AAAA,IACX,OAAO;AAAA,MACL,UAAU,gBAAgB,IAAI,WAAW;AAAA,MACzC,GAAG;AAAA,IACL;AAAA,KAEC,eACC,6BAAAA,QAAA,cAAC;AAAA,IAAK,WAAW,iBAAiB,qBAAqB;AAAA,KACpD,WACH,IAEA,WAEJ;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,cAAc;AAC5B,MAAM,4BAAwB,8BAAS,aAAa;AACpD,sBAAsB,YAAY;AAGlC,IAAO,wBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
package/dist/cjs/defaultProps.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var defaultProps_exports = {};
|
|
23
26
|
__export(defaultProps_exports, {
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/defaultProps.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export const defaultProps = {\n containerProps: {},\n className: '',\n style: {},\n text: '',\n maxCharacters: 0,\n maxWidth: '100%',\n textEllipsis: false,\n textAlignment: 'left',\n wordBreak: true,\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAhB,MAAM,eAAe;AAAA,EAC1B,gBAAgB,CAAC;AAAA,EACjB,WAAW;AAAA,EACX,OAAO,CAAC;AAAA,EACR,MAAM;AAAA,EACN,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,WAAW;AACb;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -18,7 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
20
|
var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
21
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
23
|
+
mod
|
|
24
|
+
));
|
|
22
25
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
23
26
|
var src_exports = {};
|
|
24
27
|
__export(src_exports, {
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["export * from './DSTextWrapper';\nexport { default } from './DSTextWrapper';\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,4BAAd;AACA,2BAAwB;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/cjs/props.js
CHANGED
|
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
17
|
}
|
|
18
18
|
return to;
|
|
19
19
|
};
|
|
20
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
+
mod
|
|
23
|
+
));
|
|
21
24
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
22
25
|
var props_exports = {};
|
|
23
26
|
__export(props_exports, {
|
|
@@ -27,14 +30,20 @@ module.exports = __toCommonJS(props_exports);
|
|
|
27
30
|
var React = __toESM(require("react"));
|
|
28
31
|
var import_ds_utilities = require("@elliemae/ds-utilities");
|
|
29
32
|
const textProps = {
|
|
30
|
-
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
33
|
+
containerProps: import_ds_utilities.PropTypes.object.description(
|
|
34
|
+
"Set of Properties attached to the main container"
|
|
35
|
+
),
|
|
31
36
|
className: import_ds_utilities.PropTypes.string.description("css class"),
|
|
32
37
|
style: import_ds_utilities.PropTypes.object.description("css style"),
|
|
33
38
|
text: import_ds_utilities.PropTypes.string.description("Text to display").isRequired,
|
|
34
|
-
maxCharacters: import_ds_utilities.PropTypes.number.description(
|
|
39
|
+
maxCharacters: import_ds_utilities.PropTypes.number.description(
|
|
40
|
+
"Maximum amount of charachters allowed"
|
|
41
|
+
),
|
|
35
42
|
maxWidth: import_ds_utilities.PropTypes.string.description("Maximum width allowed"),
|
|
36
43
|
textEllipsis: import_ds_utilities.PropTypes.bool.description("Whether to show ellipsis or not"),
|
|
37
|
-
textAlignment: import_ds_utilities.PropTypes.oneOf(["left", "center", "right"]).description(
|
|
44
|
+
textAlignment: import_ds_utilities.PropTypes.oneOf(["left", "center", "right"]).description(
|
|
45
|
+
"Text alignement"
|
|
46
|
+
),
|
|
38
47
|
wordBreak: import_ds_utilities.PropTypes.bool.description("Whether to break the line or not")
|
|
39
48
|
};
|
|
40
49
|
//# sourceMappingURL=props.js.map
|
package/dist/cjs/props.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/props.tsx", "../../../../scripts/build/transpile/react-shim.js"],
|
|
4
4
|
"sourcesContent": ["import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const textProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n className: PropTypes.string.description('css class'),\n style: PropTypes.object.description('css style'),\n text: PropTypes.string.description('Text to display').isRequired,\n maxCharacters: PropTypes.number.description(\n 'Maximum amount of charachters allowed',\n ),\n maxWidth: PropTypes.string.description('Maximum width allowed'),\n textEllipsis: PropTypes.bool.description('Whether to show ellipsis or not'),\n textAlignment: PropTypes.oneOf(['left', 'center', 'right']).description(\n 'Text alignement',\n ),\n wordBreak: PropTypes.bool.description('Whether to break the line or not'),\n};\n", "import * as React from 'react';\nexport { React };\n"],
|
|
5
|
-
"mappings": "
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,gBAAgB,8BAAU,OAAO;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,WAAW,8BAAU,OAAO,YAAY,WAAW;AAAA,EACnD,OAAO,8BAAU,OAAO,YAAY,WAAW;AAAA,EAC/C,MAAM,8BAAU,OAAO,YAAY,iBAAiB,EAAE;AAAA,EACtD,eAAe,8BAAU,OAAO;AAAA,IAC9B;AAAA,EACF;AAAA,EACA,UAAU,8BAAU,OAAO,YAAY,uBAAuB;AAAA,EAC9D,cAAc,8BAAU,KAAK,YAAY,iCAAiC;AAAA,EAC1E,eAAe,8BAAU,MAAM,CAAC,QAAQ,UAAU,OAAO,CAAC,EAAE;AAAA,IAC1D;AAAA,EACF;AAAA,EACA,WAAW,8BAAU,KAAK,YAAY,kCAAkC;AAC1E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -15,18 +15,25 @@ const DSTextWrapper = ({
|
|
|
15
15
|
textAlignment,
|
|
16
16
|
wordBreak
|
|
17
17
|
}) => {
|
|
18
|
-
const { cssClassName, classNameElement } = convertPropToCssClassName(
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
18
|
+
const { cssClassName, classNameElement } = convertPropToCssClassName(
|
|
19
|
+
"text-wrapperRef",
|
|
20
|
+
className,
|
|
21
|
+
{
|
|
22
|
+
textEllipsis,
|
|
23
|
+
textAlignment,
|
|
24
|
+
wordBreak
|
|
25
|
+
}
|
|
26
|
+
);
|
|
27
|
+
const limitPerCharacter = () => text.split(" ").reduce(
|
|
28
|
+
(result, word) => {
|
|
29
|
+
let resultIndex = result.length - 1;
|
|
30
|
+
if (result[resultIndex].length + word.length > maxCharacters)
|
|
31
|
+
resultIndex += 1;
|
|
32
|
+
result[resultIndex] = `${result[resultIndex] || ""} ${word}`;
|
|
33
|
+
return result;
|
|
34
|
+
},
|
|
35
|
+
[""]
|
|
36
|
+
);
|
|
30
37
|
let displayText = text;
|
|
31
38
|
if (textEllipsis)
|
|
32
39
|
displayText = maxCharacters > 0 ? displayText.substring(0, maxCharacters) : displayText;
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/DSTextWrapper.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable react/no-array-index-key */\nimport React from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { convertPropToCssClassName } from '@elliemae/ds-classnames';\nimport { textProps } from './props';\nimport { defaultProps } from './defaultProps';\n\n/**\n * if we don't care about word break\n * const regx = new RegExp(`.{1,${maxCharacters}}`, 'g')\n * text.match(regx)\n *\n * @param {*} param0\n */\nconst DSTextWrapper = ({\n containerProps,\n className,\n style,\n text,\n maxCharacters,\n maxWidth,\n textEllipsis,\n textAlignment,\n wordBreak,\n}) => {\n const { cssClassName, classNameElement } = convertPropToCssClassName(\n 'text-wrapperRef',\n className,\n {\n textEllipsis,\n textAlignment,\n wordBreak,\n },\n );\n const limitPerCharacter = () =>\n text.split(' ').reduce(\n (result, word) => {\n let resultIndex = result.length - 1;\n if (result[resultIndex].length + word.length > maxCharacters)\n resultIndex += 1;\n result[resultIndex] = `${result[resultIndex] || ''} ${word}`;\n return result;\n },\n [''],\n );\n\n let displayText = text;\n\n if (textEllipsis)\n displayText =\n maxCharacters > 0 ? displayText.substring(0, maxCharacters) : displayText;\n else if (maxCharacters > 0) {\n displayText = limitPerCharacter().map((textpart, index) => (\n <span key={index} className={classNameElement('line')}>\n {textpart}\n </span>\n ));\n }\n\n return (\n <span\n {...containerProps}\n className={cssClassName}\n style={{\n maxWidth: maxCharacters < 1 ? maxWidth : null,\n ...style,\n }}\n >\n {textEllipsis ? (\n <span className={classNameElement('ellipsis-wrapperRef')}>\n {displayText}\n </span>\n ) : (\n displayText\n )}\n </span>\n );\n};\n\nDSTextWrapper.propTypes = textProps;\nDSTextWrapper.defaultProps = defaultProps;\nDSTextWrapper.displayName = 'DSTextWrapper';\nconst TextWrapperWithSchema = describe(DSTextWrapper);\nTextWrapperWithSchema.propTypes = textProps;\n\nexport { DSTextWrapper, TextWrapperWithSchema };\nexport default DSTextWrapper;\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACCvB,OAAOA,YAAW;AAClB,SAAS,gBAAgB;AACzB,SAAS,iCAAiC;AAC1C,SAAS,iBAAiB;AAC1B,SAAS,oBAAoB;AAS7B,MAAM,gBAAgB,CAAC;AAAA,EACrB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF,MAAM;AACJ,QAAM,EAAE,cAAc,iBAAiB,IAAI;AAAA,IACzC;AAAA,IACA;AAAA,IACA;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACA,QAAM,oBAAoB,MACxB,KAAK,MAAM,GAAG,EAAE;AAAA,IACd,CAAC,QAAQ,SAAS;AAChB,UAAI,cAAc,OAAO,SAAS;AAClC,UAAI,OAAO,aAAa,SAAS,KAAK,SAAS;AAC7C,uBAAe;AACjB,aAAO,eAAe,GAAG,OAAO,gBAAgB,MAAM;AACtD,aAAO;AAAA,IACT;AAAA,IACA,CAAC,EAAE;AAAA,EACL;AAEF,MAAI,cAAc;AAElB,MAAI;AACF,kBACE,gBAAgB,IAAI,YAAY,UAAU,GAAG,aAAa,IAAI;AAAA,WACzD,gBAAgB,GAAG;AAC1B,kBAAc,kBAAkB,EAAE,IAAI,CAAC,UAAU,UAC/C,gBAAAA,OAAA,cAAC;AAAA,MAAK,KAAK;AAAA,MAAO,WAAW,iBAAiB,MAAM;AAAA,OACjD,QACH,CACD;AAAA,EACH;AAEA,SACE,gBAAAA,OAAA,cAAC;AAAA,IACE,GAAG;AAAA,IACJ,WAAW;AAAA,IACX,OAAO;AAAA,MACL,UAAU,gBAAgB,IAAI,WAAW;AAAA,MACzC,GAAG;AAAA,IACL;AAAA,KAEC,eACC,gBAAAA,OAAA,cAAC;AAAA,IAAK,WAAW,iBAAiB,qBAAqB;AAAA,KACpD,WACH,IAEA,WAEJ;AAEJ;AAEA,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,cAAc;AAC5B,MAAM,wBAAwB,SAAS,aAAa;AACpD,sBAAsB,YAAY;AAGlC,IAAO,wBAAQ;",
|
|
6
|
+
"names": ["React"]
|
|
7
7
|
}
|
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/defaultProps.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export const defaultProps = {\n containerProps: {},\n className: '',\n style: {},\n text: '',\n maxCharacters: 0,\n maxWidth: '100%',\n textEllipsis: false,\n textAlignment: 'left',\n wordBreak: true,\n};\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAhB,MAAM,eAAe;AAAA,EAC1B,gBAAgB,CAAC;AAAA,EACjB,WAAW;AAAA,EACX,OAAO,CAAC;AAAA,EACR,MAAM;AAAA,EACN,eAAe;AAAA,EACf,UAAU;AAAA,EACV,cAAc;AAAA,EACd,eAAe;AAAA,EACf,WAAW;AACb;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/index.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSTextWrapper';\nexport { default } from './DSTextWrapper';\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
6
|
-
"names": []
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,SAAS,WAAAA,gBAAe;",
|
|
6
|
+
"names": ["default"]
|
|
7
7
|
}
|
package/dist/esm/props.js
CHANGED
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { PropTypes } from "@elliemae/ds-utilities";
|
|
3
3
|
const textProps = {
|
|
4
|
-
containerProps: PropTypes.object.description(
|
|
4
|
+
containerProps: PropTypes.object.description(
|
|
5
|
+
"Set of Properties attached to the main container"
|
|
6
|
+
),
|
|
5
7
|
className: PropTypes.string.description("css class"),
|
|
6
8
|
style: PropTypes.object.description("css style"),
|
|
7
9
|
text: PropTypes.string.description("Text to display").isRequired,
|
|
8
|
-
maxCharacters: PropTypes.number.description(
|
|
10
|
+
maxCharacters: PropTypes.number.description(
|
|
11
|
+
"Maximum amount of charachters allowed"
|
|
12
|
+
),
|
|
9
13
|
maxWidth: PropTypes.string.description("Maximum width allowed"),
|
|
10
14
|
textEllipsis: PropTypes.bool.description("Whether to show ellipsis or not"),
|
|
11
|
-
textAlignment: PropTypes.oneOf(["left", "center", "right"]).description(
|
|
15
|
+
textAlignment: PropTypes.oneOf(["left", "center", "right"]).description(
|
|
16
|
+
"Text alignement"
|
|
17
|
+
),
|
|
12
18
|
wordBreak: PropTypes.bool.description("Whether to break the line or not")
|
|
13
19
|
};
|
|
14
20
|
export {
|
package/dist/esm/props.js.map
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/props.tsx"],
|
|
4
4
|
"sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\n\nexport const textProps = {\n containerProps: PropTypes.object.description(\n 'Set of Properties attached to the main container',\n ),\n className: PropTypes.string.description('css class'),\n style: PropTypes.object.description('css style'),\n text: PropTypes.string.description('Text to display').isRequired,\n maxCharacters: PropTypes.number.description(\n 'Maximum amount of charachters allowed',\n ),\n maxWidth: PropTypes.string.description('Maximum width allowed'),\n textEllipsis: PropTypes.bool.description('Whether to show ellipsis or not'),\n textAlignment: PropTypes.oneOf(['left', 'center', 'right']).description(\n 'Text alignement',\n ),\n wordBreak: PropTypes.bool.description('Whether to break the line or not'),\n};\n"],
|
|
5
|
-
"mappings": "AAAA;
|
|
5
|
+
"mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAEnB,MAAM,YAAY;AAAA,EACvB,gBAAgB,UAAU,OAAO;AAAA,IAC/B;AAAA,EACF;AAAA,EACA,WAAW,UAAU,OAAO,YAAY,WAAW;AAAA,EACnD,OAAO,UAAU,OAAO,YAAY,WAAW;AAAA,EAC/C,MAAM,UAAU,OAAO,YAAY,iBAAiB,EAAE;AAAA,EACtD,eAAe,UAAU,OAAO;AAAA,IAC9B;AAAA,EACF;AAAA,EACA,UAAU,UAAU,OAAO,YAAY,uBAAuB;AAAA,EAC9D,cAAc,UAAU,KAAK,YAAY,iCAAiC;AAAA,EAC1E,eAAe,UAAU,MAAM,CAAC,QAAQ,UAAU,OAAO,CAAC,EAAE;AAAA,IAC1D;AAAA,EACF;AAAA,EACA,WAAW,UAAU,KAAK,YAAY,kCAAkC;AAC1E;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-text-wrapper",
|
|
3
|
-
"version": "3.5.0-rc.
|
|
3
|
+
"version": "3.5.0-rc.5",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "ICE MT - Dimsum - Text Wrapper",
|
|
6
6
|
"files": [
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"indent": 4
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@elliemae/ds-classnames": "3.5.0-rc.
|
|
51
|
-
"@elliemae/ds-utilities": "3.5.0-rc.
|
|
50
|
+
"@elliemae/ds-classnames": "3.5.0-rc.5",
|
|
51
|
+
"@elliemae/ds-utilities": "3.5.0-rc.5"
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"lodash": "^4.17.21",
|