@coolon/angular-ui-powerups 16.1.0-alpha.342 → 16.1.0-alpha.344

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.
Files changed (32) hide show
  1. package/assets/_icon-button.scss +16 -0
  2. package/assets/table.scss +25 -2
  3. package/esm2022/lib/components/alignment.mjs +6 -1
  4. package/esm2022/lib/components/commands/button-renderer/button-renderer.component.mjs +20 -4
  5. package/esm2022/lib/components/commands/command/command.component.mjs +12 -4
  6. package/esm2022/lib/components/commands/group/popup-menu/abstract-popup-menu.component.mjs +6 -2
  7. package/esm2022/lib/components/commands/group/popup-menu/more-menu.component.mjs +3 -3
  8. package/esm2022/lib/components/commands/group/popup-menu/popup-menu.component.mjs +3 -3
  9. package/esm2022/lib/components/forms/password-input/password-input.component.mjs +1 -1
  10. package/esm2022/lib/components/forms/string-input/string-input.component.mjs +1 -1
  11. package/esm2022/lib/components/forms/sub-form-list/sub-form-list.component.mjs +1 -1
  12. package/esm2022/lib/components/tables/abstract-table-model.mjs +3 -3
  13. package/esm2022/lib/components/tables/column/column-model.mjs +15 -1
  14. package/esm2022/lib/components/tables/renderer/table-action-column/table-action-column.component.mjs +1 -1
  15. package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +6 -2
  16. package/esm2022/lib/components/tables/tree-table/tree-expansion-model.mjs +29 -4
  17. package/esm2022/lib/interaction/components/activity-actions/activity-actions.component.mjs +1 -1
  18. package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
  19. package/esm2022/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.mjs +1 -1
  20. package/esm2022/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.mjs +1 -1
  21. package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
  22. package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +1 -1
  23. package/esm2022/lib/interaction/components/input-activities/option-list-activity/option-list-activity.mjs +1 -1
  24. package/fesm2022/coolon-angular-ui-powerups.mjs +102 -27
  25. package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
  26. package/lib/components/alignment.d.ts +6 -0
  27. package/lib/components/commands/button-renderer/button-renderer.component.d.ts +6 -2
  28. package/lib/components/commands/command/command.component.d.ts +8 -2
  29. package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +4 -1
  30. package/lib/components/tables/column/column-model.d.ts +9 -0
  31. package/lib/components/tables/tree-table/tree-expansion-model.d.ts +19 -3
  32. package/package.json +9 -3
@@ -5,3 +5,9 @@ export declare const HorizontalAlignment: {
5
5
  END: "end";
6
6
  };
7
7
  export type HorizontalAlignment = Enum<typeof HorizontalAlignment>;
8
+ /** An edge of a container, in the reading direction: where a command's button may sit (see `CommandComponent.edge`). */
9
+ export declare const Edge: {
10
+ START: "start";
11
+ END: "end";
12
+ };
13
+ export type Edge = Enum<typeof Edge>;
@@ -3,7 +3,7 @@ import { ThemePalette } from "@angular/material/core";
3
3
  import { MatMenuItem } from "@angular/material/menu";
4
4
  import { BooleanValueModelChain, CommandFace, ListModel, ValueModel, ValueModelChain } from "@coolon/pectin";
5
5
  import { Density } from '../../../directives/density.directive';
6
- import { HorizontalAlignment } from "../../alignment";
6
+ import { Edge, HorizontalAlignment } from "../../alignment";
7
7
  import { CommandFace as CommandFaceUtils } from '../command-face';
8
8
  import { PopupAwareComponent } from "../group/popup-aware.component";
9
9
  import * as i0 from "@angular/core";
