@energycap/components 0.29.0 → 0.29.1
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/bundles/energycap-components.umd.js +17 -8
- package/bundles/energycap-components.umd.js.map +1 -1
- package/bundles/energycap-components.umd.min.js +1 -1
- package/bundles/energycap-components.umd.min.js.map +1 -1
- package/energycap-components.metadata.json +1 -1
- package/esm2015/lib/display/confirm/confirm.component.js +18 -9
- package/fesm2015/energycap-components.js +17 -8
- package/fesm2015/energycap-components.js.map +1 -1
- package/lib/display/confirm/confirm.component.d.ts +24 -11
- package/package.json +1 -1
|
@@ -5092,12 +5092,19 @@
|
|
|
5092
5092
|
function ConfirmDialogContext() {
|
|
5093
5093
|
/** Id to distinguish between confirm component contexts emitted by the dialog service */
|
|
5094
5094
|
this.id = '';
|
|
5095
|
-
/**
|
|
5096
|
-
*
|
|
5095
|
+
/**
|
|
5096
|
+
* Optional required flag for the textbox, will set
|
|
5097
|
+
* a validator on the input if true
|
|
5097
5098
|
*/
|
|
5098
5099
|
this.textboxRequired = false;
|
|
5099
5100
|
/** Sets the textbox's uppercase parameter */
|
|
5100
5101
|
this.textboxUppercase = false;
|
|
5102
|
+
/**
|
|
5103
|
+
* Optional textbox height (in rows).
|
|
5104
|
+
* Only applies to multi-line type.
|
|
5105
|
+
* Default 3.
|
|
5106
|
+
*/
|
|
5107
|
+
this.textareaRows = 3;
|
|
5101
5108
|
/** Optional save button label */
|
|
5102
5109
|
this.saveLabel = 'Save'; // LOCO
|
|
5103
5110
|
/** Optional save button type */
|
|
@@ -5110,9 +5117,10 @@
|
|
|
5110
5117
|
this.alternateSaveLabel = undefined;
|
|
5111
5118
|
/** Optional alternate save button type */
|
|
5112
5119
|
this.alternateSaveButtonType = undefined;
|
|
5113
|
-
/**
|
|
5114
|
-
|
|
5115
|
-
|
|
5120
|
+
/**
|
|
5121
|
+
* Used to know which save button was selected in case the calling component
|
|
5122
|
+
* is utilizing the alternate save button
|
|
5123
|
+
*/
|
|
5116
5124
|
this.saveSource = 'primary';
|
|
5117
5125
|
/** The message to be displayed while inlineConfirmAction is pending. */
|
|
5118
5126
|
this.inlineConfirmPendingMessage = '';
|
|
@@ -5160,8 +5168,9 @@
|
|
|
5160
5168
|
ConfirmComponent.prototype.onCancel = function () {
|
|
5161
5169
|
this.onDialogCancel.emit();
|
|
5162
5170
|
};
|
|
5163
|
-
/**
|
|
5164
|
-
*
|
|
5171
|
+
/**
|
|
5172
|
+
* Adds the textbox form control to our form group if its configured to be visible
|
|
5173
|
+
* Will also add the required validator if requested
|
|
5165
5174
|
*/
|
|
5166
5175
|
ConfirmComponent.prototype.addFormControls = function () {
|
|
5167
5176
|
if (this.context.textboxType) {
|
|
@@ -5203,7 +5212,7 @@
|
|
|
5203
5212
|
ConfirmComponent.decorators = [
|
|
5204
5213
|
{ type: i0.Component, args: [{
|
|
5205
5214
|
selector: 'ec-confirm',
|
|
5206
|
-
template: "<section ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [action]=\"status?.action\"\r\n [noDataTemplate]=\"inlineConfirmResult\"\r\n overlayClassList=\"p-0\"\r\n class=\"bg-body flex-grow d-flex\">\r\n <form [formGroup]=\"formGroup\" class=\"flex-grow flex-column confirm-content text-body-1\">\r\n <section class=\"flex-grow\">\r\n <h2 class=\"font-weight-bold mb-3\" *ngIf=\"context?.title\">{{context?.title}}</h2>\r\n <ec-banner *ngIf=\"error\" [text]=\"error | translate\" bannerStyle=\"normal\" class=\"mb-3\"></ec-banner>\r\n <div *ngIf=\"context?.message\" [innerHtml]=\"context?.message | translate\" class=\"mb-3\"></div>\r\n <ec-textbox id=\"confirmTextbox\"\r\n *ngIf=\"context?.textboxType\"\r\n [autofocus]=\"true\"\r\n [formModel]=\"formGroup.get('textbox')\"\r\n [label]=\"context?.textboxLabel\"\r\n [type]=\"context?.textboxType\"\r\n [upperCase]=\"context?.textboxUppercase\">\r\n </ec-textbox>\r\n </section>\r\n <footer class=\"mt-auto flex-shrink d-flex py-2 flex-row-reverse\">\r\n <ec-button id=\"saveConfirmButton\"\r\n class=\"ml-2\"\r\n [type]=\"context?.saveButtonType ? context?.saveButtonType : 'primary'\"\r\n [label]=\"context?.saveLabel ? context?.saveLabel : 'Save'\"\r\n [autofocus]=\"!context?.textboxType\"\r\n [isSubmit]=\"context?.saveOnEnter\"\r\n (clicked)=\"onSave('primary')\">\r\n </ec-button>\r\n <ec-button id=\"alternateSaveConfirmButton\"\r\n *ngIf=\"context?.alternateSaveLabel\"\r\n class=\"ml-2\"\r\n [type]=\"context?.alternateSaveButtonType ? context?.alternateSaveButtonType : 'primary'\"\r\n [label]=\"context?.alternateSaveLabel\"\r\n (clicked)=\"onSave('alternate')\">\r\n </ec-button>\r\n <ec-button id=\"cancelConfirmButton\"\r\n class=\"ml-auto\"\r\n type=\"secondary\"\r\n [label]=\"context?.cancelLabel ? context?.cancelLabel : 'Cancel'\"\r\n (clicked)=\"onCancel()\">\r\n </ec-button>\r\n </footer>\r\n </form>\r\n</section>\r\n\r\n<ng-template #inlineConfirmResult>\r\n <section class=\"flex-grow align-self-stretch confirm-content text-body-1\">\r\n <div class=\"d-flex\">\r\n <i class=\"ec-icon {{status?.action?.icon}} {{status?.action?.classlist}} inline-confirm-result-icon\"></i>\r\n <div [innerHTML]=\"status?.message | translate\"></div>\r\n </div>\r\n <div class=\"d-flex pt-2 mt-auto\">\r\n <ec-button id=\"inlineConfirmClose\"\r\n label=\"Close\"\r\n type=\"secondary\"\r\n class=\"ml-auto\"\r\n (clicked)=\"status?.action?.onClick!()\"\r\n [autofocus]=\"true\">\r\n </ec-button>\r\n </div>\r\n </section>\r\n</ng-template>",
|
|
5215
|
+
template: "<section ecOverlay\r\n [status]=\"status?.status\"\r\n [message]=\"status?.message\"\r\n [action]=\"status?.action\"\r\n [noDataTemplate]=\"inlineConfirmResult\"\r\n overlayClassList=\"p-0\"\r\n class=\"bg-body flex-grow d-flex\">\r\n <form [formGroup]=\"formGroup\" class=\"flex-grow flex-column confirm-content text-body-1\">\r\n <section class=\"flex-grow\">\r\n <h2 class=\"font-weight-bold mb-3\" *ngIf=\"context?.title\">{{context?.title}}</h2>\r\n <ec-banner *ngIf=\"error\" [text]=\"error | translate\" bannerStyle=\"normal\" class=\"mb-3\"></ec-banner>\r\n <div *ngIf=\"context?.message\" [innerHtml]=\"context?.message | translate\" class=\"mb-3\"></div>\r\n <ec-textbox id=\"confirmTextbox\"\r\n *ngIf=\"context?.textboxType\"\r\n [autofocus]=\"true\"\r\n [formModel]=\"formGroup.get('textbox')\"\r\n [required]=\"context?.textboxRequired\"\r\n [label]=\"context?.textboxLabel\"\r\n [type]=\"context?.textboxType\"\r\n [rows]=\"context?.textareaRows\"\r\n [placeholder]=\"context?.textboxPlaceholder\"\r\n [upperCase]=\"context?.textboxUppercase\">\r\n </ec-textbox>\r\n </section>\r\n <footer class=\"mt-auto flex-shrink d-flex py-2 flex-row-reverse\">\r\n <ec-button id=\"saveConfirmButton\"\r\n class=\"ml-2\"\r\n [type]=\"context?.saveButtonType ? context?.saveButtonType : 'primary'\"\r\n [label]=\"context?.saveLabel ? context?.saveLabel : 'Save'\"\r\n [autofocus]=\"!context?.textboxType\"\r\n [isSubmit]=\"context?.saveOnEnter\"\r\n (clicked)=\"onSave('primary')\">\r\n </ec-button>\r\n <ec-button id=\"alternateSaveConfirmButton\"\r\n *ngIf=\"context?.alternateSaveLabel\"\r\n class=\"ml-2\"\r\n [type]=\"context?.alternateSaveButtonType ? context?.alternateSaveButtonType : 'primary'\"\r\n [label]=\"context?.alternateSaveLabel\"\r\n (clicked)=\"onSave('alternate')\">\r\n </ec-button>\r\n <ec-button id=\"cancelConfirmButton\"\r\n class=\"ml-auto\"\r\n type=\"secondary\"\r\n [label]=\"context?.cancelLabel ? context?.cancelLabel : 'Cancel'\"\r\n (clicked)=\"onCancel()\">\r\n </ec-button>\r\n </footer>\r\n </form>\r\n</section>\r\n\r\n<ng-template #inlineConfirmResult>\r\n <section class=\"flex-grow align-self-stretch confirm-content text-body-1\">\r\n <div class=\"d-flex\">\r\n <i class=\"ec-icon {{status?.action?.icon}} {{status?.action?.classlist}} inline-confirm-result-icon\"></i>\r\n <div [innerHTML]=\"status?.message | translate\"></div>\r\n </div>\r\n <div class=\"d-flex pt-2 mt-auto\">\r\n <ec-button id=\"inlineConfirmClose\"\r\n label=\"Close\"\r\n type=\"secondary\"\r\n class=\"ml-auto\"\r\n (clicked)=\"status?.action?.onClick!()\"\r\n [autofocus]=\"true\">\r\n </ec-button>\r\n </div>\r\n </section>\r\n</ng-template>",
|
|
5207
5216
|
styles: [":host{display:flex;width:100%}.confirm-content{display:flex;flex-direction:column;padding:1.5rem}.inline-confirm-result-icon{margin:.0625rem .25rem .0625rem 0}"]
|
|
5208
5217
|
},] }
|
|
5209
5218
|
];
|