@gravitee/ui-particles-angular 7.56.0 → 7.56.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.
@@ -5133,6 +5133,146 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImpo
5133
5133
  }]
5134
5134
  }] });
5135
5135
 
5136
+ /*
5137
+ * Copyright (C) 2024 The Gravitee team (http://gravitee.io)
5138
+ *
5139
+ * Licensed under the Apache License, Version 2.0 (the "License");
5140
+ * you may not use this file except in compliance with the License.
5141
+ * You may obtain a copy of the License at
5142
+ *
5143
+ * http://www.apache.org/licenses/LICENSE-2.0
5144
+ *
5145
+ * Unless required by applicable law or agreed to in writing, software
5146
+ * distributed under the License is distributed on an "AS IS" BASIS,
5147
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5148
+ * See the License for the specific language governing permissions and
5149
+ * limitations under the License.
5150
+ */
5151
+ class GioLicenseExpirationNotificationComponent {
5152
+ constructor() {
5153
+ this.showCallToAction = true;
5154
+ this.inError = false;
5155
+ this.title = '';
5156
+ this.daysRemaining = 0;
5157
+ this.statusColor = 'blue';
5158
+ }
5159
+ ngOnInit() {
5160
+ if (!this.expirationDate) {
5161
+ return;
5162
+ }
5163
+ if (this.inError) {
5164
+ this.title = "There's an issue with your license";
5165
+ return;
5166
+ }
5167
+ const timeRemaining = this.transformDateWithoutHours(this.expirationDate) - this.transformDateWithoutHours(new Date());
5168
+ this.daysRemaining = timeRemaining / (1000 * 3600 * 24);
5169
+ if (this.daysRemaining <= 0) {
5170
+ this.title = 'Your license has expired';
5171
+ this.statusColor = 'red';
5172
+ }
5173
+ else {
5174
+ this.title = `Your license will expire in ${this.daysRemaining} day${this.daysRemaining === 1 ? '' : 's'}`;
5175
+ this.statusColor = this.daysRemaining > 5 ? 'blue' : 'orange';
5176
+ }
5177
+ }
5178
+ ngOnChanges(changes) {
5179
+ if (changes.expirationDate) {
5180
+ this.ngOnInit();
5181
+ }
5182
+ }
5183
+ transformDateWithoutHours(date) {
5184
+ return new Date(date.toDateString()).valueOf();
5185
+ }
5186
+ }
5187
+ GioLicenseExpirationNotificationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLicenseExpirationNotificationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
5188
+ GioLicenseExpirationNotificationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.3.12", type: GioLicenseExpirationNotificationComponent, selector: "gio-license-expiration-notification", inputs: { expirationDate: "expirationDate", showCallToAction: "showCallToAction", callToActionMessage: "callToActionMessage", link: "link", inError: "inError" }, usesOnChanges: true, ngImport: i0, template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div *ngIf=\"expirationDate && daysRemaining <= 30\" class=\"status mat-elevation-z2\" rel=\"noopener\">\n <div [ngClass]=\"'status__title ' + statusColor\">\n <div class=\"status__title__text\">\n {{ title }}\n <img src=\"assets/license-expiration-notification-background.svg\" />\n </div>\n </div>\n <a *ngIf=\"showCallToAction\" class=\"status__action\" [href]=\"link ?? 'https://www.gravitee.io/contact-us-license'\" target=\"_blank\">\n <div class=\"status__action__text\">{{ callToActionMessage ?? 'Contact Gravitee' }}</div>\n <mat-icon svgIcon=\"gio:right-circle\" class=\"status__action__icon\"></mat-icon>\n </a>\n</div>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.status{position:relative;display:flex;width:192px;height:152px;flex-direction:column;padding:0;border-radius:4px;color:#100c27;border:none;background:white;text-decoration:none}.status--disabled{cursor:not-allowed}.status__sub-tile{height:56px;margin-top:16px}.status__title img{position:absolute;top:0;right:0}.status__title.red{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffe9f4;color:#930149}.status__title.red img{filter:invert(21%) sepia(96%) saturate(2923%) hue-rotate(316deg) brightness(75%) contrast(116%)}.status__title.blue{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#e9f6ff;color:#006fb9}.status__title.blue img{filter:invert(27%) sepia(98%) saturate(1450%) hue-rotate(183deg) brightness(91%) contrast(102%)}.status__title.orange{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffece5;color:#983611}.status__title.orange img{filter:invert(23%) sepia(92%) saturate(1610%) hue-rotate(357deg) brightness(103%) contrast(94%)}.status__title__text{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin:24px 12px;text-align:left}.status__action{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:flex;width:100%;height:100%;align-items:center;justify-content:space-between;padding:0 12px;color:#1c1e39;font-weight:700;text-decoration:none}.status__action__icon{width:20px;height:20px}:host-context(.gio-menu__reduced) .status{display:none}\n"], components: [{ type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
5189
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLicenseExpirationNotificationComponent, decorators: [{
5190
+ type: Component,
5191
+ args: [{ selector: 'gio-license-expiration-notification', template: "<!--\n\n Copyright (C) 2024 The Gravitee team (http://gravitee.io)\n \n Licensed under the Apache License, Version 2.0 (the \"License\");\n you may not use this file except in compliance with the License.\n You may obtain a copy of the License at\n \n http://www.apache.org/licenses/LICENSE-2.0\n \n Unless required by applicable law or agreed to in writing, software\n distributed under the License is distributed on an \"AS IS\" BASIS,\n WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n See the License for the specific language governing permissions and\n limitations under the License.\n\n-->\n<div *ngIf=\"expirationDate && daysRemaining <= 30\" class=\"status mat-elevation-z2\" rel=\"noopener\">\n <div [ngClass]=\"'status__title ' + statusColor\">\n <div class=\"status__title__text\">\n {{ title }}\n <img src=\"assets/license-expiration-notification-background.svg\" />\n </div>\n </div>\n <a *ngIf=\"showCallToAction\" class=\"status__action\" [href]=\"link ?? 'https://www.gravitee.io/contact-us-license'\" target=\"_blank\">\n <div class=\"status__action__text\">{{ callToActionMessage ?? 'Contact Gravitee' }}</div>\n <mat-icon svgIcon=\"gio:right-circle\" class=\"status__action__icon\"></mat-icon>\n </a>\n</div>\n", styles: [".gio-top-bar-menu .gio-badge-accent{background-color:var(--gio-oem-palette--active, #e7e2fb);color:var(--gio-oem-palette--active-contrast, #100c27)}.status{position:relative;display:flex;width:192px;height:152px;flex-direction:column;padding:0;border-radius:4px;color:#100c27;border:none;background:white;text-decoration:none}.status--disabled{cursor:not-allowed}.status__sub-tile{height:56px;margin-top:16px}.status__title img{position:absolute;top:0;right:0}.status__title.red{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffe9f4;color:#930149}.status__title.red img{filter:invert(21%) sepia(96%) saturate(2923%) hue-rotate(316deg) brightness(75%) contrast(116%)}.status__title.blue{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#e9f6ff;color:#006fb9}.status__title.blue img{filter:invert(27%) sepia(98%) saturate(1450%) hue-rotate(183deg) brightness(91%) contrast(102%)}.status__title.orange{display:flex;width:inherit;flex:1 1 100%;align-items:center;border-radius:4px;background:#ffece5;color:#983611}.status__title.orange img{filter:invert(23%) sepia(92%) saturate(1610%) hue-rotate(357deg) brightness(103%) contrast(94%)}.status__title__text{font:600 16px/24px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:.4px;margin:24px 12px;text-align:left}.status__action{font:400 12px/16px Golos UI,Roboto,Helvetica Neue,sans-serif;letter-spacing:normal;display:flex;width:100%;height:100%;align-items:center;justify-content:space-between;padding:0 12px;color:#1c1e39;font-weight:700;text-decoration:none}.status__action__icon{width:20px;height:20px}:host-context(.gio-menu__reduced) .status{display:none}\n"] }]
5192
+ }], propDecorators: { expirationDate: [{
5193
+ type: Input
5194
+ }], showCallToAction: [{
5195
+ type: Input
5196
+ }], callToActionMessage: [{
5197
+ type: Input
5198
+ }], link: [{
5199
+ type: Input
5200
+ }], inError: [{
5201
+ type: Input
5202
+ }] } });
5203
+
5204
+ /*
5205
+ * Copyright (C) 2024 The Gravitee team (http://gravitee.io)
5206
+ *
5207
+ * Licensed under the Apache License, Version 2.0 (the "License");
5208
+ * you may not use this file except in compliance with the License.
5209
+ * You may obtain a copy of the License at
5210
+ *
5211
+ * http://www.apache.org/licenses/LICENSE-2.0
5212
+ *
5213
+ * Unless required by applicable law or agreed to in writing, software
5214
+ * distributed under the License is distributed on an "AS IS" BASIS,
5215
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5216
+ * See the License for the specific language governing permissions and
5217
+ * limitations under the License.
5218
+ */
5219
+ class GioLicenseExpirationNotificationModule {
5220
+ }
5221
+ GioLicenseExpirationNotificationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLicenseExpirationNotificationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
5222
+ GioLicenseExpirationNotificationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLicenseExpirationNotificationModule, declarations: [GioLicenseExpirationNotificationComponent], imports: [CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule], exports: [GioLicenseExpirationNotificationComponent] });
5223
+ GioLicenseExpirationNotificationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLicenseExpirationNotificationModule, imports: [[CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule]] });
5224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.3.12", ngImport: i0, type: GioLicenseExpirationNotificationModule, decorators: [{
5225
+ type: NgModule,
5226
+ args: [{
5227
+ imports: [CommonModule, MatButtonModule, MatTooltipModule, GioIconsModule],
5228
+ declarations: [GioLicenseExpirationNotificationComponent],
5229
+ exports: [GioLicenseExpirationNotificationComponent],
5230
+ }]
5231
+ }] });
5232
+
5233
+ /*
5234
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
5235
+ *
5236
+ * Licensed under the Apache License, Version 2.0 (the "License");
5237
+ * you may not use this file except in compliance with the License.
5238
+ * You may obtain a copy of the License at
5239
+ *
5240
+ * http://www.apache.org/licenses/LICENSE-2.0
5241
+ *
5242
+ * Unless required by applicable law or agreed to in writing, software
5243
+ * distributed under the License is distributed on an "AS IS" BASIS,
5244
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
5245
+ * See the License for the specific language governing permissions and
5246
+ * limitations under the License.
5247
+ */
5248
+ class GioLicenseExpirationNotificationHarness extends ComponentHarness {
5249
+ constructor() {
5250
+ super(...arguments);
5251
+ this.getTitleContainer = this.locatorFor('.status__title');
5252
+ this.getTitleMessage = this.locatorFor('.status__title__text');
5253
+ this.getCallToActionMessage = this.locatorFor('.status__action__text');
5254
+ this.getCallToActionLink = this.locatorFor('.status__action');
5255
+ }
5256
+ async getTitleText() {
5257
+ return this.getTitleMessage().then(el => el.text());
5258
+ }
5259
+ async isCallToActionVisible() {
5260
+ return this.getCallToActionLink()
5261
+ .then(_ => true)
5262
+ .catch(_ => false);
5263
+ }
5264
+ async getCallToActionText() {
5265
+ return this.getCallToActionMessage().then(el => el.text());
5266
+ }
5267
+ async getLink() {
5268
+ return this.getCallToActionLink().then(el => el.getAttribute('href'));
5269
+ }
5270
+ async isColor(color) {
5271
+ return this.getTitleContainer().then(el => el.hasClass(color));
5272
+ }
5273
+ }
5274
+ GioLicenseExpirationNotificationHarness.hostSelector = 'gio-license-expiration-notification';
5275
+
5136
5276
  /*
5137
5277
  * Copyright (C) 2023 The Gravitee team (http://gravitee.io)
5138
5278
  *
@@ -6764,5 +6904,5 @@ const computeStyleAndContrastByPrefix = (prefix, color) => {
6764
6904
  * Generated bundle index. Do not edit.
6765
6905
  */
