You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@royale.apache.org by ah...@apache.org on 2018/01/18 17:06:10 UTC
[royale-asjs] 02/03: remove AngularExample until someone makes it
compile and run
This is an automated email from the ASF dual-hosted git repository.
aharui pushed a commit to branch release/0.9.0
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
commit 97dd1edcb4e74718e04c121dcce565526c721f69
Author: Alex Harui <ah...@apache.org>
AuthorDate: Thu Jan 18 08:56:25 2018 -0800
remove AngularExample until someone makes it compile and run
---
.../AngularExample/AngularExample-debug.html | 46 ------------
.../AngularExample/AngularExample-release.html | 47 ------------
examples/native/AngularExample/pom.xml | 55 --------------
.../src/main/royale/AngularExample.as | 84 ----------------------
.../AngularExample/src/main/royale/MyController.as | 70 ------------------
.../src/main/royale/components/IWebComponent.as | 27 -------
.../src/main/royale/components/WebComponent.as | 38 ----------
.../main/royale/components/mdbutton/MDButton.as | 61 ----------------
.../royale/components/mdbutton/MDButtonFactory.as | 56 ---------------
examples/native/pom.xml | 14 +---
10 files changed, 1 insertion(+), 497 deletions(-)
diff --git a/examples/native/AngularExample/AngularExample-debug.html b/examples/native/AngularExample/AngularExample-debug.html
deleted file mode 100644
index 361a557..0000000
--- a/examples/native/AngularExample/AngularExample-debug.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!doctype html>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-<html>
- <head>
- <meta charset="utf-8"/>
- <title>AngularExample Debug Build</title>
-
- <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
-
- <script src="bin/js-debug/library/closure/goog/base.js"></script>
- <script src="bin/js-debug/AngularExample-dependencies.js"></script>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
-
- <!-- Angular Material requires Angular.js Libraries -->
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
-
- <!-- Angular Material Library -->
- <script src="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
- </head>
- <body>
- <script>
- new AngularExample();
- </script>
- </body>
-</html>
diff --git a/examples/native/AngularExample/AngularExample-release.html b/examples/native/AngularExample/AngularExample-release.html
deleted file mode 100644
index f90c937..0000000
--- a/examples/native/AngularExample/AngularExample-release.html
+++ /dev/null
@@ -1,47 +0,0 @@
-<!doctype html>
-<!--
-
-Licensed to the Apache Software Foundation (ASF) under one or more
-contributor license agreements. See the NOTICE file distributed with
-this work for additional information regarding copyright ownership.
-The ASF licenses this file to You under the Apache License, Version 2.0
-(the "License"); you may not use this file except in compliance with
-the License. You may obtain a copy of the License at
-
-http://www.apache.org/licenses/LICENSE-2.0
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
--->
-<html>
- <head>
- <meta charset="utf-8"/>
- <title>AngularExample Release Build</title>
- <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.css">
- <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
-
- <script src="bin/js-debug/library/closure/goog/base.js"></script>
- <script src="bin/js-debug/AngularExample-dependencies.js"></script>
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
-
- <!-- Angular Material requires Angular.js Libraries -->
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-animate.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-aria.min.js"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.4.8/angular-messages.min.js"></script>
-
- <!-- Angular Material Library -->
- <script src="http://ajax.googleapis.com/ajax/libs/angular_material/1.0.0/angular-material.min.js"></script>
-
- <script src="bin/js-release/AngularExample.js"></script>
- </head>
- <body>
- <script>
- new AngularExample();
- </script>
- </body>
-</html>
diff --git a/examples/native/AngularExample/pom.xml b/examples/native/AngularExample/pom.xml
deleted file mode 100644
index b9fbc6b..0000000
--- a/examples/native/AngularExample/pom.xml
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
- Licensed to the Apache Software Foundation (ASF) under one or more
- contributor license agreements. See the NOTICE file distributed with
- this work for additional information regarding copyright ownership.
- The ASF licenses this file to You under the Apache License, Version 2.0
- (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.apache.royale.examples</groupId>
- <artifactId>examples-native</artifactId>
- <version>0.9.0-SNAPSHOT</version>
- </parent>
-
- <artifactId>AngularExample</artifactId>
- <version>0.9.0-SNAPSHOT</version>
- <packaging>swf</packaging>
-
- <name>Apache Royale: Examples: Native: AngularExample</name>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.royale.compiler</groupId>
- <artifactId>royale-maven-plugin</artifactId>
- <version>${royale.compiler.version}</version>
- <extensions>true</extensions>
- <configuration>
- <mainClass>AngularExample.as</mainClass>
- <targets>JS</targets>
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- </dependencies>
-
-</project>
diff --git a/examples/native/AngularExample/src/main/royale/AngularExample.as b/examples/native/AngularExample/src/main/royale/AngularExample.as
deleted file mode 100644
index 754c9f2..0000000
--- a/examples/native/AngularExample/src/main/royale/AngularExample.as
+++ /dev/null
@@ -1,84 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
- import angular.IModule;
-
- import components.mdbutton.MDButton;
- import components.mdbutton.MDButtonFactory;
- /**
- * @author omuppirala
- */
- public class AngularExample {
-
- private var app:IModule;
-
- public function AngularExample() {
- //set up angular app
- app = angular.module("app",["ngMaterial"]);
- app.controller("MyController", ["$scope", "$mdDialog", MyController]);
- document.body.setAttribute("ng-app", "app");
-
- //App container
- var container:HTMLDivElement = document.createElement('div') as HTMLDivElement;
- container.style.width = '100%';
- container.style.height = '100%';
- container.setAttribute("layout", "row");
- container.setAttribute("layout-align", "center center");
- document.body.appendChild(container);
-
- //App
- var div:HTMLDivElement = document.createElement('div') as HTMLDivElement;
- div.id = 'div';
- div.style.width = '50%';
- div.style.height = '50%';
- div.setAttribute("layout", "column");
- div.setAttribute("layout-align", "center center");
-
- div.setAttribute("ng-controller", "MyController");
- div.setAttribute("md-whiteframe", "18");
- div.setAttribute("class", "md-whiteframe-14dp");
- container.appendChild(div);
-
- //App children
- div.innerHTML = '<h1>Royale + Angular + Angular Material Demo</h1>';
- div.innerHTML += '<span flex />';
- div.innerHTML += '<md-button id="myBtn" class="md-primary md-raised" ng-click="handleBtnClick()">{{btnLabelStr}}</md-button>';
-// div.innerHTML += '<md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker>';
-// div.innerHTML += '<md-progress-circular md-mode="indeterminate"></md-progress-circular>';
- div.innerHTML += '<md-input-container class="md-block" flex-gt-sm><label>Change button label...</label><input ng-model="btnLabelStr"></md-input-container>';
- div.innerHTML += '<span flex />';
-
-// var labelButtonClass:Object = MDButtonFactory.getInstance().getButtonClass();
-// var labelButton:MDButton = new labelButtonClass();
-// labelButton.setAttribute("class", "md-primary md-raised");
-// div.appendChild(labelButton);
-// labelButton.setLabel("Label Button");
-
-// var cakeButtonClass:Object = MDButtonFactory.getInstance().getButtonClass();
-// var cakeButton:MDButton = new cakeButtonClass();
-// cakeButton.setAttribute("class", "md-fab");
-// //cakeButton.setAttribute("md-no-ink", "");
-// div.appendChild(cakeButton);
-// cakeButton.setIcon("cake");
-// cakeButton.clickHandler("handleBtnClick");
-
- }
-
- }
-}
diff --git a/examples/native/AngularExample/src/main/royale/MyController.as b/examples/native/AngularExample/src/main/royale/MyController.as
deleted file mode 100644
index 14978ef..0000000
--- a/examples/native/AngularExample/src/main/royale/MyController.as
+++ /dev/null
@@ -1,70 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package {
- import angular.material.MDAlertDialog;
- import angular.material.MDDialogService;
- import angular.IScope;
- /**
- * @author omuppirala
- */
-
- public class MyController {
-
- private var $scope:IScope;
- private var $mdDialog:MDDialogService;
-
- public function MyController(scope:IScope,mdDialog:MDDialogService) {
- this.$scope = scope;
- this.$mdDialog = mdDialog;
- this.$scope["handleBtnClick"] = this.handleBtnClick;
- this.$scope["close"] = this.close;
- this.$scope["myDate"] = new Date();
- this.$scope["btnLabelStr"] = "Click me";
-
- //setupWatchForDate();
- }
-
- private function setupWatchForDate() : void {
- $scope.$watch('myDate', this.handleDateChange,true);
- }
-
- private function handleDateChange() : void {
- alert('Date selected: ' + $scope["myDate"].toString());
- }
-
- public function handleBtnClick(event:Event):void
- {
- $mdDialog.show(
- {
- scope: $scope,
- preserveScope: true,
- //template: '<div style="margin:25px;"><img src="http://flex.apache.org/images/logo_01_fullcolor-sm.png" alt=""/><h1 md-heading">Angular Material</h1><img src="https://material.angularjs.org/latest/img/icons/angular-logo.svg" alt=""/><div layout="row"><span flex/><md-button ng-click=close()>CLOSE</md-button></div></div>',
- template: '<div layout="column" layout-align="left center" style="width:500px; height:500px; margin:25px;"><h3>Select a date: </h3><md-datepicker ng-model="myDate" md-placeholder="Enter date"></md-datepicker><br>Selected date: {{myDate}}<span flex/><div layout="row"><span flex/><md-button ng-click=close()>CLOSE</md-button></div></div>',
- clickOutsideToClose: true,
- openFrom: angular.element(document.querySelector('#myBtn')),
- closeTo: angular.element(document.querySelector('#myBtn'))
- });
- }
-
- private function close():void
- {
- $mdDialog.cancel();
- }
- }
-}
diff --git a/examples/native/AngularExample/src/main/royale/components/IWebComponent.as b/examples/native/AngularExample/src/main/royale/components/IWebComponent.as
deleted file mode 100644
index ca0e8ca..0000000
--- a/examples/native/AngularExample/src/main/royale/components/IWebComponent.as
+++ /dev/null
@@ -1,27 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components {
- /**
- * @author omuppirala
- */
- public interface IWebComponent {
-
- function setupComponent():void;
- }
-}
diff --git a/examples/native/AngularExample/src/main/royale/components/WebComponent.as b/examples/native/AngularExample/src/main/royale/components/WebComponent.as
deleted file mode 100644
index 3637fd2..0000000
--- a/examples/native/AngularExample/src/main/royale/components/WebComponent.as
+++ /dev/null
@@ -1,38 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components {
- import components.IWebComponent;
-
- /**
- * @author omuppirala
- */
- public class WebComponent extends HTMLElement implements IWebComponent {
-
- protected var sr : ShadowRoot;
-
- public function createdCallback() : void {
- sr = this['createShadowRoot']();
- setupComponent();
- }
-
- public function setupComponent() : void {
- //override in subclass
- }
- }
-}
diff --git a/examples/native/AngularExample/src/main/royale/components/mdbutton/MDButton.as b/examples/native/AngularExample/src/main/royale/components/mdbutton/MDButton.as
deleted file mode 100644
index 05f9377..0000000
--- a/examples/native/AngularExample/src/main/royale/components/mdbutton/MDButton.as
+++ /dev/null
@@ -1,61 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components.mdbutton {
- import components.WebComponent;
- /**
- * @author omuppirala
- */
- public class MDButton extends WebComponent
- {
-
- protected var label:Text;
- protected var iconSpan:HTMLSpanElement;
- override public function setupComponent():void {
- createLabel();
- createIcon();
- }
-
- protected function createLabel():void
- {
- label = ownerDocument.createTextNode("");
- sr.appendChild(Node(label));
- }
-
- public function setLabel(labelStr:String):void {
- this.textContent = labelStr;
- }
-
- protected function createIcon():void
- {
- iconSpan = ownerDocument.createElement("span") as HTMLSpanElement;
- iconSpan.setAttribute("class","material-icons");
- this.appendChild(iconSpan);
- }
-
- public function setIcon(iconName:String):void {
- iconSpan.textContent = iconName;
- }
-
- public function clickHandler(functionName:String):void
- {
- this.setAttribute("ng-click", functionName+"()");
- }
-
- }
-}
diff --git a/examples/native/AngularExample/src/main/royale/components/mdbutton/MDButtonFactory.as b/examples/native/AngularExample/src/main/royale/components/mdbutton/MDButtonFactory.as
deleted file mode 100644
index 39b47cb..0000000
--- a/examples/native/AngularExample/src/main/royale/components/mdbutton/MDButtonFactory.as
+++ /dev/null
@@ -1,56 +0,0 @@
-////////////////////////////////////////////////////////////////////////////////
-//
-// Licensed to the Apache Software Foundation (ASF) under one or more
-// contributor license agreements. See the NOTICE file distributed with
-// this work for additional information regarding copyright ownership.
-// The ASF licenses this file to You under the Apache License, Version 2.0
-// (the "License"); you may not use this file except in compliance with
-// the License. You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-////////////////////////////////////////////////////////////////////////////////
-package components.mdbutton {
- public class MDButtonFactory {
- private static var _instance : MDButtonFactory;
- protected var elementName : String = "md-button";
- protected var baseComponent : Object = MDButton;
- protected var componentClass : Object;
- protected var alreadyRegistered: Boolean = false;
-
- public function MDButtonFactory() {
- if (_instance) {
- throw new Error("MDButtonFactory is a singleton. Use getInstance instead.");
- }
- _instance = this;
- }
-
- public static function getInstance() : MDButtonFactory {
- if (!_instance) {
- new MDButtonFactory();
- }
- return _instance;
- }
-
- protected function registerComponent() : void {
- if(!alreadyRegistered)
- {
- var classProto:Object = Object["create"](components.mdbutton.MDButton['prototype']);
- componentClass = document["registerElement"](elementName, {'prototype':classProto});
- alreadyRegistered = true;
- }
- }
-
- public function getButtonClass():Object
- {
- registerComponent();
- return componentClass;
- }
- }
-}
diff --git a/examples/native/pom.xml b/examples/native/pom.xml
index 866b0b4..9cb7ee2 100644
--- a/examples/native/pom.xml
+++ b/examples/native/pom.xml
@@ -33,22 +33,10 @@
<name>Apache Royale: Examples: Native</name>
<modules>
- <!-- Also seems to be missing something -->
<module>ButtonExample</module>
- <!-- Also seems to be missing something -->
<module>USStatesMap</module>
</modules>
-
- <profiles>
- <profile>
- <id>brokenmodules</id>
- <modules>
- <!-- Seems to be missing a module with the angular types -->
- <module>AngularExample</module>
- </modules>
- </profile>
- </profiles>
-
+
<dependencies>
<!--
By declaring this dependency here, we force the royale-externs-js to be
--
To stop receiving notification emails like this one, please contact
"commits@royale.apache.org" <co...@royale.apache.org>.