Skip to content

Commit db83476

Browse files
authored
Merge branch 'dev' into fix-1231
2 parents 48be4d2 + 51a6bf7 commit db83476

File tree

9 files changed

+46
-53
lines changed

9 files changed

+46
-53
lines changed

packages/uikit-workshop/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"mini-css-extract-plugin": "^0.8.0",
100100
"mousetrap": "^1.6.3",
101101
"no-emit-webpack-plugin": "^1.0.0",
102-
"node-sass": "^4.13.0",
102+
"node-sass": "^4.14.1",
103103
"node-sass-selector-importer": "^5.2.0",
104104
"penthouse": "^2.2.2",
105105
"postcss-loader": "^3.0.0",

packages/uikit-workshop/src/scripts/components/panels.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ function init(event) {
6868
Panels.add({
6969
id: 'pl-panel-pattern',
7070
name: window.config.patternExtension.toUpperCase(),
71-
default: !window.config.defaultPatternInfoPanelCode ||
72-
window.config.defaultPatternInfoPanelCode ===
73-
window.config.patternExtension,
71+
default:
72+
!window.config.defaultPatternInfoPanelCode ||
73+
window.config.defaultPatternInfoPanelCode ===
74+
window.config.patternExtension,
7475
templateID: 'pl-panel-template-code',
7576
httpRequest: true,
7677
httpRequestReplace: fileSuffixPattern,
@@ -83,7 +84,7 @@ function init(event) {
8384
Panels.add({
8485
id: 'pl-panel-html',
8586
name: 'HTML',
86-
default: false,
87+
default: window.config.defaultPatternInfoPanelCode && window.config.defaultPatternInfoPanelCode === 'html',
8788
templateID: 'pl-panel-template-code',
8889
httpRequest: true,
8990
httpRequestReplace: fileSuffixMarkup + '.html',

packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,16 @@ import { NavItem } from './src/NavItem';
2020
class Nav extends BaseComponent {
2121
static is = 'pl-nav';
2222

23-
constructor(self) {
24-
self = super(self);
25-
self.toggleNavPanel = self.toggleNavPanel.bind(self);
26-
self.toggleSpecialNavPanel = self.toggleSpecialNavPanel.bind(self);
27-
self.handleClick = self.handleClick.bind(self);
28-
self.handleURLChange = self.handleURLChange.bind(self);
29-
self.handlePageClick = self.handlePageClick.bind(self);
30-
self._hasInitiallyRendered = false;
31-
self.receiveIframeMessage = self.receiveIframeMessage.bind(self);
32-
self.useShadow = false;
33-
return self;
23+
constructor() {
24+
super();
25+
this.toggleNavPanel = this.toggleNavPanel.bind(this);
26+
this.toggleSpecialNavPanel = this.toggleSpecialNavPanel.bind(this);
27+
this.handleClick = this.handleClick.bind(this);
28+
this.handleURLChange = this.handleURLChange.bind(this);
29+
this.handlePageClick = this.handlePageClick.bind(this);
30+
this._hasInitiallyRendered = false;
31+
this.receiveIframeMessage = this.receiveIframeMessage.bind(this);
32+
this.useShadow = false;
3433
}
3534

3635
handlePageClick(e) {

packages/uikit-workshop/src/scripts/components/pl-search/pl-search.js

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,28 @@ import { BaseComponent } from '../base-component';
1717
class Search extends BaseComponent {
1818
static is = 'pl-search';
1919

20-
constructor(self) {
21-
self = super(self);
22-
self.useShadow = false;
23-
self.defaultMaxResults = 10;
20+
constructor() {
21+
super();
22+
this.useShadow = false;
23+
this.defaultMaxResults = 10;
2424

2525
// Autosuggest is a controlled component.
2626
// This means that you need to provide an input value
2727
// and an onChange handler that updates this value (see below).
2828
// Suggestions also need to be provided to the Autosuggest,
2929
// and they are initially empty because the Autosuggest is closed.
30-
self.state = {
30+
this.state = {
3131
value: '',
3232
suggestions: [],
3333
isFocused: false,
3434
};
3535

36-
self.receiveIframeMessage = self.receiveIframeMessage.bind(self);
37-
self.onChange = self.onChange.bind(self);
38-
self.toggleSearch = self.toggleSearch.bind(self);
39-
self.closeSearch = self.closeSearch.bind(self);
40-
self.renderInputComponent = self.renderInputComponent.bind(self);
41-
self.openSearch = self.openSearch.bind(self);
42-
return self;
36+
this.receiveIframeMessage = this.receiveIframeMessage.bind(this);
37+
this.onChange = this.onChange.bind(this);
38+
this.toggleSearch = this.toggleSearch.bind(this);
39+
this.closeSearch = this.closeSearch.bind(this);
40+
this.renderInputComponent = this.renderInputComponent.bind(this);
41+
this.openSearch = this.openSearch.bind(this);
4342
}
4443

4544
connecting() {
@@ -61,10 +60,9 @@ class Search extends BaseComponent {
6160
}
6261

6362
connected() {
64-
const self = this;
6563
Mousetrap.bind('command+shift+f', function(e) {
6664
e.preventDefault();
67-
self.toggleSearch();
65+
this.toggleSearch();
6866
});
6967
window.addEventListener('message', this.receiveIframeMessage, false);
7068
}

packages/uikit-workshop/src/scripts/lit-components/pl-drawer/pl-drawer.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,11 @@ import styles from './pl-drawer.scss?external';
1111

1212
@customElement('pl-drawer')
1313
class Drawer extends LitElement {
14-
constructor(self) {
15-
self = super(self);
16-
self.onMouseDown = self.onMouseDown.bind(self); // fix bindings so "self" works properly
17-
self.onMouseUp = self.onMouseUp.bind(self); // fix bindings so "self" works properly
18-
self.onMouseMove = self.onMouseMove.bind(self); // fix bindings so "this" works properly
19-
return self;
14+
constructor() {
15+
super();
16+
this.onMouseDown = this.onMouseDown.bind(this); // fix bindings so "this" works properly
17+
this.onMouseUp = this.onMouseUp.bind(this); // fix bindings so "this" works properly
18+
this.onMouseMove = this.onMouseMove.bind(this); // fix bindings so "this" works properly
2019
}
2120

2221
connectedCallback() {

packages/uikit-workshop/src/scripts/lit-components/pl-toggle-info/pl-toggle-info.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import styles from './pl-toggle-info.scss?external';
55

66
@customElement('pl-toggle-info')
77
class InfoToggle extends LitElement {
8-
constructor(self) {
9-
self = super(self);
10-
self.handleClick = self.handleClick.bind(self);
11-
return self;
8+
constructor() {
9+
super();
10+
this.handleClick = this.handleClick.bind(this);
1211
}
1312

1413
createRenderRoot() {

packages/uikit-workshop/src/scripts/lit-components/pl-toggle-layout/pl-toggle-layout.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@ import styles from './pl-toggle-layout.scss?external';
55

66
@customElement('pl-toggle-layout')
77
class LayoutToggle extends LitElement {
8-
constructor(self) {
9-
self = super(self);
10-
self.handleClick = self.handleClick.bind(self);
11-
return self;
8+
constructor() {
9+
super();
10+
this.handleClick = this.handleClick.bind(this);
1211
}
1312

1413
createRenderRoot() {

packages/uikit-workshop/src/scripts/lit-components/pl-toggle-theme/pl-toggle-theme.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,12 @@ import styles from './pl-toggle-theme.scss?external';
66

77
@customElement('pl-toggle-theme')
88
class ThemeToggle extends LitElement {
9-
constructor(self) {
10-
self = super(self);
11-
self.targetOrigin =
9+
constructor() {
10+
super();
11+
this.targetOrigin =
1212
window.location.protocol === 'file:'
1313
? '*'
1414
: window.location.protocol + '//' + window.location.host;
15-
return self;
1615
}
1716

1817
static get properties() {

packages/uikit-workshop/src/scripts/lit-components/pl-viewport-size-list/pl-viewport-size-list.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,10 @@ class ViewportSizes extends BaseComponent {
4343
this.triggerUpdate();
4444
}
4545

46-
constructor(self) {
47-
self = super(self);
48-
self.resizeViewport = self.resizeViewport.bind(self);
49-
self.useShadow = false;
50-
return self;
46+
constructor() {
47+
super();
48+
this.resizeViewport = this.resizeViewport.bind(this);
49+
this.useShadow = false;
5150
}
5251

5352
connectedCallback() {

0 commit comments

Comments
 (0)