empower-container 0.1.9 → 0.1.12

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 (83) hide show
  1. package/README.md +70 -2
  2. package/{src/main → dist}/assets/Asset.d.ts +0 -0
  3. package/{src/main → dist}/assets/Asset.js +0 -0
  4. package/{src/main → dist}/assets/Asset.tsx +0 -0
  5. package/{src/main → dist}/assets/icons/icon-check-white-sm.svg +0 -0
  6. package/{src/main → dist}/assets/images/icon-arrowdown-graydark.svg +0 -0
  7. package/{src/main → dist}/assets/images/icon-arrowleft-graydark.svg +0 -0
  8. package/{src/main → dist}/assets/images/icon-arrowright-graydark.svg +0 -0
  9. package/{src/main → dist}/assets/images/icon-arrowup-graydark.svg +0 -0
  10. package/{src/main → dist}/assets/images/icon-check-graydark.svg +0 -0
  11. package/dist/cjs/MenuBar.js +7 -7
  12. package/dist/esm/MenuBar.js +7 -7
  13. package/dist/scss/elements/_button.scss +5 -5
  14. package/dist/scss/library/_menubar.scss +41 -11
  15. package/dist/scss/library/_select.scss +6 -5
  16. package/package.json +2 -2
  17. package/public/favicon.ico +0 -0
  18. package/public/index.html +0 -43
  19. package/public/logo192.png +0 -0
  20. package/public/logo512.png +0 -0
  21. package/public/manifest.json +0 -25
  22. package/public/robots.txt +0 -3
  23. package/src/index.tsx +0 -15
  24. package/src/main/DatetimeFormatter.d.ts +0 -3
  25. package/src/main/DatetimeFormatter.js +0 -389
  26. package/src/main/DatetimeFormatter.tsx +0 -392
  27. package/src/main/Information.d.ts +0 -10
  28. package/src/main/Information.js +0 -65
  29. package/src/main/Information.tsx +0 -112
  30. package/src/main/MenuBar.d.ts +0 -24
  31. package/src/main/MenuBar.js +0 -650
  32. package/src/main/MenuBar.tsx +0 -1072
  33. package/src/main/Modal.d.ts +0 -33
  34. package/src/main/Modal.js +0 -24
  35. package/src/main/Modal.tsx +0 -83
  36. package/src/main/constants/Constant.d.ts +0 -15
  37. package/src/main/constants/Constant.js +0 -44
  38. package/src/main/index.d.ts +0 -3
  39. package/src/main/index.js +0 -10
  40. package/src/main/index.tsx +0 -5
  41. package/src/main/inputs/Input.d.ts +0 -25
  42. package/src/main/inputs/Input.js +0 -135
  43. package/src/main/inputs/Input.tsx +0 -193
  44. package/src/main/inputs/InputSelectionHandler.d.ts +0 -2
  45. package/src/main/inputs/InputSelectionHandler.js +0 -36
  46. package/src/main/inputs/InputSelectionHandler.tsx +0 -21
  47. package/src/main/inputs/Select.d.ts +0 -28
  48. package/src/main/inputs/Select.js +0 -456
  49. package/src/main/inputs/Select.tsx +0 -654
  50. package/src/main/tsconfig.common.json +0 -34
  51. package/src/main/tsconfig.json +0 -35
  52. package/src/sample/App.css +0 -38
  53. package/src/sample/App.d.ts +0 -3
  54. package/src/sample/App.js +0 -13
  55. package/src/sample/App.test.d.ts +0 -1
  56. package/src/sample/App.test.js +0 -13
  57. package/src/sample/App.test.tsx +0 -9
  58. package/src/sample/App.tsx +0 -15
  59. package/src/sample/TestMenuBar.d.ts +0 -2
  60. package/src/sample/TestMenuBar.js +0 -508
  61. package/src/sample/TestMenuBar.tsx +0 -362
  62. package/src/sample/react-app-env.d.ts +0 -1
  63. package/src/sample/reportWebVitals.d.ts +0 -3
  64. package/src/sample/reportWebVitals.js +0 -38
  65. package/src/sample/reportWebVitals.ts +0 -15
  66. package/src/sample/setupTests.d.ts +0 -1
  67. package/src/sample/setupTests.js +0 -7
  68. package/src/sample/setupTests.ts +0 -5
  69. package/src/sample/tsconfig.json +0 -36
  70. package/src/scss/components/_modal.scss +0 -66
  71. package/src/scss/elements/_button.scss +0 -107
  72. package/src/scss/elements/_index.scss +0 -2
  73. package/src/scss/elements/_popover.scss +0 -8
  74. package/src/scss/foundation/_colors.scss +0 -60
  75. package/src/scss/foundation/_mixins.scss +0 -41
  76. package/src/scss/foundation/_normalize.scss +0 -204
  77. package/src/scss/foundation/_settings.scss +0 -36
  78. package/src/scss/foundation/_typography.scss +0 -95
  79. package/src/scss/library/_information.scss +0 -68
  80. package/src/scss/library/_input.scss +0 -37
  81. package/src/scss/library/_menubar.scss +0 -225
  82. package/src/scss/library/_select.scss +0 -258
  83. package/src/scss/style.scss +0 -24
