@acorex/layout 4.2.0 → 4.2.3
Sign up to get free protection for your applications and to get access to all the features.
- 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 +441 -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 +290 -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 +1166 -0
- package/fesm2015/acorex-layout.mjs.map +1 -0
- package/fesm2020/acorex-layout.mjs +1159 -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 +51 -0
- package/lib/widget-board/widget-save.component.d.ts +19 -0
- package/lib/widget-board/widget.class.d.ts +56 -0
- package/package.json +31 -11
- package/{src/public-api.ts → public-api.d.ts} +0 -0
- 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 -10
- 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 -198
- package/src/lib/widget-board/widget-board.component.ts +0 -510
- 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 -343
- 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 -178
- 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"
|
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,198 +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
|
-
.widget-edit-overlay {
|
17
|
-
display: block;
|
18
|
-
cursor: move;
|
19
|
-
}
|
20
|
-
|
21
|
-
&.widget-dragging {
|
22
|
-
z-index: 1000;
|
23
|
-
}
|
24
|
-
|
25
|
-
&:focus {
|
26
|
-
outline-width: 1px;
|
27
|
-
outline-style: solid;
|
28
|
-
outline-color: var(--ax-primary-color);
|
29
|
-
}
|
30
|
-
|
31
|
-
touch-action: none;
|
32
|
-
user-select: none;
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
|
-
.widget-blank-placeholder {
|
37
|
-
background: var(--ax-primary-trans-light-color);
|
38
|
-
position: absolute;
|
39
|
-
}
|
40
|
-
}
|
41
|
-
|
42
|
-
.widgets-container {
|
43
|
-
position: relative;
|
44
|
-
touch-action: none;
|
45
|
-
|
46
|
-
|
47
|
-
&.rtl {
|
48
|
-
.widget-host {
|
49
|
-
.widget-options-menu {
|
50
|
-
right: unset !important;
|
51
|
-
left: 0 !important;
|
52
|
-
}
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
|
57
|
-
.widget-host {
|
58
|
-
position: absolute;
|
59
|
-
background: #fff;
|
60
|
-
box-shadow: 2px 2px 3px #dadada;
|
61
|
-
|
62
|
-
.widget-content {
|
63
|
-
width: 100%;
|
64
|
-
height: 100%;
|
65
|
-
display: flex;
|
66
|
-
flex-direction: column;
|
67
|
-
|
68
|
-
.widget-title {
|
69
|
-
padding: var(--ax-size-md);
|
70
|
-
text-align: start;
|
71
|
-
font-size: 1.5em;
|
72
|
-
position: absolute;
|
73
|
-
}
|
74
|
-
}
|
75
|
-
|
76
|
-
|
77
|
-
.widget-edit-loading {
|
78
|
-
display: none;
|
79
|
-
background: rgba(255, 255, 255, .85);
|
80
|
-
position: absolute;
|
81
|
-
width: 100%;
|
82
|
-
height: 100%;
|
83
|
-
top: 0;
|
84
|
-
left: 0;
|
85
|
-
z-index: 2;
|
86
|
-
display: flex;
|
87
|
-
}
|
88
|
-
|
89
|
-
.widget-config-overlay {
|
90
|
-
position: absolute;
|
91
|
-
background: rgba(255, 255, 255, 1);
|
92
|
-
width: 100%;
|
93
|
-
height: 100%;
|
94
|
-
top: 0;
|
95
|
-
left: 0;
|
96
|
-
z-index: 1;
|
97
|
-
padding: var(--ax-size-md);
|
98
|
-
cursor: pointer;
|
99
|
-
|
100
|
-
&:hover {
|
101
|
-
.widget-title {
|
102
|
-
text-decoration: underline;
|
103
|
-
}
|
104
|
-
}
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
.widget-title {
|
109
|
-
text-align: start;
|
110
|
-
font-size: 1.5em;
|
111
|
-
}
|
112
|
-
|
113
|
-
.widget-config-box {
|
114
|
-
align-self: center;
|
115
|
-
text-align: center;
|
116
|
-
position: absolute;
|
117
|
-
top: 50%;
|
118
|
-
left: 50%;
|
119
|
-
transform: translate(-50%, -50%);
|
120
|
-
color: var(--ax-gray-dark-color);
|
121
|
-
|
122
|
-
|
123
|
-
.config-title {
|
124
|
-
font-size: 1.2em;
|
125
|
-
margin-bottom: var(--ax-size-md);
|
126
|
-
}
|
127
|
-
|
128
|
-
.config-icon {}
|
129
|
-
}
|
130
|
-
}
|
131
|
-
|
132
|
-
.widget-edit-overlay {
|
133
|
-
display: none;
|
134
|
-
background: rgba(255, 255, 255, .5);
|
135
|
-
position: absolute;
|
136
|
-
width: 100%;
|
137
|
-
height: 100%;
|
138
|
-
top: 0;
|
139
|
-
left: 0;
|
140
|
-
z-index: 10;
|
141
|
-
|
142
|
-
.widget-edit-menu {
|
143
|
-
margin: 6px;
|
144
|
-
text-align: end;
|
145
|
-
float: inline-end;
|
146
|
-
opacity: 1;
|
147
|
-
transition: opacity 1s ease;
|
148
|
-
|
149
|
-
.widget-edit-menu-button {
|
150
|
-
display: inline-block;
|
151
|
-
background-color: #f0f0f0;
|
152
|
-
border-radius: 1px;
|
153
|
-
border: 2px solid #fff;
|
154
|
-
box-sizing: border-box;
|
155
|
-
-webkit-box-sizing: border-box;
|
156
|
-
-moz-box-sizing: border-box;
|
157
|
-
padding: 0;
|
158
|
-
height: 32px;
|
159
|
-
width: 32px;
|
160
|
-
cursor: pointer;
|
161
|
-
color: #666;
|
162
|
-
|
163
|
-
&:hover {
|
164
|
-
border-color: #a6a6a6;
|
165
|
-
background-color: #c8c8c8;
|
166
|
-
}
|
167
|
-
}
|
168
|
-
}
|
169
|
-
}
|
170
|
-
|
171
|
-
.widget-options-menu {
|
172
|
-
display: none;
|
173
|
-
position: absolute;
|
174
|
-
top: 0;
|
175
|
-
right: 0;
|
176
|
-
z-index: 2;
|
177
|
-
cursor: pointer;
|
178
|
-
padding: 2px 5px;
|
179
|
-
|
180
|
-
&:hover {
|
181
|
-
background-color: #f0f0f0;
|
182
|
-
}
|
183
|
-
}
|
184
|
-
|
185
|
-
.widget-container {
|
186
|
-
padding: 1px;
|
187
|
-
height: 100%;
|
188
|
-
|
189
|
-
&:hover {
|
190
|
-
.widget-options-menu {
|
191
|
-
display: block;
|
192
|
-
}
|
193
|
-
}
|
194
|
-
}
|
195
|
-
}
|
196
|
-
|
197
|
-
}
|
198
|
-
}
|