highmark-markdown 1.2.71 → 1.2.72
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/.aiignore +7 -9
- package/.swcrc +4 -3
- package/example.js +11655 -33035
- package/lib/attributeNames.js +7 -7
- package/lib/constants.js +19 -19
- package/lib/example/constants.js +7 -7
- package/lib/example/customEventTypes.js +9 -9
- package/lib/example/importer.js +72 -28
- package/lib/example/indexOptions.js +3 -3
- package/lib/example/view/button/page.js +34 -135
- package/lib/example/view/button/tab/css.js +14 -114
- package/lib/example/view/button/tab/html.js +14 -114
- package/lib/example/view/button/tab/markdown.js +14 -114
- package/lib/example/view/button/tab/markdownStyle.js +14 -114
- package/lib/example/view/button/tab/plainText.js +14 -114
- package/lib/example/view/button/tab/preview.js +14 -114
- package/lib/example/view/button/tab.js +36 -136
- package/lib/example/view/div/container/css.js +15 -153
- package/lib/example/view/div/container/html.js +19 -157
- package/lib/example/view/div/container/markdown.js +38 -190
- package/lib/example/view/div/container/markdownStyle.js +39 -191
- package/lib/example/view/div/container/plainText.js +15 -153
- package/lib/example/view/div/container/preview.js +25 -177
- package/lib/example/view/div/container.js +20 -156
- package/lib/example/view/div/html.js +18 -173
- package/lib/example/view/div/pageButtons.js +63 -236
- package/lib/example/view/div/preview.js +58 -268
- package/lib/example/view/div/sizeable/left.js +13 -104
- package/lib/example/view/div/tabButtons/left.js +42 -161
- package/lib/example/view/div/tabButtons/right.js +75 -198
- package/lib/example/view/div/tabButtons.js +15 -172
- package/lib/example/view/textarea/css.js +29 -147
- package/lib/example/view/textarea/markdown.js +29 -145
- package/lib/example/view/textarea/markdownStyle.js +29 -145
- package/lib/example/view/textarea/parseTree/css.js +21 -132
- package/lib/example/view/textarea/parseTree/html.js +21 -132
- package/lib/example/view/textarea/parseTree/markdown.js +17 -129
- package/lib/example/view/textarea/parseTree/markdownStyle.js +17 -129
- package/lib/example/view/textarea/parseTree.js +20 -135
- package/lib/example/view/textarea/plainText.js +32 -153
- package/lib/example/view/textarea.js +16 -23
- package/lib/example/view/xmp.js +30 -187
- package/lib/example/view.js +281 -518
- package/lib/example.js +10 -10
- package/lib/index/item.js +25 -87
- package/lib/index/list.js +29 -62
- package/lib/index/match.js +23 -62
- package/lib/index.js +34 -34
- package/lib/letters.js +3 -3
- package/lib/map/className.js +6 -6
- package/lib/map/node/css.js +50 -42
- package/lib/map/node/html.js +108 -71
- package/lib/map/nonTerminalNode/markdown.js +49 -40
- package/lib/map/nonTerminalNode/markdownStyle.js +49 -40
- package/lib/map/tagName.js +6 -6
- package/lib/markdown/bnf.js +300 -3
- package/lib/markdown/entries.js +3 -3
- package/lib/markdown/lexer.js +23 -126
- package/lib/markdown/parser.js +18 -121
- package/lib/markdownStyle/bnf.js +80 -3
- package/lib/markdownStyle/entries.js +8 -8
- package/lib/markdownStyle/lexer.js +23 -126
- package/lib/markdownStyle/parser.js +18 -121
- package/lib/mixins/node.js +53 -53
- package/lib/mixins/token.js +13 -13
- package/lib/node/css/amount.js +16 -110
- package/lib/node/css/argument.js +8 -95
- package/lib/node/css/arguments.js +13 -127
- package/lib/node/css/class.js +13 -127
- package/lib/node/css/colour.js +16 -110
- package/lib/node/css/content.js +12 -103
- package/lib/node/css/declaration.js +19 -109
- package/lib/node/css/identifier.js +16 -110
- package/lib/node/css/name.js +13 -127
- package/lib/node/css/pseudoClass.js +13 -127
- package/lib/node/css/ruleName.js +43 -137
- package/lib/node/css/ruleSet.js +45 -139
- package/lib/node/css/selector.js +8 -95
- package/lib/node/css/selectors.js +19 -110
- package/lib/node/css/selectorsList.js +22 -115
- package/lib/node/css/string.js +16 -110
- package/lib/node/css/target.js +12 -103
- package/lib/node/css/topmost.js +70 -182
- package/lib/node/css/value.js +12 -126
- package/lib/node/css/values.js +16 -107
- package/lib/node/css/verbatim.js +35 -132
- package/lib/node/css.js +66 -275
- package/lib/node/html/anchor/contents.js +8 -92
- package/lib/node/html/anchor/footnote.js +8 -92
- package/lib/node/html/anchor/index.js +8 -92
- package/lib/node/html/anchor.js +38 -157
- package/lib/node/html/container.js +24 -154
- package/lib/node/html/directive/contents.js +8 -95
- package/lib/node/html/directive/footnotes.js +8 -95
- package/lib/node/html/directive/index.js +8 -95
- package/lib/node/html/directive/pageNumber.js +8 -95
- package/lib/node/html/directive.js +23 -123
- package/lib/node/html/division.js +127 -273
- package/lib/node/html/error.js +41 -179
- package/lib/node/html/footnote.js +40 -149
- package/lib/node/html/heading/index.js +61 -183
- package/lib/node/html/heading/primary.js +12 -112
- package/lib/node/html/heading/quaternary.js +12 -112
- package/lib/node/html/heading/secondary.js +12 -112
- package/lib/node/html/heading/tertiary.js +12 -112
- package/lib/node/html/heading.js +30 -147
- package/lib/node/html/image.js +76 -207
- package/lib/node/html/item/contents.js +20 -124
- package/lib/node/html/item/footnote.js +21 -125
- package/lib/node/html/item/index.js +39 -145
- package/lib/node/html/item/ordered.js +23 -133
- package/lib/node/html/item/unordered.js +10 -110
- package/lib/node/html/line/block.js +15 -119
- package/lib/node/html/line.js +89 -242
- package/lib/node/html/link/contents.js +36 -153
- package/lib/node/html/link/email.js +89 -243
- package/lib/node/html/link/footnote.js +94 -238
- package/lib/node/html/link/hyper.js +89 -243
- package/lib/node/html/link/index.js +67 -222
- package/lib/node/html/list/contents.js +20 -124
- package/lib/node/html/list/footnotes.js +40 -160
- package/lib/node/html/list/index.js +20 -124
- package/lib/node/html/list/ordered.js +10 -110
- package/lib/node/html/list/unordered.js +10 -110
- package/lib/node/html/listing/block.js +33 -177
- package/lib/node/html/listing/inline.js +35 -174
- package/lib/node/html/pageNumber.js +65 -216
- package/lib/node/html/paragraph.js +10 -110
- package/lib/node/html/reference.js +10 -110
- package/lib/node/html/table.js +10 -110
- package/lib/node/html/tableBody.js +10 -110
- package/lib/node/html/tableBodyCell.js +10 -110
- package/lib/node/html/tableBodyRow.js +10 -110
- package/lib/node/html/tableHead.js +10 -110
- package/lib/node/html/tableHeadCell.js +10 -110
- package/lib/node/html/tableHeadRow.js +10 -110
- package/lib/node/html/text/block.js +10 -110
- package/lib/node/html/text/comma.js +21 -128
- package/lib/node/html/text/emphasised.js +14 -118
- package/lib/node/html/text/index.js +28 -143
- package/lib/node/html/text/inline.js +34 -147
- package/lib/node/html/text/plain.js +10 -110
- package/lib/node/html/text/strong.js +14 -118
- package/lib/node/html/text/stronglyEmphasised.js +66 -208
- package/lib/node/html/text.js +24 -162
- package/lib/node/html/topmost.js +100 -240
- package/lib/node/html.js +256 -554
- package/lib/node/markdown/blockEnd.js +5 -89
- package/lib/node/markdown/blockStart.js +18 -113
- package/lib/node/markdown/className.js +12 -100
- package/lib/node/markdown/container.js +18 -113
- package/lib/node/markdown/directive/embed.js +39 -137
- package/lib/node/markdown/directive/include.js +39 -137
- package/lib/node/markdown/division.js +70 -216
- package/lib/node/markdown/document.js +44 -147
- package/lib/node/markdown/error.js +12 -100
- package/lib/node/markdown/footnote.js +12 -100
- package/lib/node/markdown/hyperlink.js +34 -131
- package/lib/node/markdown/image.js +12 -100
- package/lib/node/markdown/item/ordered.js +15 -103
- package/lib/node/markdown/link/email.js +34 -131
- package/lib/node/markdown/link/footnote.js +14 -102
- package/lib/node/markdown/listng/block.js +12 -100
- package/lib/node/markdown/listng/inline.js +18 -106
- package/lib/node/markdown/path.js +12 -100
- package/lib/node/markdown/reference.js +15 -103
- package/lib/node/markdown/subDivision.js +35 -126
- package/lib/node/markdown/text/block.js +5 -89
- package/lib/node/markdown/text/plain.js +5 -89
- package/lib/node/markdown/text.js +46 -134
- package/lib/node/markdown.js +34 -169
- package/lib/node/markdownStyle/amount.js +13 -101
- package/lib/node/markdownStyle/argument.js +5 -89
- package/lib/node/markdownStyle/arguments.js +5 -89
- package/lib/node/markdownStyle/colour.js +12 -100
- package/lib/node/markdownStyle/content.js +21 -109
- package/lib/node/markdownStyle/declaration.js +5 -89
- package/lib/node/markdownStyle/document.js +5 -89
- package/lib/node/markdownStyle/error.js +5 -89
- package/lib/node/markdownStyle/identifier.js +13 -101
- package/lib/node/markdownStyle/name.js +5 -89
- package/lib/node/markdownStyle/nonsense.js +5 -89
- package/lib/node/markdownStyle/pseudoClass.js +5 -89
- package/lib/node/markdownStyle/ruleName.js +12 -100
- package/lib/node/markdownStyle/ruleSet.js +5 -89
- package/lib/node/markdownStyle/selector.js +5 -89
- package/lib/node/markdownStyle/selectors.js +5 -89
- package/lib/node/markdownStyle/selectorsList.js +5 -89
- package/lib/node/markdownStyle/string.js +12 -100
- package/lib/node/markdownStyle/target.js +12 -100
- package/lib/node/markdownStyle/value.js +5 -89
- package/lib/node/markdownStyle/values.js +5 -89
- package/lib/node/markdownStyle/verbatim.js +5 -89
- package/lib/node/markdownStyle.js +16 -135
- package/lib/prepends.js +4 -4
- package/lib/queries/markdown.js +7 -7
- package/lib/queries/markdownStyle.js +7 -7
- package/lib/ruleNames/markdown.js +145 -145
- package/lib/ruleNames/markdownStyle.js +51 -51
- package/lib/style/defaultMarkdown.js +247 -3
- package/lib/style/font.js +54 -3
- package/lib/styleElement/markdown/default.js +17 -131
- package/lib/styleElement/markdown.js +30 -151
- package/lib/styleElement.js +30 -69
- package/lib/targets.js +3 -3
- package/lib/tokenTypes.js +39 -39
- package/lib/transform/css/ruleSet.js +15 -106
- package/lib/transform/css/selectors.js +17 -108
- package/lib/transform/css/selectorsList.js +28 -121
- package/lib/transform/css.js +35 -139
- package/lib/transform/html/anchor/index.js +11 -99
- package/lib/transform/html/division.js +18 -112
- package/lib/transform/html/footnote.js +25 -122
- package/lib/transform/html/heading/index.js +7 -91
- package/lib/transform/html/index.js +44 -139
- package/lib/transform/html/item/contents.js +23 -111
- package/lib/transform/html/item/footnote.js +11 -99
- package/lib/transform/html/item/index.js +11 -99
- package/lib/transform/html/line.js +10 -98
- package/lib/transform/html/link/contents.js +20 -111
- package/lib/transform/html/link/footnote.js +36 -140
- package/lib/transform/html/list/contents.js +37 -151
- package/lib/transform/html/list/footnotes.js +19 -110
- package/lib/transform/html/list/index.js +16 -100
- package/lib/transform/html/pageNumber.js +15 -106
- package/lib/transform/html.js +28 -132
- package/lib/transform/markdown/directive/embed.js +9 -120
- package/lib/transform/markdown/directive/ignore.js +6 -90
- package/lib/transform/markdown/directive/include.js +15 -129
- package/lib/transform/markdown/subDivision.js +6 -90
- package/lib/transform/markdown.js +7 -134
- package/lib/utilities/contents.js +74 -145
- package/lib/utilities/css.js +12 -16
- package/lib/utilities/dom.js +11 -11
- package/lib/utilities/entities.js +2 -2
- package/lib/utilities/entries.js +5 -5
- package/lib/utilities/grammar.js +57 -86
- package/lib/utilities/html.js +21 -25
- package/lib/utilities/index.js +76 -89
- package/lib/utilities/markdown.js +14 -17
- package/lib/utilities/markdownStyle.js +2 -2
- package/lib/utilities/object.js +16 -16
- package/lib/utilities/query.js +13 -14
- package/lib/utilities/string.js +2 -2
- package/package.json +1 -1
|
@@ -8,252 +8,79 @@ Object.defineProperty(exports, "default", {
|
|
|
8
8
|
return _default;
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
function _assert_this_initialized(self) {
|
|
16
|
-
if (self === void 0) {
|
|
17
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
18
|
-
}
|
|
19
|
-
return self;
|
|
20
|
-
}
|
|
21
|
-
function _call_super(_this, derived, args) {
|
|
22
|
-
derived = _get_prototype_of(derived);
|
|
23
|
-
return _possible_constructor_return(_this, _is_native_reflect_construct() ? Reflect.construct(derived, args || [], _get_prototype_of(_this).constructor) : derived.apply(_this, args));
|
|
24
|
-
}
|
|
25
|
-
function _class_call_check(instance, Constructor) {
|
|
26
|
-
if (!(instance instanceof Constructor)) {
|
|
27
|
-
throw new TypeError("Cannot call a class as a function");
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
function _construct(Parent, args, Class) {
|
|
31
|
-
if (_is_native_reflect_construct()) {
|
|
32
|
-
_construct = Reflect.construct;
|
|
33
|
-
} else {
|
|
34
|
-
_construct = function construct(Parent, args, Class) {
|
|
35
|
-
var a = [
|
|
36
|
-
null
|
|
37
|
-
];
|
|
38
|
-
a.push.apply(a, args);
|
|
39
|
-
var Constructor = Function.bind.apply(Parent, a);
|
|
40
|
-
var instance = new Constructor();
|
|
41
|
-
if (Class) _set_prototype_of(instance, Class.prototype);
|
|
42
|
-
return instance;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
return _construct.apply(null, arguments);
|
|
46
|
-
}
|
|
47
|
-
function _defineProperties(target, props) {
|
|
48
|
-
for(var i = 0; i < props.length; i++){
|
|
49
|
-
var descriptor = props[i];
|
|
50
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
51
|
-
descriptor.configurable = true;
|
|
52
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
53
|
-
Object.defineProperty(target, descriptor.key, descriptor);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
function _create_class(Constructor, protoProps, staticProps) {
|
|
57
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
58
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
59
|
-
return Constructor;
|
|
60
|
-
}
|
|
61
|
-
function _define_property(obj, key, value) {
|
|
62
|
-
if (key in obj) {
|
|
63
|
-
Object.defineProperty(obj, key, {
|
|
64
|
-
value: value,
|
|
65
|
-
enumerable: true,
|
|
66
|
-
configurable: true,
|
|
67
|
-
writable: true
|
|
68
|
-
});
|
|
69
|
-
} else {
|
|
70
|
-
obj[key] = value;
|
|
71
|
-
}
|
|
72
|
-
return obj;
|
|
73
|
-
}
|
|
74
|
-
function _get_prototype_of(o) {
|
|
75
|
-
_get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
|
|
76
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
77
|
-
};
|
|
78
|
-
return _get_prototype_of(o);
|
|
79
|
-
}
|
|
80
|
-
function _inherits(subClass, superClass) {
|
|
81
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
82
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
83
|
-
}
|
|
84
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
85
|
-
constructor: {
|
|
86
|
-
value: subClass,
|
|
87
|
-
writable: true,
|
|
88
|
-
configurable: true
|
|
89
|
-
}
|
|
90
|
-
});
|
|
91
|
-
if (superClass) _set_prototype_of(subClass, superClass);
|
|
92
|
-
}
|
|
11
|
+
const _easywithstyle = /*#__PURE__*/ _interop_require_default(require("easy-with-style"));
|
|
12
|
+
const _easy = require("easy");
|
|
13
|
+
const _page = /*#__PURE__*/ _interop_require_default(require("../button/page"));
|
|
14
|
+
const _customEventTypes = require("../../customEventTypes");
|
|
93
15
|
function _interop_require_default(obj) {
|
|
94
16
|
return obj && obj.__esModule ? obj : {
|
|
95
17
|
default: obj
|
|
96
18
|
};
|
|
97
19
|
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
if (call && (_type_of(call) === "object" || typeof call === "function")) {
|
|
103
|
-
return call;
|
|
104
|
-
}
|
|
105
|
-
return _assert_this_initialized(self);
|
|
106
|
-
}
|
|
107
|
-
function _set_prototype_of(o, p) {
|
|
108
|
-
_set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
|
|
109
|
-
o.__proto__ = p;
|
|
110
|
-
return o;
|
|
20
|
+
class PageButtonsDiv extends _easy.Element {
|
|
21
|
+
pageButtonClickHandler = (event, element)=>{
|
|
22
|
+
const pageButton = element, index = pageButton.getIndex(), customEventType = _customEventTypes.PAGE_UPDATE_CUSTOM_EVENT_TYPE;
|
|
23
|
+
this.callCustomHandlers(customEventType, event, element, index);
|
|
111
24
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
25
|
+
unmountPageButtons() {
|
|
26
|
+
const pageButtons = this.getPageButtons();
|
|
27
|
+
pageButtons.forEach((pageButton)=>{
|
|
28
|
+
this.unmount(pageButton);
|
|
29
|
+
});
|
|
117
30
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
127
|
-
}
|
|
128
|
-
function _wrap_native_super(Class) {
|
|
129
|
-
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
130
|
-
_wrap_native_super = function wrapNativeSuper(Class) {
|
|
131
|
-
if (Class === null || !_is_native_function(Class)) return Class;
|
|
132
|
-
if (typeof Class !== "function") {
|
|
133
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
134
|
-
}
|
|
135
|
-
if (typeof _cache !== "undefined") {
|
|
136
|
-
if (_cache.has(Class)) return _cache.get(Class);
|
|
137
|
-
_cache.set(Class, Wrapper);
|
|
31
|
+
mountPageButtons(length) {
|
|
32
|
+
const pageButtons = [];
|
|
33
|
+
for(let index = 0; index < length; index++){
|
|
34
|
+
const pageButton = /*#__PURE__*/ React.createElement(_page.default, {
|
|
35
|
+
index: index,
|
|
36
|
+
onClick: this.pageButtonClickHandler
|
|
37
|
+
});
|
|
38
|
+
pageButtons.push(pageButton);
|
|
138
39
|
}
|
|
139
|
-
|
|
140
|
-
|
|
40
|
+
pageButtons.forEach((pageButton)=>{
|
|
41
|
+
this.mount(pageButton);
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
getPageButtons() {
|
|
45
|
+
const pageButtonChildElements = this.getChildElements("button.page"), pageButtons = pageButtonChildElements; ///
|
|
46
|
+
return pageButtons;
|
|
47
|
+
}
|
|
48
|
+
update(length, index) {
|
|
49
|
+
let pageButtons;
|
|
50
|
+
pageButtons = this.getPageButtons();
|
|
51
|
+
const pageButtonsLength = pageButtons.length;
|
|
52
|
+
if (length !== pageButtonsLength) {
|
|
53
|
+
this.unmountPageButtons();
|
|
54
|
+
this.mountPageButtons(length);
|
|
141
55
|
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
writable: true,
|
|
147
|
-
configurable: true
|
|
148
|
-
}
|
|
56
|
+
pageButtons = this.getPageButtons();
|
|
57
|
+
const currentIndex = index; ///
|
|
58
|
+
pageButtons.forEach((pageButton, index)=>{
|
|
59
|
+
index === currentIndex ? pageButton.disable() : pageButton.enable();
|
|
149
60
|
});
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
"\n\n top: 7rem;\n right: 3rem;\n z-index: 1;\n position: absolute;\n \n"
|
|
165
|
-
]);
|
|
166
|
-
_templateObject = function _templateObject() {
|
|
167
|
-
return data;
|
|
61
|
+
}
|
|
62
|
+
clear() {
|
|
63
|
+
this.unmountPageButtons();
|
|
64
|
+
}
|
|
65
|
+
parentContext() {
|
|
66
|
+
const clearPageButtonsDiv = this.clear.bind(this), updatePageButtonsDiv = this.update.bind(this); ///
|
|
67
|
+
return {
|
|
68
|
+
clearPageButtonsDiv,
|
|
69
|
+
updatePageButtonsDiv
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
static tagName = "div";
|
|
73
|
+
static defaultProperties = {
|
|
74
|
+
className: "page-buttons"
|
|
168
75
|
};
|
|
169
|
-
return data;
|
|
170
76
|
}
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
});
|
|
180
|
-
return _this;
|
|
181
|
-
}
|
|
182
|
-
_create_class(PageButtonsDiv, [
|
|
183
|
-
{
|
|
184
|
-
key: "unmountPageButtons",
|
|
185
|
-
value: function unmountPageButtons() {
|
|
186
|
-
var _this = this;
|
|
187
|
-
var pageButtons = this.getPageButtons();
|
|
188
|
-
pageButtons.forEach(function(pageButton) {
|
|
189
|
-
_this.unmount(pageButton);
|
|
190
|
-
});
|
|
191
|
-
}
|
|
192
|
-
},
|
|
193
|
-
{
|
|
194
|
-
key: "mountPageButtons",
|
|
195
|
-
value: function mountPageButtons(length) {
|
|
196
|
-
var _this = this;
|
|
197
|
-
var pageButtons = [];
|
|
198
|
-
for(var index = 0; index < length; index++){
|
|
199
|
-
var pageButton = /*#__PURE__*/ React.createElement(_page.default, {
|
|
200
|
-
index: index,
|
|
201
|
-
onClick: this.pageButtonClickHandler
|
|
202
|
-
});
|
|
203
|
-
pageButtons.push(pageButton);
|
|
204
|
-
}
|
|
205
|
-
pageButtons.forEach(function(pageButton) {
|
|
206
|
-
_this.mount(pageButton);
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
},
|
|
210
|
-
{
|
|
211
|
-
key: "getPageButtons",
|
|
212
|
-
value: function getPageButtons() {
|
|
213
|
-
var pageButtonChildElements = this.getChildElements("button.page"), pageButtons = pageButtonChildElements; ///
|
|
214
|
-
return pageButtons;
|
|
215
|
-
}
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
key: "update",
|
|
219
|
-
value: function update(length, index) {
|
|
220
|
-
var pageButtons;
|
|
221
|
-
pageButtons = this.getPageButtons();
|
|
222
|
-
var pageButtonsLength = pageButtons.length;
|
|
223
|
-
if (length !== pageButtonsLength) {
|
|
224
|
-
this.unmountPageButtons();
|
|
225
|
-
this.mountPageButtons(length);
|
|
226
|
-
}
|
|
227
|
-
pageButtons = this.getPageButtons();
|
|
228
|
-
var currentIndex = index; ///
|
|
229
|
-
pageButtons.forEach(function(pageButton, index) {
|
|
230
|
-
index === currentIndex ? pageButton.disable() : pageButton.enable();
|
|
231
|
-
});
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
key: "clear",
|
|
236
|
-
value: function clear() {
|
|
237
|
-
this.unmountPageButtons();
|
|
238
|
-
}
|
|
239
|
-
},
|
|
240
|
-
{
|
|
241
|
-
key: "parentContext",
|
|
242
|
-
value: function parentContext() {
|
|
243
|
-
var clearPageButtonsDiv = this.clear.bind(this), updatePageButtonsDiv = this.update.bind(this); ///
|
|
244
|
-
return {
|
|
245
|
-
clearPageButtonsDiv: clearPageButtonsDiv,
|
|
246
|
-
updatePageButtonsDiv: updatePageButtonsDiv
|
|
247
|
-
};
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
]);
|
|
251
|
-
return PageButtonsDiv;
|
|
252
|
-
}(_wrap_native_super(_easy.Element));
|
|
253
|
-
_define_property(PageButtonsDiv, "tagName", "div");
|
|
254
|
-
_define_property(PageButtonsDiv, "defaultProperties", {
|
|
255
|
-
className: "page-buttons"
|
|
256
|
-
});
|
|
257
|
-
var _default = (0, _easywithstyle.default)(PageButtonsDiv)(_templateObject());
|
|
77
|
+
const _default = (0, _easywithstyle.default)(PageButtonsDiv)`
|
|
78
|
+
|
|
79
|
+
top: 7rem;
|
|
80
|
+
right: 3rem;
|
|
81
|
+
z-index: 1;
|
|
82
|
+
position: absolute;
|
|
83
|
+
|
|
84
|
+
`;
|
|
258
85
|
|
|
259
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9leGFtcGxlL3ZpZXcvZGl2L3BhZ2VCdXR0b25zLmpzIl0sInNvdXJjZXNDb250ZW50IjpbIlwidXNlIHN0cmljdFwiO1xuXG5pbXBvcnQgd2l0aFN0eWxlIGZyb20gXCJlYXN5LXdpdGgtc3R5bGVcIjsgIC8vL1xuXG5pbXBvcnQgeyBFbGVtZW50IH0gZnJvbSBcImVhc3lcIjtcblxuaW1wb3J0IFBhZ2VCdXR0b24gZnJvbSBcIi4uL2J1dHRvbi9wYWdlXCI7XG5cbmltcG9ydCB7IFBBR0VfVVBEQVRFX0NVU1RPTV9FVkVOVF9UWVBFIH0gZnJvbSBcIi4uLy4uL2N1c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