survey-creator-core 2.0.0-rc.5 → 2.0.0-rc.7
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/fesm/i18n/arabic.js +1 -1
- package/fesm/i18n/bulgarian.js +1 -1
- package/fesm/i18n/burmese.js +1 -1
- package/fesm/i18n/croatian.js +1 -1
- package/fesm/i18n/czech.js +1 -1
- package/fesm/i18n/danish.js +1 -1
- package/fesm/i18n/dutch.js +1 -1
- package/fesm/i18n/english.js +1 -1
- package/fesm/i18n/finnish.js +1 -1
- package/fesm/i18n/french.js +1 -1
- package/fesm/i18n/german.js +1 -1
- package/fesm/i18n/hebrew.js +1 -1
- package/fesm/i18n/hungarian.js +1 -1
- package/fesm/i18n/index.js +1 -1
- package/fesm/i18n/indonesian.js +1 -1
- package/fesm/i18n/italian.js +1 -1
- package/fesm/i18n/japanese.js +1 -1
- package/fesm/i18n/korean.js +1 -1
- package/fesm/i18n/malay.js +1 -1
- package/fesm/i18n/mongolian.js +1 -1
- package/fesm/i18n/norwegian.js +1 -1
- package/fesm/i18n/persian.js +1 -1
- package/fesm/i18n/polish.js +1 -1
- package/fesm/i18n/portuguese.js +1 -1
- package/fesm/i18n/romanian.js +1 -1
- package/fesm/i18n/russian.js +1 -1
- package/fesm/i18n/simplified-chinese.js +1 -1
- package/fesm/i18n/slovak.js +1 -1
- package/fesm/i18n/slovenian.js +1 -1
- package/fesm/i18n/spanish.js +1 -1
- package/fesm/i18n/swedish.js +1 -1
- package/fesm/i18n/tajik.js +1 -1
- package/fesm/i18n/thai.js +1 -1
- package/fesm/i18n/traditional-chinese.js +1 -1
- package/fesm/i18n/turkish.js +1 -1
- package/fesm/survey-creator-core.i18n.js +1 -1
- package/fesm/survey-creator-core.js +186 -107
- package/fesm/survey-creator-core.js.map +1 -1
- package/fesm/themes/index.js +9 -15
- package/fesm/themes/index.js.map +1 -1
- package/fonts.fontless.css +1 -1
- package/fonts.fontless.min.css +1 -1
- package/i18n/arabic.js +1 -1
- package/i18n/arabic.min.js.LICENSE.txt +1 -1
- package/i18n/bulgarian.js +1 -1
- package/i18n/bulgarian.min.js.LICENSE.txt +1 -1
- package/i18n/burmese.js +1 -1
- package/i18n/burmese.min.js.LICENSE.txt +1 -1
- package/i18n/croatian.js +1 -1
- package/i18n/croatian.min.js.LICENSE.txt +1 -1
- package/i18n/czech.js +1 -1
- package/i18n/czech.min.js.LICENSE.txt +1 -1
- package/i18n/danish.js +1 -1
- package/i18n/danish.min.js.LICENSE.txt +1 -1
- package/i18n/dutch.js +1 -1
- package/i18n/dutch.min.js.LICENSE.txt +1 -1
- package/i18n/english.js +1 -1
- package/i18n/english.min.js.LICENSE.txt +1 -1
- package/i18n/finnish.js +1 -1
- package/i18n/finnish.min.js.LICENSE.txt +1 -1
- package/i18n/french.js +1 -1
- package/i18n/french.min.js.LICENSE.txt +1 -1
- package/i18n/german.js +1 -1
- package/i18n/german.min.js.LICENSE.txt +1 -1
- package/i18n/hebrew.js +1 -1
- package/i18n/hebrew.min.js.LICENSE.txt +1 -1
- package/i18n/hungarian.js +1 -1
- package/i18n/hungarian.min.js.LICENSE.txt +1 -1
- package/i18n/index.js +1 -1
- package/i18n/index.min.js.LICENSE.txt +1 -1
- package/i18n/indonesian.js +1 -1
- package/i18n/indonesian.min.js.LICENSE.txt +1 -1
- package/i18n/italian.js +1 -1
- package/i18n/italian.min.js.LICENSE.txt +1 -1
- package/i18n/japanese.js +1 -1
- package/i18n/japanese.min.js.LICENSE.txt +1 -1
- package/i18n/korean.js +1 -1
- package/i18n/korean.min.js.LICENSE.txt +1 -1
- package/i18n/malay.js +1 -1
- package/i18n/malay.min.js.LICENSE.txt +1 -1
- package/i18n/mongolian.js +1 -1
- package/i18n/mongolian.min.js.LICENSE.txt +1 -1
- package/i18n/norwegian.js +1 -1
- package/i18n/norwegian.min.js.LICENSE.txt +1 -1
- package/i18n/persian.js +1 -1
- package/i18n/persian.min.js.LICENSE.txt +1 -1
- package/i18n/polish.js +1 -1
- package/i18n/polish.min.js.LICENSE.txt +1 -1
- package/i18n/portuguese.js +1 -1
- package/i18n/portuguese.min.js.LICENSE.txt +1 -1
- package/i18n/romanian.js +1 -1
- package/i18n/romanian.min.js.LICENSE.txt +1 -1
- package/i18n/russian.js +1 -1
- package/i18n/russian.min.js.LICENSE.txt +1 -1
- package/i18n/simplified-chinese.js +1 -1
- package/i18n/simplified-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/slovak.js +1 -1
- package/i18n/slovak.min.js.LICENSE.txt +1 -1
- package/i18n/slovenian.js +1 -1
- package/i18n/slovenian.min.js.LICENSE.txt +1 -1
- package/i18n/spanish.js +1 -1
- package/i18n/spanish.min.js.LICENSE.txt +1 -1
- package/i18n/swedish.js +1 -1
- package/i18n/swedish.min.js.LICENSE.txt +1 -1
- package/i18n/tajik.js +1 -1
- package/i18n/tajik.min.js.LICENSE.txt +1 -1
- package/i18n/thai.js +1 -1
- package/i18n/thai.min.js.LICENSE.txt +1 -1
- package/i18n/traditional-chinese.js +1 -1
- package/i18n/traditional-chinese.min.js.LICENSE.txt +1 -1
- package/i18n/turkish.js +1 -1
- package/i18n/turkish.min.js.LICENSE.txt +1 -1
- package/package.json +2 -2
- package/survey-creator-core.css +2 -2
- package/survey-creator-core.fontless.css +1 -1
- package/survey-creator-core.fontless.min.css +1 -1
- package/survey-creator-core.i18n.js +1 -1
- package/survey-creator-core.i18n.min.js.LICENSE.txt +1 -1
- package/survey-creator-core.js +203 -107
- package/survey-creator-core.js.map +1 -1
- package/survey-creator-core.min.css +2 -2
- package/survey-creator-core.min.js +1 -1
- package/survey-creator-core.min.js.LICENSE.txt +1 -1
- package/themes/default-contrast.d.ts +2 -91
- package/themes/default-contrast.js +7 -9
- package/themes/default-contrast.js.map +1 -1
- package/themes/default-contrast.min.js +1 -1
- package/themes/default-contrast.min.js.LICENSE.txt +1 -1
- package/themes/default-dark.d.ts +2 -91
- package/themes/default-dark.js +7 -9
- package/themes/default-dark.js.map +1 -1
- package/themes/default-dark.min.js +1 -1
- package/themes/default-dark.min.js.LICENSE.txt +1 -1
- package/themes/index.d.ts +3 -3
- package/themes/index.js +13 -22
- package/themes/index.js.map +1 -1
- package/themes/index.min.js +1 -1
- package/themes/index.min.js.LICENSE.txt +1 -1
- package/themes/sc2020.d.ts +2 -1316
- package/themes/sc2020.js +7 -9
- package/themes/sc2020.js.map +1 -1
- package/themes/sc2020.min.js +1 -1
- package/themes/sc2020.min.js.LICENSE.txt +1 -1
- package/typings/components/action-container-view-model.d.ts +10 -3
- package/typings/components/page.d.ts +2 -1
- package/typings/components/question.d.ts +5 -4
- package/typings/components/tabs/designer-plugin.d.ts +1 -1
- package/typings/components/tabs/preview.d.ts +1 -0
- package/typings/creator-base.d.ts +1 -1
- package/typings/property-grid/index.d.ts +3 -1
- package/typings/property-grid/property-grid-view-model.d.ts +5 -2
- package/4d86d1950ecdfb59807f.png +0 -0
- package/5dcaaadc5b1c048d6daa.png +0 -0
- package/5e87e454a7071a571216.png +0 -0
- package/a7b373b83d0c1e0262bd.png +0 -0
- package/cc27e2890751d1ea0380.png +0 -0
- package/e8dfbe2bdd7c9dca5efa.png +0 -0
- package/fesm/themes/default-contrast.js +0 -130
- package/fesm/themes/default-contrast.js.map +0 -1
- package/fesm/themes/default-dark.js +0 -130
- package/fesm/themes/default-dark.js.map +0 -1
- package/fesm/themes/sc2020.js +0 -1347
- package/fesm/themes/sc2020.js.map +0 -1
- package/survey-creator-core.d.ts +0 -2
- package/themes/default-light.d.ts +0 -179
- package/themes/default-light.js +0 -1397
- package/themes/default-light.js.map +0 -1
- package/themes/default-light.min.js +0 -2
- package/themes/default-light.min.js.LICENSE.txt +0 -6
- package/themes/default.d.ts +0 -2295
- package/themes/entries/helpers.d.ts +0 -5
- package/themes/themes/default-contrast.d.ts +0 -123
- package/themes/themes/default-dark.d.ts +0 -123
- package/themes/themes/default-light.d.ts +0 -123
- package/themes/themes/default.d.ts +0 -2261
- package/themes/themes/index.d.ts +0 -183
- package/themes/themes/utils.d.ts +0 -4
- package/themes/utils.d.ts +0 -4
- package/typings/components/side-bar/side-bar-tab-model.d.ts +0 -11
- package/typings/components/tabs/embed-json.d.ts +0 -1
- package/typings/components/tabs/embed.d.ts +0 -13
- package/typings/components/tabs/theme-custom-questions/boxshadow-settings.d.ts +0 -4
- package/typings/components/tabs/theme-custom-questions/color-settings.d.ts +0 -2
- package/typings/components/tabs/theme-custom-questions/element-settings.d.ts +0 -8
- package/typings/components/tabs/theme.d.ts +0 -100
- package/typings/survey-elements-dnd.d.ts +0 -12
- package/typings/themes/default-contrast.d.ts +0 -179
- package/typings/themes/default-dark.d.ts +0 -179
- package/typings/themes/default-light.d.ts +0 -179
- package/typings/themes/default.d.ts +0 -2295
- package/typings/themes/index.d.ts +0 -1484
- package/typings/themes/sc2020.d.ts +0 -2613
- package/typings/themes/utils.d.ts +0 -4
package/survey-creator-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* SurveyJS Creator v2.0.0-rc.
|
|
2
|
+
* SurveyJS Creator v2.0.0-rc.7
|
|
3
3
|
* (c) 2015-2025 Devsoft Baltic OÜ - http://surveyjs.io/
|
|
4
4
|
* Github: https://github.com/surveyjs/survey-creator
|
|
5
5
|
* License: https://surveyjs.io/Licenses#SurveyCreator
|
|
@@ -158,8 +158,8 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
158
158
|
_this.updateActionsProperties();
|
|
159
159
|
}
|
|
160
160
|
};
|
|
161
|
+
_this.actionVisibilityCache = {};
|
|
161
162
|
_this.expandCollapseAction = _this.getExpandCollapseAction();
|
|
162
|
-
_this.createActionContainers();
|
|
163
163
|
_this.attachToUI(surveyElement);
|
|
164
164
|
return _this;
|
|
165
165
|
}
|
|
@@ -274,13 +274,12 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
274
274
|
enumerable: false,
|
|
275
275
|
configurable: true
|
|
276
276
|
});
|
|
277
|
-
SurveyElementAdornerBase.prototype.
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
this.topActionContainer.sizeMode = "small";
|
|
277
|
+
SurveyElementAdornerBase.prototype.createTopActionContainer = function () {
|
|
278
|
+
var actionContainer = new survey_core__WEBPACK_IMPORTED_MODULE_1__.ActionContainer();
|
|
279
|
+
actionContainer.sizeMode = "small";
|
|
281
280
|
if (this.creator.expandCollapseButtonVisibility != "never") {
|
|
282
|
-
|
|
283
|
-
|
|
281
|
+
actionContainer.setItems([this.expandCollapseAction]);
|
|
282
|
+
actionContainer.cssClasses = {
|
|
284
283
|
root: "svc-survey-element-top-toolbar sv-action-bar",
|
|
285
284
|
item: "svc-survey-element-top-toolbar__item",
|
|
286
285
|
itemIcon: "svc-survey-element-toolbar-item__icon",
|
|
@@ -288,6 +287,7 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
288
287
|
itemTitleWithIcon: "svc-survey-element-toolbar-item__title--with-icon",
|
|
289
288
|
};
|
|
290
289
|
}
|
|
290
|
+
return actionContainer;
|
|
291
291
|
};
|
|
292
292
|
SurveyElementAdornerBase.prototype.createActionContainer = function () {
|
|
293
293
|
var actionContainer = new SurveyElementActionContainer();
|
|
@@ -339,6 +339,40 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
339
339
|
enumerable: false,
|
|
340
340
|
configurable: true
|
|
341
341
|
});
|
|
342
|
+
Object.defineProperty(SurveyElementAdornerBase.prototype, "isActionContainerCreated", {
|
|
343
|
+
get: function () {
|
|
344
|
+
return !!this.actionContainerValue;
|
|
345
|
+
},
|
|
346
|
+
enumerable: false,
|
|
347
|
+
configurable: true
|
|
348
|
+
});
|
|
349
|
+
Object.defineProperty(SurveyElementAdornerBase.prototype, "actionContainer", {
|
|
350
|
+
get: function () {
|
|
351
|
+
if (!this.actionContainerValue) {
|
|
352
|
+
this.actionContainerValue = this.createActionContainer();
|
|
353
|
+
if (this.surveyElement) {
|
|
354
|
+
this.updateActionsContainer(this.surveyElement);
|
|
355
|
+
this.updateActionsVisibility(false);
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
return this.actionContainerValue;
|
|
359
|
+
},
|
|
360
|
+
enumerable: false,
|
|
361
|
+
configurable: true
|
|
362
|
+
});
|
|
363
|
+
Object.defineProperty(SurveyElementAdornerBase.prototype, "topActionContainer", {
|
|
364
|
+
get: function () {
|
|
365
|
+
if (!this.topActionContainerValue) {
|
|
366
|
+
this.topActionContainerValue = this.createTopActionContainer();
|
|
367
|
+
if (this.surveyElement) {
|
|
368
|
+
this.updateActionsVisibility(true);
|
|
369
|
+
}
|
|
370
|
+
}
|
|
371
|
+
return this.topActionContainerValue;
|
|
372
|
+
},
|
|
373
|
+
enumerable: false,
|
|
374
|
+
configurable: true
|
|
375
|
+
});
|
|
342
376
|
SurveyElementAdornerBase.GetAdorner = function (surveyElement) {
|
|
343
377
|
return surveyElement.getPropertyValue(SurveyElementAdornerBase.AdornerValueName);
|
|
344
378
|
};
|
|
@@ -415,13 +449,17 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
415
449
|
};
|
|
416
450
|
SurveyElementAdornerBase.prototype.dispose = function () {
|
|
417
451
|
this.detachFromUI();
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
}
|
|
452
|
+
this.disposeActions(this.actionContainerValue);
|
|
453
|
+
this.disposeActions(this.topActionContainerValue);
|
|
421
454
|
_super.prototype.dispose.call(this);
|
|
422
455
|
this.sidebarFlyoutModeChangedFunc = undefined;
|
|
423
456
|
this.animationCollapsed = undefined;
|
|
424
457
|
};
|
|
458
|
+
SurveyElementAdornerBase.prototype.disposeActions = function (container) {
|
|
459
|
+
if (!!container && !container.isDisposed) {
|
|
460
|
+
container.dispose();
|
|
461
|
+
}
|
|
462
|
+
};
|
|
425
463
|
SurveyElementAdornerBase.prototype.onElementSelectedChanged = function (isSelected) {
|
|
426
464
|
if (!isSelected)
|
|
427
465
|
return;
|
|
@@ -443,19 +481,27 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
443
481
|
};
|
|
444
482
|
};
|
|
445
483
|
SurveyElementAdornerBase.prototype.cleanActionsContainer = function () {
|
|
446
|
-
var
|
|
447
|
-
|
|
484
|
+
var container = this.actionContainerValue;
|
|
485
|
+
if (!container)
|
|
486
|
+
return;
|
|
487
|
+
var actions = container.actions;
|
|
488
|
+
container.setItems([]);
|
|
448
489
|
actions.forEach(function (action) { return action.dispose && action.dispose(); });
|
|
449
490
|
};
|
|
450
491
|
SurveyElementAdornerBase.prototype.updateActionsContainer = function (surveyElement) {
|
|
492
|
+
if (!this.actionContainerValue)
|
|
493
|
+
return;
|
|
451
494
|
var actions = [];
|
|
452
495
|
this.buildActions(actions);
|
|
453
496
|
this.creator.onElementMenuItemsChanged(surveyElement, actions);
|
|
454
|
-
this.
|
|
497
|
+
this.actionContainerValue.setItems(actions);
|
|
455
498
|
};
|
|
456
499
|
SurveyElementAdornerBase.prototype.updateActionsProperties = function () {
|
|
457
500
|
if (this.isDisposed)
|
|
458
501
|
return;
|
|
502
|
+
this.updateActionsPropertiesCore();
|
|
503
|
+
};
|
|
504
|
+
SurveyElementAdornerBase.prototype.updateActionsPropertiesCore = function () {
|
|
459
505
|
this.updateElementAllowOptions(this.creator.getElementAllowOperations(this.surveyElement), this.isOperationsAllow());
|
|
460
506
|
};
|
|
461
507
|
SurveyElementAdornerBase.prototype.getAllowDragging = function (options) {
|
|
@@ -484,12 +530,21 @@ var SurveyElementAdornerBase = /** @class */ (function (_super) {
|
|
|
484
530
|
return !this.creator.readOnly;
|
|
485
531
|
};
|
|
486
532
|
SurveyElementAdornerBase.prototype.updateActionVisibility = function (id, isVisible) {
|
|
487
|
-
var
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
533
|
+
var _a, _b;
|
|
534
|
+
var action = ((_a = this.actionContainerValue) === null || _a === void 0 ? void 0 : _a.getActionById(id)) || ((_b = this.topActionContainerValue) === null || _b === void 0 ? void 0 : _b.getActionById(id));
|
|
535
|
+
if (!action) {
|
|
536
|
+
this.actionVisibilityCache[id] = isVisible;
|
|
537
|
+
}
|
|
538
|
+
else {
|
|
539
|
+
if (action.visible !== isVisible) {
|
|
540
|
+
action.visible = isVisible;
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
};
|
|
544
|
+
SurveyElementAdornerBase.prototype.updateActionsVisibility = function (isTop) {
|
|
545
|
+
for (var key in this.actionVisibilityCache) {
|
|
546
|
+
this.updateActionVisibility(key, this.actionVisibilityCache[key]);
|
|
547
|
+
}
|
|
493
548
|
};
|
|
494
549
|
SurveyElementAdornerBase.prototype.getActionById = function (id) {
|
|
495
550
|
return this.actionContainer.getActionById(id) || this.topActionContainer.getActionById(id);
|
|
@@ -2146,7 +2201,7 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
2146
2201
|
}, null, type || _this.currentAddQuestionType || _creator_settings__WEBPACK_IMPORTED_MODULE_5__.settings.designer.defaultAddQuestionType);
|
|
2147
2202
|
};
|
|
2148
2203
|
_this.creatorPropertyChanged = function (sender, options) {
|
|
2149
|
-
if (options.name === "isMobileView") {
|
|
2204
|
+
if (options.name === "isMobileView" && _this.isActionContainerCreated) {
|
|
2150
2205
|
_this.actionContainer.alwaysShrink = options.newValue;
|
|
2151
2206
|
}
|
|
2152
2207
|
};
|
|
@@ -2162,7 +2217,6 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
2162
2217
|
_this.creator.survey.currentPage = _this.page;
|
|
2163
2218
|
});
|
|
2164
2219
|
_this.dragOrClickHelper = new survey_core__WEBPACK_IMPORTED_MODULE_1__.DragOrClickHelper(_this.startDragSurveyElement);
|
|
2165
|
-
_this.actionContainer.alwaysShrink = _this.creator.isMobileView;
|
|
2166
2220
|
_this.creator.onPropertyChanged.add(_this.creatorPropertyChanged);
|
|
2167
2221
|
return _this;
|
|
2168
2222
|
}
|
|
@@ -2297,8 +2351,21 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
2297
2351
|
});
|
|
2298
2352
|
PageAdorner.prototype.createActionContainer = function () {
|
|
2299
2353
|
var container = _super.prototype.createActionContainer.call(this);
|
|
2354
|
+
container.alwaysShrink = this.creator.isMobileView;
|
|
2300
2355
|
container.sizeMode = "small";
|
|
2301
|
-
container.cssClasses =
|
|
2356
|
+
container.cssClasses = this.containerCssClasses();
|
|
2357
|
+
container.dotsItem.iconSize = "auto";
|
|
2358
|
+
container.dotsItem.cssClasses.itemIcon += " svc-page-toolbar-item__icon";
|
|
2359
|
+
return container;
|
|
2360
|
+
};
|
|
2361
|
+
PageAdorner.prototype.createTopActionContainer = function () {
|
|
2362
|
+
var container = _super.prototype.createTopActionContainer.call(this);
|
|
2363
|
+
container.cssClasses = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, this.containerCssClasses());
|
|
2364
|
+
container.cssClasses.root += " svc-page-toolbar--collapse";
|
|
2365
|
+
return container;
|
|
2366
|
+
};
|
|
2367
|
+
PageAdorner.prototype.containerCssClasses = function () {
|
|
2368
|
+
return {
|
|
2302
2369
|
root: "svc-page-toolbar sv-action-bar",
|
|
2303
2370
|
item: "svc-page-toolbar__item",
|
|
2304
2371
|
itemWithTitle: "svc-page-toolbar__item--with-text",
|
|
@@ -2308,14 +2375,6 @@ var PageAdorner = /** @class */ (function (_super) {
|
|
|
2308
2375
|
itemTitle: "svc-page-toolbar-item__title",
|
|
2309
2376
|
itemTitleWithIcon: "svc-page-toolbar-item__title--with-icon",
|
|
2310
2377
|
};
|
|
2311
|
-
container.dotsItem.iconSize = "auto";
|
|
2312
|
-
container.dotsItem.cssClasses.itemIcon += " svc-page-toolbar-item__icon";
|
|
2313
|
-
return container;
|
|
2314
|
-
};
|
|
2315
|
-
PageAdorner.prototype.createActionContainers = function () {
|
|
2316
|
-
_super.prototype.createActionContainers.call(this);
|
|
2317
|
-
this.topActionContainer.cssClasses = (0,tslib__WEBPACK_IMPORTED_MODULE_0__.__assign)({}, this.actionContainer.cssClasses);
|
|
2318
|
-
this.topActionContainer.cssClasses.root += " svc-page-toolbar--collapse";
|
|
2319
2378
|
};
|
|
2320
2379
|
PageAdorner.prototype.allowExpandCollapseByDblClick = function (element) {
|
|
2321
2380
|
return element.classList.contains("svc-page__content") ||
|
|
@@ -3096,14 +3155,9 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
3096
3155
|
var _this = _super.call(this, creator, surveyElement) || this;
|
|
3097
3156
|
_this.templateData = templateData;
|
|
3098
3157
|
_this.startDragSurveyElement = function (event) {
|
|
3099
|
-
var _a;
|
|
3100
3158
|
var element = _this.surveyElement;
|
|
3101
3159
|
var isElementSelected = _this.creator.selectedElement === element;
|
|
3102
3160
|
_this.dragDropHelper.startDragSurveyElement(event, element, isElementSelected);
|
|
3103
|
-
if (!!element && _this.creator.collapseOnDrag) {
|
|
3104
|
-
(_a = _this.creator.designerStateManager) === null || _a === void 0 ? void 0 : _a.suspend();
|
|
3105
|
-
_this.creator.collapseAllPagesOnDragStart(element);
|
|
3106
|
-
}
|
|
3107
3161
|
return true;
|
|
3108
3162
|
};
|
|
3109
3163
|
_this.addNewQuestion = function () {
|
|
@@ -3372,8 +3426,10 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
3372
3426
|
_super.prototype.attachElement.call(this, surveyElement);
|
|
3373
3427
|
if (surveyElement) {
|
|
3374
3428
|
surveyElement.registerFunctionOnPropertyValueChanged("isRequired", function (newValue) {
|
|
3375
|
-
|
|
3376
|
-
|
|
3429
|
+
if (_this.isActionContainerCreated) {
|
|
3430
|
+
var requiredAction = _this.actionContainer.getActionById("isrequired");
|
|
3431
|
+
_this.updateRequiredAction(requiredAction);
|
|
3432
|
+
}
|
|
3377
3433
|
}, "isRequiredAdorner");
|
|
3378
3434
|
}
|
|
3379
3435
|
};
|
|
@@ -3400,8 +3456,8 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
3400
3456
|
}
|
|
3401
3457
|
_super.prototype.hover.call(this, event, element);
|
|
3402
3458
|
};
|
|
3403
|
-
QuestionAdornerViewModel.prototype.
|
|
3404
|
-
_super.prototype.
|
|
3459
|
+
QuestionAdornerViewModel.prototype.createActionContainer = function () {
|
|
3460
|
+
var actionContainer = _super.prototype.createActionContainer.call(this);
|
|
3405
3461
|
var defaultCssClasses = {
|
|
3406
3462
|
root: "svc-survey-element-toolbar sv-action-bar",
|
|
3407
3463
|
item: "svc-survey-element-toolbar__item",
|
|
@@ -3413,22 +3469,25 @@ var QuestionAdornerViewModel = /** @class */ (function (_super) {
|
|
|
3413
3469
|
itemTitle: "svc-survey-element-toolbar-item__title",
|
|
3414
3470
|
itemTitleWithIcon: "svc-survey-element-toolbar-item__title--with-icon",
|
|
3415
3471
|
};
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3472
|
+
actionContainer.sizeMode = "small";
|
|
3473
|
+
actionContainer.cssClasses = defaultCssClasses;
|
|
3474
|
+
actionContainer.dotsItem.css += " svc-survey-element-toolbar__dots-item";
|
|
3475
|
+
actionContainer.dotsItem.innerCss += " svc-survey-element-toolbar__item";
|
|
3476
|
+
return actionContainer;
|
|
3420
3477
|
};
|
|
3421
|
-
QuestionAdornerViewModel.prototype.
|
|
3422
|
-
|
|
3423
|
-
if (
|
|
3424
|
-
|
|
3478
|
+
QuestionAdornerViewModel.prototype.updateActionsPropertiesCore = function () {
|
|
3479
|
+
_super.prototype.updateActionsPropertiesCore.call(this);
|
|
3480
|
+
if (this.isActionContainerCreated) {
|
|
3481
|
+
this.updateActionsLocations();
|
|
3425
3482
|
}
|
|
3426
|
-
return res;
|
|
3427
3483
|
};
|
|
3428
|
-
QuestionAdornerViewModel.prototype.
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3484
|
+
QuestionAdornerViewModel.prototype.updateActionsVisibility = function (isTop) {
|
|
3485
|
+
_super.prototype.updateActionsVisibility.call(this, isTop);
|
|
3486
|
+
if (!isTop) {
|
|
3487
|
+
this.updateActionsLocations();
|
|
3488
|
+
}
|
|
3489
|
+
};
|
|
3490
|
+
QuestionAdornerViewModel.prototype.updateActionsLocations = function () {
|
|
3432
3491
|
var actions = this.actionContainer.visibleActions;
|
|
3433
3492
|
var switchToStartLocation = false;
|
|
3434
3493
|
for (var i = actions.length - 1; i >= 0; i--) {
|
|
@@ -6171,10 +6230,10 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
6171
6230
|
this.showOneCategoryInPropertyGrid = creator.showOneCategoryInPropertyGrid;
|
|
6172
6231
|
this.propertyGrid.showOneCategoryInPropertyGrid = this.showOneCategoryInPropertyGrid;
|
|
6173
6232
|
this.propertyGrid.obj = creator.survey;
|
|
6174
|
-
this.
|
|
6233
|
+
this.propertyGridViewModel = new _property_grid_property_grid_view_model__WEBPACK_IMPORTED_MODULE_3__.PropertyGridViewModel(this.propertyGrid, creator);
|
|
6234
|
+
this.propertyGridViewModel.onNewSurveyCreatedCallback = function () {
|
|
6175
6235
|
_this.updateTabControlActions();
|
|
6176
6236
|
};
|
|
6177
|
-
this.propertyGridViewModel = new _property_grid_property_grid_view_model__WEBPACK_IMPORTED_MODULE_3__.PropertyGridViewModel(this.propertyGrid, creator);
|
|
6178
6237
|
this.propertyGridPlaceholderPage = this.creator.sidebar.addPage("propertyGridPlaceholder", "svc-property-grid-placeholder", this.propertyGridViewModel);
|
|
6179
6238
|
this.propertyGridPlaceholderPage.caption = _editorLocalization__WEBPACK_IMPORTED_MODULE_9__.editorLocalization.getString("ed.surveySettings");
|
|
6180
6239
|
this.propertyGridTab = this.creator.sidebar.addPage("propertyGrid", "svc-property-grid", this.propertyGridViewModel, function () {
|
|
@@ -6270,7 +6329,6 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
6270
6329
|
};
|
|
6271
6330
|
TabDesignerPlugin.prototype.updateTabControl = function () {
|
|
6272
6331
|
if (this.showOneCategoryInPropertyGrid) {
|
|
6273
|
-
this.updateTabControlActions();
|
|
6274
6332
|
this.creator.sidebar.sideAreaComponentName = "svc-tab-control";
|
|
6275
6333
|
this.creator.sidebar.sideAreaComponentData = this.tabControlModel;
|
|
6276
6334
|
}
|
|
@@ -6349,11 +6407,6 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
6349
6407
|
if (this.creator.showCreatorThemeSettings) {
|
|
6350
6408
|
this.themeModel.loadTheme(this.creator.creatorTheme);
|
|
6351
6409
|
this.themePropertyGrid.obj = this.themeModel;
|
|
6352
|
-
this.themePropertyGrid.survey.onUpdatePanelCssClasses.add(function (_, options) {
|
|
6353
|
-
options.cssClasses.panel.container += " spg-panel--group";
|
|
6354
|
-
});
|
|
6355
|
-
this.updateThemeChooserChoices();
|
|
6356
|
-
this.updatePredefinedColorChoices();
|
|
6357
6410
|
}
|
|
6358
6411
|
};
|
|
6359
6412
|
TabDesignerPlugin.prototype.setTheme = function () {
|
|
@@ -6361,21 +6414,16 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
6361
6414
|
this.themeModel.setTheme(this.creator.creatorTheme);
|
|
6362
6415
|
}
|
|
6363
6416
|
};
|
|
6364
|
-
TabDesignerPlugin.prototype.updateThemeChooserChoices = function () {
|
|
6365
|
-
var themeChooser = this.themePropertyGrid.survey.getQuestionByName("themeName");
|
|
6366
|
-
if (!!themeChooser) {
|
|
6367
|
-
themeChooser.choices = _creator_theme_creator_themes__WEBPACK_IMPORTED_MODULE_12__.PredefinedCreatorThemes.map(function (theme) { return ({ value: theme, text: (0,_editorLocalization__WEBPACK_IMPORTED_MODULE_9__.getLocString)("creatortheme.names." + theme) }); });
|
|
6368
|
-
}
|
|
6369
|
-
this.themePropertyGrid.survey.runExpressions();
|
|
6370
|
-
};
|
|
6371
6417
|
TabDesignerPlugin.prototype.createCreatorThemeSettingsPage = function (creator) {
|
|
6372
6418
|
var _this = this;
|
|
6373
6419
|
this.themeModel = new _creator_theme_creator_theme_model__WEBPACK_IMPORTED_MODULE_11__.CreatorThemeModel();
|
|
6374
6420
|
this.themePropertyGrid = new _property_grid__WEBPACK_IMPORTED_MODULE_2__.PropertyGridModel(undefined, creator, _creator_theme_creator_theme_model_definition__WEBPACK_IMPORTED_MODULE_10__.creatorThemeModelPropertyGridDefinition);
|
|
6375
|
-
this.themePropertyGrid.survey.css.root += "svc-creator-theme-settings";
|
|
6376
6421
|
this.themePropertyGrid.showOneCategoryInPropertyGrid = true;
|
|
6377
6422
|
this.themePropertyGrid.surveyInstanceCreatedArea = "designer-tab:creator-settings";
|
|
6378
6423
|
var themePropertyGridViewModel = new _property_grid_property_grid_view_model__WEBPACK_IMPORTED_MODULE_3__.PropertyGridViewModel(this.themePropertyGrid, creator);
|
|
6424
|
+
themePropertyGridViewModel.onNewSurveyCreatedCallback = function () {
|
|
6425
|
+
_this.onThemePropertyGridSurveyCreated();
|
|
6426
|
+
};
|
|
6379
6427
|
themePropertyGridViewModel.searchEnabled = false;
|
|
6380
6428
|
this.themePropertyGridTab = this.creator.sidebar.addPage("creatorTheme", "svc-property-grid", themePropertyGridViewModel);
|
|
6381
6429
|
this.themePropertyGridTab.caption = _editorLocalization__WEBPACK_IMPORTED_MODULE_9__.editorLocalization.getString("ed.creatorSettingTitle");
|
|
@@ -6413,6 +6461,19 @@ var TabDesignerPlugin = /** @class */ (function () {
|
|
|
6413
6461
|
});
|
|
6414
6462
|
this.tabControlModel.bottomToolbar.setItems([settingsAction]);
|
|
6415
6463
|
};
|
|
6464
|
+
TabDesignerPlugin.prototype.onThemePropertyGridSurveyCreated = function () {
|
|
6465
|
+
var survey = this.themePropertyGrid.survey;
|
|
6466
|
+
survey.css.root += " svc-creator-theme-settings";
|
|
6467
|
+
survey.onUpdatePanelCssClasses.add(function (_, options) {
|
|
6468
|
+
options.cssClasses.panel.container += " spg-panel--group";
|
|
6469
|
+
});
|
|
6470
|
+
var themeChooser = survey.getQuestionByName("themeName");
|
|
6471
|
+
if (!!themeChooser) {
|
|
6472
|
+
themeChooser.choices = _creator_theme_creator_themes__WEBPACK_IMPORTED_MODULE_12__.PredefinedCreatorThemes.map(function (theme) { return ({ value: theme, text: (0,_editorLocalization__WEBPACK_IMPORTED_MODULE_9__.getLocString)("creatortheme.names." + theme) }); });
|
|
6473
|
+
}
|
|
6474
|
+
survey.runExpressions();
|
|
6475
|
+
this.updatePredefinedColorChoices();
|
|
6476
|
+
};
|
|
6416
6477
|
TabDesignerPlugin.prototype.updateTabControlActions = function () {
|
|
6417
6478
|
var _this = this;
|
|
6418
6479
|
var _a;
|
|
@@ -12395,6 +12456,11 @@ var PreviewViewModel = /** @class */ (function (_super) {
|
|
|
12395
12456
|
this.updatePageList();
|
|
12396
12457
|
this.show();
|
|
12397
12458
|
};
|
|
12459
|
+
PreviewViewModel.prototype.isSurveyRunning = function () {
|
|
12460
|
+
var _a;
|
|
12461
|
+
var state = (_a = this.survey) === null || _a === void 0 ? void 0 : _a.state;
|
|
12462
|
+
return state === "running" || state === "starting";
|
|
12463
|
+
};
|
|
12398
12464
|
PreviewViewModel.prototype.buildActions = function () {
|
|
12399
12465
|
var _this = this;
|
|
12400
12466
|
var pageActions = [];
|
|
@@ -12416,7 +12482,7 @@ var PreviewViewModel = /** @class */ (function (_super) {
|
|
|
12416
12482
|
};
|
|
12417
12483
|
if (this.prevPageAction) {
|
|
12418
12484
|
this.prevPageAction.visible = new survey_core__WEBPACK_IMPORTED_MODULE_2__.ComputedUpdater(function () {
|
|
12419
|
-
var isRunning = _this.
|
|
12485
|
+
var isRunning = _this.isSurveyRunning();
|
|
12420
12486
|
var isActiveTab = _this.getTabName() === _this.surveyProvider.activeTab;
|
|
12421
12487
|
return (0,_utils_utils__WEBPACK_IMPORTED_MODULE_4__.notShortCircuitAnd)(_this.isRunning, isActiveTab, _this.pageListItems.length > 1) && isRunning;
|
|
12422
12488
|
});
|
|
@@ -12448,11 +12514,11 @@ var PreviewViewModel = /** @class */ (function (_super) {
|
|
|
12448
12514
|
});
|
|
12449
12515
|
pageActions.push(this.selectPageAction);
|
|
12450
12516
|
this.selectPageAction.visible = new survey_core__WEBPACK_IMPORTED_MODULE_2__.ComputedUpdater(function () {
|
|
12451
|
-
return _this.
|
|
12517
|
+
return _this.isSurveyRunning();
|
|
12452
12518
|
});
|
|
12453
12519
|
if (this.nextPageAction) {
|
|
12454
12520
|
this.nextPageAction.visible = new survey_core__WEBPACK_IMPORTED_MODULE_2__.ComputedUpdater(function () {
|
|
12455
|
-
var isRunning = _this.
|
|
12521
|
+
var isRunning = _this.isSurveyRunning();
|
|
12456
12522
|
var isActiveTab = _this.getTabName() === _this.surveyProvider.activeTab;
|
|
12457
12523
|
return (0,_utils_utils__WEBPACK_IMPORTED_MODULE_4__.notShortCircuitAnd)(_this.isRunning, isActiveTab, _this.pageListItems.length > 1) && isRunning;
|
|
12458
12524
|
});
|
|
@@ -19398,9 +19464,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
19398
19464
|
/**
|
|
19399
19465
|
* Specifies whether to collapse pages on the design surface when users start dragging a survey element.
|
|
19400
19466
|
*
|
|
19401
|
-
* Default value: `
|
|
19467
|
+
* Default value: `false`
|
|
19402
19468
|
*/
|
|
19403
|
-
_this.collapseOnDrag =
|
|
19469
|
+
_this.collapseOnDrag = false;
|
|
19404
19470
|
if (!!options2 ||
|
|
19405
19471
|
typeof _this.options === "string" ||
|
|
19406
19472
|
_this.options instanceof String) {
|
|
@@ -20794,6 +20860,9 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
20794
20860
|
*/
|
|
20795
20861
|
SurveyCreatorModel.prototype.initSurveyWithJSON = function (json, clearState) {
|
|
20796
20862
|
var _this = this;
|
|
20863
|
+
if (!json) {
|
|
20864
|
+
json = { "headerView": "advanced" };
|
|
20865
|
+
}
|
|
20797
20866
|
this.existingPages = {};
|
|
20798
20867
|
var survey = this.createSurvey({}, "designer", undefined, function (survey) {
|
|
20799
20868
|
survey.skeletonHeight = 188;
|
|
@@ -20857,7 +20926,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
20857
20926
|
var _a;
|
|
20858
20927
|
var element = sender.draggedElement;
|
|
20859
20928
|
isDraggedFromToolbox = !element.parent && !element.isPage;
|
|
20860
|
-
if (!!element && element.isPage
|
|
20929
|
+
if (!!element && (element.isPage || _this.collapseOnDrag)) {
|
|
20861
20930
|
(_a = _this.designerStateManager) === null || _a === void 0 ? void 0 : _a.suspend();
|
|
20862
20931
|
_this.collapseAllPagesOnDragStart(element);
|
|
20863
20932
|
}
|
|
@@ -20879,7 +20948,7 @@ var SurveyCreatorModel = /** @class */ (function (_super) {
|
|
|
20879
20948
|
var _a;
|
|
20880
20949
|
isDraggedFromToolbox = false;
|
|
20881
20950
|
_this.stopUndoRedoTransaction();
|
|
20882
|
-
if (!!options.draggedElement && _this.collapseOnDrag) {
|
|
20951
|
+
if (!!options.draggedElement && (options.draggedElement.isPage || _this.collapseOnDrag)) {
|
|
20883
20952
|
(_a = _this.designerStateManager) === null || _a === void 0 ? void 0 : _a.release();
|
|
20884
20953
|
_this.restoreElementsState();
|
|
20885
20954
|
}
|
|
@@ -37402,8 +37471,10 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
37402
37471
|
}
|
|
37403
37472
|
};
|
|
37404
37473
|
PropertyGridModel.prototype.setObj = function (value) {
|
|
37405
|
-
var _this = this;
|
|
37406
37474
|
this.objValue = value;
|
|
37475
|
+
if (this.onSetNewObjectCallback) {
|
|
37476
|
+
this.onSetNewObjectCallback();
|
|
37477
|
+
}
|
|
37407
37478
|
this.classNameProperty = !!this.obj
|
|
37408
37479
|
? PropertyJSONGenerator.getClassNameProperty(this.obj)
|
|
37409
37480
|
: "";
|
|
@@ -37413,24 +37484,34 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
37413
37484
|
this.titleActionsCreator = !!this.obj
|
|
37414
37485
|
? new PropertyGridTitleActionsCreator(this.obj, this.options)
|
|
37415
37486
|
: undefined;
|
|
37487
|
+
if (!this.surveyValue)
|
|
37488
|
+
return;
|
|
37489
|
+
this.clearSurveyValue();
|
|
37490
|
+
this.createSurveyValue();
|
|
37491
|
+
};
|
|
37492
|
+
PropertyGridModel.prototype.clearSurveyValue = function () {
|
|
37493
|
+
this.surveyValue.onValidateQuestion.clear();
|
|
37494
|
+
this.surveyValue.onValueChanging.clear();
|
|
37495
|
+
this.surveyValue.onValueChanged.clear();
|
|
37496
|
+
this.surveyValue.onMatrixCellValueChanging.clear();
|
|
37497
|
+
this.surveyValue.onMatrixCellValidate.clear();
|
|
37498
|
+
this.surveyValue.onMatrixCellValueChanged.clear();
|
|
37499
|
+
this.surveyValue.editingObj = undefined;
|
|
37500
|
+
this.surveyValue.data = {};
|
|
37501
|
+
this.surveyValue.dispose();
|
|
37502
|
+
};
|
|
37503
|
+
PropertyGridModel.prototype.createSurveyValue = function () {
|
|
37504
|
+
var _this = this;
|
|
37416
37505
|
var json = this.getSurveyJSON();
|
|
37417
37506
|
if (this.options.readOnly) {
|
|
37418
37507
|
json.mode = "display";
|
|
37419
37508
|
}
|
|
37420
|
-
if (!!this.surveyValue) {
|
|
37421
|
-
this.surveyValue.onValidateQuestion.clear();
|
|
37422
|
-
this.surveyValue.onValueChanging.clear();
|
|
37423
|
-
this.surveyValue.onValueChanged.clear();
|
|
37424
|
-
this.surveyValue.onMatrixCellValueChanging.clear();
|
|
37425
|
-
this.surveyValue.onMatrixCellValidate.clear();
|
|
37426
|
-
this.surveyValue.onMatrixCellValueChanged.clear();
|
|
37427
|
-
this.surveyValue.editingObj = undefined;
|
|
37428
|
-
this.surveyValue.data = {};
|
|
37429
|
-
this.surveyValue.dispose();
|
|
37430
|
-
}
|
|
37431
37509
|
this.surveyValue = this.createSurvey(json, function (survey) {
|
|
37432
37510
|
_this.onCreateSurvey(survey);
|
|
37433
37511
|
});
|
|
37512
|
+
if (this.onNewSurveyCreatedCallback) {
|
|
37513
|
+
this.onNewSurveyCreatedCallback();
|
|
37514
|
+
}
|
|
37434
37515
|
if (!this.obj)
|
|
37435
37516
|
return;
|
|
37436
37517
|
this.survey.onValueChanged.add(function (sender, options) {
|
|
@@ -37497,9 +37578,6 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
37497
37578
|
}
|
|
37498
37579
|
});
|
|
37499
37580
|
this.survey.editingObj = this.obj;
|
|
37500
|
-
if (this.objValueChangedCallback) {
|
|
37501
|
-
this.objValueChangedCallback();
|
|
37502
|
-
}
|
|
37503
37581
|
this.updateDependedPropertiesEditors();
|
|
37504
37582
|
if (this.showOneCategoryInPropertyGrid) {
|
|
37505
37583
|
this.survey.onCurrentPageChanged.add(function (sender, options) {
|
|
@@ -37613,6 +37691,9 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
37613
37691
|
});
|
|
37614
37692
|
Object.defineProperty(PropertyGridModel.prototype, "survey", {
|
|
37615
37693
|
get: function () {
|
|
37694
|
+
if (!this.surveyValue) {
|
|
37695
|
+
this.createSurveyValue();
|
|
37696
|
+
}
|
|
37616
37697
|
return this.surveyValue;
|
|
37617
37698
|
},
|
|
37618
37699
|
enumerable: false,
|
|
@@ -37658,6 +37739,8 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
37658
37739
|
});
|
|
37659
37740
|
};
|
|
37660
37741
|
PropertyGridModel.prototype.expandCategoryIfNeeded = function () {
|
|
37742
|
+
if (!this.surveyValue)
|
|
37743
|
+
return;
|
|
37661
37744
|
var expandedTabName = _creator_settings__WEBPACK_IMPORTED_MODULE_6__.settings.propertyGrid.defaultExpandedTabName;
|
|
37662
37745
|
if (!!expandedTabName && !this.getPropertyGridExpandedCategory()) {
|
|
37663
37746
|
var panel = this.survey.getPanelByName(expandedTabName);
|
|
@@ -37752,9 +37835,6 @@ var PropertyGridModel = /** @class */ (function () {
|
|
|
37752
37835
|
options.name === this.classNameProperty &&
|
|
37753
37836
|
this.classNameValue !== options.value) {
|
|
37754
37837
|
this.setObj(this.obj);
|
|
37755
|
-
if (this.onSetNewObjectCallback) {
|
|
37756
|
-
this.onSetNewObjectCallback();
|
|
37757
|
-
}
|
|
37758
37838
|
if (!!this.survey) {
|
|
37759
37839
|
var question = this.survey.getQuestionByName(options.name);
|
|
37760
37840
|
if (!!question) {
|
|
@@ -39988,8 +40068,11 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
|
|
|
39988
40068
|
_this.searchManager = new _search_manager__WEBPACK_IMPORTED_MODULE_6__.SearchManagerPropertyGrid();
|
|
39989
40069
|
_this.searchEnabled = _creator_settings__WEBPACK_IMPORTED_MODULE_4__.settings.propertyGrid.enableSearch;
|
|
39990
40070
|
_this.selectedElementName = _this.getTitle();
|
|
39991
|
-
_this.propertyGridModel.
|
|
39992
|
-
_this.
|
|
40071
|
+
_this.propertyGridModel.onSetNewObjectCallback = function () {
|
|
40072
|
+
_this.onSurveyObjChanged();
|
|
40073
|
+
};
|
|
40074
|
+
_this.propertyGridModel.onNewSurveyCreatedCallback = function () {
|
|
40075
|
+
_this.onNewSurveyCreated();
|
|
39993
40076
|
};
|
|
39994
40077
|
_this.propertyGridModel.changedFromActionCallback = function (obj, propertyName) {
|
|
39995
40078
|
if (!!_this.selectionController) {
|
|
@@ -40002,9 +40085,20 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
|
|
|
40002
40085
|
_this.selectorPopupModel.horizontalPosition = _this.creator.sidebarLocation == "right" ? "left" : "right";
|
|
40003
40086
|
}
|
|
40004
40087
|
});
|
|
40005
|
-
_this.
|
|
40088
|
+
_this.onSurveyObjChanged();
|
|
40006
40089
|
return _this;
|
|
40007
40090
|
}
|
|
40091
|
+
Object.defineProperty(PropertyGridViewModel.prototype, "survey", {
|
|
40092
|
+
get: function () {
|
|
40093
|
+
var _this = this;
|
|
40094
|
+
return this.getPropertyValue("survey", undefined, function () { return _this.propertyGridModel.survey; });
|
|
40095
|
+
},
|
|
40096
|
+
set: function (val) {
|
|
40097
|
+
this.setPropertyValue("survey", val);
|
|
40098
|
+
},
|
|
40099
|
+
enumerable: false,
|
|
40100
|
+
configurable: true
|
|
40101
|
+
});
|
|
40008
40102
|
Object.defineProperty(PropertyGridViewModel.prototype, "rootCss", {
|
|
40009
40103
|
get: function () {
|
|
40010
40104
|
return new survey_core__WEBPACK_IMPORTED_MODULE_1__.CssClassBuilder()
|
|
@@ -40031,7 +40125,14 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
|
|
|
40031
40125
|
enumerable: false,
|
|
40032
40126
|
configurable: true
|
|
40033
40127
|
});
|
|
40034
|
-
PropertyGridViewModel.prototype.
|
|
40128
|
+
PropertyGridViewModel.prototype.onSurveyObjChanged = function () {
|
|
40129
|
+
this.updateTitle();
|
|
40130
|
+
if (this.selectionController) {
|
|
40131
|
+
this.hasPrev = this.selectionController.hasPrev;
|
|
40132
|
+
this.hasNext = this.selectionController.hasNext;
|
|
40133
|
+
}
|
|
40134
|
+
};
|
|
40135
|
+
PropertyGridViewModel.prototype.onNewSurveyCreated = function () {
|
|
40035
40136
|
var _this = this;
|
|
40036
40137
|
this.survey = this.propertyGridModel.survey;
|
|
40037
40138
|
this.searchManager.setSurvey(this.survey);
|
|
@@ -40042,10 +40143,8 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
|
|
|
40042
40143
|
}
|
|
40043
40144
|
});
|
|
40044
40145
|
}
|
|
40045
|
-
this.
|
|
40046
|
-
|
|
40047
|
-
this.hasPrev = this.selectionController.hasPrev;
|
|
40048
|
-
this.hasNext = this.selectionController.hasNext;
|
|
40146
|
+
if (this.onNewSurveyCreatedCallback) {
|
|
40147
|
+
this.onNewSurveyCreatedCallback();
|
|
40049
40148
|
}
|
|
40050
40149
|
};
|
|
40051
40150
|
PropertyGridViewModel.prototype.updateTitle = function () {
|
|
@@ -40146,9 +40245,6 @@ var PropertyGridViewModel = /** @class */ (function (_super) {
|
|
|
40146
40245
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
40147
40246
|
(0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
|
|
40148
40247
|
], PropertyGridViewModel.prototype, "hasNext", void 0);
|
|
40149
|
-
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
40150
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
|
|
40151
|
-
], PropertyGridViewModel.prototype, "survey", void 0);
|
|
40152
40248
|
(0,tslib__WEBPACK_IMPORTED_MODULE_0__.__decorate)([
|
|
40153
40249
|
(0,survey_core__WEBPACK_IMPORTED_MODULE_1__.property)()
|
|
40154
40250
|
], PropertyGridViewModel.prototype, "selectedElementName", void 0);
|
|
@@ -47031,7 +47127,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47031
47127
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! survey-core */ "survey-core");
|
|
47032
47128
|
/* harmony import */ var survey_core__WEBPACK_IMPORTED_MODULE_100___default = /*#__PURE__*/__webpack_require__.n(survey_core__WEBPACK_IMPORTED_MODULE_100__);
|
|
47033
47129
|
var Version;
|
|
47034
|
-
Version = "".concat("2.0.0-rc.
|
|
47130
|
+
Version = "".concat("2.0.0-rc.7");
|
|
47035
47131
|
//should be loaded before other styles for easier override
|
|
47036
47132
|
__webpack_require__(/*! ../utils/context-button.scss */ "./src/utils/context-button.scss");
|
|
47037
47133
|
|
|
@@ -47155,7 +47251,7 @@ __webpack_require__(/*! ../property-grid-theme/property-grid.scss */ "./src/prop
|
|
|
47155
47251
|
__webpack_require__(/*! ../utils/layout.scss */ "./src/utils/layout.scss");
|
|
47156
47252
|
__webpack_require__(/*! ../custom-questions/boolean-switch.scss */ "./src/custom-questions/boolean-switch.scss");
|
|
47157
47253
|
|
|
47158
|
-
(0,survey_core__WEBPACK_IMPORTED_MODULE_100__.checkLibraryVersion)("".concat("2.0.0-rc.
|
|
47254
|
+
(0,survey_core__WEBPACK_IMPORTED_MODULE_100__.checkLibraryVersion)("".concat("2.0.0-rc.7"), "survey-creator-core");
|
|
47159
47255
|
|
|
47160
47256
|
})();
|
|
47161
47257
|
|