@bpmn-io/properties-panel 0.8.1 → 0.10.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/assets/properties-panel.css +5 -17
  3. package/dist/index.esm.js +1610 -0
  4. package/dist/index.esm.js.map +1 -0
  5. package/dist/index.js +1651 -0
  6. package/dist/index.js.map +1 -0
  7. package/package.json +17 -7
  8. package/preact/LICENSE +21 -0
  9. package/preact/README.md +185 -0
  10. package/preact/compat/dist/compat.js +2 -0
  11. package/preact/compat/dist/compat.js.map +1 -0
  12. package/preact/compat/dist/compat.mjs +2 -0
  13. package/preact/compat/dist/compat.module.js +2 -0
  14. package/preact/compat/dist/compat.module.js.map +1 -0
  15. package/preact/compat/dist/compat.umd.js +2 -0
  16. package/preact/compat/dist/compat.umd.js.map +1 -0
  17. package/preact/compat/jsx-dev-runtime.js +1 -0
  18. package/preact/compat/jsx-dev-runtime.mjs +1 -0
  19. package/preact/compat/jsx-runtime.js +1 -0
  20. package/preact/compat/jsx-runtime.mjs +1 -0
  21. package/preact/compat/package.json +19 -0
  22. package/preact/compat/server.js +15 -0
  23. package/preact/compat/server.mjs +4 -0
  24. package/preact/compat/src/Children.js +21 -0
  25. package/preact/compat/src/PureComponent.js +15 -0
  26. package/preact/compat/src/forwardRef.js +51 -0
  27. package/preact/compat/src/index.d.ts +140 -0
  28. package/preact/compat/src/index.js +175 -0
  29. package/preact/compat/src/internal.d.ts +47 -0
  30. package/preact/compat/src/memo.js +34 -0
  31. package/preact/compat/src/portals.js +80 -0
  32. package/preact/compat/src/render.js +219 -0
  33. package/preact/compat/src/scheduler.js +24 -0
  34. package/preact/compat/src/suspense-list.d.ts +14 -0
  35. package/preact/compat/src/suspense-list.js +126 -0
  36. package/preact/compat/src/suspense.d.ts +15 -0
  37. package/preact/compat/src/suspense.js +270 -0
  38. package/preact/compat/src/util.js +28 -0
  39. package/preact/compat/test-utils.js +1 -0
  40. package/preact/debug/dist/debug.js +2 -0
  41. package/preact/debug/dist/debug.js.map +1 -0
  42. package/preact/debug/dist/debug.mjs +2 -0
  43. package/preact/debug/dist/debug.module.js +2 -0
  44. package/preact/debug/dist/debug.module.js.map +1 -0
  45. package/preact/debug/dist/debug.umd.js +2 -0
  46. package/preact/debug/dist/debug.umd.js.map +1 -0
  47. package/preact/debug/package.json +18 -0
  48. package/preact/debug/src/check-props.js +54 -0
  49. package/preact/debug/src/component-stack.js +146 -0
  50. package/preact/debug/src/constants.js +3 -0
  51. package/preact/debug/src/debug.js +442 -0
  52. package/preact/debug/src/index.js +6 -0
  53. package/preact/debug/src/internal.d.ts +82 -0
  54. package/preact/debug/src/util.js +11 -0
  55. package/preact/devtools/dist/devtools.js +2 -0
  56. package/preact/devtools/dist/devtools.js.map +1 -0
  57. package/preact/devtools/dist/devtools.mjs +2 -0
  58. package/preact/devtools/dist/devtools.module.js +2 -0
  59. package/preact/devtools/dist/devtools.module.js.map +1 -0
  60. package/preact/devtools/dist/devtools.umd.js +2 -0
  61. package/preact/devtools/dist/devtools.umd.js.map +1 -0
  62. package/preact/devtools/package.json +16 -0
  63. package/preact/devtools/src/devtools.js +10 -0
  64. package/preact/devtools/src/index.d.ts +8 -0
  65. package/preact/devtools/src/index.js +15 -0
  66. package/preact/dist/preact.js +2 -0
  67. package/preact/dist/preact.js.map +1 -0
  68. package/preact/dist/preact.min.js +2 -0
  69. package/preact/dist/preact.min.js.map +1 -0
  70. package/preact/dist/preact.mjs +2 -0
  71. package/preact/dist/preact.module.js +2 -0
  72. package/preact/dist/preact.module.js.map +1 -0
  73. package/preact/dist/preact.umd.js +2 -0
  74. package/preact/dist/preact.umd.js.map +1 -0
  75. package/preact/hooks/dist/hooks.js +2 -0
  76. package/preact/hooks/dist/hooks.js.map +1 -0
  77. package/preact/hooks/dist/hooks.mjs +2 -0
  78. package/preact/hooks/dist/hooks.module.js +2 -0
  79. package/preact/hooks/dist/hooks.module.js.map +1 -0
  80. package/preact/hooks/dist/hooks.umd.js +2 -0
  81. package/preact/hooks/dist/hooks.umd.js.map +1 -0
  82. package/preact/hooks/package.json +26 -0
  83. package/preact/hooks/src/index.d.ts +130 -0
  84. package/preact/hooks/src/index.js +386 -0
  85. package/preact/hooks/src/internal.d.ts +75 -0
  86. package/preact/jsx-runtime/dist/jsxRuntime.js +2 -0
  87. package/preact/jsx-runtime/dist/jsxRuntime.js.map +1 -0
  88. package/preact/jsx-runtime/dist/jsxRuntime.mjs +2 -0
  89. package/preact/jsx-runtime/dist/jsxRuntime.module.js +2 -0
  90. package/preact/jsx-runtime/dist/jsxRuntime.module.js.map +1 -0
  91. package/preact/jsx-runtime/dist/jsxRuntime.umd.js +2 -0
  92. package/preact/jsx-runtime/dist/jsxRuntime.umd.js.map +1 -0
  93. package/preact/jsx-runtime/package.json +19 -0
  94. package/preact/jsx-runtime/src/index.d.ts +50 -0
  95. package/preact/jsx-runtime/src/index.js +72 -0
  96. package/preact/package.json +268 -0
  97. package/preact/src/cjs.js +3 -0
  98. package/preact/src/clone-element.js +39 -0
  99. package/preact/src/component.js +225 -0
  100. package/preact/src/constants.js +3 -0
  101. package/preact/src/create-context.js +68 -0
  102. package/preact/src/create-element.js +100 -0
  103. package/preact/src/diff/catch-error.js +38 -0
  104. package/preact/src/diff/children.js +347 -0
  105. package/preact/src/diff/index.js +516 -0
  106. package/preact/src/diff/props.js +158 -0
  107. package/preact/src/index.d.ts +310 -0
  108. package/preact/src/index.js +13 -0
  109. package/preact/src/internal.d.ts +147 -0
  110. package/preact/src/jsx.d.ts +955 -0
  111. package/preact/src/options.js +17 -0
  112. package/preact/src/render.js +74 -0
  113. package/preact/src/util.js +23 -0
  114. package/preact/test-utils/dist/testUtils.js +2 -0
  115. package/preact/test-utils/dist/testUtils.js.map +1 -0
  116. package/preact/test-utils/dist/testUtils.mjs +2 -0
  117. package/preact/test-utils/dist/testUtils.module.js +2 -0
  118. package/preact/test-utils/dist/testUtils.module.js.map +1 -0
  119. package/preact/test-utils/dist/testUtils.umd.js +2 -0
  120. package/preact/test-utils/dist/testUtils.umd.js.map +1 -0
  121. package/preact/test-utils/package.json +19 -0
  122. package/preact/test-utils/src/index.d.ts +3 -0
  123. package/preact/test-utils/src/index.js +117 -0
  124. package/lib/PropertiesPanel.js +0 -126
  125. package/lib/PropertiesPanel.js.map +0 -1
  126. package/lib/components/DropdownButton.js +0 -109
  127. package/lib/components/DropdownButton.js.map +0 -1
  128. package/lib/components/Group.js +0 -75
  129. package/lib/components/Group.js.map +0 -1
  130. package/lib/components/Header.js +0 -49
  131. package/lib/components/Header.js.map +0 -1
  132. package/lib/components/HeaderButton.js +0 -16
  133. package/lib/components/HeaderButton.js.map +0 -1
  134. package/lib/components/ListGroup.js +0 -167
  135. package/lib/components/ListGroup.js.map +0 -1
  136. package/lib/components/ListItem.js +0 -37
  137. package/lib/components/ListItem.js.map +0 -1
  138. package/lib/components/entries/Checkbox.js +0 -81
  139. package/lib/components/entries/Checkbox.js.map +0 -1
  140. package/lib/components/entries/Collapsible.js +0 -48
  141. package/lib/components/entries/Collapsible.js.map +0 -1
  142. package/lib/components/entries/List.js +0 -204
  143. package/lib/components/entries/List.js.map +0 -1
  144. package/lib/components/entries/NumberField.js +0 -108
  145. package/lib/components/entries/NumberField.js.map +0 -1
  146. package/lib/components/entries/Select.js +0 -107
  147. package/lib/components/entries/Select.js.map +0 -1
  148. package/lib/components/entries/Simple.js +0 -56
  149. package/lib/components/entries/Simple.js.map +0 -1
  150. package/lib/components/entries/TextArea.js +0 -96
  151. package/lib/components/entries/TextArea.js.map +0 -1
  152. package/lib/components/entries/TextField.js +0 -121
  153. package/lib/components/entries/TextField.js.map +0 -1
  154. package/lib/components/entries/ToggleSwitch.js +0 -87
  155. package/lib/components/entries/ToggleSwitch.js.map +0 -1
  156. package/lib/components/icons/index.js +0 -51
  157. package/lib/components/icons/index.js.map +0 -1
  158. package/lib/context/LayoutContext.js +0 -9
  159. package/lib/context/LayoutContext.js.map +0 -1
  160. package/lib/context/index.js +0 -2
  161. package/lib/context/index.js.map +0 -1
  162. package/lib/features/debounce-input/debounceInput.js +0 -14
  163. package/lib/features/debounce-input/debounceInput.js.map +0 -1
  164. package/lib/features/debounce-input/index.js +0 -5
  165. package/lib/features/debounce-input/index.js.map +0 -1
  166. package/lib/hooks/index.js +0 -4
  167. package/lib/hooks/index.js.map +0 -1
  168. package/lib/hooks/useKeyFactory.js +0 -39
  169. package/lib/hooks/useKeyFactory.js.map +0 -1
  170. package/lib/hooks/useLayoutState.js +0 -36
  171. package/lib/hooks/useLayoutState.js.map +0 -1
  172. package/lib/hooks/usePrevious.js +0 -16
  173. package/lib/hooks/usePrevious.js.map +0 -1
  174. package/lib/index.js +0 -2
  175. package/lib/index.js.map +0 -1
