@threekit-tools/treble 0.0.82 → 0.0.85-next-1

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 (111) hide show
  1. package/dist/Treble/Treble.d.ts +15 -6
  2. package/dist/Treble/Treble.js +58 -20
  3. package/dist/Treble/index.d.ts +2 -2
  4. package/dist/Treble/index.js +2 -2
  5. package/dist/Treble/{Snapshots.d.ts → snapshots.d.ts} +4 -9
  6. package/dist/Treble/snapshots.js +247 -0
  7. package/dist/Treble/{Wishlist.d.ts → wishlist.d.ts} +2 -6
  8. package/dist/Treble/wishlist.js +135 -0
  9. package/dist/api/catalog.js +6 -6
  10. package/dist/api/configurations.d.ts +2 -0
  11. package/dist/api/configurations.js +7 -5
  12. package/dist/api/datatables.js +5 -5
  13. package/dist/api/files.d.ts +1 -0
  14. package/dist/api/files.js +63 -0
  15. package/dist/api/index.d.ts +2 -0
  16. package/dist/api/index.js +2 -0
  17. package/dist/api/orders.d.ts +5 -7
  18. package/dist/api/orders.js +12 -12
  19. package/dist/api/price.js +2 -2
  20. package/dist/api/products.js +2 -2
  21. package/dist/components/Accordion/index.js +1 -6
  22. package/dist/components/AttributeTitle/index.d.ts +0 -9
  23. package/dist/components/AttributeTitle/index.js +0 -9
  24. package/dist/components/AttributeValue/index.d.ts +0 -6
  25. package/dist/components/AttributeValue/index.js +2 -8
  26. package/dist/components/Button/index.d.ts +0 -27
  27. package/dist/components/Button/index.js +0 -27
  28. package/dist/components/Cards/index.d.ts +2 -55
  29. package/dist/components/Cards/index.js +3 -60
  30. package/dist/components/Drawer/index.js +0 -13
  31. package/dist/components/Dropdown/index.d.ts +2 -59
  32. package/dist/components/Dropdown/index.js +4 -69
  33. package/dist/components/FlatForm/index.d.ts +0 -21
  34. package/dist/components/FlatForm/index.js +5 -24
  35. package/dist/components/Modal/index.js +0 -13
  36. package/dist/components/Player/index.d.ts +1 -1
  37. package/dist/components/PortalToElement/index.js +0 -8
  38. package/dist/components/ProductDescription/index.d.ts +0 -6
  39. package/dist/components/ProductDescription/index.js +0 -6
  40. package/dist/components/ProductName/index.d.ts +0 -9
  41. package/dist/components/ProductName/index.js +0 -9
  42. package/dist/components/Share/index.d.ts +4 -12
  43. package/dist/components/Share/index.js +143 -21
  44. package/dist/components/Share/share.styles.d.ts +9 -0
  45. package/dist/components/Share/share.styles.js +23 -0
  46. package/dist/components/Snapshots/index.d.ts +0 -8
  47. package/dist/components/Snapshots/index.js +0 -8
  48. package/dist/components/Strips/index.d.ts +2 -55
  49. package/dist/components/Strips/index.js +3 -60
  50. package/dist/components/Swatch/index.d.ts +2 -64
  51. package/dist/components/Swatch/index.js +3 -69
  52. package/dist/components/Switch/index.d.ts +2 -34
  53. package/dist/components/Switch/index.js +2 -38
  54. package/dist/components/TextInput/index.d.ts +2 -1
  55. package/dist/components/TextInput/index.js +2 -3
  56. package/dist/components/Tiles/index.d.ts +2 -29
  57. package/dist/components/Tiles/index.js +3 -33
  58. package/dist/components/TilesGroup/index.d.ts +2 -26
  59. package/dist/components/TilesGroup/index.js +3 -30
  60. package/dist/components/TotalPrice/index.d.ts +0 -6
  61. package/dist/components/TotalPrice/index.js +0 -6
  62. package/dist/components/Upload/index.d.ts +2 -1
  63. package/dist/components/Upload/index.js +7 -8
  64. package/dist/components/UploadArea/index.d.ts +2 -1
  65. package/dist/components/UploadArea/index.js +6 -7
  66. package/dist/components/Wishlist/index.d.ts +1 -4
  67. package/dist/components/Wishlist/index.js +2 -5
  68. package/dist/components/Zoom/index.d.ts +1 -18
  69. package/dist/components/Zoom/index.js +0 -17
  70. package/dist/components/formComponents.d.ts +12 -0
  71. package/dist/components/formComponents.js +5 -7
  72. package/dist/components/message/index.d.ts +0 -9
  73. package/dist/components/message/index.js +0 -9
  74. package/dist/connection.js +2 -2
  75. package/dist/constants.d.ts +0 -49
  76. package/dist/constants.js +1 -59
  77. package/dist/hooks/useAttribute/index.js +6 -6
  78. package/dist/hooks/useConfigurationLoader/index.js +5 -5
  79. package/dist/hooks/useNestedConfigurator/index.js +2 -2
  80. package/dist/hooks/useShare/index.js +3 -3
  81. package/dist/hooks/useSingleAnimation/index.js +20 -25
  82. package/dist/http/configurations.d.ts +1 -0
  83. package/dist/http/datatables.js +0 -1
  84. package/dist/http/files.d.ts +21 -0
  85. package/dist/http/files.js +26 -0
  86. package/dist/http/index.d.ts +2 -0
  87. package/dist/http/index.js +2 -0
  88. package/dist/http/orders.d.ts +6 -8
  89. package/dist/icons/index.d.ts +0 -41
  90. package/dist/icons/index.js +0 -42
  91. package/dist/index.d.ts +42 -3
  92. package/dist/index.js +84 -30
  93. package/dist/store/attributes.d.ts +0 -12
  94. package/dist/store/attributes.js +2 -15
  95. package/dist/store/price.d.ts +0 -12
  96. package/dist/store/price.js +2 -16
  97. package/dist/store/product.d.ts +2 -17
  98. package/dist/store/product.js +26 -38
  99. package/dist/store/translations.d.ts +0 -12
  100. package/dist/store/translations.js +2 -12
  101. package/dist/store/treble.d.ts +1 -15
  102. package/dist/store/treble.js +34 -68
  103. package/dist/store/wishlist.d.ts +0 -12
  104. package/dist/store/wishlist.js +4 -17
  105. package/dist/types.d.ts +73 -58
  106. package/dist/types.js +54 -0
  107. package/dist/utils.d.ts +2 -2
  108. package/dist/utils.js +8 -16
  109. package/package.json +20 -4
  110. package/dist/Treble/Snapshots.js +0 -251
  111. package/dist/Treble/Wishlist.js +0 -136
