@breakside/jskit 2021.40.1 → 2021.43.0

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 (60) hide show
  1. package/Frameworks/DOM.jsframework/Info.json +2 -2
  2. package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
  3. package/Frameworks/FontKit.jsframework/Info.json +2 -2
  4. package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
  5. package/Frameworks/Foundation.jsframework/Info.json +2 -2
  6. package/Frameworks/Foundation.jsframework/JS/JSClass.js +8 -5
  7. package/Frameworks/Foundation.jsframework/JS/JSDateFormatter.js +81 -8
  8. package/Frameworks/Foundation.jsframework/JS/JSImage.js +1 -0
  9. package/Frameworks/Foundation.jsframework/JS/JSIndexPath.js +3 -0
  10. package/Frameworks/Foundation.jsframework/JS/JSLocale.js +536 -4
  11. package/Frameworks/Foundation.jsframework/JS/JSNumberFormatter.js +20 -7
  12. package/Frameworks/Foundation.jsframework/JS/JSTimeZone.js +6 -2
  13. package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
  14. package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
  15. package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
  16. package/Info.json +2 -2
  17. package/Node/io.breakside.jskit-bundle.js +2 -2
  18. package/Root/Frameworks/APIKit/Info.yaml +1 -1
  19. package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
  20. package/Root/Frameworks/AuthKit/Info.yaml +1 -1
  21. package/Root/Frameworks/CSSOM/Info.yaml +1 -1
  22. package/Root/Frameworks/ChartKit/Info.yaml +1 -1
  23. package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
  24. package/Root/Frameworks/DBKit/Info.yaml +1 -1
  25. package/Root/Frameworks/DOM/Info.yaml +1 -1
  26. package/Root/Frameworks/Dispatch/Info.yaml +1 -1
  27. package/Root/Frameworks/FontKit/Info.yaml +1 -1
  28. package/Root/Frameworks/Foundation/Info.yaml +1 -1
  29. package/Root/Frameworks/Foundation/JSClass.js +8 -5
  30. package/Root/Frameworks/Foundation/JSDateFormatter.js +81 -8
  31. package/Root/Frameworks/Foundation/JSImage.js +1 -0
  32. package/Root/Frameworks/Foundation/JSIndexPath.js +3 -0
  33. package/Root/Frameworks/Foundation/JSLocale.js +536 -4
  34. package/Root/Frameworks/Foundation/JSNumberFormatter.js +20 -7
  35. package/Root/Frameworks/Foundation/JSTimeZone.js +6 -2
  36. package/Root/Frameworks/ImageKit/Info.yaml +1 -1
  37. package/Root/Frameworks/MediaKit/Info.yaml +1 -1
  38. package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
  39. package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
  40. package/Root/Frameworks/PDFKit/Info.yaml +1 -1
  41. package/Root/Frameworks/QRKit/Info.yaml +1 -1
  42. package/Root/Frameworks/SearchKit/Info.yaml +1 -1
  43. package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
  44. package/Root/Frameworks/ServerKit/Info.yaml +1 -1
  45. package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
  46. package/Root/Frameworks/TestKit/Info.yaml +1 -1
  47. package/Root/Frameworks/UIKit/Info.yaml +1 -1
  48. package/Root/Frameworks/UIKit/UIButton.js +8 -6
  49. package/Root/Frameworks/UIKit/UIHTMLWindowServer.js +3 -4
  50. package/Root/Frameworks/UIKit/UILayer.js +17 -0
  51. package/Root/Frameworks/UIKit/UIListView.js +44 -28
  52. package/Root/Frameworks/UIKit/UINavigationBar.js +13 -14
  53. package/Root/Frameworks/UIKit/UINavigationItem.js +4 -0
  54. package/Root/Frameworks/UIKit/UIPopupButton.js +3 -0
  55. package/Root/Frameworks/UIKit/UISplitViewController.js +37 -22
  56. package/Root/Frameworks/UIKit/UIToolbar.js +1 -1
  57. package/Root/Frameworks/UIKit/UIView.js +1 -0
  58. package/Root/Frameworks/UIKit/UIWindow.js +42 -3
  59. package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
  60. package/package.json +1 -1
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.DOM",
4
- "JSBundleVersion": "2021.40.1",
4
+ "JSBundleVersion": "2021.43.0",
5
5
  "JSDevelopmentLanguage": "en",
6
6
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
7
7
  "JSBundleEnvironments": {
@@ -9,5 +9,5 @@
9
9
  "node": "DOM+Node.js"
10
10
  },
