superdesk-ui-framework 3.0.2 → 3.0.4

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 (43) hide show
  1. package/app/styles/app.scss +2 -1
  2. package/app/styles/editor/_editor-themes.scss +6 -1
  3. package/app/styles/form-elements/_inputs.scss +8 -8
  4. package/app/styles/layout/_editor.scss +5 -2
  5. package/app/styles/primereact/_pr-tag-input.scss +61 -0
  6. package/app-typescript/components/Layouts/AuthoringInnerBody.tsx +8 -1
  7. package/app-typescript/components/Layouts/AuthoringMain.tsx +2 -1
  8. package/app-typescript/components/MultiSelect.tsx +2 -0
  9. package/app-typescript/components/Navigation/SideBarTabs.tsx +34 -36
  10. package/app-typescript/components/TagInput.tsx +49 -233
  11. package/app-typescript/index.ts +0 -2
  12. package/dist/examples.bundle.js +2521 -2235
  13. package/dist/playgrounds/react-playgrounds/EditorTest.tsx +21 -18
  14. package/dist/playgrounds/react-playgrounds/Multiedit.tsx +29 -21
  15. package/dist/react/Index.tsx +3 -3
  16. package/dist/react/MultiSelect.tsx +4 -3
  17. package/dist/react/TagInputDocs.tsx +82 -0
  18. package/dist/superdesk-ui.bundle.css +73 -2
  19. package/dist/superdesk-ui.bundle.js +1503 -1704
  20. package/dist/vendor.bundle.js +19 -19
  21. package/examples/pages/playgrounds/react-playgrounds/EditorTest.tsx +21 -18
  22. package/examples/pages/playgrounds/react-playgrounds/Multiedit.tsx +29 -21
  23. package/examples/pages/react/Index.tsx +3 -3
  24. package/examples/pages/react/MultiSelect.tsx +4 -3
  25. package/examples/pages/react/TagInputDocs.tsx +82 -0
  26. package/package.json +2 -2
  27. package/react/components/Layouts/AuthoringInnerBody.d.ts +1 -0
  28. package/react/components/Layouts/AuthoringInnerBody.js +5 -1
  29. package/react/components/Layouts/AuthoringMain.d.ts +1 -0
  30. package/react/components/Layouts/AuthoringMain.js +1 -1
  31. package/react/components/MultiSelect.d.ts +1 -0
  32. package/react/components/MultiSelect.js +1 -1
  33. package/react/components/Navigation/SideBarTabs.d.ts +7 -8
  34. package/react/components/Navigation/SideBarTabs.js +21 -22
  35. package/react/index.d.ts +0 -2
  36. package/react/index.js +1 -6
  37. package/app-typescript/components/TagInputTest.tsx +0 -76
  38. package/dist/react/TagInputs.tsx +0 -92
  39. package/examples/pages/react/TagInputs.tsx +0 -92
  40. package/react/components/TagInput.d.ts +0 -7
  41. package/react/components/TagInput.js +0 -200
  42. package/react/components/TagInputTest.d.ts +0 -18
  43. package/react/components/TagInputTest.js +0 -91
@@ -1,91 +0,0 @@
1
- "use strict";
2
- var __extends = (this && this.__extends) || (function () {
3
- var extendStatics = function (d, b) {
4
- extendStatics = Object.setPrototypeOf ||
5
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
- function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
- return extendStatics(d, b);
8
- };
9
- return function (d, b) {
10
- if (typeof b !== "function" && b !== null)
11
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
- extendStatics(d, b);
13
- function __() { this.constructor = d; }
14
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
- };
16
- })();
17
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
18
- if (k2 === undefined) k2 = k;
19
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
20
- }) : (function(o, m, k, k2) {
21
- if (k2 === undefined) k2 = k;
22
- o[k2] = m[k];
23
- }));
24
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
- Object.defineProperty(o, "default", { enumerable: true, value: v });
26
- }) : function(o, v) {
27
- o["default"] = v;
28
- });
29
- var __importStar = (this && this.__importStar) || function (mod) {
30
- if (mod && mod.__esModule) return mod;
31
- var result = {};
32
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
- __setModuleDefault(result, mod);
34
- return result;
35
- };
36
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
37
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
38
- if (ar || !(i in from)) {
39
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
40
- ar[i] = from[i];
41
- }
42
- }
43
- return to.concat(ar || Array.prototype.slice.call(from));
44
- };
45
- Object.defineProperty(exports, "__esModule", { value: true });
46
- exports.TagInputTest = void 0;
47
- var React = __importStar(require("react"));
48
- var autocomplete_1 = require("@superdesk/primereact/autocomplete");
49
- var TagInputTest = /** @class */ (function (_super) {
50
- __extends(TagInputTest, _super);
51
- function TagInputTest(props) {
52
- var _this = _super.call(this, props) || this;
53
- _this.state = {
54
- selectedItem: null,
55
- filteredItems: null,
56
- };
57
- _this.searchItem = _this.searchItem.bind(_this);
58
- _this.itemTemplate = _this.itemTemplate.bind(_this);
59
- _this.handleItem = _this.handleItem.bind(_this);
60
- return _this;
61
- }
62
- TagInputTest.prototype.searchItem = function (event) {
63
- var _this = this;
64
- setTimeout(function () {
65
- var filteredItems;
66
- if (!event.query.trim().length) {
67
- filteredItems = __spreadArray([], _this.props.items, true);
68
- }
69
- else {
70
- filteredItems = _this.props.items.filter(function (item) {
71
- return item[_this.props.keyValue].toLowerCase().startsWith(event.query.toLowerCase());
72
- });
73
- }
74
- _this.setState({ filteredItems: filteredItems });
75
- }, 250);
76
- };
77
- TagInputTest.prototype.itemTemplate = function (item) {
78
- return (React.createElement("div", null,
79
- React.createElement("div", null, item[this.props.keyValue])));
80
- };
81
- TagInputTest.prototype.handleItem = function (e) {
82
- this.setState({ selectedItem: e.value });
83
- };
84
- TagInputTest.prototype.render = function () {
85
- var _this = this;
86
- return (React.createElement("div", null,
87
- React.createElement(autocomplete_1.AutoComplete, { value: this.state.selectedItem, suggestions: this.state.filteredItems, completeMethod: this.searchItem, field: this.props.keyValue, multiple: true, dropdown: true, minLength: this.props.minLength ? this.props.minLength : 1, onChange: function (e) { return _this.handleItem(e); } })));
88
- };
89
- return TagInputTest;
90
- }(React.Component));
91
- exports.TagInputTest = TagInputTest;