@qrvey/widget-configurability 0.0.0-beta.4684 → 0.0.0-beta.4707

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.
@@ -1157,6 +1157,28 @@ var DASHBOARD_DEFAULTS = __spreadProps(__spreadValues(__spreadProps(__spreadValu
1157
1157
  since: "9.6",
1158
1158
  notes: "The default value is true. This variable was added in https://qrveydev.atlassian.net/browse/RB-9606"
1159
1159
  },
1160
+ "downloadModal.pageSize": {
1161
+ type: "string",
1162
+ values: [
1163
+ "LEGACY",
1164
+ "LETTER",
1165
+ "A4",
1166
+ "A3",
1167
+ "LEGAL",
1168
+ "TABLOID"
1169
+ ],
1170
+ description: "Defines the page size Advanced Settings preselects for chart PDF exports. Case-sensitive; an invalid value is ignored",
1171
+ since: "9.6"
1172
+ },
1173
+ "downloadModal.orientation": {
1174
+ type: "string",
1175
+ values: [
1176
+ "PORTRAIT",
1177
+ "LANDSCAPE"
1178
+ ],
1179
+ description: "Defines the orientation Advanced Settings preselects for chart PDF exports. Case-sensitive; an invalid value is ignored",
1180
+ since: "9.6"
1181
+ },
1160
1182
  "duplicateModal.duplicateCharts": {
1161
1183
  type: "boolean",
1162
1184
  description: "If the dashboard's charts are duplicated. true = create independent copies of the charts for the new dashboard (edits to either dashboard's charts stay isolated). false = the new dashboard points to the original charts (edits made through either dashboard are reflected in both).",
@@ -2274,6 +2296,23 @@ var DASHBOARD_LABELS = {
2274
2296
  qIncludeHeader: {
2275
2297
  label: "Include header"
2276
2298
  },
2299
+ qAdvancedSettings: {
2300
+ label: "Advanced settings",
2301
+ description: "The Advanced Settings section of the export modal; its options are visible only when the section is",
2302
+ since: "9.6"
2303
+ },
2304
+ qPageSize: {
2305
+ label: "Page size",
2306
+ description: "The Page Size option within Advanced Settings",
2307
+ since: "9.6",
2308
+ notes: "Its initial value is set with defaults.downloadModal.pageSize (see Customization Defaults)"
2309
+ },
2310
+ qOrientation: {
2311
+ label: "Orientation",
2312
+ description: "The Orientation option within Advanced Settings",
2313
+ since: "9.6",
2314
+ notes: "Its initial value is set with defaults.downloadModal.orientation (see Customization Defaults)"
2315
+ },
2277
2316
  qIncludeHyperlinks: {
2278
2317
  label: "Include hyperlinks"
2279
2318
  },
@@ -2432,6 +2471,19 @@ var validateType = /* @__PURE__ */ __name((validValues) => (value) => {
2432
2471
  const receivedValue = value.toUpperCase();
2433
2472
  return validValues.includes(receivedValue) ? receivedValue : void 0;
2434
2473
  }, "validateType");
2474
+ var PAGE_SIZES = [
2475
+ "LEGACY",
2476
+ "LETTER",
2477
+ "A4",
2478
+ "A3",
2479
+ "LEGAL",
2480
+ "TABLOID"
2481
+ ];
2482
+ var PAGE_ORIENTATIONS = [
2483
+ "PORTRAIT",
2484
+ "LANDSCAPE"
2485
+ ];
2486
+ var validateOneOf = /* @__PURE__ */ __name((validValues) => (value) => typeof value === "string" && validValues.includes(value) ? value : void 0, "validateOneOf");
2435
2487
  var DX_VALIDATOR_MAP = {
2436
2488
  "customStyles.header.height": numberMinMaxValue(300, 10),
2437
2489
  "customStyles.text.fontSize": fontSizeMinMaxValue(8, 96),
@@ -2463,10 +2515,14 @@ var DX_VALIDATOR_MAP = {
2463
2515
  // Unsaved Changes Behavior
2464
2516
  unsavedChangesBehavior: validateUnsavedChangesBehavior,
2465
2517
  // Download modal
2466
- "downloadModal.subscribeMyself": validateBoolean
2518
+ "downloadModal.subscribeMyself": validateBoolean,
2519
+ "downloadModal.pageSize": validateOneOf(PAGE_SIZES),
2520
+ "downloadModal.orientation": validateOneOf(PAGE_ORIENTATIONS)
2467
2521
  };
2468
2522
  var DOWNLOAD_MODAL_VALIDATOR_MAP = {
2469
- subscribeMyself: validateBoolean
2523
+ subscribeMyself: validateBoolean,
2524
+ pageSize: validateOneOf(PAGE_SIZES),
2525
+ orientation: validateOneOf(PAGE_ORIENTATIONS)
2470
2526
  };
2471
2527
 
2472
2528
  // src/structures/download-modal.structure.v1.ts
@@ -2483,6 +2539,16 @@ var DOWNLOAD_MODAL_V1_KEYS = [
2483
2539
  "qIncludeHyperlinks",
2484
2540
  "qIncludeHeader"
2485
2541
  ];
2542
+ var DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS = "qAdvancedSettings";
2543
+ var DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS_KEYS = [
2544
+ "qPageSize",
2545
+ "qOrientation"
2546
+ ];
2547
+ var DOWNLOAD_MODAL_V1_SECTIONS = {
2548
+ [DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS]: [
2549
+ ...DOWNLOAD_MODAL_V1_ADVANCED_SETTINGS_KEYS
2550
+ ]
2551
+ };
2486
2552
  var DOWNLOAD_MODAL_V1_KEEP_INHERITANCE = {
2487
2553
  qSubscribeBanner: "qSubscribeOption",
2488
2554
  qOwnerLabel: "qSubscribeOption",
@@ -2501,12 +2567,12 @@ var DOWNLOAD_MODAL_V1_DEFAULTS = {
2501
2567
  var downloadModalV1Config = {
2502
2568
  version: "1.0",
2503
2569
  keepInheritance: DOWNLOAD_MODAL_V1_KEEP_INHERITANCE,
2504
- baseStructure: __spreadValues({
2570
+ baseStructure: __spreadValues(__spreadValues({
2505
2571
  defaults: __spreadValues({}, DOWNLOAD_MODAL_V1_DEFAULTS)
2506
2572
  }, Object.fromEntries(DOWNLOAD_MODAL_V1_KEYS.map((key) => [
2507
2573
  key,
2508
2574
  true
2509
- ])))
2575
+ ]))), DOWNLOAD_MODAL_V1_SECTIONS)
2510
2576
  };
2511
2577
  var download_modal_structure_v1_default = downloadModalV1Config;
2512
2578
 
@@ -2836,6 +2902,7 @@ var dashboardV1Config = {
2836
2902
  },
2837
2903
  downloadModal: [
2838
2904
  ...DOWNLOAD_MODAL_V1_KEYS,
2905
+ DOWNLOAD_MODAL_V1_SECTIONS,
2839
2906
  ...DOWNLOAD_MODAL_HOST_KEYS
2840
2907
  ],
2841
2908
  duplicateModal: [
@@ -2954,7 +3021,8 @@ var downloadManagerV1Config = {
2954
3021
  ],
2955
3022
  // The export modal's own keys, so a scope of this section carries all of them.
2956
3023
  downloadModal: [
2957
- ...DOWNLOAD_MODAL_V1_KEYS
3024
+ ...DOWNLOAD_MODAL_V1_KEYS,
3025
+ DOWNLOAD_MODAL_V1_SECTIONS
2958
3026
  ],
2959
3027
  moreInfoModal: [
2960
3028
  "qFileType",