6766
6906
 
6767
- export { ConfigureTestingGioMonacoEditor, GIO_DIALOG_WIDTH, GIO_FORM_FOCUS_INVALID_IGNORE_SELECTOR, GioAsciidoctorComponent, GioAsciidoctorModule, GioAsciidoctorService, GioAvatarComponent, GioAvatarModule, GioBannerActionDirective, GioBannerBodyDirective, GioBannerComponent, GioBannerErrorComponent, GioBannerInfoComponent, GioBannerModule, GioBannerSuccessComponent, GioBannerWarningComponent, GioBaseFormFocusInvalidDirective, GioBreadcrumbComponent, GioBreadcrumbItemDirective, GioBreadcrumbModule, GioButtonFocusInvalidButtonDirective, GioClipboardCopyIconComponent, GioClipboardCopyWrapperComponent, GioClipboardModule, GioConfirmAndValidateDialogComponent, GioConfirmAndValidateDialogHarness, GioConfirmAndValidateDialogModule, GioConfirmDialogComponent, GioConfirmDialogHarness, GioConfirmDialogModule, GioFormCronComponent, GioFormCronHarness, GioFormCronHintComponent, GioFormCronLabelComponent, GioFormCronModule, GioFormFilePickerAddButtonComponent, GioFormFilePickerComponent, GioFormFilePickerEmptyComponent, GioFormFilePickerInputHarness, GioFormFilePickerLabelComponent, GioFormFilePickerModule, GioFormFocusInvalidFormDirective, GioFormFocusInvalidIgnoreDirective, GioFormFocusInvalidModule, GioFormHeadersComponent, GioFormHeadersHarness, GioFormHeadersLabelComponent, GioFormHeadersModule, GioFormJsonSchemaComponent, GioFormJsonSchemaModule, GioFormLabelComponent, GioFormPrefixDirective, GioFormSlideToggleComponent, GioFormSlideToggleDirective, GioFormSlideToggleModule, GioFormTagsInputComponent, GioFormTagsInputHarness, GioFormTagsInputModule, GioIconsModule, GioLicenseDialogComponent, GioLicenseDialogModule, GioLicenseDirective, GioLicenseModule, GioLicenseService, GioLicenseTestingModule, GioLoaderComponent, GioLoaderModule, GioMatConfigModule, GioMenuComponent, GioMenuFooterComponent, GioMenuHeaderComponent, GioMenuItemComponent, GioMenuLicenseExpirationNotificationComponent, GioMenuListComponent, GioMenuModule, GioMenuSelectorComponent, GioMenuSelectorHarness, GioMenuService, GioMonacoEditorComponent, GioMonacoEditorFormFieldDirective, GioMonacoEditorHarness, GioMonacoEditorModule, GioPrismJsService, GioRadioButtonContentComponent, GioRadioButtonModule, GioRadioButtonSubitleComponent, GioRadioButtonTitleComponent, GioSafePipeModule, GioSaveBarComponent, GioSaveBarHarness, GioSaveBarModule, GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuModule, GioSubmenuTitleDirective, GioTopBarComponent, GioTopBarContentComponent, GioTopBarLinkComponent, GioTopBarLinkModule, GioTopBarMenuComponent, GioTopBarMenuModule, GioTopBarModule, LICENSE_CONFIGURATION_TESTING, NewFile, OEM_LICENSE_CONFIGURATION_TESTING, OEM_THEME_ARG_TYPES, SafePipe, computeStyles, computeStylesForStory };
6907
+ export { ConfigureTestingGioMonacoEditor, GIO_DIALOG_WIDTH, GIO_FORM_FOCUS_INVALID_IGNORE_SELECTOR, GioAsciidoctorComponent, GioAsciidoctorModule, GioAsciidoctorService, GioAvatarComponent, GioAvatarModule, GioBannerActionDirective, GioBannerBodyDirective, GioBannerComponent, GioBannerErrorComponent, GioBannerInfoComponent, GioBannerModule, GioBannerSuccessComponent, GioBannerWarningComponent, GioBaseFormFocusInvalidDirective, GioBreadcrumbComponent, GioBreadcrumbItemDirective, GioBreadcrumbModule, GioButtonFocusInvalidButtonDirective, GioClipboardCopyIconComponent, GioClipboardCopyWrapperComponent, GioClipboardModule, GioConfirmAndValidateDialogComponent, GioConfirmAndValidateDialogHarness, GioConfirmAndValidateDialogModule, GioConfirmDialogComponent, GioConfirmDialogHarness, GioConfirmDialogModule, GioFormCronComponent, GioFormCronHarness, GioFormCronHintComponent, GioFormCronLabelComponent, GioFormCronModule, GioFormFilePickerAddButtonComponent, GioFormFilePickerComponent, GioFormFilePickerEmptyComponent, GioFormFilePickerInputHarness, GioFormFilePickerLabelComponent, GioFormFilePickerModule, GioFormFocusInvalidFormDirective, GioFormFocusInvalidIgnoreDirective, GioFormFocusInvalidModule, GioFormHeadersComponent, GioFormHeadersHarness, GioFormHeadersLabelComponent, GioFormHeadersModule, GioFormJsonSchemaComponent, GioFormJsonSchemaModule, GioFormLabelComponent, GioFormPrefixDirective, GioFormSlideToggleComponent, GioFormSlideToggleDirective, GioFormSlideToggleModule, GioFormTagsInputComponent, GioFormTagsInputHarness, GioFormTagsInputModule, GioIconsModule, GioLicenseDialogComponent, GioLicenseDialogModule, GioLicenseDirective, GioLicenseExpirationNotificationComponent, GioLicenseExpirationNotificationHarness, GioLicenseExpirationNotificationModule, GioLicenseModule, GioLicenseService, GioLicenseTestingModule, GioLoaderComponent, GioLoaderModule, GioMatConfigModule, GioMenuComponent, GioMenuFooterComponent, GioMenuHeaderComponent, GioMenuItemComponent, GioMenuLicenseExpirationNotificationComponent, GioMenuListComponent, GioMenuModule, GioMenuSelectorComponent, GioMenuSelectorHarness, GioMenuService, GioMonacoEditorComponent, GioMonacoEditorFormFieldDirective, GioMonacoEditorHarness, GioMonacoEditorModule, GioPrismJsService, GioRadioButtonContentComponent, GioRadioButtonModule, GioRadioButtonSubitleComponent, GioRadioButtonTitleComponent, GioSafePipeModule, GioSaveBarComponent, GioSaveBarHarness, GioSaveBarModule, GioSubmenuComponent, GioSubmenuGroupComponent, GioSubmenuItemComponent, GioSubmenuModule, GioSubmenuTitleDirective, GioTopBarComponent, GioTopBarContentComponent, GioTopBarLinkComponent, GioTopBarLinkModule, GioTopBarMenuComponent, GioTopBarMenuModule, GioTopBarModule, LICENSE_CONFIGURATION_TESTING, NewFile, OEM_LICENSE_CONFIGURATION_TESTING, OEM_THEME_ARG_TYPES, SafePipe, computeStyles, computeStylesForStory };
6768
6908
  //# sourceMappingURL=gravitee-ui-particles-angular.mjs.map