0.0.6 • Published 1 year ago
@marketplaces.inc-ui/mpc-grid v0.0.6
src/Grid.js
:
class: Grid
, mpc-grid
Superclass
Name | Module | Package |
---|---|---|
LitElement | lit |
Fields
Name | Privacy | Type | Default | Description | Inherited From |
---|---|---|---|---|---|
loading | public | boolean | false | Show the loading state | |
autoFetch | public | boolean | false | When true, autofetch data from the MPC API and apply it. See `autoFetchConfig` for more info. | |
autoFetchConfig | public | object | {} | Auto fetch data for the grid when required params are supplied\ `{`\ \ `providerId,`\ \ `entityType,`\ \ `marketplaceId,`\ \ `marketplaceBaseUrl,`\ \ `apiKey,`\ \ `apiBaseUrl,`\ \ `queryParams,`\ `}` \\ `entityType` options are: `listings` \\ `queryParams` accepts any supported `mpc` API param | |
mpcCardConfig | public | object | {} | A `\` config object. See the `Card` component for info on the props supported below.\ `{`\ \ `target,`\ \ `darkMode,`\ `}` | |
maxCols | public | number | 4 | The maximum responsive cols to show. `1-6` are supported | |
gap | public | number | 6 | The gap size between items. `1-8` are supported | |
_autoFetchData | public | array | [] | Loaded data from auto fetch config. |
Methods
Name | Privacy | Description | Parameters | Return | Inherited From |
---|---|---|---|---|---|
loadingTemplateMaybe | |||||
loadingTemplate | |||||
autoFetchContentTemplate | |||||
_handleAutoFetch | autoFetch | ||||
_handleAutoFetchResponse | data, entityType | ||||
_handleSetPropertiesForListings | data | ||||
_getGridClassName |
Attributes
Name | Field | Inherited From |
---|---|---|
gap | gap | |
maxCols | maxCols | |
loading | loading | |
autoFetch | autoFetch | |
autoFetchConfig | autoFetchConfig | |
mpcCardConfig | mpcCardConfig | |
_autoFetchData | _autoFetchData |
Exports
Kind | Name | Declaration | Module | Package |
---|---|---|---|---|
js | Grid | Grid | src/Grid.js |
mpc-grid.js
:
Exports
Kind | Name | Declaration | Module | Package |
---|---|---|---|---|
custom-element-definition | mpc-grid | Grid | /src/Grid.js |