11
11
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
12
- "GitRevision": "9f5d18fecb2fd5007632481cce3f830f6abcfd9c"
12
+ "GitRevision": "0773c815878b130f1dc25e6912bd72f788582577"
13
13
  }
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
3
3
  "Info": {
4
4
  "JSBundleType": "framework",
5
5
  "JSBundleIdentifier": "io.breakside.JSKit.DOM",
6
- "JSBundleVersion": "2021.40.1",
6
+ "JSBundleVersion": "2021.43.0",
7
7
  "JSDevelopmentLanguage": "en",
8
8
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
9
9
  "JSBundleEnvironments": {
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.DOM'] = {
11
11
  "node": "DOM+Node.js"
12
12
  },
13
13
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
14
- "GitRevision": "9f5d18fecb2fd5007632481cce3f830f6abcfd9c"
14
+ "GitRevision": "0773c815878b130f1dc25e6912bd72f788582577"
15
15
  },
16
16
  "Resources": [],
17
17
  "ResourceLookup": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.FontKit",
4
- "JSBundleVersion": "2021.40.1",
4
+ "JSBundleVersion": "2021.43.0",
5
5
  "JSDevelopmentLanguage": "en",
6
6
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
7
7
  "JSBundleEnvironments": {
8
8
  "html": "FontKit+HTML.js"
9
9
  },
10
10
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
11
- "GitRevision": "9f5d18fecb2fd5007632481cce3f830f6abcfd9c"
11
+ "GitRevision": "0773c815878b130f1dc25e6912bd72f788582577"
12
12
  }
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.JSKit.FontKit'] = {
3
3
  "Info": {
4
4
  "JSBundleType": "framework",
5
5
  "JSBundleIdentifier": "io.breakside.JSKit.FontKit",
6
- "JSBundleVersion": "2021.40.1",
6
+ "JSBundleVersion": "2021.43.0",
7
7
  "JSDevelopmentLanguage": "en",
8
8
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
9
9
  "JSBundleEnvironments": {
10
10
  "html": "FontKit+HTML.js"
11
11
  },
12
12
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
13
- "GitRevision": "9f5d18fecb2fd5007632481cce3f830f6abcfd9c"
13
+ "GitRevision": "0773c815878b130f1dc25e6912bd72f788582577"
14
14
  },
15
15
  "Resources": [],
16
16
  "ResourceLookup": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "JSBundleType": "framework",
3
3
  "JSBundleIdentifier": "io.breakside.JSKit.Foundation",
4
- "JSBundleVersion": "2021.40.1",
4
+ "JSBundleVersion": "2021.43.0",
5
5
  "JSDevelopmentLanguage": "en",
6
6
  "JSCopyright": "Copyright © 2020 Breakside Inc.",
7
7
  "JSBundleEnvironments": {
@@ -9,5 +9,5 @@
9
9
  "node": "Foundation+Node.js"
10
10
  },
11
11
  "JSLicenseNotice": "Licensed under the Breakside Public License, Version 1.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nIf a copy of the License was not distributed with this file, you may\nobtain a copy at\n\n http://breakside.io/licenses/LICENSE-1.0.txt\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n",
12
- "GitRevision": "9f5d18fecb2fd5007632481cce3f830f6abcfd9c"
12
+ "GitRevision": "0773c815878b130f1dc25e6912bd72f788582577"
13
13
  }
@@ -354,11 +354,11 @@ JSReadOnlyProperty.prototype.define = function(C, publicKey, extensions){
354
354
  });
355
355
  };
356
356
 
