@draftbit/core 46.2.1 → 46.2.2-088abf.0

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.
@@ -21,6 +21,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
21
21
 
22
22
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
23
23
 
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
+
24
26
  const AccordionItem = _ref => {
25
27
  let {
26
28
  Icon,
@@ -35,10 +37,9 @@ const AccordionItem = _ref => {
35
37
  textStyles,
36
38
  viewStyles
37
39
  } = (0, _utilities.extractStyles)(style);
38
- return /*#__PURE__*/React.createElement(_reactNative.Pressable, {
39
- style: [styles.container, viewStyles],
40
- ...rest
41
- }, /*#__PURE__*/React.createElement(_reactNative.View, {
40
+ return /*#__PURE__*/React.createElement(_reactNative.Pressable, _extends({
41
+ style: [styles.container, viewStyles]
42
+ }, rest), /*#__PURE__*/React.createElement(_reactNative.View, {
42
43
  style: styles.row
43
44
  }, icon ? /*#__PURE__*/React.createElement(Icon, {
44
45
  name: icon,
@@ -73,25 +74,5 @@ const styles = _reactNative.StyleSheet.create({
73
74
 
74
75
  var _default = (0, _theming.withTheme)(AccordionItem);
75
76
 
76
- exports.default = _default;
77
- //# sourceMappingURL=AccordionItem.js.mapding: 8
78
- },
79
- row: {
80
- flexDirection: "row",
81
- alignItems: "center",
82
- paddingLeft: 8
83
- },
84
- item: {
85
- marginVertical: 6,
86
- paddingLeft: 8
87
- },
88
- content: {
89
- flex: 1,
90
- justifyContent: "center"
91
- }
92
- });
93
-
94
- var _default = (0, _theming.withTheme)(AccordionItem);
95
-
96
77
  exports.default = _default;
97
78
  //# sourceMappingURL=AccordionItem.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","extractStyles","React","createElement","Pressable","styles","container","View","row","name","size","color","colors","primary","item","content","Text","selectable","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent","withTheme"],"sources":["AccordionItem.js"],"sourcesContent":["import * as React from \"react\";\nimport { Pressable, StyleSheet, View, } from \"react-native\";\nimport Text from \"../Text\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nconst AccordionItem = ({ Icon, icon, label, style, iconColor, theme, ...rest }) => {\n const { textStyles, viewStyles } = extractStyles(style);\n return (React.createElement(Pressable, { style: [styles.container, viewStyles], ...rest },\n React.createElement(View, { style: styles.row },\n icon ? (React.createElement(Icon, { name: icon, size: 24, color: iconColor || theme.colors.primary })) : null,\n React.createElement(View, { style: [styles.item, styles.content] },\n React.createElement(Text, { selectable: false, style: textStyles }, label)))));\n};\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\nexport default withTheme(AccordionItem);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;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EAAE,CADd;IAEFD,WAAW,EAAE;EAFX,CATuB;EAa7BR,OAAO,EAAE;IACLU,IAAI,EAAE,CADD;IAELC,cAAc,EAAE;EAFX;AAboB,CAAlB,CAAf;;eAkBe,IAAAC,kBAAA,EAAUpC,aAAV,C"}
1
+ {"version":3,"names":["AccordionItem","Icon","icon","label","style","iconColor","theme","rest","textStyles","viewStyles","extractStyles","styles","container","row","colors","primary","item","content","StyleSheet","create","padding","flexDirection","alignItems","paddingLeft","marginVertical","flex","justifyContent","withTheme"],"sources":["AccordionItem.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n Pressable,\n StyleSheet,\n View,\n StyleProp,\n ViewStyle,\n} from \"react-native\";\n\nimport Text from \"../Text\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\nimport { extractStyles } from \"../../utilities\";\nimport { withTheme } from \"../../theming\";\nimport type { Theme } from \"../../styles/DefaultTheme\";\n\ntype Props = {\n icon?: string;\n label: string;\n iconColor?: string;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & IconSlot;\n\nconst AccordionItem = ({\n Icon,\n icon,\n label,\n style,\n iconColor,\n theme,\n ...rest\n}: Props) => {\n const { textStyles, viewStyles } = extractStyles(style);\n\n return (\n <Pressable style={[styles.container, viewStyles]} {...rest}>\n <View style={styles.row}>\n {icon ? (\n <Icon\n name={icon}\n size={24}\n color={iconColor || theme.colors.primary}\n />\n ) : null}\n <View style={[styles.item, styles.content]}>\n <Text selectable={false} style={textStyles}>\n {label}\n </Text>\n </View>\n </View>\n </Pressable>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n padding: 8,\n },\n row: {\n flexDirection: \"row\",\n alignItems: \"center\",\n paddingLeft: 8,\n },\n item: {\n marginVertical: 6,\n paddingLeft: 8,\n },\n content: {\n flex: 1,\n justifyContent: \"center\",\n },\n});\n\nexport default withTheme(AccordionItem);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAQA;;AAEA;;AACA;;;;;;;;;;AAWA,MAAMA,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ative.Platform.select({
17
17
  });
18
18
 
19
19
  exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
20
- //# sourceMappingURL=constants.js.mapnts.js.map
20
+ //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","input","stylesPanelSections","BLOCK_STYLES_SECTIONS","layout","triggers","Triggers","OnChange","props","fieldName","createFieldNameProp","defaultValue","handlerPropName","valuePropName","iconSize","createIconSizeProp","iconColor","createColorProp","min","createStaticNumberProp","label","max"],"sources":["Stepper.js"],"sourcesContent":["import { COMPONENT_TYPES, createIconSizeProp, createColorProp, createFieldNameProp, createStaticNumberProp, Triggers, BLOCK_STYLES_SECTIONS, } from \"@draftbit/types\";\nexport const SEED_DATA = [\n {\n name: \"Stepper\",\n tag: \"Stepper\",\n description: \"A component used to control the quantity of something\",\n category: COMPONENT_TYPES.input,\n stylesPanelSections: BLOCK_STYLES_SECTIONS,\n layout: {},\n triggers: [Triggers.OnChange],\n props: {\n fieldName: createFieldNameProp({\n defaultValue: \"stepperValue\",\n handlerPropName: \"onChange\",\n valuePropName: \"value\",\n }),\n iconSize: createIconSizeProp({ defaultValue: 24 }),\n iconColor: createColorProp({ defaultValue: \"strong\" }),\n min: createStaticNumberProp({\n label: \"Minimum\",\n description: \"Minimum Number\",\n }),\n max: createStaticNumberProp({\n label: \"Maximum\",\n description: \"Maximum Number\",\n }),\n },\n },\n];\n"],"mappings":";;;;;;;AAAA;;AACO,MAAMA,SAAS,GAAG,CACrB;EACIC,IAAI,EAAE,SADV;EAEIC,GAAG,EAAE,SAFT;EAGIC,WAAW,EAAE,uDAHjB;EAIIC,QAAQ,EAAEC,sBAAA,CAAgBC,KAJ9B;EAKIC,mBAAmB,EAAEC,4BALzB;EAMIC,MAAM,EAAE,EANZ;EAOIC,QAAQ,EAAE,CAACC,eAAA,CAASC,QAAV,CAPd;EAQIC,KAAK,EAAE;IACHC,SAAS,EAAE,IAAAC,0BAAA,EAAoB;MAC3BC,YAAY,EAAE,cADa;MAE3BC,eAAe,EAAE,UAFU;MAG3BC,aAAa,EAAE;IAHY,CAApB,CADR;IAMHC,QAAQ,EAAE,IAAAC,yBAAA,EAAmB;MAAEJ,YAAY,EAAE;IAAhB,CAAnB,CANP;IAOHK,SAAS,EAAE,IAAAC,sBAAA,EAAgB;MAAEN,YAAY,EAAE;IAAhB,CAAhB,CAPR;IAQHO,GAAG,EAAE,IAAAC,6BAAA,EAAuB;MACxBC,KAAK,EAAE,SADiB;MAExBtB,WAAW,EAAE;IAFW,CAAvB,CARF;IAYHuB,GAAG,EAAE,IAAAF,6BAAA,EAAuB;MACxBC,KAAK,EAAE,SADiB;MAExBtB,WAAW,EAAE;IAFW,CAAvB;EAZF;AARX,CADqB,CAAlB"}
1
+ {"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","input","stylesPanelSections","BLOCK_STYLES_SECTIONS","layout","triggers","Triggers","OnChange","props","fieldName","createFieldNameProp","defaultValue","handlerPropName","valuePropName","iconSize","createIconSizeProp","iconColor","createColorProp","min","createStaticNumberProp","label","max"],"sources":["Stepper.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createIconSizeProp,\n createColorProp,\n createFieldNameProp,\n createStaticNumberProp,\n Triggers,\n BLOCK_STYLES_SECTIONS,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = [\n {\n name: \"Stepper\",\n tag: \"Stepper\",\n description: \"A component used to control the quantity of something\",\n category: COMPONENT_TYPES.input,\n stylesPanelSections: BLOCK_STYLES_SECTIONS,\n layout: {},\n triggers: [Triggers.OnChange],\n props: {\n fieldName: createFieldNameProp({\n defaultValue: \"stepperValue\",\n handlerPropName: \"onChange\",\n valuePropName: \"value\",\n }),\n iconSize: createIconSizeProp({ defaultValue: 24 }),\n iconColor: createColorProp({ defaultValue: \"strong\" }),\n min: createStaticNumberProp({\n label: \"Minimum\",\n description: \"Minimum Number\",\n }),\n max: createStaticNumberProp({\n label: \"Maximum\",\n description: \"Maximum Number\",\n }),\n },\n },\n];\n"],"mappings":";;;;;;;AAAA;;AAUO,MAAMA,SAAS,GAAG,CACvB;EACEC,IAAI,EAAE,SADR;EAEEC,GAAG,EAAE,SAFP;EAGEC,WAAW,EAAE,uDAHf;EAIEC,QAAQ,EAAEC,sBAAA,CAAgBC,KAJ5B;EAKEC,mBAAmB,EAAEC,4BALvB;EAMEC,MAAM,EAAE,EANV;EAOEC,QAAQ,EAAE,CAACC,eAAA,CAASC,QAAV,CAPZ;EAQEC,KAAK,EAAE;IACLC,SAAS,EAAE,IAAAC,0BAAA,EAAoB;MAC7BC,YAAY,EAAE,cADe;MAE7BC,eAAe,EAAE,UAFY;MAG7BC,aAAa,EAAE;IAHc,CAApB,CADN;IAMLC,QAAQ,EAAE,IAAAC,yBAAA,EAAmB;MAAEJ,YAAY,EAAE;IAAhB,CAAnB,CANL;IAOLK,SAAS,EAAE,IAAAC,sBAAA,EAAgB;MAAEN,YAAY,EAAE;IAAhB,CAAhB,CAPN;IAQLO,GAAG,EAAE,IAAAC,6BAAA,EAAuB;MAC1BC,KAAK,EAAE,SADmB;MAE1BtB,WAAW,EAAE;IAFa,CAAvB,CARA;IAYLuB,GAAG,EAAE,IAAAF,6BAAA,EAAuB;MAC1BC,KAAK,EAAE,SADmB;MAE1BtB,WAAW,EAAE;IAFa,CAAvB;EAZA;AART,CADuB,CAAlB"}
@@ -24,6 +24,71 @@ const SEED_DATA = {
24
24
  defaultValue: false,
25
25
  label: "Optimize Video Chat",
26
26
  description: "Allows for a better experience from web hosted video chat services"
27
+ }),
28
+ javaScriptEnabled: (0, _types.createStaticBoolProp)({
29
+ defaultValue: true,
30
+ group: _types.GROUPS.advanced,
31
+ label: "Enable Javascript",
32
+ description: "Boolean value to enable JavaScript in the WebView. The default value is true."
33
+ }),
34
+ javaScriptCanOpenWindowsAutomatically: (0, _types.createStaticBoolProp)({
35
+ defaultValue: false,
36
+ group: _types.GROUPS.advanced,
37
+ label: "Allow New Windows",
38
+ description: "A Boolean value indicating whether JavaScript can open windows without user interaction. The default value is false."
39
+ }),
40
+ showsHorizontalScrollIndicator: (0, _types.createStaticBoolProp)({
41
+ defaultValue: true,
42
+ group: _types.GROUPS.advanced,
43
+ label: "Horizontal Scollbars",
44
+ description: "Boolean value that determines whether a horizontal scroll indicator is shown in the WebView. The default value is true."
45
+ }),
46
+ showsVerticalScrollIndicator: (0, _types.createStaticBoolProp)({
47
+ defaultValue: true,
48
+ group: _types.GROUPS.advanced,
49
+ label: "Vertical Scollbars",
50
+ description: "Boolean value that determines whether a vertical scroll indicator is shown in the WebView. The default value is true."
51
+ }),
52
+ mediaPlaybackRequiresUserAction: (0, _types.createStaticBoolProp)({
53
+ label: "Media Playback Requires User Action",
54
+ group: _types.GROUPS.advanced,
55
+ description: "Boolean that determines whether HTML5 audio and video requires the user to tap them before they start playing. The default value is true. (Android API minimum version 17)."
56
+ }),
57
+ startInLoadingState: (0, _types.createStaticBoolProp)({
58
+ label: "Start In Loading State",
59
+ group: _types.GROUPS.advanced,
60
+ description: "Boolean value that forces the WebView to show the loading view on the first load. This prop must be set to true in order for the renderLoading prop to work."
61
+ }),
62
+ allowFileAccessFromFileURLs: (0, _types.createStaticBoolProp)({
63
+ label: "Allow File Access From File URLs",
64
+ group: _types.GROUPS.advanced,
65
+ description: "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs. The default value is false."
66
+ }),
67
+ allowUniversalAccessFromFileURLs: (0, _types.createStaticBoolProp)({
68
+ label: "Allow Universal Access From File URLs",
69
+ group: _types.GROUPS.advanced,
70
+ description: "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. Including accessing content from other file scheme URLs. The default value is false."
71
+ }),
72
+ cacheEnabled: (0, _types.createStaticBoolProp)({
73
+ label: "Enable Cache",
74
+ defaultValue: true,
75
+ description: "Sets whether WebView should use browser caching."
76
+ }),
77
+ incognito: (0, _types.createStaticBoolProp)({
78
+ label: "Use Incognito Mode",
79
+ description: "Does not store any data within the lifetime of the WebView."
80
+ }),
81
+ userAgent: (0, _types.createTextProp)({
82
+ group: _types.GROUPS.advanced,
83
+ defaultValue: null,
84
+ label: "User Agent",
85
+ description: "Sets the user-agent for the WebView."
86
+ }),
87
+ applicationNameForUserAgent: (0, _types.createTextProp)({
88
+ group: _types.GROUPS.advanced,
89
+ defaultValue: null,
90
+ label: "User Agent App Name",
91
+ description: "Append to the existing user-agent. Setting userAgent will override this."
27
92
  })
28
93
  }
29
94
  };
@@ -1 +1 @@
1
- {"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","media","stylesPanelSections","StylesPanelSections","Size","Margins","Borders","layout","flex","props","source","createSourceProp","defaultValue","optimizeVideoChat","createStaticBoolProp","label"],"sources":["WebView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createSourceProp,\n createStaticBoolProp,\n StylesPanelSections,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Web View\",\n tag: \"WebView\",\n description: \"Render web content inside a view\",\n category: COMPONENT_TYPES.media,\n stylesPanelSections: [\n StylesPanelSections.Size,\n StylesPanelSections.Margins,\n StylesPanelSections.Borders,\n ],\n layout: { flex: 1 },\n props: {\n source: createSourceProp({\n defaultValue: \"https://reactnative.dev\",\n }),\n optimizeVideoChat: createStaticBoolProp({\n defaultValue: false,\n label: \"Optimize Video Chat\",\n description:\n \"Allows for a better experience from web hosted video chat services\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AAOO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,UADiB;EAEvBC,GAAG,EAAE,SAFkB;EAGvBC,WAAW,EAAE,kCAHU;EAIvBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAJH;EAKvBC,mBAAmB,EAAE,CACnBC,0BAAA,CAAoBC,IADD,EAEnBD,0BAAA,CAAoBE,OAFD,EAGnBF,0BAAA,CAAoBG,OAHD,CALE;EAUvBC,MAAM,EAAE;IAAEC,IAAI,EAAE;EAAR,CAVe;EAWvBC,KAAK,EAAE;IACLC,MAAM,EAAE,IAAAC,uBAAA,EAAiB;MACvBC,YAAY,EAAE;IADS,CAAjB,CADH;IAILC,iBAAiB,EAAE,IAAAC,2BAAA,EAAqB;MACtCF,YAAY,EAAE,KADwB;MAEtCG,KAAK,EAAE,qBAF+B;MAGtCjB,WAAW,EACT;IAJoC,CAArB;EAJd;AAXgB,CAAlB"}
1
+ {"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","media","stylesPanelSections","StylesPanelSections","Size","Margins","Borders","layout","flex","props","source","createSourceProp","defaultValue","optimizeVideoChat","createStaticBoolProp","label","javaScriptEnabled","group","GROUPS","advanced","javaScriptCanOpenWindowsAutomatically","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","mediaPlaybackRequiresUserAction","startInLoadingState","allowFileAccessFromFileURLs","allowUniversalAccessFromFileURLs","cacheEnabled","incognito","userAgent","createTextProp","applicationNameForUserAgent"],"sources":["WebView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createSourceProp,\n createStaticBoolProp,\n createTextProp,\n GROUPS,\n StylesPanelSections,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Web View\",\n tag: \"WebView\",\n description: \"Render web content inside a view\",\n category: COMPONENT_TYPES.media,\n stylesPanelSections: [\n StylesPanelSections.Size,\n StylesPanelSections.Margins,\n StylesPanelSections.Borders,\n ],\n layout: { flex: 1 },\n props: {\n source: createSourceProp({\n defaultValue: \"https://reactnative.dev\",\n }),\n optimizeVideoChat: createStaticBoolProp({\n defaultValue: false,\n label: \"Optimize Video Chat\",\n description:\n \"Allows for a better experience from web hosted video chat services\",\n }),\n javaScriptEnabled: createStaticBoolProp({\n defaultValue: true,\n group: GROUPS.advanced,\n label: \"Enable Javascript\",\n description:\n \"Boolean value to enable JavaScript in the WebView. The default value is true.\",\n }),\n javaScriptCanOpenWindowsAutomatically: createStaticBoolProp({\n defaultValue: false,\n group: GROUPS.advanced,\n label: \"Allow New Windows\",\n description:\n \"A Boolean value indicating whether JavaScript can open windows without user interaction. The default value is false.\",\n }),\n showsHorizontalScrollIndicator: createStaticBoolProp({\n defaultValue: true,\n group: GROUPS.advanced,\n label: \"Horizontal Scollbars\",\n description:\n \"Boolean value that determines whether a horizontal scroll indicator is shown in the WebView. The default value is true.\",\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n defaultValue: true,\n group: GROUPS.advanced,\n label: \"Vertical Scollbars\",\n description:\n \"Boolean value that determines whether a vertical scroll indicator is shown in the WebView. The default value is true.\",\n }),\n mediaPlaybackRequiresUserAction: createStaticBoolProp({\n label: \"Media Playback Requires User Action\",\n group: GROUPS.advanced,\n description:\n \"Boolean that determines whether HTML5 audio and video requires the user to tap them before they start playing. The default value is true. (Android API minimum version 17).\",\n }),\n startInLoadingState: createStaticBoolProp({\n label: \"Start In Loading State\",\n group: GROUPS.advanced,\n description:\n \"Boolean value that forces the WebView to show the loading view on the first load. This prop must be set to true in order for the renderLoading prop to work.\",\n }),\n allowFileAccessFromFileURLs: createStaticBoolProp({\n label: \"Allow File Access From File URLs\",\n group: GROUPS.advanced,\n description:\n \"Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs. The default value is false.\",\n }),\n allowUniversalAccessFromFileURLs: createStaticBoolProp({\n label: \"Allow Universal Access From File URLs\",\n group: GROUPS.advanced,\n description:\n \"Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. Including accessing content from other file scheme URLs. The default value is false.\",\n }),\n cacheEnabled: createStaticBoolProp({\n label: \"Enable Cache\",\n defaultValue: true,\n description: \"Sets whether WebView should use browser caching.\",\n }),\n incognito: createStaticBoolProp({\n label: \"Use Incognito Mode\",\n description:\n \"Does not store any data within the lifetime of the WebView.\",\n }),\n userAgent: createTextProp({\n group: GROUPS.advanced,\n defaultValue: null,\n label: \"User Agent\",\n description: \"Sets the user-agent for the WebView.\",\n }),\n applicationNameForUserAgent: createTextProp({\n group: GROUPS.advanced,\n defaultValue: null,\n label: \"User Agent App Name\",\n description:\n \"Append to the existing user-agent. Setting userAgent will override this.\",\n }),\n },\n};\n"],"mappings":";;;;;;;AAAA;;AASO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,UADiB;EAEvBC,GAAG,EAAE,SAFkB;EAGvBC,WAAW,EAAE,kCAHU;EAIvBC,QAAQ,EAAEC,sBAAA,CAAgBC,KAJH;EAKvBC,mBAAmB,EAAE,CACnBC,0BAAA,CAAoBC,IADD,EAEnBD,0BAAA,CAAoBE,OAFD,EAGnBF,0BAAA,CAAoBG,OAHD,CALE;EAUvBC,MAAM,EAAE;IAAEC,IAAI,EAAE;EAAR,CAVe;EAWvBC,KAAK,EAAE;IACLC,MAAM,EAAE,IAAAC,uBAAA,EAAiB;MACvBC,YAAY,EAAE;IADS,CAAjB,CADH;IAILC,iBAAiB,EAAE,IAAAC,2BAAA,EAAqB;MACtCF,YAAY,EAAE,KADwB;MAEtCG,KAAK,EAAE,qBAF+B;MAGtCjB,WAAW,EACT;IAJoC,CAArB,CAJd;IAULkB,iBAAiB,EAAE,IAAAF,2BAAA,EAAqB;MACtCF,YAAY,EAAE,IADwB;MAEtCK,KAAK,EAAEC,aAAA,CAAOC,QAFwB;MAGtCJ,KAAK,EAAE,mBAH+B;MAItCjB,WAAW,EACT;IALoC,CAArB,CAVd;IAiBLsB,qCAAqC,EAAE,IAAAN,2BAAA,EAAqB;MAC1DF,YAAY,EAAE,KAD4C;MAE1DK,KAAK,EAAEC,aAAA,CAAOC,QAF4C;MAG1DJ,KAAK,EAAE,mBAHmD;MAI1DjB,WAAW,EACT;IALwD,CAArB,CAjBlC;IAwBLuB,8BAA8B,EAAE,IAAAP,2BAAA,EAAqB;MACnDF,YAAY,EAAE,IADqC;MAEnDK,KAAK,EAAEC,aAAA,CAAOC,QAFqC;MAGnDJ,KAAK,EAAE,sBAH4C;MAInDjB,WAAW,EACT;IALiD,CA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AJW,CAAf,CAxEN;IA8ELiC,2BAA2B,EAAE,IAAAD,qBAAA,EAAe;MAC1Cb,KAAK,EAAEC,aAAA,CAAOC,QAD4B;MAE1CP,YAAY,EAAE,IAF4B;MAG1CG,KAAK,EAAE,qBAHmC;MAI1CjB,WAAW,EACT;IALwC,CAAf;EA9ExB;AAXgB,CAAlB"}
@@ -1 +1 @@
1
- {"version":3,"names":["COMPONENT_TYPES","GROUPS","createIconProp","createColorProp","createNumberProp","createBoolProp","createActionProp","Triggers","StylesPanelSections","SEED_DATA","name","tag","category","button","layout","triggers","OnPress","stylesPanelSections","Margins","Effects","Position","props","onPress","icon","color","label","group","basic","disabled","size","description","defaultValue","min","max","step","precision"],"sources":["IconButton.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n GROUPS,\n createIconProp,\n createColorProp,\n createNumberProp,\n createBoolProp,\n createActionProp,\n Triggers,\n StylesPanelSections,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Icon Button\",\n tag: \"IconButton\",\n category: COMPONENT_TYPES.button,\n layout: {},\n triggers: [Triggers.OnPress],\n stylesPanelSections: [\n StylesPanelSections.Margins,\n StylesPanelSections.Effects,\n StylesPanelSections.Position,\n ],\n props: {\n onPress: createActionProp(),\n icon: createIconProp(),\n color: createColorProp({\n label: \"Color\",\n group: GROUPS.basic,\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n group: GROUPS.basic,\n }),\n size: createNumberProp({\n group: GROUPS.basic,\n label: \"Size\",\n description: \"Width and height of your icon\",\n defaultValue: 32,\n min: 16,\n max: 128,\n step: 1,\n precision: 0,\n }),\n },\n};\n"],"mappings":"AAAA,SACEA,eADF,EAEEC,MAFF,EAGEC,cAHF,EAIEC,eAJF,EAKEC,gBALF,EAMEC,cANF,EAOEC,gBAPF,EAQEC,QARF,EASEC,mBATF,QAUO,iBAVP;AAYA,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,aADiB;EAEvBC,GAAG,EAAE,YAFkB;EAGvBC,QAAQ,EAAEZ,eAAe,CAACa,MAHH;EAIvBC,MAAM,EAAE,EAJe;EAKvBC,QAAQ,EAAE,CAACR,QAAQ,CAACS,OAAV,CALa;EAMvBC,mBAAmB,EAAE,CACnBT,mBAAmB,CAACU,OADD,EAEnBV,mBAAmB,CAACW,OAFD,EAGnBX,mBAAmB,CAACY,QAHD,CANE;EAWvBC,KAAK,EAAE;IACLC,OAAO,EAAEhB,gBAAgB,EADpB;IAELiB,IAAI,EAAErB,cAAc,EAFf;IAGLsB,KAAK,EAAErB,eAAe,CAAC;MACrBsB,KAAK,EAAE,OADc;MAErBC,KAAK,EAAEzB,MAAM,CAAC0B;IAFO,CAAD,CAHjB;IAOLC,QAAQ,EAAEvB,cAAc,CAAC;MACvBoB,KAAK,EAAE,UADgB;MAEvBC,KAAK,EAAEzB,MAAM,CAAC0B;IAFS,CAAD,CAPnB;IAWLE,IAAI,EAAEzB,gBAAgB,CAAC;MACrBsB,KAAK,EAAEzB,MAAM,CAAC0B,KADO;MAErBF,KAAK,EAAE,MAFc;MAGrBK,WAAW,EAAE,+BAHQ;MAIrBC,YAAY,EAAE,EAJO;MAKrBC,GAAG,EAAE,EALgB;MAMrBC,GAAG,EAAE,GANgB;MAOrBC,IAAI,EAAE,CAPe;MAQrBC,SAAS,EAAE;IARU,CAAD;EAXjB;AAXgB,CAAlB"}
1
+ {"version":3,"names":["COMPONENT_TYPES","GROUPS","createIconProp","createColorProp","createNumberProp","createBoolProp","createActionProp","Triggers","StylesPanelSections","SEED_DATA","name","tag","category","button","layout","triggers","OnPress","stylesPanelSections","Margins","Effects","Position","props","onPress","icon","color","label","group","basic","disabled","size","description","defaultValue","min","max","step","precision"],"sources":["IconButton.js"],"sourcesContent":["import { COMPONENT_TYPES, GROUPS, createIconProp, createColorProp, createNumberProp, createBoolProp, createActionProp, Triggers, StylesPanelSections, } from \"@draftbit/types\";\nexport const SEED_DATA = {\n name: \"Icon Button\",\n tag: \"IconButton\",\n category: COMPONENT_TYPES.button,\n layout: {},\n triggers: [Triggers.OnPress],\n stylesPanelSections: [\n StylesPanelSections.Margins,\n StylesPanelSections.Effects,\n StylesPanelSections.Position,\n ],\n props: {\n onPress: createActionProp(),\n icon: createIconProp(),\n color: createColorProp({\n label: \"Color\",\n group: GROUPS.basic,\n }),\n disabled: createBoolProp({\n label: \"Disabled\",\n group: GROUPS.basic,\n }),\n size: createNumberProp({\n group: GROUPS.basic,\n label: \"Size\",\n description: \"Width and height of your icon\",\n defaultValue: 32,\n min: 16,\n max: 128,\n step: 1,\n precision: 0,\n }),\n },\n};\n"],"mappings":"AAAA,SAASA,eAAT,EAA0BC,MAA1B,EAAkCC,cAAlC,EAAkDC,eAAlD,EAAmEC,gBAAnE,EAAqFC,cAArF,EAAqGC,gBAArG,EAAuHC,QAAvH,EAAiIC,mBAAjI,QAA6J,iBAA7J;AACA,OAAO,MAAMC,SAAS,GAAG;EACrBC,IAAI,EAAE,aADe;EAErBC,GAAG,EAAE,YAFgB;EAGrBC,QAAQ,EAAEZ,eAAe,CAACa,MAHL;EAIrBC,MAAM,EAAE,EAJa;EAKrBC,QAAQ,EAAE,CAACR,QAAQ,CAACS,OAAV,CALW;EAMrBC,mBAAmB,EAAE,CACjBT,mBAAmB,CAACU,OADH,EAEjBV,mBAAmB,CAACW,OAFH,EAGjBX,mBAAmB,CAACY,QAHH,CANA;EAWrBC,KAAK,EAAE;IACHC,OAAO,EAAEhB,gBAAgB,EADtB;IAEHiB,IAAI,EAAErB,cAAc,EAFjB;IAGHsB,KAAK,EAAErB,eAAe,CAAC;MACnBsB,KAAK,EAAE,OADY;MAEnBC,KAAK,EAAEzB,MAAM,CAAC0B;IAFK,CAAD,CAHnB;IAOHC,QAAQ,EAAEvB,cAAc,CAAC;MACrBoB,KAAK,EAAE,UADc;MAErBC,KAAK,EAAEzB,MAAM,CAAC0B;IAFO,CAAD,CAPrB;IAWHE,IAAI,EAAEzB,gBAAgB,CAAC;MACnBsB,KAAK,EAAEzB,MAAM,CAAC0B,KADK;MAEnBF,KAAK,EAAE,MAFY;MAGnBK,WAAW,EAAE,+BAHM;MAInBC,YAAY,EAAE,EAJK;MAKnBC,GAAG,EAAE,EALc;MAMnBC,GAAG,EAAE,GANc;MAOnBC,IAAI,EAAE,CAPa;MAQnBC,SAAS,EAAE;IARQ,CAAD;EAXnB;AAXc,CAAlB"}
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createSourceProp, createStaticBoolProp, StylesPanelSections } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSourceProp, createStaticBoolProp, createTextProp, GROUPS, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Web View",
4
4
  tag: "WebView",
@@ -16,6 +16,71 @@ export const SEED_DATA = {
16
16
  defaultValue: false,
17
17
  label: "Optimize Video Chat",
18
18
  description: "Allows for a better experience from web hosted video chat services"
19
+ }),
20
+ javaScriptEnabled: createStaticBoolProp({
21
+ defaultValue: true,
22
+ group: GROUPS.advanced,
23
+ label: "Enable Javascript",
24
+ description: "Boolean value to enable JavaScript in the WebView. The default value is true."
25
+ }),
26
+ javaScriptCanOpenWindowsAutomatically: createStaticBoolProp({
27
+ defaultValue: false,
28
+ group: GROUPS.advanced,
29
+ label: "Allow New Windows",
30
+ description: "A Boolean value indicating whether JavaScript can open windows without user interaction. The default value is false."
31
+ }),
32
+ showsHorizontalScrollIndicator: createStaticBoolProp({
33
+ defaultValue: true,
34
+ group: GROUPS.advanced,
35
+ label: "Horizontal Scollbars",
36
+ description: "Boolean value that determines whether a horizontal scroll indicator is shown in the WebView. The default value is true."
37
+ }),
38
+ showsVerticalScrollIndicator: createStaticBoolProp({
39
+ defaultValue: true,
40
+ group: GROUPS.advanced,
41
+ label: "Vertical Scollbars",
42
+ description: "Boolean value that determines whether a vertical scroll indicator is shown in the WebView. The default value is true."
43
+ }),
44
+ mediaPlaybackRequiresUserAction: createStaticBoolProp({
45
+ label: "Media Playback Requires User Action",
46
+ group: GROUPS.advanced,
47
+ description: "Boolean that determines whether HTML5 audio and video requires the user to tap them before they start playing. The default value is true. (Android API minimum version 17)."
48
+ }),
49
+ startInLoadingState: createStaticBoolProp({
50
+ label: "Start In Loading State",
51
+ group: GROUPS.advanced,
52
+ description: "Boolean value that forces the WebView to show the loading view on the first load. This prop must be set to true in order for the renderLoading prop to work."
53
+ }),
54
+ allowFileAccessFromFileURLs: createStaticBoolProp({
55
+ label: "Allow File Access From File URLs",
56
+ group: GROUPS.advanced,
57
+ description: "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs. The default value is false."
58
+ }),
59
+ allowUniversalAccessFromFileURLs: createStaticBoolProp({
60
+ label: "Allow Universal Access From File URLs",
61
+ group: GROUPS.advanced,
62
+ description: "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. Including accessing content from other file scheme URLs. The default value is false."
63
+ }),
64
+ cacheEnabled: createStaticBoolProp({
65
+ label: "Enable Cache",
66
+ defaultValue: true,
67
+ description: "Sets whether WebView should use browser caching."
68
+ }),
69
+ incognito: createStaticBoolProp({
70
+ label: "Use Incognito Mode",
71
+ description: "Does not store any data within the lifetime of the WebView."
72
+ }),
73
+ userAgent: createTextProp({
74
+ group: GROUPS.advanced,
75
+ defaultValue: null,
76
+ label: "User Agent",
77
+ description: "Sets the user-agent for the WebView."
78
+ }),
79
+ applicationNameForUserAgent: createTextProp({
80
+ group: GROUPS.advanced,
81
+ defaultValue: null,
82
+ label: "User Agent App Name",
83
+ description: "Append to the existing user-agent. Setting userAgent will override this."
19
84
  })
20
85
  }
