survey-angular-ui 3.0.0-beta.1 → 3.0.0-beta.3

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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('survey-core'), require('survey-core/icons/iconsV1'), require('survey-core/icons/iconsV2'), require('@angular/cdk/portal'), require('@angular/common'), require('@angular/forms'), require('@angular/platform-browser')) :
3
- typeof define === 'function' && define.amd ? define('survey-angular-ui', ['exports', '@angular/core', 'survey-core', 'survey-core/icons/iconsV1', 'survey-core/icons/iconsV2', '@angular/cdk/portal', '@angular/common', '@angular/forms', '@angular/platform-browser'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["survey-angular-ui"] = {}, global.ng.core, global.Survey, global.iconsV1, global.iconsV2, global.ng.cdk.portal, global.ng.common, global.ng.forms, global.ng.platformBrowser));
5
- })(this, (function (exports, i0, Survey, iconsV1, iconsV2, portal, i1, i4, i1$1) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('survey-core'), require('survey-core/icons/iconsV2'), require('@angular/cdk/portal'), require('@angular/common'), require('@angular/forms'), require('@angular/platform-browser')) :
3
+ typeof define === 'function' && define.amd ? define('survey-angular-ui', ['exports', '@angular/core', 'survey-core', 'survey-core/icons/iconsV2', '@angular/cdk/portal', '@angular/common', '@angular/forms', '@angular/platform-browser'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["survey-angular-ui"] = {}, global.ng.core, global.Survey, global.iconsV2, global.ng.cdk.portal, global.ng.common, global.ng.forms, global.ng.platformBrowser));
5
+ })(this, (function (exports, i0, Survey, iconsV2, portal, i1, i4, i1$1) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -1481,7 +1481,6 @@
1481
1481
  }] } });
1482
1482
  AngularComponentFactory.Instance.registerComponent("survey", SurveyContentComponent);
1483
1483
 
1484
- Survey.addIconsToThemeSet("v1", iconsV1.icons);
1485
1484
  Survey.addIconsToThemeSet("v2", iconsV2.icons);
1486
1485
  Survey.SvgRegistry.registerIcons(iconsV2.icons);
1487
1486
  var SurveyComponent = /** @class */ (function (_super) {
@@ -2393,6 +2392,102 @@
2393
2392
  }] } });
2394
2393
  AngularComponentFactory.Instance.registerComponent("sv-tagbox-filter", TagboxFilterComponent);
2395
2394
 
