Skip to content

Commit

Permalink
feat(core): add Translation into demo with fetch locale from json file (
Browse files Browse the repository at this point in the history
#23)

* feat(core): add Translation into demo with fetch locale from json file

* refactor(core): add new method "addPubSubMessaging" for internal pub/sub
- with this new method, the slick-vanilla bundle will use the new method to add it's own internal pub/sub service to it and whenever the language changes will then triggered necessary subscription(s)
  • Loading branch information
ghiscoding authored Jul 22, 2020
1 parent 1132f2e commit b5608e9
Show file tree
Hide file tree
Showing 73 changed files with 837 additions and 287 deletions.
76 changes: 76 additions & 0 deletions .github/CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# Slickgrid-Universal Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity and expression,
level of experience, education, socio-economic status, nationality, personal
appearance, race, religion, or sexual identity and orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies within all project spaces, and it also applies when
an individual is representing the project or its community in public spaces.
Examples of representing a project or community include using an official
project e-mail address, posting via an official social media account, or acting
as an appointed representative at an online or offline event. Representation of
a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [INSERT EMAIL ADDRESS]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

[homepage]: https://www.contributor-covenant.org

For answers to common questions about this code of conduct, see
https://www.contributor-covenant.org/faq
12 changes: 12 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Contributing

We'd love for you to contribute and to make this project even better than it is today! If this interests you, please begin by reading the project [Wiki documentation](https://github.com/ghiscoding/slickgrid-universal/wiki). Once you consulted them and you believe that you can help us with new features, improvement or even fixes then go ahead and submit a Pull Request.

When we mention `VSCode`, we mean `Visual Studio Code` editor which can be downloaded [here](https://code.visualstudio.com)

Before accepting any Pull Request, we need to make sure that you followed these steps:
1. Install `Yarn` globally since it is used in all `package.json` scripts and VSCode Tasks if you want to use them.
2. Have you tested all your changes with Jest?
3. Have you run the TypeScript Build?
- you can run the build with `yarn run build` from the root of the project
4. If you did step 2 and 3, then the final step would be the Pull Request... but wait! For readability purposes, we would like you to only submit the relevant pieces of code that you changed. We are basically asking you to do a Build and make sure there's no errors (Yes please) but to not include the produced `dist` folder. We just want to see the real changes, nothing else (but we still want to make sure it Builds before creating a PR).
8 changes: 8 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: N4N679OT
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
custom: # Replace with a single custom sponsorship URL
46 changes: 46 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
name: Bug report
about: Create a report to help us improve the library
title: ''
labels: ''
assignees: ''

---

<!-- YOU MUST FILL IN THIS TEMPLATE OR ELSE IT WILL BE AUTO-CLOSE BY THE BOT -->

<!---
Thanks for filing a Feature Request! However, before you submit, please read the following:
1. Search open/closed issues before submitting a new one.
2. If your issue is more of question... did you read all Wikis? Or haved you considered asking on Stack Overflow?
3. Also note that we ask you to fill in ALL sections defined as REQUIRED else it will be automatically closed by our bot.
-->

## I'm submitting a Bug report

### Your Environment
<!--- Include as many relevant details as possible about the library versions -->
| Software | Version(s) |
| -------------------- | ---------- |
| Slickgrid-Universal | x.y |
| TypeScript | x.y |
| Package Name | x.y |

### Describe the Bug
<!-- REQUIRED - could you explain a bit what the Bug is -->

### Steps to Reproduce
<!-- REQUIRED - please provide steps to reproduce the bug -->

### Expected Behavior
<!-- REQUIRED - Tell us what should happen in normal use -->

### Current Behavior
<!-- REQUIRED - Tell us what happens instead of the expected behavior -->
<!--- If you are seeing an error, please include the full error message and stack trace -->

### Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug -->

### Code Sample
<!-- Please provide Stackblitz, Gist or Code Sample to reproduce the issue -->
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: Feature request
about: Suggest a new Feature or Enhancement
title: ''
labels: ''
assignees: ''

---

<!-- YOU MUST FILL IN THIS TEMPLATE OR ELSE IT WILL BE AUTO-CLOSE BY THE BOT -->

<!---
Thanks for filing a Feature Request! However, before you submit, please read the following:
1. Search open/closed issues before submitting a new one.
2. Also note that we ask you to fill in ALL sections defined as REQUIRED else it will be automatically closed by our bot.
-->

## I'm submitting a Feature request

### Motivation / Use Case
<!-- REQUIRED - What is the motivation to this feature/enhancement? What would be your use case? -->

### Expected Behavior
<!-- REQUIRED - Tell us what should happen -->

### Other Information
<!-- REQUIRED - Anything else that would be helpful to know about -->
39 changes: 39 additions & 0 deletions .github/ISSUE_TEMPLATE/general.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
---
name: General
about: Anything other topics
title: ''
labels: ''
assignees: ''

---

<!-- YOU MUST FILL IN THIS TEMPLATE OR ELSE IT WILL BE AUTO-CLOSE BY THE BOT -->

<!---
Thanks for filing a General issue! However, before you submit, please read the following:
1. Search open/closed issues before submitting a new one.
2. If your issue is more of question... did you read all Wikis? Or haved you considered asking on Stack Overflow?
3. Also note that we ask you to fill in ALL sections defined as REQUIRED else it will be automatically closed by our bot.
-->

## General Topic

### Your Environment
<!--- Include as many relevant details as possible about the environment you experienced the bug in -->
| Software | Version(s) |
| -------------------- | ---------- |
| Slickgrid-Universal | x.y |
| TypeScript | x.y |
| Package Name | x.y |

### Context or Topic
<!-- REQUIRED - Describe what you wish to discuss -->

### Expected Behavior
<!--- Tell us what should happen -->

### Current Behavior
<!--- Tell us what happens instead of the expected behavior -->

### Possible Solution
<!--- Not obligatory, but suggest a fix/reason for the bug/feature -->
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@
}
}
]
}
}
47 changes: 27 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,55 +40,61 @@ and it is also used to test with the UI portion. The Vanilla bundle is also used
### Available Public Packages