21
86
  };
@@ -1 +1 @@
1
- {"version":3,"names":["COMPONENT_TYPES","createSourceProp","createStaticBoolProp","StylesPanelSections","SEED_DATA","name","tag","description","category","media","stylesPanelSections","Size","Margins","Borders","layout","flex","props","source","defaultValue","optimizeVideoChat","label"],"sources":["WebView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createSourceProp,\n createStaticBoolProp,\n StylesPanelSections,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Web View\",\n tag: \"WebView\",\n description: \"Render web content inside a view\",\n category: COMPONENT_TYPES.media,\n stylesPanelSections: [\n StylesPanelSections.Size,\n StylesPanelSections.Margins,\n StylesPanelSections.Borders,\n ],\n layout: { flex: 1 },\n props: {\n source: createSourceProp({\n defaultValue: \"https://reactnative.dev\",\n }),\n optimizeVideoChat: createStaticBoolProp({\n defaultValue: false,\n label: \"Optimize Video Chat\",\n description:\n \"Allows for a better experience from web hosted video chat services\",\n }),\n },\n};\n"],"mappings":"AAAA,SACEA,eADF,EAEEC,gBAFF,EAGEC,oBAHF,EAIEC,mBAJF,QAKO,iBALP;AAOA,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,UADiB;EAEvBC,GAAG,EAAE,SAFkB;EAGvBC,WAAW,EAAE,kCAHU;EAIvBC,QAAQ,EAAER,eAAe,CAACS,KAJH;EAKvBC,mBAAmB,EAAE,CACnBP,mBAAmB,CAACQ,IADD,EAEnBR,mBAAmB,CAACS,OAFD,EAGnBT,mBAAmB,CAACU,OAHD,CALE;EAUvBC,MAAM,EAAE;IAAEC,IAAI,EAAE;EAAR,CAVe;EAWvBC,KAAK,EAAE;IACLC,MAAM,EAAEhB,gBAAgB,CAAC;MACvBiB,YAAY,EAAE;IADS,CAAD,CADnB;IAILC,iBAAiB,EAAEjB,oBAAoB,CAAC;MACtCgB,YAAY,EAAE,KADwB;MAEtCE,KAAK,EAAE,qBAF+B;MAGtCb,WAAW,EACT;IAJoC,CAAD;EAJlC;AAXgB,CAAlB"}
1
+ {"version":3,"names":["COMPONENT_TYPES","createSourceProp","createStaticBoolProp","createTextProp","GROUPS","StylesPanelSections","SEED_DATA","name","tag","description","category","media","stylesPanelSections","Size","Margins","Borders","layout","flex","props","source","defaultValue","optimizeVideoChat","label","javaScriptEnabled","group","advanced","javaScriptCanOpenWindowsAutomatically","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","mediaPlaybackRequiresUserAction","startInLoadingState","allowFileAccessFromFileURLs","allowUniversalAccessFromFileURLs","cacheEnabled","incognito","userAgent","applicationNameForUserAgent"],"sources":["WebView.ts"],"sourcesContent":["import {\n COMPONENT_TYPES,\n createSourceProp,\n createStaticBoolProp,\n createTextProp,\n GROUPS,\n StylesPanelSections,\n} from \"@draftbit/types\";\n\nexport const SEED_DATA = {\n name: \"Web View\",\n tag: \"WebView\",\n description: \"Render web content inside a view\",\n category: COMPONENT_TYPES.media,\n stylesPanelSections: [\n StylesPanelSections.Size,\n StylesPanelSections.Margins,\n StylesPanelSections.Borders,\n ],\n layout: { flex: 1 },\n props: {\n source: createSourceProp({\n defaultValue: \"https://reactnative.dev\",\n }),\n optimizeVideoChat: createStaticBoolProp({\n defaultValue: false,\n label: \"Optimize Video Chat\",\n description:\n \"Allows for a better experience from web hosted video chat services\",\n }),\n javaScriptEnabled: createStaticBoolProp({\n defaultValue: true,\n group: GROUPS.advanced,\n label: \"Enable Javascript\",\n description:\n \"Boolean value to enable JavaScript in the WebView. The default value is true.\",\n }),\n javaScriptCanOpenWindowsAutomatically: createStaticBoolProp({\n defaultValue: false,\n group: GROUPS.advanced,\n label: \"Allow New Windows\",\n description:\n \"A Boolean value indicating whether JavaScript can open windows without user interaction. The default value is false.\",\n }),\n showsHorizontalScrollIndicator: createStaticBoolProp({\n defaultValue: true,\n group: GROUPS.advanced,\n label: \"Horizontal Scollbars\",\n description:\n \"Boolean value that determines whether a horizontal scroll indicator is shown in the WebView. The default value is true.\",\n }),\n showsVerticalScrollIndicator: createStaticBoolProp({\n defaultValue: true,\n group: GROUPS.advanced,\n label: \"Vertical Scollbars\",\n description:\n \"Boolean value that determines whether a vertical scroll indicator is shown in the WebView. The default value is true.\",\n }),\n mediaPlaybackRequiresUserAction: createStaticBoolProp({\n label: \"Media Playback Requires User Action\",\n group: GROUPS.advanced,\n description:\n \"Boolean that determines whether HTML5 audio and video requires the user to tap them before they start playing. The default value is true. (Android API minimum version 17).\",\n }),\n startInLoadingState: createStaticBoolProp({\n label: \"Start In Loading State\",\n group: GROUPS.advanced,\n description:\n \"Boolean value that forces the WebView to show the loading view on the first load. This prop must be set to true in order for the renderLoading prop to work.\",\n }),\n allowFileAccessFromFileURLs: createStaticBoolProp({\n label: \"Allow File Access From File URLs\",\n group: GROUPS.advanced,\n description:\n \"Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs. The default value is false.\",\n }),\n allowUniversalAccessFromFileURLs: createStaticBoolProp({\n label: \"Allow Universal Access From File URLs\",\n group: GROUPS.advanced,\n description:\n \"Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. Including accessing content from other file scheme URLs. The default value is false.\",\n }),\n cacheEnabled: createStaticBoolProp({\n label: \"Enable Cache\",\n defaultValue: true,\n description: \"Sets whether WebView should use browser caching.\",\n }),\n incognito: createStaticBoolProp({\n label: \"Use Incognito Mode\",\n description:\n \"Does not store any data within the lifetime of the WebView.\",\n }),\n userAgent: createTextProp({\n group: GROUPS.advanced,\n defaultValue: null,\n label: \"User Agent\",\n description: \"Sets the user-agent for the WebView.\",\n }),\n applicationNameForUserAgent: createTextProp({\n group: GROUPS.advanced,\n defaultValue: null,\n label: \"User Agent App Name\",\n description:\n \"Append to the existing user-agent. Setting userAgent will override this.\",\n }),\n },\n};\n"],"mappings":"AAAA,SACEA,eADF,EAEEC,gBAFF,EAGEC,oBAHF,EAIEC,cAJF,EAKEC,MALF,EAMEC,mBANF,QAOO,iBAPP;AASA,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,UADiB;EAEvBC,GAAG,EAAE,SAFkB;EAGvBC,WAAW,EAAE,kCAHU;EAIvBC,QAAQ,EAAEV,eAAe,CAACW,KAJH;EAKvBC,mBAAmB,EAAE,CACnBP,mBAAmB,CAACQ,IADD,EAEnBR,mBAAmB,CAACS,OAFD,EAGnBT,mBAAmB,CAACU,OAHD,CALE;EAUvBC,MAAM,EAAE;IAAEC,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WAAW,EACT;IAJsC,CAAD,CA5CpC;IAkDLsB,2BAA2B,EAAE7B,oBAAoB,CAAC;MAChDoB,KAAK,EAAE,kCADyC;MAEhDE,KAAK,EAAEpB,MAAM,CAACqB,QAFkC;MAGhDhB,WAAW,EACT;IAJ8C,CAAD,CAlD5C;IAwDLuB,gCAAgC,EAAE9B,oBAAoB,CAAC;MACrDoB,KAAK,EAAE,uCAD8C;MAErDE,KAAK,EAAEpB,MAAM,CAACqB,QAFuC;MAGrDhB,WAAW,EACT;IAJmD,CAAD,CAxDjD;IA8DLwB,YAAY,EAAE/B,oBAAoB,CAAC;MACjCoB,KAAK,EAAE,cAD0B;MAEjCF,YAAY,EAAE,IAFmB;MAGjCX,WAAW,EAAE;IAHoB,CAAD,CA9D7B;IAmELyB,SAAS,EAAEhC,oBAAoB,CAAC;MAC9BoB,KAAK,EAAE,oBADuB;MAE9Bb,WAAW,EACT;IAH4B,CAAD,CAnE1B;IAwEL0B,SAAS,EAAEhC,cAAc,CAAC;MACxBqB,KAAK,EAAEpB,MAAM,CAACqB,QADU;MAExBL,YAAY,EAAE,IAFU;MAGxBE,KAAK,EAAE,YAHiB;MAIxBb,WAAW,EAAE;IAJW,CAAD,CAxEpB;IA8EL2B,2BAA2B,EAAEjC,cAAc,CAAC;MAC1CqB,KAAK,EAAEpB,MAAM,CAACqB,QAD4B;MAE1CL,YAAY,EAAE,IAF4B;MAG1CE,KAAK,EAAE,qBAHmC;MAI1Cb,WAAW,EACT;IALwC,CAAD;EA9EtC;AAXgB,CAAlB"}
@@ -28,5 +28,107 @@ export declare const SEED_DATA: {
28
28
  required: boolean;
29
29
  group: string;
30
30
  };