package/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  ## 1) Menubar
8
8
  ### Implementation
9
9
  ```js
10
- import { MenuBar } from 'empower-container';
10
+ import { MenuBar } from 'empoower-container';
11
11
  ```
12
12
  ### Options
13
13
 
@@ -19,6 +19,39 @@ config: {
19
19
  iconType: ['check', "back", 'standard']
20
20
  }
21
21
  ```
22
+ ```js
23
+ mainButton: {
24
+ show: true,
25
+ label: 'File a Request',
26
+ icon: SVG_ADD,
27
+ actions: [
28
+ {
29
+
30
+ label: "File Leave",
31
+ action: "leave", // string optional
32
+ icon: SVG_SUBMIT
33
+ },
34
+ {
35
+ label: "File Overtime",
36
+ action: "overtime", // string optional
37
+ icon: SVG_SUBMIT
38
+ },
39
+
40
+ {
41
+ label: "File Toil",
42
+ action: "toil", // string optional
43
+ icon: SVG_SUBMIT
44
+ },
45
+
46
+ {
47
+ label: "File Amendment",
48
+ action: "amendment", // string optional
49
+ icon: SVG_SUBMIT
50
+ }
51
+ ]
52
+ }
53
+ ```
54
+
22
55
  ```js
23
56
  button {
24
57
  show: true
@@ -135,6 +168,7 @@ info: 'Sample Information'
135
168
  ```html
136
169
  <MenuBar
137
170
  config={menubar.config}
171
+ mainButton={menubar.mainButton}
138
172
  button={menubar.button}
139
173
  pagination={menubar.pagination}
140
174
  pivot={menubar.pivot}
@@ -156,7 +190,7 @@ info: 'Sample Information'
156
190
  ## 2) Modal
157
191
  ### Implementation
158
192
  ```js
159
- import { Modal } from 'empower-container';
193
+ import { Modal } from 'empoower-container';
160
194
  ```
161
195
  ### Options
162
196
 
@@ -172,6 +206,39 @@ config: {
172
206
  modalSize: 'lg'
173
207
  }
174
208
  ```
209
+ ```js
210
+ mainButton: {
211
+ show: true,
212
+ label: 'File a Request',
213
+ icon: SVG_ADD,
214
+ actions: [
215
+ {
216
+
217
+ label: "File Leave",
218
+ action: "leave", // string optional
219
+ icon: SVG_SUBMIT
220
+ },
221
+ {
222
+ label: "File Overtime",
223
+ action: "overtime", // string optional
224
+ icon: SVG_SUBMIT
225
+ },
226
+
227
+ {
228
+ label: "File Toil",
229
+ action: "toil", // string optional
230
+ icon: SVG_SUBMIT
231
+ },
232
+
233
+ {
234
+ label: "File Amendment",
235
+ action: "amendment", // string optional
236
+ icon: SVG_SUBMIT
237
+ }
238
+ ]
239
+ }
240
+ ```
241
+
175
242
  ```js
176
243
  button {
177
244
  show: true
@@ -287,6 +354,7 @@ info: 'Sample Information'
287
354
  ```html
288
355
  <Modal
289
356
  config={menubar.config}
357
+ mainButton={menubar.mainButton}
290
358
  button={menubar.button}
291
359
  pagination={menubar.pagination}
292
360
  pivot={menubar.pivot}
File without changes
File without changes
File without changes
@@ -456,20 +456,20 @@ var MenuBar = function (_a) {
456
456
  // Information Configuration
457
457
  config && config.showInfo.constructor === Boolean && config.showInfo === true ? ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-belt-info" }, { children: [(0, jsx_runtime_1.jsx)("a", __assign({ href: "#", onClick: function (event) { return popoverRequestHandler(event, 'info'); }, "data-testid": "menubar-information" }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "em-info-icon" }, { children: Asset_1.SVG_INFORMATION })) })), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "InfoPopOver", open: Boolean(infoPopover), className: Boolean(dropdownPopover) ? 'open-popover' : '', onClick: function (event) { return popoverRequestHandler(event, 'info'); } }, { children: (0, jsx_runtime_1.jsx)(Information_1.default, { items: info && info.infoDetails ? info.infoDetails : info, listRow: info && info.listRow ? info.listRow : [], desc: info && info.listRow && info.listRow.length > 0 ? false : true, title: config && config.title ? config.title.toUpperCase() : null, hide: function (event) { return popoverRequestHandler(event, 'info', true); } }) }))] })) })) : null,
458
458
  // Additional title on the modal
459
- config && config.addedTitle ? ((0, jsx_runtime_1.jsx)("p", { children: config.addedTitle })) : null] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-beltleft-cta" }, { children: [mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 1 ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("a", __assign({ className: "belt-action-main", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "popover em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
460
- return (0, jsx_runtime_1.jsx)("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
461
- }) })) }))] })) : mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length === 1 ? (mainButton.actions.map(function (btn, idx) {
459
+ config && config.addedTitle ? ((0, jsx_runtime_1.jsx)("p", { children: config.addedTitle })) : null] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-beltleft-cta" }, { children: [mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 1 ? ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-dropdown" }, { children: [(0, jsx_runtime_1.jsxs)("a", __assign({ className: "em-button belt-action-main", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "popover em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
460
+ return (0, jsx_runtime_1.jsx)("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
461
+ }) })) }))] })) })) : mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length === 1 ? (mainButton.actions.map(function (btn, idx) {
462
462
  return ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? 'belt-action ' + btn.class : 'belt-action', href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon " }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: btn.label ? btn.label : '' })] }), idx));
463
463
  })) : null) : null,
