@imposium-hub/components 2.2.37 → 2.2.39

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 (108) hide show
  1. package/dist/cjs/components/assets/AssetsTableDateCell.js +2 -2
  2. package/dist/cjs/components/assets/AssetsTableDateCell.js.map +1 -1
  3. package/dist/cjs/components/context-menu/AnimateComponent.d.ts +8 -0
  4. package/dist/cjs/components/context-menu/AnimateComponent.js +14 -0
  5. package/dist/cjs/components/context-menu/AnimateComponent.js.map +1 -0
  6. package/dist/cjs/components/context-menu/ContextMenu.d.ts +29 -0
  7. package/dist/cjs/components/context-menu/ContextMenu.js +168 -0
  8. package/dist/cjs/components/context-menu/ContextMenu.js.map +1 -0
  9. package/dist/cjs/components/context-menu/ContextMenuItem.d.ts +20 -0
  10. package/dist/cjs/components/context-menu/ContextMenuItem.js +60 -0
  11. package/dist/cjs/components/context-menu/ContextMenuItem.js.map +1 -0
  12. package/dist/cjs/components/context-menu/ContextMenuTrigger.d.ts +18 -0
  13. package/dist/cjs/components/context-menu/ContextMenuTrigger.js +71 -0
  14. package/dist/cjs/components/context-menu/ContextMenuTrigger.js.map +1 -0
  15. package/dist/cjs/components/context-menu/SubMenu.d.ts +14 -0
  16. package/dist/cjs/components/context-menu/SubMenu.js +97 -0
  17. package/dist/cjs/components/context-menu/SubMenu.js.map +1 -0
  18. package/dist/cjs/components/context-menu/helper.d.ts +2 -0
  19. package/dist/cjs/components/context-menu/helper.js +31 -0
  20. package/dist/cjs/components/context-menu/helper.js.map +1 -0
  21. package/dist/cjs/components/context-menu/registerEvent.d.ts +4 -0
  22. package/dist/cjs/components/context-menu/registerEvent.js +46 -0
  23. package/dist/cjs/components/context-menu/registerEvent.js.map +1 -0
  24. package/dist/cjs/index.d.ts +5 -1
  25. package/dist/cjs/index.js +9 -1
  26. package/dist/cjs/index.js.map +1 -1
  27. package/dist/esm/components/assets/AssetsTableDateCell.js +2 -2
  28. package/dist/esm/components/assets/AssetsTableDateCell.js.map +1 -1
  29. package/dist/esm/components/context-menu/AnimateComponent.d.ts +8 -0
  30. package/dist/esm/components/context-menu/AnimateComponent.js +8 -0
  31. package/dist/esm/components/context-menu/AnimateComponent.js.map +1 -0
  32. package/dist/esm/components/context-menu/ContextMenu.d.ts +29 -0
  33. package/dist/esm/components/context-menu/ContextMenu.js +108 -0
  34. package/dist/esm/components/context-menu/ContextMenu.js.map +1 -0
  35. package/dist/esm/components/context-menu/ContextMenuItem.d.ts +20 -0
  36. package/dist/esm/components/context-menu/ContextMenuItem.js +23 -0
  37. package/dist/esm/components/context-menu/ContextMenuItem.js.map +1 -0
  38. package/dist/esm/components/context-menu/ContextMenuTrigger.d.ts +18 -0
  39. package/dist/esm/components/context-menu/ContextMenuTrigger.js +34 -0
  40. package/dist/esm/components/context-menu/ContextMenuTrigger.js.map +1 -0
  41. package/dist/esm/components/context-menu/SubMenu.d.ts +14 -0
  42. package/dist/esm/components/context-menu/SubMenu.js +41 -0
  43. package/dist/esm/components/context-menu/SubMenu.js.map +1 -0
  44. package/dist/esm/components/context-menu/helper.d.ts +2 -0
  45. package/dist/esm/components/context-menu/helper.js +22 -0
  46. package/dist/esm/components/context-menu/helper.js.map +1 -0
  47. package/dist/esm/components/context-menu/registerEvent.d.ts +4 -0
  48. package/dist/esm/components/context-menu/registerEvent.js +41 -0
  49. package/dist/esm/components/context-menu/registerEvent.js.map +1 -0
  50. package/dist/esm/index.d.ts +5 -1
  51. package/dist/esm/index.js +5 -1
  52. package/dist/esm/index.js.map +1 -1
  53. package/dist/styles.css +141 -0
  54. package/dist/styles.less +145 -0
  55. package/less/components/context-menu.less +145 -0
  56. package/less/entry.less +2 -1
  57. package/package.json +3 -2
  58. package/src/components/assets/AssetsTableDateCell.tsx +2 -2
  59. package/src/components/context-menu/AnimateComponent.tsx +19 -0
  60. package/src/components/context-menu/ContextMenu.tsx +172 -0
  61. package/src/components/context-menu/ContextMenuItem.tsx +34 -0
  62. package/src/components/context-menu/ContextMenuTrigger.tsx +47 -0
  63. package/src/components/context-menu/SubMenu.tsx +70 -0
  64. package/src/components/context-menu/helper.ts +21 -0
  65. package/src/components/context-menu/registerEvent.ts +46 -0
  66. package/src/index.ts +9 -1
  67. package/dist/cjs/components/assets/AssetsTableDurationCell copy.d.ts +0 -7
  68. package/dist/cjs/components/assets/AssetsTableDurationCell copy.js +0 -47
  69. package/dist/cjs/components/assets/AssetsTableDurationCell copy.js.map +0 -1
  70. package/dist/cjs/components/assets/AssetsTableFrameRateCell.d.ts +0 -7
  71. package/dist/cjs/components/assets/AssetsTableFrameRateCell.js +0 -47
  72. package/dist/cjs/components/assets/AssetsTableFrameRateCell.js.map +0 -1
  73. package/dist/cjs/components/error-message-preview/ErrorMessagePreview.d.ts +0 -15
  74. package/dist/cjs/components/error-message-preview/ErrorMessagePreview.js +0 -91
  75. package/dist/cjs/components/error-message-preview/ErrorMessagePreview.js.map +0 -1
  76. package/dist/cjs/redux/actions/batches.d.ts +0 -0
  77. package/dist/cjs/redux/actions/batches.js +0 -1
  78. package/dist/cjs/redux/actions/batches.js.map +0 -1
  79. package/dist/cjs/redux/actions/layerCopy.d.ts +0 -5
  80. package/dist/cjs/redux/actions/layerCopy.js +0 -34
  81. package/dist/cjs/redux/actions/layerCopy.js.map +0 -1
  82. package/dist/cjs/redux/reducers/batches.d.ts +0 -0
  83. package/dist/cjs/redux/reducers/batches.js +0 -1
  84. package/dist/cjs/redux/reducers/batches.js.map +0 -1
  85. package/dist/cjs/redux/reducers/layerCopy.d.ts +0 -2
  86. package/dist/cjs/redux/reducers/layerCopy.js +0 -36
  87. package/dist/cjs/redux/reducers/layerCopy.js.map +0 -1
  88. package/dist/esm/components/assets/AssetsTableDurationCell copy.d.ts +0 -7
  89. package/dist/esm/components/assets/AssetsTableDurationCell copy.js +0 -20
  90. package/dist/esm/components/assets/AssetsTableDurationCell copy.js.map +0 -1
  91. package/dist/esm/components/assets/AssetsTableFrameRateCell.d.ts +0 -7
  92. package/dist/esm/components/assets/AssetsTableFrameRateCell.js +0 -20
  93. package/dist/esm/components/assets/AssetsTableFrameRateCell.js.map +0 -1
  94. package/dist/esm/components/error-message-preview/ErrorMessagePreview.d.ts +0 -15
  95. package/dist/esm/components/error-message-preview/ErrorMessagePreview.js +0 -35
  96. package/dist/esm/components/error-message-preview/ErrorMessagePreview.js.map +0 -1
  97. package/dist/esm/redux/actions/batches.d.ts +0 -0
  98. package/dist/esm/redux/actions/batches.js +0 -1
  99. package/dist/esm/redux/actions/batches.js.map +0 -1
  100. package/dist/esm/redux/actions/layerCopy.d.ts +0 -5
  101. package/dist/esm/redux/actions/layerCopy.js +0 -28
  102. package/dist/esm/redux/actions/layerCopy.js.map +0 -1
  103. package/dist/esm/redux/reducers/batches.d.ts +0 -0
  104. package/dist/esm/redux/reducers/batches.js +0 -1
  105. package/dist/esm/redux/reducers/batches.js.map +0 -1
  106. package/dist/esm/redux/reducers/layerCopy.d.ts +0 -2
  107. package/dist/esm/redux/reducers/layerCopy.js +0 -25
  108. package/dist/esm/redux/reducers/layerCopy.js.map +0 -1
