@evlop/commons 1.0.367 → 1.0.369
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/cjs/src/components/hoc/withSettings.app.d.ts +8 -7
- package/dist/cjs/src/components/hoc/withSettings.app.d.ts.map +1 -1
- package/dist/cjs/src/components/hoc/withSettings.app.js +7 -7
- package/dist/cjs/src/components/hoc/withSettings.app.js.map +1 -1
- package/dist/cjs/src/components/hoc/withSettings.d.ts +6 -4
- package/dist/cjs/src/components/hoc/withSettings.d.ts.map +1 -1
- package/dist/cjs/src/components/hoc/withSettings.js +4 -5
- package/dist/cjs/src/components/hoc/withSettings.js.map +1 -1
- package/dist/cjs/src/reducers/modals.d.ts +6 -0
- package/dist/cjs/src/reducers/modals.d.ts.map +1 -1
- package/dist/cjs/src/reducers/modals.js +5 -2
- package/dist/cjs/src/reducers/modals.js.map +1 -1
- package/dist/esm/src/components/hoc/withSettings.app.d.ts +8 -7
- package/dist/esm/src/components/hoc/withSettings.app.d.ts.map +1 -1
- package/dist/esm/src/components/hoc/withSettings.app.js +8 -8
- package/dist/esm/src/components/hoc/withSettings.app.js.map +1 -1
- package/dist/esm/src/components/hoc/withSettings.d.ts +6 -4
- package/dist/esm/src/components/hoc/withSettings.d.ts.map +1 -1
- package/dist/esm/src/components/hoc/withSettings.js +5 -6
- package/dist/esm/src/components/hoc/withSettings.js.map +1 -1
- package/dist/esm/src/reducers/modals.d.ts +6 -0
- package/dist/esm/src/reducers/modals.d.ts.map +1 -1
- package/dist/esm/src/reducers/modals.js +3 -1
- package/dist/esm/src/reducers/modals.js.map +1 -1
- package/dist/types/src/components/hoc/withSettings.app.d.ts +8 -7
- package/dist/types/src/components/hoc/withSettings.app.d.ts.map +1 -1
- package/dist/types/src/components/hoc/withSettings.d.ts +6 -4
- package/dist/types/src/components/hoc/withSettings.d.ts.map +1 -1
- package/dist/types/src/reducers/modals.d.ts +6 -0
- package/dist/types/src/reducers/modals.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import React, { PropsWithChildren
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
type ModalProps = {
|
|
3
3
|
model?: string;
|
|
4
4
|
dataModel?: string;
|
|
5
5
|
configModel?: string;
|
|
6
|
+
ref?: any;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
type PropsWithSetting<P> = PropsWithChildren<P & ModalProps>;
|
|
9
|
+
export type ComponentWithSettings<P> = React.ComponentType<PropsWithSetting<P>>;
|
|
8
10
|
export type SettingOptions = {
|
|
11
|
+
name: string;
|
|
9
12
|
valueOptions: any[];
|
|
10
13
|
configurationOptions: any[];
|
|
11
14
|
};
|
|
12
|
-
export declare const withSettings: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.
|
|
13
|
-
export declare const withModelPropsLoader: (settingOptions: SettingOptions) => <P
|
|
14
|
-
|
|
15
|
-
}) => React.JSX.Element;
|
|
16
|
-
export declare const withToolbar: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & ModalProps>> & React.RefAttributes<any>>;
|
|
15
|
+
export declare const withSettings: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
16
|
+
export declare const withModelPropsLoader: (settingOptions: SettingOptions) => <P = Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
17
|
+
export declare const withToolbar: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
17
18
|
export default withSettings;
|
|
18
19
|
//# sourceMappingURL=withSettings.app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.app.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withSettings.app.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAGtG,KAAK,UAAU,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAEzF,KAAK,gBAAgB,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;AAE7D,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE/E,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,GAAG,EAAE,CAAC;IAAC,oBAAoB,EAAE,GAAG,EAAE,CAAA;CAAE,CAAC;AAEhG,eAAO,MAAM,YAAY,GAAI,gBAAgB,cAAc,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAmBjK,CAAA;AAGD,eAAO,MAAM,oBAAoB,GAAI,gBAAgB,cAAc,MAAM,CAAC,GAAG,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAiBnK,CAAC;AAGF,eAAO,MAAM,WAAW,mBA1CqB,cAAc,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CA0C3H,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
|
@@ -39,25 +39,25 @@ const react_1 = __importStar(require("react"));
|
|
|
39
39
|
const hooks_1 = require("../../hooks");
|
|
40
40
|
const withSettings = (settingOptions) => (BaseComponent) => {
|
|
41
41
|
const ComponentWithModalPropsLoader = (0, exports.withModelPropsLoader)(settingOptions)(BaseComponent);
|
|
42
|
-
return (
|
|
43
|
-
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, ...remainingProps } = props;
|
|
42
|
+
return (props) => {
|
|
43
|
+
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, ref, ...remainingProps } = props;
|
|
44
44
|
if (dataModel || configModel) {
|
|
45
|
-
return react_1.default.createElement(ComponentWithModalPropsLoader, {
|
|
45
|
+
return react_1.default.createElement(ComponentWithModalPropsLoader, { ref: ref, model: model, dataModel: dataModel, configModel: configModel, ...remainingProps });
|
|
46
46
|
}
|
|
47
47
|
else {
|
|
48
|
-
return react_1.default.createElement(BaseComponent, { ref:
|
|
48
|
+
return react_1.default.createElement(BaseComponent, { ref: ref, ...props });
|
|
49
49
|
}
|
|
50
|
-
}
|
|
50
|
+
};
|
|
51
51
|
};
|
|
52
52
|
exports.withSettings = withSettings;
|
|
53
53
|
const withModelPropsLoader = (settingOptions) => (BaseComponent) => (props) => {
|
|
54
|
-
const { model,
|
|
54
|
+
const { model, ref, dataModel = model, configModel = dataModel && `${dataModel}_config`, ...remainingProps } = props;
|
|
55
55
|
const { data } = (0, hooks_1.useComponentData)();
|
|
56
56
|
// Extract values from component data,
|
|
57
57
|
const propsFromModel = (0, react_1.useMemo)(() => {
|
|
58
58
|
return (0, lodash_1.assign)({}, (0, lodash_1.get)(data, configModel), (0, lodash_1.get)(data, dataModel));
|
|
59
59
|
}, [dataModel, props, data]);
|
|
60
|
-
return (react_1.default.createElement(BaseComponent, { ref:
|
|
60
|
+
return (react_1.default.createElement(BaseComponent, { ref: ref, ...remainingProps, ...propsFromModel }));
|
|
61
61
|
};
|
|
62
62
|
exports.withModelPropsLoader = withModelPropsLoader;
|
|
63
63
|
exports.withToolbar = exports.withSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.app.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqC;AACrC,+CAAsG;AACtG,uCAA+C;
|
|
1
|
+
{"version":3,"file":"withSettings.app.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqC;AACrC,+CAAsG;AACtG,uCAA+C;AAUxC,MAAM,YAAY,GAAG,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAmB,aAAqC,EAA4C,EAAE;IAElK,MAAM,6BAA6B,GAAG,IAAA,4BAAoB,EAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC;IAE1F,OAAO,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,WAAW,GAAG,SAAS,IAAI,GAAG,SAAS,SAAS,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,KAAY,CAAC;QAE5H,IAAI,SAAS,IAAI,WAAW,EAAE,CAAC;YAC3B,OAAO,8BAAC,6BAA6B,IACjC,GAAG,EAAE,GAAG,EACR,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,KACpB,cAAc,GACpB,CAAA;QACN,CAAC;aAAM,CAAC;YACJ,OAAO,8BAAC,aAAa,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAAA;QACjD,CAAC;IACL,CAAC,CAAC;AACN,CAAC,CAAA;AAnBY,QAAA,YAAY,gBAmBxB;AAGM,MAAM,oBAAoB,GAAG,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAa,aAAqC,EAA4C,EAAE,CAAC,CAAC,KAA0B,EAAE,EAAE;IAEpM,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,GAAG,KAAK,EAAE,WAAW,GAAG,SAAS,IAAI,GAAG,SAAS,SAAS,EAAE,GAAG,cAAc,EAAE,GAAG,KAAK,CAAC;IACrH,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,wBAAgB,GAAE,CAAC;IAEpC,sCAAsC;IACtC,MAAM,cAAc,GAAQ,IAAA,eAAO,EAAC,GAAG,EAAE;QACrC,OAAO,IAAA,eAAM,EAAC,EAAE,EAAE,IAAA,YAAG,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE,IAAA,YAAG,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAE7B,OAAO,CACH,8BAAC,aAAa,IACV,GAAG,EAAE,GAAG,KACJ,cAAc,KACd,cAAc,GACpB,CACL,CAAC;AACN,CAAC,CAAC;AAjBW,QAAA,oBAAoB,wBAiB/B;AAGW,QAAA,WAAW,GAAG,oBAAY,CAAC;AACxC,kBAAe,oBAAY,CAAC"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import React, { PropsWithChildren
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Action } from '../../hooks';
|
|
3
3
|
type SettingProp = {
|
|
4
4
|
model?: string;
|
|
5
5
|
dataModel?: string;
|
|
6
6
|
configModel?: string;
|
|
7
7
|
action?: Action;
|
|
8
|
+
ref?: any;
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
+
type PropsWithSetting<P extends Object> = PropsWithChildren<P & SettingProp>;
|
|
11
|
+
export type ComponentWithSettings<P extends Object> = React.ComponentType<PropsWithSetting<P>>;
|
|
10
12
|
export declare const withSettings: ({ name: elementName, valueOptions, configurationOptions }: {
|
|
11
13
|
name: any;
|
|
12
14
|
valueOptions?: any[];
|
|
13
15
|
configurationOptions?: any[];
|
|
14
|
-
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) =>
|
|
16
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => (props: PropsWithSetting<P>) => React.JSX.Element;
|
|
15
17
|
export declare const withToolbar: ({ name: elementName, valueOptions, configurationOptions }: {
|
|
16
18
|
name: any;
|
|
17
19
|
valueOptions?: any[];
|
|
18
20
|
configurationOptions?: any[];
|
|
19
|
-
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) =>
|
|
21
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => (props: PropsWithSetting<P>) => React.JSX.Element;
|
|
20
22
|
export default withSettings;
|
|
21
23
|
//# sourceMappingURL=withSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,MAAM,EAA+B,MAAM,aAAa,CAAC;AAElE,KAAK,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAC3G,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,iBAAiB,CAAC,CAAC,GAAG,WAAW,CAAC,CAAA;AAC5E,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE9F,eAAO,MAAM,YAAY,GAAI;;;;CAAmE,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,CAAC,sBAoC5L,CAAC;AAEF,eAAO,MAAM,WAAW;;;;OAtC8E,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,CAAC,sBAsCtJ,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
|
@@ -37,8 +37,8 @@ exports.withToolbar = exports.withSettings = void 0;
|
|
|
37
37
|
const lodash_1 = require("lodash");
|
|
38
38
|
const react_1 = __importStar(require("react"));
|
|
39
39
|
const hooks_1 = require("../../hooks");
|
|
40
|
-
const withSettings = ({ name: elementName, valueOptions = [], configurationOptions = [] }) => (BaseComponent) => (
|
|
41
|
-
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`,
|
|
40
|
+
const withSettings = ({ name: elementName, valueOptions = [], configurationOptions = [] }) => (BaseComponent) => (props) => {
|
|
41
|
+
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, action: actionProp, ref, ...remainingProps } = props;
|
|
42
42
|
const { data } = (0, hooks_1.useComponentData)();
|
|
43
43
|
// Extract values from component data,
|
|
44
44
|
const propsFromModel = (0, react_1.useMemo)(() => {
|
|
@@ -59,9 +59,8 @@ const withSettings = ({ name: elementName, valueOptions = [], configurationOptio
|
|
|
59
59
|
return { handleAction: action };
|
|
60
60
|
}, [dataModel, action]);
|
|
61
61
|
const actionClickEvent = (0, hooks_1.useAction)(handleAction);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
});
|
|
62
|
+
return (react_1.default.createElement(BaseComponent, { animate: true, ...propsFromModel, onClick: actionClickEvent, action: forwardActions, ref: ref, ...remainingProps }));
|
|
63
|
+
};
|
|
65
64
|
exports.withSettings = withSettings;
|
|
66
65
|
exports.withToolbar = exports.withSettings;
|
|
67
66
|
exports.default = exports.withSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqC;AACrC,+
|
|
1
|
+
{"version":3,"file":"withSettings.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAqC;AACrC,+CAA0D;AAC1D,uCAAkE;AAM3D,MAAM,YAAY,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,GAAG,EAAE,EAAE,oBAAoB,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAmB,aAAqC,EAAE,EAAE,CAAC,CAAC,KAA0B,EAAE,EAAE;IAC7L,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,WAAW,GAAG,SAAS,IAAI,GAAG,SAAS,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,cAAc,EAAE,GAAG,KAAK,CAAC;IACzI,MAAM,EAAE,IAAI,EAAE,GAAG,IAAA,wBAAgB,GAAE,CAAC;IAEpC,sCAAsC;IACtC,MAAM,cAAc,GAAQ,IAAA,eAAO,EAAC,GAAG,EAAE;QACrC,OAAO,IAAA,eAAM,EAAC,EAAE,EAAE,IAAA,YAAG,EAAC,IAAI,EAAE,WAAW,CAAC,EAAE,IAAA,YAAG,EAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC;IACpE,CAAC,EAAE,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC;IAE7B,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,IAAI,UAAU,CAAC;IAEnD,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,GAAG,IAAA,eAAO,EAAC,GAAG,EAAE;QAClD,IAAI,CAAC,MAAM;YAAE,OAAO,EAAE,CAAC;QACvB,0FAA0F;QAC1F,IAAI,WAAW,KAAK,MAAM,EAAE,CAAC;YACzB,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,gBAAgB,EAAE,GAAG,MAAM,CAAC;YAC9D,OAAO;gBACH,cAAc,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE;gBACzC,aAAa,EAAE,gBAAgB;aAClC,CAAA;QACL,CAAC;QACD,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,CAAC;IACpC,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;IAExB,MAAM,gBAAgB,GAAG,IAAA,iBAAS,EAAC,YAAY,CAAC,CAAC;IAEjD,OAAO,CACH,8BAAC,aAAa,IACV,OAAO,WACH,cAAc,EAClB,OAAO,EAAE,gBAAgB,EACzB,MAAM,EAAE,cAAc,EACtB,GAAG,EAAE,GAAG,KACJ,cAAc,GACpB,CACL,CAAC;AACN,CAAC,CAAC;AApCW,QAAA,YAAY,gBAoCvB;AAEW,QAAA,WAAW,GAAG,oBAAY,CAAC;AACxC,kBAAe,oBAAY,CAAC"}
|
|
@@ -11,6 +11,7 @@ export interface AppModal {
|
|
|
11
11
|
* @description: Only used for mobile apps.
|
|
12
12
|
*/
|
|
13
13
|
presentationStyle?: 'pageSheet' | 'formSheet' | 'fullScreen' | 'overFullScreen' | 'bottomSheet';
|
|
14
|
+
visible?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare const showModal: (options: Partial<AppModal>) => {
|
|
16
17
|
type: string;
|
|
@@ -25,6 +26,11 @@ export declare const closeModal: (id: any) => {
|
|
|
25
26
|
type: string;
|
|
26
27
|
id: any;
|
|
27
28
|
};
|
|
29
|
+
export declare const hideModal: (id: any) => {
|
|
30
|
+
type: string;
|
|
31
|
+
id: number;
|
|
32
|
+
modalUpdates: Partial<AppModal>;
|
|
33
|
+
};
|
|
28
34
|
declare const _default: (state: any, action: any) => any;
|
|
29
35
|
export default _default;
|
|
30
36
|
//# sourceMappingURL=modals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modals.d.ts","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"modals.d.ts","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;IAChG,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAGD,eAAO,MAAM,SAAS,GAAI,SAAS,OAAO,CAAC,QAAQ,CAAC;;;CAoBnD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,CAAC,QAAQ,CAAC;;;;CAMzE,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,OAAE;;;CAG3B,CAAC;AAEH,eAAO,MAAM,SAAS,GAAI,OAAE;;;;CAAwC,CAAC;yBAIrD,UAAoB,EAAE,WAAM;AAA5C,wBAoBC"}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.closeModal = exports.updateModal = exports.showModal = exports.CLOSE_MODAL = exports.UPDATE_MODAL = exports.SHOW_MODAL = void 0;
|
|
3
|
+
exports.hideModal = exports.closeModal = exports.updateModal = exports.showModal = exports.CLOSE_MODAL = exports.UPDATE_MODAL = exports.SHOW_MODAL = void 0;
|
|
4
4
|
const lodash_1 = require("lodash");
|
|
5
5
|
exports.SHOW_MODAL = 'modal/show';
|
|
6
6
|
exports.UPDATE_MODAL = 'modal/update';
|
|
7
7
|
exports.CLOSE_MODAL = 'modal/close';
|
|
8
8
|
// export const showModal = (component, props = {})=>({
|
|
9
9
|
const showModal = (options) => {
|
|
10
|
-
const { id = (0, lodash_1.random)(Number.MAX_SAFE_INTEGER), component, props = {}, closeable = true, zIndex = 0, presentationStyle = 'bottomSheet' } = options;
|
|
10
|
+
const { id = (0, lodash_1.random)(Number.MAX_SAFE_INTEGER), component, props = {}, closeable = true, zIndex = 0, presentationStyle = 'bottomSheet', visible = true } = options;
|
|
11
11
|
if (!component) {
|
|
12
12
|
throw new Error('Modal component is required');
|
|
13
13
|
}
|
|
@@ -18,6 +18,7 @@ const showModal = (options) => {
|
|
|
18
18
|
closeable,
|
|
19
19
|
zIndex,
|
|
20
20
|
presentationStyle,
|
|
21
|
+
visible,
|
|
21
22
|
};
|
|
22
23
|
return {
|
|
23
24
|
type: exports.SHOW_MODAL,
|
|
@@ -38,6 +39,8 @@ const closeModal = (id) => ({
|
|
|
38
39
|
id,
|
|
39
40
|
});
|
|
40
41
|
exports.closeModal = closeModal;
|
|
42
|
+
const hideModal = (id) => (0, exports.updateModal)(id, { visible: false });
|
|
43
|
+
exports.hideModal = hideModal;
|
|
41
44
|
let initialState = [];
|
|
42
45
|
exports.default = (state = initialState, action) => {
|
|
43
46
|
switch (action.type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modals.js","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":";;;AAAA,mCAAgD;AAEnC,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,WAAW,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"modals.js","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":";;;AAAA,mCAAgD;AAEnC,QAAA,UAAU,GAAG,YAAY,CAAC;AAC1B,QAAA,YAAY,GAAG,cAAc,CAAC;AAC9B,QAAA,WAAW,GAAG,aAAa,CAAC;AAezC,uDAAuD;AAChD,MAAM,SAAS,GAAG,CAAC,OAA0B,EAAE,EAAE;IACpD,MAAM,EAAE,EAAE,GAAG,IAAA,eAAM,EAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,GAAG,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,iBAAiB,GAAG,aAAa,EAAE,OAAO,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAEjK,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACnD,CAAC;IAED,MAAM,KAAK,GAAa;QACpB,EAAE;QACF,SAAS;QACT,KAAK;QACL,SAAS;QAC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CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3F,wBAAwB;YACxB,OAAO,IAAA,eAAM,EAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;QACD,KAAK,mBAAW;YACZ,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;QACjD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAA"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import React, { PropsWithChildren
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
type ModalProps = {
|
|
3
3
|
model?: string;
|
|
4
4
|
dataModel?: string;
|
|
5
5
|
configModel?: string;
|
|
6
|
+
ref?: any;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
type PropsWithSetting<P> = PropsWithChildren<P & ModalProps>;
|
|
9
|
+
export type ComponentWithSettings<P> = React.ComponentType<PropsWithSetting<P>>;
|
|
8
10
|
export type SettingOptions = {
|
|
11
|
+
name: string;
|
|
9
12
|
valueOptions: any[];
|
|
10
13
|
configurationOptions: any[];
|
|
11
14
|
};
|
|
12
|
-
export declare const withSettings: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.
|
|
13
|
-
export declare const withModelPropsLoader: (settingOptions: SettingOptions) => <P
|
|
14
|
-
|
|
15
|
-
}) => React.JSX.Element;
|
|
16
|
-
export declare const withToolbar: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & ModalProps>> & React.RefAttributes<any>>;
|
|
15
|
+
export declare const withSettings: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
16
|
+
export declare const withModelPropsLoader: (settingOptions: SettingOptions) => <P = Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
17
|
+
export declare const withToolbar: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
17
18
|
export default withSettings;
|
|
18
19
|
//# sourceMappingURL=withSettings.app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.app.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withSettings.app.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAGtG,KAAK,UAAU,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAEzF,KAAK,gBAAgB,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;AAE7D,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE/E,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,GAAG,EAAE,CAAC;IAAC,oBAAoB,EAAE,GAAG,EAAE,CAAA;CAAE,CAAC;AAEhG,eAAO,MAAM,YAAY,GAAI,gBAAgB,cAAc,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAmBjK,CAAA;AAGD,eAAO,MAAM,oBAAoB,GAAI,gBAAgB,cAAc,MAAM,CAAC,GAAG,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAiBnK,CAAC;AAGF,eAAO,MAAM,WAAW,mBA1CqB,cAAc,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CA0C3H,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
import { assign, get } from 'lodash';
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
3
|
import { useComponentData } from '../../hooks';
|
|
4
4
|
export const withSettings = (settingOptions) => (BaseComponent) => {
|
|
5
5
|
const ComponentWithModalPropsLoader = withModelPropsLoader(settingOptions)(BaseComponent);
|
|
6
|
-
return
|
|
7
|
-
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, ...remainingProps } = props;
|
|
6
|
+
return (props) => {
|
|
7
|
+
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, ref, ...remainingProps } = props;
|
|
8
8
|
if (dataModel || configModel) {
|
|
9
|
-
return React.createElement(ComponentWithModalPropsLoader, {
|
|
9
|
+
return React.createElement(ComponentWithModalPropsLoader, { ref: ref, model: model, dataModel: dataModel, configModel: configModel, ...remainingProps });
|
|
10
10
|
}
|
|
11
11
|
else {
|
|
12
|
-
return React.createElement(BaseComponent, { ref:
|
|
12
|
+
return React.createElement(BaseComponent, { ref: ref, ...props });
|
|
13
13
|
}
|
|
14
|
-
}
|
|
14
|
+
};
|
|
15
15
|
};
|
|
16
16
|
export const withModelPropsLoader = (settingOptions) => (BaseComponent) => (props) => {
|
|
17
|
-
const { model,
|
|
17
|
+
const { model, ref, dataModel = model, configModel = dataModel && `${dataModel}_config`, ...remainingProps } = props;
|
|
18
18
|
const { data } = useComponentData();
|
|
19
19
|
// Extract values from component data,
|
|
20
20
|
const propsFromModel = useMemo(() => {
|
|
21
21
|
return assign({}, get(data, configModel), get(data, dataModel));
|
|
22
22
|
}, [dataModel, props, data]);
|
|
23
|
-
return (React.createElement(BaseComponent, { ref:
|
|
23
|
+
return (React.createElement(BaseComponent, { ref: ref, ...remainingProps, ...propsFromModel }));
|
|
24
24
|
};
|
|
25
25
|
export const withToolbar = withSettings;
|
|
26
26
|
export default withSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.app.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"withSettings.app.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,EAAiE,OAAO,EAAE,MAAM,OAAO,CAAC;AACtG,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAU/C,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,cAA8B,EAAE,EAAE,CAAC,CAAmB,aAAqC,EAA4C,EAAE;IAElK,MAAM,6BAA6B,GAAG,oBAAoB,CAAC,cAAc,CAAC,CAAC,aAAa,CAAC,CAAC;IAE1F,OAAO,CAAC,KAAK,EAAE,EAAE;QACb,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,WAAW,GAAG,SAAS,IAAI,GAAG,SAAS,SAAS,EAAE,GAAG,EAAE,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ildren } from 'react';
|
|
2
2
|
import { Action } from '../../hooks';
|
|
3
3
|
type SettingProp = {
|
|
4
4
|
model?: string;
|
|
5
5
|
dataModel?: string;
|
|
6
6
|
configModel?: string;
|
|
7
7
|
action?: Action;
|
|
8
|
+
ref?: any;
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
+
type PropsWithSetting<P extends Object> = PropsWithChildren<P & SettingProp>;
|
|
11
|
+
export type ComponentWithSettings<P extends Object> = React.ComponentType<PropsWithSetting<P>>;
|
|
10
12
|
export declare const withSettings: ({ name: elementName, valueOptions, configurationOptions }: {
|
|
11
13
|
name: any;
|
|
12
14
|
valueOptions?: any[];
|
|
13
15
|
configurationOptions?: any[];
|
|
14
|
-
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) =>
|
|
16
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => (props: PropsWithSetting<P>) => React.JSX.Element;
|
|
15
17
|
export declare const withToolbar: ({ name: elementName, valueOptions, configurationOptions }: {
|
|
16
18
|
name: any;
|
|
17
19
|
valueOptions?: any[];
|
|
18
20
|
configurationOptions?: any[];
|
|
19
|
-
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) =>
|
|
21
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => (props: PropsWithSetting<P>) => React.JSX.Element;
|
|
20
22
|
export default withSettings;
|
|
21
23
|
//# sourceMappingURL=withSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,MAAM,EAA+B,MAAM,aAAa,CAAC;AAElE,KAAK,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAC3G,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,iBAAiB,CAAC,CAAC,GAAG,WAAW,CAAC,CAAA;AAC5E,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE9F,eAAO,MAAM,YAAY,GAAI;;;;CAAmE,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,CAAC,sBAoC5L,CAAC;AAEF,eAAO,MAAM,WAAW;;;;OAtC8E,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,CAAC,sBAsCtJ,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { assign, get } from 'lodash';
|
|
2
|
-
import React, {
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
3
|
import { useAction, useComponentData } from '../../hooks';
|
|
4
|
-
export const withSettings = ({ name: elementName, valueOptions = [], configurationOptions = [] }) => (BaseComponent) =>
|
|
5
|
-
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`,
|
|
4
|
+
export const withSettings = ({ name: elementName, valueOptions = [], configurationOptions = [] }) => (BaseComponent) => (props) => {
|
|
5
|
+
const { model, dataModel = model, configModel = dataModel && `${dataModel}_config`, action: actionProp, ref, ...remainingProps } = props;
|
|
6
6
|
const { data } = useComponentData();
|
|
7
7
|
// Extract values from component data,
|
|
8
8
|
const propsFromModel = useMemo(() => {
|
|
@@ -23,9 +23,8 @@ export const withSettings = ({ name: elementName, valueOptions = [], configurati
|
|
|
23
23
|
return { handleAction: action };
|
|
24
24
|
}, [dataModel, action]);
|
|
25
25
|
const actionClickEvent = useAction(handleAction);
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
});
|
|
26
|
+
return (React.createElement(BaseComponent, { animate: true, ...propsFromModel, onClick: actionClickEvent, action: forwardActions, ref: ref, ...remainingProps }));
|
|
27
|
+
};
|
|
29
28
|
export const withToolbar = withSettings;
|
|
30
29
|
export default withSettings;
|
|
31
30
|
//# sourceMappingURL=withSettings.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"withSettings.js","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACrC,OAAO,KAAK,EAAE,EAAqB,OAAO,EAAE,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAU,SAAS,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAMlE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,YAAY,GAAG,EAAE,EAAE,oBAAoB,GAAG,EAAE,EAAE,EAAE,EAAE,CAAC,CAAmB,aAAqC,EAAE,EAAE,CAAC,CAAC,KAA0B,EAAE,EAAE;IAC7L,MAAM,EAAE,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,WAAW,GAAG,SAAS,IAAI,GAAG,SAAS,SAAS,EAAE,MAAM,EAAE,UAAU,EAAE,GAAG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}
|
|
@@ -11,6 +11,7 @@ export interface AppModal {
|
|
|
11
11
|
* @description: Only used for mobile apps.
|
|
12
12
|
*/
|
|
13
13
|
presentationStyle?: 'pageSheet' | 'formSheet' | 'fullScreen' | 'overFullScreen' | 'bottomSheet';
|
|
14
|
+
visible?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare const showModal: (options: Partial<AppModal>) => {
|
|
16
17
|
type: string;
|
|
@@ -25,6 +26,11 @@ export declare const closeModal: (id: any) => {
|
|
|
25
26
|
type: string;
|
|
26
27
|
id: any;
|
|
27
28
|
};
|
|
29
|
+
export declare const hideModal: (id: any) => {
|
|
30
|
+
type: string;
|
|
31
|
+
id: number;
|
|
32
|
+
modalUpdates: Partial<AppModal>;
|
|
33
|
+
};
|
|
28
34
|
declare const _default: (state: any, action: any) => any;
|
|
29
35
|
export default _default;
|
|
30
36
|
//# sourceMappingURL=modals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modals.d.ts","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"modals.d.ts","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;IAChG,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAGD,eAAO,MAAM,SAAS,GAAI,SAAS,OAAO,CAAC,QAAQ,CAAC;;;CAoBnD,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,IAAI,QAAQ,CAAC,IAAI,CAAC,EAAE,SAAS,OAAO,CAAC,QAAQ,CAAC;;;;CAMzE,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,OAAE;;;CAG3B,CAAC;AAEH,eAAO,MAAM,SAAS,GAAI,OAAE;;;;CAAwC,CAAC;yBAIrD,UAAoB,EAAE,WAAM;AAA5C,wBAoBC"}
|
|
@@ -4,7 +4,7 @@ export const UPDATE_MODAL = 'modal/update';
|
|
|
4
4
|
export const CLOSE_MODAL = 'modal/close';
|
|
5
5
|
// export const showModal = (component, props = {})=>({
|
|
6
6
|
export const showModal = (options) => {
|
|
7
|
-
const { id = random(Number.MAX_SAFE_INTEGER), component, props = {}, closeable = true, zIndex = 0, presentationStyle = 'bottomSheet' } = options;
|
|
7
|
+
const { id = random(Number.MAX_SAFE_INTEGER), component, props = {}, closeable = true, zIndex = 0, presentationStyle = 'bottomSheet', visible = true } = options;
|
|
8
8
|
if (!component) {
|
|
9
9
|
throw new Error('Modal component is required');
|
|
10
10
|
}
|
|
@@ -15,6 +15,7 @@ export const showModal = (options) => {
|
|
|
15
15
|
closeable,
|
|
16
16
|
zIndex,
|
|
17
17
|
presentationStyle,
|
|
18
|
+
visible,
|
|
18
19
|
};
|
|
19
20
|
return {
|
|
20
21
|
type: SHOW_MODAL,
|
|
@@ -32,6 +33,7 @@ export const closeModal = (id) => ({
|
|
|
32
33
|
type: CLOSE_MODAL,
|
|
33
34
|
id,
|
|
34
35
|
});
|
|
36
|
+
export const hideModal = (id) => updateModal(id, { visible: false });
|
|
35
37
|
let initialState = [];
|
|
36
38
|
export default (state = initialState, action) => {
|
|
37
39
|
switch (action.type) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modals.js","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"modals.js","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AAEhD,MAAM,CAAC,MAAM,UAAU,GAAG,YAAY,CAAC;AACvC,MAAM,CAAC,MAAM,YAAY,GAAG,cAAc,CAAC;AAC3C,MAAM,CAAC,MAAM,WAAW,GAAG,aAAa,CAAC;AAezC,uDAAuD;AACvD,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAA0B,EAAE,EAAE;IACpD,MAAM,EAAE,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,CAAC,EAAE,SAAS,EAAE,KAAK,GAAG,EAAE,EAAE,SAAS,GAAG,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,iBAAiB,GAAG,aAAa,EAAE,OAAO,GAAG,IAAI,EAAE,GAAG,OAAO,CAAC;IAEjK,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,MAAM,IAAI,KAAK,CAAC,6BA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AAK,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YAC3F,wBAAwB;YACxB,OAAO,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACtC,CAAC;QACD,KAAK,WAAW;YACZ,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,MAAM,CAAC,EAAE,CAAC,CAAC;QACjD;YACI,OAAO,KAAK,CAAC;IACrB,CAAC;AACL,CAAC,CAAA"}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
import React, { PropsWithChildren
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
type ModalProps = {
|
|
3
3
|
model?: string;
|
|
4
4
|
dataModel?: string;
|
|
5
5
|
configModel?: string;
|
|
6
|
+
ref?: any;
|
|
6
7
|
};
|
|
7
|
-
|
|
8
|
+
type PropsWithSetting<P> = PropsWithChildren<P & ModalProps>;
|
|
9
|
+
export type ComponentWithSettings<P> = React.ComponentType<PropsWithSetting<P>>;
|
|
8
10
|
export type SettingOptions = {
|
|
11
|
+
name: string;
|
|
9
12
|
valueOptions: any[];
|
|
10
13
|
configurationOptions: any[];
|
|
11
14
|
};
|
|
12
|
-
export declare const withSettings: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.
|
|
13
|
-
export declare const withModelPropsLoader: (settingOptions: SettingOptions) => <P
|
|
14
|
-
|
|
15
|
-
}) => React.JSX.Element;
|
|
16
|
-
export declare const withToolbar: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ForwardRefExoticComponent<React.PropsWithoutRef<React.PropsWithChildren<P & ModalProps>> & React.RefAttributes<any>>;
|
|
15
|
+
export declare const withSettings: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
16
|
+
export declare const withModelPropsLoader: (settingOptions: SettingOptions) => <P = Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
17
|
+
export declare const withToolbar: (settingOptions: SettingOptions) => <P extends Object>(BaseComponent: React.ComponentType<P>) => React.ComponentType<PropsWithSetting<P>>;
|
|
17
18
|
export default withSettings;
|
|
18
19
|
//# sourceMappingURL=withSettings.app.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.app.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withSettings.app.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.app.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAc,iBAAiB,EAA2C,MAAM,OAAO,CAAC;AAGtG,KAAK,UAAU,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAEzF,KAAK,gBAAgB,CAAC,CAAC,IAAI,iBAAiB,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC;AAE7D,MAAM,MAAM,qBAAqB,CAAC,CAAC,IAAI,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE/E,MAAM,MAAM,cAAc,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,GAAG,EAAE,CAAC;IAAC,oBAAoB,EAAE,GAAG,EAAE,CAAA;CAAE,CAAC;AAEhG,eAAO,MAAM,YAAY,GAAI,gBAAgB,cAAc,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAmBjK,CAAA;AAGD,eAAO,MAAM,oBAAoB,GAAI,gBAAgB,cAAc,MAAM,CAAC,GAAG,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAiBnK,CAAC;AAGF,eAAO,MAAM,WAAW,mBA1CqB,cAAc,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,KAAG,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CA0C3H,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
import React, { PropsWithChildren
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
2
|
import { Action } from '../../hooks';
|
|
3
3
|
type SettingProp = {
|
|
4
4
|
model?: string;
|
|
5
5
|
dataModel?: string;
|
|
6
6
|
configModel?: string;
|
|
7
7
|
action?: Action;
|
|
8
|
+
ref?: any;
|
|
8
9
|
};
|
|
9
|
-
|
|
10
|
+
type PropsWithSetting<P extends Object> = PropsWithChildren<P & SettingProp>;
|
|
11
|
+
export type ComponentWithSettings<P extends Object> = React.ComponentType<PropsWithSetting<P>>;
|
|
10
12
|
export declare const withSettings: ({ name: elementName, valueOptions, configurationOptions }: {
|
|
11
13
|
name: any;
|
|
12
14
|
valueOptions?: any[];
|
|
13
15
|
configurationOptions?: any[];
|
|
14
|
-
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) =>
|
|
16
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => (props: PropsWithSetting<P>) => React.JSX.Element;
|
|
15
17
|
export declare const withToolbar: ({ name: elementName, valueOptions, configurationOptions }: {
|
|
16
18
|
name: any;
|
|
17
19
|
valueOptions?: any[];
|
|
18
20
|
configurationOptions?: any[];
|
|
19
|
-
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) =>
|
|
21
|
+
}) => <P extends Object>(BaseComponent: React.ComponentType<P>) => (props: PropsWithSetting<P>) => React.JSX.Element;
|
|
20
22
|
export default withSettings;
|
|
21
23
|
//# sourceMappingURL=withSettings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,
|
|
1
|
+
{"version":3,"file":"withSettings.d.ts","sourceRoot":"","sources":["../../../../../src/components/hoc/withSettings.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAW,MAAM,OAAO,CAAC;AAC1D,OAAO,EAAE,MAAM,EAA+B,MAAM,aAAa,CAAC;AAElE,KAAK,WAAW,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,CAAA;AAC3G,KAAK,gBAAgB,CAAC,CAAC,SAAS,MAAM,IAAI,iBAAiB,CAAC,CAAC,GAAG,WAAW,CAAC,CAAA;AAC5E,MAAM,MAAM,qBAAqB,CAAC,CAAC,SAAS,MAAM,IAAI,KAAK,CAAC,aAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,CAAA;AAE9F,eAAO,MAAM,YAAY,GAAI;;;;CAAmE,MAAM,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,CAAC,sBAoC5L,CAAC;AAEF,eAAO,MAAM,WAAW;;;;OAtC8E,CAAC,SAAS,MAAM,EAAE,eAAe,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC,CAAC,sBAsCtJ,CAAC;AACxC,eAAe,YAAY,CAAC"}
|
|
@@ -11,6 +11,7 @@ export interface AppModal {
|
|
|
11
11
|
* @description: Only used for mobile apps.
|
|
12
12
|
*/
|
|
13
13
|
presentationStyle?: 'pageSheet' | 'formSheet' | 'fullScreen' | 'overFullScreen' | 'bottomSheet';
|
|
14
|
+
visible?: boolean;
|
|
14
15
|
}
|
|
15
16
|
export declare const showModal: (options: Partial<AppModal>) => {
|
|
16
17
|
type: string;
|
|
@@ -25,6 +26,11 @@ export declare const closeModal: (id: any) => {
|
|
|
25
26
|
type: string;
|
|
26
27
|
id: any;
|
|
27
28
|
};
|
|
29
|
+
export declare const hideModal: (id: any) => {
|
|
30
|
+
type: string;
|
|
31
|
+
id: number;
|
|
32
|
+
modalUpdates: Partial<AppModal>;
|
|
33
|
+
};
|
|
28
34
|
declare const _default: (state: any, action: any) => any;
|
|
29
35
|
export default _default;
|
|
30
36
|
//# sourceMappingURL=modals.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modals.d.ts","sourceRoot":"","sources":["../../../../src/reducers/modals.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,YAAY,iBAAiB,CAAC;AAC3C,eAAO,MAAM,WAAW,gBAAgB,CAAC;AAEzC,MAAM,WAAW,QAAQ;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,GAAG,CAAC;IACf,KAAK,EAAE,GAAG,CAAC;IACX,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,iBAAiB,CAAC,EAAE,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,gBAAgB,GAAG,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"modals.d.ts","sourceRo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