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.
Files changed (104) hide show
  1. package/.eslintrc.js +2 -1
  2. package/.github/workflows/build.yml +8 -9
  3. package/.github/workflows/cla.yaml +1 -1
  4. package/.github/workflows/publish.yml +47 -8
  5. package/Alloy/builtins/moment/lang/ar-dz.js +8 -8
  6. package/Alloy/builtins/moment/lang/ar-ly.js +8 -8
  7. package/Alloy/builtins/moment/lang/ar-ps.js +123 -0
  8. package/Alloy/builtins/moment/lang/ar.js +8 -8
  9. package/Alloy/builtins/moment/lang/be.js +2 -2
  10. package/Alloy/builtins/moment/lang/bs.js +14 -4
  11. package/Alloy/builtins/moment/lang/ca.js +6 -6
  12. package/Alloy/builtins/moment/lang/cs.js +5 -4
  13. package/Alloy/builtins/moment/lang/cv.js +2 -2
  14. package/Alloy/builtins/moment/lang/en-au.js +6 -6
  15. package/Alloy/builtins/moment/lang/en-ca.js +6 -6
  16. package/Alloy/builtins/moment/lang/en-gb.js +6 -6
  17. package/Alloy/builtins/moment/lang/en-ie.js +6 -6
  18. package/Alloy/builtins/moment/lang/en-il.js +6 -6
  19. package/Alloy/builtins/moment/lang/en-in.js +6 -6
  20. package/Alloy/builtins/moment/lang/en-nz.js +6 -6
  21. package/Alloy/builtins/moment/lang/en-sg.js +6 -6
  22. package/Alloy/builtins/moment/lang/it.js +4 -4
  23. package/Alloy/builtins/moment/lang/ku-kmr.js +125 -0
  24. package/Alloy/builtins/moment/lang/lt.js +2 -2
  25. package/Alloy/builtins/moment/lang/me.js +2 -2
  26. package/Alloy/builtins/moment/lang/nb.js +4 -4
  27. package/Alloy/builtins/moment/lang/nl-be.js +1 -1
  28. package/Alloy/builtins/moment/lang/nl.js +1 -1
  29. package/Alloy/builtins/moment/lang/oc-lnc.js +6 -6
  30. package/Alloy/builtins/moment/lang/ru.js +2 -2
  31. package/Alloy/builtins/moment/lang/sv.js +6 -6
  32. package/Alloy/builtins/moment/lang/tet.js +6 -6
  33. package/Alloy/builtins/moment/lang/tlh.js +8 -8
  34. package/Alloy/builtins/moment/lang/tzl.js +2 -2
  35. package/Alloy/builtins/moment/lang/uk.js +4 -4
  36. package/Alloy/builtins/moment/lang/x-pseudo.js +6 -6
  37. package/Alloy/builtins/moment.js +368 -365
  38. package/Alloy/builtins/string.js +1 -4
  39. package/Alloy/commands/compile/ast/controller.js +58 -29
  40. package/Alloy/commands/compile/compilerUtils.js +3 -2
  41. package/Alloy/commands/compile/parsers/Alloy.Abstract.FixedSpace.js +2 -11
  42. package/Alloy/commands/compile/parsers/Alloy.Abstract.FlexSpace.js +2 -11
  43. package/Alloy/commands/compile/parsers/Alloy.Abstract.Option.js +2 -2
  44. package/Alloy/commands/compile/parsers/Alloy.Abstract._ItemContainer.js +9 -2
  45. package/Alloy/commands/compile/parsers/Ti.UI.ActivityIndicator.js +9 -0
  46. package/Alloy/commands/compile/parsers/Ti.UI.AttributedString.js +0 -5
  47. package/Alloy/commands/compile/parsers/Ti.UI.Button.js +2 -11
  48. package/Alloy/commands/compile/parsers/Ti.UI.Column.js +9 -0
  49. package/Alloy/commands/compile/parsers/Ti.UI.MaskedImage.js +9 -0
  50. package/Alloy/commands/compile/parsers/Ti.UI.NavigationWindow.js +0 -15
  51. package/Alloy/commands/compile/parsers/Ti.UI.Notification.js +9 -0
  52. package/Alloy/commands/compile/parsers/Ti.UI.OptionBar.js +0 -5
  53. package/Alloy/commands/compile/parsers/Ti.UI.ProgressBar.js +9 -0
  54. package/Alloy/commands/compile/parsers/Ti.UI.RefreshControl.js +9 -0
  55. package/Alloy/commands/compile/parsers/Ti.UI.Row.js +9 -0
  56. package/Alloy/commands/compile/parsers/Ti.UI.SearchBar.js +9 -0
  57. package/Alloy/commands/compile/parsers/Ti.UI.Shortcut.js +9 -0
  58. package/Alloy/commands/compile/parsers/Ti.UI.ShortcutItem.js +9 -0
  59. package/Alloy/commands/compile/parsers/Ti.UI.TabbedBar.js +0 -9
  60. package/Alloy/commands/compile/parsers/Ti.UI.Toolbar.js +0 -6
  61. package/Alloy/commands/new/index.js +1 -1
  62. package/Alloy/common/constants.js +3 -12
  63. package/Alloy/lib/alloy/backbone/1.6.0/backbone.js +2155 -0
  64. package/Alloy/lib/alloy/sync/localStorage.js +0 -8
  65. package/Alloy/lib/alloy/sync/sql.js +2 -2
  66. package/Alloy/plugin/plugin.py +1 -123
  67. package/Alloy/template/lib/alloy.js +0 -7
  68. package/Alloy/tiapp.js +1 -11
  69. package/README.md +16 -0
  70. package/package.json +6 -25
  71. package/platforms/windows/index.js +0 -4
  72. package/samples/apps/advanced/complex_styling/config.json +1 -4
  73. package/samples/apps/advanced/custom_tss_queries/styles/index.tss +0 -6
  74. package/samples/apps/advanced/device_query/specs/index.js +1 -12
  75. package/samples/apps/advanced/device_query/styles/index.tss +0 -12
  76. package/samples/apps/advanced/form_factor/views/index.xml +1 -7
  77. package/samples/apps/advanced/inheritance/controllers/index.js +4 -8
  78. package/samples/apps/advanced/inheritance/specs/baseDialog.js +2 -2
  79. package/samples/apps/advanced/master_detail/specs/row.js +3 -3
  80. package/samples/apps/advanced/proxy_property_requires/widgets/com.foo.widget/views/section.xml +3 -3
  81. package/samples/apps/advanced/proxy_property_requires/widgets/com.foo.widget/widget.json +2 -2
  82. package/samples/apps/advanced/require_children/widgets/alloy.container/widget.json +2 -2
  83. package/samples/apps/advanced/themes/specs/dialog.js +1 -18
  84. package/samples/apps/advanced/themes/specs/index.js +1 -45
  85. package/samples/apps/advanced/theming_widgets/widgets/starrating/widget.json +2 -2
  86. package/samples/apps/basics/builtins/specs/index.js +2 -2
  87. package/samples/apps/basics/config_json/config.json +1 -4
  88. package/samples/apps/basics/global_style/specs/item.js +2 -2
  89. package/samples/apps/basics/simple/specs/index.js +2 -2
  90. package/samples/apps/models/binding_tableview/controllers/tab_1.js +2 -2
  91. package/samples/apps/models/binding_tableview/controllers/tab_2.js +2 -2
  92. package/samples/apps/models/binding_tableview/controllers/tab_3.js +2 -2
  93. package/samples/apps/models/binding_tableview/controllers/tab_4.js +2 -2
  94. package/samples/apps/ui/buttonbar/views/index.xml +1 -1
  95. package/samples/apps/ui/switch/views/index.xml +2 -2
  96. package/samples/apps/widgets/basic/widgets/com.foo.widget/widget.json +2 -2
  97. package/samples/apps/widgets/complex/widgets/com.appcelerator.loading/widget.json +1 -1
  98. package/samples/apps/widgets/complex/widgets/com.testing.searchForBooks/widget.json +1 -1
  99. package/samples/apps/widgets/models/widgets/alloy.datatable/widget.json +1 -1
  100. package/samples/apps/widgets/wpath/widgets/com.test.hellobutton/widget.json +1 -1
  101. package/test/projects/HarnessTemplate/tiapp.xml +1 -0
  102. package/test/specs/new.js +0 -2
  103. package/test/specs/optimizer.js +0 -2
  104. 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
