xmlui 0.10.15 → 0.10.18

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 (86) hide show
  1. package/dist/lib/{index-axjeT2uJ.mjs → index-Cy6Emsex.mjs} +3452 -1954
  2. package/dist/lib/index.css +1 -1
  3. package/dist/lib/{initMock-BoTWMs19.mjs → initMock-B-rmnC-t.mjs} +1 -1
  4. package/dist/lib/xmlui-parser.d.ts +1 -1
  5. package/dist/lib/xmlui.d.ts +4 -6
  6. package/dist/lib/xmlui.mjs +1 -1
  7. package/dist/metadata/{collectedComponentMetadata-CQywuPDB.mjs → collectedComponentMetadata-CB63ngkU.mjs} +3845 -2357
  8. package/dist/metadata/{initMock-Bi5kF5Af.mjs → initMock-D0wDKF_I.mjs} +1 -1
  9. package/dist/metadata/style.css +1 -1
  10. package/dist/metadata/xmlui-metadata.mjs +1 -1
  11. package/dist/metadata/xmlui-metadata.umd.js +3 -3
  12. package/dist/scripts/package.json +1 -1
  13. package/dist/scripts/src/components/Accordion/Accordion.spec.js +1 -1
  14. package/dist/scripts/src/components/Accordion/AccordionItemNative.js +1 -1
  15. package/dist/scripts/src/components/Animation/AnimationNative.js +5 -1
  16. package/dist/scripts/src/components/AutoComplete/AutoComplete.js +1 -5
  17. package/dist/scripts/src/components/AutoComplete/AutoComplete.spec.js +29 -0
  18. package/dist/scripts/src/components/AutoComplete/AutoCompleteContext.js +2 -0
  19. package/dist/scripts/src/components/AutoComplete/AutoCompleteNative.js +262 -62
  20. package/dist/scripts/src/components/Checkbox/Checkbox.js +1 -5
  21. package/dist/scripts/src/components/ColorPicker/ColorPicker.js +2 -6
  22. package/dist/scripts/src/components/ColorPicker/ColorPicker.spec.js +29 -0
  23. package/dist/scripts/src/components/ColorPicker/ColorPickerNative.js +12 -9
  24. package/dist/scripts/src/components/ComponentProvider.js +2 -0
  25. package/dist/scripts/src/components/DateInput/DateInput.js +1 -5
  26. package/dist/scripts/src/components/DateInput/DateInput.spec.js +29 -0
  27. package/dist/scripts/src/components/DateInput/DateInputNative.js +12 -16
  28. package/dist/scripts/src/components/DatePicker/DatePicker.js +1 -5
  29. package/dist/scripts/src/components/DatePicker/DatePicker.spec.js +29 -0
  30. package/dist/scripts/src/components/DatePicker/DatePickerNative.js +12 -13
  31. package/dist/scripts/src/components/FileInput/FileInput.js +1 -5
  32. package/dist/scripts/src/components/FileInput/FileInput.spec.js +29 -0
  33. package/dist/scripts/src/components/FileInput/FileInputNative.js +14 -15
  34. package/dist/scripts/src/components/Form/Form.spec.js +11 -9
  35. package/dist/scripts/src/components/Form/FormNative.js +41 -27
  36. package/dist/scripts/src/components/FormItem/FormItem.spec.js +179 -30
  37. package/dist/scripts/src/components/FormItem/FormItemNative.js +20 -22
  38. package/dist/scripts/src/components/FormItem/ItemWithLabel.js +8 -17
  39. package/dist/scripts/src/components/FormItem/Validations.js +25 -6
  40. package/dist/scripts/src/components/Icon/IconNative.js +18 -15
  41. package/dist/scripts/src/components/Input/PartialInput.js +2 -2
  42. package/dist/scripts/src/components/NestedApp/AppWithCodeViewNative.js +1 -1
  43. package/dist/scripts/src/components/NumberBox/NumberBox.js +5 -9
  44. package/dist/scripts/src/components/NumberBox/NumberBox.spec.js +142 -430
  45. package/dist/scripts/src/components/NumberBox/NumberBoxNative.js +33 -21
  46. package/dist/scripts/src/components/Option/Option.js +3 -1
  47. package/dist/scripts/src/components/RadioGroup/RadioGroup.js +1 -5
  48. package/dist/scripts/src/components/RadioGroup/RadioGroupNative.js +4 -5
  49. package/dist/scripts/src/components/RadioGroup/RadioItem.js +28 -0
  50. package/dist/scripts/src/components/Select/HiddenOption.js +1 -1
  51. package/dist/scripts/src/components/Select/Select.js +1 -5
  52. package/dist/scripts/src/components/Select/Select.spec.js +31 -3
  53. package/dist/scripts/src/components/Select/SelectNative.js +26 -32
  54. package/dist/scripts/src/components/Slider/Slider.js +1 -5
  55. package/dist/scripts/src/components/Slider/Slider.spec.js +75 -13
  56. package/dist/scripts/src/components/Slider/SliderNative.js +33 -24
  57. package/dist/scripts/src/components/Switch/Switch.js +1 -5
  58. package/dist/scripts/src/components/TextArea/TextArea.js +1 -5
  59. package/dist/scripts/src/components/TextArea/TextArea.spec.js +29 -0
  60. package/dist/scripts/src/components/TextArea/TextAreaNative.js +8 -29
  61. package/dist/scripts/src/components/TextBox/TextBox.spec.js +38 -7
  62. package/dist/scripts/src/components/TextBox/TextBoxNative.js +2 -2
  63. package/dist/scripts/src/components/TimeInput/TimeInput.spec.js +31 -0
  64. package/dist/scripts/src/components/Timer/Timer.spec.js +66 -96
  65. package/dist/scripts/src/components/Toggle/Toggle.js +28 -25
  66. package/dist/scripts/src/components/Tree/Tree-dynamic.spec.js +2894 -0
  67. package/dist/scripts/src/components/Tree/Tree-icons.spec.js +206 -0
  68. package/dist/scripts/src/components/Tree/Tree.spec.js +2839 -0
  69. package/dist/scripts/src/components/Tree/TreeComponent.js +303 -10
  70. package/dist/scripts/src/components/Tree/TreeNative.js +1090 -23
  71. package/dist/scripts/src/components/Tree/testData.js +296 -0
  72. package/dist/scripts/src/components-core/behaviors/Behavior.js +2 -0
  73. package/dist/scripts/src/components-core/behaviors/CoreBehaviors.js +8 -4
  74. package/dist/scripts/src/components-core/rendering/AppRoot.js +1 -2
  75. package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +13 -15
  76. package/dist/scripts/src/components-core/utils/treeUtils.js +190 -12
  77. package/dist/scripts/src/testing/ComponentDrivers.js +79 -7
  78. package/dist/scripts/src/testing/drivers/NumberBoxDriver.js +2 -2
  79. package/dist/scripts/src/testing/drivers/TreeDriver.js +13 -0
  80. package/dist/scripts/src/testing/fixtures.js +7 -2
  81. package/dist/standalone/xmlui-standalone.es.d.ts +4 -6
  82. package/dist/standalone/xmlui-standalone.umd.js +36 -36
  83. package/package.json +1 -1
  84. package/dist/scripts/src/components/Animation/Animation.js +0 -50
  85. package/dist/scripts/src/components-core/behaviors/BehaviorContext.js +0 -54
  86. package/dist/scripts/src/testing/drivers/SliderDriver.js +0 -20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "xmlui",
