@dataworkz/crystal 0.1.0-beta.6 → 0.1.0-beta.8
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/CHANGELOG.md +19 -0
- package/fesm2022/dataworkz-crystal.mjs +218 -8
- package/fesm2022/dataworkz-crystal.mjs.map +1 -1
- package/index.d.ts +139 -10
- package/package.json +1 -1
- package/styles/components/data.css +12 -0
- package/styles/components/form.css +10 -1
package/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as _angular_core from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, EnvironmentProviders, OnDestroy, TemplateRef, OnInit } from '@angular/core';
|
|
3
3
|
import { StorageIconSet, DwPrimeIcon } from '@dataworkz/crystal/icons';
|
|
4
4
|
export { DW_ICON_NAMES, DW_ICON_PREFIX, DwIconName, DwPrimeIcon, IconName, dwIconName, icon } from '@dataworkz/crystal/icons';
|
|
5
|
-
import { ValidationErrors,
|
|
5
|
+
import { ValidationErrors, AbstractControl, NgModel, NgControl, ControlValueAccessor } from '@angular/forms';
|
|
6
6
|
import { MenuItem, SortMeta, SortEvent } from 'primeng/api';
|
|
7
7
|
import { UrlTree } from '@angular/router';
|
|
8
8
|
import { CdkDragDrop } from '@angular/cdk/drag-drop';
|
|
@@ -449,7 +449,7 @@ declare class DwAvatarComponent {
|
|
|
449
449
|
readonly name: _angular_core.InputSignal<string | null>;
|
|
450
450
|
readonly initials: _angular_core.InputSignal<DwInitialsStrategy>;
|
|
451
451
|
readonly src: _angular_core.InputSignal<string | null>;
|
|
452
|
-
readonly size: _angular_core.InputSignal<"sm" | "md" | "
|
|
452
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | "xs" | "lg">;
|
|
453
453
|
/** Colour of the tile; neutral grey by default. */
|
|
454
454
|
readonly tint: _angular_core.InputSignal<DwAvatarTint>;
|
|
455
455
|
readonly presence: _angular_core.InputSignal<boolean | null>;
|
|
@@ -487,7 +487,7 @@ declare class DwEntityIconComponent {
|
|
|
487
487
|
readonly src: _angular_core.InputSignal<string | null>;
|
|
488
488
|
readonly fallback: _angular_core.InputSignal<string | undefined>;
|
|
489
489
|
readonly storageSet: _angular_core.InputSignal<StorageIconSet>;
|
|
490
|
-
readonly size: _angular_core.InputSignal<"sm" | "md" | "
|
|
490
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | "xs" | "lg" | "xl">;
|
|
491
491
|
readonly framed: _angular_core.InputSignal<boolean>;
|
|
492
492
|
readonly tint: _angular_core.InputSignal<DwEntityTint>;
|
|
493
493
|
readonly alt: _angular_core.InputSignal<string>;
|
|
@@ -540,7 +540,7 @@ declare function provideCrystalIconResolvers(resolvers: DwIconResolvers): Enviro
|
|
|
540
540
|
* ```
|
|
541
541
|
*/
|
|
542
542
|
declare class DwSpinnerComponent {
|
|
543
|
-
readonly size: _angular_core.InputSignal<"sm" | "md" | "
|
|
543
|
+
readonly size: _angular_core.InputSignal<"sm" | "md" | "xs" | "lg">;
|
|
544
544
|
readonly mode: _angular_core.InputSignal<"inline" | "block" | "overlay" | "fullscreen">;
|
|
545
545
|
readonly label: _angular_core.InputSignal<string>;
|
|
546
546
|
readonly hostClasses: _angular_core.Signal<string>;
|
|
@@ -638,7 +638,7 @@ declare class DwEmptyStateComponent {
|
|
|
638
638
|
readonly imageWidth: _angular_core.InputSignal<string>;
|
|
639
639
|
readonly title: _angular_core.InputSignal<string>;
|
|
640
640
|
readonly text: _angular_core.InputSignal<string>;
|
|
641
|
-
readonly tone: _angular_core.InputSignal<"
|
|
641
|
+
readonly tone: _angular_core.InputSignal<"default" | "error">;
|
|
642
642
|
readonly size: _angular_core.InputSignal<"default" | "inline" | "compact">;
|
|
643
643
|
readonly hostClasses: _angular_core.Signal<string>;
|
|
644
644
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwEmptyStateComponent, never>;
|
|
@@ -963,7 +963,7 @@ declare class DwFieldComponent {
|
|
|
963
963
|
readonly help: _angular_core.InputSignal<string>;
|
|
964
964
|
readonly layout: _angular_core.InputSignal<"inline" | "stacked">;
|
|
965
965
|
readonly labelWidth: _angular_core.InputSignal<string>;
|
|
966
|
-
readonly control: _angular_core.InputSignal<
|
|
966
|
+
readonly control: _angular_core.InputSignal<AbstractControl<any, any, any> | NgModel | NgControl | null>;
|
|
967
967
|
/** Per-field message overrides by validator key. */
|
|
968
968
|
readonly errors: _angular_core.InputSignal<Record<string, string> | null>;
|
|
969
969
|
/** Manual error message (template-driven forms or server errors). */
|
|
@@ -1198,6 +1198,10 @@ declare const DW_MENU_PLAIN_GROUP = "dw-menu-plain-group";
|
|
|
1198
1198
|
* <!-- external trigger -->
|
|
1199
1199
|
* <dw-button label="Create" trailingIcon="pi pi-chevron-down" (clicked)="createMenu.toggle($event)" />
|
|
1200
1200
|
* <dw-menu #createMenu [items]="createItems" trigger="none" />
|
|
1201
|
+
*
|
|
1202
|
+
* <!-- context menu: opens at the pointer; commands get what was right-clicked -->
|
|
1203
|
+
* <div (contextmenu)="rowMenu.openAt($event, row)">…</div>
|
|
1204
|
+
* <dw-menu #rowMenu [items]="rowItems" trigger="none" />
|
|
1201
1205
|
* ```
|
|
1202
1206
|
* Items with `danger: true` are styled red and separated from the rest.
|
|
1203
1207
|
*
|
|
@@ -1224,6 +1228,8 @@ declare class DwMenuComponent<T = unknown> {
|
|
|
1224
1228
|
readonly closed: _angular_core.OutputEmitterRef<void>;
|
|
1225
1229
|
readonly itemClick: _angular_core.OutputEmitterRef<DwMenuItem<T>>;
|
|
1226
1230
|
readonly open: _angular_core.WritableSignal<boolean>;
|
|
1231
|
+
/** Set by `openAt`: where the panel goes and the context its commands get, until opened another way. */
|
|
1232
|
+
private readonly atPoint;
|
|
1227
1233
|
readonly header: _angular_core.Signal<DwMenuHeaderDirective | undefined>;
|
|
1228
1234
|
private readonly listMenu;
|
|
1229
1235
|
private readonly tieredMenu;
|
|
@@ -1231,6 +1237,12 @@ declare class DwMenuComponent<T = unknown> {
|
|
|
1231
1237
|
readonly model: _angular_core.Signal<MenuItem[]>;
|
|
1232
1238
|
toggle(event: Event): void;
|
|
1233
1239
|
show(event: Event): void;
|
|
1240
|
+
/**
|
|
1241
|
+
* Opens the menu as a context menu: at the pointer (kept inside the viewport) instead of under a trigger, without the
|
|
1242
|
+
* browser's own menu. Commands receive `context` (what was right-clicked) instead of the `context` input. Opening
|
|
1243
|
+
* it again while it is open moves it.
|
|
1244
|
+
*/
|
|
1245
|
+
openAt(event: MouseEvent, context?: T | null): void;
|
|
1234
1246
|
hide(): void;
|
|
1235
1247
|
onShow(): void;
|
|
1236
1248
|
onHide(): void;
|
|
@@ -1243,6 +1255,8 @@ declare class DwMenuComponent<T = unknown> {
|
|
|
1243
1255
|
private groupLooseItems;
|
|
1244
1256
|
private toMenuItems;
|
|
1245
1257
|
private toMenuItem;
|
|
1258
|
+
/** Puts the panel's corner at the pointer, flipping left / up where it would leave the viewport. */
|
|
1259
|
+
private placeAtPoint;
|
|
1246
1260
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwMenuComponent<any>, never>;
|
|
1247
1261
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwMenuComponent<any>, "dw-menu", never, { "items": { "alias": "items"; "required": false; "isSignal": true; }; "context": { "alias": "context"; "required": false; "isSignal": true; }; "trigger": { "alias": "trigger"; "required": false; "isSignal": true; }; "triggerIcon": { "alias": "triggerIcon"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "triggerVariant": { "alias": "triggerVariant"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "appendTo": { "alias": "appendTo"; "required": false; "isSignal": true; }; "styleClass": { "alias": "styleClass"; "required": false; "isSignal": true; }; "testId": { "alias": "testId"; "required": false; "isSignal": true; }; "mode": { "alias": "mode"; "required": false; "isSignal": true; }; }, { "opened": "opened"; "closed": "closed"; "itemClick": "itemClick"; }, ["header"], never, true, never>;
|
|
1248
1262
|
}
|
|
@@ -2781,6 +2795,7 @@ type DwDateValue = Date | (Date | null)[];
|
|
|
2781
2795
|
* <dw-date-picker dateFormat="yy-mm-dd" [maxDate]="today" placeholder="Start date" formControlName="start" />
|
|
2782
2796
|
* <dw-date-picker [showTime]="true" [showSeconds]="true" [showIcon]="true" [(ngModel)]="runAt" (changed)="save()" />
|
|
2783
2797
|
* <dw-date-picker [inline]="true" selectionMode="range" [numberOfMonths]="2" [compact]="true" [(value)]="range" />
|
|
2798
|
+
* <dw-date-picker [inline]="true" [flush]="true" [fluid]="true" [(ngModel)]="expiry" />
|
|
2784
2799
|
* ```
|
|
2785
2800
|
*/
|
|
2786
2801
|
declare class DwDatePickerComponent<T extends DwDateValue = Date> extends DwFormControl<T> {
|
|
@@ -2795,7 +2810,7 @@ declare class DwDatePickerComponent<T extends DwDateValue = Date> extends DwForm
|
|
|
2795
2810
|
readonly minDate: _angular_core.InputSignal<Date | null | undefined>;
|
|
2796
2811
|
readonly maxDate: _angular_core.InputSignal<Date | null | undefined>;
|
|
2797
2812
|
/** One date, a start and an end (`range`), or any number of dates (`multiple`). */
|
|
2798
|
-
readonly selectionMode: _angular_core.InputSignal<"single" | "
|
|
2813
|
+
readonly selectionMode: _angular_core.InputSignal<"single" | "multiple" | "range">;
|
|
2799
2814
|
/** Shows the calendar itself, always open, instead of a field. */
|
|
2800
2815
|
readonly inline: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2801
2816
|
readonly numberOfMonths: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
@@ -2808,11 +2823,17 @@ declare class DwDatePickerComponent<T extends DwDateValue = Date> extends DwForm
|
|
|
2808
2823
|
readonly showClear: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2809
2824
|
/** Smaller day cells, type and time picker, for a calendar inside a popover or a narrow panel. */
|
|
2810
2825
|
readonly compact: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2826
|
+
/**
|
|
2827
|
+
* An inline calendar without a box of its own (border, fill, radius, padding): it sits on its container's surface,
|
|
2828
|
+
* a popover's or a panel's, which pads it. Inline only.
|
|
2829
|
+
*/
|
|
2830
|
+
readonly flush: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2811
2831
|
/** The calendar's z-index floor, for a picker inside an overlay that sits above crystal's own layers. */
|
|
2812
2832
|
readonly baseZIndex: _angular_core.InputSignalWithTransform<number, unknown>;
|
|
2813
2833
|
readonly inputId: _angular_core.InputSignal<string | undefined>;
|
|
2814
2834
|
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
2815
2835
|
readonly size: _angular_core.InputSignal<DwControlSize>;
|
|
2836
|
+
/** Fills its container: the field, or the inline calendar. */
|
|
2816
2837
|
readonly fluid: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2817
2838
|
/** A day (or time) was picked in the calendar; `changed` also follows typing. */
|
|
2818
2839
|
readonly selected: _angular_core.OutputEmitterRef<Date>;
|
|
@@ -2824,7 +2845,7 @@ declare class DwDatePickerComponent<T extends DwDateValue = Date> extends DwForm
|
|
|
2824
2845
|
private readonly prime;
|
|
2825
2846
|
constructor();
|
|
2826
2847
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwDatePickerComponent<any>, never>;
|
|
2827
|
-
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwDatePickerComponent<any>, "dw-date-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "numberOfMonths": { "alias": "numberOfMonths"; "required": false; "isSignal": true; }; "showOtherMonths": { "alias": "showOtherMonths"; "required": false; "isSignal": true; }; "showIcon": { "alias": "showIcon"; "required": false; "isSignal": true; }; "iconDisplay": { "alias": "iconDisplay"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "focused": "focused"; "blurred": "blurred"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
2848
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwDatePickerComponent<any>, "dw-date-picker", never, { "placeholder": { "alias": "placeholder"; "required": false; "isSignal": true; }; "dateFormat": { "alias": "dateFormat"; "required": false; "isSignal": true; }; "showTime": { "alias": "showTime"; "required": false; "isSignal": true; }; "showSeconds": { "alias": "showSeconds"; "required": false; "isSignal": true; }; "hourFormat": { "alias": "hourFormat"; "required": false; "isSignal": true; }; "minDate": { "alias": "minDate"; "required": false; "isSignal": true; }; "maxDate": { "alias": "maxDate"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "inline": { "alias": "inline"; "required": false; "isSignal": true; }; "numberOfMonths": { "alias": "numberOfMonths"; "required": false; "isSignal": true; }; "showOtherMonths": { "alias": "showOtherMonths"; "required": false; "isSignal": true; }; "showIcon": { "alias": "showIcon"; "required": false; "isSignal": true; }; "iconDisplay": { "alias": "iconDisplay"; "required": false; "isSignal": true; }; "showClear": { "alias": "showClear"; "required": false; "isSignal": true; }; "compact": { "alias": "compact"; "required": false; "isSignal": true; }; "flush": { "alias": "flush"; "required": false; "isSignal": true; }; "baseZIndex": { "alias": "baseZIndex"; "required": false; "isSignal": true; }; "inputId": { "alias": "inputId"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "size": { "alias": "size"; "required": false; "isSignal": true; }; "fluid": { "alias": "fluid"; "required": false; "isSignal": true; }; }, { "selected": "selected"; "focused": "focused"; "blurred": "blurred"; "opened": "opened"; "closed": "closed"; }, never, never, true, never>;
|
|
2828
2849
|
}
|
|
2829
2850
|
|
|
2830
2851
|
type DwChartType = 'line' | 'bar' | 'doughnut' | 'pie' | 'polarArea' | 'radar' | 'scatter' | 'bubble';
|
|
@@ -2875,6 +2896,114 @@ declare class DwChartComponent {
|
|
|
2875
2896
|
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwChartComponent, "dw-chart", never, { "type": { "alias": "type"; "required": true; "isSignal": true; }; "data": { "alias": "data"; "required": false; "isSignal": true; }; "options": { "alias": "options"; "required": false; "isSignal": true; }; "plugins": { "alias": "plugins"; "required": false; "isSignal": true; }; "width": { "alias": "width"; "required": false; "isSignal": true; }; "height": { "alias": "height"; "required": false; "isSignal": true; }; "responsive": { "alias": "responsive"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; }, { "dataSelect": "dataSelect"; }, never, never, true, never>;
|
|
2876
2897
|
}
|
|
2877
2898
|
|
|
2899
|
+
/**
|
|
2900
|
+
* A node of a `dw-tree`. `children` are its sub-nodes; a node with `leaf: false` and no children yet shows an expand
|
|
2901
|
+
* toggle, for children loaded when it opens (`nodeExpand`). The tree sets `expanded`, `parent` and, for checkboxes,
|
|
2902
|
+
* `partialSelected` as the user works it.
|
|
2903
|
+
*/
|
|
2904
|
+
interface DwTreeNode<T = unknown> {
|
|
2905
|
+
/** Unique among the tree's nodes; selection and re-renders match nodes by it. */
|
|
2906
|
+
key?: string;
|
|
2907
|
+
label?: string;
|
|
2908
|
+
data?: T;
|
|
2909
|
+
/** A `pi pi-…` icon before the label; `expandedIcon` / `collapsedIcon` swap it as the node opens. */
|
|
2910
|
+
icon?: string;
|
|
2911
|
+
expandedIcon?: string;
|
|
2912
|
+
collapsedIcon?: string;
|
|
2913
|
+
children?: DwTreeNode<T>[];
|
|
2914
|
+
/** `false`: can be expanded although it has no children yet. */
|
|
2915
|
+
leaf?: boolean;
|
|
2916
|
+
expanded?: boolean;
|
|
2917
|
+
/** `false`: shown, but cannot be selected. */
|
|
2918
|
+
selectable?: boolean;
|
|
2919
|
+
/** Shows a spinner in place of the toggle while its children load. */
|
|
2920
|
+
loading?: boolean;
|
|
2921
|
+
partialSelected?: boolean;
|
|
2922
|
+
parent?: DwTreeNode<T>;
|
|
2923
|
+
/** A class on the node's row, for the screen's own layout of its content. */
|
|
2924
|
+
styleClass?: string;
|
|
2925
|
+
}
|
|
2926
|
+
/** The node a `dw-tree` event is about, with the browser event that caused it. */
|
|
2927
|
+
interface DwTreeNodeEvent<T = unknown> {
|
|
2928
|
+
originalEvent: Event;
|
|
2929
|
+
node: DwTreeNode<T>;
|
|
2930
|
+
}
|
|
2931
|
+
/** What a tree selects: one node (`single`), or a list of them (`multiple`, `checkbox`). */
|
|
2932
|
+
type DwTreeSelection<T = unknown> = DwTreeNode<T> | DwTreeNode<T>[] | null;
|
|
2933
|
+
/**
|
|
2934
|
+
* A node's content, instead of its label: `<ng-template dwTreeNode let-node>…</ng-template>`. `node` is the
|
|
2935
|
+
* `DwTreeNode`, untyped in the template (as in PrimeNG's own), so it can read the screen's own `data`.
|
|
2936
|
+
*/
|
|
2937
|
+
declare class DwTreeNodeDirective {
|
|
2938
|
+
readonly template: TemplateRef<{
|
|
2939
|
+
$implicit: DwTreeNode;
|
|
2940
|
+
}>;
|
|
2941
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwTreeNodeDirective, never>;
|
|
2942
|
+
static ɵdir: _angular_core.ɵɵDirectiveDeclaration<DwTreeNodeDirective, "ng-template[dwTreeNode]", never, {}, {}, never, never, true, never>;
|
|
2943
|
+
}
|
|
2944
|
+
/**
|
|
2945
|
+
* Crystal's tree, PrimeNG's Tree underneath, which the app never imports. Nodes open and close with their toggle or the
|
|
2946
|
+
* arrow keys; a tree can select one node, several (with modifier keys), or check them (`checkbox`, where checking a
|
|
2947
|
+
* parent checks its children and a parent of partly checked children shows a dash).
|
|
2948
|
+
*
|
|
2949
|
+
* Children can load when a node opens: give it `leaf: false`, then fill `children` in `nodeExpand` (set `loading` on
|
|
2950
|
+
* the node meanwhile). `contextMenu` takes a `dw-menu` (`trigger="none"`) that opens at the pointer on right-click, its
|
|
2951
|
+
* commands receiving the node.
|
|
2952
|
+
*
|
|
2953
|
+
* The tree has no box of its own and sits on its container; `framed` gives it a border and padding, and
|
|
2954
|
+
* `scrollHeight` a height after which it scrolls. `.dw-tree` (no `-view`) is the markup-only guide-line tree for
|
|
2955
|
+
* hand-built lists.
|
|
2956
|
+
*
|
|
2957
|
+
* ```html
|
|
2958
|
+
* <dw-tree [value]="folders" selectionMode="single" [(selection)]="folder" (nodeExpand)="loadChildren($event.node)" />
|
|
2959
|
+
* <dw-tree [value]="privileges" selectionMode="checkbox" [(selection)]="granted" scrollHeight="320px" [framed]="true" />
|
|
2960
|
+
* <dw-tree [value]="dirs" [contextMenu]="dirMenu" ariaLabel="Directories">
|
|
2961
|
+
* <ng-template dwTreeNode let-node><span class="dw-truncate">{{ node.label }}</span></ng-template>
|
|
2962
|
+
* </dw-tree>
|
|
2963
|
+
* <dw-menu #dirMenu [items]="dirActions" trigger="none" />
|
|
2964
|
+
* ```
|
|
2965
|
+
*/
|
|
2966
|
+
declare class DwTreeComponent<T = unknown> {
|
|
2967
|
+
readonly value: _angular_core.InputSignal<DwTreeNode<T>[] | null | undefined>;
|
|
2968
|
+
/** No selection (`null`), one node, several with Ctrl / Cmd and Shift (`multiple`), or checkboxes. */
|
|
2969
|
+
readonly selectionMode: _angular_core.InputSignal<"single" | "multiple" | "checkbox" | null>;
|
|
2970
|
+
/** The selected node, or nodes (`multiple`, `checkbox`). */
|
|
2971
|
+
readonly selection: _angular_core.ModelSignal<DwTreeSelection<T>>;
|
|
2972
|
+
/** Checkboxes: checking a node checks its children, and its parent once all of them are. */
|
|
2973
|
+
readonly propagateSelection: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2974
|
+
/** A loading state for the whole tree, its nodes dimmed under a spinner (`mask`), or a spinner beside them (`icon`). */
|
|
2975
|
+
readonly loading: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2976
|
+
readonly loadingMode: _angular_core.InputSignal<"mask" | "icon">;
|
|
2977
|
+
/** A CSS height after which the tree scrolls (`320px`, `calc(100vh - 250px)`); it grows with its nodes when omitted. */
|
|
2978
|
+
readonly scrollHeight: _angular_core.InputSignal<string | undefined>;
|
|
2979
|
+
/** Shown when there are no nodes. */
|
|
2980
|
+
readonly emptyMessage: _angular_core.InputSignal<string>;
|
|
2981
|
+
readonly ariaLabel: _angular_core.InputSignal<string | undefined>;
|
|
2982
|
+
/** A border, radius and padding around the tree, for one that is not already inside a framed surface. */
|
|
2983
|
+
readonly framed: _angular_core.InputSignalWithTransform<boolean, unknown>;
|
|
2984
|
+
/** A `dw-menu` (`trigger="none"`) opened at the pointer when a node is right-clicked; its commands get the node. */
|
|
2985
|
+
readonly contextMenu: _angular_core.InputSignal<DwMenuComponent<DwTreeNode<T>> | undefined>;
|
|
2986
|
+
readonly nodeSelect: _angular_core.OutputEmitterRef<DwTreeNodeEvent<T>>;
|
|
2987
|
+
readonly nodeUnselect: _angular_core.OutputEmitterRef<DwTreeNodeEvent<T>>;
|
|
2988
|
+
/** A node opened: the moment to load its children. */
|
|
2989
|
+
readonly nodeExpand: _angular_core.OutputEmitterRef<DwTreeNodeEvent<T>>;
|
|
2990
|
+
readonly nodeCollapse: _angular_core.OutputEmitterRef<DwTreeNodeEvent<T>>;
|
|
2991
|
+
/** A node was right-clicked, with `contextMenu` set; the menu is opening. */
|
|
2992
|
+
readonly nodeContextMenu: _angular_core.OutputEmitterRef<DwTreeNodeEvent<T>>;
|
|
2993
|
+
protected readonly nodeTemplate: _angular_core.Signal<DwTreeNodeDirective | undefined>;
|
|
2994
|
+
/**
|
|
2995
|
+
* PrimeNG shows its context menu itself, before saying which node it is for; it gets this stand-in, and the
|
|
2996
|
+
* `dw-menu` opens once the node is known (`openMenu`).
|
|
2997
|
+
*/
|
|
2998
|
+
protected readonly menuBridge: _angular_core.Signal<{
|
|
2999
|
+
show: () => undefined;
|
|
3000
|
+
hide: () => void | undefined;
|
|
3001
|
+
} | undefined>;
|
|
3002
|
+
protected openMenu(event: DwTreeNodeEvent<T>): void;
|
|
3003
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<DwTreeComponent<any>, never>;
|
|
3004
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<DwTreeComponent<any>, "dw-tree", never, { "value": { "alias": "value"; "required": false; "isSignal": true; }; "selectionMode": { "alias": "selectionMode"; "required": false; "isSignal": true; }; "selection": { "alias": "selection"; "required": false; "isSignal": true; }; "propagateSelection": { "alias": "propagateSelection"; "required": false; "isSignal": true; }; "loading": { "alias": "loading"; "required": false; "isSignal": true; }; "loadingMode": { "alias": "loadingMode"; "required": false; "isSignal": true; }; "scrollHeight": { "alias": "scrollHeight"; "required": false; "isSignal": true; }; "emptyMessage": { "alias": "emptyMessage"; "required": false; "isSignal": true; }; "ariaLabel": { "alias": "ariaLabel"; "required": false; "isSignal": true; }; "framed": { "alias": "framed"; "required": false; "isSignal": true; }; "contextMenu": { "alias": "contextMenu"; "required": false; "isSignal": true; }; }, { "selection": "selectionChange"; "nodeSelect": "nodeSelect"; "nodeUnselect": "nodeUnselect"; "nodeExpand": "nodeExpand"; "nodeCollapse": "nodeCollapse"; "nodeContextMenu": "nodeContextMenu"; }, ["nodeTemplate"], never, true, never>;
|
|
3005
|
+
}
|
|
3006
|
+
|
|
2878
3007
|
/**
|
|
2879
3008
|
* Backend timestamp normalization.
|
|
2880
3009
|
*
|
|
@@ -3422,5 +3551,5 @@ declare function installCrystalHostTheme({ fonts }?: CrystalHostThemeOptions): v
|
|
|
3422
3551
|
/** Removes the host theme again (e.g. a host that unloads crystal, or a test). */
|
|
3423
3552
|
declare function removeCrystalHostTheme(): void;
|
|
3424
3553
|
|
|
3425
|
-
export { DW_APP_FIELD_MESSAGES, DW_CLOCK_TICK_MS, DW_CRYSTAL_CONFIG, DW_DIALOG, DW_DRAWER, DW_FIELD_MESSAGES, DW_HOST_THEME_ATTR, DW_ICON_RESOLVERS, DW_INPUT, DW_IN_PROGRESS_STATUSES, DW_LAYOUT, DW_MENU_PLAIN_GROUP, DW_OVERLAY_ANCHOR_ATTR, DW_OVERLAY_ANCHOR_GAP, DW_POPOVER, DW_RESERVED_ICON_PREFIX, DW_STATUS_TONES, DW_TABLE, DW_TAG_PALETTE, DW_THEME_STORAGE_KEY, DW_TOGGLE_CARD, DwActionBarComponent, DwAvatarComponent, DwBadgeComponent, DwBannerComponent, DwBoxComponent, DwBreadcrumbComponent, DwButtonComponent, DwCardComponent, DwCellDirective, DwChartComponent, DwCheckToggleComponent, DwCheckboxComponent, DwChipComponent, DwClockService, DwColumnPickerComponent, DwConfirmDialogComponent, DwConfirmHostComponent, DwConfirmService, DwCopyButtonComponent, DwDatePickerComponent, DwDialogComponent, DwDialogFooterDirective, DwDialogHeaderDirective, DwDialogTitleSuffixDirective, DwDividerComponent, DwDrawerComponent, DwDrawerFooterDirective, DwDrawerHeaderDirective, DwDrawerSubheaderDirective, DwEmptyStateComponent, DwEntityIconComponent, DwFieldComponent, DwFileDropzoneComponent, DwFileListComponent, DwFormControl, DwFormSectionHeaderComponent, DwGridDirective, DwHeaderDirective, DwHstackDirective, DwIconButtonComponent, DwIconComponent, DwIconRegistry, IdBlockComponent as DwIdBlockComponent, DwInputDirective, DwMenuComponent, DwMenuHeaderDirective, DwMeterComponent, DwMultiselectComponent, DwNavItemActionsDirective, DwNavItemExtraDirective, DwNavListComponent, DwNumberInputComponent, DwPageHeaderComponent, DwPopoverComponent, DwPopoverFooterDirective, DwRadioComponent, DwRailTabsComponent, DwResizerComponent, DwRowActionsDirective, DwRowExpansionDirective, DwSearchInputComponent, DwSectionComponent, DwSelectComponent, DwSelectFooterDirective, DwSelectOptionDirective, DwSelectValueDirective, DwSkeletonComponent, DwSpinnerComponent, DwStackDirective, DwStatusPillComponent, DwSwitchComponent, DwTabPanelDirective, DwTableComponent, DwTableEmptyComponent, DwTabsComponent, DwTagColorButtonComponent, DwTagColorPickerComponent, DwTagComponent, DwTagListComponent, DwTextareaDirective, DwTileComponent, DwTimestampComponent, DwToastHostComponent, DwToastService, DwToggleCardBodyDirective, DwToggleCardComponent, DwToggleCardControlDirective, DwTooltipDirective, DwTooltipIfTruncatedDirective, ThemeService, alignUnderOverlayAnchor, extensionOf, fieldErrorMessage, formatBytes, gapToken, hashTagIndex, humanizeStatus, initialsOf, installCrystalHostTheme, isImageIcon, isTruncated, normalizeStatus, primeSize, provideCrystal, provideCrystalFieldMessages, provideCrystalIconResolvers, provideCrystalIcons, removeCrystalHostTheme, tagColorVar, tintFor, toneForStatus };
|
|
3426
|
-
export type { CrystalConfig, CrystalHostThemeOptions, CrystalThemeConfig, DwAlign, DwAvatarTint, DwBadgeKind, DwBadgeTone, DwBreadcrumb, DwButtonAppearance, DwButtonSize, DwButtonVariant, DwCanClose, DwCardTint, DwCardVariant, DwChartSelectEvent, DwChartType, DwColumn, DwConfirmOptions, DwConfirmSeverity, DwConfirmSummaryRow, DwConfirmWarning, DwControlSize, DwDateValue, DwDialogSize, DwDividerOrientation, DwDividerSpacing, DwDrawerAction, DwDrawerSize, DwEntityKind, DwEntityTint, DwFieldMessage, DwFileItem, DwFileRejectReason, DwFileRejection, DwFileStatus, DwGap, DwIconButtonVariant, DwIconResolvers, DwInitialsStrategy, DwInputSize, DwJustify, DwMenuItem, DwNavGroup, DwNavItem, DwNavItemDot, DwNavReorder, DwPrimeValueAccessor, DwRailTab, DwResizerDrag, DwRowClickEvent, DwSelectOptionContext, DwSeverity, DwShowErrorsWhen, DwSkeletonPreset, DwSupportedType, DwSwitchSize, DwTabOption, DwTabValue, DwTagItem, DwTheme, DwToast, DwToastOptions, DwToastPosition, DwToastSeverity, DwTone, DwTooltipPosition, DwTooltipVariant };
|
|
3554
|
+
export { DW_APP_FIELD_MESSAGES, DW_CLOCK_TICK_MS, DW_CRYSTAL_CONFIG, DW_DIALOG, DW_DRAWER, DW_FIELD_MESSAGES, DW_HOST_THEME_ATTR, DW_ICON_RESOLVERS, DW_INPUT, DW_IN_PROGRESS_STATUSES, DW_LAYOUT, DW_MENU_PLAIN_GROUP, DW_OVERLAY_ANCHOR_ATTR, DW_OVERLAY_ANCHOR_GAP, DW_POPOVER, DW_RESERVED_ICON_PREFIX, DW_STATUS_TONES, DW_TABLE, DW_TAG_PALETTE, DW_THEME_STORAGE_KEY, DW_TOGGLE_CARD, DwActionBarComponent, DwAvatarComponent, DwBadgeComponent, DwBannerComponent, DwBoxComponent, DwBreadcrumbComponent, DwButtonComponent, DwCardComponent, DwCellDirective, DwChartComponent, DwCheckToggleComponent, DwCheckboxComponent, DwChipComponent, DwClockService, DwColumnPickerComponent, DwConfirmDialogComponent, DwConfirmHostComponent, DwConfirmService, DwCopyButtonComponent, DwDatePickerComponent, DwDialogComponent, DwDialogFooterDirective, DwDialogHeaderDirective, DwDialogTitleSuffixDirective, DwDividerComponent, DwDrawerComponent, DwDrawerFooterDirective, DwDrawerHeaderDirective, DwDrawerSubheaderDirective, DwEmptyStateComponent, DwEntityIconComponent, DwFieldComponent, DwFileDropzoneComponent, DwFileListComponent, DwFormControl, DwFormSectionHeaderComponent, DwGridDirective, DwHeaderDirective, DwHstackDirective, DwIconButtonComponent, DwIconComponent, DwIconRegistry, IdBlockComponent as DwIdBlockComponent, DwInputDirective, DwMenuComponent, DwMenuHeaderDirective, DwMeterComponent, DwMultiselectComponent, DwNavItemActionsDirective, DwNavItemExtraDirective, DwNavListComponent, DwNumberInputComponent, DwPageHeaderComponent, DwPopoverComponent, DwPopoverFooterDirective, DwRadioComponent, DwRailTabsComponent, DwResizerComponent, DwRowActionsDirective, DwRowExpansionDirective, DwSearchInputComponent, DwSectionComponent, DwSelectComponent, DwSelectFooterDirective, DwSelectOptionDirective, DwSelectValueDirective, DwSkeletonComponent, DwSpinnerComponent, DwStackDirective, DwStatusPillComponent, DwSwitchComponent, DwTabPanelDirective, DwTableComponent, DwTableEmptyComponent, DwTabsComponent, DwTagColorButtonComponent, DwTagColorPickerComponent, DwTagComponent, DwTagListComponent, DwTextareaDirective, DwTileComponent, DwTimestampComponent, DwToastHostComponent, DwToastService, DwToggleCardBodyDirective, DwToggleCardComponent, DwToggleCardControlDirective, DwTooltipDirective, DwTooltipIfTruncatedDirective, DwTreeComponent, DwTreeNodeDirective, ThemeService, alignUnderOverlayAnchor, extensionOf, fieldErrorMessage, formatBytes, gapToken, hashTagIndex, humanizeStatus, initialsOf, installCrystalHostTheme, isImageIcon, isTruncated, normalizeStatus, primeSize, provideCrystal, provideCrystalFieldMessages, provideCrystalIconResolvers, provideCrystalIcons, removeCrystalHostTheme, tagColorVar, tintFor, toneForStatus };
|
|
3555
|
+
export type { CrystalConfig, CrystalHostThemeOptions, CrystalThemeConfig, DwAlign, DwAvatarTint, DwBadgeKind, DwBadgeTone, DwBreadcrumb, DwButtonAppearance, DwButtonSize, DwButtonVariant, DwCanClose, DwCardTint, DwCardVariant, DwChartSelectEvent, DwChartType, DwColumn, DwConfirmOptions, DwConfirmSeverity, DwConfirmSummaryRow, DwConfirmWarning, DwControlSize, DwDateValue, DwDialogSize, DwDividerOrientation, DwDividerSpacing, DwDrawerAction, DwDrawerSize, DwEntityKind, DwEntityTint, DwFieldMessage, DwFileItem, DwFileRejectReason, DwFileRejection, DwFileStatus, DwGap, DwIconButtonVariant, DwIconResolvers, DwInitialsStrategy, DwInputSize, DwJustify, DwMenuItem, DwNavGroup, DwNavItem, DwNavItemDot, DwNavReorder, DwPrimeValueAccessor, DwRailTab, DwResizerDrag, DwRowClickEvent, DwSelectOptionContext, DwSeverity, DwShowErrorsWhen, DwSkeletonPreset, DwSupportedType, DwSwitchSize, DwTabOption, DwTabValue, DwTagItem, DwTheme, DwToast, DwToastOptions, DwToastPosition, DwToastSeverity, DwTone, DwTooltipPosition, DwTooltipVariant, DwTreeNode, DwTreeNodeEvent, DwTreeSelection };
|
package/package.json
CHANGED
|
@@ -138,6 +138,18 @@ body .p-treetable .p-treetable-tbody > tr.p-treetable-row-selected {
|
|
|
138
138
|
border-left: 1px solid var(--dw-tree-spine);
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
+
/* dw-tree: no box of its own (it sits on its container); --framed draws one. Node content fills the row, so a
|
|
142
|
+
dwTreeNode template can lay out across it. */
|
|
143
|
+
.dw-tree-view { display: block; min-width: 0; }
|
|
144
|
+
.dw-tree-view > .p-tree { padding: 0; border: 0; border-radius: 0; background: transparent; }
|
|
145
|
+
.dw-tree-view.dw-tree-view--framed > .p-tree {
|
|
146
|
+
padding: var(--dw-space-2);
|
|
147
|
+
border: 1px solid var(--dw-border-strong);
|
|
148
|
+
border-radius: var(--dw-radius-control);
|
|
149
|
+
background: var(--dw-surface);
|
|
150
|
+
}
|
|
151
|
+
.dw-tree-view .p-tree-node-label { flex: 1 1 auto; min-width: 0; }
|
|
152
|
+
|
|
141
153
|
/* ── Skeleton ── */
|
|
142
154
|
.dw-skeleton {
|
|
143
155
|
height: 20px;
|
|
@@ -708,8 +708,17 @@ body .dw-var-field .p-textarea {
|
|
|
708
708
|
.dw-number-input > p-inputnumber { flex: 1 1 auto; min-width: 0; }
|
|
709
709
|
.dw-number-input.dw-number-input--fluid { display: flex; width: 100%; }
|
|
710
710
|
|
|
711
|
-
/* ── dw-date-picker (component): sized by the screen like dw-select; the inline calendar keeps its own width ── */
|
|
711
|
+
/* ── dw-date-picker (component): sized by the screen like dw-select; the inline calendar keeps its own width unless fluid ── */
|
|
712
712
|
.dw-date-picker { display: inline-flex; min-width: 0; max-width: 100%; vertical-align: middle; }
|
|
713
713
|
.dw-date-picker > p-datepicker { flex: 1 1 auto; min-width: 0; }
|
|
714
714
|
.dw-date-picker.dw-date-picker--fluid { display: flex; width: 100%; }
|
|
715
715
|
.dw-date-picker.dw-date-picker--inline > p-datepicker { flex: none; }
|
|
716
|
+
.dw-date-picker.dw-date-picker--inline.dw-date-picker--fluid > p-datepicker { flex: 1 1 auto; }
|
|
717
|
+
/* flush: the inline calendar loses its own box and sits on its container's surface (a popover or a panel pads it). */
|
|
718
|
+
.dw-date-picker.dw-date-picker--flush .p-datepicker-panel-inline {
|
|
719
|
+
padding: 0;
|
|
720
|
+
border: 0;
|
|
721
|
+
border-radius: 0;
|
|
722
|
+
background: transparent;
|
|
723
|
+
box-shadow: none;
|
|
724
|
+
}
|