357
- JSGlobalObject.JSLazyInitProperty = function(propertyInitMethodName, privateKey){
357
+ JSGlobalObject.JSLazyInitProperty = function(propertyInitMethod, privateKey){
358
358
  if (this === undefined){
359
- return new JSLazyInitProperty(propertyInitMethodName, privateKey);
359
+ return new JSLazyInitProperty(propertyInitMethod, privateKey);
360
360
  }else{
361
- this.propertyInitMethodName = propertyInitMethodName;
361
+ this.propertyInitMethod = propertyInitMethod;
362
362
  this.privateKey = privateKey;
363
363
  }
364
364
  };
@@ -366,7 +366,7 @@ JSGlobalObject.JSLazyInitProperty = function(propertyInitMethodName, privateKey)
366
366
  JSLazyInitProperty.prototype = Object.create(JSCustomProperty.prototype);
367
367
 
368
368
  JSLazyInitProperty.prototype.define = function(C, key, extensions){
369
- var propertyInitMethodName = this.propertyInitMethodName;
369
+ var propertyInitMethod = this.propertyInitMethod;
370
370
  var privateKey = this.privateKey;
371
371
  if (privateKey){
372
372
  Object.defineProperty(C.prototype, privateKey, {configurable: true, writable: true, value: null});
@@ -375,7 +375,10 @@ JSLazyInitProperty.prototype.define = function(C, key, extensions){
375
375
  configurable: true,
376
376
  enumerable: false,
377
377
  get: function(){
378
- var x = this[propertyInitMethodName]();
378
+ if (typeof(propertyInitMethod) != "function"){
379
+ propertyInitMethod = this[propertyInitMethod];
380
+ }
381
+ var x = propertyInitMethod.call(this);
379
382
  Object.defineProperty(this, key, {
380
383
  configurable: true,
381
384
  enumerable: false,
@@ -102,17 +102,90 @@ JSClass("JSDateFormatter", JSObject, {
102
102
  return this.calendar.timezone;
103
103
  },
104
104
 
105
- dateFormat: JSDynamicProperty('_dateFormat', null),
105
+ dateFormat: JSDynamicProperty('_dateFormat', ""),
106
106
 
107
- getDateFormat: function(){
108
- if (this._dateFormat !== null){
109
- return this._dateFormat;
110
- }
111
- // TODO: get the format for date and time styles
107
+ setDateFormat: function(dateFormat){
108
+ this._dateFormat = dateFormat;
109
+ },
110
+
111
+ setLocalizedDateFormatFromTemplate: function(template){
112
+ this._dateFormat = this._locale.dateFormatForTemplate(template) || "";
113
+ },
114
+
115
+ dateStyle: JSDynamicProperty('_dateStyle', 0),
116
+
117
+ setDateStyle: function(dateStyle){
118
+ this._dateStyle = dateStyle;
119
+ this._updateDateFormatFromStyles();
120
+ },
121
+
122
+ timeStyle: JSDynamicProperty('_timeStyle', 0),
123
+
124
+ setTimeStyle: function(timeStyle){
125
+ this._timeStyle = timeStyle;
126
+ this._updateDateFormatFromStyles();
112
127
  },
113
128
 
114
- dateStyle: JSDynamicProperty('_dateStyle', null),
115
- timeStyle: JSDynamicProperty('_timeStyle', null),
129
+ _updateDateFormatFromStyles: function(){
130
+ var datePart = "";
131
+ var timePart = "";
132
+ switch (this._dateStyle){
133
+ case JSDateFormatter.DateStyle.short:
134
+ datePart = this._locale.shortDateFormat;
135
+ break;
136
+ case JSDateFormatter.DateStyle.medium:
137
+ datePart = this._locale.mediumDateFormat;
138
+ break;
139
+ case JSDateFormatter.DateStyle.long:
140
+ datePart = this._locale.longDateFormat;
141
+ break;
142
+ case JSDateFormatter.DateStyle.full:
143
+ datePart = this._locale.fullDateFormat;
144
+ break;
145
+ default:
146
+ case JSDateFormatter.DateStyle.none:
147
+ break;
148
+ }
149
+ switch (this._timeStyle){
150
+ case JSDateFormatter.TimeStyle.short:
151
+ timePart = this._locale.shortTimeFormat;
152
+ break;
153
+ case JSDateFormatter.TimeStyle.medium:
154
+ timePart = this._locale.mediumTimeFormat;
155
+ break;
156
+ case JSDateFormatter.TimeStyle.long:
157
+ timePart = this._locale.longTimeFormat;
158
+ break;
159
+ case JSDateFormatter.TimeStyle.full:
160
+ timePart = this._locale.fullTimeFormat;
161
+ break;
162
+ default:
163
+ case JSDateFormatter.TimeStyle.none:
164
+ break;
165
+ }
166
+ if (datePart !== "" && timePart !== ""){
167
+ switch (this._dateStyle){
168
+ case JSDateFormatter.DateStyle.short:
169
+ this._dateFormat = this._locale.shortDateTimeFormat.replacingTemplateParameters({1: datePart, 0: timePart}, "{", "}");
170
+ break;
171
+ case JSDateFormatter.DateStyle.medium:
172
+ this._dateFormat = this._locale.mediumDateTimeFormat.replacingTemplateParameters({1: datePart, 0: timePart}, "{", "}");
173
+ break;
174
+ case JSDateFormatter.DateStyle.long:
175
+ this._dateFormat = this._locale.longDateTimeFormat.replacingTemplateParameters({1: datePart, 0: timePart}, "{", "}");
176
+ break;
177
+ default:
178
+ case JSDateFormatter.DateStyle.none:
179
+ case JSDateFormatter.DateStyle.full:
180
+ this._dateFormat = this._locale.fullDateTimeFormat.replacingTemplateParameters({1: datePart, 0: timePart}, "{", "}");
181
+ break;
182
+ }
183
+ }else if (timePart !== ""){
184
+ this._dateFormat = timePart;
185
+ }else{
186
+ this._dateFormat = datePart;
187
+ }
188
+ },
116
189
 
117
190
  stringFromDate: function(date){
118
191
  var cal = this.calendar;
@@ -279,6 +279,7 @@ JSClass("_JSDataImage", JSImage, {
279
279
  var image = _JSDataImage.init();
280
280
  _JSDataImage.$super.copy.call(this, image);
281
281
  image.data = this.data;
282
+ image.contentType = this.contentType;
282
283
  return image;
283
284
  },
284
285
 
@@ -76,6 +76,9 @@ Object.defineProperties(JSIndexPath.prototype, {
76
76
 
77
77
  isEqual: {
78
78
  value: function JSIndexPath_isEqual(other){
79
+ if (other === null || other === undefined){
80
+ return false;
81
+ }
79
82
  if (this.length != other.length){
80
83
  return false;
81
84
  }