@gravitee/ui-particles-angular 4.10.3-fix-save-bar-harness-e4ff928 → 4.10.3-fix-save-bar-harness-c82f8ab

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.
@@ -40,169 +40,6 @@
40
40
  var i10__namespace = /*#__PURE__*/_interopNamespace(i10);
41
41
  var i6__namespace$2 = /*#__PURE__*/_interopNamespace(i6$2);
42
42
 
43
- /*
44
- * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
45
- *
46
- * Licensed under the Apache License, Version 2.0 (the "License");
47
- * you may not use this file except in compliance with the License.
48
- * You may obtain a copy of the License at
49
- *
50
- * http://www.apache.org/licenses/LICENSE-2.0
51
- *
52
- * Unless required by applicable law or agreed to in writing, software
53
- * distributed under the License is distributed on an "AS IS" BASIS,
54
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
55
- * See the License for the specific language governing permissions and
56
- * limitations under the License.
57
- */
58
- var GioSaveBarComponent = /** @class */ (function () {
59
- function GioSaveBarComponent() {
60
- this.isSubmitted = false;
61
- this.opened = false;
62
- /**
63
- * When true, the submit button have invalidate display
64
- * And on submit clicked the output event is emit on submitInvalidState (and not on submit)
65
- */
66
- this.invalidState = false;
67
- this.creationMode = false;
68
- this.resetClicked = new i0.EventEmitter();
69
- this.submitted = new i0.EventEmitter();
70
- this.submittedInvalidState = new i0.EventEmitter();
71
- }
72
- Object.defineProperty(GioSaveBarComponent.prototype, "isSticky", {
73
- get: function () {
74
- return !this.creationMode;
75
- },
76
- enumerable: false,
77
- configurable: true
78
- });
79
- Object.defineProperty(GioSaveBarComponent.prototype, "isOpen", {
80
- get: function () {
81
- if (this.creationMode) {
82
- return true;
83
- }
84
- if (this.form) {
85
- return this.form.dirty;
86
- }
87
- return this.opened;
88
- },
89
- enumerable: false,
90
- configurable: true
91
- });
92
- GioSaveBarComponent.prototype.onResetClicked = function () {
93
- if (this.form) {
94
- this.form.reset(this.formInitialValues);
95
- this.form.markAsPristine();
96
- }
97
- this.resetClicked.emit();
98
- };
99
- GioSaveBarComponent.prototype.onSubmitClicked = function ($event) {
100
- var _this = this;
101
- var _a;
102
- // eslint-disable-next-line no-console
103
- console.log($event);
104
- if ((this.form && this.form.invalid) || this.invalidState) {
105
- (_a = this.form) === null || _a === void 0 ? void 0 : _a.markAllAsTouched();
106
- this.submittedInvalidState.emit();
107
- return;
108
- }
109
- if (!this.isSubmitted) {
110
- this.submitted.emit();
111
- this.isSubmitted = true;
112
- rxjs.timer(2000).subscribe(function () { return (_this.isSubmitted = false); });
113
- }
114
- };
115
- return GioSaveBarComponent;
116
- }());
117
- GioSaveBarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
118
- GioSaveBarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: GioSaveBarComponent, selector: "gio-save-bar", inputs: { opened: "opened", invalidState: "invalidState", creationMode: "creationMode", form: "form", formInitialValues: "formInitialValues" }, outputs: { resetClicked: "resetClicked", submitted: "submitted", submittedInvalidState: "submittedInvalidState" }, host: { properties: { "class.save-bar-sticky": "this.isSticky", "class.is-open": "this.isOpen" } }, ngImport: i0__namespace, template: "<!--\n\n Copyright (C) 2015 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\n<div *ngIf=\"isOpen\" [@slideUpDown] [@.disabled]=\"creationMode\">\n <mat-card class=\"save-bar__content\" [class.mat-elevation-z3]=\"creationMode\" [class.mat-elevation-z6]=\"!creationMode\">\n <div class=\"save-bar__content__label\">{{ creationMode ? '' : 'You have unsaved changes' }}</div>\n <div>\n <button *ngIf=\"!creationMode\" class=\"save-bar__content__reset-button\" mat-button type=\"button\" (click)=\"onResetClicked()\">\n Discard\n </button>\n <button\n class=\"save-bar__content__submit-button\"\n [class.invalid]=\"(form && form.invalid) || invalidState\"\n mat-flat-button\n color=\"primary\"\n [type]=\"form ? 'submit' : 'button'\"\n (click)=\"onSubmitClicked($event)\"\n >\n {{ creationMode ? 'Create' : 'Save' }}\n </button>\n </div>\n </mat-card>\n</div>\n", styles: [":host{z-index:1000;display:block;height:68px;margin-top:32px;visibility:hidden}:host.is-open{visibility:visible}:host(.save-bar-sticky){position:sticky;bottom:0;margin-right:-16px;margin-left:-16px}.save-bar__content{display:flex;height:100%;align-items:center;justify-content:space-between;padding:16px 24px}.save-bar__content__label{font:400 14px / 20px \"Golos UI\",Roboto,\"Helvetica Neue\",sans-serif;letter-spacing:.4px}.save-bar__content__reset-button{margin-right:16px}.save-bar__content__submit-button.invalid{background-color:#d6ffff;color:#000}.save-bar__content__submit-button.invalid:hover:enabled{background-color:#099;color:#fff}\n"], components: [{ type: i1__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
119
- animations.trigger('slideUpDown', [
120
- animations.transition(':enter', [
121
- animations.style({ transform: 'translateY(40vh)', opacity: '0' }),
122
- animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(0)', opacity: '1' })),
123
- ]),
124
- animations.transition(':leave', [
125
- animations.style({ transform: 'translateY(0)', opacity: '1' }),
126
- animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(40vh)', opacity: '0' })),
127
- ]),
128
- ]),
129
- ] });
130
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarComponent, decorators: [{
131
- type: i0.Component,
132
- args: [{
133
- selector: 'gio-save-bar',
134
- templateUrl: './gio-save-bar.component.html',
135
- styleUrls: ['./gio-save-bar.component.scss'],
136
- animations: [
137
- animations.trigger('slideUpDown', [
138
- animations.transition(':enter', [
139
- animations.style({ transform: 'translateY(40vh)', opacity: '0' }),
140
- animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(0)', opacity: '1' })),
141
- ]),
142
- animations.transition(':leave', [
143
- animations.style({ transform: 'translateY(0)', opacity: '1' }),
144
- animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(40vh)', opacity: '0' })),
145
- ]),
146
- ]),
147
- ],
148
- }]
149
- }], propDecorators: { isSticky: [{
150
- type: i0.HostBinding,
151
- args: ['class.save-bar-sticky']
152
- }], opened: [{
153
- type: i0.Input
154
- }], invalidState: [{
155
- type: i0.Input
156
- }], creationMode: [{
157
- type: i0.Input
158
- }], form: [{
159
- type: i0.Input
160
- }], formInitialValues: [{
161
- type: i0.Input
162
- }], resetClicked: [{
163
- type: i0.Output
164
- }], submitted: [{
165
- type: i0.Output
166
- }], submittedInvalidState: [{
167
- type: i0.Output
168
- }], isOpen: [{
169
- type: i0.HostBinding,
170
- args: ['class.is-open']
171
- }] } });
172
-
173
- /*
174
- * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
175
- *
176
- * Licensed under the Apache License, Version 2.0 (the "License");
177
- * you may not use this file except in compliance with the License.
178
- * You may obtain a copy of the License at
179
- *
180
- * http://www.apache.org/licenses/LICENSE-2.0
181
- *
182
- * Unless required by applicable law or agreed to in writing, software
183
- * distributed under the License is distributed on an "AS IS" BASIS,
184
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
185
- * See the License for the specific language governing permissions and
186
- * limitations under the License.
187
- */
188
- var GioSaveBarModule = /** @class */ (function () {
189
- function GioSaveBarModule() {
190
- }
191
- return GioSaveBarModule;
192
- }());
193
- GioSaveBarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
194
- GioSaveBarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, declarations: [GioSaveBarComponent], imports: [i2$1.CommonModule, i1.MatCardModule, i2.MatButtonModule], exports: [GioSaveBarComponent] });
195
- GioSaveBarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, imports: [[i2$1.CommonModule, i1.MatCardModule, i2.MatButtonModule]] });
196
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, decorators: [{
197
- type: i0.NgModule,
198
- args: [{
199
- imports: [i2$1.CommonModule, i1.MatCardModule, i2.MatButtonModule],
200
- declarations: [GioSaveBarComponent],
201
- exports: [GioSaveBarComponent],
202
- entryComponents: [GioSaveBarComponent],
203
- }]
204
- }] });
205
-
206
43
  /*! *****************************************************************************
207
44
  Copyright (c) Microsoft Corporation.
208
45
 
@@ -521,6 +358,163 @@
521
358
  return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
522
359
  }
523
360
 
361
+ var GioSaveBarSubmitEvent = /** @class */ (function (_super) {
362
+ __extends(GioSaveBarSubmitEvent, _super);
363
+ function GioSaveBarSubmitEvent() {
364
+ return _super !== null && _super.apply(this, arguments) || this;
365
+ }
366
+ return GioSaveBarSubmitEvent;
367
+ }(Event));
368
+ var GioSaveBarComponent = /** @class */ (function () {
369
+ function GioSaveBarComponent() {
370
+ this.isSubmitted = false;
371
+ this.opened = false;
372
+ /**
373
+ * When true, the submit button have invalidate display
374
+ * And on submit clicked the output event is emit on submitInvalidState (and not on submit)
375
+ */
376
+ this.invalidState = false;
377
+ this.creationMode = false;
378
+ this.resetClicked = new i0.EventEmitter();
379
+ this.submitted = new i0.EventEmitter();
380
+ this.submittedInvalidState = new i0.EventEmitter();
381
+ }
382
+ Object.defineProperty(GioSaveBarComponent.prototype, "isSticky", {
383
+ get: function () {
384
+ return !this.creationMode;
385
+ },
386
+ enumerable: false,
387
+ configurable: true
388
+ });
389
+ Object.defineProperty(GioSaveBarComponent.prototype, "isOpen", {
390
+ get: function () {
391
+ if (this.creationMode) {
392
+ return true;
393
+ }
394
+ if (this.form) {
395
+ return this.form.dirty;
396
+ }
397
+ return this.opened;
398
+ },
399
+ enumerable: false,
400
+ configurable: true
401
+ });
402
+ GioSaveBarComponent.prototype.onResetClicked = function () {
403
+ if (this.form) {
404
+ this.form.reset(this.formInitialValues);
405
+ this.form.markAsPristine();
406
+ }
407
+ this.resetClicked.emit();
408
+ };
409
+ GioSaveBarComponent.prototype.onSubmitClicked = function ($event) {
410
+ var _this = this;
411
+ var _a;
412
+ if ((this.form && this.form.invalid) || this.invalidState) {
413
+ (_a = this.form) === null || _a === void 0 ? void 0 : _a.markAllAsTouched();
414
+ this.submittedInvalidState.emit();
415
+ return;
416
+ }
417
+ if ($event.force) {
418
+ this.submitted.emit();
419
+ return;
420
+ }
421
+ if (!this.isSubmitted) {
422
+ this.submitted.emit();
423
+ this.isSubmitted = true;
424
+ rxjs.timer(2000).subscribe(function () { return (_this.isSubmitted = false); });
425
+ }
426
+ };
427
+ return GioSaveBarComponent;
428
+ }());
429
+ GioSaveBarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
430
+ GioSaveBarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.15", type: GioSaveBarComponent, selector: "gio-save-bar", inputs: { opened: "opened", invalidState: "invalidState", creationMode: "creationMode", form: "form", formInitialValues: "formInitialValues" }, outputs: { resetClicked: "resetClicked", submitted: "submitted", submittedInvalidState: "submittedInvalidState" }, host: { properties: { "class.save-bar-sticky": "this.isSticky", "class.is-open": "this.isOpen" } }, ngImport: i0__namespace, template: "<!--\n\n Copyright (C) 2015 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\n<div *ngIf=\"isOpen\" [@slideUpDown] [@.disabled]=\"creationMode\">\n <mat-card class=\"save-bar__content\" [class.mat-elevation-z3]=\"creationMode\" [class.mat-elevation-z6]=\"!creationMode\">\n <div class=\"save-bar__content__label\">{{ creationMode ? '' : 'You have unsaved changes' }}</div>\n <div>\n <button *ngIf=\"!creationMode\" class=\"save-bar__content__reset-button\" mat-button type=\"button\" (click)=\"onResetClicked()\">\n Discard\n </button>\n <button\n class=\"save-bar__content__submit-button\"\n [class.invalid]=\"(form && form.invalid) || invalidState\"\n mat-flat-button\n color=\"primary\"\n [type]=\"form ? 'submit' : 'button'\"\n (click)=\"onSubmitClicked($event)\"\n >\n {{ creationMode ? 'Create' : 'Save' }}\n </button>\n </div>\n </mat-card>\n</div>\n", styles: [":host{z-index:1000;display:block;height:68px;margin-top:32px;visibility:hidden}:host.is-open{visibility:visible}:host(.save-bar-sticky){position:sticky;bottom:0;margin-right:-16px;margin-left:-16px}.save-bar__content{display:flex;height:100%;align-items:center;justify-content:space-between;padding:16px 24px}.save-bar__content__label{font:400 14px / 20px \"Golos UI\",Roboto,\"Helvetica Neue\",sans-serif;letter-spacing:.4px}.save-bar__content__reset-button{margin-right:16px}.save-bar__content__submit-button.invalid{background-color:#d6ffff;color:#000}.save-bar__content__submit-button.invalid:hover:enabled{background-color:#099;color:#fff}\n"], components: [{ type: i1__namespace.MatCard, selector: "mat-card", exportAs: ["matCard"] }, { type: i2__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i2__namespace$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [
431
+ animations.trigger('slideUpDown', [
432
+ animations.transition(':enter', [
433
+ animations.style({ transform: 'translateY(40vh)', opacity: '0' }),
434
+ animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(0)', opacity: '1' })),
435
+ ]),
436
+ animations.transition(':leave', [
437
+ animations.style({ transform: 'translateY(0)', opacity: '1' }),
438
+ animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(40vh)', opacity: '0' })),
439
+ ]),
440
+ ]),
441
+ ] });
442
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarComponent, decorators: [{
443
+ type: i0.Component,
444
+ args: [{
445
+ selector: 'gio-save-bar',
446
+ templateUrl: './gio-save-bar.component.html',
447
+ styleUrls: ['./gio-save-bar.component.scss'],
448
+ animations: [
449
+ animations.trigger('slideUpDown', [
450
+ animations.transition(':enter', [
451
+ animations.style({ transform: 'translateY(40vh)', opacity: '0' }),
452
+ animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(0)', opacity: '1' })),
453
+ ]),
454
+ animations.transition(':leave', [
455
+ animations.style({ transform: 'translateY(0)', opacity: '1' }),
456
+ animations.animate('300ms cubic-bezier(0.4, 0.0, 0.2, 1)', animations.style({ transform: 'translateY(40vh)', opacity: '0' })),
457
+ ]),
458
+ ]),
459
+ ],
460
+ }]
461
+ }], propDecorators: { isSticky: [{
462
+ type: i0.HostBinding,
463
+ args: ['class.save-bar-sticky']
464
+ }], opened: [{
465
+ type: i0.Input
466
+ }], invalidState: [{
467
+ type: i0.Input
468
+ }], creationMode: [{
469
+ type: i0.Input
470
+ }], form: [{
471
+ type: i0.Input
472
+ }], formInitialValues: [{
473
+ type: i0.Input
474
+ }], resetClicked: [{
475
+ type: i0.Output
476
+ }], submitted: [{
477
+ type: i0.Output
478
+ }], submittedInvalidState: [{
479
+ type: i0.Output
480
+ }], isOpen: [{
481
+ type: i0.HostBinding,
482
+ args: ['class.is-open']
483
+ }] } });
484
+
485
+ /*
486
+ * Copyright (C) 2015 The Gravitee team (http://gravitee.io)
487
+ *
488
+ * Licensed under the Apache License, Version 2.0 (the "License");
489
+ * you may not use this file except in compliance with the License.
490
+ * You may obtain a copy of the License at
491
+ *
492
+ * http://www.apache.org/licenses/LICENSE-2.0
493
+ *
494
+ * Unless required by applicable law or agreed to in writing, software
495
+ * distributed under the License is distributed on an "AS IS" BASIS,
496
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
497
+ * See the License for the specific language governing permissions and
498
+ * limitations under the License.
499
+ */
500
+ var GioSaveBarModule = /** @class */ (function () {
501
+ function GioSaveBarModule() {
502
+ }
503
+ return GioSaveBarModule;
504
+ }());
505
+ GioSaveBarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
506
+ GioSaveBarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, declarations: [GioSaveBarComponent], imports: [i2$1.CommonModule, i1.MatCardModule, i2.MatButtonModule], exports: [GioSaveBarComponent] });
507
+ GioSaveBarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, imports: [[i2$1.CommonModule, i1.MatCardModule, i2.MatButtonModule]] });
508
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: GioSaveBarModule, decorators: [{
509
+ type: i0.NgModule,
510
+ args: [{
511
+ imports: [i2$1.CommonModule, i1.MatCardModule, i2.MatButtonModule],
512
+ declarations: [GioSaveBarComponent],
513
+ exports: [GioSaveBarComponent],
514
+ entryComponents: [GioSaveBarComponent],
515
+ }]
516
+ }] });
517
+
524
518
  var GioSaveBarHarness = /** @class */ (function (_super) {
525
519
  __extends(GioSaveBarHarness, _super);
526
520
  function GioSaveBarHarness() {
@@ -3461,6 +3455,7 @@
3461
3455
  exports.GioSaveBarComponent = GioSaveBarComponent;
3462
3456
  exports.GioSaveBarHarness = GioSaveBarHarness;
3463
3457
  exports.GioSaveBarModule = GioSaveBarModule;
3458
+ exports.GioSaveBarSubmitEvent = GioSaveBarSubmitEvent;
3464
3459
  exports.GioSubmenuComponent = GioSubmenuComponent;
3465
3460
  exports.GioSubmenuGroupComponent = GioSubmenuGroupComponent;
3466
3461
  exports.GioSubmenuItemComponent = GioSubmenuItemComponent;