31
+ javaScriptEnabled: {
32
+ label: string;
33
+ description: string;
34
+ formType: string;
35
+ propType: string;
36
+ defaultValue: boolean;
37
+ editable: boolean;
38
+ required: boolean;
39
+ group: string;
40
+ };
41
+ javaScriptCanOpenWindowsAutomatically: {
42
+ label: string;
43
+ description: string;
44
+ formType: string;
45
+ propType: string;
46
+ defaultValue: boolean;
47
+ editable: boolean;
48
+ required: boolean;
49
+ group: string;
50
+ };
51
+ showsHorizontalScrollIndicator: {
52
+ label: string;
53
+ description: string;
54
+ formType: string;
55
+ propType: string;
56
+ defaultValue: boolean;
57
+ editable: boolean;
58
+ required: boolean;
59
+ group: string;
60
+ };
61
+ showsVerticalScrollIndicator: {
62
+ label: string;
63
+ description: string;
64
+ formType: string;
65
+ propType: string;
66
+ defaultValue: boolean;
67
+ editable: boolean;
68
+ required: boolean;
69
+ group: string;
70
+ };
71
+ mediaPlaybackRequiresUserAction: {
72
+ label: string;
73
+ description: string;
74
+ formType: string;
75
+ propType: string;
76
+ defaultValue: boolean;
77
+ editable: boolean;
78
+ required: boolean;
79
+ group: string;
80
+ };
81
+ startInLoadingState: {
82
+ label: string;
83
+ description: string;
84
+ formType: string;
85
+ propType: string;
86
+ defaultValue: boolean;
87
+ editable: boolean;
88
+ required: boolean;
89
+ group: string;
90
+ };
91
+ allowFileAccessFromFileURLs: {
92
+ label: string;
93
+ description: string;
94
+ formType: string;
95
+ propType: string;
96
+ defaultValue: boolean;
97
+ editable: boolean;
98
+ required: boolean;
99
+ group: string;
100
+ };
101
+ allowUniversalAccessFromFileURLs: {
102
+ label: string;
103
+ description: string;
104
+ formType: string;
105
+ propType: string;
106
+ defaultValue: boolean;
107
+ editable: boolean;
108
+ required: boolean;
109
+ group: string;
110
+ };
111
+ cacheEnabled: {
112
+ label: string;
113
+ description: string;
114
+ formType: string;
115
+ propType: string;
116
+ defaultValue: boolean;
117
+ editable: boolean;
118
+ required: boolean;
119
+ group: string;
120
+ };
121
+ incognito: {
122
+ label: string;
123
+ description: string;
124
+ formType: string;
125
+ propType: string;
126
+ defaultValue: boolean;
127
+ editable: boolean;
128
+ required: boolean;
129
+ group: string;
130
+ };
131
+ userAgent: any;
132
+ applicationNameForUserAgent: any;
31
133
  };