464
464
  // Button Actions Configuration
465
465
  button && button.show && button.show.constructor === Boolean &&
466
466
  button.actions && button.actions.constructor === Array && button.actions.length > 0 ? (button.actions.map(function (btn, idx) {
467
- return ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
467
+ return ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : ' belt-action' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
468
468
  })) : null,
469
469
  // UndoButton Actions Configuration
470
470
  undoButton && undoButton.show && !undoButton.isFooter &&
471
471
  undoButton.actions && undoButton.actions.constructor === Array && undoButton.actions.length > 0 ? (undoButton.actions.map(function (btn, idx) {
472
- return seconds > 0 || (btn.timer !== undefined) ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
472
+ return seconds > 0 || (btn.timer !== undefined) ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' em-button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
473
473
  })) : null] }))] })), (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-belt-right" }, { children: [
474
474
  // Dropdown Actions Configuration
475
475
  dropdown && dropdown.show && dropdown.show.constructor === Boolean ? ((0, jsx_runtime_1.jsx)(react_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-dropdown" }, { children: [dropdown.type === 'list' ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "icon-add" }, { children: dropdown.icon ? dropdown.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: dropdownTitle })] }))) : dropdown.type === 'date-picker-weekly' ? ((0, jsx_runtime_1.jsxs)("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [(0, jsx_runtime_1.jsx)("span", { children: dropdownTitle }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "icon-arrowdown" }, { children: Asset_1.SVG_ARROWDOWN }))] }))) : dropdown.type === 'date-picker-monthly' ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [(0, jsx_runtime_1.jsx)("span", { children: dropdownTitle }), (0, jsx_runtime_1.jsx)("div", __assign({ className: "icon-arrowdown" }, { children: Asset_1.SVG_ARROWDOWN }))] })), dropdown.showPagination ? ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [(0, jsx_runtime_1.jsx)("a", __assign({ className: 'belt-prev' + isDisabledDropdownPagination('prev'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'prev-month'); } }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: Asset_1.SVG_ARROWLEFT })) })), (0, jsx_runtime_1.jsx)("a", __assign({ className: 'belt-next' + isDisabledDropdownPagination('next'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'next-month'); } }, { children: (0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: Asset_1.SVG_ARROWRIGHT })) }))] })) : null] })) : dropdown.type === 'date-picker-cutoff' ? (((0, jsx_runtime_1.jsx)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: (0, jsx_runtime_1.jsx)("span", { children: dropdown.cutoffValue && dropdown.cutoffValue.label ? dropdown.cutoffValue.label : '' }) })))) : dropdown.type === 'button' ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', dropdown.action); } }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: dropdown.icon ? dropdown.icon : '' })), (0, jsx_runtime_1.jsx)("span", { children: dropdownTitle })] }))) : ((0, jsx_runtime_1.jsx)("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: (0, jsx_runtime_1.jsx)("span", { children: dropdownTitle }) }))), (0, jsx_runtime_1.jsx)(Select_1.Popover, __assign({ id: "dropdownPopover", className: Boolean(dropdownPopover) ? 'open-popover' : '', open: Boolean(dropdownPopover), onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: dropdown.type === 'list' ? (dropdown.actions && dropdown.actions.constructor === Array && dropdown.actions.length > 0 ? ((0, jsx_runtime_1.jsx)("div", __assign({ className: "popover em-popover-list" }, { children: dropdown.actions.map(function (drpdwn, idx) {
