@acorex/layout 6.5.28 → 6.5.31
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -1
- package/acorex-layout.d.ts +5 -0
- package/esm2020/acorex-layout.mjs +5 -0
- package/esm2020/lib/widget-board/editors/widget-size-editor/widget-size.editor.mjs +46 -0
- package/esm2020/lib/widget-board/editors/widget-size-editor/widget-size.module.mjs +21 -0
- package/esm2020/lib/widget-board/widget-board.component.mjs +450 -0
- package/esm2020/lib/widget-board/widget-board.module.mjs +111 -0
- package/esm2020/lib/widget-board/widget-config.component.mjs +82 -0
- package/esm2020/lib/widget-board/widget-host.component.mjs +295 -0
- package/esm2020/lib/widget-board/widget-save.component.mjs +79 -0
- package/esm2020/lib/widget-board/widget.class.mjs +127 -0
- package/esm2020/public-api.mjs +7 -0
- package/fesm2015/acorex-layout.mjs +1180 -0
- package/fesm2015/acorex-layout.mjs.map +1 -0
- package/fesm2020/acorex-layout.mjs +1173 -0
- package/fesm2020/acorex-layout.mjs.map +1 -0
- package/lib/widget-board/editors/widget-size-editor/widget-size.editor.d.ts +19 -0
- package/lib/widget-board/editors/widget-size-editor/widget-size.module.d.ts +10 -0
- package/lib/widget-board/widget-board.component.d.ts +61 -0
- package/lib/widget-board/widget-board.module.d.ts +18 -0
- package/lib/widget-board/widget-config.component.d.ts +23 -0
- package/lib/widget-board/widget-host.component.d.ts +52 -0
- package/lib/widget-board/widget-save.component.d.ts +19 -0
- package/lib/widget-board/widget.class.d.ts +58 -0
- package/package.json +30 -10
- package/{src/public-api.ts → public-api.d.ts} +6 -6
- package/karma.conf.js +0 -32
- package/ng-package.json +0 -9
- package/src/lib/widget-board/editors/widget-size-editor/widget-size.editor.html +0 -6
- package/src/lib/widget-board/editors/widget-size-editor/widget-size.editor.ts +0 -55
- package/src/lib/widget-board/editors/widget-size-editor/widget-size.module.ts +0 -19
- package/src/lib/widget-board/widget-board.component.html +0 -7
- package/src/lib/widget-board/widget-board.component.scss +0 -200
- package/src/lib/widget-board/widget-board.component.ts +0 -521
- package/src/lib/widget-board/widget-board.module.ts +0 -74
- package/src/lib/widget-board/widget-config.component.html +0 -16
- package/src/lib/widget-board/widget-config.component.ts +0 -99
- package/src/lib/widget-board/widget-host.component.html +0 -30
- package/src/lib/widget-board/widget-host.component.ts +0 -350
- package/src/lib/widget-board/widget-save.component.html +0 -43
- package/src/lib/widget-board/widget-save.component.ts +0 -88
- package/src/lib/widget-board/widget.class.ts +0 -179
- package/src/test.ts +0 -28
- package/tsconfig.lib.json +0 -23
- package/tsconfig.lib.prod.json +0 -6
- package/tsconfig.spec.json +0 -17
- package/tslint.json +0 -17
@@ -1,55 +0,0 @@
|
|
1
|
-
import { Component, OnInit, ChangeDetectorRef } from '@angular/core';
|
2
|
-
import { AXProperyEditorComponent } from '@acorex/components';
|
3
|
-
|
4
|
-
@Component({
|
5
|
-
templateUrl: './widget-size.editor.html'
|
6
|
-
})
|
7
|
-
export class AXWidgetSizePropertyEditorComponent extends AXProperyEditorComponent<number[]> {
|
8
|
-
|
9
|
-
sizeX: number;
|
10
|
-
sizeY: number;
|
11
|
-
|
12
|
-
minX: number = 1;
|
13
|
-
maxX: number = 10;
|
14
|
-
|
15
|
-
minY: number = 1;
|
16
|
-
maxY: number = 10;
|
17
|
-
|
18
|
-
|
19
|
-
constructor(protected cdr: ChangeDetectorRef) {
|
20
|
-
super(cdr);
|
21
|
-
}
|
22
|
-
|
23
|
-
ngOnInit() {
|
24
|
-
if (Array.isArray(this.value)) {
|
25
|
-
this.sizeX = this.value[0];
|
26
|
-
this.sizeY = this.value[1];
|
27
|
-
}
|
28
|
-
else {
|
29
|
-
this.sizeX = 2;
|
30
|
-
this.sizeY = 2;
|
31
|
-
}
|
32
|
-
}
|
33
|
-
|
34
|
-
handleMinValueChange(e: any) {
|
35
|
-
this.sizeX = e.value;
|
36
|
-
|
37
|
-
if (this.sizeY > 0) {
|
38
|
-
super.handleValueChange([this.sizeX, this.sizeY]);
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
handleMaxValueChange(e: any) {
|
43
|
-
this.sizeY = e.value;
|
44
|
-
if (this.sizeX > 0) {
|
45
|
-
super.handleValueChange([this.sizeX, this.sizeY]);
|
46
|
-
}
|
47
|
-
}
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
ngAfterViewInit() {
|
52
|
-
this.onRenderCompleted.emit();
|
53
|
-
}
|
54
|
-
|
55
|
-
}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
import { NgModule } from '@angular/core';
|
2
|
-
import { CommonModule } from '@angular/common';
|
3
|
-
import { FormsModule } from '@angular/forms';
|
4
|
-
|
5
|
-
import { AXWidgetSizePropertyEditorComponent } from './widget-size.editor';
|
6
|
-
import { AXNumberBoxModule } from '@acorex/components';
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
@NgModule({
|
12
|
-
declarations: [AXWidgetSizePropertyEditorComponent],
|
13
|
-
imports: [CommonModule, FormsModule, AXNumberBoxModule],
|
14
|
-
exports: [AXWidgetSizePropertyEditorComponent],
|
15
|
-
providers: []
|
16
|
-
})
|
17
|
-
export class AXWidgetSizePropertyEditorModule {
|
18
|
-
|
19
|
-
}
|
@@ -1,7 +0,0 @@
|
|
1
|
-
<div class="widgets-container" [class.rtl]="rtl" #container>
|
2
|
-
<ax-widget-host *ngFor="let w of widgets;trackBy: trackByFn" [config]='w' [sizeX]="w.sizeX" [readonly]="readonly || w.readonly"
|
3
|
-
[sizeY]="w.sizeY" [col]="w.col" [row]="w.row" (onRemove)="handleOnRemove($event)" (onSave)="handleOnSave($event)"
|
4
|
-
(onConfigChanged)="handleOnConfigChanged($event)" (onResized)="handleOnResizedChanged($event)"
|
5
|
-
[provideValue]="provideValue">
|
6
|
-
</ax-widget-host>
|
7
|
-
</div>
|
@@ -1,200 +0,0 @@
|
|
1
|
-
.widget-board {
|
2
|
-
display: inline-block;
|
3
|
-
margin: 15px 20px 15px 20px;
|
4
|
-
min-width: calc(100% - 40px);
|
5
|
-
min-height: calc(100% - 34px);
|
6
|
-
--animate-duration: 0.5s;
|
7
|
-
background-repeat: no-repeat;
|
8
|
-
|
9
|
-
&.grid-background {
|
10
|
-
|
11
|
-
background-repeat: repeat !important;
|
12
|
-
.widgets-container {
|
13
|
-
.widget-host {
|
14
|
-
touch-action: none;
|
15
|
-
|
16
|
-
|
17
|
-
.widget-edit-overlay {
|
18
|
-
display: block;
|
19
|
-
cursor: move;
|
20
|
-
}
|
21
|
-
|
22
|
-
&.widget-dragging {
|
23
|
-
z-index: 1000;
|
24
|
-
}
|
25
|
-
|
26
|
-
&:focus {
|
27
|
-
outline-width: 1px;
|
28
|
-
outline-style: solid;
|
29
|
-
outline-color: var(--ax-primary-color);
|
30
|
-
}
|
31
|
-
|
32
|
-
touch-action: none;
|
33
|
-
user-select: none;
|
34
|
-
}
|
35
|
-
}
|
36
|
-
|
37
|
-
.widget-blank-placeholder {
|
38
|
-
background: var(--ax-primary-trans-light-color);
|
39
|
-
position: absolute;
|
40
|
-
}
|
41
|
-
}
|
42
|
-
|
43
|
-
.widgets-container {
|
44
|
-
position: relative;
|
45
|
-
touch-action: none;
|
46
|
-
|
47
|
-
|
48
|
-
&.rtl {
|
49
|
-
.widget-host {
|
50
|
-
.widget-options-menu {
|
51
|
-
right: unset !important;
|
52
|
-
left: 0 !important;
|
53
|
-
}
|
54
|
-
}
|
55
|
-
}
|
56
|
-
|
57
|
-
|
58
|
-
.widget-host {
|
59
|
-
position: absolute;
|
60
|
-
background: #fff;
|
61
|
-
box-shadow: 2px 2px 3px #dadada;
|
62
|
-
z-index: 0;
|
63
|
-
|
64
|
-
.widget-content {
|
65
|
-
width: 100%;
|
66
|
-
height: 100%;
|
67
|
-
display: flex;
|
68
|
-
flex-direction: column;
|
69
|
-
|
70
|
-
.widget-title {
|
71
|
-
padding: var(--ax-size-md);
|
72
|
-
text-align: start;
|
73
|
-
font-size: 1.5em;
|
74
|
-
position: absolute;
|
75
|
-
}
|
76
|
-
}
|
77
|
-
|
78
|
-
|
79
|
-
.widget-edit-loading {
|
80
|
-
display: none;
|
81
|
-
background: rgba(255, 255, 255, .85);
|
82
|
-
position: absolute;
|
83
|
-
width: 100%;
|
84
|
-
height: 100%;
|
85
|
-
top: 0;
|
86
|
-
left: 0;
|
87
|
-
z-index: 2;
|
88
|
-
display: flex;
|
89
|
-
}
|
90
|
-
|
91
|
-
.widget-config-overlay {
|
92
|
-
position: absolute;
|
93
|
-
background: rgba(255, 255, 255, 1);
|
94
|
-
width: 100%;
|
95
|
-
height: 100%;
|
96
|
-
top: 0;
|
97
|
-
left: 0;
|
98
|
-
z-index: 1;
|
99
|
-
padding: var(--ax-size-md);
|
100
|
-
cursor: pointer;
|
101
|
-
|
102
|
-
&:hover {
|
103
|
-
.widget-title {
|
104
|
-
text-decoration: underline;
|
105
|
-
}
|
106
|
-
}
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
.widget-title {
|
111
|
-
text-align: start;
|
112
|
-
font-size: 1.5em;
|
113
|
-
}
|
114
|
-
|
115
|
-
.widget-config-box {
|
116
|
-
align-self: center;
|
117
|
-
text-align: center;
|
118
|
-
position: absolute;
|
119
|
-
top: 50%;
|
120
|
-
left: 50%;
|
121
|
-
transform: translate(-50%, -50%);
|
122
|
-
color: var(--ax-gray-dark-color);
|
123
|
-
|
124
|
-
|
125
|
-
.config-title {
|
126
|
-
font-size: 1.2em;
|
127
|
-
margin-bottom: var(--ax-size-md);
|
128
|
-
}
|
129
|
-
|
130
|
-
.config-icon {}
|
131
|
-
}
|
132
|
-
}
|
133
|
-
|
134
|
-
.widget-edit-overlay {
|
135
|
-
display: none;
|
136
|
-
background: rgba(255, 255, 255, .5);
|
137
|
-
position: absolute;
|
138
|
-
width: 100%;
|
139
|
-
height: 100%;
|
140
|
-
top: 0;
|
141
|
-
left: 0;
|
142
|
-
z-index: 10;
|
143
|
-
|
144
|
-
.widget-edit-menu {
|
145
|
-
margin: 6px;
|
146
|
-
text-align: end;
|
147
|
-
float: inline-end;
|
148
|
-
opacity: 1;
|
149
|
-
transition: opacity 1s ease;
|
150
|
-
|
151
|
-
.widget-edit-menu-button {
|
152
|
-
display: inline-block;
|
153
|
-
background-color: #f0f0f0;
|
154
|
-
border-radius: 1px;
|
155
|
-
border: 2px solid #fff;
|
156
|
-
box-sizing: border-box;
|
157
|
-
-webkit-box-sizing: border-box;
|
158
|
-
-moz-box-sizing: border-box;
|
159
|
-
padding: 0;
|
160
|
-
height: 32px;
|
161
|
-
width: 32px;
|
162
|
-
cursor: pointer;
|
163
|
-
color: #666;
|
164
|
-
|
165
|
-
&:hover {
|
166
|
-
border-color: #a6a6a6;
|
167
|
-
background-color: #c8c8c8;
|
168
|
-
}
|
169
|
-
}
|
170
|
-
}
|
171
|
-
}
|
172
|
-
|
173
|
-
.widget-options-menu {
|
174
|
-
display: none;
|
175
|
-
position: absolute;
|
176
|
-
top: 0;
|
177
|
-
right: 0;
|
178
|
-
z-index: 2;
|
179
|
-
cursor: pointer;
|
180
|
-
padding: 2px 5px;
|
181
|
-
|
182
|
-
&:hover {
|
183
|
-
background-color: #f0f0f0;
|
184
|
-
}
|
185
|
-
}
|
186
|
-
|
187
|
-
.widget-container {
|
188
|
-
padding: 1px;
|
189
|
-
height: 100%;
|
190
|
-
|
191
|
-
&:hover {
|
192
|
-
.widget-options-menu {
|
193
|
-
display: block;
|
194
|
-
}
|
195
|
-
}
|
196
|
-
}
|
197
|
-
}
|
198
|
-
|
199
|
-
}
|
200
|
-
}
|