@wazo/sdk 0.38.2 → 0.38.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/README.md CHANGED
@@ -615,6 +615,8 @@ Wazo.Softphone.init({
615
615
  wrapUpDuration, // How long (in seconds) should the softphone display the card after the call (optional).
616
616
  // When the user changes anything on the card, this timeout is canceled
617
617
  enableAgent, // display the agent tab in the tab bar (defaults to true).
618
+ tenantId, // Tenant id used for LDAP connection
619
+ debug, // Set to `true` to display wording customization labels
618
620
  });
619
621
  ```
620
622
 
@@ -653,10 +655,14 @@ Wazo.Softphone.setCardValue(field, value);
653
655
  ```
654
656
 
655
657
  #### Customizing page style
658
+
659
+ You can inspect the iframe with your dev tool console to figure out how to override styles.
660
+
656
661
  ```js
657
662
  Wazo.Softphone.injectCss(`
658
- body {
659
- background-color: #eee;
663
+ # Reduce dialer number font size
664
+ .keypad-number, .keypad-number::placeholder {
665
+ font-size: 20px;
660
666
  }
661
667
  `);
662
668
  ```
@@ -664,11 +670,36 @@ Wazo.Softphone.injectCss(`
664
670
  #### Override appearance
665
671
  ```js
666
672
  Softphone.customizeAppearance({
667
- // Theme
673
+ // Theme, default values :
674
+ primary: '#203890',
675
+ button: '#292C87',
676
+ black: '#000',
677
+ white: '#fff',
678
+ greenButton: '#7ed865',
679
+ greenButtonHover: '#6ebf5a',
680
+ redButton: '#FA5846',
681
+ redButtonHover: '#FF604F',
682
+ buttonText: '#fff',
683
+ error: '#E80539',
684
+ secondary: '#203890',
685
+ grey: '#8A95A0',
686
+ secondGrey: '#eee',
687
+ headerColor: '#888',
688
+ avatar: '#bdbdbd',
689
+ divider: 'rgba(0, 0, 0, 0.12)',
690
+ placeholder: 'rgba(22, 44, 66, 0.5)',
691
+ hovered: '#6181F4',
668
692
  }, {
669
693
  // Translation
694
+ // Set `debug: true` to know where to change translations, eg:
695
+ en: {
696
+ user: {
697
+ login: 'My login button', // will be displayed as `user:login` in the button when settings `debug: true` in the init() method
698
+ },
699
+ },
670
700
  }, {
671
701
  // Assets
702
+ // logo: [url to your logo],
672
703
  });
673
704
  ```
674
705
 
@@ -742,6 +773,22 @@ Softphone.onCallIncoming = call => {
742
773
  // You can make action here like redirecting to the contact page (by using `call.number).
743
774
  };
744
775
 
776
+ Softphone.onCallLocallyAnswered = call => {
777
+ // Invoked when the user accepts the call locally
778
+ };
779
+
780
+ Softphone.onCallRemotelyAnswered = call => {
781
+ // Invoked when the other party accepts the call
782
+ };
783
+
784
+ Softphone.onOutgoingCallMade = call => {
785
+ // Invoked when the user makes a call
786
+ };
787
+
788
+ Softphone.onCallRejected = call => {
789
+ // Invoked when the user rejects an incoming call
790
+ };
791
+
745
792
  Softphone.onCallEnded = (call, card, direction) => {
746
793
  // Invoked when the call is ended
747
794
  };