@@ -527,11 +527,11 @@ var MenuBar = function (_a) {
527
527
  value: searchTemporaryValue ? searchTemporaryValue : ''
528
528
  }, onChanged: function (event) { return handleChangeFormValue(event, 'search'); }, keyPressed: function (event) { return actionRequestHandler(event, 'search', 'search'); } }) })) }))) : null, children, (0, jsx_runtime_1.jsxs)("div", __assign({ className: "em-card-footer" }, { children: [buttonFooter && buttonFooter.show && buttonFooter.actions.length > 0 &&
529
529
  (0, jsx_runtime_1.jsx)("div", __assign({ className: buttonFooter.className }, { children: buttonFooter.actions.map(function (btn, idx) { return (btn.show &&
530
- (0, jsx_runtime_1.jsxs)("a", __assign({ className: 'button ' + btn.className, href: "#" }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); } }), { "data-testid": btn.id && btn.id.constructor === String ? btn.id : 'default-button-footer' }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx)); }) })),
530
+ (0, jsx_runtime_1.jsxs)("a", __assign({ className: 'em-button ' + btn.className, href: "#" }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); } }), { "data-testid": btn.id && btn.id.constructor === String ? btn.id : 'default-button-footer' }, { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx)); }) })),
531
531
  // UndoButton Actions Configuration
532
532
  undoButton && undoButton.show && undoButton.isFooter &&
533
533
  undoButton.actions && undoButton.actions.constructor === Array && undoButton.actions.length > 0 ? (undoButton.actions.map(function (btn, idx) {
534
- return seconds > 0 || (btn.timer !== undefined) ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : 'button ' + ' ' + (idx === 0 ? 'disabled' : 'outline button-undo') + (btn.disabled === true ? ' is-disabled button-undo' : ''), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
534
+ return seconds > 0 || (btn.timer !== undefined) ? ((0, jsx_runtime_1.jsxs)("a", __assign({ className: btn.class ? btn.class : 'em-button ' + ' ' + (idx === 0 ? 'disabled' : 'outline button-undo') + (btn.disabled === true ? ' is-disabled button-undo' : ''), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [(0, jsx_runtime_1.jsx)("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), (0, jsx_runtime_1.jsx)("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
535
535
  })) : null] }))] })));
536
536
  };
537
537
  exports.default = MenuBar;
@@ -451,20 +451,20 @@ var MenuBar = function (_a) {
451
451
  // Information Configuration
452
452
  config && config.showInfo.constructor === Boolean && config.showInfo === true ? (_jsx(Fragment, { children: _jsxs("div", __assign({ className: "em-belt-info" }, { children: [_jsx("a", __assign({ href: "#", onClick: function (event) { return popoverRequestHandler(event, 'info'); }, "data-testid": "menubar-information" }, { children: _jsx("div", __assign({ className: "em-info-icon" }, { children: SVG_INFORMATION })) })), _jsx(Popover, __assign({ id: "InfoPopOver", open: Boolean(infoPopover), className: Boolean(dropdownPopover) ? 'open-popover' : '', onClick: function (event) { return popoverRequestHandler(event, 'info'); } }, { children: _jsx(Information, { items: info && info.infoDetails ? info.infoDetails : info, listRow: info && info.listRow ? info.listRow : [], desc: info && info.listRow && info.listRow.length > 0 ? false : true, title: config && config.title ? config.title.toUpperCase() : null, hide: function (event) { return popoverRequestHandler(event, 'info', true); } }) }))] })) })) : null,
453
453
  // Additional title on the modal
454
- config && config.addedTitle ? (_jsx("p", { children: config.addedTitle })) : null] })), _jsxs("div", __assign({ className: "em-beltleft-cta" }, { children: [mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 1 ? (_jsxs(Fragment, { children: [_jsxs("a", __assign({ className: "belt-action-main", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), _jsx("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), _jsx(Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: _jsx("div", __assign({ className: "popover em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
455
- return _jsx("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
456
- }) })) }))] })) : mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length === 1 ? (mainButton.actions.map(function (btn, idx) {
454
+ config && config.addedTitle ? (_jsx("p", { children: config.addedTitle })) : null] })), _jsxs("div", __assign({ className: "em-beltleft-cta" }, { children: [mainButton && mainButton.show ? (mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length > 1 ? (_jsx(Fragment, { children: _jsxs("div", __assign({ className: "em-dropdown" }, { children: [_jsxs("a", __assign({ className: "em-button belt-action-main", id: "main-button", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'main-button'); } }, { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: mainButton.icon ? mainButton.icon : '' })), _jsx("span", { children: mainButton.label ? mainButton.label : 'File a Request' })] })), _jsx(Popover, __assign({ id: "mainButtonPopover", open: Boolean(mainButtonPopover), onClick: function (event) { return popoverRequestHandler(event, 'main-button'); }, className: Boolean(dropdownPopover) ? 'open-popover' : '' }, { children: _jsx("div", __assign({ className: "popover em-popover-list" }, { children: mainButton.actions.map(function (btn, idx) {
455
+ return _jsx("a", __assign({ href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: btn.label }), idx);
456
+ }) })) }))] })) })) : mainButton.actions && mainButton.actions.constructor === Array && mainButton.actions.length === 1 ? (mainButton.actions.map(function (btn, idx) {
457
457
  return (_jsxs("a", __assign({ className: btn.class ? 'belt-action ' + btn.class : 'belt-action', href: "#", onClick: function (event) { return actionRequestHandler(event, 'main-button', btn.action); } }, { children: [_jsx("div", __assign({ className: "belt-icon " }, { children: btn.icon ? btn.icon : '' })), _jsx("span", { children: btn.label ? btn.label : '' })] }), idx));
458
458
  })) : null) : null,
