@stratusjs/angular 0.10.1 → 0.11.1
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/dist/angular.bundle.js +89647 -89617
- package/dist/angular.bundle.min.js +1 -1
- package/package.json +3 -4
- package/src/angular.module.js +155 -0
- package/src/angular.module.js.map +1 -0
- package/src/angular.module.min.js +1 -0
- package/src/angular.module.ts +114 -0
- package/src/app.module.js +7 -116
- package/src/app.module.js.map +1 -1
- package/src/app.module.min.js +1 -1
- package/src/app.module.ts +8 -113
- package/src/base/base.component.js +1 -1
- package/src/base/base.component.js.map +1 -1
- package/src/base/base.component.min.js +1 -1
- package/src/base/base.component.ts +1 -1
- package/src/confirm-dialog/confirm-dialog.component.js +1 -1
- package/src/confirm-dialog/confirm-dialog.component.js.map +1 -1
- package/src/confirm-dialog/confirm-dialog.component.min.js +1 -1
- package/src/confirm-dialog/confirm-dialog.component.ts +1 -1
- package/src/editor/citation-dialog.component.css +2 -1
- package/src/editor/citation-dialog.component.css.map +1 -1
- package/src/editor/citation-dialog.component.js +1 -1
- package/src/editor/citation-dialog.component.js.map +1 -1
- package/src/editor/citation-dialog.component.min.css +1 -1
- package/src/editor/citation-dialog.component.min.js +1 -1
- package/src/editor/citation-dialog.component.scss +2 -1
- package/src/editor/citation-dialog.component.ts +1 -1
- package/src/editor/code-view-dialog.component.js +1 -1
- package/src/editor/code-view-dialog.component.js.map +1 -1
- package/src/editor/code-view-dialog.component.min.js +1 -1
- package/src/editor/code-view-dialog.component.ts +1 -1
- package/src/editor/editor.component.js +7 -3
- package/src/editor/editor.component.js.map +1 -1
- package/src/editor/editor.component.min.js +1 -1
- package/src/editor/editor.component.ts +12 -6
- package/src/editor/link-dialog.component.js +1 -1
- package/src/editor/link-dialog.component.js.map +1 -1
- package/src/editor/link-dialog.component.min.js +1 -1
- package/src/editor/link-dialog.component.ts +1 -1
- package/src/editor/media-dialog.component.js +1 -1
- package/src/editor/media-dialog.component.js.map +1 -1
- package/src/editor/media-dialog.component.min.js +1 -1
- package/src/editor/media-dialog.component.ts +1 -1
- package/src/{material.js → material.module.js} +1 -1
- package/src/material.module.js.map +1 -0
- package/src/media-selector/media-selector.component.css +12 -0
- package/src/media-selector/media-selector.component.css.map +1 -1
- package/src/media-selector/media-selector.component.js +1 -1
- package/src/media-selector/media-selector.component.js.map +1 -1
- package/src/media-selector/media-selector.component.min.css +1 -1
- package/src/media-selector/media-selector.component.min.js +1 -1
- package/src/media-selector/media-selector.component.scss +2 -0
- package/src/media-selector/media-selector.component.ts +1 -1
- package/src/selector/selector.component.css +60 -19
- package/src/selector/selector.component.css.map +1 -1
- package/src/selector/selector.component.js +1 -1
- package/src/selector/selector.component.js.map +1 -1
- package/src/selector/selector.component.min.css +1 -1
- package/src/selector/selector.component.min.js +1 -1
- package/src/selector/selector.component.scss +6 -2
- package/src/selector/selector.component.ts +1 -1
- package/src/test/test.directive.js +1 -1
- package/src/test/test.directive.js.map +1 -1
- package/src/test/test.directive.min.js +1 -1
- package/src/test/test.directive.ts +1 -1
- package/src/timezone-selector/timezone-selector.component.js +1 -1
- package/src/timezone-selector/timezone-selector.component.js.map +1 -1
- package/src/timezone-selector/timezone-selector.component.min.js +1 -1
- package/src/timezone-selector/timezone-selector.component.ts +1 -1
- package/src/tree/tree-dialog.component.html +292 -210
- package/src/tree/tree-dialog.component.js +5 -1
- package/src/tree/tree-dialog.component.js.map +1 -1
- package/src/tree/tree-dialog.component.min.html +3 -1
- package/src/tree/tree-dialog.component.min.js +1 -1
- package/src/tree/tree-dialog.component.ts +6 -1
- package/src/tree/tree-node.component.html +2 -2
- package/src/tree/tree-node.component.js +1 -1
- package/src/tree/tree-node.component.js.map +1 -1
- package/src/tree/tree-node.component.min.html +1 -1
- package/src/tree/tree-node.component.min.js +1 -1
- package/src/tree/tree-node.component.ts +1 -1
- package/src/tree/tree.component.css +16 -4
- package/src/tree/tree.component.css.map +1 -1
- package/src/tree/tree.component.html +2 -2
- package/src/tree/tree.component.js +3 -3
- package/src/tree/tree.component.js.map +1 -1
- package/src/tree/tree.component.min.css +1 -1
- package/src/tree/tree.component.min.html +1 -1
- package/src/tree/tree.component.min.js +1 -1
- package/src/tree/tree.component.scss +26 -17
- package/src/tree/tree.component.ts +3 -3
- package/src/angular.modules.js +0 -35
- package/src/angular.modules.js.map +0 -1
- package/src/angular.modules.min.js +0 -1
- package/src/angular.modules.ts +0 -24
- package/src/material.js.map +0 -1
- /package/src/{material.min.js → material.module.min.js} +0 -0
- /package/src/{material.ts → material.module.ts} +0 -0
|
@@ -8,221 +8,303 @@
|
|
|
8
8
|
<div class="tree-dialog-content"
|
|
9
9
|
*ngIf="isInitialized"
|
|
10
10
|
mat-dialog-content>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
placeholder="Name"
|
|
16
|
-
[(ngModel)]="data.name">
|
|
17
|
-
<!--
|
|
18
|
-
<a mat-button
|
|
19
|
-
mat-icon-button
|
|
20
|
-
matSuffix
|
|
21
|
-
aria-label="Clear"
|
|
22
|
-
*ngIf="data.name"
|
|
23
|
-
(click)="data.name=''">
|
|
24
|
-
<mat-icon>close</mat-icon>
|
|
25
|
-
</a>
|
|
26
|
-
-->
|
|
27
|
-
</mat-form-field>
|
|
28
|
-
|
|
29
|
-
<!-- Target Selector -->
|
|
30
|
-
<h4>
|
|
31
|
-
<label id="link-type-label">Link Type:</label>
|
|
32
|
-
</h4>
|
|
33
|
-
<mat-radio-group class="radio-group"
|
|
34
|
-
aria-labelledby="link-type-label"
|
|
35
|
-
[(ngModel)]="data.target">
|
|
36
|
-
<mat-radio-button class="radio-button" value="content">
|
|
37
|
-
Website Page
|
|
38
|
-
</mat-radio-button>
|
|
39
|
-
<mat-radio-button class="radio-button" value="url">
|
|
40
|
-
Custom Link
|
|
41
|
-
</mat-radio-button>
|
|
42
|
-
</mat-radio-group>
|
|
43
|
-
|
|
44
|
-
<!-- Target Editor -->
|
|
45
|
-
<form class="dialog-form"
|
|
46
|
-
[formGroup]='dialogContentForm'>
|
|
47
|
-
<ng-container *ngIf="data.target == 'content'">
|
|
11
|
+
|
|
12
|
+
<mat-tab-group (selectedIndexChange)="tabIndexChange($event)">
|
|
13
|
+
<mat-tab label="Main">
|
|
14
|
+
|
|
48
15
|
<mat-form-field class="form-field">
|
|
49
|
-
<input
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
16
|
+
<input #nameInput
|
|
17
|
+
matInput
|
|
18
|
+
type="text"
|
|
19
|
+
placeholder="Name"
|
|
20
|
+
[(ngModel)]="data.name">
|
|
21
|
+
<!--
|
|
22
|
+
<a mat-button
|
|
23
|
+
mat-icon-button
|
|
24
|
+
matSuffix
|
|
25
|
+
aria-label="Clear"
|
|
26
|
+
*ngIf="data.name"
|
|
27
|
+
(click)="data.name=''">
|
|
28
|
+
<mat-icon>close</mat-icon>
|
|
29
|
+
</a>
|
|
30
|
+
-->
|
|
54
31
|
</mat-form-field>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
32
|
+
|
|
33
|
+
<!-- Target Selector -->
|
|
34
|
+
<h4>
|
|
35
|
+
<label id="link-type-label">Link Type:</label>
|
|
36
|
+
</h4>
|
|
37
|
+
<mat-radio-group class="radio-group"
|
|
38
|
+
aria-labelledby="link-type-label"
|
|
39
|
+
[(ngModel)]="data.target">
|
|
40
|
+
<mat-radio-button class="radio-button" value="content">
|
|
41
|
+
Website Page
|
|
42
|
+
</mat-radio-button>
|
|
43
|
+
<mat-radio-button class="radio-button" value="url">
|
|
44
|
+
Custom Link
|
|
45
|
+
</mat-radio-button>
|
|
46
|
+
</mat-radio-group>
|
|
47
|
+
|
|
48
|
+
<!-- Target Editor -->
|
|
49
|
+
<form class="dialog-form"
|
|
50
|
+
[formGroup]='dialogContentForm'>
|
|
51
|
+
<ng-container *ngIf="data.target == 'content'">
|
|
52
|
+
<mat-form-field class="form-field">
|
|
53
|
+
<input matInput
|
|
54
|
+
placeholder="Link Content"
|
|
55
|
+
aria-label="Link Content"
|
|
56
|
+
[matAutocomplete]="auto"
|
|
57
|
+
formControlName='contentSelectorInput'>
|
|
58
|
+
</mat-form-field>
|
|
59
|
+
<mat-autocomplete autoActiveFirstOption
|
|
60
|
+
#auto="matAutocomplete"
|
|
61
|
+
[displayWith]="displayContentText">
|
|
62
|
+
<mat-option *ngIf="isContentLoading" class="is-loading">
|
|
63
|
+
<mat-progress-bar mode="indeterminate"></mat-progress-bar>
|
|
64
|
+
</mat-option>
|
|
65
|
+
<ng-container *ngIf="!isContentLoading">
|
|
66
|
+
<!-- TODO: Modify to filteredContentModels|async which should improve responsiveness -->
|
|
67
|
+
<mat-option *ngFor="let model of filteredContent"
|
|
68
|
+
[value]="model">
|
|
69
|
+
<!-- Item image, video or header image -->
|
|
70
|
+
<!--
|
|
71
|
+
<span class="image position-all"
|
|
72
|
+
style="background-size: cover"
|
|
73
|
+
*ngIf="model.version.images.length || model.version.shellImages.length"
|
|
74
|
+
[style.background]="'url(' + (model.version.images.length ? model.version.images[0].src : model.version.shellImages.length ? model.version.shellImages[0].src : '') + ') no-repeat center center'">
|
|
75
|
+
</span>
|
|
76
|
+
<span class="image position-all"
|
|
77
|
+
style="background-size: cover"
|
|
78
|
+
*ngIf="!model.version.images.length && !model.version.shellImages.length && model.version.videos.length"
|
|
79
|
+
[style.background]="'url(' + (model.version.videos[0].src) + ') no-repeat center center'">
|
|
80
|
+
</span>
|
|
81
|
+
-->
|
|
82
|
+
|
|
83
|
+
<!-- Icon for items with no image -->
|
|
84
|
+
<!-- FIXME: Re-enable the ngIf once the other options above are functional -->
|
|
85
|
+
<!--*ngIf="!model.version.images.length && !model.version.videos.length && !model.version.shellImages.length"-->
|
|
86
|
+
<!-- FIXME: The background class makes a weird rectangle that covers the SVG -->
|
|
87
|
+
<!--[class]="model.contentType.class + '-background-color'"-->
|
|
88
|
+
<!--model.version.meta.backgroundColor-->
|
|
89
|
+
<!--
|
|
90
|
+
<span class="no-image-icon position-all"
|
|
91
|
+
*ngIf="model.contentType.iconResource">
|
|
92
|
+
<mat-icon aria-hidden="true"
|
|
93
|
+
[svgIcon]="getSvg(Stratus.BaseUrl + model.contentType.iconResourcePath) | async">
|
|
94
|
+
Icon
|
|
95
|
+
</mat-icon>
|
|
96
|
+
</span>
|
|
97
|
+
-->
|
|
98
|
+
|
|
99
|
+
<!-- Content Type Icon -->
|
|
100
|
+
<mat-icon aria-hidden="true"
|
|
101
|
+
*ngIf="get(model, 'contentType.iconResourcePath')"
|
|
102
|
+
[svgIcon]="getSvg(Stratus.BaseUrl + get(model, 'contentType.iconResourcePath')) | async">
|
|
103
|
+
Icon
|
|
104
|
+
</mat-icon>
|
|
105
|
+
|
|
106
|
+
<!-- Title & Route Display -->
|
|
107
|
+
<!--<span [class.selected-item]="isSelected(model)">-->
|
|
108
|
+
{{(model && model.version) ? model.version.title : 'Untitled'}}
|
|
109
|
+
<small *ngIf="model.routing && model.routing.length">
|
|
110
|
+
{{'/' + model.routing[0].url}}
|
|
111
|
+
</small>
|
|
112
|
+
</mat-option>
|
|
113
|
+
</ng-container>
|
|
114
|
+
</mat-autocomplete>
|
|
109
115
|
</ng-container>
|
|
110
|
-
</
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
<mat-icon>close</mat-icon>
|
|
120
|
-
</a>
|
|
121
|
-
</mat-form-field>
|
|
122
|
-
|
|
123
|
-
<mat-checkbox [(ngModel)]="browserTarget"
|
|
124
|
-
(change)="onBrowserTargetChange($event)">
|
|
125
|
-
Open in new window
|
|
126
|
-
</mat-checkbox>
|
|
127
|
-
|
|
128
|
-
<!-- Target Display -->
|
|
129
|
-
<!--
|
|
130
|
-
<h4>Linked To:</h4>
|
|
131
|
-
|
|
132
|
-
<span *ngIf="data.target == 'content'" [textContent]="data.content && data.content.routing ? ('/' + data.content.routing[0].url) : 'Nothing yet!'"></span>
|
|
133
|
-
<span *ngIf="data.target == 'url'" [textContent]="data.url || 'Nothing yet!'"></span>
|
|
134
|
-
-->
|
|
135
|
-
|
|
136
|
-
<!-- Priority Control - deprecated once we have proper DnD for child links -->
|
|
137
|
-
<!--
|
|
138
|
-
<h4 *ngIf="data.nestParent !== null">
|
|
139
|
-
Priority:
|
|
140
|
-
</h4>
|
|
141
|
-
-->
|
|
142
|
-
<!--
|
|
143
|
-
<mat-form-field class="form-field"
|
|
144
|
-
*ngIf="data.nestParent !== null">
|
|
145
|
-
<input matInput type="number" placeholder="Priority" [(ngModel)]="data.priority">
|
|
146
|
-
-->
|
|
147
|
-
<!-- <span [textContent]="data.priority || 'None set!'"></span>-->
|
|
148
|
-
<!-- <a mat-button matSuffix mat-icon-button aria-label="Increase Priority"-->
|
|
149
|
-
<!-- (click)="data.priority = data.priority + 1">-->
|
|
150
|
-
<!-- <mat-icon>expand_less</mat-icon>-->
|
|
151
|
-
<!-- </a>-->
|
|
152
|
-
<!-- <a mat-button matSuffix mat-icon-button aria-label="Decrease Priority"-->
|
|
153
|
-
<!-- (click)="data.priority = data.priority - 1">-->
|
|
154
|
-
<!-- <mat-icon>expand_more</mat-icon>-->
|
|
155
|
-
<!-- </a>-->
|
|
156
|
-
<!--
|
|
157
|
-
</mat-form-field>
|
|
158
|
-
-->
|
|
159
|
-
|
|
160
|
-
<!-- Level Selector -->
|
|
161
|
-
<!-- <h4><label id="link-level-label">Link Level:</label></h4>-->
|
|
162
|
-
<!-- <mat-radio-group class="radio-group"-->
|
|
163
|
-
<!-- aria-labelledby="link-level-label"-->
|
|
164
|
-
<!-- [(ngModel)]="data.level">-->
|
|
165
|
-
<!-- <mat-radio-button class="radio-button" value="top">-->
|
|
166
|
-
<!-- Top-Level-->
|
|
167
|
-
<!-- </mat-radio-button>-->
|
|
168
|
-
<!-- <mat-radio-button class="radio-button" value="child">-->
|
|
169
|
-
<!-- Child-->
|
|
170
|
-
<!-- </mat-radio-button>-->
|
|
171
|
-
<!-- </mat-radio-group>-->
|
|
172
|
-
|
|
173
|
-
<!-- Parent Editor -->
|
|
174
|
-
<!--<form class="dialog-form dialog-parent-form" [formGroup]='dialogParentForm'>
|
|
175
|
-
<ng-container *ngIf="data.level == 'child'">
|
|
176
|
-
<mat-form-field class="form-field">
|
|
177
|
-
<input matInput placeholder="Parent Link" aria-label="Parent Link" [matAutocomplete]="auto" formControlName='parentSelectorInput'>
|
|
116
|
+
</form>
|
|
117
|
+
|
|
118
|
+
<mat-form-field class="form-field"
|
|
119
|
+
[style.width.px]=320
|
|
120
|
+
*ngIf="data.target == 'url'">
|
|
121
|
+
<input matInput type="text" placeholder="URL" [(ngModel)]="data.url">
|
|
122
|
+
<a mat-button *ngIf="data.url" matSuffix mat-icon-button aria-label="Clear" (click)="data.url=''">
|
|
123
|
+
<mat-icon>close</mat-icon>
|
|
124
|
+
</a>
|
|
178
125
|
</mat-form-field>
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
126
|
+
|
|
127
|
+
<mat-checkbox [(ngModel)]="browserTarget"
|
|
128
|
+
(change)="onBrowserTargetChange($event)">
|
|
129
|
+
Open in new window
|
|
130
|
+
</mat-checkbox>
|
|
131
|
+
|
|
132
|
+
<!-- Target Display -->
|
|
133
|
+
<!--
|
|
134
|
+
<h4>Linked To:</h4>
|
|
135
|
+
|
|
136
|
+
<span *ngIf="data.target == 'content'" [textContent]="data.content && data.content.routing ? ('/' + data.content.routing[0].url) : 'Nothing yet!'"></span>
|
|
137
|
+
<span *ngIf="data.target == 'url'" [textContent]="data.url || 'Nothing yet!'"></span>
|
|
138
|
+
-->
|
|
139
|
+
|
|
140
|
+
<!-- Priority Control - deprecated once we have proper DnD for child links -->
|
|
141
|
+
<!--
|
|
142
|
+
<h4 *ngIf="data.nestParent !== null">
|
|
143
|
+
Priority:
|
|
144
|
+
</h4>
|
|
145
|
+
-->
|
|
146
|
+
<!--
|
|
147
|
+
<mat-form-field class="form-field"
|
|
148
|
+
*ngIf="data.nestParent !== null">
|
|
149
|
+
<input matInput type="number" placeholder="Priority" [(ngModel)]="data.priority">
|
|
150
|
+
-->
|
|
151
|
+
<!-- <span [textContent]="data.priority || 'None set!'"></span>-->
|
|
152
|
+
<!-- <a mat-button matSuffix mat-icon-button aria-label="Increase Priority"-->
|
|
153
|
+
<!-- (click)="data.priority = data.priority + 1">-->
|
|
154
|
+
<!-- <mat-icon>expand_less</mat-icon>-->
|
|
155
|
+
<!-- </a>-->
|
|
156
|
+
<!-- <a mat-button matSuffix mat-icon-button aria-label="Decrease Priority"-->
|
|
157
|
+
<!-- (click)="data.priority = data.priority - 1">-->
|
|
158
|
+
<!-- <mat-icon>expand_more</mat-icon>-->
|
|
159
|
+
<!-- </a>-->
|
|
160
|
+
<!--
|
|
161
|
+
</mat-form-field>
|
|
162
|
+
-->
|
|
163
|
+
|
|
164
|
+
<!-- Level Selector -->
|
|
165
|
+
<!-- <h4><label id="link-level-label">Link Level:</label></h4>-->
|
|
166
|
+
<!-- <mat-radio-group class="radio-group"-->
|
|
167
|
+
<!-- aria-labelledby="link-level-label"-->
|
|
168
|
+
<!-- [(ngModel)]="data.level">-->
|
|
169
|
+
<!-- <mat-radio-button class="radio-button" value="top">-->
|
|
170
|
+
<!-- Top-Level-->
|
|
171
|
+
<!-- </mat-radio-button>-->
|
|
172
|
+
<!-- <mat-radio-button class="radio-button" value="child">-->
|
|
173
|
+
<!-- Child-->
|
|
174
|
+
<!-- </mat-radio-button>-->
|
|
175
|
+
<!-- </mat-radio-group>-->
|
|
176
|
+
|
|
177
|
+
<!-- Parent Editor -->
|
|
178
|
+
<!--<form class="dialog-form dialog-parent-form" [formGroup]='dialogParentForm'>
|
|
179
|
+
<ng-container *ngIf="data.level == 'child'">
|
|
180
|
+
<mat-form-field class="form-field">
|
|
181
|
+
<input matInput placeholder="Parent Link" aria-label="Parent Link" [matAutocomplete]="auto" formControlName='parentSelectorInput'>
|
|
182
|
+
</mat-form-field>
|
|
183
|
+
<mat-autocomplete #auto="matAutocomplete" [displayWith]="displayName">
|
|
184
|
+
<mat-option *ngIf="isParentLoading" class="is-loading">
|
|
185
|
+
<mat-spinner diameter="50"></mat-spinner>
|
|
186
|
+
</mat-option>
|
|
187
|
+
<ng-container *ngIf="!isParentLoading">
|
|
188
|
+
<mat-option *ngFor="let option of filteredParentOptions" [value]="option" [innerHTML]="option.name"></mat-option>
|
|
189
|
+
</ng-container>
|
|
190
|
+
</mat-autocomplete>
|
|
185
191
|
</ng-container>
|
|
186
|
-
</
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
<!--
|
|
192
|
-
|
|
193
|
-
<!--
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
192
|
+
</form>-->
|
|
193
|
+
|
|
194
|
+
<!-- Parent Display -->
|
|
195
|
+
<!-- <h4 *ngIf="data.nestParent !== null">-->
|
|
196
|
+
<!-- Nested Under:-->
|
|
197
|
+
<!-- </h4>-->
|
|
198
|
+
|
|
199
|
+
<!-- <span *ngIf="data.nestParent !== null"-->
|
|
200
|
+
<!-- [textContent]="data.nestParent.name || 'Untitled Parent'"></span>-->
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<!-- Misc Buttons -->
|
|
205
|
+
<h4>
|
|
206
|
+
Actions:
|
|
207
|
+
</h4>
|
|
208
|
+
|
|
209
|
+
<a mat-button
|
|
210
|
+
class="svg-grey"
|
|
211
|
+
(click)="destroy()">
|
|
212
|
+
<mat-icon svgIcon="tree_delete" aria-hidden="false" aria-label="Delete Item">
|
|
213
|
+
Delete
|
|
214
|
+
</mat-icon>
|
|
215
|
+
</a>
|
|
216
|
+
<a mat-button
|
|
217
|
+
class="svg-grey"
|
|
218
|
+
[class.visibility-off]="data.model.get('status') === 0"
|
|
219
|
+
(click)="toggleStatus()">
|
|
220
|
+
<mat-icon svgIcon="tree_visibility" aria-hidden="false" aria-label="Toggle Visibility">
|
|
221
|
+
Visibility
|
|
222
|
+
</mat-icon>
|
|
223
|
+
</a>
|
|
224
|
+
<a mat-button
|
|
225
|
+
class="svg-grey"
|
|
226
|
+
[disabled]="!data.id"
|
|
227
|
+
(click)="addChild()">
|
|
228
|
+
<mat-icon svgIcon="tree_add" aria-hidden="false" aria-label="Add Child">
|
|
229
|
+
Add Child
|
|
230
|
+
</mat-icon>
|
|
231
|
+
</a>
|
|
232
|
+
</mat-tab>
|
|
233
|
+
<mat-tab label="Advanced Options">
|
|
234
|
+
<div *ngIf="selectedTabIndex">
|
|
235
|
+
<!-- texts go here -->
|
|
236
|
+
<!-- #linkHtmlInput -->
|
|
237
|
+
<!-- [(ngModel)]="data.linkHtml" -->
|
|
238
|
+
<!-- placeholder='"Big Menu" Dropdown Content' -->
|
|
239
|
+
<!-- sa-internal-editor
|
|
240
|
+
data-target="MenuLink"
|
|
241
|
+
data-id="{{data.id}}"
|
|
242
|
+
data-property="linkHtml"
|
|
243
|
+
data-auto-save="false"
|
|
244
|
+
></sa-internal-editor -->
|
|
245
|
+
<!-- #iconHtmlInput -->
|
|
246
|
+
<!-- [(ngModel)]="data.iconHtml" -->
|
|
247
|
+
<!-- placeholder="Link Icon" -->
|
|
248
|
+
<!-- sa-internal-editor
|
|
249
|
+
[model]="data.model"
|
|
250
|
+
data-property="iconHtml"
|
|
251
|
+
data-auto-save="false"
|
|
252
|
+
></sa-internal-editor -->
|
|
253
|
+
</div>
|
|
254
|
+
|
|
255
|
+
<mat-form-field class="form-field">
|
|
256
|
+
<mat-label>Link HTML</mat-label>
|
|
257
|
+
<textarea #linkHtmlInput
|
|
258
|
+
matInput
|
|
259
|
+
type="text"
|
|
260
|
+
placeholder='"Big Menu" Dropdown Content'
|
|
261
|
+
[(ngModel)]="data.model.data.linkHtml">
|
|
262
|
+
</textarea>
|
|
263
|
+
</mat-form-field>
|
|
264
|
+
|
|
265
|
+
<mat-form-field class="form-field">
|
|
266
|
+
<mat-label>Icon HTML</mat-label>
|
|
267
|
+
<textarea #iconHtmlInput
|
|
268
|
+
matInput
|
|
269
|
+
type="text"
|
|
270
|
+
placeholder="Icon HTML"
|
|
271
|
+
[(ngModel)]="data.model.data.iconHtml">
|
|
272
|
+
</textarea>
|
|
273
|
+
</mat-form-field>
|
|
274
|
+
|
|
275
|
+
<mat-checkbox [(ngModel)]="data.model.data.accessHide">
|
|
276
|
+
Hide Link for Private Page
|
|
277
|
+
</mat-checkbox>
|
|
278
|
+
|
|
279
|
+
<!-- For now Actions is duplicated here to fix the scroll issue caused by checkbox being last -->
|
|
280
|
+
<h4>
|
|
281
|
+
Actions:
|
|
282
|
+
</h4>
|
|
283
|
+
<a mat-button
|
|
284
|
+
class="svg-grey"
|
|
285
|
+
(click)="destroy()">
|
|
286
|
+
<mat-icon svgIcon="tree_delete" aria-hidden="false" aria-label="Delete Item">
|
|
287
|
+
Delete
|
|
288
|
+
</mat-icon>
|
|
289
|
+
</a>
|
|
290
|
+
<a mat-button
|
|
291
|
+
class="svg-grey"
|
|
292
|
+
[class.visibility-off]="data.model.get('status') === 0"
|
|
293
|
+
(click)="toggleStatus()">
|
|
294
|
+
<mat-icon svgIcon="tree_visibility" aria-hidden="false" aria-label="Toggle Visibility">
|
|
295
|
+
Visibility
|
|
296
|
+
</mat-icon>
|
|
297
|
+
</a>
|
|
298
|
+
<a mat-button
|
|
299
|
+
class="svg-grey"
|
|
300
|
+
[disabled]="!data.id"
|
|
301
|
+
(click)="addChild()">
|
|
302
|
+
<mat-icon svgIcon="tree_add" aria-hidden="false" aria-label="Add Child">
|
|
303
|
+
Add Child
|
|
304
|
+
</mat-icon>
|
|
305
|
+
</a>
|
|
306
|
+
</mat-tab>
|
|
307
|
+
</mat-tab-group>
|
|
226
308
|
|
|
227
309
|
<mat-divider></mat-divider>
|
|
228
310
|
</div>
|
|
@@ -64,6 +64,7 @@ System.register(["@angular/core", "@angular/forms", "@angular/cdk/drag-drop", "@
|
|
|
64
64
|
this.isInitialized = false;
|
|
65
65
|
this.isDestroyed = false;
|
|
66
66
|
this.isStyled = false;
|
|
67
|
+
this.selectedTabIndex = 0;
|
|
67
68
|
this.get = lodash_1.get;
|
|
68
69
|
this.Stratus = stratus_1.Stratus;
|
|
69
70
|
this.apiBase = '/Api/Content';
|
|
@@ -229,10 +230,13 @@ System.register(["@angular/core", "@angular/forms", "@angular/cdk/drag-drop", "@
|
|
|
229
230
|
drag_drop_1.moveItemInArray(orderedList, index, 0);
|
|
230
231
|
return orderedList;
|
|
231
232
|
}
|
|
233
|
+
tabIndexChange(index) {
|
|
234
|
+
this.selectedTabIndex = index;
|
|
235
|
+
}
|
|
232
236
|
};
|
|
233
237
|
TreeDialogComponent = __decorate([
|
|
234
238
|
core_1.Component({
|
|
235
|
-
selector: `sa-${moduleName}`,
|
|
239
|
+
selector: `sa-internal-${moduleName}`,
|
|
236
240
|
templateUrl: `${localDir}/${parentModuleName}/${moduleName}.component${min}.html`,
|
|
237
241
|
}),
|
|
238
242
|
__param(1, core_1.Inject(dialog_1.MAT_DIALOG_DATA)),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["tree-dialog.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuGM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,aAAa,CAAA;YAC1B,gBAAgB,GAAG,MAAM,CAAA;YAGzB,GAAG,GAAG,CAAC,oBAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAA;YAClC,QAAQ,GAAG,GAAG,iBAAO,CAAC,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,KAAK,CAAC,GAAG,SAAS,IAAI,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAA;YAUzH,mBAAmB,GAAzB,MAAM,mBAAoB,SAAQ,0CAAmB;
|
|
1
|
+
{"version":3,"sources":["tree-dialog.component.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAuGM,SAAS,GAAG,oBAAoB,CAAA;YAChC,UAAU,GAAG,aAAa,CAAA;YAC1B,gBAAgB,GAAG,MAAM,CAAA;YAGzB,GAAG,GAAG,CAAC,oBAAM,CAAC,KAAK,CAAC,CAAC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B;eAhE3B,mBAAmB,CAoW/B;;QACD,CAAC","file":"tree-dialog.component.js"}
|
|
@@ -1 +1,3 @@
|
|
|
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">Website Page</mat-radio-button><mat-radio-button class="radio-button" value="url">Custom Link</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-progress-bar mode="indeterminate"></mat-progress-bar></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" (change)="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
|
|
1
|
+
<h1 mat-dialog-title>Menu Link Editor</h1><div class="tree-dialog-content" *ngIf="isInitialized" mat-dialog-content><mat-tab-group (selectedIndexChange)="tabIndexChange($event)"><mat-tab label="Main"><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">Website Page</mat-radio-button><mat-radio-button class="radio-button" value="url">Custom Link</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-progress-bar mode="indeterminate"></mat-progress-bar></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" (change)="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-tab><mat-tab label="Advanced Options"><div *ngIf="selectedTabIndex"></div><mat-form-field class="form-field"><mat-label>Link HTML</mat-label><textarea #linkHtmlInput matInput type="text" placeholder='"Big Menu" Dropdown Content' [(ngModel)]="data.model.data.linkHtml">
|
|
2
|
+
</textarea></mat-form-field><mat-form-field class="form-field"><mat-label>Icon HTML</mat-label><textarea #iconHtmlInput matInput type="text" placeholder="Icon HTML" [(ngModel)]="data.model.data.iconHtml">
|
|
3
|
+
</textarea></mat-form-field><mat-checkbox [(ngModel)]="data.model.data.accessHide">Hide Link for Private Page</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-tab></mat-tab-group><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>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
System.register(["@angular/core","@angular/forms","@angular/cdk/drag-drop","@angular/material/dialog","rxjs/operators","lodash","@stratusjs/runtime/stratus","@stratusjs/core/environment","../core/responsive.component","@stratusjs/core/misc"],function(t,e){"use strict";var n,i,s,o,r,a,l,
|
|
1
|
+
System.register(["@angular/core","@angular/forms","@angular/cdk/drag-drop","@angular/material/dialog","rxjs/operators","lodash","@stratusjs/runtime/stratus","@stratusjs/core/environment","../core/responsive.component","@stratusjs/core/misc"],function(t,e){"use strict";var n,i,s,o,r,a,d,l,h,c,u,g,f,p,y,C=this&&this.__decorate||function(t,e,n,i){var s,o=arguments.length,r=o<3?e:null===i?i=Object.getOwnPropertyDescriptor(e,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)r=Reflect.decorate(t,e,n,i);else for(var a=t.length-1;a>=0;a--)(s=t[a])&&(r=(o<3?s(r):o>3?s(e,n,r):s(e,n))||r);return o>3&&r&&Object.defineProperty(e,n,r),r},b=this&&this.__metadata||function(t,e){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,e)},m=this&&this.__param||function(t,e){return function(n,i){e(n,i,t)}};e&&e.id;return{setters:[function(t){n=t},function(t){i=t},function(t){s=t},function(t){o=t},function(t){r=t},function(t){a=t},function(t){d=t},function(t){l=t},function(t){h=t},function(t){c=t}],execute:function(){"@stratusjs/angular",u="tree-dialog",g="tree",f=l.cookie("env")?"":".min",p=`${d.Stratus.BaseUrl}${boot.configuration.paths["@stratusjs/angular/*"].replace(/[^/]*$/,"").replace(/\/dist\/$/,"/src/")}`,y=class extends h.ResponsiveComponent{constructor(t,e,n,i){super(),this.dialogRef=t,this.data=e,this.fb=n,this.ref=i,this.title=u+"_component",this.isInitialized=!1,this.isDestroyed=!1,this.isStyled=!1,this.selectedTabIndex=0,this.get=a.get,this.Stratus=d.Stratus,this.apiBase="/Api/Content",this.isSingleContentLoading=!1,this.limit=20,this.isContentLoading=!1,this.isContentLoaded=!1,this.basicContentQueryAttributesObject={isContent:!0,isCollection:null,showRoutable:!0,showRouting:!0}}ngOnInit(){this.uid=a.uniqueId(`sa_${a.snakeCase(u)}_component_`),d.Stratus.Instances[this.uid]=this,d.Stratus.Internals.CssLoader(`${p}/${g}/${u}.component${f}.css`).then(()=>{this.isStyled=!0}).catch(t=>{console.warn("Issue detected in CSS Loader for Component:",this),console.error(t),this.isStyled=!0}),this.tree=this.data.tree,this.treeNode=this.data.treeNode,this.browserTarget=null!==this.data.browserTarget,this.backend=this.data.backend,this.iconRegistry=this.data.iconRegistry,this.dialogContentForm=this.fb.group({contentSelectorInput:this.data.content||null}),this.dialogContentForm.get("contentSelectorInput").valueChanges.pipe(r.debounceTime(300),r.tap(()=>this.isContentLoading=!0),r.switchMap(t=>(a.isString(t)?this.lastContentSelectorQuery=this.getQueryUrl(t):(this.data.content=t,this.data.url=null),this.backend.get(this.lastContentSelectorQuery||this.getQueryUrl()).pipe(r.finalize(()=>{this.isContentLoading=!1,this.isContentLoaded=!0}))))).subscribe(t=>this.handleContent(t)),this.backend.get(this.getQueryUrl()).pipe(r.finalize(()=>this.isContentLoading=!1)).subscribe(t=>this.handleContent(t)),this.data.content&&this.data.content.id&&(this.isSingleContentLoading=!0,this.backend.get(this.getQueryUrl(null,this.data.content.id)).pipe(r.finalize(()=>this.isSingleContentLoading=!1)).subscribe(t=>{if(!t.ok||200!==t.status||a.isEmpty(t.body))return null;const e=a.get(t.body,"payload")||t.body;return a.isEmpty(e)||Array.isArray(e)||!a.isObject(e)?null:(this.contentEntity=e,this.isSingleContentLoading=!1,this.dialogContentForm.get("contentSelectorInput").patchValue(this.contentEntity),this.refresh().then(),this.contentEntity)})),this.isInitialized=!0}ngOnDestroy(){this.isDestroyed=!0}refresh(){return this.isDestroyed?new Promise(t=>t()):super.refresh()}onCancelClick(){this.dialogRef.close()}onBrowserTargetChange(t){this.data.browserTarget=t.checked?"_blank":null}displayContentText(t){if(!t)return;const e=a.get(t,"routing[0].url"),n=a.isUndefined(e)?" (No route!)":` (/${e})`,i=a.get(t,"id"),s=a.isUndefined(i)?null:`Content: ${i}`;return(a.get(t,"version.title")||s)+n}handleContent(t){if(!t.ok||200!==t.status||a.isEmpty(t.body))return this.filteredContent=[],this.filteredContent;const e=a.get(t.body,"payload")||t.body;return a.isEmpty(e)||!Array.isArray(e)?(this.filteredContent=[],this.filteredContent):(this.filteredContent=e,this.filteredContent)}destroy(){this.treeNode.destroy().afterClosed().subscribe(t=>{t&&this.onCancelClick()})}toggleStatus(){this.treeNode.toggleStatus()}addChild(){this.treeNode.addChild()}isSelected(t){return!!this.data.content&&this.data.content.id===t.id}getSvg(t,e){return this.tree.getSvg(t,e)}getQueryUrl(t,e){const n={options:a.assignIn(this.basicContentQueryAttributesObject,this.data.api)};return t=!a.isString(t)||a.isEmpty(t)?"":t,e=a.isString(e)||a.isNumber(e)?`/${e}`:"",`${this.apiBase}${e}?limit=${this.limit}&${c.serializeUrlParams(n)}&q=${t}`}selectedOnTop(t,e){if(!t||!t.length)return t;if(!e||!e.id)return t;const n=a.clone(t),i=t.findIndex(t=>t.id===e.id);return-1===i?(n.unshift(e),n):(s.moveItemInArray(n,i,0),n)}tabIndexChange(t){this.selectedTabIndex=t}},y=C([n.Component({selector:`sa-internal-${u}`,templateUrl:`${p}/${g}/${u}.component${f}.html`}),m(1,n.Inject(o.MAT_DIALOG_DATA)),b("design:paramtypes",[o.MatDialogRef,Object,i.FormBuilder,n.ChangeDetectorRef])],y),t("TreeDialogComponent",y)}}});
|