@breakside/jskit 2022.20.0 → 2022.22.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.
- package/Frameworks/DOM.jsframework/Info.json +2 -2
- package/Frameworks/DOM.jsframework/io.breakside.JSKit.DOM-bundle.js +2 -2
- package/Frameworks/FontKit.jsframework/Info.json +2 -2
- package/Frameworks/FontKit.jsframework/io.breakside.JSKit.FontKit-bundle.js +2 -2
- package/Frameworks/Foundation.jsframework/Info.json +2 -2
- package/Frameworks/Foundation.jsframework/JS/JSSynchronizer.js +1 -0
- package/Frameworks/Foundation.jsframework/JS/JSUserDefaults.js +14 -1
- package/Frameworks/Foundation.jsframework/io.breakside.JSKit.Foundation-bundle.js +2 -2
- package/Frameworks/SecurityKit.jsframework/Info.json +2 -2
- package/Frameworks/SecurityKit.jsframework/io.breakside.JSKit.SecurityKit-bundle.js +2 -2
- package/Info.json +2 -2
- package/Node/io.breakside.jskit-bundle.js +2 -2
- package/Root/Frameworks/APIKit/Info.yaml +1 -1
- package/Root/Frameworks/APIKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/AuthKit/Info.yaml +1 -1
- package/Root/Frameworks/CSSOM/Info.yaml +1 -1
- package/Root/Frameworks/ChartKit/Info.yaml +1 -1
- package/Root/Frameworks/ConferenceKit/Info.yaml +1 -1
- package/Root/Frameworks/DBKit/Info.yaml +1 -1
- package/Root/Frameworks/DOM/Info.yaml +1 -1
- package/Root/Frameworks/Dispatch/Info.yaml +1 -1
- package/Root/Frameworks/FontKit/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/Info.yaml +1 -1
- package/Root/Frameworks/Foundation/JSSynchronizer.js +1 -0
- package/Root/Frameworks/Foundation/JSUserDefaults.js +14 -1
- package/Root/Frameworks/ImageKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKit/Info.yaml +1 -1
- package/Root/Frameworks/MediaKitUI/Info.yaml +1 -1
- package/Root/Frameworks/NotificationKit/Info.yaml +1 -1
- package/Root/Frameworks/PDFKit/Info.yaml +1 -1
- package/Root/Frameworks/QRKit/Info.yaml +1 -1
- package/Root/Frameworks/SearchKit/Info.yaml +1 -1
- package/Root/Frameworks/SecurityKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKit/Info.yaml +1 -1
- package/Root/Frameworks/ServerKitTesting/Info.yaml +1 -1
- package/Root/Frameworks/TestKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/Info.yaml +1 -1
- package/Root/Frameworks/UIKit/UICollectionReusableView.js +1 -1
- package/Root/Frameworks/UIKit/UICollectionView.js +25 -4
- package/Root/Frameworks/UIKit/UIColorPanel.js +4 -1
- package/Root/Frameworks/UIKit/UIHTMLTextField.js +3 -1
- package/Root/Frameworks/UIKit/UIMenu.js +12 -5
- package/Root/Frameworks/UIKit/UIMenuItem.js +6 -0
- package/Root/Frameworks/UIKit/UIMenuView.js +12 -1
- package/Root/Frameworks/UIKit/UIPressGestureRecognizer.js +13 -2
- package/Root/Frameworks/UIKit/UISlider.js +9 -0
- package/Root/Frameworks/UIKit/UIStackView.js +16 -0
- package/Root/Frameworks/UIKit/UITextField.js +2 -0
- package/Root/Frameworks/UIKit/UIView.js +1 -1
- package/Root/Frameworks/UIKit/UIWindow.js +11 -1
- package/Root/Frameworks/UIKit/UIWindowServer.js +3 -0
- package/Root/Frameworks/UIKitTesting/Info.yaml +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.DOM",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.22.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": "
|
|
12
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
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": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.22.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": "
|
|
14
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
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": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.22.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": "
|
|
11
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
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": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.22.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": "
|
|
13
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
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": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.22.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": "
|
|
12
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
13
13
|
}
|
|
@@ -125,11 +125,19 @@ JSClass("JSUserDefaults", JSObject, {
|
|
|
125
125
|
this._definePropertyForKey(key);
|
|
126
126
|
},
|
|
127
127
|
|
|
128
|
+
deleteValueForKey: function(key){
|
|
129
|
+
if (this._values === null){
|
|
130
|
+
throw new Error("JSUserDefaults is closed, cannot set value. Be sure to call open() first.");
|
|
131
|
+
}
|
|
132
|
+
delete this._values[key];
|
|
133
|
+
this._persistAfterDelay();
|
|
134
|
+
},
|
|
135
|
+
|
|
128
136
|
// MARK: - Register defaults
|
|
129
137
|
|
|
130
138
|
registerDefaults: function(defaults){
|
|
131
|
-
this._defaults = defaults;
|
|
132
139
|
for (var key in defaults){
|
|
140
|
+
this._defaults[key] = defaults[key];
|
|
133
141
|
this._definePropertyForKey(key);
|
|
134
142
|
}
|
|
135
143
|
},
|
|
@@ -141,12 +149,17 @@ JSClass("JSUserDefaults", JSObject, {
|
|
|
141
149
|
return this.valueForKey(key);
|
|
142
150
|
},
|
|
143
151
|
set: function JSUserDefaults_setValue(value){
|
|
152
|
+
this.willChangeValueForKey(key);
|
|
144
153
|
this.setValueForKey(value, key);
|
|
154
|
+
this.didChangeValueForKey(key);
|
|
145
155
|
}
|
|
146
156
|
});
|
|
147
157
|
}
|
|
148
158
|
},
|
|
149
159
|
|
|
160
|
+
defineObservablePropertyForKey: function(){
|
|
161
|
+
},
|
|
162
|
+
|
|
150
163
|
// MARK: - Saving to Persistent Storage
|
|
151
164
|
|
|
152
165
|
_persistScheduled: false,
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.Foundation",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.22.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.Foundation'] = {
|
|
|
11
11
|
"node": "Foundation+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": "
|
|
14
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [
|
|
17
17
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "framework",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.22.0",
|
|
5
5
|
"JSDevelopmentLanguage": "en",
|
|
6
6
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
7
7
|
"JSBundleEnvironments": {
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"node": "SecurityKit+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": "
|
|
12
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
13
13
|
}
|
|
@@ -3,7 +3,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "framework",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.JSKit.SecurityKit",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.22.0",
|
|
7
7
|
"JSDevelopmentLanguage": "en",
|
|
8
8
|
"JSCopyright": "Copyright © 2020 Breakside Inc.",
|
|
9
9
|
"JSBundleEnvironments": {
|
|
@@ -11,7 +11,7 @@ JSBundle.bundles['io.breakside.JSKit.SecurityKit'] = {
|
|
|
11
11
|
"node": "SecurityKit+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": "
|
|
14
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
15
15
|
},
|
|
16
16
|
"Resources": [],
|
|
17
17
|
"ResourceLookup": {
|
package/Info.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"JSBundleType": "node",
|
|
3
3
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
4
|
-
"JSBundleVersion": "2022.
|
|
4
|
+
"JSBundleVersion": "2022.22.0",
|
|
5
5
|
"JSExecutableName": "jskit",
|
|
6
6
|
"NPMOrganization": "breakside",
|
|
7
7
|
"JSResources": [
|
|
8
8
|
"Tests/HTMLTestRunner.js",
|
|
9
9
|
"Tests/NodeTestRunner.js"
|
|
10
10
|
],
|
|
11
|
-
"GitRevision": "
|
|
11
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
12
12
|
}
|
|
@@ -3,14 +3,14 @@ JSBundle.bundles['io.breakside.jskit'] = {
|
|
|
3
3
|
"Info": {
|
|
4
4
|
"JSBundleType": "node",
|
|
5
5
|
"JSBundleIdentifier": "io.breakside.jskit",
|
|
6
|
-
"JSBundleVersion": "2022.
|
|
6
|
+
"JSBundleVersion": "2022.22.0",
|
|
7
7
|
"JSExecutableName": "jskit",
|
|
8
8
|
"NPMOrganization": "breakside",
|
|
9
9
|
"JSResources": [
|
|
10
10
|
"Tests/HTMLTestRunner.js",
|
|
11
11
|
"Tests/NodeTestRunner.js"
|
|
12
12
|
],
|
|
13
|
-
"GitRevision": "
|
|
13
|
+
"GitRevision": "cfd5b0d255ef23810da3f2137e769efc421ad676"
|
|
14
14
|
},
|
|
15
15
|
"Resources": [
|
|
16
16
|
{
|
|
@@ -125,11 +125,19 @@ JSClass("JSUserDefaults", JSObject, {
|
|
|
125
125
|
this._definePropertyForKey(key);
|
|
126
126
|
},
|
|
127
127
|
|
|
128
|
+
deleteValueForKey: function(key){
|
|
129
|
+
if (this._values === null){
|
|
130
|
+
throw new Error("JSUserDefaults is closed, cannot set value. Be sure to call open() first.");
|
|
131
|
+
}
|
|
132
|
+
delete this._values[key];
|
|
133
|
+
this._persistAfterDelay();
|
|
134
|
+
},
|
|
135
|
+
|
|
128
136
|
// MARK: - Register defaults
|
|
129
137
|
|
|
130
138
|
registerDefaults: function(defaults){
|
|
131
|
-
this._defaults = defaults;
|
|
132
139
|
for (var key in defaults){
|
|
140
|
+
this._defaults[key] = defaults[key];
|
|
133
141
|
this._definePropertyForKey(key);
|
|
134
142
|
}
|
|
135
143
|
},
|
|
@@ -141,12 +149,17 @@ JSClass("JSUserDefaults", JSObject, {
|
|
|
141
149
|
return this.valueForKey(key);
|
|
142
150
|
},
|
|
143
151
|
set: function JSUserDefaults_setValue(value){
|
|
152
|
+
this.willChangeValueForKey(key);
|
|
144
153
|
this.setValueForKey(value, key);
|
|
154
|
+
this.didChangeValueForKey(key);
|
|
145
155
|
}
|
|
146
156
|
});
|
|
147
157
|
}
|
|
148
158
|
},
|
|
149
159
|
|
|
160
|
+
defineObservablePropertyForKey: function(){
|
|
161
|
+
},
|
|
162
|
+
|
|
150
163
|
// MARK: - Saving to Persistent Storage
|
|
151
164
|
|
|
152
165
|
_persistScheduled: false,
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
// #import "UIScrollView.js"
|
|
18
18
|
// #import "UIPlatform.js"
|
|
19
19
|
// #import "UICollectionViewLayout.js"
|
|
20
|
+
// #import "UIPressGestureRecognizer.js"
|
|
20
21
|
"use strict";
|
|
21
22
|
|
|
22
23
|
(function(){
|
|
@@ -350,11 +351,11 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
350
351
|
},
|
|
351
352
|
|
|
352
353
|
deleteCellsAtIndexPaths: function(indexPaths, animation){
|
|
354
|
+
// TODO:
|
|
355
|
+
this.reloadData();
|
|
353
356
|
if (this.selectedIndexPaths.length > 0){
|
|
354
357
|
this._setSelectedIndexPaths([], {notifyDelegate: true});
|
|
355
358
|
}
|
|
356
|
-
// TODO:
|
|
357
|
-
this.reloadData();
|
|
358
359
|
},
|
|
359
360
|
|
|
360
361
|
insertSection: function(section, animation){
|
|
@@ -373,6 +374,9 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
373
374
|
deleteSections: function(sections, animation){
|
|
374
375
|
// TODO:
|
|
375
376
|
this.reloadData();
|
|
377
|
+
if (this.selectedIndexPaths.length > 0){
|
|
378
|
+
this._setSelectedIndexPaths([], {notifyDelegate: true});
|
|
379
|
+
}
|
|
376
380
|
},
|
|
377
381
|
|
|
378
382
|
// -------------------------------------------------------------------------
|
|
@@ -823,6 +827,10 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
823
827
|
if (cell === null){
|
|
824
828
|
return;
|
|
825
829
|
}
|
|
830
|
+
this._contextSelectCell(cell, location);
|
|
831
|
+
},
|
|
832
|
+
|
|
833
|
+
_contextSelectCell: function(cell, location){
|
|
826
834
|
if (this.delegate && this.delegate.menuForCollectionViewCellAtIndexPath){
|
|
827
835
|
var contextSelectedIndexPaths;
|
|
828
836
|
if (this._selectionContainsIndexPath(cell.indexPath)){
|
|
@@ -968,7 +976,7 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
968
976
|
this._touch = null;
|
|
969
977
|
},
|
|
970
978
|
|
|
971
|
-
_makeTouchActiveCell: function(touch){
|
|
979
|
+
_makeTouchActiveCell: function(touch, waitForLongPress){
|
|
972
980
|
var location = touch.locationInView(this);
|
|
973
981
|
var cell = this._cellHitTest(location);
|
|
974
982
|
if (cell === null){
|
|
@@ -980,6 +988,19 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
980
988
|
}
|
|
981
989
|
cell.active = true;
|
|
982
990
|
this._touch.cell = cell;
|
|
991
|
+
if (waitForLongPress){
|
|
992
|
+
this._touch.timer = JSTimer.scheduledTimerWithInterval(UIPressGestureRecognizer.PressInterval.long, function(){
|
|
993
|
+
this._touch.timer = null;
|
|
994
|
+
this._longPressCell(location);
|
|
995
|
+
}, this);
|
|
996
|
+
}
|
|
997
|
+
},
|
|
998
|
+
|
|
999
|
+
_longPressCell: function(location){
|
|
1000
|
+
var cell = this._touch.cell;
|
|
1001
|
+
var indexPath = cell.indexPath;
|
|
1002
|
+
this._cancelTouchSelection();
|
|
1003
|
+
this._contextSelectCell(cell, location);
|
|
983
1004
|
},
|
|
984
1005
|
|
|
985
1006
|
touchesBegan: function(touches, event){
|
|
@@ -992,7 +1013,7 @@ JSClass("UICollectionView", UIScrollView, {
|
|
|
992
1013
|
cell: null,
|
|
993
1014
|
timer: JSTimer.scheduledTimerWithInterval(0.05, function(){
|
|
994
1015
|
this._touch.timer = null;
|
|
995
|
-
this._makeTouchActiveCell(touches[0]);
|
|
1016
|
+
this._makeTouchActiveCell(touches[0], true);
|
|
996
1017
|
}, this)
|
|
997
1018
|
};
|
|
998
1019
|
},
|
|
@@ -257,7 +257,9 @@ JSClass("UIColorPanelViewController", UIViewController, {
|
|
|
257
257
|
|
|
258
258
|
viewDidAppear: function(animated){
|
|
259
259
|
UIColorPanelViewController.$super.viewDidAppear.call(this, animated);
|
|
260
|
-
|
|
260
|
+
if (UIDevice.shared !== null && UIDevice.shared.primaryPointerType !== UIUserInterface.PointerType.touch){
|
|
261
|
+
this.view.window.firstResponder = this.hexField;
|
|
262
|
+
}
|
|
261
263
|
},
|
|
262
264
|
|
|
263
265
|
viewWillDisappear: function(animated){
|
|
@@ -656,6 +658,7 @@ JSClass("UIColorPanelViewController", UIViewController, {
|
|
|
656
658
|
componentFieldSpacing: 4,
|
|
657
659
|
|
|
658
660
|
contentSizeThatFitsSize: function(maxSize){
|
|
661
|
+
var view = this.view; // force view load
|
|
659
662
|
var size = JSSize(this.contentInsets.width + 220, this.contentInsets.height);
|
|
660
663
|
if (size.width > maxSize.width){
|
|
661
664
|
size.width = maxSize.width;
|
|
@@ -239,7 +239,7 @@ JSClass("UIHTMLTextField", UIControl, {
|
|
|
239
239
|
this.didChangeValueForBinding('text');
|
|
240
240
|
this.didChangeValueForBinding('integerValue');
|
|
241
241
|
this.postAccessibilityNotification(UIAccessibility.Notification.valueChanged);
|
|
242
|
-
this.sendActionsForEvents(UIControl.Event.
|
|
242
|
+
this.sendActionsForEvents(UIControl.Event.editingChanged);
|
|
243
243
|
if (this.delegate && this.delegate.textFieldDidChange){
|
|
244
244
|
this.delegate.textFieldDidChange(this);
|
|
245
245
|
}
|
|
@@ -904,6 +904,8 @@ UIHTMLTextField.layerClass = UIHTMLElementLayer;
|
|
|
904
904
|
|
|
905
905
|
UIHTMLTextField.sharedStyleElement = null;
|
|
906
906
|
|
|
907
|
+
UIHTMLTextField.Styler = UITextField.Styler;
|
|
908
|
+
|
|
907
909
|
var htmlInputModeByKeyboardType = {};
|
|
908
910
|
htmlInputModeByKeyboardType[UITextInput.KeyboardType.default] = "";
|
|
909
911
|
htmlInputModeByKeyboardType[UITextInput.KeyboardType.url] = "url";
|
|
@@ -747,10 +747,6 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
747
747
|
}
|
|
748
748
|
|
|
749
749
|
// Figure out how much space we have on either side of the target rect
|
|
750
|
-
// IMPORTANT: target rect is assumed to leave enough room on at least
|
|
751
|
-
// one side. In our two uses cases 1) submenus, and 2) context menus,
|
|
752
|
-
// menu must be true because 1) a menu is < 1/3 screen wide, leaving
|
|
753
|
-
// at least 1/3 on one side, and 2) context menu rects are Zero size
|
|
754
750
|
var viewFrame = view.convertRectToScreen(rect);
|
|
755
751
|
|
|
756
752
|
// If our rect if offscreen to the left or right, move it over
|
|
@@ -779,6 +775,11 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
779
775
|
origin.x = viewFrame.origin.x - size.width;
|
|
780
776
|
}
|
|
781
777
|
|
|
778
|
+
// Adjust our x position if we've overflowed
|
|
779
|
+
if (origin.x < screenMetrics.safeFrame.origin.x){
|
|
780
|
+
origin.x = screenMetrics.safeFrame.origin.x;
|
|
781
|
+
}
|
|
782
|
+
|
|
782
783
|
// Prefer the y origin at the top of our rect
|
|
783
784
|
origin.y = viewFrame.origin.y;
|
|
784
785
|
|
|
@@ -840,9 +841,15 @@ JSClass("UIMenuWindowStyler", UIMenuStyler, {
|
|
|
840
841
|
|
|
841
842
|
metricsForScreen: function(screen){
|
|
842
843
|
var safeFrame = screen.availableFrame.rectWithInsets(4, 7);
|
|
844
|
+
if (screen.traitCollection.horizontalSizeClass === UIUserInterface.SizeClass.compact){
|
|
845
|
+
return {
|
|
846
|
+
safeFrame: safeFrame,
|
|
847
|
+
maximumWidth: Math.floor(safeFrame.size.width * 0.75)
|
|
848
|
+
};
|
|
849
|
+
}
|
|
843
850
|
return {
|
|
844
851
|
safeFrame: safeFrame,
|
|
845
|
-
maximumWidth: Math.floor(safeFrame.size.width * 0.
|
|
852
|
+
maximumWidth: Math.min(450, Math.floor(safeFrame.size.width * 0.5))
|
|
846
853
|
};
|
|
847
854
|
},
|
|
848
855
|
|
|
@@ -101,6 +101,12 @@ JSClass("UIMenuItem", JSObject, {
|
|
|
101
101
|
this.target = target || null;
|
|
102
102
|
},
|
|
103
103
|
|
|
104
|
+
initWithView: function(view, action, target){
|
|
105
|
+
this.view = view;
|
|
106
|
+
this.action = action || null;
|
|
107
|
+
this.target = target || null;
|
|
108
|
+
},
|
|
109
|
+
|
|
104
110
|
initSeparator: function(){
|
|
105
111
|
this._isSeparator = true;
|
|
106
112
|
this._isEnabled = false;
|
|
@@ -646,9 +646,13 @@ JSClass("UIMenuView", UIView, {
|
|
|
646
646
|
|
|
647
647
|
addViewForItem: function(item){
|
|
648
648
|
var view = item.view;
|
|
649
|
+
var separatorInsets = this.menuWindow.itemContentInsets.insetsWithInsets(0, item.menu.showStatusColumn ? (item.menu.font.displayLineHeight + this.menuWindow.itemContentInsets.left) : 0, 0, 0);
|
|
650
|
+
if (UIDevice.shared !== null && UIDevice.shared.primaryPointerType === UIUserInterface.PointerType.touch){
|
|
651
|
+
separatorInsets = JSInsets.Zero;
|
|
652
|
+
}
|
|
649
653
|
if (view === null){
|
|
650
654
|
if (item.separator){
|
|
651
|
-
view = UIMenuItemSeparatorView.initWithColor(this.menuWindow.separatorColor, this.menuWindow.separatorLineWidth,
|
|
655
|
+
view = UIMenuItemSeparatorView.initWithColor(this.menuWindow.separatorColor, this.menuWindow.separatorLineWidth, separatorInsets);
|
|
652
656
|
view.frame = JSRect(0, 0, 1, this.menuWindow.separatorSize);
|
|
653
657
|
}else{
|
|
654
658
|
view = UIMenuItemView.init();
|
|
@@ -662,6 +666,13 @@ JSClass("UIMenuView", UIView, {
|
|
|
662
666
|
view.setItem(item);
|
|
663
667
|
}
|
|
664
668
|
}
|
|
669
|
+
if (UIDevice.shared !== null && UIDevice.shared.primaryPointerType === UIUserInterface.PointerType.touch){
|
|
670
|
+
if (!item.separator && this.itemViews.length > 0 && !(this.itemViews[this.itemViews.length - 1] instanceof UIMenuItemSeparatorView)){
|
|
671
|
+
view.borderWidth = 1;
|
|
672
|
+
}
|
|
673
|
+
view.maskedBorders = UIView.Sides.minY;
|
|
674
|
+
view.borderColor = this.menuWindow.separatorColor;
|
|
675
|
+
}
|
|
665
676
|
view.hidden = item.alternate;
|
|
666
677
|
this.addSubview(view);
|
|
667
678
|
this.itemViews.push(view);
|
|
@@ -18,14 +18,21 @@
|
|
|
18
18
|
|
|
19
19
|
JSClass("UIPressGestureRecognizer", UIGestureRecognizer, {
|
|
20
20
|
|
|
21
|
+
init: function(){
|
|
22
|
+
UIPressGestureRecognizer.$super.init.call(this);
|
|
23
|
+
this.minimumPressInterval = UIPressGestureRecognizer.PressInterval.long;
|
|
24
|
+
},
|
|
25
|
+
|
|
21
26
|
initWithSpec: function(spec){
|
|
22
27
|
UIPressGestureRecognizer.$super.initWithSpec.call(this, spec);
|
|
23
28
|
if (spec.containsKey("minimumPressInterval")){
|
|
24
29
|
this.minimumPressInterval = spec.valueForKey("minimumPressInterval");
|
|
30
|
+
}else{
|
|
31
|
+
this.minimumPressInterval = UIPressGestureRecognizer.PressInterval.long;
|
|
25
32
|
}
|
|
26
33
|
},
|
|
27
34
|
|
|
28
|
-
minimumPressInterval:
|
|
35
|
+
minimumPressInterval: 0,
|
|
29
36
|
|
|
30
37
|
// MARK: - Events
|
|
31
38
|
|
|
@@ -106,4 +113,8 @@ JSClass("UIPressGestureRecognizer", UIGestureRecognizer, {
|
|
|
106
113
|
this.end(UIGestureRecognizer.State.failed);
|
|
107
114
|
}
|
|
108
115
|
|
|
109
|
-
});
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
UIPressGestureRecognizer.PressInterval = {
|
|
119
|
+
long: 1
|
|
120
|
+
};
|
|
@@ -29,6 +29,7 @@ JSClass("UISlider", UIControl, {
|
|
|
29
29
|
minimumValue: JSDynamicProperty("_minimumValue", 0),
|
|
30
30
|
maximumValue: JSDynamicProperty("_maximumValue", 1),
|
|
31
31
|
value: JSDynamicProperty("_value", 0),
|
|
32
|
+
integerValue: JSDynamicProperty(),
|
|
32
33
|
|
|
33
34
|
setMinimumValue: function(minimumValue){
|
|
34
35
|
this._minimumValue = minimumValue;
|
|
@@ -53,6 +54,14 @@ JSClass("UISlider", UIControl, {
|
|
|
53
54
|
this.setNeedsLayout();
|
|
54
55
|
},
|
|
55
56
|
|
|
57
|
+
getIntegerValue: function(){
|
|
58
|
+
return Math.round(this._value);
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
setIntegerValue: function(value){
|
|
62
|
+
this.value = value;
|
|
63
|
+
},
|
|
64
|
+
|
|
56
65
|
minimumPoint: JSReadOnlyProperty(),
|
|
57
66
|
maximumPoint: JSReadOnlyProperty(),
|
|
58
67
|
|
|
@@ -215,6 +215,22 @@ JSClass("UIStackView", UIView, {
|
|
|
215
215
|
|
|
216
216
|
subviewsDidChange: function(){
|
|
217
217
|
this.setNeedsLayout();
|
|
218
|
+
},
|
|
219
|
+
|
|
220
|
+
getFirstBaselineOffsetFromTop: function(){
|
|
221
|
+
var top = this._contentInsets.top;
|
|
222
|
+
if (this._arrangedSubviews.length > 0){
|
|
223
|
+
top += this._arrangedSubviews[0].firstBaselineOffsetFromTop;
|
|
224
|
+
}
|
|
225
|
+
return top;
|
|
226
|
+
},
|
|
227
|
+
|
|
228
|
+
getLastBaselineOffsetFromBottom: function(){
|
|
229
|
+
var bottom = this._contentInsets.bottom;
|
|
230
|
+
if (this._arrangedSubviews.length > 0){
|
|
231
|
+
bottom += this._arrangedSubviews[this._arrangedSubviews.length - 1].lastBaselineOffsetFromBottom;
|
|
232
|
+
}
|
|
233
|
+
return bottom;
|
|
218
234
|
}
|
|
219
235
|
|
|
220
236
|
});
|
|
@@ -159,6 +159,7 @@ JSClass("UITextField", UIControl, {
|
|
|
159
159
|
}else{
|
|
160
160
|
this._textLayer.text = text;
|
|
161
161
|
}
|
|
162
|
+
this.setNeedsLayout();
|
|
162
163
|
this._updateIsEmpty(!this._textLayer.hasText());
|
|
163
164
|
},
|
|
164
165
|
|
|
@@ -172,6 +173,7 @@ JSClass("UITextField", UIControl, {
|
|
|
172
173
|
return;
|
|
173
174
|
}
|
|
174
175
|
this._textLayer.attributedText = attributedText;
|
|
176
|
+
this.setNeedsLayout();
|
|
175
177
|
this._updateIsEmpty(!this._textLayer.hasText());
|
|
176
178
|
},
|
|
177
179
|
|
|
@@ -896,7 +896,17 @@ JSClass('UIWindow', UIView, {
|
|
|
896
896
|
},
|
|
897
897
|
|
|
898
898
|
_sendTouchEvent: function(event){
|
|
899
|
-
|
|
899
|
+
var modal = this._modal;
|
|
900
|
+
while (modal !== null && modal._modal !== null){
|
|
901
|
+
modal = modal._modal;
|
|
902
|
+
}
|
|
903
|
+
if (modal !== null){
|
|
904
|
+
if (event.type == UIEvent.Type.touchesBegan){
|
|
905
|
+
if (modal._isOpen){
|
|
906
|
+
modal.makeKeyAndOrderFront();
|
|
907
|
+
modal.indicateModalStatus();
|
|
908
|
+
}
|
|
909
|
+
}
|
|
900
910
|
return;
|
|
901
911
|
}
|
|
902
912
|
var i, l;
|