@pie-lib/config-ui 13.0.4-next.30 → 13.0.4-next.34

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 (190) hide show
  1. package/CHANGELOG.json +32 -0
  2. package/CHANGELOG.md +2419 -0
  3. package/LICENSE.md +5 -0
  4. package/lib/alert-dialog.js +68 -0
  5. package/lib/alert-dialog.js.map +1 -0
  6. package/lib/checkbox.js +84 -0
  7. package/lib/checkbox.js.map +1 -0
  8. package/lib/choice-configuration/feedback-menu.js +129 -0
  9. package/lib/choice-configuration/feedback-menu.js.map +1 -0
  10. package/lib/choice-configuration/index.js +381 -0
  11. package/lib/choice-configuration/index.js.map +1 -0
  12. package/lib/choice-utils.js +42 -0
  13. package/lib/choice-utils.js.map +1 -0
  14. package/lib/feedback-config/feedback-selector.js +155 -0
  15. package/lib/feedback-config/feedback-selector.js.map +1 -0
  16. package/lib/feedback-config/group.js +61 -0
  17. package/lib/feedback-config/group.js.map +1 -0
  18. package/lib/feedback-config/index.js +146 -0
  19. package/lib/feedback-config/index.js.map +1 -0
  20. package/lib/form-section.js +44 -0
  21. package/lib/form-section.js.map +1 -0
  22. package/lib/help.js +106 -0
  23. package/lib/help.js.map +1 -0
  24. package/lib/index.js +186 -0
  25. package/lib/index.js.map +1 -0
  26. package/lib/input.js +106 -0
  27. package/lib/input.js.map +1 -0
  28. package/lib/inputs.js +105 -0
  29. package/lib/inputs.js.map +1 -0
  30. package/lib/langs.js +136 -0
  31. package/lib/langs.js.map +1 -0
  32. package/lib/layout/config-layout.js +137 -0
  33. package/lib/layout/config-layout.js.map +1 -0
  34. package/lib/layout/index.js +21 -0
  35. package/lib/layout/index.js.map +1 -0
  36. package/lib/layout/layout-contents.js +160 -0
  37. package/lib/layout/layout-contents.js.map +1 -0
  38. package/lib/layout/settings-box.js +57 -0
  39. package/lib/layout/settings-box.js.map +1 -0
  40. package/lib/mui-box/index.js +63 -0
  41. package/lib/mui-box/index.js.map +1 -0
  42. package/lib/number-text-field-custom.js +376 -0
  43. package/lib/number-text-field-custom.js.map +1 -0
  44. package/lib/number-text-field.js +229 -0
  45. package/lib/number-text-field.js.map +1 -0
  46. package/lib/radio-with-label.js +48 -0
  47. package/lib/radio-with-label.js.map +1 -0
  48. package/lib/settings/display-size.js +61 -0
  49. package/lib/settings/display-size.js.map +1 -0
  50. package/lib/settings/index.js +110 -0
  51. package/lib/settings/index.js.map +1 -0
  52. package/lib/settings/panel.js +392 -0
  53. package/lib/settings/panel.js.map +1 -0
  54. package/lib/settings/settings-radio-label.js +51 -0
  55. package/lib/settings/settings-radio-label.js.map +1 -0
  56. package/lib/settings/toggle.js +63 -0
  57. package/lib/settings/toggle.js.map +1 -0
  58. package/lib/tabs/index.js +75 -0
  59. package/lib/tabs/index.js.map +1 -0
  60. package/lib/tags-input/index.js +149 -0
  61. package/lib/tags-input/index.js.map +1 -0
  62. package/lib/two-choice.js +136 -0
  63. package/lib/two-choice.js.map +1 -0
  64. package/lib/with-stateful-model.js +61 -0
  65. package/lib/with-stateful-model.js.map +1 -0
  66. package/package.json +19 -33
  67. package/src/__tests__/alert-dialog.test.jsx +183 -0
  68. package/src/__tests__/checkbox.test.jsx +152 -0
  69. package/src/__tests__/choice-utils.test.js +12 -0
  70. package/src/__tests__/form-section.test.jsx +328 -0
  71. package/src/__tests__/help.test.jsx +184 -0
  72. package/src/__tests__/input.test.jsx +156 -0
  73. package/src/__tests__/langs.test.jsx +376 -0
  74. package/src/__tests__/number-text-field-custom.test.jsx +255 -0
  75. package/src/__tests__/number-text-field.test.jsx +263 -0
  76. package/src/__tests__/radio-with-label.test.jsx +155 -0
  77. package/src/__tests__/settings-panel.test.js +187 -0
  78. package/src/__tests__/settings.test.jsx +452 -0
  79. package/src/__tests__/tabs.test.jsx +188 -0
  80. package/src/__tests__/two-choice.test.js +110 -0
  81. package/src/__tests__/with-stateful-model.test.jsx +139 -0
  82. package/src/alert-dialog.jsx +75 -0
  83. package/src/checkbox.jsx +61 -0
  84. package/src/choice-configuration/__tests__/feedback-menu.test.jsx +151 -0
  85. package/src/choice-configuration/__tests__/index.test.jsx +234 -0
  86. package/src/choice-configuration/feedback-menu.jsx +96 -0
  87. package/src/choice-configuration/index.jsx +357 -0
  88. package/src/choice-utils.js +30 -0
  89. package/src/feedback-config/__tests__/feedback-config.test.jsx +141 -0
  90. package/src/feedback-config/__tests__/feedback-selector.test.jsx +97 -0
  91. package/src/feedback-config/feedback-selector.jsx +112 -0
  92. package/src/feedback-config/group.jsx +51 -0
  93. package/src/feedback-config/index.jsx +111 -0
  94. package/src/form-section.jsx +31 -0
  95. package/src/help.jsx +79 -0
  96. package/src/index.js +55 -0
  97. package/src/input.jsx +72 -0
  98. package/src/inputs.jsx +69 -0
  99. package/src/langs.jsx +111 -0
  100. package/src/layout/__tests__/config.layout.test.jsx +59 -0
  101. package/src/layout/__tests__/layout-content.test.jsx +3 -0
  102. package/src/layout/config-layout.jsx +103 -0
  103. package/src/layout/index.js +4 -0
  104. package/src/layout/layout-contents.jsx +117 -0
  105. package/src/layout/settings-box.jsx +32 -0
  106. package/src/mui-box/index.jsx +56 -0
  107. package/src/number-text-field-custom.jsx +333 -0
  108. package/src/number-text-field.jsx +215 -0
  109. package/src/radio-with-label.jsx +30 -0
  110. package/src/settings/display-size.jsx +53 -0
  111. package/src/settings/index.js +83 -0
  112. package/src/settings/panel.jsx +333 -0
  113. package/src/settings/settings-radio-label.jsx +32 -0
  114. package/src/settings/toggle.jsx +46 -0
  115. package/src/tabs/index.jsx +47 -0
  116. package/src/tags-input/__tests__/index.test.jsx +113 -0
  117. package/src/tags-input/index.jsx +116 -0
  118. package/src/two-choice.jsx +90 -0
  119. package/src/with-stateful-model.jsx +36 -0
  120. package/dist/_virtual/_rolldown/runtime.js +0 -11
  121. package/dist/alert-dialog.d.ts +0 -44
  122. package/dist/alert-dialog.js +0 -47
  123. package/dist/checkbox.d.ts +0 -34
  124. package/dist/checkbox.js +0 -57
  125. package/dist/choice-configuration/feedback-menu.d.ts +0 -32
  126. package/dist/choice-configuration/feedback-menu.js +0 -85
  127. package/dist/choice-configuration/index.d.ts +0 -62
  128. package/dist/choice-configuration/index.js +0 -240
  129. package/dist/choice-utils.d.ts +0 -21
  130. package/dist/choice-utils.js +0 -15
  131. package/dist/feedback-config/feedback-selector.d.ts +0 -33
  132. package/dist/feedback-config/feedback-selector.js +0 -92
  133. package/dist/feedback-config/group.d.ts +0 -21
  134. package/dist/feedback-config/group.js +0 -33
  135. package/dist/feedback-config/index.d.ts +0 -48
  136. package/dist/feedback-config/index.js +0 -96
  137. package/dist/form-section.d.ts +0 -25
  138. package/dist/form-section.js +0 -25
  139. package/dist/fraction-to-number.d.ts +0 -7
  140. package/dist/fraction-to-number.js +0 -9
  141. package/dist/help.d.ts +0 -41
  142. package/dist/help.js +0 -61
  143. package/dist/index.d.ts +0 -31
  144. package/dist/index.js +0 -34
  145. package/dist/input.d.ts +0 -29
  146. package/dist/input.js +0 -65
  147. package/dist/inputs.d.ts +0 -63
  148. package/dist/inputs.js +0 -70
  149. package/dist/langs.d.ts +0 -41
  150. package/dist/langs.js +0 -76
  151. package/dist/layout/config-layout.d.ts +0 -10
  152. package/dist/layout/config-layout.js +0 -75
  153. package/dist/layout/index.d.ts +0 -11
  154. package/dist/layout/index.js +0 -10
  155. package/dist/layout/layout-contents.d.ts +0 -21
  156. package/dist/layout/layout-contents.js +0 -70
  157. package/dist/layout/settings-box.d.ts +0 -19
  158. package/dist/layout/settings-box.js +0 -31
  159. package/dist/mui-box/index.d.ts +0 -21
  160. package/dist/mui-box/index.js +0 -47
  161. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/extends.js +0 -12
  162. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js +0 -7
  163. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js +0 -12
  164. package/dist/node_modules/.bun/@babel_runtime@7.29.7/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js +0 -8
  165. package/dist/node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js +0 -122
  166. package/dist/node_modules/.bun/resize-observer-polyfill@1.5.1/node_modules/resize-observer-polyfill/dist/ResizeObserver.es.js +0 -276
  167. package/dist/number-text-field-custom.d.ts +0 -51
  168. package/dist/number-text-field-custom.js +0 -192
  169. package/dist/number-text-field.d.ts +0 -47
  170. package/dist/number-text-field.js +0 -122
  171. package/dist/radio-with-label.d.ts +0 -25
  172. package/dist/radio-with-label.js +0 -27
  173. package/dist/settings/display-size.d.ts +0 -26
  174. package/dist/settings/display-size.js +0 -45
  175. package/dist/settings/index.d.ts +0 -45
  176. package/dist/settings/index.js +0 -63
  177. package/dist/settings/panel.d.ts +0 -27
  178. package/dist/settings/panel.js +0 -201
  179. package/dist/settings/settings-radio-label.d.ts +0 -25
  180. package/dist/settings/settings-radio-label.js +0 -29
  181. package/dist/settings/toggle.d.ts +0 -25
  182. package/dist/settings/toggle.js +0 -33
  183. package/dist/tabs/index.d.ts +0 -22
  184. package/dist/tabs/index.js +0 -39
  185. package/dist/tags-input/index.d.ts +0 -21
  186. package/dist/tags-input/index.js +0 -83
  187. package/dist/two-choice.d.ts +0 -43
  188. package/dist/two-choice.js +0 -79
  189. package/dist/with-stateful-model.d.ts +0 -42
  190. package/dist/with-stateful-model.js +0 -32
