Skip to content

Commit

Permalink
Merge pull request #133 from JsDaddy/feat/132
Browse files Browse the repository at this point in the history
Feat/132
  • Loading branch information
NepipenkoIgor authored Oct 25, 2024
2 parents bb073ad + fd5095f commit 9dc532d
Show file tree
Hide file tree
Showing 41 changed files with 481 additions and 465 deletions.
26 changes: 13 additions & 13 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,24 @@

Please check if your PR fulfills the following requirements:

- [ ] The commit message follows our guidelines: https://github.com/JsDaddy/ngx-copypaste/blob/develop/CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)
- [ ] The commit message follows our guidelines: https://github.com/JsDaddy/ngx-copypaste/blob/develop/CONTRIBUTING.md#commit
- [ ] Tests for the changes have been added (for bug fixes / features)
- [ ] Docs have been added / updated (for bug fixes / features)

## PR Type

What kind of change does this PR introduce?

<!-- Please check the one that applies to this PR using "x". -->

- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
- [ ] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:

## What is the current behavior?

Expand All @@ -31,8 +31,8 @@ Issue Number: N/A

## Does this PR introduce a breaking change?

- [ ] Yes
- [ ] No
- [ ] Yes
- [ ] No

<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. -->

Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
node-version: 20

- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest

Expand All @@ -44,7 +44,7 @@ jobs:
bash .github/workflows/scripts/replace_template.sh $RELEASE_VERSION
bun run build
- name: Deploy demo
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist/ngx-copypaste/browser
Expand All @@ -58,7 +58,7 @@ jobs:
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.26.0
uses: slackapi/slack-github-action@v1.27.0
with:
channel-id: 'deployments'
payload: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish npm
name: Publish bun

on:
push:
Expand All @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: true
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
Expand All @@ -35,7 +35,7 @@ jobs:
steps:
- name: Post to a Slack channel
id: slack
uses: slackapi/slack-github-action@v1.26.0
uses: slackapi/slack-github-action@v1.27.0
with:
channel-id: 'deployments'
payload: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/quality-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
with:
submodules: true
ref: ${{ env.REF }}
- uses: oven-sh/setup-bun@v1
- uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- uses: actions/setup-node@v4
Expand Down
4 changes: 2 additions & 2 deletions .lintstagedrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"*.{ts,js,json}": [
"eslint --report-unused-disable-directives --max-warnings 0 --fix",
"prettier --write"
"prettier . --write"
],
"*.scss": "stylelint --fix"
}
}
8 changes: 4 additions & 4 deletions .releaserc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
branches:
- develop
- develop

plugins:
- '@semantic-release/commit-analyzer'
- '@semantic-release/github'
- 'semantic-release-export-data'
- '@semantic-release/commit-analyzer'
- '@semantic-release/github'
- 'semantic-release-export-data'
1 change: 1 addition & 0 deletions .stylelintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
/tmp
/out-tsc
/bazel-out
/src/styles.scss

