Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
2d99363
add cancel dialog listener and export service, directive
workfel Nov 20, 2019
c320d6e
send error message when dialog is canceled and rename feedback service
workfel Dec 23, 2019
0aa2685
solve bug 'The operation is insecure' for external images https://git…
workfel Jan 28, 2020
5f0974b
add image for CORS
workfel Jan 28, 2020
c5568a6
Update README and package to use new NPM repository
workfel Jan 28, 2020
5f2915b
-u
workfel Jan 28, 2020
f3a9010
add angular LIB
workfel Jan 28, 2020
1192b84
add reamde on npm
workfel Jan 28, 2020
b29d30c
add missing peerDep package
workfel Jan 28, 2020
392c97c
add link to repo git on npm package
workfel Jan 28, 2020
5e252ee
fix bug multiple send event when multiple directive is on app
workfel Apr 14, 2020
41261a6
feat(modal): Can disabled send button if description field is empty
workfel Jul 10, 2020
baf3057
update readme
workfel Jul 10, 2020
daec133
fix(build): Add missing dependencies html2canvas
workfel Jul 23, 2020
d3fc781
feat(description): Can directly set description field
workfel Aug 21, 2020
45e1d5a
remove angular/material as dependencies
workfel Aug 25, 2020
85eb4b9
fix: add delay before taking init screenshot
workfel Sep 10, 2020
17d7aa7
fix(dep): fix peer-dependency angular < 9
spike008t Dec 9, 2020
6e85fa2
chore: upgrade angular core 7
spike008t Dec 10, 2020
7400f0c
chore: update codelyzer
spike008t Dec 10, 2020
aacd802
chore: update material 7
spike008t Dec 10, 2020
a11f397
chore: update angular 8
spike008t Dec 10, 2020
602ef7a
chore: browserslist
spike008t Dec 10, 2020
c98d621
chore: upgrade angular 8
spike008t Dec 10, 2020
edfd689
chore: update package-lock.json
spike008t Dec 14, 2020
0f32205
fix(browser): remove not for IE
spike008t Dec 14, 2020
c5fc72c
fix(build)): set target es5 and module es2015
spike008t Dec 14, 2020
10501c3
chore: add support IE11
spike008t Dec 21, 2020
7771370
chore(readme): updated
spike008t Dec 21, 2020
1bcb4bc
Merge pull request #1 from spike008t/fix/angular-9-compat
spike008t Dec 21, 2020
e5b2c75
chore: setup nvmrc
spike008t Dec 21, 2020
f65713a
Merge pull request #4 from spike008t/fix/nvmrc
spike008t Dec 21, 2020
193cb83
chore: add @digikare namespace on package
spike008t Dec 21, 2020
21658b8
Merge pull request #5 from spike008t/fix/digikare-namespace-package
spike008t Dec 21, 2020
849ca2b
chore: update package.json
spike008t Mar 31, 2021
e43bdca
fix(build): update target es2015 to fix issue with string size limit
spike008t Mar 31, 2021
b75cdbf
chore: on feedback, open window with the image
spike008t Mar 31, 2021
c0f9500
chore(release): bump v2.0.1
spike008t Mar 31, 2021
ce0ed6c
Merge pull request #6 from spike008t/fix/buffer-size-image
spike008t Mar 31, 2021
17fcf2e
chore(upgrade): ng v9
dgk-zartha Feb 22, 2022
6c7797e
chore(upgrade): ng v9
dgk-zartha Feb 22, 2022
12b0b89
chore(upgrade): ng material v9
dgk-zartha Feb 22, 2022
b098628
chore(upgrade): bump tslib to 2.3.1
dgk-zartha Feb 22, 2022
1e9830e
chore(upgrade): ng v10
dgk-zartha Feb 22, 2022
92c5fdc
chore(upgrade): add browserlist
dgk-zartha Feb 22, 2022
fa94397
chore(upgrade): material v10
dgk-zartha Feb 22, 2022
385874d
chore(upgrade): remove build-ng-packagr
dgk-zartha Feb 22, 2022
33a290f
chore(upgrade): ng v11
dgk-zartha Feb 22, 2022
363947a
chore(upgrade): ng v12
dgk-zartha Feb 22, 2022
61b154a
chore(upgrade): material v12
dgk-zartha Feb 22, 2022
faad76e
chore(upgrade): ng v13
dgk-zartha Feb 22, 2022
0f50683
chore(upgrade): build lib
dgk-zartha Feb 22, 2022
0cad92a
build(bump): v2.2.0
dgk-zartha Feb 22, 2022
cb19c8c
build(bump): v2.2.0
dgk-zartha Feb 22, 2022
71b6683
Merge pull request #7 from digikare/upgrade-to-v13
workfel Feb 28, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .browserslistrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
# For additional information regarding the format and rule options, please see:
# https://github.com/browserslist/browserslist#queries

# You can see what browsers were selected by your queries by running:
# npx browserslist

