From 45e3c0c462d7f7e6a1b7bd6d10542fcaea2f232d Mon Sep 17 00:00:00 2001 From: Patrick Yeo Date: Mon, 4 Dec 2023 11:29:27 -0800 Subject: [PATCH] LPS-201972 Add FeatureIndicator examples to js-clay-sample-web --- .../frontend-js-clay-sample-web/build.gradle | 3 ++ .../resources/META-INF/resources/init.jsp | 8 +++-- .../resources/META-INF/resources/js/App.js | 24 ++++++++++++- .../resources/META-INF/resources/view.jsp | 36 ++++++++++++++++++- 4 files changed, 67 insertions(+), 4 deletions(-) diff --git a/modules/apps/frontend-js/frontend-js-clay-sample-web/build.gradle b/modules/apps/frontend-js/frontend-js-clay-sample-web/build.gradle index 846c4441644e40..b3cf87a28d3789 100644 --- a/modules/apps/frontend-js/frontend-js-clay-sample-web/build.gradle +++ b/modules/apps/frontend-js/frontend-js-clay-sample-web/build.gradle @@ -1,8 +1,11 @@ dependencies { + compileOnly group: "com.liferay.portal", name: "com.liferay.portal.impl", version: "default" compileOnly group: "com.liferay.portal", name: "com.liferay.portal.kernel", version: "default" compileOnly group: "com.liferay.portal", name: "com.liferay.util.taglib", version: "default" compileOnly group: "javax.portlet", name: "portlet-api", version: "3.0.1" compileOnly group: "org.osgi", name: "org.osgi.service.component.annotations", version: "1.4.0" + compileOnly project(":apps:frontend-taglib:frontend-taglib") compileOnly project(":apps:frontend-taglib:frontend-taglib-react") + compileOnly project(":apps:learn:learn-api") compileOnly project(":core:petra:petra-string") } \ No newline at end of file diff --git a/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/init.jsp b/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/init.jsp index c31c9c9e95386d..30e7a3a683bab4 100644 --- a/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/init.jsp +++ b/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/init.jsp @@ -4,12 +4,16 @@ * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06 */ --%> - <%@ taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %> -<%@ taglib uri="http://liferay.com/tld/react" prefix="react" %><%@ +<%@ taglib uri="http://liferay.com/tld/frontend" prefix="liferay-frontend" %><%@ +taglib uri="http://liferay.com/tld/react" prefix="react" %><%@ taglib uri="http://liferay.com/tld/theme" prefix="liferay-theme" %> +<%@ page import="com.liferay.learn.LearnMessageUtil" %><%@ +page import="com.liferay.portal.kernel.language.LanguageUtil" %><%@ +page import="com.liferay.portal.kernel.util.HashMapBuilder" %> + \ No newline at end of file diff --git a/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/js/App.js b/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/js/App.js index d87d3f6d869955..af631c197aed59 100644 --- a/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/js/App.js +++ b/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/js/App.js @@ -6,6 +6,8 @@ import ClayAlert from '@clayui/alert'; import React from 'react'; +import {FeatureIndicator} from 'frontend-js-components-web'; + import '../css/main.scss'; export default function App() { @@ -16,7 +18,27 @@ export default function App() { whatever JS you want to App.js and redeploy. -
This is where your code goes.
+
+
Feature Indicator (JS)
+ + + + + + + + +
+ +
+ + + + + + + +
); } diff --git a/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/view.jsp b/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/view.jsp index c2a8acea57c764..54bad46ff56c05 100644 --- a/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/view.jsp +++ b/modules/apps/frontend-js/frontend-js-clay-sample-web/src/main/resources/META-INF/resources/view.jsp @@ -11,4 +11,38 @@ - \ No newline at end of file + + +
Feature Indicator (JSP)
+ +
+
+ +
+ +
+ +
+