Skip to content

Commit

Permalink
Merge pull request #23 from sassoftware/p-jolyna-content080Changelog
Browse files Browse the repository at this point in the history
update content docs and changelog for 0.8.0
  • Loading branch information
belefuu committed Sep 22, 2022
2 parents ceef1d9 + 299b9f7 commit 3b46084
Show file tree
Hide file tree
Showing 7 changed files with 123 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sdk/content-components/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 0.8.0 (September 22, 2022)

- Added ContentLocationsElement

## 0.7.0 (July 21, 2022)

- Added support for styling components via "class" and "style" attributes.
Expand Down
1 change: 1 addition & 0 deletions sdk/content-components/documentation/docs/api-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Analytics SDK.
- [`ContentAreaElement`](api/ContentAreaElement.md)
- [`ContentBreadcrumbElement`](api/ContentBreadcrumbElement.md)
- [`ContentGroupElement`](api/ContentGroupElement.md)
- [`ContentLocationsElement`](api/ContentLocationsElement.md)
- [`ContentTreeElement`](api/ContentTreeElement.md)

## Loading with a script element
Expand Down
1 change: 1 addition & 0 deletions sdk/content-components/documentation/website/sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"api/ContentAreaElement",
"api/ContentBreadcrumbElement",
"api/ContentGroupElement",
"api/ContentLocationsElement",
"api/ContentTreeElement",
"api/Item",
"api/ItemIdentifier",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
id: version-0.8.0-api-reference
title: API Reference
original_id: api-reference
---

The SAS Content SDK provides a set of components and APIs that enable you to render tiles representing items (such as Report and Models) stored in SAS Viya. It also enables
you to use SAS content items to drive your own processes or to interact with SAS Visual
Analytics SDK.

## Top-Level Exports

- [`ContentAreaElement`](api/ContentAreaElement.md)
- [`ContentBreadcrumbElement`](api/ContentBreadcrumbElement.md)
- [`ContentGroupElement`](api/ContentGroupElement.md)
- [`ContentLocationsElement`](api/ContentLocationsElement.md)
- [`ContentTreeElement`](api/ContentTreeElement.md)

## Loading with a script element

When you load the library with a script element, the Content SDK components are not ready to configure and use until all of the other assets are loaded. The `contentSdkComponents.loaded` event is dispatched once it is ready.

```html
<script async src="https://cdn.developer.sas.com/packages/content-components/latest/dist/umd/content-sdk-components.js"></script>
<script>
window.addEventListener('contentSdkComponents.loaded', function() {
// The SAS Content SDK is loaded and ready
});
</script>
```

## Styling Components

The SAS Content SDK components accept CSS styles by setting the "class" or "style" attributes of a component. For example:

```html
<style>
.customClass {
padding-top: 5rem;
}
</style>

<sas-content-area
url="http://my-viya-server.com"
initial-selection-index="0"
selection-mode="single"
class="customClass"
style="height: 30rem;"
></sas-content-area>
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
---
id: version-0.8.0-ContentLocationsElement
title: ContentLocationsElement
original_id: ContentLocationsElement
---

`ContentLocationsElement` is a custom HTML element that displays a customizable SAS Viya "locations" list for navigation. Locations are typically Viya folders. This element extends <a target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement">`HTMLElement`</a>.

## Custom Element Tag

```html
<sas-content-locations
url="http://my-viya-server.com"
></sas-content-locations>
```

## Attributes

### `url`

See [url](LogonWrapperProps.md#url).

### `authenticationType`

See [authenticationType](LogonWrapperProps.md#authenticationType).

## Properties

### `onSelect: (item: Item) => void`

A callback function that can be used to respond to the selection of a location in the ContentLocationsElement.

#### Arguments

`item: Item`

The selected [Item](Item.md).

### `showSeparator: boolean | (rowIndex: number) => boolean`

A boolean or function used to specify which locations should have a separator above them in the UI. When using the function version, return true for rowIndices for locations which should show a separator.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"version-0.8.0-docs": {
"Introduction": [
"version-0.8.0-getting-started"
],
"Guides": [
"version-0.8.0-guides/browse-reports"
],
"API Reference": [
"version-0.8.0-api-reference",
"version-0.8.0-api/ContentAreaElement",
"version-0.8.0-api/ContentBreadcrumbElement",
"version-0.8.0-api/ContentGroupElement",
"version-0.8.0-api/ContentLocationsElement",
"version-0.8.0-api/ContentTreeElement",
"version-0.8.0-api/Item",
"version-0.8.0-api/ItemIdentifier",
"version-0.8.0-api/LocationIdentifier",
"version-0.8.0-api/LogonWrapperProps"
],
"Resources": [
"version-0.8.0-faq"
]
}
}
1 change: 1 addition & 0 deletions sdk/content-components/documentation/website/versions.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
[
"0.8.0",
"0.7.0",
"0.6.0",
"0.5.0",
Expand Down

0 comments on commit 3b46084

Please sign in to comment.