-
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(services): decouple the EventPubSubService to separate package
- in order to use this EventPubSubService in other framework (like Angular-Slickgrid) without rewriting the same code, we can simply extract this into a brand new package and reuse it in the other framework
- Loading branch information
1 parent
41855eb
commit 9f51665
Showing
24 changed files
with
614 additions
and
442 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) | ||
[![TypeScript](https://img.shields.io/badge/%3C%2F%3E-TypeScript-%230074c1.svg)](http://www.typescriptlang.org/) | ||
[![lerna](https://img.shields.io/badge/maintained%20with-lerna-cc00ff.svg)](https://lerna.js.org/) | ||
[![npm](https://img.shields.io/npm/v/@slickgrid-universal/event-pub-sub.svg?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/event-pub-sub) | ||
[![npm](https://img.shields.io/npm/dy/@slickgrid-universal/event-pub-sub?color=forest)](https://www.npmjs.com/package/@slickgrid-universal/event-pub-sub) | ||
|
||
[![Actions Status](https://github.com/ghiscoding/slickgrid-universal/workflows/CI%20Build/badge.svg)](https://github.com/ghiscoding/slickgrid-universal/actions) | ||
[![Cypress.io](https://img.shields.io/badge/tested%20with-Cypress-04C38E.svg)](https://www.cypress.io/) | ||
[![jest](https://jestjs.io/img/jest-badge.svg)](https://github.com/facebook/jest) | ||
[![codecov](https://codecov.io/gh/ghiscoding/slickgrid-universal/branch/master/graph/badge.svg)](https://codecov.io/gh/ghiscoding/slickgrid-universal) | ||
|
||
## Event PubSub Service | ||
#### @slickgrid-universal/event-pub-sub | ||
|
||
A very simple Vanilla Implementation of an Event PubSub Service to do simple publish/subscribe inter-communication while optionally providing data as well. | ||
|
||
### External Dependencies | ||
- [DOM Purify](https://github.com/cure53/DOMPurify) to sanitize HTML text | ||
|
||
### Installation | ||
Follow the instruction provided in the main [README](https://github.com/ghiscoding/slickgrid-universal#installation) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"name": "@slickgrid-universal/event-pub-sub", | ||
"version": "0.14.1", | ||
"description": "Simple Vanilla Implementation of an Event PubSub Service to do simply publish/subscribe inter-communication while optionally providing data in the event", | ||
"main": "dist/commonjs/index.js", | ||
"browser": "src/index.ts", | ||
"module": "dist/esm/index.js", | ||
"types": "dist/commonjs/index.d.ts", | ||
"typings": "dist/commonjs/index.d.ts", | ||
"publishConfig": { | ||
"access": "public" | ||
}, | ||
"directories": { | ||
"src": "src" | ||
}, | ||
"scripts": { | ||
"build": "cross-env tsc --build", | ||
"postbuild": "npm-run-all bundle:commonjs", | ||
"build:watch": "cross-env tsc --incremental --watch", | ||
"dev": "run-s build", | ||
"dev:watch": "run-p build:watch", | ||
"bundle": "run-p bundle:commonjs bundle:esm", | ||
"bundle:commonjs": "tsc --project tsconfig.bundle.json --outDir dist/commonjs --module commonjs", | ||
"bundle:esm": "cross-env tsc --project tsconfig.bundle.json --outDir dist/esm --module esnext --target es2018", | ||
"prebundle": "npm-run-all delete:dist", | ||
"delete:dist": "cross-env rimraf --maxBusyTries=10 dist", | ||
"package:add-browser-prop": "cross-env node ../change-package-browser.js --add-browser=true --folder-name=event-pub-sub", | ||
"package:remove-browser-prop": "cross-env node ../change-package-browser.js --remove-browser=true --folder-name=event-pub-sub" | ||
}, | ||
"author": "Ghislain B.", | ||
"license": "MIT", | ||
"engines": { | ||
"node": ">=14.15.0", | ||
"npm": ">=6.14.8" | ||
}, | ||
"browserslist": [ | ||
"last 2 version", | ||
"> 1%", | ||
"not dead" | ||
], | ||
"dependencies": { | ||
"@slickgrid-universal/common": "^0.14.1" | ||
}, | ||
"devDependencies": { | ||
"cross-env": "^7.0.3", | ||
"npm-run-all": "^4.1.5", | ||
"rimraf": "^3.0.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
index.ts | ||
**/*.* |
2 changes: 1 addition & 1 deletion
2
...ces/__tests__/eventPubSub.service.spec.ts → ...t-pub-sub/src/eventPubSub.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import * as entry from './index'; | ||
|
||
describe('Testing library entry point', () => { | ||
it('should have an index entry point defined', () => { | ||
expect(entry).toBeTruthy(); | ||
}); | ||
|
||
it('should have all exported object defined', () => { | ||
expect(typeof entry.EventPubSubService).toBe('function'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from './eventPubSub.service'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"extends": "../tsconfig.bundle.json", | ||
"compilerOptions": { | ||
"typeRoots": [ | ||
"../typings", | ||
"../../node_modules/@types" | ||
], | ||
"outDir": "dist/commonjs" | ||
}, | ||
"include": [ | ||
"../typings", | ||
"**/*" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
{ | ||
"extends": "../tsconfig.base.json", | ||
"compileOnSave": false, | ||
"compilerOptions": { | ||
"rootDir": "src", | ||
"declarationDir": "dist/esm", | ||
"outDir": "dist/esm", | ||
"typeRoots": [ | ||
"typings" | ||
] | ||
}, | ||
"exclude": [ | ||
"dist", | ||
"node_modules", | ||
"**/*.spec.ts" | ||
], | ||
"filesGlob": [ | ||
"./src/**/*.ts" | ||
], | ||
"include": [ | ||
"src/**/*.ts", | ||
"typings/**/*.ts" | ||
] | ||
} |
3 changes: 2 additions & 1 deletion
3
packages/pagination-component/src/__tests__/slick-pagination-without-i18n.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/pagination-component/src/__tests__/slick-pagination.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
-1.06 KB
(100%)
packages/vanilla-bundle/dist-grid-bundle-zip/slickgrid-vanilla-bundle.zip
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/vanilla-bundle/src/services/__tests__/resizer.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/vanilla-bundle/src/services/__tests__/textExport.service.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
export * from './eventPubSub.service'; | ||
export * from './resizer.service'; | ||
export * from './textExport.service'; | ||
export * from './universalContainer.service'; |
Oops, something went wrong.