ngx-axis-appforge 0.0.2 → 0.0.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.
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<nz-splitter [nzLayout]="options.direction()" [nzLazy]="options.lazy()">
|
|
2
2
|
@for (item of panels(); track $index;let i=$index) {
|
|
3
3
|
@if (item.inuse()) {
|
|
4
|
-
<nz-splitter-panel [nzCollapsible]="item.collapsible()" [nzDefaultSize]="item.defaultSize()
|
|
5
|
-
[nzMax]="item.max()" [nzResizable]="item.resizable()">
|
|
4
|
+
<nz-splitter-panel [nzCollapsible]="item.collapsible()" [nzDefaultSize]="convertSize(item.defaultSize())"
|
|
5
|
+
[nzMin]="convertSize(item.min())" [nzMax]="convertSize(item.max())" [nzResizable]="item.resizable()">
|
|
6
6
|
<div [attr.data-index]="i" style="height: 100%;">
|
|
7
7
|
<ng-container [axisDynamic]="item.child()"></ng-container>
|
|
8
8
|
</div>
|
|
@@ -9,9 +9,9 @@ export class SplitterOptions extends BaseOptions {
|
|
|
9
9
|
|
|
10
10
|
export class SplitterPanelOptions {
|
|
11
11
|
readonly inuse = signal(true);
|
|
12
|
-
readonly defaultSize = signal<
|
|
13
|
-
readonly min = signal<
|
|
14
|
-
readonly max = signal<
|
|
12
|
+
readonly defaultSize = signal<string | undefined>(undefined);
|
|
13
|
+
readonly min = signal<string | undefined>(undefined);
|
|
14
|
+
readonly max = signal<string | undefined>(undefined);
|
|
15
15
|
readonly collapsible = signal(true);
|
|
16
16
|
readonly resizable = signal(true);
|
|
17
17
|
readonly child = signal<any>(undefined);
|
|
@@ -26,4 +26,15 @@ export class Splitter extends Base<SplitterOptions> {
|
|
|
26
26
|
private buildPanels(): SplitterPanelOptions[] {
|
|
27
27
|
return this.options.panels().map(_ => new SplitterPanelOptions());
|
|
28
28
|
}
|
|
29
|
+
|
|
30
|
+
convertSize(value: string | undefined): number | string | undefined {
|
|
31
|
+
if (value) {
|
|
32
|
+
if (value.endsWith("%")) {
|
|
33
|
+
return value;
|
|
34
|
+
} else {
|
|
35
|
+
return parseInt(value.replace("px", ""));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
29
40
|
}
|
package/ng-package.json
CHANGED