@aks-dev/easyui 1.0.31 → 1.0.34
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/android/src/main/java/com/easyui/UpgradeModule.java +2 -2
- package/ios/UpgradeModule.m +80 -1
- package/ios/assets/infor_colse_image.png +0 -0
- package/ios/assets/upgrade_bg.png +0 -0
- package/ios/libs/LEEAlert/LEEAlert.h +462 -0
- package/ios/libs/LEEAlert/LEEAlert.m +3823 -0
- package/ios/libs/LEEAlert/LEEAlertHelper.h +153 -0
- package/ios/libs/SDAutoLayout/SDAutoLayout.h +24 -0
- package/ios/libs/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.h +169 -0
- package/ios/libs/SDAutoLayout/UITableView+SDAutoTableViewCellHeight.m +537 -0
- package/ios/libs/SDAutoLayout/UIView+SDAutoLayout.h +484 -0
- package/ios/libs/SDAutoLayout/UIView+SDAutoLayout.m +1812 -0
- package/ios/views/UpgradeView.h +23 -0
- package/ios/views/UpgradeView.m +172 -0
- package/jsbridge/index.ts +2 -1
- package/package.json +1 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
|
|
2
|
+
/*
|
|
3
|
+
* @header LEEAlertHelper.h
|
|
4
|
+
*
|
|
5
|
+
* ┌─┐ ┌───────┐ ┌───────┐ 帅™
|
|
6
|
+
* │ │ │ ┌─────┘ │ ┌─────┘
|
|
7
|
+
* │ │ │ └─────┐ │ └─────┐
|
|
8
|
+
* │ │ │ ┌─────┘ │ ┌─────┘
|
|
9
|
+
* │ └─────┐│ └─────┐ │ └─────┐
|
|
10
|
+
* └───────┘└───────┘ └───────┘
|
|
11
|
+
*
|
|
12
|
+
* @brief LEEAlertHelper
|
|
13
|
+
*
|
|
14
|
+
* @author LEE
|
|
15
|
+
* @copyright Copyright © 2016 - 2020年 lee. All rights reserved.
|
|
16
|
+
* @version V1.4.3
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
#ifndef LEEAlertHelper_h
|
|
20
|
+
#define LEEAlertHelper_h
|
|
21
|
+
|
|
22
|
+
FOUNDATION_EXPORT double LEEAlertVersionNumber;
|
|
23
|
+
FOUNDATION_EXPORT const unsigned char LEEAlertVersionString[];
|
|
24
|
+
|
|
25
|
+
@class LEEAlert
|
|
26
|
+
, LEEBaseConfig
|
|
27
|
+
, LEEAlertConfig
|
|
28
|
+
, LEEActionSheetConfig
|
|
29
|
+
, LEEBaseConfigModel
|
|
30
|
+
, LEEAlertWindow
|
|
31
|
+
, LEEAction
|
|
32
|
+
, LEEItem
|
|
33
|
+
, LEECustomView;
|
|
34
|
+
|
|
35
|
+
typedef NS_ENUM(NSInteger, LEEScreenOrientationType) {
|
|
36
|
+
/** 屏幕方向类型 横屏 */
|
|
37
|
+
LEEScreenOrientationTypeHorizontal,
|
|
38
|
+
/** 屏幕方向类型 竖屏 */
|
|
39
|
+
LEEScreenOrientationTypeVertical
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
typedef NS_ENUM(NSInteger, LEEAlertType) {
|
|
44
|
+
|
|
45
|
+
LEEAlertTypeAlert,
|
|
46
|
+
|
|
47
|
+
LEEAlertTypeActionSheet
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
typedef NS_ENUM(NSInteger, LEEActionType) {
|
|
52
|
+
/** 默认 */
|
|
53
|
+
LEEActionTypeDefault,
|
|
54
|
+
/** 取消 */
|
|
55
|
+
LEEActionTypeCancel,
|
|
56
|
+
/** 销毁 */
|
|
57
|
+
LEEActionTypeDestructive
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
typedef NS_OPTIONS(NSInteger, LEEActionBorderPosition) {
|
|
62
|
+
/** Action边框位置 上 */
|
|
63
|
+
LEEActionBorderPositionTop = 1 << 0,
|
|
64
|
+
/** Action边框位置 下 */
|
|
65
|
+
LEEActionBorderPositionBottom = 1 << 1,
|
|
66
|
+
/** Action边框位置 左 */
|
|
67
|
+
LEEActionBorderPositionLeft = 1 << 2,
|
|
68
|
+
/** Action边框位置 右 */
|
|
69
|
+
LEEActionBorderPositionRight = 1 << 3
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
typedef NS_ENUM(NSInteger, LEEItemType) {
|
|
74
|
+
/** 标题 */
|
|
75
|
+
LEEItemTypeTitle,
|
|
76
|
+
/** 内容 */
|
|
77
|
+
LEEItemTypeContent,
|
|
78
|
+
/** 输入框 */
|
|
79
|
+
LEEItemTypeTextField,
|
|
80
|
+
/** 自定义视图 */
|
|
81
|
+
LEEItemTypeCustomView,
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
typedef NS_ENUM(NSInteger, LEECustomViewPositionType) {
|
|
86
|
+
/** 居中 */
|
|
87
|
+
LEECustomViewPositionTypeCenter,
|
|
88
|
+
/** 靠左 */
|
|
89
|
+
LEECustomViewPositionTypeLeft,
|
|
90
|
+
/** 靠右 */
|
|
91
|
+
LEECustomViewPositionTypeRight
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
typedef NS_OPTIONS(NSInteger, LEEAnimationStyle) {
|
|
95
|
+
/** 动画样式方向 默认 */
|
|
96
|
+
LEEAnimationStyleOrientationNone = 1 << 0,
|
|
97
|
+
/** 动画样式方向 上 */
|
|
98
|
+
LEEAnimationStyleOrientationTop = 1 << 1,
|
|
99
|
+
/** 动画样式方向 下 */
|
|
100
|
+
LEEAnimationStyleOrientationBottom = 1 << 2,
|
|
101
|
+
/** 动画样式方向 左 */
|
|
102
|
+
LEEAnimationStyleOrientationLeft = 1 << 3,
|
|
103
|
+
/** 动画样式方向 右 */
|
|
104
|
+
LEEAnimationStyleOrientationRight = 1 << 4,
|
|
105
|
+
|
|
106
|
+
/** 动画样式 淡入淡出 */
|
|
107
|
+
LEEAnimationStyleFade = 1 << 12,
|
|
108
|
+
|
|
109
|
+
/** 动画样式 缩放 放大 */
|
|
110
|
+
LEEAnimationStyleZoomEnlarge = 1 << 24,
|
|
111
|
+
/** 动画样式 缩放 缩小 */
|
|
112
|
+
LEEAnimationStyleZoomShrink = 2 << 24,
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
typedef struct {
|
|
116
|
+
CGFloat topLeft;
|
|
117
|
+
CGFloat topRight;
|
|
118
|
+
CGFloat bottomLeft;
|
|
119
|
+
CGFloat bottomRight;
|
|
120
|
+
} CornerRadii;
|
|
121
|
+
|
|
122
|
+
NS_ASSUME_NONNULL_BEGIN
|
|
123
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfig)(void);
|
|
124
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToBool)(BOOL is);
|
|
125
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToInteger)(NSInteger number);
|
|
126
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToFloat)(CGFloat number);
|
|
127
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToString)(NSString *str);
|
|
128
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToView)(UIView *view);
|
|
129
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToColor)(UIColor *color);
|
|
130
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToSize)(CGSize size);
|
|
131
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToPoint)(CGPoint point);
|
|
132
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToEdgeInsets)(UIEdgeInsets insets);
|
|
133
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToAnimationStyle)(LEEAnimationStyle style);
|
|
134
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToBlurEffectStyle)(UIBlurEffectStyle style);
|
|
135
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToInterfaceOrientationMask)(UIInterfaceOrientationMask);
|
|
136
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToFloatBlock)(CGFloat(^)(LEEScreenOrientationType type));
|
|
137
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToAction)(void(^)(LEEAction *action));
|
|
138
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToCustomView)(void(^)(LEECustomView *custom));
|
|
139
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToCornerRadii)(CornerRadii);
|
|
140
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToStringAndBlock)(NSString *str, void (^ _Nullable)(void));
|
|
141
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToConfigLabel)(void(^ _Nullable)(UILabel *label));
|
|
142
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToConfigTextField)(void(^ _Nullable)(UITextField *textField));
|
|
143
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToItem)(void(^)(LEEItem *item));
|
|
144
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToBlock)(void(^block)(void));
|
|
145
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToBlockReturnBool)(BOOL(^block)(void));
|
|
146
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToBlockIntegerReturnBool)(BOOL(^block)(NSInteger index));
|
|
147
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToBlockAndBlock)(void(^)(void (^animatingBlock)(void) , void (^animatedBlock)(void)));
|
|
148
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToStatusBarStyle)(UIStatusBarStyle style);
|
|
149
|
+
API_AVAILABLE(ios(13.0))
|
|
150
|
+
typedef LEEBaseConfigModel * _Nonnull (^LEEConfigToUserInterfaceStyle)(UIUserInterfaceStyle style);
|
|
151
|
+
NS_ASSUME_NONNULL_END
|
|
152
|
+
|
|
153
|
+
#endif /* LEEAlertHelper_h */
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
//
|
|
2
|
+
// SDAutoLayout.h
|
|
3
|
+
// SDAutoLayoutDemo
|
|
4
|
+
//
|
|
5
|
+
// Created by gsd on 16/6/27.
|
|
6
|
+
// Copyright © 2016年 gsd. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
/*
|
|
11
|
+
|
|
12
|
+
SDAutoLayout
|
|
13
|
+
版本:2.1.7
|
|
14
|
+
发布:2016.08.12
|
|
15
|
+
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
#ifndef SDAutoLayout_h
|
|
19
|
+
#define SDAutoLayout_h
|
|
20
|
+
|
|
21
|
+
#import "UIView+SDAutoLayout.h"
|
|
22
|
+
#import "UITableView+SDAutoTableViewCellHeight.h"
|
|
23
|
+
|
|
24
|
+
#endif
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
//
|
|
2
|
+
// UITableView+SDAutoTableViewCellHeight.h
|
|
3
|
+
// SDAutoLayout 测试 Demo
|
|
4
|
+
//
|
|
5
|
+
// Created by aier on 15/11/1.
|
|
6
|
+
// Copyright © 2015年 gsd. All rights reserved.
|
|
7
|
+
//
|
|
8
|
+
|
|
9
|
+
/*
|
|
10
|
+
|
|
11
|
+
*********************************************************************************
|
|
12
|
+
* *
|
|
13
|
+
* 在您使用此自动布局库的过程中如果出现bug请及时以以下任意一种方式联系我们,我们会及时修复bug并 *
|
|
14
|
+
* 帮您解决问题。 *
|
|
15
|
+
* QQ : 2689718696(gsdios) *
|
|
16
|
+
* Email : gsdios@126.com *
|
|
17
|
+
* GitHub: https://github.com/gsdios *
|
|
18
|
+
* 新浪微博:GSD_iOS *
|
|
19
|
+
* *
|
|
20
|
+
*********************************************************************************
|
|
21
|
+
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
/*
|
|
28
|
+
PS:cell高度自适应前提>>应该调用cell的“- (void)setupAutoHeightWithBottomView:(UIView *)bottomView bottomMargin:(CGFloat)bottomMargin”方法进行cell的自动高度设置
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
#import <UIKit/UIKit.h>
|
|
32
|
+
|
|
33
|
+
#import "UIView+SDAutoLayout.h"
|
|
34
|
+
|
|
35
|
+
@class SDCellAutoHeightManager;
|
|
36
|
+
|
|
37
|
+
typedef void (^AutoCellHeightDataSettingBlock)(UITableViewCell *cell);
|
|
38
|
+
|
|
39
|
+
#define kSDModelCellTag 199206
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
#pragma mark - UITableView 方法,返回自动计算出的cell高度
|
|
44
|
+
|
|
45
|
+
@interface UITableView (SDAutoTableViewCellHeight)
|
|
46
|
+
|
|
47
|
+
@property (nonatomic, strong) SDCellAutoHeightManager *cellAutoHeightManager;
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* 返回计算出的cell高度(普通简化版方法,同样只需一步设置即可完成)(用法:单cell详见demo5,多cell详见demo7)
|
|
52
|
+
* model : cell的数据模型实例
|
|
53
|
+
* keyPath : cell的数据模型属性的属性名字符串(即kvc原理中的key)
|
|
54
|
+
* cellClass : 当前的indexPath对应的cell的class
|
|
55
|
+
* contentViewWidth : cell的contentView的宽度
|
|
56
|
+
*/
|
|
57
|
+
- (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath model:(id)model keyPath:(NSString *)keyPath cellClass:(Class)cellClass contentViewWidth:(CGFloat)contentViewWidth;
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* 返回计算出的cell高度(普通简化版方法,同样只需一步设置即可完成)(用法:见DemoVC14)
|
|
61
|
+
* cellClass : 当前的indexPath对应的cell的class
|
|
62
|
+
* contentViewWidth : cell的contentView的宽度
|
|
63
|
+
* cellDataSetting : 设置cell数据的block
|
|
64
|
+
*/
|
|
65
|
+
- (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath cellClass:(Class)cellClass cellContentViewWidth:(CGFloat)width cellDataSetting:(AutoCellHeightDataSettingBlock)cellDataSetting;
|
|
66
|
+
|
|
67
|
+
/** 刷新tableView但不清空之前已经计算好的高度缓存,用于直接将新数据拼接在旧数据之后的tableView刷新 */
|
|
68
|
+
- (void)reloadDataWithExistedHeightCache;
|
|
69
|
+
|
|
70
|
+
/** 刷新tableView同时调整已经计算好的高度缓存,用于直接将新数据插在旧数据前面的tableView的刷新 */
|
|
71
|
+
- (void)reloadDataWithInsertingDataAtTheBeginingOfSection:(NSInteger)section newDataCount:(NSInteger)count;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 刷新tableView同时调整已经计算好的高度缓存,用于直接将新数据插在旧数据前面的tableView的刷新(用于刷新多个section)
|
|
75
|
+
* sectionNumsArray : 要刷新的所有section序号组成的数组, 例@[@(0), @(1)]
|
|
76
|
+
* dataCountsArray : 每个section的数据条数组成的数组, 例@[@(20), @(10)]
|
|
77
|
+
*/
|
|
78
|
+
- (void)reloadDataWithInsertingDataAtTheBeginingOfSections:(NSArray *)sectionNumsArray newDataCounts:(NSArray *)dataCountsArray;
|
|
79
|
+
|
|
80
|
+
/** 返回所有cell的高度总和 */
|
|
81
|
+
- (CGFloat)cellsTotalHeight;
|
|
82
|
+
|
|
83
|
+
@property (nonatomic, copy) AutoCellHeightDataSettingBlock cellDataSetting;
|
|
84
|
+
|
|
85
|
+
@end
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
#pragma mark - UITableViewController 方法,返回自动计算出的cell高度
|
|
91
|
+
|
|
92
|
+
@interface UITableViewController (SDTableViewControllerAutoCellHeight)
|
|
93
|
+
|
|
94
|
+
/** (UITableViewController方法)升级版!一行代码(一步设置)搞定tableview的cell高度自适应,同时适用于单cell和多cell,性能比普通版稍微差一些,不建议在数据量大的tableview中使用 */
|
|
95
|
+
- (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath cellContentViewWidth:(CGFloat)width;
|
|
96
|
+
|
|
97
|
+
@end
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
#pragma mark - NSObject 方法,返回自动计算出的cell高度
|
|
102
|
+
|
|
103
|
+
@interface NSObject (SDAnyObjectAutoCellHeight)
|
|
104
|
+
|
|
105
|
+
/** (NSObject方法)升级版!一行代码(一步设置)搞定tableview的cell高度自适应,同时适用于单cell和多cell,性能比普通版稍微差一些,不建议在数据量大的tableview中使用 */
|
|
106
|
+
- (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath cellContentViewWidth:(CGFloat)width tableView:(UITableView *)tableView;
|
|
107
|
+
|
|
108
|
+
@end
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
// ------------------------------- 以下为库内部使用无须了解 --------------------
|
|
127
|
+
|
|
128
|
+
@interface SDCellAutoHeightManager : NSObject
|
|
129
|
+
|
|
130
|
+
@property (nonatomic, assign) BOOL shouldKeepHeightCacheWhenReloadingData;
|
|
131
|
+
|
|
132
|
+
@property (nonatomic, assign) CGFloat contentViewWidth;
|
|
133
|
+
|
|
134
|
+
@property (nonatomic, assign) Class cellClass;
|
|
135
|
+
|
|
136
|
+
@property (nonatomic, assign) CGFloat cellHeight;
|
|
137
|
+
|
|
138
|
+
@property (nonatomic, strong) UITableViewCell *modelCell;
|
|
139
|
+
|
|
140
|
+
@property (nonatomic, strong) NSMutableDictionary *subviewFrameCacheDict;
|
|
141
|
+
|
|
142
|
+
@property (nonatomic, strong, readonly) NSDictionary *heightCacheDict;
|
|
143
|
+
|
|
144
|
+
@property (nonatomic, copy) AutoCellHeightDataSettingBlock cellDataSetting;
|
|
145
|
+
|
|
146
|
+
- (void)clearHeightCache;
|
|
147
|
+
|
|
148
|
+
- (void)clearHeightCacheOfIndexPaths:(NSArray *)indexPaths;
|
|
149
|
+
|
|
150
|
+
- (void)deleteThenResetHeightCache:(NSIndexPath *)indexPathToDelete;
|
|
151
|
+
|
|
152
|
+
- (void)insertNewDataAtTheBeginingOfSection:(NSInteger)section newDataCount:(NSInteger)count;
|
|
153
|
+
|
|
154
|
+
- (void)insertNewDataAtIndexPaths:(NSArray *)indexPaths;
|
|
155
|
+
|
|
156
|
+
- (NSNumber *)heightCacheForIndexPath:(NSIndexPath *)indexPath;
|
|
157
|
+
|
|
158
|
+
- (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath model:(id)model keyPath:(NSString *)keyPath;
|
|
159
|
+
|
|
160
|
+
- (CGFloat)cellHeightForIndexPath:(NSIndexPath *)indexPath model:(id)model keyPath:(NSString *)keyPath cellClass:(Class)cellClass;
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
- (NSMutableArray *)subviewFrameCachesWithIndexPath:(NSIndexPath *)indexPath;;
|
|
164
|
+
- (void)setSubviewFrameCache:(CGRect)rect WithIndexPath:(NSIndexPath *)indexPath;
|
|
165
|
+
|
|
166
|
+
- (instancetype)initWithCellClass:(Class)cellClass tableView:(UITableView *)tableView;
|
|
167
|
+
+ (instancetype)managerWithCellClass:(Class)cellClass tableView:(UITableView *)tableView;
|
|
168
|
+
@end
|
|
169
|
+
|