@pie-lib/config-ui 13.1.0-beta.9 → 14.0.0-next.36

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.
Files changed (167) hide show
  1. package/dist/_virtual/_rolldown/runtime.js +11 -0
  2. package/dist/alert-dialog.d.ts +44 -0
  3. package/dist/alert-dialog.js +47 -0
  4. package/dist/checkbox.d.ts +34 -0
  5. package/dist/checkbox.js +57 -0
  6. package/dist/choice-configuration/feedback-menu.d.ts +32 -0
  7. package/dist/choice-configuration/feedback-menu.js +85 -0
  8. package/dist/choice-configuration/index.d.ts +62 -0
  9. package/dist/choice-configuration/index.js +240 -0
  10. package/dist/choice-utils.d.ts +21 -0
  11. package/dist/choice-utils.js +15 -0
  12. package/dist/feedback-config/feedback-selector.d.ts +33 -0
  13. package/dist/feedback-config/feedback-selector.js +92 -0
  14. package/dist/feedback-config/group.d.ts +21 -0
  15. package/dist/feedback-config/group.js +33 -0
  16. package/dist/feedback-config/index.d.ts +48 -0
  17. package/dist/feedback-config/index.js +96 -0
  18. package/dist/form-section.d.ts +25 -0
  19. package/dist/form-section.js +25 -0
  20. package/dist/fraction-to-number.d.ts +7 -0
  21. package/dist/fraction-to-number.js +9 -0
  22. package/dist/help.d.ts +41 -0
  23. package/dist/help.js +62 -0
  24. package/dist/index.d.ts +31 -0
  25. package/dist/index.js +34 -0
  26. package/dist/input.d.ts +29 -0
  27. package/dist/input.js +65 -0
  28. package/dist/inputs.d.ts +63 -0
  29. package/dist/inputs.js +70 -0
  30. package/dist/langs.d.ts +41 -0
  31. package/dist/langs.js +76 -0
  32. package/dist/layout/config-layout.d.ts +10 -0
  33. package/dist/layout/config-layout.js +75 -0
  34. package/dist/layout/index.d.ts +11 -0
  35. package/dist/layout/index.js +10 -0
  36. package/dist/layout/layout-contents.d.ts +21 -0
  37. package/dist/layout/layout-contents.js +70 -0
  38. package/dist/layout/settings-box.d.ts +19 -0
  39. package/dist/layout/settings-box.js +32 -0
  40. package/dist/mui-box/index.d.ts +21 -0
  41. package/dist/mui-box/index.js +47 -0
  42. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +12 -0
  43. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +7 -0
  44. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +12 -0
  45. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +8 -0
  46. package/dist/node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js +122 -0
  47. package/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +276 -0
  48. package/dist/number-text-field-custom.d.ts +51 -0
  49. package/dist/number-text-field-custom.js +192 -0
  50. package/dist/number-text-field.d.ts +47 -0
  51. package/dist/number-text-field.js +122 -0
  52. package/dist/radio-with-label.d.ts +25 -0
  53. package/dist/radio-with-label.js +27 -0
  54. package/dist/settings/display-size.d.ts +26 -0
  55. package/dist/settings/display-size.js +45 -0
  56. package/dist/settings/index.d.ts +45 -0
  57. package/dist/settings/index.js +63 -0
  58. package/dist/settings/panel.d.ts +27 -0
  59. package/dist/settings/panel.js +201 -0
  60. package/dist/settings/settings-radio-label.d.ts +25 -0
  61. package/dist/settings/settings-radio-label.js +29 -0
  62. package/dist/settings/toggle.d.ts +25 -0
  63. package/dist/settings/toggle.js +33 -0
  64. package/dist/tabs/index.d.ts +22 -0
  65. package/dist/tabs/index.js +39 -0
  66. package/dist/tags-input/index.d.ts +21 -0
  67. package/dist/tags-input/index.js +83 -0
  68. package/dist/two-choice.d.ts +43 -0
  69. package/dist/two-choice.js +79 -0
  70. package/dist/with-stateful-model.d.ts +42 -0
  71. package/dist/with-stateful-model.js +32 -0
  72. package/package.json +31 -19
  73. package/CHANGELOG.json +0 -32
  74. package/CHANGELOG.md +0 -2419
  75. package/lib/alert-dialog.js +0 -68
  76. package/lib/alert-dialog.js.map +0 -1
  77. package/lib/checkbox.js +0 -84
  78. package/lib/checkbox.js.map +0 -1
  79. package/lib/choice-configuration/feedback-menu.js +0 -129
  80. package/lib/choice-configuration/feedback-menu.js.map +0 -1
  81. package/lib/choice-configuration/index.js +0 -381
  82. package/lib/choice-configuration/index.js.map +0 -1
  83. package/lib/choice-utils.js +0 -42
  84. package/lib/choice-utils.js.map +0 -1
  85. package/lib/feedback-config/feedback-selector.js +0 -155
  86. package/lib/feedback-config/feedback-selector.js.map +0 -1
  87. package/lib/feedback-config/group.js +0 -61
  88. package/lib/feedback-config/group.js.map +0 -1
  89. package/lib/feedback-config/index.js +0 -146
  90. package/lib/feedback-config/index.js.map +0 -1
  91. package/lib/form-section.js +0 -44
  92. package/lib/form-section.js.map +0 -1
  93. package/lib/help.js +0 -106
  94. package/lib/help.js.map +0 -1
  95. package/lib/index.js +0 -186
  96. package/lib/index.js.map +0 -1
  97. package/lib/input.js +0 -106
  98. package/lib/input.js.map +0 -1
  99. package/lib/inputs.js +0 -105
  100. package/lib/inputs.js.map +0 -1
  101. package/lib/langs.js +0 -136
  102. package/lib/langs.js.map +0 -1
  103. package/lib/layout/config-layout.js +0 -137
  104. package/lib/layout/config-layout.js.map +0 -1
  105. package/lib/layout/index.js +0 -21
  106. package/lib/layout/index.js.map +0 -1
  107. package/lib/layout/layout-contents.js +0 -160
  108. package/lib/layout/layout-contents.js.map +0 -1
  109. package/lib/layout/settings-box.js +0 -57
  110. package/lib/layout/settings-box.js.map +0 -1
  111. package/lib/mui-box/index.js +0 -63
  112. package/lib/mui-box/index.js.map +0 -1
  113. package/lib/number-text-field-custom.js +0 -376
  114. package/lib/number-text-field-custom.js.map +0 -1
  115. package/lib/number-text-field.js +0 -229
  116. package/lib/number-text-field.js.map +0 -1
  117. package/lib/radio-with-label.js +0 -48
  118. package/lib/radio-with-label.js.map +0 -1
  119. package/lib/settings/display-size.js +0 -61
  120. package/lib/settings/display-size.js.map +0 -1
  121. package/lib/settings/index.js +0 -110
  122. package/lib/settings/index.js.map +0 -1
  123. package/lib/settings/panel.js +0 -392
  124. package/lib/settings/panel.js.map +0 -1
  125. package/lib/settings/settings-radio-label.js +0 -51
  126. package/lib/settings/settings-radio-label.js.map +0 -1
  127. package/lib/settings/toggle.js +0 -63
  128. package/lib/settings/toggle.js.map +0 -1
  129. package/lib/tabs/index.js +0 -75
  130. package/lib/tabs/index.js.map +0 -1
  131. package/lib/tags-input/index.js +0 -149
  132. package/lib/tags-input/index.js.map +0 -1
  133. package/lib/two-choice.js +0 -136
  134. package/lib/two-choice.js.map +0 -1
  135. package/lib/with-stateful-model.js +0 -61
  136. package/lib/with-stateful-model.js.map +0 -1
  137. package/src/alert-dialog.jsx +0 -75
  138. package/src/checkbox.jsx +0 -61
  139. package/src/choice-configuration/feedback-menu.jsx +0 -96
  140. package/src/choice-configuration/index.jsx +0 -357
  141. package/src/choice-utils.js +0 -30
  142. package/src/feedback-config/feedback-selector.jsx +0 -112
  143. package/src/feedback-config/group.jsx +0 -51
  144. package/src/feedback-config/index.jsx +0 -111
  145. package/src/form-section.jsx +0 -31
  146. package/src/help.jsx +0 -79
  147. package/src/index.js +0 -55
  148. package/src/input.jsx +0 -72
  149. package/src/inputs.jsx +0 -69
  150. package/src/langs.jsx +0 -111
  151. package/src/layout/config-layout.jsx +0 -103
  152. package/src/layout/index.js +0 -4
  153. package/src/layout/layout-contents.jsx +0 -117
  154. package/src/layout/settings-box.jsx +0 -32
  155. package/src/mui-box/index.jsx +0 -56
  156. package/src/number-text-field-custom.jsx +0 -333
  157. package/src/number-text-field.jsx +0 -215
  158. package/src/radio-with-label.jsx +0 -30
  159. package/src/settings/display-size.jsx +0 -53
  160. package/src/settings/index.js +0 -83
  161. package/src/settings/panel.jsx +0 -333
  162. package/src/settings/settings-radio-label.jsx +0 -32
  163. package/src/settings/toggle.jsx +0 -46
  164. package/src/tabs/index.jsx +0 -47
  165. package/src/tags-input/index.jsx +0 -116
  166. package/src/two-choice.jsx +0 -90
  167. package/src/with-stateful-model.jsx +0 -36
