@coolon/angular-ui-powerups 16.1.0-alpha.341 → 16.1.0-alpha.343

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 (36) hide show
  1. package/assets/_icon-button.scss +16 -0
  2. package/assets/table.scss +46 -8
  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/abstract-table.component.mjs +3 -3
  14. package/esm2022/lib/components/tables/column/column-model.mjs +15 -1
  15. package/esm2022/lib/components/tables/renderer/table-action-column/table-action-column.component.mjs +1 -1
  16. package/esm2022/lib/components/tables/renderer/table-body/table-body.component.mjs +6 -2
  17. package/esm2022/lib/components/tables/table/table.component.mjs +3 -3
  18. package/esm2022/lib/components/tables/tree-table/tree-table-component.mjs +3 -3
  19. package/esm2022/lib/interaction/components/activity-actions/activity-actions.component.mjs +1 -1
  20. package/esm2022/lib/interaction/components/activity-triggers/inline-activity-trigger/inline-activity-trigger.component.mjs +1 -1
  21. package/esm2022/lib/interaction/components/activity-triggers/modal-activity-trigger/modal-activity-trigger.component.mjs +1 -1
  22. package/esm2022/lib/interaction/components/activity-triggers/popup-activity-trigger/popup-activity-trigger.component.mjs +1 -1
  23. package/esm2022/lib/interaction/components/add-card-activity/add-card-activity.component.mjs +1 -1
  24. package/esm2022/lib/interaction/components/editors/inline-string-editor/inline-string-editor.component.mjs +1 -1
  25. package/esm2022/lib/interaction/components/input-activities/option-list-activity/option-list-activity.mjs +1 -1
  26. package/fesm2022/coolon-angular-ui-powerups.mjs +81 -30
  27. package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
  28. package/lib/components/alignment.d.ts +6 -0
  29. package/lib/components/commands/button-renderer/button-renderer.component.d.ts +6 -2
  30. package/lib/components/commands/command/command.component.d.ts +8 -2
  31. package/lib/components/commands/group/popup-menu/abstract-popup-menu.component.d.ts +4 -1
  32. package/lib/components/tables/abstract-table.component.d.ts +2 -2
  33. package/lib/components/tables/column/column-model.d.ts +9 -0
  34. package/lib/components/tables/table/table.component.d.ts +2 -2
  35. package/lib/components/tables/tree-table/tree-table-component.d.ts +2 -2
  36. package/package.json +1 -1
@@ -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
  }
@@ -34,7 +34,7 @@ import * as i0 from "@angular/core";
34
34
  * @example
35
35
  * // global settings
36
36
  * :root {
37
- * --aup-table-column-gap: 10px; // defaults to 24px
37
+ * --aup-table-column-gap: 10px; // between columns' content, half each side of a cell; defaults to --default-padding, else 16px
38
38
  * --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
39
39
  * --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
40
40
  * --aup-table-first-column-padding-left: 18px // defaults to --column-gap
@@ -43,7 +43,7 @@ import * as i0 from "@angular/core";
43
43
  *
44
44
  * // per table settings.
45
45
  * aup-table {
46
- * --column-gap: 10px; // defaults to 24px
46
+ * --column-gap: 10px; // defaults to --aup-table-column-gap
47
47
  * --row-hover-background-color, rgba(0, 0, 0, 0.05)
48
48
  * --row-selected-background-color: rebeccapurple; // defaults to transparent
49
49
  * --first-column-padding-left: 18px // defaults to --column-gap
@@ -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 must sit at that edge: the button at the end of
130
+ * a right-hand column, at the start of a left-hand one.
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;
@@ -44,7 +44,7 @@ import * as i0 from "@angular/core";
44
44
  * @example
45
45
  * // global settings
46
46
  * :root {
47
- * --aup-table-column-gap: 10px; // defaults to 24px
47
+ * --aup-table-column-gap: 10px; // between columns' content, half each side of a cell; defaults to --default-padding, else 16px
48
48
  * --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
49
49
  * --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
50
50
  * --aup-table-first-column-padding-left: 18px // defaults to --column-gap
@@ -54,7 +54,7 @@ import * as i0 from "@angular/core";
54
54
  *
55
55
  * // per table settings.
56
56
  * aup-table {
57
- * --column-gap: 10px; // defaults to 24px
57
+ * --column-gap: 10px; // defaults to --aup-table-column-gap
58
58
  * --row-hover-background-color, rgba(0, 0, 0, 0.05)
59
59
  * --row-selected-background-color: rebeccapurple; // defaults to transparent
60
60
  * --first-column-padding-left: 18px // defaults to --column-gap
@@ -38,7 +38,7 @@ import * as i0 from "@angular/core";
38
38
  * @example
39
39
  * // global settings
40
40
  * :root {
41
- * --aup-table-column-gap: 10px; // defaults to 24px
41
+ * --aup-table-column-gap: 10px; // between columns' content, half each side of a cell; defaults to --default-padding, else 16px
42
42
  * --aup-table-row-hover-background-color, rgba(0, 0, 0, 0.05)
43
43
  * --aup-table-row-selected-background-color: rebeccapurple; // defaults to transparent
44
44
  * --aup-table-first-column-padding-left: 18px // defaults to --column-gap
@@ -47,7 +47,7 @@ import * as i0 from "@angular/core";
47
47
  *
48
48
  * // per table settings.
49
49
  * aup-table {
50
- * --column-gap: 10px; // defaults to 24px
50
+ * --column-gap: 10px; // defaults to --aup-table-column-gap
51
51
  * --row-hover-background-color, rgba(0, 0, 0, 0.05)
52
52
  * --row-selected-background-color: rebeccapurple; // defaults to transparent
53
53
  * --first-column-padding-left: 18px // defaults to --column-gap
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@coolon/angular-ui-powerups",
3
- "version": "16.1.0-alpha.341",
3
+ "version": "16.1.0-alpha.343",
4
4
  "peerDependencies": {
5
5
  "@angular/animations": "^16.2.9",
6
6
  "@angular/common": "^16.2.9",