@teipublisher/pb-components 3.0.0 → 3.0.1
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 +9 -0
- package/dist/pb-component-docs.js +1 -1
- package/dist/pb-components-bundle.js +120 -120
- package/gh-pages.js +9 -5
- package/package.json +1 -1
- package/src/pb-code-highlight.js +3 -0
- package/src/pb-paginate.js +3 -2
- package/src/pb-zoom.js +3 -1
package/gh-pages.js
CHANGED
|
@@ -19,12 +19,16 @@ copy('lib', path.join(dir, 'lib'));
|
|
|
19
19
|
copy('css', path.join(dir, 'css'));
|
|
20
20
|
copy('src', path.join(dir, 'src'));
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
// Only link stable versions as latest, not pre-release versions (e.g., v.*-next.*)
|
|
23
|
+
const isStableVersion = !json.version.includes('-next');
|
|
24
|
+
if (isStableVersion) {
|
|
25
|
+
try {
|
|
26
|
+
fs.unlinkSync(latest);
|
|
27
|
+
} catch (e) {
|
|
28
|
+
/* */
|
|
29
|
+
}
|
|
30
|
+
fs.symlinkSync(path.resolve(dir), latest, 'dir');
|
|
26
31
|
}
|
|
27
|
-
fs.symlinkSync(path.resolve(dir), latest, 'dir');
|
|
28
32
|
|
|
29
33
|
const redirect = fs.readFileSync(path.join('demo', 'redirect.js'), 'utf-8');
|
|
30
34
|
fs.writeFileSync(path.join('docs', 'redirect.js'), redirect, { encoding: 'utf-8' });
|
package/package.json
CHANGED
package/src/pb-code-highlight.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit-element';
|
|
2
2
|
import 'prismjs/prism';
|
|
3
|
+
import 'prismjs/components/prism-css';
|
|
4
|
+
import 'prismjs/components/prism-markup';
|
|
5
|
+
import 'prismjs/components/prism-json';
|
|
3
6
|
import 'prismjs/components/prism-xquery';
|
|
4
7
|
import 'prismjs/plugins/normalize-whitespace/prism-normalize-whitespace';
|
|
5
8
|
import 'prismjs/plugins/line-numbers/prism-line-numbers';
|
package/src/pb-paginate.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { LitElement, html, css } from 'lit-element';
|
|
2
2
|
import { pbMixin } from './pb-mixin.js';
|
|
3
3
|
import { translate } from './pb-i18n.js';
|
|
4
|
+
import { themableMixin } from './theming.js';
|
|
4
5
|
|
|
5
6
|
/**
|
|
6
7
|
* Display a pagination control from which the user can select a page to view
|
|
@@ -14,7 +15,7 @@ import { translate } from './pb-i18n.js';
|
|
|
14
15
|
* @fires pb-results-received - When received, recalculates page ranges to display according to the parameters received
|
|
15
16
|
* @csspart count - the span displaying the number of items
|
|
16
17
|
*/
|
|
17
|
-
export class PbPaginate extends pbMixin(LitElement) {
|
|
18
|
+
export class PbPaginate extends themableMixin(pbMixin(LitElement)) {
|
|
18
19
|
static get properties() {
|
|
19
20
|
return {
|
|
20
21
|
...super.properties,
|
|
@@ -151,7 +152,7 @@ export class PbPaginate extends pbMixin(LitElement) {
|
|
|
151
152
|
}
|
|
152
153
|
|
|
153
154
|
.found {
|
|
154
|
-
padding-left:
|
|
155
|
+
padding-left: .5rem;
|
|
155
156
|
}
|
|
156
157
|
`;
|
|
157
158
|
}
|
package/src/pb-zoom.js
CHANGED
|
@@ -44,7 +44,9 @@ export class PbZoom extends themableMixin(pbMixin(LitElement)) {
|
|
|
44
44
|
this._loadZoomPreference();
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
_handleClick() {
|
|
47
|
+
_handleClick(ev) {
|
|
48
|
+
ev.preventDefault();
|
|
49
|
+
ev.stopPropagation();
|
|
48
50
|
this.emitTo('pb-zoom', { direction: this.direction });
|
|
49
51
|
this.zoom(this.direction);
|
|
50
52
|
}
|