@singularsystems/neo-react 1.0.7 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/Modules/Types.d.ts
CHANGED
|
@@ -4,9 +4,9 @@ import { RoutingState } from '../Routing/RoutingState';
|
|
|
4
4
|
import Slider, { Range } from 'rc-slider';
|
|
5
5
|
import { SketchPicker } from 'react-color';
|
|
6
6
|
import { IColorPicker } from '../ReactComponents/IColorPicker';
|
|
7
|
-
import AsyncSelect from 'react-select/async';
|
|
7
|
+
import type AsyncSelect from 'react-select/async';
|
|
8
8
|
import { AxiosStatic } from 'axios';
|
|
9
|
-
import Select from 'react-select';
|
|
9
|
+
import type Select from 'react-select';
|
|
10
10
|
import { IDisposeHelper } from '../Services/IDisposeHelper';
|
|
11
11
|
import { IIconFactory } from '../ReactComponents/Icons/IIconFactory';
|
|
12
12
|
declare const NeoReactTypes: {
|
|
@@ -63,10 +63,13 @@ var ColorPicker = /** @class */ (function (_super) {
|
|
|
63
63
|
/** Renders the inner color picker components without the modal */
|
|
64
64
|
ColorPicker.render = function (color, onChange) {
|
|
65
65
|
var sketchPicker = Misc.Globals.appService.tryGet(NeoReactTypes.Components.SketchPicker);
|
|
66
|
+
var colorPicker = Misc.Globals.appService.tryGet(NeoReactTypes.Components.ColorPicker);
|
|
67
|
+
if (sketchPicker && colorPicker) {
|
|
68
|
+
throw Error("SketchPicker and ColorPicker are registered. Make sure only 1 is installed, and registered.");
|
|
69
|
+
}
|
|
66
70
|
if (sketchPicker) {
|
|
67
71
|
return React.createElement(sketchPicker, { color: color, onChange: function (c) { return onChange(c.hex); } });
|
|
68
72
|
}
|
|
69
|
-
var colorPicker = Misc.Globals.appService.tryGet(NeoReactTypes.Components.ColorPicker);
|
|
70
73
|
if (colorPicker) {
|
|
71
74
|
return React.createElement(colorPicker, { color: color, onChange: onChange });
|
|
72
75
|
}
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { Model } from '@singularsystems/neo-core';
|
|
3
3
|
import { AxiosPromise } from 'axios';
|
|
4
4
|
import { DropDownBase, ItemSource } from './DropDownBase';
|
|
5
|
-
import { Props } from 'react-select';
|
|
5
|
+
import type { Props } from 'react-select';
|
|
6
6
|
import { ICommonEditorProps } from '../PropTypes';
|
|
7
7
|
import { FormContext } from '../FormContext';
|
|
8
8
|
interface IOption {
|