You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/javascript/api.md
+35-33Lines changed: 35 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -62,39 +62,41 @@ And `configuration` is an object that allows these properties:
62
62
63
63
`targets` is a key/value object that holds the available targets that can be customized on LumApps. This variable allows developers to avoid figuring out which ids to use in order to customize a specific target, and it also defines the available targets that can be customized. As of now, these are the values for this object:
|`targets.APP`| Target id for application |[Documentation](./capabilities#application)|
68
-
|`targets.BOOKMARKS`| Target id for the bookmarks/app launcher component |[Documentation](./capabilities#bookmarks)|
69
-
|`targets.COMMUNITY`| Target id for the community pages |[Documentation](./capabilities#community)|
70
-
|`targets.CONTENT`| Target id for the content page |[Documentation](./capabilities#content)|
71
-
|`targets.CONTEXTUAL_ACTIONS`| Target id for the contextual actions menu on the right hand side of a content page. |[Documentation](./capabilities#contextual-actions)|
72
-
|`targets.CONTRIBUTION_MENU`| Target id for the contribution menu. |[Documentation](./capabilities#contribution-menu)|
73
-
|`targets.CONTRIBUTION_BUTTON`| Target id for the contribution button. |[Documentation](./capabilities#contribution-button)|
74
-
|`targets.ERROR_PAGE`| Target id for the error pages. |[Documentation](./capabilities#error-page)|
75
-
|`targets.FAVORITES`| Target id for the favorite directories. |[Documentation](./capabilities#favorites)|
76
-
|`targets.DIRECTORY`| Target id for the directory. |[Documentation](./capabilities#directory)|
77
-
|`targets.HEADER`| Target id for the site's header. |[Documentation](./capabilities#header)|
78
-
|`targets.LOGO`| Target id for the site's logo. |[Documentation](./capabilities#logo)|
79
-
|`targets.NAVIGATION`| Target id for the main navigation. |[Documentation](./capabilities#navigation)|
80
-
|`targets.NAVIGATION_UI`| Target id for the main navigation's UI. |[Documentation](./capabilities#navigation)|
81
-
|`targets.NOT_FOUND_PAGE`| Target id for the not found error page (error code 404). |[Documentation](./capabilities#not-found-page)|
82
-
|`targets.NOTIFICATIONS_BUTTON`| Target id for the notifications center component. |[Documentation](./capabilities#header)|
83
-
|`targets.PAGE`| Target id for all pages. |[Documentation](./capabilities#page)|
84
-
|`targets.PROFILE`| Target id for the profile page. |[Documentation](./capabilities#profile)|
85
-
|`targets.SEARCH`| Target id for the search page. |[Documentation](./capabilities#search)|
86
-
|`targets.SEARCH_BOX`| Target id for the search box. |[Documentation](./capabilities#search-box)|
87
-
|`targets.SEARCH_CUSTOM_METADATA`| Target id for search custom metadata. |[Documentation](./capabilities#search-custom-metadata)|
88
-
|`targets.SEARCH_RESULT_ICON`| Target id for icons of the search result page and quick search. |[Documentation](./capabilities#search-result-icon)|
89
-
|`targets.SEARCH_TAB`| Target id for search tab. |[Documentation](./capabilities#search-tab)|
90
-
|`targets.SETTINGS`| Target id for the settings menu. |[Documentation](./capabilities#settings)|
91
-
|`targets.SETTINGS_BUTTON`| Target id for the settings icon on the top bar. |[Documentation](./capabilities#settings-button)|
92
-
|`targets.STICKY_HEADER`| Target id for the sticky header. |[Documentation](./capabilities#sticky-header)|
93
-
|`targets.SUB_NAVIGATION`| Target id for the sub navigation. |[Documentation](./capabilities#sub-navigation)|
94
-
|`targets.SUB_NAVIGATION_UI`| Target id for the sub navigation's UI. |[Documentation](./capabilities#sub-navigation-ui)|
95
-
|`targets.WIDGET`| Target id for a widget. |[Documentation](./capabilities#widget)|
96
-
|`targets.USER_DIRECTORY`| Target id for the user directory. |[Documentation](./capabilities#user-directory)|
97
-
|`targets.USER_PROFILE_ORG_CHART`| Target id for the user profile orgnaization chart |[Documentation](./capabilities#organization-chart)|
|`targets.APP`| Target id for application |[Documentation](./capabilities#application)|
68
+
|`targets.BOOKMARKS`| Target id for the bookmarks/app launcher component |[Documentation](./capabilities#bookmarks)|
69
+
|`targets.COMMUNITY`| Target id for the community pages |[Documentation](./capabilities#community)|
70
+
|`targets.CONTENT`| Target id for the content page |[Documentation](./capabilities#content)|
71
+
|`targets.CONTEXTUAL_ACTIONS`| Target id for the contextual actions menu on the right hand side of a content page. |[Documentation](./capabilities#contextual-actions)|
72
+
|`targets.CONTRIBUTION_MENU`| Target id for the contribution menu. |[Documentation](./capabilities#contribution-menu)|
73
+
|`targets.CONTRIBUTION_BUTTON`| Target id for the contribution button. |[Documentation](./capabilities#contribution-button)|
74
+
|`targets.ERROR_PAGE`| Target id for the error pages. |[Documentation](./capabilities#error-page)|
75
+
|`targets.FAVORITES`| Target id for the favorite directories. |[Documentation](./capabilities#favorites)|
76
+
|`targets.DIRECTORY`| Target id for the directory. |[Documentation](./capabilities#directory)|
77
+
|`targets.HEADER`| Target id for the site's header. |[Documentation](./capabilities#header)|
78
+
|`targets.LOGO`| Target id for the site's logo. |[Documentation](./capabilities#logo)|
79
+
|`targets.NAVIGATION`| Target id for the main navigation. |[Documentation](./capabilities#navigation)|
80
+
|`targets.NAVIGATION_UI`| Target id for the main navigation's UI. |[Documentation](./capabilities#navigation)|
81
+
|`targets.NOT_FOUND_PAGE`| Target id for the not found error page (error code 404). |[Documentation](./capabilities#not-found-page)|
82
+
|`targets.NOTIFICATIONS_BUTTON`| Target id for the notifications center component. |[Documentation](./capabilities#header)|
83
+
|`targets.PAGE`| Target id for all pages. |[Documentation](./capabilities#page)|
84
+
|`targets.PROFILE`| Target id for the profile page. |[Documentation](./capabilities#profile)|
85
+
|`targets.SEARCH`| Target id for the search page. |[Documentation](./capabilities#search)|
86
+
|`targets.SEARCH_BOX`| Target id for the search box. |[Documentation](./capabilities#search-box)|
87
+
|`targets.SEARCH_CUSTOM_METADATA`| Target id for search custom metadata. |[Documentation](./capabilities#search-custom-metadata)|
88
+
|`targets.SEARCH_RESULT_ICON`| Target id for icons of the search result page and quick search. |[Documentation](./capabilities#search-result-icon)|
89
+
|`targets.SEARCH_TAB`| Target id for search tab. |[Documentation](./capabilities#search-tab)|
90
+
|`targets.SETTINGS`| Target id for the settings menu. |[Documentation](./capabilities#settings)|
91
+
|`targets.SETTINGS_BUTTON`| Target id for the settings icon on the top bar. |[Documentation](./capabilities#settings-button)|
92
+
|`targets.STICKY_HEADER`| Target id for the sticky header. |[Documentation](./capabilities#sticky-header)|
93
+
|`targets.SUB_NAVIGATION`| Target id for the sub navigation. |[Documentation](./capabilities#sub-navigation)|
94
+
|`targets.SUB_NAVIGATION_UI`| Target id for the sub navigation's UI. |[Documentation](./capabilities#sub-navigation-ui)|
95
+
|`targets.WIDGET`| Target id for a widget. |[Documentation](./capabilities#widget)|
96
+
|`targets.USER_DIRECTORY`| Target id for the user directory. |[Documentation](./capabilities#user-directory)|
97
+
|`targets.USER_PROFILE_ORG_CHART`| Target id for the user profile organization chart |[Documentation](./capabilities#organization-chart)|
98
+
|`targets.USER_CARD_FIELDS`| Target id for the user card displayed on hovering users |[Documentation](./capabilities#user-card-fields)|
99
+
|`targets.USER_PROFILE_HEADER_FIELDS`| Target id for the user profile header fields |[Documentation](./capabilities#user-profile-header-fields)|
constonlineUsers= {}; // information retrieved from an external service.
828
+
829
+
render({
830
+
placement:placement.LEFT,
831
+
target:targets.USER_PROFILE_HEADER_FIELDS,
832
+
toRenderWithContext: (context) => {
833
+
if (onlineUsers[context.user.uid]) {
834
+
returnText({
835
+
color:'green',
836
+
children:'Online',
837
+
});
838
+
}
839
+
840
+
returnText({
841
+
color:'red',
842
+
children:'Offline',
843
+
});
844
+
},
845
+
});
846
+
});
847
+
```
848
+
849
+

850
+
818
851
## Display an icon next to each search tab
819
852
820
853
One way to make search tab easier to differenciate is to add an icon next to each tabs. By using search tab id, it is possible to add an icon on the left side of the tab label. Tab id can be retrieved from the search call response within the `tabs` array.
0 commit comments