@pie-element/passage 1.6.1 → 1.6.4-next.1014

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 CHANGED
@@ -3,6 +3,90 @@
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.7.7](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.7.6...@pie-element/passage@1.7.7) (2022-03-22)
7
+
8
+ **Note:** Version bump only for package @pie-element/passage
9
+
10
+
11
+
12
+
13
+
14
+ ## [1.7.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.7.4...@pie-element/passage@1.7.5) (2021-12-13)
15
+
16
+ **Note:** Version bump only for package @pie-element/passage
17
+
18
+
19
+
20
+
21
+
22
+ ## [1.7.2](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.7.1...@pie-element/passage@1.7.2) (2021-11-29)
23
+
24
+ **Note:** Version bump only for package @pie-element/passage
25
+
26
+
27
+
28
+
29
+
30
+ ## [1.7.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.6.6...@pie-element/passage@1.7.1) (2021-11-11)
31
+
32
+ **Note:** Version bump only for package @pie-element/passage
33
+
34
+
35
+
36
+
37
+
38
+ # [1.7.0](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.6.3...@pie-element/passage@1.7.0) (2021-11-11)
39
+
40
+
41
+ ### Bug Fixes
42
+
43
+ * Updated pie-lib versions ([1c23830](https://github.com/pie-framework/pie-elements/commit/1c23830fc75d1de5f7bb3bb16de3c665ae5fa350))
44
+
45
+
46
+ ### Features
47
+
48
+ * **passage:** implement print PD-1282 ([7fa16d3](https://github.com/pie-framework/pie-elements/commit/7fa16d35568419109c8394a091a88d5d3b418564))
49
+
50
+
51
+
52
+
53
+
54
+
55
+ ## [1.6.6](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.6.5...@pie-element/passage@1.6.6) (2021-11-01)
56
+
57
+ **Note:** Version bump only for package @pie-element/passage
58
+
59
+
60
+
61
+
62
+
63
+ ## [1.6.5](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.6.4...@pie-element/passage@1.6.5) (2021-09-01)
64
+
65
+ **Note:** Version bump only for package @pie-element/passage
66
+
67
+
68
+
69
+
70
+
71
+ ## [1.6.4](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.6.3...@pie-element/passage@1.6.4) (2021-08-05)
72
+
73
+ **Note:** Version bump only for package @pie-element/passage
74
+
75
+
76
+
77
+
78
+
79
+ ## [1.6.3](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.6.1...@pie-element/passage@1.6.3) (2021-08-05)
80
+
81
+
82
+ ### Bug Fixes
83
+
84
+ * force bump ([5ea7295](https://github.com/pie-framework/pie-elements/commit/5ea7295e4755fbc492a76e7ec69e5fc35b196919))
85
+
86
+
87
+
88
+
89
+
6
90
  ## [1.6.1](https://github.com/pie-framework/pie-elements/compare/@pie-element/passage@1.6.0...@pie-element/passage@1.6.1) (2021-06-29)
7
91
 
8
92
  **Note:** Version bump only for package @pie-element/passage
package/lib/index.js CHANGED
@@ -29,7 +29,7 @@ var _stimulusTabs = _interopRequireDefault(require("./stimulus-tabs"));
29
29
 
30
30
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
31
31
 
32
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
32
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
33
33
 
34
34
  var PiePassage = /*#__PURE__*/function (_HTMLElement) {
35
35
  (0, _inherits2["default"])(PiePassage, _HTMLElement);
package/lib/print.js ADDED
@@ -0,0 +1,99 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports["default"] = void 0;
9
+
10
+ var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
11
+
12
+ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
13
+
14
+ var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
15
+
16
+ var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
17
+
18
+ var _possibleConstructorReturn2 = _interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));
19
+
20
+ var _getPrototypeOf2 = _interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));
21
+
22
+ var _wrapNativeSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/wrapNativeSuper"));
23
+
24
+ var _react = _interopRequireDefault(require("react"));
25
+
26
+ var _reactDom = _interopRequireDefault(require("react-dom"));
27
+
28
+ var _debounce = _interopRequireDefault(require("lodash/debounce"));
29
+
30
+ var _stimulusTabs = _interopRequireDefault(require("./stimulus-tabs"));
31
+
32
+ var _debug = _interopRequireDefault(require("debug"));
33
+
34
+ function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
35
+
36
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
37
+
38
+ var log = (0, _debug["default"])('pie-element:passage:print');
39
+
40
+ var preparePrintPassage = function preparePrintPassage(model) {
41
+ return model.passages.map(function (passage, index) {
42
+ return {
43
+ id: index,
44
+ title: passage.title,
45
+ text: passage.text
46
+ };
47
+ });
48
+ };
49
+
50
+ var PassagePrint = /*#__PURE__*/function (_HTMLElement) {
51
+ (0, _inherits2["default"])(PassagePrint, _HTMLElement);
52
+
53
+ var _super = _createSuper(PassagePrint);
54
+
55
+ function PassagePrint() {
56
+ var _this;
57
+
58
+ (0, _classCallCheck2["default"])(this, PassagePrint);
59
+ _this = _super.call(this);
60
+ _this._model = null;
61
+ _this._session = [];
62
+ _this._rerender = (0, _debounce["default"])(function () {
63
+ if (_this._model && _this._session) {
64
+ if (_this._model.passages && _this._model.passages.length > 0) {
65
+ var printPassage = preparePrintPassage(_this._model);
66
+
67
+ var element = /*#__PURE__*/_react["default"].createElement(_stimulusTabs["default"], {
68
+ tabs: printPassage,
69
+ disabledTabs: true
70
+ });
71
+
72
+ _reactDom["default"].render(element, (0, _assertThisInitialized2["default"])(_this));
73
+ }
74
+ } else {
75
+ log('skip');
76
+ }
77
+ }, 50, {
78
+ leading: false,
79
+ trailing: true
80
+ });
81
+ return _this;
82
+ }
83
+
84
+ (0, _createClass2["default"])(PassagePrint, [{
85
+ key: "model",
86
+ set: function set(s) {
87
+ this._model = s;
88
+
89
+ this._rerender();
90
+ }
91
+ }, {
92
+ key: "connectedCallback",
93
+ value: function connectedCallback() {}
94
+ }]);
95
+ return PassagePrint;
96
+ }( /*#__PURE__*/(0, _wrapNativeSuper2["default"])(HTMLElement));
97
+
98
+ exports["default"] = PassagePrint;
99
+ //# sourceMappingURL=print.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/print.js"],"names":["log","preparePrintPassage","model","passages","map","passage","index","id","title","text","PassagePrint","_model","_session","_rerender","length","printPassage","element","React","createElement","StimulusTabs","tabs","disabledTabs","ReactDOM","render","leading","trailing","s","HTMLElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,GAAG,GAAG,uBAAM,2BAAN,CAAZ;;AAEA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB,CAAAC,KAAK;AAAA,SAC/BA,KAAK,CAACC,QAAN,CAAeC,GAAf,CAAmB,UAACC,OAAD,EAAUC,KAAV,EAAoB;AACrC,WAAO;AACLC,MAAAA,EAAE,EAAED,KADC;AAELE,MAAAA,KAAK,EAAEH,OAAO,CAACG,KAFV;AAGLC,MAAAA,IAAI,EAAEJ,OAAO,CAACI;AAHT,KAAP;AAKD,GAND,CAD+B;AAAA,CAAjC;;IASqBC,Y;;;;;AACnB,0BAAc;AAAA;;AAAA;AACZ;AACA,UAAKC,MAAL,GAAc,IAAd;AACA,UAAKC,QAAL,GAAgB,EAAhB;AAEA,UAAKC,SAAL,GAAiB,0BACf,YAAM;AACJ,UAAI,MAAKF,MAAL,IAAe,MAAKC,QAAxB,EAAkC;AAChC,YAAI,MAAKD,MAAL,CAAYR,QAAZ,IAAwB,MAAKQ,MAAL,CAAYR,QAAZ,CAAqBW,MAArB,GAA8B,CAA1D,EAA6D;AAC3D,cAAMC,YAAY,GAAGd,mBAAmB,CAAC,MAAKU,MAAN,CAAxC;;AAEA,cAAMK,OAAO,gBAAGC,kBAAMC,aAAN,CAAoBC,wBAApB,EAAkC;AAAEC,YAAAA,IAAI,EAAEL,YAAR;AAAsBM,YAAAA,YAAY,EAAE;AAApC,WAAlC,CAAhB;;AAEAC,+BAASC,MAAT,CAAgBP,OAAhB;AACD;AACF,OARD,MAQO;AACLhB,QAAAA,GAAG,CAAC,MAAD,CAAH;AACD;AACF,KAbc,EAcf,EAde,EAef;AAAEwB,MAAAA,OAAO,EAAE,KAAX;AAAkBC,MAAAA,QAAQ,EAAE;AAA5B,KAfe,CAAjB;AALY;AAsBb;;;;SAED,aAAUC,CAAV,EAAa;AACX,WAAKf,MAAL,GAAce,CAAd;;AACA,WAAKb,SAAL;AACD;;;WAED,6BAAoB,CAAE;;;kDA9BkBc,W","sourcesContent":["import React from 'react';\nimport ReactDOM from 'react-dom';\nimport debounce from 'lodash/debounce';\nimport StimulusTabs from './stimulus-tabs';\nimport debug from 'debug';\n\nconst log = debug('pie-element:passage:print');\n\nconst preparePrintPassage = model =>\n model.passages.map((passage, index) => {\n return {\n id: index,\n title: passage.title,\n text: passage.text,\n };\n });\n\nexport default class PassagePrint extends HTMLElement {\n constructor() {\n super();\n this._model = null;\n this._session = [];\n\n this._rerender = debounce(\n () => {\n if (this._model && this._session) {\n if (this._model.passages && this._model.passages.length > 0) {\n const printPassage = preparePrintPassage(this._model);\n\n const element = React.createElement(StimulusTabs, { tabs: printPassage, disabledTabs: true });\n\n ReactDOM.render(element, this);\n }\n } else {\n log('skip');\n }\n },\n 50,\n { leading: false, trailing: true }\n );\n }\n\n set model(s) {\n this._model = s;\n this._rerender();\n }\n\n connectedCallback() {}\n}\n"],"file":"print.js"}
@@ -35,32 +35,41 @@ var _Typography = _interopRequireDefault(require("@material-ui/core/Typography")
35
35
 
36
36
  var _renderUi = require("@pie-lib/render-ui");
37
37
 
38
- var _previewLayout = _interopRequireDefault(require("@pie-lib/render-ui/lib/preview-layout"));
38
+ var _classnames = _interopRequireDefault(require("classnames"));
39
39
 
40
40
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2["default"])(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2["default"])(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2["default"])(this, result); }; }
41
41
 
42
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
43
-
44
- var styles = function styles() {
45
- return (
46
- /*theme*/
47
- {
48
- root: {
49
- flexGrow: 1,
50
- backgroundColor: _renderUi.color.background(),
51
- color: _renderUi.color.text()
52
- },
53
- tab: {
54
- fontSize: '0.8125em'
55
- },
56
- stickyTabs: {
57
- background: _renderUi.color.background(),
58
- paddingBottom: '20px',
59
- position: 'sticky',
60
- top: 0
61
- }
42
+ function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
43
+
44
+ var styles = function
45
+ /*theme*/
46
+ styles() {
47
+ return {
48
+ root: {
49
+ flexGrow: 1,
50
+ backgroundColor: _renderUi.color.background(),
51
+ color: _renderUi.color.text()
52
+ },
53
+ tab: {
54
+ fontSize: '0.8125em'
55
+ },
56
+ stickyTabs: {
57
+ background: _renderUi.color.background(),
58
+ paddingBottom: '20px',
59
+ position: 'sticky',
60
+ top: 0
61
+ },
62
+ title: {
63
+ textTransform: 'uppercase',
64
+ padding: '6px 24px',
65
+ borderBottom: "2px solid ".concat(_renderUi.color.secondary()),
66
+ width: 'fit-content',
67
+ marginBottom: '6px'
68
+ },
69
+ buttonContainer: {
70
+ background: 'white'
62
71
  }
63
- );
72
+ };
64
73
  };
65
74
 
66
75
  function TabContainer(props) {
@@ -116,7 +125,20 @@ var StimulusTabs = /*#__PURE__*/function (_React$Component) {
116
125
  });
117
126
  });
118
127
  (0, _defineProperty2["default"])((0, _assertThisInitialized2["default"])(_this), "parsedText", function (text) {
119
- return text.replace(/(<br\/>\n)/g, '<br/>');
128
+ // fix imported audio content for Safari PD-1391
129
+ var div = document.createElement('div');
130
+ div.innerHTML = text.replace(/(<br\/>\n)/g, '<br/>');
131
+ var audio = div.querySelector('audio');
132
+
133
+ if (audio) {
134
+ var source = document.createElement('source');
135
+ source.setAttribute('type', 'audio/mp3');
136
+ source.setAttribute('src', audio.getAttribute('src'));
137
+ audio.removeAttribute('src');
138
+ audio.appendChild(source);
139
+ }
140
+
141
+ return div.innerHTML;
120
142
  });
121
143
  return _this;
122
144
  }
