@nova-ui/bits 12.0.27-4407 → 12.0.28-4464
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/nova-ui-bits.umd.js +98 -18
- package/bundles/nova-ui-bits.umd.js.map +1 -1
- package/common/directives/click-filter/click-filter.directive.d.ts +12 -0
- package/common/directives/click-filter/public-api.d.ts +5 -0
- package/common/directives/index.d.ts +1 -0
- package/common/directives/public-api.d.ts +1 -0
- package/esm2015/common/common.module.js +4 -1
- package/esm2015/common/directives/click-filter/click-filter.directive.js +48 -0
- package/esm2015/common/directives/click-filter/public-api.js +23 -0
- package/esm2015/common/directives/index.js +2 -1
- package/esm2015/common/directives/public-api.js +2 -1
- package/esm2015/lib/radio/radio-group.component.js +14 -19
- package/esm2015/public_api.js +2 -1
- package/fesm2015/nova-ui-bits.js +86 -20
- package/fesm2015/nova-ui-bits.js.map +1 -1
- package/lib/radio/radio-group.component.d.ts +4 -2
- package/nova-ui-bits.metadata.json +1 -1
- package/package.json +1 -1
- package/public_api.d.ts +1 -0
|
@@ -2802,6 +2802,84 @@
|
|
|
2802
2802
|
{ type: UtilService }
|
|
2803
2803
|
]; };
|
|
2804
2804
|
|
|
2805
|
+
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
2806
|
+
//
|
|
2807
|
+
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
2808
|
+
// of this software and associated documentation files (the "Software"), to
|
|
2809
|
+
// deal in the Software without restriction, including without limitation the
|
|
2810
|
+
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
|
2811
|
+
// sell copies of the Software, and to permit persons to whom the Software is
|
|
2812
|
+
// furnished to do so, subject to the following conditions:
|
|
2813
|
+
//
|
|
2814
|
+
// The above copyright notice and this permission notice shall be included in
|
|
2815
|
+
// all copies or substantial portions of the Software.
|
|
2816
|
+
//
|
|
2817
|
+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
2818
|
+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
2819
|
+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
2820
|
+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
2821
|
+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
2822
|
+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
2823
|
+
// THE SOFTWARE.
|
|
2824
|
+
var isTargetAnAnchor = function (event) { return event.target instanceof HTMLAnchorElement; };
|
|
2825
|
+
var isTargetNotAnAnchor = function (event) { return !isTargetAnAnchor(event); };
|
|
2826
|
+
var makePredicate = function (value) { return typeof value === "boolean" ? function () { return value; } : value; };
|
|
2827
|
+
|
|
2828
|
+
var ClickFilterDirective = /** @class */ (function () {
|
|
2829
|
+
function ClickFilterDirective() {
|
|
2830
|
+
this._cancelBubble = makePredicate(true);
|
|
2831
|
+
this._preventDefault = isTargetNotAnAnchor;
|
|
2832
|
+
this.passed$ = new i0.EventEmitter();
|
|
2833
|
+
this.canceled$ = new i0.EventEmitter();
|
|
2834
|
+
this.prevented$ = new i0.EventEmitter();
|
|
2835
|
+
}
|
|
2836
|
+
Object.defineProperty(ClickFilterDirective.prototype, "cancelBubble", {
|
|
2837
|
+
set: function (value) {
|
|
2838
|
+
this._cancelBubble = makePredicate(value !== null && value !== void 0 ? value : true);
|
|
2839
|
+
},
|
|
2840
|
+
enumerable: false,
|
|
2841
|
+
configurable: true
|
|
2842
|
+
});
|
|
2843
|
+
Object.defineProperty(ClickFilterDirective.prototype, "preventDefault", {
|
|
2844
|
+
set: function (value) {
|
|
2845
|
+
this._preventDefault = makePredicate(value !== null && value !== void 0 ? value : isTargetNotAnAnchor);
|
|
2846
|
+
},
|
|
2847
|
+
enumerable: false,
|
|
2848
|
+
configurable: true
|
|
2849
|
+
});
|
|
2850
|
+
ClickFilterDirective.prototype.handleEvent = function (event) {
|
|
2851
|
+
var passed = true;
|
|
2852
|
+
if (this._cancelBubble(event)) {
|
|
2853
|
+
event.stopPropagation();
|
|
2854
|
+
event.stopImmediatePropagation();
|
|
2855
|
+
this.canceled$.emit(event);
|
|
2856
|
+
passed = false;
|
|
2857
|
+
}
|
|
2858
|
+
if (this._preventDefault(event)) {
|
|
2859
|
+
event.preventDefault();
|
|
2860
|
+
this.prevented$.emit(event);
|
|
2861
|
+
passed = false;
|
|
2862
|
+
}
|
|
2863
|
+
if (passed) {
|
|
2864
|
+
this.passed$.emit(event);
|
|
2865
|
+
}
|
|
2866
|
+
};
|
|
2867
|
+
return ClickFilterDirective;
|
|
2868
|
+
}());
|
|
2869
|
+
ClickFilterDirective.decorators = [
|
|
2870
|
+
{ type: i0.Directive, args: [{
|
|
2871
|
+
selector: "[nuiClickFilter]",
|
|
2872
|
+
},] }
|
|
2873
|
+
];
|
|
2874
|
+
ClickFilterDirective.propDecorators = {
|
|
2875
|
+
cancelBubble: [{ type: i0.Input }],
|
|
2876
|
+
preventDefault: [{ type: i0.Input }],
|
|
2877
|
+
passed$: [{ type: i0.Output }],
|
|
2878
|
+
canceled$: [{ type: i0.Output }],
|
|
2879
|
+
prevented$: [{ type: i0.Output }],
|
|
2880
|
+
handleEvent: [{ type: i0.HostListener, args: ["click", ["$event"],] }]
|
|
2881
|
+
};
|
|
2882
|
+
|
|
2805
2883
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
2806
2884
|
/**
|
|
2807
2885
|
*
|
|
@@ -4314,6 +4392,7 @@
|
|
|
4314
4392
|
{ provide: imagesPresetToken, useValue: ɵ2 },
|
|
4315
4393
|
],
|
|
4316
4394
|
declarations: [
|
|
4395
|
+
ClickFilterDirective,
|
|
4317
4396
|
ClickInterceptorDirective,
|
|
4318
4397
|
ClipboardDirective,
|
|
4319
4398
|
DraggableDirective,
|
|
@@ -4330,6 +4409,7 @@
|
|
|
4330
4409
|
],
|
|
4331
4410
|
exports: [
|
|
4332
4411
|
i1.CommonModule,
|
|
4412
|
+
ClickFilterDirective,
|
|
4333
4413
|
ClickInterceptorDirective,
|
|
4334
4414
|
ClipboardDirective,
|
|
4335
4415
|
DraggableDirective,
|
|
@@ -14454,28 +14534,23 @@
|
|
|
14454
14534
|
enumerable: false,
|
|
14455
14535
|
configurable: true
|
|
14456
14536
|
});
|
|
14457
|
-
RadioGroupComponent.prototype.
|
|
14537
|
+
RadioGroupComponent.prototype.registerChild = function (child) {
|
|
14458
14538
|
var _this = this;
|
|
14459
|
-
this.
|
|
14460
|
-
|
|
14461
|
-
|
|
14462
|
-
|
|
14463
|
-
|
|
14464
|
-
_this.setChildDisabled(child);
|
|
14465
|
-
});
|
|
14539
|
+
this.renderer.setAttribute(child.inputViewContainer.element.nativeElement, "name", this.name);
|
|
14540
|
+
this.subscriptions.push(this.subscribeToRadioEvent(child));
|
|
14541
|
+
// timeout to prevent "expression changed after it has been checked" error
|
|
14542
|
+
setTimeout(function () {
|
|
14543
|
+
_this.setChildDisabled(child);
|
|
14466
14544
|
});
|
|
14545
|
+
};
|
|
14546
|
+
RadioGroupComponent.prototype.ngAfterContentInit = function () {
|
|
14547
|
+
var _this = this;
|
|
14548
|
+
this.children.toArray().forEach(function (child) { return _this.registerChild(child); });
|
|
14467
14549
|
this.children.changes.subscribe(function (radioComponentQueryList) {
|
|
14468
14550
|
_this.subscriptions.forEach(function (sub) { return sub.unsubscribe(); });
|
|
14469
14551
|
radioComponentQueryList
|
|
14470
14552
|
.toArray()
|
|
14471
|
-
.forEach(function (
|
|
14472
|
-
_this.renderer.setAttribute(radio.inputViewContainer.element.nativeElement, "name", _this.name);
|
|
14473
|
-
_this.subscriptions.push(_this.subscribeToRadioEvent(radio));
|
|
14474
|
-
// timeout to prevent "expression changed after it has been checked" error
|
|
14475
|
-
setTimeout(function () {
|
|
14476
|
-
_this.setChildDisabled(radio);
|
|
14477
|
-
});
|
|
14478
|
-
});
|
|
14553
|
+
.forEach(function (child) { return _this.registerChild(child); });
|
|
14479
14554
|
});
|
|
14480
14555
|
};
|
|
14481
14556
|
RadioGroupComponent.prototype.onChange = function (value) { };
|
|
@@ -14646,7 +14721,7 @@
|
|
|
14646
14721
|
RadioComponent.decorators = [
|
|
14647
14722
|
{ type: i0.Component, args: [{
|
|
14648
14723
|
selector: "nui-radio",
|
|
14649
|
-
template: "<div\n class=\"nui-radio\"\n [class.nui-radio--empty]=\"radioTranscludeIsEmpty && !hint\"\n>\n <label\n class=\"nui-radio__label\"\n [class.nui-radio__label--translucent]=\"disabled\"\n (mouseenter)=\"hoverHandler()\"\n (mouseleave)=\"hoverHandler()\"\n >\n <div class=\"nui-radio__content\">\n <input\n #inputViewContainer\n class=\"nui-radio__input\"\n type=\"radio\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n (change)=\"changeHandler()\"\n (click)=\"onInputClick($event)\"\n />\n\n <div\n class=\"nui-radio__mark\"\n [class.nui-radio__mark--disabled]=\"disabled\"\n >\n <div class=\"nui-radio__glyph\"></div>\n </div>\n\n <div #radioTransclude class=\"nui-radio__transclude\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <
|
|
14724
|
+
template: "<div\n class=\"nui-radio\"\n [class.nui-radio--empty]=\"radioTranscludeIsEmpty && !hint\"\n>\n <label\n class=\"nui-radio__label\"\n [class.nui-radio__label--translucent]=\"disabled\"\n (mouseenter)=\"hoverHandler()\"\n (mouseleave)=\"hoverHandler()\"\n >\n <div class=\"nui-radio__content\">\n <input\n #inputViewContainer\n class=\"nui-radio__input\"\n type=\"radio\"\n [value]=\"value\"\n [checked]=\"checked\"\n [disabled]=\"disabled\"\n [attr.aria-label]=\"ariaLabel\"\n (change)=\"changeHandler()\"\n (click)=\"onInputClick($event)\"\n />\n\n <div\n class=\"nui-radio__mark\"\n [class.nui-radio__mark--disabled]=\"disabled\"\n >\n <div class=\"nui-radio__glyph\"></div>\n </div>\n\n <div #radioTransclude class=\"nui-radio__transclude\">\n <ng-content></ng-content>\n </div>\n </div>\n\n <div #hintDiv class=\"nui-radio__hint nui-help-hint\">\n <ng-content select=\"[hint]\"></ng-content>\n <ng-container *ngIf=\"!!hint\">\n {{ hint }}\n </ng-container>\n </div>\n </label>\n</div>\n",
|
|
14650
14725
|
encapsulation: i0.ViewEncapsulation.None,
|
|
14651
14726
|
host: {
|
|
14652
14727
|
"[class.nui-radio--hovered]": "hovered",
|
|
@@ -14670,7 +14745,8 @@
|
|
|
14670
14745
|
disabled: [{ type: i0.Input }],
|
|
14671
14746
|
ariaLabel: [{ type: i0.Input }],
|
|
14672
14747
|
inputViewContainer: [{ type: i0.ViewChild, args: ["inputViewContainer", { static: true, read: i0.ViewContainerRef },] }],
|
|
14673
|
-
radioTransclude: [{ type: i0.ViewChild, args: ["radioTransclude", { static: true },] }]
|
|
14748
|
+
radioTransclude: [{ type: i0.ViewChild, args: ["radioTransclude", { static: true },] }],
|
|
14749
|
+
contentHints: [{ type: i0.ContentChildren, args: ["[nui-radio-hint]",] }]
|
|
14674
14750
|
};
|
|
14675
14751
|
|
|
14676
14752
|
// © 2022 SolarWinds Worldwide, LLC. All rights reserved.
|
|
@@ -26498,6 +26574,7 @@
|
|
|
26498
26574
|
exports.ChipComponent = ChipComponent;
|
|
26499
26575
|
exports.ChipsComponent = ChipsComponent;
|
|
26500
26576
|
exports.ChipsOverflowComponent = ChipsOverflowComponent;
|
|
26577
|
+
exports.ClickFilterDirective = ClickFilterDirective;
|
|
26501
26578
|
exports.ClickInterceptorDirective = ClickInterceptorDirective;
|
|
26502
26579
|
exports.ClientSideDataSource = ClientSideDataSource;
|
|
26503
26580
|
exports.ClipboardDirective = ClipboardDirective;
|
|
@@ -26748,6 +26825,9 @@
|
|
|
26748
26825
|
exports.getOverlayPositions = getOverlayPositions;
|
|
26749
26826
|
exports.imagesPresetToken = imagesPresetToken;
|
|
26750
26827
|
exports.immutableSet = immutableSet;
|
|
26828
|
+
exports.isTargetAnAnchor = isTargetAnAnchor;
|
|
26829
|
+
exports.isTargetNotAnAnchor = isTargetNotAnAnchor;
|
|
26830
|
+
exports.makePredicate = makePredicate;
|
|
26751
26831
|
exports.nameof = nameof;
|
|
26752
26832
|
exports.removeErrors = removeErrors;
|
|
26753
26833
|
exports.resizeDirectionHelpers = resizeDirectionHelpers;
|