@stratusjs/angular 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -48,22 +48,16 @@
|
|
|
48
48
|
<!--<img class="shapeholder" [src]="Stratus.BaseUrl + 'sitetheorycore/images/shapeholder-square.png'">-->
|
|
49
49
|
<!--</div>-->
|
|
50
50
|
|
|
51
|
-
<!-- This
|
|
51
|
+
<!-- This adds stratus-src lazy loading if bestImage isn't a third party service without image sizes, e.g. Video -->
|
|
52
52
|
<div class="image position-all"
|
|
53
|
-
*ngIf="has(selectedModel, 'version.bestImage._thumbnailUrl')
|
|
54
|
-
data-stratus-src
|
|
53
|
+
*ngIf="has(selectedModel, 'version.bestImage._thumbnailUrl')"
|
|
54
|
+
[attr.data-stratus-src]="!_.get(selectedModel, 'version.bestImage.service') ? true : false"
|
|
55
55
|
[ngStyle]="{'background': 'url(' + _.get(selectedModel, 'version.bestImage._thumbnailUrl') + ') no-repeat center center', 'background-size': 'cover'}">
|
|
56
56
|
</div>
|
|
57
57
|
|
|
58
|
-
<!-- This is here because images for Videos are not hosted by us, so we cannot include stratus-src with it -->
|
|
59
|
-
<div class="image position-all"
|
|
60
|
-
*ngIf="!has(selectedModel, 'version.bestImage._thumbnailUrl') && has(selectedModel, 'version.videos')"
|
|
61
|
-
[ngStyle]="{'background': 'url(' + _.get(selectedModel, 'version.videos[0].src') + ') no-repeat center center', 'background-size': 'cover'}">
|
|
62
|
-
</div>
|
|
63
|
-
|
|
64
58
|
<!-- Icon for items with no image -->
|
|
65
59
|
<div class="no-image-icon position-all"
|
|
66
|
-
*ngIf="!has(selectedModel, 'version.bestImage._thumbnailUrl')
|
|
60
|
+
*ngIf="!has(selectedModel, 'version.bestImage._thumbnailUrl')"
|
|
67
61
|
[ngClass]="_.get(selectedModel, 'contentType.class') + '-background-color'">
|
|
68
62
|
|
|
69
63
|
<mat-icon class="content-type-icon position-center"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<mat-progress-bar mode="indeterminate" *ngIf="!styled"></mat-progress-bar><ng-template #emptyList><div class="selected-list-header border-default border-default-bottom"><h3 [textContent]="'Selected ' + (type || 'Items')"></h3></div><div class="selected-message-box">Nothing has been selected.</div></ng-template><div class="selected-list" *ngIf="styled"><div class="selected-list-header border-default border-default-bottom" *ngIf="!empty; else emptyList"><h3 [textContent]="'Selected ' + (type || 'Items')"></h3><p class="note">Drag to reorder</p></div><div cdkDropList (cdkDropListDropped)="drop($event)"><div cdkDrag class="selected-list-row selected-box" [ngClass]="{'active': _.get(selectedModel, 'status') === 1, 'inactive' : _.get(selectedModel, 'status') !== 1, 'published': _.get(selectedModel, 'version.published') === 1, 'unpublished': _.get(selectedModel, 'version.published') !== 1}" *ngFor="let selectedModel of dataSub | async"><div class="custom-ghost-placeholder" *cdkDragPlaceholder></div><div class="selected-list-container"><div class="column-image position-anchor"><div class="image position-all" *ngIf="has(selectedModel, 'version.bestImage._thumbnailUrl')
|
|
1
|
+
<mat-progress-bar mode="indeterminate" *ngIf="!styled"></mat-progress-bar><ng-template #emptyList><div class="selected-list-header border-default border-default-bottom"><h3 [textContent]="'Selected ' + (type || 'Items')"></h3></div><div class="selected-message-box">Nothing has been selected.</div></ng-template><div class="selected-list" *ngIf="styled"><div class="selected-list-header border-default border-default-bottom" *ngIf="!empty; else emptyList"><h3 [textContent]="'Selected ' + (type || 'Items')"></h3><p class="note">Drag to reorder</p></div><div cdkDropList (cdkDropListDropped)="drop($event)"><div cdkDrag class="selected-list-row selected-box" [ngClass]="{'active': _.get(selectedModel, 'status') === 1, 'inactive' : _.get(selectedModel, 'status') !== 1, 'published': _.get(selectedModel, 'version.published') === 1, 'unpublished': _.get(selectedModel, 'version.published') !== 1}" *ngFor="let selectedModel of dataSub | async"><div class="custom-ghost-placeholder" *cdkDragPlaceholder></div><div class="selected-list-container"><div class="column-image position-anchor"><div class="image position-all" *ngIf="has(selectedModel, 'version.bestImage._thumbnailUrl')" [attr.data-stratus-src]="!_.get(selectedModel, 'version.bestImage.service') ? true : false" [ngStyle]="{'background': 'url(' + _.get(selectedModel, 'version.bestImage._thumbnailUrl') + ') no-repeat center center', 'background-size': 'cover'}"></div><div class="no-image-icon position-all" *ngIf="!has(selectedModel, 'version.bestImage._thumbnailUrl')" [ngClass]="_.get(selectedModel, 'contentType.class') + '-background-color'"><mat-icon class="content-type-icon position-center" [svgIcon]="getSvg(Stratus.BaseUrl + (_.get(selectedModel, 'contentType.iconResourcePath') || _.get(selectedModel, 'iconResourcePath'))) | async">Icon</mat-icon></div><img class="shapeholder" [src]="Stratus.BaseUrl + 'sitetheorycore/images/shapeholder-square.png'"></div><div class="column-title"><div class="content-type" *ngIf="has(selectedModel, 'contentType.iconResourcePath')"><mat-icon class="content-type-icon" [svgIcon]="getSvg(Stratus.BaseUrl + _.get(selectedModel, 'contentType.iconResourcePath')) | async">ContentType Icon</mat-icon><span class="comment content-type-name font-body" [ngClass]="((_.get(selectedModel, 'contentType.name') || _.get(selectedModel, 'name')) | lowercase) + '-color'" [textContent]="(_.get(selectedModel, 'contentType.name') || _.get(selectedModel, 'name')) + ((_.get(selectedModel, 'status') !== 1) ? ' (hidden)' : '') + ((_.get(selectedModel, 'version.published') !== 1) ? ' (unpublished)' : '')"></span></div><h3 [innerHTML]="_.get(selectedModel, 'version.bestIdentifier') || _.get(selectedModel, 'name') || (_.get(selectedModel, 'contentType.controller') === 'Content\\Module' ? _.get(selectedModel, 'version.internalIdentifier') : 'Untitled ' + _.get(selectedModel, 'contentType.name') + ' (' + _.get(selectedModel, 'id') + ')')"></h3><span class="routing" [textContent]="(has(selectedModel, 'routing') ? '/' + _.get(selectedModel, 'routing[0].url') : null) || _.get(selectedModel, 'description') || ''"></span></div><div class="column-action"><a mat-button [matTooltip]="'Delete ' + (_.get(selectedModel, 'contentType.name') || _.get(selectedModel, 'name'))" aria-label="Delete Item" class="btn btn-delete" (click)="remove(selectedModel)"><mat-icon svgIcon="selector_delete" aria-hidden="false" aria-label="Delete Item">Delete</mat-icon></a><a mat-button *ngIf="has(selectedModel, 'contentType.editUrl')" [matTooltip]="'Edit ' + (_.get(selectedModel, 'contentType.name') || _.get(selectedModel, 'name'))" aria-label="Edit Item in New Window" class="btn btn-edit" (click)="goToUrl(selectedModel, '_blank');"><mat-icon svgIcon="selector_edit" aria-hidden="false" aria-label="Edit Item">Edit</mat-icon></a></div></div></div></div></div>
|
|
@@ -94,8 +94,8 @@
|
|
|
94
94
|
|
|
95
95
|
<!-- Content Type Icon -->
|
|
96
96
|
<mat-icon aria-hidden="true"
|
|
97
|
-
*ngIf="model
|
|
98
|
-
[svgIcon]="getSvg(Stratus.BaseUrl + model
|
|
97
|
+
*ngIf="_.get(model, 'contentType.iconResourcePath')"
|
|
98
|
+
[svgIcon]="getSvg(Stratus.BaseUrl + _.get(model, 'contentType.iconResourcePath')) | async">
|
|
99
99
|
Icon
|
|
100
100
|
</mat-icon>
|
|
101
101
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<h1 mat-dialog-title>Menu Link Editor</h1><div class="tree-dialog-content" *ngIf="isInitialized" mat-dialog-content><mat-form-field class="form-field"><input #nameInput matInput type="text" placeholder="Name" [(ngModel)]="data.name"></mat-form-field><h4><label id="link-type-label">Link Type:</label></h4><mat-radio-group class="radio-group" aria-labelledby="link-type-label" [(ngModel)]="data.target"><mat-radio-button class="radio-button" value="content">Content</mat-radio-button><mat-radio-button class="radio-button" value="url">URL</mat-radio-button></mat-radio-group><form class="dialog-form" [formGroup]="dialogContentForm"><ng-container *ngIf="data.target == 'content'"><mat-form-field class="form-field"><input matInput placeholder="Link Content" aria-label="Link Content" [matAutocomplete]="auto" formControlName="contentSelectorInput"></mat-form-field><mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" [displayWith]="displayContentText"><mat-option *ngIf="isContentLoading" class="is-loading"><mat-spinner diameter="50"></mat-spinner></mat-option><ng-container *ngIf="!isContentLoading"><mat-option *ngFor="let model of filteredContent" [value]="model"><mat-icon aria-hidden="true" *ngIf="model
|
|
1
|
+
<h1 mat-dialog-title>Menu Link Editor</h1><div class="tree-dialog-content" *ngIf="isInitialized" mat-dialog-content><mat-form-field class="form-field"><input #nameInput matInput type="text" placeholder="Name" [(ngModel)]="data.name"></mat-form-field><h4><label id="link-type-label">Link Type:</label></h4><mat-radio-group class="radio-group" aria-labelledby="link-type-label" [(ngModel)]="data.target"><mat-radio-button class="radio-button" value="content">Content</mat-radio-button><mat-radio-button class="radio-button" value="url">URL</mat-radio-button></mat-radio-group><form class="dialog-form" [formGroup]="dialogContentForm"><ng-container *ngIf="data.target == 'content'"><mat-form-field class="form-field"><input matInput placeholder="Link Content" aria-label="Link Content" [matAutocomplete]="auto" formControlName="contentSelectorInput"></mat-form-field><mat-autocomplete autoActiveFirstOption #auto="matAutocomplete" [displayWith]="displayContentText"><mat-option *ngIf="isContentLoading" class="is-loading"><mat-spinner diameter="50"></mat-spinner></mat-option><ng-container *ngIf="!isContentLoading"><mat-option *ngFor="let model of filteredContent" [value]="model"><mat-icon aria-hidden="true" *ngIf="_.get(model, 'contentType.iconResourcePath')" [svgIcon]="getSvg(Stratus.BaseUrl + _.get(model, 'contentType.iconResourcePath')) | async">Icon</mat-icon>{{(model && model.version) ? model.version.title : 'Untitled'}} <small *ngIf="model.routing && model.routing.length">{{'/' + model.routing[0].url}}</small></mat-option></ng-container></mat-autocomplete></ng-container></form><mat-form-field class="form-field" [style.width.px]="320" *ngIf="data.target == 'url'"><input matInput type="text" placeholder="URL" [(ngModel)]="data.url"> <a mat-button *ngIf="data.url" matSuffix mat-icon-button aria-label="Clear" (click)="data.url=''"><mat-icon>close</mat-icon></a></mat-form-field><mat-checkbox [(ngModel)]="browserTarget" (ngModelChange)="onBrowserTargetChange($event)">Open in new window</mat-checkbox><h4>Actions:</h4><a mat-button class="svg-grey" (click)="destroy()"><mat-icon svgIcon="tree_delete" aria-hidden="false" aria-label="Delete Item">Delete</mat-icon></a><a mat-button class="svg-grey" [class.visibility-off]="data.model.get('status') === 0" (click)="toggleStatus()"><mat-icon svgIcon="tree_visibility" aria-hidden="false" aria-label="Toggle Visibility">Visibility</mat-icon></a><a mat-button class="svg-grey" [disabled]="!data.id" (click)="addChild()"><mat-icon svgIcon="tree_add" aria-hidden="false" aria-label="Add Child">Add Child</mat-icon></a><mat-divider></mat-divider></div><div mat-dialog-actions><a mat-button (click)="onCancelClick()">Cancel </a><a mat-button [mat-dialog-close]="data" cdkFocusInitial>Ok</a></div>
|