> 0.5%
last 2 versions
Firefox ESR
not dead
#not IE 9-11 # For IE 9-11 support, remove 'not'.
not IE 9-10
# keep support IE 11
IE 11
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/erbium
63 changes: 43 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,27 @@
# feedback
# ngx-md-feedback
> An angular directive for sending feedback featuring [Angular 6](https://angular.io), [Html2canvas](https://html2canvas.hertzen.com/), [Angular Material](https://material.angular.io), [Rxjs](https://rxjs-dev.firebaseapp.com/), inspired by Google send feedback, based on [angular-cli](https://github.com/angular/angular-cli).

> **FORKED FORM https://github.com/RickonChen/feedback** because the owner don't maintain this repo.
## Demo
![Alt text](/../screenshots/feedback.gif?raw=true "overview")

### Prerequisites
make sure your project:
* is an angular(version >= 6.0.0) project
* is an angular(version >= 13) project
* has set up [angular material](https://github.com/angular/material2/blob/master/guides/getting-started.md)

For angular >= 13 see branch stable/1.0

#### How to use it in your project
> download it from npm

```bash
npm install ng-feedback --save
npm install @digikare/ngx-md-feedback --save
```

use the feedback module in your project, at any module, you just need to imports into your module:
```es6
import { FeedbackModule } from 'ng-feedback'
import { FeedbackModule } from '@digikare/ngx-md-feedback'
```

easy to use the directive, just add it in a html tag, such as:
Expand All @@ -28,19 +31,21 @@ easy to use the directive, just add it in a html tag, such as:

#### Properties

| Name | Default Value |
|------------------|-----------------------------------------------------------------------|
| `title` | Send feedback |
| `placeholder` | Describe your issue or share your ideas |
| `editTip` | Click to highlight or hide info |
| `checkboxLabel` | Include screenshot |
| `cancelLabel` | CANCEL |
| `sendLabel` | SEND |
| `moveToolbarTip` | move toolbar |
| `drawRectTip` | Draw using yellow to highlight issues or black to hide sensitive info |
| `highlightTip` | highlight issues |
| `hideTip` | hide sensitive info |
| `editDoneLabel` | DONE |
| Name | Default Value | Description
|------------------|-----------------------------------------------------------------------|-----------------------------------------------------------------------|
| `title` | Send feedback | |
| `placeholder` | Describe your issue or share your ideas | |
| `editTip` | Click to highlight or hide info | |
| `checkboxLabel` | Include screenshot | |
| `cancelLabel` | CANCEL | |
| `sendLabel` | SEND | |
| `moveToolbarTip` | move toolbar | |
| `drawRectTip` | Draw using yellow to highlight issues or black to hide sensitive info | |
| `highlightTip` | highlight issues | |
| `hideTip` | hide sensitive info | |
| `editDoneLabel` | DONE | |
| `allowTaint` | FALSE | Whether to allow cross-origin images to taint the canvas |
| `descriptionRequired` | FALSE | Field description is required for enabling 'send' button |

### method

Expand All @@ -51,8 +56,8 @@ send(feedback)
it is an output of the directive, the usage is:

```
<button
feedback
<button
feedback
(send)="onSend($event)">feedback
</button>
```
Expand All @@ -61,8 +66,26 @@ The param feedback is an object contains two properties: description and screens
* description is string to describe issues or ideas
* screenshot comes from HTMLCanvasElement.toDataURL('image/png'), can be used as src of an img tag.

### Responses

Send feedback
```
{
"description" : "your content described",
"screenshot" : "data:image/png;base64,theBase64Content",
}
```

Cancel feedback
```
{
"error" : "dialog_canceled"
}
```


### Getting started with this repo
**Make sure you have Node version >= 8.0 and NPM >= 5**
**Make sure you have Node version >= 12.0 and NPM >= 6**
> Clone/Download the repo then edit feedback library inside [`/src/app/feedback`](/src/app/feedback)

```bash
Expand Down
40 changes: 39 additions & 1 deletion angular.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
},
"version": 1,
"newProjectRoot": "projects",
"projects": {
Expand All @@ -11,6 +14,7 @@
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
Expand All @@ -27,6 +31,12 @@
},
"configurations": {
"production": {
"budgets": [
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
Expand Down Expand Up @@ -113,13 +123,41 @@
}
}
}
},
"ngx-md-feedback": {
"root": "projects/ngx-md-feedback",
"sourceRoot": "projects/ngx-md-feedback/src",
"projectType": "library",
"prefix": "feedback",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/ngx-md-feedback/tsconfig.lib.json",
"project": "projects/ngx-md-feedback/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ngx-md-feedback/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ngx-md-feedback/src/test.ts",
"tsConfig": "projects/ngx-md-feedback/tsconfig.spec.json",
"karmaConfig": "projects/ngx-md-feedback/karma.conf.js"
}
}
}
}
},
"defaultProject": "feedback",
"schematics": {
"@schematics/angular:component": {
"prefix": "app",
"styleext": "css"
"style": "css"
},
"@schematics/angular:directive": {
"prefix": "app"
Expand Down
Loading