# Node
/node_modules
Expand Down
3 changes: 3 additions & 0 deletions .stylelintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
"customSyntax": "postcss-scss",
"plugins": ["stylelint-prettier"],
"rules": {
"no-empty-source": null,
"scss/comment-no-empty": null,
"no-descending-specificity": null,
"prettier/prettier": true,
"selector-type-no-unknown": [
true,
Expand Down
23 changes: 16 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,47 @@
# 18.0.4(2024-10-25)

### Feature

- add tailwind
- change interface to type, remove prefix "I"
- update dependencies
- add ESLint strict rules

# 17.3.2(2024-03-29)

### Feature

- change decorators to signals
- change decorators to signals

<a name="16.0.0"></a>

# 17.0.0(2023-11-28)

### Feature

- update ng 17.x
- update ng 17.x

<a name="16.0.0"></a>

# 16.0.1(2023-07-07)

### Feature

- add success cb
- update dependencies
- add success cb
- update dependencies

# 16.0.0(2023-07-07)

### Feature

- update ng 16.x
- update ng 16.x

<a name="16.0.0"></a>


# 15.0.0(2022-25-12)

### Feature
- ng 15

- ng 15

<a name="15.0.0"></a>
14 changes: 7 additions & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Please format code and markup in your issue using [github markdown](https://help

## Contributing to Source Code (Pull Requests)

- If your PR changes any behavior or fixes an issue, it should have an associated test.
- New features should be general and as simple as possible.
- Breaking changes should be avoided if possible.
- All pull requests require review. No PR will be merged without a comment from a team member stating LGTM (Looks good to me).
- If your PR changes any behavior or fixes an issue, it should have an associated test.
- New features should be general and as simple as possible.
- Breaking changes should be avoided if possible.
- All pull requests require review. No PR will be merged without a comment from a team member stating LGTM (Looks good to me).

## Protractor specific rules

- JavaScript style should generally follow the [Google JS style guide](https://google.github.io/styleguide/javascriptguide.xml).
- Document public methods with jsdoc.
- Be consistent with the code around you!
- JavaScript style should generally follow the [Google JS style guide](https://google.github.io/styleguide/javascriptguide.xml).
- Document public methods with jsdoc.
- Be consistent with the code around you!

## Commit Messages

Expand Down
33 changes: 18 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@

You can also try our NGX MASK [check](https://www.npmjs.com/package/ngx-mask) it.
You can also try our NGX LOADER INDICATOR [check](https://www.npmjs.com/package/ngx-loader-indicator) it.
### You can try live [demo](https://jsdaddy.github.io/ngx-copypaste/) with examples.

### You can try live [demo](https://jsdaddy.github.io/ngx-copypaste/) with examples.

## Installing

```bash
$ npm install --save ngx-copypaste
$ npm install --save ngx-copypaste
```

## Quickstart if ngx-copypaste version >= 15.0.0
Expand Down Expand Up @@ -67,12 +69,13 @@ import {NgxCopyPasteModule} from 'ngx-copypaste'
(...)
})
```

#### Usage

From input

```html
<input type='text' ngxCopyPaste #cp="copy"/>
<input type="text" ngxCopyPaste #cp="copy" />

<button (click)="cp.copy()">Copy</button>
```
Expand All @@ -89,33 +92,33 @@ From complex div

```html
<div ngxCopyPaste #cp="copy">
<h1>Lorem ipsum</h1>
<p>Lorem ipsum dolor sit amet, consectetur
adipiscing elit.
Nullam rutrum augue at ante sollicitudin posuere.
Pellentesque congue consequat enim quis luctus.</p>
<div>
<h2>Lorem ipsum</h2>
</div>
<h1>Lorem ipsum</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nullam rutrum augue at ante
sollicitudin posuere. Pellentesque congue consequat enim quis luctus.
</p>
<div>
<h2>Lorem ipsum</h2>
</div>
</div>

<button (click)="cp.copy()">Copy</button>
```

Also you can bind it to any tag

```html
<p ngxCopyPaste #cp="copy">Lorem ipsum</p>

<p (click)="cp.copy()">Copy</p>
```

Output success cb

```html
<p ngxCopyPaste #cp="copy" (successCb)="copy()">Lorem ipsum</p>

<p (click)="cp.copy()">Copy</p>

public copy(): void {
your code
}
```
public copy(): void { your code }
```
5 changes: 1 addition & 4 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,7 @@
"src/robots.txt",
"src/sitemap.xml"
],
"polyfills": [
"zone.js",
"zone.js/testing"
],
"polyfills": ["zone.js", "zone.js/testing"],
"styles": ["src/styles.scss"],
"scripts": []
}
Expand Down
Binary file modified bun.lockb
Binary file not shown.
1 change: 0 additions & 1 deletion cypress/support/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ import { mount } from 'cypress/angular';
declare global {
// eslint-disable-next-line @typescript-eslint/no-namespace
namespace Cypress {

interface Chainable {
mount: typeof mount;
}
Expand Down
Loading

0 comments on commit 9dc532d

Please sign in to comment.