@lightningjs/ui-components
Advanced tools
Comparing version 1.0.0 to 1.1.0-beta.1
34
index.js
/** | ||
* Copyright 2020 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
* Copyright 2021 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
export * from './components/Styles/index.js'; | ||
@@ -26,1 +26,3 @@ export { default as Announcer } from './components/Announcer/index.js'; | ||
export { default as Row } from './components/Row/index.js'; | ||
export { default as Base } from './components/Base'; | ||
export { default as withHandleKey } from './mixins/withHandleKey'; |
/** | ||
* Copyright 2020 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
* Copyright 2021 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { createTransitions } from '../components/Styles/Transitions'; | ||
const patchTransitions = (element, transitions) => { | ||
if (!element._transitions) { | ||
element.transitions = transitions; | ||
return; | ||
}; | ||
for (let key in transitions) { | ||
if (!element._transitions[key]) { | ||
element.transition(key, transitions[key]); | ||
} | ||
} | ||
}; | ||
const collectChildren = (children, result=[]) => { | ||
if (children && children.length) { | ||
result.push(...children); | ||
return collectChildren(children.flatMap(child => child.children), result); | ||
} | ||
return result | ||
} | ||
export const withTransitions = (Base, options = {}) => { | ||
const transitions = createTransitions(options); | ||
return class extends Base { | ||
static get name() { return Base.name } | ||
static _template() { | ||
return { | ||
transitions, | ||
...super._template() | ||
}; | ||
} | ||
_init() { | ||
const flatTree = collectChildren(this.children); | ||
flatTree.forEach(element => patchTransitions(element, transitions)); | ||
super._init(); | ||
} | ||
}; | ||
}; | ||
export { default as withSelections } from '/withSelections'; | ||
export { default as withStyles } from './withStyles'; | ||
export { default as withTheme } from './withTheme'; | ||
export { default as withTransitions } from './withTransitions'; | ||
export { default as withUpdates } from './withUpdates'; |
@@ -0,1 +1,19 @@ | ||
/** | ||
* Copyright 2021 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { debounce } from 'debounce'; | ||
@@ -2,0 +20,0 @@ |
@@ -0,1 +1,19 @@ | ||
/** | ||
* Copyright 2021 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import lng from '@lightningjs/core'; | ||
@@ -2,0 +20,0 @@ import mdx from './withUpdates.mdx'; |
@@ -0,3 +1,21 @@ | ||
/** | ||
* Copyright 2021 Comcast Cable Communications Management, LLC | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import lng from '@lightningjs/core'; | ||
import TestUtils from '../../components/lightning-test-utils'; | ||
import TestUtils from '../../test/lightning-test-utils'; | ||
import withUpdates from '.'; | ||
@@ -4,0 +22,0 @@ |
{ | ||
"name": "@lightningjs/ui-components", | ||
"version": "1.0.0", | ||
"version": "1.1.0-beta.1", | ||
"dependencies": { | ||
@@ -17,8 +17,8 @@ "debounce": "^1.2.1" | ||
"Styles.js", | ||
"{bin,components,mixins,utils}/**/*", | ||
"!components/**/*.stories.js", | ||
"!{components,utils}/**/*.test.js", | ||
"!components/lightning-test-renderer.js", | ||
"!components/lightning-test-utils.js", | ||
"!components/**/__snapshots__", | ||
"{bin,elements,layout,mixins,utils}/**/*", | ||
"!elements|layout/**/*.stories.js", | ||
"!{elements,layout,utils}/**/*.test.js", | ||
"!elements|layout/lightning-test-renderer.js", | ||
"!elements|layout/lightning-test-utils.js", | ||
"!elements|layout/**/__snapshots__", | ||
"!public/" | ||
@@ -36,2 +36,3 @@ ], | ||
"@lightningjs/core": "^2.3.0", | ||
"@semantic-release/git": "^9.0.0", | ||
"@storybook/addon-actions": "^6.0.21", | ||
@@ -44,2 +45,6 @@ "@storybook/addon-docs": "^6.0.21", | ||
"canvas": "^2.7.0", | ||
"eslint": "^7.22.0", | ||
"eslint-config-prettier": "^7.2.0", | ||
"eslint-plugin-jest": "^24.3.2", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"gh-pages": "^3.1.0", | ||
@@ -61,3 +66,3 @@ "husky": "^3.1.0", | ||
"lint-staged": { | ||
"./{components,utils}/**/*.js": [ | ||
"./{elements,layout,utils}/**/*.js": [ | ||
"npm run lint" | ||
@@ -71,4 +76,4 @@ ] | ||
"build": "build-storybook -c .storybook -o dist", | ||
"lint": "npx prettier --check './{components,utils}/**/*.js'", | ||
"lint:fix": "npx prettier --write './{components,utils}/**/*.js'", | ||
"lint": "npx prettier --check './{elements,layout,utils}/**/*.js'", | ||
"lint:fix": "npx prettier --write './{elements,layout,utils}/**/*.js'", | ||
"gh-pages": "gh-pages -d dist", | ||
@@ -75,0 +80,0 @@ "create": "sh bin/create.sh", |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
1076432
78
6120
29
2
2