@magmonium/one 0.4.70 → 0.4.72
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/fesm2022/{magmonium-one-base-dropdown-DMgBZ3oa.mjs → magmonium-one-base-dropdown-DlggqKkE.mjs} +5 -5
- package/fesm2022/{magmonium-one-base-dropdown-DMgBZ3oa.mjs.map → magmonium-one-base-dropdown-DlggqKkE.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-button-CKHBcCoO.mjs → magmonium-one-button-DO7FTwuF.mjs} +8 -2
- package/fesm2022/magmonium-one-button-DO7FTwuF.mjs.map +1 -0
- package/fesm2022/{magmonium-one-checkbox-CmPgvVHJ.mjs → magmonium-one-checkbox-DHg1sBWl.mjs} +3 -3
- package/fesm2022/{magmonium-one-checkbox-CmPgvVHJ.mjs.map → magmonium-one-checkbox-DHg1sBWl.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-group-sz1ufuBT.mjs → magmonium-one-group-BsqCB8D2.mjs} +3 -3
- package/fesm2022/{magmonium-one-group-sz1ufuBT.mjs.map → magmonium-one-group-BsqCB8D2.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-header-CkW_6y7m.mjs → magmonium-one-header-CgOV_m7w.mjs} +2 -2
- package/fesm2022/{magmonium-one-header-CkW_6y7m.mjs.map → magmonium-one-header-CgOV_m7w.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-image-editor-BYNN15tt.mjs → magmonium-one-image-editor-NsUm59Ul.mjs} +4 -4
- package/fesm2022/{magmonium-one-image-editor-BYNN15tt.mjs.map → magmonium-one-image-editor-NsUm59Ul.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-label-23DjRQdd.mjs → magmonium-one-label-BII6szn8.mjs} +21 -10
- package/fesm2022/magmonium-one-label-BII6szn8.mjs.map +1 -0
- package/fesm2022/{magmonium-one-menu-Nj_Aj1fs.mjs → magmonium-one-menu-CsoiLhVg.mjs} +2 -2
- package/fesm2022/{magmonium-one-menu-Nj_Aj1fs.mjs.map → magmonium-one-menu-CsoiLhVg.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-multi-range-DYIv7jB7.mjs → magmonium-one-multi-range-BQ0f5IFY.mjs} +2 -2
- package/fesm2022/{magmonium-one-multi-range-DYIv7jB7.mjs.map → magmonium-one-multi-range-BQ0f5IFY.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-otp-BOOJnnc2.mjs → magmonium-one-otp-Zo1X0_r5.mjs} +3 -3
- package/fesm2022/{magmonium-one-otp-BOOJnnc2.mjs.map → magmonium-one-otp-Zo1X0_r5.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-password-CbivFrxS.mjs → magmonium-one-password-B8DtitsZ.mjs} +4 -4
- package/fesm2022/{magmonium-one-password-CbivFrxS.mjs.map → magmonium-one-password-B8DtitsZ.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-radio-BjsRiF80.mjs → magmonium-one-radio-CldvuwLN.mjs} +2 -2
- package/fesm2022/{magmonium-one-radio-BjsRiF80.mjs.map → magmonium-one-radio-CldvuwLN.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-range-M_HBccdt.mjs → magmonium-one-range-pxmV4Ytp.mjs} +2 -2
- package/fesm2022/{magmonium-one-range-M_HBccdt.mjs.map → magmonium-one-range-pxmV4Ytp.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-text-CuKE9S8T.mjs → magmonium-one-text-Bst55TOO.mjs} +3 -3
- package/fesm2022/{magmonium-one-text-CuKE9S8T.mjs.map → magmonium-one-text-Bst55TOO.mjs.map} +1 -1
- package/fesm2022/{magmonium-one-text-output-M8sEPhFz.mjs → magmonium-one-text-output-E6pe3IOL.mjs} +2 -2
- package/fesm2022/magmonium-one-text-output-E6pe3IOL.mjs.map +1 -0
- package/fesm2022/magmonium-one.mjs +30 -37
- package/fesm2022/magmonium-one.mjs.map +1 -1
- package/package.json +1 -1
- package/types/magmonium-one.d.ts +63 -21
- package/fesm2022/magmonium-one-button-CKHBcCoO.mjs.map +0 -1
- package/fesm2022/magmonium-one-label-23DjRQdd.mjs.map +0 -1
- package/fesm2022/magmonium-one-text-output-M8sEPhFz.mjs.map +0 -1
package/package.json
CHANGED
package/types/magmonium-one.d.ts
CHANGED
|
@@ -563,7 +563,16 @@ type Config = {
|
|
|
563
563
|
type SectionTableAlign = 'left' | 'center' | 'right';
|
|
564
564
|
/** What a sorting column compares its values as. */
|
|
565
565
|
type SectionTableDataType = 'text' | 'number' | 'date';
|
|
566
|
-
|
|
566
|
+
/**
|
|
567
|
+
* Which way a SectionTable sorts. An enum rather than a union so a generated
|
|
568
|
+
* Screen keeping the direction keeps it as this vocabulary, the way it keeps
|
|
569
|
+
* the column as its SortEnum (m-one-ui ADR 0203). Its values are the words the
|
|
570
|
+
* union always held, so a stored or compared `'asc'` still reads the same.
|
|
571
|
+
*/
|
|
572
|
+
export declare enum SectionTableSortDirection {
|
|
573
|
+
Asc = "asc",
|
|
574
|
+
Desc = "desc"
|
|
575
|
+
}
|
|
567
576
|
/**
|
|
568
577
|
* A SectionTable's look. It never draws a panel border: `zebra` shades every
|
|
569
578
|
* other row, `compact` and `spacious` tighten or loosen the cell padding,
|
|
@@ -576,13 +585,17 @@ export declare const SECTION_TABLE_VARIANTS: readonly SectionTableVariant[];
|
|
|
576
585
|
* One entry in a SectionTable's configured heading (GLOSSARY.md
|
|
577
586
|
* SectionTableColumn). The cells beneath it line up by position, so nothing
|
|
578
587
|
* here says how a cell renders — a cell renders what was put in it.
|
|
588
|
+
*
|
|
589
|
+
* `Id` is the vocabulary of column ids — `string` unless a caller narrows it.
|
|
590
|
+
* A generated Screen narrows it to the enum of its sorting columns' ids, so
|
|
591
|
+
* the `sortChange` it binds already carries that enum (m-one-ui ADR 0203).
|
|
579
592
|
*/
|
|
580
|
-
type SectionTableColumn = {
|
|
593
|
+
type SectionTableColumn<Id extends string = string> = {
|
|
581
594
|
/**
|
|
582
595
|
* The column's position when unset. A sorting column's `id` is the key of
|
|
583
596
|
* the row it sorts by, and must be written (m-one-ui ADR 0148).
|
|
584
597
|
*/
|
|
585
|
-
id?:
|
|
598
|
+
id?: Id;
|
|
586
599
|
/** A translation key. */
|
|
587
600
|
label?: string;
|
|
588
601
|
align?: SectionTableAlign;
|
|
@@ -602,13 +615,14 @@ type SectionTableColumn = {
|
|
|
602
615
|
/** Starts folded, with a toggle in its heading (GLOSSARY.md Squeeze). */
|
|
603
616
|
squeeze?: boolean;
|
|
604
617
|
};
|
|
605
|
-
|
|
606
|
-
|
|
618
|
+
/** The sort in force: which column, and which way. */
|
|
619
|
+
type SectionTableSort<Id extends string = string> = {
|
|
620
|
+
id: Id;
|
|
607
621
|
direction: SectionTableSortDirection;
|
|
608
622
|
dataType?: SectionTableDataType;
|
|
609
623
|
};
|
|
610
|
-
type SectionTableConfig = Config & {
|
|
611
|
-
columns?: SectionTableColumn[];
|
|
624
|
+
type SectionTableConfig<Id extends string = string> = Config & {
|
|
625
|
+
columns?: SectionTableColumn<Id>[];
|
|
612
626
|
sticky?: boolean;
|
|
613
627
|
/** 1em outside the table, above and below — beyond a `border` rule. */
|
|
614
628
|
margin?: boolean;
|
|
@@ -1341,6 +1355,19 @@ export declare function existsInMap(id: string | undefined, map: Record<string,
|
|
|
1341
1355
|
*/
|
|
1342
1356
|
export declare function notExistsInMap(id: string | undefined, map: Record<string, unknown> | undefined): boolean;
|
|
1343
1357
|
export declare function createMap<T extends object>(elems: T[], key?: keyof T | 'id', elemMap?: Record<string, T>): Record<string, T>;
|
|
1358
|
+
/**
|
|
1359
|
+
* `value` as a member of `values` — a string enum's object — or `undefined`
|
|
1360
|
+
* when the enum does not hold it.
|
|
1361
|
+
*
|
|
1362
|
+
* The reader a generated Screen narrows a plain string through wherever it
|
|
1363
|
+
* lands on a value its SortEnum or action enum types: a typed-in literal, a
|
|
1364
|
+
* constant, an input, another Control's payload. A call and not an `as` cast,
|
|
1365
|
+
* for the reason the Field readers are one — the read lands in a template,
|
|
1366
|
+
* whose parser has no TS type assertion (NG5002) — and checked rather than
|
|
1367
|
+
* asserted, so a string the enum never held arrives as `undefined` instead of
|
|
1368
|
+
* as a lie (m-one-ui ADR 0203).
|
|
1369
|
+
*/
|
|
1370
|
+
export declare function enumValue<T extends string>(value: unknown, values: Record<string, T>): T | undefined;
|
|
1344
1371
|
/**
|
|
1345
1372
|
* Total over the three Sizes. Deliberately accepts nothing else — the old
|
|
1346
1373
|
* `derivedSize` ended in `default: return size`, which is how `1.3rem` and
|
|
@@ -3655,6 +3682,19 @@ export declare class ActionComponent extends ButtonGroupComponent {
|
|
|
3655
3682
|
}
|
|
3656
3683
|
declare function deriveButtonClass(button?: Button): string;
|
|
3657
3684
|
export declare function isButtonName(name: string, button?: Button): boolean;
|
|
3685
|
+
/**
|
|
3686
|
+
* The pressed Button's name, read as the enum a generated Screen keeps its
|
|
3687
|
+
* action bar's names in — or `undefined` for a press no name of it answers.
|
|
3688
|
+
*
|
|
3689
|
+
* The reader a SectionAction's `clicked` is written through wherever the value
|
|
3690
|
+
* lands on an enum-typed StateProperty or ScreenVariable. A call and not an
|
|
3691
|
+
* `as` cast, for the reason the Field readers are one: the read lands in a
|
|
3692
|
+
* template, whose parser has no TS type assertion (NG5002). Checked against
|
|
3693
|
+
* the enum's values rather than asserted, so a Button merged in from an asset
|
|
3694
|
+
* the enum never saw arrives as `undefined` instead of as a lie
|
|
3695
|
+
* (m-one-ui ADR 0203).
|
|
3696
|
+
*/
|
|
3697
|
+
export declare function actionName<Name extends string>(button: Button | undefined, names: Record<string, Name>): Name | undefined;
|
|
3658
3698
|
declare function deriveGroupClass(group?: Partial<ButtonGroup>): string;
|
|
3659
3699
|
type GridAlignX = 'left' | 'center' | 'right';
|
|
3660
3700
|
type GridAlignY = 'top' | 'center' | 'bottom';
|
|
@@ -5981,7 +6021,7 @@ export declare class SectionFooterComponent {
|
|
|
5981
6021
|
* around or inside it. A projected
|
|
5982
6022
|
* `m-section-pagination` draws beneath the table and windows nothing itself.
|
|
5983
6023
|
*/
|
|
5984
|
-
export declare class SectionTableComponent extends ConfigComponent<SectionTableConfig
|
|
6024
|
+
export declare class SectionTableComponent<Id extends string = string> extends ConfigComponent<SectionTableConfig<Id>> {
|
|
5985
6025
|
subFolder: "section_tables";
|
|
5986
6026
|
readonly sticky: import("@angular/core").InputSignal<boolean | undefined>;
|
|
5987
6027
|
readonly margin: import("@angular/core").InputSignal<boolean | undefined>;
|
|
@@ -5990,22 +6030,24 @@ export declare class SectionTableComponent extends ConfigComponent<SectionTableC
|
|
|
5990
6030
|
/**
|
|
5991
6031
|
* Fires on every sort click, after the rows were reordered in place — a
|
|
5992
6032
|
* table holding one page of a longer list hands the sort to whoever fetches
|
|
5993
|
-
* (m-one-ui ADR 0148).
|
|
6033
|
+
* (m-one-ui ADR 0148). Its `id` is typed by the columns bound to `[config]`:
|
|
6034
|
+
* a Screen binding `SectionTableConfig<OrdersTableSortColumn>` gets that
|
|
6035
|
+
* enum back, with no cast at the binding (m-one-ui ADR 0203).
|
|
5994
6036
|
*/
|
|
5995
|
-
readonly sortChange: import("@angular/core").OutputEmitterRef<SectionTableSort
|
|
6037
|
+
readonly sortChange: import("@angular/core").OutputEmitterRef<SectionTableSort<Id>>;
|
|
5996
6038
|
/**
|
|
5997
6039
|
* Fires once, after the table's first render — the hook a Screen binds to
|
|
5998
6040
|
* load the rows the table is about to show, the way a form's
|
|
5999
6041
|
* `formInitialized` is bound.
|
|
6000
6042
|
*/
|
|
6001
6043
|
readonly tableInitialized: import("@angular/core").OutputEmitterRef<void>;
|
|
6002
|
-
readonly columns: import("@angular/core").Signal<SectionTableColumn[]>;
|
|
6044
|
+
readonly columns: import("@angular/core").Signal<SectionTableColumn<Id>[]>;
|
|
6003
6045
|
/**
|
|
6004
6046
|
* The sort in force, read by `sectionTableSort` around each Repeat's source.
|
|
6005
6047
|
* Starts at the columns' default sort — not reported, nothing was clicked —
|
|
6006
6048
|
* and goes back to it whenever the columns change.
|
|
6007
6049
|
*/
|
|
6008
|
-
readonly sort: import("@angular/core").WritableSignal<SectionTableSort | null>;
|
|
6050
|
+
readonly sort: import("@angular/core").WritableSignal<SectionTableSort<Id> | null>;
|
|
6009
6051
|
protected readonly resolvedSticky: import("@angular/core").Signal<boolean>;
|
|
6010
6052
|
protected readonly resolvedMargin: import("@angular/core").Signal<boolean>;
|
|
6011
6053
|
protected readonly resolvedVariant: import("@angular/core").Signal<SectionTableVariant>;
|
|
@@ -6017,14 +6059,14 @@ export declare class SectionTableComponent extends ConfigComponent<SectionTableC
|
|
|
6017
6059
|
constructor();
|
|
6018
6060
|
isFolded(index: number): boolean;
|
|
6019
6061
|
offsetOf(index: number): number;
|
|
6020
|
-
protected justify(column: SectionTableColumn): string | null;
|
|
6062
|
+
protected justify(column: SectionTableColumn<Id>): string | null;
|
|
6021
6063
|
protected columnWidth(index: number): string | null;
|
|
6022
6064
|
protected toggleFold(index: number): void;
|
|
6023
6065
|
protected sortDirection(index: number): SectionTableSort['direction'] | null;
|
|
6024
6066
|
protected ariaSort(index: number): string | null;
|
|
6025
|
-
protected onSortClick(column: SectionTableColumn
|
|
6026
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<SectionTableComponent
|
|
6027
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SectionTableComponent
|
|
6067
|
+
protected onSortClick(column: SectionTableColumn<Id>, index: number): void;
|
|
6068
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SectionTableComponent<any>, never>;
|
|
6069
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SectionTableComponent<any>, "m-section-table", never, {
|
|
6028
6070
|
"sticky": {
|
|
6029
6071
|
"alias": "sticky";
|
|
6030
6072
|
"required": false;
|
|
@@ -6088,7 +6130,7 @@ export declare class SectionTableCellComponent {
|
|
|
6088
6130
|
static ɵcmp: i0.ɵɵComponentDeclaration<SectionTableCellComponent, "td[m-section-table-cell]", never, {}, {}, never, ["*"], true, never>;
|
|
6089
6131
|
}
|
|
6090
6132
|
/** A column's id, falling back to its position (m-one-ui ADR 0148). */
|
|
6091
|
-
export declare const sectionTableColumnId: (column: SectionTableColumn
|
|
6133
|
+
export declare const sectionTableColumnId: <Id extends string>(column: SectionTableColumn<Id>, index: number) => Id | string;
|
|
6092
6134
|
/**
|
|
6093
6135
|
* Each column's width as a CSS length: a `span` is its twelfth-share of the
|
|
6094
6136
|
* table, and a column without one gets `undefined` so the `<table>` divides
|
|
@@ -6102,9 +6144,9 @@ export declare const sectionTableColumnWidths: (columns: readonly SectionTableCo
|
|
|
6102
6144
|
*/
|
|
6103
6145
|
export declare const sectionTableFrozenCount: (columns: readonly SectionTableColumn[]) => number;
|
|
6104
6146
|
/** The next sort after a click on the column with `id`. */
|
|
6105
|
-
export declare const nextSectionTableSort: (current: SectionTableSort | null, id:
|
|
6147
|
+
export declare const nextSectionTableSort: <Id extends string>(current: SectionTableSort<Id> | null, id: Id, dataType: SectionTableSort["dataType"]) => SectionTableSort<Id>;
|
|
6106
6148
|
/** The sort a table starts with: its first `defaultSort` column's, if any. */
|
|
6107
|
-
declare const defaultSectionTableSort: (columns: readonly SectionTableColumn[]) => SectionTableSort | null;
|
|
6149
|
+
declare const defaultSectionTableSort: <Id extends string>(columns: readonly SectionTableColumn<Id>[]) => SectionTableSort<Id> | null;
|
|
6108
6150
|
/**
|
|
6109
6151
|
* A copy of `rows` ordered by `sort`, the input untouched. Missing values sink
|
|
6110
6152
|
* to the end in either direction — an empty cell is not the smallest value.
|
|
@@ -7982,7 +8024,7 @@ export declare class TextOutputComponent extends ConfigComponent<TextOutputConfi
|
|
|
7982
8024
|
readonly variant: import("@angular/core").InputSignal<TextOutputVariant | undefined>;
|
|
7983
8025
|
readonly color: import("@angular/core").InputSignal<string | undefined>;
|
|
7984
8026
|
readonly fontWeight: import("@angular/core").InputSignal<TextOutputFontWeight | undefined>;
|
|
7985
|
-
readonly label: import("@angular/core").InputSignal<string | undefined>;
|
|
8027
|
+
readonly label: import("@angular/core").InputSignal<string | number | undefined>;
|
|
7986
8028
|
readonly noTranslate: import("@angular/core").InputSignal<string | boolean | undefined>;
|
|
7987
8029
|
readonly params: import("@angular/core").InputSignal<Record<string, string> | undefined>;
|
|
7988
8030
|
readonly truncate: import("@angular/core").InputSignal<boolean | undefined>;
|
|
@@ -17894,4 +17936,4 @@ export declare const toggleUid: (audience: Audience, uid: string) => Audience;
|
|
|
17894
17936
|
export declare const toggleGroup: (audience: Audience, groupId: string) => Audience;
|
|
17895
17937
|
/** How many Users and Groups an Audience names. */
|
|
17896
17938
|
export declare const pickCount: (audience: Audience) => number;
|
|
17897
|
-
export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppLogoTone, AppLogoVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgeCount, 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, HeatSwatchRadius, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavCountConfig, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, RowDropEvent, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionChartConfig, SectionChartPoints, SectionChartScale, SectionChartWindow, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort,
|
|
17939
|
+
export type { Accordion, AccordionGroup, AccordionVariant, AppCardData, AppCardInputs, AppCardVariant, AppLogoTone, AppLogoVariant, AppManifest, AppTileData, AssetOption, Audience, AudienceLevel, AudienceMember, AudiencePicker, AuthResult, Badge, BadgeCount, 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, HeatSwatchRadius, Icon, KeyValueVariant, LabelSegment, ListConfig, ListContext, ListItem, ListOrientation, ListVariant, MenuItem, MoneySystem, NavCountConfig, NavInstanceConfig, NavMenuConfig, NavRowsConfig, NavVisibilityConfig, NavVisibleAnswer, NavWidgetConfig, NavWidgetEntry, NavWidgetMap, OverlayWidgetLoader, OverlayWidgetMap, PageChangeEvent, Pagination, PaginationWindow, ResolvedUserTab, RowDropEvent, SearchChangeEvent, SectionAccordion, SectionAccordionGroup, SectionAccordionGroupContext, SectionAccordionRef, SectionButtonGroupConfig, SectionChartConfig, SectionChartPoints, SectionChartScale, SectionChartWindow, SectionFilterGroupConfig, SectionHero, SectionHeroVariant, SectionTableAlign, SectionTableColumn, SectionTableConfig, SectionTableDataType, SectionTableSort, 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 };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"magmonium-one-button-CKHBcCoO.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/badge/lib/badge.ts","../../../../libs/one/src/lib/shared/ui/badge/ui/badge.ts","../../../../libs/one/src/lib/shared/lib/components/reactive-element.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/button.ts","../../../../libs/one/src/lib/shared/ui/button/lib/function/group.ts","../../../../libs/one/src/lib/shared/ui/img/img.ts","../../../../libs/one/src/lib/shared/ui/form/lib/section-form-context.token.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.ts","../../../../libs/one/src/lib/shared/ui/button/ui/button.html"],"sourcesContent":["import { Badge } from '../type/badge';\n\nexport const getBadgeClasses = (config: Badge | undefined): string => {\n if (!config) return 'badge';\n\n const classes = ['badge'];\n\n if (config.variant) {\n classes.push(`badge--${config.variant}`);\n }\n\n if (config.position && config.position !== 'static') {\n classes.push(`badge--${config.position}`);\n }\n\n if (config.animation && config.animation !== 'none') {\n classes.push(`badge--${config.animation}`);\n }\n\n return classes.join(' ');\n};\n\nexport const formatBadgeCount = (\n count: number | undefined,\n maxCount = 99\n): string => {\n if (count === undefined || count <= 0) return '';\n if (count > maxCount) return `${maxCount}+`;\n return count.toString();\n};\n\nexport const shouldShowBadge = (count: number | undefined): boolean =>\n count !== undefined && count > 0;\n\nexport const formatCount = formatBadgeCount;\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n model,\n} from '@angular/core';\nimport { ConfigComponent } from '../../../lib/components/config-component';\nimport { Badge } from '../type';\nimport { getBadgeClasses } from '../lib';\nimport { IconComponent } from '../../icon/ui/icon';\n\n@Component({\n selector: 'm-badge',\n imports: [IconComponent],\n template: `\n <span [class]=\"classes()\">\n @if (iconConfig(); as icon) {\n <m-icon [config]=\"icon\" />\n }\n <ng-content />\n @if (config()?.ping) {\n <span class=\"badge__ping\"></span>\n }\n </span>\n `,\n styleUrls: ['./badge.sass'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BadgeComponent extends ConfigComponent<Badge> {\n override readonly subFolder = 'badges';\n override config = model<Partial<Badge>>();\n\n protected readonly classes = computed(() => getBadgeClasses(this.config()));\n\n protected readonly iconConfig = computed(() => {\n const iconName = this.config()?.icon;\n if (!iconName) return undefined;\n const variant = this.config()?.variant;\n\n let color = '';\n if (variant === 'saas') {\n color = 'mm';\n } else if (variant === 'minimal') {\n color = 'textSecondary';\n } else {\n color = this.pallet()?.contrastColor || '';\n }\n\n return {\n name: iconName,\n color,\n };\n });\n}\n","import { effect, ElementRef, signal } from '@angular/core';\nimport { ConfigComponent } from './config-component';\nimport { Config } from '../../type/config/config-type';\n\n/**\n * Base class that provides reactive classList functionality for components with viewChild elements.\n * Extends ConfigComponent to inherit config management and color service functionality.\n */\nexport abstract class ReactiveElementComponent<\n T extends Config,\n> extends ConfigComponent<T> {\n /**\n * Abstract property that child classes must implement to specify which element to observe.\n * Should return the viewChild ElementRef that contains the DOM element to observe.\n */\n protected abstract element(): ElementRef | undefined;\n\n /**\n * Reactive signal containing the current classList of the observed element.\n * Updates automatically when the DOM element's classes change.\n */\n protected readonly classList = signal<string[]>([]);\n\n /**\n * MutationObserver instance for observing class changes.\n * Automatically managed by the component lifecycle.\n */\n private observer: MutationObserver | null = null;\n\n constructor() {\n super();\n\n // Set up reactive classList observation\n effect(() => {\n const el = this.element()?.nativeElement;\n\n // Cleanup previous observer\n if (this.observer) {\n this.observer.disconnect();\n this.observer = null;\n }\n\n if (!el) {\n this.classList.set([]);\n return;\n }\n\n // Set initial classList\n this.classList.set(Array.from(el.classList));\n\n // Set up MutationObserver for reactivity\n this.observer = new MutationObserver(() => {\n this.classList.set(Array.from(el.classList));\n });\n\n this.observer.observe(el, {\n attributes: true,\n attributeFilter: ['class'],\n });\n });\n }\n\n /**\n * Check if the element has a specific CSS class.\n * @param className - The class name to check for\n * @returns True if the element has the class, false otherwise\n */\n protected hasClass(className: string): boolean {\n return this.classList().includes(className);\n }\n\n /**\n * Toggle a CSS class on the element.\n * @param className - The class name to toggle\n * @param force - Optional boolean to force add (true) or remove (false)\n */\n protected toggleClass(className: string, force?: boolean): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n if (force !== undefined) {\n el.classList.toggle(className, force);\n } else {\n el.classList.toggle(className);\n }\n }\n\n /**\n * Add one or more CSS classes to the element.\n * @param classNames - The class names to add\n */\n protected addClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.add(...classNames);\n }\n\n /**\n * Remove one or more CSS classes from the element.\n * @param classNames - The class names to remove\n */\n protected removeClass(...classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.remove(...classNames);\n }\n\n /**\n * Replace one CSS class with another.\n * @param oldClass - The class to remove\n * @param newClass - The class to add\n */\n protected replaceClass(oldClass: string, newClass: string): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.classList.replace(oldClass, newClass);\n }\n\n /**\n * Set the complete classList, replacing all existing classes.\n * @param classNames - The new class names to set\n */\n protected setClassList(classNames: string[]): void {\n const el = this.element()?.nativeElement;\n if (!el) return;\n\n el.className = classNames.join(' ');\n }\n}\n","import { Button } from '../../type/button';\n\nexport function deriveButtonClass(button?: Button): string {\n if (!button) {\n return '';\n }\n const classList: string[] = [];\n if (button.icon || button.imgSrc) {\n if (!button.label || button.iconOnly) {\n classList.push('only-icon');\n }\n classList.push(button.isRightIcon ? 'with-right-icon' : 'with-left-icon');\n }\n if (button.variant === 'primary') {\n classList.push('primary');\n }\n if (button.variant === 'ghost') {\n classList.push('ghost');\n }\n if (button.variant === 'tab') {\n classList.push('tab');\n }\n if (button.fullWidth) {\n classList.push('full-width');\n }\n if (button.stacked) {\n classList.push('stacked');\n }\n if (button.badge) {\n classList.push('has-badge');\n }\n if (button.nonClickable) {\n classList.push('read-only');\n }\n return classList.join(' ');\n}\n\nexport function isButtonName(name: string, button?: Button): boolean {\n if (!button) {\n return false;\n }\n return button.name === name || button.label === name;\n}\n","import { ButtonGroup } from '../../type/button';\n\nexport function deriveGroupClass(group?: Partial<ButtonGroup>): string {\n if (!group) {\n return '';\n }\n const classList: string[] = [];\n classList.push(group?.vertical ? 'vertical' : 'horizontal');\n\n // Handle center for backward compatibility\n if (group?.center) {\n classList.push('center');\n }\n\n // Handle new align property (takes precedence over center)\n if (group?.align) {\n classList.push(`align-${group.align}`);\n }\n\n if (group?.primary) {\n classList.push('is-primary');\n }\n\n return classList.join(' ');\n}\n","import {\n Component,\n ChangeDetectionStrategy,\n inject,\n input,\n signal,\n effect,\n computed,\n} from '@angular/core';\nimport { NgOptimizedImage, IMAGE_LOADER, ImageLoaderConfig } from '@angular/common';\nimport { HttpService } from '../../services/http';\n\n@Component({\n selector: 'm-img',\n\n changeDetection: ChangeDetectionStrategy.OnPush,\n imports: [NgOptimizedImage],\n host: {\n // The box is the container's: 100% wide and tall unless a caller names\n // width/height figures, which land as inline px on this element.\n '[style.width.px]': 'boxWidth()',\n '[style.height.px]': 'boxHeight()',\n },\n providers: [\n {\n provide: IMAGE_LOADER,\n useValue: (config: ImageLoaderConfig) => {\n const src = config.src;\n if (src.includes('iiif.archive.org')) {\n const match = src.match(/(\\/full\\/)([^/]+)(\\/0\\/)/);\n if (match && config.width) {\n return src.replace(/(\\/full\\/)[^/]+(\\/0\\/)/, `$1${config.width},$2`);\n }\n }\n return src;\n },\n },\n ],\n template: `\n <div\n class=\"m-img\"\n [class.m-img--loaded]=\"status() === 'loaded'\"\n [class.m-img--error]=\"showFallback()\"\n [class.m-img--fill]=\"fill()\"\n [class.m-img--priority]=\"priority()\"\n [class.m-img--sized]=\"isSized()\"\n >\n @if (showFallback()) {\n <div class=\"m-img__fallback\" role=\"img\" [attr.aria-label]=\"alt()\">\n <svg viewBox=\"0 0 320 240\" fill=\"none\" preserveAspectRatio=\"xMidYMid slice\">\n <circle cx=\"112\" cy=\"92\" r=\"22\" fill=\"currentColor\" />\n <path d=\"M40 200l72-72 56 56 40-40 72 72z\" fill=\"currentColor\" />\n </svg>\n </div>\n } @else if (isDataUri()) {\n <img\n class=\"m-img__img\"\n [src]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n referrerpolicy=\"no-referrer\"\n />\n } @else {\n <img\n class=\"m-img__img\"\n [ngSrc]=\"effectiveSrc()!\"\n [alt]=\"alt()\"\n [priority]=\"priority()\"\n (load)=\"onLoad()\"\n (error)=\"onError()\"\n [fill]=\"fill()\"\n [width]=\"widthAttr()\"\n [height]=\"heightAttr()\"\n [ngSrcset]=\"autoNgSrcset()!\"\n [sizes]=\"sizes() || undefined\"\n decoding=\"async\"\n referrerpolicy=\"no-referrer\"\n />\n }\n @if (status() === 'loading' && !priority()) {\n <div class=\"m-img__skeleton\"></div>\n }\n </div>\n `,\n styleUrl: './img.sass',\n})\nexport class ImgComponent {\n readonly #httpService = inject(HttpService);\n\n readonly src = input<string | null | undefined>();\n readonly data = input<string | null | undefined>();\n readonly dataType = input<string>('image/jpeg');\n readonly alt = input.required<string>();\n readonly priority = input<boolean>(false);\n readonly fill = input<boolean>(true);\n // Unset rather than defaulted: `1200 × 1800` is the reservation\n // NgOptimizedImage needs, and a picture drawn 1200px wide because nobody\n // named a width is not the same thing. `attrWidth`/`attrHeight` carry that\n // default onto the tag; these two say whether anyone actually asked.\n readonly width = input<number | undefined>(undefined);\n readonly height = input<number | undefined>(undefined);\n readonly remote = input<string | undefined>();\n readonly ngSrcset = input<string | undefined>();\n readonly sizes = input<string | undefined>();\n\n readonly attrWidth = computed(() => this.width() ?? 1200);\n readonly attrHeight = computed(() => this.height() ?? 1800);\n\n // On the tag only when the picture is not filling its box — a filling\n // picture is sized by its box, the others carry the reservation figures.\n readonly widthAttr = computed(() => (this.fill() ? undefined : this.attrWidth()));\n readonly heightAttr = computed(() => (this.fill() ? undefined : this.attrHeight()));\n\n // Null unless the picture is drawn at a size it was told: a filling picture\n // takes its size from the box around it, and an unnamed figure leaves the\n // stylesheet's `width: 100%` in charge.\n readonly boxWidth = computed(() =>\n this.fill() ? null : (this.width() ?? null)\n );\n readonly boxHeight = computed(() =>\n this.fill() ? null : (this.height() ?? null)\n );\n\n // Both figures named means a box of exactly that shape, which the picture\n // has to cover rather than letter-box inside.\n readonly isSized = computed(\n () => this.boxWidth() !== null && this.boxHeight() !== null\n );\n\n readonly autoNgSrcset = computed(() => {\n const custom = this.ngSrcset();\n if (custom !== undefined) return custom;\n\n const src = this.effectiveSrc();\n if (src && src.includes('iiif.archive.org')) {\n return this.fill() ? '480w, 768w, 960w, 1200w, 1920w, 2048w' : '1x, 2x';\n }\n\n return undefined;\n });\n\n // --- State ---\n // One signal rather than a loaded/error pair: the three states are\n // exclusive, and two booleans could say both or neither.\n readonly status = signal<'loading' | 'loaded' | 'error'>('loading');\n\n readonly effectiveSrc = computed(() => {\n const d = this.data();\n if (d) return `data:${this.dataType()};base64,${d}`;\n const src = this.src();\n const remote = this.remote();\n if (\n src &&\n remote &&\n !src.startsWith('http') &&\n !src.startsWith('data:') &&\n !src.startsWith('blob:')\n ) {\n return this.#httpService.buildWcAssetUrl(remote, src);\n }\n return src;\n });\n\n // The one stand-in this component draws, for every case that has no picture\n // to show: a load that failed, a url nobody set, and design mode, where a\n // picture is placed on the canvas long before it points anywhere.\n readonly showFallback = computed(\n () => this.status() === 'error' || !this.effectiveSrc()\n );\n\n readonly isDataUri = computed(() => {\n const s = this.effectiveSrc();\n return !!s && (s.startsWith('data:') || s.startsWith('blob:'));\n });\n\n constructor() {\n effect(() => {\n // A source change starts the wait over.\n const source = this.effectiveSrc();\n this.status.set(source ? 'loading' : 'error');\n });\n }\n\n onLoad() {\n this.status.set('loaded');\n }\n\n onError() {\n this.status.set('error');\n }\n}\n","import { InjectionToken, Signal } from '@angular/core';\nimport { FieldTree } from '@angular/forms/signals';\nimport { FieldPatterns } from './field-patterns';\n\n/**\n * Published by `<m-section-form>` for projected `<m-section-form-item>`s.\n * Each item looks up `form()[name]` and binds `FormField` so its value writes\n * to that key — not via a `name` input on the inner TextInputComponent.\n *\n * The form context carries form state and field registration for projected\n * items. Sizing is inherited through the section/form host CSS variables.\n *\n * Projected Buttons read it when their `isSubmit` flag is true. That Button\n * locks on `blocked` and fires `submit` on click rather than relying on a\n * native `type=\"submit\"` — content projection can put it inside an app\n * wrapper, where the native path no longer reaches the `<form>` ancestor.\n */\nexport interface SectionFormContext {\n readonly form: Signal<FieldTree<Record<string, unknown>> | null>;\n /**\n * Announces a key, and whether the Field on that key is required. The flag is\n * what turns `required` written on a tag into a validator on the FieldTree —\n * without it the attribute only reaches the native input, which a `novalidate`\n * form ignores, so nothing would ever be invalid (ADR 0010).\n *\n * `value` is the Field's own value, written on its tag: what the key starts\n * on when the form's `data` holds nothing for it.\n */\n readonly registerField: (\n name: string,\n required?: boolean,\n patterns?: FieldPatterns,\n value?: unknown\n ) => void;\n /**\n * An item has mounted its control. Content projection gives the form no\n * render hook of its own, so this is what tells it the DOM is finally\n * complete enough to pick the field that takes the caret.\n */\n readonly fieldMounted: () => void;\n /**\n * An item has started loading its control's chunk. Every control arrives\n * through a dynamic import, and the chunks resolve in whatever order the\n * loader finishes them — so a `password` below an `otp` can put its input in\n * the DOM first. The form waits for the count to fall back to zero before it\n * reads document order for the caret.\n */\n readonly fieldPending: () => void;\n /** That load ended — mounted, superseded, or failed. Always paired with `fieldPending`. */\n readonly fieldSettled: () => void;\n /** Drops a destroyed item's rules, so a removed Field stops blocking. */\n readonly releaseField: (name: string) => void;\n /** Invalid or disabled — every submit control is locked while true. */\n readonly blocked: Signal<boolean>;\n /** Emits the form's `submit` output with the whole merged data. No-op while blocked. */\n readonly submit: () => void;\n /**\n * Bumped every time the form writes values the User did not type — a `data`\n * restamp, a `reset()` after submit. A projected item observing its own\n * field's value signal cannot tell those moves from a keystroke, so the\n * form says so: a move under an unchanged version is the User's, and the\n * only move a Field's `dataChange` announces (libs/one ADR 0032).\n */\n readonly dataVersion: Signal<number>;\n}\n\nexport const SECTION_FORM_CONTEXT = new InjectionToken<SectionFormContext>(\n 'SECTION_FORM_CONTEXT'\n);\n","import {\n ChangeDetectionStrategy,\n Component,\n computed,\n effect,\n ElementRef,\n forwardRef,\n inject,\n input,\n model,\n output,\n viewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { RouterModule } from '@angular/router';\nimport { IconComponent } from '../../icon';\nimport { BadgeComponent } from '../../badge';\nimport { ReactiveElementComponent } from '../../../lib/components/reactive-element';\nimport { TranslatePipe } from '../../../pipe/translate';\nimport { Button } from '../type/button';\nimport { deriveButtonClass } from '../lib';\nimport { formatBadgeCount } from '../../badge';\nimport {\n toAttrBool,\n toAttrNumber,\n} from '../../../functions/config/attribute-value';\nimport { MRefDirective } from '../../../directives/m-ref/m-ref';\nimport { NAV_STORE_REF } from '../../../config/tokens';\nimport { NgTemplateOutlet } from '@angular/common';\nimport { ImgComponent } from '../../img/img';\n\nimport { resolvePallet } from '../../../lib/theme';\nimport { ThemeColor } from '@magmonium/cli';\nimport { SECTION_FORM_CONTEXT } from '../../form/lib/section-form-context.token';\n\n@Component({\n selector: 'm-button,m-one-button',\n templateUrl: './button.html',\n imports: [\n forwardRef(() => TranslatePipe),\n forwardRef(() => IconComponent),\n forwardRef(() => BadgeComponent),\n RouterModule,\n MRefDirective,\n forwardRef(() => NgTemplateOutlet),\n forwardRef(() => ImgComponent),\n ],\n styleUrls: ['./button.sass'],\n encapsulation: ViewEncapsulation.Emulated,\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class ButtonComponent extends ReactiveElementComponent<Button> {\n override config = model<Partial<Button>>();\n color = input<string | keyof ThemeColor | undefined>();\n labelClass = input<string | undefined>();\n fullWidth = input<boolean | string | undefined>();\n // NavRef — a NavId. The store reads the NavKind off that node to decide\n // route vs panel, so the Button never picks a link kind (ADR 0014).\n nav = input<string | undefined>();\n navParams = input<Record<string, string | number> | undefined>();\n href = input<string | undefined>();\n disabled = input<boolean | undefined>();\n variant = input<'primary' | 'ghost' | 'secondary' | 'tab' | undefined>();\n override name = input<string | undefined>();\n override baseUrl = input<string | undefined>();\n override one = input<boolean | undefined>();\n override remote = input<string | undefined>();\n override subFolder = 'buttons';\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button needs\n // no file (ADR 0010). `badge` is absent on purpose — it is an object, and an\n // object literal in markup is a lint error, so a badged Button still names\n // an asset or takes a bound config.\n label = input<string | undefined>();\n noTranslate = input<boolean | string | undefined>();\n // A Record, so it never rides as a literal attribute (ADR 0010) — it arrives\n // bound, from the page member holding every dynamic message value.\n params = input<Record<string, string> | undefined>();\n // When true, render a non-native element (div) instead of a <button>.\n // Use this when consumers explicitly need to avoid native <button> tags.\n noNative = input<boolean | string | undefined>();\n icon = input<string | undefined>();\n isRightIcon = input<boolean | string | undefined>();\n iconOnly = input<boolean | string | undefined>();\n stacked = input<boolean | string | undefined>();\n imgSrc = input<string | undefined>();\n nonClickable = input<boolean | string | undefined>();\n inverted = input<boolean | string | undefined>();\n isSubmit = input<boolean | string | undefined>();\n tabindex = input<number | string | undefined>();\n readonly clicked = output<Button | undefined>();\n button = viewChild<ElementRef>('button');\n protected element = this.button;\n protected readonly className = computed(() =>\n deriveButtonClass(this.config())\n );\n private readonly navRef = inject(NAV_STORE_REF, { optional: true });\n\n // Present only for a Button projected into an `m-section-form`. Absent\n // everywhere else, so every Button outside one behaves exactly as before.\n private readonly sectionForm = inject(SECTION_FORM_CONTEXT, {\n optional: true,\n });\n\n // Only an explicitly marked Button inside a Section Form submits it. A\n // navigating Button is excluded: its click already goes somewhere, and\n // submitting on the way out would save a form the User was leaving.\n // A form on a visual editor's Canvas is a picture of a form, and its empty\n // fields make it invalid from the first render — a submit that locked on\n // that would show the designer a greyed-out Button they never configured.\n protected readonly isFormSubmit = computed(() => {\n if (!this.sectionForm || this.isDesignMode) return false;\n const config = this.config();\n if (config?.nav || config?.href) return false;\n return config?.isSubmit === true;\n });\n\n // The form's own lock, on top of whatever the config already disables: an\n // invalid or disabled form has nothing to submit, so its submit control says\n // so rather than swallowing the click.\n protected readonly isDisabled = computed(\n () =>\n this.config()?.disabled === true ||\n (this.isFormSubmit() && !!this.sectionForm?.blocked())\n );\n // A NavRef pointing at a Murl node reads as selected when it is the open\n // panel. Compared by NavId — there is no link string left to normalise.\n private readonly isMurlActive = computed(() => {\n const nav = this.config()?.nav;\n if (!nav) return false;\n if (!this.navRef?.murl()?.length) return false;\n return this.navRef.id() === nav;\n });\n private readonly isPrimary = computed(() =>\n this.variant() === 'primary' ||\n this.config()?.variant === 'primary' ||\n this.hasClass('primary')\n );\n private readonly colorInput = computed(() =>\n this.color() || this.config()?.color || 'mm'\n );\n private readonly buttonColor = computed(() => {\n const color = this.colorInput();\n const isPrimary = this.isPrimary();\n if (isPrimary && color === 'inverseText') {\n return resolvePallet('mm', this.themeStore.color()).color;\n }\n const pallet = resolvePallet(color, this.themeStore.color());\n return isPrimary ? pallet.contrastColor : pallet.color;\n });\n\n constructor() {\n super();\n effect(() => {\n const isPrimary = this.isPrimary();\n const colorInput = this.colorInput();\n const el = this.elementRef.nativeElement;\n if (isPrimary && colorInput === 'inverseText') {\n el.style.setProperty('--m-button-color-contrast', this.buttonColor());\n el.style.setProperty('--m-one-button-color-contrast', this.buttonColor());\n }\n });\n }\n\n protected readonly buttonIcon = computed(() => {\n const name = this.config()?.icon;\n if (!name) {\n return undefined;\n }\n return {\n name: this.config()?.icon,\n color: this.buttonColor(),\n baseUrl: this.baseUrl(),\n remote: this.remote() ?? this.config()?.remote,\n };\n });\n private overrideProperty = computed<Partial<Button>>(() => {\n const button = {} as Partial<Button>;\n // The rest of what a `buttons/<name>.yml` carries, so a one-off Button\n // needs no file (ADR 0010). An omitted attribute is skipped rather than\n // written as undefined — writing it would blank whatever the asset set.\n const put = (key: keyof Button, value: unknown): void => {\n if (value !== undefined) (button as Record<string, unknown>)[key] = value;\n };\n put('label', this.label());\n put('icon', this.icon());\n put('imgSrc', this.imgSrc());\n put('tabindex', toAttrNumber(this.tabindex()));\n put('noTranslate', toAttrBool(this.noTranslate()));\n put('params', this.params());\n put('isRightIcon', toAttrBool(this.isRightIcon()));\n put('iconOnly', toAttrBool(this.iconOnly()));\n put('stacked', toAttrBool(this.stacked()));\n put('nonClickable', toAttrBool(this.nonClickable()));\n put('inverted', toAttrBool(this.inverted()));\n put('isSubmit', toAttrBool(this.isSubmit()));\n\n if (this.color()) {\n button['color'] = this.color();\n }\n if (this.labelClass()) {\n button['labelClass'] = this.labelClass();\n }\n if (typeof this.fullWidth() !== 'undefined') {\n button['fullWidth'] = toAttrBool(this.fullWidth());\n }\n if (this.nav()) {\n button['nav'] = this.nav();\n }\n if (this.navParams()) {\n button['navParams'] = this.navParams();\n }\n if (this.href()) {\n button['href'] = this.href();\n }\n if (typeof this.disabled() !== 'undefined') {\n button['disabled'] = this.disabled();\n }\n if (this.variant()) {\n button['variant'] = this.variant();\n }\n\n // Force primary and clear ghost if the color is 'inverse' or 'inverseText', unless explicitly ghost or secondary\n const finalColor = button.color || this.config()?.color;\n const isExplicitGhost =\n button.variant === 'ghost' || this.config()?.variant === 'ghost';\n const isExplicitSecondary =\n button.variant === 'secondary' ||\n (this.config()?.variant as string) === 'secondary';\n if (\n (finalColor === 'inverse' || finalColor === 'inverseText') &&\n !isExplicitGhost &&\n !isExplicitSecondary\n ) {\n button['color'] = 'inverseText';\n button['variant'] = 'primary';\n } else if (finalColor === 'inverse') {\n button['color'] = 'inverseText';\n }\n\n if (this.config()?.nav || this.nav()) {\n button['variant'] = this.isMurlActive() ? undefined : 'ghost';\n }\n\n return button;\n });\n\n protected override resolveComponentOverrides(): Partial<Button> {\n return this.overrideProperty();\n }\n\n public onClick() {\n if (this.isFormSubmit()) {\n // Called rather than left to a native `type=\"submit\"`: the `<form>` is\n // only an ancestor while nothing re-projects this Button out of it.\n this.sectionForm?.submit();\n }\n this.clicked.emit(this.config());\n }\n\n protected readonly formatBadgeCount = (count: number, max = 99): string =>\n formatBadgeCount(count, max);\n\n}\n","@if (config(); as config) {\n <!-- One branch for every in-app target: `mRef` names a NavId and the store\n reads the NavKind off that node to decide route vs panel (ADR 0014). -->\n @if (config.nav) {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"config.disabled\"\n [mRef]=\"config.nav\"\n [mRefParams]=\"config.navParams\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n mRefLinkActive=\"tab\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"config.disabled ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n } @else if (config.href) {\n <a\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [href]=\"config.href\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </a>\n } @else {\n @if (!noNative()) {\n <button\n type=\"button\"\n class=\"{{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.tabindex]=\"config.tabindex\"\n [disabled]=\"isDisabled()\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </button>\n } @else {\n <div\n role=\"button\"\n [attr.tabindex]=\"config.tabindex ?? 0\"\n class=\"non-native {{ className() }}\"\n [attr.data-testid]=\"config.name + '-btn'\"\n [attr.aria-label]=\"config.noTranslate ? config.label : (config.label | translate: config.params)\"\n [attr.aria-disabled]=\"isDisabled() ? 'true' : 'false'\"\n (keydown.enter)=\"onClick()\"\n (click)=\"onClick()\"\n #button\n >\n <ng-container *ngTemplateOutlet=\"buttonContent; context: { button: config }\"></ng-container>\n </div>\n }\n }\n}\n\n<ng-template #buttonContent let-button=\"button\">\n @if (button.imgSrc) {\n <div class=\"button-icon button-icon--img\">\n <m-img [src]=\"button.imgSrc\" [remote]=\"button.remote\" [alt]=\"button.label || button.name || ''\" />\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n } @else if (buttonIcon(); as icon) {\n <div class=\"button-icon\">\n @if (isFromOne()) {\n <m-one-icon [config]=\"icon\" />\n } @else {\n <m-icon [config]=\"icon\" />\n }\n @if (button.badge && button.badge.count) {\n <m-badge\n [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'absolute' }\"\n >{{ formatBadgeCount(button.badge.count) }}</m-badge\n >\n }\n </div>\n }\n @if (button.label && !button.iconOnly) {\n <span class=\"button-label {{ button.labelClass || '' }}\">\n {{ button.noTranslate ? button.label : (button.label | translate: button.params) }}\n </span>\n }\n @if (!buttonIcon() && button.badge && button.badge.count) {\n <m-badge [config]=\"{ variant: button.badge.variant ?? 'danger', position: 'static' }\">{{\n formatBadgeCount(button.badge.count)\n }}</m-badge>\n }\n</ng-template>\n"],"mappings":";;;;;;;;;;AAEA,MAAa,mBAAmB,WAAqC;CACnE,IAAI,CAAC,QAAQ,OAAO;CAEpB,MAAM,UAAU,CAAC,OAAO;CAExB,IAAI,OAAO,SACT,QAAQ,KAAK,UAAU,OAAO,SAAS;CAGzC,IAAI,OAAO,YAAY,OAAO,aAAa,UACzC,QAAQ,KAAK,UAAU,OAAO,UAAU;CAG1C,IAAI,OAAO,aAAa,OAAO,cAAc,QAC3C,QAAQ,KAAK,UAAU,OAAO,WAAW;CAG3C,OAAO,QAAQ,KAAK,GAAG;AACzB;AAEA,MAAa,oBACX,OACA,WAAW,OACD;CACV,IAAI,UAAU,UAAa,SAAS,GAAG,OAAO;CAC9C,IAAI,QAAQ,UAAU,OAAO,GAAG,SAAQ;CACxC,OAAO,MAAM,SAAQ;AACvB;AAEA,MAAa,mBAAmB,UAC9B,UAAU,UAAa,QAAQ;ACJjC,IAAa,iBAAb,MAAa,uBAAuB,gBAAsB;CACtC,YAAY;CACrB,SAAS,MAAuB,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CAEtB,UAAU,eAAe,gBAAgB,KAAK,OAAM,CAAE,GAAE,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAExD,aAAa,eAAc;EAC5C,MAAM,WAAW,KAAK,OAAM,CAAE,EAAE;EAChC,IAAI,CAAC,UAAU,OAAO;EACtB,MAAM,UAAU,KAAK,OAAM,CAAE,EAAE;EAE/B,IAAI,QAAQ;EACZ,IAAI,YAAY,QACd,QA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,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,UAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA;IAAA,UAAA;IAAA,OAAA;IAAA,UAAA;GAAA,CAAA;EAAA,CAAA;EAAA,SAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,SAAA;EAAA,CAAA;EAAA,QAAA,CAAA;GAAA,MAAA,GAAA;GAAA,MAAA,CAAA,UAAQ,EAAA,UAAA,KAAA,CAAA;EAAA,CAAA;CAAA;AAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"magmonium-one-label-23DjRQdd.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/pipe/time-ago.ts","../../../../libs/one/src/lib/shared/pipe/money.fn.ts","../../../../libs/one/src/lib/shared/pipe/money.ts","../../../../libs/one/src/lib/shared/pipe/percentage.ts","../../../../libs/one/src/lib/shared/pipe/sign-color.ts","../../../../libs/one/src/lib/shared/pipe/compact-number.ts","../../../../libs/one/src/lib/shared/pipe/asset-url.ts","../../../../libs/one/src/lib/shared/ui/section/lib/functions/section-table.ts","../../../../libs/one/src/lib/shared/pipe/section-table-sort.ts","../../../../libs/one/src/lib/shared/ui/input/ui/label.ts"],"sourcesContent":["import { ChangeDetectorRef, inject, OnDestroy, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateService } from '../services/translate';\nimport { interval, Subscription } from 'rxjs';\n\nconst SECONDS_IN_MINUTE = 60;\nconst SECONDS_IN_HOUR = 3600;\nconst SECONDS_IN_DAY = 86400;\nconst SECONDS_IN_MONTH = 2592000;\nconst SECONDS_IN_YEAR = 31536000;\n\n@Pipe({\n name: 'timeAgo',\n pure: false,\n})\nexport class TimeAgoPipe implements PipeTransform, OnDestroy {\n private readonly translateService = inject(TranslateService);\n private readonly cdr = inject(ChangeDetectorRef);\n private timerSubscription: Subscription | null = null;\n private lastValue: string | Date | undefined = undefined;\n\n transform(value: string | Date | undefined): string {\n if (!value) return '';\n\n if (value !== this.lastValue) {\n this.lastValue = value;\n this.setupTimer();\n }\n\n const date = typeof value === 'string' ? new Date(value) : value;\n const now = new Date();\n const seconds = Math.floor((now.getTime() - date.getTime()) / 1000);\n\n if (seconds < SECONDS_IN_MINUTE) {\n return this.translateService.translate('just-now');\n }\n\n let count: number;\n let unit: string;\n\n if (seconds < SECONDS_IN_HOUR) {\n count = Math.floor(seconds / SECONDS_IN_MINUTE);\n unit = count === 1 ? 'minute' : 'minutes';\n } else if (seconds < SECONDS_IN_DAY) {\n count = Math.floor(seconds / SECONDS_IN_HOUR);\n unit = count === 1 ? 'hour' : 'hours';\n } else if (seconds < SECONDS_IN_MONTH) {\n count = Math.floor(seconds / SECONDS_IN_DAY);\n unit = count === 1 ? 'day' : 'days';\n } else if (seconds < SECONDS_IN_YEAR) {\n count = Math.floor(seconds / SECONDS_IN_MONTH);\n unit = count === 1 ? 'month' : 'months';\n } else {\n count = Math.floor(seconds / SECONDS_IN_YEAR);\n unit = count === 1 ? 'year' : 'years';\n }\n\n return this.translateService.translate(\n `time-ago?count=${count}&unit=${unit}`\n );\n }\n\n private setupTimer(): void {\n this.clearTimer();\n // Update every 30 seconds to keep the display fresh without overloading change detection.\n this.timerSubscription = interval(30000).subscribe(() => {\n this.cdr.detectChanges();\n });\n }\n\n private clearTimer(): void {\n if (this.timerSubscription) {\n this.timerSubscription.unsubscribe();\n this.timerSubscription = null;\n }\n }\n\n ngOnDestroy(): void {\n this.clearTimer();\n }\n}\n","export type MoneySystem = 'IN' | 'INTL';\n\nexport interface MoneyResult {\n amount: string;\n labelKey: string;\n}\n\ninterface Threshold {\n min: number;\n labelKey: string;\n overflowAt: number;\n}\n\nconst IN_THRESHOLDS: Threshold[] = [\n { min: 1_00_00_000, labelKey: 'cr', overflowAt: Infinity },\n { min: 1_00_000, labelKey: 'l', overflowAt: 100 },\n { min: 1_000, labelKey: 'k', overflowAt: 100 },\n];\n\nconst INTL_THRESHOLDS: Threshold[] = [\n { min: 1_000_000_000_000, labelKey: 't', overflowAt: Infinity },\n { min: 1_000_000_000, labelKey: 'b', overflowAt: 1_000 },\n { min: 1_000_000, labelKey: 'm', overflowAt: 1_000 },\n { min: 1_000, labelKey: 'k', overflowAt: 1_000 },\n];\n\n/**\n * Formats a non-negative finite number into a compact denomination result.\n * @param value Must be a non-negative finite number. Negative values and NaN\n * should be handled by the caller before invoking this function.\n */\nexport const formatMoney = (\n value: number,\n system: MoneySystem\n): MoneyResult => {\n const thresholds = system === 'IN' ? IN_THRESHOLDS : INTL_THRESHOLDS;\n\n for (let i = 0; i < thresholds.length; i++) {\n const { min, labelKey, overflowAt } = thresholds[i];\n if (value >= min) {\n const rounded = parseFloat((value / min).toFixed(1));\n if (rounded >= overflowAt && i > 0) {\n const higher = thresholds[i - 1];\n return {\n amount: parseFloat((value / higher.min).toFixed(1)).toString(),\n labelKey: higher.labelKey,\n };\n }\n return { amount: rounded.toString(), labelKey };\n }\n }\n\n return { amount: parseFloat(value.toFixed(2)).toString(), labelKey: '' };\n};\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateService } from '../services/translate';\nimport { formatMoney, MoneySystem } from './money.fn';\n\n@Pipe({\n name: 'money',\n pure: false,\n})\nexport class MoneyPipe implements PipeTransform {\n private readonly translateService = inject(TranslateService);\n\n transform(\n value: number | undefined | null,\n system: MoneySystem = 'IN',\n symbol = '₹',\n forceSign = false\n ): string {\n if (value == null || isNaN(value)) return '';\n if (value === 0) return `${symbol}0`;\n\n const isNegative = value < 0;\n const absValue = Math.abs(value);\n const { amount, labelKey } = formatMoney(absValue, system);\n const label = labelKey\n ? ` ${this.translateService.translate(labelKey)}`\n : '';\n\n const sign = isNegative ? '-' : forceSign ? '+' : '';\n return `${sign}${symbol}${amount}${label}`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Renders a number already expressed in percent units as a `%` reading —\n * `42` becomes `42.00%`, never `4200%`. A ratio is the caller's to multiply,\n * the way `MoneyPipe` takes an amount rather than a currency object.\n *\n * Two decimals by default: a percentage carries the fraction that separates\n * two near-equal readings, and a caller wanting the whole number asks for\n * `decimals: 0`.\n *\n * Pure, unlike the other three: it reads no language and no clock, so its\n * output depends on its arguments alone.\n */\n@Pipe({\n name: 'percentage',\n})\nexport class PercentagePipe implements PipeTransform {\n transform(\n value: number | undefined | null,\n decimals = 2,\n forceSign = false\n ): string {\n if (value == null || isNaN(value)) return '';\n\n const digits = Math.max(0, Math.trunc(decimals));\n const rendered = Math.abs(value).toFixed(digits);\n // A rounded-to-zero negative would otherwise print `-0%`.\n const isNegative = value < 0 && Number(rendered) !== 0;\n\n const sign = isNegative\n ? '-'\n : forceSign && Number(rendered) !== 0\n ? '+'\n : '';\n return `${sign}${rendered}%`;\n }\n}\n","import { Pipe, PipeTransform } from '@angular/core';\n\n/**\n * Reads a number's sign as a colour — `success` above zero, `error` below — for\n * the `color` input `m-text-output` resolves against the active theme, so a\n * gain and a loss follow the theme rather than freezing one theme's hex.\n *\n * Zero, `null`, `undefined` and `NaN` answer `undefined`: no colour is the\n * component's own default, and a flat reading is neither a gain nor a loss.\n *\n * Pure, like `PercentagePipe`: its output depends on its arguments alone.\n */\n@Pipe({\n name: 'signColor',\n})\nexport class SignColorPipe implements PipeTransform {\n transform(\n value: number | undefined | null,\n positive = 'success',\n negative = 'error'\n ): string | undefined {\n if (value == null || isNaN(value) || value === 0) return undefined;\n return value > 0 ? positive : negative;\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { TranslateService } from '../services/translate';\nimport { formatMoney, MoneySystem } from './money.fn';\n\n/**\n * Renders a large number as a compact denominated reading — `12500` becomes\n * `12.5 k`, `1250000` becomes `12.5 l` (or `1.3 m` on the `INTL` ladder).\n * `MoneyPipe` without the currency symbol: a count of views, rows or users is\n * no amount of money, but it climbs the same thresholds.\n *\n * Named `compactNumber` rather than `number` so it never collides with\n * Angular's own `DecimalPipe` in a template that imports both.\n *\n * Impure for `MoneyPipe`'s reason: the denomination label is a translation key\n * resolved in the active language.\n */\n@Pipe({\n name: 'compactNumber',\n pure: false,\n})\nexport class CompactNumberPipe implements PipeTransform {\n private readonly translateService = inject(TranslateService);\n\n transform(\n value: number | undefined | null,\n system: MoneySystem = 'IN',\n forceSign = false\n ): string {\n if (value == null || isNaN(value)) return '';\n if (value === 0) return '0';\n\n const { amount, labelKey } = formatMoney(Math.abs(value), system);\n // Below the first threshold a tiny value can still round to `0`.\n if (Number(amount) === 0) return '0';\n\n const label = labelKey\n ? ` ${this.translateService.translate(labelKey)}`\n : '';\n const sign = value < 0 ? '-' : forceSign ? '+' : '';\n return `${sign}${amount}${label}`;\n }\n}\n","import { inject, Pipe, PipeTransform } from '@angular/core';\nimport { HttpService } from '../services/http';\n\n@Pipe({\n name: 'assetUrl',\n})\nexport class AssetUrlPipe implements PipeTransform {\n private readonly http = inject(HttpService);\n\n transform(value: string | null | undefined): string {\n return this.http.getAssetUrl(value);\n }\n}\n","import {\n SectionTableColumn,\n SectionTableSort,\n} from '../../type/section-table';\n\n/** A column's id, falling back to its position (m-one-ui ADR 0148). */\nexport const sectionTableColumnId = (\n column: SectionTableColumn,\n index: number\n): string => column.id || String(index);\n\n/**\n * Each column's width as a CSS length: a `span` is its twelfth-share of the\n * table, and a column without one gets `undefined` so the `<table>` divides\n * what the spanned columns left.\n */\nexport const sectionTableColumnWidths = (\n columns: readonly SectionTableColumn[]\n): (string | undefined)[] =>\n columns.map(({ span }) => {\n if (span == null || !Number.isFinite(span)) return undefined;\n const clamped = Math.min(12, Math.max(1, Math.round(span)));\n return `${(clamped * 100) / 12}%`;\n });\n\n/**\n * How many leading columns are frozen: freezing a column freezes every column\n * before it, because a frozen column pinned past an unfrozen one would slide\n * over it.\n */\nexport const sectionTableFrozenCount = (\n columns: readonly SectionTableColumn[]\n): number => {\n let last = -1;\n columns.forEach((column, i) => {\n if (column.freeze) last = i;\n });\n return last + 1;\n};\n\n/** The next sort after a click on the column with `id`. */\nexport const nextSectionTableSort = (\n current: SectionTableSort | null,\n id: string,\n dataType: SectionTableSort['dataType']\n): SectionTableSort =>\n current?.id === id\n ? { id, dataType, direction: current.direction === 'asc' ? 'desc' : 'asc' }\n : { id, dataType, direction: 'asc' };\n\n/** The sort a table starts with: its first `defaultSort` column's, if any. */\nexport const defaultSectionTableSort = (\n columns: readonly SectionTableColumn[]\n): SectionTableSort | null => {\n const index = columns.findIndex((column) => column.defaultSort);\n if (index < 0) return null;\n const column = columns[index];\n return {\n id: sectionTableColumnId(column, index),\n dataType: column.dataType,\n direction: column.ascending ? 'asc' : 'desc',\n };\n};\n\nconst readPath =(row: unknown, path: string): unknown =>\n path\n .split('.')\n .reduce<unknown>(\n (value, key) =>\n value != null && typeof value === 'object'\n ? (value as Record<string, unknown>)[key]\n : undefined,\n row\n );\n\nconst comparable = (\n value: unknown,\n dataType: SectionTableSort['dataType']\n): number | string | undefined => {\n if (value == null || value === '') return undefined;\n if (dataType === 'number') {\n const n = typeof value === 'number' ? value : Number(value);\n return Number.isNaN(n) ? undefined : n;\n }\n if (dataType === 'date') {\n const t =\n value instanceof Date ? value.getTime() : new Date(String(value)).getTime();\n return Number.isNaN(t) ? undefined : t;\n }\n return String(value).toLocaleLowerCase();\n};\n\n/**\n * A copy of `rows` ordered by `sort`, the input untouched. Missing values sink\n * to the end in either direction — an empty cell is not the smallest value.\n */\nexport const sortSectionTableRows = <T>(\n rows: readonly T[] | null | undefined,\n sort: SectionTableSort | null | undefined\n): T[] => {\n const list = [...(rows ?? [])];\n if (!sort) return list;\n const sign = sort.direction === 'asc' ? 1 : -1;\n return list\n .map((row, i) => ({ row, i, key: comparable(readPath(row, sort.id), sort.dataType) }))\n .sort((a, b) => {\n if (a.key === undefined || b.key === undefined) {\n if (a.key === b.key) return a.i - b.i;\n return a.key === undefined ? 1 : -1;\n }\n const diff =\n typeof a.key === 'number' && typeof b.key === 'number'\n ? a.key - b.key\n : String(a.key).localeCompare(String(b.key));\n return diff === 0 ? a.i - b.i : diff * sign;\n })\n .map(({ row }) => row);\n};\n","import { Pipe, PipeTransform } from '@angular/core';\nimport type { SectionTableSort } from '../ui/section/type/section-table';\nimport { sortSectionTableRows } from '../ui/section/lib/functions/section-table';\n\n/**\n * A SectionTable's sort applied to a Repeat's collection:\n * `@for (row of (rows | sectionTableSort: table.sort()); …)`. The `@for` is the\n * Repeat's, not the table's, so the table reorders a collection it does not\n * own through this and nothing else (m-one-ui ADR 0148).\n *\n * Pure: a new order needs a new sort or a new collection, never a mutated one.\n */\n@Pipe({\n name: 'sectionTableSort',\n})\nexport class SectionTableSortPipe implements PipeTransform {\n transform<T>(\n rows: readonly T[] | null | undefined,\n sort: SectionTableSort | null | undefined\n ): T[] {\n return sortSectionTableRows(rows, sort);\n }\n}\n","import { ChangeDetectionStrategy, Component, input } from '@angular/core';\nimport { TranslatePipe } from '../../../pipe';\n\n@Component({\n selector: 'm-label',\n template: `\n <label\n [class.required]=\"required()\"\n [class.disabled]=\"disabled()\"\n [attr.for]=\"for() || null\"\n >\n @if (color()) {\n <span class=\"label__swatch\" [style.background]=\"color()\"></span>\n }\n @if (noTranslate()) {\n {{ placeholder() }}\n } @else {\n {{ placeholder() | translate: params() }}\n }\n </label>\n `,\n imports: [TranslatePipe],\n styleUrl: './label.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class LabelComponent {\n for = input<string>();\n placeholder = input<string>();\n // The label's [MessageVariable] values — a Field whose label is a sentence\n // with a datum in it (m-one-ui ADR 0066).\n params = input<Record<string, string> | undefined>();\n required = input<boolean>();\n disabled = input<boolean>();\n color = input<string>();\n // Authored text rather than an i18n key — an option label mapped from a row\n // the app holds, which the dictionary has never heard of.\n noTranslate = input<boolean>();\n}\n\n"],"mappings":";;;;AAIA,MAAM,oBAAoB;AAC1B,MAAM,kBAAkB;AACxB,MAAM,iBAAiB;AACvB,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AAMxB,IAAa,cAAb,MAAa,Y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A;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,UAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,OAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;GAAA,aAAA;IAAA,mBAAA;IAAA,YAAA;IAAA,UAAA;IAAA,YAAA;IAAA,mBAAA;GAAA;EAAA;EAAA,UAAA;EAAA,UApBf;;;;;;;;;;;;;;;;EAeT,UAAA;EAAA,QAAA,CAAA,w8CAAA;EAAA,cAAA,CAAA;GAAA,MAAA;GAAA,MACS;GAAa,MAAA;EAAA,CAAA;EAAA,iBAAA,GAAA,wBAAA;CAAA,CAAA;;AAIZ,GAAA,yBAAA;CAAA,YAAA;CAAA,SAAA;CAAA,UAAA;CAAA,MAAA;CAAc,YAAA,CAAA;EAtB1B,MAAA;EACW,MAAA,CAAA;GAAA,UAAA;GAAS,UACT;;;;;;;;;;;;;;;;GAeT,SACQ,CAAC,aAAa;GAAC,iBAEP,wBAAwB;GAAM,QAAA,CAAA,w8CAAA;EAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"magmonium-one-text-output-M8sEPhFz.mjs","names":[],"sources":["../../../../libs/one/src/lib/shared/ui/text-output/ui/text-output.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n computed,\n inject,\n input,\n model,\n output,\n} from '@angular/core';\nimport { TranslateService } from '../../../services/translate';\nimport { ConfigComponent } from '../../../lib/components/config-component';\nimport { Config } from '../../../type/config/config-type';\nimport { LAYOUT_ASSET_FOLDER } from '../../../enum';\nimport { toAttrBool } from '../../../functions/config/attribute-value';\nimport { resolvePallet } from '../../../lib/theme/lib/color-utl';\n\nexport type TextOutputAlign = 'left' | 'right' | 'center';\n\n// Variants are roles, not styles: each one says what the text is doing on the\n// page, and the Section it sits in decides how big that role renders. Every\n// size below is therefore an `em` multiple of the inherited Section font-size\n// — a `lead` in a compact Section stays proportionally a lead — which is the\n// one rule the plain (undefined) variant keeps by inheriting outright.\n//\n// - `lead` opening paragraph that introduces the block under it\n// - `big` one-line statement — a number, a verdict, a headline that is\n// not a SectionHeader\n// - `bold` emphasis at body size, for the line that must be read first\n// - `footer` annotation under the thing it describes — a field's validation\n// message, a caption, a disclaimer; 0.75 of body, body colour\n// - `footnote` aside the reader may skip — source, legal line, small print;\n// 0.6 of body, body colour\n// - `link` text that goes somewhere on click — an affordance rather than\n// a size, so it is the one role that stays inline, takes focus,\n// and emits `clicked`\n// - `link-small` the same affordance for a link that trails the content it\n// belongs to rather than carrying a line of its own — a \"see\n// all\", an \"edit\" beside a field; body size like `link`\nexport type TextOutputVariant =\n | 'lead'\n | 'big'\n | 'bold'\n | 'footer'\n | 'footnote'\n | 'link'\n | 'link-small';\n\n// Weight tokens of the type scale. Applied after the variant, so it overrides\n// the weight a role implies (`lead` light, `big` semibold, `bold` bold).\nexport type TextOutputFontWeight =\n | 'light'\n | 'normal'\n | 'medium'\n | 'semibold'\n | 'bold';\n\nexport interface TextOutputConfig extends Config {\n label?: string;\n noTranslate?: boolean;\n align?: TextOutputAlign;\n variant?: TextOutputVariant;\n color?: string;\n fontWeight?: TextOutputFontWeight;\n}\n\n@Component({\n selector: 'm-text-output',\n imports: [],\n template: `\n <div\n class=\"m-text-output\"\n [style.color]=\"resolvedColorPallet().color\"\n [innerHTML]=\"html()\"\n ></div>\n `,\n styleUrl: './text-output.sass',\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n class: 'm-text-output-host',\n '[class.is-design-mode]': 'isDesignMode',\n '[class.align-left]': 'resolvedAlign() === \"left\"',\n '[class.align-right]': 'resolvedAlign() === \"right\"',\n '[class.align-center]': 'resolvedAlign() === \"center\"',\n '[class.variant-lead]': 'resolvedVariant() === \"lead\"',\n '[class.variant-big]': 'resolvedVariant() === \"big\"',\n '[class.variant-bold]': 'resolvedVariant() === \"bold\"',\n '[class.variant-footer]': 'resolvedVariant() === \"footer\"',\n '[class.variant-footnote]': 'resolvedVariant() === \"footnote\"',\n '[class.variant-link]': 'resolvedVariant() === \"link\"',\n '[class.variant-link-small]': 'resolvedVariant() === \"link-small\"',\n '[class.weight-light]': 'resolvedFontWeight() === \"light\"',\n '[class.weight-normal]': 'resolvedFontWeight() === \"normal\"',\n '[class.weight-medium]': 'resolvedFontWeight() === \"medium\"',\n '[class.weight-semibold]': 'resolvedFontWeight() === \"semibold\"',\n '[class.weight-bold]': 'resolvedFontWeight() === \"bold\"',\n '[class.has-color]': '!!(color() ?? config()?.color)',\n '[class.is-truncated]': '!!truncate()',\n // Only a link is reachable and announced as one. Every other variant is a\n // size, and a focus stop on plain text is a tab stop that does nothing.\n '[attr.role]': 'isLink() ? \"link\" : null',\n '[attr.tabindex]': 'isLink() ? 0 : null',\n '(click)': 'onClick()',\n '(keydown.enter)': 'onClick()',\n '[style.--m-text-output-color]': 'resolvedColorPallet().color',\n '[style.--m-text-output-color-contrast]': 'resolvedColorPallet().contrastColor',\n '[style.--m-text-output-color-opposite]': 'resolvedColorPallet().oppositeColor',\n },\n})\nexport class TextOutputComponent extends ConfigComponent<TextOutputConfig> {\n override subFolder = LAYOUT_ASSET_FOLDER.text_output;\n override config = model<Partial<TextOutputConfig>>();\n private readonly translateService = inject(TranslateService);\n\n readonly align = input<TextOutputAlign | undefined>(undefined);\n readonly variant = input<TextOutputVariant | undefined>(undefined);\n // A theme colour key (`error`, `warning`, `success`, …) or a raw CSS colour,\n // resolved the same way an Icon's or a Logo's is so a token follows the\n // active theme instead of freezing one theme's hex into a template.\n readonly color = input<string | undefined>(undefined);\n readonly fontWeight = input<TextOutputFontWeight | undefined>(undefined);\n // `label` is the text itself, so a one-off TextOutput needs no asset behind\n // it (ADR 0010). MiniMark is a single string whatever it renders to, which\n // is what lets it ride on the tag at all.\n readonly label = input<string | undefined>(undefined);\n readonly noTranslate = input<boolean | string | undefined>(undefined);\n // Values for the message's `<name>` / `<$name>` placeholders. An input and\n // deliberately not a TextOutputConfig key: an asset is resolved by name and\n // shared across every Control that names it, and these differ per render\n // (ADR 0020). The query-string form (`min_length?len=6`) still works and\n // still loses to this on a shared placeholder, that being the precedence\n // TranslateService already had. Bind a named member — an object literal in a\n // template is refused by `no-inline-config` (ADR 0010).\n readonly params = input<Record<string, string> | undefined>(undefined);\n // One line, cut with an ellipsis at the box's edge rather than wrapping or\n // spilling into a neighbour. For text whose length says nothing about the\n // layout — a bound path drawn as `{store.a.b.c}` on the design Canvas.\n readonly truncate = input<boolean | undefined>(undefined);\n\n readonly resolvedAlign = computed<TextOutputAlign>(\n () => this.align() ?? this.config()?.align ?? 'left'\n );\n\n protected readonly resolvedVariant = computed<TextOutputVariant | undefined>(\n () => this.variant() ?? this.config()?.variant\n );\n\n protected readonly resolvedFontWeight = computed<\n TextOutputFontWeight | undefined\n >(() => this.fontWeight() ?? this.config()?.fontWeight);\n\n // Both link roles are the same affordance, so both take the focus stop, the\n // `role=\"link\"` and the `clicked` output; only their size differs.\n protected readonly isLink = computed(() => {\n const variant = this.resolvedVariant();\n return variant === 'link' || variant === 'link-small';\n });\n\n /**\n * Fired by a `link` variant and by nothing else. A text that is not a link\n * draws no affordance and takes no focus, so a click on it is a click on\n * prose — emitting there would be a control only a mouse could find.\n *\n * Where the link goes to a route instead, the caller attaches `routerLink`\n * and binds nothing here: one click means one thing.\n */\n readonly clicked = output<void>();\n\n protected onClick(): void {\n if (this.isLink()) this.clicked.emit();\n }\n\n protected readonly resolvedColorPallet = computed(() =>\n resolvePallet(\n this.color() ?? this.config()?.color ?? this.defaultColor,\n this.themeStore.color()\n )\n );\n\n protected override resolveComponentOverrides(): Partial<TextOutputConfig> {\n const overrides: Partial<TextOutputConfig> = {};\n const align = this.align();\n if (align !== undefined) overrides.align = align;\n const label = this.label();\n if (label !== undefined) overrides.label = label;\n const noTranslate = toAttrBool(this.noTranslate());\n if (noTranslate !== undefined) overrides.noTranslate = noTranslate;\n const variant = this.variant();\n if (variant !== undefined) overrides.variant = variant;\n const color = this.color();\n if (color !== undefined) overrides.color = color;\n const fontWeight = this.fontWeight();\n if (fontWeight !== undefined) overrides.fontWeight = fontWeight;\n return overrides;\n }\n\n protected readonly resolvedLabel = computed(() => this.config()?.label);\n protected readonly shouldTranslate = computed(\n () => !this.config()?.noTranslate\n );\n protected readonly html = computed(() => {\n const label = this.resolvedLabel();\n return this.shouldTranslate()\n ? this.translateService.translateToHtml(label, this.params())\n : this.translateService.toSafeHtml(label);\n });\n}\n"],"mappings":";;;;;AA4GA,IAAa,sBAAb,MAAa,4BAA4B,gBAAiC;CAC/D,YAAY,oBAAoB;CAChC,SAAS,MAAkC,GAAA,YAAA,CAAA,QAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;CACnC,mBAAmB,OAAO,gBAAgB;CAElD,QAAQ,MAAmC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CACrD,UAAU,MAAqC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,UAAA,CAAA,+BAAA,CAAA,CAAA;CAIzD,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,aAAa,MAAwC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,aAAA,CAAA,+BAAA,CAAA,CAAA;CAI/D,QAAQ,MAA0B,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,QAAA,CAAA,+BAAA,CAAA,CAAA;CAC5C,cAAc,MAAoC,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,cAAA,CAAA,+BAAA,CAAA,CAAA;CAQ5D,SAAS,MAA0C,QAAU,GAAA,YAAA,CAAA,EAAA,WAAA,SAAA,CAAA,+BAAA,CAAA,CAAA;C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