459
459
  // Button Actions Configuration
460
460
  button && button.show && button.show.constructor === Boolean &&
461
461
  button.actions && button.actions.constructor === Array && button.actions.length > 0 ? (button.actions.map(function (btn, idx) {
462
- return (_jsxs("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [_jsx("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
462
+ return (_jsxs("a", __assign({ className: btn.class ? btn.class : ' belt-action' + ' ' + (idx === 0 ? 'is-primary' : ''), href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); }, "data-testid": "menubar-button" }, { children: [_jsx("div", __assign({ className: "belt-icon belt-buttons" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx));
463
463
  })) : null,
464
464
  // UndoButton Actions Configuration
465
465
  undoButton && undoButton.show && !undoButton.isFooter &&
466
466
  undoButton.actions && undoButton.actions.constructor === Array && undoButton.actions.length > 0 ? (undoButton.actions.map(function (btn, idx) {
467
- return seconds > 0 || (btn.timer !== undefined) ? (_jsxs("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
467
+ return seconds > 0 || (btn.timer !== undefined) ? (_jsxs("a", __assign({ className: btn.class ? btn.class : 'belt-action' + ' ' + (idx === 0 ? 'is-primary' : '') + (btn.disabled === true ? ' is-disabled' : ' em-button outline button-undo'), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
468
468
  })) : null] }))] })), _jsxs("div", __assign({ className: "em-belt-right" }, { children: [
469
469
  // Dropdown Actions Configuration
470
470
  dropdown && dropdown.show && dropdown.show.constructor === Boolean ? (_jsx(Fragment, { children: _jsxs("div", __assign({ className: "em-dropdown" }, { children: [dropdown.type === 'list' ? (_jsxs("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [_jsx("div", __assign({ className: "icon-add" }, { children: dropdown.icon ? dropdown.icon : '' })), _jsx("span", { children: dropdownTitle })] }))) : dropdown.type === 'date-picker-weekly' ? (_jsxs("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [_jsx("span", { children: dropdownTitle }), _jsx("div", __assign({ className: "icon-arrowdown" }, { children: SVG_ARROWDOWN }))] }))) : dropdown.type === 'date-picker-monthly' ? (_jsxs(Fragment, { children: [_jsxs("a", __assign({ id: "months", className: "belt-dropdown ".concat(Boolean(dropdownPopover) ? 'is-active' : ''), href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: [_jsx("span", { children: dropdownTitle }), _jsx("div", __assign({ className: "icon-arrowdown" }, { children: SVG_ARROWDOWN }))] })), dropdown.showPagination ? (_jsxs(Fragment, { children: [_jsx("a", __assign({ className: 'belt-prev' + isDisabledDropdownPagination('prev'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'prev-month'); } }, { children: _jsx("div", __assign({ className: "belt-icon" }, { children: SVG_ARROWLEFT })) })), _jsx("a", __assign({ className: 'belt-next' + isDisabledDropdownPagination('next'), href: "#", onClick: function (event) { return dateMonthlyPickerHandler(event, 'next-month'); } }, { children: _jsx("div", __assign({ className: "belt-icon" }, { children: SVG_ARROWRIGHT })) }))] })) : null] })) : dropdown.type === 'date-picker-cutoff' ? ((_jsx("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: _jsx("span", { children: dropdown.cutoffValue && dropdown.cutoffValue.label ? dropdown.cutoffValue.label : '' }) })))) : dropdown.type === 'button' ? (_jsxs("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return actionRequestHandler(event, 'button', dropdown.action); } }, { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: dropdown.icon ? dropdown.icon : '' })), _jsx("span", { children: dropdownTitle })] }))) : (_jsx("a", __assign({ className: "belt-dropdown", id: "add", href: "#", onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: _jsx("span", { children: dropdownTitle }) }))), _jsx(Popover, __assign({ id: "dropdownPopover", className: Boolean(dropdownPopover) ? 'open-popover' : '', open: Boolean(dropdownPopover), onClick: function (event) { return popoverRequestHandler(event, 'dropdown'); } }, { children: dropdown.type === 'list' ? (dropdown.actions && dropdown.actions.constructor === Array && dropdown.actions.length > 0 ? (_jsx("div", __assign({ className: "popover em-popover-list" }, { children: dropdown.actions.map(function (drpdwn, idx) {
@@ -522,11 +522,11 @@ var MenuBar = function (_a) {
522
522
  value: searchTemporaryValue ? searchTemporaryValue : ''
523
523
  }, onChanged: function (event) { return handleChangeFormValue(event, 'search'); }, keyPressed: function (event) { return actionRequestHandler(event, 'search', 'search'); } }) })) }))) : null, children, _jsxs("div", __assign({ className: "em-card-footer" }, { children: [buttonFooter && buttonFooter.show && buttonFooter.actions.length > 0 &&
524
524
  _jsx("div", __assign({ className: buttonFooter.className }, { children: buttonFooter.actions.map(function (btn, idx) { return (btn.show &&
525
- _jsxs("a", __assign({ className: 'button ' + btn.className, href: "#" }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); } }), { "data-testid": btn.id && btn.id.constructor === String ? btn.id : 'default-button-footer' }, { children: [_jsx("div", __assign({ className: "icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx)); }) })),
525
+ _jsxs("a", __assign({ className: 'em-button ' + btn.className, href: "#" }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'button', btn.action); } }), { "data-testid": btn.id && btn.id.constructor === String ? btn.id : 'default-button-footer' }, { children: [_jsx("div", __assign({ className: "icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": 'button-action-' + btn.action }, { children: btn.label ? btn.label : '' }))] }), idx)); }) })),
526
526
  // UndoButton Actions Configuration
527
527
  undoButton && undoButton.show && undoButton.isFooter &&
528
528
  undoButton.actions && undoButton.actions.constructor === Array && undoButton.actions.length > 0 ? (undoButton.actions.map(function (btn, idx) {
529
- return seconds > 0 || (btn.timer !== undefined) ? (_jsxs("a", __assign({ className: btn.class ? btn.class : 'button ' + ' ' + (idx === 0 ? 'disabled' : 'outline button-undo') + (btn.disabled === true ? ' is-disabled button-undo' : ''), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
529
+ return seconds > 0 || (btn.timer !== undefined) ? (_jsxs("a", __assign({ className: btn.class ? btn.class : 'em-button ' + ' ' + (idx === 0 ? 'disabled' : 'outline button-undo') + (btn.disabled === true ? ' is-disabled button-undo' : ''), href: "#", "data-testid": "undo-button-".concat(btn.action) }, (btn.disabled === true ? { onClick: function (event) { event.preventDefault(); } } : { onClick: function (event) { return actionRequestHandler(event, 'undo-button', btn.action); } }), { children: [_jsx("div", __assign({ className: "belt-icon" }, { children: btn.icon ? btn.icon : '' })), _jsx("span", __assign({ "data-testid": "undo-button-text" }, { children: btn.label ? ("".concat(btn.label, " ").concat(btn.timer !== undefined && btn.timer.constructor === Number && seconds > 0 ? ("in ".concat(seconds, "s")) : '')) : '' }))] }), idx)) : null;
530
530
  })) : null] }))] })));
531
531
  };
532
532
  export default MenuBar;
@@ -1,4 +1,4 @@
1
- .button{
1
+ .em-button{
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  justify-content: center;
@@ -11,7 +11,7 @@
11
11
  padding: 15px 30px;
12
12
  height: 50px;
13
13
  cursor: pointer;
14
- transition: all .5s cubic-bezier(.19,1,.22,1);
14
+ transition: $transition;
15
15
  border-radius: 10px;
16
16
  text-transform: none;
17
17
  text-decoration: none;
@@ -19,11 +19,11 @@
19
19
 
20
20
  span{
21
21
  color: $white;
22
- transition: all .5s cubic-bezier(.19,1,.22,1);
22
+ transition: $transition;
23
23
  }
24
24
 
25
25
  svg{
26
- transition: all .5s cubic-bezier(.19,1,.22,1);
26
+ transition: $transition;
27
27
  margin-right: 10px;
28
28
 
29
29
  path{
@@ -86,7 +86,7 @@
86
86
  margin-right: 10px;
87
87
 
88
88
  path, rect, circle {
89
- transition: all .5s cubic-bezier(.19,1,.22,1);
89
+ transition: $transition;
90
90
  fill: $green;;
91
91
  }
92
92
  }
@@ -4,6 +4,10 @@
4
4
  width: 100%;
5
5
  min-height: 40px;
6
6
  padding: 20px 15px;
7
+
8
+ .em-dropdown {
9
+ position: relative;
10
+ }
7
11
 
8
12
  .em-belt-left {
9
13
  display: flex;
@@ -43,12 +47,12 @@
43
47
  display: flex;
44
48
  align-items: center;
45
49
  justify-content: center;
46
- transition: all .5s cubic-bezier(.19,1,.22,1);
50
+ transition: $transition;
47
51
  box-shadow: none;
48
52
 
49
53
  &:hover {
50
54
  svg {
51
- transition: all .5s cubic-bezier(.19,1,.22,1);
55
+ transition: $transition;
52
56
  transform: translateX(-2px);
53
57
  }
54
58
  }
@@ -89,6 +93,36 @@
89
93
  max-height: 40px;
90
94
  padding: 10px 20px;
91
95
  }
96
+
97
+ .em-button{
98
+ &:not(:first-child){
99
+ background-color: transparent;
100
+ color: $green-dark;
101
+ box-shadow: inset 0 0 0 1px $green;
102
+
103
+ svg{
104
+ margin-right: 10px;
105
+
106
+ path, rect, circle {
107
+ transition: $transition;
108
+ fill: $green;;
109
+ }
110
+ }
111
+
112
+ span{
113
+ color: $gray-light4;
114
+ }
115
+
116
+ &:hover{
117
+ background-color: $blue-light1;
118
+ box-shadow: none;
119
+
120
+ span{
121
+ color: $gray;
122
+ }
123
+ }
124
+ }
125
+ }
92
126
  }
93
127
 
94
128
  .em-belt-right {
@@ -101,10 +135,6 @@
101
135
  margin-left: 10px;
102
136
  }
103
137
 
104
- .em-dropdown {
105
- position: relative;
106
- }
107
-
108
138
  .pagination-summary, .belt-dropdown {
109
139
  display: flex;
110
140
  align-items: center;
@@ -117,7 +147,7 @@
117
147
  color: $gray-dark;
118
148
  text-decoration: none;
119
149
  font-size: .875rem;
120
- transition: all .5s cubic-bezier(.19,1,.22,1);
150
+ transition: $transition;
121
151
 
122
152
  &:hover {
123
153
  box-shadow: inset 0 0 0 1px $blue-light4;
@@ -139,7 +169,7 @@
139
169
  height: 20px;
140
170
  width: 20px;
141
171
  margin-left: 15px;
142
- transition: all .5s cubic-bezier(.19,1,.22,1);
172
+ transition: $transition;
143
173
  }
144
174
 
145
175
  .icon-add {
@@ -174,13 +204,13 @@
174
204
  min-width: 40px;
175
205
  box-shadow: inset 0 0 0 1px $blue-light2;
176
206
  border-radius: 10px;
177
- transition: all .5s cubic-bezier(.19,1,.22,1);
207
+ transition: $transition;
178
208
 
179
209
  .belt-icon {
180
210
  height: 20px;
181
211
  width: 20px;
182
212
  background: 50% no-repeat;
183
- transition: all .5s cubic-bezier(.19,1,.22,1);
213
+ transition: $transition;
184
214
  }
185
215
 
186
216
  &:hover {
@@ -213,7 +243,7 @@
213
243
  padding: 10px;
214
244
  box-shadow: none;
215
245
  border-radius: 10px;
216
- transition: all .5s cubic-bezier(.19,1,.22,1);
246
+ transition: $transition;
217
247
 
218
248
  &:hover {
219
249
  background-color: $blue-light1;
@@ -75,7 +75,7 @@
75
75
  font-size: 0.875rem;
76
76
  color: $gray-dark;
77
77
  padding: 20px;
78
- transition: all .5s cubic-bezier(.19,1,.22,1);
78
+ transition: $transition;
79
79
  cursor: pointer;
80
80
 
81
81
  &:hover{
@@ -128,7 +128,7 @@
128
128
  align-items: center;
129
129
  justify-content: center;
130
130
  cursor: pointer;
131
- transition: all .5s cubic-bezier(.19,1,.22,1);
131
+ transition: $transition;
132
132
  }
133
133
  }
134
134
 
@@ -148,7 +148,8 @@
148
148
  text-align: left;
149
149
  border: none;
150
150
  box-shadow: none;
151
- transition: all .5s cubic-bezier(.19,1,.22,1);
151
+ transition: $transition;
152
+ margin-right: 0;
152
153
  cursor: pointer;
153
154
  }
154
155
  }
@@ -169,14 +170,14 @@
169
170
  background-color: transparent;
170
171
  border: none;
171
172
  cursor: pointer;
172
- transition: all .5s cubic-bezier(.19,1,.22,1);
173
+ transition: $transition;
173
174
 
174
175
  svg path {
175
176
  fill: $white;
176
177
  }
177
178
 
178
179
  img {
179
- transition: all .5s cubic-bezier(.19,1,.22,1);
180
+ transition: $transition;
180
181
 
181
182
  &:hover {
182
183
  background-color: transparentize($blue-dark1, 0.5);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "empower-container",
3
- "version": "0.1.9",
3
+ "version": "0.1.12",
4
4
  "private": false,
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -36,7 +36,7 @@
36
36
  "dist": "npm run build:esm && npm run build:cjs && npm run copy-files",
37
37
  "build:esm": "tsc -b src/main/",
38
38
  "build:cjs": "tsc -p src/main/tsconfig.common.json",
39
- "copy-files": "cp -r ./src/scss/ ./dist/",
39
+ "copy-files": "cp -r ./src/scss/ ./dist/ && cp -r ./src/main/assets/ ./dist/",
40
40
  "dev": "npx tsc -p src/sample/tsconfig.json -w"
41
41
  },
42
42
  "eslintConfig": {
Binary file
package/public/index.html DELETED
@@ -1,43 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1" />
7
- <meta name="theme-color" content="#000000" />
8
- <meta
9
- name="description"
10
- content="Web site created using create-react-app"
11
- />
12
- <link rel="apple-touch-icon" href="%PUBLIC_URL%/logo192.png" />
13
- <!--
14
- manifest.json provides metadata used when your web app is installed on a
15
- user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
16
- -->
17
- <link rel="manifest" href="%PUBLIC_URL%/manifest.json" />
18
- <!--
19
- Notice the use of %PUBLIC_URL% in the tags above.
20
- It will be replaced with the URL of the `public` folder during the build.
21
- Only files inside the `public` folder can be referenced from the HTML.
22
-
23
- Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
24
- work correctly both with client-side routing and a non-root public URL.
25
- Learn how to configure a non-root public URL by running `npm run build`.
26
- -->
27
- <title>React App</title>
28
- </head>
29
- <body>
30
- <noscript>You need to enable JavaScript to run this app.</noscript>
31
- <div id="root"></div>
32
- <!--
33
- This HTML file is a template.
34
- If you open it directly in the browser, you will see an empty page.
35
-
36
- You can add webfonts, meta tags, or analytics to this file.
37
- The build step will place the bundled scripts into the <body> tag.
38
-
39
- To begin the development, run `npm start` or `yarn start`.
40
- To create a production bundle, use `npm run build` or `yarn build`.
41
- -->
42
- </body>
43
- </html>
Binary file
Binary file
@@ -1,25 +0,0 @@
1
- {
2
- "short_name": "React App",
3
- "name": "Create React App Sample",
4
- "icons": [
5
- {
6
- "src": "favicon.ico",
7
- "sizes": "64x64 32x32 24x24 16x16",
8
- "type": "image/x-icon"
9
- },
10
- {
11
- "src": "logo192.png",
12
- "type": "image/png",
13
- "sizes": "192x192"
14
- },
15
- {
16
- "src": "logo512.png",
17
- "type": "image/png",
18
- "sizes": "512x512"
19
- }
20
- ],
21
- "start_url": ".",
22
- "display": "standalone",
23
- "theme_color": "#000000",
24
- "background_color": "#ffffff"
25
- }
package/public/robots.txt DELETED
@@ -1,3 +0,0 @@
1
- # https://www.robotstxt.org/robotstxt.html
2
- User-agent: *
3
- Disallow:
package/src/index.tsx DELETED
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import ReactDOM from 'react-dom';
3
-
4
- import App from './sample/App';
5
-
6
- ReactDOM.render(
7
- <React.StrictMode>
8
- <App />
9
- </React.StrictMode>,
10
- document.getElementById('root')
11
- );
12
-
13
- // If you want to start measuring performance in your app, pass a function
14
- // to log results (for example: reportWebVitals(console.log))
15
- // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
@@ -1,3 +0,0 @@
1
- export declare const getUTCFullTime: (d: any) => string;
2
- declare const datetimeFormatter: (timestamp: string | Date | any, format?: string, todayServer?: any, type?: any, getServerTime?: boolean, dateOnly?: boolean) => any;
3
- export default datetimeFormatter;