@@ -11,7 +11,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
11
11
  var shared_styles_1 = require("../shared.styles");
12
12
  var cards_styles_1 = require("./cards.styles");
13
13
  var utils_1 = require("../../utils");
14
- var constants_1 = require("../../constants");
14
+ var types_1 = require("../../types");
15
15
  var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
16
16
  var Thumbnail = function (props) {
17
17
  var imageUrl = props.imageUrl, color = props.color, name = props.name, className = props.className;
@@ -62,33 +62,11 @@ var Cards = function (props) {
62
62
  };
63
63
  exports.Cards = Cards;
64
64
  exports.Cards.propTypes = {
65
- /**
66
- * Is the attribute name on the initialized asset that we are
67
- * using this component for. If the attribute prop is used,
68
- * the component will ignore the props for: `value`, `options`, `onClick`.
69
- */
70
65
  attribute: prop_types_1.default.string,
71
- /**
72
- * Used to add a title to the input
73
- */
74
66
  title: prop_types_1.default.string,
75
- /**
76
- * Used to provide a custom description for the input component
77
- */
78
67
  description: prop_types_1.default.string,
79
- /**
80
- * Selected value from the option set. Should match the 'value' property
81
- * of one of the items in the options array.
82
- */
83
68
  value: prop_types_1.default.string,
84
- /**
85
- * Handles the user seletion by passing the value of the selected
86
- * option as the argument into the onClick callback.
87
- */
88
69
  onClick: prop_types_1.default.func,
89
- /**
90
- * The options set to be displayed for the user
91
- */
92
70
  options: prop_types_1.default.arrayOf(prop_types_1.default.shape({
93
71
  name: prop_types_1.default.string,
94
72
  description: prop_types_1.default.string,
@@ -98,59 +76,24 @@ exports.Cards.propTypes = {
98
76
  color: prop_types_1.default.string,
99
77
  disabled: prop_types_1.default.bool,
100
78
  })),
101
- /**
102
- * Used to add a custom class name to each of the components html elements
103
- */
104
79
  className: prop_types_1.default.string,
105
- /**
106
- * By default the thumbnail (image/color value) is soruced from the `_thumbnail`
107
- * metadata key in the option's Catalog Item. This metadata key can be overwritten
108
- * by passing in the prefered key value to the **thumbnailFromMetadata** prop.
109
- */
110
80
  metadataKeyThumbnail: prop_types_1.default.string,
111
- /**
112
- * By default the description is soruced from the `_description` metadata
113
- * key in the option's Catalog Item. This metadata key can be overwritten
114
- * by passing in the prefered key value to the **metadataKeyDescription**
115
- * prop.
116
- */
117
81
  metadataKeyDescription: prop_types_1.default.string,
118
- /**
119
- * By default the price of an item is soruced from the pricebook entry for
120
- * the option's Catalog Item. The price can alternatively be soruced from
121
- * the option's Catalog Item metadata, by specifying the key under which the
122
- * price can be found as the **metadataKeyPrice** prop.
123
- */
124
82
  metadataKeyPrice: prop_types_1.default.string,
125
- /**
126
- * A boolean to set whether or all the Cards should display thumbnails
127
- * for the options.
128
- */
129
83
  showThumbnail: prop_types_1.default.bool,
130
- /**
131
- * A boolean to set whether or all the Cards should display the description
132
- * for the options.
133
- */
134
84
  showDescription: prop_types_1.default.bool,
135
- /**
136
- * A boolean to set whether or all the Cards should display the price
137
- * for the options/
138
- */
139
85
  showPrice: prop_types_1.default.bool,
140
86
  };
141
87
  exports.Cards.defaultProps = {
142
88
  description: undefined,
143
89
  className: undefined,
144
- // Default use
145
90
  attribute: undefined,
146
- // Default user overrides
147
91
  metadataKeyThumbnail: undefined,
148
92
  metadataKeyDescription: undefined,
149
93
  metadataKeyPrice: undefined,
150
94
  showThumbnail: true,
151
95
  showPrice: true,
152
96
  showDescription: true,
153
- // Custom use
154
97
  title: undefined,
155
98
  value: undefined,
156
99
  options: undefined,
@@ -158,7 +101,7 @@ exports.Cards.defaultProps = {
158
101
  };
159
102
  exports.Cards.componentName = 'cards';
160
103
  exports.Cards.compatibleAttributes = new Set([
161
- constants_1.ATTRIBUTE_TYPES.asset,
162
- constants_1.ATTRIBUTE_TYPES.string,
104
+ types_1.ATTRIBUTE_TYPES.ASSET,
105
+ types_1.ATTRIBUTE_TYPES.STRING,
163
106
  ]);
164
107
  exports.default = (0, formInputContainer_1.default)(exports.Cards);
@@ -72,22 +72,9 @@ var Drawer = function (props) {
72
72
  };
73
73
  exports.Drawer = Drawer;
74
74
  exports.Drawer.propTypes = {
75
- /**
76
- * The title to be shown in the Drawer header
77
- */
78
75
  title: prop_types_1.default.string,
79
- /**
80
- * Callback function to close the Drawer. Can be used with custom UI
81
- * components in the Drawer
82
- */
83
76
  handleClose: prop_types_1.default.func,
84
- /**
85
- * Whether or not to render the default Drawer header
86
- */
87
77
  showHeader: prop_types_1.default.bool,
88
- /**
89
- * Used to add a custom class name to each of the components html elements
90
- */
91
78
  className: prop_types_1.default.string,
92
79
  };
93
80
  exports.Drawer.defaultProps = {
@@ -1,5 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import PropTypes from 'prop-types';
3
+ import { ATTRIBUTE_TYPES } from '../../types';
3
4
  import { IFormComponentProps, IOption } from '../containers/formInputContainer';
4
5
  export interface IDropdown extends IFormComponentProps<IOption> {
5
6
  showThumbnail?: boolean;
@@ -10,33 +11,11 @@ export interface IDropdown extends IFormComponentProps<IOption> {
10
11
  export declare const Dropdown: {
11
12
  (props: IDropdown): JSX.Element;
12
13
  propTypes: {
13
- /**
14
- * Is the attribute name on the initialized asset that we are
15
- * using this component for. If the attribute prop is used,
16
- * the component will ignore the props for: `value`, `options`, `onClick`.
17
- */
18
14
  attribute: PropTypes.Requireable<string>;
19
- /**
20
- * Used to add a title to the input
21
- */
22
15
  title: PropTypes.Requireable<string>;
23
- /**
24
- * Used to provide a custom description for the input component
25
- */
26
16
  description: PropTypes.Requireable<string>;
27
- /**
28
- * Selected value from the option set. Should match the 'value' property
29
- * of one of the items in the options array.
30
- */
31
17
  value: PropTypes.Requireable<string>;
32
- /**
33
- * Handles the user seletion by passing the value of the selected
34
- * option as the argument into the onClick callback.
35
- */
36
18
  onClick: PropTypes.Requireable<(...args: any[]) => any>;
37
- /**
38
- * The options set to be displayed for the user
39
- */
40
19
  options: PropTypes.Requireable<(PropTypes.InferProps<{
41
20
  name: PropTypes.Requireable<string>;
42
21
  description: PropTypes.Requireable<string>;
@@ -46,49 +25,13 @@ export declare const Dropdown: {
46
25
  color: PropTypes.Requireable<string>;
47
26
  disabled: PropTypes.Requireable<boolean>;
48
27
  }> | null | undefined)[]>;
49
- /**
50
- * Used to add a custom class name to each of the components html elements
51
- */
52
28
  className: PropTypes.Requireable<string>;
53
- /**
54
- * By default the thumbnail (image/color value) is soruced from the `_thumbnail`
55
- * metadata key in the option's Catalog Item. This metadata key can be overwritten
56
- * by passing in the prefered key value to the **thumbnailFromMetadata** prop.
57
- */
58
29
  metadataKeyThumbnail: PropTypes.Requireable<string>;
59
- /**
60
- * By default the description is soruced from the `_description` metadata
61
- * key in the option's Catalog Item. This metadata key can be overwritten
62
- * by passing in the prefered key value to the **metadataKeyDescription**
63
- * prop.
64
- */
65
30
  metadataKeyDescription: PropTypes.Requireable<string>;
66
- /**
67
- * By default the price of an item is soruced from the pricebook entry for
68
- * the option's Catalog Item. The price can alternatively be soruced from
69
- * the option's Catalog Item metadata, by specifying the key under which the
70
- * price can be found as the **metadataKeyPrice** prop.
71
- */
72
31
  metadataKeyPrice: PropTypes.Requireable<string>;
73
- /**
74
- * A boolean to set whether or all the Cards should display thumbnails
75
- * for the options.
76
- */
77
32
  showThumbnail: PropTypes.Requireable<boolean>;
78
- /**
79
- * A boolean to set whether or all the Cards should display the description
80
- * for the options.
81
- */
82
33
  showDescription: PropTypes.Requireable<boolean>;
83
- /**
84
- * A boolean to set whether or all the Cards should display the price
85
- * for the options.
86
- */
87
34
  showPrice: PropTypes.Requireable<boolean>;
88
- /**
89
- * The maximum height the dropdown area should extend to before scrolling
90
- * is introduced
91
- */
92
35
  dropdownMaxHeight: PropTypes.Requireable<string>;
93
36
  };
94
37
  defaultProps: {
@@ -107,7 +50,7 @@ export declare const Dropdown: {
107
50
  dropdownMaxHeight: string;
108
51
  };
109
52
  componentName: string;
110
- compatibleAttributes: Set<string>;
53
+ compatibleAttributes: Set<ATTRIBUTE_TYPES>;
111
54
  };
112
55
  declare const _default: (props: IDropdown) => JSX.Element | null;
113
56
  export default _default;
@@ -34,7 +34,7 @@ var FormComponentDescription_1 = __importDefault(require("../FormComponentDescri
34
34
  var dropdown_styles_1 = require("./dropdown.styles");
35
35
  var CaretDown_1 = __importDefault(require("../../icons/CaretDown"));
36
36
  var utils_1 = require("../../utils");
37
- var constants_1 = require("../../constants");
37
+ var types_1 = require("../../types");
38
38
  var formInputContainer_1 = __importDefault(require("../containers/formInputContainer"));
39
39
  var Thumbnail = function (props) {
40
40
  var imageUrl = props.imageUrl, color = props.color, name = props.name, className = props.className;
@@ -82,11 +82,7 @@ var Dropdown = function (props) {
82
82
  return (react_1.default.createElement("div", { className: cls },
83
83
  react_1.default.createElement(FormComponentTitle_1.default, { title: title, className: cls }),
84
84
  react_1.default.createElement(FormComponentDescription_1.default, { description: description, className: cls }),
85
- react_1.default.createElement(dropdown_styles_1.DropdownWrapper
86
- // active={!hide}
87
- , {
88
- // active={!hide}
89
- ref: ref, className: "".concat(cls, " dropdown") },
85
+ react_1.default.createElement(dropdown_styles_1.DropdownWrapper, { ref: ref, className: "".concat(cls, " dropdown") },
90
86
  react_1.default.createElement(dropdown_styles_1.DropdownMain, { active: !hide, className: "".concat(cls, " selected"), onClick: function () { return setHide(!hide); }, hasPlaceholder: !value },
91
87
  react_1.default.createElement(Thumbnail, { imageUrl: selectedOpt === null || selectedOpt === void 0 ? void 0 : selectedOpt.imageUrl, color: selectedOpt === null || selectedOpt === void 0 ? void 0 : selectedOpt.color, name: selectedOpt === null || selectedOpt === void 0 ? void 0 : selectedOpt.name, className: "".concat(cls, " selected") }),
92
88
  react_1.default.createElement("div", null,
@@ -118,33 +114,11 @@ var Dropdown = function (props) {
118
114
  };
119
115
  exports.Dropdown = Dropdown;
120
116
  exports.Dropdown.propTypes = {
121
- /**
122
- * Is the attribute name on the initialized asset that we are
123
- * using this component for. If the attribute prop is used,
124
- * the component will ignore the props for: `value`, `options`, `onClick`.
125
- */
126
117
  attribute: prop_types_1.default.string,
127
- /**
128
- * Used to add a title to the input
129
- */
130
118
  title: prop_types_1.default.string,
131
- /**
132
- * Used to provide a custom description for the input component
133
- */
134
119
  description: prop_types_1.default.string,
135
- /**
136
- * Selected value from the option set. Should match the 'value' property
137
- * of one of the items in the options array.
138
- */
139
120
  value: prop_types_1.default.string,
140
- /**
141
- * Handles the user seletion by passing the value of the selected
142
- * option as the argument into the onClick callback.
143
- */
144
121
  onClick: prop_types_1.default.func,
145
- /**
146
- * The options set to be displayed for the user
147
- */
148
122
  options: prop_types_1.default.arrayOf(prop_types_1.default.shape({
149
123
  name: prop_types_1.default.string,
150
124
  description: prop_types_1.default.string,
@@ -154,64 +128,25 @@ exports.Dropdown.propTypes = {
154
128
  color: prop_types_1.default.string,
155
129
  disabled: prop_types_1.default.bool,
156
130
  })),
157
- /**
158
- * Used to add a custom class name to each of the components html elements
159
- */
160
131
  className: prop_types_1.default.string,
161
- /**
162
- * By default the thumbnail (image/color value) is soruced from the `_thumbnail`
163
- * metadata key in the option's Catalog Item. This metadata key can be overwritten
164
- * by passing in the prefered key value to the **thumbnailFromMetadata** prop.
165
- */
166
132
  metadataKeyThumbnail: prop_types_1.default.string,
167
- /**
168
- * By default the description is soruced from the `_description` metadata
169
- * key in the option's Catalog Item. This metadata key can be overwritten
170
- * by passing in the prefered key value to the **metadataKeyDescription**
171
- * prop.
172
- */
173
133
  metadataKeyDescription: prop_types_1.default.string,
174
- /**
175
- * By default the price of an item is soruced from the pricebook entry for
176
- * the option's Catalog Item. The price can alternatively be soruced from
177
- * the option's Catalog Item metadata, by specifying the key under which the
178
- * price can be found as the **metadataKeyPrice** prop.
179
- */
180
134
  metadataKeyPrice: prop_types_1.default.string,
181
- /**
182
- * A boolean to set whether or all the Cards should display thumbnails
183
- * for the options.
184
- */
185
135
  showThumbnail: prop_types_1.default.bool,
186
- /**
187
- * A boolean to set whether or all the Cards should display the description
188
- * for the options.
189
- */
190
136
  showDescription: prop_types_1.default.bool,
191
- /**
192
- * A boolean to set whether or all the Cards should display the price
193
- * for the options.
194
- */
195
137
  showPrice: prop_types_1.default.bool,
196
- /**
197
- * The maximum height the dropdown area should extend to before scrolling
198
- * is introduced
199
- */
200
138
  dropdownMaxHeight: prop_types_1.default.string,
201
139
  };
202
140
  exports.Dropdown.defaultProps = {
203
141
  description: undefined,
204
142
  className: undefined,
205
- // Default use
206
143
  attribute: undefined,
207
- // Default user overrides
208
144
  metadataKeyThumbnail: '_thumbnail',
209
145
  metadataKeyDescription: undefined,
210
146
  metadataKeyPrice: undefined,
211
147
  showThumbnail: true,
212
148
  showPrice: true,
213
149
  showDescription: true,
214
- // Custom use
215
150
  value: undefined,
216
151
  options: undefined,
217
152
  onClick: undefined,
@@ -219,7 +154,7 @@ exports.Dropdown.defaultProps = {
219
154
  };
220
155
  exports.Dropdown.componentName = 'dropdown';
221
156
  exports.Dropdown.compatibleAttributes = new Set([
222
- constants_1.ATTRIBUTE_TYPES.asset,
223
- constants_1.ATTRIBUTE_TYPES.string,
157
+ types_1.ATTRIBUTE_TYPES.ASSET,
158
+ types_1.ATTRIBUTE_TYPES.STRING,
224
159
  ]);
225
160
  exports.default = (0, formInputContainer_1.default)(exports.Dropdown);
@@ -12,36 +12,15 @@ interface FlatFormProps {
12
12
  export declare const FlatForm: {
13
13
  (props: FlatFormProps): JSX.Element | null;
14
14
  propTypes: {
15
- /**
16
- * Used to add a title to Form (defaults to the intialized Catalog Item's name)
17
- */
18
15
  title: PropTypes.Requireable<string>;
19
- /**
20
- * Alignement for the title. Options include `left`, `center` or `right`
21
- */
22
16
  alignTitle: PropTypes.Requireable<string>;
23
- /**
24
- * Used to add a description to Form
25
- */
26
17
  description: PropTypes.Requireable<string>;
27
- /**
28
- * The attributes prop allows us to specify which components to use for
29
- * our attributes and what props we want to pass into their components.
30
- *
31
- * The attributes prop takes and object with the keys matching the name
32
- * of the attribute you wish to target and value as an object includeing
33
- * the component to use and props to pass in.
34
- */
35
18
  attributes: PropTypes.Requireable<{
36
19
  [x: string]: PropTypes.InferProps<{
37
20
  component: PropTypes.Requireable<string>;
38
21
  props: PropTypes.Requireable<object>;
39
22
  }> | null | undefined;
40
23
  }>;
41
- /**
42
- *
43
- * Used to add a custom class name to each of the components html elements
44
- */
45
24
  className: PropTypes.Requireable<string>;
46
25
  };
47
26
  defaultProps: {
@@ -46,7 +46,7 @@ var ProductDescription_1 = __importDefault(require("../ProductDescription"));
46
46
  var formComponents_1 = __importStar(require("../formComponents"));
47
47
  var utils_1 = require("../../utils");
48
48
  var useConfigurator_1 = __importDefault(require("../../hooks/useConfigurator"));
49
- var constants_1 = require("../../constants");
49
+ var types_1 = require("../../types");
50
50
  var FlatForm = function (props) {
51
51
  var _a = Object.assign({
52
52
  alignTitle: 'center',
@@ -68,10 +68,12 @@ var FlatForm = function (props) {
68
68
  var Component;
69
69
  var props = ((_b = (_a = (attributes || {})) === null || _a === void 0 ? void 0 : _a[attr.name]) === null || _b === void 0 ? void 0 : _b.props) || {};
70
70
  var type = attr.type;
71
- if (attr.type === 'Asset' && attr.assetType === constants_1.ASSET_TYPES.upload) {
71
+ if (attr.type === types_1.ATTRIBUTE_TYPES.ASSET &&
72
+ attr.assetType === types_1.ASSET_TYPES.UPLOAD) {
72
73
  type = attr.assetType;
73
74
  }
74
- else if (attr.type === 'String' && attr.values.length === 0) {
75
+ else if (attr.type === types_1.ATTRIBUTE_TYPES.STRING &&
76
+ attr.values.length === 0) {
75
77
  type = formComponents_1.FORM_COMPONENT_TYPES.stringInput;
76
78
  }
77
79
  if ((_d = (_c = (attributes || {})) === null || _c === void 0 ? void 0 : _c[attr.name]) === null || _d === void 0 ? void 0 : _d.component) {
@@ -93,34 +95,13 @@ var FlatForm = function (props) {
93
95
  };
94
96
  exports.FlatForm = FlatForm;
95
97
  exports.FlatForm.propTypes = {
96
- /**
97
- * Used to add a title to Form (defaults to the intialized Catalog Item's name)
98
- */
99
98
  title: prop_types_1.default.string,
100
- /**
101
- * Alignement for the title. Options include `left`, `center` or `right`
102
- */
103
99
  alignTitle: prop_types_1.default.string,
104
- /**
105
- * Used to add a description to Form
106
- */
107
100
  description: prop_types_1.default.string,
108
- /**
109
- * The attributes prop allows us to specify which components to use for
110
- * our attributes and what props we want to pass into their components.
111
- *
112
- * The attributes prop takes and object with the keys matching the name
113
- * of the attribute you wish to target and value as an object includeing
114
- * the component to use and props to pass in.
115
- */
116
101
  attributes: prop_types_1.default.objectOf(prop_types_1.default.shape({
117
102
  component: prop_types_1.default.string,
118
103
  props: prop_types_1.default.object,
119
104
  })),
120
- /**
121
- *
122
- * Used to add a custom class name to each of the components html elements
123
- */
124
105
  className: prop_types_1.default.string,
125
106
  };
126
107
  exports.FlatForm.defaultProps = {
@@ -39,22 +39,9 @@ var Modal = function (props) {
39
39
  };
40
40
  exports.Modal = Modal;
41
41
  exports.ModalComponent.propTypes = {
42
- /**
43
- * The title to be shown in the Modal header
44
- */
45
42
  title: prop_types_1.default.string,
46
- /**
47
- * Callback function to close the modal. Can be used with custom UI
48
- * components in the Modal
49
- */
50
43
  handleClose: prop_types_1.default.func,
51
- /**
52
- * Whether or not to render the default Modal header
53
- */
54
44
  showHeader: prop_types_1.default.bool,
55
- /**
56
- * Used to add a custom class name to each of the components html elements
57
- */
58
45
  className: prop_types_1.default.string,
59
46
  };
60
47
  exports.ModalComponent.defaultProps = {
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  export interface IProps {
3
- children: React.ReactNode;
3
+ children?: React.ReactNode;
4
4
  }
5
5
  export interface PlayerProps extends IProps {
6
6
  height?: string;
@@ -24,15 +24,7 @@ var PortalToElement = function (props) {
24
24
  };
25
25
  exports.PortalToElement = PortalToElement;
26
26
  exports.PortalToElement.propTypes = {
27
- /**
28
- * The id of the HTML element you want the content to be rendered in
29
- */
30
27
  to: prop_types_1.default.string,
31
- /**
32
- * Defines the behaviour if the HTML element is not found. If strict is
33
- * set to `true` the content will not render, if set to `false` the
34
- * content will render out in its defualt flow.
35
- */
36
28
  strict: prop_types_1.default.bool,
37
29
  };
38
30
  exports.PortalToElement.defaultProps = {};
@@ -7,13 +7,7 @@ interface IProductDescription {
7
7
  export declare const ProductDescriptionComponent: {
8
8
  (props: IProductDescription): JSX.Element;
9
9
  propTypes: {
10
- /**
11
- * The description displayed to the user
12
- */
13
10
  description: PropTypes.Requireable<string>;
14
- /**
15
- * Custom classNames applied to the HTML Element to apply custom CSS styling.
16
- */
17
11
  className: PropTypes.Requireable<string>;
18
12
  };
19
13
  defaultProps: {
@@ -28,13 +28,7 @@ var ProductDescription = function (props) {
28
28
  return (react_1.default.createElement(exports.ProductDescriptionComponent, { className: className, description: ((_a = metadata === null || metadata === void 0 ? void 0 : metadata._description) === null || _a === void 0 ? void 0 : _a.toString()) || description }));
29
29
  };
30
30
  exports.ProductDescriptionComponent.propTypes = {
31
- /**
32
- * The description displayed to the user
33
- */
34
31
  description: prop_types_1.default.string,
35
- /**
36
- * Custom classNames applied to the HTML Element to apply custom CSS styling.
37
- */
38
32
  className: prop_types_1.default.string,
39
33
  };
40
34
  exports.ProductDescriptionComponent.defaultProps = {
@@ -8,17 +8,8 @@ interface ITitle {
8
8
  export declare const ProductNameComponent: {
9
9
  (props: ITitle): JSX.Element;
10
10
  propTypes: {
11
- /**
12
- * The title displayed to the user
13
- */
14
11
  title: PropTypes.Requireable<string>;
15
- /**
16
- * Custom classNames applied to the HTML Element to apply custom CSS styling.
17
- */
18
12
  className: PropTypes.Requireable<string>;
19
- /**
20
- * The CSS Text alignment property. Options: 'left' | 'center' | 'right'
21
- */
22
13
  align: PropTypes.Requireable<string>;
23
14
  };
24
15
  defaultProps: {
@@ -24,17 +24,8 @@ var ProductName = function (props) {
24
24
  };
25
25
  exports.ProductName = ProductName;
26
26
  exports.ProductNameComponent.propTypes = {
27
- /**
28
- * The title displayed to the user
29
- */
30
27
  title: prop_types_1.default.string,
31
- /**
32
- * Custom classNames applied to the HTML Element to apply custom CSS styling.
33
- */
34
28
  className: prop_types_1.default.string,
35
- /**
36
- * The CSS Text alignment property. Options: 'left' | 'center' | 'right'
37
- */
38
29
  align: prop_types_1.default.string,
39
30
  };
40
31
  exports.ProductNameComponent.defaultProps = {
@@ -1,30 +1,21 @@
1
1
  /// <reference types="react" />
2
2
  import PropTypes from 'prop-types';
3
3
  import { BUTTON_SHAPES, BUTTON_TYPES } from '../Button';
4
+ import type { Positions } from './share.styles';
4
5
  interface ShareProps {
5
6
  shape?: BUTTON_SHAPES;
6
7
  type?: BUTTON_TYPES;
7
8
  className?: string;
8
9
  message?: string;
10
+ position: Positions;
11
+ saveSceneGraphState?: boolean;
9
12
  }
10
13
  export declare const Share: {
11
14
  (props: ShareProps): JSX.Element | null;
12
15
  propTypes: {
13
16
  className: PropTypes.Requireable<string>;
14
- /**
15
- * The presentational type of the input component. Options
16
- * include: `hollow`, `standard`, `accent`, `primary`
17
- */
18
17
  type: PropTypes.Requireable<string>;
19
- /**
20
- * Used to set the shape of the Widget button. Options
21
- * include: `square`, `round`
22
- */
23
18
  shape: PropTypes.Requireable<string>;
24
- /**
25
- * Used to set an overwrite of the message presented to the user
26
- * when the share URL has been successfully copied.
27
- */
28
19
  message: PropTypes.Requireable<string>;
29
20
  };
30
21
  defaultProps: {
@@ -32,6 +23,7 @@ export declare const Share: {
32
23
  shape: string;
33
24
  type: string;
34
25
  message: string;
26
+ saveSceneGraphState: boolean;
35
27
  };
36
28
  };
37
29
  export default Share;