@draftbit/core 46.8.1 → 46.8.2-079b9d.2

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.
@@ -12,4 +12,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
12
12
  android: DEFAULT_STATUSBAR_HEIGHT_EXPO,
13
13
  ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
14
14
  });
15
- exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;AR_HEIGHT;
15
+ exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
@@ -11,10 +11,7 @@ const SEED_DATA = [{
11
11
  description: "Masonry Flashlist by Shopify",
12
12
  packageName: "@shopify/flash-list",
13
13
  category: _types.COMPONENT_TYPES.data,
14
- stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
15
- layout: {
16
- flex: 1
17
- },
14
+ stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.MarginsAndPaddings],
18
15
  triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
19
16
  props: {
20
17
  onRefresh: (0, _types.createActionProp)(),
@@ -61,10 +58,7 @@ const SEED_DATA = [{
61
58
  description: "Flashlist by Shopify",
62
59
  packageName: "@shopify/flash-list",
63
60
  category: _types.COMPONENT_TYPES.data,
64
- stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
65
- layout: {
66
- flex: 1
67
- },
61
+ stylesPanelSections: [_types.StylesPanelSections.Background, _types.StylesPanelSections.MarginsAndPaddings],
68
62
  triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
69
63
  props: {
70
64
  onRefresh: (0, _types.createActionProp)(),
@@ -1,6 +1,3 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
3
- function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
4
1
  // @ts-nocheck
5
2
  import React, { Component } from "react";
6
3
  import { View, Text, StyleSheet, Animated, TouchableWithoutFeedback } from "react-native";
@@ -12,7 +9,7 @@ const STEP_STATUS = {
12
9
  export default class StepIndicator extends Component {
13
10
  constructor(props) {
14
11
  super(props);
15
- _defineProperty(this, "renderProgressBarBackground", () => {
12
+ this.renderProgressBarBackground = () => {
16
13
  const {
17
14
  stepCount,
18
15
  direction
@@ -55,8 +52,8 @@ export default class StepIndicator extends Component {
55
52
  },
56
53
  style: progressBarBackgroundStyle
57
54
  });
58
- });
59
- _defineProperty(this, "renderProgressBar", () => {
55
+ };
56
+ this.renderProgressBar = () => {
60
57
  const {
61
58
  stepCount,
62
59
  direction
@@ -86,8 +83,8 @@ export default class StepIndicator extends Component {
86
83
  return /*#__PURE__*/React.createElement(Animated.View, {
87
84
  style: progressBarStyle
88
85
  });
89
- });
90
- _defineProperty(this, "renderStepIndicator", () => {
86
+ };
87
+ this.renderStepIndicator = () => {
91
88
  let steps = [];
92
89
  const {
93
90
  stepCount,
@@ -118,8 +115,8 @@ export default class StepIndicator extends Component {
118
115
  height: this.state.customStyles.currentStepIndicatorSize
119
116
  }]
120
117
  }, steps);
121
- });
122
- _defineProperty(this, "renderStepLabels", () => {
118
+ };
119
+ this.renderStepLabels = () => {
123
120
  const {
124
121
  labels,
125
122
  direction,
@@ -161,8 +158,8 @@ export default class StepIndicator extends Component {
161
158
  alignItems: this.state.customStyles.labelAlign
162
159
  }]
163
160
  }, labelViews);
164
- });
165
- _defineProperty(this, "renderStep", position => {
161
+ };
162
+ this.renderStep = position => {
166
163
  const {
167
164
  renderStepIndicator
168
165
  } = this.props;
@@ -229,8 +226,8 @@ export default class StepIndicator extends Component {
229
226
  }) : /*#__PURE__*/React.createElement(Text, {
230
227
  style: indicatorLabelStyle
231
228
  }, "".concat(position + 1)));
232
- });
233
- _defineProperty(this, "getStepStatus", stepPosition => {
229
+ };
230
+ this.getStepStatus = stepPosition => {
234
231
  const {
235
232
  currentPosition
236
233
  } = this.props;
@@ -241,8 +238,8 @@ export default class StepIndicator extends Component {
241
238
  } else {
242
239
  return STEP_STATUS.UNFINISHED;
243
240
  }
244
- });
245
- _defineProperty(this, "onCurrentPositionChanged", position => {
241
+ };
242
+ this.onCurrentPositionChanged = position => {
246
243
  let {
247
244
  stepCount
248
245
  } = this.props;
@@ -262,7 +259,7 @@ export default class StepIndicator extends Component {
262
259
  toValue: this.state.customStyles.currentStepIndicatorSize / 2,
263
260
  duration: 100
264
261
  })])]).start();
265
- });
262
+ };
266
263
  const defaultStyles = {
267
264
  stepIndicatorSize: 30,
268
265
  currentStepIndicatorSize: 40,
@@ -328,7 +325,6 @@ export default class StepIndicator extends Component {
328
325
  // ),
329
326
  // }));
330
327
  // }
331
-
332
328
  if (prevProps.currentPosition !== this.props.currentPosition) {
333
329
  this.onCurrentPositionChanged(this.props.currentPosition);
334
330
  }
@@ -369,6 +365,50 @@ const styles = StyleSheet.create({
369
365
  justifyContent: "center"
370
366
  }
371
367
  });
368
+ StepIndicator.defaultProps = {
369
+ currentPosition: 0,
370
+ stepCount: 5,
371
+ customStyles: {},
372
+ direction: "horizontal"
373
+ };rrentPositionChanged(this.props.currentPosition);
374
+ }
375
+ }
376
+ }
377
+ const styles = StyleSheet.create({
378
+ container: {
379
+ backgroundColor: "transparent"
380
+ },
381
+ stepIndicatorContainer: {
382
+ flexDirection: "row",
383
+ alignItems: "center",
384
+ justifyContent: "space-around",
385
+ backgroundColor: "transparent"
386
+ },
387
+ stepLabelsContainer: {
388
+ justifyContent: "space-around"
389
+ },
390
+ step: {
391
+ alignItems: "center",
392
+ justifyContent: "center",
393
+ zIndex: 2
394
+ },
395
+ stepContainer: {
396
+ flex: 1,
397
+ flexDirection: "row",
398
+ alignItems: "center",
399
+ justifyContent: "center"
400
+ },
401
+ stepLabel: {
402
+ fontSize: 12,
403
+ textAlign: "center",
404
+ fontWeight: "500"
405
+ },
406
+ stepLabelItem: {
407
+ flex: 1,
408
+ alignItems: "center",
409
+ justifyContent: "center"
410
+ }
411
+ });
372
412
  StepIndicator.defaultProps = {
373
413
  currentPosition: 0,
374
414
  stepCount: 5,
@@ -1,14 +1,11 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections } from "@draftbit/types";
2
2
  export const SEED_DATA = [{
3
3
  name: "Masonry List",
4
4
  tag: "MasonryFlashList",
5
5
  description: "Masonry Flashlist by Shopify",
6
6
  packageName: "@shopify/flash-list",
7
7
  category: COMPONENT_TYPES.data,
8
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
9
- layout: {
10
- flex: 1
11
- },
8
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
12
9
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
13
10
  props: {
14
11
  onRefresh: createActionProp(),
@@ -55,10 +52,7 @@ export const SEED_DATA = [{
55
52
  description: "Flashlist by Shopify",
56
53
  packageName: "@shopify/flash-list",
57
54
  category: COMPONENT_TYPES.data,
58
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
59
- layout: {
60
- flex: 1
61
- },
55
+ stylesPanelSections: [StylesPanelSections.Background, StylesPanelSections.MarginsAndPaddings],
62
56
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
63
57
  props: {
64
58
  onRefresh: createActionProp(),
@@ -5,9 +5,6 @@ export declare const SEED_DATA: ({
5
5
  packageName: string;
6
6
  category: string;
7
7
  stylesPanelSections: string[];
8
- layout: {
9
- flex: number;
10
- };
11
8
  triggers: string[];
12
9
  props: {
13
10
  onRefresh: {
@@ -113,9 +110,6 @@ export declare const SEED_DATA: ({
113
110
  packageName: string;
114
111
  category: string;
115
112
  stylesPanelSections: string[];
116
- layout: {
117
- flex: number;
118
- };
119
113
  triggers: string[];
120
114
  props: {
121
115
  onRefresh: {
@@ -1 +1 @@
1
- {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
1
+ {"version":3,"file":"FlashList.d.ts","sourceRoot":"","sources":["../../../../src/mappings/FlashList.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAqHrB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@draftbit/core",
3
- "version": "46.8.1",
3
+ "version": "46.8.2-079b9d.2+079b9d7",
4
4
  "description": "Core (non-native) Components",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -41,7 +41,7 @@
41
41
  "dependencies": {
42
42
  "@date-io/date-fns": "^1.3.13",
43
43
  "@draftbit/react-theme-provider": "^2.1.1",
44
- "@draftbit/types": "^46.8.1",
44
+ "@draftbit/types": "^46.8.2-079b9d.2+079b9d7",
45
45
  "@material-ui/core": "^4.11.0",
46
46
  "@material-ui/pickers": "^3.2.10",
47
47
  "@react-native-community/slider": "4.2.3",
@@ -92,5 +92,5 @@
92
92
  ]
93
93
  ]
94
94
  },
95
- "gitHead": "85d8eebb959e07970330c830dd205a5c95e55ecd"
95
+ "gitHead": "079b9d7af632187dfa6708b1a09b5614f73563ae"
96
96
  }
@@ -1,4 +1,4 @@
1
- import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, CONTAINER_COMPONENT_STYLES_SECTIONS, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, } from "@draftbit/types";
1
+ import { COMPONENT_TYPES, createNumColumnsType, createStaticBoolProp, createNumberProp, GROUPS, Triggers, createActionProp, createStaticNumberProp, createColorProp, StylesPanelSections, } from "@draftbit/types";
2
2
  export const SEED_DATA = [
3
3
  {
4
4
  name: "Masonry List",
@@ -6,10 +6,10 @@ export const SEED_DATA = [
6
6
  description: "Masonry Flashlist by Shopify",
7
7
  packageName: "@shopify/flash-list",
8
8
  category: COMPONENT_TYPES.data,
9
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
10
- layout: {
11
- flex: 1,
12
- },
9
+ stylesPanelSections: [
10
+ StylesPanelSections.Background,
11
+ StylesPanelSections.MarginsAndPaddings,
12
+ ],
13
13
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
14
14
  props: {
15
15
  onRefresh: createActionProp(),
@@ -57,10 +57,10 @@ export const SEED_DATA = [
57
57
  description: "Flashlist by Shopify",
58
58
  packageName: "@shopify/flash-list",
59
59
  category: COMPONENT_TYPES.data,
60
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
61
- layout: {
62
- flex: 1,
63
- },
60
+ stylesPanelSections: [
61
+ StylesPanelSections.Background,
62
+ StylesPanelSections.MarginsAndPaddings,
63
+ ],
64
64
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
65
65
  props: {
66
66
  onRefresh: createActionProp(),
@@ -3,12 +3,12 @@ import {
3
3
  createNumColumnsType,
4
4
  createStaticBoolProp,
5
5
  createNumberProp,
6
- CONTAINER_COMPONENT_STYLES_SECTIONS,
7
6
  GROUPS,
8
7
  Triggers,
9
8
  createActionProp,
10
9
  createStaticNumberProp,
11
10
  createColorProp,
11
+ StylesPanelSections,
12
12
  } from "@draftbit/types";
13
13
 
14
14
  export const SEED_DATA = [
@@ -18,10 +18,10 @@ export const SEED_DATA = [
18
18
  description: "Masonry Flashlist by Shopify",
19
19
  packageName: "@shopify/flash-list",
20
20
  category: COMPONENT_TYPES.data,
21
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
22
- layout: {
23
- flex: 1,
24
- },
21
+ stylesPanelSections: [
22
+ StylesPanelSections.Background,
23
+ StylesPanelSections.MarginsAndPaddings,
24
+ ],
25
25
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
26
26
  props: {
27
27
  onRefresh: createActionProp(),
@@ -72,10 +72,10 @@ export const SEED_DATA = [
72
72
  description: "Flashlist by Shopify",
73
73
  packageName: "@shopify/flash-list",
74
74
  category: COMPONENT_TYPES.data,
75
- stylesPanelSections: CONTAINER_COMPONENT_STYLES_SECTIONS,
76
- layout: {
77
- flex: 1,
78
- },
75
+ stylesPanelSections: [
76
+ StylesPanelSections.Background,
77
+ StylesPanelSections.MarginsAndPaddings,
78
+ ],
79
79
  triggers: [Triggers.OnRefresh, Triggers.OnEndReached],
80
80
  props: {
81
81
  onRefresh: createActionProp(),