impaktapps-ui-builder 1.0.381 → 1.0.382

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.
@@ -0,0 +1 @@
1
+ export declare const buildPdfViewer: (config: any, componentScope: string) => any;
@@ -0,0 +1,19 @@
1
+ declare const _default: {
2
+ type: string;
3
+ scope: string;
4
+ options: {
5
+ widget: string;
6
+ };
7
+ config: {
8
+ layout: {
9
+ xs: number;
10
+ sm: number;
11
+ md: number;
12
+ lg: number;
13
+ };
14
+ main: {
15
+ title: string;
16
+ };
17
+ };
18
+ };
19
+ export default _default;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "impaktapps-ui-builder",
3
- "version": "1.0.381",
3
+ "version": "1.0.382",
4
4
  "scripts": {
5
5
  "dev": "vite",
6
6
  "build": "tsc && vite build",
@@ -0,0 +1,16 @@
1
+ import pdfViewer from "./uischema/pdfViewer";
2
+ import _ from "lodash";
3
+ import { createLayoutFormat } from "./buildConfig";
4
+
5
+ export const buildPdfViewer = (config, componentScope: string) => {
6
+ const PdfViewer: any = _.cloneDeep(pdfViewer)
7
+ PdfViewer.scope = componentScope;
8
+ PdfViewer.config.main.scale = config.scale;
9
+ if (config.layout) {
10
+ PdfViewer.config.layout = createLayoutFormat(config.layout);
11
+ }
12
+ if (config.style) {
13
+ PdfViewer.config.style = JSON.parse(config.style)
14
+ }
15
+ return PdfViewer
16
+ }
@@ -47,6 +47,7 @@ import { buildButtonGroup } from "./buildGroupButton";
47
47
  import { buildPopOver } from "./buildPopover";
48
48
  import { buildOTP_Input } from "./buildOTP_inputs";
49
49
  import { buildSplitViewContainer } from "./buildSplitViewContainer";
50
+ import { buildPdfViewer } from "./buildPdfViewer";
50
51
  export let schema = {
51
52
  type: "object",
52
53
  properties: {},
@@ -291,6 +292,9 @@ const buildUiSchema = (config: any, store?: any) => {
291
292
  case "SplitViewContainer":
292
293
  elements = buildSplitViewContainer(config, componentScope, store);
293
294
  break;
295
+ case "PdfViewer":
296
+ elements = buildPdfViewer(config, componentScope);
297
+ break;
294
298
  default:
295
299
  schema = {
296
300
  type: "object",
@@ -709,6 +709,12 @@ export const buildPropertiesSection = function (type: String) {
709
709
  ])
710
710
  ]
711
711
  break;
712
+ case "PdfViewer":
713
+ uiSchema.elements = [
714
+ getInputField("scale", "Zoom"),
715
+ emptyBox("PdfViewer", { xs: 6, sm: 6, md: 8, lg: 9 })
716
+ ]
717
+ break;
712
718
  case "Date":
713
719
  uiSchema.elements = [
714
720
  getSelectField("variant", "Variant", [
@@ -173,7 +173,6 @@ export const CoreSection = {
173
173
  layout: { xs: 6, sm: 6, md: 4, lg: 4 },
174
174
  main: {
175
175
  label: "Screen Size",
176
-
177
176
  },
178
177
  },
179
178
  },
@@ -0,0 +1,18 @@
1
+ export default {
2
+ type: "Control",
3
+ scope: "#/properties/pdfviewer",
4
+ options: {
5
+ widget: "PdfViewer",
6
+ },
7
+ config: {
8
+ layout: {
9
+ xs: 12,
10
+ sm: 12,
11
+ md: 12,
12
+ lg: 12,
13
+ },
14
+ main: {
15
+ title: "PDF"
16
+ },
17
+ },
18
+ }
@@ -49,7 +49,8 @@ export const ComponentSchema: any = {
49
49
  { title: "Upload", const: "UploadFile" },
50
50
  { title: "Tree ", const: "TreeMap" },
51
51
  { title: "Thought of the day", const: "Thought" },
52
- { title: "Split View Container", const: "SplitViewContainer" }
52
+ { title: "Split View Container", const: "SplitViewContainer" },
53
+ { title: "PDF", const: "PdfViewer"}
53
54
  ],
54
55
  },
55
56
  elementType: {
@@ -39,6 +39,7 @@ const sectionLabels = {
39
39
  TextArea: ["Core", "Properties", "Events", "Style", "Validation"],
40
40
  PopUp: ["Core", "Components", "Properties", "Events", "Style"],
41
41
  PopOver: ["Core", "Components", "Properties", "Style"],
42
+ PdfViewer: ["Core","Properties", "Style"],
42
43
  Stepper: ["Core", "Components", "Properties", "Events", "Style"],
43
44
  DataGrid: ["Core", "Components", "Properties", "Events", "Style"],
44
45
  InputSlider: ["Core", "Properties", "Events", "Style", "Validation"],
@@ -74,7 +75,7 @@ export function refreshPage(type: string, store: any) {
74
75
  // Get Widget Type of parent
75
76
  const path = store.searchParams?.get("path");
76
77
  const lastDotIndex = path.lastIndexOf('.')
77
- const parentPath = path.slice(0, lastDotIndex)
78
+ const parentPath = path.slice(0,lastDotIndex)
78
79
 
79
80
  const parentObj = _.get(currentConfig, parentPath)
80
81
 
@@ -234,7 +235,7 @@ export default (store: any, dynamicData: any, submitHandler: any, service: any)
234
235
  if (sessionStorage.getItem("copiedConfig")) {
235
236
  schema.properties.RemoveItemButton.disabled = false;
236
237
  }
237
-
238
+
238
239
  const config = JSON.parse(sessionStorage.getItem("pageFormdata"));
239
240
  const path = store.searchParams?.get("path");
240
241
  const id = store.searchParams?.get("id")