purgetss 3.0.4 → 3.1.2
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/.editorconfig +1 -1
- package/README.md +3 -3
- package/assets/fonts/bootstrap-icons.ttf +0 -0
- package/assets/fonts/tabler-icons.ttf +0 -0
- package/assets/images/blend-modes.png +0 -0
- package/assets/images/shadow.png +0 -0
- package/bin/purgetss +6 -5
- package/dist/bootstrapicons.js +1714 -0
- package/dist/bootstrapicons.tss +1692 -0
- package/dist/tablericons.js +95 -1
- package/dist/tablericons.tss +94 -0
- package/dist/tailwind.tss +3242 -411
- package/docs/configuring-guide.md +18 -5
- package/docs/glossary.md +3 -4
- package/docs/new-glossary.md +8313 -0
- package/docs/whats-new/v2.5.0.md +6 -6
- package/docs/whats-new/v3.0.4.md +7 -6
- package/docs/whats-new/v3.0.5.md +136 -0
- package/docs/whats-new/v3.1.0.md +614 -0
- package/docs/whats-new/v3.1.1.md +262 -0
- package/index.js +397 -246
- package/lib/build-bootstrap-icons-js.js +64 -0
- package/lib/build-bootstrap-icons-tss.js +50 -0
- package/lib/build-fonts-folder.js +7 -0
- package/lib/build-tailwind.js +78 -16
- package/lib/helpers.js +2027 -764
- package/lib/templates/bootstrap-icons/bootstrap-icons.css +1705 -0
- package/lib/templates/bootstrap-icons/bootstrap-icons.ttf +0 -0
- package/lib/templates/bootstrap-icons/reset.tss +6 -0
- package/lib/templates/bootstrap-icons/template.js +4 -0
- package/lib/templates/bootstrap-icons/template.tss +2 -0
- package/lib/templates/custom-template.tss +1 -1
- package/lib/templates/tablericons/template.js +1 -1
- package/lib/templates/tailwind/custom-template.tss +1 -1
- package/lib/templates/tailwind/template.tss +1 -1
- package/lib/test-function.js +9 -0
- package/package.json +8 -5
- package/purgetss.config.js +950 -0
package/lib/helpers.js
CHANGED
|
@@ -5,9 +5,9 @@ const HEX_3_REGEX = /^#?([a-f\d])([a-f\d])([a-f\d])$/i; // i.e. #0F3
|
|
|
5
5
|
const HEX_4_REGEX = /^#?([a-f\d])([a-f\d])([a-f\d])([a-f\d])$/i; // i.e. #80F3
|
|
6
6
|
const HEX_6_REGEX = /^#?([a-f\d]){6}$/i; // i.e. #00FF33
|
|
7
7
|
const HEX_8_REGEX = /^#?([a-f\d]){8}$/i; // i.e. #8800FF33
|
|
8
|
-
let _applyClasses = {};
|
|
9
8
|
|
|
10
9
|
let startTime;
|
|
10
|
+
let _applyClasses = {};
|
|
11
11
|
|
|
12
12
|
function start() {
|
|
13
13
|
startTime = new Date();
|
|
@@ -30,200 +30,384 @@ function resetStyles() {
|
|
|
30
30
|
}
|
|
31
31
|
exports.resetStyles = resetStyles;
|
|
32
32
|
|
|
33
|
-
// Main Functions
|
|
34
|
-
function processModifiersAndProperties(header, objectPosition, modifiersAndValues, minusSigns = '') {
|
|
35
|
-
let convertedStyles = `\n// ${header} Property\n`;
|
|
36
|
-
|
|
37
|
-
_.each(objectPosition, (properties, rule) => {
|
|
38
|
-
_.each(modifiersAndValues, (value, modifier) => {
|
|
39
|
-
let ruleSign = (modifier.startsWith('-')) ? '-' : '';
|
|
40
|
-
if (typeof value === 'object') {
|
|
41
|
-
_.each(value, (_value, _modifier) => {
|
|
42
|
-
convertedStyles += `'.${ruleSign}${rule}-${modifier}${setModifier(_modifier)}': ` + _.replace(properties, new RegExp("{value}", "g"), parseValue(_value, minusSigns)) + '\n';
|
|
43
|
-
});
|
|
44
|
-
} else {
|
|
45
|
-
convertedStyles += `'.${ruleSign}${rule}${setModifier(modifier)}': ` + _.replace(properties, new RegExp("{value}", "g"), parseValue(value, minusSigns)) + '\n';
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
});
|
|
49
|
-
|
|
50
|
-
return convertedStyles;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
33
|
function textColor(modifiersAndValues) {
|
|
54
|
-
return
|
|
34
|
+
return processProperties({ 'prop': 'color', 'component': 'Ti.UI.Button, Ti.UI.Label, Ti.UI.PickerRow, Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.ListItem, Ti.UI.ProgressBar, Ti.UI.Switch, Ti.UI.TableViewRow, Ti.UI.TextField, Ti.UI.Android.SearchView' }, {
|
|
35
|
+
'text': '{ color: {value} }'
|
|
36
|
+
}, modifiersAndValues);
|
|
55
37
|
}
|
|
56
38
|
exports.textColor = textColor;
|
|
57
39
|
|
|
58
40
|
function backgroundColor(modifiersAndValues) {
|
|
59
|
-
return
|
|
41
|
+
return processProperties({ 'prop': 'backgroundColor', 'component': 'Ti.UI, Ti.UI.Android.CardView, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.ListItem, Ti.UI.Picker, Ti.UI.Tab, Ti.UI.TableView, Ti.UI.View, Ti.UI.Window' }, {
|
|
42
|
+
'bg': '{ backgroundColor: {value} }'
|
|
43
|
+
}, modifiersAndValues);
|
|
60
44
|
}
|
|
61
45
|
exports.backgroundColor = backgroundColor;
|
|
62
46
|
|
|
63
47
|
function navTintColor(modifiersAndValues) {
|
|
64
|
-
return
|
|
48
|
+
return processProperties({ 'prop': 'navTintColor', 'component': 'Ti.UI.TabGroup, Ti.UI.Window' }, {
|
|
49
|
+
'nav-tint': '{ navTintColor: {value} }'
|
|
50
|
+
}, modifiersAndValues);
|
|
65
51
|
}
|
|
66
52
|
exports.navTintColor = navTintColor;
|
|
67
53
|
|
|
68
54
|
function backgroundSelectedColor(modifiersAndValues) {
|
|
69
|
-
return
|
|
55
|
+
return processProperties({ 'prop': 'backgroundSelectedColor', 'component': 'Ti.UI.Button, Ti.UI.ListItem, Ti.UI.TableViewRow, Ti.UI.View' }, {
|
|
56
|
+
'bg-selected': '{ backgroundSelectedColor: {value} }'
|
|
57
|
+
}, modifiersAndValues);
|
|
70
58
|
}
|
|
71
59
|
exports.backgroundSelectedColor = backgroundSelectedColor;
|
|
72
60
|
|
|
73
61
|
function barColor(modifiersAndValues) {
|
|
74
|
-
return
|
|
62
|
+
return processProperties({ 'prop': 'barColor', 'component': 'Ti.UI.EmailDialog, Ti.UI.SearchBar, Ti.UI.TabGroup, Ti.UI.Toolbar, Ti.UI.Window' }, {
|
|
63
|
+
'bar': '{ barColor: {value} }'
|
|
64
|
+
}, modifiersAndValues);
|
|
75
65
|
}
|
|
76
66
|
exports.barColor = barColor;
|
|
77
67
|
|
|
78
|
-
function
|
|
79
|
-
let
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
8: 8,
|
|
88
|
-
9: 9,
|
|
89
|
-
10: 10,
|
|
90
|
-
};
|
|
68
|
+
function shadow(shadowValue = '#59000000') {
|
|
69
|
+
let convertedStyles = processComments({ 'prop': 'viewShadowOffset, viewShadowRadius, viewShadowColor - Box Shadow in Tailwind', 'component': 'Ti.UI.View' });
|
|
70
|
+
convertedStyles += `'.shadow-xs': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 1, viewShadowColor: '${shadowValue}' }\n`;
|
|
71
|
+
convertedStyles += `'.shadow-sm': { viewShadowOffset: { x: 0, y: 1 }, viewShadowRadius: 1, viewShadowColor: '${shadowValue}' }\n`;
|
|
72
|
+
convertedStyles += `'.shadow': { viewShadowOffset: { x: 0, y: 2 }, viewShadowRadius: 2, viewShadowColor: '${shadowValue}' }\n`;
|
|
73
|
+
convertedStyles += `'.shadow-md': { viewShadowOffset: { x: 0, y: 3 }, viewShadowRadius: 3, viewShadowColor: '${shadowValue}' }\n`;
|
|
74
|
+
convertedStyles += `'.shadow-lg': { viewShadowOffset: { x: 0, y: 4 }, viewShadowRadius: 4, viewShadowColor: '${shadowValue}' }\n`;
|
|
75
|
+
convertedStyles += `'.shadow-xl': { viewShadowOffset: { x: 0, y: 6 }, viewShadowRadius: 6, viewShadowColor: '${shadowValue}' }\n`;
|
|
76
|
+
convertedStyles += `'.shadow-2xl': { viewShadowOffset: { x: 0, y: 8 }, viewShadowRadius: 8, viewShadowColor: '${shadowValue}' }\n`;
|
|
91
77
|
|
|
92
|
-
|
|
78
|
+
convertedStyles += `'.shadow-inner': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }\n`;
|
|
79
|
+
convertedStyles += `'.shadow-outline': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 2, viewShadowColor: '${shadowValue}' }\n`;
|
|
80
|
+
convertedStyles += `'.shadow-none': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }\n`;
|
|
81
|
+
|
|
82
|
+
return convertedStyles;
|
|
93
83
|
}
|
|
94
|
-
exports.
|
|
84
|
+
exports.shadow = shadow;
|
|
85
|
+
|
|
86
|
+
function shadowColor(modifiersAndValues) {
|
|
87
|
+
return processProperties({ 'prop': 'viewShadowColor - Box Shadow in Tailwind', 'component': 'Ti.UI.View' }, {
|
|
88
|
+
'shadow': '{ viewShadowColor: {value} }',
|
|
89
|
+
}, modifiersAndValues);
|
|
90
|
+
}
|
|
91
|
+
exports.shadowColor = shadowColor;
|
|
92
|
+
|
|
93
|
+
function dropShadow(shadowValue = '#59000000') {
|
|
94
|
+
let convertedStyles = processComments({ 'prop': 'shadowOffset, shadowRadius, shadowColor - Drop Shadow in Tailwind', 'component': 'Ti.UI.Button, Ti.UI.Label' });
|
|
95
|
+
convertedStyles += `'.drop-shadow-xs': { shadowOffset: { x: 0, y: 0 }, shadowRadius: 1, shadowColor: '${shadowValue}' }\n`;
|
|
96
|
+
convertedStyles += `'.drop-shadow-sm': { shadowOffset: { x: 0, y: 1 }, shadowRadius: 1, shadowColor: '${shadowValue}' }\n`;
|
|
97
|
+
convertedStyles += `'.drop-shadow': { shadowOffset: { x: 0, y: 2 }, shadowRadius: 2, shadowColor: '${shadowValue}' }\n`;
|
|
98
|
+
convertedStyles += `'.drop-shadow-md': { shadowOffset: { x: 0, y: 3 }, shadowRadius: 3, shadowColor: '${shadowValue}' }\n`;
|
|
99
|
+
convertedStyles += `'.drop-shadow-lg': { shadowOffset: { x: 0, y: 4 }, shadowRadius: 4, shadowColor: '${shadowValue}' }\n`;
|
|
100
|
+
convertedStyles += `'.drop-shadow-xl': { shadowOffset: { x: 0, y: 6 }, shadowRadius: 6, shadowColor: '${shadowValue}' }\n`;
|
|
101
|
+
convertedStyles += `'.drop-shadow-2xl': { shadowOffset: { x: 0, y: 8 }, shadowRadius: 8, shadowColor: '${shadowValue}' }\n`;
|
|
102
|
+
convertedStyles += `'.drop-shadow-none': { shadowOffset: { x: 0, y: 0 }, shadowRadius: null, shadowColor: null }\n`;
|
|
103
|
+
|
|
104
|
+
return convertedStyles;
|
|
105
|
+
}
|
|
106
|
+
exports.dropShadow = dropShadow;
|
|
107
|
+
|
|
108
|
+
function dropShadowColor(modifiersAndValues) {
|
|
109
|
+
return processProperties({ 'prop': 'shadowColor - Drop Shadow in Tailwind', 'component': 'Ti.UI.Button, Ti.UI.Label' }, {
|
|
110
|
+
'drop-shadow': '{ shadowColor: {value} }',
|
|
111
|
+
}, modifiersAndValues);
|
|
112
|
+
}
|
|
113
|
+
exports.dropShadowColor = dropShadowColor;
|
|
114
|
+
|
|
115
|
+
function barTitleShadow(shadowValue = '#59000000') {
|
|
116
|
+
|
|
117
|
+
let convertedStyles = processComments({ 'prop': 'titleAttributes: shadow, offset, blurRadius - Bar Title Shadow', 'component': 'Ti.UI.TabGroup, Ti.UI.Window' });
|
|
118
|
+
convertedStyles += `'.bar-shadow-xs': { titleAttributes: { shadow: { color: '${shadowValue}', offset: { width: 0, height: 0 }, blurRadius: 1 } } }\n`;
|
|
119
|
+
convertedStyles += `'.bar-shadow-sm': { titleAttributes: { shadow: { color: '${shadowValue}', offset: { width: 0, height: 1 }, blurRadius: 1 } } }\n`;
|
|
120
|
+
convertedStyles += `'.bar-shadow': { titleAttributes: { shadow: { color: '${shadowValue}', offset: { width: 0, height: 2 }, blurRadius: 2 } } }\n`;
|
|
121
|
+
convertedStyles += `'.bar-shadow-md': { titleAttributes: { shadow: { color: '${shadowValue}', offset: { width: 0, height: 3 }, blurRadius: 3 } } }\n`;
|
|
122
|
+
convertedStyles += `'.bar-shadow-lg': { titleAttributes: { shadow: { color: '${shadowValue}', offset: { width: 0, height: 4 }, blurRadius: 4 } } }\n`;
|
|
123
|
+
convertedStyles += `'.bar-shadow-xl': { titleAttributes: { shadow: { color: '${shadowValue}', offset: { width: 0, height: 6 }, blurRadius: 6 } } }\n`;
|
|
124
|
+
convertedStyles += `'.bar-shadow-2xl': { titleAttributes: { shadow: { color: '${shadowValue}', offset: { width: 0, height: 8 }, blurRadius: 8 } } }\n`;
|
|
125
|
+
convertedStyles += `'.bar-shadow-none': { titleAttributes: { shadow: { color: null, offset: { width: 0, height: 0 }, blurRadius: null } } }\n`;
|
|
126
|
+
|
|
127
|
+
return convertedStyles;
|
|
128
|
+
}
|
|
129
|
+
exports.barTitleShadow = barTitleShadow;
|
|
130
|
+
|
|
131
|
+
function barTitleShadowColor(modifiersAndValues) {
|
|
132
|
+
return processProperties({ 'prop': 'titleAttributes: shadow - Bar Title Shadow', 'component': 'Ti.UI.TabGroup, Ti.UI.Window' }, {
|
|
133
|
+
'bar': '{ titleAttributes: { shadow: { color: {value} } } }'
|
|
134
|
+
}, {
|
|
135
|
+
'shadow': {
|
|
136
|
+
'ios': modifiersAndValues
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
exports.barTitleShadowColor = barTitleShadowColor;
|
|
141
|
+
|
|
142
|
+
function barTitleColor(modifiersAndValues) {
|
|
143
|
+
return processProperties({ 'prop': 'titleAttributes', 'component': 'Ti.UI.TabGroup, Ti.UI.Window' }, {
|
|
144
|
+
'bar': '{ titleAttributes: { color: {value} } }'
|
|
145
|
+
}, {
|
|
146
|
+
title: {
|
|
147
|
+
ios: { ...modifiersAndValues }
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
exports.barTitleColor = barTitleColor;
|
|
95
152
|
|
|
96
153
|
function tabsBackgroundColor(modifiersAndValues) {
|
|
97
|
-
return
|
|
154
|
+
return processProperties({ 'prop': 'tabsBackgroundColor', 'component': 'Ti.UI.TabGroup' }, {
|
|
155
|
+
'tabs-bg': '{ tabsBackgroundColor: {value} }'
|
|
156
|
+
}, modifiersAndValues);
|
|
98
157
|
}
|
|
99
158
|
exports.tabsBackgroundColor = tabsBackgroundColor;
|
|
100
159
|
|
|
160
|
+
function tabsBackgroundSelectedColor(modifiersAndValues) {
|
|
161
|
+
return processProperties({ 'prop': 'tabsBackgroundSelectedColor', 'component': 'Ti.UI.TabGroup' }, {
|
|
162
|
+
'tabs-bg-selected': '{ tabsBackgroundSelectedColor: {value} }'
|
|
163
|
+
}, modifiersAndValues);
|
|
164
|
+
}
|
|
165
|
+
exports.tabsBackgroundSelectedColor = tabsBackgroundSelectedColor;
|
|
166
|
+
|
|
101
167
|
function titleColor(modifiersAndValues) {
|
|
102
|
-
return
|
|
168
|
+
return processProperties({ 'prop': 'titleColor', 'component': 'Ti.UI.Tab, Ti.UI.TabGroup' }, {
|
|
169
|
+
'title': '{ titleColor: {value} }'
|
|
170
|
+
}, modifiersAndValues);
|
|
103
171
|
}
|
|
104
172
|
exports.titleColor = titleColor;
|
|
105
173
|
|
|
106
174
|
function activeTintColor(modifiersAndValues) {
|
|
107
|
-
return
|
|
175
|
+
return processProperties({ 'prop': 'activeTintColor', 'component': 'Ti.UI.Tab, Ti.UI.TabGroup' }, {
|
|
176
|
+
'active-tint': '{ activeTintColor: {value} }'
|
|
177
|
+
}, modifiersAndValues);
|
|
108
178
|
}
|
|
109
179
|
exports.activeTintColor = activeTintColor;
|
|
110
180
|
|
|
111
181
|
function activeTitleColor(modifiersAndValues) {
|
|
112
|
-
return
|
|
182
|
+
return processProperties({ 'prop': 'activeTitleColor', 'component': 'Ti.UI.Tab, Ti.UI.TabGroup' }, {
|
|
183
|
+
'active-title': '{ activeTitleColor: {value} }'
|
|
184
|
+
}, modifiersAndValues);
|
|
113
185
|
}
|
|
114
186
|
exports.activeTitleColor = activeTitleColor;
|
|
115
187
|
|
|
116
188
|
function borderColor(modifiersAndValues) {
|
|
117
|
-
return
|
|
189
|
+
return processProperties({ 'prop': 'borderColor', 'component': 'Ti.UI.View' }, {
|
|
190
|
+
'border': '{ borderColor: {value} }'
|
|
191
|
+
}, modifiersAndValues);
|
|
118
192
|
}
|
|
119
193
|
exports.borderColor = borderColor;
|
|
120
194
|
|
|
195
|
+
function indicatorColor(modifiersAndValues) {
|
|
196
|
+
return processProperties({ 'prop': 'indicatorColor', 'component': 'Ti.UI.ActivityIndicator' }, {
|
|
197
|
+
'indicator': '{ indicatorColor: {value} }'
|
|
198
|
+
}, modifiersAndValues);
|
|
199
|
+
}
|
|
200
|
+
exports.indicatorColor = indicatorColor;
|
|
201
|
+
|
|
121
202
|
function pagingControlAlpha(modifiersAndValues) {
|
|
122
|
-
return
|
|
203
|
+
return processProperties({ 'prop': 'pagingControlAlpha', 'component': 'Ti.UI.ScrollableView' }, {
|
|
204
|
+
'paging-alpha': '{ pagingControlAlpha: {value} }'
|
|
205
|
+
}, modifiersAndValues);
|
|
123
206
|
}
|
|
124
207
|
exports.pagingControlAlpha = pagingControlAlpha;
|
|
125
208
|
|
|
126
209
|
function pagingControlColor(modifiersAndValues) {
|
|
127
|
-
return
|
|
210
|
+
return processProperties({ 'prop': 'pagingControlColor', 'component': 'Ti.UI.ScrollableView' }, {
|
|
211
|
+
'paging': '{ pagingControlColor: {value} }'
|
|
212
|
+
}, modifiersAndValues);
|
|
128
213
|
}
|
|
129
214
|
exports.pagingControlColor = pagingControlColor;
|
|
130
215
|
|
|
131
216
|
function pageIndicatorColor(modifiersAndValues) {
|
|
132
|
-
return
|
|
217
|
+
return processProperties({ 'prop': 'pageIndicatorColor', 'component': 'Ti.UI.ScrollableView' }, {
|
|
218
|
+
'page': '{ pageIndicatorColor: {value} }'
|
|
219
|
+
}, modifiersAndValues);
|
|
133
220
|
}
|
|
134
221
|
exports.pageIndicatorColor = pageIndicatorColor;
|
|
135
222
|
|
|
136
223
|
function currentPageIndicatorColor(modifiersAndValues) {
|
|
137
|
-
return
|
|
224
|
+
return processProperties({ 'prop': 'currentPageIndicatorColor', 'component': 'Ti.UI.ScrollableView' }, {
|
|
225
|
+
'current-page': '{ currentPageIndicatorColor: {value} }'
|
|
226
|
+
}, modifiersAndValues);
|
|
138
227
|
}
|
|
139
228
|
exports.currentPageIndicatorColor = currentPageIndicatorColor;
|
|
140
229
|
|
|
141
|
-
function pagingControlHeight({ ...modifiersAndValues }) {
|
|
142
|
-
modifiersAndValues = removeFractions(modifiersAndValues);
|
|
143
|
-
|
|
144
|
-
delete modifiersAndValues.full;
|
|
145
|
-
delete modifiersAndValues.auto;
|
|
146
|
-
delete modifiersAndValues.screen;
|
|
147
|
-
|
|
148
|
-
return processModifiersAndProperties('pagingControlHeight', { 'paging-h': '{ pagingControlHeight: {value} }' }, modifiersAndValues);
|
|
149
|
-
}
|
|
150
|
-
exports.pagingControlHeight = pagingControlHeight;
|
|
151
|
-
|
|
152
230
|
function touchFeedbackColor(modifiersAndValues) {
|
|
153
|
-
return
|
|
231
|
+
return processProperties({ 'prop': 'touchFeedbackColor', 'component': 'Ti.UI.View' }, {
|
|
232
|
+
'feedback': '{ touchFeedback: true, touchFeedbackColor: {value} }'
|
|
233
|
+
}, modifiersAndValues);
|
|
154
234
|
}
|
|
155
235
|
exports.touchFeedbackColor = touchFeedbackColor;
|
|
156
236
|
|
|
157
237
|
function placeholderColor(modifiersAndValues) {
|
|
158
|
-
return
|
|
238
|
+
return processProperties({ 'prop': 'hintTextColor', 'component': 'Ti.UI.Android.SearchView, Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
239
|
+
'placeholder': '{ hintTextColor: {value} }'
|
|
240
|
+
}, modifiersAndValues);
|
|
159
241
|
}
|
|
160
242
|
exports.placeholderColor = placeholderColor;
|
|
161
243
|
|
|
162
244
|
function tintColor(modifiersAndValues) {
|
|
163
|
-
return
|
|
245
|
+
return processProperties({ 'prop': 'tint and tintColor', 'component': 'Ti.UI, Ti.UI.AlertDialog, Ti.UI.Button, Ti.UI.ImageView, Ti.UI.iOS.Stepper, Ti.UI.ProgressBar, Ti.UI.RefreshControll, Ti.UI.Slider, Ti.UI.Switch, and `tint` for Ti.UI.MaskedImage' }, {
|
|
246
|
+
'tint': '{ tint: {value}, tintColor: {value} }'
|
|
247
|
+
}, modifiersAndValues);
|
|
164
248
|
}
|
|
165
249
|
exports.tintColor = tintColor;
|
|
166
250
|
|
|
167
|
-
function
|
|
168
|
-
|
|
251
|
+
function borderRadiusExtraStyles({ ...modifiersAndValues }) {
|
|
252
|
+
// SOME CLEANUP... SOME VALUES NOT NEEDED HERE!.
|
|
253
|
+
delete modifiersAndValues[0];
|
|
254
|
+
delete modifiersAndValues.fit;
|
|
255
|
+
delete modifiersAndValues.min;
|
|
256
|
+
delete modifiersAndValues.max;
|
|
257
|
+
delete modifiersAndValues.full;
|
|
258
|
+
delete modifiersAndValues.auto;
|
|
259
|
+
delete modifiersAndValues.screen;
|
|
260
|
+
delete modifiersAndValues['min-content'];
|
|
261
|
+
delete modifiersAndValues['max-content'];
|
|
262
|
+
|
|
263
|
+
_.each(modifiersAndValues, (value, key) => {
|
|
264
|
+
if (key.includes('/')) {
|
|
265
|
+
delete modifiersAndValues[key];
|
|
266
|
+
} else if (['sm', 'md', 'lg', 'xl', '2xl', '3xl', 'px', 'DEFAULT'].includes(key)) {
|
|
267
|
+
modifiersAndValues[key] = value;
|
|
268
|
+
} else {
|
|
269
|
+
modifiersAndValues[key] = 8 * parseFloat(value);
|
|
270
|
+
}
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
return processProperties({ 'prop': 'borderRadius ( with Extra Styles )', 'component': 'Ti.UI.Android.CardView, Ti.UI.View' }, {
|
|
274
|
+
'rounded': '{ borderRadius: {value} }',
|
|
275
|
+
|
|
276
|
+
'rounded-t': '{ borderRadius: [{value}, {value}, 0, 0] }',
|
|
277
|
+
'rounded-r': '{ borderRadius: [0, {value}, {value}, 0] }',
|
|
278
|
+
'rounded-b': '{ borderRadius: [0, 0, {value}, {value}] }',
|
|
279
|
+
'rounded-l': '{ borderRadius: [{value}, 0, 0, {value}] }',
|
|
280
|
+
|
|
281
|
+
'rounded-tl': '{ borderRadius: [{value}, 0, 0, 0] }',
|
|
282
|
+
'rounded-tr': '{ borderRadius: [0, {value}, 0, 0] }',
|
|
283
|
+
'rounded-br': '{ borderRadius: [0, 0, {value}, 0] }',
|
|
284
|
+
'rounded-bl': '{ borderRadius: [0, 0, 0, {value}] }',
|
|
285
|
+
|
|
286
|
+
}, modifiersAndValues);
|
|
169
287
|
}
|
|
170
|
-
exports.
|
|
288
|
+
exports.borderRadiusExtraStyles = borderRadiusExtraStyles;
|
|
171
289
|
|
|
172
|
-
function
|
|
173
|
-
|
|
174
|
-
|
|
290
|
+
function borderWidth({ ...modifiersAndValues }) {
|
|
291
|
+
_.each(modifiersAndValues, (value, key) => {
|
|
292
|
+
modifiersAndValues[key] = parseInt(value);
|
|
293
|
+
});
|
|
294
|
+
|
|
295
|
+
return processProperties({ 'prop': 'borderWidth', 'component': 'Ti.UI.View' }, {
|
|
296
|
+
'border': '{ borderWidth: {value} }'
|
|
297
|
+
}, modifiersAndValues);
|
|
175
298
|
}
|
|
176
|
-
exports.
|
|
299
|
+
exports.borderWidth = borderWidth;
|
|
177
300
|
|
|
178
301
|
function scale(modifiersAndValues) {
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
modifiersAndValues
|
|
182
|
-
return processModifiersAndProperties('scale', { 'scale': '{ scale: \'{value}\' }' }, modifiersAndValues);
|
|
302
|
+
return processProperties({ 'prop': 'scale', 'component': 'Ti.UI.ScrollView' }, {
|
|
303
|
+
'scale': '{ scale: \'{value}\' }'
|
|
304
|
+
}, modifiersAndValues);
|
|
183
305
|
}
|
|
184
306
|
exports.scale = scale;
|
|
185
307
|
|
|
308
|
+
function fontWeight({ ...modifiersAndValues }) {
|
|
309
|
+
const invalidValues = {
|
|
310
|
+
black: 'bold',
|
|
311
|
+
medium: 'normal',
|
|
312
|
+
extrabold: 'bold',
|
|
313
|
+
hairline: 'ultralight'
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
_.each(modifiersAndValues, (value, key) => {
|
|
317
|
+
modifiersAndValues[key] = fixInvalidValues(invalidValues, key);
|
|
318
|
+
});
|
|
319
|
+
|
|
320
|
+
return processProperties({ 'prop': 'fontWeight', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Button, Ti.UI.Label, Ti.UI.ListItem, Ti.UI.Picker, Ti.UI.PickerColumn, Ti.UI.PickerRow, Ti.UI.ProgressBar, Ti.UI.Switch, Ti.UI.TableViewRow, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
321
|
+
'font': '{ font: { fontWeight: {value} } }'
|
|
322
|
+
}, modifiersAndValues);
|
|
323
|
+
}
|
|
324
|
+
exports.fontWeight = fontWeight;
|
|
325
|
+
|
|
326
|
+
function gap({ ...modifiersAndValues }) {
|
|
327
|
+
// SOME CLEANUP... VALUES NOT NEEDED HERE!.
|
|
328
|
+
modifiersAndValues = removeFractions(modifiersAndValues);
|
|
329
|
+
|
|
330
|
+
modifiersAndValues.auto = 'auto';
|
|
331
|
+
delete modifiersAndValues.min;
|
|
332
|
+
delete modifiersAndValues.max;
|
|
333
|
+
delete modifiersAndValues.screen;
|
|
334
|
+
delete modifiersAndValues['min-content'];
|
|
335
|
+
delete modifiersAndValues['max-content'];
|
|
336
|
+
|
|
337
|
+
return processProperties({ 'prop': 'top, right, bottom, left - Gap for Grid System', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.View, Ti.UI.Window' }, {
|
|
338
|
+
'gap': '{ top: {value}, right: {value}, bottom: {value}, left: {value} }',
|
|
339
|
+
'gap-b': '{ bottom: {value} }',
|
|
340
|
+
'gap-l': '{ left: {value} }',
|
|
341
|
+
'gap-r': '{ right: {value} }',
|
|
342
|
+
'gap-t': '{ top: {value} }',
|
|
343
|
+
'gap-x': '{ right: {value}, left: {value} }',
|
|
344
|
+
'gap-y': '{ top: {value}, bottom: {value} }',
|
|
345
|
+
}, modifiersAndValues);
|
|
346
|
+
}
|
|
347
|
+
exports.gap = gap;
|
|
348
|
+
|
|
186
349
|
function transitionDuration(modifiersAndValues) {
|
|
187
350
|
modifiersAndValues[0] = '0ms';
|
|
188
351
|
modifiersAndValues[25] = '25ms';
|
|
189
352
|
modifiersAndValues[50] = '50ms';
|
|
190
|
-
|
|
353
|
+
|
|
354
|
+
return processProperties({ 'prop': 'duration', 'component': 'Ti.UI.Animation' }, {
|
|
355
|
+
'duration': '{ duration: {value} }'
|
|
356
|
+
}, modifiersAndValues);
|
|
191
357
|
}
|
|
192
358
|
exports.transitionDuration = transitionDuration;
|
|
193
359
|
|
|
194
360
|
function transitionDelay(modifiersAndValues) {
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
modifiersAndValues
|
|
198
|
-
modifiersAndValues[2000] = '2000ms';
|
|
199
|
-
modifiersAndValues[3000] = '3000ms';
|
|
200
|
-
modifiersAndValues[4000] = '4000ms';
|
|
201
|
-
modifiersAndValues[5000] = '5000ms';
|
|
202
|
-
return processModifiersAndProperties('delay', { 'delay': '{ delay: {value} }' }, modifiersAndValues);
|
|
361
|
+
return processProperties({ 'prop': 'delay', 'component': 'Ti.UI.Animation' }, {
|
|
362
|
+
'delay': '{ delay: {value} }'
|
|
363
|
+
}, modifiersAndValues);
|
|
203
364
|
}
|
|
204
365
|
exports.transitionDelay = transitionDelay;
|
|
205
366
|
|
|
206
367
|
function pagingControlTimeout(modifiersAndValues) {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
modifiersAndValues
|
|
210
|
-
modifiersAndValues[2000] = '2000ms';
|
|
211
|
-
modifiersAndValues[3000] = '3000ms';
|
|
212
|
-
modifiersAndValues[4000] = '4000ms';
|
|
213
|
-
modifiersAndValues[5000] = '5000ms';
|
|
214
|
-
|
|
215
|
-
return processModifiersAndProperties('pagingControlTimeout', { 'paging-timeout': '{ pagingControlTimeout: {value} }' }, modifiersAndValues);
|
|
368
|
+
return processProperties({ 'prop': 'pagingControlTimeout', 'component': 'Ti.UI.ScrollableView' }, {
|
|
369
|
+
'paging-timeout': '{ pagingControlTimeout: {value} }'
|
|
370
|
+
}, modifiersAndValues);
|
|
216
371
|
}
|
|
217
372
|
exports.pagingControlTimeout = pagingControlTimeout;
|
|
218
373
|
|
|
219
|
-
|
|
220
374
|
function fontFamily(modifiersAndValues) {
|
|
221
|
-
return
|
|
375
|
+
return processProperties({ 'prop': 'fontFamily', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Button, Ti.UI.Label, Ti.UI.ListItem, Ti.UI.Picker, Ti.UI.PickerColumn, Ti.UI.PickerRow, Ti.UI.ProgressBar, Ti.UI.Switch, Ti.UI.TableViewRow, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
376
|
+
'font': '{ font: { fontFamily: {value} } }'
|
|
377
|
+
}, modifiersAndValues);
|
|
222
378
|
}
|
|
223
379
|
exports.fontFamily = fontFamily;
|
|
224
380
|
|
|
381
|
+
function pagingControlHeight({ ...modifiersAndValues }) {
|
|
382
|
+
modifiersAndValues = removeFractions(modifiersAndValues);
|
|
383
|
+
|
|
384
|
+
delete modifiersAndValues.full;
|
|
385
|
+
delete modifiersAndValues.auto;
|
|
386
|
+
delete modifiersAndValues.screen;
|
|
387
|
+
|
|
388
|
+
return processProperties({ 'prop': 'pagingControlHeight', 'component': 'Ti.UI.ScrollableView' }, {
|
|
389
|
+
'paging-h': '{ pagingControlHeight: {value} }'
|
|
390
|
+
}, modifiersAndValues);
|
|
391
|
+
}
|
|
392
|
+
exports.pagingControlHeight = pagingControlHeight;
|
|
393
|
+
|
|
394
|
+
function rotate(modifiersAndValues) {
|
|
395
|
+
return processProperties({ 'prop': 'rotate', 'component': 'For the Animation Component' }, {
|
|
396
|
+
'rotate': '{ rotate: {value} }'
|
|
397
|
+
}, modifiersAndValues);
|
|
398
|
+
}
|
|
399
|
+
exports.rotate = rotate;
|
|
400
|
+
|
|
401
|
+
function zIndex(modifiersAndValues) {
|
|
402
|
+
delete modifiersAndValues.auto;
|
|
403
|
+
return processProperties({ 'prop': 'zIndex', 'component': 'Ti.UI.Animation, Ti.UI.View' }, {
|
|
404
|
+
'z': '{ zIndex: {value} }'
|
|
405
|
+
}, modifiersAndValues);
|
|
406
|
+
}
|
|
407
|
+
exports.zIndex = zIndex;
|
|
408
|
+
|
|
225
409
|
function linearGradient() {
|
|
226
|
-
let convertedStyles =
|
|
410
|
+
let convertedStyles = processComments({ 'prop': 'backgroundGradient - Linear', 'component': 'Ti.UI.MaskedImage' });
|
|
227
411
|
|
|
228
412
|
convertedStyles += `'.bg-linear': { backgroundGradient: { type: 'linear', startPoint: { x: '50%', y: '100%' }, endPoint: { x: '50%', y: '0%' }, backfillStart: true } }\n`;
|
|
229
413
|
convertedStyles += `'.bg-linear-to-t': { backgroundGradient: { type: 'linear', startPoint: { x: '0%', y: '0%' }, endPoint: { x: '0%', y: '100%' }, backfillStart: true } }\n`;
|
|
@@ -235,7 +419,7 @@ function linearGradient() {
|
|
|
235
419
|
convertedStyles += `'.bg-linear-to-l': { backgroundGradient: { type: 'linear', startPoint: { x: '0%', y: '0%' }, endPoint: { x: '100%', y: '0%' }, backfillStart: true } }\n`;
|
|
236
420
|
convertedStyles += `'.bg-linear-to-tl': { backgroundGradient: { type: 'linear', startPoint: { x: '0%', y: '0%' }, endPoint: { x: '100%', y: '100%' }, backfillStart: true } }\n`;
|
|
237
421
|
|
|
238
|
-
convertedStyles += '
|
|
422
|
+
convertedStyles += processComments({ 'prop': 'backgroundGradient - Gradient', 'component': 'Ti.UI.MaskedImage' });
|
|
239
423
|
|
|
240
424
|
convertedStyles += `'.bg-gradient': { backgroundGradient: { type: 'linear', startPoint: { x: '50%', y: '100%' }, endPoint: { x: '50%', y: '0%' }, backfillStart: true } }\n`;
|
|
241
425
|
convertedStyles += `'.bg-gradient-to-t': { backgroundGradient: { type: 'linear', startPoint: { x: '0%', y: '0%' }, endPoint: { x: '0%', y: '100%' }, backfillStart: true } }\n`;
|
|
@@ -251,8 +435,50 @@ function linearGradient() {
|
|
|
251
435
|
}
|
|
252
436
|
exports.linearGradient = linearGradient;
|
|
253
437
|
|
|
438
|
+
function backgroundBlendMode() {
|
|
439
|
+
return processProperties({ 'prop': 'mode ( Background Blend Mode )', 'component': 'Ti.UI.MaskedImage' }, {
|
|
440
|
+
'default': '{ mode: {value} }'
|
|
441
|
+
}, {
|
|
442
|
+
'bg-blend': {
|
|
443
|
+
'default': {
|
|
444
|
+
'clear': 'Ti.UI.BLEND_MODE_CLEAR',
|
|
445
|
+
'copy': 'Ti.UI.BLEND_MODE_COPY',
|
|
446
|
+
'darken': 'Ti.UI.BLEND_MODE_DARKEN',
|
|
447
|
+
'destination-atop': 'Ti.UI.BLEND_MODE_DESTINATION_ATOP',
|
|
448
|
+
'destination-in': 'Ti.UI.BLEND_MODE_DESTINATION_IN',
|
|
449
|
+
'destination-out': 'Ti.UI.BLEND_MODE_DESTINATION_OUT',
|
|
450
|
+
'destination-over': 'Ti.UI.BLEND_MODE_DESTINATION_OVER',
|
|
451
|
+
'lighten': 'Ti.UI.BLEND_MODE_LIGHTEN',
|
|
452
|
+
'multiply': 'Ti.UI.BLEND_MODE_MULTIPLY',
|
|
453
|
+
'normal': 'Ti.UI.BLEND_MODE_NORMAL',
|
|
454
|
+
'overlay': 'Ti.UI.BLEND_MODE_OVERLAY',
|
|
455
|
+
'plus-lighter': 'Ti.UI.BLEND_MODE_PLUS_LIGHTER',
|
|
456
|
+
'screen': 'Ti.UI.BLEND_MODE_SCREEN',
|
|
457
|
+
'source-atop': 'Ti.UI.BLEND_MODE_SOURCE_ATOP',
|
|
458
|
+
'source-in': 'Ti.UI.BLEND_MODE_SOURCE_IN',
|
|
459
|
+
'source-out': 'Ti.UI.BLEND_MODE_SOURCE_OUT',
|
|
460
|
+
'xor': 'Ti.UI.BLEND_MODE_XOR',
|
|
461
|
+
},
|
|
462
|
+
'ios': {
|
|
463
|
+
'color': 'Ti.UI.BLEND_MODE_COLOR',
|
|
464
|
+
'color-burn': 'Ti.UI.BLEND_MODE_COLOR_BURN',
|
|
465
|
+
'color-dodge': 'Ti.UI.BLEND_MODE_COLOR_DODGE',
|
|
466
|
+
'diference': 'Ti.UI.BLEND_MODE_DIFFERENCE',
|
|
467
|
+
'exclusion': 'Ti.UI.BLEND_MODE_EXCLUSION',
|
|
468
|
+
'hard-light': 'Ti.UI.BLEND_MODE_HARD_LIGHT',
|
|
469
|
+
'hue': 'Ti.UI.BLEND_MODE_HUE',
|
|
470
|
+
'luminosity': 'Ti.UI.BLEND_MODE_LUMINOSITY',
|
|
471
|
+
'plus-darker': 'Ti.UI.BLEND_MODE_PLUS_DARKER',
|
|
472
|
+
'saturation': 'Ti.UI.BLEND_MODE_SATURATION',
|
|
473
|
+
'soft-light': 'Ti.UI.BLEND_MODE_SOFT_LIGHT',
|
|
474
|
+
},
|
|
475
|
+
}
|
|
476
|
+
});
|
|
477
|
+
}
|
|
478
|
+
exports.backgroundBlendMode = backgroundBlendMode;
|
|
479
|
+
|
|
254
480
|
function radialGradient() {
|
|
255
|
-
let convertedStyles =
|
|
481
|
+
let convertedStyles = processComments({ 'prop': 'backgroundGradient: type, startRadius, endRadius, backfillStart, backfillEnd', 'component': 'Ti.UI.ListItem, Ti.UI.View' });
|
|
256
482
|
|
|
257
483
|
convertedStyles += `'.bg-radial[platform=ios]': { backgroundGradient: { type: 'radial', startRadius: '125%', endRadius: '0%', backfillStart: true, backfillEnd: true } }\n`;
|
|
258
484
|
convertedStyles += `'.bg-radial-to-b[platform=ios]': { backgroundGradient: { type: 'radial', startPoint: { x: '50%', y: '0%' }, endPoint: { x: '50%', y: '0%' }, startRadius: '150%', endRadius: '0%', backfillStart: true, backfillEnd: true } }\n`;
|
|
@@ -269,7 +495,7 @@ function radialGradient() {
|
|
|
269
495
|
exports.radialGradient = radialGradient;
|
|
270
496
|
|
|
271
497
|
function gradientColorStops({ ...modifiersAndValues }) {
|
|
272
|
-
let convertedStyles = '
|
|
498
|
+
let convertedStyles = processComments({ 'prop': 'backgroundGradient: colors - From Color', 'component': 'Ti.UI.ListItem, Ti.UI.View' });
|
|
273
499
|
|
|
274
500
|
let objectPosition = { 'from': '{ backgroundGradient: { colors: [ {transparentValue}, {value} ] } }' };
|
|
275
501
|
|
|
@@ -285,7 +511,7 @@ function gradientColorStops({ ...modifiersAndValues }) {
|
|
|
285
511
|
});
|
|
286
512
|
});
|
|
287
513
|
|
|
288
|
-
convertedStyles += '
|
|
514
|
+
convertedStyles += processComments({ 'prop': 'backgroundGradient: colors - To Color', 'component': 'Ti.UI.ListItem, Ti.UI.View' });
|
|
289
515
|
|
|
290
516
|
objectPosition = { 'to': '{ backgroundGradient: { colors: [ {value} ] } }' };
|
|
291
517
|
|
|
@@ -312,58 +538,254 @@ function fontSize({ ...modifiersAndValues }) {
|
|
|
312
538
|
cleanValues[key] = Array.isArray(value) ? value[0] : value;
|
|
313
539
|
});
|
|
314
540
|
|
|
315
|
-
return
|
|
541
|
+
return processProperties({ 'prop': 'fontSize', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Button, Ti.UI.Label, Ti.UI.ListItem, Ti.UI.Picker, Ti.UI.PickerColumn, Ti.UI.PickerRow, Ti.UI.ProgressBar, Ti.UI.Switch, Ti.UI.TableViewRow, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
542
|
+
'text': '{ font: { fontSize: {value} } }'
|
|
543
|
+
}, cleanValues);
|
|
316
544
|
}
|
|
317
545
|
exports.fontSize = fontSize;
|
|
318
546
|
|
|
319
|
-
function
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
547
|
+
function opacity(modifiersAndValues) {
|
|
548
|
+
return processProperties({ 'prop': 'opacity', 'component': 'Ti.UI.Animation, Ti.UI.TableViewRow, Ti.UI.View, Ti.UI.Window' }, {
|
|
549
|
+
'opacity': '{ opacity: {value} }'
|
|
550
|
+
}, modifiersAndValues);
|
|
551
|
+
}
|
|
552
|
+
exports.opacity = opacity;
|
|
323
553
|
|
|
324
|
-
|
|
554
|
+
function fontStyle() {
|
|
555
|
+
return processProperties({ 'prop': 'fontStyle', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Button, Ti.UI.Label, Ti.UI.ListItem, Ti.UI.Picker, Ti.UI.PickerColumn, Ti.UI.PickerRow, Ti.UI.ProgressBar, Ti.UI.Switch, Ti.UI.TableViewRow, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
556
|
+
'default': '{ font: { fontStyle: {value} } }'
|
|
557
|
+
}, {
|
|
558
|
+
'italic': 'italic',
|
|
559
|
+
'not-italic': 'normal',
|
|
560
|
+
});
|
|
325
561
|
}
|
|
326
562
|
exports.fontStyle = fontStyle;
|
|
327
563
|
|
|
328
|
-
function
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
564
|
+
function cacheSize() {
|
|
565
|
+
return processProperties({ 'prop': 'cacheSize', 'component': 'Ti.UI.ScrollableView' }, {
|
|
566
|
+
'cache-size': '{ cacheSize: {value} }'
|
|
567
|
+
}, {
|
|
568
|
+
1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
exports.cacheSize = cacheSize;
|
|
572
|
+
|
|
573
|
+
function activityIndicatorStyle() {
|
|
574
|
+
return processProperties({ 'prop': 'style', 'component': 'Ti.UI.ActivityIndicator' }, {
|
|
575
|
+
'activity-indicator-style': '{ style: {value} }',
|
|
576
|
+
}, {
|
|
577
|
+
'big': 'Ti.UI.ActivityIndicatorStyle.BIG',
|
|
578
|
+
'dark': 'Ti.UI.ActivityIndicatorStyle.DARK',
|
|
579
|
+
'big-dark': 'Ti.UI.ActivityIndicatorStyle.BIG_DARK',
|
|
580
|
+
'plain': 'Ti.UI.ActivityIndicatorStyle.PLAIN'
|
|
581
|
+
});
|
|
582
|
+
}
|
|
583
|
+
exports.activityIndicatorStyle = activityIndicatorStyle;
|
|
584
|
+
|
|
585
|
+
function statusBar() {
|
|
586
|
+
return processProperties({ 'prop': 'statusBarStyle - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
587
|
+
'default': '{ statusBarStyle: {value} }'
|
|
588
|
+
}, {
|
|
589
|
+
'status-bar': {
|
|
590
|
+
'ios': {
|
|
591
|
+
'default': 'Ti.UI.iOS.StatusBar.DEFAULT',
|
|
592
|
+
'dark': 'Ti.UI.iOS.StatusBar.DARK_CONTENT',
|
|
593
|
+
'light': 'Ti.UI.iOS.StatusBar.LIGHT_CONTENT',
|
|
594
|
+
}
|
|
595
|
+
}
|
|
596
|
+
});
|
|
597
|
+
}
|
|
598
|
+
exports.statusBar = statusBar;
|
|
332
599
|
|
|
333
|
-
|
|
600
|
+
function disableBounce() {
|
|
601
|
+
return processProperties({ 'prop': 'disableBounce', 'component': 'Ti.UI.ListView, Ti.UI.ScrollableView, Ti.UI.ScrollView, Ti.UI.WebView' }, {
|
|
602
|
+
'default': '{ disableBounce: {value} }'
|
|
603
|
+
}, {
|
|
604
|
+
'disable-bounce': true,
|
|
605
|
+
'enable-bounce': false,
|
|
606
|
+
});
|
|
334
607
|
}
|
|
335
|
-
exports.
|
|
608
|
+
exports.disableBounce = disableBounce;
|
|
336
609
|
|
|
337
|
-
function
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
610
|
+
function bubbleParent() {
|
|
611
|
+
return processProperties({ 'prop': 'bubbleParent', 'component': 'Ti.Proxy' }, {
|
|
612
|
+
'default': '{ bubbleParent: {value} }'
|
|
613
|
+
}, {
|
|
614
|
+
'bubble-parent': true,
|
|
615
|
+
'dont-bubble-parent': false,
|
|
616
|
+
});
|
|
617
|
+
}
|
|
618
|
+
exports.bubbleParent = bubbleParent;
|
|
341
619
|
|
|
342
|
-
|
|
620
|
+
function draggingType() {
|
|
621
|
+
return processProperties({ 'prop': 'draggingType', 'component': 'For the Animation Component' }, {
|
|
622
|
+
'default': '{ draggingType: {value} }'
|
|
623
|
+
}, {
|
|
624
|
+
'drag-apply': 'apply',
|
|
625
|
+
'drag-animate': 'animate',
|
|
626
|
+
});
|
|
343
627
|
}
|
|
344
628
|
exports.draggingType = draggingType;
|
|
345
629
|
|
|
346
630
|
function keepScreenOn() {
|
|
347
|
-
|
|
631
|
+
return processProperties({ 'prop': 'keepScreenOn - Android Only', 'component': 'Ti.UI.View' }, {
|
|
632
|
+
'default': '{ keepScreenOn: {value} }'
|
|
633
|
+
}, {
|
|
634
|
+
'keep-screen': {
|
|
635
|
+
'android': {
|
|
636
|
+
'on': true,
|
|
637
|
+
}
|
|
638
|
+
}
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
exports.keepScreenOn = keepScreenOn;
|
|
348
642
|
|
|
349
|
-
|
|
350
|
-
|
|
643
|
+
function largeTitleDisplayMode() {
|
|
644
|
+
return processProperties({ 'prop': 'largeTitleDisplayMode - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
645
|
+
'default': '{ largeTitleDisplayMode: {value} }'
|
|
646
|
+
}, {
|
|
647
|
+
'large-title-display': {
|
|
648
|
+
'ios': {
|
|
649
|
+
'always': 'Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_ALWAYS',
|
|
650
|
+
'automatic': 'Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_AUTOMATIC',
|
|
651
|
+
'never': 'Ti.UI.iOS.LARGE_TITLE_DISPLAY_MODE_NEVER',
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
exports.largeTitleDisplayMode = largeTitleDisplayMode;
|
|
351
657
|
|
|
352
|
-
|
|
658
|
+
function autoAdjustScrollViewInsets() {
|
|
659
|
+
return processProperties({ 'prop': 'autoAdjustScrollViewInsets - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
660
|
+
'default': '{ autoAdjustScrollViewInsets: {value} }'
|
|
661
|
+
}, {
|
|
662
|
+
'auto-adjust-scroll-view-inset': {
|
|
663
|
+
'ios': {
|
|
664
|
+
'default': true,
|
|
665
|
+
}
|
|
666
|
+
}
|
|
667
|
+
});
|
|
353
668
|
}
|
|
354
|
-
exports.
|
|
669
|
+
exports.autoAdjustScrollViewInsets = autoAdjustScrollViewInsets;
|
|
355
670
|
|
|
356
|
-
function
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
671
|
+
function largeTitleEnabled() {
|
|
672
|
+
return processProperties({ 'prop': 'largeTitleEnabled - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
673
|
+
'default': '{ largeTitleEnabled: {value} }'
|
|
674
|
+
}, {
|
|
675
|
+
'large-title': {
|
|
676
|
+
'ios': {
|
|
677
|
+
'enabled': true,
|
|
678
|
+
}
|
|
679
|
+
}
|
|
680
|
+
});
|
|
681
|
+
}
|
|
682
|
+
exports.largeTitleEnabled = largeTitleEnabled;
|
|
360
683
|
|
|
361
|
-
|
|
684
|
+
function includeOpaqueBars() {
|
|
685
|
+
return processProperties({ 'prop': 'includeOpaqueBars - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
686
|
+
'default': '{ includeOpaqueBars: {value} }'
|
|
687
|
+
}, {
|
|
688
|
+
'include': {
|
|
689
|
+
'ios': {
|
|
690
|
+
'opaque-bars': true,
|
|
691
|
+
}
|
|
692
|
+
},
|
|
693
|
+
'exclude': {
|
|
694
|
+
'ios': {
|
|
695
|
+
'opaque-bars': false,
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
});
|
|
699
|
+
}
|
|
700
|
+
exports.includeOpaqueBars = includeOpaqueBars;
|
|
701
|
+
|
|
702
|
+
function extendEdges() {
|
|
703
|
+
return processProperties({ 'prop': 'extendEdges - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
704
|
+
'default': '{ extendEdges: {value} }'
|
|
705
|
+
}, {
|
|
706
|
+
'extend-edges': {
|
|
707
|
+
'ios': {
|
|
708
|
+
'all': '[ Ti.UI.EXTEND_EDGE_ALL ]',
|
|
709
|
+
'bottom': '[ Ti.UI.EXTEND_EDGE_BOTTOM ]',
|
|
710
|
+
'left': '[ Ti.UI.EXTEND_EDGE_LEFT ]',
|
|
711
|
+
'none': '[ Ti.UI.EXTEND_EDGE_NONE ]',
|
|
712
|
+
'right': '[ Ti.UI.EXTEND_EDGE_RIGHT ]',
|
|
713
|
+
'top': '[ Ti.UI.EXTEND_EDGE_TOP ]',
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
});
|
|
717
|
+
}
|
|
718
|
+
exports.extendEdges = extendEdges;
|
|
719
|
+
|
|
720
|
+
function extendSafeArea() {
|
|
721
|
+
return processProperties({ 'prop': 'extendSafeArea', 'component': 'Ti.UI.Window' }, {
|
|
722
|
+
'default': '{ extendSafeArea: {value} }'
|
|
723
|
+
}, {
|
|
724
|
+
'extend-safe-area': true,
|
|
725
|
+
'dont-extend-safe-area': false,
|
|
726
|
+
});
|
|
727
|
+
}
|
|
728
|
+
exports.extendSafeArea = extendSafeArea;
|
|
729
|
+
|
|
730
|
+
function flagSecure() {
|
|
731
|
+
return processProperties({ 'prop': 'flagSecure', 'component': 'Ti.UI.Window' }, {
|
|
732
|
+
'default': '{ flagSecure: {value} }'
|
|
733
|
+
}, {
|
|
734
|
+
'flag': {
|
|
735
|
+
'android': {
|
|
736
|
+
'secure': true,
|
|
737
|
+
'not-secure': false,
|
|
738
|
+
}
|
|
739
|
+
}
|
|
740
|
+
});
|
|
741
|
+
}
|
|
742
|
+
exports.flagSecure = flagSecure;
|
|
743
|
+
|
|
744
|
+
function overlay() {
|
|
745
|
+
return processProperties({ 'prop': 'overlayEnabled', 'component': 'Ti.UI.ScrollableView' }, {
|
|
746
|
+
'default': '{ overlayEnabled: {value} }'
|
|
747
|
+
}, {
|
|
748
|
+
'overlay': {
|
|
749
|
+
'ios': {
|
|
750
|
+
'enabled': true,
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
});
|
|
362
754
|
}
|
|
363
755
|
exports.overlay = overlay;
|
|
364
756
|
|
|
757
|
+
function translucent() {
|
|
758
|
+
return processProperties({ 'prop': 'translucent - iOS Only', 'component': 'Ti.UI.iOS.Toolbar, Ti.UI.TabGroup, Ti.UI.Toolbar, Ti.UI.Window' }, {
|
|
759
|
+
'default': '{ translucent: {value} }'
|
|
760
|
+
}, {
|
|
761
|
+
'translucent': {
|
|
762
|
+
'ios': {
|
|
763
|
+
'default': true,
|
|
764
|
+
'disabled': false,
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
exports.translucent = translucent;
|
|
770
|
+
|
|
771
|
+
function tabsTranslucent() {
|
|
772
|
+
return processProperties({ 'prop': 'tabsTranslucent - iOS Only', 'component': 'Ti.UI.TabGroup' }, {
|
|
773
|
+
'default': '{ tabsTranslucent: {value} }'
|
|
774
|
+
}, {
|
|
775
|
+
'tabs': {
|
|
776
|
+
'ios': {
|
|
777
|
+
'translucent': true,
|
|
778
|
+
'not-translucent': false,
|
|
779
|
+
}
|
|
780
|
+
}
|
|
781
|
+
});
|
|
782
|
+
}
|
|
783
|
+
exports.tabsTranslucent = tabsTranslucent;
|
|
784
|
+
|
|
365
785
|
function displayCaps() {
|
|
366
|
-
let convertedStyles = '\n//
|
|
786
|
+
let convertedStyles = '\n// Property(ies): width, height\n';
|
|
787
|
+
convertedStyles += '// Component(s): Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.View\n';
|
|
788
|
+
convertedStyles += '// Description: width and height properties using Ti.Platform.displayCaps platformWidth and platformHeight values\n';
|
|
367
789
|
convertedStyles += `'.platform-w': { width: Ti.Platform.displayCaps.platformWidth }\n`;
|
|
368
790
|
convertedStyles += `'.platform-h': { height: Ti.Platform.displayCaps.platformHeight }\n`;
|
|
369
791
|
|
|
@@ -377,112 +799,243 @@ function displayCaps() {
|
|
|
377
799
|
}
|
|
378
800
|
exports.displayCaps = displayCaps;
|
|
379
801
|
|
|
380
|
-
function
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
802
|
+
function scrollingEnabled() {
|
|
803
|
+
return processProperties({ 'prop': 'scrollingEnabled', 'component': 'Ti.UI.ScrollableView, Ti.UI.ScrollView' }, {
|
|
804
|
+
'scrolling': '{ scrollingEnabled: {value} }'
|
|
805
|
+
}, {
|
|
806
|
+
'enabled': true,
|
|
807
|
+
'disabled': false,
|
|
808
|
+
});
|
|
809
|
+
}
|
|
810
|
+
exports.scrollingEnabled = scrollingEnabled;
|
|
384
811
|
|
|
385
|
-
|
|
812
|
+
function modal() {
|
|
813
|
+
return processProperties({ 'prop': 'modal', 'component': 'Ti.UI.Window' }, {
|
|
814
|
+
'default': '{ modal: {value} }'
|
|
815
|
+
}, {
|
|
816
|
+
'modal': true,
|
|
817
|
+
'regular': false,
|
|
818
|
+
});
|
|
386
819
|
}
|
|
387
|
-
exports.
|
|
820
|
+
exports.modal = modal;
|
|
388
821
|
|
|
389
|
-
function
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
822
|
+
function fullscreen() {
|
|
823
|
+
return processProperties({ 'prop': 'fullscreen', 'component': 'Ti.Media.VideoPlayer[android], Ti.UI.TextArea, Ti.UI.TextField, Ti.UI.Window' }, {
|
|
824
|
+
'default': '{ fullscreen: {value} }'
|
|
825
|
+
}, {
|
|
826
|
+
'fullscreen': true,
|
|
827
|
+
'fullscreen-disabled': false,
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
exports.fullscreen = fullscreen;
|
|
393
831
|
|
|
394
|
-
|
|
832
|
+
function hidesBackButton() {
|
|
833
|
+
return processProperties({ 'prop': 'hidesBackButton', 'component': 'Ti.UI.Window' }, {
|
|
834
|
+
'default': '{ hidesBackButton: {value} }'
|
|
835
|
+
}, {
|
|
836
|
+
'hides-back-button': true,
|
|
837
|
+
'shows-back-button': false,
|
|
838
|
+
});
|
|
395
839
|
}
|
|
396
|
-
exports.
|
|
840
|
+
exports.hidesBackButton = hidesBackButton;
|
|
397
841
|
|
|
398
|
-
function
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
842
|
+
function hidesBarsOnSwipe() {
|
|
843
|
+
return processProperties({ 'prop': 'hidesBarsOnSwipe - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
844
|
+
'default': '{ hidesBarsOnSwipe: {value} }'
|
|
845
|
+
}, {
|
|
846
|
+
'hides': {
|
|
847
|
+
'ios': {
|
|
848
|
+
'bars-on-swipe': true,
|
|
849
|
+
}
|
|
850
|
+
},
|
|
851
|
+
'shows': {
|
|
852
|
+
'ios': {
|
|
853
|
+
'bars-on-swipe': false,
|
|
854
|
+
}
|
|
855
|
+
}
|
|
856
|
+
});
|
|
404
857
|
}
|
|
405
|
-
exports.
|
|
406
|
-
|
|
407
|
-
function autoreverse() {
|
|
408
|
-
let convertedStyles = '\n// autoreverse Property\n';
|
|
409
|
-
convertedStyles += `'.autoreverse': { autoreverse: true }\n`;
|
|
410
|
-
convertedStyles += `'.no-autoreverse': { autoreverse: false }\n`;
|
|
858
|
+
exports.hidesBarsOnSwipe = hidesBarsOnSwipe;
|
|
411
859
|
|
|
412
|
-
|
|
860
|
+
function hidesBarsOnTap() {
|
|
861
|
+
return processProperties({ 'prop': 'hidesBarsOnTap - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
862
|
+
'default': '{ hidesBarsOnTap: {value} }'
|
|
863
|
+
}, {
|
|
864
|
+
'hides': {
|
|
865
|
+
'ios': {
|
|
866
|
+
'bars-on-tap': true,
|
|
867
|
+
}
|
|
868
|
+
},
|
|
869
|
+
'shows': {
|
|
870
|
+
'ios': {
|
|
871
|
+
'bars-on-tap': false,
|
|
872
|
+
}
|
|
873
|
+
}
|
|
874
|
+
});
|
|
413
875
|
}
|
|
414
|
-
exports.
|
|
876
|
+
exports.hidesBarsOnTap = hidesBarsOnTap;
|
|
415
877
|
|
|
416
|
-
function
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
878
|
+
function hidesBarsWhenKeyboardAppears() {
|
|
879
|
+
return processProperties({ 'prop': 'hidesBarsWhenKeyboardAppears - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
880
|
+
'default': '{ hidesBarsWhenKeyboardAppears: {value} }'
|
|
881
|
+
}, {
|
|
882
|
+
'hides': {
|
|
883
|
+
'ios': {
|
|
884
|
+
'bars-when-keyboard-appears': true,
|
|
885
|
+
}
|
|
886
|
+
},
|
|
887
|
+
'shows': {
|
|
888
|
+
'ios': {
|
|
889
|
+
'bars-when-keyboard-appears': false,
|
|
890
|
+
}
|
|
891
|
+
}
|
|
892
|
+
});
|
|
893
|
+
}
|
|
894
|
+
exports.hidesBarsWhenKeyboardAppears = hidesBarsWhenKeyboardAppears;
|
|
422
895
|
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
896
|
+
function hideShadow() {
|
|
897
|
+
return processProperties({ 'prop': 'hideShadow - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
898
|
+
'default': '{ hideShadow: {value} }'
|
|
899
|
+
}, {
|
|
900
|
+
'hide': {
|
|
901
|
+
'ios': {
|
|
902
|
+
'shadow': true,
|
|
903
|
+
}
|
|
904
|
+
},
|
|
905
|
+
'show': {
|
|
906
|
+
'ios': {
|
|
907
|
+
'shadow': false,
|
|
908
|
+
}
|
|
909
|
+
}
|
|
910
|
+
});
|
|
911
|
+
}
|
|
912
|
+
exports.hideShadow = hideShadow;
|
|
427
913
|
|
|
428
|
-
|
|
914
|
+
function hidesSearchBarWhenScrolling() {
|
|
915
|
+
return processProperties({ 'prop': 'hidesSearchBarWhenScrolling - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
916
|
+
'default': '{ hidesSearchBarWhenScrolling: {value} }'
|
|
917
|
+
}, {
|
|
918
|
+
'hides': {
|
|
919
|
+
'ios': {
|
|
920
|
+
'search-bar-when-scrolling': true,
|
|
921
|
+
}
|
|
922
|
+
},
|
|
923
|
+
'shows': {
|
|
924
|
+
'ios': {
|
|
925
|
+
'search-bar-when-scrolling': false,
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
});
|
|
429
929
|
}
|
|
430
|
-
exports.
|
|
930
|
+
exports.hidesSearchBarWhenScrolling = hidesSearchBarWhenScrolling;
|
|
431
931
|
|
|
432
|
-
function
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
932
|
+
function homeIndicatorAutoHidden() {
|
|
933
|
+
return processProperties({ 'prop': 'homeIndicatorAutoHidden - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
934
|
+
'default': '{ homeIndicatorAutoHidden: {value} }'
|
|
935
|
+
}, {
|
|
936
|
+
'home-indicator-auto-hidden': {
|
|
937
|
+
'ios': {
|
|
938
|
+
'default': true,
|
|
939
|
+
}
|
|
940
|
+
}
|
|
941
|
+
});
|
|
942
|
+
}
|
|
943
|
+
exports.homeIndicatorAutoHidden = homeIndicatorAutoHidden;
|
|
439
944
|
|
|
440
|
-
|
|
441
|
-
|
|
945
|
+
function pagingControl() {
|
|
946
|
+
return processProperties({ 'prop': 'showPagingControl', 'component': 'Ti.UI.ScrollableView' }, {
|
|
947
|
+
'default': '{ showPagingControl: {value} }'
|
|
948
|
+
}, {
|
|
949
|
+
'show-paging-control': true,
|
|
442
950
|
});
|
|
951
|
+
}
|
|
952
|
+
exports.pagingControl = pagingControl;
|
|
443
953
|
|
|
444
|
-
|
|
954
|
+
function pagingControlOnTop() {
|
|
955
|
+
return processProperties({ 'prop': 'pagingControlOnTop', 'component': 'Ti.UI.ScrollableView' }, {
|
|
956
|
+
'paging-control-on': '{ pagingControlOnTop: {value} }'
|
|
957
|
+
}, {
|
|
958
|
+
'top': true,
|
|
959
|
+
'bottom': false
|
|
960
|
+
});
|
|
445
961
|
}
|
|
446
|
-
exports.
|
|
962
|
+
exports.pagingControlOnTop = pagingControlOnTop;
|
|
447
963
|
|
|
448
|
-
function
|
|
449
|
-
|
|
450
|
-
'
|
|
451
|
-
|
|
452
|
-
'
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
'gap-y': '{ top: {value}, bottom: {value} }',
|
|
457
|
-
}
|
|
964
|
+
function autoreverse() {
|
|
965
|
+
return processProperties({ 'prop': 'autoreverse', 'component': 'Ti.UI.Animation' }, {
|
|
966
|
+
'default': '{ autoreverse: {value} }'
|
|
967
|
+
}, {
|
|
968
|
+
'autoreverse': true,
|
|
969
|
+
});
|
|
970
|
+
}
|
|
971
|
+
exports.autoreverse = autoreverse;
|
|
458
972
|
|
|
459
|
-
|
|
460
|
-
|
|
973
|
+
function transition() {
|
|
974
|
+
let convertedStyles = processProperties({ 'prop': 'curve', 'component': 'Ti.UI.Animation' }, {
|
|
975
|
+
'ease': '{ curve: {value} }'
|
|
976
|
+
}, {
|
|
977
|
+
'in': 'Ti.UI.ANIMATION_CURVE_EASE_IN',
|
|
978
|
+
'out': 'Ti.UI.ANIMATION_CURVE_EASE_OUT',
|
|
979
|
+
'linear': 'Ti.UI.ANIMATION_CURVE_LINEAR',
|
|
980
|
+
'in-out': 'Ti.UI.ANIMATION_CURVE_EASE_IN_OUT',
|
|
981
|
+
});
|
|
461
982
|
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
delete modifiersAndValues['max-content'];
|
|
983
|
+
convertedStyles += processProperties('debug', {
|
|
984
|
+
'debug': '{ debug: {value} }'
|
|
985
|
+
}, {
|
|
986
|
+
'default': true,
|
|
987
|
+
});
|
|
468
988
|
|
|
469
|
-
return
|
|
989
|
+
return convertedStyles;
|
|
470
990
|
}
|
|
471
|
-
exports.
|
|
991
|
+
exports.transition = transition;
|
|
472
992
|
|
|
473
993
|
function gridFlow() {
|
|
474
|
-
|
|
994
|
+
return processProperties({ 'prop': 'layout', 'component': 'Ti.UI.View', 'description': 'Grid Flow - layout' }, {
|
|
995
|
+
'grid': '{ layout: {value} }'
|
|
996
|
+
}, {
|
|
475
997
|
'default': 'horizontal',
|
|
476
998
|
'flow-col': 'horizontal',
|
|
477
999
|
'flow-row': 'vertical',
|
|
478
|
-
};
|
|
479
|
-
|
|
480
|
-
return processModifiersAndProperties('grid and gridFlow', { 'grid': '{ layout: {value} }' }, modifiersAndValues);
|
|
1000
|
+
});
|
|
481
1001
|
}
|
|
482
1002
|
exports.gridFlow = gridFlow;
|
|
483
1003
|
|
|
1004
|
+
function orientationModes() {
|
|
1005
|
+
let convertedStyles = processProperties({ 'prop': 'orientationModes', 'component': 'Ti.UI.Window' }, {
|
|
1006
|
+
'default': '{ orientationModes: {value} }'
|
|
1007
|
+
}, {
|
|
1008
|
+
'orientation': {
|
|
1009
|
+
'default': {
|
|
1010
|
+
'left': '[ Ti.UI.LANDSCAPE_LEFT ]',
|
|
1011
|
+
'right': '[ Ti.UI.LANDSCAPE_RIGHT ]',
|
|
1012
|
+
'portrait': '[ Ti.UI.PORTRAIT ]',
|
|
1013
|
+
'upside-portrait': '[ Ti.UI.UPSIDE_PORTRAIT ]',
|
|
1014
|
+
'landscape': '[ Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT ]',
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
1018
|
+
|
|
1019
|
+
convertedStyles += processProperties({ 'prop': 'orientationModes (Alternative)', 'component': 'Ti.UI.Window' }, {
|
|
1020
|
+
'default': '{ orientationModes: {value} }'
|
|
1021
|
+
}, {
|
|
1022
|
+
'portrait': '[ Ti.UI.PORTRAIT ]',
|
|
1023
|
+
'upside-portrait': '[ Ti.UI.UPSIDE_PORTRAIT ]',
|
|
1024
|
+
'landscape-left': '[ Ti.UI.LANDSCAPE_LEFT ]',
|
|
1025
|
+
'landscape-right': '[ Ti.UI.LANDSCAPE_RIGHT ]',
|
|
1026
|
+
'landscape': '[ Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT ]',
|
|
1027
|
+
});
|
|
1028
|
+
|
|
1029
|
+
return convertedStyles;
|
|
1030
|
+
}
|
|
1031
|
+
exports.orientationModes = orientationModes;
|
|
1032
|
+
|
|
484
1033
|
function items() {
|
|
485
|
-
let convertedStyles =
|
|
1034
|
+
let convertedStyles = processComments({
|
|
1035
|
+
prop: 'top, bottom, width(FILL), height(FILL)',
|
|
1036
|
+
component: 'Ti.UI.ActivityIndicator, Ti.UI.Animaiton, Ti.UI.View, Ti.UI.Window',
|
|
1037
|
+
description: 'top, bottom, width, height properties for aligning items in a Grid System',
|
|
1038
|
+
});
|
|
486
1039
|
convertedStyles += `'.items-start': { top: 0 }\n`;
|
|
487
1040
|
convertedStyles += `'.items-end': { bottom: 0 }\n`;
|
|
488
1041
|
convertedStyles += `'.items-center': { width: Ti.UI.FILL, height: Ti.UI.FILL }\n`;
|
|
@@ -491,18 +1044,22 @@ function items() {
|
|
|
491
1044
|
}
|
|
492
1045
|
exports.items = items;
|
|
493
1046
|
|
|
494
|
-
|
|
495
1047
|
function clipMode() {
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
1048
|
+
return processProperties({ 'prop': 'clipMode - iOS Only', 'component': 'Ti.UI.View' }, {
|
|
1049
|
+
'default': '{ clipMode: {value} }'
|
|
1050
|
+
}, {
|
|
1051
|
+
'clip': {
|
|
1052
|
+
'ios': {
|
|
1053
|
+
'enabled': 'Ti.UI.iOS.CLIP_MODE_ENABLED',
|
|
1054
|
+
'disabled': 'Ti.UI.iOS.CLIP_MODE_DISABLED',
|
|
1055
|
+
}
|
|
1056
|
+
}
|
|
1057
|
+
});
|
|
501
1058
|
}
|
|
502
1059
|
exports.clipMode = clipMode;
|
|
503
1060
|
|
|
504
1061
|
function exitOnClose() {
|
|
505
|
-
let convertedStyles = '
|
|
1062
|
+
let convertedStyles = processComments({ 'prop': 'exitOnClose', 'component': 'Ti.UI.TabGroup[android], Ti.UI.Window[android]' });
|
|
506
1063
|
convertedStyles += `'.exit-on-close[platform=android]': { exitOnClose: true }\n`;
|
|
507
1064
|
convertedStyles += `'.dont-exit-on-close[platform=android]': { exitOnClose: false }\n`;
|
|
508
1065
|
|
|
@@ -511,25 +1068,62 @@ function exitOnClose() {
|
|
|
511
1068
|
exports.exitOnClose = exitOnClose;
|
|
512
1069
|
|
|
513
1070
|
function layout() {
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
1071
|
+
return processProperties({ 'prop': 'layout', 'component': 'Ti.UI.OptionBar, Ti.UI.View' }, {
|
|
1072
|
+
'default': '{ layout: {value} }'
|
|
1073
|
+
}, {
|
|
1074
|
+
'horizontal': 'horizontal',
|
|
1075
|
+
'vertical': 'vertical',
|
|
1076
|
+
});
|
|
519
1077
|
}
|
|
520
1078
|
exports.layout = layout;
|
|
521
1079
|
|
|
522
1080
|
function scrollType() {
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
1081
|
+
return processProperties({ 'prop': 'scrollType', 'component': 'Ti.UI.ScrollView' }, {
|
|
1082
|
+
'default': '{ scrollType: {value} }'
|
|
1083
|
+
}, {
|
|
1084
|
+
'scroll': {
|
|
1085
|
+
'android': {
|
|
1086
|
+
'horizontal': 'horizontal',
|
|
1087
|
+
'vertical': 'vertical',
|
|
1088
|
+
}
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
528
1091
|
}
|
|
529
1092
|
exports.scrollType = scrollType;
|
|
530
1093
|
|
|
1094
|
+
function sustainedPerformanceMode() {
|
|
1095
|
+
return processProperties({ 'prop': 'sustainedPerformanceMode', 'component': 'Ti.UI.Window' }, {
|
|
1096
|
+
'default': '{ sustainedPerformanceMode: {value} }'
|
|
1097
|
+
}, {
|
|
1098
|
+
'sustained-performance-mode': {
|
|
1099
|
+
'android': {
|
|
1100
|
+
'default': true,
|
|
1101
|
+
}
|
|
1102
|
+
}
|
|
1103
|
+
});
|
|
1104
|
+
}
|
|
1105
|
+
exports.sustainedPerformanceMode = sustainedPerformanceMode;
|
|
1106
|
+
|
|
1107
|
+
function swipeToClose() {
|
|
1108
|
+
return processProperties({ 'prop': 'swipeToClose', 'component': 'Ti.UI.Window' }, {
|
|
1109
|
+
'default': '{ swipeToClose: {value} }'
|
|
1110
|
+
}, {
|
|
1111
|
+
'swipe-to-close': {
|
|
1112
|
+
'ios': {
|
|
1113
|
+
'default': true,
|
|
1114
|
+
}
|
|
1115
|
+
},
|
|
1116
|
+
'dont-swipe-to-close': {
|
|
1117
|
+
'ios': {
|
|
1118
|
+
'default': false,
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
});
|
|
1122
|
+
}
|
|
1123
|
+
exports.swipeToClose = swipeToClose;
|
|
1124
|
+
|
|
531
1125
|
function preventDefaultImage() {
|
|
532
|
-
let convertedStyles = '
|
|
1126
|
+
let convertedStyles = processComments({ 'prop': 'preventDefaultImage - iOS Only', 'component': 'Ti.UI.ImageView' });
|
|
533
1127
|
convertedStyles += `'.prevent-default-image[platform=ios]': { preventDefaultImage: true }\n`;
|
|
534
1128
|
convertedStyles += `'.display-default-image[platform=ios]': { preventDefaultImage: false }\n`;
|
|
535
1129
|
|
|
@@ -540,42 +1134,121 @@ exports.preventDefaultImage = preventDefaultImage;
|
|
|
540
1134
|
function tiMedia() {
|
|
541
1135
|
let convertedStyles = '\n// Ti.Media';
|
|
542
1136
|
|
|
543
|
-
convertedStyles +=
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
'
|
|
548
|
-
|
|
1137
|
+
convertedStyles += processProperties({
|
|
1138
|
+
'prop': 'audioSessionCategory - iOS Only',
|
|
1139
|
+
'component': 'Ti.Media'
|
|
1140
|
+
}, {
|
|
1141
|
+
'audio': '{ audioSessionCategory: {value} }'
|
|
1142
|
+
}, {
|
|
1143
|
+
'sesion': {
|
|
1144
|
+
'ios': {
|
|
1145
|
+
'record': 'Ti.Media.AUDIO_SESSION_CATEGORY_RECORD',
|
|
1146
|
+
'ambient': 'Ti.Media.AUDIO_SESSION_CATEGORY_AMBIENT',
|
|
1147
|
+
'playback': 'Ti.Media.AUDIO_SESSION_CATEGORY_PLAYBACK',
|
|
1148
|
+
'solo-ambient': 'Ti.Media.AUDIO_SESSION_CATEGORY_SOLO_AMBIENT',
|
|
1149
|
+
'play-record': 'Ti.Media.AUDIO_SESSION_CATEGORY_PLAY_AND_RECORD',
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
});
|
|
1153
|
+
|
|
1154
|
+
convertedStyles += processProperties({
|
|
1155
|
+
'prop': 'audioType',
|
|
1156
|
+
'component': 'Ti.Media.AudioPlayer[android], Ti.Media.Sound[android]'
|
|
1157
|
+
}, {
|
|
1158
|
+
'audio': '{ audioType: {value} }'
|
|
1159
|
+
}, {
|
|
1160
|
+
'type': {
|
|
1161
|
+
'android': {
|
|
1162
|
+
'ring': 'Ti.Media.Sound.AUDIO_TYPE_RING',
|
|
1163
|
+
'alarm': 'Ti.Media.Sound.AUDIO_TYPE_ALARM',
|
|
1164
|
+
'media': 'Ti.Media.Sound.AUDIO_TYPE_MEDIA',
|
|
1165
|
+
'voice': 'Ti.Media.Sound.AUDIO_TYPE_VOICE',
|
|
1166
|
+
'signalling': 'Ti.Media.Sound.AUDIO_TYPE_SIGNALLING',
|
|
1167
|
+
'notification': 'Ti.Media.Sound.AUDIO_TYPE_NOTIFICATION',
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
});
|
|
1171
|
+
|
|
1172
|
+
convertedStyles += processProperties({
|
|
1173
|
+
'prop': 'repeatMode - iOS Only',
|
|
1174
|
+
'component': 'Ti.Media.MusicPlayer'
|
|
1175
|
+
}, {
|
|
1176
|
+
'music': '{ repeatMode: {value} }'
|
|
1177
|
+
}, {
|
|
1178
|
+
'repeat': {
|
|
1179
|
+
'ios': {
|
|
1180
|
+
'all': 'Ti.Media.MUSIC_PLAYER_REPEAT_ALL',
|
|
1181
|
+
'default': 'Ti.Media.MUSIC_PLAYER_REPEAT_DEFAULT',
|
|
1182
|
+
'none': 'Ti.Media.MUSIC_PLAYER_REPEAT_NONE',
|
|
1183
|
+
'one': 'Ti.Media.MUSIC_PLAYER_REPEAT_ONE',
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
549
1186
|
});
|
|
550
1187
|
|
|
551
|
-
convertedStyles +=
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
1188
|
+
convertedStyles += processProperties({
|
|
1189
|
+
'prop': 'shuffleMode - iOS Only',
|
|
1190
|
+
'component': 'Ti.Media.MusicPlayer'
|
|
1191
|
+
}, {
|
|
1192
|
+
'music': '{ shuffleMode: {value} }'
|
|
1193
|
+
}, {
|
|
1194
|
+
'shuffle': {
|
|
1195
|
+
'ios': {
|
|
1196
|
+
'albums': 'Ti.Media.MUSIC_PLAYER_SHUFFLE_ALBUMS',
|
|
1197
|
+
'default': 'Ti.Media.MUSIC_PLAYER_SHUFFLE_DEFAULT',
|
|
1198
|
+
'none': 'Ti.Media.MUSIC_PLAYER_SHUFFLE_NONE',
|
|
1199
|
+
'songs': 'Ti.Media.MUSIC_PLAYER_SHUFFLE_SONGS',
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
558
1202
|
});
|
|
559
1203
|
|
|
560
|
-
convertedStyles +=
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
1204
|
+
convertedStyles += processProperties({
|
|
1205
|
+
'prop': 'scalingMode',
|
|
1206
|
+
'component': 'Ti.UI.ImageView',
|
|
1207
|
+
'description': 'Background Size for compatibility with Tailwind classes'
|
|
1208
|
+
}, {
|
|
1209
|
+
'bg': '{ scalingMode: {value} }'
|
|
1210
|
+
}, {
|
|
1211
|
+
'auto': 'Ti.Media.IMAGE_SCALING_NONE',
|
|
1212
|
+
'cover': 'Ti.Media.IMAGE_SCALING_ASPECT_FILL',
|
|
1213
|
+
'contain': 'Ti.Media.IMAGE_SCALING_ASPECT_FIT'
|
|
564
1214
|
});
|
|
565
1215
|
|
|
566
|
-
convertedStyles +=
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
1216
|
+
convertedStyles += processProperties({
|
|
1217
|
+
'prop': 'scalingMode',
|
|
1218
|
+
'component': 'Ti.UI.ImageView',
|
|
1219
|
+
'description': 'Image Scaling Mode'
|
|
1220
|
+
}, {
|
|
1221
|
+
'image-scaling': '{ scalingMode: {value} }'
|
|
1222
|
+
}, {
|
|
1223
|
+
'auto': 'Ti.Media.IMAGE_SCALING_AUTO',
|
|
1224
|
+
'none': 'Ti.Media.IMAGE_SCALING_NONE',
|
|
1225
|
+
'fill': 'Ti.Media.IMAGE_SCALING_FILL',
|
|
1226
|
+
'cover': 'Ti.Media.IMAGE_SCALING_ASPECT_FILL',
|
|
1227
|
+
'contain': 'Ti.Media.IMAGE_SCALING_ASPECT_FIT',
|
|
572
1228
|
});
|
|
573
1229
|
|
|
574
1230
|
// Video Scaling Mode
|
|
575
|
-
convertedStyles +=
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
1231
|
+
convertedStyles += processProperties({
|
|
1232
|
+
'prop': 'scalingMode',
|
|
1233
|
+
'component': 'Ti.Media.VideoPlayer',
|
|
1234
|
+
'description': 'Video Scaling Mode'
|
|
1235
|
+
}, {
|
|
1236
|
+
'video-scaling': '{ scalingMode: {value} }'
|
|
1237
|
+
}, {
|
|
1238
|
+
'resize': 'Ti.Media.VIDEO_SCALING_RESIZE',
|
|
1239
|
+
'contain': 'Ti.Media.VIDEO_SCALING_RESIZE_ASPECT',
|
|
1240
|
+
'cover': 'Ti.Media.VIDEO_SCALING_RESIZE_ASPECT_FILL'
|
|
1241
|
+
});
|
|
1242
|
+
|
|
1243
|
+
convertedStyles += processProperties({
|
|
1244
|
+
'prop': 'repeatMode',
|
|
1245
|
+
'component': 'Ti.Media.VideoPlayer',
|
|
1246
|
+
'description': 'Determines how the movie player repeats when reaching the end of playback.'
|
|
1247
|
+
}, {
|
|
1248
|
+
'video-repeat': '{ repeatMode: {value} }'
|
|
1249
|
+
}, {
|
|
1250
|
+
'one': 'Ti.Media.VIDEO_REPEAT_MODE_ONE',
|
|
1251
|
+
'none': 'Ti.Media.VIDEO_REPEAT_MODE_NONE',
|
|
579
1252
|
});
|
|
580
1253
|
|
|
581
1254
|
return convertedStyles;
|
|
@@ -583,244 +1256,430 @@ function tiMedia() {
|
|
|
583
1256
|
exports.tiMedia = tiMedia;
|
|
584
1257
|
|
|
585
1258
|
function autocapitalization() {
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
1259
|
+
return processProperties({ 'prop': 'autocapitalization', 'component': 'Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1260
|
+
'default': '{ autocapitalization: {value} }'
|
|
1261
|
+
}, {
|
|
1262
|
+
'uppercase': 'Ti.UI.TEXT_AUTOCAPITALIZATION_ALL',
|
|
1263
|
+
'normal-case': 'Ti.UI.TEXT_AUTOCAPITALIZATION_NONE',
|
|
1264
|
+
'capitalize': 'Ti.UI.TEXT_AUTOCAPITALIZATION_WORDS',
|
|
1265
|
+
'sentences': 'Ti.UI.TEXT_AUTOCAPITALIZATION_SENTENCES',
|
|
1266
|
+
});
|
|
594
1267
|
}
|
|
595
1268
|
exports.autocapitalization = autocapitalization;
|
|
596
1269
|
|
|
597
1270
|
function showCancel() {
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
return convertedStyles;
|
|
1271
|
+
return processProperties({ 'prop': 'showCancel', 'component': 'Ti.UI.SearchBar' }, {
|
|
1272
|
+
'default': '{ showCancel: {value} }'
|
|
1273
|
+
}, {
|
|
1274
|
+
'show-cancel': true,
|
|
1275
|
+
});
|
|
604
1276
|
}
|
|
605
1277
|
exports.showCancel = showCancel;
|
|
606
1278
|
|
|
607
|
-
function
|
|
608
|
-
|
|
609
|
-
'
|
|
610
|
-
|
|
611
|
-
'
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
1279
|
+
function loginKeyboardType() {
|
|
1280
|
+
return processProperties({ 'prop': 'loginKeyboardType', 'component': 'Ti.UI.AlertDialog' }, {
|
|
1281
|
+
'login-keyboard': '{ loginKeyboardType: {value} }'
|
|
1282
|
+
}, {
|
|
1283
|
+
'default': 'Ti.UI.KEYBOARD_TYPE_DEFAULT',
|
|
1284
|
+
'appearance': 'Ti.UI.KEYBOARD_APPEARANCE_DEFAULT',
|
|
1285
|
+
'appearance-dark': 'Ti.UI.KEYBOARD_APPEARANCE_DARK',
|
|
1286
|
+
'appearance-light': 'Ti.UI.KEYBOARD_APPEARANCE_LIGHT',
|
|
1287
|
+
'ascii': 'Ti.UI.KEYBOARD_TYPE_ASCII',
|
|
1288
|
+
'decimal-pad': 'Ti.UI.KEYBOARD_TYPE_DECIMAL_PAD',
|
|
1289
|
+
'email': 'Ti.UI.KEYBOARD_TYPE_EMAIL',
|
|
1290
|
+
'namephone-pad': 'Ti.UI.KEYBOARD_TYPE_NAMEPHONE_PAD',
|
|
1291
|
+
'number-pad': 'Ti.UI.KEYBOARD_TYPE_NUMBER_PAD',
|
|
1292
|
+
'numbers-punctuation': 'Ti.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION',
|
|
1293
|
+
'phone-pad': 'Ti.UI.KEYBOARD_TYPE_PHONE_PAD',
|
|
1294
|
+
'twitter': 'Ti.UI.KEYBOARD_TYPE_TWITTER',
|
|
1295
|
+
'url': 'Ti.UI.KEYBOARD_TYPE_URL',
|
|
1296
|
+
'websearch': 'Ti.UI.KEYBOARD_TYPE_WEBSEARCH',
|
|
1297
|
+
});
|
|
615
1298
|
}
|
|
616
|
-
exports.
|
|
1299
|
+
exports.loginKeyboardType = loginKeyboardType;
|
|
617
1300
|
|
|
618
1301
|
function keyboardAppearance() {
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
1302
|
+
return processProperties({ 'prop': 'keyboardAppearance - iOS Only', 'component': 'Ti.UI.AlertDialog, Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1303
|
+
'keyboard': '{ keyboardAppearance: {value} }'
|
|
1304
|
+
}, {
|
|
1305
|
+
'appearance': {
|
|
1306
|
+
'ios': {
|
|
1307
|
+
'default': 'Ti.UI.KEYBOARD_APPEARANCE_DEFAULT',
|
|
1308
|
+
'dark': 'Ti.UI.KEYBOARD_APPEARANCE_DARK',
|
|
1309
|
+
'light': 'Ti.UI.KEYBOARD_APPEARANCE_LIGHT'
|
|
1310
|
+
}
|
|
1311
|
+
}
|
|
1312
|
+
});
|
|
626
1313
|
}
|
|
627
1314
|
exports.keyboardAppearance = keyboardAppearance;
|
|
628
1315
|
|
|
629
|
-
function
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
//
|
|
645
|
-
// convertedStyles += '\n';
|
|
646
|
-
// convertedStyles += `'.keyboard-appearance-dark[platform=android]': { keyboardType: Ti.UI.KEYBOARD_APPEARANCE_DARK }\n`;
|
|
647
|
-
// convertedStyles += `'.keyboard-appearance-light[platform=android]': { keyboardType: Ti.UI.KEYBOARD_APPEARANCE_LIGHT }\n`;
|
|
648
|
-
// convertedStyles += `'.keyboard-appearance-default[platform=android]': { keyboardType: Ti.UI.KEYBOARD_APPEARANCE_DEFAULT }\n`;
|
|
1316
|
+
function keyboardDismissMode() {
|
|
1317
|
+
return processProperties({ 'prop': 'keyboardDismissMode - iOS Only', 'component': 'Ti.UI.AlertDialog, Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1318
|
+
'keyboard': '{ keyboardDismissMode: {value} }'
|
|
1319
|
+
}, {
|
|
1320
|
+
'dismiss': {
|
|
1321
|
+
'ios': {
|
|
1322
|
+
'interactive': 'Ti.UI.iOS.KEYBOARD_DISMISS_MODE_INTERACTIVE',
|
|
1323
|
+
'none': 'Ti.UI.iOS.KEYBOARD_DISMISS_MODE_NONE',
|
|
1324
|
+
'on-drag': 'Ti.UI.iOS.KEYBOARD_DISMISS_MODE_ON_DRAG',
|
|
1325
|
+
}
|
|
1326
|
+
}
|
|
1327
|
+
});
|
|
1328
|
+
}
|
|
1329
|
+
exports.keyboardDismissMode = keyboardDismissMode;
|
|
649
1330
|
|
|
650
|
-
|
|
1331
|
+
function keyboardType() {
|
|
1332
|
+
return processProperties({ 'prop': 'keyboardType', 'component': 'Ti.UI.AlertDialog, Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1333
|
+
'keyboard': '{ keyboardType: {value} }'
|
|
1334
|
+
}, {
|
|
1335
|
+
'type': {
|
|
1336
|
+
'default': {
|
|
1337
|
+
'default': 'Ti.UI.KEYBOARD_TYPE_DEFAULT',
|
|
1338
|
+
'ascii': 'Ti.UI.KEYBOARD_TYPE_ASCII',
|
|
1339
|
+
'decimal-pad': 'Ti.UI.KEYBOARD_TYPE_DECIMAL_PAD',
|
|
1340
|
+
'email': 'Ti.UI.KEYBOARD_TYPE_EMAIL',
|
|
1341
|
+
'namephone-pad': 'Ti.UI.KEYBOARD_TYPE_NAMEPHONE_PAD',
|
|
1342
|
+
'number-pad': 'Ti.UI.KEYBOARD_TYPE_NUMBER_PAD',
|
|
1343
|
+
'numbers-punctuation': 'Ti.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION',
|
|
1344
|
+
'phone-pad': 'Ti.UI.KEYBOARD_TYPE_PHONE_PAD',
|
|
1345
|
+
'url': 'Ti.UI.KEYBOARD_TYPE_URL'
|
|
1346
|
+
},
|
|
1347
|
+
'ios': {
|
|
1348
|
+
'appearance': 'Ti.UI.KEYBOARD_APPEARANCE_DEFAULT',
|
|
1349
|
+
'appearance-dark': 'Ti.UI.KEYBOARD_APPEARANCE_DARK',
|
|
1350
|
+
'appearance-light': 'Ti.UI.KEYBOARD_APPEARANCE_LIGHT',
|
|
1351
|
+
'twitter': 'Ti.UI.KEYBOARD_TYPE_TWITTER',
|
|
1352
|
+
'websearch': 'Ti.UI.KEYBOARD_TYPE_WEBSEARCH'
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
});
|
|
651
1356
|
}
|
|
652
1357
|
exports.keyboardType = keyboardType;
|
|
653
1358
|
|
|
654
|
-
function
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
1359
|
+
function passwordKeyboardType() {
|
|
1360
|
+
return processProperties({ 'prop': 'passwordKeyboardType', 'component': 'Ti.UI.AlertDialog' }, {
|
|
1361
|
+
'password': '{ passwordKeyboardType: {value} }'
|
|
1362
|
+
}, {
|
|
1363
|
+
'keyboard': {
|
|
1364
|
+
'default': {
|
|
1365
|
+
'default': 'Ti.UI.KEYBOARD_TYPE_DEFAULT',
|
|
1366
|
+
'ascii': 'Ti.UI.KEYBOARD_TYPE_ASCII',
|
|
1367
|
+
'decimal-pad': 'Ti.UI.KEYBOARD_TYPE_DECIMAL_PAD',
|
|
1368
|
+
'email': 'Ti.UI.KEYBOARD_TYPE_EMAIL',
|
|
1369
|
+
'namephone-pad': 'Ti.UI.KEYBOARD_TYPE_NAMEPHONE_PAD',
|
|
1370
|
+
'number-pad': 'Ti.UI.KEYBOARD_TYPE_NUMBER_PAD',
|
|
1371
|
+
'numbers-punctuation': 'Ti.UI.KEYBOARD_TYPE_NUMBERS_PUNCTUATION',
|
|
1372
|
+
'phone-pad': 'Ti.UI.KEYBOARD_TYPE_PHONE_PAD',
|
|
1373
|
+
'url': 'Ti.UI.KEYBOARD_TYPE_URL'
|
|
1374
|
+
},
|
|
1375
|
+
'ios': {
|
|
1376
|
+
'appearance': 'Ti.UI.KEYBOARD_APPEARANCE_DEFAULT',
|
|
1377
|
+
'appearance-dark': 'Ti.UI.KEYBOARD_APPEARANCE_DARK',
|
|
1378
|
+
'appearance-light': 'Ti.UI.KEYBOARD_APPEARANCE_LIGHT',
|
|
1379
|
+
'twitter': 'Ti.UI.KEYBOARD_TYPE_TWITTER',
|
|
1380
|
+
'websearch': 'Ti.UI.KEYBOARD_TYPE_WEBSEARCH'
|
|
1381
|
+
}
|
|
1382
|
+
}
|
|
1383
|
+
});
|
|
1384
|
+
}
|
|
1385
|
+
exports.passwordKeyboardType = passwordKeyboardType;
|
|
659
1386
|
|
|
660
|
-
|
|
1387
|
+
function draggingConstraints() {
|
|
1388
|
+
return processProperties({
|
|
1389
|
+
'prop': 'A custom property to use it with the Animation module',
|
|
1390
|
+
'component': 'Ti.UI.Animation',
|
|
1391
|
+
}, {
|
|
1392
|
+
'default': '{ constraint: {value} }'
|
|
1393
|
+
}, {
|
|
1394
|
+
'horizontal-constraint': 'horizontal',
|
|
1395
|
+
'vertical-constraint': 'vertical',
|
|
1396
|
+
});
|
|
661
1397
|
}
|
|
662
1398
|
exports.draggingConstraints = draggingConstraints;
|
|
663
1399
|
|
|
664
|
-
function
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
1400
|
+
function navBarHidden() {
|
|
1401
|
+
return processProperties({ 'prop': 'navBarHidden', 'component': 'Ti.UI.Window' }, {
|
|
1402
|
+
'default': '{ navBarHidden: {value} }'
|
|
1403
|
+
}, {
|
|
1404
|
+
'nav-bar-hidden': true,
|
|
1405
|
+
'nav-bar-visible': false,
|
|
1406
|
+
});
|
|
1407
|
+
}
|
|
1408
|
+
exports.navBarHidden = navBarHidden;
|
|
669
1409
|
|
|
670
|
-
|
|
1410
|
+
function autocorrect() {
|
|
1411
|
+
return processProperties({ 'prop': 'autocorrect', 'component': 'Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1412
|
+
'default': '{ autocorrect: {value} }'
|
|
1413
|
+
}, {
|
|
1414
|
+
'autocorrect': true,
|
|
1415
|
+
'no-autocorrect': false,
|
|
1416
|
+
});
|
|
671
1417
|
}
|
|
672
1418
|
exports.autocorrect = autocorrect;
|
|
673
1419
|
|
|
674
1420
|
function editable() {
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
1421
|
+
return processProperties({ 'prop': 'editable', 'component': 'Ti.UI.DashboardView, Ti.UI.SearchBar, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1422
|
+
'default': '{ editable: {value} }'
|
|
1423
|
+
}, {
|
|
1424
|
+
'editable': true,
|
|
1425
|
+
'none-editable': false,
|
|
1426
|
+
});
|
|
681
1427
|
}
|
|
682
1428
|
exports.editable = editable;
|
|
683
1429
|
|
|
684
1430
|
function ellipsize() {
|
|
685
|
-
let convertedStyles = '
|
|
1431
|
+
let convertedStyles = processProperties({ 'prop': 'ellipsize', 'component': 'Ti.UI.Label' }, {
|
|
1432
|
+
'ellipsize': '{ ellipsize: {value} }'
|
|
1433
|
+
}, {
|
|
1434
|
+
'end': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_END',
|
|
1435
|
+
'clip': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_CLIP',
|
|
1436
|
+
'none': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_NONE',
|
|
1437
|
+
'start': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_START',
|
|
1438
|
+
'middle': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MIDDLE',
|
|
1439
|
+
'marquee': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MARQUEE',
|
|
1440
|
+
'char-wrap': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP',
|
|
1441
|
+
'word-wrap': 'Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_WORD_WRAP'
|
|
1442
|
+
});
|
|
1443
|
+
|
|
1444
|
+
// for Labels
|
|
1445
|
+
convertedStyles += processProperties({ 'prop': 'ellipsize', 'component': 'Ti.UI.TextArea, Ti.UI.TextField' });
|
|
686
1446
|
|
|
687
1447
|
convertedStyles += `'.ellipsize': { ellipsize: true }\n`;
|
|
688
1448
|
convertedStyles += `'.no-ellipsize': { ellipsize: false }\n`;
|
|
689
1449
|
|
|
690
|
-
// for Labels
|
|
691
|
-
convertedStyles += '\n// ellipsize Property ( for Labels )\n';
|
|
692
|
-
convertedStyles += `'.ellipsize-end': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_END }\n`;
|
|
693
|
-
convertedStyles += `'.ellipsize-clip': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_CLIP }\n`;
|
|
694
|
-
convertedStyles += `'.ellipsize-none': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_NONE }\n`;
|
|
695
|
-
convertedStyles += `'.ellipsize-start': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_START }\n`;
|
|
696
|
-
convertedStyles += `'.ellipsize-middle': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MIDDLE }\n`;
|
|
697
|
-
convertedStyles += `'.ellipsize-marquee': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_MARQUEE }\n`;
|
|
698
|
-
convertedStyles += `'.ellipsize-char-wrap': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_CHAR_WRAP }\n`;
|
|
699
|
-
convertedStyles += `'.ellipsize-word-wrap': { ellipsize: Ti.UI.TEXT_ELLIPSIZE_TRUNCATE_WORD_WRAP }\n`;
|
|
700
|
-
|
|
701
1450
|
return convertedStyles;
|
|
702
1451
|
}
|
|
703
1452
|
exports.ellipsize = ellipsize;
|
|
704
1453
|
|
|
705
1454
|
function enableCopy() {
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
1455
|
+
return processProperties({ 'prop': 'enableCopy', 'component': 'Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1456
|
+
'default': '{ enableCopy: {value} }'
|
|
1457
|
+
}, {
|
|
1458
|
+
'enable-copy': true,
|
|
1459
|
+
'disable-copy': false,
|
|
1460
|
+
});
|
|
712
1461
|
}
|
|
713
1462
|
exports.enableCopy = enableCopy;
|
|
714
1463
|
|
|
715
1464
|
function enableReturnKey() {
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
1465
|
+
return processProperties({ 'prop': 'enableReturnKey - iOS Only', 'component': 'Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1466
|
+
'default': '{ enableReturnKey: {value} }'
|
|
1467
|
+
}, {
|
|
1468
|
+
'enable': {
|
|
1469
|
+
'ios': {
|
|
1470
|
+
'return-key': true,
|
|
1471
|
+
}
|
|
1472
|
+
},
|
|
1473
|
+
'disable': {
|
|
1474
|
+
'ios': {
|
|
1475
|
+
'return-key': false,
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
});
|
|
722
1479
|
}
|
|
723
1480
|
exports.enableReturnKey = enableReturnKey;
|
|
724
1481
|
|
|
725
1482
|
function extendBackground() {
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
1483
|
+
return processProperties({ 'prop': 'extendBackground', 'component': 'Ti.UI.Toolbar' }, {
|
|
1484
|
+
'default': '{ extendBackground: {value} }'
|
|
1485
|
+
}, {
|
|
1486
|
+
'extend-background': true,
|
|
1487
|
+
'dont-extend-background': false,
|
|
1488
|
+
});
|
|
732
1489
|
}
|
|
733
1490
|
exports.extendBackground = extendBackground;
|
|
734
1491
|
|
|
735
1492
|
function autoLink() {
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
1493
|
+
return processProperties({ 'prop': 'autoLink', 'component': 'Ti.UI.Label, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1494
|
+
'auto': '{ autoLink: {value} }'
|
|
1495
|
+
}, {
|
|
1496
|
+
'link': {
|
|
1497
|
+
default: {
|
|
1498
|
+
'all': 'Ti.UI.AUTOLINK_ALL',
|
|
1499
|
+
'email-addresses': 'Ti.UI.AUTOLINK_EMAIL_ADDRESSES',
|
|
1500
|
+
'map-addresses': 'Ti.UI.AUTOLINK_MAP_ADDRESSES',
|
|
1501
|
+
'none': 'Ti.UI.AUTOLINK_NONE',
|
|
1502
|
+
'phone-numbers': 'Ti.UI.AUTOLINK_PHONE_NUMBERS',
|
|
1503
|
+
'urls': 'Ti.UI.AUTOLINK_URLS',
|
|
1504
|
+
},
|
|
1505
|
+
ios: {
|
|
1506
|
+
'calendar': 'Ti.UI.AUTOLINK_CALENDAR',
|
|
1507
|
+
},
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
747
1510
|
}
|
|
748
1511
|
exports.autoLink = autoLink;
|
|
749
1512
|
|
|
750
1513
|
function borderStyle() {
|
|
751
|
-
|
|
1514
|
+
return processProperties({ 'prop': 'borderStyle', 'component': 'Ti.UI.Picker[android], Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1515
|
+
'border-style': '{ borderStyle: {value} }'
|
|
1516
|
+
}, {
|
|
1517
|
+
'bezel': 'Ti.UI.INPUT_BORDERSTYLE_BEZEL',
|
|
1518
|
+
'filled': 'Ti.UI.INPUT_BORDERSTYLE_FILLED',
|
|
1519
|
+
'line': 'Ti.UI.INPUT_BORDERSTYLE_LINE',
|
|
1520
|
+
'none': 'Ti.UI.INPUT_BORDERSTYLE_NONE',
|
|
1521
|
+
'rounded': 'Ti.UI.INPUT_BORDERSTYLE_ROUNDED',
|
|
1522
|
+
'underlined': 'Ti.UI.INPUT_BORDERSTYLE_UNDERLINED',
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
exports.borderStyle = borderStyle;
|
|
752
1526
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
1527
|
+
function pickerType() {
|
|
1528
|
+
return processProperties({ 'prop': 'type (Picker Type)', 'component': 'Ti.UI.Picker' }, {
|
|
1529
|
+
'picker-type': '{ type: {value} }'
|
|
1530
|
+
}, {
|
|
1531
|
+
'count-down-timer': 'Ti.UI.PICKER_TYPE_COUNT_DOWN_TIMER',
|
|
1532
|
+
'date': 'Ti.UI.PICKER_TYPE_DATE',
|
|
1533
|
+
'date-and-time': 'Ti.UI.PICKER_TYPE_DATE_AND_TIME',
|
|
1534
|
+
'plain': 'Ti.UI.PICKER_TYPE_PLAIN',
|
|
1535
|
+
'time': 'Ti.UI.PICKER_TYPE_TIME',
|
|
1536
|
+
});
|
|
1537
|
+
}
|
|
1538
|
+
exports.pickerType = pickerType;
|
|
759
1539
|
|
|
760
|
-
|
|
1540
|
+
function lazyLoadingEnabled() {
|
|
1541
|
+
return processProperties({ 'prop': 'lazyLoadingEnabled - iOS Only', 'component': 'Ti.UI.ListView' }, {
|
|
1542
|
+
'lazy': '{ lazyLoadingEnabled: {value} }'
|
|
1543
|
+
}, {
|
|
1544
|
+
'loading': {
|
|
1545
|
+
'ios': {
|
|
1546
|
+
'enabled': true,
|
|
1547
|
+
'disabled': false,
|
|
1548
|
+
}
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
761
1551
|
}
|
|
762
|
-
exports.
|
|
1552
|
+
exports.lazyLoadingEnabled = lazyLoadingEnabled;
|
|
763
1553
|
|
|
764
|
-
function
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
convertedStyles += `'.autofill-type-card-expiration-month': { autofillType: Ti.UI.AUTOFILL_TYPE_CARD_EXPIRATION_MONTH }\n`;
|
|
1554
|
+
function allowUserCustomization() {
|
|
1555
|
+
return processProperties({ 'prop': 'allowUserCustomization - iOS Only', 'component': 'Ti.UI.TabGroup' }, {
|
|
1556
|
+
'default': '{ allowUserCustomization: {value} }'
|
|
1557
|
+
}, {
|
|
1558
|
+
'allow-user-customization': {
|
|
1559
|
+
'ios': {
|
|
1560
|
+
'default': true,
|
|
1561
|
+
}
|
|
1562
|
+
},
|
|
1563
|
+
'dont-allow-user-customization': {
|
|
1564
|
+
'ios': {
|
|
1565
|
+
'default': false,
|
|
1566
|
+
}
|
|
1567
|
+
}
|
|
1568
|
+
});
|
|
1569
|
+
}
|
|
1570
|
+
exports.allowUserCustomization = allowUserCustomization;
|
|
1571
|
+
|
|
1572
|
+
function showAsAction() {
|
|
1573
|
+
return processProperties({ 'prop': 'showAsAction - Android Only', 'component': 'Ti.Android.MenuItem' }, {
|
|
1574
|
+
'show-as': '{ showAsAction: {value} }'
|
|
1575
|
+
}, {
|
|
1576
|
+
'action': {
|
|
1577
|
+
'android': {
|
|
1578
|
+
'always': 'Ti.Android.SHOW_AS_ACTION_ALWAYS',
|
|
1579
|
+
'collapse': 'Ti.Android.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW',
|
|
1580
|
+
'if-room': 'Ti.Android.SHOW_AS_ACTION_IF_ROOM',
|
|
1581
|
+
'never': 'Ti.Android.SHOW_AS_ACTION_NEVER',
|
|
1582
|
+
'with-text': 'Ti.Android.SHOW_AS_ACTION_WITH_TEXT',
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
});
|
|
1586
|
+
}
|
|
1587
|
+
exports.showAsAction = showAsAction;
|
|
799
1588
|
|
|
800
|
-
|
|
1589
|
+
function autofillType() {
|
|
1590
|
+
return processProperties({ 'prop': 'autofillType', 'component': 'Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1591
|
+
'autofill-type': '{ autofillType: {value} }'
|
|
1592
|
+
}, {
|
|
1593
|
+
'url': 'Ti.UI.AUTOFILL_TYPE_URL',
|
|
1594
|
+
'name': 'Ti.UI.AUTOFILL_TYPE_NAME',
|
|
1595
|
+
'phone': 'Ti.UI.AUTOFILL_TYPE_PHONE',
|
|
1596
|
+
'email': 'Ti.UI.AUTOFILL_TYPE_EMAIL',
|
|
1597
|
+
'address': 'Ti.UI.AUTOFILL_TYPE_ADDRESS',
|
|
1598
|
+
'username': 'Ti.UI.AUTOFILL_TYPE_USERNAME',
|
|
1599
|
+
'password': 'Ti.UI.AUTOFILL_TYPE_PASSWORD',
|
|
1600
|
+
'nickname': 'Ti.UI.AUTOFILL_TYPE_NICKNAME',
|
|
1601
|
+
'location': 'Ti.UI.AUTOFILL_TYPE_LOCATION',
|
|
1602
|
+
'job-title': 'Ti.UI.AUTOFILL_TYPE_JOB_TITLE',
|
|
1603
|
+
'given-name': 'Ti.UI.AUTOFILL_TYPE_GIVEN_NAME',
|
|
1604
|
+
'name-prefix': 'Ti.UI.AUTOFILL_TYPE_NAME_PREFIX',
|
|
1605
|
+
'middle-name': 'Ti.UI.AUTOFILL_TYPE_MIDDLE_NAME',
|
|
1606
|
+
'family-name': 'Ti.UI.AUTOFILL_TYPE_FAMILY_NAME',
|
|
1607
|
+
'name-suffix': 'Ti.UI.AUTOFILL_TYPE_NAME_SUFFIX',
|
|
1608
|
+
'sublocality': 'Ti.UI.AUTOFILL_TYPE_SUBLOCALITY',
|
|
1609
|
+
'postal-code': 'Ti.UI.AUTOFILL_TYPE_POSTAL_CODE',
|
|
1610
|
+
'card-number': 'Ti.UI.AUTOFILL_TYPE_CARD_NUMBER',
|
|
1611
|
+
'address-city': 'Ti.UI.AUTOFILL_TYPE_ADDRESS_CITY',
|
|
1612
|
+
'country-name': 'Ti.UI.AUTOFILL_TYPE_COUNTRY_NAME',
|
|
1613
|
+
'new-password': 'Ti.UI.AUTOFILL_TYPE_NEW_PASSWORD',
|
|
1614
|
+
'address-line1': 'Ti.UI.AUTOFILL_TYPE_ADDRESS_LINE1',
|
|
1615
|
+
'address-line2': 'Ti.UI.AUTOFILL_TYPE_ADDRESS_LINE2',
|
|
1616
|
+
'address-state': 'Ti.UI.AUTOFILL_TYPE_ADDRESS_STATE',
|
|
1617
|
+
'one-time-code': 'Ti.UI.AUTOFILL_TYPE_ONE_TIME_CODE',
|
|
1618
|
+
'organization-name': 'Ti.UI.AUTOFILL_TYPE_ORGANIZATION_NAME',
|
|
1619
|
+
'address-city-state': 'Ti.UI.AUTOFILL_TYPE_ADDRESS_CITY_STATE',
|
|
1620
|
+
'card-security-code': 'Ti.UI.AUTOFILL_TYPE_CARD_SECURITY_CODE',
|
|
1621
|
+
'card-expiration-day': 'Ti.UI.AUTOFILL_TYPE_CARD_EXPIRATION_DAY',
|
|
1622
|
+
'card-expiration-date': 'Ti.UI.AUTOFILL_TYPE_CARD_EXPIRATION_DATE',
|
|
1623
|
+
'card-expiration-year': 'Ti.UI.AUTOFILL_TYPE_CARD_EXPIRATION_YEAR',
|
|
1624
|
+
'card-expiration-month': 'Ti.UI.AUTOFILL_TYPE_CARD_EXPIRATION_MONTH',
|
|
1625
|
+
});
|
|
801
1626
|
}
|
|
802
1627
|
exports.autofillType = autofillType;
|
|
803
1628
|
|
|
804
1629
|
function returnKeyType() {
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
1630
|
+
return processProperties({ 'prop': 'returnKeyType', 'component': 'Ti.UI.AlertDialog, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
1631
|
+
'default': '{ returnKeyType: {value} }'
|
|
1632
|
+
}, {
|
|
1633
|
+
'returnkey': {
|
|
1634
|
+
default: {
|
|
1635
|
+
'default': 'Ti.UI.RETURNKEY_DEFAULT',
|
|
1636
|
+
'go': 'Ti.UI.RETURNKEY_GO',
|
|
1637
|
+
'done': 'Ti.UI.RETURNKEY_DONE',
|
|
1638
|
+
'join': 'Ti.UI.RETURNKEY_JOIN',
|
|
1639
|
+
'next': 'Ti.UI.RETURNKEY_NEXT',
|
|
1640
|
+
'send': 'Ti.UI.RETURNKEY_SEND',
|
|
1641
|
+
'route': 'Ti.UI.RETURNKEY_ROUTE',
|
|
1642
|
+
'yahoo': 'Ti.UI.RETURNKEY_YAHOO',
|
|
1643
|
+
'google': 'Ti.UI.RETURNKEY_GOOGLE',
|
|
1644
|
+
'search': 'Ti.UI.RETURNKEY_SEARCH',
|
|
1645
|
+
'emergency-call': 'Ti.UI.RETURNKEY_EMERGENCY_CALL'
|
|
1646
|
+
},
|
|
1647
|
+
ios: {
|
|
1648
|
+
'continue': 'Ti.UI.RETURNKEY_CONTINUE',
|
|
1649
|
+
}
|
|
1650
|
+
}
|
|
1651
|
+
});
|
|
821
1652
|
}
|
|
822
1653
|
exports.returnKeyType = returnKeyType;
|
|
823
1654
|
|
|
1655
|
+
function loginReturnKeyType() {
|
|
1656
|
+
return processProperties({ 'prop': 'loginReturnKeyType', 'component': 'Ti.UI.AlertDialog' }, {
|
|
1657
|
+
'login': '{ loginReturnKeyType: {value} }'
|
|
1658
|
+
}, {
|
|
1659
|
+
'returnkey': {
|
|
1660
|
+
default: {
|
|
1661
|
+
'default': 'Ti.UI.RETURNKEY_DEFAULT',
|
|
1662
|
+
'go': 'Ti.UI.RETURNKEY_GO',
|
|
1663
|
+
'done': 'Ti.UI.RETURNKEY_DONE',
|
|
1664
|
+
'join': 'Ti.UI.RETURNKEY_JOIN',
|
|
1665
|
+
'next': 'Ti.UI.RETURNKEY_NEXT',
|
|
1666
|
+
'send': 'Ti.UI.RETURNKEY_SEND',
|
|
1667
|
+
'route': 'Ti.UI.RETURNKEY_ROUTE',
|
|
1668
|
+
'yahoo': 'Ti.UI.RETURNKEY_YAHOO',
|
|
1669
|
+
'google': 'Ti.UI.RETURNKEY_GOOGLE',
|
|
1670
|
+
'search': 'Ti.UI.RETURNKEY_SEARCH',
|
|
1671
|
+
'emergency-call': 'Ti.UI.RETURNKEY_EMERGENCY_CALL'
|
|
1672
|
+
},
|
|
1673
|
+
ios: {
|
|
1674
|
+
'continue': 'Ti.UI.RETURNKEY_CONTINUE',
|
|
1675
|
+
}
|
|
1676
|
+
}
|
|
1677
|
+
});
|
|
1678
|
+
}
|
|
1679
|
+
exports.loginReturnKeyType = loginReturnKeyType;
|
|
1680
|
+
|
|
1681
|
+
// loginReturnKeyType ( Android and iOS )
|
|
1682
|
+
|
|
824
1683
|
function gridSystem() {
|
|
825
1684
|
let modifiersAndValues = {
|
|
826
1685
|
1: '100%',
|
|
@@ -837,7 +1696,9 @@ function gridSystem() {
|
|
|
837
1696
|
12: '8.333334%',
|
|
838
1697
|
};
|
|
839
1698
|
|
|
840
|
-
let convertedStyles =
|
|
1699
|
+
let convertedStyles = processProperties({ 'prop': 'width - For Grid Template Columns', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.View, Ti.UI.Window' }, {
|
|
1700
|
+
'grid-cols': '{ width: {value} }'
|
|
1701
|
+
}, modifiersAndValues);
|
|
841
1702
|
|
|
842
1703
|
modifiersAndValues = {
|
|
843
1704
|
1: '100%',
|
|
@@ -854,7 +1715,9 @@ function gridSystem() {
|
|
|
854
1715
|
12: '8.333334%',
|
|
855
1716
|
};
|
|
856
1717
|
|
|
857
|
-
convertedStyles +=
|
|
1718
|
+
convertedStyles += processProperties({ 'prop': 'height - For Grid Template Rows', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.View, Ti.UI.Window' }, {
|
|
1719
|
+
'grid-rows': '{ height: {value} }'
|
|
1720
|
+
}, modifiersAndValues);
|
|
858
1721
|
|
|
859
1722
|
return convertedStyles;
|
|
860
1723
|
}
|
|
@@ -862,161 +1725,456 @@ exports.gridSystem = gridSystem;
|
|
|
862
1725
|
|
|
863
1726
|
function gridColumnsStartEnd() {
|
|
864
1727
|
let modifiersAndValues = {
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
1728
|
+
1: '8.333334%',
|
|
1729
|
+
2: '16.666667%',
|
|
1730
|
+
3: '25%',
|
|
1731
|
+
4: '33.333334%',
|
|
1732
|
+
5: '41.666667%',
|
|
1733
|
+
6: '50%',
|
|
1734
|
+
7: '58.333334%',
|
|
1735
|
+
8: '66.666667%',
|
|
1736
|
+
9: '75%',
|
|
1737
|
+
10: '83.333334%',
|
|
1738
|
+
11: '91.666667%',
|
|
1739
|
+
12: '100%'
|
|
877
1740
|
};
|
|
878
1741
|
|
|
879
|
-
let convertedStyles =
|
|
1742
|
+
let convertedStyles = processProperties({ 'prop': 'width - For Grid Column Start/End', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.View, Ti.UI.Window' }, {
|
|
1743
|
+
'col-span': '{ width: {value} }'
|
|
1744
|
+
}, modifiersAndValues);
|
|
880
1745
|
|
|
881
1746
|
modifiersAndValues = {
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
1747
|
+
1: '8.333334%',
|
|
1748
|
+
2: '16.666667%',
|
|
1749
|
+
3: '25%',
|
|
1750
|
+
4: '33.333334%',
|
|
1751
|
+
5: '41.666667%',
|
|
1752
|
+
6: '50%',
|
|
1753
|
+
7: '58.333334%',
|
|
1754
|
+
8: '66.666667%',
|
|
1755
|
+
9: '75%',
|
|
1756
|
+
10: '83.333334%',
|
|
1757
|
+
11: '91.666667%',
|
|
1758
|
+
12: '100%'
|
|
894
1759
|
};
|
|
895
1760
|
|
|
896
|
-
convertedStyles +=
|
|
1761
|
+
convertedStyles += processProperties({ 'prop': 'height - For Grid Row Start/End', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.View, Ti.UI.Window' }, {
|
|
1762
|
+
'row-span': '{ height: {value} }'
|
|
1763
|
+
}, modifiersAndValues);
|
|
897
1764
|
|
|
898
1765
|
return convertedStyles;
|
|
899
1766
|
}
|
|
900
1767
|
exports.gridColumnsStartEnd = gridColumnsStartEnd;
|
|
901
1768
|
|
|
902
|
-
function
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
delete modifiersAndValues.auto;
|
|
909
|
-
delete modifiersAndValues.screen;
|
|
910
|
-
delete modifiersAndValues['min-content'];
|
|
911
|
-
delete modifiersAndValues['max-content'];
|
|
912
|
-
|
|
913
|
-
_.each(modifiersAndValues, (value, key) => {
|
|
914
|
-
if (key.includes('/')) {
|
|
915
|
-
delete modifiersAndValues[key];
|
|
916
|
-
} else if (['sm', 'md', 'lg', 'xl', '2xl', '3xl', 'px', 'DEFAULT'].includes(key)) {
|
|
917
|
-
modifiersAndValues[key] = value;
|
|
918
|
-
} else {
|
|
919
|
-
modifiersAndValues[key] = 8 * parseFloat(value);
|
|
920
|
-
}
|
|
1769
|
+
function displayUtilities() {
|
|
1770
|
+
return processProperties({ 'prop': 'visible', 'component': 'Ti.Android.MenuItem, Ti.UI.Animation, Ti.UI.Picker, Ti.UI.ScrollableView, Ti.UI.ShortcutItem, Ti.UI.View' }, {
|
|
1771
|
+
'default': '{ visible: {value} }'
|
|
1772
|
+
}, {
|
|
1773
|
+
'block': true,
|
|
1774
|
+
'hidden': false,
|
|
921
1775
|
});
|
|
922
|
-
|
|
923
|
-
return processModifiersAndProperties('borderRadius - ( With Extra Styles )', { 'rounded': '{ borderRadius: {value} }' }, modifiersAndValues);
|
|
924
1776
|
}
|
|
925
|
-
exports.
|
|
1777
|
+
exports.displayUtilities = displayUtilities;
|
|
926
1778
|
|
|
927
|
-
function
|
|
928
|
-
|
|
929
|
-
|
|
1779
|
+
function useSpinner() {
|
|
1780
|
+
return processProperties({ 'prop': 'useSpinner', 'component': 'Ti.UI.Picker' }, {
|
|
1781
|
+
'default': '{ useSpinner: {value} }'
|
|
1782
|
+
}, {
|
|
1783
|
+
'use-spinner': true,
|
|
1784
|
+
'dont-use-spinner': false,
|
|
930
1785
|
});
|
|
1786
|
+
}
|
|
1787
|
+
exports.useSpinner = useSpinner;
|
|
931
1788
|
|
|
932
|
-
|
|
1789
|
+
function calendarViewShown() {
|
|
1790
|
+
return processProperties({ 'prop': 'calendarViewShown', 'component': 'Ti.UI.Picker' }, {
|
|
1791
|
+
'default': '{ calendarViewShown: {value} }'
|
|
1792
|
+
}, {
|
|
1793
|
+
'show-calendar-view': true,
|
|
1794
|
+
'hide-calendar-view': false,
|
|
1795
|
+
});
|
|
933
1796
|
}
|
|
934
|
-
exports.
|
|
1797
|
+
exports.calendarViewShown = calendarViewShown;
|
|
935
1798
|
|
|
936
|
-
function
|
|
937
|
-
|
|
1799
|
+
function flip() {
|
|
1800
|
+
return processProperties({ 'prop': 'flip', 'component': 'For the Animation Component' }, {
|
|
1801
|
+
'flip': '{ flip: {value} }'
|
|
1802
|
+
}, {
|
|
1803
|
+
'horizontal': 'horizontal',
|
|
1804
|
+
'vertical': 'vertical',
|
|
1805
|
+
});
|
|
1806
|
+
}
|
|
1807
|
+
exports.flip = flip;
|
|
938
1808
|
|
|
939
|
-
|
|
940
|
-
|
|
1809
|
+
function shiftMode() {
|
|
1810
|
+
return processProperties({ 'prop': 'shiftMode - Android Only', 'component': 'Ti.UI.TabGroup' }, {
|
|
1811
|
+
'default': '{ shiftMode: {value} }'
|
|
1812
|
+
}, {
|
|
1813
|
+
'shift-mode': {
|
|
1814
|
+
'android': {
|
|
1815
|
+
'default': true,
|
|
1816
|
+
'disabled': false
|
|
1817
|
+
}
|
|
1818
|
+
}
|
|
1819
|
+
});
|
|
1820
|
+
}
|
|
1821
|
+
exports.shiftMode = shiftMode;
|
|
941
1822
|
|
|
942
|
-
|
|
1823
|
+
function smoothScrollOnTabClick() {
|
|
1824
|
+
return processProperties({ 'prop': 'smoothScrollOnTabClick', 'component': 'Ti.UI.TabGroup' }, {
|
|
1825
|
+
'default': '{ smoothScrollOnTabClick: {value} }'
|
|
1826
|
+
}, {
|
|
1827
|
+
'smooth-scroll': {
|
|
1828
|
+
'android': {
|
|
1829
|
+
'default': true,
|
|
1830
|
+
'disabled': false
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
});
|
|
943
1834
|
}
|
|
944
|
-
exports.
|
|
1835
|
+
exports.smoothScrollOnTabClick = smoothScrollOnTabClick;
|
|
945
1836
|
|
|
946
|
-
function
|
|
947
|
-
|
|
1837
|
+
function tabGroupStyle() {
|
|
1838
|
+
return processProperties({ 'prop': 'style - Android Only', 'component': 'Ti.UI.TabGroup' }, {
|
|
1839
|
+
'default': '{ style: {value} }'
|
|
1840
|
+
}, {
|
|
1841
|
+
'tabs-style': {
|
|
1842
|
+
'android': {
|
|
1843
|
+
'default': 'Ti.UI.Android.TABS_STYLE_DEFAULT',
|
|
1844
|
+
'bottom-navigation': 'Ti.UI.Android.TABS_STYLE_BOTTOM_NAVIGATION'
|
|
1845
|
+
}
|
|
1846
|
+
}
|
|
1847
|
+
});
|
|
1848
|
+
}
|
|
1849
|
+
exports.tabGroupStyle = tabGroupStyle;
|
|
1850
|
+
|
|
1851
|
+
function tabbedBarStyle() {
|
|
1852
|
+
return processProperties({ 'prop': 'style - iOS Only', 'component': 'Ti.UI.iOS.TabbedBar' }, {
|
|
1853
|
+
'default': '{ style: {value} }'
|
|
1854
|
+
}, {
|
|
1855
|
+
'tabbed-bar-style': {
|
|
1856
|
+
'ios': {
|
|
1857
|
+
'bordered': 'Ti.UI.iOS.SystemButtonStyle.BORDERED',
|
|
1858
|
+
'done': 'Ti.UI.iOS.SystemButtonStyle.DONE',
|
|
1859
|
+
'plain': 'Ti.UI.iOS.SystemButtonStyle.PLAIN',
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
});
|
|
1863
|
+
}
|
|
1864
|
+
exports.tabbedBarStyle = tabbedBarStyle;
|
|
1865
|
+
|
|
1866
|
+
function windowPixelFormat() {
|
|
1867
|
+
return processProperties({ 'prop': 'windowPixelFormat - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
1868
|
+
'default': '{ windowPixelFormat: {value} }'
|
|
1869
|
+
}, {
|
|
1870
|
+
'pixel-format': {
|
|
1871
|
+
'android': {
|
|
1872
|
+
'a-8': 'Ti.UI.Android.PIXEL_FORMAT_A_8',
|
|
1873
|
+
'la-88': 'Ti.UI.Android.PIXEL_FORMAT_LA_88',
|
|
1874
|
+
'l-8': 'Ti.UI.Android.PIXEL_FORMAT_L_8',
|
|
1875
|
+
'opaque': 'Ti.UI.Android.PIXEL_FORMAT_OPAQUE',
|
|
1876
|
+
'rgba-4444': 'Ti.UI.Android.PIXEL_FORMAT_RGBA_4444',
|
|
1877
|
+
'rgba-5551': 'Ti.UI.Android.PIXEL_FORMAT_RGBA_5551',
|
|
1878
|
+
'rgba-8888': 'Ti.UI.Android.PIXEL_FORMAT_RGBA_8888',
|
|
1879
|
+
'rgbx-8888': 'Ti.UI.Android.PIXEL_FORMAT_RGBX_8888',
|
|
1880
|
+
'rgb-332': 'Ti.UI.Android.PIXEL_FORMAT_RGB_332',
|
|
1881
|
+
'rgb-565': 'Ti.UI.Android.PIXEL_FORMAT_RGB_565',
|
|
1882
|
+
'rgb-888': 'Ti.UI.Android.PIXEL_FORMAT_RGB_888',
|
|
1883
|
+
'translucent': 'Ti.UI.Android.PIXEL_FORMAT_TRANSLUCENT',
|
|
1884
|
+
'transparent': 'Ti.UI.Android.PIXEL_FORMAT_TRANSPARENT',
|
|
1885
|
+
'unknown': 'Ti.UI.Android.PIXEL_FORMAT_UNKNOWN',
|
|
1886
|
+
}
|
|
1887
|
+
}
|
|
1888
|
+
});
|
|
1889
|
+
}
|
|
1890
|
+
exports.windowPixelFormat = windowPixelFormat;
|
|
948
1891
|
|
|
949
|
-
|
|
950
|
-
|
|
1892
|
+
function tabBarHidden() {
|
|
1893
|
+
return processProperties({ 'prop': 'tabBarHidden - iOS Only', 'component': 'Ti.UI.Window' }, {
|
|
1894
|
+
'default': '{ tabBarHidden: {value} }'
|
|
1895
|
+
}, {
|
|
1896
|
+
'tab-bar-hidden': {
|
|
1897
|
+
'ios': {
|
|
1898
|
+
'default': true,
|
|
1899
|
+
}
|
|
1900
|
+
},
|
|
1901
|
+
'tab-bar-visible': {
|
|
1902
|
+
'ios': {
|
|
1903
|
+
'default': false,
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
});
|
|
1907
|
+
}
|
|
1908
|
+
exports.tabBarHidden = tabBarHidden;
|
|
1909
|
+
|
|
1910
|
+
function windowSoftInputMode() {
|
|
1911
|
+
return processProperties({ 'prop': 'windowSoftInputMode - Android Only', 'component': 'Ti.UI.TabGroup, Ti.UI.Window' }, {
|
|
1912
|
+
'window': '{ windowSoftInputMode: {value} }'
|
|
1913
|
+
}, {
|
|
1914
|
+
'soft-input': {
|
|
1915
|
+
'android': {
|
|
1916
|
+
'always-hidden': 'Ti.UI.Android.SOFT_INPUT_STATE_ALWAYS_HIDDEN',
|
|
1917
|
+
'always-visible': 'Ti.UI.Android.SOFT_INPUT_STATE_ALWAYS_VISIBLE',
|
|
1918
|
+
'hidden': 'Ti.UI.Android.SOFT_INPUT_STATE_HIDDEN',
|
|
1919
|
+
'pan': 'Ti.UI.Android.SOFT_INPUT_ADJUST_PAN',
|
|
1920
|
+
'resize': 'Ti.UI.Android.SOFT_INPUT_ADJUST_RESIZE',
|
|
1921
|
+
'unspecified': 'Ti.UI.Android.SOFT_INPUT_ADJUST_UNSPECIFIED',
|
|
1922
|
+
'unspecified': 'Ti.UI.Android.SOFT_INPUT_STATE_UNSPECIFIED',
|
|
1923
|
+
'visible': 'Ti.UI.Android.SOFT_INPUT_STATE_VISIBLE',
|
|
1924
|
+
}
|
|
1925
|
+
}
|
|
1926
|
+
});
|
|
1927
|
+
}
|
|
1928
|
+
exports.windowSoftInputMode = windowSoftInputMode;
|
|
1929
|
+
|
|
1930
|
+
// Activities Android
|
|
1931
|
+
function activityEnterTransition() {
|
|
1932
|
+
return processProperties({ 'prop': 'activityEnterTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
1933
|
+
'activity': '{ activityEnterTransition: {value} }'
|
|
1934
|
+
}, {
|
|
1935
|
+
'enter-transition': {
|
|
1936
|
+
'android': {
|
|
1937
|
+
'explode': 'Ti.UI.Android.TRANSITION_EXPLODE',
|
|
1938
|
+
'fade-in': 'Ti.UI.Android.TRANSITION_FADE_IN',
|
|
1939
|
+
'fade-out': 'Ti.UI.Android.TRANSITION_FADE_OUT',
|
|
1940
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
1941
|
+
'slide-bottom': 'Ti.UI.Android.TRANSITION_SLIDE_BOTTOM',
|
|
1942
|
+
'slide-left': 'Ti.UI.Android.TRANSITION_SLIDE_LEFT',
|
|
1943
|
+
'slide-right': 'Ti.UI.Android.TRANSITION_SLIDE_RIGHT',
|
|
1944
|
+
'slide-top': 'Ti.UI.Android.TRANSITION_SLIDE_TOP',
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1947
|
+
});
|
|
1948
|
+
}
|
|
1949
|
+
exports.activityEnterTransition = activityEnterTransition;
|
|
1950
|
+
|
|
1951
|
+
function activityExitTransition() {
|
|
1952
|
+
return processProperties({ 'prop': 'activityExitTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
1953
|
+
'activity': '{ activityExitTransition: {value} }'
|
|
1954
|
+
}, {
|
|
1955
|
+
'exit-transition': {
|
|
1956
|
+
'android': {
|
|
1957
|
+
'explode': 'Ti.UI.Android.TRANSITION_EXPLODE',
|
|
1958
|
+
'fade-in': 'Ti.UI.Android.TRANSITION_FADE_IN',
|
|
1959
|
+
'fade-out': 'Ti.UI.Android.TRANSITION_FADE_OUT',
|
|
1960
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
1961
|
+
'slide-bottom': 'Ti.UI.Android.TRANSITION_SLIDE_BOTTOM',
|
|
1962
|
+
'slide-left': 'Ti.UI.Android.TRANSITION_SLIDE_LEFT',
|
|
1963
|
+
'slide-right': 'Ti.UI.Android.TRANSITION_SLIDE_RIGHT',
|
|
1964
|
+
'slide-top': 'Ti.UI.Android.TRANSITION_SLIDE_TOP',
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
});
|
|
1968
|
+
}
|
|
1969
|
+
exports.activityExitTransition = activityExitTransition;
|
|
1970
|
+
|
|
1971
|
+
function activityReenterTransition() {
|
|
1972
|
+
return processProperties({ 'prop': 'activityReenterTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
1973
|
+
'activity': '{ activityReenterTransition: {value} }'
|
|
1974
|
+
}, {
|
|
1975
|
+
'reenter-transition': {
|
|
1976
|
+
'android': {
|
|
1977
|
+
'explode': 'Ti.UI.Android.TRANSITION_EXPLODE',
|
|
1978
|
+
'fade-in': 'Ti.UI.Android.TRANSITION_FADE_IN',
|
|
1979
|
+
'fade-out': 'Ti.UI.Android.TRANSITION_FADE_OUT',
|
|
1980
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
1981
|
+
'slide-bottom': 'Ti.UI.Android.TRANSITION_SLIDE_BOTTOM',
|
|
1982
|
+
'slide-left': 'Ti.UI.Android.TRANSITION_SLIDE_LEFT',
|
|
1983
|
+
'slide-right': 'Ti.UI.Android.TRANSITION_SLIDE_RIGHT',
|
|
1984
|
+
'slide-top': 'Ti.UI.Android.TRANSITION_SLIDE_TOP',
|
|
1985
|
+
}
|
|
1986
|
+
}
|
|
1987
|
+
});
|
|
1988
|
+
}
|
|
1989
|
+
exports.activityReenterTransition = activityReenterTransition;
|
|
1990
|
+
|
|
1991
|
+
function activityReturnTransition() {
|
|
1992
|
+
return processProperties({ 'prop': 'activityReturnTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
1993
|
+
'activity': '{ activityReturnTransition: {value} }'
|
|
1994
|
+
}, {
|
|
1995
|
+
'return-transition': {
|
|
1996
|
+
'android': {
|
|
1997
|
+
'explode': 'Ti.UI.Android.TRANSITION_EXPLODE',
|
|
1998
|
+
'fade-in': 'Ti.UI.Android.TRANSITION_FADE_IN',
|
|
1999
|
+
'fade-out': 'Ti.UI.Android.TRANSITION_FADE_OUT',
|
|
2000
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
2001
|
+
'slide-bottom': 'Ti.UI.Android.TRANSITION_SLIDE_BOTTOM',
|
|
2002
|
+
'slide-left': 'Ti.UI.Android.TRANSITION_SLIDE_LEFT',
|
|
2003
|
+
'slide-right': 'Ti.UI.Android.TRANSITION_SLIDE_RIGHT',
|
|
2004
|
+
'slide-top': 'Ti.UI.Android.TRANSITION_SLIDE_TOP',
|
|
2005
|
+
}
|
|
2006
|
+
}
|
|
2007
|
+
});
|
|
2008
|
+
}
|
|
2009
|
+
exports.activityReturnTransition = activityReturnTransition;
|
|
2010
|
+
|
|
2011
|
+
function activitySharedElementEnterTransition() {
|
|
2012
|
+
return processProperties({ 'prop': 'activitySharedElementEnterTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
2013
|
+
'activity': '{ activitySharedElementEnterTransition: {value} }'
|
|
2014
|
+
}, {
|
|
2015
|
+
'shared-element-enter-transition': {
|
|
2016
|
+
'android': {
|
|
2017
|
+
'change-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_BOUNDS',
|
|
2018
|
+
'change-clip-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_CLIP_BOUNDS',
|
|
2019
|
+
'change-transform': 'Ti.UI.Android.TRANSITION_CHANGE_TRANSFORM',
|
|
2020
|
+
'change-image-transform': 'Ti.UI.Android.TRANSITION_CHANGE_IMAGE_TRANSFORM',
|
|
2021
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
});
|
|
2025
|
+
}
|
|
2026
|
+
exports.activitySharedElementEnterTransition = activitySharedElementEnterTransition;
|
|
2027
|
+
|
|
2028
|
+
function activitySharedElementExitTransition() {
|
|
2029
|
+
return processProperties({ 'prop': 'activitySharedElementExitTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
2030
|
+
'activity': '{ activitySharedElementExitTransition: {value} }'
|
|
2031
|
+
}, {
|
|
2032
|
+
'shared-element-exit-transition': {
|
|
2033
|
+
'android': {
|
|
2034
|
+
'change-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_BOUNDS',
|
|
2035
|
+
'change-clip-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_CLIP_BOUNDS',
|
|
2036
|
+
'change-transform': 'Ti.UI.Android.TRANSITION_CHANGE_TRANSFORM',
|
|
2037
|
+
'change-image-transform': 'Ti.UI.Android.TRANSITION_CHANGE_IMAGE_TRANSFORM',
|
|
2038
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
2039
|
+
}
|
|
2040
|
+
}
|
|
2041
|
+
});
|
|
2042
|
+
}
|
|
2043
|
+
exports.activitySharedElementExitTransition = activitySharedElementExitTransition;
|
|
2044
|
+
|
|
2045
|
+
function activitySharedElementReenterTransition() {
|
|
2046
|
+
return processProperties({ 'prop': 'activitySharedElementReenterTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
2047
|
+
'activity': '{ activitySharedElementReenterTransition: {value} }'
|
|
2048
|
+
}, {
|
|
2049
|
+
'shared-element-reenter-transition': {
|
|
2050
|
+
'android': {
|
|
2051
|
+
'change-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_BOUNDS',
|
|
2052
|
+
'change-clip-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_CLIP_BOUNDS',
|
|
2053
|
+
'change-transform': 'Ti.UI.Android.TRANSITION_CHANGE_TRANSFORM',
|
|
2054
|
+
'change-image-transform': 'Ti.UI.Android.TRANSITION_CHANGE_IMAGE_TRANSFORM',
|
|
2055
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
2056
|
+
}
|
|
2057
|
+
}
|
|
2058
|
+
});
|
|
2059
|
+
}
|
|
2060
|
+
exports.activitySharedElementReenterTransition = activitySharedElementReenterTransition;
|
|
2061
|
+
|
|
2062
|
+
function activitySharedElementReturnTransition() {
|
|
2063
|
+
return processProperties({ 'prop': 'activitySharedElementReturnTransition - Android Only', 'component': 'Ti.UI.Window' }, {
|
|
2064
|
+
'activity': '{ activitySharedElementReturnTransition: {value} }'
|
|
2065
|
+
}, {
|
|
2066
|
+
'shared-element-return-transition': {
|
|
2067
|
+
'android': {
|
|
2068
|
+
'change-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_BOUNDS',
|
|
2069
|
+
'change-clip-bounds': 'Ti.UI.Android.TRANSITION_CHANGE_CLIP_BOUNDS',
|
|
2070
|
+
'change-transform': 'Ti.UI.Android.TRANSITION_CHANGE_TRANSFORM',
|
|
2071
|
+
'change-image-transform': 'Ti.UI.Android.TRANSITION_CHANGE_IMAGE_TRANSFORM',
|
|
2072
|
+
'none': 'Ti.UI.Android.TRANSITION_NONE',
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2075
|
+
});
|
|
2076
|
+
}
|
|
2077
|
+
exports.activitySharedElementReturnTransition = activitySharedElementReturnTransition;
|
|
951
2078
|
|
|
952
|
-
|
|
2079
|
+
function iconIsMask() {
|
|
2080
|
+
return processProperties({ 'prop': 'iconIsMask - iOS Only', 'component': 'Ti.UI.Tab' }, {
|
|
2081
|
+
'default': '{ iconIsMask: {value} }'
|
|
2082
|
+
}, {
|
|
2083
|
+
'icon-is': {
|
|
2084
|
+
'ios': {
|
|
2085
|
+
'mask': true,
|
|
2086
|
+
'not-mask': false
|
|
2087
|
+
}
|
|
2088
|
+
}
|
|
2089
|
+
});
|
|
953
2090
|
}
|
|
954
|
-
exports.
|
|
2091
|
+
exports.iconIsMask = iconIsMask;
|
|
955
2092
|
|
|
956
|
-
function
|
|
957
|
-
|
|
2093
|
+
function activeIconIsMask() {
|
|
2094
|
+
return processProperties({ 'prop': 'activeIconIsMask - iOS Only', 'component': 'Ti.UI.Tab' }, {
|
|
2095
|
+
'default': '{ activeIconIsMask: {value} }'
|
|
2096
|
+
}, {
|
|
2097
|
+
'active-icon-is': {
|
|
2098
|
+
'ios': {
|
|
2099
|
+
'mask': true,
|
|
2100
|
+
'not-mask': false
|
|
2101
|
+
}
|
|
2102
|
+
}
|
|
2103
|
+
});
|
|
2104
|
+
}
|
|
2105
|
+
exports.activeIconIsMask = activeIconIsMask;
|
|
958
2106
|
|
|
959
|
-
|
|
960
|
-
convertedStyles
|
|
961
|
-
convertedStyles += `'.
|
|
962
|
-
convertedStyles += `'.
|
|
963
|
-
convertedStyles += `'.shadow-lg': { viewShadowOffset: { x: 0, y: 8 }, viewShadowRadius: 8, viewShadowColor: ${parseValue(shadowValue)} }\n`;
|
|
964
|
-
convertedStyles += `'.shadow-xl': { viewShadowOffset: { x: 0, y: 12 }, viewShadowRadius: 12, viewShadowColor: ${parseValue(shadowValue)} }\n`;
|
|
965
|
-
convertedStyles += `'.shadow-2xl': { viewShadowOffset: { x: 0, y: 16 }, viewShadowRadius: 16, viewShadowColor: ${parseValue(shadowValue)} }\n`;
|
|
966
|
-
convertedStyles += `'.shadow-inner': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }\n`;
|
|
967
|
-
convertedStyles += `'.shadow-outline': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: 2, viewShadowColor: ${parseValue(shadowValue)} }\n`;
|
|
968
|
-
convertedStyles += `'.shadow-none': { viewShadowOffset: { x: 0, y: 0 }, viewShadowRadius: null, viewShadowColor: null }\n`;
|
|
2107
|
+
function keepSectionsInSearch() {
|
|
2108
|
+
let convertedStyles = processComments({ 'prop': 'keepSectionsInSearch - iOS Only', 'component': 'Ti.UI.ListView' });
|
|
2109
|
+
convertedStyles += `'.keep-sections-in-search[platform=ios]': { keepSectionsInSearch: true }\n`;
|
|
2110
|
+
convertedStyles += `'.dont-keep-sections-in-search[platform=ios]': { keepSectionsInSearch: false }\n`;
|
|
969
2111
|
|
|
970
2112
|
return convertedStyles;
|
|
971
2113
|
}
|
|
972
|
-
exports.
|
|
2114
|
+
exports.keepSectionsInSearch = keepSectionsInSearch;
|
|
2115
|
+
|
|
2116
|
+
function bottomNavigation({ ...modifiersAndValues }) {
|
|
2117
|
+
const objectPosition = {
|
|
2118
|
+
'padding': '{ padding: {value} }',
|
|
2119
|
+
'padding-x': '{ paddingLeft: {value}, paddingRight: {value} }',
|
|
2120
|
+
'padding-y': '{ paddingTop: {value}, paddingBottom: {value} }',
|
|
2121
|
+
'padding-t': '{ paddingTop: {value} }',
|
|
2122
|
+
'padding-l': '{ paddingLeft: {value} }',
|
|
2123
|
+
'padding-r': '{ paddingRight: {value} }',
|
|
2124
|
+
'padding-b': '{ paddingBottom: {value} }',
|
|
2125
|
+
}
|
|
973
2126
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
2127
|
+
modifiersAndValues = removeFractions(modifiersAndValues);
|
|
2128
|
+
delete modifiersAndValues.fit;
|
|
2129
|
+
delete modifiersAndValues.min;
|
|
2130
|
+
delete modifiersAndValues.max;
|
|
2131
|
+
delete modifiersAndValues.full;
|
|
2132
|
+
delete modifiersAndValues.auto;
|
|
2133
|
+
delete modifiersAndValues.screen;
|
|
2134
|
+
delete modifiersAndValues['min-content'];
|
|
2135
|
+
delete modifiersAndValues['max-content'];
|
|
978
2136
|
|
|
979
|
-
|
|
980
|
-
return processModifiersAndProperties('opacity', { 'opacity': '{ opacity: {value} }' }, modifiersAndValues);
|
|
2137
|
+
return processProperties({ 'prop': 'padding, paddingTop, paddingLeft, paddingRight, paddingBottom', 'component': 'Ti.UI.Android.CardView, Ti.UI.TabGroup' }, objectPosition, modifiersAndValues);
|
|
981
2138
|
}
|
|
982
|
-
exports.
|
|
2139
|
+
exports.bottomNavigation = bottomNavigation;
|
|
983
2140
|
|
|
984
2141
|
function interactivity() {
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
2142
|
+
return processProperties({ 'prop': 'touchEnabled', 'component': 'Ti.UI.View' }, {
|
|
2143
|
+
'default': '{ touchEnabled: {value} }'
|
|
2144
|
+
}, {
|
|
2145
|
+
'touch-enabled': true,
|
|
2146
|
+
'touch-disabled': false,
|
|
2147
|
+
'pointer-events-auto': true,
|
|
2148
|
+
'pointer-events-none': false,
|
|
2149
|
+
});
|
|
992
2150
|
}
|
|
993
2151
|
exports.interactivity = interactivity;
|
|
994
2152
|
|
|
995
2153
|
function textAlign() {
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
2154
|
+
return processProperties({ 'prop': 'textAlign', 'component': 'Ti.UI.Button, Ti.UI.Label, Ti.UI.Switch, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
2155
|
+
'text': '{ textAlign: {value} }'
|
|
2156
|
+
}, {
|
|
2157
|
+
'left': 'Ti.UI.TEXT_ALIGNMENT_LEFT',
|
|
2158
|
+
'right': 'Ti.UI.TEXT_ALIGNMENT_RIGHT',
|
|
2159
|
+
'center': 'Ti.UI.TEXT_ALIGNMENT_CENTER',
|
|
2160
|
+
'justify': 'Ti.UI.TEXT_ALIGNMENT_JUSTIFY',
|
|
2161
|
+
});
|
|
1004
2162
|
}
|
|
1005
2163
|
exports.textAlign = textAlign;
|
|
1006
2164
|
|
|
1007
2165
|
function verticalAlignment() {
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
2166
|
+
return processProperties({ 'prop': 'verticalAlign', 'component': 'Ti.UI.Button, Ti.UI.Label, Ti.UI.Switch, Ti.UI.TextArea, Ti.UI.TextField' }, {
|
|
2167
|
+
'align': '{ verticalAlign: {value} }'
|
|
2168
|
+
}, {
|
|
2169
|
+
'top': 'Ti.UI.TEXT_VERTICAL_ALIGNMENT_TOP',
|
|
2170
|
+
'middle': 'Ti.UI.TEXT_VERTICAL_ALIGNMENT_CENTER',
|
|
2171
|
+
'bottom': 'Ti.UI.TEXT_VERTICAL_ALIGNMENT_BOTTOM',
|
|
2172
|
+
});
|
|
1015
2173
|
}
|
|
1016
2174
|
exports.verticalAlignment = verticalAlignment;
|
|
1017
2175
|
|
|
1018
2176
|
function scrollableRegion() {
|
|
1019
|
-
let convertedStyles = '
|
|
2177
|
+
let convertedStyles = processComments({ 'prop': 'contentWidth, contentHeight', 'component': 'Ti.UI.ScrollView' });
|
|
1020
2178
|
|
|
1021
2179
|
convertedStyles += `'.content-w-auto': { contentWidth: Ti.UI.SIZE }\n`;
|
|
1022
2180
|
convertedStyles += `'.content-w-screen': { contentWidth: Ti.UI.FILL }\n`;
|
|
@@ -1030,7 +2188,7 @@ function scrollableRegion() {
|
|
|
1030
2188
|
exports.scrollableRegion = scrollableRegion;
|
|
1031
2189
|
|
|
1032
2190
|
function scrollIndicators() {
|
|
1033
|
-
let convertedStyles = '
|
|
2191
|
+
let convertedStyles = processComments({ 'prop': 'showHorizontalScrollIndicator, showVerticalScrollIndicator', 'component': 'Ti.UI.ScrollView' });
|
|
1034
2192
|
|
|
1035
2193
|
convertedStyles += `'.overflow-x-scroll': { showHorizontalScrollIndicator: true }\n`;
|
|
1036
2194
|
convertedStyles += `'.overflow-y-scroll': { showVerticalScrollIndicator: true }\n`;
|
|
@@ -1064,7 +2222,7 @@ function placement() {
|
|
|
1064
2222
|
'inset-auto': 'top: Ti.UI.SIZE, right: Ti.UI.SIZE, bottom: Ti.UI.SIZE, left: Ti.UI.SIZE'
|
|
1065
2223
|
}
|
|
1066
2224
|
|
|
1067
|
-
let convertedStyles = '
|
|
2225
|
+
let convertedStyles = processComments({ 'prop': 'top, right, bottom, left', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.View, Ti.UI.Window' });
|
|
1068
2226
|
|
|
1069
2227
|
_.each(objectPosition, (value, modifier) => {
|
|
1070
2228
|
convertedStyles += `'.${modifier}': { ${value} }\n`;
|
|
@@ -1086,8 +2244,8 @@ function origin() {
|
|
|
1086
2244
|
'left': 'x: 0, y: 0.5',
|
|
1087
2245
|
'top-left': 'x: 0, y: 0'
|
|
1088
2246
|
}
|
|
1089
|
-
|
|
1090
|
-
let convertedStyles = '
|
|
2247
|
+
// '\n// anchorPoint Properties\n'
|
|
2248
|
+
let convertedStyles = processComments({ 'prop': 'anchorPoint', 'component': 'Ti.UI.Animation, Ti.UI.View' });
|
|
1091
2249
|
|
|
1092
2250
|
_.each(objectPosition, (value, modifier) => {
|
|
1093
2251
|
convertedStyles += `'.origin-${modifier}': { anchorPoint: { ${value} } }\n`;
|
|
@@ -1108,7 +2266,6 @@ function margin({ ...modifiersAndValues }) {
|
|
|
1108
2266
|
'ml': '{ left: {value} }',
|
|
1109
2267
|
}
|
|
1110
2268
|
|
|
1111
|
-
|
|
1112
2269
|
// SOME CLEANUP... VALUES NOT NEEDED HERE.
|
|
1113
2270
|
delete modifiersAndValues.fit;
|
|
1114
2271
|
delete modifiersAndValues.min;
|
|
@@ -1121,7 +2278,7 @@ function margin({ ...modifiersAndValues }) {
|
|
|
1121
2278
|
|
|
1122
2279
|
modifiersAndValues.auto = 'null';
|
|
1123
2280
|
|
|
1124
|
-
let convertedStyles =
|
|
2281
|
+
let convertedStyles = processProperties({ 'prop': 'top, right, bottom, left ( Margin )', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.View, Ti.UI.Window' }, objectPosition, modifiersAndValues);
|
|
1125
2282
|
|
|
1126
2283
|
objectPosition = {
|
|
1127
2284
|
'-m': '{ top: {value}, right: {value}, bottom: {value}, left: {value} }',
|
|
@@ -1136,14 +2293,18 @@ function margin({ ...modifiersAndValues }) {
|
|
|
1136
2293
|
delete modifiersAndValues['0'];
|
|
1137
2294
|
delete modifiersAndValues.auto;
|
|
1138
2295
|
|
|
1139
|
-
convertedStyles +=
|
|
2296
|
+
convertedStyles += processProperties({ 'prop': 'top, right, bottom, left ( Negative Margin )', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.View, Ti.UI.Window' }, objectPosition, modifiersAndValues, '-');
|
|
1140
2297
|
|
|
1141
2298
|
return convertedStyles;
|
|
1142
2299
|
}
|
|
1143
2300
|
exports.margin = margin;
|
|
1144
2301
|
|
|
1145
2302
|
function repeat() {
|
|
1146
|
-
return
|
|
2303
|
+
return processProperties({ 'prop': 'repeat', 'component': 'Ti.UI.Animation' }, {
|
|
2304
|
+
'repeat': '{ repeat: {value} }'
|
|
2305
|
+
}, {
|
|
2306
|
+
1: 1, 2: 2, 3: 3, 4: 4, 5: 5, 6: 6, 7: 7, 8: 8, 9: 9, 10: 10
|
|
2307
|
+
});
|
|
1147
2308
|
}
|
|
1148
2309
|
exports.repeat = repeat;
|
|
1149
2310
|
|
|
@@ -1158,7 +2319,7 @@ function padding({ ...modifiersAndValues }) {
|
|
|
1158
2319
|
'pl': '{ padding: { left: {value} } }',
|
|
1159
2320
|
}
|
|
1160
2321
|
|
|
1161
|
-
modifiersAndValues['0'] = 0;
|
|
2322
|
+
// modifiersAndValues['0'] = 0;
|
|
1162
2323
|
delete modifiersAndValues.fit;
|
|
1163
2324
|
delete modifiersAndValues.min;
|
|
1164
2325
|
delete modifiersAndValues.max;
|
|
@@ -1167,7 +2328,7 @@ function padding({ ...modifiersAndValues }) {
|
|
|
1167
2328
|
delete modifiersAndValues['min-content'];
|
|
1168
2329
|
delete modifiersAndValues['max-content'];
|
|
1169
2330
|
|
|
1170
|
-
return
|
|
2331
|
+
return processProperties({ 'prop': 'padding', 'component': 'Ti.UI.Android.CardView, Ti.UI.TextArea, Ti.UI.TextField' }, objectPosition, modifiersAndValues);
|
|
1171
2332
|
}
|
|
1172
2333
|
exports.padding = padding;
|
|
1173
2334
|
|
|
@@ -1179,7 +2340,10 @@ function width({ ...modifiersAndValues }) {
|
|
|
1179
2340
|
delete modifiersAndValues.max;
|
|
1180
2341
|
delete modifiersAndValues['max-content'];
|
|
1181
2342
|
|
|
1182
|
-
return
|
|
2343
|
+
return processProperties({ 'prop': 'width', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.ListItem, Ti.UI.View' }, {
|
|
2344
|
+
'w':
|
|
2345
|
+
'{ width: {value} }'
|
|
2346
|
+
}, modifiersAndValues);
|
|
1183
2347
|
}
|
|
1184
2348
|
exports.width = width;
|
|
1185
2349
|
|
|
@@ -1191,30 +2355,73 @@ function height({ ...modifiersAndValues }) {
|
|
|
1191
2355
|
delete modifiersAndValues.max;
|
|
1192
2356
|
delete modifiersAndValues['max-content'];
|
|
1193
2357
|
|
|
1194
|
-
return
|
|
2358
|
+
return processProperties({ 'prop': 'height', 'component': 'Ti.UI.ActivityIndicator, Ti.UI.Animation, Ti.UI.iPad.Popover, Ti.UI.ListItem, Ti.UI.View' }, {
|
|
2359
|
+
'h': '{ height: {value} }'
|
|
2360
|
+
}, modifiersAndValues);
|
|
1195
2361
|
}
|
|
1196
2362
|
exports.height = height;
|
|
1197
2363
|
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
2364
|
+
//! The Mother Goose
|
|
2365
|
+
function customRules(_value, _key) {
|
|
2366
|
+
//! Want to refactor
|
|
2367
|
+
let convertedStyles = '';
|
|
1201
2368
|
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
let __value = JSON.parse(processing.declarations[0].value);
|
|
1206
|
-
let value = Array.isArray(__value) ? __value : __value.split(' ');
|
|
2369
|
+
_.each(_value, (value, modifier) => {
|
|
2370
|
+
if (modifier === 'apply') {
|
|
2371
|
+
_applyClasses[_key] = new Set(Array.isArray(_value[modifier]) ? _value[modifier] : _value[modifier].split(' '));
|
|
1207
2372
|
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
value: value
|
|
1212
|
-
}
|
|
1213
|
-
});
|
|
2373
|
+
convertedStyles += `'${_key}': { {_applyProperties_} }\n`;
|
|
2374
|
+
} else {
|
|
2375
|
+
let customProperties = '';
|
|
1214
2376
|
|
|
1215
|
-
|
|
2377
|
+
_.each(value, (theValue, theModifier) => {
|
|
2378
|
+
if (typeof (theValue) === 'object' && theValue !== null) {
|
|
2379
|
+
if (theModifier === 'apply') {
|
|
2380
|
+
_applyClasses[`${_key}${setModifier(modifier)}`] = new Set(Array.isArray(theValue) ? theValue : theValue.split(' '));
|
|
2381
|
+
|
|
2382
|
+
customProperties += ` {_applyProperties_},`;
|
|
2383
|
+
} else {
|
|
2384
|
+
customProperties += ` ${theModifier}: {`;
|
|
2385
|
+
|
|
2386
|
+
let extraCustomProperties = '';
|
|
2387
|
+
|
|
2388
|
+
_.each(theValue, (extraValue, extraModifier) => {
|
|
2389
|
+
if (typeof (extraValue) === 'object' && extraValue !== null) {
|
|
2390
|
+
customProperties += ` ${extraModifier}: {`;
|
|
2391
|
+
|
|
2392
|
+
let moreExtraCustomProperties = '';
|
|
2393
|
+
|
|
2394
|
+
_.each(extraValue, (moreExtraValue, moreModifier) => {
|
|
2395
|
+
moreExtraCustomProperties += ` ${moreModifier}: ${parseValue(moreExtraValue)},`;
|
|
2396
|
+
});
|
|
2397
|
+
|
|
2398
|
+
customProperties += `${remove_last_character(moreExtraCustomProperties)} },`;
|
|
2399
|
+
} else {
|
|
2400
|
+
extraCustomProperties += ` ${extraModifier}: ${parseValue(extraValue)},`;
|
|
2401
|
+
}
|
|
2402
|
+
});
|
|
2403
|
+
|
|
2404
|
+
customProperties += `${remove_last_character(extraCustomProperties)} },`;
|
|
2405
|
+
}
|
|
2406
|
+
} else {
|
|
2407
|
+
if (theModifier === 'apply') {
|
|
2408
|
+
_applyClasses[`${_key}${setModifier(modifier)}`] = new Set(Array.isArray(theValue) ? theValue : theValue.split(' '));
|
|
2409
|
+
|
|
2410
|
+
customProperties += ` {_applyProperties_},`;
|
|
2411
|
+
} else {
|
|
2412
|
+
customProperties += ` ${theModifier}: ${parseValue(theValue)},`;
|
|
2413
|
+
}
|
|
2414
|
+
}
|
|
2415
|
+
});
|
|
2416
|
+
|
|
2417
|
+
convertedStyles += `'${_key}${setModifier(modifier)}': {${remove_last_character(customProperties)} }\n`;
|
|
2418
|
+
}
|
|
1216
2419
|
});
|
|
2420
|
+
|
|
2421
|
+
return convertedStyles;
|
|
1217
2422
|
}
|
|
2423
|
+
exports.customRules = customRules;
|
|
2424
|
+
|
|
1218
2425
|
//! The son of Mother Goose
|
|
1219
2426
|
function applyProperties(twStyles) {
|
|
1220
2427
|
let twStylesArray = twStyles.split(/\r?\n/);
|
|
@@ -1284,6 +2491,66 @@ function applyProperties(twStyles) {
|
|
|
1284
2491
|
}
|
|
1285
2492
|
exports.applyProperties = applyProperties;
|
|
1286
2493
|
|
|
2494
|
+
function processProperties(info, selectorAndDeclarationBlock, selectorsAndValues, minusSigns = '') {
|
|
2495
|
+
let convertedStyles = '';
|
|
2496
|
+
|
|
2497
|
+
if (typeof info === 'object') {
|
|
2498
|
+
convertedStyles = processComments(info);
|
|
2499
|
+
} else {
|
|
2500
|
+
convertedStyles = `\n// ${info}\n`;
|
|
2501
|
+
}
|
|
2502
|
+
|
|
2503
|
+
_.each(selectorAndDeclarationBlock, (declarationBlock, mainSelector) => {
|
|
2504
|
+
_.each(selectorsAndValues, (value, secondSelector) => {
|
|
2505
|
+
let selectorSign = (secondSelector.startsWith('-')) ? '-' : '';
|
|
2506
|
+
if (typeof value === 'object') {
|
|
2507
|
+
_.each(value, (_values, modifier) => {
|
|
2508
|
+
if (typeof _values === 'object') {
|
|
2509
|
+
_.each(_values, (__value, thirdSelector) => {
|
|
2510
|
+
if (typeof __value === 'object') {
|
|
2511
|
+
_.each(__value, (___value, fourthSelector) => {
|
|
2512
|
+
let valores = _.replace(declarationBlock, new RegExp("{value}", "g"), parseValue(___value, minusSigns));
|
|
2513
|
+
convertedStyles += (mainSelector === 'default') ?
|
|
2514
|
+
`'.${selectorSign}${setModifier(secondSelector)}${setModifier(thirdSelector)}${setModifier(fourthSelector)}${setModifier(modifier)}': ${valores} \n` :
|
|
2515
|
+
`'.${selectorSign}${mainSelector}-${secondSelector}${setModifier(thirdSelector)}${setModifier(fourthSelector)}${setModifier(modifier)}': ${valores} \n`;
|
|
2516
|
+
});
|
|
2517
|
+
} else {
|
|
2518
|
+
let valores = _.replace(declarationBlock, new RegExp("{value}", "g"), parseValue(__value, minusSigns));
|
|
2519
|
+
convertedStyles += (mainSelector === 'default') ?
|
|
2520
|
+
`'.${selectorSign}${secondSelector}${setModifier(thirdSelector)}${setModifier(modifier)}': ${valores}\n` :
|
|
2521
|
+
`'.${selectorSign}${mainSelector}-${secondSelector}${setModifier(thirdSelector)}${setModifier(modifier)}': ${valores}\n`;
|
|
2522
|
+
}
|
|
2523
|
+
});
|
|
2524
|
+
} else {
|
|
2525
|
+
let valores = _.replace(declarationBlock, new RegExp("{value}", "g"), parseValue(_values, minusSigns));
|
|
2526
|
+
convertedStyles += (mainSelector === 'default') ?
|
|
2527
|
+
`'.${selectorSign}${setModifier(secondSelector)}${setModifier(modifier)}': ${valores}\n` :
|
|
2528
|
+
`'.${selectorSign}${mainSelector}${setModifier(secondSelector)}${setModifier(modifier)}': ${valores}\n`;
|
|
2529
|
+
}
|
|
2530
|
+
});
|
|
2531
|
+
} else {
|
|
2532
|
+
let valores = _.replace(declarationBlock, new RegExp("{value}", "g"), parseValue(value, minusSigns));
|
|
2533
|
+
convertedStyles += (mainSelector === 'default') ?
|
|
2534
|
+
`'.${selectorSign}${secondSelector}': ${valores}\n` :
|
|
2535
|
+
`'.${selectorSign}${mainSelector}${setModifier(secondSelector)}': ${valores}\n`;
|
|
2536
|
+
}
|
|
2537
|
+
});
|
|
2538
|
+
});
|
|
2539
|
+
|
|
2540
|
+
return convertedStyles;
|
|
2541
|
+
}
|
|
2542
|
+
exports.processProperties = processProperties;
|
|
2543
|
+
|
|
2544
|
+
function processComments(info) {
|
|
2545
|
+
let comments = '';
|
|
2546
|
+
|
|
2547
|
+
comments += (info.component) ? `\n// Component(s): ${info.component}` : '';
|
|
2548
|
+
comments += (info.prop) ? `\n// Property(ies): ${info.prop}\n` : '';
|
|
2549
|
+
comments += (info.description) ? `// Description: ${info.description}\n` : '';
|
|
2550
|
+
|
|
2551
|
+
return comments;
|
|
2552
|
+
}
|
|
2553
|
+
|
|
1287
2554
|
function checkColorClasses(cleanClassName) {
|
|
1288
2555
|
return (
|
|
1289
2556
|
cleanClassName.startsWith('active-tint-') ||
|
|
@@ -1295,6 +2562,7 @@ function checkColorClasses(cleanClassName) {
|
|
|
1295
2562
|
cleanClassName.startsWith('current-page-') ||
|
|
1296
2563
|
cleanClassName.startsWith('feedback-') ||
|
|
1297
2564
|
cleanClassName.startsWith('from-') ||
|
|
2565
|
+
cleanClassName.startsWith('indicator-') ||
|
|
1298
2566
|
cleanClassName.startsWith('nav-tint-') ||
|
|
1299
2567
|
cleanClassName.startsWith('page-') ||
|
|
1300
2568
|
cleanClassName.startsWith('paging-') ||
|
|
@@ -1314,6 +2582,138 @@ function findIndexOf(_substring, _array) {
|
|
|
1314
2582
|
}
|
|
1315
2583
|
exports.findIndexOf = findIndexOf;
|
|
1316
2584
|
|
|
2585
|
+
function checkPlatformAndDevice(line, className) {
|
|
2586
|
+
// https://regex101.com/r/6VTh23/1
|
|
2587
|
+
if (className.includes('ios:')) {
|
|
2588
|
+
return (line.includes('platform=ios'))
|
|
2589
|
+
? `${line.replace(/[^'.][^']+|1/, `ios:$&`)}\n`
|
|
2590
|
+
: `${line.replace(/[^'.][^']+|1/, `ios:$&[platform=ios]`)}\n`;
|
|
2591
|
+
} else if (className.includes('android:')) {
|
|
2592
|
+
return (line.includes('platform=android'))
|
|
2593
|
+
? `${line.replace(/[^'.][^']+|1/, `android:$&`)}\n`
|
|
2594
|
+
: `${line.replace(/[^'.][^']+|1/, `android:$&[platform=android]`)}\n`;
|
|
2595
|
+
} else if (className.includes('handheld:')) {
|
|
2596
|
+
return (line.includes('formFactor=handheld'))
|
|
2597
|
+
? `${line.replace(/[^'.][^']+|1/, `handheld:$&`)}\n`
|
|
2598
|
+
: `${line.replace(/[^'.][^']+|1/, `handheld:$&[formFactor=handheld]`)}\n`;
|
|
2599
|
+
} else if (className.includes('tablet:')) {
|
|
2600
|
+
return (line.includes('formFactor=tablet'))
|
|
2601
|
+
? `${line.replace(/[^'.][^']+|1/, `tablet:$&`)}\n`
|
|
2602
|
+
: `${line.replace(/[^'.][^']+|1/, `tablet:$&[formFactor=tablet]`)}\n`;
|
|
2603
|
+
} else if (className.includes('open:')) {
|
|
2604
|
+
return `${line.replace(/[^'.][^']+|1/, `open:$&`).replace(/{(.*)}/, '{ animation: { open: $& } }')}\n`;
|
|
2605
|
+
} else if (className.includes('close:')) {
|
|
2606
|
+
return `${line.replace(/[^'.][^']+|1/, `close:$&`).replace(/{(.*)}/, '{ animation: { close: $& } }')}\n`;
|
|
2607
|
+
} else if (className.includes('complete:')) {
|
|
2608
|
+
return `${line.replace(/[^'.][^']+|1/, `complete:$&`).replace(/{(.*)}/, '{ animation: { complete: $& } }')}\n`;
|
|
2609
|
+
} else if (className.includes('bounds:') && (line.includes('top') || line.includes('right') || line.includes('bottom') || line.includes('left'))) {
|
|
2610
|
+
return `${line.replace(/[^'.][^']+|1/, `bounds:$&`).replace(/{(.*)}/, '{ bounds: $& }')}\n`;
|
|
2611
|
+
} else if (className.includes('drag:')) {
|
|
2612
|
+
return `${line.replace(/[^'.][^']+|1/, `drag:$&`).replace(/{(.*)}/, '{ draggable: { drag: $& } }')}\n`;
|
|
2613
|
+
} else if (className.includes('drop:')) {
|
|
2614
|
+
return `${line.replace(/[^'.][^']+|1/, `drop:$&`).replace(/{(.*)}/, '{ draggable: { drop: $& } }')}\n`;
|
|
2615
|
+
} else {
|
|
2616
|
+
return `${line}\n`;
|
|
2617
|
+
}
|
|
2618
|
+
}
|
|
2619
|
+
exports.checkPlatformAndDevice = checkPlatformAndDevice;
|
|
2620
|
+
|
|
2621
|
+
function parseValue(value, sign = '') {
|
|
2622
|
+
if (value === '') return `''`;
|
|
2623
|
+
|
|
2624
|
+
// Hack for unicode values
|
|
2625
|
+
if (/[^\u0000-\u00ff]/.test(value)) {
|
|
2626
|
+
return `'\\u${value.charCodeAt(0).toString(16)}'`;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2629
|
+
if (value === '0px') {
|
|
2630
|
+
value = 0;
|
|
2631
|
+
}
|
|
2632
|
+
|
|
2633
|
+
let unit = isNaN(value) ? checkTitanium(value) : value;
|
|
2634
|
+
|
|
2635
|
+
switch (unit) {
|
|
2636
|
+
case '0':
|
|
2637
|
+
case true:
|
|
2638
|
+
case false:
|
|
2639
|
+
case 'titanium':
|
|
2640
|
+
return `${sign}${value}`;
|
|
2641
|
+
case 'vw':
|
|
2642
|
+
case 'vh':
|
|
2643
|
+
case 'screen':
|
|
2644
|
+
return 'Ti.UI.FILL';
|
|
2645
|
+
case 'auto':
|
|
2646
|
+
return 'Ti.UI.SIZE';
|
|
2647
|
+
case 'none':
|
|
2648
|
+
case 'null':
|
|
2649
|
+
return null;
|
|
2650
|
+
case 'rem':
|
|
2651
|
+
return `${sign}${16 * parseFloat(value)}`;
|
|
2652
|
+
case 'dp':
|
|
2653
|
+
return `${sign}${parseFloat(value)}`;
|
|
2654
|
+
case 'hex':
|
|
2655
|
+
return toHex(value);
|
|
2656
|
+
case 'deg':
|
|
2657
|
+
return parseFloat(value);
|
|
2658
|
+
case 'ms':
|
|
2659
|
+
return parseFloat(value);
|
|
2660
|
+
case 'transparent':
|
|
2661
|
+
return `'${value}'`;
|
|
2662
|
+
default:
|
|
2663
|
+
return isNaN(value) ? `'${sign}${value}'` : `${sign}${value}`;
|
|
2664
|
+
}
|
|
2665
|
+
}
|
|
2666
|
+
exports.parseValue = parseValue;
|
|
2667
|
+
|
|
2668
|
+
function addTransparencyToValue(color) {
|
|
2669
|
+
if (color.includes('#')) {
|
|
2670
|
+
switch (color.length) {
|
|
2671
|
+
case 4:
|
|
2672
|
+
color = `#0${color[0]}${color[1]}${color[2]}`
|
|
2673
|
+
break;
|
|
2674
|
+
case 7:
|
|
2675
|
+
color = `#00${color[0]}${color[1]}${color[2]}${color[3]}${color[4]}${color[5]}`
|
|
2676
|
+
break;
|
|
2677
|
+
case 9:
|
|
2678
|
+
color = `#00${color[2]}${color[3]}${color[4]}${color[5]}${color[6]}${color[7]}`
|
|
2679
|
+
break;
|
|
2680
|
+
case 11:
|
|
2681
|
+
color = `#00${color[4]}${color[5]}${color[6]}${color[7]}${color[8]}${color[9]}`
|
|
2682
|
+
break;
|
|
2683
|
+
}
|
|
2684
|
+
return `'${color}'`;
|
|
2685
|
+
} else if (color.match(/rgba?/i)) {
|
|
2686
|
+
const rgba = color.replace(/[\[\]')]+/g, '').split(',');
|
|
2687
|
+
color = `'${rgba[0].trim()}, ${rgba[1].trim()}, ${rgba[2].trim()}, 0)'`;
|
|
2688
|
+
}
|
|
2689
|
+
|
|
2690
|
+
return color;
|
|
2691
|
+
}
|
|
2692
|
+
exports.addTransparencyToValue = addTransparencyToValue;
|
|
2693
|
+
|
|
2694
|
+
function addTransparencyToHex(color, transparency = '00') {
|
|
2695
|
+
if (color.includes('#')) {
|
|
2696
|
+
if (color.includes('\'')) {
|
|
2697
|
+
color = color.replace(/'/g, '');
|
|
2698
|
+
}
|
|
2699
|
+
switch (color.length) {
|
|
2700
|
+
case 4:
|
|
2701
|
+
color = `#${transparency}${color[1]}${color[2]}${color[3]}`
|
|
2702
|
+
break;
|
|
2703
|
+
case 7:
|
|
2704
|
+
color = `#${transparency}${color[1]}${color[2]}${color[3]}${color[4]}${color[5]}${color[6]}`
|
|
2705
|
+
break;
|
|
2706
|
+
case 9:
|
|
2707
|
+
color = `#${transparency}${color[3]}${color[4]}${color[5]}${color[6]}${color[7]}${color[8]}`
|
|
2708
|
+
break;
|
|
2709
|
+
}
|
|
2710
|
+
}
|
|
2711
|
+
|
|
2712
|
+
return `'${color}'`;
|
|
2713
|
+
}
|
|
2714
|
+
exports.addTransparencyToHex = addTransparencyToHex;
|
|
2715
|
+
|
|
2716
|
+
//! Private Functions
|
|
1317
2717
|
function fixDuplicateKeys(compoundClasses) {
|
|
1318
2718
|
compoundClasses.sort();
|
|
1319
2719
|
|
|
@@ -1366,10 +2766,10 @@ function fixDuplicateKeys(compoundClasses) {
|
|
|
1366
2766
|
}
|
|
1367
2767
|
|
|
1368
2768
|
const arbitraryValuesTable = {
|
|
1369
|
-
// Check if they are really needed
|
|
1370
|
-
|
|
1371
2769
|
'active-tint': 'activeTintColor: {value}',
|
|
1372
2770
|
'active-title': 'activeTitleColor: {value}',
|
|
2771
|
+
'bar-title': 'titleAttributes : { color : {value} }',
|
|
2772
|
+
'bar-title-shadow': 'titleAttributes: { shadow: { color: {value} } }',
|
|
1373
2773
|
'bar': 'barColor: {value}',
|
|
1374
2774
|
'bg-selected': 'backgroundSelectedColor: {value}',
|
|
1375
2775
|
'bg': 'backgroundColor: {value}',
|
|
@@ -1382,6 +2782,7 @@ const arbitraryValuesTable = {
|
|
|
1382
2782
|
'content': 'contentWidth: {value}, contentHeight: {value}',
|
|
1383
2783
|
'current-page': 'currentPageIndicatorColor: {value}',
|
|
1384
2784
|
'delay': 'delay: {value}',
|
|
2785
|
+
'drop-shadow': 'shadowColor: {value} }',
|
|
1385
2786
|
'duration': 'duration: {value}',
|
|
1386
2787
|
'feedback': 'touchFeedback: true, touchFeedbackColor: {value}',
|
|
1387
2788
|
'font': 'font: { fontWeight: {value} }',
|
|
@@ -1389,6 +2790,7 @@ const arbitraryValuesTable = {
|
|
|
1389
2790
|
'grid-cols': 'width: Alloy.Globals.cols_{value}',
|
|
1390
2791
|
'grid-rows': 'height: Alloy.Globals.rows_{value}',
|
|
1391
2792
|
'h': 'height: {value}',
|
|
2793
|
+
'indicator': 'indicatorColor: {value}',
|
|
1392
2794
|
'left': 'left: {value}',
|
|
1393
2795
|
'm': 'top: {value}, right: {value}, bottom: {value}, left: {value}',
|
|
1394
2796
|
'max-scale': 'maxZoomScale: {value}',
|
|
@@ -1403,6 +2805,9 @@ const arbitraryValuesTable = {
|
|
|
1403
2805
|
'opacity': 'opacity: {value}',
|
|
1404
2806
|
'origin': 'anchorPoint: { x: {value}, y: {value1} }',
|
|
1405
2807
|
'p': 'padding: { top: {value}, right: {value}, bottom: {value}, left: {value} }',
|
|
2808
|
+
'padding-bottom': 'paddingBottom: {value}',
|
|
2809
|
+
'padding-left': 'paddingLeft: {value}',
|
|
2810
|
+
'padding-right': 'paddingRight: {value}',
|
|
1406
2811
|
'page': 'pageIndicatorColor: {value}',
|
|
1407
2812
|
'paging-alpha': 'pagingControlAlpha: {value}',
|
|
1408
2813
|
'paging-color': 'pagingControlColor: {value}',
|
|
@@ -1417,15 +2822,15 @@ const arbitraryValuesTable = {
|
|
|
1417
2822
|
'right': 'right: {value}',
|
|
1418
2823
|
'rotate': 'rotate: {value}',
|
|
1419
2824
|
'rounded': 'borderRadius: {value}',
|
|
1420
|
-
'shadow': 'viewShadowColor: {value}',
|
|
2825
|
+
'shadow': 'viewShadowColor: {value} }',
|
|
1421
2826
|
'tabs-bg': 'tabsBackgroundColor: {value}',
|
|
1422
2827
|
'text-color': 'color: {value}',
|
|
1423
2828
|
'text-size': 'font: { fontSize: {value} }',
|
|
1424
|
-
'tint': 'tintColor: {value}',
|
|
2829
|
+
'tint': 'tint: {value}, tintColor: {value}',
|
|
1425
2830
|
'title': 'titleColor: {value}',
|
|
1426
2831
|
'to': 'backgroundGradient: { colors: [ {value} ] }',
|
|
1427
2832
|
'top': 'top: {value}',
|
|
1428
|
-
'w': 'width: {value}'
|
|
2833
|
+
'w': 'width: {value}',
|
|
1429
2834
|
};
|
|
1430
2835
|
|
|
1431
2836
|
function formatArbitraryValues(arbitraryValue) {
|
|
@@ -1495,177 +2900,6 @@ function formatArbitraryValues(arbitraryValue) {
|
|
|
1495
2900
|
return null;
|
|
1496
2901
|
}
|
|
1497
2902
|
|
|
1498
|
-
//! The Mother Goose
|
|
1499
|
-
function customRules(_value, _key) {
|
|
1500
|
-
//! Want to refactor
|
|
1501
|
-
let convertedStyles = '';
|
|
1502
|
-
|
|
1503
|
-
_.each(_value, (value, modifier) => {
|
|
1504
|
-
if (modifier === 'apply') {
|
|
1505
|
-
_applyClasses[_key] = new Set(Array.isArray(_value[modifier]) ? _value[modifier] : _value[modifier].split(' '));
|
|
1506
|
-
|
|
1507
|
-
convertedStyles += `'${_key}': { {_applyProperties_} }\n`;
|
|
1508
|
-
} else {
|
|
1509
|
-
let customProperties = '';
|
|
1510
|
-
|
|
1511
|
-
_.each(value, (theValue, theModifier) => {
|
|
1512
|
-
if (typeof (theValue) === 'object' && theValue !== null) {
|
|
1513
|
-
if (theModifier === 'apply') {
|
|
1514
|
-
_applyClasses[`${_key}${setModifier(modifier)}`] = new Set(Array.isArray(theValue) ? theValue : theValue.split(' '));
|
|
1515
|
-
|
|
1516
|
-
customProperties += ` {_applyProperties_},`;
|
|
1517
|
-
} else {
|
|
1518
|
-
customProperties += ` ${theModifier}: {`;
|
|
1519
|
-
|
|
1520
|
-
let extraCustomProperties = '';
|
|
1521
|
-
|
|
1522
|
-
_.each(theValue, (extraValue, extraModifier) => {
|
|
1523
|
-
if (typeof (extraValue) === 'object' && extraValue !== null) {
|
|
1524
|
-
customProperties += ` ${extraModifier}: {`;
|
|
1525
|
-
|
|
1526
|
-
let moreExtraCustomProperties = '';
|
|
1527
|
-
|
|
1528
|
-
_.each(extraValue, (moreExtraValue, moreModifier) => {
|
|
1529
|
-
moreExtraCustomProperties += ` ${moreModifier}: ${parseValue(moreExtraValue)},`;
|
|
1530
|
-
});
|
|
1531
|
-
|
|
1532
|
-
customProperties += `${remove_last_character(moreExtraCustomProperties)} },`;
|
|
1533
|
-
} else {
|
|
1534
|
-
extraCustomProperties += ` ${extraModifier}: ${parseValue(extraValue)},`;
|
|
1535
|
-
}
|
|
1536
|
-
});
|
|
1537
|
-
|
|
1538
|
-
customProperties += `${remove_last_character(extraCustomProperties)} },`;
|
|
1539
|
-
}
|
|
1540
|
-
} else {
|
|
1541
|
-
if (theModifier === 'apply') {
|
|
1542
|
-
_applyClasses[`${_key}${setModifier(modifier)}`] = new Set(Array.isArray(theValue) ? theValue : theValue.split(' '));
|
|
1543
|
-
|
|
1544
|
-
customProperties += ` {_applyProperties_},`;
|
|
1545
|
-
} else {
|
|
1546
|
-
customProperties += ` ${theModifier}: ${parseValue(theValue)},`;
|
|
1547
|
-
}
|
|
1548
|
-
}
|
|
1549
|
-
});
|
|
1550
|
-
|
|
1551
|
-
convertedStyles += `'${_key}${setModifier(modifier)}': {${remove_last_character(customProperties)} }\n`;
|
|
1552
|
-
}
|
|
1553
|
-
});
|
|
1554
|
-
|
|
1555
|
-
return convertedStyles;
|
|
1556
|
-
}
|
|
1557
|
-
exports.customRules = customRules;
|
|
1558
|
-
|
|
1559
|
-
function checkPlatformAndDevice(line, className) {
|
|
1560
|
-
// https://regex101.com/r/6VTh23/1
|
|
1561
|
-
if (className.includes('ios:')) {
|
|
1562
|
-
return (line.includes('platform=ios'))
|
|
1563
|
-
? `${line.replace(/[^'.][^']+|1/, `ios:$&`)}\n`
|
|
1564
|
-
: `${line.replace(/[^'.][^']+|1/, `ios:$&[platform=ios]`)}\n`;
|
|
1565
|
-
} else if (className.includes('android:')) {
|
|
1566
|
-
return (line.includes('platform=android'))
|
|
1567
|
-
? `${line.replace(/[^'.][^']+|1/, `android:$&`)}\n`
|
|
1568
|
-
: `${line.replace(/[^'.][^']+|1/, `android:$&[platform=android]`)}\n`;
|
|
1569
|
-
} else if (className.includes('handheld:')) {
|
|
1570
|
-
return (line.includes('formFactor=handheld'))
|
|
1571
|
-
? `${line.replace(/[^'.][^']+|1/, `handheld:$&`)}\n`
|
|
1572
|
-
: `${line.replace(/[^'.][^']+|1/, `handheld:$&[formFactor=handheld]`)}\n`;
|
|
1573
|
-
} else if (className.includes('tablet:')) {
|
|
1574
|
-
return (line.includes('formFactor=tablet'))
|
|
1575
|
-
? `${line.replace(/[^'.][^']+|1/, `tablet:$&`)}\n`
|
|
1576
|
-
: `${line.replace(/[^'.][^']+|1/, `tablet:$&[formFactor=tablet]`)}\n`;
|
|
1577
|
-
} else if (className.includes('open:')) {
|
|
1578
|
-
return `${line.replace(/[^'.][^']+|1/, `open:$&`).replace(/{(.*)}/, '{ animation: { open: $& } }')}\n`;
|
|
1579
|
-
} else if (className.includes('close:')) {
|
|
1580
|
-
return `${line.replace(/[^'.][^']+|1/, `close:$&`).replace(/{(.*)}/, '{ animation: { close: $& } }')}\n`;
|
|
1581
|
-
} else if (className.includes('complete:')) {
|
|
1582
|
-
return `${line.replace(/[^'.][^']+|1/, `complete:$&`).replace(/{(.*)}/, '{ animation: { complete: $& } }')}\n`;
|
|
1583
|
-
} else if (className.includes('bounds:') && (line.includes('top') || line.includes('right') || line.includes('bottom') || line.includes('left'))) {
|
|
1584
|
-
return `${line.replace(/[^'.][^']+|1/, `bounds:$&`).replace(/{(.*)}/, '{ bounds: $& }')}\n`;
|
|
1585
|
-
} else if (className.includes('drag:')) {
|
|
1586
|
-
return `${line.replace(/[^'.][^']+|1/, `drag:$&`).replace(/{(.*)}/, '{ draggable: { drag: $& } }')}\n`;
|
|
1587
|
-
} else if (className.includes('drop:')) {
|
|
1588
|
-
return `${line.replace(/[^'.][^']+|1/, `drop:$&`).replace(/{(.*)}/, '{ draggable: { drop: $& } }')}\n`;
|
|
1589
|
-
} else {
|
|
1590
|
-
return `${line}\n`;
|
|
1591
|
-
}
|
|
1592
|
-
}
|
|
1593
|
-
exports.checkPlatformAndDevice = checkPlatformAndDevice;
|
|
1594
|
-
|
|
1595
|
-
function parseValue(value, sign = '') {
|
|
1596
|
-
if (value === '') return `''`;
|
|
1597
|
-
|
|
1598
|
-
// Hack for unicode values
|
|
1599
|
-
if (/[^\u0000-\u00ff]/.test(value)) {
|
|
1600
|
-
return `'\\u${value.charCodeAt(0).toString(16)}'`;
|
|
1601
|
-
}
|
|
1602
|
-
|
|
1603
|
-
if (value === '0px') {
|
|
1604
|
-
value = 0;
|
|
1605
|
-
}
|
|
1606
|
-
|
|
1607
|
-
let unit = isNaN(value) ? checkTitanium(value) : value;
|
|
1608
|
-
|
|
1609
|
-
switch (unit) {
|
|
1610
|
-
case '0':
|
|
1611
|
-
case true:
|
|
1612
|
-
case false:
|
|
1613
|
-
case 'titanium':
|
|
1614
|
-
return `${sign}${value}`;
|
|
1615
|
-
case 'vw':
|
|
1616
|
-
case 'vh':
|
|
1617
|
-
case 'screen':
|
|
1618
|
-
return 'Ti.UI.FILL';
|
|
1619
|
-
case 'auto':
|
|
1620
|
-
return 'Ti.UI.SIZE';
|
|
1621
|
-
case 'none':
|
|
1622
|
-
case 'null':
|
|
1623
|
-
return null;
|
|
1624
|
-
case 'rem':
|
|
1625
|
-
return `${sign}${16 * parseFloat(value)}`;
|
|
1626
|
-
case 'dp':
|
|
1627
|
-
return `${sign}${parseFloat(value)}`;
|
|
1628
|
-
case 'hex':
|
|
1629
|
-
return toHex(value);
|
|
1630
|
-
case 'deg':
|
|
1631
|
-
return parseFloat(value);
|
|
1632
|
-
case 'ms':
|
|
1633
|
-
return parseFloat(value);
|
|
1634
|
-
case 'transparent':
|
|
1635
|
-
return `'${value}'`;
|
|
1636
|
-
default:
|
|
1637
|
-
return isNaN(value) ? `'${sign}${value}'` : `${sign}${value}`;
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
exports.parseValue = parseValue;
|
|
1641
|
-
|
|
1642
|
-
function addTransparencyToValue(color) {
|
|
1643
|
-
if (color.includes('#')) {
|
|
1644
|
-
switch (color.length) {
|
|
1645
|
-
case 4:
|
|
1646
|
-
color = `#0${color[0]}${color[1]}${color[2]}`
|
|
1647
|
-
break;
|
|
1648
|
-
case 7:
|
|
1649
|
-
color = `#00${color[0]}${color[1]}${color[2]}${color[3]}${color[4]}${color[5]}`
|
|
1650
|
-
break;
|
|
1651
|
-
case 9:
|
|
1652
|
-
color = `#00${color[2]}${color[3]}${color[4]}${color[5]}${color[6]}${color[7]}`
|
|
1653
|
-
break;
|
|
1654
|
-
case 11:
|
|
1655
|
-
color = `#00${color[4]}${color[5]}${color[6]}${color[7]}${color[8]}${color[9]}`
|
|
1656
|
-
break;
|
|
1657
|
-
}
|
|
1658
|
-
return `'${color}'`;
|
|
1659
|
-
} else if (color.match(/rgba?/i)) {
|
|
1660
|
-
const rgba = color.replace(/[\[\]')]+/g, '').split(',');
|
|
1661
|
-
color = `'${rgba[0].trim()}, ${rgba[1].trim()}, ${rgba[2].trim()}, 0)'`;
|
|
1662
|
-
}
|
|
1663
|
-
|
|
1664
|
-
return color;
|
|
1665
|
-
}
|
|
1666
|
-
exports.addTransparencyToValue = addTransparencyToValue;
|
|
1667
|
-
|
|
1668
|
-
//! Private Functions
|
|
1669
2903
|
function setModifier(modifier) {
|
|
1670
2904
|
if (defaultModifier(modifier)) {
|
|
1671
2905
|
modifier = '';
|
|
@@ -1689,7 +2923,7 @@ function setModifier(modifier) {
|
|
|
1689
2923
|
}
|
|
1690
2924
|
|
|
1691
2925
|
function defaultModifier(modifier) {
|
|
1692
|
-
return modifier === 'global' || modifier === 'default' || modifier === 'DEFAULT';
|
|
2926
|
+
return modifier === '' || modifier === 'global' || modifier === 'default' || modifier === 'DEFAULT';
|
|
1693
2927
|
}
|
|
1694
2928
|
|
|
1695
2929
|
function checkTitanium(value) {
|
|
@@ -1753,20 +2987,6 @@ function rgbToHex(color) {
|
|
|
1753
2987
|
return `#${alpha}${((1 << 24) + (parseInt(rgba[0]) << 16) + (parseInt(rgba[1]) << 8) + parseInt(rgba[2])).toString(16).slice(1)}`;
|
|
1754
2988
|
}
|
|
1755
2989
|
|
|
1756
|
-
function convertHexToRGBA(hexCode, opacity) {
|
|
1757
|
-
let hex = hexCode.replace('#', '');
|
|
1758
|
-
|
|
1759
|
-
if (hex.length === 3) {
|
|
1760
|
-
hex = `${hex[0]}${hex[0]}${hex[1]}${hex[1]}${hex[2]}${hex[2]}`;
|
|
1761
|
-
}
|
|
1762
|
-
|
|
1763
|
-
const r = parseInt(hex.substring(0, 2), 16);
|
|
1764
|
-
const g = parseInt(hex.substring(2, 4), 16);
|
|
1765
|
-
const b = parseInt(hex.substring(4, 6), 16);
|
|
1766
|
-
|
|
1767
|
-
return `rgba(${r},${g},${b},${opacity / 100})`;
|
|
1768
|
-
}
|
|
1769
|
-
|
|
1770
2990
|
function defaultColors(color) {
|
|
1771
2991
|
const colors = {
|
|
1772
2992
|
aqua: '#00FFFF',
|
|
@@ -1924,24 +3144,67 @@ function defaultColors(color) {
|
|
|
1924
3144
|
return colors[color] || null;
|
|
1925
3145
|
}
|
|
1926
3146
|
|
|
1927
|
-
|
|
1928
|
-
|
|
1929
|
-
|
|
1930
|
-
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
case 4:
|
|
1934
|
-
color = `#${transparency}${color[1]}${color[2]}${color[3]}`
|
|
1935
|
-
break;
|
|
1936
|
-
case 7:
|
|
1937
|
-
color = `#${transparency}${color[1]}${color[2]}${color[3]}${color[4]}${color[5]}${color[6]}`
|
|
1938
|
-
break;
|
|
1939
|
-
case 9:
|
|
1940
|
-
color = `#${transparency}${color[3]}${color[4]}${color[5]}${color[6]}${color[7]}${color[8]}`
|
|
1941
|
-
break;
|
|
1942
|
-
}
|
|
3147
|
+
//! RecycleBin
|
|
3148
|
+
function convertHexToRGBA(hexCode, opacity) {
|
|
3149
|
+
let hex = hexCode.replace('#', '');
|
|
3150
|
+
|
|
3151
|
+
if (hex.length === 3) {
|
|
3152
|
+
hex = `${hex[0]}${hex[0]}${hex[1]}${hex[1]}${hex[2]}${hex[2]}`;
|
|
1943
3153
|
}
|
|
1944
3154
|
|
|
1945
|
-
|
|
3155
|
+
const r = parseInt(hex.substring(0, 2), 16);
|
|
3156
|
+
const g = parseInt(hex.substring(2, 4), 16);
|
|
3157
|
+
const b = parseInt(hex.substring(4, 6), 16);
|
|
3158
|
+
|
|
3159
|
+
return `rgba(${r},${g},${b},${opacity / 100})`;
|
|
1946
3160
|
}
|
|
1947
|
-
|
|
3161
|
+
|
|
3162
|
+
function processModifiersAndProperties(header, objectPosition, modifiersAndValues, minusSigns = '') {
|
|
3163
|
+
let convertedStyles = `\n// ${header} Property\n`;
|
|
3164
|
+
|
|
3165
|
+
_.each(objectPosition, (properties, rule) => {
|
|
3166
|
+
_.each(modifiersAndValues, (value, modifier) => {
|
|
3167
|
+
let ruleSign = (modifier.startsWith('-')) ? '-' : '';
|
|
3168
|
+
if (typeof value === 'object') {
|
|
3169
|
+
_.each(value, (_value, _modifier) => {
|
|
3170
|
+
convertedStyles += `'.${ruleSign}${rule}-${modifier}${setModifier(_modifier)}': ` + _.replace(properties, new RegExp("{value}", "g"), parseValue(_value, minusSigns)) + '\n';
|
|
3171
|
+
});
|
|
3172
|
+
} else {
|
|
3173
|
+
convertedStyles += `'.${ruleSign}${rule}${setModifier(modifier)}': ` + _.replace(properties, new RegExp("{value}", "g"), parseValue(value, minusSigns)) + '\n';
|
|
3174
|
+
}
|
|
3175
|
+
});
|
|
3176
|
+
});
|
|
3177
|
+
|
|
3178
|
+
return convertedStyles;
|
|
3179
|
+
}
|
|
3180
|
+
|
|
3181
|
+
function testingAppPTSSFile() {
|
|
3182
|
+
readCSS(srcAppPTSSFile, (err, data) => {
|
|
3183
|
+
if (err) throw err
|
|
3184
|
+
|
|
3185
|
+
let someData = _.map(data.stylesheet.rules, (processing) => {
|
|
3186
|
+
let selector = processing.selectors[0];
|
|
3187
|
+
let property = processing.declarations[0].property;
|
|
3188
|
+
let __value = JSON.parse(processing.declarations[0].value);
|
|
3189
|
+
let value = Array.isArray(__value) ? __value : __value.split(' ');
|
|
3190
|
+
|
|
3191
|
+
return {
|
|
3192
|
+
selector: selector,
|
|
3193
|
+
property: property,
|
|
3194
|
+
value: value
|
|
3195
|
+
}
|
|
3196
|
+
});
|
|
3197
|
+
|
|
3198
|
+
console.log('Some Data:', someData);
|
|
3199
|
+
});
|
|
3200
|
+
}
|
|
3201
|
+
|
|
3202
|
+
function selectionIndicator() {
|
|
3203
|
+
return processProperties({ 'prop': 'selectionIndicator', 'component': 'Ti.UI.Picker' }, {
|
|
3204
|
+
'default': '{ selectionIndicator: {value} }'
|
|
3205
|
+
}, {
|
|
3206
|
+
'show-selection-indicator': true,
|
|
3207
|
+
'hide-selection-indicator': false,
|
|
3208
|
+
});
|
|
3209
|
+
}
|
|
3210
|
+
exports.selectionIndicator = selectionIndicator;
|