@@ -21,6 +21,10 @@ export declare class ButtonRendererComponent extends PopupAwareComponent {
21
21
  density?: Density;
22
22
  /** Whether the button fills the renderer's box (see `CommandComponent.fill`). */
23
23
  fill: boolean;
24
+ /** The edge of its container the button sits at (see `CommandComponent.edge`). */
25
+ edge?: Edge;
26
+ protected get atStartEdge(): boolean;
27
+ protected get atEndEdge(): boolean;
24
28
  /** What the label does in a box narrower than it (see `CommandComponent.labelOverflow`). */
25
29
  labelOverflow: 'visible' | 'ellipsis';
26
30
  protected get ellipsis(): boolean;
@@ -38,5 +42,5 @@ export declare class ButtonRendererComponent extends PopupAwareComponent {
38
42
  get renderAsMenuItem(): boolean;
39
43
  focus(): void;
40
44
  static ɵfac: i0.ɵɵFactoryDeclaration<ButtonRendererComponent, never>;
41
- static ɵcmp: i0.ɵɵComponentDeclaration<ButtonRendererComponent, "aup-button-renderer", never, { "faces$": { "alias": "faces$"; "required": false; }; "faces": { "alias": "faces"; "required": false; }; "enabled$": { "alias": "enabled$"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "busy$": { "alias": "busy$"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "forceRenderAsButton": { "alias": "forceRenderAsButton"; "required": false; }; "density": { "alias": "density"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "labelOverflow": { "alias": "labelOverflow"; "required": false; }; }, {}, never, never, false, never>;
45
+ static ɵcmp: i0.ɵɵComponentDeclaration<ButtonRendererComponent, "aup-button-renderer", never, { "faces$": { "alias": "faces$"; "required": false; }; "faces": { "alias": "faces"; "required": false; }; "enabled$": { "alias": "enabled$"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; "busy$": { "alias": "busy$"; "required": false; }; "busy": { "alias": "busy"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "forceRenderAsButton": { "alias": "forceRenderAsButton"; "required": false; }; "density": { "alias": "density"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "edge": { "alias": "edge"; "required": false; }; "labelOverflow": { "alias": "labelOverflow"; "required": false; }; }, {}, never, never, false, never>;
42
46
  }
@@ -1,6 +1,6 @@
1
1
  import { ThemePalette } from "@angular/material/core";
2
2
  import { BooleanValueModelChain, Command, ListModelChain, ValueModel, ValueModelChain } from "@coolon/pectin";
3
- import { HorizontalAlignment } from '../../alignment';
3
+ import { Edge, HorizontalAlignment } from '../../alignment';
4
4
  import { Density } from "../../../directives/density.directive";
5
5
  import { ButtonRendererComponent } from "../button-renderer/button-renderer.component";
6
6
  import { CommandFace } from '../command-face';
@@ -26,6 +26,12 @@ export declare class CommandComponent extends PopupAwareComponent {
26
26
  * end of the box.
27
27
  */
28
28
  fill: boolean;
29
+ /**
30
+ * The edge of its container this command's button sits at, if it ends a padded row such as a header or a toolbar.
31
+ * An icon button there gives back the transparent inset round its icon, so its icon lines up with the content edge
32
+ * as text there would. A text button is unaffected. Leave it unset for a button with something after it.
33
+ */
34
+ edge?: Edge;
29
35
  /** What the label does in a box narrower than it: 'ellipsis' lets the button shrink and cuts the label short with "…". */
30
36
  labelOverflow: CommandComponent.LabelOverflow;
31
37
  protected get ellipsis(): boolean;
@@ -43,7 +49,7 @@ export declare class CommandComponent extends PopupAwareComponent {
43
49
  isActive(face: CommandFace): boolean;
44
50
  requestFocus(): void;
45
51
  static ɵfac: i0.ɵɵFactoryDeclaration<CommandComponent, never>;
46
- static ɵcmp: i0.ɵɵComponentDeclaration<CommandComponent, "aup-command", never, { "command": { "alias": "command"; "required": false; }; "face$": { "alias": "face$"; "required": false; }; "face": { "alias": "face"; "required": false; }; "busyFace$": { "alias": "busyFace$"; "required": false; }; "busyFace": { "alias": "busyFace"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "density": { "alias": "density"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "labelOverflow": { "alias": "labelOverflow"; "required": false; }; }, {}, never, never, false, never>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<CommandComponent, "aup-command", never, { "command": { "alias": "command"; "required": false; }; "face$": { "alias": "face$"; "required": false; }; "face": { "alias": "face"; "required": false; }; "busyFace$": { "alias": "busyFace$"; "required": false; }; "busyFace": { "alias": "busyFace"; "required": false; }; "alignFace": { "alias": "alignFace"; "required": false; }; "density": { "alias": "density"; "required": false; }; "fill": { "alias": "fill"; "required": false; }; "edge": { "alias": "edge"; "required": false; }; "labelOverflow": { "alias": "labelOverflow"; "required": false; }; }, {}, never, never, false, never>;
47
53
  }
48
54
  export declare namespace CommandComponent {
49
55
  type LabelOverflow = 'visible' | 'ellipsis';
@@ -1,6 +1,7 @@
1
1
  import { AfterContentChecked, QueryList } from '@angular/core';
2
2
  import { MatMenuTrigger } from '@angular/material/menu';
3
3
  import { DelegatingValueModel, Disposable, ListModelChain, ValueModel } from '@coolon/pectin';
4
+ import type { Edge } from '../../../alignment';
4
5
  import { CommandFace } from '../../command-face';
5
6
  import { PopupAwareComponent } from '../popup-aware.component';
6
7
  import type { PopupContainer } from '../popup-container';
@@ -14,6 +15,8 @@ export declare class AbstractPopupMenuComponent extends PopupAwareComponent impl
14
15
  private faceAdapter$;
15
16
  xPosition: 'before' | 'after';
16
17
  yPosition: 'above' | 'below';
18
+ /** The edge of its container the menu's button sits at (see `CommandComponent.edge`). */
19
+ edge?: Edge;
17
20
  triggers: QueryList<MatMenuTrigger>;
18
21
  accessor enabled$: ValueModel<boolean>;
19
22
  accessor enabled: boolean;
@@ -29,5 +32,5 @@ export declare class AbstractPopupMenuComponent extends PopupAwareComponent impl
29
32
  onCommandFired(): void;
30
33
  getFace(): CommandFace | undefined;
31
34
  static ɵfac: i0.ɵɵFactoryDeclaration<AbstractPopupMenuComponent, never>;
32
- static ɵcmp: i0.ɵɵComponentDeclaration<AbstractPopupMenuComponent, "aup-abstract-popup-menu", never, { "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "enabled$": { "alias": "enabled$"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; }, {}, never, never, false, never>;
35
+ static ɵcmp: i0.ɵɵComponentDeclaration<AbstractPopupMenuComponent, "aup-abstract-popup-menu", never, { "xPosition": { "alias": "xPosition"; "required": false; }; "yPosition": { "alias": "yPosition"; "required": false; }; "edge": { "alias": "edge"; "required": false; }; "enabled$": { "alias": "enabled$"; "required": false; }; "enabled": { "alias": "enabled"; "required": false; }; }, {}, never, never, false, never>;
33
36
  }
@@ -30,6 +30,7 @@ export declare class ColumnModel<Row extends object> extends GarbageCollector {
30
30
  private _cellRendererPortalRef;
31
31
  private _enableRowSelection;
32
32
  private readonly _flex$;
33
+ private _iconButtonColumn;
33
34
  private readonly _keepInView$;
34
35
  private readonly _displayScopes$;
35
36
  private _defaultVisibility$;
@@ -122,6 +123,14 @@ export declare class ColumnModel<Row extends object> extends GarbageCollector {
122
123
  keepInView(keep?: boolean | ValueModel<boolean>): this;
123
124
  get keepInView$(): ValueModel<boolean>;
124
125
  isKeptInView(): boolean;
126
+ /**
127
+ * Marks a column whose cells end in an icon button, such as a more menu or a row's actions. At the table's edge, the
128
+ * column's padding there gives back the transparent inset round the button's icon, so the icon lines up with the
129
+ * content edge as the first column's text does. The cells' content is held against that edge, so a column wider
130
+ * than its buttons, such as a flex one, still ends in them.
131
+ */
132
+ iconButtonColumn(iconButton?: boolean): this;
133
+ isIconButtonColumn(): boolean;
125
134
  attachHeaderCell(host: any): void;
126
135
  attachCell(host: any): void;
127
136
  onHeaderAttached(host: TableHeaderCellComponent, ref: CdkPortalOutletAttachedRef): void;
@@ -1,4 +1,4 @@
1
- import { Disposable, DisposedWith, GarbageCollector, ListModel, OneTimeBinding } from '@coolon/pectin';
1
+ import { CanIdentify, Disposable, DisposedWith, GarbageCollector, ListModel, OneTimeBinding } from '@coolon/pectin';
2
2
  export declare class TreeExpansionModel<T> extends GarbageCollector implements OneTimeBinding {
3
3
  /** A proxied tree expansion model is a one-time binding: it cannot be read before its input is set. */
4
4
  readonly [OneTimeBinding.brand]: true;
@@ -6,10 +6,22 @@ export declare class TreeExpansionModel<T> extends GarbageCollector implements O
6
6
  private readonly collapsedIds;
7
7
  private readonly _isExpandedPredicate$;
8
8
  private readonly _visibleRows$;
9
- constructor(options: DisposedWith);
9
+ private readonly _identityOf;
10
+ private readonly identifiesRowsItself;
11
+ /**
12
+ * A model that identifies its rows itself (`identifiedBy` or `identifiedWith`) knows a node from the start. One that
13
+ * does not takes the table's identity once the table binds it, and moves any expansion set before then over to it.
14
+ */
15
+ constructor(options: TreeExpansionModel.Options<T>);
10
16
  bindToTable(source$: ListModel<T>, visibleRows$: ListModel<T>): Disposable;
11
17
  get visibleRows$(): ListModel<T>;
12
- protected identityOf(row: T): any;
18
+ protected identityOf(row: T): unknown;
19
+ /**
20
+ * Before the table binds, a model that does not identify its rows itself knows a node only as the node, so a node
21
+ * expanded or collapsed then is stored as the node. The table identifies its rows its own way (by id, say), and the
22
+ * stored node would match no row. The choice used to be lost that way.
23
+ */
24
+ private keyCollapsedNodesByTheTablesIdentity;
13
25
  get isExpandedPredicate$(): import("@coolon/pectin").ValueModel<(node: T) => boolean>;
14
26
  expand(node: T): void;
15
27
  collapse(node: T): void;
@@ -32,3 +44,7 @@ export declare class TreeExpansionModel<T> extends GarbageCollector implements O
32
44
  private forEachNode;
33
45
  private updatePredicate;
34
46
  }
47
+ export declare namespace TreeExpansionModel {
48
+ interface Options<T> extends DisposedWith, CanIdentify.Options<T> {
49
+ }
50
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-alpha.342",
3
+ "version": "16.1.0-alpha.344",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",
@@ -32,9 +32,13 @@
32
32
  "dependencies": {
33
33
  "tslib": "^2.3.0"
34
34
  },
35
- "module": "fesm2022/coolon-angular-ui-powerups.mjs",
36
- "typings": "index.d.ts",
37
35
  "exports": {
36
+ "./assets/icon-button": {
37
+ "sass": "./assets/_icon-button.scss"
38
+ },
39
+ "./assets/*": {
40
+ "sass": "./assets/*.scss"
41
+ },
38
42
  "./package.json": {
39
43
  "default": "./package.json"
40
44
  },
@@ -45,5 +49,7 @@
45
49
  "default": "./fesm2022/coolon-angular-ui-powerups.mjs"
46
50
  }
47
51
  },
52
+ "module": "fesm2022/coolon-angular-ui-powerups.mjs",
53
+ "typings": "index.d.ts",
48
54
  "sideEffects": false
49
55
  }