2395
+ var Key2ClickDirective = /** @class */ (function () {
2396
+ function Key2ClickDirective(el) {
2397
+ var _this = this;
2398
+ this.el = el;
2399
+ this.isSubscribed = false;
2400
+ this.isPointerUpSubscribed = false;
2401
+ this.options = Object.assign({}, Key2ClickDirective.defaultOptions);
2402
+ this.onkeyup = function (evt) {
2403
+ evt.preventDefault();
2404
+ evt.stopPropagation();
2405
+ Survey.doKey2ClickUp(evt, _this.options);
2406
+ };
2407
+ this.onpointerup = function (evt) {
2408
+ if (evt.pointerType === "pen") {
2409
+ evt.preventDefault();
2410
+ evt.stopPropagation();
2411
+ var element = evt.target;
2412
+ if (element === null || element === void 0 ? void 0 : element.click)
2413
+ element.click();
2414
+ }
2415
+ };
2416
+ this.subscribeEventListeners();
2417
+ this.subscribePointerUp();
2418
+ }
2419
+ Key2ClickDirective.prototype.onkeydown = function (evt) {
2420
+ Survey.doKey2ClickDown(evt, this.options);
2421
+ };
2422
+ Key2ClickDirective.prototype.blur = function (evt) {
2423
+ Survey.doKey2ClickBlur(evt);
2424
+ };
2425
+ Object.defineProperty(Key2ClickDirective.prototype, "element", {
2426
+ get: function () {
2427
+ return this.el.nativeElement;
2428
+ },
2429
+ enumerable: false,
2430
+ configurable: true
2431
+ });
2432
+ Key2ClickDirective.prototype.subscribePointerUp = function () {
2433
+ if (this.isPointerUpSubscribed)
2434
+ return;
2435
+ this.element.addEventListener("pointerup", this.onpointerup.bind(this));
2436
+ this.isPointerUpSubscribed = true;
2437
+ };
2438
+ Key2ClickDirective.prototype.unsubscribePointerUp = function () {
2439
+ if (!this.isPointerUpSubscribed)
2440
+ return;
2441
+ this.element.removeEventListener("pointerup", this.onpointerup.bind(this));
2442
+ this.isPointerUpSubscribed = false;
2443
+ };
2444
+ Key2ClickDirective.prototype.subscribeEventListeners = function () {
2445
+ if (this.isSubscribed)
2446
+ return;
2447
+ this.element.tabIndex = 0;
2448
+ this.element.addEventListener("keyup", this.onkeyup.bind(this));
2449
+ this.element.addEventListener("keydown", this.onkeydown.bind(this));
2450
+ this.element.addEventListener("blur", this.blur);
2451
+ this.isSubscribed = true;
2452
+ };
2453
+ Key2ClickDirective.prototype.unsubscribeEventListeners = function () {
2454
+ if (!this.isSubscribed)
2455
+ return;
2456
+ this.element.tabIndex = -1;
2457
+ this.element.removeEventListener("keyup", this.onkeyup.bind(this));
2458
+ this.element.removeEventListener("keydown", this.onkeydown.bind(this));
2459
+ this.element.removeEventListener("blur", this.blur);
2460
+ this.isSubscribed = false;
2461
+ };
2462
+ Key2ClickDirective.prototype.ngOnChanges = function (changes) {
2463
+ var curValue = changes["key2click"].currentValue;
2464
+ this.subscribePointerUp();
2465
+ if (curValue.disableTabStop) {
2466
+ this.unsubscribeEventListeners();
2467
+ }
2468
+ else {
2469
+ this.subscribeEventListeners();
2470
+ }
2471
+ this.options = Object.assign({}, Key2ClickDirective.defaultOptions, curValue);
2472
+ };
2473
+ Key2ClickDirective.prototype.ngOnDestroy = function () {
2474
+ this.unsubscribeEventListeners();
2475
+ this.unsubscribePointerUp();
2476
+ };
2477
+ return Key2ClickDirective;
2478
+ }());
2479
+ Key2ClickDirective.defaultOptions = { processEsc: true, disableTabStop: false };
2480
+ Key2ClickDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Key2ClickDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
2481
+ Key2ClickDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: Key2ClickDirective, selector: "[key2click]", inputs: { key2click: "key2click" }, usesOnChanges: true, ngImport: i0__namespace });
2482
+ i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Key2ClickDirective, decorators: [{
2483
+ type: i0.Directive,
2484
+ args: [{
2485
+ selector: "[key2click]"
2486
+ }]
2487
+ }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { key2click: [{
2488
+ type: i0.Input
2489
+ }] } });
2490
+
2396
2491
  var TagboxItemComponent = /** @class */ (function (_super) {
2397
2492
  __extends(TagboxItemComponent, _super);
2398
2493
  function TagboxItemComponent() {
@@ -2408,7 +2503,7 @@
2408
2503
  return TagboxItemComponent;
2409
2504
  }(EmbeddedViewContentComponent));
2410
2505
  TagboxItemComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TagboxItemComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
2411
- TagboxItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TagboxItemComponent, selector: "sv-ng-tagbox-item, '[sv-ng-tagbox-item]'", inputs: { item: "item", question: "question" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n<div class=\"sv-tagbox__item\">\n <div class=\"sv-tagbox__item-text\" [model]=\"item.locText\" sv-ng-string></div> \n <div [class]=\"question.cssClasses.cleanItemButton\" (click)=\"removeItem($event)\">\n <svg [iconName]=\"question.cssClasses.cleanItemButtonIconId\" [partCss]=\"question.cssClasses.cleanItemButtonSvg\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n</div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }] });
2506
+ TagboxItemComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: TagboxItemComponent, selector: "sv-ng-tagbox-item, '[sv-ng-tagbox-item]'", inputs: { item: "item", question: "question" }, usesInheritance: true, ngImport: i0__namespace, template: "<ng-template #template>\n<div [class]=\"question.cssClasses.tagItem\">\n <div [class]=\"question.cssClasses.tagItemText\" [model]=\"item.locText\" sv-ng-string></div> \n <div [class]=\"question.cssClasses.cleanItem\">\n <div tabindex=\"0\" [class]=\"question.cssClasses.cleanItemButton\" [key2click] (click)=\"removeItem($event)\">\n <svg [iconName]=\"question.cssClasses.cleanItemButtonIconId\" [partCss]=\"question.cssClasses.cleanItemButtonSvg\" [size]=\"'auto'\" sv-ng-svg-icon></svg>\n </div>\n </div>\n</div>\n</ng-template>", styles: [":host{display:none}\n"], components: [{ type: SurveyStringComponent, selector: "sv-ng-string, '[sv-ng-string]'", inputs: ["model"] }, { type: SvgIconComponent, selector: "'[sv-ng-svg-icon]'", inputs: ["size", "width", "height", "iconName", "partCss", "css", "title"] }], directives: [{ type: Key2ClickDirective, selector: "[key2click]", inputs: ["key2click"] }] });
2412
2507
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: TagboxItemComponent, decorators: [{
2413
2508
  type: i0.Component,
2414
2509
  args: [{
@@ -3185,7 +3280,7 @@
3185
3280
  return ButtonGroupQuestionComponent;
3186
3281
  }(QuestionAngular));
3187
3282
  ButtonGroupQuestionComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ButtonGroupQuestionComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
3188
- ButtonGroupQuestionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ButtonGroupQuestionComponent, selector: "sv-ng-buttongroup-question", usesInheritance: true, ngImport: i0__namespace, template: "<div role=\"group\" [class]=\"model.cssClasses.root\">\n <sv-button-group-item *ngFor=\"let item of model.visibleChoices; index as index\" [question]=\"model\" [item]=\"item\" [index]=\"index\" ></sv-button-group-item>\n</div>\n", components: [{ type: ButtonGroupItemComponent, selector: "sv-button-group-item", inputs: ["item", "question", "index"] }], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3283
+ ButtonGroupQuestionComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.17", type: ButtonGroupQuestionComponent, selector: "sv-ng-buttongroup-question", usesInheritance: true, ngImport: i0__namespace, template: "<div role=\"group\" [class]=\"model.getControlClass()\">\n <sv-button-group-item *ngFor=\"let item of model.visibleChoices; index as index\" [question]=\"model\" [item]=\"item\" [index]=\"index\" ></sv-button-group-item>\n</div>\n", components: [{ type: ButtonGroupItemComponent, selector: "sv-button-group-item", inputs: ["item", "question", "index"] }], directives: [{ type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
3189
3284
  i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ButtonGroupQuestionComponent, decorators: [{
3190
3285
  type: i0.Component,
3191
3286
  args: [{
@@ -3234,102 +3329,6 @@
3234
3329
  }] } });
3235
3330
  AngularComponentFactory.Instance.registerComponent("sv-components-container", ComponentsContainerComponent);
3236
3331
 
3237
- var Key2ClickDirective = /** @class */ (function () {
3238
- function Key2ClickDirective(el) {
3239
- var _this = this;
3240
- this.el = el;
3241
- this.isSubscribed = false;
3242
- this.isPointerUpSubscribed = false;
3243
- this.options = Object.assign({}, Key2ClickDirective.defaultOptions);
3244
- this.onkeyup = function (evt) {
3245
- evt.preventDefault();
3246
- evt.stopPropagation();
3247
- Survey.doKey2ClickUp(evt, _this.options);
3248
- };
3249
- this.onpointerup = function (evt) {
3250
- if (evt.pointerType === "pen") {
3251
- evt.preventDefault();
3252
- evt.stopPropagation();
3253
- var element = evt.target;
3254
- if (element === null || element === void 0 ? void 0 : element.click)
3255
- element.click();
3256
- }
3257
- };
3258
- this.subscribeEventListeners();
3259
- this.subscribePointerUp();
3260
- }
3261
- Key2ClickDirective.prototype.onkeydown = function (evt) {
3262
- Survey.doKey2ClickDown(evt, this.options);
3263
- };
3264
- Key2ClickDirective.prototype.blur = function (evt) {
3265
- Survey.doKey2ClickBlur(evt);
3266
- };
3267
- Object.defineProperty(Key2ClickDirective.prototype, "element", {
3268
- get: function () {
3269
- return this.el.nativeElement;
3270
- },
3271
- enumerable: false,
3272
- configurable: true
3273
- });
3274
- Key2ClickDirective.prototype.subscribePointerUp = function () {
3275
- if (this.isPointerUpSubscribed)
3276
- return;
3277
- this.element.addEventListener("pointerup", this.onpointerup.bind(this));
3278
- this.isPointerUpSubscribed = true;
3279
- };
3280
- Key2ClickDirective.prototype.unsubscribePointerUp = function () {
3281
- if (!this.isPointerUpSubscribed)
3282
- return;
3283
- this.element.removeEventListener("pointerup", this.onpointerup.bind(this));
3284
- this.isPointerUpSubscribed = false;
3285
- };
3286
- Key2ClickDirective.prototype.subscribeEventListeners = function () {
3287
- if (this.isSubscribed)
3288
- return;
3289
- this.element.tabIndex = 0;
3290
- this.element.addEventListener("keyup", this.onkeyup.bind(this));
3291
- this.element.addEventListener("keydown", this.onkeydown.bind(this));
3292
- this.element.addEventListener("blur", this.blur);
3293
- this.isSubscribed = true;
3294
- };
3295
- Key2ClickDirective.prototype.unsubscribeEventListeners = function () {
3296
- if (!this.isSubscribed)
3297
- return;
3298
- this.element.tabIndex = -1;
3299
- this.element.removeEventListener("keyup", this.onkeyup.bind(this));
3300
- this.element.removeEventListener("keydown", this.onkeydown.bind(this));
3301
- this.element.removeEventListener("blur", this.blur);
3302
- this.isSubscribed = false;
3303
- };
3304
- Key2ClickDirective.prototype.ngOnChanges = function (changes) {
3305
- var curValue = changes["key2click"].currentValue;
3306
- this.subscribePointerUp();
3307
- if (curValue.disableTabStop) {
3308
- this.unsubscribeEventListeners();
3309
- }
3310
- else {
3311
- this.subscribeEventListeners();
3312
- }
3313
- this.options = Object.assign({}, Key2ClickDirective.defaultOptions, curValue);
3314
- };
3315
- Key2ClickDirective.prototype.ngOnDestroy = function () {
3316
- this.unsubscribeEventListeners();
3317
- this.unsubscribePointerUp();
3318
- };
3319
- return Key2ClickDirective;
3320
- }());
3321
- Key2ClickDirective.defaultOptions = { processEsc: true, disableTabStop: false };
3322
- Key2ClickDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Key2ClickDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
3323
- Key2ClickDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.17", type: Key2ClickDirective, selector: "[key2click]", inputs: { key2click: "key2click" }, usesOnChanges: true, ngImport: i0__namespace });
3324
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: Key2ClickDirective, decorators: [{
3325
- type: i0.Directive,
3326
- args: [{
3327
- selector: "[key2click]"
3328
- }]
3329
- }], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }]; }, propDecorators: { key2click: [{
3330
- type: i0.Input
3331
- }] } });
3332
-
3333
3332
  var ActionBarItemComponent = /** @class */ (function (_super) {
3334
3333
  __extends(ActionBarItemComponent, _super);
3335
3334
  function ActionBarItemComponent() {