| Package Name | Description |
| --------| ----------- |
| [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common) | commonly used Formatters/Editors/Filters/Services/... |
| [@slickgrid-universal/excel-export](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/excel-export) | Export to Excel Service (xls/xlsx) |
| [@slickgrid-universal/file-export](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/file-export) | Export to Text File Service (csv/txt) |
| [@slickgrid-universal/graphql](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/graphql) | GraphQL Query Service (support Filter/Sort/Pagination) |
| [@slickgrid-universal/odata](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/odata) | OData Query Service (support Filter/Sort/Pagination) |
| --------| ----------- |
| [@slickgrid-universal/common](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/common) | commonly used Formatters/Editors/Filters/Services/... |
| [@slickgrid-universal/excel-export](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/excel-export) | Export to Excel Service (xls/xlsx) |
| [@slickgrid-universal/file-export](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/file-export) | Export to Text File Service (csv/txt) |
| [@slickgrid-universal/graphql](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/graphql) | GraphQL Query Service (support Filter/Sort/Pagination) |
| [@slickgrid-universal/odata](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/odata) | OData Query Service (support Filter/Sort/Pagination) |
| [@slickgrid-universal/vanilla-bundle](https://github.com/ghiscoding/slickgrid-universal/tree/master/packages/vanilla-bundle) | a vanilla TypeScript/JavaScript implementation |

### Available Demos

| Package Name | Description |
| --------| ----------- |
| [slickgrid-universal/webpack-demo-vanilla-bundle](https://github.com/ghiscoding/slickgrid-universal/tree/master/examples/webpack-demo-vanilla-bundle) | standalone package written in plain TypeScript for demo & UI testing. |
| Package Name | Description |
| --------| ----------- |
| [slickgrid-universal/webpack-demo-vanilla-bundle](https://github.com/ghiscoding/slickgrid-universal/tree/master/examples/webpack-demo-vanilla-bundle) | standalone package written in plain TypeScript for demo & UI testing. |


## Installation
To get going with this monorepo, you will need to clone the repo and then follow the steps below

1. Lerna Bootstrap
1. Install npm packages with Yarn
This lib uses Yarn workspaces and so you need to use Yarn to install packages
```bash
yarn install
```

2. Lerna Bootstrap

Run it **only once**, this will install all dependencies and add necessary monorepo symlinks
```bash
npm run bootstrap
yarn run bootstrap
```

2. Build
3. Build

To get started you must run (also once) an initial TS build so that all necessary `dist` are created for all the packages to work together.
```bash
npm run build
yarn run build
```

3. Run Dev (Vanilla Implementation)
4. Run Dev (Vanilla Implementation)

There is a Vanilla flavour implementation of this monorepo, vanilla means that it is not associated to any framework
and is written in plain TypeScript without being bound to any framework. The implementation is very similar to Angular and Aurelia.
It could be used as a guideline to implement it with other frameworks.

```bash
npm run dev:watch
yarn run dev:watch
```

### Tests
To run all packages Jest unit tests, you can run this command
```bash
npm run test
yarn run test

# or as a watch
npm run test:watch
yarn run test:watch
```

## TODOs
Expand All @@ -114,19 +120,19 @@ npm run test:watch
- [x] Grouping Formatters (12)
- [x] SortComparers (5)
- [x] Services (14)
- [ ] Others / Vanilla Implementation
- [x] Others / Vanilla Implementation
- [x] Custom Footer
- [x] Backend Services + Pagination
- [x] Local Pagination
- [x] Grid Presets
- [x] Preset Row Selections
- [x] Should work even after initializing the dataset later (SF)
- [x] Preset Filters not working with Tree Data View
- [x] Preset Filters not working with Tree Data View
- [x] Dynamically Add Columns
- [x] Tree Data
- [x] add missing `collectionAsync` for Editors, Filters (autoCompleteFilter, selectFilter)
- [x] Grid Service should use SlickGrid transactions `beginUpdate`, `endUpdate` for performance reason whenever possible
- [ ] Translations Support
- [x] Translations Support

#### Other Todos
- [x] VScode Chrome Debugger
Expand All @@ -149,4 +155,5 @@ npm run test:watch
- [x] Add interfaces to all SlickGrid core lib classes & plugins (basically add Types to everything)
- [x] Copy cell text (context menu) doesn't work in SF
- [x] Remove all Services init method 2nd argument (we can get DataView directly from the Grid object)
- [ ] Check why `DOM Purify` doesn't work in SF
- [ ] Search for any left "todo" in the entire solution
Loading

0 comments on commit b5608e9

Please sign in to comment.