@c8y/ngx-components 1023.14.103 → 1023.14.111
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/alarms/index.d.ts +2 -1
- package/alarms/index.d.ts.map +1 -1
- package/asset-properties/index.d.ts +1 -1
- package/context-dashboard/index.d.ts +1 -1
- package/datapoints-export-selector/index.d.ts +2 -2
- package/device-enrolment/index.d.ts +6 -0
- package/device-enrolment/index.d.ts.map +1 -0
- package/device-enrolment/modal/index.d.ts +88 -0
- package/device-enrolment/modal/index.d.ts.map +1 -0
- package/device-grid/index.d.ts +1 -1
- package/device-list/index.d.ts +1 -1
- package/device-shell/index.d.ts +1 -1
- package/echart/index.d.ts +1 -1
- package/echart/models/index.d.ts +2 -2
- package/fesm2022/c8y-ngx-components-alarms-cockpit.mjs +1 -1
- package/fesm2022/c8y-ngx-components-alarms-devicemanagement.mjs +1 -1
- package/fesm2022/c8y-ngx-components-alarms.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-branding-shared.mjs +1 -1
- package/fesm2022/c8y-ngx-components-child-devices.mjs +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-asset-add.mjs +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-device-add.mjs +1 -1
- package/fesm2022/c8y-ngx-components-context-dashboard-devicemanagement.mjs +1 -1
- package/fesm2022/{c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-D0C7SH6L.mjs → c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DvKsV_Fs.mjs} +14 -12
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-DvKsV_Fs.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab.mjs +2 -2
- package/fesm2022/c8y-ngx-components-datapoint-explorer-devicemanagement.mjs +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-explorer.mjs +1 -1
- package/fesm2022/c8y-ngx-components-datapoint-library.mjs +1 -1
- package/fesm2022/c8y-ngx-components-device-enrolment-modal.mjs +570 -0
- package/fesm2022/c8y-ngx-components-device-enrolment-modal.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-device-enrolment.mjs +147 -0
- package/fesm2022/c8y-ngx-components-device-enrolment.mjs.map +1 -0
- package/fesm2022/c8y-ngx-components-echart.mjs +12 -7
- package/fesm2022/c8y-ngx-components-echart.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-ecosystem.mjs +2 -2
- package/fesm2022/c8y-ngx-components-ecosystem.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-exports.mjs +1 -1
- package/fesm2022/c8y-ngx-components-register-device.mjs +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-ssh.mjs +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-telnet.mjs +1 -1
- package/fesm2022/c8y-ngx-components-remote-access-vnc.mjs +1 -1
- package/fesm2022/c8y-ngx-components-report-dashboard.mjs +1 -1
- package/fesm2022/c8y-ngx-components-repository-firmware.mjs +1 -1
- package/fesm2022/c8y-ngx-components-sub-assets.mjs +132 -55
- package/fesm2022/c8y-ngx-components-sub-assets.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-tenants.mjs +74 -36
- package/fesm2022/c8y-ngx-components-tenants.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs +4 -4
- package/fesm2022/c8y-ngx-components-widgets-implementations-cockpit-welcome.mjs.map +1 -1
- package/fesm2022/c8y-ngx-components.mjs +56 -12
- package/fesm2022/c8y-ngx-components.mjs.map +1 -1
- package/index.d.ts +19 -26
- package/index.d.ts.map +1 -1
- package/locales/de.po +138 -6
- package/locales/es.po +137 -6
- package/locales/fr.po +137 -6
- package/locales/ja_JP.po +117 -6
- package/locales/ko.po +138 -6
- package/locales/locales.pot +125 -3
- package/locales/nl.po +137 -6
- package/locales/pl.po +137 -6
- package/locales/pt_BR.po +137 -6
- package/locales/zh_CN.po +138 -6
- package/locales/zh_TW.po +137 -6
- package/map/index.d.ts +1 -0
- package/map/index.d.ts.map +1 -1
- package/operations/bulk-operations-service/index.d.ts +1 -1
- package/package.json +1 -1
- package/protocol-opcua/mappings/index.d.ts +1 -1
- package/register-device/index.d.ts +1 -1
- package/remote-access/data/index.d.ts +1 -0
- package/remote-access/data/index.d.ts.map +1 -1
- package/repository/shared/index.d.ts.map +1 -1
- package/sub-assets/index.d.ts +9 -3
- package/sub-assets/index.d.ts.map +1 -1
- package/tenants/index.d.ts +1 -0
- package/tenants/index.d.ts.map +1 -1
- package/widgets/implementations/datapoints-table/index.d.ts +2 -2
- package/widgets/implementations/kpi/index.d.ts +1 -1
- package/fesm2022/c8y-ngx-components-dashboard-details-advanced-tab-dashboard-details-advanced-tab.component-D0C7SH6L.mjs.map +0 -1
|
@@ -4131,7 +4131,7 @@ class AssetTypesRealtimeService {
|
|
|
4131
4131
|
*/
|
|
4132
4132
|
getIcon$(type) {
|
|
4133
4133
|
const assetType = this.getAssetTypeByName$(type);
|
|
4134
|
-
return assetType.pipe(map(assetType => assetType?.c8y_IsAssetType?.icon?.name || this.DEFAULT_ASSET_ICON));
|
|
4134
|
+
return assetType.pipe(map(assetType => assetType?.icon?.name || assetType?.c8y_IsAssetType?.icon?.name || this.DEFAULT_ASSET_ICON));
|
|
4135
4135
|
}
|
|
4136
4136
|
/**
|
|
4137
4137
|
* Refreshes the asset types cache
|
|
@@ -4149,8 +4149,12 @@ class AssetTypesRealtimeService {
|
|
|
4149
4149
|
*/
|
|
4150
4150
|
async getAssetTypes() {
|
|
4151
4151
|
const assetTypesCache = {};
|
|
4152
|
-
const
|
|
4153
|
-
|
|
4152
|
+
const query = {
|
|
4153
|
+
__filter: {
|
|
4154
|
+
__or: [{ type: 'c8y_AssetDefinition' }, { __has: 'c8y_IsAssetType' }]
|
|
4155
|
+
}
|
|
4156
|
+
};
|
|
4157
|
+
const { data } = await this.inventory.listQuery(query, {
|
|
4154
4158
|
withChildren: false,
|
|
4155
4159
|
pageSize: 2000
|
|
4156
4160
|
});
|
|
@@ -4249,8 +4253,8 @@ class GroupService {
|
|
|
4249
4253
|
this.dataBrokerSourceFragmentInactive = `_${GroupFragment.dataBrokerSourceFragment}`;
|
|
4250
4254
|
}
|
|
4251
4255
|
/**
|
|
4252
|
-
* Finds an icon based on the
|
|
4253
|
-
*
|
|
4256
|
+
* Finds an icon based on the asset type; if none is found, it looks for an asset-specific icon,
|
|
4257
|
+
* and if that is also unavailable, it uses the default icon.
|
|
4254
4258
|
* @param mo Managed object to be checked.
|
|
4255
4259
|
* @param open Determines whether the method should return an alternative icon showing the open state.
|
|
4256
4260
|
* @param fallbackIcon If no icon is found, this icon is returned.
|
|
@@ -4258,8 +4262,13 @@ class GroupService {
|
|
|
4258
4262
|
*/
|
|
4259
4263
|
async getIcon(mo, open = false, fallbackIcon) {
|
|
4260
4264
|
const genericMoType = this.determineMoType(mo);
|
|
4265
|
+
const defaultIcon = 'c8y-enterprise';
|
|
4261
4266
|
if (genericMoType === 'asset') {
|
|
4262
|
-
|
|
4267
|
+
const icon = await this.getAssetCustomIcon(mo.type);
|
|
4268
|
+
if (icon === defaultIcon && mo.icon && mo.icon.name !== '') {
|
|
4269
|
+
return mo.icon.name;
|
|
4270
|
+
}
|
|
4271
|
+
return icon;
|
|
4263
4272
|
}
|
|
4264
4273
|
if (fallbackIcon && genericMoType === 'other') {
|
|
4265
4274
|
return fallbackIcon;
|
|
@@ -14752,6 +14761,8 @@ class ConfirmModalComponent {
|
|
|
14752
14761
|
constructor(modal) {
|
|
14753
14762
|
this.modal = modal;
|
|
14754
14763
|
this.status = Status.INFO;
|
|
14764
|
+
this.requireCodeVerification = false;
|
|
14765
|
+
this.confirmString = '';
|
|
14755
14766
|
this._labels = {
|
|
14756
14767
|
ok: 'OK',
|
|
14757
14768
|
cancel: 'Cancel'
|
|
@@ -14762,6 +14773,9 @@ class ConfirmModalComponent {
|
|
|
14762
14773
|
this.modal.hide();
|
|
14763
14774
|
};
|
|
14764
14775
|
this.close = () => {
|
|
14776
|
+
if (this.requireCodeVerification && !this.canConfirmWithCode()) {
|
|
14777
|
+
return;
|
|
14778
|
+
}
|
|
14765
14779
|
resolve(isEmpty(this.confirmOptions)
|
|
14766
14780
|
? true
|
|
14767
14781
|
: {
|
|
@@ -14772,6 +14786,11 @@ class ConfirmModalComponent {
|
|
|
14772
14786
|
};
|
|
14773
14787
|
});
|
|
14774
14788
|
}
|
|
14789
|
+
ngOnInit() {
|
|
14790
|
+
if (this.requireCodeVerification) {
|
|
14791
|
+
this.code = this.generateRandomCode();
|
|
14792
|
+
}
|
|
14793
|
+
}
|
|
14775
14794
|
get classIcon() {
|
|
14776
14795
|
return `dlt-c8y-icon-${statusIcons[this.status]}`;
|
|
14777
14796
|
}
|
|
@@ -14785,12 +14804,26 @@ class ConfirmModalComponent {
|
|
|
14785
14804
|
const doc = new DOMParser().parseFromString(str, 'text/html');
|
|
14786
14805
|
return Array.from(doc.body.childNodes).some(node => node.nodeType === Node.ELEMENT_NODE);
|
|
14787
14806
|
}
|
|
14807
|
+
canConfirmWithCode() {
|
|
14808
|
+
return this.confirmString === this.code;
|
|
14809
|
+
}
|
|
14810
|
+
get isOkButtonDisabled() {
|
|
14811
|
+
if (this.requireCodeVerification) {
|
|
14812
|
+
return !this.canConfirmWithCode();
|
|
14813
|
+
}
|
|
14814
|
+
return false;
|
|
14815
|
+
}
|
|
14816
|
+
generateRandomCode() {
|
|
14817
|
+
// no l, I, 0, O chars to prevent confusion:
|
|
14818
|
+
const chars = 'ABCDEFGHJKLMNPQRSTUVWXYZabcdefhijkmnoprstuvwxyz123456789';
|
|
14819
|
+
return Array.from({ length: 5 }, () => chars.charAt(Math.floor(Math.random() * chars.length))).join('');
|
|
14820
|
+
}
|
|
14788
14821
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfirmModalComponent, deps: [{ token: i1$7.BsModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14789
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ConfirmModalComponent, isStandalone: true, selector: "c8y-confirm-modal", inputs: { title: "title", body: "body", confirmOptions: "confirmOptions", status: "status", labels: "labels" }, ngImport: i0, template: "<div\n class=\"c8y-prompt alert\"\n [ngClass]=\"[classAlert]\"\n data-cy=\"prompt-alert\"\n>\n @if (title) {\n <h3 class=\"m-b-16 d-flex a-i-center\">\n <i\n class=\"dlt-c8y-icon\"\n [ngClass]=\"[classIcon]\"\n ></i>\n <span id=\"modal-title\">{{ title | translate }}</span>\n </h3>\n }\n <div id=\"modal-body\">\n @if (!isHtml(body)) {\n <p class=\"text-break-word m-b-16\">\n {{ body | translate }}\n </p>\n }\n @if (isHtml(body)) {\n <div\n class=\"text-break-word m-b-16\"\n [innerHTML]=\"body | translate\"\n ></div>\n }\n @for (co of confirmOptions | showIfFilter | async | keyvalue; track co) {\n <div class=\"c8y-checkbox plain m-b-8\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"co.value.text | translate\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"co.value.checked\"\n (change)=\"co.value.checked = !co.value.checked\"\n [disabled]=\"confirmOptions[co.value.disabledByKey]?.checked\"\n />\n <span></span>\n <span>{{ co.value.text | translate }}</span>\n </label>\n </div>\n }\n <ng-content></ng-content>\n </div>\n <div class=\"alert-footer\">\n @if (labels.cancel !== null) {\n <button\n class=\"btn btn-default\"\n title=\"{{ labels.cancel | translate }}\"\n type=\"button\"\n (click)=\"dismiss()\"\n data-cy=\"c8y-confirm-modal--cancel\"\n >\n {{ labels.cancel | translate }}\n </button>\n }\n <button\n class=\"btn btn-primary m-t-xs-8\"\n title=\"{{ labels.ok | translate }}\"\n type=\"button\"\n (click)=\"close()\"\n data-cy=\"c8y-confirm-modal--ok\"\n >\n {{ labels.ok | translate }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: ShowIfFilterPipe, name: "showIfFilter" }] }); }
|
|
14822
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.16", type: ConfirmModalComponent, isStandalone: true, selector: "c8y-confirm-modal", inputs: { title: "title", body: "body", confirmOptions: "confirmOptions", status: "status", requireCodeVerification: "requireCodeVerification", labels: "labels" }, ngImport: i0, template: "<div\n class=\"c8y-prompt alert\"\n [ngClass]=\"[classAlert]\"\n data-cy=\"prompt-alert\"\n>\n @if (title) {\n <h3 class=\"m-b-16 d-flex a-i-center\">\n <i\n class=\"dlt-c8y-icon\"\n [ngClass]=\"[classIcon]\"\n ></i>\n <span id=\"modal-title\">{{ title | translate }}</span>\n </h3>\n }\n <div id=\"modal-body\">\n @if (!isHtml(body)) {\n <p class=\"text-break-word m-b-16\">\n {{ body | translate }}\n </p>\n }\n @if (isHtml(body)) {\n <div\n class=\"text-break-word m-b-16\"\n [innerHTML]=\"body | translate\"\n ></div>\n }\n @for (co of confirmOptions | showIfFilter | async | keyvalue; track co) {\n <div class=\"c8y-checkbox plain m-b-8\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"co.value.text | translate\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"co.value.checked\"\n (change)=\"co.value.checked = !co.value.checked\"\n [disabled]=\"confirmOptions[co.value.disabledByKey]?.checked\"\n />\n <span></span>\n <span>{{ co.value.text | translate }}</span>\n </label>\n </div>\n }\n @if (requireCodeVerification) {\n <p class=\"text-break-word m-b-16\">\n <code>{{ code }}</code>\n </p>\n <form (submit)=\"$event.preventDefault()\">\n <div class=\"form-group\">\n <label for=\"confirmString\">\n {{ 'Confirm:' | translate }}\n </label>\n <input\n class=\"form-control\"\n id=\"confirmString\"\n placeholder=\"{{ 'Type here' | translate }}\"\n name=\"confirmString\"\n type=\"text\"\n autocomplete=\"off\"\n [(ngModel)]=\"confirmString\"\n />\n </div>\n </form>\n }\n <ng-content></ng-content>\n </div>\n <div class=\"alert-footer\">\n @if (labels.cancel !== null) {\n <button\n class=\"btn btn-default\"\n title=\"{{ labels.cancel | translate }}\"\n type=\"button\"\n (click)=\"dismiss()\"\n data-cy=\"c8y-confirm-modal--cancel\"\n >\n {{ labels.cancel | translate }}\n </button>\n }\n <button\n class=\"btn btn-primary m-t-xs-8\"\n title=\"{{ labels.ok | translate }}\"\n type=\"button\"\n (click)=\"close()\"\n data-cy=\"c8y-confirm-modal--ok\"\n [disabled]=\"isOkButtonDisabled\"\n >\n {{ labels.ok | translate }}\n </button>\n </div>\n</div>\n", dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i1$8.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1$8.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i1$8.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: AsyncPipe, name: "async" }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: ShowIfFilterPipe, name: "showIfFilter" }] }); }
|
|
14790
14823
|
}
|
|
14791
14824
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ConfirmModalComponent, decorators: [{
|
|
14792
14825
|
type: Component,
|
|
14793
|
-
args: [{ selector: 'c8y-confirm-modal', standalone: true, imports: [NgClass, C8yTranslatePipe, AsyncPipe, KeyValuePipe, ShowIfFilterPipe], template: "<div\n class=\"c8y-prompt alert\"\n [ngClass]=\"[classAlert]\"\n data-cy=\"prompt-alert\"\n>\n @if (title) {\n <h3 class=\"m-b-16 d-flex a-i-center\">\n <i\n class=\"dlt-c8y-icon\"\n [ngClass]=\"[classIcon]\"\n ></i>\n <span id=\"modal-title\">{{ title | translate }}</span>\n </h3>\n }\n <div id=\"modal-body\">\n @if (!isHtml(body)) {\n <p class=\"text-break-word m-b-16\">\n {{ body | translate }}\n </p>\n }\n @if (isHtml(body)) {\n <div\n class=\"text-break-word m-b-16\"\n [innerHTML]=\"body | translate\"\n ></div>\n }\n @for (co of confirmOptions | showIfFilter | async | keyvalue; track co) {\n <div class=\"c8y-checkbox plain m-b-8\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"co.value.text | translate\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"co.value.checked\"\n (change)=\"co.value.checked = !co.value.checked\"\n [disabled]=\"confirmOptions[co.value.disabledByKey]?.checked\"\n />\n <span></span>\n <span>{{ co.value.text | translate }}</span>\n </label>\n </div>\n }\n <ng-content></ng-content>\n </div>\n <div class=\"alert-footer\">\n @if (labels.cancel !== null) {\n <button\n class=\"btn btn-default\"\n title=\"{{ labels.cancel | translate }}\"\n type=\"button\"\n (click)=\"dismiss()\"\n data-cy=\"c8y-confirm-modal--cancel\"\n >\n {{ labels.cancel | translate }}\n </button>\n }\n <button\n class=\"btn btn-primary m-t-xs-8\"\n title=\"{{ labels.ok | translate }}\"\n type=\"button\"\n (click)=\"close()\"\n data-cy=\"c8y-confirm-modal--ok\"\n >\n {{ labels.ok | translate }}\n </button>\n </div>\n</div>\n" }]
|
|
14826
|
+
args: [{ selector: 'c8y-confirm-modal', standalone: true, imports: [NgClass, C8yTranslatePipe, AsyncPipe, KeyValuePipe, ShowIfFilterPipe, FormsModule$1], template: "<div\n class=\"c8y-prompt alert\"\n [ngClass]=\"[classAlert]\"\n data-cy=\"prompt-alert\"\n>\n @if (title) {\n <h3 class=\"m-b-16 d-flex a-i-center\">\n <i\n class=\"dlt-c8y-icon\"\n [ngClass]=\"[classIcon]\"\n ></i>\n <span id=\"modal-title\">{{ title | translate }}</span>\n </h3>\n }\n <div id=\"modal-body\">\n @if (!isHtml(body)) {\n <p class=\"text-break-word m-b-16\">\n {{ body | translate }}\n </p>\n }\n @if (isHtml(body)) {\n <div\n class=\"text-break-word m-b-16\"\n [innerHTML]=\"body | translate\"\n ></div>\n }\n @for (co of confirmOptions | showIfFilter | async | keyvalue; track co) {\n <div class=\"c8y-checkbox plain m-b-8\">\n <label\n class=\"c8y-checkbox\"\n [title]=\"co.value.text | translate\"\n >\n <input\n type=\"checkbox\"\n [checked]=\"co.value.checked\"\n (change)=\"co.value.checked = !co.value.checked\"\n [disabled]=\"confirmOptions[co.value.disabledByKey]?.checked\"\n />\n <span></span>\n <span>{{ co.value.text | translate }}</span>\n </label>\n </div>\n }\n @if (requireCodeVerification) {\n <p class=\"text-break-word m-b-16\">\n <code>{{ code }}</code>\n </p>\n <form (submit)=\"$event.preventDefault()\">\n <div class=\"form-group\">\n <label for=\"confirmString\">\n {{ 'Confirm:' | translate }}\n </label>\n <input\n class=\"form-control\"\n id=\"confirmString\"\n placeholder=\"{{ 'Type here' | translate }}\"\n name=\"confirmString\"\n type=\"text\"\n autocomplete=\"off\"\n [(ngModel)]=\"confirmString\"\n />\n </div>\n </form>\n }\n <ng-content></ng-content>\n </div>\n <div class=\"alert-footer\">\n @if (labels.cancel !== null) {\n <button\n class=\"btn btn-default\"\n title=\"{{ labels.cancel | translate }}\"\n type=\"button\"\n (click)=\"dismiss()\"\n data-cy=\"c8y-confirm-modal--cancel\"\n >\n {{ labels.cancel | translate }}\n </button>\n }\n <button\n class=\"btn btn-primary m-t-xs-8\"\n title=\"{{ labels.ok | translate }}\"\n type=\"button\"\n (click)=\"close()\"\n data-cy=\"c8y-confirm-modal--ok\"\n [disabled]=\"isOkButtonDisabled\"\n >\n {{ labels.ok | translate }}\n </button>\n </div>\n</div>\n" }]
|
|
14794
14827
|
}], ctorParameters: () => [{ type: i1$7.BsModalRef }], propDecorators: { title: [{
|
|
14795
14828
|
type: Input
|
|
14796
14829
|
}], body: [{
|
|
@@ -14799,6 +14832,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImpo
|
|
|
14799
14832
|
type: Input
|
|
14800
14833
|
}], status: [{
|
|
14801
14834
|
type: Input
|
|
14835
|
+
}], requireCodeVerification: [{
|
|
14836
|
+
type: Input
|
|
14802
14837
|
}], labels: [{
|
|
14803
14838
|
type: Input
|
|
14804
14839
|
}] } });
|
|
@@ -14836,7 +14871,7 @@ class CookieBannerPreferencesModalComponent {
|
|
|
14836
14871
|
return this.cookieBannerService.getCookieDescription(cookieType);
|
|
14837
14872
|
}
|
|
14838
14873
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CookieBannerPreferencesModalComponent, deps: [{ token: CookieBannerService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
14839
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CookieBannerPreferencesModalComponent, isStandalone: true, selector: "c8y-cookie-banner-preferences-modal", viewQueries: [{ propertyName: "modalRef", first: true, predicate: ["modalRef"], descendants: true }], ngImport: i0, template: "<c8y-confirm-modal [title]=\"title\" [status]=\"status\" [labels]=\"labels\" #modalRef>\n\n <div *ngFor=\"let item of configCookiePreferencesList\" class=\"row p-t-8 p-b-8 separator-top\">\n <div class=\"col-xs-2\">\n <div class=\"text-center\">\n <label class=\"c8y-switch\">\n <input\n name=\"{{ item.name }}\"\n type=\"checkbox\"\n [(ngModel)]=\"item.value\"\n [disabled]=\"item.isReadonly\"\n />\n <span></span>\n </label>\n </div>\n </div>\n <div class=\"col-xs-10\">\n <h4 class=\"text-medium\">\n {{ item.name | translate | humanize }}\n </h4>\n <p>\n {{ getCookieDescription(item.name) | translate }}\n </p>\n </div>\n </div>\n</c8y-confirm-modal>\n", dependencies: [{ kind: "component", type: ConfirmModalComponent, selector: "c8y-confirm-modal", inputs: ["title", "body", "confirmOptions", "status", "labels"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i1$8.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: HumanizePipe, name: "humanize" }] }); }
|
|
14874
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.16", type: CookieBannerPreferencesModalComponent, isStandalone: true, selector: "c8y-cookie-banner-preferences-modal", viewQueries: [{ propertyName: "modalRef", first: true, predicate: ["modalRef"], descendants: true }], ngImport: i0, template: "<c8y-confirm-modal [title]=\"title\" [status]=\"status\" [labels]=\"labels\" #modalRef>\n\n <div *ngFor=\"let item of configCookiePreferencesList\" class=\"row p-t-8 p-b-8 separator-top\">\n <div class=\"col-xs-2\">\n <div class=\"text-center\">\n <label class=\"c8y-switch\">\n <input\n name=\"{{ item.name }}\"\n type=\"checkbox\"\n [(ngModel)]=\"item.value\"\n [disabled]=\"item.isReadonly\"\n />\n <span></span>\n </label>\n </div>\n </div>\n <div class=\"col-xs-10\">\n <h4 class=\"text-medium\">\n {{ item.name | translate | humanize }}\n </h4>\n <p>\n {{ getCookieDescription(item.name) | translate }}\n </p>\n </div>\n </div>\n</c8y-confirm-modal>\n", dependencies: [{ kind: "component", type: ConfirmModalComponent, selector: "c8y-confirm-modal", inputs: ["title", "body", "confirmOptions", "status", "requireCodeVerification", "labels"] }, { kind: "directive", type: NgFor, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "ngmodule", type: FormsModule$1 }, { kind: "directive", type: i1$8.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }, { kind: "directive", type: i1$8.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1$8.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "pipe", type: C8yTranslatePipe, name: "translate" }, { kind: "pipe", type: HumanizePipe, name: "humanize" }] }); }
|
|
14840
14875
|
}
|
|
14841
14876
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: CookieBannerPreferencesModalComponent, decorators: [{
|
|
14842
14877
|
type: Component,
|
|
@@ -15662,6 +15697,7 @@ class ModalModule {
|
|
|
15662
15697
|
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ModalModule, imports: [ModalModule$1.forRoot(),
|
|
15663
15698
|
CommonModule,
|
|
15664
15699
|
PopoverModule.forRoot(),
|
|
15700
|
+
ConfirmModalComponent,
|
|
15665
15701
|
PopoverConfirmComponent] }); }
|
|
15666
15702
|
}
|
|
15667
15703
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.16", ngImport: i0, type: ModalModule, decorators: [{
|
|
@@ -19813,14 +19849,22 @@ class ModalService {
|
|
|
19813
19849
|
* @param labels The labels to use. Default: { ok: 'Confirm', cancel: 'Cancel'}
|
|
19814
19850
|
* @param confirmOptions Selection options to display as checkbox list.
|
|
19815
19851
|
* @param productExperienceEvent Additional data to attach to custom product experience events.
|
|
19852
|
+
* @param requireCodeVerification Whether to require user to retype a random code for confirmation.
|
|
19816
19853
|
*/
|
|
19817
|
-
async confirm(title, body, status = Status.INFO, labels = {}, confirmOptions = {}, productExperienceEvent = { eventName: 'confirmModal' }) {
|
|
19854
|
+
async confirm(title, body, status = Status.INFO, labels = {}, confirmOptions = {}, productExperienceEvent = { eventName: 'confirmModal' }, requireCodeVerification = false) {
|
|
19818
19855
|
const modalLabels = {
|
|
19819
19856
|
ok: labels.ok || gettext$1('Confirm'),
|
|
19820
19857
|
cancel: labels.cancel || gettext$1('Cancel')
|
|
19821
19858
|
};
|
|
19822
19859
|
const modalRef = this.modalService.show(ConfirmModalComponent, {
|
|
19823
|
-
initialState: {
|
|
19860
|
+
initialState: {
|
|
19861
|
+
title,
|
|
19862
|
+
body,
|
|
19863
|
+
labels: modalLabels,
|
|
19864
|
+
status,
|
|
19865
|
+
confirmOptions,
|
|
19866
|
+
requireCodeVerification
|
|
19867
|
+
},
|
|
19824
19868
|
ariaDescribedby: 'modal-body',
|
|
19825
19869
|
ariaLabelledBy: 'modal-title',
|
|
19826
19870
|
ignoreBackdropClick: true
|
|
@@ -37953,7 +37997,7 @@ class AssetTypesService {
|
|
|
37953
37997
|
*/
|
|
37954
37998
|
getIcon(type) {
|
|
37955
37999
|
const assetType = this.getAssetTypeByName(type);
|
|
37956
|
-
return assetType?.c8y_IsAssetType?.icon?.name || this.DEFAULT_ASSET_ICON;
|
|
38000
|
+
return (assetType?.c8y_IsAssetType?.icon?.name || assetType?.icon?.name || this.DEFAULT_ASSET_ICON);
|
|
37957
38001
|
}
|
|
37958
38002
|
/**
|
|
37959
38003
|
* Add an asset type to the local cache.
|