@@ -0,0 +1,34 @@
1
+ import React, { useCallback, useRef } from 'react';
2
+ import { callHideEvent } from './registerEvent';
3
+
4
+ const ContextMenuItem = ({ children, onClick, disabled, preventClose, attributes, className }) => {
5
+ const contextMenuItem = useRef(null);
6
+
7
+ const handleClickEvent = useCallback((e) => {
8
+ if (disabled) return;
9
+ onClick(e);
10
+
11
+ if (!preventClose) callHideEvent('ID_NOT_REQUIRED');
12
+ }, []);
13
+
14
+ return (
15
+ <div
16
+ className={`${disabled ? 'contextmenu__item--disabled' : 'contextmenu__item'}`}
17
+ onClick={handleClickEvent}
18
+ {...attributes}
19
+ ref={contextMenuItem}>
20
+ {children}
21
+ </div>
22
+ );
23
+ };
24
+
25
+ export default ContextMenuItem;
26
+
27
+ ContextMenuItem.defaultProps = {
28
+ disabled: false,
29
+ preventClose: false,
30
+ attributes: {},
31
+ className: '',
32
+ onClick: () => null,
33
+ onItemHover: () => null
34
+ };
@@ -0,0 +1,47 @@
1
+ import React, { useRef, useCallback } from 'react';
2
+ import { callShowEvent, callHideEvent } from './registerEvent';
3
+
4
+ const ContextMenuTrigger = ({ children, id, disableWhileShiftPressed, attributes, disable }) => {
5
+ const menuTrigger = useRef(null);
6
+
7
+ const handleContextMenu = useCallback((e) => {
8
+ if (disable) return;
9
+ if (disableWhileShiftPressed && e.nativeEvent.shiftKey) {
10
+ callHideEvent(id);
11
+ return;
12
+ }
13
+ e.preventDefault();
14
+ e.stopPropagation();
15
+
16
+ const { clientX, clientY } = e.nativeEvent;
17
+ const opts = {
18
+ position: {
19
+ clientY,
20
+ clientX
21
+ },
22
+ id
23
+ };
24
+
25
+ callShowEvent(opts);
26
+ }, []);
27
+
28
+ return (
29
+ <div
30
+ className='menu-trigger'
31
+ ref={menuTrigger}
32
+ {...attributes}
33
+ onContextMenu={(e) => handleContextMenu(e)}>
34
+ {children}
35
+ </div>
36
+ );
37
+ };
38
+
39
+ export default ContextMenuTrigger;
40
+
41
+ ContextMenuTrigger.defaultProps = {
42
+ attributes: {},
43
+ disable: false,
44
+ renderTag: 'div',
45
+ disableWhileShiftPressed: false,
46
+ className: ''
47
+ };
@@ -0,0 +1,70 @@
1
+ import React, { useCallback, useState, useRef } from 'react';
2
+ import ContextMenuItem from './ContextMenuItem';
3
+
4
+ const Submenu = ({ children, title, attributes, className }) => {
5
+ const [submenuStyle, setSubmenuStyle] = useState(null);
6
+ const submenuEl = useRef(null);
7
+ const submenuItem = useRef(null);
8
+
9
+ const calculateSubmenuPos = useCallback(() => {
10
+ const { innerHeight: windowInnerHeight, innerWidth: windowInnerWidth } = window;
11
+ const {
12
+ left: itemLeft,
13
+ top: itemTop,
14
+ width: itemWidth,
15
+ height: itemHeight
16
+ } = submenuItem.current.getBoundingClientRect();
17
+ const { width: submenuWidth, height: submenuHeight } =
18
+ submenuEl.current.getBoundingClientRect();
19
+ const style = {
20
+ opacity: 1,
21
+ visibility: 'visible'
22
+ };
23
+
24
+ if (itemTop + submenuHeight + itemHeight > windowInnerHeight) {
25
+ style['top'] = 'inherit';
26
+ style['bottom'] = '0';
27
+ }
28
+ if (itemLeft + submenuWidth + itemWidth > windowInnerWidth) {
29
+ style['left'] = 'inherit';
30
+ style['right'] = '100%';
31
+ }
32
+
33
+ setSubmenuStyle(style);
34
+ }, []);
35
+
36
+ const hideSubmenu = useCallback(() => {
37
+ const style = {
38
+ opacity: 0,
39
+ visibility: 'hidden'
40
+ };
41
+
42
+ setSubmenuStyle(style);
43
+ }, []);
44
+
45
+ return (
46
+ <div
47
+ className='submenu'
48
+ onMouseOver={() => calculateSubmenuPos()}
49
+ onMouseOut={() => hideSubmenu()}
50
+ onFocus={() => null}
51
+ onBlur={() => null}
52
+ ref={submenuItem}
53
+ {...attributes}>
54
+ <ContextMenuItem>{title}</ContextMenuItem>
55
+ <div
56
+ className='submenu__item'
57
+ ref={submenuEl}
58
+ style={submenuStyle}>
59
+ {children}
60
+ </div>
61
+ </div>
62
+ );
63
+ };
64
+
65
+ export default Submenu;
66
+
67
+ Submenu.defaultProps = {
68
+ title: 'Sub Menu',
69
+ className: ''
70
+ };
@@ -0,0 +1,21 @@
1
+ export const uniqueId = () => `_${Math.random().toString(36).substr(2, 9)}`;
2
+
3
+ export const throttle = (func, limit) => {
4
+ let lastFunc;
5
+ let lastRan;
6
+ return (...args) => {
7
+ const context = window;
8
+ if (!lastRan) {
9
+ func.apply(context, args);
10
+ lastRan = Date.now();
11
+ } else {
12
+ clearTimeout(lastFunc);
13
+ lastFunc = setTimeout(() => {
14
+ if (Date.now() - lastRan >= limit) {
15
+ func.apply(context, args);
16
+ lastRan = Date.now();
17
+ }
18
+ }, limit - (Date.now() - lastRan));
19
+ }
20
+ };
21
+ };
@@ -0,0 +1,46 @@
1
+ import { uniqueId } from './helper';
2
+
3
+ const events = {};
4
+
5
+ let activeEvent = {
6
+ id: '',
7
+ showMenu: null,
8
+ hideMenu: null
9
+ };
10
+
11
+ const registerEvent = (id, showMenu, hideMenu) => {
12
+ const _ = uniqueId();
13
+
14
+ events[_] = {
15
+ id,
16
+ showMenu,
17
+ hideMenu
18
+ };
19
+
20
+ return id;
21
+ };
22
+
23
+ const callShowEvent = (opts) => {
24
+ const { hideMenu } = activeEvent;
25
+ if (hideMenu) hideMenu();
26
+ Object.keys(events).forEach((key) => {
27
+ if (events[key].id && events[key].id === opts.id) {
28
+ events[key].showMenu(opts);
29
+ activeEvent = events[key];
30
+ }
31
+ });
32
+ };
33
+
34
+ const callHideEvent = (menuId) => {
35
+ const { id, hideMenu } = activeEvent;
36
+ if (id === menuId || menuId === 'ID_NOT_REQUIRED') {
37
+ if (hideMenu) hideMenu();
38
+ activeEvent = {
39
+ id: '',
40
+ showMenu: null,
41
+ hideMenu: null
42
+ };
43
+ }
44
+ };
45
+
46
+ export { registerEvent, callShowEvent, callHideEvent };
package/src/index.ts CHANGED
@@ -155,6 +155,10 @@ import FontPicker from './components/font-picker/FontPicker';
155
155
  import AudioPreview from './components/players/AudioPreview';
