Gathering detailed insights and metrics for @egjs/component
Gathering detailed insights and metrics for @egjs/component
Gathering detailed insights and metrics for @egjs/component
Gathering detailed insights and metrics for @egjs/component
@egjs/grid
A component that can arrange items according to the type of grids
@egjs/react-infinitegrid
A React component that can arrange items infinitely according to the type of grids
@egjs/react-grid
A React component that can arrange items according to the type of grids
@egjs/vue3-infinitegrid
A Vue3 component that can arrange items infinitely according to the type of grids
npm install @egjs/component
Typescript
Module System
Node Version
NPM Version
3.0.5 Release (2023-10-20)
Updated on Oct 20, 2023
3.0.4 Release (2022-12-29)
Updated on Dec 29, 2022
3.0.3 Release (2022-12-15)
Updated on Dec 15, 2022
3.0.2 Release (2021-10-27)
Updated on Oct 07, 2022
3.0.1 Release (2021-03-11)
Updated on Mar 11, 2021
3.0.0 Release (2021-03-04)
Updated on Mar 04, 2021
TypeScript (71.18%)
JavaScript (28.82%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
38 Stars
138 Commits
9 Forks
12 Watchers
3 Branches
16 Contributors
Updated on Feb 26, 2024
Latest Version
3.0.5
Package Id
@egjs/component@3.0.5
Unpacked Size
445.61 kB
Size
144.65 kB
File Count
36
NPM Version
8.19.4
Node Version
16.20.0
Published on
Oct 20, 2023
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
42
A class used to manage events and options in a component
Download dist files from repo directly or install it via npm.
You can download the uncompressed files for development
You can download the compressed files for production
The following command shows how to install egjs-component using npm.
1$ npm install @egjs/component
The following are the supported browsers.
Internet Explorer | Chrome | Firefox | Safari | iOS | Android |
---|---|---|---|---|---|
7+ | Latest | Latest | Latest | 7+ | 2.1+(except 3.x) |
1<script src="../dist/component.js"></script>
1import Component from "@egjs/component"; 2 3class Some extends Component { 4 hi() { 5 alert("hi"); 6 } 7 thing() { 8 this.once("hi", this.hi); 9 } 10} 11 12var some = new Some(); 13some.thing(); 14some.trigger("hi"); 15// fire alert("hi"); 16some.trigger("hi"); 17// Nothing happens
You can use Typescript Generics to define events that component can emit.
1import Component, { ComponentEvent } from "@egjs/component"; 2 3interface Events { 4 event1: { 5 prop1: number; 6 prop2: string; 7 }; 8 // You can also define like this if there're more than one arguments for a event 9 event2: (arg0: number, arg1: string, arg2: boolean) => void; 10 // If there're no event props 11 event3: void; 12 // If you want additional properties like `currentTarget`, `eventType`, `stop` 13 // You can use ComponentEvent with additional properties 14 event4: ComponentEvent<{ a: number; b: string }>; 15} 16 17class SomeClass extends Component<Events> { 18 thing() { 19 this.on("event4", e => { 20 // These properties will be available for typescript-enabled environment 21 e.a; // number 22 e.b; // string 23 e.currentTarget; // SomeClass(this) 24 e.eventType; // string("event4") 25 e.stop(); // () => void 26 e.isCanceled(); // Will return true when "stop()" is called. 27 }); 28 } 29} 30 31// You can trigger events like this 32const component = new SomeClass(); 33component.trigger("event1", { 34 prop1: 1, 35 prop2: "abc" 36}); 37component.trigger(new ComponentEvent("event4", { a: 123, b: "abcd" }));
If you find a bug, please report it to us using the Issues page on GitHub.
@egjs/component is released under the MIT license.
Copyright (c) 2015 NAVER Corp.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 7/20 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
80 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More