survey-creator-core 1.9.133 → 1.9.134

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.
Files changed (88) hide show
  1. package/fonts.fontless.css +1 -1
  2. package/fonts.fontless.min.css +1 -1
  3. package/i18n/arabic.js +1 -1
  4. package/i18n/arabic.min.js +1 -1
  5. package/i18n/bulgarian.js +1 -1
  6. package/i18n/bulgarian.min.js +1 -1
  7. package/i18n/croatian.js +1 -1
  8. package/i18n/croatian.min.js +1 -1
  9. package/i18n/czech.js +1 -1
  10. package/i18n/czech.min.js +1 -1
  11. package/i18n/danish.js +1 -1
  12. package/i18n/danish.min.js +1 -1
  13. package/i18n/dutch.js +1 -1
  14. package/i18n/dutch.min.js +1 -1
  15. package/i18n/english.js +54 -2
  16. package/i18n/english.js.map +1 -1
  17. package/i18n/english.min.js +2 -2
  18. package/i18n/finnish.js +1 -1
  19. package/i18n/finnish.min.js +1 -1
  20. package/i18n/french.js +1 -1
  21. package/i18n/french.min.js +1 -1
  22. package/i18n/german.js +1 -1
  23. package/i18n/german.min.js +1 -1
  24. package/i18n/hebrew.js +1 -1
  25. package/i18n/hebrew.min.js +1 -1
  26. package/i18n/hungarian.js +1 -1
  27. package/i18n/hungarian.min.js +1 -1
  28. package/i18n/index.js +1 -1
  29. package/i18n/index.min.js +1 -1
  30. package/i18n/indonesian.js +1 -1
  31. package/i18n/indonesian.min.js +1 -1
  32. package/i18n/italian.js +1 -1
  33. package/i18n/italian.min.js +1 -1
  34. package/i18n/japanese.js +1 -1
  35. package/i18n/japanese.min.js +1 -1
  36. package/i18n/korean.js +1 -1
  37. package/i18n/korean.min.js +1 -1
  38. package/i18n/malay.js +1 -1
  39. package/i18n/malay.min.js +1 -1
  40. package/i18n/mongolian.js +1 -1
  41. package/i18n/mongolian.min.js +1 -1
  42. package/i18n/norwegian.js +1 -1
  43. package/i18n/norwegian.min.js +1 -1
  44. package/i18n/persian.js +1 -1
  45. package/i18n/persian.min.js +1 -1
  46. package/i18n/polish.js +1 -1
  47. package/i18n/polish.min.js +1 -1
  48. package/i18n/portuguese.js +1 -1
  49. package/i18n/portuguese.min.js +1 -1
  50. package/i18n/russian.js +1 -1
  51. package/i18n/russian.min.js +1 -1
  52. package/i18n/simplified-chinese.js +1 -1
  53. package/i18n/simplified-chinese.min.js +1 -1
  54. package/i18n/slovak.js +1 -1
  55. package/i18n/slovak.min.js +1 -1
  56. package/i18n/spanish.js +1 -1
  57. package/i18n/spanish.min.js +1 -1
  58. package/i18n/swedish.js +1 -1
  59. package/i18n/swedish.min.js +1 -1
  60. package/i18n/tajik.js +1 -1
  61. package/i18n/tajik.min.js +1 -1
  62. package/i18n/traditional-chinese.js +1 -1
  63. package/i18n/traditional-chinese.min.js +1 -1
  64. package/i18n/turkish.js +1 -1
  65. package/i18n/turkish.min.js +1 -1
  66. package/package.json +2 -2
  67. package/survey-creator-core.css +11 -2
  68. package/survey-creator-core.fontless.css +10 -1
  69. package/survey-creator-core.fontless.css.map +1 -1
  70. package/survey-creator-core.fontless.min.css +2 -2
  71. package/survey-creator-core.i18n.js +1 -1
  72. package/survey-creator-core.i18n.min.js +1 -1
  73. package/survey-creator-core.js +475 -134
  74. package/survey-creator-core.js.map +1 -1
  75. package/survey-creator-core.min.css +3 -3
  76. package/survey-creator-core.min.js +5 -5
  77. package/typings/components/action-container-view-model.d.ts +1 -1
  78. package/typings/components/tabs/translation.d.ts +10 -0
  79. package/typings/creator-base.d.ts +2 -1
  80. package/typings/creator-events-api.d.ts +7 -2
  81. package/typings/creator-settings.d.ts +2 -2
  82. package/typings/editorLocalization.d.ts +58 -2
  83. package/typings/entries/index.d.ts +1 -0
  84. package/typings/localization/english.d.ts +52 -0
  85. package/typings/property-grid/index.d.ts +4 -0
  86. package/typings/property-grid/maskSettings.d.ts +20 -0
  87. package/typings/property-grid-theme/property-grid.d.ts +3 -0
  88. package/typings/questionconverter.d.ts +1 -0