@@ -128,15 +150,39 @@ var StimulusTabs = /*#__PURE__*/function (_React$Component) {
128
150
 
129
151
  var _this$props = this.props,
130
152
  classes = _this$props.classes,
131
- tabs = _this$props.tabs;
153
+ tabs = _this$props.tabs,
154
+ disabledTabs = _this$props.disabledTabs;
132
155
  var activeTab = this.state.activeTab;
133
156
 
134
157
  if (tabs && tabs.length > 1) {
135
- return /*#__PURE__*/_react["default"].createElement("div", {
158
+ return disabledTabs ? /*#__PURE__*/_react["default"].createElement("div", {
159
+ className: "passages"
160
+ }, tabs.map(function (tab) {
161
+ return /*#__PURE__*/_react["default"].createElement("div", {
162
+ key: tab.id,
163
+ className: "passage-".concat(tab.id)
164
+ }, /*#__PURE__*/_react["default"].createElement(TabContainer, {
165
+ multiple: true
166
+ }, /*#__PURE__*/_react["default"].createElement("div", {
167
+ className: (0, _classnames["default"])(classes.title, 'title'),
168
+ dangerouslySetInnerHTML: {
169
+ __html: _this2.parsedText(tab.title)
170
+ }
171
+ }), /*#__PURE__*/_react["default"].createElement(_renderUi.Purpose, {
172
+ purpose: "passage-text"
173
+ }, /*#__PURE__*/_react["default"].createElement("div", {
174
+ className: "text",
175
+ key: tab.id,
176
+ dangerouslySetInnerHTML: {
177
+ __html: _this2.parsedText(tab.text)
178
+ }
179
+ }))));
180
+ })) : /*#__PURE__*/_react["default"].createElement("div", {
136
181
  className: classes.root
137
182
  }, /*#__PURE__*/_react["default"].createElement(_Tabs["default"], {
138
183
  classes: {
139
- root: classes.stickyTabs
184
+ root: classes.stickyTabs,
185
+ flexContainer: classes.buttonContainer
140
186
  },
141
187
  value: activeTab,
142
188
  onChange: this.handleChange
@@ -168,10 +214,12 @@ var StimulusTabs = /*#__PURE__*/function (_React$Component) {
168
214
  }));
169
215
  } else if (tabs && tabs[0]) {
170
216
  return /*#__PURE__*/_react["default"].createElement("div", {
217
+ className: "passage",
171
218
  style: {
172
219
  whiteSpace: 'break-spaces'
173
220
  }
174
221
  }, /*#__PURE__*/_react["default"].createElement(TabContainer, null, /*#__PURE__*/_react["default"].createElement("div", {
222
+ className: "text",
175
223
  dangerouslySetInnerHTML: {
176
224
  __html: this.parsedText(tabs[0].text)
177
225
  }
@@ -188,7 +236,8 @@ StimulusTabs.propTypes = {
188
236
  id: _propTypes["default"].number.isRequired,
189
237
  title: _propTypes["default"].string.isRequired,
190
238
  text: _propTypes["default"].string.isRequired
191
- }).isRequired).isRequired
239
+ }).isRequired).isRequired,
240
+ disabledTabs: _propTypes["default"].bool
192
241
  };
193
242
 
194
243
  var _default = (0, _styles.withStyles)(styles)(StimulusTabs);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/stimulus-tabs.jsx"],"names":["styles","root","flexGrow","backgroundColor","color","background","text","tab","fontSize","stickyTabs","paddingBottom","position","top","TabContainer","props","padding","multiple","children","propTypes","PropTypes","node","isRequired","bool","StimulusTabs","activeTab","event","setState","setTimeout","tabChangeEvent","CustomEvent","detail","window","dispatchEvent","replace","classes","tabs","state","length","handleChange","map","id","__html","parsedText","title","whiteSpace","React","Component","object","arrayOf","shape","number","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,MAAM,GAAG,SAATA,MAAS;AAAA;AAAC;AAAe;AAC7BC,MAAAA,IAAI,EAAE;AACJC,QAAAA,QAAQ,EAAE,CADN;AAEJC,QAAAA,eAAe,EAAEC,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C,GAAG,CAACiC;AAAhC,0BACE,gCAAC,iBAAD;AAAS,YAAA,OAAO,EAAC;AAAjB,0BACE;AACE,YAAA,GAAG,EAAEjC,GAAG,CAACiC,EADX;AAEE,YAAA,uBAAuB,EAAE;AAAEC,cAAAA,MAAM,EAAE,MAAI,CAACC,UAAL,CAAgBnC,GAAG,CAACD,IAApB;AAAV;AAF3B,YADF,CADF,CADF,GAUI,IAXI;AAAA,SAAT,CAvBH,CADF;AAwCD,OAzCD,MAyCO,IAAI6B,IAAI,IAAIA,IAAI,CAAC,CAAD,CAAhB,EAAqB;AAC1B,4BACE;AAAK,UAAA,KAAK,EAAE;AAAES,YAAAA,UAAU,EAAE;AAAd;AAAZ,wBACE,gCAAC,YAAD,qBACE;AAAK,UAAA,uBAAuB,EAAE;AAAEH,YAAAA,MAAM,EAAE,KAAKC,UAAL,CAAgBP,IAAI,CAAC,CAAD,CAAJ,CAAQ7B,IAAxB;AAAV;AAA9B,UADF,CADF,CADF;AAOD;AACF;;;EA1EwBuC,kBAAMC,S;;AA6EjCvB,YAAY,CAACL,SAAb,GAAyB;AACvBgB,EAAAA,OAAO,EAAEf,sBAAU4B,MAAV,CAAiB1B,UADH;AAEvBc,EAAAA,IAAI,EAAEhB,sBAAU6B,OAAV,CACJ7B,sBAAU8B,KAAV,CAAgB;AACdT,IAAAA,EAAE,EAAErB,sBAAU+B,MAAV,CAAiB7B,UADP;AAEdsB,IAAAA,KAAK,EAAExB,sBAAUgC,MAAV,CAAiB9B,UAFV;AAGdf,IAAAA,IAAI,EAAEa,sBAAUgC,MAAV,CAAiB9B;AAHT,GAAhB,EAIGA,UALC,EAMJA;AARqB,CAAzB;;eAWe,wBAAWrB,MAAX,EAAmBuB,YAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { color, Purpose } from '@pie-lib/render-ui';\nimport previewLayout from '@pie-lib/render-ui/lib/preview-layout';\n\nconst styles = (/*theme*/) => ({\n root: {\n flexGrow: 1,\n backgroundColor: color.background(),\n color: color.text(),\n },\n tab: {\n fontSize: '0.8125em',\n },\n stickyTabs: {\n background: color.background(),\n paddingBottom: '20px',\n position: 'sticky',\n top: 0,\n }\n});\n\nfunction TabContainer(props) {\n const padding = props.multiple ? '0 24px 24px 24px' : '24px';\n\n return (\n <Typography\n component=\"div\"\n style={{\n padding,\n fontSize: '0.875em',\n backgroundColor: color.background(),\n color: color.text(),\n }}\n >\n {props.children}\n </Typography>\n );\n}\n\nTabContainer.propTypes = {\n children: PropTypes.node.isRequired,\n multiple: PropTypes.bool,\n};\n\nclass StimulusTabs extends React.Component {\n state = {\n activeTab: 0,\n };\n\n handleChange = (event, activeTab) => {\n this.setState(() => ({ activeTab }));\n setTimeout(() => {\n const tabChangeEvent = new CustomEvent('pie-ui-passage-tabChanged', {\n detail: {\n tab: activeTab,\n },\n });\n\n window.dispatchEvent(tabChangeEvent);\n });\n };\n\n parsedText = (text) => text.replace(/(<br\\/>\\n)/g, '<br/>');\n\n render() {\n const { classes, tabs } = this.props;\n const { activeTab } = this.state;\n\n if (tabs && tabs.length > 1) {\n return (\n <div className={classes.root}>\n <Tabs\n classes={{\n root: classes.stickyTabs,\n }}\n value={activeTab}\n onChange={this.handleChange}\n >\n {tabs.map((tab) => (\n <Tab\n className={classes.tab}\n key={tab.id}\n label={\n <Purpose purpose=\"passage-title\">\n <span\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.title) }}\n ></span>\n </Purpose>\n }\n value={tab.id}\n />\n ))}\n </Tabs>\n {tabs.map((tab) =>\n activeTab === tab.id ? (\n <TabContainer multiple key={tab.id}>\n <Purpose purpose=\"passage-text\">\n <div\n key={tab.id}\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.text) }}\n />\n </Purpose>\n </TabContainer>\n\n ) : null\n )}\n </div>\n );\n\n } else if (tabs && tabs[0]) {\n return (\n <div style={{ whiteSpace: 'break-spaces' }} >\n <TabContainer>\n <div dangerouslySetInnerHTML={{ __html: this.parsedText(tabs[0].text) }} />\n </TabContainer>\n </div>\n );\n }\n }\n}\n\nStimulusTabs.propTypes = {\n classes: PropTypes.object.isRequired,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n }).isRequired\n ).isRequired,\n};\n\nexport default withStyles(styles)(StimulusTabs);\n"],"file":"stimulus-tabs.js"}
1
+ {"version":3,"sources":["../src/stimulus-tabs.jsx"],"names":["styles","root","flexGrow","backgroundColor","color","background","text","tab","fontSize","stickyTabs","paddingBottom","position","top","title","textTransform","padding","borderBottom","secondary","width","marginBottom","buttonContainer","TabContainer","props","multiple","children","propTypes","PropTypes","node","isRequired","bool","StimulusTabs","activeTab","event","setState","setTimeout","tabChangeEvent","CustomEvent","detail","window","dispatchEvent","div","document","createElement","innerHTML","replace","audio","querySelector","source","setAttribute","getAttribute","removeAttribute","appendChild","classes","tabs","disabledTabs","state","length","map","id","__html","parsedText","flexContainer","handleChange","whiteSpace","React","Component","object","arrayOf","shape","number","string"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;AAEA,IAAMA,MAAM,GAAG;AAAC;AAAVA,MAAS;AAAA,SAAgB;AAC7BC,IAAAA,IAAI,EAAE;AACJC,MAAAA,QAAQ,EAAE,CADN;AAEJC,MAAAA,eAAe,EAAEC,gBAAMC,UAAN,EAFb;AAGJD,MAAAA,KAAK,EAAEA,gBAAME,IAAN;AAHH,KADuB;AAM7BC,IAAAA,GAAG,EAAE;AACHC,MAAAA,QAAQ,EAAE;AADP,KANwB;AAS7BC,IAAAA,UAAU,EAAE;AACVJ,MAAAA,UAAU,EAAED,gBAAMC,UAAN,EADF;AAEVK,MAAAA,aAAa,EAAE,MAFL;A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,MAAV,CAAiB1C;AAHT,GAAhB,EAIGA,UALC,EAMJA,UARqB;AASvB0B,EAAAA,YAAY,EAAE5B,sBAAUG;AATD,CAAzB;;eAYe,wBAAW7B,MAAX,EAAmB8B,YAAnB,C","sourcesContent":["import React from 'react';\nimport PropTypes from 'prop-types';\nimport Tabs from '@material-ui/core/Tabs';\nimport Tab from '@material-ui/core/Tab';\nimport { withStyles } from '@material-ui/core/styles';\nimport Typography from '@material-ui/core/Typography';\nimport { color, Purpose } from '@pie-lib/render-ui';\nimport classNames from 'classnames';\n\nconst styles = (/*theme*/) => ({\n root: {\n flexGrow: 1,\n backgroundColor: color.background(),\n color: color.text(),\n },\n tab: {\n fontSize: '0.8125em',\n },\n stickyTabs: {\n background: color.background(),\n paddingBottom: '20px',\n position: 'sticky',\n top: 0,\n },\n title: {\n textTransform: 'uppercase',\n padding: '6px 24px',\n borderBottom: `2px solid ${color.secondary()}`,\n width: 'fit-content',\n marginBottom: '6px'\n },\n buttonContainer: {\n background: 'white'\n }\n});\n\nfunction TabContainer(props) {\n const padding = props.multiple ? '0 24px 24px 24px' : '24px';\n\n return (\n <Typography\n component=\"div\"\n style={{\n padding,\n fontSize: '0.875em',\n backgroundColor: color.background(),\n color: color.text(),\n }}\n >\n {props.children}\n </Typography>\n );\n}\n\nTabContainer.propTypes = {\n children: PropTypes.node.isRequired,\n multiple: PropTypes.bool,\n};\n\nclass StimulusTabs extends React.Component {\n state = {\n activeTab: 0,\n };\n\n handleChange = (event, activeTab) => {\n this.setState(() => ({ activeTab }));\n setTimeout(() => {\n const tabChangeEvent = new CustomEvent('pie-ui-passage-tabChanged', {\n detail: {\n tab: activeTab,\n },\n });\n\n window.dispatchEvent(tabChangeEvent);\n });\n };\n\n parsedText = text => {\n // fix imported audio content for Safari PD-1391\n const div = document.createElement('div');\n div.innerHTML = text.replace(/(<br\\/>\\n)/g, '<br/>');\n\n const audio = div.querySelector('audio');\n if (audio) {\n const source = document.createElement('source');\n\n source.setAttribute('type', 'audio/mp3');\n source.setAttribute('src', audio.getAttribute('src'));\n\n audio.removeAttribute('src');\n audio.appendChild(source);\n }\n\n return div.innerHTML;\n };\n\n render() {\n const { classes, tabs, disabledTabs } = this.props;\n const { activeTab } = this.state;\n\n if (tabs && tabs.length > 1) {\n return disabledTabs ? (\n <div className=\"passages\">\n {tabs.map(tab =>\n <div key={tab.id} className={`passage-${tab.id}`}>\n <TabContainer multiple >\n <div\n className={classNames(classes.title, 'title')}\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.title) }}\n />\n <Purpose purpose=\"passage-text\">\n <div\n className=\"text\"\n key={tab.id}\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.text) }}\n />\n </Purpose>\n </TabContainer>\n </div>)}\n </div>\n ) : (\n <div className={classes.root}>\n <Tabs\n classes={{\n root: classes.stickyTabs,\n flexContainer: classes.buttonContainer\n }}\n value={activeTab}\n onChange={this.handleChange}\n >\n {tabs.map((tab) => (\n <Tab\n className={classes.tab}\n key={tab.id}\n label={\n <Purpose purpose=\"passage-title\">\n <span\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.title) }}\n />\n </Purpose>\n }\n value={tab.id}\n />\n ))}\n </Tabs>\n {tabs.map((tab) =>\n activeTab === tab.id ? (\n <TabContainer multiple key={tab.id}>\n <Purpose purpose=\"passage-text\">\n <div\n key={tab.id}\n dangerouslySetInnerHTML={{ __html: this.parsedText(tab.text) }}\n />\n </Purpose>\n </TabContainer>\n\n ) : null\n )}\n </div>\n );\n\n } else if (tabs && tabs[0]) {\n return (\n <div className=\"passage\" style={{ whiteSpace: 'break-spaces' }} >\n <TabContainer>\n <div className=\"text\" dangerouslySetInnerHTML={{ __html: this.parsedText(tabs[0].text) }} />\n </TabContainer>\n </div>\n );\n }\n }\n}\n\nStimulusTabs.propTypes = {\n classes: PropTypes.object.isRequired,\n tabs: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.number.isRequired,\n title: PropTypes.string.isRequired,\n text: PropTypes.string.isRequired,\n }).isRequired\n ).isRequired,\n disabledTabs: PropTypes.bool\n};\n\nexport default withStyles(styles)(StimulusTabs);\n"],"file":"stimulus-tabs.js"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pie-element/passage",
3
- "version": "1.6.1",
3
+ "version": "1.6.4-next.1014+b002895e2",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -11,15 +11,20 @@
11
11
  "dependencies": {
12
12
  "@material-ui/core": "^3.9.2",
13
13
  "@pie-framework/pie-player-events": "^0.1.0",
14
- "@pie-lib/render-ui": "^4.11.7",
14
+ "@pie-lib/render-ui": "^4.12.9",
15
+ "classnames": "^2.2.5",
15
16
  "prop-types": "^15.6.1",
16
17
  "react": "^16.8.1",
17
18
  "react-dom": "^16.8.1"
18
19
  },
19
- "gitHead": "c8dbb31e012aaa666c88f089238e86992f444986",
20
+ "gitHead": "b002895e29dec43623f303053f9a2bbefe276040",
20
21
  "scripts": {
21
22
  "postpublish": "../../scripts/postpublish"
22
23
  },
23
24
  "main": "lib/index.js",
24
- "module": "src/index.js"
25
+ "module": "src/index.js",
26
+ "exports": {
27
+ ".": "./src/index.js",
28
+ "./print": "./src/print.js"
29
+ }
25
30
  }