Skip to content

Commit

Permalink
Add Beacon.framework 0.41.
Browse files Browse the repository at this point in the history
  • Loading branch information
samsymons committed Jul 17, 2018
1 parent 2b53243 commit e4c269a
Show file tree
Hide file tree
Showing 106 changed files with 387 additions and 101 deletions.
Binary file modified Beacon.framework/Beacon
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/Assets.car
Binary file not shown.
Binary file added Beacon.framework/Beacon.bundle/Beacon
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconAttachmentCell.nib
Binary file not shown.
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconDateCustomField.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconDatePicker.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconDropdownCustomField.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconDropdownPicker.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconMultilineCustomField.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconNumberCustomField.nib
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconSearchFooterView.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/BeaconSinglelineCustomField.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/HSBeaconLoadingViewController.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/HSBeaconSearchResultsCell.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/HSStatusMessageViewController.nib
Binary file not shown.
Binary file modified Beacon.framework/Beacon.bundle/Info.plist
Binary file not shown.
14 changes: 12 additions & 2 deletions Beacon.framework/Beacon.bundle/article.css
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ html {

.c-BeaconHistoryTimelineListItem a:hover { color: #2091d9; text-decoration: underline; }

#fullArticle { color: #4f5d6b; font-family: 'Roboto', 'Helvetica', sans-serif; line-height: 1.75em; }
#fullArticle { color: #4f5d6b; font-family: '-apple-system'; line-height: 1.75em; }

#fullArticle { box-sizing: border-box; }

#fullArticle { font-family: "Roboto", "Helvetica", sans-serif; font-size: 14px; }
#fullArticle { font-family: '-apple-system'; font-size: 14px; }

#fullArticle * { box-sizing: border-box; }

Expand Down Expand Up @@ -197,3 +197,13 @@ html {
#fullArticle .callout-red.dashed { border: 1px dashed #e52f28; }

#fullArticle { padding: 0 15px; }

#fullArticle .c-Article__title {
color: #2a3b47;
font-size: 20px;
line-height: 1.2;
margin-right: 20px;
margin-bottom: 15px;
word-wrap: break-word;
font-weight: 500;
}
13 changes: 11 additions & 2 deletions Beacon.framework/Headers/HSBeaconUser.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

/**
`HSBeaconUser` represents a user identified with Help Scout, allowing you to
match up support requests to your customer base.
Expand All @@ -12,12 +14,12 @@
/**
The email address for the current user.
*/
@property(strong, nonatomic) NSString *email;
@property(strong, nonatomic, nullable) NSString *email;

/**
The name of the current user.
*/
@property(strong, nonatomic) NSString *name;
@property(strong, nonatomic, nullable) NSString *name;

/**
The attributes for the current user. These are arbitrary key/value pairs that
Expand All @@ -44,4 +46,11 @@
*/
- (void)clearAttributes;

/**
Check if two users are equal
*/
- (BOOL)isEqualToBeaconUser:(HSBeaconUser *)user;

@end

NS_ASSUME_NONNULL_END
Binary file modified Beacon.framework/Info.plist
Binary file not shown.
81 changes: 45 additions & 36 deletions Beacon.framework/Modules/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -4,55 +4,64 @@ framework module Beacon {
module * { export * }

explicit module Private {
header "HSBeaconConfig.h"
header "HSBeaconEmailValidator.h"
header "HSBeaconContext.h"
header "HSBeaconActivityLog.h"
header "HSBeaconAgent.h"
header "HSBeaconAgentsView.h"
header "HSBeaconArticle.h"
header "HSBeaconArticleDetails.h"
header "HSBeaconArticleSearchResult.h"
header "HSBeaconPaging.h"
header "HSBeaconPaginatedResponse.h"
header "HSBeaconAttachment.h"
header "HSBeaconAttachmentsTableView.h"
header "HSBeaconBaseAPIClient.h"
header "HSBeaconSuggestion.h"
header "HSBeaconDocsAPIClient.h"
header "HSBeaconBundleUtils.h"
header "HSBeaconChatTranscript.h"
header "HSBeaconChatTranscriptEvent.h"
header "HSBeaconCloudFrontAPIClient.h"
header "HSBeaconColorUtilities.h"
header "HSBeaconConfig.h"
header "HSBeaconContactFormField.h"
header "HSBeaconContactFormViewController.h"
header "HSBeaconContext.h"
header "HSBeaconContext.h"
header "HSBeaconConversation.h"
header "HSBeaconConversationThread.h"
header "HSBeaconCoordinator.h"
header "HSBeaconCustomFieldDefinition.h"
header "HSBeaconCustomFieldValue.h"
header "HSCardSegue.h"
header "HSBeaconPlaceholderTextViewDelegate.h"
header "HSBeaconCustomFieldEntryView.h"
header "HSBeaconMultilineCustomFieldView.h"
header "HSBeaconNumberCustomFieldView.h"
header "HSBeaconSinglelineCustomFieldView.h"
header "HSBeaconMaxLengthTruncator.h"
header "HSBeaconCustomFieldsEntryController.h"
header "HSBeaconCustomFieldValue.h"
header "HSBeaconDocsAPIClient.h"
header "HSBeaconEmailMessage.h"
header "HSBeaconEmailValidator.h"
header "HSBeaconErrorView.h"
header "HSBeaconKeychainWrapper.h"
header "HSBeaconLayoutUtilities.h"
header "HSBeaconLoadingViewController.h"
header "HSBeaconRelatedArticlesTableView.h"
header "HSBeaconMessageSentController.h"
header "HSBeaconBundleUtils.h"
header "HSBeaconLocalizedStrings.h"
header "HSBeaconActivityLog.h"
header "HSBeaconKeychainWrapper.h"
header "HSTintColor.h"
header "HSBeaconMaxLengthTruncator.h"
header "HSBeaconMessageEntryContainerController.h"
header "HSBeaconMessageSentController.h"
header "HSBeaconMessagingAPIClient.h"
header "HSBeaconCloudFrontAPIClient.h"
header "HSBeaconMultilineCustomFieldView.h"
header "HSBeaconNumberCustomFieldView.h"
header "HSBeaconPaginatedResponse.h"
header "HSBeaconPaging.h"
header "HSBeaconPlaceholderTextViewDelegate.h"
header "HSBeaconPreviousMessagesController.h"
header "HSBeaconRelatedArticlesTableView.h"
header "HSBeaconReplyMessage.h"
header "HSBeaconSecurityInfo.h"
header "HSBeaconUserDeviceInfo.h"
header "HSBeaconAgent.h"
header "HSBeaconAttachment.h"
header "HSBeaconEmailMessage.h"
header "HSBeaconSinglelineCustomFieldView.h"
header "HSStatusMessageViewController.h"
header "HSBeaconSubmitButton.h"
header "HSBeaconSuggestion.h"
header "HSBeaconSuggestionsContainerController.h"
header "HSBeaconUser.h"
header "HSBeaconColorUtilities.h"
header "HSBeaconReplyMessage.h"
header "HSBeaconCoordinator.h"
header "HSSuggestionsCoordinator.h"
header "HSBeaconUserDeviceInfo.h"
header "HSCardSegue.h"
header "HSContactCoordinator.h"
header "HSBeaconSuggestionsContainerController.h"
header "HSBeaconMessageEntryContainerController.h"
header "HSBeaconAgentsView.h"
header "HSBeaconContext.h"
header "HSBeaconCustomFieldsEntryController.h"
header "HSBeaconErrorView.h"
header "HSBeaconSubmitButton.h"
header "HSSuggestionsCoordinator.h"
header "HSTintColor.h"

export *
}
Expand Down
4 changes: 4 additions & 0 deletions Beacon.framework/PrivateHeaders/HSBeaconActivityLog.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface HSBeaconActivityLog: NSObject

- (void)addActivityOfType: (NSString *)type attributes: (NSDictionary *)dictionary;
Expand All @@ -9,3 +11,5 @@
- (void)clearLog;

@end

NS_ASSUME_NONNULL_END
4 changes: 4 additions & 0 deletions Beacon.framework/PrivateHeaders/HSBeaconArticleDetails.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface HSBeaconArticleDetails: NSObject

@property (readonly, nonatomic, nonnull) NSString *identifier;
Expand All @@ -15,3 +17,5 @@
- (NSString * _Nullable)linkedArticleIdForUrl:(NSString *_Nonnull)url;

@end

NS_ASSUME_NONNULL_END
2 changes: 1 addition & 1 deletion Beacon.framework/PrivateHeaders/HSBeaconAttachment.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
@property(nonatomic) float progress;
@property(nonatomic) BOOL uploadStarted;

-(instancetype)initWithData: (NSData *)data filename: (NSString *)filename image: (UIImage *)image;
- (nonnull instancetype)initWithData:(NSData *_Nonnull)data filename:(NSString *_Nonnull)filename image:(UIImage *_Nullable)image;

@end
29 changes: 13 additions & 16 deletions Beacon.framework/PrivateHeaders/HSBeaconAttachmentsTableView.h
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
#import <UIKit/UIKit.h>

#import "HSBeaconAttachment.h"
#import "HSBeaconAttachmentTableViewCell.h"
#import "HSBeaconContext.h"

@protocol HSBeaconAttachmentsTableViewDelegate

-(void)attachmentsTableShowError:(NSString *)error;
@class HSBeaconAttachmentTableViewCell;

-(void)attachmentUploadComplete;
@protocol HSBeaconAttachmentsTableViewDelegate

-(void)attachmentsTableLayoutChanged:(CGFloat)newHeight;
- (void)attachmentsTableShowError:(NSString *)error;
- (void)attachmentUploadComplete;
- (void)attachmentsTableLayoutChanged:(CGFloat)newHeight;

@end

@interface HSBeaconAttachmentsTableView : UITableView

@property(nonatomic) HSBeaconContext *beaconContext;

@property(nonatomic) NSMutableArray<HSBeaconAttachment *> *attachments;

@property(weak) id<HSBeaconAttachmentsTableViewDelegate> attachmentsTableDelegate;
@property (nonatomic) HSBeaconContext *beaconContext;
@property (nonatomic) NSMutableArray<HSBeaconAttachment *> *attachments;
@property (weak) id<HSBeaconAttachmentsTableViewDelegate> attachmentsTableDelegate;

-(void)addAttachment:(HSBeaconAttachment *)attachment;
- (void)addAttachment:(HSBeaconAttachment *)attachment;

-(BOOL)canAddAttachment;
- (BOOL)canAddAttachment;

-(BOOL)hasPendingUpload;
- (BOOL)hasPendingUpload;

-(BOOL)sendPendingUploads;
- (BOOL)sendPendingUploads;

-(void)clearAttachments;
- (void)clearAttachments;

@end
2 changes: 2 additions & 0 deletions Beacon.framework/PrivateHeaders/HSBeaconBundleUtils.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@

+ (NSBundle * _Nonnull)beaconBundle;

+ (UIViewController *)viewControllerInStoryboard:(NSString *_Nonnull)storyboardName viewControllerIdentifier:(NSString *_Nonnull)identifier;

@end
15 changes: 15 additions & 0 deletions Beacon.framework/PrivateHeaders/HSBeaconChatTranscript.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#import <Foundation/Foundation.h>

#import "HSBeaconChatTranscriptEvent.h"

NS_ASSUME_NONNULL_BEGIN

@interface HSBeaconChatTranscript : NSObject

@property NSArray<HSBeaconChatTranscriptEvent *> *events;

- (instancetype)initWithDictionary:(NSDictionary *)dictionary;

@end

NS_ASSUME_NONNULL_END
22 changes: 22 additions & 0 deletions Beacon.framework/PrivateHeaders/HSBeaconChatTranscriptEvent.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#import <Foundation/Foundation.h>
#import "HSBeaconAgent.h"

NS_ASSUME_NONNULL_BEGIN

@interface HSBeaconChatTranscriptEvent : NSObject

@property (readonly, nonatomic) NSDate *createdAt;

@property (readonly, nonatomic) NSString *body;

@property (readonly, nonatomic, nullable) NSArray *attachments;

@property (readonly, nonatomic, nullable) HSBeaconAgent *agent;

@property (readonly, nonatomic) NSString *createdByType;

- (_Nonnull instancetype)initWithDictionary:(NSDictionary *)dictionary agent:(HSBeaconAgent * _Nullable)agent;

@end

NS_ASSUME_NONNULL_END
30 changes: 30 additions & 0 deletions Beacon.framework/PrivateHeaders/HSBeaconContactFormField.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#import <UIKit/UIKit.h>

@class HSBeaconContactFormField;

@protocol HSBeaconContactFormFieldDelegate

- (void)contactFormFieldTextChanged:(HSBeaconContactFormField *)field;

@end

@interface HSBeaconContactFormField : UIView

@property (weak, nonatomic) IBOutlet UITextField *inputField;
@property (weak, nonatomic) IBOutlet UIView *topErrorBar;
@property (weak, nonatomic) IBOutlet UIView *bottomErrorBar;
@property (weak, nonatomic) IBOutlet UIImageView *errorIcon;
@property (weak, nonatomic) id<HSBeaconContactFormFieldDelegate> delegate;
@property (strong, nonatomic) IBOutlet UIView *contentView;

- (void)showError;

- (void)hideError;

- (NSString *)text;

- (void)setText:(NSString *)text;

- (void)setPlaceholder:(NSString *)placeholder;

@end
Original file line number Diff line number Diff line change
@@ -1,29 +1,26 @@
#import <UIKit/UIKit.h>

#import "HSBeaconContext.h"
#import "HSBeaconAttachmentsTableView.h"
#import "HSBeaconContactFormField.h"
#import "HSBeaconEmailMessage.h"

@class HSBeaconContactFormController;
@class HSBeaconAttachmentsTableView;
@class HSBeaconContactFormViewController;
@class HSBeaconContactFormField;
@class HSBeaconEmailMessage;

@protocol HSBeaconContactFormControllerDelegate
@required
- (void)contactFormControllerDidChangeAttachmentCount:(HSBeaconContactFormController *)controller;

- (void)contactFormControllerDidChangeAttachmentCount:(HSBeaconContactFormViewController *)controller;
- (void)contactFormControllerEnableSubmit:(BOOL)enabled;

- (void)showErrorMessage:(NSString *)errorMessage;

@end

#pragma mark -

@interface HSBeaconContactFormController: UIViewController
@interface HSBeaconContactFormViewController: UIViewController

@property (nonatomic, weak) id<HSBeaconContactFormControllerDelegate> delegate;
@property (strong, nonatomic) HSBeaconContext *beaconContext;

@property (nonatomic) BOOL sendQueued;

@property (weak, nonatomic) IBOutlet HSBeaconContactFormField *nameField;
@property (weak, nonatomic) IBOutlet HSBeaconContactFormField *subjectField;
Expand All @@ -40,26 +37,30 @@
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *subjectHeight;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *emailHeight;

+ (instancetype)instantiateViewController;

- (BOOL)canAddAttachment;

-(void)addAttachment:(HSBeaconAttachment *)attachment;
- (void)addAttachment:(HSBeaconAttachment *)attachment;

/*!
@brief Check if we have a valid message to send
@return YES if validation passes, NO if there are errors
*/
-(BOOL)validateFieldsWithErrorsDisplayed:(BOOL)showErrors;
- (BOOL)validateFieldsWithErrorsDisplayed:(BOOL)showErrors;

/*!
@brief Upload any pending attachments
@return YES if attachments are pending, NO if it's okay to send the email message
*/
-(BOOL)queueAttachments;
- (BOOL)queueAttachments;

-(HSBeaconEmailMessage *)constructMessage;
- (HSBeaconEmailMessage *)constructMessage;

- (void)clearForm;

- (void)setCustomFieldDefinitions:(NSArray<HSBeaconCustomFieldDefinition *> *)fieldDefinitions;

@end
Loading

0 comments on commit e4c269a

Please sign in to comment.