package/dist/help.d.ts DELETED
@@ -1,41 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/help.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
- export declare const HelpButton: {
12
- ({ onClick }: {
13
- onClick: any;
14
- }): React.JSX.Element;
15
- propTypes: {
16
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
17
- };
18
- };
19
- export declare const HelpDialog: {
20
- ({ open, onClose, children, title }: {
21
- open: any;
22
- onClose: any;
23
- children: any;
24
- title: any;
25
- }): React.JSX.Element;
26
- propTypes: {
27
- open: PropTypes.Requireable<boolean>;
28
- onClose: PropTypes.Requireable<(...args: any[]) => any>;
29
- children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
30
- title: PropTypes.Validator<string>;
31
- };
32
- };
33
- declare class Help extends React.Component {
34
- static propTypes: {
35
- children: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
36
- title: PropTypes.Requireable<string>;
37
- };
38
- constructor(props: any);
39
- render(): React.JSX.Element;
40
- }
41
- export default Help;
package/dist/help.js DELETED
@@ -1,61 +0,0 @@
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/Dialog";
6
- import o from "@mui/material/DialogTitle";
7
- import s from "@mui/material/DialogContentText";
8
- import c from "@mui/material/DialogContent";
9
- import l from "@mui/material/DialogActions";
10
- import u from "@mui/material/Button";
11
- import d from "@mui/icons-material/Help";
12
- import f from "@mui/material/IconButton";
13
- //#region src/help.tsx
14
- var p = n(f)(({ theme: e }) => ({ "&:hover": { color: e.palette.grey[300] } })), m = ({ onClick: e }) => /* @__PURE__ */ r(p, {
15
- onClick: e,
16
- size: "large",
17
- children: /* @__PURE__ */ r(d, {})
18
- });
19
- m.propTypes = { onClick: t.func };
20
- var h = ({ open: e, onClose: t, children: n, title: d }) => /* @__PURE__ */ i(a, {
21
- open: e,
22
- onClose: t,
23
- children: [
24
- /* @__PURE__ */ r(o, { children: d }),
25
- /* @__PURE__ */ r(c, { children: /* @__PURE__ */ r(s, { children: n }) }),
26
- /* @__PURE__ */ r(l, { children: /* @__PURE__ */ r(u, {
27
- onClick: t,
28
- color: "primary",
29
- children: "OK"
30
- }) })
31
- ]
32
- });
33
- h.propTypes = {
34
- open: t.bool,
35
- onClose: t.func,
36
- children: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired,
37
- title: t.string.isRequired
38
- };
39
- var g = class extends e.Component {
40
- static propTypes = {
41
- children: t.oneOfType([t.arrayOf(t.node), t.node]).isRequired,
42
- title: t.string
43
- };
44
- constructor(e) {
45
- super(e), this.state = { open: !1 };
46
- }
47
- render() {
48
- let { children: e, title: t } = this.props;
49
- return /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r(m, {
50
- color: "accent",
51
- onClick: () => this.setState({ open: !0 })
52
- }), /* @__PURE__ */ r(h, {
53
- open: this.state.open,
54
- title: t,
55
- onClose: () => this.setState({ open: !1 }),
56
- children: e
57
- })] });
58
- }
59
- };
60
- //#endregion
61
- export { g as default };
package/dist/index.d.ts DELETED
@@ -1,31 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/index.js
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 AlertDialog from './alert-dialog.js';
10
- import FeedbackConfig, { buildDefaults as feedbackConfigDefaults, FeedbackSelector } from './feedback-config/index.js';
11
- import { InputCheckbox, InputRadio, InputSwitch } from './inputs.js';
12
- import Langs, { LanguageControls } from './langs.js';
13
- import Tabs from './tabs/index.js';
14
- import Checkbox from './checkbox.js';
15
- import FormSection from './form-section.js';
16
- import Help from './help.js';
17
- import Input from './input.js';
18
- declare const InputContainer: any;
19
- import NumberTextField from './number-text-field.js';
20
- import NumberTextFieldCustom from './number-text-field-custom.js';
21
- import TwoChoice, { NChoice } from './two-choice.js';
22
- import TagsInput from './tags-input/index.js';
23
- import MuiBox from './mui-box/index.js';
24
- import ChoiceConfiguration from './choice-configuration/index.js';
25
- import * as layout from './layout/index.js';
26
- import * as choiceUtils from './choice-utils.js';
27
- import withStatefulModel from './with-stateful-model.js';
28
- import Toggle from './settings/toggle.js';
29
- import DisplaySize from './settings/display-size.js';
30
- import * as settings from './settings/index.js';
31
- export { AlertDialog, FeedbackConfig, FeedbackSelector, feedbackConfigDefaults, InputCheckbox, InputSwitch, InputRadio, Langs, LanguageControls, Tabs, Checkbox, FormSection, Help, Input, InputContainer, NumberTextField, NumberTextFieldCustom, TwoChoice, NChoice, TagsInput, MuiBox, ChoiceConfiguration, layout, choiceUtils, withStatefulModel, Toggle, DisplaySize, settings, };
package/dist/index.js DELETED
@@ -1,34 +0,0 @@
1
- import e from "./alert-dialog.js";
2
- import t from "./feedback-config/feedback-selector.js";
3
- import n, { buildDefaults as r } from "./feedback-config/index.js";
4
- import { InputCheckbox as i, InputRadio as a, InputSwitch as o } from "./inputs.js";
5
- import s, { LanguageControls as c } from "./langs.js";
6
- import l from "./tabs/index.js";
7
- import u from "./checkbox.js";
8
- import d from "./form-section.js";
9
- import f from "./help.js";
10
- import p from "./input.js";
11
- import m from "./number-text-field.js";
12
- import h from "./number-text-field-custom.js";
13
- import g, { NChoice as _ } from "./two-choice.js";
14
- import v from "./mui-box/index.js";
15
- import y from "./tags-input/index.js";
16
- import b from "./choice-configuration/index.js";
17
- import { layout_exports as x } from "./layout/index.js";
18
- import { choice_utils_exports as S } from "./choice-utils.js";
19
- import C from "./with-stateful-model.js";
20
- import w from "./settings/toggle.js";
21
- import T from "./settings/display-size.js";
22
- import { settings_exports as E } from "./settings/index.js";
23
- import * as D from "@pie-lib/render-ui";
24
- import { InputContainer as O } from "@pie-lib/render-ui";
25
- //#region src/index.ts
26
- function k(e) {
27
- return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
28
- }
29
- function A(e, t) {
30
- return !e || k(e) ? e : k(e.default) ? e.default : t && k(e[t]) ? e[t] : t && k(e[t]?.default) ? e[t].default : e;
31
- }
32
- var j = A(O, "InputContainer") || A(P.InputContainer, "InputContainer"), M = D, N = M.default, P = N && typeof N == "object" ? N : M;
33
- //#endregion
34
- export { e as AlertDialog, u as Checkbox, b as ChoiceConfiguration, T as DisplaySize, n as FeedbackConfig, t as FeedbackSelector, d as FormSection, f as Help, p as Input, i as InputCheckbox, j as InputContainer, a as InputRadio, o as InputSwitch, s as Langs, c as LanguageControls, v as MuiBox, _ as NChoice, m as NumberTextField, h as NumberTextFieldCustom, l as Tabs, y as TagsInput, w as Toggle, g as TwoChoice, S as choiceUtils, r as feedbackConfigDefaults, x as layout, E as settings, C as withStatefulModel };
package/dist/input.d.ts DELETED
@@ -1,29 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/input.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 * as React from 'react';
10
- import PropTypes from 'prop-types';
11
- export default class Input extends React.Component {
12
- static propTypes: {
13
- value: PropTypes.Requireable<NonNullable<string | number | null | undefined>>;
14
- onChange: PropTypes.Validator<(...args: any[]) => any>;
15
- label: PropTypes.Requireable<string>;
16
- type: PropTypes.Validator<string>;
17
- error: PropTypes.Requireable<(...args: any[]) => any>;
18
- noModelUpdateOnError: PropTypes.Requireable<boolean>;
19
- };
20
- static defaultProps: {
21
- type: string;
22
- error: (value: any, type: any) => boolean;
23
- noModelUpdateOnError: boolean;
24
- };
25
- constructor(props: any);
26
- UNSAFE_componentWillReceiveProps(newProps: any): void;
27
- onChange: any;
28
- render(): React.JSX.Element;
29
- }
package/dist/input.js DELETED
@@ -1,65 +0,0 @@
1
- import * as e from "react";
2
- import t from "prop-types";
3
- import { jsx as n } from "react/jsx-runtime";
4
- import * as r from "@pie-lib/render-ui";
5
- import { InputContainer as i } from "@pie-lib/render-ui";
6
- import a from "@mui/material/Input";
7
- //#region src/input.tsx
8
- function o(e) {
9
- return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
10
- }
11
- function s(e, t) {
12
- return !e || o(e) ? e : o(e.default) ? e.default : t && o(e[t]) ? e[t] : t && o(e[t]?.default) ? e[t].default : e;
13
- }
14
- var c = s(i, "InputContainer") || s(d.InputContainer, "InputContainer"), l = r, u = l.default, d = u && typeof u == "object" ? u : l, f = class extends e.Component {
15
- static propTypes = {
16
- value: t.oneOfType([t.string, t.number]),
17
- onChange: t.func.isRequired,
18
- label: t.string,
19
- type: t.string.isRequired,
20
- error: t.func,
21
- noModelUpdateOnError: t.bool
22
- };
23
- static defaultProps = {
24
- type: "text",
25
- error: (e, t) => t === "number" ? !e || isNaN(e) : !e,
26
- noModelUpdateOnError: !1
27
- };
28
- constructor(e) {
29
- super(e), this.state = { value: e.value };
30
- }
31
- UNSAFE_componentWillReceiveProps(e) {
32
- this.setState({ value: e.value });
33
- }
34
- onChange = (e) => {
35
- let { type: t, onChange: n, error: r } = this.props, i = e.target.value;
36
- r(i, t) ? this.setState({
37
- error: !0,
38
- value: e.target.value
39
- }) : (this.setState({
40
- error: !1,
41
- value: e.target.value
42
- }), n(e));
43
- };
44
- render() {
45
- let { label: e, type: t, noModelUpdateOnError: r, ...i } = this.props, { value: o, error: s } = this.state;
46
- return e ? /* @__PURE__ */ n(c, {
47
- label: e,
48
- children: /* @__PURE__ */ n(a, {
49
- type: t,
50
- ...i,
51
- value: o,
52
- onChange: this.onChange,
53
- error: s
54
- })
55
- }) : /* @__PURE__ */ n(a, {
56
- type: t,
57
- ...i,
58
- value: o,
59
- onChange: this.onChange,
60
- error: s
61
- });
62
- }
63
- };
64
- //#endregion
65
- export { f as default };
package/dist/inputs.d.ts DELETED
@@ -1,63 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/inputs.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 const InputSwitch: {
12
- ({ className, label, checked, onChange }: {
13
- className: any;
14
- label: any;
15
- checked: any;
16
- onChange: any;
17
- }): React.JSX.Element;
18
- propTypes: {
19
- className: PropTypes.Requireable<string>;
20
- label: PropTypes.Requireable<string>;
21
- checked: PropTypes.Requireable<boolean>;
22
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
23
- disabled: PropTypes.Requireable<boolean>;
24
- error: PropTypes.Requireable<string>;
25
- };
26
- };
27
- declare const InputCheckbox: {
28
- ({ className, label, checked, onChange, disabled, error }: {
29
- className: any;
30
- label: any;
31
- checked: any;
32
- onChange: any;
33
- disabled: any;
34
- error: any;
35
- }): React.JSX.Element;
36
- propTypes: {
37
- className: PropTypes.Requireable<string>;
38
- label: PropTypes.Requireable<string>;
39
- checked: PropTypes.Requireable<boolean>;
40
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
41
- disabled: PropTypes.Requireable<boolean>;
42
- error: PropTypes.Requireable<string>;
43
- };
44
- };
45
- declare const InputRadio: {
46
- ({ className, label, checked, onChange, disabled, error }: {
47
- className: any;
48
- label: any;
49
- checked: any;
50
- onChange: any;
51
- disabled: any;
52
- error: any;
53
- }): React.JSX.Element;
54
- propTypes: {
55
- className: PropTypes.Requireable<string>;
56
- label: PropTypes.Requireable<string>;
57
- checked: PropTypes.Requireable<boolean>;
58
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
59
- disabled: PropTypes.Requireable<boolean>;
60
- error: PropTypes.Requireable<string>;
61
- };
62
- };
63
- export { InputSwitch, InputCheckbox, InputRadio };
package/dist/inputs.js DELETED
@@ -1,70 +0,0 @@
1
- import "react";
2
- import e from "prop-types";
3
- import { styled as t } from "@mui/material/styles";
4
- import { jsx as n } from "react/jsx-runtime";
5
- import * as r from "@pie-lib/render-ui";
6
- import { InputContainer as i, color as a } from "@pie-lib/render-ui";
7
- import o from "@mui/material/Radio";
8
- import s from "@mui/material/Checkbox";
9
- import c from "@mui/material/Switch";
10
- //#region src/inputs.tsx
11
- function l(e) {
12
- return typeof e == "function" || typeof e == "object" && !!e && typeof e.$$typeof == "symbol";
13
- }
14
- function u(e, t) {
15
- return !e || l(e) ? e : l(e.default) ? e.default : t && l(e[t]) ? e[t] : t && l(e[t]?.default) ? e[t].default : e;
16
- }
17
- var d = u(i, "InputContainer") || u(m.InputContainer, "InputContainer"), f = r, p = f.default, m = p && typeof p == "object" ? p : f, h = {
18
- className: e.string,
19
- label: e.string,
20
- checked: e.bool,
21
- onChange: e.func,
22
- disabled: e.bool,
23
- error: e.string
24
- }, g = t(c)(() => ({
25
- justifyContent: "inherit",
26
- transform: "translate(-20%, 20%)"
27
- })), _ = ({ className: e, label: t, checked: r, onChange: i }) => /* @__PURE__ */ n(d, {
28
- className: e,
29
- label: t,
30
- children: /* @__PURE__ */ n(g, {
31
- checked: r,
32
- onChange: i,
33
- "aria-label": t
34
- })
35
- });
36
- _.propTypes = { ...h };
37
- var v = t(s)(({ theme: e, error: t }) => ({
38
- transform: "translate(-25%, 20%)",
39
- color: `${a.tertiary()} !important`,
40
- ...t && { color: `${e.palette.error.main} !important` }
41
- })), y = ({ className: e, label: t, checked: r, onChange: i, disabled: a, error: o }) => /* @__PURE__ */ n(d, {
42
- className: e,
43
- label: t,
44
- children: /* @__PURE__ */ n(v, {
45
- disabled: a,
46
- checked: r,
47
- onChange: i,
48
- "aria-label": t,
49
- error: o
50
- })
51
- });
52
- y.propTypes = { ...h };
53
- var b = t(o)(({ theme: e, error: t }) => ({
54
- transform: "translate(-20%, 20%)",
55
- color: `${a.tertiary()} !important`,
56
- ...t && { color: `${e.palette.error.main} !important` }
57
- })), x = ({ className: e, label: t, checked: r, onChange: i, disabled: a, error: o }) => /* @__PURE__ */ n(d, {
58
- className: e,
59
- label: t,
60
- children: /* @__PURE__ */ n(b, {
61
- disabled: a,
62
- checked: r,
63
- onChange: i,
64
- "aria-label": t,
65
- error: o
66
- })
67
- });
68
- x.propTypes = { ...h };
69
- //#endregion
70
- export { y as InputCheckbox, x as InputRadio, _ as InputSwitch };
package/dist/langs.d.ts DELETED
@@ -1,41 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/langs.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
- export declare class Langs extends React.Component {
12
- static propTypes: {
13
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
14
- langs: PropTypes.Requireable<any[]>;
15
- selected: PropTypes.Requireable<string>;
16
- label: PropTypes.Requireable<string>;
17
- uid: PropTypes.Requireable<string>;
18
- };
19
- constructor(props: any);
20
- choose: any;
21
- render(): React.JSX.Element;
22
- }
23
- export default Langs;
24
- export declare const LanguageControls: {
25
- ({ langs, activeLang, defaultLang, onActiveLangChange, onDefaultLangChange, className, }: {
26
- langs: any;
27
- activeLang: any;
28
- defaultLang: any;
29
- onActiveLangChange: any;
30
- onDefaultLangChange: any;
31
- className: any;
32
- }): React.JSX.Element;
33
- propTypes: {
34
- langs: PropTypes.Requireable<any[]>;
35
- activeLang: PropTypes.Validator<string>;
36
- defaultLang: PropTypes.Validator<string>;
37
- onActiveLangChange: PropTypes.Validator<(...args: any[]) => any>;
38
- onDefaultLangChange: PropTypes.Validator<(...args: any[]) => any>;
39
- className: PropTypes.Requireable<string>;
40
- };
41
- };
package/dist/langs.js DELETED
@@ -1,76 +0,0 @@
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/Input";
6
- import o from "@mui/material/InputLabel";
7
- import s from "@mui/material/Select";
8
- import c from "@mui/material/MenuItem";
9
- import l from "@mui/material/FormControl";
10
- import u from "debug";
11
- //#region src/langs.tsx
12
- var d = u("pie-elements:config-ui:langs"), f = n("div")(() => ({
13
- flexDirection: "column",
14
- alignItems: "start",
15
- display: "flex",
16
- position: "relative",
17
- paddingTop: "0px",
18
- paddingRight: "0px"
19
- })), p = n(l)(() => ({ position: "initial" })), m = n(o)(({ theme: e }) => ({ paddingBottom: e.spacing(1) })), h = class extends e.Component {
20
- static propTypes = {
21
- onChange: t.func,
22
- langs: t.array,
23
- selected: t.string,
24
- label: t.string,
25
- uid: t.string
26
- };
27
- constructor(e) {
28
- super(e), this.uid = e.uid || (Math.random() * 1e4).toFixed();
29
- }
30
- choose = (e) => {
31
- d("[choose] event: ", e), this.props.onChange && this.props.onChange(e.target.value);
32
- };
33
- render() {
34
- let { langs: e, selected: t, label: n } = this.props;
35
- return d("[render] selected:", t), /* @__PURE__ */ r(f, { children: /* @__PURE__ */ i(p, { children: [/* @__PURE__ */ r(m, {
36
- htmlFor: this.uid,
37
- children: n
38
- }), /* @__PURE__ */ r(s, {
39
- value: t,
40
- onChange: this.choose,
41
- input: /* @__PURE__ */ r(a, { id: this.uid }),
42
- children: e.map((e, t) => /* @__PURE__ */ r(c, {
43
- value: e,
44
- children: e
45
- }, t))
46
- })] }) });
47
- }
48
- }, g = n("div")(() => ({
49
- display: "grid",
50
- gridAutoFlow: "column",
51
- gridAutoColumns: "1fr",
52
- gridGap: "8px"
53
- })), _ = ({ langs: e, activeLang: t, defaultLang: n, onActiveLangChange: a, onDefaultLangChange: o, className: s }) => /* @__PURE__ */ i(g, {
54
- className: s,
55
- children: [/* @__PURE__ */ r(h, {
56
- label: "Choose language to edit",
57
- langs: e,
58
- selected: t,
59
- onChange: (e) => a(e)
60
- }), /* @__PURE__ */ r(h, {
61
- label: "Default language",
62
- langs: e,
63
- selected: n,
64
- onChange: (e) => o(e)
65
- })]
66
- });
67
- _.propTypes = {
68
- langs: t.array,
69
- activeLang: t.string.isRequired,
70
- defaultLang: t.string.isRequired,
71
- onActiveLangChange: t.func.isRequired,
72
- onDefaultLangChange: t.func.isRequired,
73
- className: t.string
74
- };
75
- //#endregion
76
- export { _ as LanguageControls, h as default };
@@ -1,10 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/layout/config-layout.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
- declare const ConfigLayout: any;
10
- export default ConfigLayout;
@@ -1,75 +0,0 @@
1
- import e, { withContentRect as t } from "../node_modules/.bun/react-measure@2.5.2_6dbf9a050bc9aadb/node_modules/react-measure/dist/index.esm.js";
2
- import n from "./layout-contents.js";
3
- import r from "./settings-box.js";
4
- import i from "react";
5
- import a from "prop-types";
6
- import { StyledEngineProvider as o, ThemeProvider as s, createTheme as c } from "@mui/material/styles";
7
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- //#region src/layout/config-layout.tsx
9
- var d = c({
10
- typography: { fontFamily: "inherit" },
11
- components: { MuiButton: { styleOverrides: { contained: {
12
- backgroundColor: "#e0e0e0",
13
- color: "#000000",
14
- "&:hover": { backgroundColor: "#bdbdbd" }
15
- } } } }
16
- }), f = class extends i.Component {
17
- static propTypes = {
18
- children: a.oneOfType([
19
- a.string,
20
- a.arrayOf(a.element),
21
- a.element
22
- ]),
23
- className: a.string,
24
- dimensions: a.object,
25
- settings: a.element,
26
- sidePanelMinWidth: a.number,
27
- hideSettings: a.bool,
28
- extraCSSRules: a.shape({
29
- names: a.arrayOf(a.string),
30
- rules: a.string
31
- })
32
- };
33
- static defaultProps = {
34
- sidePanelMinWidth: 1135,
35
- hideSettings: !1,
36
- dimensions: {}
37
- };
38
- constructor(...e) {
39
- super(...e), this.state = { layoutMode: void 0 };
40
- }
41
- onResize = (e) => {
42
- let { bounds: t } = e, { sidePanelMinWidth: n, dimensions: r } = this.props, { maxWidth: i } = r || {}, a = t.width > n && (!i || i > n) ? "inline" : "tabbed";
43
- a !== this.state.layoutMode && this.setState({ layoutMode: a });
44
- };
45
- render() {
46
- return /* @__PURE__ */ l(o, {
47
- injectFirst: !0,
48
- children: /* @__PURE__ */ l(s, {
49
- theme: d,
50
- children: /* @__PURE__ */ l(e, {
51
- bounds: !0,
52
- onResize: this.onResize,
53
- children: ({ measureRef: e }) => {
54
- let { children: t, settings: i, hideSettings: a, dimensions: o, extraCSSRules: s } = this.props, { layoutMode: c } = this.state, d = a ? null : c === "inline" ? /* @__PURE__ */ l(r, {
55
- className: "settings-box",
56
- children: i
57
- }) : i;
58
- return /* @__PURE__ */ u("div", {
59
- ref: e,
60
- className: "main-container extraCSSRules",
61
- children: [s?.rules ? /* @__PURE__ */ l("style", { dangerouslySetInnerHTML: { __html: `.extraCSSRules { ${s.rules} }` } }) : null, /* @__PURE__ */ l(n, {
62
- mode: c,
63
- secondary: d,
64
- dimensions: o,
65
- children: t
66
- })]
67
- });
68
- }
69
- })
70
- })
71
- });
72
- }
73
- }, p = t("bounds")(f);
74
- //#endregion
75
- export { p as default };
@@ -1,11 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/layout/index.js
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 ConfigLayout from './config-layout.js';
10
- import LayoutContents from './layout-contents.js';
11
- export { LayoutContents, ConfigLayout };
@@ -1,10 +0,0 @@
1
- import { __exportAll as e } from "../_virtual/_rolldown/runtime.js";
2
- import t from "./layout-contents.js";
3
- import n from "./config-layout.js";
4
- //#region src/layout/index.ts
5
- var r = /* @__PURE__ */ e({
6
- ConfigLayout: () => n,
7
- LayoutContents: () => t
8
- });
9
- //#endregion
10
- export { r as layout_exports };
@@ -1,21 +0,0 @@
1
- /**
2
- * @synced-from pie-lib/packages/config-ui/src/layout/layout-contents.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 class RawLayoutContents extends React.Component {
12
- static propTypes: {
13
- mode: PropTypes.Requireable<string>;
14
- secondary: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
15
- children: PropTypes.Requireable<NonNullable<PropTypes.ReactNodeLike>>;
16
- dimensions: PropTypes.Requireable<object>;
17
- };
18
- getConfiguration: any;
19
- render(): React.JSX.Element;
20
- }
21
- export default RawLayoutContents;