@evlop/native-components 1.0.70 → 1.0.73
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/dist/main.d.ts +7 -7
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +13 -2
- package/dist/main.js.map +1 -1
- package/dist/src/Actionable.d.ts +2 -2
- package/dist/src/Actionable.d.ts.map +1 -1
- package/dist/src/Actionable.js +8 -8
- package/dist/src/Actionable.js.map +1 -1
- package/dist/src/Avatar.d.ts +4 -0
- package/dist/src/Avatar.d.ts.map +1 -1
- package/dist/src/Avatar.js +6 -5
- package/dist/src/Avatar.js.map +1 -1
- package/dist/src/Button.d.ts +13 -1
- package/dist/src/Button.d.ts.map +1 -1
- package/dist/src/Button.js +11 -5
- package/dist/src/Button.js.map +1 -1
- package/dist/src/Collection/index.d.ts +1 -2
- package/dist/src/Collection/index.d.ts.map +1 -1
- package/dist/src/ErrorBoundry.d.ts +1 -1
- package/dist/src/Flexbox/index.d.ts +9 -0
- package/dist/src/Flexbox/index.d.ts.map +1 -0
- package/dist/src/Flexbox/index.js +20 -0
- package/dist/src/Flexbox/index.js.map +1 -0
- package/dist/src/Icon/index.d.ts +20 -1
- package/dist/src/Icon/index.d.ts.map +1 -1
- package/dist/src/Icon/index.js +10 -4
- package/dist/src/Icon/index.js.map +1 -1
- package/dist/src/Image/index.d.ts +39 -1
- package/dist/src/Image/index.d.ts.map +1 -1
- package/dist/src/Image/index.js +19 -14
- package/dist/src/Image/index.js.map +1 -1
- package/dist/src/Layouts/HorizontalLayout.d.ts.map +1 -1
- package/dist/src/Layouts/HorizontalLayout.js +6 -2
- package/dist/src/Layouts/HorizontalLayout.js.map +1 -1
- package/dist/src/Layouts/index.js +5 -1
- package/dist/src/Layouts/index.js.map +1 -1
- package/dist/src/ListItem.js +1 -1
- package/dist/src/ListItem.js.map +1 -1
- package/dist/src/NativeButton/index.d.ts +12 -1
- package/dist/src/NativeButton/index.d.ts.map +1 -1
- package/dist/src/NativeButton/index.js +11 -8
- package/dist/src/NativeButton/index.js.map +1 -1
- package/dist/src/RenderBlocks/index.js +8 -4
- package/dist/src/RenderBlocks/index.js.map +1 -1
- package/dist/src/RenderComponent/index.js +22 -18
- package/dist/src/RenderComponent/index.js.map +1 -1
- package/dist/src/RenderPage/DefaultLayout.js +1 -1
- package/dist/src/RenderPage/DefaultLayout.js.map +1 -1
- package/dist/src/RenderPage/PageHeaderUpdater.js +4 -4
- package/dist/src/RenderPage/PageHeaderUpdater.js.map +1 -1
- package/dist/src/RenderPage/index.d.ts +3 -2
- package/dist/src/RenderPage/index.d.ts.map +1 -1
- package/dist/src/RenderPage/index.js +21 -16
- package/dist/src/RenderPage/index.js.map +1 -1
- package/dist/src/Row/index.d.ts +4 -2
- package/dist/src/Row/index.d.ts.map +1 -1
- package/dist/src/Row/index.js +2 -2
- package/dist/src/Row/index.js.map +1 -1
- package/dist/src/Swiper/index.js +13 -9
- package/dist/src/Swiper/index.js.map +1 -1
- package/dist/src/Text/index.d.ts +12 -1
- package/dist/src/Text/index.d.ts.map +1 -1
- package/dist/src/Text/index.js +14 -32
- package/dist/src/Text/index.js.map +1 -1
- package/dist/src/View/index.d.ts +10 -4
- package/dist/src/View/index.d.ts.map +1 -1
- package/dist/src/View/index.js +6 -5
- package/dist/src/View/index.js.map +1 -1
- package/dist/src/contexts/PageScrollViewContext.js +1 -1
- package/dist/src/contexts/PageScrollViewContext.js.map +1 -1
- package/package.json +4 -3
package/dist/main.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
export * from 'react-native-elements';
|
|
2
2
|
export * as reactNativeElements from 'react-native-elements';
|
|
3
|
-
export { default as View } from './src/View';
|
|
4
|
-
export { default as Actionable } from './src/Actionable';
|
|
5
|
-
export { default as Text } from './src/Text';
|
|
3
|
+
export { default as View, BaseView } from './src/View';
|
|
4
|
+
export { default as Actionable, BaseActionable } from './src/Actionable';
|
|
5
|
+
export { default as Text, BaseText } from './src/Text';
|
|
6
6
|
export { default as NativeButton } from './src/NativeButton';
|
|
7
|
-
export { default as Button } from './src/Button';
|
|
8
|
-
export { default as Image } from './src/Image';
|
|
9
|
-
export { default as Icon } from './src/Icon';
|
|
7
|
+
export { default as Button, BaseButton } from './src/Button';
|
|
8
|
+
export { default as Image, BaseImage } from './src/Image';
|
|
9
|
+
export { default as Icon, BaseIcon } from './src/Icon';
|
|
10
10
|
export { default as ListItem } from './src/ListItem';
|
|
11
|
-
export { default as Avatar } from './src/Avatar';
|
|
11
|
+
export { default as Avatar, BaseAvatar } from './src/Avatar';
|
|
12
12
|
export { default as Swiper } from './src/Swiper';
|
|
13
13
|
export * from './src/Row';
|
|
14
14
|
export * from './src/Collection';
|
package/dist/main.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,IAAI,EAAC,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"main.d.ts","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,OAAO,KAAK,mBAAmB,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,IAAI,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,UAAU,EAAE,cAAc,EAAC,MAAM,kBAAkB,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,IAAI,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,KAAK,EAAE,SAAS,EAAC,MAAM,aAAa,CAAC;AACxD,OAAO,EAAC,OAAO,IAAI,IAAI,EAAE,QAAQ,EAAC,MAAM,YAAY,CAAC;AACrD,OAAO,EAAC,OAAO,IAAI,QAAQ,EAAC,MAAM,gBAAgB,CAAC;AACnD,OAAO,EAAC,OAAO,IAAI,MAAM,EAAE,UAAU,EAAC,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAC,OAAO,IAAI,MAAM,EAAC,MAAM,cAAc,CAAC;AAC/C,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,uBAAuB,CAAC;AACtC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC"}
|
package/dist/main.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -25,27 +29,34 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
25
29
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
26
30
|
};
|
|
27
31
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
28
|
-
exports.Swiper = exports.Avatar = exports.ListItem = exports.Icon = exports.Image = exports.Button = exports.NativeButton = exports.Text = exports.Actionable = exports.View = exports.reactNativeElements = void 0;
|
|
32
|
+
exports.Swiper = exports.BaseAvatar = exports.Avatar = exports.ListItem = exports.BaseIcon = exports.Icon = exports.BaseImage = exports.Image = exports.BaseButton = exports.Button = exports.NativeButton = exports.BaseText = exports.Text = exports.BaseActionable = exports.Actionable = exports.BaseView = exports.View = exports.reactNativeElements = void 0;
|
|
29
33
|
__exportStar(require("react-native-elements"), exports);
|
|
30
34
|
exports.reactNativeElements = __importStar(require("react-native-elements"));
|
|
31
35
|
var View_1 = require("./src/View");
|
|
32
36
|
Object.defineProperty(exports, "View", { enumerable: true, get: function () { return __importDefault(View_1).default; } });
|
|
37
|
+
Object.defineProperty(exports, "BaseView", { enumerable: true, get: function () { return View_1.BaseView; } });
|
|
33
38
|
var Actionable_1 = require("./src/Actionable");
|
|
34
39
|
Object.defineProperty(exports, "Actionable", { enumerable: true, get: function () { return __importDefault(Actionable_1).default; } });
|
|
40
|
+
Object.defineProperty(exports, "BaseActionable", { enumerable: true, get: function () { return Actionable_1.BaseActionable; } });
|
|
35
41
|
var Text_1 = require("./src/Text");
|
|
36
42
|
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return __importDefault(Text_1).default; } });
|
|
43
|
+
Object.defineProperty(exports, "BaseText", { enumerable: true, get: function () { return Text_1.BaseText; } });
|
|
37
44
|
var NativeButton_1 = require("./src/NativeButton");
|
|
38
45
|
Object.defineProperty(exports, "NativeButton", { enumerable: true, get: function () { return __importDefault(NativeButton_1).default; } });
|
|
39
46
|
var Button_1 = require("./src/Button");
|
|
40
47
|
Object.defineProperty(exports, "Button", { enumerable: true, get: function () { return __importDefault(Button_1).default; } });
|
|
48
|
+
Object.defineProperty(exports, "BaseButton", { enumerable: true, get: function () { return Button_1.BaseButton; } });
|
|
41
49
|
var Image_1 = require("./src/Image");
|
|
42
50
|
Object.defineProperty(exports, "Image", { enumerable: true, get: function () { return __importDefault(Image_1).default; } });
|
|
51
|
+
Object.defineProperty(exports, "BaseImage", { enumerable: true, get: function () { return Image_1.BaseImage; } });
|
|
43
52
|
var Icon_1 = require("./src/Icon");
|
|
44
53
|
Object.defineProperty(exports, "Icon", { enumerable: true, get: function () { return __importDefault(Icon_1).default; } });
|
|
54
|
+
Object.defineProperty(exports, "BaseIcon", { enumerable: true, get: function () { return Icon_1.BaseIcon; } });
|
|
45
55
|
var ListItem_1 = require("./src/ListItem");
|
|
46
56
|
Object.defineProperty(exports, "ListItem", { enumerable: true, get: function () { return __importDefault(ListItem_1).default; } });
|
|
47
57
|
var Avatar_1 = require("./src/Avatar");
|
|
48
58
|
Object.defineProperty(exports, "Avatar", { enumerable: true, get: function () { return __importDefault(Avatar_1).default; } });
|
|
59
|
+
Object.defineProperty(exports, "BaseAvatar", { enumerable: true, get: function () { return Avatar_1.BaseAvatar; } });
|
|
49
60
|
var Swiper_1 = require("./src/Swiper");
|
|
50
61
|
Object.defineProperty(exports, "Swiper", { enumerable: true, get: function () { return __importDefault(Swiper_1).default; } });
|
|
51
62
|
__exportStar(require("./src/Row"), exports);
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.js","sourceRoot":"","sources":["../main.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wDAAsC;AACtC,6EAA6D;AAC7D,mCAAqD;AAA7C,6GAAA,OAAO,OAAQ;AAAE,gGAAA,QAAQ,OAAA;AACjC,+CAAuE;AAA/D,yHAAA,OAAO,OAAc;AAAE,4GAAA,cAAc,OAAA;AAC7C,mCAAqD;AAA7C,6GAAA,OAAO,OAAQ;AAAE,gGAAA,QAAQ,OAAA;AACjC,mDAA2D;AAAnD,6HAAA,OAAO,OAAgB;AAC/B,uCAA2D;AAAnD,iHAAA,OAAO,OAAU;AAAE,oGAAA,UAAU,OAAA;AACrC,qCAAwD;AAAhD,+GAAA,OAAO,OAAS;AAAE,kGAAA,SAAS,OAAA;AACnC,mCAAqD;AAA7C,6GAAA,OAAO,OAAQ;AAAE,gGAAA,QAAQ,OAAA;AACjC,2CAAmD;AAA3C,qHAAA,OAAO,OAAY;AAC3B,uCAA2D;AAAnD,iHAAA,OAAO,OAAU;AAAE,oGAAA,UAAU,OAAA;AACrC,uCAA+C;AAAvC,iHAAA,OAAO,OAAU;AACzB,4CAA0B;AAC1B,mDAAiC;AACjC,iDAA+B;AAC/B,gDAA8B;AAC9B,gDAA8B;AAC9B,wDAAsC;AACtC,mDAAiC;AACjC,qDAAmC"}
|
package/dist/src/Actionable.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export declare const
|
|
3
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<
|
|
2
|
+
export declare const BaseActionable: ({ action, ...props }: any) => JSX.Element;
|
|
3
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<any, string | number | symbol> & React.RefAttributes<any>>;
|
|
4
4
|
export default _default;
|
|
5
5
|
//# sourceMappingURL=Actionable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../src/Actionable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"Actionable.d.ts","sourceRoot":"","sources":["../../src/Actionable.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,eAAO,MAAM,cAAc,yBAAwB,GAAG,gBAOrD,CAAA;;AAED,wBAMqB"}
|
package/dist/src/Actionable.js
CHANGED
|
@@ -14,28 +14,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
17
|
+
exports.BaseActionable = void 0;
|
|
18
18
|
const commons_1 = require("@evlop/commons");
|
|
19
19
|
const react_1 = __importDefault(require("react"));
|
|
20
20
|
const react_native_1 = require("react-native");
|
|
21
21
|
const native_1 = __importDefault(require("styled-components/native"));
|
|
22
22
|
const styled_system_1 = require("styled-system");
|
|
23
23
|
const View_1 = __importDefault(require("./View"));
|
|
24
|
-
const StyledPressable = native_1.default(react_native_1.Pressable)(styled_system_1.border, styled_system_1.background, styled_system_1.layout, styled_system_1.space);
|
|
25
|
-
const
|
|
24
|
+
const StyledPressable = (0, native_1.default)(react_native_1.Pressable)(styled_system_1.border, styled_system_1.background, styled_system_1.layout, styled_system_1.space);
|
|
25
|
+
const BaseActionable = (_a) => {
|
|
26
26
|
var { action } = _a, props = __rest(_a, ["action"]);
|
|
27
|
-
const isEditing = commons_1.useEditable();
|
|
28
|
-
const onPress = commons_1.useAction(action);
|
|
27
|
+
const isEditing = (0, commons_1.useEditable)();
|
|
28
|
+
const onPress = (0, commons_1.useAction)(action);
|
|
29
29
|
if (isEditing)
|
|
30
30
|
return react_1.default.createElement(View_1.default, Object.assign({}, props));
|
|
31
31
|
return react_1.default.createElement(StyledPressable, Object.assign({ onPress: onPress }, props));
|
|
32
32
|
};
|
|
33
|
-
exports.
|
|
34
|
-
exports.default = commons_1.withSettings({
|
|
33
|
+
exports.BaseActionable = BaseActionable;
|
|
34
|
+
exports.default = (0, commons_1.withSettings)({
|
|
35
35
|
name: 'Actionable',
|
|
36
36
|
configurationOptions: [],
|
|
37
37
|
valueOptions: [
|
|
38
38
|
{ type: 'app-action', name: 'action', label: 'Action' },
|
|
39
39
|
],
|
|
40
|
-
})(exports.
|
|
40
|
+
})(exports.BaseActionable);
|
|
41
41
|
//# sourceMappingURL=Actionable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Actionable.js","sourceRoot":"","sources":["../../src/Actionable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAAsE;AACtE,kDAA0B;AAC1B,+CAAyC;AACzC,sEAA8C;AAC9C,iDAAkE;AAClE,kDAA0B;AAE1B,MAAM,eAAe,GAAG,gBAAM,
|
|
1
|
+
{"version":3,"file":"Actionable.js","sourceRoot":"","sources":["../../src/Actionable.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,4CAAsE;AACtE,kDAA0B;AAC1B,+CAAyC;AACzC,sEAA8C;AAC9C,iDAAkE;AAClE,kDAA0B;AAE1B,MAAM,eAAe,GAAG,IAAA,gBAAM,EAAC,wBAAS,CAAC,CACrC,sBAAM,EACN,0BAAU,EACV,sBAAM,EACN,qBAAK,CACR,CAAA;AAEM,MAAM,cAAc,GAAG,CAAC,EAAuB,EAAE,EAAE;QAA3B,EAAC,MAAM,OAAgB,EAAX,KAAK,cAAjB,UAAkB,CAAD;IAC5C,MAAM,SAAS,GAAG,IAAA,qBAAW,GAAE,CAAC;IAChC,MAAM,OAAO,GAAG,IAAA,mBAAS,EAAC,MAAM,CAAC,CAAC;IAElC,IAAG,SAAS;QAAE,OAAO,8BAAC,cAAI,oBAAK,KAAK,EAAI,CAAA;IAExC,OAAO,8BAAC,eAAe,kBAAC,OAAO,EAAE,OAAO,IAAM,KAAK,EAAI,CAAE;AAC7D,CAAC,CAAA;AAPY,QAAA,cAAc,kBAO1B;AAED,kBAAe,IAAA,sBAAY,EAAC;IACxB,IAAI,EAAE,YAAY;IAClB,oBAAoB,EAAE,EAAE;IACxB,YAAY,EAAE;QACV,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;KACxD;CACF,CAAC,CAAC,sBAAc,CAAC,CAAC"}
|
package/dist/src/Avatar.d.ts
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Avatar } from 'react-native-elements';
|
|
3
|
+
import { AnyProps } from '../types';
|
|
4
|
+
export declare const BaseAvatar: React.ForwardRefExoticComponent<Pick<AnyProps, string | number> & React.RefAttributes<Avatar>>;
|
|
1
5
|
declare const AvatarWithSettings: any;
|
|
2
6
|
export default AvatarWithSettings;
|
|
3
7
|
//# sourceMappingURL=Avatar.d.ts.map
|
package/dist/src/Avatar.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.d.ts","sourceRoot":"","sources":["../../src/Avatar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAEpC,eAAO,MAAM,UAAU,gGAqBtB,CAAC;AAEF,QAAA,MAAM,kBAAkB,EAAE,GA6BZ,CAAC;AAIf,eAAe,kBAAkB,CAAC"}
|
package/dist/src/Avatar.js
CHANGED
|
@@ -14,14 +14,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
exports.BaseAvatar = void 0;
|
|
17
18
|
const react_1 = __importDefault(require("react"));
|
|
18
19
|
const commons_1 = require("@evlop/commons");
|
|
19
20
|
const react_2 = require("react");
|
|
20
21
|
const react_native_elements_1 = require("react-native-elements");
|
|
21
|
-
|
|
22
|
+
exports.BaseAvatar = (0, react_2.forwardRef)((_a, ref) => {
|
|
22
23
|
var { src, source, placeholder } = _a, props = __rest(_a, ["src", "source", "placeholder"]);
|
|
23
|
-
const template = commons_1.useTemplate();
|
|
24
|
-
const imageSource = react_2.useMemo(() => {
|
|
24
|
+
const template = (0, commons_1.useTemplate)();
|
|
25
|
+
const imageSource = (0, react_2.useMemo)(() => {
|
|
25
26
|
const imageUrl = template(src) || template(placeholder);
|
|
26
27
|
if (imageUrl) {
|
|
27
28
|
return { uri: imageUrl };
|
|
@@ -32,7 +33,7 @@ const BaseAvatar = react_2.forwardRef((_a, ref) => {
|
|
|
32
33
|
}, [src, source, template, placeholder]);
|
|
33
34
|
return (react_1.default.createElement(react_native_elements_1.Avatar, Object.assign({ ref: ref, source: imageSource }, props)));
|
|
34
35
|
});
|
|
35
|
-
const AvatarWithSettings = commons_1.withSettings({
|
|
36
|
+
const AvatarWithSettings = (0, commons_1.withSettings)({
|
|
36
37
|
name: 'Avatar',
|
|
37
38
|
valueOptions: [
|
|
38
39
|
{
|
|
@@ -61,7 +62,7 @@ const AvatarWithSettings = commons_1.withSettings({
|
|
|
61
62
|
name: 'placeholder',
|
|
62
63
|
},
|
|
63
64
|
],
|
|
64
|
-
})(BaseAvatar);
|
|
65
|
+
})(exports.BaseAvatar);
|
|
65
66
|
AvatarWithSettings.Accessory = react_native_elements_1.Avatar.Accessory;
|
|
66
67
|
exports.default = AvatarWithSettings;
|
|
67
68
|
//# sourceMappingURL=Avatar.js.map
|
package/dist/src/Avatar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../src/Avatar.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.js","sourceRoot":"","sources":["../../src/Avatar.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC1B,4CAA2D;AAC3D,iCAA4C;AAC5C,iEAA+C;AAGlC,QAAA,UAAU,GAAG,IAAA,kBAAU,EAClC,CAAC,EAAqC,EAAE,GAAG,EAAE,EAAE;QAA9C,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,OAAW,EAAN,KAAK,cAApC,gCAAqC,CAAD;IACnC,MAAM,QAAQ,GAAG,IAAA,qBAAW,GAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAC/B,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,QAAQ,CAAC,WAAW,CAAC,CAAC;QACxD,IAAI,QAAQ,EAAE;YACZ,OAAO,EAAC,GAAG,EAAE,QAAQ,EAAC,CAAC;SACxB;QACD,IAAI,MAAM,EAAE;YACV,OAAO,MAAM,CAAC;SACf;IACH,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;IAEzC,OAAO,CACH,8BAAC,8BAAM,kBACL,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,WAAW,IACf,KAAK,EACT,CACL,CAAC;AACJ,CAAC,CACF,CAAC;AAEF,MAAM,kBAAkB,GAAQ,IAAA,sBAAY,EAAC;IACzC,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE;QACV;YACE,IAAI,EAAE,OAAO;YACb,KAAK,EAAE,OAAO;YACd,IAAI,EAAE,KAAK;SACZ;QACD;YACE,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,KAAK;SACZ;QACD,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;KACtD;IACD,oBAAoB,EAAE;QACpB;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,GAAG;SACT;QACD;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,aAAa;SACpB;KACF;CACN,CAAC,CAAC,kBAAU,CAAC,CAAC;AAEf,kBAAkB,CAAC,SAAS,GAAG,8BAAM,CAAC,SAAS,CAAC;AAEhD,kBAAe,kBAAkB,CAAC"}
|
package/dist/src/Button.d.ts
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
declare const
|
|
2
|
+
export declare const BaseButton: ({ color, ...props }: {
|
|
3
|
+
[x: string]: any;
|
|
4
|
+
color: any;
|
|
5
|
+
}) => JSX.Element;
|
|
6
|
+
declare const ButtonWithSettings: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<{
|
|
7
|
+
[x: string]: any;
|
|
8
|
+
color: any;
|
|
9
|
+
} & {
|
|
10
|
+
model?: string;
|
|
11
|
+
dataModel?: string;
|
|
12
|
+
configModel?: string;
|
|
13
|
+
action?: any;
|
|
14
|
+
}>, string | number> & React.RefAttributes<any>>;
|
|
3
15
|
export default ButtonWithSettings;
|
|
4
16
|
//# sourceMappingURL=Button.d.ts.map
|
package/dist/src/Button.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../src/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAKvC,eAAO,MAAM,UAAU;;;iBAOtB,CAAA;AAED,QAAA,MAAM,kBAAkB;;;;;;;;gDAqBV,CAAC;AAMf,eAAe,kBAAkB,CAAC"}
|
package/dist/src/Button.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -30,21 +34,23 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
30
34
|
return t;
|
|
31
35
|
};
|
|
32
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.BaseButton = void 0;
|
|
33
38
|
const react_1 = __importStar(require("react"));
|
|
34
39
|
const commons_1 = require("@evlop/commons");
|
|
35
40
|
const native_1 = require("styled-components/native");
|
|
36
41
|
const react_native_elements_1 = require("react-native-elements");
|
|
37
|
-
const
|
|
42
|
+
const BaseButton = (_a) => {
|
|
38
43
|
var { color } = _a, props = __rest(_a, ["color"]);
|
|
39
44
|
const theme = react_1.default.useContext(native_1.ThemeContext);
|
|
40
45
|
const { colors: { [color]: colorCode } = {} } = theme;
|
|
41
|
-
const buttonTheme = react_1.useMemo(() => {
|
|
46
|
+
const buttonTheme = (0, react_1.useMemo)(() => {
|
|
42
47
|
return { colors: { primary: colorCode || color } };
|
|
43
48
|
}, [color, colorCode]);
|
|
44
49
|
return react_1.default.createElement(react_native_elements_1.ThemeProvider, { theme: buttonTheme },
|
|
45
50
|
react_1.default.createElement(react_native_elements_1.Button, Object.assign({}, props)));
|
|
46
51
|
};
|
|
47
|
-
|
|
52
|
+
exports.BaseButton = BaseButton;
|
|
53
|
+
const ButtonWithSettings = (0, commons_1.withSettings)({
|
|
48
54
|
name: 'Button',
|
|
49
55
|
valueOptions: [
|
|
50
56
|
{ type: 'text', name: 'title', label: 'Title' },
|
|
@@ -65,7 +71,7 @@ const ButtonWithSettings = commons_1.withSettings({
|
|
|
65
71
|
],
|
|
66
72
|
},
|
|
67
73
|
],
|
|
68
|
-
})(
|
|
74
|
+
})(exports.BaseButton);
|
|
69
75
|
ButtonWithSettings.defaultProps = {
|
|
70
76
|
color: 'primary',
|
|
71
77
|
};
|
package/dist/src/Button.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/Button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../src/Button.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuC;AACvC,4CAA8C;AAC9C,qDAAwD;AACxD,iEAA2E;AAEpE,MAAM,UAAU,GAAG,CAAC,EAAkB,EAAE,EAAE;QAAtB,EAAE,KAAK,OAAW,EAAN,KAAK,cAAjB,SAAkB,CAAD;IACxC,MAAM,KAAK,GAAQ,eAAK,CAAC,UAAU,CAAC,qBAAY,CAAC,CAAC;IAClD,MAAM,EAAC,MAAM,EAAE,EAAC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAC,GAAG,EAAE,EAAC,GAAG,KAAK,CAAC;IAClD,MAAM,WAAW,GAAG,IAAA,eAAO,EAAC,GAAE,EAAE;QAC9B,OAAO,EAAC,MAAM,EAAE,EAAC,OAAO,EAAE,SAAS,IAAI,KAAK,EAAC,EAAC,CAAC;IACjD,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC;IACvB,OAAO,8BAAC,qCAAa,IAAC,KAAK,EAAE,WAAW;QAAE,8BAAC,8BAAS,oBAAK,KAAK,EAAI,CAAgB,CAAE;AACxF,CAAC,CAAA;AAPY,QAAA,UAAU,cAOtB;AAED,MAAM,kBAAkB,GAAG,IAAA,sBAAY,EAAC;IACpC,IAAI,EAAE,QAAQ;IACd,YAAY,EAAE;QACV,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC;QAC7C,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;KACtD;IACD,oBAAoB,EAAE;QACpB,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC;QAC9C,EAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAC;QAC3C;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,OAAO,EAAE;gBACP,EAAC,KAAK,EAAE,SAAS,EAAE,KAAK,EAAE,IAAI,EAAC;gBAC/B,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC;gBAChC,EAAC,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,SAAS,EAAC;gBACrC,EAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAC;aACjC;SACF;KACF;CACN,CAAC,CAAC,kBAAU,CAAC,CAAC;AAEf,kBAAkB,CAAC,YAAY,GAAG;IAChC,KAAK,EAAE,SAAS;CACjB,CAAA;AAED,kBAAe,kBAAkB,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const Collection: import("react").ForwardRefExoticComponent<Pick<any, string | number | symbol> & import("react").RefAttributes<unknown>>;
|
|
1
|
+
export declare const Collection: import("@evlop/commons").ComponentWithSettings<import("../View").BaseViewProps>;
|
|
3
2
|
export default Collection;
|
|
4
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Collection/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Collection/index.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,iFAAO,CAAC;AAE/B,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Theme, ComponentWithSettings } from '@evlop/commons';
|
|
3
|
+
import { ViewProps as RNViewProps } from 'react-native';
|
|
4
|
+
import { BorderProps, FlexboxProps as SSFlexboxProps, LayoutProps, ColorProps, BackgroundProps, SpaceProps } from 'styled-system';
|
|
5
|
+
declare type FlexboxProps = RNViewProps & BorderProps<Theme> & SSFlexboxProps<Theme> & LayoutProps<Theme> & ColorProps<Theme> & BackgroundProps<Theme> & SpaceProps<Theme>;
|
|
6
|
+
export declare const BaseFlexBox: React.ComponentType<FlexboxProps>;
|
|
7
|
+
declare const Flexbox: ComponentWithSettings<FlexboxProps>;
|
|
8
|
+
export default Flexbox;
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Flexbox/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAgB,KAAK,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAA+B,SAAS,IAAI,WAAW,EAAC,MAAM,cAAc,CAAC;AAEpF,OAAO,EAAqD,WAAW,EAAE,YAAY,IAAI,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAErL,aAAK,YAAY,GAAG,WAAW,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;AAEnK,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,aAAa,CAAC,YAAY,CAUzD,CAAC;AAEF,QAAA,MAAM,OAAO,EAAE,qBAAqB,CAAC,YAAY,CAIlC,CAAC;AAEhB,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.BaseFlexBox = void 0;
|
|
7
|
+
const commons_1 = require("@evlop/commons");
|
|
8
|
+
const react_native_1 = require("react-native");
|
|
9
|
+
const native_1 = __importDefault(require("styled-components/native"));
|
|
10
|
+
const styled_system_1 = require("styled-system");
|
|
11
|
+
exports.BaseFlexBox = (0, native_1.default)(react_native_1.View)(styled_system_1.border, styled_system_1.flexbox, styled_system_1.layout, styled_system_1.color, styled_system_1.background, styled_system_1.space, {
|
|
12
|
+
zIndex: react_native_1.Platform.select({ web: 'inherit', default: 0 })
|
|
13
|
+
});
|
|
14
|
+
const Flexbox = (0, commons_1.withSettings)({
|
|
15
|
+
name: 'Flexbox',
|
|
16
|
+
valueOptions: [],
|
|
17
|
+
configurationOptions: [],
|
|
18
|
+
})(exports.BaseFlexBox);
|
|
19
|
+
exports.default = Flexbox;
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Flexbox/index.tsx"],"names":[],"mappings":";;;;;;AAAA,4CAA4E;AAC5E,+CAAoF;AACpF,sEAA8C;AAC9C,iDAAqL;AAIxK,QAAA,WAAW,GAAsC,IAAA,gBAAM,EAAC,mBAAU,CAAC,CAC5E,sBAAM,EACN,uBAAO,EACP,sBAAM,EACN,qBAAK,EACL,0BAAU,EACV,qBAAK,EACL;IACE,MAAM,EAAE,uBAAQ,CAAC,MAAM,CAAM,EAAC,GAAG,EAAE,SAAS,EAAE,OAAO,EAAE,CAAC,EAAC,CAAC;CAC3D,CACJ,CAAC;AAEF,MAAM,OAAO,GAAwC,IAAA,sBAAY,EAAC;IAChE,IAAI,EAAE,SAAS;IACf,YAAY,EAAE,EAAE;IAChB,oBAAoB,EAAE,EAAE;CACzB,CAAC,CAAC,mBAAW,CAAC,CAAC;AAEhB,kBAAe,OAAO,CAAC"}
|
package/dist/src/Icon/index.d.ts
CHANGED
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
|
|
2
|
+
import { Color } from '@evlop/commons';
|
|
3
|
+
import { IconProps as RNEIconProps } from 'react-native-elements';
|
|
4
|
+
declare type BaseIconProps = RNEIconProps & {
|
|
5
|
+
icon?: string;
|
|
6
|
+
size?: number;
|
|
7
|
+
color: Color;
|
|
8
|
+
};
|
|
9
|
+
export declare const BaseIcon: React.FC<BaseIconProps>;
|
|
10
|
+
declare const IconWithSettings: React.ForwardRefExoticComponent<RNEIconProps & {
|
|
11
|
+
icon?: string;
|
|
12
|
+
size?: number;
|
|
13
|
+
color: Color;
|
|
14
|
+
} & {
|
|
15
|
+
model?: string;
|
|
16
|
+
dataModel?: string;
|
|
17
|
+
configModel?: string;
|
|
18
|
+
action?: any;
|
|
19
|
+
} & {
|
|
20
|
+
children?: React.ReactNode;
|
|
21
|
+
} & React.RefAttributes<any>>;
|
|
3
22
|
export default IconWithSettings;
|
|
4
23
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA0B,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAE/D,OAAO,EAAmB,SAAS,IAAI,YAAY,EAAE,MAAK,uBAAuB,CAAC;AAElF,aAAK,aAAa,GAAG,YAAY,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,KAAK,CAAA;CAAE,CAAA;AAElF,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkB5C,CAAA;AAED,QAAA,MAAM,gBAAgB;WAtBuB,MAAM;WAAS,MAAM;WAAS,KAAK;;;;;;;;6BAuCpE,CAAC;AAMb,eAAe,gBAAgB,CAAC"}
|
package/dist/src/Icon/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -30,11 +34,12 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
30
34
|
return t;
|
|
31
35
|
};
|
|
32
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.BaseIcon = void 0;
|
|
33
38
|
const React = __importStar(require("react"));
|
|
34
39
|
const commons_1 = require("@evlop/commons");
|
|
35
40
|
const native_1 = require("styled-components/native");
|
|
36
41
|
const react_native_elements_1 = require("react-native-elements");
|
|
37
|
-
const
|
|
42
|
+
const BaseIcon = (_a) => {
|
|
38
43
|
var { icon, name = "circle", type, color } = _a, props = __rest(_a, ["icon", "name", "type", "color"]);
|
|
39
44
|
const theme = React.useContext(native_1.ThemeContext);
|
|
40
45
|
const iconProps = React.useMemo(() => {
|
|
@@ -57,7 +62,8 @@ const Icon = (_a) => {
|
|
|
57
62
|
const { colors: { [color]: colorCode } } = theme;
|
|
58
63
|
return React.createElement(react_native_elements_1.Icon, Object.assign({ name: "circle" }, props, { color: colorCode || color }, iconProps));
|
|
59
64
|
};
|
|
60
|
-
|
|
65
|
+
exports.BaseIcon = BaseIcon;
|
|
66
|
+
const IconWithSettings = (0, commons_1.withSettings)({
|
|
61
67
|
name: 'Icon',
|
|
62
68
|
valueOptions: [
|
|
63
69
|
{ type: 'icon', name: 'icon', label: 'Icon' },
|
|
@@ -74,7 +80,7 @@ const IconWithSettings = commons_1.withSettings({
|
|
|
74
80
|
max: 500,
|
|
75
81
|
},
|
|
76
82
|
],
|
|
77
|
-
})(
|
|
83
|
+
})(exports.BaseIcon);
|
|
78
84
|
IconWithSettings.defaultProps = {
|
|
79
85
|
size: 32,
|
|
80
86
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Icon/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Icon/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,4CAA+D;AAC/D,qDAAwD;AACxD,iEAAkF;AAI3E,MAAM,QAAQ,GAA4B,CAAC,EAA8C,EAAC,EAAE;QAAjD,EAAC,IAAI,EAAE,IAAI,GAAG,QAAQ,EAAE,IAAI,EAAE,KAAK,OAAW,EAAN,KAAK,cAA7C,iCAA8C,CAAD;IAC3F,MAAM,KAAK,GAAQ,KAAK,CAAC,UAAU,CAAC,qBAAY,CAAC,CAAC;IAClD,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,GAAE,EAAE;QAClC,IAAG,OAAO,IAAI,KAAK,QAAQ,EAAC;YAC1B,MAAM,WAAW,GAAQ,kBAAQ,CAAC,IAAI,CAAC,CAAC;YACxC,IAAG,WAAW,EAAC;gBACb,OAAO,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,WAAW,CAAC,OAAO,CAAC,EAAC,IAAI,EAAE,CAAC;aACvF;iBAAM;gBACL,OAAO,EAAC,IAAI,EAAE,IAAI,EAAC,CAAC;aACrB;SACF;aAAM,IAAG,OAAO,IAAI,KAAK,QAAQ,EAAC;YACjC,OAAO,IAAI,CAAA;SACZ;aAAM;YACL,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACvB;IACH,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC;IACvB,MAAM,EAAC,MAAM,EAAE,EAAC,CAAC,KAAK,CAAC,EAAE,SAAS,EAAC,EAAC,GAAG,KAAK,CAAC;IAC7C,OAAO,oBAAC,4BAAO,kBAAC,IAAI,EAAC,QAAQ,IAAK,KAAK,IAAE,KAAK,EAAE,SAAS,IAAI,KAAK,IAAM,SAAS,EAAI,CAAA;AACzF,CAAC,CAAA;AAlBY,QAAA,QAAQ,YAkBpB;AAED,MAAM,gBAAgB,GAAG,IAAA,sBAAY,EAAC;IAClC,IAAI,EAAE,MAAM;IACZ,YAAY,EAAE;QACV,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAC;QAC3C,EAAC,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,QAAQ,EAAC;KACtD;IACD,oBAAoB,EAAE;QACpB,EAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAC;QAC9C;YACE,IAAI,EAAE,QAAQ;YACd,IAAI,EAAE,MAAM;YACZ,KAAK,EAAE,MAAM;YACb,IAAI,EAAE,CAAC;YACP,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,GAAG;SACT;KACF;CACN,CAAC,CAAC,gBAAQ,CAAC,CAAC;AAEb,gBAAgB,CAAC,YAAY,GAAG;IAC9B,IAAI,EAAE,EAAE;CACT,CAAA;AAED,kBAAe,gBAAgB,CAAC"}
|
|
@@ -1,4 +1,42 @@
|
|
|
1
|
+
import { Theme } from '@evlop/commons';
|
|
1
2
|
import React from 'react';
|
|
2
|
-
|
|
3
|
+
import { Image as NativeImageOriginal, ImageProps as RNEImageProps } from 'react-native-elements';
|
|
4
|
+
import { BorderProps, SpaceProps } from 'styled-system';
|
|
5
|
+
declare const sizes: {
|
|
6
|
+
xxxs: number;
|
|
7
|
+
xxs: number;
|
|
8
|
+
xs: number;
|
|
9
|
+
sm: number;
|
|
10
|
+
md: number;
|
|
11
|
+
lg: number;
|
|
12
|
+
xl: number;
|
|
13
|
+
xxl: number;
|
|
14
|
+
xxxl: number;
|
|
15
|
+
fluid: string;
|
|
16
|
+
};
|
|
17
|
+
declare type ImageSize = keyof (typeof sizes);
|
|
18
|
+
declare type NativeImageProps = RNEImageProps & BorderProps<Theme> & SpaceProps<Theme> & {
|
|
19
|
+
size?: ImageSize;
|
|
20
|
+
layoutWidth?: number;
|
|
21
|
+
aspectRatio?: number;
|
|
22
|
+
};
|
|
23
|
+
export declare const BaseImage: React.ForwardRefExoticComponent<Partial<NativeImageProps> & {
|
|
24
|
+
src?: string;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
} & React.RefAttributes<NativeImageOriginal>>;
|
|
27
|
+
export declare const Image: React.ForwardRefExoticComponent<Pick<React.PropsWithChildren<Partial<NativeImageProps> & {
|
|
28
|
+
src?: string;
|
|
29
|
+
placeholder?: string;
|
|
30
|
+
} & React.RefAttributes<NativeImageOriginal> & {
|
|
31
|
+
model?: string;
|
|
32
|
+
dataModel?: string;
|
|
33
|
+
configModel?: string;
|
|
34
|
+
action?: any;
|
|
35
|
+
}>, "p" | "source" | "style" | "children" | "onLayout" | "testID" | "accessible" | "accessibilityActions" | "accessibilityLabel" | "accessibilityRole" | "accessibilityState" | "accessibilityHint" | "accessibilityValue" | "onAccessibilityAction" | "accessibilityLiveRegion" | "importantForAccessibility" | "accessibilityElementsHidden" | "accessibilityViewIsModal" | "onAccessibilityEscape" | "onAccessibilityTap" | "onMagicTap" | "accessibilityIgnoresInvertColors" | "border" | "borderX" | "borderY" | "borderWidth" | "borderTopWidth" | "borderBottomWidth" | "borderLeftWidth" | "borderRightWidth" | "borderStyle" | "borderTopStyle" | "borderBottomStyle" | "borderLeftStyle" | "borderRightStyle" | "borderColor" | "borderTopColor" | "borderBottomColor" | "borderLeftColor" | "borderRightColor" | "borderRadius" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "width" | "height" | "size" | "m" | "margin" | "mt" | "marginTop" | "mr" | "marginRight" | "mb" | "marginBottom" | "ml" | "marginLeft" | "mx" | "marginX" | "my" | "marginY" | "padding" | "pt" | "paddingTop" | "pr" | "paddingRight" | "pb" | "paddingBottom" | "pl" | "paddingLeft" | "px" | "paddingX" | "py" | "paddingY" | "key" | keyof {
|
|
36
|
+
model?: string;
|
|
37
|
+
dataModel?: string;
|
|
38
|
+
configModel?: string;
|
|
39
|
+
action?: any;
|
|
40
|
+
} | "onPress" | "onLongPress" | "aspectRatio" | "transitionDuration" | "transition" | "containerStyle" | "Component" | "ImageComponent" | "PlaceholderContent" | "placeholderStyle" | "onError" | "onLoad" | "onLoadEnd" | "onLoadStart" | "progressiveRenderingEnabled" | "resizeMode" | "resizeMethod" | "loadingIndicatorSource" | "defaultSource" | "blurRadius" | "capInsets" | "onProgress" | "onPartialLoad" | "fadeDuration" | "layoutWidth" | "src" | "placeholder"> & React.RefAttributes<any>>;
|
|
3
41
|
export default Image;
|
|
4
42
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Image/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Image/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6B,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAClE,OAAO,KAAqD,MAAM,OAAO,CAAC;AAE1E,OAAO,EAAE,KAAK,IAAI,mBAAmB,EAAE,UAAU,IAAI,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAGlG,OAAO,EAAiB,WAAW,EAAE,UAAU,EAAa,MAAM,eAAe,CAAC;AAGlF,QAAA,MAAM,KAAK;;;;;;;;;;;CAWV,CAAC;AAEF,aAAK,SAAS,GAAG,MAAM,CAAC,OAAO,KAAK,CAAC,CAAC;AAEtC,aAAK,gBAAgB,GAAG,aAAa,GAAG,WAAW,CAAC,KAAK,CAAC,GAAG,UAAU,CAAC,KAAK,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAuBjJ,eAAO,MAAM,SAAS;UADoC,MAAM;kBAAgB,MAAM;6CAgDrF,CAAC;AAQF,eAAO,MAAM,KAAK;UAxDwC,MAAM;kBAAgB,MAAM;;;;;;;;;;;yeA6GzE,CAAC;AAEd,eAAe,KAAK,CAAC"}
|
package/dist/src/Image/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -33,7 +37,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
33
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
34
38
|
};
|
|
35
39
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.Image = void 0;
|
|
40
|
+
exports.Image = exports.BaseImage = void 0;
|
|
37
41
|
const commons_1 = require("@evlop/commons");
|
|
38
42
|
const react_1 = __importStar(require("react"));
|
|
39
43
|
const react_native_1 = require("react-native");
|
|
@@ -41,6 +45,7 @@ const react_native_elements_1 = require("react-native-elements");
|
|
|
41
45
|
const native_1 = __importDefault(require("styled-components/native"));
|
|
42
46
|
const query_string_1 = require("query-string");
|
|
43
47
|
const styled_system_1 = require("styled-system");
|
|
48
|
+
const lodash_1 = require("lodash");
|
|
44
49
|
const sizes = {
|
|
45
50
|
xxxs: 15,
|
|
46
51
|
xxs: 35,
|
|
@@ -53,7 +58,7 @@ const sizes = {
|
|
|
53
58
|
xxxl: 480,
|
|
54
59
|
fluid: '100%',
|
|
55
60
|
};
|
|
56
|
-
const NativeImage = native_1.default(react_native_elements_1.Image)({
|
|
61
|
+
const NativeImage = (0, native_1.default)(react_native_elements_1.Image)({
|
|
57
62
|
minHeight: 15,
|
|
58
63
|
minWidth: 15,
|
|
59
64
|
}, ({ size = 'md', aspectRatio = 1, layoutWidth }) => ({
|
|
@@ -65,29 +70,29 @@ const NativeImage = native_1.default(react_native_elements_1.Image)({
|
|
|
65
70
|
default: {}
|
|
66
71
|
}), styled_system_1.border, styled_system_1.space);
|
|
67
72
|
const placeholderContent = react_1.default.createElement(react_native_1.ActivityIndicator, null);
|
|
68
|
-
|
|
73
|
+
exports.BaseImage = (0, react_1.forwardRef)((_a, ref) => {
|
|
69
74
|
var { src, placeholder, source } = _a, props = __rest(_a, ["src", "placeholder", "source"]);
|
|
70
|
-
const template = commons_1.useTemplate();
|
|
71
|
-
const imageUri = react_1.useMemo(() => template(src) || template(placeholder), [template, placeholder, src]);
|
|
72
|
-
const [width, setWidth] = react_1.useState(10);
|
|
73
|
-
const onLayout = react_1.useCallback(({ nativeEvent: { layout: { width } } }) => {
|
|
75
|
+
const template = (0, commons_1.useTemplate)();
|
|
76
|
+
const imageUri = (0, react_1.useMemo)(() => (0, lodash_1.trim)(template(src)) || (0, lodash_1.trim)(template(placeholder)), [template, placeholder, src]);
|
|
77
|
+
const [width, setWidth] = (0, react_1.useState)(10);
|
|
78
|
+
const onLayout = (0, react_1.useCallback)(({ nativeEvent: { layout: { width } } }) => {
|
|
74
79
|
setWidth(width);
|
|
75
80
|
}, [setWidth]);
|
|
76
|
-
const resizedImageUri = react_1.useMemo(() => {
|
|
81
|
+
const resizedImageUri = (0, react_1.useMemo)(() => {
|
|
77
82
|
try {
|
|
78
83
|
if (String(imageUri).startsWith('http')) {
|
|
79
|
-
const imageUrl = query_string_1.parseUrl(imageUri);
|
|
84
|
+
const imageUrl = (0, query_string_1.parseUrl)(imageUri);
|
|
80
85
|
let imageWidth = width;
|
|
81
86
|
imageWidth = Math.min(imageWidth, 1080);
|
|
82
87
|
imageWidth = Math.max(imageWidth, 64);
|
|
83
88
|
imageUrl.query.w = String(imageWidth);
|
|
84
|
-
return query_string_1.stringifyUrl(imageUrl);
|
|
89
|
+
return (0, query_string_1.stringifyUrl)(imageUrl);
|
|
85
90
|
}
|
|
86
91
|
}
|
|
87
92
|
catch (e) { }
|
|
88
93
|
return imageUri;
|
|
89
94
|
}, [imageUri, width]);
|
|
90
|
-
const imageSource = react_1.useMemo(() => {
|
|
95
|
+
const imageSource = (0, react_1.useMemo)(() => {
|
|
91
96
|
if (src && resizedImageUri) {
|
|
92
97
|
return { uri: resizedImageUri };
|
|
93
98
|
}
|
|
@@ -102,7 +107,7 @@ const styles = react_native_1.StyleSheet.create({
|
|
|
102
107
|
backgroundColor: 'transparent',
|
|
103
108
|
}
|
|
104
109
|
});
|
|
105
|
-
exports.Image = commons_1.withSettings({
|
|
110
|
+
exports.Image = (0, commons_1.withSettings)({
|
|
106
111
|
name: 'Image',
|
|
107
112
|
valueOptions: [
|
|
108
113
|
{
|
|
@@ -155,6 +160,6 @@ exports.Image = commons_1.withSettings({
|
|
|
155
160
|
name: 'placeholder',
|
|
156
161
|
},
|
|
157
162
|
],
|
|
158
|
-
})(BaseImage);
|
|
163
|
+
})(exports.BaseImage);
|
|
159
164
|
exports.default = exports.Image;
|
|
160
165
|
//# sourceMappingURL=index.js.map
|