@singularsystems/neo-react 1.0.6 → 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.
@@ -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 {
@@ -1,6 +1,7 @@
1
1
  import { __assign, __decorate, __extends, __metadata, __rest } from "tslib";
2
2
  import React from 'react';
3
3
  import { observer } from 'mobx-react';
4
+ import { Misc, Utils } from '@singularsystems/neo-core';
4
5
  import Button from '../Button';
5
6
  import { FileContext } from './FileContext';
6
7
  import FileBasicInput from './FileBasicInput';
@@ -30,8 +31,7 @@ var FileUploadButton = /** @class */ (function (_super) {
30
31
  }
31
32
  if (!buttonProps)
32
33
  buttonProps = {};
33
- if (!buttonProps.variant)
34
- buttonProps.variant = "light";
34
+ Utils.populatePartialWithDefaults(buttonProps, Misc.Settings.fileManager.browseButton);
35
35
  if (this.fileManager.isUploading && !this.fileManager.options.allowConcurrent) {
36
36
  buttonProps.disabled = true;
37
37
  }
@@ -114,5 +114,6 @@ var neoFontAwesomeMappings = [
114
114
  ["greater-than", ""],
115
115
  ["greater-than-equal", ""],
116
116
  ["stamp", "approval"],
117
- ["circle-notch", "progress_activity"]
117
+ ["circle-notch", "progress_activity"],
118
+ ["cube", "deployed_code"]
118
119
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularsystems/neo-react",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "React application logic and components for the Neo client library",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,7 +31,7 @@
31
31
  "typescript": "5.4.2"
32
32
  },
33
33
  "dependencies": {
34
- "@singularsystems/neo-core": "1.0.3",
34
+ "@singularsystems/neo-core": "1.0.4",
35
35
  "@types/rc-slider": "^8.6.5",
36
36
  "@types/react-color": "^3.0.1",
37
37
  "axios": "1.6.7",
@@ -49,7 +49,7 @@
49
49
  "tslib": "2.5.0"
50
50
  },
51
51
  "peerDependencies": {
52
- "@singularsystems/neo-core": ">=1.0.2",
52
+ "@singularsystems/neo-core": ">=1.0.4",
53
53
  "axios": ">=1.6.2",
54
54
  "inversify": ">=5.0.1",
55
55
  "mobx": ">=6.9.0",