@draftbit/core 46.11.1-99ce8e.2 → 46.11.1-a1a70b.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.
- package/lib/commonjs/components/DeckSwiper/DeckSwiper.js +18 -4
- package/lib/commonjs/components/DeckSwiper/DeckSwiper.js.map +1 -1
- package/lib/commonjs/components/Picker/Picker.js +13 -4
- package/lib/commonjs/components/Picker/Picker.js.map +1 -1
- package/lib/commonjs/components/Shadow.js +10 -2
- package/lib/commonjs/components/Shadow.js.map +1 -1
- package/lib/commonjs/components/TabView/TabView.js +1 -1
- package/lib/commonjs/components/TabView/TabView.js.map +1 -1
- package/lib/commonjs/mappings/DeckSwiper.js +2 -2
- package/lib/commonjs/mappings/DeckSwiper.js.map +1 -1
- package/lib/commonjs/mappings/MapMarker.js +1 -10
- package/lib/commonjs/mappings/MapMarker.js.map +1 -1
- package/lib/commonjs/mappings/Shadow.js +2 -2
- package/lib/commonjs/mappings/Shadow.js.map +1 -1
- package/lib/module/components/DeckSwiper/DeckSwiper.js +18 -4
- package/lib/module/components/DeckSwiper/DeckSwiper.js.map +1 -1
- package/lib/module/components/Picker/Picker.js +13 -4
- package/lib/module/components/Picker/Picker.js.map +1 -1
- package/lib/module/components/Shadow.js +10 -2
- package/lib/module/components/Shadow.js.map +1 -1
- package/lib/module/components/TabView/TabView.js +1 -1
- package/lib/module/components/TabView/TabView.js.map +1 -1
- package/lib/module/mappings/DeckSwiper.js +3 -3
- package/lib/module/mappings/DeckSwiper.js.map +1 -1
- package/lib/module/mappings/MapMarker.js +2 -11
- package/lib/module/mappings/MapMarker.js.map +1 -1
- package/lib/module/mappings/Shadow.js +3 -3
- package/lib/module/mappings/Shadow.js.map +1 -1
- package/lib/typescript/src/components/DeckSwiper/DeckSwiper.d.ts.map +1 -1
- package/lib/typescript/src/components/Picker/Picker.d.ts.map +1 -1
- package/lib/typescript/src/components/Shadow.d.ts.map +1 -1
- package/lib/typescript/src/mappings/DeckSwiper.d.ts +1 -1
- package/lib/typescript/src/mappings/DeckSwiper.d.ts.map +1 -1
- package/lib/typescript/src/mappings/MapMarker.d.ts +0 -9
- package/lib/typescript/src/mappings/MapMarker.d.ts.map +1 -1
- package/lib/typescript/src/mappings/Shadow.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/components/DeckSwiper/DeckSwiper.js +15 -4
- package/src/components/DeckSwiper/DeckSwiper.tsx +23 -4
- package/src/components/Picker/Picker.js +16 -4
- package/src/components/Picker/Picker.tsx +25 -5
- package/src/components/Shadow.js +7 -2
- package/src/components/Shadow.tsx +10 -3
- package/src/components/TabView/TabView.js +1 -1
- package/src/components/TabView/TabView.tsx +1 -1
- package/src/mappings/DeckSwiper.js +7 -3
- package/src/mappings/DeckSwiper.ts +7 -3
- package/src/mappings/MapMarker.js +1 -10
- package/src/mappings/MapMarker.ts +0 -11
- package/src/mappings/Shadow.js +10 -3
- package/src/mappings/Shadow.ts +10 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","TabView","TabBar","SceneMap","withTheme","extractStyles","TabViewComponent","Icon","onIndexChanged","onEndReached","tabBarPosition","keyboardDismissMode","swipeEnabled","scrollEnabled","activeColor","inactiveColor","pressColor","indicatorColor","tabsBackgroundColor","style","theme","children","index","setIndex","useState","routes","setRoutes","tabScenes","setTabScenes","textStyles","viewStyles","instanceOfTabViewItemProps","object","useEffect","newRoutes","scenes","Children","toArray","filter","child","isValidElement","props","forEach","item","idx","push","key","toString","title","icon","accessibilityLabel","indexChangeHandler","i","length","renderTabBar","colors","primary","
|
|
1
|
+
{"version":3,"names":["React","TabView","TabBar","SceneMap","withTheme","extractStyles","TabViewComponent","Icon","onIndexChanged","onEndReached","tabBarPosition","keyboardDismissMode","swipeEnabled","scrollEnabled","activeColor","inactiveColor","pressColor","indicatorColor","tabsBackgroundColor","style","theme","children","index","setIndex","useState","routes","setRoutes","tabScenes","setTabScenes","textStyles","viewStyles","instanceOfTabViewItemProps","object","useEffect","newRoutes","scenes","Children","toArray","filter","child","isValidElement","props","forEach","item","idx","push","key","toString","title","icon","accessibilityLabel","indexChangeHandler","i","length","renderTabBar","colors","primary","backgroundColor","route","color","background"],"sourceRoot":"../../../../src","sources":["components/TabView/TabView.tsx"],"mappings":";AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAE9B,SACEC,OAAO,EACPC,MAAM,EACNC,QAAQ,QAIH,uBAAuB;AAI9B,SAASC,SAAS,QAAQ,eAAe;AAEzC,SAASC,aAAa,QAAQ,iBAAiB;AAwB/C,MAAMC,gBAAiE,GAAG,QAgBpE;EAAA,IAhBqE;IACzEC,IAAI;IACJC,cAAc;IACdC,YAAY;IACZC,cAAc;IACdC,mBAAmB;IACnBC,YAAY;IACZC,aAAa;IACbC,WAAW;IACXC,aAAa;IACbC,UAAU;IACVC,cAAc;IACdC,mBAAmB;IACnBC,KAAK;IACLC,KAAK;IACLC;EACF,CAAC;EACC,MAAM,CAACC,KAAK,EAAEC,QAAQ,CAAC,GAAGvB,KAAK,CAACwB,QAAQ,CAAC,CAAC,CAAC;EAC3C,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG1B,KAAK,CAACwB,QAAQ,CAAU,EAAE,CAAC;EACvD,MAAM,CAACG,SAAS,EAAEC,YAAY,CAAC,GAAG5B,KAAK,CAACwB,QAAQ,CAAC,CAAC,CAAC,CAAC;EAEpD,MAAM;IAAEK,UAAU;IAAEC;EAAW,CAAC,GAAGzB,aAAa,CAACc,KAAK,CAAC;;EAEvD;EACA;EACA,MAAMY,0BAA0B,GAC9BC,MAAW,IACoB;IAC/B,OAAO,OAAO,IAAIA,MAAM;EAC1B,CAAC;;EAED;EACAhC,KAAK,CAACiC,SAAS,CAAC,MAAM;IACpB,MAAMC,SAAkB,GAAG,EAAE;IAC7B,MAAMC,MAAW,GAAG,CAAC,CAAC;IAEtBnC,KAAK,CAACoC,QAAQ,CAACC,OAAO,CAAChB,QAAQ,CAAC,CAC7BiB,MAAM,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,CAAE;MACF,UAAU,EAAE3B,UAAW;MACvB,UAAU,EAAE;QAAA,IAAC;UAAE6B,KAAK;UAAEC;QAAM,CAAC;QAAA,OAC3BD,KAAK,aAALA,KAAK,eAALA,KAAK,CAAET,IAAI,gBACT,oBAAC,IAAI;UAAC,IAAI,EAAES,KAAK,CAACT,IAAK;UAAC,KAAK,EAAEU,KAAM;UAAC,IAAI,EAAE;QAAG,EAAG,GAChD,IAAI;MAAA,CACT;MACD,KAAK,EAAE;QACLF,eAAe,EAAEvC,mBAAmB,IAAIE,KAAK,CAACmC,MAAM,CAACK;MACvD;IAAE,GACF;EAEN,CAAC;;EAED;EACA,IAAI,CAACnC,MAAM,CAAC4B,MAAM,EAAE;IAClB,oBAAO,yCAAK;EACd;EAEA,oBACE,oBAAC,OAAO;IACN,KAAK,EAAE,CAACvB,UAAU,CAAE;IACpB,eAAe,EAAE;MAAER,KAAK;MAAEG;IAAO,CAAE;IACnC,WAAW,EAAEtB,QAAQ,CAACwB,SAAS,CAAE;IACjC,YAAY,EAAE2B,YAAa;IAC3B,aAAa,EAAEH,kBAAmB;IAClC,cAAc,EAAEzC,cAAe;IAC/B,mBAAmB,EAAEC,mBAAoB;IACzC,YAAY,EAAEC;EAAa,EAC3B;AAEN,CAAC;AAED,eAAeR,SAAS,CAACE,gBAAgB,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, Triggers, createActionProp, createStaticNumberProp, createStaticBoolProp,
|
|
1
|
+
import { COMPONENT_TYPES, Triggers, createActionProp, createStaticNumberProp, createStaticBoolProp, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Deck Swiper",
|
|
4
4
|
tag: "DeckSwiper",
|
|
5
5
|
description: "Deck swiper container",
|
|
6
6
|
category: COMPONENT_TYPES.swiper,
|
|
7
|
-
stylesPanelSections:
|
|
7
|
+
stylesPanelSections: [StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Effects],
|
|
8
8
|
layout: {
|
|
9
|
-
|
|
9
|
+
flex: 1
|
|
10
10
|
},
|
|
11
11
|
triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
|
|
12
12
|
props: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["COMPONENT_TYPES","Triggers","createActionProp","createStaticNumberProp","createStaticBoolProp","
|
|
1
|
+
{"version":3,"names":["COMPONENT_TYPES","Triggers","createActionProp","createStaticNumberProp","createStaticBoolProp","StylesPanelSections","SEED_DATA","name","tag","description","category","swiper","stylesPanelSections","Size","Margins","Effects","layout","flex","triggers","OnIndexChanged","OnEndReached","props","onIndexChanged","label","onEndReached","startCardIndex","defaultValue","infiniteSwiping","verticalEnabled","horizontalEnabled","visibleCardCount","min","step"],"sourceRoot":"../../../src","sources":["mappings/DeckSwiper.ts"],"mappings":"AAAA,SACEA,eAAe,EACfC,QAAQ,EACRC,gBAAgB,EAChBC,sBAAsB,EACtBC,oBAAoB,EACpBC,mBAAmB,QACd,iBAAiB;AAExB,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,aAAa;EACnBC,GAAG,EAAE,YAAY;EACjBC,WAAW,EAAE,uBAAuB;EACpCC,QAAQ,EAAEV,eAAe,CAACW,MAAM;EAChCC,mBAAmB,EAAE,CACnBP,mBAAmB,CAACQ,IAAI,EACxBR,mBAAmB,CAACS,OAAO,EAC3BT,mBAAmB,CAACU,OAAO,CAC5B;EACDC,MAAM,EAAE;IACNC,IAAI,EAAE;EACR,CAAC;EACDC,QAAQ,EAAE,CAACjB,QAAQ,CAACkB,cAAc,EAAElB,QAAQ,CAACmB,YAAY,CAAC;EAC1DC,KAAK,EAAE;IACLC,cAAc,EAAEpB,gBAAgB,CAAC;MAC/BqB,KAAK,EAAE,kBAAkB;MACzBd,WAAW,EAAE;IACf,CAAC,CAAC;IACFe,YAAY,EAAEtB,gBAAgB,CAAC;MAC7BqB,KAAK,EAAE,gBAAgB;MACvBd,WAAW,EAAE;IACf,CAAC,CAAC;IACFgB,cAAc,EAAEtB,sBAAsB,CAAC;MACrCoB,KAAK,EAAE,kBAAkB;MACzBd,WAAW,EAAE,qCAAqC;MAClDiB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFC,eAAe,EAAEvB,oBAAoB,CAAC;MACpCmB,KAAK,EAAE,kBAAkB;MACzBd,WAAW,EAAE;IACf,CAAC,CAAC;IACFmB,eAAe,EAAExB,oBAAoB,CAAC;MACpCmB,KAAK,EAAE,wBAAwB;MAC/Bd,WAAW,EAAE,qDAAqD;MAClEiB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFG,iBAAiB,EAAEzB,oBAAoB,CAAC;MACtCmB,KAAK,EAAE,0BAA0B;MACjCd,WAAW,EAAE,uDAAuD;MACpEiB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFI,gBAAgB,EAAE3B,sBAAsB,CAAC;MACvCoB,KAAK,EAAE,oBAAoB;MAC3Bd,WAAW,EACT,iEAAiE;MACnEiB,YAAY,EAAE,CAAC;MACfK,GAAG,EAAE,CAAC;MACNC,IAAI,EAAE;IACR,CAAC;EACH;AACF,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp,
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Map Marker",
|
|
4
4
|
tag: "MapMarker",
|
|
@@ -43,16 +43,7 @@ export const SEED_DATA = {
|
|
|
43
43
|
pinColor: createColorProp({
|
|
44
44
|
label: "Pin Color",
|
|
45
45
|
description: "Sets the color of the marker"
|
|
46
|
-
})
|
|
47
|
-
pinImage: {
|
|
48
|
-
group: GROUPS.data,
|
|
49
|
-
label: "Pin image",
|
|
50
|
-
description: "Image to be used instead of the default pin",
|
|
51
|
-
editable: true,
|
|
52
|
-
required: false,
|
|
53
|
-
formType: FORM_TYPES.image,
|
|
54
|
-
propType: PROP_TYPES.ASSET
|
|
55
|
-
}
|
|
46
|
+
})
|
|
56
47
|
}
|
|
57
48
|
};
|
|
58
49
|
//# sourceMappingURL=MapMarker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","
|
|
1
|
+
{"version":3,"names":["COMPONENT_TYPES","createBoolProp","createColorProp","createNumberProp","createTextProp","GROUPS","StylesPanelSections","SEED_DATA","name","tag","packageName","description","category","map","stylesPanelSections","Size","Margins","Effects","layout","props","latitude","label","required","precision","min","max","longitude","title","defaultValue","flat","group","basic","pinColor"],"sourceRoot":"../../../src","sources":["mappings/MapMarker.ts"],"mappings":"AAAA,SACEA,eAAe,EACfC,cAAc,EACdC,eAAe,EACfC,gBAAgB,EAChBC,cAAc,EACdC,MAAM,EACNC,mBAAmB,QACd,iBAAiB;AAExB,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,YAAY;EAClBC,GAAG,EAAE,WAAW;EAChBC,WAAW,EAAE,gBAAgB;EAC7BC,WAAW,EAAE,kCAAkC;EAC/CC,QAAQ,EAAEZ,eAAe,CAACa,GAAG;EAC7BC,mBAAmB,EAAE,CACnBR,mBAAmB,CAACS,IAAI,EACxBT,mBAAmB,CAACU,OAAO,EAC3BV,mBAAmB,CAACW,OAAO,CAC5B;EACDC,MAAM,EAAE,CAAC,CAAC;EACVC,KAAK,EAAE;IACLC,QAAQ,EAAEjB,gBAAgB,CAAC;MACzBkB,KAAK,EAAE,UAAU;MACjBV,WAAW,EAAE,6CAA6C;MAC1DW,QAAQ,EAAE,IAAI;MACdC,SAAS,EAAE,CAAC;MACZC,GAAG,EAAE,CAAC,EAAE;MACRC,GAAG,EAAE;IACP,CAAC,CAAC;IACFC,SAAS,EAAEvB,gBAAgB,CAAC;MAC1BkB,KAAK,EAAE,WAAW;MAClBV,WAAW,EAAE,8CAA8C;MAC3DW,QAAQ,EAAE,IAAI;MACdC,SAAS,EAAE,CAAC;MACZC,GAAG,EAAE,CAAC,GAAG;MACTC,GAAG,EAAE;IACP,CAAC,CAAC;IACFE,KAAK,EAAEvB,cAAc,CAAC;MACpBiB,KAAK,EAAE,OAAO;MACdV,WAAW,EAAE,qCAAqC;MAClDiB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFjB,WAAW,EAAEP,cAAc,CAAC;MAC1BiB,KAAK,EAAE,aAAa;MACpBV,WAAW,EAAE,qCAAqC;MAClDiB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFC,IAAI,EAAE5B,cAAc,CAAC;MACnBoB,KAAK,EAAE,MAAM;MACbV,WAAW,EACT,+GAA+G;MACjHmB,KAAK,EAAEzB,MAAM,CAAC0B,KAAK;MACnBH,YAAY,EAAE;IAChB,CAAC,CAAC;IACFI,QAAQ,EAAE9B,eAAe,CAAC;MACxBmB,KAAK,EAAE,WAAW;MAClBV,WAAW,EAAE;IACf,CAAC;EACH;AACF,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, GROUPS, StylesPanelSections } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Shadow",
|
|
4
4
|
tag: "Shadow",
|
|
5
5
|
description: "A cross-platform, universal shadow.",
|
|
6
6
|
category: COMPONENT_TYPES.view,
|
|
7
|
-
stylesPanelSections:
|
|
7
|
+
stylesPanelSections: [StylesPanelSections.LayoutSelectedItem, StylesPanelSections.Size, StylesPanelSections.Margins, StylesPanelSections.Position, StylesPanelSections.Borders, StylesPanelSections.Effects],
|
|
8
8
|
props: {
|
|
9
9
|
disabled: createDisabledProp({
|
|
10
10
|
description: "Disables the shadow."
|
|
@@ -26,7 +26,7 @@ export const SEED_DATA = {
|
|
|
26
26
|
paintInside: createStaticBoolProp({
|
|
27
27
|
label: "Paint Inside",
|
|
28
28
|
description: "Apply the shadow below/inside the content.",
|
|
29
|
-
defaultValue:
|
|
29
|
+
defaultValue: true
|
|
30
30
|
}),
|
|
31
31
|
stretch: createStaticBoolProp({
|
|
32
32
|
label: "Stretch",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["COMPONENT_TYPES","
|
|
1
|
+
{"version":3,"names":["COMPONENT_TYPES","createColorProp","createStaticNumberProp","createStaticBoolProp","createDisabledProp","GROUPS","StylesPanelSections","SEED_DATA","name","tag","description","category","view","stylesPanelSections","LayoutSelectedItem","Size","Margins","Position","Borders","Effects","props","disabled","startColor","label","defaultValue","endColor","distance","paintInside","stretch","offsetX","defeaultValue","offsetY","showShadowSideStart","group","advanced","showShadowSideEnd","showShadowSideTop","showShadowSideBottom","showShadowCornerTopStart","showShadowCornerTopEnd","showShadowCornerBottomStart","showShadowCornerBottomEnd"],"sourceRoot":"../../../src","sources":["mappings/Shadow.ts"],"mappings":"AAAA,SACEA,eAAe,EACfC,eAAe,EACfC,sBAAsB,EACtBC,oBAAoB,EACpBC,kBAAkB,EAClBC,MAAM,EACNC,mBAAmB,QACd,iBAAiB;AAExB,OAAO,MAAMC,SAAS,GAAG;EACvBC,IAAI,EAAE,QAAQ;EACdC,GAAG,EAAE,QAAQ;EACbC,WAAW,EAAE,qCAAqC;EAClDC,QAAQ,EAAEX,eAAe,CAACY,IAAI;EAC9BC,mBAAmB,EAAE,CACnBP,mBAAmB,CAACQ,kBAAkB,EACtCR,mBAAmB,CAACS,IAAI,EACxBT,mBAAmB,CAACU,OAAO,EAC3BV,mBAAmB,CAACW,QAAQ,EAC5BX,mBAAmB,CAACY,OAAO,EAC3BZ,mBAAmB,CAACa,OAAO,CAC5B;EACDC,KAAK,EAAE;IACLC,QAAQ,EAAEjB,kBAAkB,CAAC;MAC3BM,WAAW,EAAE;IACf,CAAC,CAAC;IACFY,UAAU,EAAErB,eAAe,C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EAAE,YAAY,EAAE,GAAG,MAAM,EAAE,CAAC;IACnC,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,IAAI,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAC7B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,KAAK,EAAE,KAAK,CAAC;IACb,IAAI,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CACxB,CAAC;;;;AAscF,wBAAiC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/components/Shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/components/Shadow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAc,MAAM,cAAc,CAAC;AAIhE,UAAU,WAAW;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B;AAED,QAAA,MAAM,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,iBAAiB,CAAC,WAAW,CAAC,CAyC1D,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DeckSwiper.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"DeckSwiper.d.ts","sourceRoot":"","sources":["../../../../src/mappings/DeckSwiper.ts"],"names":[],"mappings":"AASA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDrB,CAAC"}
|
|
@@ -51,15 +51,6 @@ export declare const SEED_DATA: {
|
|
|
51
51
|
formType: string;
|
|
52
52
|
propType: string;
|
|
53
53
|
};
|
|
54
|
-
pinImage: {
|
|
55
|
-
group: string;
|
|
56
|
-
label: string;
|
|
57
|
-
description: string;
|
|
58
|
-
editable: boolean;
|
|
59
|
-
required: boolean;
|
|
60
|
-
formType: string;
|
|
61
|
-
propType: string;
|
|
62
|
-
};
|
|
63
54
|
};
|
|
64
55
|
};
|
|
65
56
|
//# sourceMappingURL=MapMarker.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MapMarker.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapMarker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MapMarker.d.ts","sourceRoot":"","sources":["../../../../src/mappings/MapMarker.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDrB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Shadow.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Shadow.d.ts","sourceRoot":"","sources":["../../../../src/mappings/Shadow.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGrB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "46.11.1-
|
|
3
|
+
"version": "46.11.1-a1a70b.2+a1a70b7",
|
|
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.11.1-
|
|
44
|
+
"@draftbit/types": "^46.11.1-a1a70b.2+a1a70b7",
|
|
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",
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"node_modules/",
|
|
94
94
|
"lib/"
|
|
95
95
|
],
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "a1a70b761dda56a167aba40129633c5ff20c8931"
|
|
97
97
|
}
|
|
@@ -9,6 +9,7 @@ const DeckSwiper = ({ onIndexChanged, onEndReached, startCardIndex = 0, infinite
|
|
|
9
9
|
if (data && renderItem && children) {
|
|
10
10
|
console.warn("'children' of DeckSwiper ignored due to usage of 'data' and 'renderItem'");
|
|
11
11
|
}
|
|
12
|
+
const [isRenderingCardFillerHeight, setIsRenderingCardFillerHeight] = React.useState(false);
|
|
12
13
|
const childrenArray = React.useMemo(() => React.Children.toArray(children), [children]);
|
|
13
14
|
// an array of indices based on children count
|
|
14
15
|
const cardsFillerData = React.useMemo(() => Array.from(Array(childrenArray.length).keys()), [childrenArray]);
|
|
@@ -39,18 +40,28 @@ const DeckSwiper = ({ onIndexChanged, onEndReached, startCardIndex = 0, infinite
|
|
|
39
40
|
* By default react-native-deck-swiper positions everything with absolute position.
|
|
40
41
|
* To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
|
|
41
42
|
*
|
|
42
|
-
*
|
|
43
43
|
* Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
|
|
44
44
|
* To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
|
|
45
45
|
* This effectivley makes the default height of the container be the height of the first card.
|
|
46
46
|
*/
|
|
47
|
-
|
|
48
|
-
|
|
47
|
+
/**
|
|
48
|
+
* isRenderingCardFillerHeight:
|
|
49
|
+
* Only render first card filler when component height is 0.
|
|
50
|
+
* Draftbit draft view already fills height appropriatley and does not need to render first card to compensate
|
|
51
|
+
* This check prevents double height and only fills height when it needs to
|
|
52
|
+
*/
|
|
53
|
+
return (React.createElement(View, { onLayout: (event) => {
|
|
54
|
+
const height = event.nativeEvent.layout.height;
|
|
55
|
+
if (height === 0 && !isRenderingCardFillerHeight) {
|
|
56
|
+
setIsRenderingCardFillerHeight(true);
|
|
57
|
+
}
|
|
58
|
+
} },
|
|
59
|
+
isRenderingCardFillerHeight ? (React.createElement(View, { style: styles.containerHeightFiller }, renderFirstCard())) : undefined,
|
|
49
60
|
React.createElement(DeckSwiperComponent, { cards: cardsData, renderCard: renderCard, keyExtractor: cardKeyExtractor, containerStyle: StyleSheet.flatten([styles.cardsContainer, style]), cardStyle: styles.card, onSwiped: onIndexChanged, onSwipedAll: onEndReached, cardIndex: startCardIndex, infinite: infiniteSwiping, verticalSwipe: verticalEnabled, horizontalSwipe: horizontalEnabled, showSecondCard: visibleCardCount > 1, stackSize: visibleCardCount, backgroundColor: "transparent", cardVerticalMargin: 0, cardHorizontalMargin: 0 })));
|
|
50
61
|
};
|
|
51
62
|
const styles = StyleSheet.create({
|
|
52
63
|
cardsContainer: {
|
|
53
|
-
|
|
64
|
+
flex: 1,
|
|
54
65
|
},
|
|
55
66
|
card: {
|
|
56
67
|
left: 0,
|
|
@@ -43,6 +43,9 @@ const DeckSwiper = <T extends object>({
|
|
|
43
43
|
);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
const [isRenderingCardFillerHeight, setIsRenderingCardFillerHeight] =
|
|
47
|
+
React.useState<boolean>(false);
|
|
48
|
+
|
|
46
49
|
const childrenArray = React.useMemo(
|
|
47
50
|
() => React.Children.toArray(children),
|
|
48
51
|
[children]
|
|
@@ -83,15 +86,31 @@ const DeckSwiper = <T extends object>({
|
|
|
83
86
|
* By default react-native-deck-swiper positions everything with absolute position.
|
|
84
87
|
* To overcome this, it is wrapped in a View to be able to add the component in any layout structure.
|
|
85
88
|
*
|
|
86
|
-
*
|
|
87
89
|
* Since all children of that View are absolutley positioned, the View does not have a height and still looks and behaves weird.
|
|
88
90
|
* To fix/mitage this without setting a static height, the first card is rendered in invisible state to take up space.
|
|
89
91
|
* This effectivley makes the default height of the container be the height of the first card.
|
|
90
92
|
*/
|
|
91
93
|
|
|
94
|
+
/**
|
|
95
|
+
* isRenderingCardFillerHeight:
|
|
96
|
+
* Only render first card filler when component height is 0.
|
|
97
|
+
* Draftbit draft view already fills height appropriatley and does not need to render first card to compensate
|
|
98
|
+
* This check prevents double height and only fills height when it needs to
|
|
99
|
+
*/
|
|
100
|
+
|
|
92
101
|
return (
|
|
93
|
-
<View
|
|
94
|
-
|
|
102
|
+
<View
|
|
103
|
+
onLayout={(event) => {
|
|
104
|
+
const height = event.nativeEvent.layout.height;
|
|
105
|
+
if (height === 0 && !isRenderingCardFillerHeight) {
|
|
106
|
+
setIsRenderingCardFillerHeight(true);
|
|
107
|
+
}
|
|
108
|
+
}}
|
|
109
|
+
>
|
|
110
|
+
{isRenderingCardFillerHeight ? (
|
|
111
|
+
<View style={styles.containerHeightFiller}>{renderFirstCard()}</View>
|
|
112
|
+
) : undefined}
|
|
113
|
+
|
|
95
114
|
<DeckSwiperComponent
|
|
96
115
|
cards={cardsData as any[]}
|
|
97
116
|
renderCard={renderCard}
|
|
@@ -120,7 +139,7 @@ const DeckSwiper = <T extends object>({
|
|
|
120
139
|
|
|
121
140
|
const styles = StyleSheet.create({
|
|
122
141
|
cardsContainer: {
|
|
123
|
-
|
|
142
|
+
flex: 1,
|
|
124
143
|
},
|
|
125
144
|
card: {
|
|
126
145
|
left: 0,
|
|
@@ -38,7 +38,7 @@ const disabledColor = "rgb(240, 240, 240)";
|
|
|
38
38
|
const errorColor = "rgba(255, 69, 100, 1)";
|
|
39
39
|
//Empty string for 'value' is treated as a non-value
|
|
40
40
|
//reason: Draftbit uses empty string as initial value for string state*/
|
|
41
|
-
const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style, placeholder
|
|
41
|
+
const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style, placeholder, value, disabled = false, assistiveText, label, iconColor = unstyledColor, iconSize = 24, leftIconMode = "inset", leftIconName, placeholderTextColor = unstyledColor, rightIconName, type = "solid", autoDismissKeyboard = true, }) => {
|
|
42
42
|
var _a, _b;
|
|
43
43
|
const androidPickerRef = React.useRef(undefined);
|
|
44
44
|
const [internalValue, setInternalValue] = React.useState(value || defaultValue);
|
|
@@ -50,6 +50,9 @@ const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style,
|
|
|
50
50
|
if (value != null && value !== "") {
|
|
51
51
|
setInternalValue(value);
|
|
52
52
|
}
|
|
53
|
+
else if (value === "") {
|
|
54
|
+
setInternalValue(undefined);
|
|
55
|
+
}
|
|
53
56
|
}, [value]);
|
|
54
57
|
React.useEffect(() => {
|
|
55
58
|
if (defaultValue != null && defaultValue !== "") {
|
|
@@ -67,12 +70,21 @@ const Picker = ({ error, options = [], onValueChange, defaultValue, Icon, style,
|
|
|
67
70
|
Keyboard.dismiss();
|
|
68
71
|
}
|
|
69
72
|
}, [pickerVisible, autoDismissKeyboard]);
|
|
70
|
-
const normalizedOptions = normalizeOptions(options);
|
|
73
|
+
const normalizedOptions = React.useMemo(() => normalizeOptions(options), [options]);
|
|
71
74
|
//Underlying Picker component defaults selection to first element when value is not provided (or undefined)
|
|
72
75
|
//Placholder must be the 1st option in order to allow selection of the 'actual' 1st option
|
|
73
|
-
const pickerOptions = placeholder
|
|
76
|
+
const pickerOptions = React.useMemo(() => placeholder
|
|
74
77
|
? [{ label: placeholder, value: placeholder }, ...normalizedOptions]
|
|
75
|
-
: normalizedOptions;
|
|
78
|
+
: normalizedOptions, [placeholder, normalizedOptions]);
|
|
79
|
+
//When no placeholder is provided then first item should be marked selected to reflect underlying Picker internal state
|
|
80
|
+
if (!placeholder &&
|
|
81
|
+
pickerOptions.length &&
|
|
82
|
+
!internalValue &&
|
|
83
|
+
internalValue !== pickerOptions[0].value //Prevent infinite state changes incase first value is falsy
|
|
84
|
+
) {
|
|
85
|
+
onValueChange === null || onValueChange === void 0 ? void 0 : onValueChange(pickerOptions[0].value, 0);
|
|
86
|
+
setInternalValue(pickerOptions[0].value);
|
|
87
|
+
}
|
|
76
88
|
const { viewStyles, textStyles } = extractStyles(style);
|
|
77
89
|
const additionalBorderStyles = ["backgroundColor"];
|
|
78
90
|
const additionalMarginStyles = [
|
|
@@ -101,7 +101,7 @@ const Picker: React.FC<PickerProps> = ({
|
|
|
101
101
|
defaultValue,
|
|
102
102
|
Icon,
|
|
103
103
|
style,
|
|
104
|
-
placeholder
|
|
104
|
+
placeholder,
|
|
105
105
|
value,
|
|
106
106
|
disabled = false,
|
|
107
107
|
assistiveText,
|
|
@@ -130,6 +130,8 @@ const Picker: React.FC<PickerProps> = ({
|
|
|
130
130
|
React.useEffect(() => {
|
|
131
131
|
if (value != null && value !== "") {
|
|
132
132
|
setInternalValue(value);
|
|
133
|
+
} else if (value === "") {
|
|
134
|
+
setInternalValue(undefined);
|
|
133
135
|
}
|
|
134
136
|
}, [value]);
|
|
135
137
|
|
|
@@ -151,13 +153,31 @@ const Picker: React.FC<PickerProps> = ({
|
|
|
151
153
|
}
|
|
152
154
|
}, [pickerVisible, autoDismissKeyboard]);
|
|
153
155
|
|
|
154
|
-
const normalizedOptions =
|
|
156
|
+
const normalizedOptions = React.useMemo(
|
|
157
|
+
() => normalizeOptions(options),
|
|
158
|
+
[options]
|
|
159
|
+
);
|
|
155
160
|
|
|
156
161
|
//Underlying Picker component defaults selection to first element when value is not provided (or undefined)
|
|
157
162
|
//Placholder must be the 1st option in order to allow selection of the 'actual' 1st option
|
|
158
|
-
const pickerOptions =
|
|
159
|
-
|
|
160
|
-
|
|
163
|
+
const pickerOptions = React.useMemo(
|
|
164
|
+
() =>
|
|
165
|
+
placeholder
|
|
166
|
+
? [{ label: placeholder, value: placeholder }, ...normalizedOptions]
|
|
167
|
+
: normalizedOptions,
|
|
168
|
+
[placeholder, normalizedOptions]
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
//When no placeholder is provided then first item should be marked selected to reflect underlying Picker internal state
|
|
172
|
+
if (
|
|
173
|
+
!placeholder &&
|
|
174
|
+
pickerOptions.length &&
|
|
175
|
+
!internalValue &&
|
|
176
|
+
internalValue !== pickerOptions[0].value //Prevent infinite state changes incase first value is falsy
|
|
177
|
+
) {
|
|
178
|
+
onValueChange?.(pickerOptions[0].value, 0);
|
|
179
|
+
setInternalValue(pickerOptions[0].value);
|
|
180
|
+
}
|
|
161
181
|
|
|
162
182
|
const { viewStyles, textStyles } = extractStyles(style);
|
|
163
183
|
|
package/src/components/Shadow.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
import { StyleSheet } from "react-native";
|
|
2
3
|
import { Shadow as ShadowComponent } from "react-native-shadow-2";
|
|
3
|
-
|
|
4
|
+
import { extractBorderAndMarginStyles } from "../utilities";
|
|
5
|
+
const Shadow = ({ offsetX = 0, offsetY = 0, showShadowSideStart = true, showShadowSideEnd = true, showShadowSideTop = true, showShadowSideBottom = true, showShadowCornerTopStart = true, showShadowCornerTopEnd = true, showShadowCornerBottomStart = true, showShadowCornerBottomEnd = true, paintInside = true, style, ...rest }) => {
|
|
6
|
+
const { borderStyles } = extractBorderAndMarginStyles(style);
|
|
7
|
+
const containerStyle = StyleSheet.flatten(style);
|
|
8
|
+
Object.keys(borderStyles).forEach((key) => delete containerStyle[key]);
|
|
4
9
|
return (React.createElement(ShadowComponent, { offset: [offsetX, offsetY], sides: {
|
|
5
10
|
start: showShadowSideStart,
|
|
6
11
|
end: showShadowSideEnd,
|
|
@@ -11,6 +16,6 @@ const Shadow = ({ offsetX = 0, offsetY = 0, showShadowSideStart = true, showShad
|
|
|
11
16
|
topEnd: showShadowCornerTopEnd,
|
|
12
17
|
bottomStart: showShadowCornerBottomStart,
|
|
13
18
|
bottomEnd: showShadowCornerBottomEnd,
|
|
14
|
-
}, containerStyle:
|
|
19
|
+
}, style: borderStyles, containerStyle: containerStyle, paintInside: paintInside, ...rest }));
|
|
15
20
|
};
|
|
16
21
|
export default Shadow;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { StyleProp, ViewStyle } from "react-native";
|
|
2
|
+
import { StyleProp, ViewStyle, StyleSheet } from "react-native";
|
|
3
3
|
import { Shadow as ShadowComponent } from "react-native-shadow-2";
|
|
4
|
+
import { extractBorderAndMarginStyles } from "../utilities";
|
|
4
5
|
|
|
5
6
|
interface ShadowProps {
|
|
6
7
|
disabled?: boolean;
|
|
@@ -33,10 +34,15 @@ const Shadow: React.FC<React.PropsWithChildren<ShadowProps>> = ({
|
|
|
33
34
|
showShadowCornerTopEnd = true,
|
|
34
35
|
showShadowCornerBottomStart = true,
|
|
35
36
|
showShadowCornerBottomEnd = true,
|
|
36
|
-
paintInside =
|
|
37
|
+
paintInside = true,
|
|
37
38
|
style,
|
|
38
39
|
...rest
|
|
39
40
|
}) => {
|
|
41
|
+
const { borderStyles } = extractBorderAndMarginStyles(style);
|
|
42
|
+
|
|
43
|
+
const containerStyle = StyleSheet.flatten(style) as StyleProp<any>;
|
|
44
|
+
Object.keys(borderStyles).forEach((key) => delete containerStyle[key]);
|
|
45
|
+
|
|
40
46
|
return (
|
|
41
47
|
<ShadowComponent
|
|
42
48
|
offset={[offsetX, offsetY]}
|
|
@@ -52,7 +58,8 @@ const Shadow: React.FC<React.PropsWithChildren<ShadowProps>> = ({
|
|
|
52
58
|
bottomStart: showShadowCornerBottomStart,
|
|
53
59
|
bottomEnd: showShadowCornerBottomEnd,
|
|
54
60
|
}}
|
|
55
|
-
|
|
61
|
+
style={borderStyles}
|
|
62
|
+
containerStyle={containerStyle}
|
|
56
63
|
paintInside={paintInside}
|
|
57
64
|
{...rest}
|
|
58
65
|
/>
|
|
@@ -39,7 +39,7 @@ const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, tabBarPosition,
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
const renderTabBar = (props) => {
|
|
42
|
-
return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.primary, inactiveColor: inactiveColor ||
|
|
42
|
+
return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.primary, inactiveColor: inactiveColor || "rgb(200,200,200)", pressColor: pressColor || theme.colors.primary, scrollEnabled: scrollEnabled, indicatorStyle: {
|
|
43
43
|
backgroundColor: indicatorColor || theme.colors.primary,
|
|
44
44
|
}, labelStyle: textStyles, renderIcon: ({ route, color }) => (route === null || route === void 0 ? void 0 : route.icon) ? (React.createElement(Icon, { name: route.icon, color: color, size: 16 })) : null, style: {
|
|
45
45
|
backgroundColor: tabsBackgroundColor || theme.colors.background,
|
|
@@ -106,7 +106,7 @@ const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
|
|
|
106
106
|
<TabBar
|
|
107
107
|
{...props}
|
|
108
108
|
activeColor={activeColor || theme.colors.primary}
|
|
109
|
-
inactiveColor={inactiveColor ||
|
|
109
|
+
inactiveColor={inactiveColor || "rgb(200,200,200)"}
|
|
110
110
|
pressColor={pressColor || theme.colors.primary}
|
|
111
111
|
scrollEnabled={scrollEnabled}
|
|
112
112
|
indicatorStyle={{
|
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, Triggers, createActionProp, createStaticNumberProp, createStaticBoolProp,
|
|
1
|
+
import { COMPONENT_TYPES, Triggers, createActionProp, createStaticNumberProp, createStaticBoolProp, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Deck Swiper",
|
|
4
4
|
tag: "DeckSwiper",
|
|
5
5
|
description: "Deck swiper container",
|
|
6
6
|
category: COMPONENT_TYPES.swiper,
|
|
7
|
-
stylesPanelSections:
|
|
7
|
+
stylesPanelSections: [
|
|
8
|
+
StylesPanelSections.Size,
|
|
9
|
+
StylesPanelSections.Margins,
|
|
10
|
+
StylesPanelSections.Effects,
|
|
11
|
+
],
|
|
8
12
|
layout: {
|
|
9
|
-
|
|
13
|
+
flex: 1,
|
|
10
14
|
},
|
|
11
15
|
triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
|
|
12
16
|
props: {
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
createActionProp,
|
|
5
5
|
createStaticNumberProp,
|
|
6
6
|
createStaticBoolProp,
|
|
7
|
-
|
|
7
|
+
StylesPanelSections,
|
|
8
8
|
} from "@draftbit/types";
|
|
9
9
|
|
|
10
10
|
export const SEED_DATA = {
|
|
@@ -12,9 +12,13 @@ export const SEED_DATA = {
|
|
|
12
12
|
tag: "DeckSwiper",
|
|
13
13
|
description: "Deck swiper container",
|
|
14
14
|
category: COMPONENT_TYPES.swiper,
|
|
15
|
-
stylesPanelSections:
|
|
15
|
+
stylesPanelSections: [
|
|
16
|
+
StylesPanelSections.Size,
|
|
17
|
+
StylesPanelSections.Margins,
|
|
18
|
+
StylesPanelSections.Effects,
|
|
19
|
+
],
|
|
16
20
|
layout: {
|
|
17
|
-
|
|
21
|
+
flex: 1,
|
|
18
22
|
},
|
|
19
23
|
triggers: [Triggers.OnIndexChanged, Triggers.OnEndReached],
|
|
20
24
|
props: {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp,
|
|
1
|
+
import { COMPONENT_TYPES, createBoolProp, createColorProp, createNumberProp, createTextProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Map Marker",
|
|
4
4
|
tag: "MapMarker",
|
|
@@ -48,14 +48,5 @@ export const SEED_DATA = {
|
|
|
48
48
|
label: "Pin Color",
|
|
49
49
|
description: "Sets the color of the marker",
|
|
50
50
|
}),
|
|
51
|
-
pinImage: {
|
|
52
|
-
group: GROUPS.data,
|
|
53
|
-
label: "Pin image",
|
|
54
|
-
description: "Image to be used instead of the default pin",
|
|
55
|
-
editable: true,
|
|
56
|
-
required: false,
|
|
57
|
-
formType: FORM_TYPES.image,
|
|
58
|
-
propType: PROP_TYPES.ASSET,
|
|
59
|
-
},
|
|
60
51
|
},
|
|
61
52
|
};
|
|
@@ -4,9 +4,7 @@ import {
|
|
|
4
4
|
createColorProp,
|
|
5
5
|
createNumberProp,
|
|
6
6
|
createTextProp,
|
|
7
|
-
FORM_TYPES,
|
|
8
7
|
GROUPS,
|
|
9
|
-
PROP_TYPES,
|
|
10
8
|
StylesPanelSections,
|
|
11
9
|
} from "@draftbit/types";
|
|
12
10
|
|
|
@@ -60,14 +58,5 @@ export const SEED_DATA = {
|
|
|
60
58
|
label: "Pin Color",
|
|
61
59
|
description: "Sets the color of the marker",
|
|
62
60
|
}),
|
|
63
|
-
pinImage: {
|
|
64
|
-
group: GROUPS.data,
|
|
65
|
-
label: "Pin image",
|
|
66
|
-
description: "Image to be used instead of the default pin",
|
|
67
|
-
editable: true,
|
|
68
|
-
required: false,
|
|
69
|
-
formType: FORM_TYPES.image,
|
|
70
|
-
propType: PROP_TYPES.ASSET,
|
|
71
|
-
},
|
|
72
61
|
},
|
|
73
62
|
};
|
package/src/mappings/Shadow.js
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
-
import { COMPONENT_TYPES,
|
|
1
|
+
import { COMPONENT_TYPES, createColorProp, createStaticNumberProp, createStaticBoolProp, createDisabledProp, GROUPS, StylesPanelSections, } from "@draftbit/types";
|
|
2
2
|
export const SEED_DATA = {
|
|
3
3
|
name: "Shadow",
|
|
4
4
|
tag: "Shadow",
|
|
5
5
|
description: "A cross-platform, universal shadow.",
|
|
6
6
|
category: COMPONENT_TYPES.view,
|
|
7
|
-
stylesPanelSections:
|
|
7
|
+
stylesPanelSections: [
|
|
8
|
+
StylesPanelSections.LayoutSelectedItem,
|
|
9
|
+
StylesPanelSections.Size,
|
|
10
|
+
StylesPanelSections.Margins,
|
|
11
|
+
StylesPanelSections.Position,
|
|
12
|
+
StylesPanelSections.Borders,
|
|
13
|
+
StylesPanelSections.Effects,
|
|
14
|
+
],
|
|
8
15
|
props: {
|
|
9
16
|
disabled: createDisabledProp({
|
|
10
17
|
description: "Disables the shadow.",
|
|
@@ -26,7 +33,7 @@ export const SEED_DATA = {
|
|
|
26
33
|
paintInside: createStaticBoolProp({
|
|
27
34
|
label: "Paint Inside",
|
|
28
35
|
description: "Apply the shadow below/inside the content.",
|
|
29
|
-
defaultValue:
|
|
36
|
+
defaultValue: true,
|
|
30
37
|
}),
|
|
31
38
|
stretch: createStaticBoolProp({
|
|
32
39
|
label: "Stretch",
|