superdesk-ui-framework 2.4.20 → 2.4.21

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.
@@ -29048,7 +29048,7 @@ module.exports = angular;
29048
29048
  /***/ (function(module, exports, __webpack_require__) {
29049
29049
 
29050
29050
  /* WEBPACK VAR INJECTION */(function(__webpack_provided_window_dot_jQuery) {/**
29051
- * @license AngularJS v1.8.2
29051
+ * @license AngularJS v1.8.3
29052
29052
  * (c) 2010-2020 Google LLC. http://angularjs.org
29053
29053
  * License: MIT
29054
29054
  */
@@ -29148,7 +29148,7 @@ function isValidObjectMaxDepth(maxDepth) {
29148
29148
  function minErr(module, ErrorConstructor) {
29149
29149
  ErrorConstructor = ErrorConstructor || Error;
29150
29150
 
29151
- var url = 'https://errors.angularjs.org/1.8.2/';
29151
+ var url = 'https://errors.angularjs.org/1.8.3/';
29152
29152
  var regex = url.replace('.', '\\.') + '[\\s\\S]*';
29153
29153
  var errRegExp = new RegExp(regex, 'g');
29154
29154
 
@@ -31877,11 +31877,11 @@ function toDebugString(obj, maxDepth) {
31877
31877
  var version = {
31878
31878
  // These placeholder strings will be replaced by grunt's `build` task.
31879
31879
  // They need to be double- or single-quoted.
31880
- full: '1.8.2',
31880
+ full: '1.8.3',
31881
31881
  major: 1,
31882
31882
  minor: 8,
31883
- dot: 2,
31884
- codeName: 'meteoric-mining'
31883
+ dot: 3,
31884
+ codeName: 'ultimate-farewell'
31885
31885
  };
31886
31886
 
31887
31887
 
@@ -32032,7 +32032,7 @@ function publishExternalAPI(angular) {
32032
32032
  });
32033
32033
  }
32034
32034
  ])
32035
- .info({ angularVersion: '1.8.2' });
32035
+ .info({ angularVersion: '1.8.3' });
32036
32036
  }
32037
32037
 
32038
32038
  /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
@@ -46649,7 +46649,7 @@ function $ParseProvider() {
46649
46649
 
46650
46650
  var useInputs = parsedExpression.inputs && !exp.inputs;
46651
46651
 
46652
- // Propogate the literal/inputs/constant attributes
46652
+ // Propagate the literal/inputs/constant attributes
46653
46653
  // ... but not oneTime since we are handling it
46654
46654
  oneTimeWatch.literal = parsedExpression.literal;
46655
46655
  oneTimeWatch.constant = parsedExpression.constant;
@@ -46736,7 +46736,7 @@ function $ParseProvider() {
46736
46736
  fn.$$intercepted = parsedExpression;
46737
46737
  fn.$$interceptor = interceptorFn;
46738
46738
 
46739
- // Propogate the literal/oneTime/constant attributes
46739
+ // Propagate the literal/oneTime/constant attributes
46740
46740
  fn.literal = parsedExpression.literal;
46741
46741
  fn.oneTime = parsedExpression.oneTime;
46742
46742
  fn.constant = parsedExpression.constant;
@@ -65664,7 +65664,7 @@ module.exports = 'ngAnimate';
65664
65664
  /***/ (function(module, exports) {
65665
65665
 
65666
65666
  /**
65667
- * @license AngularJS v1.8.2
65667
+ * @license AngularJS v1.8.3
65668
65668
  * (c) 2010-2020 Google LLC. http://angularjs.org
65669
65669
  * License: MIT
65670
65670
  */
@@ -69917,7 +69917,7 @@ angular.module('ngAnimate', [], function initAngularHelpers() {
69917
69917
  isFunction = angular.isFunction;
69918
69918
  isElement = angular.isElement;
69919
69919
  })
69920
- .info({ angularVersion: '1.8.2' })
69920
+ .info({ angularVersion: '1.8.3' })
69921
69921
  .directive('ngAnimateSwap', ngAnimateSwapDirective)
69922
69922
 
69923
69923
  .directive('ngAnimateChildren', $$AnimateChildrenDirective)
@@ -45,7 +45,7 @@
45
45
  <sd-check ng-model="def6" label-position="inside" data-icon="th-list">Button style with icon</sd-check>
46
46
  <sd-check ng-model="def7" label-position="inside" data-icon="th" ng-checked="true">I have an icon!</sd-check>
47
47
  <sd-check ng-model="def8" label-position="inside" data-icon="th-large">Yeah, me too!</sd-check>
48
- <sd-check ng-model="def9" data-icon="star">I have an icon :) </sd-check>
48
+ <sd-check ng-model="def9" data-icon="star" disabled>I have an icon :) </sd-check>
49
49
  </div>
50
50
  </div>
51
51
 
@@ -64,6 +64,7 @@ export default class InputsDoc extends React.Component<{}, IState> {
64
64
  <p className="docs-page__paragraph">// Hidden label</p>
65
65
  <div className='form__row'>
66
66
  <Input label='Hidden input label'
67
+ type='number'
67
68
  value='Lorem ipsum input'
68
69
  maxLength={30}
69
70
  error='This is an error message'
@@ -33,7 +33,7 @@ export default class TagDoc extends React.Component<{}, ITag> {
33
33
  <section className="docs-page__container">
34
34
  <h2 className="docs-page__h2">Tag</h2>
35
35
  <Markup.ReactMarkupCodePreview>{`
36
- <Tag text='This is a tag' onClick={()=>false}/>
36
+ <Tag text='This is a tag' onRemove={()=>false}/>
37
37
  `}
38
38
  </Markup.ReactMarkupCodePreview>
39
39
 
@@ -48,18 +48,18 @@ export default class TagDoc extends React.Component<{}, ITag> {
48
48
  shade={tag.shade}
49
49
  shape={tag.shape}
50
50
  readOnly={tag.readOnly}
51
- onClick={()=>this.handleClick(index)}/>
51
+ onRemove={()=>this.handleClick(index)} />
52
52
  </React.Fragment>
53
53
  )
54
54
  })}
55
55
  </div>
56
56
  </Markup.ReactMarkupPreview>
57
57
  <Markup.ReactMarkupCode>{`
58
- <Tag text='This is a tag' onClick={()=>false}/>
59
- <Tag text='This is a another tag' shade='darker' onClick={()=>false}/>
60
- <Tag text='Lorem ipsum' shade='highlight1' onClick={()=>false}/>
61
- <Tag text='Dolor amet' shade='highlight2' shape='square' onClick={()=>false}/>
62
-
58
+ <Tag text='This is a tag' onRemove={()=>false}/>
59
+ <Tag text='This is a another tag' shade='darker' onRemove={()=>false}/>
60
+ <Tag text='Lorem ipsum' shade='highlight1' onRemove={()=>false}/>
61
+ <Tag text='Dolor amet' shade='highlight2' shape='square' onRemove={()=>false}/>
62
+ <Tag text='Read only tag' readOnly={true} onRemove={()=>false}/>
63
63
  `}
64
64
  </Markup.ReactMarkupCode>
65
65
  </Markup.ReactMarkup>
@@ -70,6 +70,8 @@ export default class TagDoc extends React.Component<{}, ITag> {
70
70
  <Prop name='shade' isRequired={false} type='light | darker | highlight1 | highlight2' default='light' description='Shade colour of tag'/>
71
71
  <Prop name='shape' isRequired={false} type='round | square' default='round' description='Make shape of tag square or default round.'/>
72
72
  <Prop name='keyValue' isRequired={false} type='number' default='/' description='Value of tag key'/>
73
+ <Prop name='readOnly' isRequired={false} type='boolean' default='/' description='Read only tag. Dont have option to close/remove tag.'/>
74
+ <Prop name='onRemove' isRequired={false} type='function' default='/' description='Callback function'/>
73
75
  </PropsList>
74
76
  </section>
75
77
  )
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "superdesk-ui-framework",
3
- "version": "2.4.20",
3
+ "version": "2.4.21",
4
4
  "license": "AGPL-3.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -1,6 +1,7 @@
1
1
  import * as React from 'react';
2
2
  interface IProps {
3
3
  value?: string;
4
+ type?: 'text' | 'number' | 'password';
4
5
  label: string;
5
6
  maxLength?: number;
6
7
  info?: string;
@@ -69,6 +69,7 @@ var Input = /** @class */ (function (_super) {
69
69
  }
70
70
  };
71
71
  Input.prototype.render = function () {
72
+ var _a;
72
73
  var classes = classnames_1.default('sd-input', {
73
74
  'sd-input--inline-label': this.props.inlineLabel,
74
75
  'sd-input--required': this.props.required,
@@ -80,7 +81,7 @@ var Input = /** @class */ (function (_super) {
80
81
  });
81
82
  return (React.createElement("div", { className: classes },
82
83
  React.createElement("label", { className: labelClasses, htmlFor: this.htmlId, id: this.htmlId + 'label' }, this.props.label),
83
- React.createElement("input", { className: 'sd-input__input', type: 'text', id: this.htmlId, value: this.state.value, "aria-label": this.props.label, "aria-describedby": this.htmlId + 'label', onChange: this.handleChange, disabled: this.props.disabled }),
84
+ React.createElement("input", { className: 'sd-input__input', type: (_a = this.props.type) !== null && _a !== void 0 ? _a : 'text', id: this.htmlId, value: this.state.value, "aria-label": this.props.label, "aria-describedby": this.htmlId + 'label', onChange: this.handleChange, disabled: this.props.disabled }),
84
85
  this.props.maxLength ?
85
86
  React.createElement("div", { className: 'sd-input__char-count' },
86
87
  this.state.value.length,
@@ -5,7 +5,7 @@ interface IProps {
5
5
  shade?: 'light' | 'darker' | 'highlight1' | 'highlight2';
6
6
  shape?: 'round' | 'square';
7
7
  readOnly?: boolean;
8
- onClick(): void;
8
+ onRemove?(): void;
9
9
  }
10
- export declare const Tag: ({ text, keyValue, shade, shape, readOnly, onClick }: IProps) => JSX.Element;
10
+ export declare const Tag: ({ text, keyValue, shade, shape, readOnly, onRemove }: IProps) => JSX.Element;
11
11
  export {};
@@ -27,13 +27,13 @@ var React = __importStar(require("react"));
27
27
  var classnames_1 = __importDefault(require("classnames"));
28
28
  exports.Tag = function (_a) {
29
29
  var _b;
30
- var text = _a.text, keyValue = _a.keyValue, shade = _a.shade, shape = _a.shape, readOnly = _a.readOnly, onClick = _a.onClick;
30
+ var text = _a.text, keyValue = _a.keyValue, shade = _a.shade, shape = _a.shape, readOnly = _a.readOnly, onRemove = _a.onRemove;
31
31
  var classes = classnames_1.default('tag-label', (_b = {},
32
32
  _b["tag-label--" + shade] = shade && shade !== 'light',
33
33
  _b['tag-label--square'] = shape === 'square',
34
34
  _b));
35
35
  return (React.createElement("span", { className: classes, key: keyValue },
36
36
  text,
37
- !readOnly ? React.createElement("button", { className: 'tag-label__remove', onClick: onClick },
37
+ !readOnly ? React.createElement("button", { className: 'tag-label__remove', onClick: onRemove },
38
38
  React.createElement("i", { className: 'icon-close-small' })) : null));
39
39
  };