homebridge-smartsystem 6.0.0 → 6.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +2 -2
- package/index.spec.ts +2 -1
- package/index.ts +3 -2
- package/package.json +1 -1
- package/server/base.js +3 -3
- package/server/base.ts +4 -4
- package/server/platform.js +18 -17
- package/server/platform.ts +20 -20
- package/server/smartapp.js +16 -17
- package/server/smartapp.ts +16 -16
- package/www/0-es2015.js 2.map +0 -1
- package/www/0-es2015.js 3.map +0 -1
- package/www/0-es5.js 2.map +0 -1
- package/www/0-es5.js 3.map +0 -1
- package/www/1-es2015.js 2.map +0 -1
- package/www/1-es2015.js 3.map +0 -1
- package/www/1-es5.js 2.map +0 -1
- package/www/1-es5.js 3.map +0 -1
- package/www/10-es2015.js 2.map +0 -1
- package/www/10-es2015.js 3.map +0 -1
- package/www/10-es5.js 2.map +0 -1
- package/www/10-es5.js 3.map +0 -1
- package/www/11-es2015.js 2.map +0 -1
- package/www/11-es2015.js 3.map +0 -1
- package/www/11-es5.js 2.map +0 -1
- package/www/11-es5.js 3.map +0 -1
- package/www/12-es2015.js 2.map +0 -1
- package/www/12-es2015.js 3.map +0 -1
- package/www/12-es5.js 2.map +0 -1
- package/www/12-es5.js 3.map +0 -1
- package/www/13-es2015.js 2.map +0 -1
- package/www/13-es2015.js 3.map +0 -1
- package/www/13-es5.js 2.map +0 -1
- package/www/13-es5.js 3.map +0 -1
- package/www/14-es2015.js 2.map +0 -1
- package/www/14-es2015.js 3.map +0 -1
- package/www/14-es5.js 2.map +0 -1
- package/www/14-es5.js 3.map +0 -1
- package/www/15-es2015.js 2.map +0 -1
- package/www/15-es2015.js 3.map +0 -1
- package/www/15-es5.js 2.map +0 -1
- package/www/15-es5.js 3.map +0 -1
- package/www/16-es2015.js 2.map +0 -1
- package/www/16-es2015.js 3.map +0 -1
- package/www/16-es5.js 2.map +0 -1
- package/www/16-es5.js 3.map +0 -1
- package/www/17-es2015.js 2.map +0 -1
- package/www/17-es2015.js 3.map +0 -1
- package/www/17-es5.js 2.map +0 -1
- package/www/17-es5.js 3.map +0 -1
- package/www/18-es2015.js 2.map +0 -1
- package/www/18-es2015.js 3.map +0 -1
- package/www/18-es5.js 2.map +0 -1
- package/www/18-es5.js 3.map +0 -1
- package/www/19-es2015.js 2.map +0 -1
- package/www/19-es2015.js 3.map +0 -1
- package/www/19-es5.js 2.map +0 -1
- package/www/19-es5.js 3.map +0 -1
- package/www/2-es2015.js 2.map +0 -1
- package/www/2-es2015.js 3.map +0 -1
- package/www/2-es5.js 2.map +0 -1
- package/www/2-es5.js 3.map +0 -1
- package/www/20-es2015.js 2.map +0 -1
- package/www/20-es2015.js 3.map +0 -1
- package/www/20-es5.js 2.map +0 -1
- package/www/20-es5.js 3.map +0 -1
- package/www/21-es2015.js 2.map +0 -1
- package/www/21-es2015.js 3.map +0 -1
- package/www/21-es5.js 2.map +0 -1
- package/www/21-es5.js 3.map +0 -1
- package/www/22-es2015.js 2.map +0 -1
- package/www/22-es2015.js 3.map +0 -1
- package/www/22-es5.js 2.map +0 -1
- package/www/22-es5.js 3.map +0 -1
- package/www/23-es2015.js 2.map +0 -1
- package/www/23-es2015.js 3.map +0 -1
- package/www/23-es5.js 2.map +0 -1
- package/www/23-es5.js 3.map +0 -1
- package/www/24-es2015.js 2.map +0 -1
- package/www/24-es2015.js 3.map +0 -1
- package/www/24-es5.js 2.map +0 -1
- package/www/24-es5.js 3.map +0 -1
- package/www/25-es2015.js 2.map +0 -1
- package/www/25-es2015.js 3.map +0 -1
- package/www/25-es5.js 2.map +0 -1
- package/www/25-es5.js 3.map +0 -1
- package/www/26-es2015.js 2.map +0 -1
- package/www/26-es2015.js 3.map +0 -1
- package/www/26-es5.js 2.map +0 -1
- package/www/26-es5.js 3.map +0 -1
- package/www/27-es2015.js 2.map +0 -1
- package/www/27-es2015.js 3.map +0 -1
- package/www/27-es5.js 2.map +0 -1
- package/www/27-es5.js 3.map +0 -1
- package/www/28-es2015.js 2.map +0 -1
- package/www/28-es2015.js 3.map +0 -1
- package/www/28-es5.js 2.map +0 -1
- package/www/28-es5.js 3.map +0 -1
- package/www/29-es2015.js 2.map +0 -1
- package/www/29-es2015.js 3.map +0 -1
- package/www/29-es5.js 2.map +0 -1
- package/www/29-es5.js 3.map +0 -1
- package/www/3-es2015.js 2.map +0 -1
- package/www/3-es2015.js 3.map +0 -1
- package/www/3-es5.js 2.map +0 -1
- package/www/3-es5.js 3.map +0 -1
- package/www/30-es2015.js 2.map +0 -1
- package/www/30-es2015.js 3.map +0 -1
- package/www/30-es5.js 2.map +0 -1
- package/www/30-es5.js 3.map +0 -1
- package/www/31-es2015.js 2.map +0 -1
- package/www/31-es2015.js 3.map +0 -1
- package/www/31-es5.js 2.map +0 -1
- package/www/31-es5.js 3.map +0 -1
- package/www/32-es2015.js 2.map +0 -1
- package/www/32-es2015.js 3.map +0 -1
- package/www/32-es5.js 2.map +0 -1
- package/www/32-es5.js 3.map +0 -1
- package/www/33-es2015.js 2.map +0 -1
- package/www/33-es2015.js 3.map +0 -1
- package/www/33-es5.js 2.map +0 -1
- package/www/33-es5.js 3.map +0 -1
- package/www/34-es2015.js 2.map +0 -1
- package/www/34-es2015.js 3.map +0 -1
- package/www/34-es5.js 2.map +0 -1
- package/www/34-es5.js 3.map +0 -1
- package/www/35-es2015.js 2.map +0 -1
- package/www/35-es2015.js 3.map +0 -1
- package/www/35-es5.js 2.map +0 -1
- package/www/35-es5.js 3.map +0 -1
- package/www/36-es2015.js 2.map +0 -1
- package/www/36-es2015.js 3.map +0 -1
- package/www/36-es5.js 2.map +0 -1
- package/www/36-es5.js 3.map +0 -1
- package/www/37-es2015.js 2.map +0 -1
- package/www/37-es2015.js 3.map +0 -1
- package/www/37-es5.js 2.map +0 -1
- package/www/37-es5.js 3.map +0 -1
- package/www/38-es2015.js 2.map +0 -1
- package/www/38-es2015.js 3.map +0 -1
- package/www/38-es5.js 2.map +0 -1
- package/www/38-es5.js 3.map +0 -1
- package/www/39-es2015.js 2.map +0 -1
- package/www/39-es2015.js 3.map +0 -1
- package/www/39-es5.js 2.map +0 -1
- package/www/39-es5.js 3.map +0 -1
- package/www/3rdpartylicenses.txt +0 -426
- package/www/4-es2015.js 2.map +0 -1
- package/www/4-es2015.js 3.map +0 -1
- package/www/4-es5.js 2.map +0 -1
- package/www/4-es5.js 3.map +0 -1
- package/www/40-es2015.js 2.map +0 -1
- package/www/40-es2015.js 3.map +0 -1
- package/www/40-es5.js 2.map +0 -1
- package/www/40-es5.js 3.map +0 -1
- package/www/41-es2015.js 2.map +0 -1
- package/www/41-es2015.js 3.map +0 -1
- package/www/41-es5.js 2.map +0 -1
- package/www/41-es5.js 3.map +0 -1
- package/www/42-es2015.js 2.map +0 -1
- package/www/42-es2015.js 3.map +0 -1
- package/www/42-es5.js 2.map +0 -1
- package/www/42-es5.js 3.map +0 -1
- package/www/43-es2015.js 2.map +0 -1
- package/www/43-es2015.js 3.map +0 -1
- package/www/43-es5.js 2.map +0 -1
- package/www/43-es5.js 3.map +0 -1
- package/www/44-es2015.js 2.map +0 -1
- package/www/44-es2015.js 3.map +0 -1
- package/www/44-es5.js 2.map +0 -1
- package/www/44-es5.js 3.map +0 -1
- package/www/45-es2015.js 2.map +0 -1
- package/www/45-es2015.js 3.map +0 -1
- package/www/45-es5.js 2.map +0 -1
- package/www/45-es5.js 3.map +0 -1
- package/www/46-es2015.js 2.map +0 -1
- package/www/46-es2015.js 3.map +0 -1
- package/www/46-es5.js 2.map +0 -1
- package/www/46-es5.js 3.map +0 -1
- package/www/47-es2015.js 2.map +0 -1
- package/www/47-es2015.js 3.map +0 -1
- package/www/47-es5.js 2.map +0 -1
- package/www/47-es5.js 3.map +0 -1
- package/www/48-es2015.js 2.map +0 -1
- package/www/48-es2015.js 3.map +0 -1
- package/www/48-es5.js 2.map +0 -1
- package/www/48-es5.js 3.map +0 -1
- package/www/49-es2015.js 2.map +0 -1
- package/www/49-es2015.js 3.map +0 -1
- package/www/49-es5.js 2.map +0 -1
- package/www/49-es5.js 3.map +0 -1
- package/www/5-es2015.js 2.map +0 -1
- package/www/5-es2015.js 3.map +0 -1
- package/www/5-es5.js 2.map +0 -1
- package/www/5-es5.js 3.map +0 -1
- package/www/50-es2015.js 2.map +0 -1
- package/www/50-es2015.js 3.map +0 -1
- package/www/50-es5.js 2.map +0 -1
- package/www/50-es5.js 3.map +0 -1
- package/www/51-es2015.js 2.map +0 -1
- package/www/51-es2015.js 3.map +0 -1
- package/www/51-es5.js 2.map +0 -1
- package/www/51-es5.js 3.map +0 -1
- package/www/52-es2015.js 2.map +0 -1
- package/www/52-es2015.js 3.map +0 -1
- package/www/52-es5.js 2.map +0 -1
- package/www/52-es5.js 3.map +0 -1
- package/www/53-es2015.js 2.map +0 -1
- package/www/53-es2015.js 3.map +0 -1
- package/www/53-es5.js 2.map +0 -1
- package/www/53-es5.js 3.map +0 -1
- package/www/54-es2015.js 2.map +0 -1
- package/www/54-es2015.js 3.map +0 -1
- package/www/54-es5.js 2.map +0 -1
- package/www/54-es5.js 3.map +0 -1
- package/www/55-es2015.js 2.map +0 -1
- package/www/55-es2015.js 3.map +0 -1
- package/www/55-es5.js 2.map +0 -1
- package/www/55-es5.js 3.map +0 -1
- package/www/56-es2015.js 2.map +0 -1
- package/www/56-es2015.js 3.map +0 -1
- package/www/56-es5.js 2.map +0 -1
- package/www/56-es5.js 3.map +0 -1
- package/www/57-es2015.7d1e71790e8f8a161dde.js.LICENSE.txt +0 -11
- package/www/57-es2015.js 2.map +0 -1
- package/www/57-es2015.js 3.map +0 -1
- package/www/57-es5.js 2.map +0 -1
- package/www/57-es5.js 3.map +0 -1
- package/www/58-es2015.js 2.map +0 -1
- package/www/58-es2015.js 3.map +0 -1
- package/www/58-es5.js 2.map +0 -1
- package/www/58-es5.js 3.map +0 -1
- package/www/59-es2015.js 2.map +0 -1
- package/www/59-es2015.js 3.map +0 -1
- package/www/59-es5.js 2.map +0 -1
- package/www/59-es5.js 3.map +0 -1
- package/www/6-es2015.js 2.map +0 -1
- package/www/6-es2015.js 3.map +0 -1
- package/www/6-es5.js 2.map +0 -1
- package/www/6-es5.js 3.map +0 -1
- package/www/60-es2015.js 2.map +0 -1
- package/www/60-es2015.js 3.map +0 -1
- package/www/60-es5.js 2.map +0 -1
- package/www/60-es5.js 3.map +0 -1
- package/www/61-es2015.js 2.map +0 -1
- package/www/61-es2015.js 3.map +0 -1
- package/www/61-es5.js 2.map +0 -1
- package/www/61-es5.js 3.map +0 -1
- package/www/62-es2015.js 2.map +0 -1
- package/www/62-es2015.js 3.map +0 -1
- package/www/62-es5.js 2.map +0 -1
- package/www/62-es5.js 3.map +0 -1
- package/www/63-es2015.js 2.map +0 -1
- package/www/63-es2015.js 3.map +0 -1
- package/www/63-es5.js 2.map +0 -1
- package/www/63-es5.js 3.map +0 -1
- package/www/64-es2015.js 2.map +0 -1
- package/www/64-es2015.js 3.map +0 -1
- package/www/64-es5.js 2.map +0 -1
- package/www/64-es5.js 3.map +0 -1
- package/www/65-es2015.js 2.map +0 -1
- package/www/65-es2015.js 3.map +0 -1
- package/www/65-es5.js 2.map +0 -1
- package/www/65-es5.js 3.map +0 -1
- package/www/66-es2015.js 2.map +0 -1
- package/www/66-es2015.js 3.map +0 -1
- package/www/66-es5.js 2.map +0 -1
- package/www/66-es5.js 3.map +0 -1
- package/www/67-es2015.js 2.map +0 -1
- package/www/67-es2015.js 3.map +0 -1
- package/www/67-es5.js 2.map +0 -1
- package/www/67-es5.js 3.map +0 -1
- package/www/68-es2015.js 2.map +0 -1
- package/www/68-es2015.js 3.map +0 -1
- package/www/68-es5.js 2.map +0 -1
- package/www/68-es5.js 3.map +0 -1
- package/www/69-es2015.js 2.map +0 -1
- package/www/69-es2015.js 3.map +0 -1
- package/www/69-es5.js 2.map +0 -1
- package/www/69-es5.js 3.map +0 -1
- package/www/7-es2015.js 2.map +0 -1
- package/www/7-es2015.js 3.map +0 -1
- package/www/7-es5.js 2.map +0 -1
- package/www/7-es5.js 3.map +0 -1
- package/www/70-es2015.js 2.map +0 -1
- package/www/70-es2015.js 3.map +0 -1
- package/www/70-es5.js 2.map +0 -1
- package/www/70-es5.js 3.map +0 -1
- package/www/71-es2015.js 2.map +0 -1
- package/www/71-es2015.js 3.map +0 -1
- package/www/71-es5.js 2.map +0 -1
- package/www/71-es5.js 3.map +0 -1
- package/www/72-es2015.js 2.map +0 -1
- package/www/72-es2015.js 3.map +0 -1
- package/www/72-es5.js 2.map +0 -1
- package/www/72-es5.js 3.map +0 -1
- package/www/73-es2015.js 2.map +0 -1
- package/www/73-es2015.js 3.map +0 -1
- package/www/73-es5.js 2.map +0 -1
- package/www/73-es5.js 3.map +0 -1
- package/www/74-es2015.js 2.map +0 -1
- package/www/74-es2015.js 3.map +0 -1
- package/www/74-es5.js 2.map +0 -1
- package/www/74-es5.js 3.map +0 -1
- package/www/75-es2015.js 2.map +0 -1
- package/www/75-es2015.js 3.map +0 -1
- package/www/75-es5.js 2.map +0 -1
- package/www/75-es5.js 3.map +0 -1
- package/www/76-es2015.js 2.map +0 -1
- package/www/76-es2015.js 3.map +0 -1
- package/www/76-es5.js 2.map +0 -1
- package/www/76-es5.js 3.map +0 -1
- package/www/8-es2015.js 2.map +0 -1
- package/www/8-es2015.js 3.map +0 -1
- package/www/8-es5.js 2.map +0 -1
- package/www/8-es5.js 3.map +0 -1
- package/www/9-es2015.js 2.map +0 -1
- package/www/9-es2015.js 3.map +0 -1
- package/www/9-es5.js 2.map +0 -1
- package/www/9-es5.js 3.map +0 -1
- package/www/common-es2015.js 2.map +0 -1
- package/www/common-es2015.js 3.map +0 -1
- package/www/common-es5.js 2.map +0 -1
- package/www/common-es5.js 3.map +0 -1
- package/www/core-js-js-es2015.js 2.map +0 -1
- package/www/core-js-js-es2015.js 3.map +0 -1
- package/www/core-js-js-es5.js 2.map +0 -1
- package/www/core-js-js-es5.js 3.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es2015.js 2.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es2015.js 3.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es5.js 2.map +0 -1
- package/www/css-shim-978387b1-1e75855f-js-es5.js 3.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es2015.js 2.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es2015.js 3.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es5.js 2.map +0 -1
- package/www/dom-76cc7c7d-0a082895-js-es5.js 3.map +0 -1
- package/www/dom-js-es2015.js 2.map +0 -1
- package/www/dom-js-es2015.js 3.map +0 -1
- package/www/dom-js-es5.js 2.map +0 -1
- package/www/dom-js-es5.js 3.map +0 -1
- package/www/focus-visible-70713a0c-js-es2015.js 2.map +0 -1
- package/www/focus-visible-70713a0c-js-es2015.js 3.map +0 -1
- package/www/focus-visible-70713a0c-js-es5.js 2.map +0 -1
- package/www/focus-visible-70713a0c-js-es5.js 3.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es2015.js 2.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es2015.js 3.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es5.js 2.map +0 -1
- package/www/hardware-back-button-5afe3cb0-js-es5.js 3.map +0 -1
- package/www/index.html +0 -25
- package/www/input-shims-a4fc53ac-js-es2015.js 2.map +0 -1
- package/www/input-shims-a4fc53ac-js-es2015.js 3.map +0 -1
- package/www/input-shims-a4fc53ac-js-es5.js 2.map +0 -1
- package/www/input-shims-a4fc53ac-js-es5.js 3.map +0 -1
- package/www/ios-transition-1850e475-js-es2015.js 2.map +0 -1
- package/www/ios-transition-1850e475-js-es2015.js 3.map +0 -1
- package/www/ios-transition-1850e475-js-es5.js 2.map +0 -1
- package/www/ios-transition-1850e475-js-es5.js 3.map +0 -1
- package/www/main-es2015.29aba245ff55288da276.js.LICENSE.txt +0 -36
- package/www/main-es2015.2aee1c4665d7383974fc.js.LICENSE.txt +0 -36
- package/www/main-es2015.d3c2de87c5e4e25c179f.js.LICENSE.txt +0 -36
- package/www/main-es2015.js 2.map +0 -1
- package/www/main-es2015.js 3.map +0 -1
- package/www/main-es5.js 2.map +0 -1
- package/www/main-es5.js 3.map +0 -1
- package/www/md-transition-083fcf52-js-es2015.js 2.map +0 -1
- package/www/md-transition-083fcf52-js-es2015.js 3.map +0 -1
- package/www/md-transition-083fcf52-js-es5.js 2.map +0 -1
- package/www/md-transition-083fcf52-js-es5.js 3.map +0 -1
- package/www/polyfills-dom-es2015.9245408aeb114e820beb.js.LICENSE.txt +0 -17
- package/www/polyfills-es2015.51c4f7e8d338ef7e78a0.js.LICENSE.txt +0 -7
- package/www/polyfills-es2015.js 2.map +0 -1
- package/www/polyfills-es2015.js 3.map +0 -1
- package/www/polyfills-es5-es2015.a49d989efcbf8eaab207.js.LICENSE.txt +0 -7
- package/www/polyfills-es5.js 2.map +0 -1
- package/www/polyfills-es5.js 3.map +0 -1
- package/www/runtime-es2015.js 2.map +0 -1
- package/www/runtime-es2015.js 3.map +0 -1
- package/www/runtime-es5.js 2.map +0 -1
- package/www/runtime-es5.js 3.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es2015.js 2.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es2015.js 3.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es5.js 2.map +0 -1
- package/www/shadow-css-4889ae62-23996f3f-js-es5.js 3.map +0 -1
- package/www/status-tap-839e1402-js-es2015.js 2.map +0 -1
- package/www/status-tap-839e1402-js-es2015.js 3.map +0 -1
- package/www/status-tap-839e1402-js-es5.js 2.map +0 -1
- package/www/status-tap-839e1402-js-es5.js 3.map +0 -1
- package/www/styles-es2015.js 2.map +0 -1
- package/www/styles-es2015.js 3.map +0 -1
- package/www/styles-es5.js 2.map +0 -1
- package/www/styles-es5.js 3.map +0 -1
- package/www/styles.a59f3a368f35acaaaff1.css +0 -1
- package/www/styles.e5241ddaca639f9a9abb.css +0 -1
- package/www/swipe-back-d2cdbf9a-js-es2015.js 2.map +0 -1
- package/www/swipe-back-d2cdbf9a-js-es2015.js 3.map +0 -1
- package/www/swipe-back-d2cdbf9a-js-es5.js 2.map +0 -1
- package/www/swipe-back-d2cdbf9a-js-es5.js 3.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es2015.js 2.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es2015.js 3.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es5.js 2.map +0 -1
- package/www/swiper-bundle-ccdaac54-js-es5.js 3.map +0 -1
- package/www/tabs-tabs-tabs-module-es2015.js 2.map +0 -1
- package/www/tabs-tabs-tabs-module-es2015.js 3.map +0 -1
- package/www/tabs-tabs-tabs-module-es5.js 2.map +0 -1
- package/www/tabs-tabs-tabs-module-es5.js 3.map +0 -1
- package/www/tap-click-606f325e-js-es2015.js 2.map +0 -1
- package/www/tap-click-606f325e-js-es2015.js 3.map +0 -1
- package/www/tap-click-606f325e-js-es5.js 2.map +0 -1
- package/www/tap-click-606f325e-js-es5.js 3.map +0 -1
- package/www/vendor-es2015.js 2.map +0 -1
- package/www/vendor-es2015.js 3.map +0 -1
- package/www/vendor-es5.js 2.map +0 -1
- package/www/vendor-es5.js 3.map +0 -1
package/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const platform_1 = require("./server/platform");
|
|
4
4
|
console.log("index.ts - running in directory: " + process.cwd());
|
|
5
|
-
module.exports = function (
|
|
5
|
+
module.exports = function (api) {
|
|
6
6
|
console.log("registering Duotecno Platform");
|
|
7
|
-
|
|
7
|
+
api.registerPlatform("homebridge-smartsystem", "DuotecnoPlatform", platform_1.Platform);
|
|
8
8
|
};
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
package/index.spec.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { Master } from "./duotecno/master";
|
|
|
5
5
|
import { System } from "./duotecno/system";
|
|
6
6
|
import { SmartApp } from "./server/smartapp";
|
|
7
7
|
import { Smappee } from "./server/smappee";
|
|
8
|
+
import { API } from "homebridge";
|
|
8
9
|
|
|
9
10
|
console.log("running in directory: " + process.cwd());
|
|
10
11
|
|
|
@@ -14,7 +15,7 @@ function adder(plugin: string, platform: string, list: any[]) {
|
|
|
14
15
|
|
|
15
16
|
function tester() {
|
|
16
17
|
const platform = new Platform(console, {debug: false, smappee: true, smartapp: true, socapp: false, system: true,
|
|
17
|
-
manufacturer: "Duotecno", platform: "ssoc"}, {registerPlatformAccessories: adder});
|
|
18
|
+
manufacturer: "Duotecno", platform: "ssoc"}, <API>{registerPlatformAccessories: adder});
|
|
18
19
|
|
|
19
20
|
|
|
20
21
|
// testing
|
package/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { API } from "homebridge";
|
|
1
2
|
import { Platform } from "./server/platform";
|
|
2
3
|
|
|
3
4
|
console.log("index.ts - running in directory: " + process.cwd());
|
|
4
5
|
|
|
5
|
-
module.exports = function (
|
|
6
|
+
module.exports = function (api: API) {
|
|
6
7
|
console.log("registering Duotecno Platform");
|
|
7
|
-
|
|
8
|
+
api.registerPlatform("homebridge-smartsystem", "DuotecnoPlatform", Platform);
|
|
8
9
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-smartsystem",
|
|
3
3
|
"displayname": "Duotecno Bridge",
|
|
4
|
-
"version": "6.0.
|
|
4
|
+
"version": "6.0.3",
|
|
5
5
|
"description": "SmartServer (Proxy Websockets to TCP sockets, Smappee MQTT, Duotecno IP Nodes, Homekit interface)",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"author": "Johan Coppieters",
|
package/server/base.js
CHANGED
|
@@ -10,11 +10,11 @@ const types_1 = require("../duotecno/types");
|
|
|
10
10
|
class Base {
|
|
11
11
|
constructor(type, logger, config) {
|
|
12
12
|
this.type = type || "base";
|
|
13
|
+
this.logger = console.log; // logger || console.log;
|
|
13
14
|
if (config)
|
|
14
15
|
this.config = config;
|
|
15
16
|
else
|
|
16
17
|
this.readConfig();
|
|
17
|
-
this.logger = logger || console.log;
|
|
18
18
|
// logger("==== read config -> ", JSON.stringify(this.config));
|
|
19
19
|
if (this.debug)
|
|
20
20
|
protocol_1.Protocol.setLogger(this.logger, this.logger);
|
|
@@ -43,7 +43,7 @@ class Base {
|
|
|
43
43
|
this.write(this.type, this.config);
|
|
44
44
|
}
|
|
45
45
|
read(type, fname = "") {
|
|
46
|
-
const fn = fname || ('
|
|
46
|
+
const fn = fname || (__dirname + '/../config.' + type + '.json');
|
|
47
47
|
let config = null;
|
|
48
48
|
try {
|
|
49
49
|
const configBuf = fs.readFileSync(fn);
|
|
@@ -61,7 +61,7 @@ class Base {
|
|
|
61
61
|
return temp;
|
|
62
62
|
}
|
|
63
63
|
write(type, config, fname = "") {
|
|
64
|
-
const fn = fname || ('
|
|
64
|
+
const fn = fname || (__dirname + '/../config.' + type + '.json');
|
|
65
65
|
try {
|
|
66
66
|
config = types_1.Sanitizers[type](config);
|
|
67
67
|
fs.writeFileSync(fn, JSON.stringify(config, null, 2));
|
package/server/base.ts
CHANGED
|
@@ -15,13 +15,13 @@ export class Base {
|
|
|
15
15
|
|
|
16
16
|
constructor(type: string, logger?: LogFunction, config?) {
|
|
17
17
|
this.type = type || "base";
|
|
18
|
+
this.logger = console.log // logger || console.log;
|
|
19
|
+
|
|
18
20
|
if (config)
|
|
19
21
|
this.config = config;
|
|
20
22
|
else
|
|
21
23
|
this.readConfig();
|
|
22
24
|
|
|
23
|
-
this.logger = logger || console.log;
|
|
24
|
-
|
|
25
25
|
// logger("==== read config -> ", JSON.stringify(this.config));
|
|
26
26
|
|
|
27
27
|
if (this.debug)
|
|
@@ -57,7 +57,7 @@ export class Base {
|
|
|
57
57
|
|
|
58
58
|
|
|
59
59
|
read(type: string, fname: string = "") {
|
|
60
|
-
const fn = fname || ('
|
|
60
|
+
const fn = fname || (__dirname + '/../config.' + type + '.json');
|
|
61
61
|
let config = null;
|
|
62
62
|
|
|
63
63
|
try {
|
|
@@ -78,7 +78,7 @@ export class Base {
|
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
write(type: string, config, fname: string = "") {
|
|
81
|
-
const fn = fname || ('
|
|
81
|
+
const fn = fname || (__dirname + '/../config.' + type + '.json');
|
|
82
82
|
try {
|
|
83
83
|
config = Sanitizers[type](config);
|
|
84
84
|
fs.writeFileSync(fn, JSON.stringify(config, null, 2));
|
package/server/platform.js
CHANGED
|
@@ -26,7 +26,7 @@ const socapp_1 = require("./socapp");
|
|
|
26
26
|
const door_1 = require("../accessories/door");
|
|
27
27
|
const lock_1 = require("../accessories/lock");
|
|
28
28
|
class Platform extends base_1.Base {
|
|
29
|
-
constructor(log, config,
|
|
29
|
+
constructor(log, config, api) {
|
|
30
30
|
// set debug to true for new config files
|
|
31
31
|
super("homebridge", log.info);
|
|
32
32
|
this.accessoryList = [];
|
|
@@ -36,17 +36,17 @@ class Platform extends base_1.Base {
|
|
|
36
36
|
this.config.debug = (config && ("debug" in config)) ? config.debug : false;
|
|
37
37
|
this.log("running in directory: " + process.cwd());
|
|
38
38
|
this.log("with config:" + JSON.stringify(config, null, 2));
|
|
39
|
-
// log("homebridge object:",
|
|
40
|
-
this.
|
|
39
|
+
// this.log("homebridge object:", api);
|
|
40
|
+
this.homebridgeAPI = api;
|
|
41
41
|
if (this.config.system) {
|
|
42
42
|
try {
|
|
43
|
-
this.system = new system_1.System(
|
|
43
|
+
this.system = new system_1.System(log.info, false);
|
|
44
44
|
this.system.openMasters(true);
|
|
45
45
|
this.system.emitter.on('ready', this.systemReady.bind(this));
|
|
46
46
|
this.system.emitter.on('update', this.updateState.bind(this));
|
|
47
47
|
}
|
|
48
48
|
catch (err) {
|
|
49
|
-
log
|
|
49
|
+
this.log(err);
|
|
50
50
|
if (!this.system) {
|
|
51
51
|
this.log("platform - Can't run without a System.");
|
|
52
52
|
return;
|
|
@@ -60,7 +60,7 @@ class Platform extends base_1.Base {
|
|
|
60
60
|
// startup a Smappee MQTT subscriber, if one is configured
|
|
61
61
|
if (this.config.smappee) {
|
|
62
62
|
try {
|
|
63
|
-
this.smappee = new smappee_1.Smappee(this.system,
|
|
63
|
+
this.smappee = new smappee_1.Smappee(this.system, log.info);
|
|
64
64
|
}
|
|
65
65
|
catch (err) {
|
|
66
66
|
this.log(err);
|
|
@@ -75,7 +75,7 @@ class Platform extends base_1.Base {
|
|
|
75
75
|
// startup a smartApp if configured -> only on Raspberry's
|
|
76
76
|
if (this.config.smartapp) {
|
|
77
77
|
try {
|
|
78
|
-
this.smartapp = new smartapp_1.SmartApp(this.system, this.smappee, this,
|
|
78
|
+
this.smartapp = new smartapp_1.SmartApp(this.system, this.smappee, this, log.info, false);
|
|
79
79
|
this.smartapp.serve();
|
|
80
80
|
}
|
|
81
81
|
catch (err) {
|
|
@@ -92,7 +92,7 @@ class Platform extends base_1.Base {
|
|
|
92
92
|
if (this.config.socapp) {
|
|
93
93
|
try {
|
|
94
94
|
// reuse the config file from the smartapp
|
|
95
|
-
this.smartsoc = new socapp_1.SocApp(this.system, 'smartapp',
|
|
95
|
+
this.smartsoc = new socapp_1.SocApp(this.system, 'smartapp', log.info);
|
|
96
96
|
this.smartsoc.serve();
|
|
97
97
|
}
|
|
98
98
|
catch (err) {
|
|
@@ -130,6 +130,7 @@ class Platform extends base_1.Base {
|
|
|
130
130
|
const kMaxWaiting = 5 * 60;
|
|
131
131
|
const inConfig = this.system.activeUnitsConfig().length;
|
|
132
132
|
const inSystem = this.system.allActiveUnits().length;
|
|
133
|
+
this.ready = (inSystem == inConfig);
|
|
133
134
|
if (this.ready) {
|
|
134
135
|
this.log("=== running after timeout of " + this.startWaiting + " secs --> " +
|
|
135
136
|
inSystem + " == " + inConfig + " units -> " + (inConfig == inSystem) + ", will start in 10 seconds ===");
|
|
@@ -174,34 +175,34 @@ class Platform extends base_1.Base {
|
|
|
174
175
|
this.log("adding accessory: " + unit.getDescription());
|
|
175
176
|
switch (unit.getType()) {
|
|
176
177
|
case types_1.UnitExtendedType.kDimmer:
|
|
177
|
-
this.accessoryList.push(new dimmer_1.Dimmer(logger, this.
|
|
178
|
+
this.accessoryList.push(new dimmer_1.Dimmer(logger, this.homebridgeAPI, unit));
|
|
178
179
|
break;
|
|
179
180
|
case types_1.UnitExtendedType.kSwitch:
|
|
180
|
-
this.accessoryList.push(new switch_1.Switch(logger, this.
|
|
181
|
+
this.accessoryList.push(new switch_1.Switch(logger, this.homebridgeAPI, unit));
|
|
181
182
|
break;
|
|
182
183
|
case types_1.UnitExtendedType.kLightbulb:
|
|
183
|
-
this.accessoryList.push(new bulb_1.Bulb(logger, this.
|
|
184
|
+
this.accessoryList.push(new bulb_1.Bulb(logger, this.homebridgeAPI, unit));
|
|
184
185
|
break;
|
|
185
186
|
case types_1.UnitExtendedType.kSwitchingMotor:
|
|
186
|
-
this.accessoryList.push(new windowcovering_1.WindowCovering(logger, this.
|
|
187
|
+
this.accessoryList.push(new windowcovering_1.WindowCovering(logger, this.homebridgeAPI, unit));
|
|
187
188
|
break;
|
|
188
189
|
case types_1.UnitExtendedType.kGarageDoor:
|
|
189
|
-
this.accessoryList.push(new garagedoor_1.GarageDoor(logger, this.
|
|
190
|
+
this.accessoryList.push(new garagedoor_1.GarageDoor(logger, this.homebridgeAPI, unit));
|
|
190
191
|
break;
|
|
191
192
|
case types_1.UnitExtendedType.kDoor:
|
|
192
|
-
this.accessoryList.push(new door_1.Door(logger, this.
|
|
193
|
+
this.accessoryList.push(new door_1.Door(logger, this.homebridgeAPI, unit));
|
|
193
194
|
break;
|
|
194
195
|
case types_1.UnitExtendedType.kLock:
|
|
195
196
|
case types_1.UnitExtendedType.kUnlocker:
|
|
196
|
-
this.accessoryList.push(new lock_1.Lock(logger, this.
|
|
197
|
+
this.accessoryList.push(new lock_1.Lock(logger, this.homebridgeAPI, unit));
|
|
197
198
|
break;
|
|
198
199
|
case types_1.UnitExtendedType.kMood:
|
|
199
200
|
case types_1.UnitExtendedType.kCondition:
|
|
200
201
|
case types_1.UnitExtendedType.kInput:
|
|
201
|
-
this.accessoryList.push(new mood_1.Mood(logger, this.
|
|
202
|
+
this.accessoryList.push(new mood_1.Mood(logger, this.homebridgeAPI, unit));
|
|
202
203
|
break;
|
|
203
204
|
case types_1.UnitExtendedType.kTemperature:
|
|
204
|
-
this.accessoryList.push(new temperature_1.Temperature(logger, this.
|
|
205
|
+
this.accessoryList.push(new temperature_1.Temperature(logger, this.homebridgeAPI, unit));
|
|
205
206
|
break;
|
|
206
207
|
default:
|
|
207
208
|
this.log("platform - addAccessories: accessory type not yet supported: " + unit.typeName() +
|
package/server/platform.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { LogFunction, PlatformConfig, UnitExtendedType } from "../duotecno/types";
|
|
2
|
-
import { Logger } from "homebridge";
|
|
2
|
+
import { API, Logger } from "homebridge";
|
|
3
3
|
import { System } from "../duotecno/system";
|
|
4
4
|
import { Smappee } from "./smappee";
|
|
5
5
|
import { SmartApp } from "./smartapp";
|
|
@@ -19,7 +19,7 @@ import { Lock } from "../accessories/lock";
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
export class Platform extends Base {
|
|
22
|
-
|
|
22
|
+
homebridgeAPI: API;
|
|
23
23
|
config: PlatformConfig;
|
|
24
24
|
system: System;
|
|
25
25
|
smappee: Smappee;
|
|
@@ -28,9 +28,8 @@ export class Platform extends Base {
|
|
|
28
28
|
accessoryList: Array<Accessory> = [];
|
|
29
29
|
ready = false;
|
|
30
30
|
startWaiting = 0;
|
|
31
|
-
log: LogFunction;
|
|
32
31
|
|
|
33
|
-
constructor(log: Logger, config: PlatformConfig,
|
|
32
|
+
constructor(log: Logger, config: PlatformConfig, api: API) {
|
|
34
33
|
// set debug to true for new config files
|
|
35
34
|
super("homebridge", log.info);
|
|
36
35
|
|
|
@@ -39,20 +38,20 @@ export class Platform extends Base {
|
|
|
39
38
|
|
|
40
39
|
this.log("running in directory: " + process.cwd());
|
|
41
40
|
this.log("with config:" + JSON.stringify(config, null, 2));
|
|
42
|
-
// log("homebridge object:",
|
|
41
|
+
// this.log("homebridge object:", api);
|
|
43
42
|
|
|
44
|
-
this.
|
|
43
|
+
this.homebridgeAPI = api;
|
|
45
44
|
|
|
46
45
|
if (this.config.system) {
|
|
47
46
|
try {
|
|
48
|
-
this.system = new System(
|
|
47
|
+
this.system = new System(log.info, false);
|
|
49
48
|
this.system.openMasters(true);
|
|
50
49
|
|
|
51
50
|
this.system.emitter.on('ready', this.systemReady.bind(this));
|
|
52
51
|
this.system.emitter.on('update', this.updateState.bind(this));
|
|
53
52
|
|
|
54
53
|
} catch(err) {
|
|
55
|
-
log
|
|
54
|
+
this.log(err);
|
|
56
55
|
if (!this.system) {
|
|
57
56
|
this.log("platform - Can't run without a System.");
|
|
58
57
|
return;
|
|
@@ -66,7 +65,7 @@ export class Platform extends Base {
|
|
|
66
65
|
// startup a Smappee MQTT subscriber, if one is configured
|
|
67
66
|
if (this.config.smappee) {
|
|
68
67
|
try {
|
|
69
|
-
this.smappee = new Smappee(this.system,
|
|
68
|
+
this.smappee = new Smappee(this.system, log.info);
|
|
70
69
|
|
|
71
70
|
} catch(err) {
|
|
72
71
|
this.log(err);
|
|
@@ -81,7 +80,7 @@ export class Platform extends Base {
|
|
|
81
80
|
// startup a smartApp if configured -> only on Raspberry's
|
|
82
81
|
if (this.config.smartapp) {
|
|
83
82
|
try {
|
|
84
|
-
this.smartapp = new SmartApp(this.system, this.smappee, this,
|
|
83
|
+
this.smartapp = new SmartApp(this.system, this.smappee, this, log.info, false);
|
|
85
84
|
this.smartapp.serve();
|
|
86
85
|
|
|
87
86
|
} catch(err) {
|
|
@@ -98,7 +97,7 @@ export class Platform extends Base {
|
|
|
98
97
|
if (this.config.socapp) {
|
|
99
98
|
try {
|
|
100
99
|
// reuse the config file from the smartapp
|
|
101
|
-
this.smartsoc = new SocApp(this.system, 'smartapp',
|
|
100
|
+
this.smartsoc = new SocApp(this.system, 'smartapp', log.info);
|
|
102
101
|
this.smartsoc.serve();
|
|
103
102
|
|
|
104
103
|
} catch(err) {
|
|
@@ -141,6 +140,7 @@ export class Platform extends Base {
|
|
|
141
140
|
const kMaxWaiting = 5 * 60;
|
|
142
141
|
const inConfig = this.system.activeUnitsConfig().length;
|
|
143
142
|
const inSystem = this.system.allActiveUnits().length;
|
|
143
|
+
this.ready = (inSystem == inConfig);
|
|
144
144
|
|
|
145
145
|
if (this.ready) {
|
|
146
146
|
this.log("=== running after timeout of " + this.startWaiting + " secs --> " +
|
|
@@ -191,42 +191,42 @@ export class Platform extends Base {
|
|
|
191
191
|
this.log("adding accessory: " + unit.getDescription());
|
|
192
192
|
switch (unit.getType()) {
|
|
193
193
|
case UnitExtendedType.kDimmer:
|
|
194
|
-
this.accessoryList.push( new Dimmer(logger, this.
|
|
194
|
+
this.accessoryList.push( new Dimmer(logger, this.homebridgeAPI, unit) );
|
|
195
195
|
break;
|
|
196
196
|
|
|
197
197
|
case UnitExtendedType.kSwitch:
|
|
198
|
-
this.accessoryList.push( new Switch(logger, this.
|
|
198
|
+
this.accessoryList.push( new Switch(logger, this.homebridgeAPI, unit) );
|
|
199
199
|
break;
|
|
200
200
|
|
|
201
201
|
case UnitExtendedType.kLightbulb:
|
|
202
|
-
this.accessoryList.push( new Bulb(logger, this.
|
|
202
|
+
this.accessoryList.push( new Bulb(logger, this.homebridgeAPI, unit) );
|
|
203
203
|
break;
|
|
204
204
|
|
|
205
205
|
case UnitExtendedType.kSwitchingMotor:
|
|
206
|
-
this.accessoryList.push( new WindowCovering(logger, this.
|
|
206
|
+
this.accessoryList.push( new WindowCovering(logger, this.homebridgeAPI, unit) );
|
|
207
207
|
break;
|
|
208
208
|
|
|
209
209
|
case UnitExtendedType.kGarageDoor:
|
|
210
|
-
this.accessoryList.push( new GarageDoor(logger, this.
|
|
210
|
+
this.accessoryList.push( new GarageDoor(logger, this.homebridgeAPI, unit) );
|
|
211
211
|
break;
|
|
212
212
|
|
|
213
213
|
case UnitExtendedType.kDoor:
|
|
214
|
-
this.accessoryList.push( new Door(logger, this.
|
|
214
|
+
this.accessoryList.push( new Door(logger, this.homebridgeAPI, unit) );
|
|
215
215
|
break;
|
|
216
216
|
|
|
217
217
|
case UnitExtendedType.kLock:
|
|
218
218
|
case UnitExtendedType.kUnlocker:
|
|
219
|
-
this.accessoryList.push( new Lock(logger, this.
|
|
219
|
+
this.accessoryList.push( new Lock(logger, this.homebridgeAPI, unit) );
|
|
220
220
|
break;
|
|
221
221
|
|
|
222
222
|
case UnitExtendedType.kMood:
|
|
223
223
|
case UnitExtendedType.kCondition:
|
|
224
224
|
case UnitExtendedType.kInput:
|
|
225
|
-
this.accessoryList.push( new Mood(logger, this.
|
|
225
|
+
this.accessoryList.push( new Mood(logger, this.homebridgeAPI, unit) );
|
|
226
226
|
break;
|
|
227
227
|
|
|
228
228
|
case UnitExtendedType.kTemperature:
|
|
229
|
-
this.accessoryList.push( new Temperature(logger, this.
|
|
229
|
+
this.accessoryList.push( new Temperature(logger, this.homebridgeAPI, unit) );
|
|
230
230
|
break;
|
|
231
231
|
|
|
232
232
|
default:
|
package/server/smartapp.js
CHANGED
|
@@ -19,7 +19,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
19
19
|
};
|
|
20
20
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21
21
|
exports.SmartApp = void 0;
|
|
22
|
-
const os_1 = require("os");
|
|
23
22
|
const webapp_1 = require("./webapp");
|
|
24
23
|
const types_1 = require("../duotecno/types");
|
|
25
24
|
const protocol_1 = require("../duotecno/protocol");
|
|
@@ -77,21 +76,21 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
77
76
|
this.platform = platform;
|
|
78
77
|
// when all masters are loaded -> attach units to the switches
|
|
79
78
|
this.system.emitter.on('ready', this.initSwitchUnits.bind(this));
|
|
80
|
-
this.addFile("unitList", "./server/views/unit-list.ejs", "application/json");
|
|
81
|
-
this.addFile("masterList", "./server/views/master-list.ejs", "text/html");
|
|
82
|
-
this.addFile("masterDetail", "./server/views/master-detail.ejs", "text/html");
|
|
83
|
-
this.addFile("nodeDetail", "./server/views/node-details.ejs", "text/html");
|
|
84
|
-
this.addFile("serviceList", "./server/views/service-list.ejs", "text/html");
|
|
85
|
-
this.addFile("smappee", "./server/views/smappee.ejs", "text/html");
|
|
86
|
-
this.addFile("homekit", "./server/views/homekit.ejs", "text/html");
|
|
87
|
-
this.addFile("settings", "./server/views/settings.ejs", "text/html");
|
|
88
|
-
this.addFile("switchDetail", "./server/views/switch-details.ejs", "text/html");
|
|
89
|
-
this.addFile("switchList", "./server/views/switch-list.ejs", "text/html");
|
|
90
|
-
this.addFile("smappeeRule", "./server/views/smappee-rule.ejs", "text/html");
|
|
91
|
-
this.addFile("smappeeBinding", "./server/views/smappee-binding.ejs", "text/html");
|
|
92
|
-
this.addFile("materializeCSS", "./server/views/assets/materialize.min.css", "text/css");
|
|
93
|
-
this.addFile("materializeJS", "./server/views/assets/materialize.min.js", "text/javascript");
|
|
94
|
-
this.addFile("favicon", "./server/views/assets/favicon.ico", "image/x-icon");
|
|
79
|
+
this.addFile("unitList", __dirname + "./server/views/unit-list.ejs", "application/json");
|
|
80
|
+
this.addFile("masterList", __dirname + "./server/views/master-list.ejs", "text/html");
|
|
81
|
+
this.addFile("masterDetail", __dirname + "./server/views/master-detail.ejs", "text/html");
|
|
82
|
+
this.addFile("nodeDetail", __dirname + "./server/views/node-details.ejs", "text/html");
|
|
83
|
+
this.addFile("serviceList", __dirname + "./server/views/service-list.ejs", "text/html");
|
|
84
|
+
this.addFile("smappee", __dirname + "./server/views/smappee.ejs", "text/html");
|
|
85
|
+
this.addFile("homekit", __dirname + "./server/views/homekit.ejs", "text/html");
|
|
86
|
+
this.addFile("settings", __dirname + "./server/views/settings.ejs", "text/html");
|
|
87
|
+
this.addFile("switchDetail", __dirname + "./server/views/switch-details.ejs", "text/html");
|
|
88
|
+
this.addFile("switchList", __dirname + "./server/views/switch-list.ejs", "text/html");
|
|
89
|
+
this.addFile("smappeeRule", __dirname + "./server/views/smappee-rule.ejs", "text/html");
|
|
90
|
+
this.addFile("smappeeBinding", __dirname + "./server/views/smappee-binding.ejs", "text/html");
|
|
91
|
+
this.addFile("materializeCSS", __dirname + "./server/views/assets/materialize.min.css", "text/css");
|
|
92
|
+
this.addFile("materializeJS", __dirname + "./server/views/assets/materialize.min.js", "text/javascript");
|
|
93
|
+
this.addFile("favicon", __dirname + "./server/views/assets/favicon.ico", "image/x-icon");
|
|
95
94
|
}
|
|
96
95
|
writeConfig() {
|
|
97
96
|
// copy switches into config, eliminate the runtime stuff (like unit)
|
|
@@ -283,7 +282,7 @@ class SmartApp extends webapp_1.WebApp {
|
|
|
283
282
|
doRequest: { get: () => super.doRequest }
|
|
284
283
|
});
|
|
285
284
|
return __awaiter(this, void 0, void 0, function* () {
|
|
286
|
-
const kDir =
|
|
285
|
+
const kDir = "./";
|
|
287
286
|
const kFN = kDir + "config.json";
|
|
288
287
|
let message;
|
|
289
288
|
let config;
|
package/server/smartapp.ts
CHANGED
|
@@ -85,21 +85,21 @@ export class SmartApp extends WebApp {
|
|
|
85
85
|
// when all masters are loaded -> attach units to the switches
|
|
86
86
|
this.system.emitter.on('ready', this.initSwitchUnits.bind(this));
|
|
87
87
|
|
|
88
|
-
this.addFile("unitList", "./server/views/unit-list.ejs", "application/json");
|
|
89
|
-
this.addFile("masterList", "./server/views/master-list.ejs", "text/html");
|
|
90
|
-
this.addFile("masterDetail", "./server/views/master-detail.ejs", "text/html");
|
|
91
|
-
this.addFile("nodeDetail", "./server/views/node-details.ejs", "text/html");
|
|
92
|
-
this.addFile("serviceList", "./server/views/service-list.ejs", "text/html");
|
|
93
|
-
this.addFile("smappee", "./server/views/smappee.ejs", "text/html");
|
|
94
|
-
this.addFile("homekit", "./server/views/homekit.ejs", "text/html");
|
|
95
|
-
this.addFile("settings", "./server/views/settings.ejs", "text/html");
|
|
96
|
-
this.addFile("switchDetail", "./server/views/switch-details.ejs", "text/html");
|
|
97
|
-
this.addFile("switchList", "./server/views/switch-list.ejs", "text/html");
|
|
98
|
-
this.addFile("smappeeRule", "./server/views/smappee-rule.ejs", "text/html");
|
|
99
|
-
this.addFile("smappeeBinding", "./server/views/smappee-binding.ejs", "text/html");
|
|
100
|
-
this.addFile("materializeCSS", "./server/views/assets/materialize.min.css", "text/css");
|
|
101
|
-
this.addFile("materializeJS", "./server/views/assets/materialize.min.js", "text/javascript");
|
|
102
|
-
this.addFile("favicon", "./server/views/assets/favicon.ico", "image/x-icon");
|
|
88
|
+
this.addFile("unitList", __dirname + "./server/views/unit-list.ejs", "application/json");
|
|
89
|
+
this.addFile("masterList", __dirname + "./server/views/master-list.ejs", "text/html");
|
|
90
|
+
this.addFile("masterDetail", __dirname + "./server/views/master-detail.ejs", "text/html");
|
|
91
|
+
this.addFile("nodeDetail", __dirname + "./server/views/node-details.ejs", "text/html");
|
|
92
|
+
this.addFile("serviceList", __dirname + "./server/views/service-list.ejs", "text/html");
|
|
93
|
+
this.addFile("smappee", __dirname + "./server/views/smappee.ejs", "text/html");
|
|
94
|
+
this.addFile("homekit", __dirname + "./server/views/homekit.ejs", "text/html");
|
|
95
|
+
this.addFile("settings", __dirname + "./server/views/settings.ejs", "text/html");
|
|
96
|
+
this.addFile("switchDetail", __dirname + "./server/views/switch-details.ejs", "text/html");
|
|
97
|
+
this.addFile("switchList", __dirname + "./server/views/switch-list.ejs", "text/html");
|
|
98
|
+
this.addFile("smappeeRule", __dirname + "./server/views/smappee-rule.ejs", "text/html");
|
|
99
|
+
this.addFile("smappeeBinding", __dirname + "./server/views/smappee-binding.ejs", "text/html");
|
|
100
|
+
this.addFile("materializeCSS", __dirname + "./server/views/assets/materialize.min.css", "text/css");
|
|
101
|
+
this.addFile("materializeJS", __dirname + "./server/views/assets/materialize.min.js", "text/javascript");
|
|
102
|
+
this.addFile("favicon", __dirname + "./server/views/assets/favicon.ico", "image/x-icon");
|
|
103
103
|
}
|
|
104
104
|
|
|
105
105
|
writeConfig() {
|
|
@@ -302,7 +302,7 @@ export class SmartApp extends WebApp {
|
|
|
302
302
|
// Homekit //
|
|
303
303
|
//////////////////////////////
|
|
304
304
|
async doHomekit(context: Context): Promise<HttpResponse> {
|
|
305
|
-
const kDir =
|
|
305
|
+
const kDir = "./";
|
|
306
306
|
const kFN = kDir + "config.json";
|
|
307
307
|
let message;
|
|
308
308
|
let config;
|
package/www/0-es2015.js 2.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-action-sheet-ios.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6H;AAC/F;AACC;AACgC;AACyF;AACjG;;AAEvD;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,2DAAgB;AACxB;AACA,oBAAoB,2DAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uDAAQ;AAC5C;AACA;AACA;AACA,gBAAgB,+DAAQ;AACxB;AACA;AACA;AACA;AACA,QAAQ,+DAAc;AACtB,0BAA0B,2DAAW;AACrC,2BAA2B,2DAAW;AACtC,2BAA2B,2DAAW;AACtC,0BAA0B,2DAAW;AACrC;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAO;AACtB;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAW;AAC1B;AACA;AACA;AACA,YAAY,+DAAQ;AACpB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,8BAA8B,+DAAQ;AACtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;AACnB;AACA,SAAS;AACT;AACA;AACA,qBAAqB,2DAAU;AAC/B;AACA;AACA;AACA,gBAAgB,2DAAC,CAAC,mDAAI,GAAG;AACzB,2BAA2B,0BAA0B;AACrD,aAAa,sCAAsC,eAAe,EAAE,4DAAW,mBAAmB,+CAA+C,kGAAkG,EAAE,2DAAC,kBAAkB,iCAAiC,GAAG,2DAAC,SAAS,gDAAgD,EAAE,2DAAC,SAAS,kCAAkC,EAAE,2DAAC,SAAS,8BAA8B;AAC9b,YAAY,2DAAC,SAAS,8BAA8B,iCAAiC,2DAAC,SAAS,kCAAkC,qCAAqC,2DAAC,YAAY,4EAA4E,EAAE,2DAAC,UAAU,qCAAqC,YAAY,2DAAC,cAAc,wDAAwD,6BAA6B,2DAAC;AACla,YAAY,2DAAC,SAAS,wDAAwD,EAAE,2DAAC,YAAY,kGAAkG,EAAE,2DAAC,UAAU,qCAAqC;AACjP,gBAAgB,2DAAC,cAAc,mEAAmE,wCAAwC,2DAAC;AAC3I;AACA,cAAc,QAAQ,2DAAU,OAAO;AACvC,wBAAwB,oCAAoC,gBAAgB,6CAA6C,2CAA2C,yCAAyC,4CAA4C,iBAAiB,aAAa,kBAAkB,kBAAkB,cAAc,mFAAmF,kCAAkC,mCAAmC,OAAO,QAAQ,MAAM,SAAS,cAAc,eAAe,2CAA2C,sBAAsB,kBAAkB,yBAAyB,sBAAsB,qBAAqB,iBAAiB,aAAa,0CAA0C,aAAa,8CAA8C,OAAO,QAAQ,SAAS,gBAAgB,mBAAmB,wCAAwC,gCAAgC,cAAc,kBAAkB,mBAAmB,2BAA2B,2BAA2B,qBAAqB,6BAA6B,6BAA6B,WAAW,oBAAoB,6CAA6C,cAAc,kBAAkB,WAAW,SAAS,aAAa,oCAAoC,0BAA0B,oBAAoB,gBAAgB,mDAAmD,oBAAoB,aAAa,kBAAkB,yBAAyB,qBAAqB,oBAAoB,cAAc,sBAAsB,mBAAmB,qBAAqB,uBAAuB,WAAW,YAAY,UAAU,gDAAgD,oBAAoB,aAAa,qBAAqB,iBAAiB,kBAAkB,yBAAyB,YAAY,gBAAgB,4CAA4C,oBAAoB,cAAc,8BAA8B,gBAAgB,iCAAiC,mBAAmB,6BAA6B,+DAA+D,aAAa,mDAAmD,oBAAoB,cAAc,gBAAgB,mDAAmD,OAAO,QAAQ,MAAM,SAAS,kBAAkB,aAAa,UAAU,+CAA+C,mCAAmC,qDAAqD,6CAA6C,kDAAkD,2DAA2D,oCAAoC,iEAAiE,8CAA8C,mDAAmD,yDAAyD,kCAAkC,+DAA+D,4CAA4C,iDAAiD,0BAA0B,mDAAmD,gCAAgC,yDAAyD,0CAA0C,gDAAgD,2BAA2B,mFAAmF,mDAAmD,wLAAwL,yDAAyD,0CAA0C,uCAAuC,sCAAsC,yCAAyC,wCAAwC,8DAA8D,uCAAuC,gDAAgD,uCAAuC,kBAAkB,8CAA8C,iBAAiB,kBAAkB,sCAAsC,4CAA4C,6FAA6F,8CAA8C,kBAAkB,mBAAmB,0BAA0B,yBAAyB,wBAAwB,wBAAwB,gDAAgD,iBAAiB,kBAAkB,cAAc,iBAAiB,6FAA6F,gDAAgD,mBAAmB,oBAAoB,0BAA0B,yBAAyB,wBAAwB,wBAAwB,4CAA4C,mBAAmB,kBAAkB,wDAAwD,gBAAgB,uDAAuD,mBAAmB,4EAA4E,gGAAgG,6BAA6B,kDAAkD,0CAA0C,kMAAkM,6BAA6B,saAAsa,iVAAiV,4BAA4B,+BAA+B,+CAA+C,uCAAuC,+BAA+B,+GAA+G,sEAAsE,sBAAsB,iGAAiG,8CAA8C,4CAA4C,qOAAqO,6KAA6K,kBAAkB,mBAAmB,iBAAiB,oBAAoB,kDAAkD,eAAe,gBAAgB,kBAAkB,6FAA6F,4CAA4C,mBAAmB,oBAAoB,2BAA2B,0BAA0B,yBAAyB,yBAAyB,gDAAgD,eAAe,gBAAgB,iBAAiB,iBAAiB,eAAe,6CAA6C,kBAAkB,mBAAmB,iBAAiB,oBAAoB,YAAY,eAAe,eAAe,6FAA6F,6CAA6C,mBAAmB,oBAAoB,2BAA2B,0BAA0B,yBAAyB,yBAAyB,wFAAwF,kBAAkB,eAAe,6FAA6F,wFAAwF,mBAAmB,wBAAwB,wBAAwB,wDAAwD,sBAAsB,+CAA+C,gBAAgB,6CAA6C,gBAAgB,mDAAmD,6CAA6C,kDAAkD,kLAAkL,sCAAsC,0BAA0B,wDAAwD,uCAAuC,EAAE;AAC10S;AACA;AACA,0BAA0B,+FAA+F,YAAY,+BAA+B,EAAE,4DAAW;AACjL;;AAE2C","file":"0-es2015.js","sourcesContent":["import { r as registerInstance, c as getIonMode, d as createEvent, h, H as Host, e as getElement } from './core-80bde1aa.js';\nimport './config-3c7f3790.js';\nimport './helpers-46f4a262.js';\nimport { c as createAnimation } from './animation-0084d55f.js';\nimport { B as BACKDROP, i as isCancel, d as prepareOverlay, e as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-992cb809.js';\nimport { g as getClassMap } from './theme-18cbe2cc.js';\n\n/**\r\n * iOS Action Sheet Enter Animation\r\n */\r\nconst iosEnterAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)');\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(100%)', 'translateY(0%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(400)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * iOS Action Sheet Leave Animation\r\n */\r\nconst iosLeaveAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 'var(--backdrop-opacity)', 0);\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(0%)', 'translateY(100%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(450)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * MD Action Sheet Enter Animation\r\n */\r\nconst mdEnterAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)');\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(100%)', 'translateY(0%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(400)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * MD Action Sheet Leave Animation\r\n */\r\nconst mdLeaveAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 'var(--backdrop-opacity)', 0);\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(0%)', 'translateY(100%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(450)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\nconst ActionSheet = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.presented = false;\n this.mode = getIonMode(this);\n /**\n * If `true`, the keyboard will be automatically dismissed when the overlay is presented.\n */\n this.keyboardClose = true;\n /**\n * An array of buttons for the action sheet.\n */\n this.buttons = [];\n /**\n * If `true`, the action sheet will be dismissed when the backdrop is clicked.\n */\n this.backdropDismiss = true;\n /**\n * If `true`, the action sheet will be translucent.\n * Only applies when the mode is `\"ios\"` and the device supports\n * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n */\n this.translucent = false;\n /**\n * If `true`, the action sheet will animate.\n */\n this.animated = true;\n this.onBackdropTap = () => {\n this.dismiss(undefined, BACKDROP);\n };\n this.dispatchCancelHandler = (ev) => {\n const role = ev.detail.role;\n if (isCancel(role)) {\n const cancelButton = this.getButtons().find(b => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n prepareOverlay(this.el);\n this.didPresent = createEvent(this, \"ionActionSheetDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionActionSheetWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionActionSheetWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionActionSheetDidDismiss\", 7);\n }\n /**\n * Present the action sheet overlay after it has been created.\n */\n present() {\n return present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);\n }\n /**\n * Dismiss the action sheet overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the action sheet.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the action sheet.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n */\n dismiss(data, role) {\n return dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);\n }\n /**\n * Returns a promise that resolves when the action sheet did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionActionSheetDidDismiss');\n }\n /**\n * Returns a promise that resolves when the action sheet will dismiss.\n *\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionActionSheetWillDismiss');\n }\n async buttonClick(button) {\n const role = button.role;\n if (isCancel(role)) {\n return this.dismiss(undefined, role);\n }\n const shouldDismiss = await this.callButtonHandler(button);\n if (shouldDismiss) {\n return this.dismiss(undefined, button.role);\n }\n return Promise.resolve();\n }\n async callButtonHandler(button) {\n if (button) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n const rtn = await safeCall(button.handler);\n if (rtn === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n }\n return true;\n }\n getButtons() {\n return this.buttons.map(b => {\n return (typeof b === 'string')\n ? { text: b }\n : b;\n });\n }\n render() {\n const mode = getIonMode(this);\n const allButtons = this.getButtons();\n const cancelButton = allButtons.find(b => b.role === 'cancel');\n const buttons = allButtons.filter(b => b.role !== 'cancel');\n return (h(Host, { role: \"dialog\", \"aria-modal\": \"true\", style: {\n zIndex: `${20000 + this.overlayIndex}`,\n }, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h(\"ion-backdrop\", { tappable: this.backdropDismiss }), h(\"div\", { class: \"action-sheet-wrapper\", role: \"dialog\" }, h(\"div\", { class: \"action-sheet-container\" }, h(\"div\", { class: \"action-sheet-group\" }, this.header !== undefined &&\n h(\"div\", { class: \"action-sheet-title\" }, this.header, this.subHeader && h(\"div\", { class: \"action-sheet-sub-title\" }, this.subHeader)), buttons.map(b => h(\"button\", { type: \"button\", class: buttonClass(b), onClick: () => this.buttonClick(b) }, h(\"span\", { class: \"action-sheet-button-inner\" }, b.icon && h(\"ion-icon\", { icon: b.icon, lazy: false, class: \"action-sheet-icon\" }), b.text), mode === 'md' && h(\"ion-ripple-effect\", null)))), cancelButton &&\n h(\"div\", { class: \"action-sheet-group action-sheet-group-cancel\" }, h(\"button\", { type: \"button\", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }, h(\"span\", { class: \"action-sheet-button-inner\" }, cancelButton.icon &&\n h(\"ion-icon\", { icon: cancelButton.icon, lazy: false, class: \"action-sheet-icon\" }), cancelButton.text), mode === 'md' && h(\"ion-ripple-effect\", null)))))));\n }\n get el() { return getElement(this); }\n static get style() { return \".sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;font-family:var(--ion-font-family,inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios:after{left:0;right:0;top:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios:after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios:after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios:after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}\\@media (any-hover:hover){.action-sheet-button.sc-ion-action-sheet-ios:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:hover:after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color,var(--ion-color-step-100,#f9f9f9));--backdrop-opacity:var(--ion-backdrop-opacity,0.4);--button-background:linear-gradient(0deg,rgba(var(--ion-text-color-rgb,0,0,0),0.08),rgba(var(--ion-text-color-rgb,0,0,0),0.08) 50%,transparent 0) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color,#000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-background-color,#fff);--button-background-selected-opacity:1;--button-color:var(--ion-color-primary,#3880ff);--color:var(--ion-color-step-400,#999);text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top,0);margin-bottom:var(--ion-safe-area-bottom,0)}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-container.sc-ion-action-sheet-ios{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-container.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}\\@supports ((-webkit-backdrop-filter:blur(0)) or (backdrop-filter:blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios, .action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(var(--ion-background-color-rgb,255,255,255),.8)),to(rgba(var(--ion-background-color-rgb,255,255,255),.8))),-webkit-gradient(linear,left bottom,left top,from(rgba(var(--ion-background-color-rgb,255,255,255),.4)),color-stop(50%,rgba(var(--ion-background-color-rgb,255,255,255),.4)),color-stop(50%,rgba(var(--ion-background-color-rgb,255,255,255),.8)));background-image:linear-gradient(0deg,rgba(var(--ion-background-color-rgb,255,255,255),.8),rgba(var(--ion-background-color-rgb,255,255,255),.8) 100%),linear-gradient(0deg,rgba(var(--ion-background-color-rgb,255,255,255),.4),rgba(var(--ion-background-color-rgb,255,255,255),.4) 50%,rgba(var(--ion-background-color-rgb,255,255,255),.8) 0);background-repeat:no-repeat;background-position:top,bottom;background-size:100% calc(100% - 1px),100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb,255,255,255),.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear,left bottom,left top,from(rgba(var(--ion-text-color-rgb,0,0,0),.08)),color-stop(50%,rgba(var(--ion-text-color-rgb,0,0,0),.08)),color-stop(50%,transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg,rgba(var(--ion-text-color-rgb,0,0,0),.08),rgba(var(--ion-text-color-rgb,0,0,0),.08) 50%,transparent 0) bottom/100% 1px no-repeat transparent;padding-left:10px;padding-right:10px;padding-top:14px;padding-bottom:13px;color:var(--color,var(--ion-color-step-400,#999));font-size:13px;font-weight:400;text-align:center}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-title.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:15px;padding-bottom:0;font-size:12px}.action-sheet-button.sc-ion-action-sheet-ios{padding-left:18px;padding-right:18px;padding-top:18px;padding-bottom:18px;height:56px;font-size:20px;contain:strict}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-button.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:18px;padding-inline-start:18px;-webkit-padding-end:18px;padding-inline-end:18px}}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:.1em;font-size:28px}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:unset;-webkit-margin-end:.1em;margin-inline-end:.1em}}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:700}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios:after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios, .action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios, .action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger,#eb445a)}\\@media (any-hover:hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger,#eb445a)}}\"; }\n};\nconst buttonClass = (button) => {\n return Object.assign({ 'action-sheet-button': true, 'ion-activatable': true, 'ion-focusable': true, [`action-sheet-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));\n};\n\nexport { ActionSheet as ion_action_sheet };\n"],"sourceRoot":"webpack:///"}
|
package/www/0-es2015.js 3.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/ion-action-sheet-ios.entry.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAA6H;AAC/F;AACC;AACgC;AACyF;AACjG;;AAEvD;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA,0BAA0B,gEAAe;AACzC,8BAA8B,gEAAe;AAC7C,6BAA6B,gEAAe;AAC5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA,QAAQ,2DAAgB;AACxB;AACA,oBAAoB,2DAAU;AAC9B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oCAAoC,uDAAQ;AAC5C;AACA;AACA;AACA,gBAAgB,+DAAQ;AACxB;AACA;AACA;AACA;AACA,QAAQ,+DAAc;AACtB,0BAA0B,2DAAW;AACrC,2BAA2B,2DAAW;AACtC,2BAA2B,2DAAW;AACtC,0BAA0B,2DAAW;AACrC;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAO;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAO;AACtB;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAW;AAC1B;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,+DAAW;AAC1B;AACA;AACA;AACA,YAAY,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","file":"0-es2015.js","sourcesContent":["import { r as registerInstance, c as getIonMode, d as createEvent, h, H as Host, e as getElement } from './core-80bde1aa.js';\nimport './config-3c7f3790.js';\nimport './helpers-46f4a262.js';\nimport { c as createAnimation } from './animation-0084d55f.js';\nimport { B as BACKDROP, i as isCancel, d as prepareOverlay, e as present, f as dismiss, g as eventMethod, s as safeCall } from './overlays-992cb809.js';\nimport { g as getClassMap } from './theme-18cbe2cc.js';\n\n/**\r\n * iOS Action Sheet Enter Animation\r\n */\r\nconst iosEnterAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)');\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(100%)', 'translateY(0%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(400)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * iOS Action Sheet Leave Animation\r\n */\r\nconst iosLeaveAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 'var(--backdrop-opacity)', 0);\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(0%)', 'translateY(100%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(450)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * MD Action Sheet Enter Animation\r\n */\r\nconst mdEnterAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 0.01, 'var(--backdrop-opacity)');\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(100%)', 'translateY(0%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(400)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\n/**\r\n * MD Action Sheet Leave Animation\r\n */\r\nconst mdLeaveAnimation = (baseEl) => {\r\n const baseAnimation = createAnimation();\r\n const backdropAnimation = createAnimation();\r\n const wrapperAnimation = createAnimation();\r\n backdropAnimation\r\n .addElement(baseEl.querySelector('ion-backdrop'))\r\n .fromTo('opacity', 'var(--backdrop-opacity)', 0);\r\n wrapperAnimation\r\n .addElement(baseEl.querySelector('.action-sheet-wrapper'))\r\n .fromTo('transform', 'translateY(0%)', 'translateY(100%)');\r\n return baseAnimation\r\n .addElement(baseEl)\r\n .easing('cubic-bezier(.36,.66,.04,1)')\r\n .duration(450)\r\n .addAnimation([backdropAnimation, wrapperAnimation]);\r\n};\n\nconst ActionSheet = class {\n constructor(hostRef) {\n registerInstance(this, hostRef);\n this.presented = false;\n this.mode = getIonMode(this);\n /**\n * If `true`, the keyboard will be automatically dismissed when the overlay is presented.\n */\n this.keyboardClose = true;\n /**\n * An array of buttons for the action sheet.\n */\n this.buttons = [];\n /**\n * If `true`, the action sheet will be dismissed when the backdrop is clicked.\n */\n this.backdropDismiss = true;\n /**\n * If `true`, the action sheet will be translucent.\n * Only applies when the mode is `\"ios\"` and the device supports\n * [`backdrop-filter`](https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility).\n */\n this.translucent = false;\n /**\n * If `true`, the action sheet will animate.\n */\n this.animated = true;\n this.onBackdropTap = () => {\n this.dismiss(undefined, BACKDROP);\n };\n this.dispatchCancelHandler = (ev) => {\n const role = ev.detail.role;\n if (isCancel(role)) {\n const cancelButton = this.getButtons().find(b => b.role === 'cancel');\n this.callButtonHandler(cancelButton);\n }\n };\n prepareOverlay(this.el);\n this.didPresent = createEvent(this, \"ionActionSheetDidPresent\", 7);\n this.willPresent = createEvent(this, \"ionActionSheetWillPresent\", 7);\n this.willDismiss = createEvent(this, \"ionActionSheetWillDismiss\", 7);\n this.didDismiss = createEvent(this, \"ionActionSheetDidDismiss\", 7);\n }\n /**\n * Present the action sheet overlay after it has been created.\n */\n present() {\n return present(this, 'actionSheetEnter', iosEnterAnimation, mdEnterAnimation);\n }\n /**\n * Dismiss the action sheet overlay after it has been presented.\n *\n * @param data Any data to emit in the dismiss events.\n * @param role The role of the element that is dismissing the action sheet.\n * This can be useful in a button handler for determining which button was\n * clicked to dismiss the action sheet.\n * Some examples include: ``\"cancel\"`, `\"destructive\"`, \"selected\"`, and `\"backdrop\"`.\n */\n dismiss(data, role) {\n return dismiss(this, data, role, 'actionSheetLeave', iosLeaveAnimation, mdLeaveAnimation);\n }\n /**\n * Returns a promise that resolves when the action sheet did dismiss.\n */\n onDidDismiss() {\n return eventMethod(this.el, 'ionActionSheetDidDismiss');\n }\n /**\n * Returns a promise that resolves when the action sheet will dismiss.\n *\n */\n onWillDismiss() {\n return eventMethod(this.el, 'ionActionSheetWillDismiss');\n }\n async buttonClick(button) {\n const role = button.role;\n if (isCancel(role)) {\n return this.dismiss(undefined, role);\n }\n const shouldDismiss = await this.callButtonHandler(button);\n if (shouldDismiss) {\n return this.dismiss(undefined, button.role);\n }\n return Promise.resolve();\n }\n async callButtonHandler(button) {\n if (button) {\n // a handler has been provided, execute it\n // pass the handler the values from the inputs\n const rtn = await safeCall(button.handler);\n if (rtn === false) {\n // if the return value of the handler is false then do not dismiss\n return false;\n }\n }\n return true;\n }\n getButtons() {\n return this.buttons.map(b => {\n return (typeof b === 'string')\n ? { text: b }\n : b;\n });\n }\n render() {\n const mode = getIonMode(this);\n const allButtons = this.getButtons();\n const cancelButton = allButtons.find(b => b.role === 'cancel');\n const buttons = allButtons.filter(b => b.role !== 'cancel');\n return (h(Host, { role: \"dialog\", \"aria-modal\": \"true\", style: {\n zIndex: `${20000 + this.overlayIndex}`,\n }, class: Object.assign(Object.assign({ [mode]: true }, getClassMap(this.cssClass)), { 'action-sheet-translucent': this.translucent }), onIonActionSheetWillDismiss: this.dispatchCancelHandler, onIonBackdropTap: this.onBackdropTap }, h(\"ion-backdrop\", { tappable: this.backdropDismiss }), h(\"div\", { class: \"action-sheet-wrapper\", role: \"dialog\" }, h(\"div\", { class: \"action-sheet-container\" }, h(\"div\", { class: \"action-sheet-group\" }, this.header !== undefined &&\n h(\"div\", { class: \"action-sheet-title\" }, this.header, this.subHeader && h(\"div\", { class: \"action-sheet-sub-title\" }, this.subHeader)), buttons.map(b => h(\"button\", { type: \"button\", class: buttonClass(b), onClick: () => this.buttonClick(b) }, h(\"span\", { class: \"action-sheet-button-inner\" }, b.icon && h(\"ion-icon\", { icon: b.icon, lazy: false, class: \"action-sheet-icon\" }), b.text), mode === 'md' && h(\"ion-ripple-effect\", null)))), cancelButton &&\n h(\"div\", { class: \"action-sheet-group action-sheet-group-cancel\" }, h(\"button\", { type: \"button\", class: buttonClass(cancelButton), onClick: () => this.buttonClick(cancelButton) }, h(\"span\", { class: \"action-sheet-button-inner\" }, cancelButton.icon &&\n h(\"ion-icon\", { icon: cancelButton.icon, lazy: false, class: \"action-sheet-icon\" }), cancelButton.text), mode === 'md' && h(\"ion-ripple-effect\", null)))))));\n }\n get el() { return getElement(this); }\n static get style() { return \".sc-ion-action-sheet-ios-h{--color:initial;--button-color-activated:var(--button-color);--button-color-focused:var(--button-color);--button-color-hover:var(--button-color);--button-color-selected:var(--button-color);--min-width:auto;--width:100%;--max-width:500px;--min-height:auto;--height:100%;--max-height:calc(100% - (var(--ion-safe-area-top) + var(--ion-safe-area-bottom)));-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;left:0;right:0;top:0;bottom:0;display:block;position:fixed;font-family:var(--ion-font-family,inherit);-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;z-index:1001}.overlay-hidden.sc-ion-action-sheet-ios-h{display:none}.action-sheet-wrapper.sc-ion-action-sheet-ios{left:0;right:0;bottom:0;margin-top:auto;margin-bottom:auto;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0);display:block;position:absolute;width:var(--width);min-width:var(--min-width);max-width:var(--max-width);height:var(--height);min-height:var(--min-height);max-height:var(--max-height);z-index:10;pointer-events:none}.action-sheet-button.sc-ion-action-sheet-ios{display:block;position:relative;width:100%;border:0;outline:none;background:var(--button-background);color:var(--button-color);font-family:inherit;overflow:hidden}.action-sheet-button-inner.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;position:relative;-ms-flex-flow:row nowrap;flex-flow:row nowrap;-ms-flex-negative:0;flex-shrink:0;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;width:100%;height:100%;z-index:1}.action-sheet-container.sc-ion-action-sheet-ios{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:end;justify-content:flex-end;height:100%;max-height:100%}.action-sheet-group.sc-ion-action-sheet-ios{-ms-flex-negative:2;flex-shrink:2;overscroll-behavior-y:contain;overflow-y:auto;-webkit-overflow-scrolling:touch;pointer-events:all;background:var(--background)}.action-sheet-group.sc-ion-action-sheet-ios::-webkit-scrollbar{display:none}.action-sheet-group-cancel.sc-ion-action-sheet-ios{-ms-flex-negative:0;flex-shrink:0;overflow:hidden}.action-sheet-button.sc-ion-action-sheet-ios:after{left:0;right:0;top:0;bottom:0;position:absolute;content:\\\"\\\";opacity:0}.action-sheet-selected.sc-ion-action-sheet-ios{color:var(--button-color-selected)}.action-sheet-selected.sc-ion-action-sheet-ios:after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios{color:var(--button-color-activated)}.action-sheet-button.ion-activated.sc-ion-action-sheet-ios:after{background:var(--button-background-activated);opacity:var(--button-background-activated-opacity)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios{color:var(--button-color-focused)}.action-sheet-button.ion-focused.sc-ion-action-sheet-ios:after{background:var(--button-background-focused);opacity:var(--button-background-focused-opacity)}\\@media (any-hover:hover){.action-sheet-button.sc-ion-action-sheet-ios:hover{color:var(--button-color-hover)}.action-sheet-button.sc-ion-action-sheet-ios:hover:after{background:var(--button-background-hover);opacity:var(--button-background-hover-opacity)}}.sc-ion-action-sheet-ios-h{--background:var(--ion-overlay-background-color,var(--ion-color-step-100,#f9f9f9));--backdrop-opacity:var(--ion-backdrop-opacity,0.4);--button-background:linear-gradient(0deg,rgba(var(--ion-text-color-rgb,0,0,0),0.08),rgba(var(--ion-text-color-rgb,0,0,0),0.08) 50%,transparent 0) bottom/100% 1px no-repeat transparent;--button-background-activated:var(--ion-text-color,#000);--button-background-activated-opacity:.08;--button-background-hover:currentColor;--button-background-hover-opacity:.04;--button-background-focused:currentColor;--button-background-focused-opacity:.12;--button-background-selected:var(--ion-background-color,#fff);--button-background-selected-opacity:1;--button-color:var(--ion-color-primary,#3880ff);--color:var(--ion-color-step-400,#999);text-align:center}.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:auto;margin-right:auto;margin-top:var(--ion-safe-area-top,0);margin-bottom:var(--ion-safe-area-bottom,0)}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-wrapper.sc-ion-action-sheet-ios{margin-left:unset;margin-right:unset;-webkit-margin-start:auto;margin-inline-start:auto;-webkit-margin-end:auto;margin-inline-end:auto}}.action-sheet-container.sc-ion-action-sheet-ios{padding-left:8px;padding-right:8px;padding-top:0;padding-bottom:0}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-container.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:8px;padding-inline-start:8px;-webkit-padding-end:8px;padding-inline-end:8px}}.action-sheet-group.sc-ion-action-sheet-ios{border-radius:13px;margin-bottom:8px}.action-sheet-group.sc-ion-action-sheet-ios:first-child{margin-top:10px}.action-sheet-group.sc-ion-action-sheet-ios:last-child{margin-bottom:10px}\\@supports ((-webkit-backdrop-filter:blur(0)) or (backdrop-filter:blur(0))){.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-group.sc-ion-action-sheet-ios{background-color:transparent;-webkit-backdrop-filter:saturate(280%) blur(20px);backdrop-filter:saturate(280%) blur(20px)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.sc-ion-action-sheet-ios, .action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-title.sc-ion-action-sheet-ios{background-color:transparent;background-image:-webkit-gradient(linear,left bottom,left top,from(rgba(var(--ion-background-color-rgb,255,255,255),.8)),to(rgba(var(--ion-background-color-rgb,255,255,255),.8))),-webkit-gradient(linear,left bottom,left top,from(rgba(var(--ion-background-color-rgb,255,255,255),.4)),color-stop(50%,rgba(var(--ion-background-color-rgb,255,255,255),.4)),color-stop(50%,rgba(var(--ion-background-color-rgb,255,255,255),.8)));background-image:linear-gradient(0deg,rgba(var(--ion-background-color-rgb,255,255,255),.8),rgba(var(--ion-background-color-rgb,255,255,255),.8) 100%),linear-gradient(0deg,rgba(var(--ion-background-color-rgb,255,255,255),.4),rgba(var(--ion-background-color-rgb,255,255,255),.4) 50%,rgba(var(--ion-background-color-rgb,255,255,255),.8) 0);background-repeat:no-repeat;background-position:top,bottom;background-size:100% calc(100% - 1px),100% 1px;-webkit-backdrop-filter:saturate(120%);backdrop-filter:saturate(120%)}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-button.ion-activated.sc-ion-action-sheet-ios{background-color:rgba(var(--ion-background-color-rgb,255,255,255),.7);background-image:none}.action-sheet-translucent.sc-ion-action-sheet-ios-h .action-sheet-cancel.sc-ion-action-sheet-ios{background:var(--button-background-selected)}}.action-sheet-title.sc-ion-action-sheet-ios{background:-webkit-gradient(linear,left bottom,left top,from(rgba(var(--ion-text-color-rgb,0,0,0),.08)),color-stop(50%,rgba(var(--ion-text-color-rgb,0,0,0),.08)),color-stop(50%,transparent)) bottom/100% 1px no-repeat transparent;background:linear-gradient(0deg,rgba(var(--ion-text-color-rgb,0,0,0),.08),rgba(var(--ion-text-color-rgb,0,0,0),.08) 50%,transparent 0) bottom/100% 1px no-repeat transparent;padding-left:10px;padding-right:10px;padding-top:14px;padding-bottom:13px;color:var(--color,var(--ion-color-step-400,#999));font-size:13px;font-weight:400;text-align:center}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-title.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:10px;padding-inline-start:10px;-webkit-padding-end:10px;padding-inline-end:10px}}.action-sheet-sub-title.sc-ion-action-sheet-ios{padding-left:0;padding-right:0;padding-top:15px;padding-bottom:0;font-size:12px}.action-sheet-button.sc-ion-action-sheet-ios{padding-left:18px;padding-right:18px;padding-top:18px;padding-bottom:18px;height:56px;font-size:20px;contain:strict}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-button.sc-ion-action-sheet-ios{padding-left:unset;padding-right:unset;-webkit-padding-start:18px;padding-inline-start:18px;-webkit-padding-end:18px;padding-inline-end:18px}}.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:.1em;font-size:28px}\\@supports ((-webkit-margin-start:0) or (margin-inline-start:0)) or (-webkit-margin-start:0){.action-sheet-button.sc-ion-action-sheet-ios .action-sheet-icon.sc-ion-action-sheet-ios{margin-right:unset;-webkit-margin-end:.1em;margin-inline-end:.1em}}.action-sheet-button.sc-ion-action-sheet-ios:last-child{background-image:none}.action-sheet-selected.sc-ion-action-sheet-ios{font-weight:700}.action-sheet-cancel.sc-ion-action-sheet-ios{font-weight:600}.action-sheet-cancel.sc-ion-action-sheet-ios:after{background:var(--button-background-selected);opacity:var(--button-background-selected-opacity)}.action-sheet-destructive.sc-ion-action-sheet-ios, .action-sheet-destructive.ion-activated.sc-ion-action-sheet-ios, .action-sheet-destructive.ion-focused.sc-ion-action-sheet-ios{color:var(--ion-color-danger,#eb445a)}\\@media (any-hover:hover){.action-sheet-destructive.sc-ion-action-sheet-ios:hover{color:var(--ion-color-danger,#eb445a)}}\"; }\n};\nconst buttonClass = (button) => {\n return Object.assign({ 'action-sheet-button': true, 'ion-activatable': true, 'ion-focusable': true, [`action-sheet-${button.role}`]: button.role !== undefined }, getClassMap(button.cssClass));\n};\n\nexport { ActionSheet as ion_action_sheet };\n"],"sourceRoot":"webpack:///"}
|