@@ -1,121 +0,0 @@
1
- import { useEffect, useMemo, useState } from 'preact/hooks';
2
- import classnames from 'classnames';
3
- import { usePrevious } from '../../hooks';
4
- import { jsx as _jsx } from "preact/jsx-runtime";
5
- import { jsxs as _jsxs } from "preact/jsx-runtime";
6
-
7
- function Textfield(props) {
8
- const {
9
- debounce,
10
- disabled = false,
11
- id,
12
- label,
13
- onInput,
14
- value = ''
15
- } = props;
16
- const handleInput = useMemo(() => {
17
- return debounce(({
18
- target
19
- }) => onInput(target.value.length ? target.value : undefined));
20
- }, [onInput, debounce]);
21
- return _jsxs("div", {
22
- class: "bio-properties-panel-textfield",
23
- children: [_jsx("label", {
24
- for: prefixId(id),
25
- class: "bio-properties-panel-label",
26
- children: label
27
- }), _jsx("input", {
28
- id: prefixId(id),
29
- type: "text",
30
- name: id,
31
- spellCheck: "false",
32
- autoComplete: "off",
33
- disabled: disabled,
34
- class: "bio-properties-panel-input",
35
- onInput: handleInput,
36
- onFocus: props.onFocus,
37
- onBlur: props.onBlur,
38
- value: value || ''
39
- })]
40
- });
41
- }
42
- /**
43
- * @param {Object} props
44
- * @param {Object} props.element
45
- * @param {String} props.id
46
- * @param {String} props.description
47
- * @param {Boolean} props.debounce
48
- * @param {Boolean} props.disabled
49
- * @param {String} props.label
50
- * @param {Function} props.getValue
51
- * @param {Function} props.setValue
52
- * @param {Function} props.validate
53
- */
54
-
55
-
56
- export default function TextfieldEntry(props) {
57
- const {
58
- element,
59
- id,
60
- description,
61
- debounce,
62
- disabled,
63
- label,
64
- getValue,
65
- setValue,
66
- validate
67
- } = props;
68
- const [error, setError] = useState(null);
69
- const [invalidValueCache, setInvalidValueCache] = useState(null);
70
- let value = getValue(element);
71
- const prevValue = usePrevious(value); // validate again when value prop changed
72
-
73
- useEffect(() => {
74
- const err = validate ? validate(value) : null;
75
- setError(err);
76
- }, [value]); // validate on change
77
-
78
- const handleChange = newValue => {
79
- const err = validate ? validate(newValue) : null;
80
-
81
- if (err) {
82
- setInvalidValueCache(newValue);
83
- } else {
84
- setValue(newValue);
85
- }
86
-
87
- setError(err);
88
- }; // keep showing invalid value on errors, although it was not set
89
-
90
-
91
- if (prevValue === value && error) {
92
- value = invalidValueCache;
93
- }
94
-
95
- return _jsxs("div", {
96
- class: classnames('bio-properties-panel-entry', error ? 'has-error' : ''),
97
- "data-entry-id": id,
98
- children: [_jsx(Textfield, {
99
- id: id,
100
- label: label,
101
- value: value,
102
- onInput: handleChange,
103
- debounce: debounce,
104
- disabled: disabled
105
- }), description && _jsx("div", {
106
- class: "bio-properties-panel-description",
107
- children: description
108
- }), error && _jsx("div", {
109
- class: "bio-properties-panel-error",
110
- children: error
111
- })]
112
- });
113
- }
114
- export function isEdited(node) {
115
- return node && !!node.value;
116
- } // helpers /////////////////
117
-
118
- function prefixId(id) {
119
- return `bio-properties-panel-${id}`;
120
- }
121
- //# sourceMappingURL=TextField.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/entries/TextField.js"],"names":["useEffect","useMemo","useState","classnames","usePrevious","Textfield","props","debounce","disabled","id","label","onInput","value","handleInput","target","length","undefined","prefixId","onFocus","onBlur","TextfieldEntry","element","description","getValue","setValue","validate","error","setError","invalidValueCache","setInvalidValue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IAAA,KAAK,EAAGzB,UAAU,CACrB,4BADqB,EAErBuB,KAAK,GAAG,WAAH,GAAiB,EAFD,CAAvB;AAGE,qBAAgBjB,EAHlB;AAAA,eAIE,KAAC,SAAD;AAAW,MAAA,EAAE,EAAGA,EAAhB;AAAqB,MAAA,KAAK,EAAGC,KAA7B;AAAqC,MAAA,KAAK,EAAGE,KAA7C;AAAqD,MAAA,OAAO,EAAGoB,YAA/D;AAA8E,MAAA,QAAQ,EAAGzB,QAAzF;AAAoG,MAAA,QAAQ,EAAGC;AAA/G,MAJF,EAKIc,WAAW,IAAI;AAAK,MAAA,KAAK,EAAC,kCAAX;AAAA,gBAAgDA;AAAhD,MALnB,EAMII,KAAK,IAAI;AAAK,MAAA,KAAK,EAAC,4BAAX;AAAA,gBAA0CA;AAA1C,MANb;AAAA,IADF;AAUD;AAED,OAAO,SAASQ,QAAT,CAAkBC,IAAlB,EAAwB;AAC7B,SAAOA,IAAI,IAAI,CAAC,CAACA,IAAI,CAACvB,KAAtB;AACD,C,CAGD;;AAEA,SAASK,QAAT,CAAkBR,EAAlB,EAAsB;AACpB,SAAQ,wBAAwBA,EAAI,EAApC;AACD","sourcesContent":["import {\n useEffect,\n useMemo,\n useState\n} from 'preact/hooks';\n\nimport classnames from 'classnames';\n\nimport {\n usePrevious\n} from '../../hooks';\n\n\nfunction Textfield(props) {\n\n const {\n debounce,\n disabled = false,\n id,\n label,\n onInput,\n value = ''\n } = props;\n\n const handleInput = useMemo(() => {\n return debounce(({ target }) => onInput(target.value.length ? target.value : undefined));\n }, [ onInput, debounce ]);\n\n return (\n <div class=\"bio-properties-panel-textfield\">\n <label for={ prefixId(id) } class=\"bio-properties-panel-label\">{ label }</label>\n <input\n id={ prefixId(id) }\n type=\"text\"\n name={ id }\n spellCheck=\"false\"\n autoComplete=\"off\"\n disabled={ disabled }\n class=\"bio-properties-panel-input\"\n onInput={ handleInput }\n onFocus={ props.onFocus }\n onBlur={ props.onBlur }\n value={ value || '' } />\n </div>\n );\n}\n\n/**\n * @param {Object} props\n * @param {Object} props.element\n * @param {String} props.id\n * @param {String} props.description\n * @param {Boolean} props.debounce\n * @param {Boolean} props.disabled\n * @param {String} props.label\n * @param {Function} props.getValue\n * @param {Function} props.setValue\n * @param {Function} props.validate\n */\nexport default function TextfieldEntry(props) {\n const {\n element,\n id,\n description,\n debounce,\n disabled,\n label,\n getValue,\n setValue,\n validate\n } = props;\n\n const [ error, setError ] = useState(null);\n const [ invalidValueCache, setInvalidValueCache ] = useState(null);\n\n let value = getValue(element);\n const prevValue = usePrevious(value);\n\n // validate again when value prop changed\n useEffect(() => {\n const err = validate ? validate(value) : null;\n setError(err);\n }, [ value ]);\n\n // validate on change\n const handleChange = (newValue) => {\n const err = validate ? validate(newValue) : null;\n\n if (err) {\n setInvalidValueCache(newValue);\n } else {\n setValue(newValue);\n }\n\n setError(err);\n };\n\n // keep showing invalid value on errors, although it was not set\n if (prevValue === value && error) {\n value = invalidValueCache;\n }\n\n return (\n <div class={ classnames(\n 'bio-properties-panel-entry',\n error ? 'has-error' : '')\n } data-entry-id={ id }>\n <Textfield id={ id } label={ label } value={ value } onInput={ handleChange } debounce={ debounce } disabled={ disabled } />\n { description && <div class=\"bio-properties-panel-description\">{ description }</div> }\n { error && <div class=\"bio-properties-panel-error\">{ error }</div> }\n </div>\n );\n}\n\nexport function isEdited(node) {\n return node && !!node.value;\n}\n\n\n// helpers /////////////////\n\nfunction prefixId(id) {\n return `bio-properties-panel-${ id }`;\n}\n"],"file":"TextField.js"}
@@ -1,87 +0,0 @@
1
- import { jsx as _jsx } from "preact/jsx-runtime";
2
- import { jsxs as _jsxs } from "preact/jsx-runtime";
3
-
4
- function ToggleSwitch(props) {
5
- const {
6
- id,
7
- label,
8
- onInput,
9
- value,
10
- switcherLabel
11
- } = props;
12
-
13
- const handleInput = async () => {
14
- onInput(!value);
15
- };
16
-
17
- return _jsxs("div", {
18
- class: "bio-properties-panel-toggle-switch",
19
- children: [_jsx("label", {
20
- class: "bio-properties-panel-label",
21
- for: prefixId(id),
22
- children: label
23
- }), _jsxs("div", {
24
- class: "bio-properties-panel-field-wrapper",
25
- children: [_jsxs("label", {
26
- class: "bio-properties-panel-toggle-switch__switcher",
27
- children: [_jsx("input", {
28
- id: prefixId(id),
29
- class: "bio-properties-panel-input",
30
- type: "checkbox",
31
- name: id,
32
- onInput: handleInput,
33
- checked: value
34
- }), _jsx("span", {
35
- class: "bio-properties-panel-toggle-switch__slider"
36
- })]
37
- }), _jsx("p", {
38
- class: "bio-properties-panel-toggle-switch__label",
39
- children: switcherLabel
40
- })]
41
- })]
42
- });
43
- }
44
- /**
45
- * @param {Object} props
46
- * @param {String} props.id
47
- * @param {String} props.description
48
- * @param {String} props.label
49
- * @param {String} props.switcherLabel
50
- * @param {Function} props.getValue
51
- * @param {Function} props.setValue
52
- */
53
-
54
-
55
- export default function ToggleSwitchEntry(props) {
56
- const {
57
- id,
58
- description,
59
- label,
60
- switcherLabel,
61
- getValue,
62
- setValue
63
- } = props;
64
- const value = getValue();
65
- return _jsxs("div", {
66
- class: "bio-properties-panel-entry bio-properties-panel-toggle-switch-entry",
67
- "data-entry-id": id,
68
- children: [_jsx(ToggleSwitch, {
69
- id: id,
70
- label: label,
71
- value: value,
72
- onInput: setValue,
73
- switcherLabel: switcherLabel
74
- }), description && _jsx("div", {
75
- class: "bio-properties-panel-description",
76
- children: description
77
- })]
78
- });
79
- }
80
- export function isEdited(node) {
81
- return node && !!node.checked;
82
- } // helpers /////////////////
83
-
84
- function prefixId(id) {
85
- return `bio-properties-panel-${id}`;
86
- }
87
- //# sourceMappingURL=ToggleSwitch.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/components/entries/ToggleSwitch.js"],"names":["ToggleSwitch","props","id","label","onInput","value","switcherLabel","handleInput","prefixId","ToggleSwitchEntry","description","getValue","setValue","isEdited","node","checked"],"mappings":";;;AAAA,SAASA,YAAT,CAAsBC,KAAtB,EAA6B;AAC3B,QAAM;AACJC,IAAAA,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AwC,MAAA,KAAK,EAAGE,KAAhD;AAAwD,MAAA,OAAO,EAAGO,QAAlE;AAA6E,MAAA,aAAa,EAAGN;AAA7F,MADF,EAEII,WAAW,IAAI;AAAK,MAAA,KAAK,EAAC,kCAAX;AAAA,gBAAgDA;AAAhD,MAFnB;AAAA,IADF;AAMD;AAED,OAAO,SAASG,QAAT,CAAkBC,IAAlB,EAAwB;AAC7B,SAAOA,IAAI,IAAI,CAAC,CAACA,IAAI,CAACC,OAAtB;AACD,C,CAGD;;AAEA,SAASP,QAAT,CAAkBN,EAAlB,EAAsB;AACpB,SAAQ,wBAAwBA,EAAI,EAApC;AACD","sourcesContent":["function ToggleSwitch(props) {\n const {\n id,\n label,\n onInput,\n value,\n switcherLabel\n } = props;\n\n const handleInput = async () => {\n onInput(!value);\n };\n\n return (\n <div class=\"bio-properties-panel-toggle-switch\">\n <label class=\"bio-properties-panel-label\"\n for={ prefixId(id) }>\n { label }\n </label>\n <div class=\"bio-properties-panel-field-wrapper\">\n <label class=\"bio-properties-panel-toggle-switch__switcher\">\n <input\n id={ prefixId(id) }\n class=\"bio-properties-panel-input\"\n type=\"checkbox\"\n name={ id }\n onInput={ handleInput }\n checked={ value } />\n <span class=\"bio-properties-panel-toggle-switch__slider\" />\n </label>\n <p class=\"bio-properties-panel-toggle-switch__label\">{ switcherLabel }</p>\n </div>\n </div>\n );\n}\n\n/**\n * @param {Object} props\n * @param {String} props.id\n * @param {String} props.description\n * @param {String} props.label\n * @param {String} props.switcherLabel\n * @param {Function} props.getValue\n * @param {Function} props.setValue\n */\nexport default function ToggleSwitchEntry(props) {\n const {\n id,\n description,\n label,\n switcherLabel,\n getValue,\n setValue\n } = props;\n\n const value = getValue();\n return (\n <div class=\"bio-properties-panel-entry bio-properties-panel-toggle-switch-entry\" data-entry-id={ id }>\n <ToggleSwitch id={ id } label={ label } value={ value } onInput={ setValue } switcherLabel={ switcherLabel } />\n { description && <div class=\"bio-properties-panel-description\">{ description }</div> }\n </div>\n );\n}\n\nexport function isEdited(node) {\n return node && !!node.checked;\n}\n\n\n// helpers /////////////////\n\nfunction prefixId(id) {\n return `bio-properties-panel-${ id }`;\n}\n"],"file":"ToggleSwitch.js"}
@@ -1,51 +0,0 @@
1
- import React from "react";
2
- import { jsx as _jsx } from "preact/jsx-runtime";
3
-
4
- var ArrowIcon = function ArrowIcon(props) {
5
- return _jsx("svg", { ...props,
6
- children: _jsx("path", {
7
- fillRule: "evenodd",
8
- d: "m11.657 8-4.95 4.95a1 1 0 0 1-1.414-1.414L8.828 8 5.293 4.464A1 1 0 1 1 6.707 3.05L11.657 8z"
9
- })
10
- });
11
- };
12
-
13
- ArrowIcon.defaultProps = {
14
- xmlns: "http://www.w3.org/2000/svg",
15
- width: "16",
16
- height: "16"
17
- };
18
- export { ArrowIcon };
19
-
20
- var CreateIcon = function CreateIcon(props) {
21
- return _jsx("svg", { ...props,
22
- children: _jsx("path", {
23
- fillRule: "evenodd",
24
- d: "M9 13V9h4a1 1 0 0 0 0-2H9V3a1 1 0 1 0-2 0v4H3a1 1 0 1 0 0 2h4v4a1 1 0 0 0 2 0z"
25
- })
26
- });
27
- };
28
-
29
- CreateIcon.defaultProps = {
30
- xmlns: "http://www.w3.org/2000/svg",
31
- width: "16",
32
- height: "16"
33
- };
34
- export { CreateIcon };
35
-
36
- var DeleteIcon = function DeleteIcon(props) {
37
- return _jsx("svg", { ...props,
38
- children: _jsx("path", {
39
- fillRule: "evenodd",
40
- d: "M12 6v7c0 1.1-.4 1.55-1.5 1.55h-5C4.4 14.55 4 14.1 4 13V6h8zm-1.5 1.5h-5v4.3c0 .66.5 1.2 1.111 1.2H9.39c.611 0 1.111-.54 1.111-1.2V7.5zM13 3h-2l-1-1H6L5 3H3v1.5h10V3z"
41
- })
42
- });
43
- };
44
-
45
- DeleteIcon.defaultProps = {
46
- xmlns: "http://www.w3.org/2000/svg",
47
- width: "16",
48
- height: "16"
49
- };
50
- export { DeleteIcon };
51
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","sourcesContent":[],"file":"index.js"}
@@ -1,9 +0,0 @@
1
- import { createContext } from 'preact';
2
- const LayoutContext = createContext({
3
- layout: {},
4
- setLayout: () => {},
5
- getLayoutForKey: () => {},
6
- setLayoutForKey: () => {}
7
- });
8
- export default LayoutContext;
9
- //# sourceMappingURL=LayoutContext.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/context/LayoutContext.js"],"names":["createContext","LayoutContext","layout","setLayout","getLayoutForKey","setLayoutForKey"],"mappings":"AAAA,SACEA,aADF,QAEO,QAFP;AAIA,MAAMC,aAAa,GAAGD,aAAa,CAAC;AAClCE,EAAAA,MAAM,EAAE,EAD0B;AAElCC,EAAAA,SAAS,EAAE,MAAM,CAAE,CAFe;AAGlCC,EAAAA,eAAe,EAAE,MAAM,CAAE,CAHS;AAIlCC,EAAAA,eAAe,EAAE,MAAM,CAAE;AAJS,CAAD,CAAnC;AAOA,eAAeJ,aAAf","sourcesContent":["import {\n createContext\n} from 'preact';\n\nconst LayoutContext = createContext({\n layout: {},\n setLayout: () => {},\n getLayoutForKey: () => {},\n setLayoutForKey: () => {}\n});\n\nexport default LayoutContext;"],"file":"LayoutContext.js"}
@@ -1,2 +0,0 @@
1
- export { default as LayoutContext } from './LayoutContext';
2
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/context/index.js"],"names":["default","LayoutContext"],"mappings":"AAAA,SAASA,OAAO,IAAIC,aAApB,QAAyC,iBAAzC","sourcesContent":["export { default as LayoutContext } from './LayoutContext';"],"file":"index.js"}
@@ -1,14 +0,0 @@
1
- import { debounce, isNumber } from 'min-dash';
2
- const DEFAULT_DEBOUNCE_TIME = 300;
3
- export default function debounceInput(debounceDelay) {
4
- return function _debounceInput(fn) {
5
- if (debounceDelay !== false) {
6
- var debounceTime = isNumber(debounceDelay) ? debounceDelay : DEFAULT_DEBOUNCE_TIME;
7
- return debounce(fn, debounceTime);
8
- } else {
9
- return fn;
10
- }
11
- };
12
- }
13
- debounceInput.$inject = ['config.debounceInput'];
14
- //# sourceMappingURL=debounceInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/features/debounce-input/debounceInput.js"],"names":["debounce","isNumber","DEFAULT_DEBOUNCE_TIME","debounceInput","debounceDelay","_debounceInput","fn","debounceTime","$inject"],"mappings":"AAAA,SACEA,QADF,EAEEC,QAFF,QAGO,UAHP;AAKA,MAAMC,qBAAqB,GAAG,GAA9B;AAEA,eAAe,SAASC,aAAT,CAAuBC,aAAvB,EAAsC;AACnD,SAAO,SAASC,cAAT,CAAwBC,EAAxB,EAA4B;AACjC,QAAIF,aAAa,KAAK,KAAtB,EAA6B;AAE3B,UAAIG,YAAY,GACdN,QAAQ,CAACG,aAAD,CAAR,GACEA,aADF,GAEEF,qBAHJ;AAKA,aAAOF,QAAQ,CAACM,EAAD,EAAKC,YAAL,CAAf;AACD,KARD,MAQO;AACL,aAAOD,EAAP;AACD;AACF,GAZD;AAaD;AAEDH,aAAa,CAACK,OAAd,GAAwB,CAAE,sBAAF,CAAxB","sourcesContent":["import {\n debounce,\n isNumber\n} from 'min-dash';\n\nconst DEFAULT_DEBOUNCE_TIME = 300;\n\nexport default function debounceInput(debounceDelay) {\n return function _debounceInput(fn) {\n if (debounceDelay !== false) {\n\n var debounceTime =\n isNumber(debounceDelay) ?\n debounceDelay :\n DEFAULT_DEBOUNCE_TIME;\n\n return debounce(fn, debounceTime);\n } else {\n return fn;\n }\n };\n}\n\ndebounceInput.$inject = [ 'config.debounceInput' ];\n"],"file":"debounceInput.js"}
@@ -1,5 +0,0 @@
1
- import debounceInput from './debounceInput';
2
- export default {
3
- debounceInput: ['factory', debounceInput]
4
- };
5
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../../src/features/debounce-input/index.js"],"names":["debounceInput"],"mappings":"AAAA,OAAOA,aAAP,MAA0B,iBAA1B;AAEA,eAAe;AACbA,EAAAA,aAAa,EAAE,CAAE,SAAF,EAAaA,aAAb;AADF,CAAf","sourcesContent":["import debounceInput from './debounceInput';\n\nexport default {\n debounceInput: [ 'factory', debounceInput ]\n};\n"],"file":"index.js"}
@@ -1,4 +0,0 @@
1
- export { default as usePrevious } from './usePrevious';
2
- export { useKeyFactory } from './useKeyFactory';
3
- export { useLayoutState } from './useLayoutState';
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/index.js"],"names":["default","usePrevious","useKeyFactory","useLayoutState"],"mappings":"AAAA,SAASA,OAAO,IAAIC,WAApB,QAAuC,eAAvC;AACA,SAASC,aAAT,QAA8B,iBAA9B;AACA,SAASC,cAAT,QAA+B,kBAA/B","sourcesContent":["export { default as usePrevious } from './usePrevious';\nexport { useKeyFactory } from './useKeyFactory';\nexport { useLayoutState } from './useLayoutState';"],"file":"index.js"}
@@ -1,39 +0,0 @@
1
- import { useMemo } from 'preact/hooks';
2
- const KEY_LENGTH = 6;
3
- /**
4
- * Create a persistent key factory for plain objects without id.
5
- *
6
- * @example
7
- * ```jsx
8
- * function List({ objects }) {
9
- * const getKey = useKeyFactory();
10
- * return (<ol>{
11
- * objects.map(obj => {
12
- * const key = getKey(obj);
13
- * return <li key={key}>obj.name</li>
14
- * })
15
- * }</ol>);
16
- * }
17
- * ```
18
- *
19
- * @param {any[]} dependencies
20
- * @returns {(element: object) => string}
21
- */
22
-
23
- export function useKeyFactory(dependencies = []) {
24
- const map = useMemo(() => new Map(), dependencies);
25
-
26
- const getKey = el => {
27
- let key = map.get(el);
28
-
29
- if (!key) {
30
- key = Math.random().toString().slice(-KEY_LENGTH);
31
- map.set(el, key);
32
- }
33
-
34
- return key;
35
- };
36
-
37
- return getKey;
38
- }
39
- //# sourceMappingURL=useKeyFactory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/useKeyFactory.js"],"names":["useMemo","KEY_LENGTH","useKeyFactory","dependencies","map","Map","getKey","el","key","get","Math","random","toString","slice","set"],"mappings":"AAAA,SAASA,OAAT,QAAwB,cAAxB;AAEA,MAAMC,UAAU,GAAG,CAAnB;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,aAAT,CAAuBC,YAAY,GAAG,EAAtC,EAA0C;AAC/C,QAAMC,GAAG,GAAGJ,OAAO,CAAC,MAAM,IAAIK,GAAJ,EAAP,EAAkBF,YAAlB,CAAnB;;AAEA,QAAMG,MAAM,GAAGC,EAAE,IAAI;AACnB,QAAIC,GAAG,GAAGJ,GAAG,CAACK,GAAJ,CAAQF,EAAR,CAAV;;AAEA,QAAI,CAACC,GAAL,EAAU;AACRA,MAAAA,GAAG,GAAGE,IAAI,CAACC,MAAL,GAAcC,QAAd,GAAyBC,KAAzB,CAA+B,CAACZ,UAAhC,CAAN;AACAG,MAAAA,GAAG,CAACU,GAAJ,CAAQP,EAAR,EAAYC,GAAZ;AACD;;AAED,WAAOA,GAAP;AACD,GATD;;AAWA,SAAOF,MAAP;AACD","sourcesContent":["import { useMemo } from 'preact/hooks';\n\nconst KEY_LENGTH = 6;\n\n/**\n * Create a persistent key factory for plain objects without id.\n *\n * @example\n * ```jsx\n * function List({ objects }) {\n * const getKey = useKeyFactory();\n * return (<ol>{\n * objects.map(obj => {\n * const key = getKey(obj);\n * return <li key={key}>obj.name</li>\n * })\n * }</ol>);\n * }\n * ```\n *\n * @param {any[]} dependencies\n * @returns {(element: object) => string}\n */\nexport function useKeyFactory(dependencies = []) {\n const map = useMemo(() => new Map(), dependencies);\n\n const getKey = el => {\n let key = map.get(el);\n\n if (!key) {\n key = Math.random().toString().slice(-KEY_LENGTH);\n map.set(el, key);\n }\n\n return key;\n };\n\n return getKey;\n}\n"],"file":"useKeyFactory.js"}
@@ -1,36 +0,0 @@
1
- import { useContext, useState } from 'preact/hooks';
2
- import { LayoutContext } from '../context';
3
- /**
4
- * Creates a state that persists in the global LayoutContext.
5
- *
6
- * @example
7
- * ```jsx
8
- * function Group(props) {
9
- * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);
10
- * }
11
- * ```
12
- *
13
- * @param {(string|number)[]} path
14
- * @param {any} [defaultValue]
15
- *
16
- * @returns {[ any, Function ]}
17
- */
18
-
19
- export function useLayoutState(path, defaultValue) {
20
- const {
21
- getLayoutForKey,
22
- setLayoutForKey
23
- } = useContext(LayoutContext);
24
- const layoutForKey = getLayoutForKey(path, defaultValue);
25
- const [value, set] = useState(layoutForKey);
26
-
27
- const setState = newValue => {
28
- // (1) set component state
29
- set(newValue); // (2) set context
30
-
31
- setLayoutForKey(path, newValue);
32
- };
33
-
34
- return [value, setState];
35
- }
36
- //# sourceMappingURL=useLayoutState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/useLayoutState.js"],"names":["useContext","useState","LayoutContext","useLayoutState","path","defaultValue","getLayoutForKey","setLayoutForKey","layoutForKey","value","set","setState","newValue"],"mappings":"AAAA,SACEA,UADF,EAEEC,QAFF,QAGO,cAHP;AAKA,SACEC,aADF,QAEO,YAFP;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AACA,OAAO,SAASC,cAAT,CAAwBC,IAAxB,EAA8BC,YAA9B,EAA4C;AACjD,QAAM;AACJC,IAAAA,eADI;AAEJC,IAAAA;AAFI,MAGFP,UAAU,CAACE,aAAD,CAHd;AAKA,QAAMM,YAAY,GAAGF,eAAe,CAACF,IAAD,EAAOC,YAAP,CAApC;AACA,QAAM,CAAEI,KAAF,EAASC,GAAT,IAAiBT,QAAQ,CAACO,YAAD,CAA/B;;AAEA,QAAMG,QAAQ,GAAIC,QAAD,IAAc;AAE7B;AACAF,IAAAA,GAAG,CAACE,QAAD,CAAH,CAH6B,CAK7B;;AACAL,IAAAA,eAAe,CAACH,IAAD,EAAOQ,QAAP,CAAf;AACD,GAPD;;AASA,SAAO,CAAEH,KAAF,EAASE,QAAT,CAAP;AACD","sourcesContent":["import {\n useContext,\n useState\n} from 'preact/hooks';\n\nimport {\n LayoutContext\n} from '../context';\n\n/**\n * Creates a state that persists in the global LayoutContext.\n *\n * @example\n * ```jsx\n * function Group(props) {\n * const [ open, setOpen ] = useLayoutState([ 'groups', 'foo', 'open' ], false);\n * }\n * ```\n *\n * @param {(string|number)[]} path\n * @param {any} [defaultValue]\n *\n * @returns {[ any, Function ]}\n */\nexport function useLayoutState(path, defaultValue) {\n const {\n getLayoutForKey,\n setLayoutForKey\n } = useContext(LayoutContext);\n\n const layoutForKey = getLayoutForKey(path, defaultValue);\n const [ value, set ] = useState(layoutForKey);\n\n const setState = (newValue) => {\n\n // (1) set component state\n set(newValue);\n\n // (2) set context\n setLayoutForKey(path, newValue);\n };\n\n return [ value, setState ];\n}\n"],"file":"useLayoutState.js"}
@@ -1,16 +0,0 @@
1
- import { useEffect, useRef } from 'preact/hooks';
2
- /**
3
- * @pinussilvestrus: we need to introduce our own hook to persist the previous
4
- * state on updates.
5
- *
6
- * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state
7
- */
8
-
9
- export default function usePrevious(value) {
10
- const ref = useRef();
11
- useEffect(() => {
12
- ref.current = value;
13
- });
14
- return ref.current;
15
- }
16
- //# sourceMappingURL=usePrevious.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../../src/hooks/usePrevious.js"],"names":["useEffect","useRef","usePrevious","value","ref","current"],"mappings":"AAAA,SACEA,SADF,EAEEC,MAFF,QAGO,cAHP;AAKA;AACA;AACA;AACA;AACA;AACA;;AAEA,eAAe,SAASC,WAAT,CAAqBC,KAArB,EAA4B;AACzC,QAAMC,GAAG,GAAGH,MAAM,EAAlB;AACAD,EAAAA,SAAS,CAAC,MAAM;AACdI,IAAAA,GAAG,CAACC,OAAJ,GAAcF,KAAd;AACD,GAFQ,CAAT;AAGA,SAAOC,GAAG,CAACC,OAAX;AACD","sourcesContent":["import {\n useEffect,\n useRef\n} from 'preact/hooks';\n\n/**\n * @pinussilvestrus: we need to introduce our own hook to persist the previous\n * state on updates.\n *\n * cf. https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state\n */\n\nexport default function usePrevious(value) {\n const ref = useRef();\n useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n}"],"file":"usePrevious.js"}
package/lib/index.js DELETED
@@ -1,2 +0,0 @@
1
- export { default } from './PropertiesPanel';
2
- //# sourceMappingURL=index.js.map
package/lib/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.js"],"names":["default"],"mappings":"AAAA,SAASA,OAAT,QAAwB,mBAAxB","sourcesContent":["export { default } from './PropertiesPanel';"],"file":"index.js"}