@pie-lib/mask-markup 1.10.21-next.293 → 1.10.21-next.333
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/CHANGELOG.md +137 -0
- package/lib/mask.js +1 -1
- package/lib/mask.js.map +1 -1
- package/package.json +4 -4
- package/src/mask.jsx +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,143 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.12.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.12.5...@pie-lib/mask-markup@1.12.6) (2022-05-30)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* unable to load items locally ([17ab686](https://github.com/pie-framework/pie-lib/commit/17ab6864557288aef6ec1d9a130cb508e2591562))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [1.12.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.12.4...@pie-lib/mask-markup@1.12.5) (2022-05-24)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
## [1.12.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.12.3...@pie-lib/mask-markup@1.12.4) (2022-04-28)
|
|
26
|
+
|
|
27
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
## [1.12.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.12.2...@pie-lib/mask-markup@1.12.3) (2022-03-28)
|
|
34
|
+
|
|
35
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
## [1.12.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.12.1...@pie-lib/mask-markup@1.12.2) (2022-03-21)
|
|
42
|
+
|
|
43
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
## [1.12.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.12.0...@pie-lib/mask-markup@1.12.1) (2022-03-21)
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
### Bug Fixes
|
|
53
|
+
|
|
54
|
+
* **blank:** made sure height is auto to adapt to content, until it is calculated [PD-1652] ([9c3032f](https://github.com/pie-framework/pie-lib/commit/9c3032fb2adff3a06e94bcea63ea6c3de520b9d4))
|
|
55
|
+
* **mask:** made sure display inherit is not messing up div blocks ([8ae905c](https://github.com/pie-framework/pie-lib/commit/8ae905c48fb12002c007f0a62db2f1ead92fa881))
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# [1.12.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.11.4...@pie-lib/mask-markup@1.12.0) (2022-03-07)
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
### Bug Fixes
|
|
65
|
+
|
|
66
|
+
* **mask-markup:** fix style for drag-in-the-blank image tokens PD-1351 ([3302de1](https://github.com/pie-framework/pie-lib/commit/3302de16d94ad4dce3aa81c25a0b939bf0f19bc6))
|
|
67
|
+
* **mask-markup:** render mathml correctly PD-397 ([c89862b](https://github.com/pie-framework/pie-lib/commit/c89862b8c0f4ec7f1394f966d85a68a9bf6ffc12))
|
|
68
|
+
* **mask-markup:** Separated input width and characters limit PD-1395 PD-1396 ([c78ba6a](https://github.com/pie-framework/pie-lib/commit/c78ba6ad9325a6671d26eee14e855cb7ff979c91))
|
|
69
|
+
* **serialization:** made sure units are not added to mask-markup elements [PD-722] ([b855b27](https://github.com/pie-framework/pie-lib/commit/b855b27803965528968d5d2165fa4fd342414685))
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
### Features
|
|
73
|
+
|
|
74
|
+
* **design:** masked markup inherits the container display property [PD-1418] ([3095d29](https://github.com/pie-framework/pie-lib/commit/3095d29c9ad1ae70f5f669abb5fb62abb5f8d955))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## [1.11.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.11.3...@pie-lib/mask-markup@1.11.4) (2021-12-13)
|
|
81
|
+
|
|
82
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
## [1.11.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.11.2...@pie-lib/mask-markup@1.11.3) (2021-11-29)
|
|
89
|
+
|
|
90
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
## [1.11.2](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.11.1...@pie-lib/mask-markup@1.11.2) (2021-11-10)
|
|
97
|
+
|
|
98
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
## [1.11.1](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.11.0...@pie-lib/mask-markup@1.11.1) (2021-10-18)
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
### Bug Fixes
|
|
108
|
+
|
|
109
|
+
* **mask-markup:** Fixed border radius in pits ([41c0acd](https://github.com/pie-framework/pie-lib/commit/41c0acd))
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
# [1.11.0](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.10.22...@pie-lib/mask-markup@1.11.0) (2021-10-18)
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
### Features
|
|
119
|
+
|
|
120
|
+
* **mask-markup:** Added a max limit of characters, adjusted the width and updated design PD-794 ([f46d544](https://github.com/pie-framework/pie-lib/commit/f46d544))
|
|
121
|
+
* **mask-markup:** Made sure that the changes do not affect other components ([e3c5f8c](https://github.com/pie-framework/pie-lib/commit/e3c5f8c))
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
## [1.10.22](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.10.21...@pie-lib/mask-markup@1.10.22) (2021-09-08)
|
|
128
|
+
|
|
129
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
## [1.10.21](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.10.20...@pie-lib/mask-markup@1.10.21) (2021-09-08)
|
|
136
|
+
|
|
137
|
+
**Note:** Version bump only for package @pie-lib/mask-markup
|
|
138
|
+
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
6
143
|
## [1.10.20](https://github.com/pie-framework/pie-lib/compare/@pie-lib/mask-markup@1.10.19...@pie-lib/mask-markup@1.10.20) (2021-08-30)
|
|
7
144
|
|
|
8
145
|
**Note:** Version bump only for package @pie-lib/mask-markup
|
package/lib/mask.js
CHANGED
|
@@ -96,7 +96,7 @@ var renderChildren = function renderChildren(layout, value, onChange, rootRender
|
|
|
96
96
|
if (n.isMath) {
|
|
97
97
|
children.push( /*#__PURE__*/_react["default"].createElement("span", {
|
|
98
98
|
dangerouslySetInnerHTML: {
|
|
99
|
-
__html: "<math>".concat(n.nodes[0].innerHTML, "</math>")
|
|
99
|
+
__html: "<math displaystyle=\"true\">".concat(n.nodes[0].innerHTML, "</math>")
|
|
100
100
|
}
|
|
101
101
|
}));
|
|
102
102
|
return children;
|
package/lib/mask.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mask.js","names":["Paragraph","withStyles","theme","para","paddingTop","spacing","unit","paddingBottom","props","classes","children","restrictWhitespaceTypes","addText","parentNode","text","isWhitespace","trim","parentType","type","includes","undefined","getMark","n","mark","leaves","find","leave","get","length","marks","renderChildren","layout","value","onChange","rootRenderChildren","nodes","forEach","index","key","isMath","push","__html","innerHTML","c","object","content","reduce","acc","l","t","extraText","markKey","MARK_TAGS","Tag","subNodes","data","attributes","MaskContainer","main","display","Mask","id","handleChange","React","Component","PropTypes","func"],"sources":["../src/mask.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/get';\nimport { withStyles } from '@material-ui/core/styles';\nimport { MARK_TAGS } from './serialization';\n\nconst Paragraph = withStyles(theme => ({\n para: {\n paddingTop: 2 * theme.spacing.unit,\n paddingBottom: 2 * theme.spacing.unit\n }\n}))(props => <div className={props.classes.para}>{props.children}</div>);\n\nconst restrictWhitespaceTypes = ['tbody', 'tr'];\n\nconst addText = (parentNode, text) => {\n const isWhitespace = text.trim() === '';\n const parentType = parentNode && parentNode.type;\n\n if (isWhitespace && restrictWhitespaceTypes.includes(parentType)) {\n return undefined;\n } else {\n return text;\n }\n};\n\nconst getMark = n => {\n const mark = n.leaves.find(leave => get(leave, 'marks', []).length);\n\n if (mark) {\n return mark.marks[0];\n }\n\n return null;\n};\n\nexport const renderChildren = (layout, value, onChange, rootRenderChildren, parentNode) => {\n if (!value) {\n return null;\n }\n\n const children = [];\n\n (layout.nodes || []).forEach((n, index) => {\n const key = `${n.type}-${index}`;\n\n if (n.isMath) {\n children.push(\n <span dangerouslySetInnerHTML={{ __html: `<math>${n.nodes[0].innerHTML}</math>` }} />\n );\n return children;\n }\n\n if (rootRenderChildren) {\n const c = rootRenderChildren(n, value, onChange);\n if (c) {\n children.push(c);\n return;\n }\n }\n\n if (n.object === 'text') {\n const content = n.leaves.reduce((acc, l) => {\n const t = l.text;\n const extraText = addText(parentNode, t);\n return extraText ? acc + extraText : acc;\n }, '');\n const mark = getMark(n);\n\n if (mark) {\n let markKey;\n\n for (markKey in MARK_TAGS) {\n if (MARK_TAGS[markKey] === mark.type) {\n const Tag = markKey;\n\n children.push(<Tag>{content}</Tag>);\n break;\n }\n }\n } else if (content.length > 0) {\n children.push(content);\n }\n } else {\n const subNodes = renderChildren(n, value, onChange, rootRenderChildren, n);\n if (n.type === 'p' || n.type === 'paragraph') {\n children.push(<Paragraph key={key}>{subNodes}</Paragraph>);\n } else {\n const Tag = n.type;\n if (n.nodes && n.nodes.length > 0) {\n children.push(\n <Tag key={key} {...n.data.attributes}>\n {subNodes}\n </Tag>\n );\n } else {\n children.push(<Tag key={key} {...n.data.attributes} />);\n }\n }\n }\n });\n return children;\n};\n\nconst MaskContainer = withStyles(() => ({\n main: {\n display: 'initial'\n }\n}))(props => <div className={props.classes.main}>{props.children}</div>);\n\n/**\n * Renders a layout that uses the slate.js Value model structure.\n */\nexport default class Mask extends React.Component {\n static propTypes = {\n renderChildren: PropTypes.func,\n layout: PropTypes.object,\n value: PropTypes.object,\n onChange: PropTypes.func\n };\n\n handleChange = (id, value) => {\n const data = { ...this.props.value, [id]: value };\n this.props.onChange(data);\n };\n\n render() {\n const { value, layout } = this.props;\n const children = renderChildren(layout, value, this.handleChange, this.props.renderChildren);\n\n return <MaskContainer>{children}</MaskContainer>;\n }\n}\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,IAAMA,SAAS,GAAG,IAAAC,kBAAA,EAAW,UAAAC,KA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ED,IAAMtB,QAAQ,GAAG,EAAjB;EAEA,CAACqB,MAAM,CAACI,KAAP,IAAgB,EAAjB,EAAqBC,OAArB,CAA6B,UAACd,CAAD,EAAIe,KAAJ,EAAc;IACzC,IAAMC,GAAG,aAAMhB,CAAC,CAACJ,IAAR,cAAgBmB,KAAhB,CAAT;;IAEA,IAAIf,CAAC,CAACiB,MAAN,EAAc;MACZ7B,QAAQ,CAAC8B,IAAT,eACE;QAAM,uBAAuB,EAAE;UAAEC,MAAM,
|
|
1
|
+
{"version":3,"file":"mask.js","names":["Paragraph","withStyles","theme","para","paddingTop","spacing","unit","paddingBottom","props","classes","children","restrictWhitespaceTypes","addText","parentNode","text","isWhitespace","trim","parentType","type","includes","undefined","getMark","n","mark","leaves","find","leave","get","length","marks","renderChildren","layout","value","onChange","rootRenderChildren","nodes","forEach","index","key","isMath","push","__html","innerHTML","c","object","content","reduce","acc","l","t","extraText","markKey","MARK_TAGS","Tag","subNodes","data","attributes","MaskContainer","main","display","Mask","id","handleChange","React","Component","PropTypes","func"],"sources":["../src/mask.jsx"],"sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport get from 'lodash/get';\nimport { withStyles } from '@material-ui/core/styles';\nimport { MARK_TAGS } from './serialization';\n\nconst Paragraph = withStyles(theme => ({\n para: {\n paddingTop: 2 * theme.spacing.unit,\n paddingBottom: 2 * theme.spacing.unit\n }\n}))(props => <div className={props.classes.para}>{props.children}</div>);\n\nconst restrictWhitespaceTypes = ['tbody', 'tr'];\n\nconst addText = (parentNode, text) => {\n const isWhitespace = text.trim() === '';\n const parentType = parentNode && parentNode.type;\n\n if (isWhitespace && restrictWhitespaceTypes.includes(parentType)) {\n return undefined;\n } else {\n return text;\n }\n};\n\nconst getMark = n => {\n const mark = n.leaves.find(leave => get(leave, 'marks', []).length);\n\n if (mark) {\n return mark.marks[0];\n }\n\n return null;\n};\n\nexport const renderChildren = (layout, value, onChange, rootRenderChildren, parentNode) => {\n if (!value) {\n return null;\n }\n\n const children = [];\n\n (layout.nodes || []).forEach((n, index) => {\n const key = `${n.type}-${index}`;\n\n if (n.isMath) {\n children.push(\n <span dangerouslySetInnerHTML={{ __html: `<math displaystyle=\"true\">${n.nodes[0].innerHTML}</math>` }} />\n );\n return children;\n }\n\n if (rootRenderChildren) {\n const c = rootRenderChildren(n, value, onChange);\n if (c) {\n children.push(c);\n return;\n }\n }\n\n if (n.object === 'text') {\n const content = n.leaves.reduce((acc, l) => {\n const t = l.text;\n const extraText = addText(parentNode, t);\n return extraText ? acc + extraText : acc;\n }, '');\n const mark = getMark(n);\n\n if (mark) {\n let markKey;\n\n for (markKey in MARK_TAGS) {\n if (MARK_TAGS[markKey] === mark.type) {\n const Tag = markKey;\n\n children.push(<Tag>{content}</Tag>);\n break;\n }\n }\n } else if (content.length > 0) {\n children.push(content);\n }\n } else {\n const subNodes = renderChildren(n, value, onChange, rootRenderChildren, n);\n if (n.type === 'p' || n.type === 'paragraph') {\n children.push(<Paragraph key={key}>{subNodes}</Paragraph>);\n } else {\n const Tag = n.type;\n if (n.nodes && n.nodes.length > 0) {\n children.push(\n <Tag key={key} {...n.data.attributes}>\n {subNodes}\n </Tag>\n );\n } else {\n children.push(<Tag key={key} {...n.data.attributes} />);\n }\n }\n }\n });\n return children;\n};\n\nconst MaskContainer = withStyles(() => ({\n main: {\n display: 'initial'\n }\n}))(props => <div className={props.classes.main}>{props.children}</div>);\n\n/**\n * Renders a layout that uses the slate.js Value model structure.\n */\nexport default class Mask extends React.Component {\n static propTypes = {\n renderChildren: PropTypes.func,\n layout: PropTypes.object,\n value: PropTypes.object,\n onChange: PropTypes.func\n };\n\n handleChange = (id, value) => {\n const data = { ...this.props.value, [id]: value };\n this.props.onChange(data);\n };\n\n render() {\n const { value, layout } = this.props;\n const children = renderChildren(layout, value, this.handleChange, this.props.renderChildren);\n\n return <MaskContainer>{children}</MaskContainer>;\n }\n}\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;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AAK,SAAS,EAAEA,KAAK,CAACC,OAAN,CAAciD;EAA9B,GAAqClD,KAAK,CAACE,QAA3C,CAAJ;AAAA,CAJa,CAAtB;AAMA;AACA;AACA;;IACqBkD,I;;;;;;;;;;;;;;;;mEAQJ,UAACC,EAAD,EAAK7B,KAAL,EAAe;MAC5B,IAAMuB,IAAI,mCAAQ,MAAK/C,KAAL,CAAWwB,KAAnB,2BAA2B6B,EAA3B,EAAgC7B,KAAhC,EAAV;;MACA,MAAKxB,KAAL,CAAWyB,QAAX,CAAoBsB,IAApB;IACD,C;;;;;;;WAED,kBAAS;MACP,kBAA0B,KAAK/C,KAA/B;MAAA,IAAQwB,KAAR,eAAQA,KAAR;MAAA,IAAeD,MAAf,eAAeA,MAAf;MACA,IAAMrB,QAAQ,GAAGoB,cAAc,CAACC,MAAD,EAASC,KAAT,EAAgB,KAAK8B,YAArB,EAAmC,KAAKtD,KAAL,CAAWsB,cAA9C,CAA/B;MAEA,oBAAO,gCAAC,aAAD,QAAgBpB,QAAhB,CAAP;IACD;;;;EAlB+BqD,iBAAA,CAAMC,S;;;;gBAAnBJ,I,eACA;EACjB9B,cAAc,EAAEmC,qBAAA,CAAUC,IADT;EAEjBnC,MAAM,EAAEkC,qBAAA,CAAUrB,MAFD;EAGjBZ,KAAK,EAAEiC,qBAAA,CAAUrB,MAHA;EAIjBX,QAAQ,EAAEgC,qBAAA,CAAUC;AAJH,C"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pie-lib/mask-markup",
|
|
3
|
-
"version": "1.10.21-next.
|
|
3
|
+
"version": "1.10.21-next.333+9e77aef6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "src/index.js",
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@material-ui/core": "^3.9.3",
|
|
12
12
|
"@pie-lib/drag": "^1.1.52",
|
|
13
|
-
"@pie-lib/math-rendering": "^2.3.10-next.
|
|
14
|
-
"@pie-lib/render-ui": "^4.12.1-next.
|
|
13
|
+
"@pie-lib/math-rendering": "^2.3.10-next.333+9e77aef6",
|
|
14
|
+
"@pie-lib/render-ui": "^4.12.1-next.333+9e77aef6",
|
|
15
15
|
"classnames": "^2.2.6",
|
|
16
16
|
"debug": "^4.1.1",
|
|
17
17
|
"immutable": ">=3.8.1",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"keywords": [],
|
|
28
28
|
"author": "",
|
|
29
29
|
"license": "ISC",
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "9e77aef6241de40777005d2ab73f57e4e45fb744"
|
|
31
31
|
}
|
package/src/mask.jsx
CHANGED
|
@@ -46,7 +46,7 @@ export const renderChildren = (layout, value, onChange, rootRenderChildren, pare
|
|
|
46
46
|
|
|
47
47
|
if (n.isMath) {
|
|
48
48
|
children.push(
|
|
49
|
-
<span dangerouslySetInnerHTML={{ __html: `<math>${n.nodes[0].innerHTML}</math>` }} />
|
|
49
|
+
<span dangerouslySetInnerHTML={{ __html: `<math displaystyle="true">${n.nodes[0].innerHTML}</math>` }} />
|
|
50
50
|
);
|
|
51
51
|
return children;
|
|
52
52
|
}
|