alloy 2.1.0 → 3.0.1
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/.eslintrc.js +2 -1
- package/.github/workflows/build.yml +8 -9
- package/.github/workflows/cla.yaml +1 -1
- package/.github/workflows/publish.yml +47 -8
- package/Alloy/builtins/moment/lang/ar-dz.js +8 -8
- package/Alloy/builtins/moment/lang/ar-ly.js +8 -8
- package/Alloy/builtins/moment/lang/ar-ps.js +123 -0
- package/Alloy/builtins/moment/lang/ar.js +8 -8
- package/Alloy/builtins/moment/lang/be.js +2 -2
- package/Alloy/builtins/moment/lang/bs.js +14 -4
- package/Alloy/builtins/moment/lang/ca.js +6 -6
- package/Alloy/builtins/moment/lang/cs.js +5 -4
- package/Alloy/builtins/moment/lang/cv.js +2 -2
- package/Alloy/builtins/moment/lang/en-au.js +6 -6
- package/Alloy/builtins/moment/lang/en-ca.js +6 -6
- package/Alloy/builtins/moment/lang/en-gb.js +6 -6
- package/Alloy/builtins/moment/lang/en-ie.js +6 -6
- package/Alloy/builtins/moment/lang/en-il.js +6 -6
- package/Alloy/builtins/moment/lang/en-in.js +6 -6
- package/Alloy/builtins/moment/lang/en-nz.js +6 -6
- package/Alloy/builtins/moment/lang/en-sg.js +6 -6
- package/Alloy/builtins/moment/lang/it.js +4 -4
- package/Alloy/builtins/moment/lang/ku-kmr.js +125 -0
- package/Alloy/builtins/moment/lang/lt.js +2 -2
- package/Alloy/builtins/moment/lang/me.js +2 -2
- package/Alloy/builtins/moment/lang/nb.js +4 -4
- package/Alloy/builtins/moment/lang/nl-be.js +1 -1
- package/Alloy/builtins/moment/lang/nl.js +1 -1
- package/Alloy/builtins/moment/lang/oc-lnc.js +6 -6
- package/Alloy/builtins/moment/lang/ru.js +2 -2
- package/Alloy/builtins/moment/lang/sv.js +6 -6
- package/Alloy/builtins/moment/lang/tet.js +6 -6
- package/Alloy/builtins/moment/lang/tlh.js +8 -8
- package/Alloy/builtins/moment/lang/tzl.js +2 -2
- package/Alloy/builtins/moment/lang/uk.js +4 -4
- package/Alloy/builtins/moment/lang/x-pseudo.js +6 -6
- package/Alloy/builtins/moment.js +368 -365
- package/Alloy/builtins/string.js +1 -4
- package/Alloy/commands/compile/ast/controller.js +58 -29
- package/Alloy/commands/compile/compilerUtils.js +3 -2
- package/Alloy/commands/compile/parsers/Alloy.Abstract.FixedSpace.js +2 -11
- package/Alloy/commands/compile/parsers/Alloy.Abstract.FlexSpace.js +2 -11
- package/Alloy/commands/compile/parsers/Alloy.Abstract.Option.js +2 -2
- package/Alloy/commands/compile/parsers/Alloy.Abstract._ItemContainer.js +9 -2
- package/Alloy/commands/compile/parsers/Ti.UI.ActivityIndicator.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.AttributedString.js +0 -5
- package/Alloy/commands/compile/parsers/Ti.UI.Button.js +2 -11
- package/Alloy/commands/compile/parsers/Ti.UI.Column.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.MaskedImage.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.NavigationWindow.js +0 -15
- package/Alloy/commands/compile/parsers/Ti.UI.Notification.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.OptionBar.js +0 -5
- package/Alloy/commands/compile/parsers/Ti.UI.ProgressBar.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.RefreshControl.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.Row.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.SearchBar.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.Shortcut.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.ShortcutItem.js +9 -0
- package/Alloy/commands/compile/parsers/Ti.UI.TabbedBar.js +0 -9
- package/Alloy/commands/compile/parsers/Ti.UI.Toolbar.js +0 -6
- package/Alloy/commands/new/index.js +1 -1
- package/Alloy/common/constants.js +3 -12
- package/Alloy/lib/alloy/backbone/1.6.0/backbone.js +2155 -0
- package/Alloy/lib/alloy/sync/localStorage.js +0 -8
- package/Alloy/lib/alloy/sync/sql.js +2 -2
- package/Alloy/plugin/plugin.py +1 -123
- package/Alloy/template/lib/alloy.js +0 -7
- package/Alloy/tiapp.js +1 -11
- package/README.md +16 -0
- package/package.json +6 -25
- package/platforms/windows/index.js +0 -4
- package/samples/apps/advanced/complex_styling/config.json +1 -4
- package/samples/apps/advanced/custom_tss_queries/styles/index.tss +0 -6
- package/samples/apps/advanced/device_query/specs/index.js +1 -12
- package/samples/apps/advanced/device_query/styles/index.tss +0 -12
- package/samples/apps/advanced/form_factor/views/index.xml +1 -7
- package/samples/apps/advanced/inheritance/controllers/index.js +4 -8
- package/samples/apps/advanced/inheritance/specs/baseDialog.js +2 -2
- package/samples/apps/advanced/master_detail/specs/row.js +3 -3
- package/samples/apps/advanced/proxy_property_requires/widgets/com.foo.widget/views/section.xml +3 -3
- package/samples/apps/advanced/proxy_property_requires/widgets/com.foo.widget/widget.json +2 -2
- package/samples/apps/advanced/require_children/widgets/alloy.container/widget.json +2 -2
- package/samples/apps/advanced/themes/specs/dialog.js +1 -18
- package/samples/apps/advanced/themes/specs/index.js +1 -45
- package/samples/apps/advanced/theming_widgets/widgets/starrating/widget.json +2 -2
- package/samples/apps/basics/builtins/specs/index.js +2 -2
- package/samples/apps/basics/config_json/config.json +1 -4
- package/samples/apps/basics/global_style/specs/item.js +2 -2
- package/samples/apps/basics/simple/specs/index.js +2 -2
- package/samples/apps/models/binding_tableview/controllers/tab_1.js +2 -2
- package/samples/apps/models/binding_tableview/controllers/tab_2.js +2 -2
- package/samples/apps/models/binding_tableview/controllers/tab_3.js +2 -2
- package/samples/apps/models/binding_tableview/controllers/tab_4.js +2 -2
- package/samples/apps/ui/buttonbar/views/index.xml +1 -1
- package/samples/apps/ui/switch/views/index.xml +2 -2
- package/samples/apps/widgets/basic/widgets/com.foo.widget/widget.json +2 -2
- package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/widget.json +1 -1
- package/samples/apps/widgets/complex/widgets/com.testing.searchForBooks/widget.json +1 -1
- package/samples/apps/widgets/models/widgets/alloy.datatable/widget.json +1 -1
- package/samples/apps/widgets/wpath/widgets/com.test.hellobutton/widget.json +1 -1
- package/test/projects/HarnessTemplate/tiapp.xml +1 -0
- package/test/specs/new.js +0 -2
- package/test/specs/optimizer.js +0 -2
- package/Alloy/commands/compile/parsers/Ti.UI.iPhone.NavigationGroup.js +0 -58
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
//! moment.js locale configuration
|
|
2
|
+
//! locale : Northern Kurdish [ku-kmr]
|
|
3
|
+
//! authors : Mazlum Özdogan : https://github.com/mergehez
|
|
4
|
+
|
|
5
|
+
;(function (global, factory) {
|
|
6
|
+
typeof exports === 'object' && typeof module !== 'undefined'
|
|
7
|
+
&& typeof require === 'function' ? factory(require('/alloy/moment')) :
|
|
8
|
+
typeof define === 'function' && define.amd ? define(['../moment'], factory) :
|
|
9
|
+
factory(global.moment)
|
|
10
|
+
}(this, (function (moment) { 'use strict';
|
|
11
|
+
|
|
12
|
+
//! moment.js locale configuration
|
|
13
|
+
|
|
14
|
+
function processRelativeTime(num, withoutSuffix, key, isFuture) {
|
|
15
|
+
var format = {
|
|
16
|
+
s: ['çend sanîye', 'çend sanîyeyan'],
|
|
17
|
+
ss: [num + ' sanîye', num + ' sanîyeyan'],
|
|
18
|
+
m: ['deqîqeyek', 'deqîqeyekê'],
|
|
19
|
+
mm: [num + ' deqîqe', num + ' deqîqeyan'],
|
|
20
|
+
h: ['saetek', 'saetekê'],
|
|
21
|
+
hh: [num + ' saet', num + ' saetan'],
|
|
22
|
+
d: ['rojek', 'rojekê'],
|
|
23
|
+
dd: [num + ' roj', num + ' rojan'],
|
|
24
|
+
w: ['hefteyek', 'hefteyekê'],
|
|
25
|
+
ww: [num + ' hefte', num + ' hefteyan'],
|
|
26
|
+
M: ['mehek', 'mehekê'],
|
|
27
|
+
MM: [num + ' meh', num + ' mehan'],
|
|
28
|
+
y: ['salek', 'salekê'],
|
|
29
|
+
yy: [num + ' sal', num + ' salan'],
|
|
30
|
+
};
|
|
31
|
+
return withoutSuffix ? format[key][0] : format[key][1];
|
|
32
|
+
}
|
|
33
|
+
// function obliqueNumSuffix(num) {
|
|
34
|
+
// if(num.includes(':'))
|
|
35
|
+
// num = parseInt(num.split(':')[0]);
|
|
36
|
+
// else
|
|
37
|
+
// num = parseInt(num);
|
|
38
|
+
// return num == 0 || num % 10 == 1 ? 'ê'
|
|
39
|
+
// : (num > 10 && num % 10 == 0 ? 'î' : 'an');
|
|
40
|
+
// }
|
|
41
|
+
function ezafeNumSuffix(num) {
|
|
42
|
+
num = '' + num;
|
|
43
|
+
var l = num.substring(num.length - 1),
|
|
44
|
+
ll = num.length > 1 ? num.substring(num.length - 2) : '';
|
|
45
|
+
if (
|
|
46
|
+
!(ll == 12 || ll == 13) &&
|
|
47
|
+
(l == '2' || l == '3' || ll == '50' || l == '70' || l == '80')
|
|
48
|
+
)
|
|
49
|
+
return 'yê';
|
|
50
|
+
return 'ê';
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
var kuKmr = moment.defineLocale('ku-kmr', {
|
|
54
|
+
// According to the spelling rules defined by the work group of Weqfa Mezopotamyayê (Mesopotamia Foundation)
|
|
55
|
+
// this should be: 'Kanûna Paşîn_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Çirîya Pêşîn_Çirîya Paşîn_Kanûna Pêşîn'
|
|
56
|
+
// But the names below are more well known and handy
|
|
57
|
+
months: 'Rêbendan_Sibat_Adar_Nîsan_Gulan_Hezîran_Tîrmeh_Tebax_Îlon_Cotmeh_Mijdar_Berfanbar'.split(
|
|
58
|
+
'_'
|
|
59
|
+
),
|
|
60
|
+
monthsShort: 'Rêb_Sib_Ada_Nîs_Gul_Hez_Tîr_Teb_Îlo_Cot_Mij_Ber'.split('_'),
|
|
61
|
+
monthsParseExact: true,
|
|
62
|
+
weekdays: 'Yekşem_Duşem_Sêşem_Çarşem_Pêncşem_În_Şemî'.split('_'),
|
|
63
|
+
weekdaysShort: 'Yek_Du_Sê_Çar_Pên_În_Şem'.split('_'),
|
|
64
|
+
weekdaysMin: 'Ye_Du_Sê_Ça_Pê_În_Şe'.split('_'),
|
|
65
|
+
meridiem: function (hours, minutes, isLower) {
|
|
66
|
+
if (hours < 12) {
|
|
67
|
+
return isLower ? 'bn' : 'BN';
|
|
68
|
+
} else {
|
|
69
|
+
return isLower ? 'pn' : 'PN';
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
meridiemParse: /bn|BN|pn|PN/,
|
|
73
|
+
longDateFormat: {
|
|
74
|
+
LT: 'HH:mm',
|
|
75
|
+
LTS: 'HH:mm:ss',
|
|
76
|
+
L: 'DD.MM.YYYY',
|
|
77
|
+
LL: 'Do MMMM[a] YYYY[an]',
|
|
78
|
+
LLL: 'Do MMMM[a] YYYY[an] HH:mm',
|
|
79
|
+
LLLL: 'dddd, Do MMMM[a] YYYY[an] HH:mm',
|
|
80
|
+
ll: 'Do MMM[.] YYYY[an]',
|
|
81
|
+
lll: 'Do MMM[.] YYYY[an] HH:mm',
|
|
82
|
+
llll: 'ddd[.], Do MMM[.] YYYY[an] HH:mm',
|
|
83
|
+
},
|
|
84
|
+
calendar: {
|
|
85
|
+
sameDay: '[Îro di saet] LT [de]',
|
|
86
|
+
nextDay: '[Sibê di saet] LT [de]',
|
|
87
|
+
nextWeek: 'dddd [di saet] LT [de]',
|
|
88
|
+
lastDay: '[Duh di saet] LT [de]',
|
|
89
|
+
lastWeek: 'dddd[a borî di saet] LT [de]',
|
|
90
|
+
sameElse: 'L',
|
|
91
|
+
},
|
|
92
|
+
relativeTime: {
|
|
93
|
+
future: 'di %s de',
|
|
94
|
+
past: 'berî %s',
|
|
95
|
+
s: processRelativeTime,
|
|
96
|
+
ss: processRelativeTime,
|
|
97
|
+
m: processRelativeTime,
|
|
98
|
+
mm: processRelativeTime,
|
|
99
|
+
h: processRelativeTime,
|
|
100
|
+
hh: processRelativeTime,
|
|
101
|
+
d: processRelativeTime,
|
|
102
|
+
dd: processRelativeTime,
|
|
103
|
+
w: processRelativeTime,
|
|
104
|
+
ww: processRelativeTime,
|
|
105
|
+
M: processRelativeTime,
|
|
106
|
+
MM: processRelativeTime,
|
|
107
|
+
y: processRelativeTime,
|
|
108
|
+
yy: processRelativeTime,
|
|
109
|
+
},
|
|
110
|
+
dayOfMonthOrdinalParse: /\d{1,2}(?:yê|ê|\.)/,
|
|
111
|
+
ordinal: function (num, period) {
|
|
112
|
+
var p = period.toLowerCase();
|
|
113
|
+
if (p.includes('w') || p.includes('m')) return num + '.';
|
|
114
|
+
|
|
115
|
+
return num + ezafeNumSuffix(num);
|
|
116
|
+
},
|
|
117
|
+
week: {
|
|
118
|
+
dow: 1, // Monday is the first day of the week.
|
|
119
|
+
doy: 4, // The week that contains Jan 4th is the first week of the year.
|
|
120
|
+
},
|
|
121
|
+
});
|
|
122
|
+
|
|
123
|
+
return kuKmr;
|
|
124
|
+
|
|
125
|
+
})));
|
|
@@ -47,13 +47,13 @@
|
|
|
47
47
|
ss: '%d sekunder',
|
|
48
48
|
m: 'ett minutt',
|
|
49
49
|
mm: '%d minutter',
|
|
50
|
-
h: '
|
|
50
|
+
h: 'én time',
|
|
51
51
|
hh: '%d timer',
|
|
52
|
-
d: '
|
|
52
|
+
d: 'én dag',
|
|
53
53
|
dd: '%d dager',
|
|
54
|
-
w: '
|
|
54
|
+
w: 'én uke',
|
|
55
55
|
ww: '%d uker',
|
|
56
|
-
M: '
|
|
56
|
+
M: 'én måned',
|
|
57
57
|
MM: '%d måneder',
|
|
58
58
|
y: 'ett år',
|
|
59
59
|
yy: '%d år',
|
|
@@ -74,12 +74,12 @@
|
|
|
74
74
|
number === 1
|
|
75
75
|
? 'r'
|
|
76
76
|
: number === 2
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
77
|
+
? 'n'
|
|
78
|
+
: number === 3
|
|
79
|
+
? 'r'
|
|
80
|
+
: number === 4
|
|
81
|
+
? 't'
|
|
82
|
+
: 'è';
|
|
83
83
|
if (period === 'w' || period === 'W') {
|
|
84
84
|
output = 'a';
|
|
85
85
|
}
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
return num % 10 === 1 && num % 100 !== 11
|
|
19
19
|
? forms[0]
|
|
20
20
|
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
? forms[1]
|
|
22
|
+
: forms[2];
|
|
23
23
|
}
|
|
24
24
|
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
|
25
25
|
var format = {
|
|
@@ -19,10 +19,10 @@
|
|
|
19
19
|
output.indexOf('jaj') !== -1
|
|
20
20
|
? time.slice(0, -3) + 'leS'
|
|
21
21
|
: output.indexOf('jar') !== -1
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
? time.slice(0, -3) + 'waQ'
|
|
23
|
+
: output.indexOf('DIS') !== -1
|
|
24
|
+
? time.slice(0, -3) + 'nem'
|
|
25
|
+
: time + ' pIq';
|
|
26
26
|
return time;
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
output.indexOf('jaj') !== -1
|
|
33
33
|
? time.slice(0, -3) + 'Hu’'
|
|
34
34
|
: output.indexOf('jar') !== -1
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
? time.slice(0, -3) + 'wen'
|
|
36
|
+
: output.indexOf('DIS') !== -1
|
|
37
|
+
? time.slice(0, -3) + 'ben'
|
|
38
|
+
: time + ' ret';
|
|
39
39
|
return time;
|
|
40
40
|
}
|
|
41
41
|
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
return num % 10 === 1 && num % 100 !== 11
|
|
18
18
|
? forms[0]
|
|
19
19
|
: num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20)
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
? forms[1]
|
|
21
|
+
: forms[2];
|
|
22
22
|
}
|
|
23
23
|
function relativeTimeWithPlural(number, withoutSuffix, key) {
|
|
24
24
|
var format = {
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
nounCase = /(\[[ВвУу]\]) ?dddd/.test(format)
|
|
67
67
|
? 'accusative'
|
|
68
68
|
: /\[?(?:минулої|наступної)? ?\] ?dddd/.test(format)
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
? 'genitive'
|
|
70
|
+
: 'nominative';
|
|
71
71
|
return weekdays[nounCase][m.day()];
|
|
72
72
|
}
|
|
73
73
|
function processHoursFunction(str) {
|