@magmonium/one 0.4.46 → 0.4.47

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@magmonium/one",
3
- "version": "0.4.46",
3
+ "version": "0.4.47",
4
4
  "description": "Magmonium One — Angular design-system primitives for mm Apps",
5
5
  "author": "magmonium",
6
6
  "license": "MIT",
@@ -809,6 +809,23 @@ export interface MountRoute {
809
809
  navId: string;
810
810
  params: Record<string, string>;
811
811
  }
812
+ /**
813
+ * What a Store App says about itself (nx ADR 0007), as `GET
814
+ * store/v1/identity/<link>` answers it. The one source of an app's name,
815
+ * description, AppLogo and App Color — never a WebComponentConfig.
816
+ */
817
+ export type AppIdentity = {
818
+ id: string;
819
+ link: string;
820
+ name: string;
821
+ description: string | null;
822
+ /** The LogoGlyph, rebuilt from the shape allowlist; null until the Owner sets one. */
823
+ logoGlyph: string | null;
824
+ /** App Color, `#rrggbb`; null until the Owner sets one. */
825
+ appColor: string | null;
826
+ /** Availability `open` — AppLogo optional, never released as a PWA. */
827
+ open: boolean;
828
+ };
812
829
  export interface NavStoreRef {
813
830
  /** Current NavId — route's NavId plus any open Murl segments. */
814
831
  id: Signal<string | undefined>;
@@ -883,6 +900,12 @@ export interface NavStoreRef {
883
900
  * forgets it. Optional: a host built before it existed provides none.
884
901
  */
885
902
  setMountRoute?: (name: string, route: MountRoute | undefined) => void;
903
+ /**
904
+ * Writes an app's App Identity over the one held — what an Owner's save
905
+ * hands back, so every AppLogo drawn from it follows. Optional: a host built
906
+ * before it existed provides none.
907
+ */
908
+ setIdentity?: (identity: AppIdentity) => void;
886
909
  }
887
910
  export declare enum AppRelationType {
888
911
  OWNER = 1,
@@ -2621,23 +2644,6 @@ export declare const appColorBrand: (color: string) => {
2621
2644
  export declare const isLightAppColor: (color: string) => boolean;
2622
2645
  /** A LogoGlyph as a CSS `url(...)`, for painting it through a mask. */
2623
2646
  export declare const logoGlyphMaskUrl: (svg: string) => string;
2624
- /**
2625
- * What a Store App says about itself (nx ADR 0007), as `GET
2626
- * store/v1/identity/<link>` answers it. The one source of an app's name,
2627
- * description, AppLogo and App Color — never a WebComponentConfig.
2628
- */
2629
- export type AppIdentity = {
2630
- id: string;
2631
- link: string;
2632
- name: string;
2633
- description: string | null;
2634
- /** The LogoGlyph, rebuilt from the shape allowlist; null until the Owner sets one. */
2635
- logoGlyph: string | null;
2636
- /** App Color, `#rrggbb`; null until the Owner sets one. */
2637
- appColor: string | null;
2638
- /** Availability `open` — AppLogo optional, never released as a PWA. */
2639
- open: boolean;
2640
- };
2641
2647
  /**
2642
2648
  * Reads App Identity from Store — the one read every surface shares (host
2643
2649
  * nav, a standalone app's chrome, store cards that hold only a link). One
@@ -11360,6 +11366,36 @@ type TableConfig = Config & {
11360
11366
  selectionActions?: SelectionAction[];
11361
11367
  selectDisableExpression?: string;
11362
11368
  hiddenColumns?: number[];
11369
+ /** The menu every [TableGroup] header carries, by asset name. */
11370
+ groupMenuName?: string;
11371
+ /** Rows drag: within the table, or from one [TableGroup] into another. */
11372
+ draggableRows?: boolean;
11373
+ };
11374
+ /**
11375
+ * One group of a grouped Table: a full-width header row, then its own rows
11376
+ * under the Table's columns. A grouped Table neither pages nor sorts — the
11377
+ * groups and their order are the caller's.
11378
+ */
11379
+ type TableGroup = {
11380
+ id: string;
11381
+ label: string;
11382
+ rows: unknown[][];
11383
+ noTranslate?: boolean;
11384
+ /** The header reads as broken. */
11385
+ error?: boolean;
11386
+ /** No header menu on this group, though the Table names one. */
11387
+ noMenu?: boolean;
11388
+ /** Header menu items this group leaves out. */
11389
+ menuExclude?: string[];
11390
+ /** A trailing ghost button on the header. */
11391
+ actionLabel?: string;
11392
+ actionIcon?: string;
11393
+ /** What an empty group says, over the Table's own `emptyMessage`. */
11394
+ emptyMessage?: string;
11395
+ /** The header drags, among the other draggable headers. */
11396
+ draggable?: boolean;
11397
+ /** Rows may not be dropped into this group. */
11398
+ noDrop?: boolean;
11363
11399
  };
11364
11400
  type SelectionChangeEvent = {
11365
11401
  selectedRows: unknown[][];
@@ -11378,6 +11414,31 @@ type ContextMenuEvent = {
11378
11414
  actionName: string;
11379
11415
  columnKey: string;
11380
11416
  rowData: unknown[];
11417
+ /** The [TableGroup] the row sits in, on a grouped Table. */
11418
+ groupId?: string;
11419
+ };
11420
+ type GroupMenuEvent = {
11421
+ groupId: string;
11422
+ actionName: string;
11423
+ };
11424
+ type GroupActionEvent = {
11425
+ groupId: string;
11426
+ };
11427
+ /**
11428
+ * A row dropped. `toIndex` is the place it lands at in the target group (or
11429
+ * the table), counted before it left: a drop on a header lands first.
11430
+ */
11431
+ type RowDropEvent = {
11432
+ fromGroupId?: string;
11433
+ fromIndex: number;
11434
+ toGroupId?: string;
11435
+ toIndex: number;
11436
+ rowData: unknown[];
11437
+ };
11438
+ /** A group header dropped on another: it takes that header's place. */
11439
+ type GroupDropEvent = {
11440
+ groupId: string;
11441
+ toGroupId: string;
11381
11442
  };
11382
11443
  type CellChangeEvent = {
11383
11444
  rowIndex: number;
@@ -11436,6 +11497,16 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11436
11497
  readonly searchChanged: import("@angular/core").OutputEmitterRef<SearchChangeEvent>;
11437
11498
  readonly selectionChanged: import("@angular/core").OutputEmitterRef<SelectionChangeEvent>;
11438
11499
  readonly selectionActionClicked: import("@angular/core").OutputEmitterRef<SelectionActionEvent>;
11500
+ /**
11501
+ * The Table drawn as groups ([TableGroup]) rather than from `data`: one
11502
+ * header row and its rows per group, in the order given, unpaged and
11503
+ * unsorted.
11504
+ */
11505
+ readonly groups: import("@angular/core").InputSignal<TableGroup[] | undefined>;
11506
+ readonly groupMenuClicked: import("@angular/core").OutputEmitterRef<GroupMenuEvent>;
11507
+ readonly groupActionClicked: import("@angular/core").OutputEmitterRef<GroupActionEvent>;
11508
+ readonly rowDropped: import("@angular/core").OutputEmitterRef<RowDropEvent>;
11509
+ readonly groupDropped: import("@angular/core").OutputEmitterRef<GroupDropEvent>;
11439
11510
  readonly selectedRows: import("@angular/core").WritableSignal<Set<unknown[]>>;
11440
11511
  readonly selectedCount: import("@angular/core").Signal<number>;
11441
11512
  readonly showSelectionBar: import("@angular/core").Signal<boolean>;
@@ -11479,6 +11550,7 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11479
11550
  columnKey: string;
11480
11551
  item: MenuItem;
11481
11552
  rowData: unknown[];
11553
+ groupId?: string;
11482
11554
  }) => void;
11483
11555
  readonly onCellChanged: (event: CellChangeEvent) => void;
11484
11556
  readonly onPageChange: (page: number) => void;
@@ -11534,6 +11606,11 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11534
11606
  "required": false;
11535
11607
  "isSignal": true;
11536
11608
  };
11609
+ "groups": {
11610
+ "alias": "groups";
11611
+ "required": false;
11612
+ "isSignal": true;
11613
+ };
11537
11614
  "hiddenColumns": {
11538
11615
  "alias": "hiddenColumns";
11539
11616
  "required": false;
@@ -11554,6 +11631,10 @@ export declare class TableComponent extends ConfigComponent<TableConfig> {
11554
11631
  "searchChanged": "searchChanged";
11555
11632
  "selectionChanged": "selectionChanged";
11556
11633
  "selectionActionClicked": "selectionActionClicked";
11634
+ "groupMenuClicked": "groupMenuClicked";
11635
+ "groupActionClicked": "groupActionClicked";
11636
+ "rowDropped": "rowDropped";
11637
+ "groupDropped": "groupDropped";
11557
11638
  }, never, never, true, never>;
11558
11639
  }
11559
11640
  /**
@@ -16824,4 +16905,4 @@ export declare const toggleUid: (audience: Audience, uid: string) => Audience;
16824
16905
  export declare const toggleGroup: (audience: Audience, groupId: string) => Audience;
16825
16906
  /** How many Users and Groups an Audience names. */
16826
16907
  export declare const pickCount: (audience: Audience) => number;
16827
- export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppLogoTone, AppLogoVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgePosition, BadgeVariant, Button, ButtonGroup, CellChangeEvent, CellClickEvent, ColBreakpoint, ColSpan, ColorPallet, ColumnDef, Comment, CommentItem, Config, ContextMenu, ContextMenuEvent, Cursor, CustomIcon, DragListReorder, Draggable, DraggableState, FileUploadConfig, FileUploadEvent, FilterGroupContext, FilterGroupMember, FilterOption, FilterPanel, FilterPanelIo, FilterRangeMode, FilterSelectionMap, FilterValue, FilterVariant, FilteredTreeGrid, FlatTreeGridRow, FlexAlign, FlexAlignSelf, FlexConfig, FlexDirection, FlexItemConfig, FlexJustify, FlexVariant, GridAlignX, GridAlignY, GroupKind, Header, HeaderLevel, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort, SectionTableSortDirection, SectionTableVariant, SectionToggleItem, SectionToggleItemContext, SelectionAction, SelectionActionEvent, SelectionChangeEvent, SelectorConfig, SharingClient, SharingGroup, SocketMessage, Sort, SortChange, SortChangeEvent, SortOption, SortOrder, SourceAudience, SpacingInward, SqueezeMode, StatAlign, StatCornerEdge, StatCornerPosition, StatCornerSide, StatSurface, StatVariant, TabGroup, TableConfig, TableFilterCondition, TableFilterDef, TextOrNumberInput, Timeline, TimelineItem, TreeGridCellClickEvent, TreeGridLoadChildrenEvent, TreeGridRow, TreeGridRowSelectEvent, TreeGridToggleEvent, User };
16908
+ export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppLogoTone, AppLogoVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgePosition, BadgeVariant, Button, ButtonGroup, CellChangeEvent, CellClickEvent, ColBreakpoint, ColSpan, ColorPallet, ColumnDef, Comment, CommentItem, Config, ContextMenu, ContextMenuEvent, Cursor, CustomIcon, DragListReorder, Draggable, DraggableState, FileUploadConfig, FileUploadEvent, FilterGroupContext, FilterGroupMember, FilterOption, FilterPanel, FilterPanelIo, FilterRangeMode, FilterSelectionMap, FilterValue, FilterVariant, FilteredTreeGrid, FlatTreeGridRow, FlexAlign, FlexAlignSelf, FlexConfig, FlexDirection, FlexItemConfig, FlexJustify, FlexVariant, GridAlignX, GridAlignY, GroupActionEvent, GroupDropEvent, GroupKind, GroupMenuEvent, Header, HeaderLevel, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, RowDropEvent, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort, SectionTableSortDirection, SectionTableVariant, SectionToggleItem, SectionToggleItemContext, SelectionAction, SelectionActionEvent, SelectionChangeEvent, SelectorConfig, SharingClient, SharingGroup, SocketMessage, Sort, SortChange, SortChangeEvent, SortOption, SortOrder, SourceAudience, SpacingInward, SqueezeMode, StatAlign, StatCornerEdge, StatCornerPosition, StatCornerSide, StatSurface, StatVariant, TabGroup, TableConfig, TableFilterCondition, TableFilterDef, TableGroup, TextOrNumberInput, Timeline, TimelineItem, TreeGridCellClickEvent, TreeGridLoadChildrenEvent, TreeGridRow, TreeGridRowSelectEvent, TreeGridToggleEvent, User };