32
134
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.2.1",
3
+ "version": "46.2.2-088abf.0+088abf3c",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -79,5 +79,5 @@
79
79
  ]
80
80
  ]
81
81
  },
82
- "gitHead": "ccb547bff6550984fbe0d548152922067e3a50bb"
82
+ "gitHead": "088abf3c9fa7d9414006bd83e0180857f56825b3"
83
83
  }
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createSourceProp, createStaticBoolProp, StylesPanelSections, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createSourceProp, createStaticBoolProp, createTextProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = {
3
3
  name: "Web View",
4
4
  tag: "WebView",
@@ -19,5 +19,70 @@ export const SEED_DATA = {
19
19
  label: "Optimize Video Chat",
20
20
  description: "Allows for a better experience from web hosted video chat services",
21
21
  }),
22
+ javaScriptEnabled: createStaticBoolProp({
23
+ defaultValue: true,
24
+ group: GROUPS.advanced,
25
+ label: "Enable Javascript",
26
+ description: "Boolean value to enable JavaScript in the WebView. The default value is true.",
27
+ }),
28
+ javaScriptCanOpenWindowsAutomatically: createStaticBoolProp({
29
+ defaultValue: false,
30
+ group: GROUPS.advanced,
31
+ label: "Allow New Windows",
32
+ description: "A Boolean value indicating whether JavaScript can open windows without user interaction. The default value is false.",
33
+ }),
34
+ showsHorizontalScrollIndicator: createStaticBoolProp({
35
+ defaultValue: true,
36
+ group: GROUPS.advanced,
37
+ label: "Horizontal Scollbars",
38
+ description: "Boolean value that determines whether a horizontal scroll indicator is shown in the WebView. The default value is true.",
39
+ }),
40
+ showsVerticalScrollIndicator: createStaticBoolProp({
41
+ defaultValue: true,
42
+ group: GROUPS.advanced,
43
+ label: "Vertical Scollbars",
44
+ description: "Boolean value that determines whether a vertical scroll indicator is shown in the WebView. The default value is true.",
45
+ }),
46
+ mediaPlaybackRequiresUserAction: createStaticBoolProp({
47
+ label: "Media Playback Requires User Action",
48
+ group: GROUPS.advanced,
49
+ description: "Boolean that determines whether HTML5 audio and video requires the user to tap them before they start playing. The default value is true. (Android API minimum version 17).",
50
+ }),
51
+ startInLoadingState: createStaticBoolProp({
52
+ label: "Start In Loading State",
53
+ group: GROUPS.advanced,
54
+ description: "Boolean value that forces the WebView to show the loading view on the first load. This prop must be set to true in order for the renderLoading prop to work.",
55
+ }),
56
+ allowFileAccessFromFileURLs: createStaticBoolProp({
57
+ label: "Allow File Access From File URLs",
58
+ group: GROUPS.advanced,
59
+ description: "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs. The default value is false.",
60
+ }),
61
+ allowUniversalAccessFromFileURLs: createStaticBoolProp({
62
+ label: "Allow Universal Access From File URLs",
63
+ group: GROUPS.advanced,
64
+ description: "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. Including accessing content from other file scheme URLs. The default value is false.",
65
+ }),
66
+ cacheEnabled: createStaticBoolProp({
67
+ label: "Enable Cache",
68
+ defaultValue: true,
69
+ description: "Sets whether WebView should use browser caching.",
70
+ }),
71
+ incognito: createStaticBoolProp({
72
+ label: "Use Incognito Mode",
73
+ description: "Does not store any data within the lifetime of the WebView.",
74
+ }),
75
+ userAgent: createTextProp({
76
+ group: GROUPS.advanced,
77
+ defaultValue: null,
78
+ label: "User Agent",
79
+ description: "Sets the user-agent for the WebView.",
80
+ }),
81
+ applicationNameForUserAgent: createTextProp({
82
+ group: GROUPS.advanced,
83
+ defaultValue: null,
84
+ label: "User Agent App Name",
85
+ description: "Append to the existing user-agent. Setting userAgent will override this.",
86
+ }),
22
87
  },
