Граф коммитов

145 Коммитов

Автор SHA1 Сообщение Дата
dependabot[bot] 0ad915779d
Bump qs from 6.5.2 to 6.5.3
Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-09 01:01:53 +00:00
adsathye fcb0d92f5e
Update publish-workflow.yaml
Removed beta tag
2022-09-12 14:36:39 -07:00
adsathye f5b9df18f3
Update publish-workflow.yaml
Added beta publish tag. Will be reverted back.
2022-09-12 14:21:07 -07:00
adsathye 4f3994f399
Delete main.yml 2022-09-12 14:19:31 -07:00
adsathye cf9ff6b905
Update main.yml 2022-09-12 13:59:33 -07:00
adsathye 2881de0272
Create main.yml 2022-09-12 13:56:11 -07:00
adsathye 344c8c589e
Update publish-workflow.yaml
Referenced new secret generated from npm
2022-09-07 15:45:58 -07:00
udayaga f38eff3a2f
Merge pull request #48 from udayaga/rejectVersion
Update new version to publish reject changes
2022-02-14 12:15:01 -08:00
udgathad f426fb5a78 update package description 2022-02-14 12:11:43 -08:00
udgathad d8585e3df8 Update new version to publish reject changes 2022-02-14 11:48:28 -08:00
Maxim Laikine 40b4d3b251
Merge pull request #46 from udayaga/rejectAll
add reject all button to main banner
2022-02-14 11:19:30 -08:00
Maxim Laikine 91143a6eff Merge branch 'master' into rejectAll 2022-02-14 11:08:04 -08:00
Maxim Laikine 897b71e14f Added node.js 12.x setup step 2022-02-14 10:39:48 -08:00
udgathad bd8aa61af5 update package-lock 2022-02-13 15:01:37 -08:00
udgathad 39850fbd1e add reject all button to main banner 2022-02-13 14:46:57 -08:00
BillChou0114 f966cc73e6
Fix information icon size and position (#29)
* Some websites will set max-width in svg. Remove the restriction
* Fix infomation icon position

Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-10-14 10:41:38 -07:00
BillChou0114 362adef669
Fix gap at top of the banner for mobile view (#28)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-10-06 11:40:58 -07:00
BillChou0114 e5e7b25940
Add nonce attribute to style tags and setNonceAttribute(...) method (#27)
* Fix esc key in IE

Instead of `event.key == 'Escape'` in Chrome or Firefox, IE used
`event.key == 'Esc'`.

* `showBanner(...)` only create banner.

In previous version, `showBanner(...)` will create banner and hidden
dialog. In the new version, `showBanner(...) will only create banner.

When user clicks `More info` button, it will call `showPreference(...)`
to create a dialog.

When `onPreferencesDialogShowing()` is called, it will check the dialog
is in the DOM or not. Since the only method to remove the dialog is
`hidePreferencesDialog()`, and it will set
`this.previousFocusElementBeforePopup = null;`, we use
`this.previousFocusElementBeforePopup` to determine the dialog is
in the DOM or not. If there is a dialog, we will not add event listener.

* Add new test cases and update old ones

* Add nonce to style tags and `setNonceAttribute(...)` method

1. Add nonce to all style tags
2. Add `setNonceAttribute(...)` method to set nonce attribute
3. Use `textContent` to replace `innerHTML` to change theme

* Set style nonce in constructor

1. Add stylesNonce in IOptions
2. Add webpack-dev-server configuration for Content Security Policy
3. Set style nonce in constructor

* Update `.d.ts` file and document

1. Add `stylesNonce` in interface `IOptions` and related methods
2. Update `showPreferences(...)`

* Update webpack.production.config.js and bump npm version

* Add explanation in stylesNonce

* Simplify webpack.config.js

Use webpack-merge to simplify webpack configuration file.
webpack.common.js is the common part in developmment and production. Use
webpack.dev.js and webpack.prod.js to insert the development and
production specific configuration.

* Update `nonce` attribute in style tag

Since loaders are stateless, we need to reload it if we want to change
it. Instead, we get the styles contents and remove the blocked style
element with style element id. With the styles contents and passed
`nonce`, we can create the new style element that will not be blocked.

If we removed `style-loader` and loaded style element by ourselves, the
actual styles contents will be `styles[0][1]`.

Reference:
https://webpack.js.org/contribute/writing-a-loader/
https://webpack.js.org/guides/hot-module-replacement/

* Use `style-loader` to `inject` styles and `nonce` to `<style>`

* Only add `nonce` to `<style>` if it is not empty

1. Only add `nonce` to `<style>` when options.stylesNonce is not empty
2. Remove private methods in `.d.ts` file

* Update Jest config and test cases

The new file applied in configuration is based on `identity-obj-proxy`.
styles.locals.bannerBody -> bannerBody

Check:
https://github.com/keyz/identity-obj-proxy/blob/master/src/index.js

* Update test cases

Co-authored-by: Bill Chou (Zen3 Infosolutions America Inc) <v-tincho@microsoft.com>
2020-10-05 14:15:09 -07:00
BillChou0114 e2d98f8545
Fix inactive save changes button (#26)
* Fix inactive 'Save changes' button

If we made some changes and close the dialog and open the dialog again,
'Save changes' button should be enabled.

Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-23 14:41:20 -07:00
BillChou0114 a195e9764a
Remove shadow for disabled buttons in preferences dialog (#25)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-22 15:20:18 -07:00
BillChou0114 b9e4eedfc2
Fix mobile and large room in layout (#24)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-22 15:11:55 -07:00
BillChou0114 519ab6dbba
Add z-index to let X button stand out (#23)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-18 15:59:46 -07:00
BillChou0114 0538062601
Set css `position` in label class to prevent using site css styles (#22)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-18 11:18:38 -07:00
BillChou0114 49da85384a
Focus to previously focused element after dialog is closed (#21)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-14 16:07:00 -07:00
BillChou0114 0c0f86edd3
Fix the side of radio buttons in rtl (#20)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-11 15:08:46 -07:00
BillChou0114 b9cbc45667
Fix background for the info icon
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-10 11:27:37 -07:00
BillChou0114 8f2722cfb3
Fix banner buttons alignment with long text
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-10 10:45:26 -07:00
BillChou0114 a012abaff3
Show focus frame for radio buttons
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-09 14:48:53 -07:00
BillChou0114 b6828d08cc
Make all space in radio button clickable (#16)
Co-authored-by: Bill Chou (Zen3 Infosolutions America Inc) <v-tincho@microsoft.com>
2020-09-04 10:47:54 -07:00
BillChou0114 6874d3588a
Hide Preferences Dialog on ESC button (#15)
Co-authored-by: Bill Chou <v-tincho@microsoft.com>
2020-09-03 16:42:52 -07:00
BillChou0114 e3f0e2a896
Update layout to be more a11y friendly 2020-09-03 15:34:48 -07:00
BillChou0114 9f839fb6cd
Keep focus on tab within the popup dialog 2020-08-31 14:39:38 -07:00
s-sergio-v 67279944ad
Make accessible for large zoom in 2020-08-27 12:27:38 -07:00
Max Shmelev 07c9359d7a
Merge pull request #11 from BillChou0114/users/v-tincho/Update-NPM-version
Update declaration file and documents
2020-08-26 14:28:46 -07:00
Bill Chou (Zen3 Infosolutions America Inc) 0444bfb5cb Add more spaces between lines and beautify 2020-08-26 13:12:23 -07:00
Bill Chou (Zen3 Infosolutions America Inc) 3711981b2c Update documents 2020-08-26 12:57:41 -07:00
Max Shmelev 476184bd54
Merge pull request #10 from s-sergio-v/users/v-sergis/Accessibility-for-bannerInform
Change of display properties to avoid the accessibility reader from reading "table" word.
2020-08-26 10:06:10 -07:00
Bill Chou (Zen3 Infosolutions America Inc) eb15c5a483 Update `.d.ts` file to include new methods and types
1. Update `consent-banner.d.ts` to include `Theme` related methods
1.1 Update constructor
1.2 Add `applyTheme()` and `createTheme()`
1.3 Add related data types

2. Increase npm version
2020-08-25 15:50:13 -07:00
Sergio Santana Rodriguez 568a50a971 Accessibility for bannerInform 2020-08-25 15:28:37 -07:00
Max Shmelev ac3f2ed41c
Merge pull request #9 from BillChou0114/Fix-focus-order-is-not-in-logical-order-after-closing-the-diloag
After closing the dialog, `more info` button will be focused.
2020-08-25 08:46:59 -07:00
Bill Chou (Zen3 Infosolutions America Inc) d69378ba70 Add test cases for closing the dialog 2020-08-24 16:41:00 -07:00
Bill Chou (Zen3 Infosolutions America Inc) 37beb9cf39 After closing the dialog, `more info` button will be focused. 2020-08-24 14:52:30 -07:00
Max Shmelev 4a6ff8fa54
Merge pull request #8 from BillChou0114/users/v-tincho/Implement-applyTheme
Implement applyTheme()
2020-08-24 11:54:38 -07:00
Bill Chou (Zen3 Infosolutions America Inc) e789424a50 Rename every set styles to build styles 2020-08-24 11:43:23 -07:00
Bill Chou (Zen3 Infosolutions America Inc) c3a62b091b Replace the old styles with the newly created one, which is created by concatenating each styles strings. 2020-08-24 10:54:04 -07:00
Bill Chou (Zen3 Infosolutions America Inc) 7e3efe87ca Add test initialTheme case and update createThemeStyle test case 2020-08-21 15:16:23 -07:00
Bill Chou (Zen3 Infosolutions America Inc) 3f19786e0f Create only one `style` element and modify its innerHTML when
applyTheme() is called
2020-08-21 15:12:47 -07:00
Bill Chou (Zen3 Infosolutions America Inc) f41dff1691 Split theme related css class to a new file 2020-08-19 18:18:55 -07:00
Bill Chou (Zen3 Infosolutions America Inc) 8c43667ee1 Add create theme related test cases 2020-08-19 15:58:33 -07:00
Bill Chou (Zen3 Infosolutions America Inc) 7caef81912 Use 'toThrowError()' to replace 'toThrow()' 2020-08-19 15:56:19 -07:00