@coolon/angular-ui-powerups 12.4.0-alpha.73 → 12.4.0-alpha.75
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/assets/pills.scss +45 -0
- package/assets/styles.scss +2 -0
- package/bundles/coolon-angular-ui-powerups.umd.js +176 -24
- package/bundles/coolon-angular-ui-powerups.umd.js.map +1 -1
- package/coolon-angular-ui-powerups.metadata.json +1 -1
- package/esm2015/lib/angular-ui-powerups.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/components.module.js +7 -2
- package/esm2015/lib/components/components.module.js.map +1 -1
- package/esm2015/lib/components/components.module.metadata.json +1 -1
- package/esm2015/lib/components/components.module.ngfactory.js.map +1 -1
- package/esm2015/lib/components/exports.js +1 -0
- package/esm2015/lib/components/exports.js.map +1 -1
- package/esm2015/lib/components/exports.metadata.json +1 -1
- package/esm2015/lib/components/text/markdown/markdown.component.js +48 -0
- package/esm2015/lib/components/text/markdown/markdown.component.js.map +1 -0
- package/esm2015/lib/components/text/markdown/markdown.component.metadata.json +1 -0
- package/esm2015/lib/components/text/markdown/markdown.component.ngfactory.js.map +1 -0
- package/esm2015/lib/components/text/markdown/markdown.component.scss.shim.ngstyle.js.map +1 -0
- package/esm2015/lib/interaction/alert.js +17 -1
- package/esm2015/lib/interaction/alert.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js +10 -3
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/alert-dialog/alert-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js +7 -2
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js +7 -2
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js +8 -3
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.js.map +1 -1
- package/esm2015/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.metadata.json +1 -1
- package/esm2015/lib/interaction/interaction.module.ngfactory.js.map +1 -1
- package/esm2015/lib/place/place.module.ngfactory.js.map +1 -1
- package/esm2015/lib/services/exports.js +2 -0
- package/esm2015/lib/services/exports.js.map +1 -1
- package/esm2015/lib/services/exports.metadata.json +1 -1
- package/esm2015/lib/services/markdown/markdown.service.js +26 -0
- package/esm2015/lib/services/markdown/markdown.service.js.map +1 -0
- package/esm2015/lib/services/markdown/markdown.service.metadata.json +1 -0
- package/esm2015/lib/services/markdown/markdown.service.ngfactory.js.map +1 -0
- package/esm2015/lib/services/markdown/pill-plugin.js +38 -0
- package/esm2015/lib/services/markdown/pill-plugin.js.map +1 -0
- package/esm2015/lib/services/markdown/pill-plugin.metadata.json +1 -0
- package/fesm2015/coolon-angular-ui-powerups.js +155 -13
- package/fesm2015/coolon-angular-ui-powerups.js.map +1 -1
- package/lib/components/exports.d.ts +1 -0
- package/lib/components/text/markdown/markdown.component.d.ts +13 -0
- package/lib/interaction/alert.d.ts +7 -1
- package/lib/interaction/components/alert-dialog/alert-dialog.component.d.ts +4 -0
- package/lib/interaction/components/confirm-then-dialog/confirm-then-dialog.component.d.ts +3 -0
- package/lib/interaction/components/confirm-then-execute-dialog/confirm-then-execute-dialog.component.d.ts +3 -0
- package/lib/interaction/components/confirmation-dialog/confirmation-dialog.component.d.ts +3 -0
- package/lib/services/exports.d.ts +2 -0
- package/lib/services/markdown/markdown.service.d.ts +6 -0
- package/lib/services/markdown/pill-plugin.d.ts +15 -0
- package/package.json +2 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
@use '~@angular/material/index' as mat;
|
|
2
|
+
|
|
3
|
+
@mixin pill-defaults($padding: 0.1em 0.4em) {
|
|
4
|
+
display: inline-block;
|
|
5
|
+
border-radius: 4px;
|
|
6
|
+
padding: $padding;
|
|
7
|
+
margin: 1px 0;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
@mixin apply-theme($color-config, $typography-config) {
|
|
12
|
+
|
|
13
|
+
// Extract the palettes you need from the theme definition.
|
|
14
|
+
$primary-palette: map-get($color-config, primary);
|
|
15
|
+
$accent-palette: map-get($color-config, accent);
|
|
16
|
+
$warn-palette: map-get($color-config, warn);
|
|
17
|
+
$background: map-get($color-config, background);
|
|
18
|
+
|
|
19
|
+
.aup-pill {
|
|
20
|
+
@include pill-defaults();
|
|
21
|
+
color: currentColor;
|
|
22
|
+
background-color: mat.get-color-from-palette($background, app-bar) // hmmm, should probably defined my own..
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.aup-pill-primary {
|
|
26
|
+
@extend .aup-pill;
|
|
27
|
+
color: mat.get-color-from-palette($background, background);
|
|
28
|
+
background-color: mat.get-color-from-palette($primary-palette);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.aup-pill-accent {
|
|
32
|
+
@extend .aup-pill;
|
|
33
|
+
color: mat.get-color-from-palette($background, background); // stolen from mat checkbox checkmark color logic
|
|
34
|
+
background-color: mat.get-color-from-palette($accent-palette)
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.aup-pill-warn {
|
|
38
|
+
@extend .aup-pill;
|
|
39
|
+
color: mat.get-color-from-palette($background, background);
|
|
40
|
+
background-color: mat.get-color-from-palette($warn-palette)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
|
package/assets/styles.scss
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
@use "./commands";
|
|
12
12
|
@use "./icons";
|
|
13
13
|
@use "./empty-state";
|
|
14
|
+
@use "./pills";
|
|
14
15
|
|
|
15
16
|
@mixin apply-light-theme($theme, $typography) {
|
|
16
17
|
|
|
@@ -19,6 +20,7 @@
|
|
|
19
20
|
@include interaction.apply-theme($color-config, $typography);
|
|
20
21
|
@include cards.apply-theme($color-config, $typography);
|
|
21
22
|
@include activities.apply-theme($color-config, $typography);
|
|
23
|
+
@include pills.apply-theme($color-config, $typography);
|
|
22
24
|
|
|
23
25
|
:root {
|
|
24
26
|
--aup-default-padding: var(--default-padding, 16px);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/divider'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/progress-bar'), require('@angular/material/progress-spinner'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@coolon/pectin'), require('@angular/platform-browser'), require('lodash'), require('@coolon/typescript-utilities'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('typescript-string-enums'), require('resize-observer-polyfill'), require('immer'), require('@angular/cdk/a11y'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/cdk/overlay'), require('@angular/material/list'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('wake-event')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/checkbox', '@angular/material/divider', '@angular/material/icon', '@angular/material/menu', '@angular/material/progress-bar', '@angular/material/progress-spinner', '@angular/material/table', '@angular/material/tooltip', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@coolon/pectin', '@angular/platform-browser', 'lodash', '@coolon/typescript-utilities', '@typescript-plus/fast-memoize-decorator/dist/src', 'typescript-string-enums', 'resize-observer-polyfill', 'immer', '@angular/cdk/a11y', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', '@angular/cdk/overlay', '@angular/material/list', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'wake-event'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon["angular-ui-powerups"] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.checkbox, global.ng.material.divider, global.ng.material.icon, global.ng.material.menu, global.ng.material.progressBar, global.ng.material.progressSpinner, global.ng.material.table, global.ng.material.tooltip, global.angularFontawesome, global.freeSolidSvgIcons, global.pectin, global.ng.platformBrowser, global._, global.typescriptUtilities, global.src, global.typescriptStringEnums, global.ResizeObserver, global.produce, global.ng.cdk.a11y, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.ng.cdk.overlay, global.ng.material.list, global.fastMemoizeDecorator, null, global.ng.animations, global.wakeEvent));
|
|
5
|
-
})(this, (function (exports, i2, i0, forms, formField, input, select, tabs, animations, portal, scrolling, autocomplete, button, checkbox, divider, icon, menu, progressBar, progressSpinner, table, tooltip, angularFontawesome, freeSolidSvgIcons, pectin, platformBrowser, _, typescriptUtilities, src, typescriptStringEnums, ResizeObserver, produce, a11y, flexLayout, i1, i1$1, overlay, list, fastMemoizeDecorator, reflectMetadata, animations$1, wakeEvent) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@angular/core'), require('@angular/forms'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/tabs'), require('@angular/platform-browser/animations'), require('@angular/cdk/portal'), require('@angular/cdk/scrolling'), require('@angular/material/autocomplete'), require('@angular/material/button'), require('@angular/material/checkbox'), require('@angular/material/divider'), require('@angular/material/icon'), require('@angular/material/menu'), require('@angular/material/progress-bar'), require('@angular/material/progress-spinner'), require('@angular/material/table'), require('@angular/material/tooltip'), require('@fortawesome/angular-fontawesome'), require('@fortawesome/free-solid-svg-icons'), require('@coolon/pectin'), require('@angular/platform-browser'), require('lodash'), require('marked'), require('@coolon/typescript-utilities'), require('@typescript-plus/fast-memoize-decorator/dist/src'), require('typescript-string-enums'), require('resize-observer-polyfill'), require('immer'), require('@angular/cdk/a11y'), require('@angular/flex-layout'), require('@angular/material/dialog'), require('@angular/router'), require('@angular/cdk/overlay'), require('@angular/material/list'), require('@typescript-plus/fast-memoize-decorator'), require('reflect-metadata'), require('@angular/animations'), require('wake-event')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@coolon/angular-ui-powerups', ['exports', '@angular/common', '@angular/core', '@angular/forms', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/tabs', '@angular/platform-browser/animations', '@angular/cdk/portal', '@angular/cdk/scrolling', '@angular/material/autocomplete', '@angular/material/button', '@angular/material/checkbox', '@angular/material/divider', '@angular/material/icon', '@angular/material/menu', '@angular/material/progress-bar', '@angular/material/progress-spinner', '@angular/material/table', '@angular/material/tooltip', '@fortawesome/angular-fontawesome', '@fortawesome/free-solid-svg-icons', '@coolon/pectin', '@angular/platform-browser', 'lodash', 'marked', '@coolon/typescript-utilities', '@typescript-plus/fast-memoize-decorator/dist/src', 'typescript-string-enums', 'resize-observer-polyfill', 'immer', '@angular/cdk/a11y', '@angular/flex-layout', '@angular/material/dialog', '@angular/router', '@angular/cdk/overlay', '@angular/material/list', '@typescript-plus/fast-memoize-decorator', 'reflect-metadata', '@angular/animations', 'wake-event'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.coolon = global.coolon || {}, global.coolon["angular-ui-powerups"] = {}), global.ng.common, global.ng.core, global.ng.forms, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.tabs, global.ng.platformBrowser.animations, global.ng.cdk.portal, global.ng.cdk.scrolling, global.ng.material.autocomplete, global.ng.material.button, global.ng.material.checkbox, global.ng.material.divider, global.ng.material.icon, global.ng.material.menu, global.ng.material.progressBar, global.ng.material.progressSpinner, global.ng.material.table, global.ng.material.tooltip, global.angularFontawesome, global.freeSolidSvgIcons, global.pectin, global.ng.platformBrowser, global._, global.marked, global.typescriptUtilities, global.src, global.typescriptStringEnums, global.ResizeObserver, global.produce, global.ng.cdk.a11y, global.ng.flexLayout, global.ng.material.dialog, global.ng.router, global.ng.cdk.overlay, global.ng.material.list, global.fastMemoizeDecorator, null, global.ng.animations, global.wakeEvent));
|
|
5
|
+
})(this, (function (exports, i2, i0, forms, formField, input, select, tabs, animations, portal, scrolling, autocomplete, button, checkbox, divider, icon, menu, progressBar, progressSpinner, table, tooltip, angularFontawesome, freeSolidSvgIcons, pectin, platformBrowser, _, marked, typescriptUtilities, src, typescriptStringEnums, ResizeObserver, produce, a11y, flexLayout, i1, i1$1, overlay, list, fastMemoizeDecorator, reflectMetadata, animations$1, wakeEvent) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
8
8
|
|
|
@@ -742,6 +742,68 @@
|
|
|
742
742
|
},] }
|
|
743
743
|
];
|
|
744
744
|
|
|
745
|
+
var markdownPillExtension = function (renderPill) {
|
|
746
|
+
return {
|
|
747
|
+
name: 'aup-pill',
|
|
748
|
+
level: 'inline',
|
|
749
|
+
start: function (src) {
|
|
750
|
+
var _a;
|
|
751
|
+
var index = (_a = src.match(/\(\([^)]/)) === null || _a === void 0 ? void 0 : _a.index;
|
|
752
|
+
// if (index) {
|
|
753
|
+
// console.log({start:src})
|
|
754
|
+
// }
|
|
755
|
+
return index;
|
|
756
|
+
},
|
|
757
|
+
tokenizer: function (src) {
|
|
758
|
+
var rule = /^(\(\((([^)])+)\)\))/; // Regex for the complete token
|
|
759
|
+
var match = rule.exec(src);
|
|
760
|
+
if (match) {
|
|
761
|
+
var token = {
|
|
762
|
+
type: 'aup-pill',
|
|
763
|
+
raw: match[0],
|
|
764
|
+
text: match[2].trim(), // Additional custom properties
|
|
765
|
+
// tokens: [] // Array where child inline tokens will be generated
|
|
766
|
+
};
|
|
767
|
+
// console.log(token)
|
|
768
|
+
// this.lexer.inlineTokens(token.text, token.tokens); // Queue this data to be processed for inline tokens
|
|
769
|
+
return token;
|
|
770
|
+
}
|
|
771
|
+
else {
|
|
772
|
+
return undefined;
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
renderer: function (token) {
|
|
776
|
+
// @ts-ignore (until typings are up to date)
|
|
777
|
+
var url = token.text;
|
|
778
|
+
return renderPill(token.text);
|
|
779
|
+
}
|
|
780
|
+
};
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
var MarkdownService = /** @class */ (function () {
|
|
784
|
+
function MarkdownService() {
|
|
785
|
+
}
|
|
786
|
+
MarkdownService.prototype.render = function (content) {
|
|
787
|
+
return marked.marked.parse(content, {
|
|
788
|
+
gfm: true,
|
|
789
|
+
smartLists: true
|
|
790
|
+
});
|
|
791
|
+
};
|
|
792
|
+
MarkdownService.prototype.renderInline = function (content) {
|
|
793
|
+
return marked.marked.parseInline(content);
|
|
794
|
+
};
|
|
795
|
+
MarkdownService.prototype.usePillExtension = function (renderer) {
|
|
796
|
+
marked.marked.use({
|
|
797
|
+
extensions: [markdownPillExtension(renderer !== null && renderer !== void 0 ? renderer : (function (text) { return "<span class='aup-pill'>" + text + "<span>"; }))]
|
|
798
|
+
});
|
|
799
|
+
};
|
|
800
|
+
return MarkdownService;
|
|
801
|
+
}());
|
|
802
|
+
MarkdownService.decorators = [
|
|
803
|
+
{ type: i0.Injectable }
|
|
804
|
+
];
|
|
805
|
+
MarkdownService.ctorParameters = function () { return []; };
|
|
806
|
+
|
|
745
807
|
var BusyOverlayComponent = /** @class */ (function (_super) {
|
|
746
808
|
__extends(BusyOverlayComponent, _super);
|
|
747
809
|
function BusyOverlayComponent() {
|
|
@@ -5015,6 +5077,52 @@
|
|
|
5015
5077
|
label: [{ type: i0.Input }]
|
|
5016
5078
|
};
|
|
5017
5079
|
|
|
5080
|
+
var MarkdownComponent = /** @class */ (function (_super) {
|
|
5081
|
+
__extends(MarkdownComponent, _super);
|
|
5082
|
+
function MarkdownComponent(element, markdownService) {
|
|
5083
|
+
var _this = _super.call(this) || this;
|
|
5084
|
+
_this.element = element;
|
|
5085
|
+
_this.markdownService = markdownService;
|
|
5086
|
+
_this.inline = false;
|
|
5087
|
+
var chain = pectin.Dsl.disposeWith(_this).chain;
|
|
5088
|
+
return _this;
|
|
5089
|
+
}
|
|
5090
|
+
MarkdownComponent.prototype.ngOnInit = function () {
|
|
5091
|
+
var _this = this;
|
|
5092
|
+
var chain = pectin.Dsl.disposeWith(this).chain;
|
|
5093
|
+
chain(this.content$).subscribe(function (content) {
|
|
5094
|
+
_this.element.nativeElement.innerHTML = ___namespace.isEmpty(content) ? '' :
|
|
5095
|
+
_this.inline ? _this.markdownService.renderInline(content) :
|
|
5096
|
+
_this.markdownService.render(content);
|
|
5097
|
+
}, { initialValue: 'evaluate' });
|
|
5098
|
+
};
|
|
5099
|
+
return MarkdownComponent;
|
|
5100
|
+
}(DisposableComponent));
|
|
5101
|
+
MarkdownComponent.decorators = [
|
|
5102
|
+
{ type: i0.Component, args: [{
|
|
5103
|
+
selector: 'aup-markdown',
|
|
5104
|
+
template: "<p>markdown works!</p>\n",
|
|
5105
|
+
styles: [":host{display:inline-block}\n"]
|
|
5106
|
+
},] }
|
|
5107
|
+
];
|
|
5108
|
+
MarkdownComponent.ctorParameters = function () { return [
|
|
5109
|
+
{ type: i0.ElementRef },
|
|
5110
|
+
{ type: MarkdownService }
|
|
5111
|
+
]; };
|
|
5112
|
+
MarkdownComponent.propDecorators = {
|
|
5113
|
+
content$: [{ type: i0.Input }],
|
|
5114
|
+
content: [{ type: i0.Input }],
|
|
5115
|
+
inline: [{ type: i0.Input }]
|
|
5116
|
+
};
|
|
5117
|
+
__decorate([
|
|
5118
|
+
pectin.TrackExternal(),
|
|
5119
|
+
__metadata("design:type", pectin.ValueModel)
|
|
5120
|
+
], MarkdownComponent.prototype, "content$", void 0);
|
|
5121
|
+
__decorate([
|
|
5122
|
+
pectin.StoreInValueModel('content$'),
|
|
5123
|
+
__metadata("design:type", String)
|
|
5124
|
+
], MarkdownComponent.prototype, "content", void 0);
|
|
5125
|
+
|
|
5018
5126
|
var ComponentsModule = /** @class */ (function () {
|
|
5019
5127
|
function ComponentsModule(faIconLibrary) {
|
|
5020
5128
|
faIconLibrary.addIconPacks(freeSolidSvgIcons.fas);
|
|
@@ -5098,7 +5206,8 @@
|
|
|
5098
5206
|
AbstractCardContainerComponent,
|
|
5099
5207
|
CardStackComponent,
|
|
5100
5208
|
LabelledValueComponent,
|
|
5101
|
-
LoadingContainerComponent
|
|
5209
|
+
LoadingContainerComponent,
|
|
5210
|
+
MarkdownComponent
|
|
5102
5211
|
],
|
|
5103
5212
|
exports: [
|
|
5104
5213
|
NumberInputComponent,
|
|
@@ -5138,9 +5247,11 @@
|
|
|
5138
5247
|
CardStackComponent,
|
|
5139
5248
|
LabelledValueComponent,
|
|
5140
5249
|
LoadingContainerComponent,
|
|
5250
|
+
MarkdownComponent
|
|
5141
5251
|
],
|
|
5142
5252
|
providers: [
|
|
5143
|
-
FocusBindingFactory
|
|
5253
|
+
FocusBindingFactory,
|
|
5254
|
+
MarkdownService
|
|
5144
5255
|
]
|
|
5145
5256
|
},] }
|
|
5146
5257
|
];
|
|
@@ -5346,6 +5457,23 @@
|
|
|
5346
5457
|
__metadata("design:type", pectin.Command)
|
|
5347
5458
|
], Activity.prototype, "cancelCommand", void 0);
|
|
5348
5459
|
|
|
5460
|
+
exports.Alert = void 0;
|
|
5461
|
+
(function (Alert) {
|
|
5462
|
+
function getContent(alert) {
|
|
5463
|
+
var content = alert.content();
|
|
5464
|
+
return Array.isArray(content) ? content : [content];
|
|
5465
|
+
}
|
|
5466
|
+
Alert.getContent = getContent;
|
|
5467
|
+
function getTitle(alert) {
|
|
5468
|
+
return ___namespace.isFunction(alert.title) ? alert.title() : undefined;
|
|
5469
|
+
}
|
|
5470
|
+
Alert.getTitle = getTitle;
|
|
5471
|
+
function getColor(alert) {
|
|
5472
|
+
return ___namespace.isFunction(alert.color) ? alert.color() : undefined;
|
|
5473
|
+
}
|
|
5474
|
+
Alert.getColor = getColor;
|
|
5475
|
+
})(exports.Alert || (exports.Alert = {}));
|
|
5476
|
+
|
|
5349
5477
|
var AlertDialogComponent = /** @class */ (function (_super) {
|
|
5350
5478
|
__extends(AlertDialogComponent, _super);
|
|
5351
5479
|
function AlertDialogComponent(alert) {
|
|
@@ -5354,13 +5482,19 @@
|
|
|
5354
5482
|
_this.confirmCommand = pectin.Command.create(function () {
|
|
5355
5483
|
_this.done();
|
|
5356
5484
|
});
|
|
5485
|
+
_this.title = exports.Alert.getTitle(alert);
|
|
5486
|
+
_this.color = exports.Alert.getColor(alert);
|
|
5487
|
+
_this.content = exports.Alert.getContent(alert);
|
|
5357
5488
|
_this.confirmFace = {
|
|
5358
5489
|
text: function () { return alert.ok(); },
|
|
5359
|
-
color: function () { return "primary"; },
|
|
5490
|
+
color: function () { return _this.color || "primary"; },
|
|
5360
5491
|
style: function () { return "raised"; }
|
|
5361
5492
|
};
|
|
5362
5493
|
return _this;
|
|
5363
5494
|
}
|
|
5495
|
+
AlertDialogComponent.prototype.isContentArray = function () {
|
|
5496
|
+
return;
|
|
5497
|
+
};
|
|
5364
5498
|
AlertDialogComponent.prototype.ngOnInit = function () {
|
|
5365
5499
|
};
|
|
5366
5500
|
return AlertDialogComponent;
|
|
@@ -5368,18 +5502,20 @@
|
|
|
5368
5502
|
AlertDialogComponent.decorators = [
|
|
5369
5503
|
{ type: i0.Component, args: [{
|
|
5370
5504
|
selector: 'aup-alert-dialog',
|
|
5371
|
-
template: "<aup-activity-title *ngIf=\"
|
|
5505
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\"></aup-activity-actions>\n",
|
|
5372
5506
|
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
5373
5507
|
},] }
|
|
5374
5508
|
];
|
|
5375
5509
|
AlertDialogComponent.ctorParameters = function () { return [
|
|
5376
|
-
{ type:
|
|
5510
|
+
{ type: exports.Alert, decorators: [{ type: i0.Inject, args: [ACTIVITY_DATA,] }] }
|
|
5377
5511
|
]; };
|
|
5378
5512
|
|
|
5379
5513
|
var ConfirmThenDialogComponent = /** @class */ (function (_super) {
|
|
5380
5514
|
__extends(ConfirmThenDialogComponent, _super);
|
|
5381
5515
|
function ConfirmThenDialogComponent(config) {
|
|
5382
|
-
var _this =
|
|
5516
|
+
var _this = this;
|
|
5517
|
+
var _a;
|
|
5518
|
+
_this = _super.call(this) || this;
|
|
5383
5519
|
_this.config = config;
|
|
5384
5520
|
pectin.assert.notNil(config);
|
|
5385
5521
|
_this.confirmCommand = pectin.Command.create(function () {
|
|
@@ -5390,9 +5526,12 @@
|
|
|
5390
5526
|
_this.cancelCommand = pectin.Command.create(function () {
|
|
5391
5527
|
return _this.cancel();
|
|
5392
5528
|
});
|
|
5529
|
+
_this.title = exports.Alert.getTitle(config.confirm);
|
|
5530
|
+
_this.color = _this.isDestructive() ? 'warn' : (_a = exports.Alert.getColor(config.confirm)) !== null && _a !== void 0 ? _a : 'primary';
|
|
5531
|
+
_this.content = exports.Alert.getContent(config.confirm);
|
|
5393
5532
|
_this.confirmFace = {
|
|
5394
5533
|
text: function () { return _this.confirm.ok(); },
|
|
5395
|
-
color: function () { return _this.
|
|
5534
|
+
color: function () { return _this.color; },
|
|
5396
5535
|
style: function () { return 'raised'; }
|
|
5397
5536
|
};
|
|
5398
5537
|
_this.cancelFace = {
|
|
@@ -5424,7 +5563,7 @@
|
|
|
5424
5563
|
ConfirmThenDialogComponent.decorators = [
|
|
5425
5564
|
{ type: i0.Component, args: [{
|
|
5426
5565
|
selector: 'aup-confirmation-dialog',
|
|
5427
|
-
template: "<aup-activity-title *ngIf=\"
|
|
5566
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n",
|
|
5428
5567
|
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
5429
5568
|
},] }
|
|
5430
5569
|
];
|
|
@@ -5435,22 +5574,24 @@
|
|
|
5435
5574
|
var ConfirmThenExecuteDialogComponent = /** @class */ (function (_super) {
|
|
5436
5575
|
__extends(ConfirmThenExecuteDialogComponent, _super);
|
|
5437
5576
|
function ConfirmThenExecuteDialogComponent(data) {
|
|
5438
|
-
var _this =
|
|
5577
|
+
var _this = this;
|
|
5578
|
+
var _a;
|
|
5579
|
+
_this = _super.call(this) || this;
|
|
5439
5580
|
_this.data = data;
|
|
5440
5581
|
pectin.assert.notNil(data);
|
|
5441
5582
|
_this.confirmCommand = pectin.Command.create(function () { return __awaiter(_this, void 0, void 0, function () {
|
|
5442
5583
|
var result, e_1;
|
|
5443
|
-
return __generator(this, function (
|
|
5444
|
-
switch (
|
|
5584
|
+
return __generator(this, function (_b) {
|
|
5585
|
+
switch (_b.label) {
|
|
5445
5586
|
case 0:
|
|
5446
|
-
|
|
5587
|
+
_b.trys.push([0, 2, , 3]);
|
|
5447
5588
|
return [4 /*yield*/, data.operation(this.interactionContext)];
|
|
5448
5589
|
case 1:
|
|
5449
|
-
result =
|
|
5590
|
+
result = _b.sent();
|
|
5450
5591
|
this.done(result);
|
|
5451
5592
|
return [3 /*break*/, 3];
|
|
5452
5593
|
case 2:
|
|
5453
|
-
e_1 =
|
|
5594
|
+
e_1 = _b.sent();
|
|
5454
5595
|
this.cancel(e_1);
|
|
5455
5596
|
return [3 /*break*/, 3];
|
|
5456
5597
|
case 3: return [2 /*return*/];
|
|
@@ -5460,9 +5601,12 @@
|
|
|
5460
5601
|
_this.cancelCommand = pectin.Command.create(function () {
|
|
5461
5602
|
return _this.cancel();
|
|
5462
5603
|
});
|
|
5604
|
+
_this.title = exports.Alert.getTitle(data.confirm);
|
|
5605
|
+
_this.color = _this.isDestructive() ? 'warn' : (_a = exports.Alert.getColor(data.confirm)) !== null && _a !== void 0 ? _a : 'primary';
|
|
5606
|
+
_this.content = exports.Alert.getContent(data.confirm);
|
|
5463
5607
|
_this.confirmFace = {
|
|
5464
5608
|
text: function () { return _this.confirm.ok(); },
|
|
5465
|
-
color: function () { return _this.
|
|
5609
|
+
color: function () { return _this.color; },
|
|
5466
5610
|
style: function () { return 'raised'; }
|
|
5467
5611
|
};
|
|
5468
5612
|
_this.cancelFace = {
|
|
@@ -5492,7 +5636,7 @@
|
|
|
5492
5636
|
ConfirmThenExecuteDialogComponent.decorators = [
|
|
5493
5637
|
{ type: i0.Component, args: [{
|
|
5494
5638
|
selector: 'aup-confirmation-execute-dialog',
|
|
5495
|
-
template: "<aup-activity-title *ngIf=\"
|
|
5639
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n",
|
|
5496
5640
|
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
5497
5641
|
},] }
|
|
5498
5642
|
];
|
|
@@ -5503,7 +5647,9 @@
|
|
|
5503
5647
|
var ConfirmationDialogComponent = /** @class */ (function (_super) {
|
|
5504
5648
|
__extends(ConfirmationDialogComponent, _super);
|
|
5505
5649
|
function ConfirmationDialogComponent(confirm) {
|
|
5506
|
-
var _this =
|
|
5650
|
+
var _this = this;
|
|
5651
|
+
var _a;
|
|
5652
|
+
_this = _super.call(this) || this;
|
|
5507
5653
|
_this.confirm = confirm;
|
|
5508
5654
|
pectin.assert.notNil(confirm);
|
|
5509
5655
|
_this.confirmCommand = pectin.Command.create(function () {
|
|
@@ -5512,13 +5658,16 @@
|
|
|
5512
5658
|
_this.cancelCommand = pectin.Command.create(function () {
|
|
5513
5659
|
return _this.cancel();
|
|
5514
5660
|
});
|
|
5661
|
+
_this.title = exports.Alert.getTitle(confirm);
|
|
5662
|
+
_this.color = _this.isDestructive() ? 'warn' : (_a = exports.Alert.getColor(confirm)) !== null && _a !== void 0 ? _a : 'primary';
|
|
5663
|
+
_this.content = exports.Alert.getContent(confirm);
|
|
5515
5664
|
_this.confirmFace = {
|
|
5516
5665
|
text: function () { return confirm.ok(); },
|
|
5517
|
-
color: function () { return _this.
|
|
5666
|
+
color: function () { return _this.color; },
|
|
5518
5667
|
style: function () { return 'raised'; }
|
|
5519
5668
|
};
|
|
5520
5669
|
_this.cancelFace = {
|
|
5521
|
-
text: function () { return confirm.cancel(); }
|
|
5670
|
+
text: function () { return confirm.cancel(); }
|
|
5522
5671
|
};
|
|
5523
5672
|
return _this;
|
|
5524
5673
|
}
|
|
@@ -5539,7 +5688,7 @@
|
|
|
5539
5688
|
ConfirmationDialogComponent.decorators = [
|
|
5540
5689
|
{ type: i0.Component, args: [{
|
|
5541
5690
|
selector: 'aup-confirmation-dialog',
|
|
5542
|
-
template: "<aup-activity-title *ngIf=\"
|
|
5691
|
+
template: "<aup-activity-title *ngIf=\"title\" [color]=\"color\"><aup-markdown [content]=\"title\" [inline]=\"true\"></aup-markdown></aup-activity-title>\n<aup-activity-body>\n <aup-markdown *ngFor=\"let line of content\" [content]=\"line\"></aup-markdown>\n</aup-activity-body>\n<aup-activity-actions [confirmFace]=\"confirmFace\" [cancelFace]=\"cancelFace\"></aup-activity-actions>\n\n",
|
|
5543
5692
|
styles: [":host{display:block}.mat-dialog-content{margin:0;padding:0}.mat-dialog-actions{margin-bottom:0!important;padding:0;align-items:flex-end;justify-content:flex-end}\n"]
|
|
5544
5693
|
},] }
|
|
5545
5694
|
];
|
|
@@ -10723,6 +10872,8 @@
|
|
|
10723
10872
|
exports.ListPlaceNavComponent = ListPlaceNavComponent;
|
|
10724
10873
|
exports.ListPropertyColumnModel = ListPropertyColumnModel;
|
|
10725
10874
|
exports.LoadingContainerComponent = LoadingContainerComponent;
|
|
10875
|
+
exports.MarkdownComponent = MarkdownComponent;
|
|
10876
|
+
exports.MarkdownService = MarkdownService;
|
|
10726
10877
|
exports.ModalActivityTriggerComponent = ModalActivityTriggerComponent;
|
|
10727
10878
|
exports.ModalInteractionContextFactory = ModalInteractionContextFactory;
|
|
10728
10879
|
exports.MoreMenuComponent = MoreMenuComponent;
|
|
@@ -10798,6 +10949,7 @@
|
|
|
10798
10949
|
exports.WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined = WaitUntilLinkTriggeredNavigationInteractionCancellationTypeDetermined;
|
|
10799
10950
|
exports.WaitUntilPopStateDuringCanDeactivateInteractionFinishes = WaitUntilPopStateDuringCanDeactivateInteractionFinishes;
|
|
10800
10951
|
exports.leftRightPlaceAnimation = leftRightPlaceAnimation;
|
|
10952
|
+
exports.markdownPillExtension = markdownPillExtension;
|
|
10801
10953
|
exports.slideDownOnEnterAnimation = slideDownOnEnterAnimation;
|
|
10802
10954
|
exports.slideRightOnEnterAnimation = slideRightOnEnterAnimation;
|
|
10803
10955
|
exports.treeNodeDecorator = treeNodeDecorator;
|