{ "id": "171361", "key": "TIMOB-25890", "fields": { "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false }, "project": { "id": "10153", "key": "TIMOB", "name": "Titanium SDK/CLI", "projectCategory": { "id": "10100", "description": "Titanium and related SDKs used in application development", "name": "Client" } }, "fixVersions": [ { "id": "19975", "name": "Hyperloop 3.1.0", "archived": false, "released": true } ], "resolution": { "id": "1", "description": "A fix for this issue is checked into the tree and tested.", "name": "Fixed" }, "resolutiondate": "2018-03-28T18:45:41.000+0000", "created": "2018-03-21T02:04:04.000+0000", "priority": { "name": "High", "id": "2" }, "labels": [ "hyperloop" ], "versions": [ { "id": "20111", "name": "Hyperloop 3.0.3", "archived": false, "released": true, "releaseDate": "2018-03-07" } ], "issuelinks": [ { "id": "56416", "type": { "id": "10003", "name": "Relates", "inward": "relates to", "outward": "relates to" }, "outwardIssue": { "id": "171414", "key": "TIMOB-25908", "fields": { "summary": "Windows: require/import with namespace for Hyperloop", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "priority": { "name": "Medium", "id": "3" }, "issuetype": { "id": "2", "description": "A new feature of the product, which has yet to be developed.", "name": "New Feature", "subtask": false } } } } ], "assignee": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "updated": "2019-05-09T06:51:19.000+0000", "status": { "description": "The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.", "name": "Closed", "id": "6", "statusCategory": { "id": 3, "key": "done", "colorName": "green", "name": "Done" } }, "components": [ { "id": "12642", "name": "Windows", "description": "Windows authoring support" } ], "description": "ES6 {{import}} doesn't work for Hyperloop Windows because Hyperloop scans {{require}} and generates glue code _before transpile ({{import}} to {{require}}) runs_ at compile time.\r\n\r\n{code:javascript}\r\n// ES5-style require call\r\nvar Int32 = require('System.Int32');\r\n\r\n// ES6-style import\r\nimport Button from 'Windows.UI.Xaml.Controls.Button';\r\nimport PropertyValue from 'Windows.Foundation.PropertyValue';\r\nimport MessageDialog from 'Windows.UI.Popups.MessageDialog';\r\nimport UICommand from 'Windows.UI.Popups.UICommand';\r\n\r\nlet win = Ti.UI.createWindow({ backgroundColor: 'green' }),\r\n\tbutton = new Button();\r\n\r\nbutton.Content = \"PUSH\";\r\nbutton.addEventListener('Tapped', () => {\r\n const dialog = new MessageDialog('My Message');\r\n dialog.Title = 'My Title';\r\n dialog.DefaultCommandIndex = 0;\r\n dialog.Commands.Add(new UICommand('OK', null, PropertyValue.CreateInt32(0)));\r\n dialog.Commands.Add(new UICommand('Cancel', null, PropertyValue.CreateInt32(1)));\r\n dialog.ShowAsync().then(function (command) {\r\n const id = Int32.cast(command.Id);\r\n alert((id == 0) ? 'Pushed \"OK\"' : 'Pushed \"Cancel\"')\r\n });\r\n});\r\n\r\nwin.add(button);\r\nwin.open();\r\n{code}", "attachment": [], "flagged": false, "summary": "Windows: Support Hyperloop ES6", "creator": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "subtasks": [], "reporter": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "environment": null, "closedSprints": [ { "id": 1018, "state": "closed", "name": "2018 Sprint 07 SDK", "startDate": "2018-03-25T21:59:36.637Z", "endDate": "2018-04-08T21:59:00.000Z", "completeDate": "2018-04-08T17:55:14.467Z", "originBoardId": 114 } ], "comment": { "comments": [ { "id": "435788", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "FYI iOS and Android implementation: https://github.com/appcelerator/hyperloop.next/pull/270/files#diff-a84517cf68c2abfa4471206ee4d96147R242", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-03-21T08:33:39.000+0000", "updated": "2018-03-21T08:33:39.000+0000" }, { "id": "435971", "author": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "body": "https://github.com/appcelerator/hyperloop.next/pull/279", "updateAuthor": { "name": "kiguchi", "key": "kota", "displayName": "Kota Iguchi", "active": false, "timeZone": "America/Los_Angeles" }, "created": "2018-03-27T13:48:10.000+0000", "updated": "2018-03-27T13:48:10.000+0000" } ], "maxResults": 2, "total": 2, "startAt": 0 } } }