Skip to content

Commit

Permalink
Merge c4fd9dc into 7050836
Browse files Browse the repository at this point in the history
  • Loading branch information
JosefBredereck committed Aug 16, 2020
2 parents 7050836 + c4fd9dc commit 40a005d
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 86 deletions.
2 changes: 1 addition & 1 deletion packages/uikit-workshop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"mini-css-extract-plugin": "^0.8.0",
"mousetrap": "^1.6.3",
"no-emit-webpack-plugin": "^1.0.0",
"node-sass": "^4.13.0",
"node-sass": "^4.14.1",
"node-sass-selector-importer": "^5.2.0",
"penthouse": "^2.2.2",
"postcss-loader": "^3.0.0",
Expand Down
21 changes: 10 additions & 11 deletions packages/uikit-workshop/src/scripts/components/pl-nav/pl-nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,16 @@ import { NavItem } from './src/NavItem';
class Nav extends BaseComponent {
static is = 'pl-nav';

constructor(self) {
self = super(self);
self.toggleNavPanel = self.toggleNavPanel.bind(self);
self.toggleSpecialNavPanel = self.toggleSpecialNavPanel.bind(self);
self.handleClick = self.handleClick.bind(self);
self.handleURLChange = self.handleURLChange.bind(self);
self.handlePageClick = self.handlePageClick.bind(self);
self._hasInitiallyRendered = false;
self.receiveIframeMessage = self.receiveIframeMessage.bind(self);
self.useShadow = false;
return self;
constructor() {
super();
this.toggleNavPanel = this.toggleNavPanel.bind(this);
this.toggleSpecialNavPanel = this.toggleSpecialNavPanel.bind(this);
this.handleClick = this.handleClick.bind(this);
this.handleURLChange = this.handleURLChange.bind(this);
this.handlePageClick = this.handlePageClick.bind(this);
this._hasInitiallyRendered = false;
this.receiveIframeMessage = this.receiveIframeMessage.bind(this);
this.useShadow = false;
}

handlePageClick(e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,28 @@ import { BaseComponent } from '../base-component';
class Search extends BaseComponent {
static is = 'pl-search';

constructor(self) {
self = super(self);
self.useShadow = false;
self.defaultMaxResults = 10;
constructor() {
super();
this.useShadow = false;
this.defaultMaxResults = 10;

// Autosuggest is a controlled component.
// This means that you need to provide an input value
// and an onChange handler that updates this value (see below).
// Suggestions also need to be provided to the Autosuggest,
// and they are initially empty because the Autosuggest is closed.
self.state = {
this.state = {
value: '',
suggestions: [],
isFocused: false,
};

self.receiveIframeMessage = self.receiveIframeMessage.bind(self);
self.onChange = self.onChange.bind(self);
self.toggleSearch = self.toggleSearch.bind(self);
self.closeSearch = self.closeSearch.bind(self);
self.renderInputComponent = self.renderInputComponent.bind(self);
self.openSearch = self.openSearch.bind(self);
return self;
this.receiveIframeMessage = this.receiveIframeMessage.bind(this);
this.onChange = this.onChange.bind(this);
this.toggleSearch = this.toggleSearch.bind(this);
this.closeSearch = this.closeSearch.bind(this);
this.renderInputComponent = this.renderInputComponent.bind(this);
this.openSearch = this.openSearch.bind(this);
}

connecting() {
Expand All @@ -61,10 +60,9 @@ class Search extends BaseComponent {
}

connected() {
const self = this;
Mousetrap.bind('command+shift+f', function(e) {
e.preventDefault();
self.toggleSearch();
this.toggleSearch();
});
window.addEventListener('message', this.receiveIframeMessage, false);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ import styles from './pl-drawer.scss?external';

@customElement('pl-drawer')
class Drawer extends LitElement {
constructor(self) {
self = super(self);
self.onMouseDown = self.onMouseDown.bind(self); // fix bindings so "self" works properly
self.onMouseUp = self.onMouseUp.bind(self); // fix bindings so "self" works properly
self.onMouseMove = self.onMouseMove.bind(self); // fix bindings so "this" works properly
return self;
constructor() {
super();
this.onMouseDown = this.onMouseDown.bind(this); // fix bindings so "this" works properly
this.onMouseUp = this.onMouseUp.bind(this); // fix bindings so "this" works properly
this.onMouseMove = this.onMouseMove.bind(this); // fix bindings so "this" works properly
}

connectedCallback() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import styles from './pl-toggle-info.scss?external';

@customElement('pl-toggle-info')
class InfoToggle extends LitElement {
constructor(self) {
self = super(self);
self.handleClick = self.handleClick.bind(self);
return self;
constructor() {
super();
this.handleClick = this.handleClick.bind(this);
}

createRenderRoot() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ import styles from './pl-toggle-layout.scss?external';

@customElement('pl-toggle-layout')
class LayoutToggle extends LitElement {
constructor(self) {
self = super(self);
self.handleClick = self.handleClick.bind(self);
return self;
constructor() {
super();
this.handleClick = this.handleClick.bind(this);
}

createRenderRoot() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,12 @@ import styles from './pl-toggle-theme.scss?external';

@customElement('pl-toggle-theme')
class ThemeToggle extends LitElement {
constructor(self) {
self = super(self);
self.targetOrigin =
constructor() {
super();
this.targetOrigin =
window.location.protocol === 'file:'
? '*'
: window.location.protocol + '//' + window.location.host;
return self;
}

static get properties() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ class ViewportSizes extends BaseComponent {
this.triggerUpdate();
}

constructor(self) {
self = super(self);
self.resizeViewport = self.resizeViewport.bind(self);
self.useShadow = false;
return self;
constructor() {
super();
this.resizeViewport = this.resizeViewport.bind(this);
this.useShadow = false;
}

connectedCallback() {
Expand Down
63 changes: 26 additions & 37 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1988,6 +1988,14 @@
dependencies:
"@types/node" ">= 8"

"@pattern-lab/starterkit-handlebars-vanilla@1.4.0":
version "1.4.0"
resolved "https://registry.yarnpkg.com/@pattern-lab/starterkit-handlebars-vanilla/-/starterkit-handlebars-vanilla-1.4.0.tgz#aac144d0c21d40226f90ac5ce1b5d8505dddf330"
integrity sha512-inkcRhpYfm0q58zEQ9Gx2S+iVu+prAtRgqLw5Opd0MYC74NMcqN9XrcbJva4NfLn1tgx9dkA3Xmtg0IxiTHnAw==
dependencies:
node-sass "^4.12.0"
node-sass-glob-importer "^5.3.2"

"@pattern-lab/starterkit-mustache-base@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@pattern-lab/starterkit-mustache-base/-/starterkit-mustache-base-3.0.3.tgz#8ce9bc8e0d2254ee970a09c4bdc76d4f6131c91d"
Expand Down Expand Up @@ -12430,6 +12438,13 @@ node-releases@^1.1.38:
dependencies:
semver "^6.3.0"

node-sass-glob-importer@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/node-sass-glob-importer/-/node-sass-glob-importer-5.3.2.tgz#465581e46027c0e9520e6d87f7e6eda858a14acb"
integrity sha512-QTX7KPsISgp55REV6pMH703nzHfWCOEYEQC0cDyTRo7XO6WDvyC0OAzekuQ4gs505IZcxv9KxZ3uPJ5s5H9D3g==
dependencies:
node-sass-magic-importer "^5.3.2"

node-sass-magic-importer@^5.3.2:
version "5.3.2"
resolved "https://registry.yarnpkg.com/node-sass-magic-importer/-/node-sass-magic-importer-5.3.2.tgz#2f2248bb2e5cdb275ba34102ebf995edadf99175"
Expand All @@ -12452,10 +12467,10 @@ node-sass-selector-importer@^5.2.0:
node-sass-magic-importer "^5.3.2"
postcss-scss "^2.0.0"

node-sass@^4.13.0:
version "4.13.0"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.13.0.tgz#b647288babdd6a1cb726de4545516b31f90da066"
integrity sha512-W1XBrvoJ1dy7VsvTAS5q1V45lREbTlZQqFbiHb3R3OTTCma0XBtuG6xZ6Z4506nR4lmHPTqVRwxT6KgtWC97CA==
node-sass@^4.12.0, node-sass@^4.14.1:
version "4.14.1"
resolved "https://registry.yarnpkg.com/node-sass/-/node-sass-4.14.1.tgz#99c87ec2efb7047ed638fb4c9db7f3a42e2217b5"
integrity sha512-sjCuOlvGyCJS40R8BscF5vhVlQjNN069NtQ1gSxyK1u9iqvn6tf7O1R4GNowVZfiZUCRt5MmMs1xd+4V/7Yr0g==
dependencies:
async-foreach "^0.1.3"
chalk "^1.1.1"
Expand All @@ -12471,7 +12486,7 @@ node-sass@^4.13.0:
node-gyp "^3.8.0"
npmlog "^4.0.0"
request "^2.88.0"
sass-graph "^2.2.4"
sass-graph "2.2.5"
stdout-stream "^1.4.0"
"true-case-path" "^1.0.2"

Expand Down Expand Up @@ -15580,15 +15595,15 @@ sanitize-filename@1.6.1:
dependencies:
truncate-utf8-bytes "^1.0.0"

sass-graph@^2.2.4:
version "2.2.4"
resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.4.tgz#13fbd63cd1caf0908b9fd93476ad43a51d1e0b49"
integrity sha1-E/vWPNHK8JCLn9k0dq1DpR0eC0k=
sass-graph@2.2.5:
version "2.2.5"
resolved "https://registry.yarnpkg.com/sass-graph/-/sass-graph-2.2.5.tgz#a981c87446b8319d96dce0671e487879bd24c2e8"
integrity sha512-VFWDAHOe6mRuT4mZRd4eKE+d8Uedrk6Xnh7Sh9b4NGufQLQjOrvf/MQoOdx+0s92L89FeyUUNfU597j/3uNpag==
dependencies:
glob "^7.0.0"
lodash "^4.0.0"
scss-tokenizer "^0.2.3"
yargs "^7.0.0"
yargs "^13.3.2"

sass-loader@^8.0.0:
version "8.0.0"
Expand Down Expand Up @@ -18952,13 +18967,6 @@ yargs-parser@^4.1.0, yargs-parser@^4.2.0:
dependencies:
camelcase "^3.0.0"

yargs-parser@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a"
integrity sha1-J17PDX/+Bcd+ZOfIbkzZS/DhIoo=
dependencies:
camelcase "^3.0.0"

yargs-parser@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-7.0.0.tgz#8d0ac42f16ea55debd332caf4c4038b3e3f5dfd9"
Expand Down Expand Up @@ -19056,7 +19064,7 @@ yargs@^13.2.2:
y18n "^4.0.0"
yargs-parser "^13.1.1"

yargs@^13.3.0:
yargs@^13.3.0, yargs@^13.3.2:
version "13.3.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.2.tgz#ad7ffefec1aa59565ac915f82dccb38a9c31a2dd"
integrity sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==
Expand Down Expand Up @@ -19102,25 +19110,6 @@ yargs@^3.32.0:
window-size "^0.1.4"
y18n "^3.2.0"

yargs@^7.0.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-7.1.0.tgz#6ba318eb16961727f5d284f8ea003e8d6154d0c8"
integrity sha1-a6MY6xaWFyf10oT46gA+jWFU0Mg=
dependencies:
camelcase "^3.0.0"
cliui "^3.2.0"
decamelize "^1.1.1"
get-caller-file "^1.0.1"
os-locale "^1.4.0"
read-pkg-up "^1.0.1"
require-directory "^2.1.1"
require-main-filename "^1.0.1"
set-blocking "^2.0.0"
string-width "^1.0.2"
which-module "^1.0.0"
y18n "^3.2.1"
yargs-parser "^5.0.0"

yargs@^8.0.1:
version "8.0.2"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-8.0.2.tgz#6299a9055b1cefc969ff7e79c1d918dceb22c360"
Expand Down

0 comments on commit 40a005d

Please sign in to comment.