@coolon/angular-ui-powerups 16.1.0-alpha.347 → 16.1.0-alpha.349
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/esm2022/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.mjs +11 -4
- package/esm2022/lib/components/text/markdown/markdown.component.mjs +5 -1
- package/esm2022/lib/services/markdown/markdown.service.mjs +5 -1
- package/esm2022/lib/services/markdown/pill-plugin.mjs +50 -11
- package/fesm2022/coolon-angular-ui-powerups.mjs +66 -13
- package/fesm2022/coolon-angular-ui-powerups.mjs.map +1 -1
- package/lib/components/tables/tree-table/tree-label-cell-renderer/tree-label-cell-renderer.component.d.ts +7 -1
- package/lib/components/text/markdown/markdown.component.d.ts +4 -0
- package/lib/services/markdown/markdown.service.d.ts +5 -1
- package/lib/services/markdown/pill-plugin.d.ts +17 -1
- package/package.json +2 -2
|
@@ -23,7 +23,13 @@ export declare class TreeLabelCellRendererComponent<T extends object> extends Di
|
|
|
23
23
|
get isRoot(): boolean;
|
|
24
24
|
get isLeaf(): boolean;
|
|
25
25
|
get node(): T;
|
|
26
|
-
|
|
26
|
+
/** Whether the node can open and close, so its icon is a toggle button rather than a picture. */
|
|
27
|
+
get hasChildren(): boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Opens or closes the node as the user's choice. A click on the toggle selects no row, and neither does Enter or
|
|
30
|
+
* Space on it, which the template stops before they reach the table.
|
|
31
|
+
*/
|
|
32
|
+
expandOrCollapse($event: Event, node: T): void;
|
|
27
33
|
static ɵfac: i0.ɵɵFactoryDeclaration<TreeLabelCellRendererComponent<any>, never>;
|
|
28
34
|
static ɵcmp: i0.ɵɵComponentDeclaration<TreeLabelCellRendererComponent<any>, "aup-tree-label-cell-renderer", never, { "value": { "alias": "value"; "required": false; }; "label": { "alias": "label"; "required": false; }; "secondaryLabel": { "alias": "secondaryLabel"; "required": false; }; "showsConnectors": { "alias": "showsConnectors"; "required": false; }; "iconFactory": { "alias": "iconFactory"; "required": false; }; "treeTableModel": { "alias": "treeTableModel"; "required": false; }; }, {}, never, never, false, never>;
|
|
29
35
|
}
|
|
@@ -4,6 +4,10 @@ import { MarkdownService } from '../../../services/markdown/markdown.service';
|
|
|
4
4
|
import { DisposableComponent } from '../../disposable-component';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
/**
|
|
7
|
+
* Renders Markdown into the page as HTML, with nothing sanitised: its content is trusted, as an i18n
|
|
8
|
+
* string is, and HTML in it is kept. Text a user typed belongs in it only inside a pill,
|
|
9
|
+
* "(({name}))", whose text is escaped (`markdownPillExtension`).
|
|
10
|
+
*
|
|
7
11
|
* @example
|
|
8
12
|
* <aup-markdown [content]="..."></aup-markdown>
|
|
9
13
|
* <aup-markdown [content$]="stringValueModel$"></aup-markdown>
|
|
@@ -2,7 +2,11 @@ import * as i0 from "@angular/core";
|
|
|
2
2
|
export declare class MarkdownService {
|
|
3
3
|
render(content: string): string;
|
|
4
4
|
renderInline(content: string): string;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Draws "((text))" as a pill (`markdownPillExtension`). [renderer] is given the pill's text
|
|
7
|
+
* HTML-escaped, and returns the pill's HTML.
|
|
8
|
+
*/
|
|
9
|
+
usePillExtension(renderer?: (escapedText: string) => string): void;
|
|
6
10
|
static ɵfac: i0.ɵɵFactoryDeclaration<MarkdownService, never>;
|
|
7
11
|
static ɵprov: i0.ɵɵInjectableDeclaration<MarkdownService>;
|
|
8
12
|
}
|
|
@@ -2,7 +2,23 @@ import { marked } from 'marked';
|
|
|
2
2
|
import RendererThis = marked.RendererThis;
|
|
3
3
|
import TokenizerThis = marked.TokenizerThis;
|
|
4
4
|
import Tokens = marked.Tokens;
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Draws "((text))" in Markdown as a pill, with [renderPill]'s HTML.
|
|
7
|
+
*
|
|
8
|
+
* A pill's text may hold brackets of its own, as a file named "WDK_972P_APP (1).otap" or a group
|
|
9
|
+
* named "Loading dock (theirs)" does: brackets that pair up stay inside the pill, and it ends at the
|
|
10
|
+
* first "))" outside them. So "((Loading dock (theirs)))" is one pill of "Loading dock (theirs)",
|
|
11
|
+
* and "(see ((Night)))" a pill of "Night" inside a parenthetical. A ")" with no "(" to pair with
|
|
12
|
+
* ends the pill early when another ")" follows it: "((Lobby :)))" is a pill of "Lobby :". A "(" with
|
|
13
|
+
* no ")" to pair with leaves the brackets unpaired to the end, and the pill then ends at the first
|
|
14
|
+
* "))": "((Bay (north))" is a pill of "Bay (north". The pill used to end at the first "))" whatever
|
|
15
|
+
* came before, so a name ending in a bracket lost it.
|
|
16
|
+
*
|
|
17
|
+
* [renderPill] is given the text HTML-escaped, as Markdown escapes the text around it. The text is
|
|
18
|
+
* often a name a user typed, and the pill's HTML goes into the page as it is, so a name such as
|
|
19
|
+
* `<img src=x onerror=…>` would otherwise run in every message that names it.
|
|
20
|
+
*/
|
|
21
|
+
export declare const markdownPillExtension: (renderPill: (escapedText: string) => string) => {
|
|
6
22
|
name: string;
|
|
7
23
|
level: string;
|
|
8
24
|
start: (src: string) => number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coolon/angular-ui-powerups",
|
|
3
|
-
"version": "16.1.0-alpha.
|
|
3
|
+
"version": "16.1.0-alpha.349",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/animations": "^16.2.9",
|
|
6
6
|
"@angular/common": "^16.2.9",
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"@angular/platform-browser-dynamic": "^16.2.9",
|
|
13
13
|
"@angular/material-moment-adapter": "^16.2.10",
|
|
14
14
|
"@angular/router": "^16.2.9",
|
|
15
|
-
"@coolon/pectin": "^5.0.0-alpha.
|
|
15
|
+
"@coolon/pectin": "^5.0.0-alpha.153",
|
|
16
16
|
"fast-typescript-memoize": "^1.1.1",
|
|
17
17
|
"lodash-es": "^4.17.21",
|
|
18
18
|
"marked": "4.0.10",
|