Commit Graph

87 Commits

Author SHA1 Message Date
Ibby add49e8b4d refractor(): use Observable.fromEvent in wrapEventObservable 2017-02-04 04:16:57 -05:00
Ibby b85393de89 chore(): add CordovaOptions interface 2017-01-24 15:12:35 -05:00
Ibby b983de2145 feat(core): add PluginConfig interface
closes #996
2017-01-22 17:24:43 -05:00
Ibby da7a3707fa fix(core): fix plugin check 2017-01-22 17:12:24 -05:00
Peter Kelly cb293639bc fix(core): fix exception in CordovaProperty (#998)
This reverts part of commit 67adb23, which moved the call to getPlugin()
from within CordovaProperty() to a point where it was called too early.

When the CordovaProperty decorator is called on a property, the class
containing that call has not yet had its Plugin decorator called. Only
when the latter happens does pluginRef get set. Thus, attempting to
access pluginRef within CordovaProperty at the time of the call will
give undefined, and attemping to call getPlugin with an undefined value
will throw an exception:

    Runtime Error
    Cannot read property 'split' of undefined

    TypeError: Cannot read property 'split' of undefined
        at get
        at getPlugin
        at CordovaProperty
        at __decorate
        ...

The above message can be seen in the browser after running the 'ionic
serve' command.

This commit moves the getPlugin call back to the getters and setters
established by CordovaProperty, which are only called *after* the Plugin
decorator has finished executing.

closes #992
2017-01-22 17:11:52 -05:00
Ibby 67adb23a14 chore(): optimize CordovaProperty
closes #954
2017-01-10 20:45:11 -05:00
Ibby 9541009742 chore(): fix the callCordovaPlugin check
the previous approach doesn't handle __proto__ methods
2017-01-10 20:38:48 -05:00
Ibby Hadeed 5981622f3a chore(): replace try/catch with better approach (#956)
* chore(): replace try/catch with better approach

* optimize last commit
2017-01-10 07:06:44 -05:00
Ibby 9a5a62bc3a chore(): tslint 2017-01-07 07:59:06 -05:00
Ibby 54d1a9891b chore(): add try/catch for callCordovaPlugin method
closes #882
2017-01-07 05:26:38 -05:00
Ibby fa1f718412 chore(): fix clearWithArgs 2016-12-15 07:47:34 -05:00
Ibrahim Hadeed 3fabc4d72c chore(): clearWithArgs adds callbacks now 2016-12-15 07:42:15 -05:00
Ibby 7ae6e10375 fix(cordova-property): fixes static properties of classes 2016-12-06 07:33:40 -05:00
Ibrahim Hadeed b19f6d1ccd fix(contacts): fix few bugs in Contacts (#846) 2016-12-04 11:47:28 -05:00
Ibrahim Hadeed abc90f2e6a chore(): optimize CordovaProperty and InstanceProperty decorators (#635)
* chore(): optimize InstanceProperty wrapper

* chore(): optimize CordovaProperty wrapper

* tslint'

* fix decorators
2016-12-04 11:42:30 -05:00
Max Lynch 71916a85dd fix(plugin): don't bind to name field. Fixes #740 2016-10-27 12:48:50 -05:00
Ibby bec0eac122 style(): tslint 2016-10-27 09:17:11 -04:00
Ibby a72cd59b99 fix(sqlite): fix callback issue with transaction method
closes #732
2016-10-27 08:00:47 -04:00
Ramon Henrique Ornelas d3e6f3ba41 refactor(plugin): improvement pull #654 (#661) 2016-10-08 15:07:01 -04:00
ziggyJ 6f0f02bb66 fix google maps setPadding not working issue #573 (#654) 2016-10-06 20:33:42 -04:00
Ibby 6b286db51a chore(): add successIndex at the correct position if we have optional params 2016-10-05 23:19:45 -04:00
Max Lynch 47112c7c24 feat(plugin): checkInstall w/ warning msg 2016-09-25 18:17:09 -05:00
Max Lynch d45a2b5407 feat(plugin): add getPlugin to plugin interface. Fixes #582 2016-09-25 17:59:56 -05:00
Max Lynch f60d08b7a4 feat(plugin): cordova function override. fixes #437 2016-09-24 17:26:23 -05:00
Max Lynch 4014972feb feat(build): Support ES2015 modules 2016-09-21 15:04:46 -05:00
Daniel Imhoff 9d35567cb5 Fix import to use @reactivex/rxjs 2016-09-09 14:45:24 -05:00
Max Lynch d8baf3a814 Merge pull request #524 from mattlewis92/ng1-promise-tweak
fix(ng1): fail gracefully when angular 1 promises can't be retrieved
2016-09-07 10:07:53 -05:00
Matt Lewis 1facde3966 test(): add initial test suite (#523) 2016-09-06 21:42:29 -04:00
Matt Lewis d135dc26e2 fix(ng1): fail gracefully when angular 1 promises can't be retrieved 2016-09-02 18:19:56 +01:00
Max Lynch 2dc68a4785 fix(ng1): grab injector from app. #451 2016-09-01 13:37:43 -05:00
Ibrahim Hadeed 21d8122257 feat(file-opener): add file opener support (#497)
closes #295
2016-08-27 14:43:57 -04:00
Ramon Henrique Ornelas ed8c67ce7e chore(): tslint (#466)
* fix src tslint gulp ionic

* - fix errors tslint
2016-08-22 18:19:43 -04:00
Matt Lewis f3e698f1be feat(instagram): add instagram sharing plugin (#453)
Closes #307
2016-08-19 09:08:05 -04:00
Kevin Boosten 4e87ac72ea fix(): add the reject function at the expected errorIndex position in the args array (#436)
We don't want that the reject cb takes the position of an optional
argument that has not been defined
For example the Dialogs.alert method takes an optional 'buttonLabel'
string. In case we do not set this value, and thus want to use the
default value, the 'reject'
callback get spliced into this position due the fact that the splice
start index is bigger than the array length.
Dialogs.alert("title", "message", "My button text") --> args =
["title",  resolve, "message", "My button text", reject]
Dialogs.alert("title", "message") -->  args = ["title", resolve,
"message", reject] --> reject is on the position of the buttontitle!

The cordova-plugin-dialogs alert function receives the wrong arguments
—> alert: function(message, completeCallback, title, buttonLabel)
The buttonLabel will receive the "reject" callback instead of a
undefined value.
2016-08-17 07:34:11 -04:00
Matt Lewis 817a4340e7 fix(ng1): use $q promises instead of the native Promise (#378) 2016-07-31 14:24:56 -04:00
Guillermo 7952f9ef60 Improvements on documentation (#340)
* Improvements on documentation and some refactor

* ts | js -> typescript (docs)
2016-07-20 11:17:09 -04:00
Ibby Hadeed 5979e9a8b0 refactor(plugin): refreactor to match tslint rules 2016-07-18 11:39:53 -04:00
Ibrahim Hadeed 0aee6c88ce feat(otherPromise): can work better with plugins that return promises (#304) 2016-07-18 10:51:39 -04:00
Guille 8d82aff41f refactor(plugin): 2016-07-17 20:04:06 +02:00
Ibby Hadeed 4841f31a92 refactor(project): fix and optimize observables 2016-07-17 08:54:39 -04:00
Max Lynch be1725d2eb chore(comments): explain sync 2016-07-14 10:42:56 -05:00
Ibrahim Hadeed 9e3a866ba3 refactor(plugin): cleanup 2016-06-11 10:35:41 -04:00
Ibrahim Hadeed d624a37f55 refactor(plugin): get rid of TS error in IDE 2016-06-11 10:20:28 -04:00
Ibrahim Hadeed 4b121520dd Merge pull request #207 from driftyco/new-contacts
New contacts
2016-06-10 19:38:17 -04:00
Max Lynch 28e2f731f7 fix(plugin) only call clearFunction if defined. Fixes #210 2016-06-10 14:00:41 -05:00
Ibrahim Hadeed 411e6fc2a1 tweaks to make contact plugin work better 2016-06-10 01:10:50 -04:00
Ibrahim Hadeed 2d36c6b812 fix @InstanceProperty decorator, duplicate of get is set 2016-06-09 23:12:23 -04:00
Max Lynch af8fbde892 feat(angular1): Support Angular 1 2016-06-09 11:24:38 -05:00
Ibrahim Hadeed e708653136 change rxjs/Rxjs to rxjs/Observable 2016-06-03 10:05:07 -04:00
Ibrahim Hadeed 9987fb24da refractor Observable imports 2016-05-20 16:59:18 -04:00