survey-react 1.11.5 → 1.11.6
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/defaultV2.css +5 -1
- package/defaultV2.css.map +1 -1
- package/defaultV2.min.css +2 -2
- package/modern.css +1 -1
- package/modern.min.css +1 -1
- package/package.json +1 -1
- package/survey.css +1 -1
- package/survey.min.css +1 -1
- package/survey.react.d.ts +47 -67
- package/survey.react.js +107 -54
- package/survey.react.js.map +1 -1
- package/survey.react.min.js +3 -3
package/modern.css
CHANGED
package/modern.min.css
CHANGED
package/package.json
CHANGED
package/survey.css
CHANGED
package/survey.min.css
CHANGED
package/survey.react.d.ts
CHANGED
@@ -1179,6 +1179,7 @@ declare module "actions/action" {
|
|
1179
1179
|
* [View Demo](https://surveyjs.io/form-library/examples/add-custom-navigation-button/ (linkStyle))
|
1180
1180
|
*/
|
1181
1181
|
action?: (context?: any) => void;
|
1182
|
+
onFocus?: (isMouse: boolean, event: any) => void;
|
1182
1183
|
/**
|
1183
1184
|
* One or several CSS classes that you want to apply to the outer `<div>` element.
|
1184
1185
|
*
|
@@ -1373,6 +1374,7 @@ declare module "actions/action" {
|
|
1373
1374
|
locTooltipName?: string;
|
1374
1375
|
private _enabled;
|
1375
1376
|
action: (context?: any, isUserAction?: boolean) => void;
|
1377
|
+
onFocus: (isMouse: boolean, event: any) => void;
|
1376
1378
|
_component: string;
|
1377
1379
|
items: any;
|
1378
1380
|
_title: string;
|
@@ -1383,6 +1385,10 @@ declare module "actions/action" {
|
|
1383
1385
|
get locTitleName(): string;
|
1384
1386
|
set locTitleName(val: string);
|
1385
1387
|
locStrsChanged(): void;
|
1388
|
+
doAction(args: any): boolean;
|
1389
|
+
private isMouseDown;
|
1390
|
+
doMouseDown(): void;
|
1391
|
+
doFocus(args: any): void;
|
1386
1392
|
private locStrChangedInPopupModel;
|
1387
1393
|
private locTitleChanged;
|
1388
1394
|
private locTooltipChanged;
|
@@ -1561,6 +1567,7 @@ declare module "defaultCss/defaultV2Css" {
|
|
1561
1567
|
titleExpanded: string;
|
1562
1568
|
titleCollapsed: string;
|
1563
1569
|
titleDisabled: string;
|
1570
|
+
titleHidden: string;
|
1564
1571
|
titleOnExpand: string;
|
1565
1572
|
titleOnError: string;
|
1566
1573
|
titleBar: string;
|
@@ -6813,7 +6820,7 @@ declare module "question_paneldynamic" {
|
|
6813
6820
|
private removedPanelIndex;
|
6814
6821
|
removePanel(value: any): void;
|
6815
6822
|
private getVisualPanelIndex;
|
6816
|
-
private
|
6823
|
+
private getPanelVisibleIndexById;
|
6817
6824
|
locStrsChanged(): void;
|
6818
6825
|
clearIncorrectValues(): void;
|
6819
6826
|
clearErrors(): void;
|
@@ -8012,7 +8019,7 @@ declare module "survey-events-api" {
|
|
8012
8019
|
* A Boolean property that you can set to `false` if you want to cancel the drag and drop operation.
|
8013
8020
|
*/
|
8014
8021
|
allow: boolean;
|
8015
|
-
|
8022
|
+
allowDropNextToAnother?: boolean;
|
8016
8023
|
/**
|
8017
8024
|
* Obsolete. Use `options.draggedElement` instead.
|
8018
8025
|
*/
|
@@ -10920,6 +10927,24 @@ declare module "survey" {
|
|
10920
10927
|
*/
|
10921
10928
|
mergeData(data: any): void;
|
10922
10929
|
setDataCore(data: any, clearData?: boolean): void;
|
10930
|
+
get isSurvey(): boolean;
|
10931
|
+
/**
|
10932
|
+
* Returns an object with survey results.
|
10933
|
+
*
|
10934
|
+
* If you want to get a survey results object that mirrors the survey structure, call the `getData()` method with an object that has the `includePages` and `includePanels` properties enabled. Without this object, the `getData()` method returns the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property value.
|
10935
|
+
*
|
10936
|
+
* ```js
|
10937
|
+
* import { Model } from "survey-core";
|
10938
|
+
*
|
10939
|
+
* const surveyJson = { ... };
|
10940
|
+
* const survey = new Model(surveyJson);
|
10941
|
+
* survey.getData({ includePages: true, includePanels: true });
|
10942
|
+
* ```
|
10943
|
+
*/
|
10944
|
+
getData(options?: {
|
10945
|
+
includePages?: boolean;
|
10946
|
+
includePanels?: boolean;
|
10947
|
+
}): any;
|
10923
10948
|
getStructuredData(includePages?: boolean, level?: number): any;
|
10924
10949
|
setStructuredData(data: any, doMerge?: boolean): void;
|
10925
10950
|
private collectDataFromPanel;
|
@@ -12181,55 +12206,6 @@ declare module "survey" {
|
|
12181
12206
|
questionErrorComponent: string;
|
12182
12207
|
}
|
12183
12208
|
}
|
12184
|
-
declare module "knockout/kobase" {
|
12185
|
-
import { Base } from "entries/core";
|
12186
|
-
export class ImplementorBase {
|
12187
|
-
element: Base;
|
12188
|
-
private static doIterateProperties;
|
12189
|
-
readonly implementedMark = "__surveyImplementedKo";
|
12190
|
-
constructor(element: Base);
|
12191
|
-
dispose(): void;
|
12192
|
-
}
|
12193
|
-
}
|
12194
|
-
declare module "knockout/kopage" {
|
12195
|
-
import { PageModel } from "entries/core";
|
12196
|
-
import { PanelModelBase, PanelModel, QuestionRowModel } from "entries/core";
|
12197
|
-
import { SurveyElement } from "entries/core";
|
12198
|
-
import { ImplementorBase } from "knockout/kobase";
|
12199
|
-
export class QuestionRow extends QuestionRowModel {
|
12200
|
-
panel: PanelModelBase;
|
12201
|
-
koElementAfterRender: any;
|
12202
|
-
constructor(panel: PanelModelBase);
|
12203
|
-
getElementType(el: any): "survey-panel" | "survey-question";
|
12204
|
-
koAfterRender(htmlElements: any, element: SurveyElement): void;
|
12205
|
-
private elementAfterRender;
|
12206
|
-
rowAfterRender(elements: HTMLElement[], model: QuestionRow): void;
|
12207
|
-
dispose(): void;
|
12208
|
-
}
|
12209
|
-
export class PanelImplementorBase extends ImplementorBase {
|
12210
|
-
panel: PanelModelBase;
|
12211
|
-
constructor(panel: PanelModelBase);
|
12212
|
-
}
|
12213
|
-
export class Panel extends PanelModel {
|
12214
|
-
private _implementor;
|
12215
|
-
koElementType: any;
|
12216
|
-
constructor(name?: string);
|
12217
|
-
protected onBaseCreating(): void;
|
12218
|
-
createRow(): QuestionRowModel;
|
12219
|
-
protected onCreating(): void;
|
12220
|
-
protected onNumChanged(value: number): void;
|
12221
|
-
dispose(): void;
|
12222
|
-
}
|
12223
|
-
export class Page extends PageModel {
|
12224
|
-
private _implementor;
|
12225
|
-
constructor(name?: string);
|
12226
|
-
protected onBaseCreating(): void;
|
12227
|
-
createRow(): QuestionRowModel;
|
12228
|
-
protected onCreating(): void;
|
12229
|
-
protected onNumChanged(value: number): void;
|
12230
|
-
dispose(): void;
|
12231
|
-
}
|
12232
|
-
}
|
12233
12209
|
declare module "survey-element" {
|
12234
12210
|
import { Base } from "base";
|
12235
12211
|
import { IAction } from "actions/action";
|
@@ -12244,6 +12220,26 @@ declare module "survey-element" {
|
|
12244
12220
|
export abstract class SurveyElementCore extends Base implements ILocalizableOwner {
|
12245
12221
|
constructor();
|
12246
12222
|
protected createLocTitleProperty(): LocalizableString;
|
12223
|
+
/**
|
12224
|
+
* Returns `true` if the survey element is a page.
|
12225
|
+
* @see Base.getType
|
12226
|
+
*/
|
12227
|
+
get isPage(): boolean;
|
12228
|
+
/**
|
12229
|
+
* Returns `true` if the survey element is a panel.
|
12230
|
+
* @see Base.getType
|
12231
|
+
*/
|
12232
|
+
get isPanel(): boolean;
|
12233
|
+
/**
|
12234
|
+
* Returns `true` if the survey element is a question.
|
12235
|
+
* @see Base.getType
|
12236
|
+
*/
|
12237
|
+
get isQuestion(): boolean;
|
12238
|
+
/**
|
12239
|
+
* Returns `true` if the element is a survey.
|
12240
|
+
* @see Base.getType
|
12241
|
+
*/
|
12242
|
+
get isSurvey(): boolean;
|
12247
12243
|
/**
|
12248
12244
|
* A title for the survey element. If `title` is undefined, the `name` property value is displayed instead.
|
12249
12245
|
*
|
@@ -12511,21 +12507,6 @@ declare module "survey-element" {
|
|
12511
12507
|
onFirstRendering(): void;
|
12512
12508
|
endLoadingFromJson(): void;
|
12513
12509
|
setVisibleIndex(index: number): number;
|
12514
|
-
/**
|
12515
|
-
* Returns `true` if the survey element is a page.
|
12516
|
-
* @see Base.getType
|
12517
|
-
*/
|
12518
|
-
get isPage(): boolean;
|
12519
|
-
/**
|
12520
|
-
* Returns `true` if the survey element is a panel.
|
12521
|
-
* @see Base.getType
|
12522
|
-
*/
|
12523
|
-
get isPanel(): boolean;
|
12524
|
-
/**
|
12525
|
-
* Returns `true` if the survey element is a question.
|
12526
|
-
* @see Base.getType
|
12527
|
-
*/
|
12528
|
-
get isQuestion(): boolean;
|
12529
12510
|
delete(doDispose: boolean): void;
|
12530
12511
|
locOwner: ILocalizableOwner;
|
12531
12512
|
/**
|
@@ -16310,7 +16291,6 @@ declare module "dropdownListModel" {
|
|
16310
16291
|
protected readonly itemSelector = ".sv-list__item";
|
16311
16292
|
protected getFocusFirstInputSelector(): string;
|
16312
16293
|
private itemsSettings;
|
16313
|
-
private isRunningLoadQuestionChoices;
|
16314
16294
|
protected listModel: ListModel<ItemValue>;
|
16315
16295
|
protected popupCssClasses: string;
|
16316
16296
|
protected listModelFilterStringChanged: (newValue: string) => void;
|
package/survey.react.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
/*!
|
2
|
-
* surveyjs - Survey JavaScript library v1.11.
|
2
|
+
* surveyjs - Survey JavaScript library v1.11.6
|
3
3
|
* Copyright (c) 2015-2024 Devsoft Baltic OÜ - http://surveyjs.io/
|
4
4
|
* License: MIT (http://www.opensource.org/licenses/mit-license.php)
|
5
5
|
*/
|
@@ -1147,6 +1147,23 @@ var Action = /** @class */ (function (_super) {
|
|
1147
1147
|
this.locTooltipChanged();
|
1148
1148
|
this.locStrChangedInPopupModel();
|
1149
1149
|
};
|
1150
|
+
Action.prototype.doAction = function (args) {
|
1151
|
+
var evt = !!args.originalEvent ? args.originalEvent : args;
|
1152
|
+
this.action(this, evt.isTrusted);
|
1153
|
+
evt.preventDefault();
|
1154
|
+
evt.stopPropagation();
|
1155
|
+
return true;
|
1156
|
+
};
|
1157
|
+
Action.prototype.doMouseDown = function () {
|
1158
|
+
this.isMouseDown = true;
|
1159
|
+
};
|
1160
|
+
Action.prototype.doFocus = function (args) {
|
1161
|
+
if (!!this.onFocus) {
|
1162
|
+
var evt = !!args.originalEvent ? args.originalEvent : args;
|
1163
|
+
this.onFocus(this.isMouseDown, evt);
|
1164
|
+
}
|
1165
|
+
this.isMouseDown = false;
|
1166
|
+
};
|
1150
1167
|
Action.prototype.locStrChangedInPopupModel = function () {
|
1151
1168
|
if (!this.popupModel || !this.popupModel.contentComponentData || !this.popupModel.contentComponentData.model)
|
1152
1169
|
return;
|
@@ -1227,6 +1244,9 @@ var Action = /** @class */ (function (_super) {
|
|
1227
1244
|
__decorate([
|
1228
1245
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1229
1246
|
], Action.prototype, "action", void 0);
|
1247
|
+
__decorate([
|
1248
|
+
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1249
|
+
], Action.prototype, "onFocus", void 0);
|
1230
1250
|
__decorate([
|
1231
1251
|
Object(_jsonobject__WEBPACK_IMPORTED_MODULE_2__["property"])()
|
1232
1252
|
], Action.prototype, "_component", void 0);
|
@@ -5616,6 +5636,7 @@ var defaultV2Css = {
|
|
5616
5636
|
titleExpanded: "sd-element__title--expanded",
|
5617
5637
|
titleCollapsed: "sd-element__title--collapsed",
|
5618
5638
|
titleDisabled: "sd-element__title--disabled",
|
5639
|
+
titleHidden: "sd-element__title--hidden",
|
5619
5640
|
titleOnExpand: "sd-panel__title--expanded",
|
5620
5641
|
titleOnError: "sd-panel__title--error",
|
5621
5642
|
titleBar: "sd-action-title-bar",
|
@@ -8184,7 +8205,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8184
8205
|
_this.selectedItemSelector = ".sv-list__item--selected";
|
8185
8206
|
_this.itemSelector = ".sv-list__item";
|
8186
8207
|
_this.itemsSettings = { skip: 0, take: 0, totalCount: 0, items: [] };
|
8187
|
-
_this.isRunningLoadQuestionChoices = false;
|
8188
8208
|
_this.popupCssClasses = "sv-single-select-list";
|
8189
8209
|
_this.listModelFilterStringChanged = function (newValue) {
|
8190
8210
|
if (_this.filterString !== newValue) {
|
@@ -8235,14 +8255,12 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8235
8255
|
};
|
8236
8256
|
DropdownListModel.prototype.loadQuestionChoices = function (callbackAfterItemsLoaded) {
|
8237
8257
|
var _this = this;
|
8238
|
-
this.isRunningLoadQuestionChoices = true;
|
8239
8258
|
this.question.survey.loadQuestionChoices({
|
8240
8259
|
question: this.question,
|
8241
8260
|
filter: this.filterString,
|
8242
8261
|
skip: this.itemsSettings.skip,
|
8243
8262
|
take: this.itemsSettings.take,
|
8244
8263
|
setItems: function (items, totalCount) {
|
8245
|
-
_this.isRunningLoadQuestionChoices = false;
|
8246
8264
|
_this.setItems(items || [], totalCount || 0);
|
8247
8265
|
_this.popupRecalculatePosition(_this.itemsSettings.skip === _this.itemsSettings.take);
|
8248
8266
|
if (!!callbackAfterItemsLoaded) {
|
@@ -8254,8 +8272,6 @@ var DropdownListModel = /** @class */ (function (_super) {
|
|
8254
8272
|
};
|
8255
8273
|
DropdownListModel.prototype.updateQuestionChoices = function (callbackAfterItemsLoaded) {
|
8256
8274
|
var _this = this;
|
8257
|
-
if (this.isRunningLoadQuestionChoices)
|
8258
|
-
return;
|
8259
8275
|
var isUpdate = (this.itemsSettings.skip + 1) < this.itemsSettings.totalCount;
|
8260
8276
|
if (!this.itemsSettings.skip || isUpdate) {
|
8261
8277
|
if (!!this.filterString && _settings__WEBPACK_IMPORTED_MODULE_7__["settings"].dropdownSearchDelay > 0) {
|
@@ -9937,8 +9953,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
9937
9953
|
|
9938
9954
|
var Version;
|
9939
9955
|
var ReleaseDate;
|
9940
|
-
Version = "" + "1.11.
|
9941
|
-
ReleaseDate = "" + "2024-07-
|
9956
|
+
Version = "" + "1.11.6";
|
9957
|
+
ReleaseDate = "" + "2024-07-10";
|
9942
9958
|
function checkLibraryVersion(ver, libraryName) {
|
9943
9959
|
if (Version != ver) {
|
9944
9960
|
var str = "survey-core has version '" + Version + "' and " + libraryName
|
@@ -21233,7 +21249,7 @@ var JsonObject = /** @class */ (function () {
|
|
21233
21249
|
JsonObject.prototype.toJsonObjectCore = function (obj, property, options) {
|
21234
21250
|
if (!obj || !obj.getType)
|
21235
21251
|
return obj;
|
21236
|
-
if (typeof obj.getData === "function")
|
21252
|
+
if (!obj.isSurvey && typeof obj.getData === "function")
|
21237
21253
|
return obj.getData();
|
21238
21254
|
var result = {};
|
21239
21255
|
if (property != null && !property.className) {
|
@@ -23817,7 +23833,7 @@ var dutchSurveyStrings = {
|
|
23817
23833
|
choices_Item: "onderwerp",
|
23818
23834
|
matrix_column: "Kolom",
|
23819
23835
|
matrix_row: "Rij",
|
23820
|
-
multipletext_itemname: "
|
23836
|
+
multipletext_itemname: "Tekst",
|
23821
23837
|
savingData: "De resultaten worden bewaard op de server...",
|
23822
23838
|
savingDataError: "Er was een probleem en we konden de resultaten niet bewaren.",
|
23823
23839
|
savingDataSuccess: "De resultaten werden succesvol bewaard!",
|
@@ -31942,6 +31958,8 @@ var InputMaskNumeric = /** @class */ (function (_super) {
|
|
31942
31958
|
InputMaskNumeric.prototype.validateNumber = function (number, matchWholeMask) {
|
31943
31959
|
var min = this.min || Number.MIN_SAFE_INTEGER;
|
31944
31960
|
var max = this.max || Number.MAX_SAFE_INTEGER;
|
31961
|
+
if (this.numericalCompositionIsEmpty(number))
|
31962
|
+
return true;
|
31945
31963
|
if (this.min !== undefined || this.max !== undefined) {
|
31946
31964
|
var value = this.convertNumber(number);
|
31947
31965
|
if (Number.isNaN(value)) {
|
@@ -35186,7 +35204,7 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35186
35204
|
var _this = this;
|
35187
35205
|
var locTitleValue = _super.prototype.createLocTitleProperty.call(this);
|
35188
35206
|
locTitleValue.onGetTextCallback = function (text) {
|
35189
|
-
if (!text && (_this.state !== "default")) {
|
35207
|
+
if (!text && (_this.state !== "default" || (_this.isDesignMode && _this.isDefaultV2Theme))) {
|
35190
35208
|
text = _this.name;
|
35191
35209
|
}
|
35192
35210
|
return text;
|
@@ -35349,7 +35367,10 @@ var PanelModel = /** @class */ (function (_super) {
|
|
35349
35367
|
};
|
35350
35368
|
Object.defineProperty(PanelModel.prototype, "cssTitle", {
|
35351
35369
|
get: function () {
|
35352
|
-
return
|
35370
|
+
return new _utils_cssClassBuilder__WEBPACK_IMPORTED_MODULE_9__["CssClassBuilder"]()
|
35371
|
+
.append(this.getCssTitle(this.cssClasses.panel))
|
35372
|
+
.append(this.cssClasses.panel.titleHidden, !this.title && this.isDesignMode)
|
35373
|
+
.toString();
|
35353
35374
|
},
|
35354
35375
|
enumerable: false,
|
35355
35376
|
configurable: true
|
@@ -54564,14 +54585,17 @@ var QuestionMatrixDropdownModelBase = /** @class */ (function (_super) {
|
|
54564
54585
|
var _this = this;
|
54565
54586
|
duplicatedRows.forEach(function (row) {
|
54566
54587
|
var question = row.getQuestionByName(columnName);
|
54567
|
-
|
54588
|
+
var inDetailPanel = _this.detailPanel.getQuestionByName(columnName);
|
54589
|
+
if (!question && inDetailPanel) {
|
54568
54590
|
row.showDetailPanel();
|
54569
54591
|
if (row.detailPanel) {
|
54570
54592
|
question = row.detailPanel.getQuestionByName(columnName);
|
54571
54593
|
}
|
54572
54594
|
}
|
54573
54595
|
if (question) {
|
54574
|
-
|
54596
|
+
if (inDetailPanel) {
|
54597
|
+
row.showDetailPanel();
|
54598
|
+
}
|
54575
54599
|
_this.addDuplicationError(question);
|
54576
54600
|
}
|
54577
54601
|
});
|
@@ -61673,9 +61697,10 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
61673
61697
|
}
|
61674
61698
|
return -1;
|
61675
61699
|
};
|
61676
|
-
QuestionPanelDynamicModel.prototype.
|
61677
|
-
|
61678
|
-
|
61700
|
+
QuestionPanelDynamicModel.prototype.getPanelVisibleIndexById = function (id) {
|
61701
|
+
var visPanels = this.visiblePanelsCore;
|
61702
|
+
for (var i = 0; i < visPanels.length; i++) {
|
61703
|
+
if (visPanels[i].id === id)
|
61679
61704
|
return i;
|
61680
61705
|
}
|
61681
61706
|
return -1;
|
@@ -62590,14 +62615,14 @@ var QuestionPanelDynamicModel = /** @class */ (function (_super) {
|
|
62590
62615
|
return options.title;
|
62591
62616
|
};
|
62592
62617
|
locTitle.sharedData = this.locTemplateTabTitle;
|
62593
|
-
var isActive = this.
|
62618
|
+
var isActive = this.getPanelVisibleIndexById(panel.id) === this.currentIndex;
|
62594
62619
|
var newItem = new _actions_action__WEBPACK_IMPORTED_MODULE_11__["Action"]({
|
62595
62620
|
id: panel.id,
|
62596
62621
|
pressed: isActive,
|
62597
62622
|
locTitle: locTitle,
|
62598
62623
|
disableHide: isActive,
|
62599
62624
|
action: function () {
|
62600
|
-
_this.currentIndex = _this.
|
62625
|
+
_this.currentIndex = _this.getPanelVisibleIndexById(newItem.id);
|
62601
62626
|
}
|
62602
62627
|
});
|
62603
62628
|
return newItem;
|
@@ -63274,6 +63299,7 @@ var QuestionRankingModel = /** @class */ (function (_super) {
|
|
63274
63299
|
QuestionRankingModel.prototype.onSurveyLoad = function () {
|
63275
63300
|
this.blockAnimations();
|
63276
63301
|
_super.prototype.onSurveyLoad.call(this);
|
63302
|
+
this.updateRankingChoices();
|
63277
63303
|
this.releaseAnimations();
|
63278
63304
|
};
|
63279
63305
|
QuestionRankingModel.prototype.addToValueByVisibleChoices = function () {
|
@@ -67740,7 +67766,7 @@ var SurveyActionBarItem = /** @class */ (function (_super) {
|
|
67740
67766
|
var title = this.item.tooltip || this.item.title;
|
67741
67767
|
var buttonContent = this.renderButtonContent();
|
67742
67768
|
var tabIndex = this.item.disableTabStop ? -1 : undefined;
|
67743
|
-
var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled,
|
67769
|
+
var button = Object(_reactSurvey__WEBPACK_IMPORTED_MODULE_3__["attachKey2click"])(react__WEBPACK_IMPORTED_MODULE_0___default.a.createElement("button", { className: className, type: "button", disabled: this.item.disabled, onMouseDown: function () { return _this.item.doMouseDown(); }, onFocus: function (args) { return _this.item.doFocus(args); }, onClick: function (args) { return _this.item.doAction(args); }, title: title, tabIndex: tabIndex, "aria-checked": this.item.ariaChecked, "aria-expanded": this.item.ariaExpanded, role: this.item.ariaRole }, buttonContent), this.item, { processEsc: false });
|
67744
67770
|
return button;
|
67745
67771
|
};
|
67746
67772
|
return SurveyActionBarItem;
|
@@ -72967,7 +72993,7 @@ function attachKey2click(element, viewModel, options) {
|
|
72967
72993
|
return false;
|
72968
72994
|
},
|
72969
72995
|
onKeyDown: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickDown"])(evt, options); },
|
72970
|
-
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); }
|
72996
|
+
onBlur: function (evt) { return Object(survey_core__WEBPACK_IMPORTED_MODULE_1__["doKey2ClickBlur"])(evt); },
|
72971
72997
|
});
|
72972
72998
|
}
|
72973
72999
|
|
@@ -78984,6 +79010,42 @@ var SurveyElementCore = /** @class */ (function (_super) {
|
|
78984
79010
|
SurveyElementCore.prototype.createLocTitleProperty = function () {
|
78985
79011
|
return this.createLocalizableString("title", this, true);
|
78986
79012
|
};
|
79013
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPage", {
|
79014
|
+
/**
|
79015
|
+
* Returns `true` if the survey element is a page.
|
79016
|
+
* @see Base.getType
|
79017
|
+
*/
|
79018
|
+
get: function () { return false; },
|
79019
|
+
enumerable: false,
|
79020
|
+
configurable: true
|
79021
|
+
});
|
79022
|
+
Object.defineProperty(SurveyElementCore.prototype, "isPanel", {
|
79023
|
+
/**
|
79024
|
+
* Returns `true` if the survey element is a panel.
|
79025
|
+
* @see Base.getType
|
79026
|
+
*/
|
79027
|
+
get: function () { return false; },
|
79028
|
+
enumerable: false,
|
79029
|
+
configurable: true
|
79030
|
+
});
|
79031
|
+
Object.defineProperty(SurveyElementCore.prototype, "isQuestion", {
|
79032
|
+
/**
|
79033
|
+
* Returns `true` if the survey element is a question.
|
79034
|
+
* @see Base.getType
|
79035
|
+
*/
|
79036
|
+
get: function () { return false; },
|
79037
|
+
enumerable: false,
|
79038
|
+
configurable: true
|
79039
|
+
});
|
79040
|
+
Object.defineProperty(SurveyElementCore.prototype, "isSurvey", {
|
79041
|
+
/**
|
79042
|
+
* Returns `true` if the element is a survey.
|
79043
|
+
* @see Base.getType
|
79044
|
+
*/
|
79045
|
+
get: function () { return false; },
|
79046
|
+
enumerable: false,
|
79047
|
+
configurable: true
|
79048
|
+
});
|
78987
79049
|
Object.defineProperty(SurveyElementCore.prototype, "title", {
|
78988
79050
|
/**
|
78989
79051
|
* A title for the survey element. If `title` is undefined, the `name` property value is displayed instead.
|
@@ -79815,39 +79877,6 @@ var SurveyElement = /** @class */ (function (_super) {
|
|
79815
79877
|
SurveyElement.prototype.setVisibleIndex = function (index) {
|
79816
79878
|
return 0;
|
79817
79879
|
};
|
79818
|
-
Object.defineProperty(SurveyElement.prototype, "isPage", {
|
79819
|
-
/**
|
79820
|
-
* Returns `true` if the survey element is a page.
|
79821
|
-
* @see Base.getType
|
79822
|
-
*/
|
79823
|
-
get: function () {
|
79824
|
-
return false;
|
79825
|
-
},
|
79826
|
-
enumerable: false,
|
79827
|
-
configurable: true
|
79828
|
-
});
|
79829
|
-
Object.defineProperty(SurveyElement.prototype, "isPanel", {
|
79830
|
-
/**
|
79831
|
-
* Returns `true` if the survey element is a panel.
|
79832
|
-
* @see Base.getType
|
79833
|
-
*/
|
79834
|
-
get: function () {
|
79835
|
-
return false;
|
79836
|
-
},
|
79837
|
-
enumerable: false,
|
79838
|
-
configurable: true
|
79839
|
-
});
|
79840
|
-
Object.defineProperty(SurveyElement.prototype, "isQuestion", {
|
79841
|
-
/**
|
79842
|
-
* Returns `true` if the survey element is a question.
|
79843
|
-
* @see Base.getType
|
79844
|
-
*/
|
79845
|
-
get: function () {
|
79846
|
-
return false;
|
79847
|
-
},
|
79848
|
-
enumerable: false,
|
79849
|
-
configurable: true
|
79850
|
-
});
|
79851
79880
|
SurveyElement.prototype.delete = function (doDispose) { };
|
79852
79881
|
/**
|
79853
79882
|
* Returns the survey's [locale](https://surveyjs.io/form-library/documentation/surveymodel#locale).
|
@@ -83733,6 +83762,30 @@ var SurveyModel = /** @class */ (function (_super) {
|
|
83733
83762
|
this.runConditions();
|
83734
83763
|
this.updateAllQuestionsValue(clearData);
|
83735
83764
|
};
|
83765
|
+
Object.defineProperty(SurveyModel.prototype, "isSurvey", {
|
83766
|
+
get: function () { return true; },
|
83767
|
+
enumerable: false,
|
83768
|
+
configurable: true
|
83769
|
+
});
|
83770
|
+
/**
|
83771
|
+
* Returns an object with survey results.
|
83772
|
+
*
|
83773
|
+
* If you want to get a survey results object that mirrors the survey structure, call the `getData()` method with an object that has the `includePages` and `includePanels` properties enabled. Without this object, the `getData()` method returns the [`data`](https://surveyjs.io/form-library/documentation/api-reference/survey-data-model#data) property value.
|
83774
|
+
*
|
83775
|
+
* ```js
|
83776
|
+
* import { Model } from "survey-core";
|
83777
|
+
*
|
83778
|
+
* const surveyJson = { ... };
|
83779
|
+
* const survey = new Model(surveyJson);
|
83780
|
+
* survey.getData({ includePages: true, includePanels: true });
|
83781
|
+
* ```
|
83782
|
+
*/
|
83783
|
+
SurveyModel.prototype.getData = function (options) {
|
83784
|
+
var opt = options || { includePages: false, includePanels: false };
|
83785
|
+
if (!opt.includePages && !opt.includePanels)
|
83786
|
+
return this.data;
|
83787
|
+
return this.getStructuredData(!!opt.includePages, !opt.includePanels ? (opt.includePages ? 1 : 0) : -1);
|
83788
|
+
};
|
83736
83789
|
SurveyModel.prototype.getStructuredData = function (includePages, level) {
|
83737
83790
|
if (includePages === void 0) { includePages = true; }
|
83738
83791
|
if (level === void 0) { level = -1; }
|