3
- "version": "0.10.15",
3
+ "version": "0.10.18",
4
4
  "sideEffects": false,
5
5
  "scripts": {
6
6
  "start-test-bed": "cd src/testing/infrastructure && xmlui start",
@@ -1,50 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.animationComponentRenderer = exports.AnimationMd = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const renderers_1 = require("../../components-core/renderers");
6
- const metadata_helpers_1 = require("../metadata-helpers");
7
- const AnimationNative_1 = require("./AnimationNative");
8
- const COMP = "Animation";
9
- exports.AnimationMd = (0, metadata_helpers_1.createMetadata)({
10
- status: "experimental",
11
- description: ``,
12
- props: {
13
- animation: {
14
- description: `The animation object to be applied to the component`,
15
- },
16
- animateWhenInView: {
17
- description: `Indicates whether the animation should start when the component is in view`,
18
- },
19
- duration: {
20
- description: `The duration of the animation in milliseconds`,
21
- },
22
- once: {
23
- description: `Indicates whether the animation should only run once`,
24
- defaultValue: AnimationNative_1.defaultProps.once,
25
- },
26
- reverse: {
27
- description: `Indicates whether the animation should run in reverse`,
28
- defaultValue: AnimationNative_1.defaultProps.reverse,
29
- },
30
- loop: {
31
- description: `Indicates whether the animation should loop`,
32
- defaultValue: AnimationNative_1.defaultProps.loop,
33
- },
34
- delay: {
35
- description: `The delay before the animation starts in milliseconds`,
36
- defaultValue: AnimationNative_1.defaultProps.delay,
37
- },
38
- },
39
- events: {
40
- started: { description: `Event fired when the animation starts` },
41
- stopped: { description: `Event fired when the animation stops` },
42
- },
43
- apis: {
44
- start: { description: `Starts the animation` },
45
- stop: { description: `Stops the animation` },
46
- },
47
- });
48
- exports.animationComponentRenderer = (0, renderers_1.createComponentRenderer)(COMP, exports.AnimationMd, ({ registerComponentApi, renderChild, node, extractValue, lookupEventHandler }) => {
49
- return ((0, jsx_runtime_1.jsx)(AnimationNative_1.Animation, { registerComponentApi: registerComponentApi, animation: extractValue(node.props.animation), onStop: lookupEventHandler("stopped"), onStart: lookupEventHandler("started"), duration: extractValue.asOptionalNumber(node.props.duration), animateWhenInView: extractValue.asOptionalBoolean(node.props.animateWhenInView), once: extractValue.asOptionalBoolean(node.props.once), reverse: extractValue.asOptionalBoolean(node.props.reverse), loop: extractValue.asOptionalBoolean(node.props.loop), delay: extractValue.asOptionalNumber(node.props.delay), children: renderChild(node.children) }));
50
- });
@@ -1,54 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useBehaviors = exports.BehaviorsProvider = void 0;
4
- const jsx_runtime_1 = require("react/jsx-runtime");
5
- const react_1 = require("react");
6
- const CoreBehaviors_1 = require("./CoreBehaviors");
7
- // --- Create the context with a default value
8
- const BehaviorContext = (0, react_1.createContext)(undefined);
9
- /**
10
- * A provider component that makes the behavior management system available to
11
- * its children.
12
- */
13
- const BehaviorsProvider = ({ children }) => {
14
- const behaviors = (0, react_1.useMemo)(() => new Map(), []);
15
- const getBehaviors = () => {
16
- return Array.from(behaviors.values());
17
- };
18
- const registerBehavior = (behavior) => {
19
- behaviors.set(behavior.name, behavior);
20
- };
21
- const unregisterBehavior = (name) => {
22
- behaviors.delete(name);
23
- };
24
- (0, react_1.useMemo)(() => {
25
- if (process.env.VITE_USED_BEHAVIORS_Animation !== "false") {
26
- registerBehavior(CoreBehaviors_1.animationBehavior);
27
- }
28
- if (process.env.VITE_USED_BEHAVIORS_Tooltip !== "false") {
29
- registerBehavior(CoreBehaviors_1.tooltipBehavior);
30
- }
31
- if (process.env.VITE_USED_BEHAVIORS_Label !== "false") {
32
- registerBehavior(CoreBehaviors_1.labelBehavior);
33
- }
34
- }, []);
35
- const contextValue = (0, react_1.useMemo)(() => ({
36
- behaviors,
37
- registerBehavior,
38
- unregisterBehavior,
39
- getBehaviors,
40
- }), [behaviors]);
41
- return ((0, jsx_runtime_1.jsx)(BehaviorContext.Provider, { value: contextValue, children: children }));
42
- };
43
- exports.BehaviorsProvider = BehaviorsProvider;
44
- /**
45
- * A custom hook to access the behavior context.
46
- */
47
- const useBehaviors = () => {
48
- const context = (0, react_1.useContext)(BehaviorContext);
49
- if (!context) {
50
- throw new Error("useBehaviors must be used within a BehaviorsProvider");
51
- }
52
- return context;
53
- };
54
- exports.useBehaviors = useBehaviors;
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SliderDriver = void 0;
4
- const ComponentDrivers_1 = require("../ComponentDrivers");
5
- const parts_1 = require("../../components-core/parts");
6
- class SliderDriver extends ComponentDrivers_1.InputComponentDriver {
7
- get input() {
8
- return this.getByPartName(parts_1.PART_INPUT);
9
- }
10
- get track() {
11
- return this.getByPartName(parts_1.PART_TRACK);
12
- }
13
- get range() {
14
- return this.getByPartName(parts_1.PART_RANGE);
15
- }
16
- get thumb() {
17
- return this.getByPartName(parts_1.PART_THUMB);
18
- }
19
- }
20
- exports.SliderDriver = SliderDriver;