@@ -0,0 +1,33 @@
1
+ import "react";
2
+ import e from "prop-types";
3
+ import { styled as t } from "@mui/material/styles";
4
+ import { jsx as n, jsxs as r } from "react/jsx-runtime";
5
+ import { color as i } from "@pie-lib/render-ui";
6
+ import a from "@mui/material/Switch";
7
+ import o from "@mui/material/InputLabel";
8
+ //#region src/settings/toggle.tsx
9
+ var s = t("div")(() => ({
10
+ display: "flex",
11
+ width: "100%",
12
+ justifyContent: "space-between"
13
+ })), c = t(o)(({ theme: e }) => ({
14
+ color: "rgba(0, 0, 0, 0.89)",
15
+ fontSize: e.typography.fontSize,
16
+ paddingTop: e.spacing(2)
17
+ })), l = t(a)(({ checked: e }) => ({
18
+ "&.Mui-checked .MuiSwitch-thumb": { color: `${i.tertiary()} !important` },
19
+ "&.Mui-checked .MuiSwitch-track": { backgroundColor: `${i.tertiaryLight()} !important` },
20
+ "& .MuiSwitch-track": { backgroundColor: e ? `${i.tertiaryLight()} !important` : void 0 }
21
+ })), u = ({ checked: e, disabled: t, label: i, toggle: a }) => /* @__PURE__ */ r(s, { children: [/* @__PURE__ */ n(c, { children: i }), /* @__PURE__ */ n(l, {
22
+ checked: e,
23
+ disabled: t,
24
+ onChange: (e) => a(e.target.checked)
25
+ })] });
26
+ u.propTypes = {
27
+ checked: e.bool,
28
+ disabled: e.bool,
29
+ label: e.string.isRequired,
30
+ toggle: e.func.isRequired
31
+ };
32
+ //#endregion
33
+ export { u as default };
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/tabs/index.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class Tabs extends React.Component {
12
+ static propTypes: {
13
+ className: PropTypes.Requireable<string>;
14
+ contentClassName: PropTypes.Requireable<string>;
15
+ contentStyle: PropTypes.Requireable<object>;
16
+ children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
17
+ };
18
+ constructor(props: any);
19
+ handleChange: any;
20
+ render(): React.JSX.Element;
21
+ }
22
+ export default Tabs;
@@ -0,0 +1,39 @@
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { styled as n } from "@mui/material/styles";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ import a from "@mui/material/Tabs";
6
+ import o from "@mui/material/Tab";
7
+ //#region src/tabs/index.tsx
8
+ var s = n(o)(() => ({})), c = class extends e.Component {
9
+ static propTypes = {
10
+ className: t.string,
11
+ contentClassName: t.string,
12
+ contentStyle: t.object,
13
+ children: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired
14
+ };
15
+ constructor(e) {
16
+ super(e), this.state = { value: 0 };
17
+ }
18
+ handleChange = (e, t) => {
19
+ this.setState({ value: t });
20
+ };
21
+ render() {
22
+ let { value: t } = this.state, { children: n, className: o, contentClassName: c, contentStyle: l = {} } = this.props;
23
+ return /* @__PURE__ */ i("div", {
24
+ className: o,
25
+ children: [/* @__PURE__ */ r(a, {
26
+ indicatorColor: "primary",
27
+ value: t,
28
+ onChange: this.handleChange,
29
+ children: e.Children.map(n, (e, t) => e && e.props.title ? /* @__PURE__ */ r(s, { label: e.props.title }, t) : null)
30
+ }), /* @__PURE__ */ r("div", {
31
+ className: c,
32
+ style: l,
33
+ children: n[t]
34
+ })]
35
+ });
36
+ }
37
+ };
38
+ //#endregion
39
+ export { c as Tabs, c as default };
@@ -0,0 +1,21 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/tags-input/index.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ export declare class TagsInput extends React.Component {
12
+ static propTypes: {
13
+ tags: PropTypes.Validator<(string | null | undefined)[]>;
14
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
15
+ };
16
+ constructor(props: any);
17
+ onFocus: any;
18
+ onBlur: any;
19
+ render(): React.JSX.Element;
20
+ }
21
+ export default TagsInput;
@@ -0,0 +1,83 @@
1
+ import e from "../mui-box/index.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { styled as r } from "@mui/material/styles";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
6
+ import { uniq as o } from "@pie-element/shared-lodash";
7
+ import s from "@mui/material/Chip";
8
+ //#region src/tags-input/index.tsx
9
+ var c = 13, l = r(s)(() => ({
10
+ padding: "0px",
11
+ margin: "1px"
12
+ })), u = ({ label: e, onDelete: t }) => /* @__PURE__ */ i(l, {
13
+ label: e,
14
+ onDelete: t
15
+ });
16
+ u.propTypes = {
17
+ label: n.string.isRequired,
18
+ onDelete: n.func.isRequired
19
+ };
20
+ var d = r("div")(({ theme: e }) => ({
21
+ border: `0px solid ${e.palette.background.paper}`,
22
+ display: "flex",
23
+ flexWrap: "wrap"
24
+ })), f = r("input")(({ theme: e }) => ({
25
+ padding: "2px",
26
+ margin: "1px",
27
+ minWidth: "30px",
28
+ width: "100%",
29
+ flex: "1",
30
+ border: `0px solid ${e.palette.background.paper}`,
31
+ height: "28px",
32
+ fontSize: e.typography.fontSize,
33
+ fontFamily: e.typography.fontFamily,
34
+ outline: "none",
35
+ "&:focus": { outline: "none" }
36
+ })), p = class extends t.Component {
37
+ static propTypes = {
38
+ tags: n.arrayOf(n.string).isRequired,
39
+ onChange: n.func.isRequired
40
+ };
41
+ constructor(e) {
42
+ super(e), this.state = {
43
+ value: "",
44
+ focused: !1
45
+ }, this.onKeyDown = (e) => {
46
+ if (e.keyCode === c && this.state.value !== "") {
47
+ let e = this.state.value.trim(), t = o(this.props.tags.concat([e]));
48
+ t.length !== this.props.tags.length && (this.props.onChange(t), this.setState({ value: "" }));
49
+ }
50
+ }, this.onChange = (e) => {
51
+ this.setState({ value: e.target.value });
52
+ }, this.deleteTag = (e) => {
53
+ let { tags: t } = this.props, n = t.indexOf(e);
54
+ n !== -1 && (t.splice(n, 1), this.props.onChange(t), this.input.focus());
55
+ };
56
+ }
57
+ onFocus = () => {
58
+ this.setState({ focused: !0 });
59
+ };
60
+ onBlur = () => {
61
+ this.setState({ focused: !1 });
62
+ };
63
+ render() {
64
+ let { tags: t } = this.props;
65
+ return /* @__PURE__ */ i(e, {
66
+ focused: this.state.focused,
67
+ children: /* @__PURE__ */ a(d, { children: [(t || []).map((e, t) => /* @__PURE__ */ i(u, {
68
+ label: e,
69
+ onDelete: () => this.deleteTag(e)
70
+ }, t)), /* @__PURE__ */ i(f, {
71
+ ref: (e) => this.input = e,
72
+ onKeyDown: this.onKeyDown,
73
+ onChange: this.onChange,
74
+ value: this.state.value,
75
+ onFocus: this.onFocus,
76
+ onBlur: this.onBlur,
77
+ type: "text"
78
+ })] })
79
+ });
80
+ }
81
+ };
82
+ //#endregion
83
+ export { p as TagsInput, p as default };
@@ -0,0 +1,43 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/two-choice.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import PropTypes from 'prop-types';
10
+ import React from 'react';
11
+ declare class NChoice extends React.Component {
12
+ static propTypes: {
13
+ header: PropTypes.Validator<string>;
14
+ className: PropTypes.Requireable<string>;
15
+ customLabel: PropTypes.Requireable<(...args: any[]) => any>;
16
+ opts: PropTypes.Validator<any[]>;
17
+ value: PropTypes.Requireable<string>;
18
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
19
+ direction: PropTypes.Requireable<string>;
20
+ };
21
+ handleChange: any;
22
+ render(): React.JSX.Element;
23
+ }
24
+ export { NChoice };
25
+ declare class TwoChoice extends React.Component {
26
+ static propTypes: {
27
+ header: PropTypes.Validator<string>;
28
+ value: PropTypes.Validator<string>;
29
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
30
+ one: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
31
+ label: PropTypes.Requireable<string>;
32
+ value: PropTypes.Requireable<string>;
33
+ }> | null | undefined>>;
34
+ two: PropTypes.Requireable<NonNullable<string | PropTypes.InferProps<{
35
+ label: PropTypes.Requireable<string>;
36
+ value: PropTypes.Requireable<string>;
37
+ }> | null | undefined>>;
38
+ className: PropTypes.Requireable<string>;
39
+ customLabel: PropTypes.Requireable<(...args: any[]) => any>;
40
+ };
41
+ render(): React.JSX.Element;
42
+ }
43
+ export default TwoChoice;
@@ -0,0 +1,79 @@
1
+ import e from "./radio-with-label.js";
2
+ import t from "react";
3
+ import n from "prop-types";
4
+ import { styled as r } from "@mui/material/styles";
5
+ import { jsx as i } from "react/jsx-runtime";
6
+ import * as a from "@pie-lib/render-ui";
7
+ import { InputContainer as o } from "@pie-lib/render-ui";
8
+ //#region src/two-choice.tsx
9
+ function s(e) {
10
+ return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
11
+ }
12
+ function c(e, t) {
13
+ return !e || s(e) ? e : s(e.default) ? e.default : t && s(e[t]) ? e[t] : t && s(e[t]?.default) ? e[t].default : e;
14
+ }
15
+ var l = c(o, "InputContainer") || c(f.InputContainer, "InputContainer"), u = a, d = u.default, f = d && typeof d == "object" ? d : u, p = r("div")(({ theme: e, direction: t }) => ({
16
+ display: "flex",
17
+ flexWrap: "wrap",
18
+ paddingLeft: 0,
19
+ marginTop: e.spacing(1),
20
+ ...t === "vertical" && { flexDirection: "column" }
21
+ })), m = class extends t.Component {
22
+ static propTypes = {
23
+ header: n.string.isRequired,
24
+ className: n.string,
25
+ customLabel: n.func,
26
+ opts: n.array.isRequired,
27
+ value: n.string,
28
+ onChange: n.func.isRequired,
29
+ direction: n.oneOf(["horizontal", "vertical"])
30
+ };
31
+ handleChange = (e) => {
32
+ this.props.onChange(e.currentTarget.value);
33
+ };
34
+ render() {
35
+ let { header: t, className: n, customLabel: r, opts: a, value: o, direction: s } = this.props, c = a.map((e) => typeof e == "string" ? {
36
+ label: e,
37
+ value: e
38
+ } : e), u = r || e;
39
+ return /* @__PURE__ */ i(l, {
40
+ label: t,
41
+ className: n,
42
+ children: /* @__PURE__ */ i(p, {
43
+ direction: s,
44
+ children: c.map((e, t) => /* @__PURE__ */ i(u, {
45
+ value: e.value,
46
+ checked: e.value === o,
47
+ onChange: this.handleChange,
48
+ label: e.label
49
+ }, t))
50
+ })
51
+ });
52
+ }
53
+ }, h = n.shape({
54
+ label: n.string,
55
+ value: n.string
56
+ }), g = class extends t.Component {
57
+ static propTypes = {
58
+ header: n.string.isRequired,
59
+ value: n.string.isRequired,
60
+ onChange: n.func.isRequired,
61
+ one: n.oneOfType([h, n.string]),
62
+ two: n.oneOfType([h, n.string]),
63
+ className: n.string,
64
+ customLabel: n.func
65
+ };
66
+ render() {
67
+ let { one: e, two: t, header: n, className: r, customLabel: a, value: o, onChange: s } = this.props;
68
+ return /* @__PURE__ */ i(m, {
69
+ customLabel: a,
70
+ header: n,
71
+ className: r,
72
+ opts: [e, t],
73
+ value: o,
74
+ onChange: s
75
+ });
76
+ }
77
+ };
78
+ //#endregion
79
+ export { m as NChoice, g as default };
@@ -0,0 +1,42 @@
1
+ /**
2
+ * @synced-from pie-lib/packages/config-ui/src/with-stateful-model.jsx
3
+ * @auto-generated
4
+ *
5
+ * This file is automatically synced from pie-elements and converted to TypeScript.
6
+ * Manual edits will be overwritten on next sync.
7
+ * To make changes, edit the upstream JavaScript file and run sync again.
8
+ */
9
+ import React from 'react';
10
+ import PropTypes from 'prop-types';
11
+ declare const withStatefulModel: (Component: any) => {
12
+ new (props: any): {
13
+ UNSAFE_componentWillReceiveProps(props: any): void;
14
+ onChange: any;
15
+ render(): React.JSX.Element;
16
+ context: unknown;
17
+ setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<{}>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
18
+ forceUpdate(callback?: (() => void) | undefined): void;
19
+ readonly props: Readonly<{}>;
20
+ state: Readonly<{}>;
21
+ refs: {
22
+ [key: string]: React.ReactInstance;
23
+ };
24
+ componentDidMount?(): void;
25
+ shouldComponentUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): boolean;
26
+ componentWillUnmount?(): void;
27
+ componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
28
+ getSnapshotBeforeUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>): any;
29
+ componentDidUpdate?(prevProps: Readonly<{}>, prevState: Readonly<{}>, snapshot?: any): void;
30
+ componentWillMount?(): void;
31
+ UNSAFE_componentWillMount?(): void;
32
+ componentWillReceiveProps?(nextProps: Readonly<{}>, nextContext: any): void;
33
+ componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
34
+ UNSAFE_componentWillUpdate?(nextProps: Readonly<{}>, nextState: Readonly<{}>, nextContext: any): void;
35
+ };
36
+ propTypes: {
37
+ model: PropTypes.Validator<object>;
38
+ onChange: PropTypes.Validator<(...args: any[]) => any>;
39
+ };
40
+ contextType?: React.Context<any> | undefined;
41
+ };
42
+ export default withStatefulModel;
@@ -0,0 +1,32 @@
1
+ import e from "react";
2
+ import t from "prop-types";
3
+ import { jsx as n } from "react/jsx-runtime";
4
+ //#region src/with-stateful-model.tsx
5
+ var r = (r) => {
6
+ class i extends e.Component {
7
+ static propTypes = {
8
+ model: t.object.isRequired,
9
+ onChange: t.func.isRequired
10
+ };
11
+ constructor(e) {
12
+ super(e), this.state = { model: e.model };
13
+ }
14
+ UNSAFE_componentWillReceiveProps(e) {
15
+ this.setState({ model: e.model });
16
+ }
17
+ onChange = (e) => {
18
+ this.setState({ model: e }, () => {
19
+ this.props.onChange(this.state.model);
20
+ });
21
+ };
22
+ render() {
23
+ return /* @__PURE__ */ n(r, {
24
+ model: this.state.model,
25
+ onChange: this.onChange
26
+ });
27
+ }
28
+ }
29
+ return i;
30
+ };
31
+ //#endregion
32
+ export { r as default };
package/package.json CHANGED
@@ -1,34 +1,46 @@
1
1
  {
2
2
  "name": "@pie-lib/config-ui",
3
- "version": "13.1.0-beta.9",
4
- "main": "lib/index.js",
5
- "module": "src/index.js",
6
- "publishConfig": {
7
- "access": "public"
3
+ "version": "14.0.0-next.36",
4
+ "description": "React implementation of @pie-lib/config-ui synced from pie-lib",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "git+https://github.com/pie-framework/pie-elements-ng.git",
8
+ "directory": "packages/lib-react/config-ui"
8
9
  },
9
- "scripts": {},
10
- "repository": "pie-framework/pie-lib",
11
10
  "dependencies": {
12
11
  "@emotion/react": "^11.14.0",
13
12
  "@emotion/styled": "^11.14.1",
14
13
  "@mui/icons-material": "^7.3.4",
15
14
  "@mui/material": "^7.3.4",
16
- "@pie-lib/editable-html-tip-tap": "^2.2.0-beta.9",
17
- "@pie-lib/icons": "^4.0.2",
18
- "@pie-lib/render-ui": "^6.1.0",
15
+ "@pie-lib/editable-html-tip-tap": "3.0.0-next.36",
16
+ "@pie-lib/icons": "5.0.0-next.0",
17
+ "@pie-lib/render-ui": "6.2.0-next.42",
19
18
  "assert": "^1.4.1",
20
19
  "debug": "^4.1.1",
21
- "lodash-es": "^4.17.23",
22
- "mathjs": "^7.0.1",
23
20
  "prop-types": "^15.6.2",
24
- "react-measure": "^2.2.2"
21
+ "react-measure": "^2.2.2",
22
+ "@pie-element/shared-lodash": "0.1.1-next.1"
25
23
  },
26
- "devDependencies": {
27
- "react": "^18.2.0",
28
- "react-dom": "^18.2.0"
24
+ "type": "module",
25
+ "main": "./dist/index.js",
26
+ "types": "./dist/index.d.ts",
27
+ "exports": {
28
+ ".": {
29
+ "types": "./dist/index.d.ts",
30
+ "default": "./dist/index.js"
31
+ }
29
32
  },
30
- "peerDependencies": {
31
- "react": "^18.2.0"
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "sideEffects": false,
37
+ "scripts": {
38
+ "build": "bun x vite build && bun x tsc --emitDeclarationOnly",
39
+ "dev": "bun x vite",
40
+ "test": "bun x vitest run"
32
41
  },
33
- "gitHead": "433bcb776c2975739e7417f133d31cd996164116"
42
+ "peerDependencies": {
43
+ "react": "^18.0.0",
44
+ "react-dom": "^18.0.0"
45
+ }
34
46
  }
package/CHANGELOG.json DELETED
@@ -1,32 +0,0 @@
1
- [
2
- {
3
- "type": "feat",
4
- "scope": "layout",
5
- "subject": "merged develop into master [ch2242]",
6
- "merge": null,
7
- "header": "feat(layout): merged develop into master [ch2242]",
8
- "body": null,
9
- "footer": null,
10
- "notes": [],
11
- "hash": "28f11ba7391c26e99a4fabaec388461b63c4a169",
12
- "gitTags": "",
13
- "committerDate": "2019-06-25 21:07:13 -0400",
14
- "isTagged": true,
15
- "tag": "@pie-lib/config-ui@10.10.0"
16
- },
17
- {
18
- "type": "feat",
19
- "scope": "mask-markup",
20
- "subject": "merging with the develop branch",
21
- "merge": null,
22
- "header": "feat(mask-markup): merging with the develop branch",
23
- "body": null,
24
- "footer": null,
25
- "notes": [],
26
- "hash": "0153c1aba8a08ba6c974fcc69476a87b9086f6c5",
27
- "gitTags": "",
28
- "committerDate": "2019-05-02 07:12:59 +0300",
29
- "isTagged": true,
30
- "tag": "@pie-lib/config-ui@10.1.0"
31
- }
32
- ]