+ })));
@@ -35,8 +35,8 @@
35
35
  return withoutSuffix
36
36
  ? forms(key)[0]
37
37
  : isFuture
38
- ? forms(key)[1]
39
- : forms(key)[2];
38
+ ? forms(key)[1]
39
+ : forms(key)[2];
40
40
  }
41
41
  function special(number) {
42
42
  return number % 10 === 0 || (number > 10 && number < 20);
@@ -27,8 +27,8 @@
27
27
  return number === 1
28
28
  ? wordKey[0]
29
29
  : number >= 2 && number <= 4
30
- ? wordKey[1]
31
- : wordKey[2];
30
+ ? wordKey[1]
31
+ : wordKey[2];
32
32
  },
33
33
  translate: function (number, withoutSuffix, key) {
34
34
  var wordKey = translator.words[key];
@@ -47,13 +47,13 @@
47
47
  ss: '%d sekunder',
48
48
  m: 'ett minutt',
49
49
  mm: '%d minutter',
50
- h: 'en time',
50
+ h: 'én time',
51
51
  hh: '%d timer',
52
- d: 'en dag',
52
+ d: 'én dag',
53
53
  dd: '%d dager',
54
- w: 'en uke',
54
+ w: 'én uke',
55
55
  ww: '%d uker',
56
- M: 'en måned',
56
+ M: 'én måned',
57
57
  MM: '%d måneder',
58
58
  y: 'ett år',
59
59
  yy: '%d år',
@@ -19,7 +19,7 @@
19
19
  monthsParse = [
20
20
  /^jan/i,
21
21
  /^feb/i,
22
- /^maart|mrt.?$/i,
22
+ /^(maart|mrt\.?)$/i,
23
23
  /^apr/i,
24
24
  /^mei$/i,
25
25
  /^jun[i.]?$/i,
@@ -19,7 +19,7 @@
19
19
  monthsParse = [
20
20
  /^jan/i,
21
21
  /^feb/i,
22
- /^maart|mrt.?$/i,
22
+ /^(maart|mrt\.?)$/i,
23
23
  /^apr/i,
24
24
  /^mei$/i,
25
25
  /^jun[i.]?$/i,
@@ -74,12 +74,12 @@
74
74
  number === 1
75
75
  ? 'r'
76
76
  : number === 2
77
- ? 'n'
78
- : number === 3
79
- ? 'r'
80
- : number === 4
81
- ? 't'
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
- ? forms[1]
22
- : forms[2];
21
+ ? forms[1]
22
+ : forms[2];
23
23
  }
24
24
  function relativeTimeWithPlural(number, withoutSuffix, key) {
25
25
  var format = {
@@ -60,12 +60,12 @@
60
60
  ~~((number % 100) / 10) === 1
61
61
  ? ':e'
62
62
  : b === 1
63
- ? ':a'
64
- : b === 2
65
- ? ':a'
66
- : b === 3
67
- ? ':e'
68
- : ':e';
63
+ ? ':a'
64
+ : b === 2
65
+ ? ':a'
66
+ : b === 3
67
+ ? ':e'
68
+ : ':e';
69
69
  return number + output;
70
70
  },
71
71
  week: {
@@ -60,12 +60,12 @@
60
60
  ~~((number % 100) / 10) === 1
61
61
  ? 'th'
62
62
  : b === 1
63
- ? 'st'
64
- : b === 2
65
- ? 'nd'
66
- : b === 3
67
- ? 'rd'
68
- : 'th';
63
+ ? 'st'
64
+ : b === 2
65
+ ? 'nd'
66
+ : b === 3
67
+ ? 'rd'
68
+ : 'th';
69
69
  return number + output;
70
70
  },
71
71
  week: {
@@ -19,10 +19,10 @@
19
19
  output.indexOf('jaj') !== -1
20
20
  ? time.slice(0, -3) + 'leS'
21
21
  : output.indexOf('jar') !== -1
22
- ? time.slice(0, -3) + 'waQ'
23
- : output.indexOf('DIS') !== -1
24
- ? time.slice(0, -3) + 'nem'
25
- : time + ' pIq';
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
- ? time.slice(0, -3) + 'wen'
36
- : output.indexOf('DIS') !== -1
37
- ? time.slice(0, -3) + 'ben'
38
- : time + ' ret';
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
 
@@ -91,8 +91,8 @@
91
91
  return isFuture
92
92
  ? format[key][0]
93
93
  : withoutSuffix
94
- ? format[key][0]
95
- : format[key][1];
94
+ ? format[key][0]
95
+ : format[key][1];
96
96
  }
97
97
 
98
98
  return tzl;
@@ -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
- ? forms[1]
21
- : forms[2];
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
- ? 'genitive'
70
- : 'nominative';
69
+ ? 'genitive'
70
+ : 'nominative';
71
71
  return weekdays[nounCase][m.day()];
72
72
  }
73
73
  function processHoursFunction(str) {
@@ -65,12 +65,12 @@
65
65
  ~~((number % 100) / 10) === 1
66
66
  ? 'th'
67
67
  : b === 1
68
- ? 'st'
69
- : b === 2
70
- ? 'nd'
71
- : b === 3
72
- ? 'rd'
73
- : 'th';
68
+ ? 'st'
69
+ : b === 2
70
+ ? 'nd'
71
+ : b === 3
72
+ ? 'rd'
73
+ : 'th';
74
74
  return number + output;
75
75
  },
76
76
  week: {