23
88
  };
@@ -2,6 +2,8 @@ import {
2
2
  COMPONENT_TYPES,
3
3
  createSourceProp,
4
4
  createStaticBoolProp,
5
+ createTextProp,
6
+ GROUPS,
5
7
  StylesPanelSections,
6
8
  } from "@draftbit/types";
7
9
 
@@ -26,5 +28,80 @@ export const SEED_DATA = {
26
28
  description:
27
29
  "Allows for a better experience from web hosted video chat services",
28
30
  }),
31
+ javaScriptEnabled: createStaticBoolProp({
32
+ defaultValue: true,
33
+ group: GROUPS.advanced,
34
+ label: "Enable Javascript",
35
+ description:
36
+ "Boolean value to enable JavaScript in the WebView. The default value is true.",
37
+ }),
38
+ javaScriptCanOpenWindowsAutomatically: createStaticBoolProp({
39
+ defaultValue: false,
40
+ group: GROUPS.advanced,
41
+ label: "Allow New Windows",
42
+ description:
43
+ "A Boolean value indicating whether JavaScript can open windows without user interaction. The default value is false.",
44
+ }),
45
+ showsHorizontalScrollIndicator: createStaticBoolProp({
46
+ defaultValue: true,
47
+ group: GROUPS.advanced,
48
+ label: "Horizontal Scollbars",
49
+ description:
50
+ "Boolean value that determines whether a horizontal scroll indicator is shown in the WebView. The default value is true.",
51
+ }),
52
+ showsVerticalScrollIndicator: createStaticBoolProp({
53
+ defaultValue: true,
54
+ group: GROUPS.advanced,
55
+ label: "Vertical Scollbars",
56
+ description:
57
+ "Boolean value that determines whether a vertical scroll indicator is shown in the WebView. The default value is true.",
58
+ }),
59
+ mediaPlaybackRequiresUserAction: createStaticBoolProp({
60
+ label: "Media Playback Requires User Action",
61
+ group: GROUPS.advanced,
62
+ description:
63
+ "Boolean that determines whether HTML5 audio and video requires the user to tap them before they start playing. The default value is true. (Android API minimum version 17).",
64
+ }),
65
+ startInLoadingState: createStaticBoolProp({
66
+ label: "Start In Loading State",
67
+ group: GROUPS.advanced,
68
+ description:
69
+ "Boolean value that forces the WebView to show the loading view on the first load. This prop must be set to true in order for the renderLoading prop to work.",
70
+ }),
71
+ allowFileAccessFromFileURLs: createStaticBoolProp({
72
+ label: "Allow File Access From File URLs",
73
+ group: GROUPS.advanced,
74
+ description:
75
+ "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from other file scheme URLs. The default value is false.",
76
+ }),
77
+ allowUniversalAccessFromFileURLs: createStaticBoolProp({
78
+ label: "Allow Universal Access From File URLs",
79
+ group: GROUPS.advanced,
80
+ description:
81
+ "Boolean that sets whether JavaScript running in the context of a file scheme URL should be allowed to access content from any origin. Including accessing content from other file scheme URLs. The default value is false.",
82
+ }),
83
+ cacheEnabled: createStaticBoolProp({
84
+ label: "Enable Cache",
85
+ defaultValue: true,
86
+ description: "Sets whether WebView should use browser caching.",
87
+ }),
88
+ incognito: createStaticBoolProp({
89
+ label: "Use Incognito Mode",
90
+ description:
91
+ "Does not store any data within the lifetime of the WebView.",
92
+ }),
93
+ userAgent: createTextProp({
94
+ group: GROUPS.advanced,
95
+ defaultValue: null,
96
+ label: "User Agent",
97
+ description: "Sets the user-agent for the WebView.",
98
+ }),
99
+ applicationNameForUserAgent: createTextProp({
100
+ group: GROUPS.advanced,
101
+ defaultValue: null,
102
+ label: "User Agent App Name",
103
+ description:
104
+ "Append to the existing user-agent. Setting userAgent will override this.",
105
+ }),
29
106
  },
30
107
  };