156
156
  import { renderTooltipProps, renderTooltip } from './components/Tooltip';
157
157
  import AssetsTableRateCell from './components/assets/AssetsTableRateCell';
158
+ import ContextMenu from './components/context-menu/ContextMenu';
159
+ import ContextMenuItem from './components/context-menu/ContextMenuItem';
160
+ import ContextMenuTrigger from './components/context-menu/ContextMenuTrigger';
161
+ import Submenu from './components/context-menu/SubMenu';
158
162
 
159
163
  export {
160
164
  AppWrapper,
@@ -301,5 +305,9 @@ export {
301
305
  cancelAssetUpload,
302
306
  getLastModifiedStoryInOrg,
303
307
  renderTooltipProps,
304
- renderTooltip
308
+ renderTooltip,
309
+ ContextMenu,
310
+ ContextMenuItem,
311
+ ContextMenuTrigger,
312
+ Submenu
305
313
  };
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- interface IAssetsTableDurationCell {
3
- cell: any;
4
- }
5
- declare const AssetsTableDurationCell: React.FC<IAssetsTableDurationCell>;
6
- export declare const secondsToTime: (timeInSeconds: any) => string;
7
- export default AssetsTableDurationCell;
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.secondsToTime = void 0;
27
- var React = __importStar(require("react"));
28
- var AssetsTableDurationCell = function (props) {
29
- var duration = props.cell.row.original.duration;
30
- if (duration !== null && duration !== undefined) {
31
- return React.createElement("div", { className: 'asset-duration-cell' }, (0, exports.secondsToTime)(duration));
32
- }
33
- else {
34
- return React.createElement("div", { className: 'asset-duration-cell' });
35
- }
36
- };
37
- var secondsToTime = function (timeInSeconds) {
38
- var minutes = Math.floor(timeInSeconds / 60);
39
- var seconds = Math.floor(timeInSeconds - minutes * 60);
40
- if (seconds < 10) {
41
- seconds = "0".concat(seconds);
42
- }
43
- return "".concat(minutes, ":").concat(seconds);
44
- };
45
- exports.secondsToTime = secondsToTime;
46
- exports.default = AssetsTableDurationCell;
47
- //# sourceMappingURL=AssetsTableDurationCell%20copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssetsTableDurationCell copy.js","sourceRoot":"","sources":["../../../../src/components/assets/AssetsTableDurationCell copy.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAM/B,IAAM,uBAAuB,GAAuC,UAChE,KAA+B;IAKP,IAAA,QAAQ,GAG5B,KAAK,2BAHuB,CAGtB;IAEV,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC7C,OAAO,6BAAK,SAAS,EAAC,qBAAqB,IAAE,IAAA,qBAAa,EAAC,QAAQ,CAAC,CAAO,CAAC;KAC/E;SAAM;QACH,OAAO,6BAAK,SAAS,EAAC,qBAAqB,GAAO,CAAC;KACtD;AACL,CAAC,CAAC;AAEK,IAAM,aAAa,GAAG,UAAC,aAAa;IACvC,IAAM,OAAO,GAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;IACpD,IAAI,OAAO,GAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC;IAC5D,IAAI,OAAO,GAAG,EAAE,EAAE;QACd,OAAO,GAAG,WAAI,OAAO,CAAE,CAAC;KAC3B;IACD,OAAO,UAAG,OAAO,cAAI,OAAO,CAAE,CAAC;AACnC,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB;AAEF,kBAAe,uBAAuB,CAAC"}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- interface IAssetsTableFrameRateCell {
3
- cell: any;
4
- }
5
- declare const AssetsTableFrameRateCell: React.FC<IAssetsTableFrameRateCell>;
6
- export declare const secondsToTime: (timeInSeconds: any) => string;
7
- export default AssetsTableFrameRateCell;
@@ -1,47 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.secondsToTime = void 0;
27
- var React = __importStar(require("react"));
28
- var AssetsTableFrameRateCell = function (props) {
29
- var duration = props.cell.row.original.duration;
30
- if (duration !== null && duration !== undefined) {
31
- return React.createElement("div", { className: 'asset-duration-cell' }, (0, exports.secondsToTime)(duration));
32
- }
33
- else {
34
- return React.createElement("div", { className: 'asset-duration-cell' });
35
- }
36
- };
37
- var secondsToTime = function (timeInSeconds) {
38
- var minutes = Math.floor(timeInSeconds / 60);
39
- var seconds = Math.floor(timeInSeconds - minutes * 60);
40
- if (seconds < 10) {
41
- seconds = "0".concat(seconds);
42
- }
43
- return "".concat(minutes, ":").concat(seconds);
44
- };
45
- exports.secondsToTime = secondsToTime;
46
- exports.default = AssetsTableFrameRateCell;
47
- //# sourceMappingURL=AssetsTableFrameRateCell.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssetsTableFrameRateCell.js","sourceRoot":"","sources":["../../../../src/components/assets/AssetsTableFrameRateCell.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAM/B,IAAM,wBAAwB,GAAwC,UAClE,KAAgC;IAKR,IAAA,QAAQ,GAG5B,KAAK,2BAHuB,CAGtB;IAEV,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC7C,OAAO,6BAAK,SAAS,EAAC,qBAAqB,IAAE,IAAA,qBAAa,EAAC,QAAQ,CAAC,CAAO,CAAC;KAC/E;SAAM;QACH,OAAO,6BAAK,SAAS,EAAC,qBAAqB,GAAO,CAAC;KACtD;AACL,CAAC,CAAC;AAEK,IAAM,aAAa,GAAG,UAAC,aAAa;IACvC,IAAM,OAAO,GAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;IACpD,IAAI,OAAO,GAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC;IAC5D,IAAI,OAAO,GAAG,EAAE,EAAE;QACd,OAAO,GAAG,WAAI,OAAO,CAAE,CAAC;KAC3B;IACD,OAAO,UAAG,OAAO,cAAI,OAAO,CAAE,CAAC;AACnC,CAAC,CAAC;AAPW,QAAA,aAAa,iBAOxB;AAEF,kBAAe,wBAAwB,CAAC"}
@@ -1,15 +0,0 @@
1
- import * as React from 'react';
2
- interface IErrorMessagePreviewProps {
3
- showMedia: boolean;
4
- message: string;
5
- style?: React.CSSProperties | any;
6
- onRequestClose?(): void;
7
- }
8
- declare class ErrorMessagePreview extends React.PureComponent<IErrorMessagePreviewProps> {
9
- private errorMsgNode;
10
- private evtHandlers;
11
- constructor(props: any);
12
- private onClose;
13
- render(): JSX.Element;
14
- }
15
- export default ErrorMessagePreview;
@@ -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 __assign = (this && this.__assign) || function () {
18
- __assign = Object.assign || function(t) {
19
- for (var s, i = 1, n = arguments.length; i < n; i++) {
20
- s = arguments[i];
21
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
- t[p] = s[p];
23
- }
24
- return t;
25
- };
26
- return __assign.apply(this, arguments);
27
- };
28
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
29
- if (k2 === undefined) k2 = k;
30
- var desc = Object.getOwnPropertyDescriptor(m, k);
31
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
32
- desc = { enumerable: true, get: function() { return m[k]; } };
33
- }
34
- Object.defineProperty(o, k2, desc);
35
- }) : (function(o, m, k, k2) {
36
- if (k2 === undefined) k2 = k;
37
- o[k2] = m[k];
38
- }));
39
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
40
- Object.defineProperty(o, "default", { enumerable: true, value: v });
41
- }) : function(o, v) {
42
- o["default"] = v;
43
- });
44
- var __importStar = (this && this.__importStar) || function (mod) {
45
- if (mod && mod.__esModule) return mod;
46
- var result = {};
47
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
48
- __setModuleDefault(result, mod);
49
- return result;
50
- };
51
- var __importDefault = (this && this.__importDefault) || function (mod) {
52
- return (mod && mod.__esModule) ? mod : { "default": mod };
53
- };
54
- Object.defineProperty(exports, "__esModule", { value: true });
55
- var React = __importStar(require("react"));
56
- var Portal_1 = __importDefault(require("../portal/Portal"));
57
- var Button_1 = __importDefault(require("../button/Button"));
58
- var copy_1 = require("../../constants/copy");
59
- var icons_1 = require("../../constants/icons");
60
- var ErrorMessagePreview = /** @class */ (function (_super) {
61
- __extends(ErrorMessagePreview, _super);
62
- function ErrorMessagePreview(props) {
63
- var _this = _super.call(this, props) || this;
64
- _this.errorMsgNode = null;
65
- _this.errorMsgNode = React.createRef();
66
- _this.evtHandlers = {
67
- onClose: function (e) { return _this.onClose(e); }
68
- };
69
- return _this;
70
- }
71
- ErrorMessagePreview.prototype.onClose = function (e) {
72
- var onRequestClose = this.props.onRequestClose;
73
- e.stopPropagation();
74
- onRequestClose();
75
- };
76
- ErrorMessagePreview.prototype.render = function () {
77
- var _a = this.props, showMedia = _a.showMedia, style = _a.style, message = _a.message;
78
- if (showMedia) {
79
- return (React.createElement(Portal_1.default, { id: 'portal-root' },
80
- React.createElement("div", { style: __assign({}, style), className: 'close-icon-preview' },
81
- React.createElement(Button_1.default, { key: 'btn-filter', onClick: this.evtHandlers.onClose, size: 'large', style: 'subtle', tooltip: copy_1.assets.field.tooltipFilter }, icons_1.ICON_TIMES)),
82
- React.createElement("p", { style: style, ref: this.errorMsgNode, className: 'asset-preview-background media-preview' }, message)));
83
- }
84
- else {
85
- return null;
86
- }
87
- };
88
- return ErrorMessagePreview;
89
- }(React.PureComponent));
90
- exports.default = ErrorMessagePreview;
91
- //# sourceMappingURL=ErrorMessagePreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ErrorMessagePreview.js","sourceRoot":"","sources":["../../../../src/components/error-message-preview/ErrorMessagePreview.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAA+B;AAC/B,4DAAsC;AACtC,4DAAsC;AACtC,6CAAsD;AACtD,+CAAmD;AASnD;IAAkC,uCAA8C;IAK5E,6BAAY,KAAK;QAAjB,YACI,kBAAM,KAAK,CAAC,SAKf;QAVO,kBAAY,GAAQ,IAAI,CAAC;QAM7B,KAAI,CAAC,YAAY,GAAG,KAAK,CAAC,SAAS,EAAE,CAAC;QACtC,KAAI,CAAC,WAAW,GAAG;YACf,OAAO,EAAE,UAAC,CAAC,IAAK,OAAA,KAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAf,CAAe;SAClC,CAAC;;IACN,CAAC;IAEO,qCAAO,GAAf,UAAgB,CAAC;QACL,IAAA,cAAc,GAAK,IAAI,CAAC,KAAK,eAAf,CAAgB;QACtC,CAAC,CAAC,eAAe,EAAE,CAAC;QACpB,cAAc,EAAE,CAAC;IACrB,CAAC;IAEM,oCAAM,GAAb;QACU,IAAA,KAAgC,IAAI,CAAC,KAAK,EAAxC,SAAS,eAAA,EAAE,KAAK,WAAA,EAAE,OAAO,aAAe,CAAC;QACjD,IAAI,SAAS,EAAE;YACX,OAAO,CACH,oBAAC,gBAAM,IAAC,EAAE,EAAC,aAAa;gBACpB,6BACI,KAAK,eAAO,KAAK,GACjB,SAAS,EAAE,oBAAoB;oBAC/B,oBAAC,gBAAM,IACH,GAAG,EAAC,YAAY,EAChB,OAAO,EAAE,IAAI,CAAC,WAAW,CAAC,OAAO,EACjC,IAAI,EAAE,OAAO,EACb,KAAK,EAAC,QAAQ,EACd,OAAO,EAAE,aAAI,CAAC,KAAK,CAAC,aAAa,IAChC,kBAAU,CACN,CACP;gBACN,2BACI,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,IAAI,CAAC,YAAY,EACtB,SAAS,EAAC,wCAAwC,IACjD,OAAO,CACR,CACC,CACZ,CAAC;SACL;aAAM;YACH,OAAO,IAAI,CAAC;SACf;IACL,CAAC;IACL,0BAAC;AAAD,CAAC,AAhDD,CAAkC,KAAK,CAAC,aAAa,GAgDpD;AAED,kBAAe,mBAAmB,CAAC"}
File without changes
@@ -1 +0,0 @@
1
- //# sourceMappingURL=batches.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"batches.js","sourceRoot":"","sources":["../../../../src/redux/actions/batches.ts"],"names":[],"mappings":""}
@@ -1,5 +0,0 @@
1
- declare const layerCopy: any;
2
- export declare const copyLayer: (layer: any) => any;
3
- export declare const setCanCopy: (canCopy: any) => any;
4
- export declare const clearCopy: () => any;
5
- export default layerCopy;
@@ -1,34 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.clearCopy = exports.setCanCopy = exports.copyLayer = void 0;
4
- var layerCopy = {
5
- COPY_LAYER: 'layerCopy/COPY_LAYER',
6
- CLEAR_COPY: 'layerCopy/CLEAR_COPY',
7
- CAN_COPY: 'layerCopy/CAN_COPY'
8
- };
9
- var copyLayer = function (layer) {
10
- return function (dispatch) {
11
- return new Promise(function (resolve) {
12
- dispatch({ type: layerCopy.COPY_LAYER, layer: layer });
13
- resolve();
14
- });
15
- };
16
- };
17
- exports.copyLayer = copyLayer;
18
- var setCanCopy = function (canCopy) {
19
- return function (dispatch) {
20
- return new Promise(function (resolve) {
21
- dispatch({ type: layerCopy.CAN_COPY, canCopy: canCopy });
22
- resolve();
23
- });
24
- };
25
- };
26
- exports.setCanCopy = setCanCopy;
27
- var clearCopy = function () {
28
- return function (dispatch) {
29
- dispatch({ type: layerCopy.CLEAR_COPY });
30
- };
31
- };
32
- exports.clearCopy = clearCopy;
33
- exports.default = layerCopy;
34
- //# sourceMappingURL=layerCopy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layerCopy.js","sourceRoot":"","sources":["../../../../src/redux/actions/layerCopy.ts"],"names":[],"mappings":";;;AAAA,IAAM,SAAS,GAAQ;IACnB,UAAU,EAAE,sBAAsB;IAClC,UAAU,EAAE,sBAAsB;IAClC,QAAQ,EAAE,oBAAoB;CACjC,CAAC;AAEK,IAAM,SAAS,GAAG,UAAC,KAAK;IAC3B,OAAO,UAAC,QAAQ;QACZ,OAAO,IAAI,OAAO,CAAO,UAAC,OAAO;YAC7B,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,UAAU,EAAE,KAAK,OAAA,EAAE,CAAC,CAAC;YAChD,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,SAAS,aAOpB;AAEK,IAAM,UAAU,GAAG,UAAC,OAAO;IAC9B,OAAO,UAAC,QAAQ;QACZ,OAAO,IAAI,OAAO,CAAO,UAAC,OAAO;YAC7B,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,QAAQ,EAAE,OAAO,SAAA,EAAE,CAAC,CAAC;YAChD,OAAO,EAAE,CAAC;QACd,CAAC,CAAC,CAAC;IACP,CAAC,CAAC;AACN,CAAC,CAAC;AAPW,QAAA,UAAU,cAOrB;AAEK,IAAM,SAAS,GAAG;IACrB,OAAO,UAAC,QAAQ;QACZ,QAAQ,CAAC,EAAE,IAAI,EAAE,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC;IAC7C,CAAC,CAAC;AACN,CAAC,CAAC;AAJW,QAAA,SAAS,aAIpB;AAEF,kBAAe,SAAS,CAAC"}
File without changes
@@ -1 +0,0 @@
1
- //# sourceMappingURL=batches.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"batches.js","sourceRoot":"","sources":["../../../../src/redux/reducers/batches.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- declare const layerCopy: (state: any, action: any) => any;
2
- export default layerCopy;
@@ -1,36 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- var layerCopy_1 = __importDefault(require("../actions/layerCopy"));
18
- var initialState = {
19
- copied: {},
20
- canCopy: true
21
- };
22
- var layerCopy = function (state, action) {
23
- if (state === void 0) { state = initialState; }
24
- switch (action.type) {
25
- case layerCopy_1.default.COPY_LAYER:
26
- return __assign(__assign({}, state), { copied: __assign(__assign({}, state.copied), action.layer) });
27
- case layerCopy_1.default.CAN_COPY:
28
- return __assign(__assign({}, state), { canCopy: action.canCopy });
29
- case layerCopy_1.default.CLEAR_COPY:
30
- return initialState;
31
- default:
32
- return state;
33
- }
34
- };
35
- exports.default = layerCopy;
36
- //# sourceMappingURL=layerCopy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"layerCopy.js","sourceRoot":"","sources":["../../../../src/redux/reducers/layerCopy.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mEAA2C;AAE3C,IAAM,YAAY,GAAQ;IACtB,MAAM,EAAE,EAAE;IACV,OAAO,EAAE,IAAI;CAChB,CAAC;AAEF,IAAM,SAAS,GAAG,UAAC,KAAoB,EAAE,MAAM;IAA5B,sBAAA,EAAA,oBAAoB;IACnC,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,mBAAO,CAAC,UAAU;YACnB,6BACO,KAAK,KACR,MAAM,wBAAM,KAAK,CAAC,MAAM,GAAK,MAAM,CAAC,KAAK,KAC3C;QACN,KAAK,mBAAO,CAAC,QAAQ;YACjB,6BACO,KAAK,KACR,OAAO,EAAE,MAAM,CAAC,OAAO,IACzB;QACN,KAAK,mBAAO,CAAC,UAAU;YACnB,OAAO,YAAY,CAAC;QACxB;YACI,OAAO,KAAK,CAAC;KACpB;AACL,CAAC,CAAC;AAEF,kBAAe,SAAS,CAAC"}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- interface IAssetsTableDurationCell {
3
- cell: any;
4
- }
5
- declare const AssetsTableDurationCell: React.FC<IAssetsTableDurationCell>;
6
- export declare const secondsToTime: (timeInSeconds: any) => string;
7
- export default AssetsTableDurationCell;
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- const AssetsTableDurationCell = (props) => {
3
- const { cell: { row: { original: { duration } } } } = props;
4
- if (duration !== null && duration !== undefined) {
5
- return React.createElement("div", { className: 'asset-duration-cell' }, secondsToTime(duration));
6
- }
7
- else {
8
- return React.createElement("div", { className: 'asset-duration-cell' });
9
- }
10
- };
11
- export const secondsToTime = (timeInSeconds) => {
12
- const minutes = Math.floor(timeInSeconds / 60);
13
- let seconds = Math.floor(timeInSeconds - minutes * 60);
14
- if (seconds < 10) {
15
- seconds = `0${seconds}`;
16
- }
17
- return `${minutes}:${seconds}`;
18
- };
19
- export default AssetsTableDurationCell;
20
- //# sourceMappingURL=AssetsTableDurationCell%20copy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"AssetsTableDurationCell copy.js","sourceRoot":"","sources":["../../../../src/components/assets/AssetsTableDurationCell copy.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,uBAAuB,GAAuC,CAChE,KAA+B,EACjC,EAAE;IACA,MAAM,EACF,IAAI,EAAE,EACF,GAAG,EAAE,EACD,QAAQ,EAAE,EAAE,QAAQ,EAAE,EACzB,EACJ,EACJ,GAAG,KAAK,CAAC;IAEV,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,KAAK,SAAS,EAAE;QAC7C,OAAO,6BAAK,SAAS,EAAC,qBAAqB,IAAE,aAAa,CAAC,QAAQ,CAAC,CAAO,CAAC;KAC/E;SAAM;QACH,OAAO,6BAAK,SAAS,EAAC,qBAAqB,GAAO,CAAC;KACtD;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,aAAa,EAAU,EAAE;IACnD,MAAM,OAAO,GAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,EAAE,CAAC,CAAC;IACpD,IAAI,OAAO,GAAQ,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,OAAO,GAAG,EAAE,CAAC,CAAC;IAC5D,IAAI,OAAO,GAAG,EAAE,EAAE;QACd,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;KAC3B;IACD,OAAO,GAAG,OAAO,IAAI,OAAO,EAAE,CAAC;AACnC,CAAC,CAAC;AAEF,eAAe,uBAAuB,CAAC"}
@@ -1,7 +0,0 @@
1
- import * as React from 'react';
2
- interface IAssetsTableFrameRateCell {
3
- cell: any;
4
- }
5
- declare const AssetsTableFrameRateCell: React.FC<IAssetsTableFrameRateCell>;
6
- export declare const secondsToTime: (timeInSeconds: any) => string;
7
- export default AssetsTableFrameRateCell;
@@ -1,20 +0,0 @@
1
- import * as React from 'react';
2
- const AssetsTableFrameRateCell = (props) => {
3
- const { cell: { row: { original: { duration } } } } = props;
4
- if (duration !== null && duration !== undefined) {
5
- return React.createElement("div", { className: 'asset-duration-cell' }, secondsToTime(duration));
6
- }
7
- else {
8
- return React.createElement("div", { className: 'asset-duration-cell' });
9
- }
10
- };
11
- export const secondsToTime = (timeInSeconds) => {
12
- const minutes = Math.floor(timeInSeconds / 60);
13
- let seconds = Math.floor(timeInSeconds - minutes * 60);
14
- if (seconds < 10) {
15
- seconds = `0${seconds}`;
16
- }
17
- return `${minutes}:${seconds}`;
18
- };
19
- export default AssetsTableFrameRateCell;
20
- //# sourceMappingURL=AssetsTableFrameRateCell.js.map