@@ -17,7 +17,7 @@ export declare class SurveyElementAdornerBase<T extends SurveyElement = SurveyEl
17
17
  constructor(creator: SurveyCreatorModel, surveyElement: T);
18
18
  protected detachElement(surveyElement: T): void;
19
19
  protected attachElement(surveyElement: T): void;
20
- protected setSurveyElement(surveyElement: T, updateActions?: boolean): void;
20
+ protected setSurveyElement(surveyElement: T): void;
21
21
  protected checkActionProperties(): void;
22
22
  dispose(): void;
23
23
  protected onElementSelectedChanged(isSelected: boolean): void;
@@ -174,6 +174,9 @@ export declare class Translation extends Base implements ITranslationLocales {
174
174
  importFromCSVFileDOM(): void;
175
175
  private updateSettingsSurveyLocales;
176
176
  private resetStringsSurvey;
177
+ protected getSurveyStringsArea(): string;
178
+ protected getSurveyStringsHeaderArea(): string;
179
+ protected onSurveyStringsCreated(survey: SurveyModel): void;
177
180
  private createStringsSurvey;
178
181
  private setPlaceHolder;
179
182
  private createStringsHeaderSurvey;
@@ -224,6 +227,13 @@ export declare class Translation extends Base implements ITranslationLocales {
224
227
  private fillItemsHash;
225
228
  dispose(): void;
226
229
  }
230
+ export declare class TranslationForEditor extends Translation {
231
+ private surveyStringsCreatedCallback;
232
+ constructor(survey: SurveyModel, options: ISurveyCreatorOptions, surveyStringsCreatedCallback: (survey: SurveyModel) => void);
233
+ protected getSurveyStringsArea(): string;
234
+ protected getSurveyStringsHeaderArea(): string;
235
+ protected onSurveyStringsCreated(survey: SurveyModel): void;
236
+ }
227
237
  export declare class TranslationEditor {
228
238
  fromLocales: Array<string>;
229
239
  private survey;
@@ -933,6 +933,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
933
933
  addCollectionItemsJson(json: any, insertPageIndex?: number): void;
934
934
  private updateAddingSurvey;
935
935
  private updateAddingPages;
936
+ private updateAddingExistingElements;
936
937
  private updateAddingPanels;
937
938
  private updateAddingQuestions;
938
939
  private updateAddingCalculatedValules;
@@ -999,7 +1000,7 @@ export declare class SurveyCreatorModel extends Base implements ISurveyCreatorOp
999
1000
  set text(value: string);
1000
1001
  getSurveyJSON(): any;
1001
1002
  getObjectDisplayName(obj: Base, area: string, reason?: string, displayName?: string): string;
1002
- createSurvey(json: any, reason: string, model?: any, callback?: (survey: SurveyModel) => void): SurveyModel;
1003
+ createSurvey(json: any, reason: string, model?: any, callback?: (survey: SurveyModel) => void, area?: string): SurveyModel;
1003
1004
  private getSurveyInstanceCreatedArea;
1004
1005
  protected createSurveyCore(json: any, reason: string): SurveyModel;
1005
1006
  private _stateValue;
@@ -168,6 +168,10 @@ export interface PropertyEditorCreatedEvent {
168
168
  * A property that corresponds to the created property editor.
169
169
  */
170
170
  property: JsonObjectProperty;
171
+ /**
172
+ * A survey element being edited in the Property Grid.
173
+ */
174
+ obj: Base;
171
175
  }
172
176
  export interface PropertyEditorUpdateTitleActionsEvent {
173
177
  /**
@@ -257,7 +261,7 @@ export interface CollectionItemAddedEvent {
257
261
  */
258
262
  newItem: ItemValue;
259
263
  /**
260
- * An array of collection items to which the target item belongs ([`columns`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#columns) or [`rows`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#rows) in matrix questions, [`choices`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choices) in select-based questions, etc.). This array does not include `options.newItem`.
264
+ * An array of collection items to which the target item belongs ([`columns`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#columns) or [`rows`](https://surveyjs.io/form-library/documentation/api-reference/matrix-table-question-model#rows) in matrix questions, [`choices`](https://surveyjs.io/form-library/documentation/api-reference/questionselectbase#choices) in select-based questions, etc.).
261
265
  */
262
266
  itemValues: ItemValue[];
263
267
  }
@@ -271,7 +275,7 @@ export interface MatrixColumnAddedEvent {
271
275
  */
272
276
  newColumn: MatrixDropdownColumn;
273
277
  /**
274
- * An array of matrix columns. This array does not include `options.newColumn`.
278
+ * An array of matrix columns.
275
279
  */
276
280
  columns: MatrixDropdownColumn[];
277
281
  }
@@ -537,6 +541,7 @@ export interface SurveyInstanceCreatedEvent {
537
541
  * - `"translation-tab:language-list"` - A survey that displays the language list in the Translations tab.
538
542
  * - `"translation-tab:table"` - A survey that displays the translation table in the Translations tab.
539
543
  * - `"translation-tab:table-header"` - A survey that displays the header of the translation table in the Translations tab.
544
+ * - `"translation-tab:table-popup-editor"` - A survey that displays a translation table for an individual language in a pop-up window.
540
545
  * - `"table-values-popup-editor"` - A survey that allows you to edit values of a table (Choices, Rows, Columns, etc.) in a pop-up window.
541
546
  * - `"matrix-cell-values-popup-editor"` - A survey that allows you to [specify cell texts of a Single-Select Matrix](https://surveyjs.io/form-library/examples/scoring-rubric-example/) in a pop-up window.
542
547
  * - `"matrix-cell-question-popup-editor"` - A survey that allows you to configure a question within a cell of a [Multi-Select](https://surveyjs.io/form-library/examples/multi-select-matrix-question/) or [Dynamic Matrix](https://surveyjs.io/form-library/examples/dynamic-matrix-add-new-rows/) in a pop-up window.
@@ -210,7 +210,7 @@ export interface ISurveyCreatorOptions {
210
210
  onGetElementEditorTitleCallback(obj: Base, title: string): string;
211
211
  startUndoRedoTransaction(): any;
212
212
  stopUndoRedoTransaction(): any;
213
- createSurvey(json: any, reason: string, model?: any, callback?: (survey: SurveyModel) => void): any;
213
+ createSurvey(json: any, reason: string, model?: any, callback?: (survey: SurveyModel) => void, area?: string): any;
214
214
  onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any[]): string;
215
215
  onConditionGetTitleCallback(expression: string, title: string): string;
216
216
  isConditionOperatorEnabled(questionName: string, question: Question, operator: string, isEnabled: boolean): boolean;
@@ -262,7 +262,7 @@ export declare class EmptySurveyCreatorOptions implements ISurveyCreatorOptions
262
262
  onGetElementEditorTitleCallback(obj: Base, title: string): string;
263
263
  startUndoRedoTransaction(): void;
264
264
  stopUndoRedoTransaction(): void;
265
- createSurvey(json: any, reason: string, model?: any, callback?: (survey: SurveyModel) => void): SurveyModel;
265
+ createSurvey(json: any, reason: string, model?: any, callback?: (survey: SurveyModel) => void, area?: string): SurveyModel;
266
266
  onConditionQuestionsGetListCallback(propertyName: string, obj: Base, editor: any, list: any[]): string;
267
267
  onConditionGetTitleCallback(expression: string, title: string): string;
268
268
  isConditionOperatorEnabled(questionName: string, question: Question, operator: string, isEnabled: boolean): boolean;
@@ -1,11 +1,15 @@
1
1
  export declare class EditorLocalization {
2
+ private defaultLocaleValue;
3
+ private currentLocaleValue;
2
4
  camelCaseBreaking: boolean;
3
- defaultLocale: string;
4
- currentLocale: string;
5
5
  locales: {};
6
6
  private peByClass;
7
7
  private peHelpByClass;
8
8
  reset(): void;
9
+ get defaultLocale(): string;
10
+ set defaultLocale(val: string);
11
+ get currentLocale(): string;
12
+ set currentLocale(val: string);
9
13
  getString(strName: string, locale?: string): string;
10
14
  hasString(strName: string, locale?: string): boolean;
11
15
  private getStringByLocale;
@@ -396,6 +400,28 @@ export declare var defaultStrings: {
396
400
  name: string;
397
401
  title: string;
398
402
  };
403
+ masksettings: {
404
+ saveMaskedValue: string;
405
+ };
406
+ patternmask: {
407
+ pattern: string;
408
+ };
409
+ datetimemask: {
410
+ min: string;
411
+ max: string;
412
+ };
413
+ numericmask: {
414
+ allowNegativeValues: string;
415
+ thousandsSeparator: string;
416
+ decimalSeparator: string;
417
+ precision: string;
418
+ min: string;
419
+ max: string;
420
+ };
421
+ currencymask: {
422
+ prefix: string;
423
+ suffix: string;
424
+ };
399
425
  imageHeight: string;
400
426
  imageWidth: string;
401
427
  valueName: string;
@@ -636,6 +662,13 @@ export declare var defaultStrings: {
636
662
  autoGrowComment: string;
637
663
  allowResizeComment: string;
638
664
  textUpdateMode: string;
665
+ maskType: string;
666
+ maskTypes: {
667
+ patternmask: string;
668
+ numericmask: string;
669
+ datetimemask: string;
670
+ currencymask: string;
671
+ };
639
672
  focusOnFirstError: string;
640
673
  checkErrorsMode: string;
641
674
  navigateToUrl: string;
@@ -760,6 +793,7 @@ export declare var defaultStrings: {
760
793
  templateTitle: string;
761
794
  totals: string;
762
795
  logic: string;
796
+ mask: string;
763
797
  layout: {
764
798
  panel: string;
765
799
  question: string;
@@ -824,6 +858,10 @@ export declare var defaultStrings: {
824
858
  width_placeholder: string;
825
859
  minWidth_placeholder: string;
826
860
  maxWidth_placeholder: string;
861
+ pattern_placeholder: string;
862
+ datetimepattern_placeholder: string;
863
+ currencyprefix_placeholder: string;
864
+ currencysuffix_placeholder: string;
827
865
  };
828
866
  pv: {
829
867
  true: string;
@@ -1301,6 +1339,24 @@ export declare var defaultStrings: {
1301
1339
  filePlaceholder: string;
1302
1340
  photoPlaceholder: string;
1303
1341
  fileOrPhotoPlaceholder: string;
1342
+ masksettings: {
1343
+ saveMaskedValue: string;
1344
+ };
1345
+ patternmask: {
1346
+ pattern: string;
1347
+ };
1348
+ datetimemask: {
1349
+ pattern: string;
1350
+ };
1351
+ numericmask: {
1352
+ decimalSeparator: string;
1353
+ thousandsSeparator: string;
1354
+ precision: string;
1355
+ };
1356
+ currencymask: {
1357
+ prefix: string;
1358
+ suffix: string;
1359
+ };
1304
1360
  };
1305
1361
  p: {
1306
1362
  title: {
@@ -60,6 +60,7 @@ export * from "../property-grid/object-selector";
60
60
  export * from "../property-grid/restfull";
61
61
  export * from "../property-grid/values";
62
62
  export * from "../property-grid/search-manager";
63
+ export * from "../property-grid/maskSettings";
63
64
  export { propertyGridCss } from "../property-grid-theme/property-grid";
64
65
  export * from "../questionconverter";
65
66
  export * from "../svgbundle";
@@ -363,6 +363,28 @@ export declare var enStrings: {
363
363
  name: string;
364
364
  title: string;
365
365
  };
366
+ masksettings: {
367
+ saveMaskedValue: string;
368
+ };
369
+ patternmask: {
370
+ pattern: string;
371
+ };
372
+ datetimemask: {
373
+ min: string;
374
+ max: string;
375
+ };
376
+ numericmask: {
377
+ allowNegativeValues: string;
378
+ thousandsSeparator: string;
379
+ decimalSeparator: string;
380
+ precision: string;
381
+ min: string;
382
+ max: string;
383
+ };
384
+ currencymask: {
385
+ prefix: string;
386
+ suffix: string;
387
+ };
366
388
  imageHeight: string;
367
389
  imageWidth: string;
368
390
  valueName: string;
@@ -603,6 +625,13 @@ export declare var enStrings: {
603
625
  autoGrowComment: string;
604
626
  allowResizeComment: string;
605
627
  textUpdateMode: string;
628
+ maskType: string;
629
+ maskTypes: {
630
+ patternmask: string;
631
+ numericmask: string;
632
+ datetimemask: string;
633
+ currencymask: string;
634
+ };
606
635
  focusOnFirstError: string;
607
636
  checkErrorsMode: string;
608
637
  navigateToUrl: string;
@@ -727,6 +756,7 @@ export declare var enStrings: {
727
756
  templateTitle: string;
728
757
  totals: string;
729
758
  logic: string;
759
+ mask: string;
730
760
  layout: {
731
761
  panel: string;
732
762
  question: string;
@@ -791,6 +821,10 @@ export declare var enStrings: {
791
821
  width_placeholder: string;
792
822
  minWidth_placeholder: string;
793
823
  maxWidth_placeholder: string;
824
+ pattern_placeholder: string;
825
+ datetimepattern_placeholder: string;
826
+ currencyprefix_placeholder: string;
827
+ currencysuffix_placeholder: string;
794
828
  };
795
829
  pv: {
796
830
  true: string;
@@ -1268,6 +1302,24 @@ export declare var enStrings: {
1268
1302
  filePlaceholder: string;
1269
1303
  photoPlaceholder: string;
1270
1304
  fileOrPhotoPlaceholder: string;
1305
+ masksettings: {
1306
+ saveMaskedValue: string;
1307
+ };
1308
+ patternmask: {
1309
+ pattern: string;
1310
+ };
1311
+ datetimemask: {
1312
+ pattern: string;
1313
+ };
1314
+ numericmask: {
1315
+ decimalSeparator: string;
1316
+ thousandsSeparator: string;
1317
+ precision: string;
1318
+ };
1319
+ currencymask: {
1320
+ prefix: string;
1321
+ suffix: string;
1322
+ };
1271
1323
  };
1272
1324
  p: {
1273
1325
  title: {
@@ -186,6 +186,10 @@ export declare class PropertyGridEditorString extends PropertyGridEditorStringBa
186
186
  isDefault(): boolean;
187
187
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
188
188
  }
189
+ export declare class PropertyGridEditorDateTime extends PropertyGridEditor {
190
+ fit(prop: JsonObjectProperty): boolean;
191
+ getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
192
+ }
189
193
  export declare class PropertyGridLinkEditor extends PropertyGridEditor {
190
194
  fit(prop: JsonObjectProperty): boolean;
191
195
  getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
@@ -0,0 +1,20 @@
1
+ import { Base, JsonObjectProperty, Question, PanelModel, InputMaskBase } from "survey-core";
2
+ import { PropertyGridEditor } from "./index";
3
+ import { ISurveyCreatorOptions } from "../creator-settings";
4
+ export declare class PropertyGridEditorQuestionMaskSettings extends PropertyGridEditor {
5
+ private _propertyGrid;
6
+ private _prevMaskType;
7
+ private _previewQuestion;
8
+ fit(prop: JsonObjectProperty): boolean;
9
+ getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
10
+ onCreated(obj: Base, question: Question, prop: JsonObjectProperty, options: ISurveyCreatorOptions): void;
11
+ onValueChanged(obj: Base, prop: JsonObjectProperty, question: Question): void;
12
+ updatePanel(obj: Base, question: Question, prop: JsonObjectProperty): void;
13
+ updatePreviewQuestion(masksettings: InputMaskBase, panel: PanelModel): void;
14
+ }
15
+ export declare class PropertyGridEditorMaskType extends PropertyGridEditor {
16
+ private _noneItem;
17
+ fit(prop: JsonObjectProperty): boolean;
18
+ getJSON(obj: Base, prop: JsonObjectProperty, options: ISurveyCreatorOptions): any;
19
+ private getChoices;
20
+ }
@@ -295,6 +295,9 @@ export declare var propertyGridCss: {
295
295
  propertygrid_restfull: {
296
296
  content: string;
297
297
  };
298
+ propertygrid_masksettings: {
299
+ content: string;
300
+ };
298
301
  saveData: {
299
302
  root: string;
300
303
  saving: string;
@@ -4,6 +4,7 @@ export declare class QuestionConverter {
4
4
  static get convertInfo(): any;
5
5
  private static createDefaultQuestionConverterItems;
6
6
  static addConvertInfo(className: string, convertToClassName: string): void;
7
+ private static getConvertableClasses;
7
8
  static getConvertToClasses(className: string, availableTypes?: Array<string>, includeCurrent?: boolean): Array<string>;
8
9
  static convertObject(obj: Question, convertToClass: string, defaultObjJSON?: any, defaultJSON?: any): Question;
9
10
  private static updateJSON;