monkey-front-core 0.0.34 → 0.0.35
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/monkey-front-core.umd.js +87 -9
- package/bundles/monkey-front-core.umd.js.map +1 -1
- package/esm2015/lib/core/directives/index.js +2 -1
- package/esm2015/lib/core/directives/monkeyecx-directives-module.js +6 -1
- package/esm2015/lib/core/directives/monkeyecx-feature-directive.js +66 -0
- package/esm2015/lib/core/directives/monkeyecx-format-upper.js +1 -1
- package/esm2015/lib/core/directives/monkeyecx-only-alpha-numeric-directive.js +1 -1
- package/esm2015/lib/core/directives/monkeyecx-only-number-directive.js +1 -1
- package/esm2015/lib/core/directives/monkeyecx-security-directive.js +1 -1
- package/esm2015/lib/core/directives/monkeyecx-tooltip-directive.js +20 -10
- package/fesm2015/monkey-front-core.js +86 -12
- package/fesm2015/monkey-front-core.js.map +1 -1
- package/lib/core/directives/index.d.ts +1 -0
- package/lib/core/directives/monkeyecx-directives-module.d.ts +7 -6
- package/lib/core/directives/monkeyecx-feature-directive.d.ts +17 -0
- package/lib/core/directives/monkeyecx-tooltip-directive.d.ts +2 -1
- package/monkey-front-core-0.0.35.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.34.tgz +0 -0
|
@@ -3145,6 +3145,7 @@
|
|
|
3145
3145
|
function MonkeyEcxTooltipDirective(el, renderer) {
|
|
3146
3146
|
this.el = el;
|
|
3147
3147
|
this.renderer = renderer;
|
|
3148
|
+
this.enableToShow = true;
|
|
3148
3149
|
this.offset = 10;
|
|
3149
3150
|
// not to do
|
|
3150
3151
|
}
|
|
@@ -3164,12 +3165,20 @@
|
|
|
3164
3165
|
}
|
|
3165
3166
|
};
|
|
3166
3167
|
MonkeyEcxTooltipDirective.prototype.show = function () {
|
|
3167
|
-
this
|
|
3168
|
-
this.
|
|
3169
|
-
|
|
3168
|
+
var _this = this;
|
|
3169
|
+
if (this.enableToShow) {
|
|
3170
|
+
this.create();
|
|
3171
|
+
this.setPosition();
|
|
3172
|
+
this.renderer.addClass(this.tooltip, 'monkeyecx-tooltip-show');
|
|
3173
|
+
setTimeout(function () {
|
|
3174
|
+
_this.hide();
|
|
3175
|
+
}, 5000);
|
|
3176
|
+
}
|
|
3170
3177
|
};
|
|
3171
3178
|
MonkeyEcxTooltipDirective.prototype.hide = function () {
|
|
3172
|
-
|
|
3179
|
+
if (!this.tooltip)
|
|
3180
|
+
return;
|
|
3181
|
+
this.renderer.removeClass(this.tooltip, 'monkeyecx-tooltip-show');
|
|
3173
3182
|
this.renderer.removeChild(document.body, this.tooltip);
|
|
3174
3183
|
this.tooltip = null;
|
|
3175
3184
|
};
|
|
@@ -3179,19 +3188,19 @@
|
|
|
3179
3188
|
if (this.tooltipTitle) {
|
|
3180
3189
|
var tooltipTitleElement = document.createElement('span');
|
|
3181
3190
|
tooltipTitleElement.innerText = "" + this.tooltipTitle;
|
|
3182
|
-
tooltipTitleElement.className = '
|
|
3191
|
+
tooltipTitleElement.className = 'monkeyecx-tooltip-title';
|
|
3183
3192
|
tooltipElement.appendChild(tooltipTitleElement);
|
|
3184
3193
|
}
|
|
3185
3194
|
if (this.tooltipText) {
|
|
3186
3195
|
var tooltipTextElement = document.createElement('span');
|
|
3187
3196
|
tooltipTextElement.innerText = "" + this.tooltipText;
|
|
3188
|
-
tooltipTextElement.className = '
|
|
3197
|
+
tooltipTextElement.className = 'monkeyecx-tooltip-description';
|
|
3189
3198
|
tooltipElement.appendChild(tooltipTextElement);
|
|
3190
3199
|
}
|
|
3191
3200
|
this.renderer.appendChild(this.tooltip, tooltipElement);
|
|
3192
3201
|
this.renderer.appendChild(document.body, this.tooltip);
|
|
3193
|
-
this.renderer.addClass(this.tooltip, '
|
|
3194
|
-
this.renderer.addClass(this.tooltip, "
|
|
3202
|
+
this.renderer.addClass(this.tooltip, 'monkeyecx-tooltip');
|
|
3203
|
+
this.renderer.addClass(this.tooltip, "monkeyecx-tooltip-" + this.tooltipPosition);
|
|
3195
3204
|
this.renderer.setStyle(this.tooltip, '-webkit-transition', "opacity " + this.tooltipDelay + "ms");
|
|
3196
3205
|
this.renderer.setStyle(this.tooltip, '-moz-transition', "opacity " + this.tooltipDelay + "ms");
|
|
3197
3206
|
this.renderer.setStyle(this.tooltip, '-o-transition', "opacity " + this.tooltipDelay + "ms");
|
|
@@ -3225,7 +3234,7 @@
|
|
|
3225
3234
|
return MonkeyEcxTooltipDirective;
|
|
3226
3235
|
}());
|
|
3227
3236
|
MonkeyEcxTooltipDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTooltipDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
3228
|
-
MonkeyEcxTooltipDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxTooltipDirective, selector: "[monkeyecxTooltip]", inputs: { tooltipDelay: "tooltipDelay", tooltipPosition: "tooltipPosition", tooltipText: "tooltipText", tooltipTitle: "tooltipTitle" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "clickout()" } }, ngImport: i0__namespace });
|
|
3237
|
+
MonkeyEcxTooltipDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyEcxTooltipDirective, selector: "[monkeyecxTooltip]", inputs: { tooltipDelay: "tooltipDelay", tooltipPosition: "tooltipPosition", tooltipText: "tooltipText", tooltipTitle: "tooltipTitle", enableToShow: "enableToShow" }, host: { listeners: { "mouseenter": "onMouseEnter()", "mouseleave": "onMouseLeave()", "click": "clickout()" } }, ngImport: i0__namespace });
|
|
3229
3238
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxTooltipDirective, decorators: [{
|
|
3230
3239
|
type: i0.Directive,
|
|
3231
3240
|
args: [{
|
|
@@ -3239,6 +3248,8 @@
|
|
|
3239
3248
|
type: i0.Input
|
|
3240
3249
|
}], tooltipTitle: [{
|
|
3241
3250
|
type: i0.Input
|
|
3251
|
+
}], enableToShow: [{
|
|
3252
|
+
type: i0.Input
|
|
3242
3253
|
}], onMouseEnter: [{
|
|
3243
3254
|
type: i0.HostListener,
|
|
3244
3255
|
args: ['mouseenter']
|
|
@@ -3250,6 +3261,68 @@
|
|
|
3250
3261
|
args: ['click']
|
|
3251
3262
|
}] } });
|
|
3252
3263
|
|
|
3264
|
+
var MonkeyFeatureDirective = /** @class */ (function () {
|
|
3265
|
+
function MonkeyFeatureDirective(cdr, elementRef, monkeyecxFeatureToggleService) {
|
|
3266
|
+
this.cdr = cdr;
|
|
3267
|
+
this.elementRef = elementRef;
|
|
3268
|
+
this.monkeyecxFeatureToggleService = monkeyecxFeatureToggleService;
|
|
3269
|
+
this.unsubscribeAll = new rxjs.Subject();
|
|
3270
|
+
// not to do
|
|
3271
|
+
}
|
|
3272
|
+
MonkeyFeatureDirective.prototype.getFeature = function (feature) {
|
|
3273
|
+
var monkeyecxFeatureToggleService = this.monkeyecxFeatureToggleService;
|
|
3274
|
+
if (!monkeyecxFeatureToggleService) {
|
|
3275
|
+
return false;
|
|
3276
|
+
}
|
|
3277
|
+
return monkeyecxFeatureToggleService.getFlag(feature);
|
|
3278
|
+
};
|
|
3279
|
+
MonkeyFeatureDirective.prototype.handleDisplay = function () {
|
|
3280
|
+
var flag = this.getFeature(this.feature);
|
|
3281
|
+
var display = 'none';
|
|
3282
|
+
if (!MonkeyEcxUtils.persistNullEmptyUndefined(flag)) {
|
|
3283
|
+
return;
|
|
3284
|
+
}
|
|
3285
|
+
if (flag) {
|
|
3286
|
+
display = 'block';
|
|
3287
|
+
}
|
|
3288
|
+
if (display === 'none') {
|
|
3289
|
+
this.elementRef.nativeElement.remove();
|
|
3290
|
+
}
|
|
3291
|
+
this.elementRef.nativeElement.style.display = display;
|
|
3292
|
+
this.cdr.detectChanges();
|
|
3293
|
+
};
|
|
3294
|
+
MonkeyFeatureDirective.prototype.ngOnDestroy = function () {
|
|
3295
|
+
this.unsubscribeAll.next();
|
|
3296
|
+
this.unsubscribeAll.complete();
|
|
3297
|
+
};
|
|
3298
|
+
MonkeyFeatureDirective.prototype.ngOnInit = function () {
|
|
3299
|
+
var _this = this;
|
|
3300
|
+
if (!this.feature)
|
|
3301
|
+
return;
|
|
3302
|
+
this.elementRef.nativeElement.style.display = 'none';
|
|
3303
|
+
this.cdr.detectChanges();
|
|
3304
|
+
this.monkeyecxFeatureToggleService.onFlags
|
|
3305
|
+
.pipe(operators.takeUntil(this.unsubscribeAll))
|
|
3306
|
+
.subscribe(function (val) {
|
|
3307
|
+
if (val) {
|
|
3308
|
+
_this.handleDisplay();
|
|
3309
|
+
}
|
|
3310
|
+
});
|
|
3311
|
+
};
|
|
3312
|
+
return MonkeyFeatureDirective;
|
|
3313
|
+
}());
|
|
3314
|
+
MonkeyFeatureDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyFeatureDirective, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: MonkeyEcxFeatureToggleService }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
3315
|
+
MonkeyFeatureDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.15", type: MonkeyFeatureDirective, selector: "[monkeyecxFeature]", inputs: { feature: ["featureName", "feature"] }, ngImport: i0__namespace });
|
|
3316
|
+
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyFeatureDirective, decorators: [{
|
|
3317
|
+
type: i0.Directive,
|
|
3318
|
+
args: [{
|
|
3319
|
+
selector: '[monkeyecxFeature]'
|
|
3320
|
+
}]
|
|
3321
|
+
}], ctorParameters: function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }, { type: MonkeyEcxFeatureToggleService }]; }, propDecorators: { feature: [{
|
|
3322
|
+
type: i0.Input,
|
|
3323
|
+
args: ['featureName']
|
|
3324
|
+
}] } });
|
|
3325
|
+
|
|
3253
3326
|
var MonkeyEcxDirectivesModule = /** @class */ (function () {
|
|
3254
3327
|
function MonkeyEcxDirectivesModule() {
|
|
3255
3328
|
}
|
|
@@ -3258,12 +3331,14 @@
|
|
|
3258
3331
|
MonkeyEcxDirectivesModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDirectivesModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
3259
3332
|
MonkeyEcxDirectivesModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.15", ngImport: i0__namespace, type: MonkeyEcxDirectivesModule, declarations: [MonkeyEcxDragDropDirective,
|
|
3260
3333
|
MonkeyEcxFormatCurrency,
|
|
3334
|
+
MonkeyFeatureDirective,
|
|
3261
3335
|
MonkeyEcxFormatUpper,
|
|
3262
3336
|
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3263
3337
|
MonkeyEcxOnlyNumbersDirective,
|
|
3264
3338
|
MonkeyEcxSecurityDirective,
|
|
3265
3339
|
MonkeyEcxTooltipDirective], exports: [MonkeyEcxDragDropDirective,
|
|
3266
3340
|
MonkeyEcxFormatCurrency,
|
|
3341
|
+
MonkeyFeatureDirective,
|
|
3267
3342
|
MonkeyEcxFormatUpper,
|
|
3268
3343
|
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3269
3344
|
MonkeyEcxOnlyNumbersDirective,
|
|
@@ -3276,6 +3351,7 @@
|
|
|
3276
3351
|
declarations: [
|
|
3277
3352
|
MonkeyEcxDragDropDirective,
|
|
3278
3353
|
MonkeyEcxFormatCurrency,
|
|
3354
|
+
MonkeyFeatureDirective,
|
|
3279
3355
|
MonkeyEcxFormatUpper,
|
|
3280
3356
|
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3281
3357
|
MonkeyEcxOnlyNumbersDirective,
|
|
@@ -3285,6 +3361,7 @@
|
|
|
3285
3361
|
exports: [
|
|
3286
3362
|
MonkeyEcxDragDropDirective,
|
|
3287
3363
|
MonkeyEcxFormatCurrency,
|
|
3364
|
+
MonkeyFeatureDirective,
|
|
3288
3365
|
MonkeyEcxFormatUpper,
|
|
3289
3366
|
MonkeyEcxOnlyAlphaNumericDirective,
|
|
3290
3367
|
MonkeyEcxOnlyNumbersDirective,
|
|
@@ -4536,6 +4613,7 @@
|
|
|
4536
4613
|
exports.MonkeyEcxTruncateQtdPipe = MonkeyEcxTruncateQtdPipe;
|
|
4537
4614
|
exports.MonkeyEcxUtils = MonkeyEcxUtils;
|
|
4538
4615
|
exports.MonkeyEcxi18nConfigService = MonkeyEcxi18nConfigService;
|
|
4616
|
+
exports.MonkeyFeatureDirective = MonkeyFeatureDirective;
|
|
4539
4617
|
exports.MonkeyFrontCoreModuleModule = MonkeyFrontCoreModuleModule;
|
|
4540
4618
|
exports.Statics = statics;
|
|
4541
4619
|
exports.ValidateUtils = validateUtils;
|