@teselagen/ui 0.7.33-beta.6 → 0.7.33
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.
- package/AdvancedOptions.js +33 -0
- package/AssignDefaultsModeContext.js +22 -0
- package/CellDragHandle.js +132 -0
- package/ColumnFilterMenu.js +62 -0
- package/Columns.js +979 -0
- package/DataTable/utils/queryParams.d.ts +14 -7
- package/DisabledLoadingComponent.js +15 -0
- package/DisplayOptions.js +199 -0
- package/DropdownButton.js +36 -0
- package/DropdownCell.js +61 -0
- package/EditableCell.js +44 -0
- package/FillWindow.css +6 -0
- package/FillWindow.js +69 -0
- package/FilterAndSortMenu.js +391 -0
- package/FormSeparator.js +9 -0
- package/LoadingDots.js +14 -0
- package/MatchHeaders.js +234 -0
- package/PagingTool.js +225 -0
- package/RenderCell.js +191 -0
- package/SearchBar.js +69 -0
- package/SimpleStepViz.js +22 -0
- package/SortableColumns.js +100 -0
- package/TableFormTrackerContext.js +10 -0
- package/Tag.js +112 -0
- package/ThComponent.js +44 -0
- package/TimelineEvent.js +31 -0
- package/UploadCsvWizard.css +4 -0
- package/UploadCsvWizard.js +719 -0
- package/Uploader.js +1278 -0
- package/adHoc.js +10 -0
- package/autoTooltip.js +201 -0
- package/basicHandleActionsWithFullState.js +14 -0
- package/browserUtils.js +3 -0
- package/combineReducersWithFullState.js +14 -0
- package/commandControls.js +82 -0
- package/commandUtils.js +112 -0
- package/constants.js +1 -0
- package/convertSchema.js +69 -0
- package/customIcons.js +361 -0
- package/dataTableEnhancer.js +41 -0
- package/defaultFormatters.js +32 -0
- package/defaultValidators.js +40 -0
- package/determineBlackOrWhiteTextColor.js +4 -0
- package/editCellHelper.js +44 -0
- package/formatPasteData.js +16 -0
- package/getAllRows.js +11 -0
- package/getCellCopyText.js +7 -0
- package/getCellInfo.js +36 -0
- package/getCellVal.js +20 -0
- package/getDayjsFormatter.js +35 -0
- package/getFieldPathToField.js +7 -0
- package/getIdOrCodeOrIndex.js +9 -0
- package/getLastSelectedEntity.js +11 -0
- package/getNewEntToSelect.js +25 -0
- package/getNewName.js +31 -0
- package/getRowCopyText.js +28 -0
- package/getTableConfigFromStorage.js +5 -0
- package/getTextFromEl.js +28 -0
- package/getVals.js +8 -0
- package/handleCopyColumn.js +21 -0
- package/handleCopyHelper.js +15 -0
- package/handleCopyRows.js +23 -0
- package/handleCopyTable.js +16 -0
- package/handlerHelpers.js +24 -0
- package/hotkeyUtils.js +131 -0
- package/index.cjs.js +972 -837
- package/index.d.ts +0 -1
- package/index.es.js +972 -837
- package/index.js +196 -0
- package/isBeingCalledExcessively.js +31 -0
- package/isBottomRightCornerOfRectangle.js +20 -0
- package/isEntityClean.js +15 -0
- package/isTruthy.js +12 -0
- package/isValueEmpty.js +3 -0
- package/itemUpload.js +84 -0
- package/menuUtils.js +433 -0
- package/package.json +1 -2
- package/popoverOverflowModifiers.js +11 -0
- package/primarySelectedValue.js +1 -0
- package/pureNoFunc.js +31 -0
- package/queryParams.js +1058 -0
- package/removeCleanRows.js +22 -0
- package/renderOnDoc.js +32 -0
- package/rerenderOnWindowResize.js +26 -0
- package/rowClick.js +181 -0
- package/selection.js +8 -0
- package/showAppSpinner.js +12 -0
- package/showDialogOnDocBody.js +33 -0
- package/showProgressToast.js +22 -0
- package/sortify.js +73 -0
- package/style.css +29 -0
- package/tagUtils.js +45 -0
- package/tgFormValues.js +35 -0
- package/tg_modalState.js +47 -0
- package/throwFormError.js +16 -0
- package/toastr.js +148 -0
- package/tryToMatchSchemas.js +264 -0
- package/typeToCommonType.js +6 -0
- package/useDeepEqualMemo.js +15 -0
- package/useDialog.js +63 -0
- package/useStableReference.js +9 -0
- package/useTableEntities.js +38 -0
- package/useTraceUpdate.js +19 -0
- package/utils.js +37 -0
- package/validateTableWideErrors.js +160 -0
- package/viewColumn.js +97 -0
- package/withField.js +20 -0
- package/withFields.js +11 -0
- package/withLocalStorage.js +11 -0
- package/withSelectTableRecords.js +43 -0
- package/withSelectedEntities.js +65 -0
- package/withStore.js +10 -0
- package/withTableParams.js +301 -0
- package/wrapDialog.js +116 -0
package/customIcons.js
ADDED
|
@@ -0,0 +1,361 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Classes } from "@blueprintjs/core";
|
|
3
|
+
|
|
4
|
+
const ptIconWrapper = (path, viewboxDefault = 24, rest) => {
|
|
5
|
+
return (
|
|
6
|
+
<span className="bp3-icon">
|
|
7
|
+
<svg
|
|
8
|
+
className={Classes.ICON}
|
|
9
|
+
version="1.1"
|
|
10
|
+
id="Capa_1"
|
|
11
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
12
|
+
x="0px"
|
|
13
|
+
y="0px"
|
|
14
|
+
width="16px"
|
|
15
|
+
height="16px"
|
|
16
|
+
viewBox={`0 0 ${viewboxDefault} ${viewboxDefault}`}
|
|
17
|
+
{...rest}
|
|
18
|
+
>
|
|
19
|
+
{path}
|
|
20
|
+
</svg>
|
|
21
|
+
</span>
|
|
22
|
+
);
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const flaskIcon = ptIconWrapper(
|
|
26
|
+
<path
|
|
27
|
+
d="M42.504,39.673L29.88,16.027V4.021h1.249c0.553,0,1-0.447,1-1V1c0-0.552-0.447-1-1-1H29.88H17.042h-1.144
|
|
28
|
+
c-0.553,0-1,0.448-1,1v2.021c0,0.553,0.447,1,1,1h1.144v12.007L5.421,39.57C2.451,44.226,4.519,48,10.042,48h27.999
|
|
29
|
+
C43.563,48,45.561,44.271,42.504,39.673z M20.628,17.798l0.413-0.837v-0.933V4.021h4.839v12.007v1.001l0.471,0.883l5.41,10.132
|
|
30
|
+
h-16.19L20.628,17.798z"
|
|
31
|
+
/>,
|
|
32
|
+
48
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export const tubeIcon = ptIconWrapper(
|
|
36
|
+
<g>
|
|
37
|
+
<path d="m463.413,137.401l-130.812-130.811c-4.25-4.25-9.899-6.59-15.909-6.59-6.011,0-11.66,2.341-15.909,6.59-4.25,4.25-6.591,9.9-6.591,15.911 0,5.156 1.734,10.041 4.926,14.029l-271.306,271.323c-37.037,37.04-37.036,97.308 0.002,134.348 17.942,17.943 41.797,27.825 67.17,27.826 25.374,0 49.229-9.882 67.17-27.824l271.306-271.323c3.975,3.189 8.873,4.931 14.042,4.931 6.01,0 11.66-2.341 15.91-6.59 8.772-8.773 8.772-23.047 0.001-31.82zm-10.608,21.213c-1.416,1.417-3.3,2.197-5.303,2.197s-3.887-0.78-5.303-2.197l-2.353-2.352c-0.295-0.47-0.641-0.917-1.05-1.326-0.409-0.409-0.857-0.755-1.327-1.05l-80.124-80.123c-2.929-2.928-7.677-2.93-10.607,0-2.929,2.929-2.929,7.678 0,10.606l76.01,76.01-271.201,271.217c-15.108,15.109-35.196,23.43-56.562,23.43-21.367,0-41.455-8.322-56.564-23.432-31.19-31.192-31.191-81.944-0.002-113.135l271.247-271.263 16.028,15.85c2.944,2.912 7.692,2.887 10.606-0.059 2.912-2.945 2.886-7.694-0.06-10.606l-20.205-19.982c-0.278-0.426-0.603-0.83-0.977-1.204-0.391-0.391-0.817-0.726-1.264-1.013l-2.406-2.379c-1.416-1.417-2.196-3.3-2.196-5.303 0-2.003 0.78-3.887 2.197-5.304 1.416-1.417 3.299-2.197 5.303-2.197 2.003,0 3.887,0.78 5.303,2.197l130.811,130.811c2.924,2.925 2.924,7.683-0.001,10.607z" />
|
|
38
|
+
<path d="m277.854,273.457c-6.746-6.745-13.064-7.879-17.679-8.708-3.93-0.705-6.302-1.131-9.72-4.55-3.419-3.418-3.845-5.791-4.549-9.72-0.828-4.614-1.962-10.933-8.707-17.678s-13.064-7.88-17.678-8.708c-3.93-0.706-6.303-1.131-9.722-4.551-3.419-3.419-3.845-5.792-4.551-9.723-0.828-4.614-1.962-10.933-8.708-17.679-1.406-1.407-3.314-2.197-5.303-2.197s-3.897,0.791-5.304,2.197l-57.848,57.854c-2.929,2.929-2.928,7.678 0,10.607 2.93,2.929 7.678,2.928 10.607,0l51.178-51.183c0.232,0.93 0.412,1.928 0.613,3.052 0.828,4.614 1.962,10.933 8.708,17.679 6.745,6.746 13.064,7.88 17.678,8.708 3.93,0.706 6.303,1.131 9.722,4.551 3.418,3.418 3.844,5.791 4.549,9.721 0.828,4.614 1.961,10.933 8.706,17.678 6.745,6.745 13.063,7.879 17.678,8.708 1.124,0.202 2.121,0.381 3.052,0.613l-130.239,130.251c-9.425,9.426-21.98,14.618-35.353,14.618-13.372,0-25.927-5.191-35.352-14.618-19.494-19.495-19.494-51.215 0-70.71l57.849-57.854c2.929-2.929 2.928-7.678 0-10.607-2.93-2.929-7.678-2.928-10.607,0l-57.849,57.854c-25.341,25.343-25.341,66.58 0,91.923 12.259,12.26 28.581,19.011 45.959,19.011 17.379,0 33.701-6.751 45.96-19.011l136.517-136.53c4.295-4.296 2.308-8.891 0.656-10.721-0.084-0.094-0.173-0.187-0.263-0.277z" />
|
|
39
|
+
<path d="m338.839,161.218c-2.93,2.929-2.93,7.678-0.001,10.607 2.925,2.924 2.925,7.682 0,10.606-1.416,1.417-3.299,2.196-5.303,2.196-2.003,0-3.887-0.78-5.303-2.197-2.925-2.924-2.925-7.682-0.001-10.606 2.93-2.929 2.93-7.678 0.001-10.607-2.929-2.928-7.678-2.929-10.606,0-8.773,8.772-8.773,23.046-0.001,31.82 4.25,4.25 9.899,6.59 15.91,6.59s11.661-2.34 15.91-6.59c8.771-8.772 8.772-23.046 0-31.819-2.928-2.927-7.677-2.928-10.606,0z" />
|
|
40
|
+
<path d="m250.45,201.392c6.011,0 11.661-2.34 15.91-6.59s6.59-9.9 6.589-15.91c0-6.01-2.341-11.66-6.591-15.91-2.928-2.929-7.677-2.928-10.606,0-2.929,2.929-2.929,7.678 0.001,10.607 1.416,1.417 2.196,3.3 2.196,5.303 0,2.003-0.779,3.886-2.196,5.303-1.416,1.417-3.299,2.196-5.303,2.196-2.003,0-3.887-0.78-5.303-2.197-1.417-1.417-2.197-3.3-2.197-5.303s0.78-3.887 2.197-5.303c2.929-2.929 2.929-7.678 0-10.606-2.93-2.929-7.678-2.929-10.607,0-8.773,8.772-8.773,23.047 0,31.819 4.249,4.25 9.899,6.591 15.91,6.591z" />
|
|
41
|
+
</g>,
|
|
42
|
+
500
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// export const orfIcon = ptIconWrapper(<path transform="rotate(57.28718566894531 8.363667488098143,10.816314697265627) " id="svg_2" d="m-1.07883,9.82896c4.617,-4.618 12.056,-4.676 16.756,-0.195l2.129,-2.258l0,7.938l-7.484,0l2.066,-2.191c-2.819,-2.706 -7.297,-2.676 -10.074,0.1l-3.393,-3.394z"/>);
|
|
46
|
+
// export const orfIcon = ptIconWrapper( <path stroke="null" transform="rotate(57.28718566894531 9.91405391693115,10.816313743591309) " id="svg_2" d="m-1.85643,9.34819c5.75529,-6.86663 15.02833,-6.95287 20.88708,-0.28995l2.65389,-3.35748l0,11.80323l-9.32913,0l2.57536,-3.25786c-3.51401,-4.02362 -9.09603,-3.97902 -12.55768,0.14869l-4.22952,-5.04663z"/>);
|
|
47
|
+
export const orfIcon = ptIconWrapper(
|
|
48
|
+
<path d="M13 7v-6l11 11-11 11v-6h-13v-10z" />
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
export const featureIcon = ptIconWrapper(<path d="M17 5h-17v14h17l7-7z" />);
|
|
52
|
+
export const reverseFeatureIcon = ptIconWrapper(
|
|
53
|
+
<path d="M17 5h-17v14h17l7-7z" />,
|
|
54
|
+
undefined,
|
|
55
|
+
{ transform: "rotate(180)" }
|
|
56
|
+
);
|
|
57
|
+
export const bluntFeatureIcon = ptIconWrapper(
|
|
58
|
+
<rect y={5} height={15} width={20} />
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
export const dnaIcon = ptIconWrapper(
|
|
62
|
+
<path
|
|
63
|
+
d="M376.717,99.329c-6.755-1.51-13.967,3.125-15.372,9.421c-0.391,1.489-1.813,6.371-5.212,12.938l-91.104-91.102
|
|
64
|
+
c7.481-3.812,12.712-5.022,12.85-5.062c16.64-3.903,10.707-29.045-5.957-25.106c-1.032,0.252-102.057,26.625-85.457,170.831
|
|
65
|
+
c-6.632-0.432-13.243-0.64-19.731-0.64c-117.787,0-162.859,74.027-164.708,77.144c-8.812,14.855,13.501,27.352,22.133,13.24
|
|
66
|
+
c0.685-1.117,4.219-6.678,11.328-14.195l104.52,104.556c-7.446,7.044-13.024,10.604-14.081,11.253
|
|
67
|
+
c-14.661,8.73-1.567,30.744,13.114,22.218c3.513-2.102,85.434-52.386,76.51-184.503c105.631,12.262,160.172-41.383,170.873-85.563
|
|
68
|
+
C388.03,107.753,383.557,100.782,376.717,99.329z M187.878,254.381l-55.442-55.454c17.69-2.679,37.398-3.213,57.024-1.585
|
|
69
|
+
C191.127,217.272,190.592,236.433,187.878,254.381z M101.641,205.773l79.032,79.491c-7.914,23.425-17.519,39.163-24.28,47.047
|
|
70
|
+
L54.602,230.165C72.193,215.885,95.005,208.75,101.641,205.773z M211.141,121.294l54.104,54.301
|
|
71
|
+
c-15.937,1.525-33.777,0.991-52.464-1.525C210.204,155.059,209.646,137.318,211.141,121.294z M296.403,169.39l-79.39-78.735
|
|
72
|
+
c5.782-18.687,14.087-31.667,25.154-43.34l97.691,96.263l-1.038,1.291C323.274,159.923,303.032,168.267,296.403,169.39z"
|
|
73
|
+
/>,
|
|
74
|
+
380
|
|
75
|
+
);
|
|
76
|
+
|
|
77
|
+
export const workqueueIcon = ptIconWrapper(
|
|
78
|
+
<React.Fragment>
|
|
79
|
+
<path
|
|
80
|
+
d="M251.328,196.704c-6.24-6.24-16.384-6.272-22.656-0.032L176,249.376l-20.672-20.704c-6.24-6.24-16.384-6.24-22.624,0
|
|
81
|
+
s-6.24,16.384,0,22.624l32,32c3.104,3.136,7.2,4.704,11.296,4.704s8.192-1.568,11.328-4.672l64-64
|
|
82
|
+
C257.568,213.088,257.568,202.944,251.328,196.704z"
|
|
83
|
+
/>
|
|
84
|
+
<path
|
|
85
|
+
d="M251.328,324.704c-6.24-6.24-16.384-6.272-22.656-0.032L176,377.376l-20.672-20.672c-6.24-6.24-16.384-6.24-22.624,0
|
|
86
|
+
s-6.24,16.384,0,22.624l32,32c3.104,3.104,7.2,4.672,11.296,4.672s8.192-1.568,11.328-4.672l64-64
|
|
87
|
+
C257.568,341.088,257.568,330.944,251.328,324.704z"
|
|
88
|
+
/>
|
|
89
|
+
<path
|
|
90
|
+
d="M368,224h-64c-8.832,0-16,7.168-16,16c0,8.832,7.168,16,16,16h64c8.832,0,16-7.168,16-16C384,231.168,376.832,224,368,224
|
|
91
|
+
z"
|
|
92
|
+
/>
|
|
93
|
+
<path
|
|
94
|
+
d="M368,352h-64c-8.832,0-16,7.168-16,16c0,8.832,7.168,16,16,16h64c8.832,0,16-7.168,16-16C384,359.168,376.832,352,368,352
|
|
95
|
+
z"
|
|
96
|
+
/>
|
|
97
|
+
<path
|
|
98
|
+
d="M416,64h-64V48c0-8.832-7.168-16-16-16h-34.72C294.656,13.376,276.864,0,256,0s-38.656,13.376-45.28,32H176
|
|
99
|
+
c-8.832,0-16,7.168-16,16v16H96c-17.632,0-32,14.368-32,32v384c0,17.632,14.368,32,32,32h320c17.632,0,32-14.368,32-32V96
|
|
100
|
+
C448,78.368,433.632,64,416,64z M192,64h32c8.832,0,16-7.168,16-16c0-8.832,7.168-16,16-16c8.832,0,16,7.168,16,16
|
|
101
|
+
c0,8.832,7.168,16,16,16h32v32H192V64z M416,480H96V96h64v16c0,8.832,7.168,16,16,16h160c8.832,0,16-7.168,16-16V96h64V480z"
|
|
102
|
+
/>
|
|
103
|
+
</React.Fragment>,
|
|
104
|
+
515
|
|
105
|
+
);
|
|
106
|
+
|
|
107
|
+
export const removeDuplicatesIcon = ptIconWrapper(
|
|
108
|
+
<path
|
|
109
|
+
d="m20 20.011h-15.25c-.414 0-.75.336-.75.75s.336.75.75.75h15.75c.53 0 1-.469 1-1v-15.75c0-.414-.336-.75-.75-.75s-.75.336-.75.75zm-1-17c0-.478-.379-1-1-1h-15c-.62 0-1 .519-1 1v15c0 .621.52 1 1 1h15c.478 0 1-.379 1-1zm-15.5.5h14v14h-14zm10.75 6.25h-7.5c-.414 0-.75.336-.75.75s.336.75.75.75h7.5c.414 0 .75-.336.75-.75s-.336-.75-.75-.75z"
|
|
110
|
+
fillRule="nonzero"
|
|
111
|
+
/>
|
|
112
|
+
);
|
|
113
|
+
export const inventoryIcon = ptIconWrapper(
|
|
114
|
+
<g>
|
|
115
|
+
<path
|
|
116
|
+
d="M256,106.667c-143.542,0-256,46.854-256,106.667v85.333c0,59.813,112.458,106.667,256,106.667s256-46.854,256-106.667
|
|
117
|
+
v-85.333C512,153.521,399.542,106.667,256,106.667z M256,298.667c-88.745,0-157.141-21.357-190.625-48.216
|
|
118
|
+
c44.178-22.88,114.947-37.117,190.625-37.117c75.688,0,146.452,14.24,190.63,37.112C413.147,277.309,344.75,298.667,256,298.667z
|
|
119
|
+
M461.967,234.301C414.701,207.918,338.901,192,256,192c-82.897,0-158.693,15.923-205.967,42.301
|
|
120
|
+
c-4.714-6.924-7.366-13.982-7.366-20.967C42.667,172.125,128.396,128,256,128s213.333,44.125,213.333,85.333
|
|
121
|
+
C469.333,220.319,466.681,227.376,461.967,234.301z"
|
|
122
|
+
/>
|
|
123
|
+
<path
|
|
124
|
+
d="M185.792,256.979c-0.021-0.146-0.042-0.281-0.083-0.427c-1.229-5.979-4.521-21.885-25.708-21.885
|
|
125
|
+
c-5.896,0-10.667,4.771-10.667,10.667c0,5.896,4.771,10.667,10.667,10.667c2.604,0,3.521,0.469,3.563,0.469
|
|
126
|
+
c0.479,0.594,0.958,2.99,1.271,4.417c0.833,4.063,3.396,16.448,16.5,16.448c5.896,0,10.667-4.771,10.667-10.667
|
|
127
|
+
C192,262.365,189.458,258.667,185.792,256.979z"
|
|
128
|
+
/>
|
|
129
|
+
<path
|
|
130
|
+
d="M330.667,277.333c15.083,0,23.063-7.969,28.875-13.792c5.229-5.229,7.792-7.542,13.792-7.542
|
|
131
|
+
c5.896,0,10.667-4.771,10.667-10.667c0-5.896-4.771-10.667-10.667-10.667c-15.083,0-23.063,7.969-28.875,13.792
|
|
132
|
+
c-5.229,5.229-7.792,7.542-13.792,7.542c-5.896,0-10.667,4.771-10.667,10.667C320,272.563,324.771,277.333,330.667,277.333z"
|
|
133
|
+
/>
|
|
134
|
+
<path
|
|
135
|
+
d="M213.333,256c0,12.365,13.458,21.333,32,21.333c18.542,0,32-8.969,32-21.333s-13.458-21.333-32-21.333
|
|
136
|
+
C226.792,234.667,213.333,243.635,213.333,256z"
|
|
137
|
+
/>
|
|
138
|
+
</g>,
|
|
139
|
+
512
|
|
140
|
+
);
|
|
141
|
+
|
|
142
|
+
export const workflowIcon = ptIconWrapper(
|
|
143
|
+
<g>
|
|
144
|
+
<path
|
|
145
|
+
d="M469.568,55.098H322.479V9.955c0-5.495-4.461-9.955-9.96-9.955H189.392c-5.5,0-9.961,4.46-9.961,9.955v123.14
|
|
146
|
+
c0,5.494,4.461,9.954,9.961,9.954h123.127c5.499,0,9.96-4.46,9.96-9.954V87.951h130.663v143.33h-20.068l8.55-20.813
|
|
147
|
+
c0.324-0.778,0.128-1.661-0.479-2.23c-0.611-0.57-1.506-0.707-2.264-0.338l-76.471,37.795c-0.77,0.377-1.254,1.156-1.254,2.015
|
|
148
|
+
s0.484,1.636,1.254,2.013l76.471,37.795c0.758,0.369,1.652,0.233,2.264-0.337c0.607-0.567,0.804-1.45,0.479-2.229l-8.55-20.814
|
|
149
|
+
h36.494c9.081,0,16.433-7.355,16.433-16.427V71.524C486,62.454,478.649,55.098,469.568,55.098z M289.624,110.194h-77.34v-77.34
|
|
150
|
+
h77.34V110.194z"
|
|
151
|
+
/>
|
|
152
|
+
<path
|
|
153
|
+
d="M312.519,175.518H189.392c-5.5,0-9.961,4.46-9.961,9.954v45.809H24.511c-9.08,0-16.427,7.354-16.427,16.428v176.184
|
|
154
|
+
c0,9.072,7.347,16.428,16.427,16.428h36.496l-8.551,20.813c-0.319,0.778-0.129,1.661,0.478,2.23
|
|
155
|
+
c0.612,0.57,1.514,0.707,2.266,0.337l76.475-37.794c0.767-0.377,1.25-1.156,1.25-2.015s-0.483-1.636-1.25-2.013L55.2,384.085
|
|
156
|
+
c-0.752-0.369-1.653-0.233-2.266,0.336c-0.606,0.568-0.797,1.451-0.478,2.229l8.551,20.815H40.938v-143.33h138.493v44.477
|
|
157
|
+
c0,5.495,4.461,9.955,9.961,9.955h123.127c5.499,0,9.96-4.46,9.96-9.955v-123.14C322.479,179.979,318.018,175.518,312.519,175.518z
|
|
158
|
+
M289.624,285.713h-77.34v-77.339h77.34V285.713z"
|
|
159
|
+
/>
|
|
160
|
+
<path
|
|
161
|
+
d="M312.519,351.036H189.392c-5.5,0-9.961,4.461-9.961,9.955v123.14c0,5.494,4.461,9.954,9.961,9.954h123.127
|
|
162
|
+
c5.499,0,9.96-4.46,9.96-9.954v-123.14C322.479,355.497,318.018,351.036,312.519,351.036z M289.624,461.23h-77.34v-77.339h77.34
|
|
163
|
+
V461.23z"
|
|
164
|
+
/>
|
|
165
|
+
</g>,
|
|
166
|
+
494
|
|
167
|
+
);
|
|
168
|
+
|
|
169
|
+
export const strainIcon = ptIconWrapper(
|
|
170
|
+
<g>
|
|
171
|
+
<path d="M429.56,290.89l45.58-19.54-6.29-14.7L421.5,276.94a104.61,104.61,0,0,0-28.76-28l22.11-36.85-13.72-8.23-22.44,37.39A103.06,103.06,0,0,0,336,232h-2.41L367,171.88l-14-7.77L315.86,231a79.81,79.81,0,0,1-42.67-20.87l20.47-20.46-11.32-11.31L262.67,198A79.44,79.44,0,0,1,248,152c0-.41-.06-.81-.06-1.22l41.37-6.89-2.62-15.79-40.31,6.72a95.46,95.46,0,0,0-9.8-28.17l55-27.5-7.16-14.31-56.7,28.35a97,97,0,0,0-15.4-15.78L238.26,45,225.75,35,199,68.39a95.39,95.39,0,0,0-22-9l6.78-33.86-15.69-3.14-6.81,34c-3.08-.29-6.2-.47-9.35-.47a95.54,95.54,0,0,0-24,3.16V0H112V64.84a96.34,96.34,0,0,0-12.49,6.87L62.15,26.87,49.85,37.13,86.93,81.62A96.67,96.67,0,0,0,74.26,95.9L52.44,81.34,43.57,94.66l22.43,15A94.69,94.69,0,0,0,57.45,136H0v16H56v8c0,5.82.24,11.59.59,17.33l-34.16,6.83,3.15,15.69,32.48-6.5A276.36,276.36,0,0,0,63.94,226L13.82,240.31l4.39,15.39,49.92-14.26c2.07,6.81,4.44,13.48,7,20.06l-54.7,27.36,7.16,14.31,53.8-26.9Q87.2,289,94.22,300.94L51.58,329.36l8.88,13.31,42.2-28.14A282.2,282.2,0,0,0,121,339.1L99.58,353.36l8.87,13.31,23.24-15.49c5.61,6,11.45,11.76,17.57,17.24l-35.4,42.47,12.3,10.25,35.34-42.4q9.75,7.8,20.16,14.73l-36.44,58.3,13.56,8.49,36.47-58.35a280.26,280.26,0,0,0,28.21,14.42l-15.05,45.16,15.17,5.06L238.3,422.4a279,279,0,0,0,31.91,9.74l-6.07,30.32,15.69,3.14,6-30.15q12.88,2.34,26.13,3.49V496h16V439.8c2.67.07,5.33.2,8,.2a103.75,103.75,0,0,0,29-4.18l19.88,39.76,14.31-7.16L380,430.1a103.06,103.06,0,0,0,18.31-11l19.3,25.73,12.8-9.59-20-26.67a104.36,104.36,0,0,0,12.55-15.62l44.63,29.74,8.87-13.31-45.78-30.52a102.55,102.55,0,0,0,8-26.82H496V336H440A103.17,103.17,0,0,0,429.56,290.89ZM336,424C190.43,424,72,305.57,72,160v-8a80,80,0,0,1,160,0,96.1,96.1,0,0,0,96,96h8a88,88,0,0,1,0,176Z" />
|
|
172
|
+
<path d="M160,192a48,48,0,1,0-48-48A48.05,48.05,0,0,0,160,192Zm0-80a32,32,0,1,1-32,32A32,32,0,0,1,160,112Z" />
|
|
173
|
+
<path d="M144,232a24,24,0,1,0,24,24A24,24,0,0,0,144,232Zm0,32a8,8,0,1,1,8-8A8,8,0,0,1,144,264Z" />
|
|
174
|
+
<path d="M224,312a32,32,0,1,0,32,32A32,32,0,0,0,224,312Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,224,360Z" />
|
|
175
|
+
<path d="M272,248a24,24,0,1,0,24,24A24,24,0,0,0,272,248Zm0,32a8,8,0,1,1,8-8A8,8,0,0,1,272,280Z" />
|
|
176
|
+
<path d="M352,304a32,32,0,1,0,32,32A32,32,0,0,0,352,304Zm0,48a16,16,0,1,1,16-16A16,16,0,0,1,352,352Z" />
|
|
177
|
+
<path d="M480,96V94.1a78,78,0,0,0-1.74-16.28l13.32-6.66-7.16-14.31-11.2,5.6a78.27,78.27,0,0,0-13.82-21L484.8,22.4,475.2,9.6l-28,21a77.67,77.67,0,0,0-13.64-7.83l5.6-11.19L424.85,4.42l-6.66,13.31A78.77,78.77,0,0,0,401.9,16H400V0H384V16.81a39.35,39.35,0,0,0-12.22,4.87l-4.63-9.26-14.31,7.16,6.65,13.29a39.73,39.73,0,0,0-6.11,13.24l-23.44-5.87-3.88,15.52,26.59,6.65a39.11,39.11,0,0,0,4.48,12.79l-15.66,5.22,5.07,15.16,22-7.33a39.66,39.66,0,0,0,10.14,5.3l-9.35,14,13.32,8.87,13-19.46a7.93,7.93,0,0,1,4.37,7,40,40,0,0,0,3,15.06l-15.43,10.28,8.87,13.32,15.42-10.28A40.28,40.28,0,0,0,424,140.61V176h16V144a39.48,39.48,0,0,0,16.84-3.85l17.51,17.51,11.31-11.32-15.89-15.88A39.75,39.75,0,0,0,479.18,112H496V96Zm-16,8a24,24,0,0,1-48,0,24,24,0,0,0-24-24,24,24,0,0,1,0-48h9.9A62.17,62.17,0,0,1,464,94.1Z" />
|
|
178
|
+
</g>,
|
|
179
|
+
496
|
|
180
|
+
);
|
|
181
|
+
|
|
182
|
+
export const designIcon = ptIconWrapper(
|
|
183
|
+
<path
|
|
184
|
+
d="M512,371.2h-51.2v-76.8c0-15.36-10.24-25.6-25.6-25.6H281.6v-51.2h76.8c15.36,0,25.6-10.24,25.6-25.6V38.4
|
|
185
|
+
c0-15.36-10.24-25.6-25.6-25.6H153.6c-15.36,0-25.6,10.24-25.6,25.6V192c0,15.36,10.24,25.6,25.6,25.6h76.8v51.2h-128
|
|
186
|
+
c-15.36,0-25.6,10.24-25.6,25.6v76.8H25.6C10.24,371.2,0,381.44,0,396.8v102.4c0,15.36,10.24,25.6,25.6,25.6h153.6
|
|
187
|
+
c15.36,0,25.6-10.24,25.6-25.6V396.8c0-15.36-10.24-25.6-25.6-25.6H128V320h281.6v51.2h-51.2c-15.36,0-25.6,10.24-25.6,25.6v102.4
|
|
188
|
+
c0,15.36,10.24,25.6,25.6,25.6H512c15.36,0,25.6-10.24,25.6-25.6V396.8C537.6,381.44,524.8,371.2,512,371.2z"
|
|
189
|
+
/>,
|
|
190
|
+
540
|
|
191
|
+
);
|
|
192
|
+
|
|
193
|
+
export const moleculeIcon = ptIconWrapper(
|
|
194
|
+
<path
|
|
195
|
+
d="M292.41,236.617l-42.814-27.769c5.495-15.665,4.255-33.162-3.707-48.011l35.117-31.373
|
|
196
|
+
c19.292,12.035,45.001,9.686,61.771-7.085c19.521-19.52,19.521-51.171,0-70.692c-19.522-19.521-51.175-19.521-70.694,0
|
|
197
|
+
c-15.378,15.378-18.632,38.274-9.788,56.848l-35.121,31.378c-16.812-11.635-38.258-13.669-56.688-6.078l-40.5-55.733
|
|
198
|
+
c14.528-19.074,13.095-46.421-4.331-63.849c-19.004-19.004-49.816-19.004-68.821,0c-19.005,19.005-19.005,49.818,0,68.822
|
|
199
|
+
c13.646,13.646,33.374,17.491,50.451,11.545l40.505,55.738c-20.002,23.461-18.936,58.729,3.242,80.906
|
|
200
|
+
c0.426,0.426,0.864,0.825,1.303,1.237l-39.242,68.874c-16.31-3.857-34.179,0.564-46.899,13.286
|
|
201
|
+
c-19.521,19.522-19.521,51.175,0,70.694c19.521,19.521,51.173,19.521,70.693,0c19.317-19.315,19.508-50.503,0.593-70.069
|
|
202
|
+
l39.239-68.867c19.705,5.658,41.737,0.978,57.573-14.033l42.855,27.79c-2.736,12.706,0.821,26.498,10.696,36.372
|
|
203
|
+
c15.469,15.469,40.544,15.469,56.012,0c15.468-15.466,15.468-40.543,0-56.011C329.831,226.518,307.908,225.209,292.41,236.617z
|
|
204
|
+
M83.129,338.906c-0.951,1.078-1.846,2.096-2.724,2.973c-1.094,1.093-2.589,2.425-4.444,2.998
|
|
205
|
+
c-2.33,0.719-4.711,0.086-6.536-1.739c-4.772-4.771-2.947-13.799,4.246-20.989c7.195-7.195,16.219-9.021,20.993-4.247
|
|
206
|
+
c1.824,1.822,2.457,4.205,1.737,6.536c-0.572,1.855-1.904,3.354-2.997,4.444c-0.878,0.876-1.896,1.771-2.975,2.722
|
|
207
|
+
c-1.245,1.096-2.535,2.229-3.805,3.497C85.355,336.37,84.224,337.66,83.129,338.906z M279.56,59.17
|
|
208
|
+
c7.193-7.193,16.219-9.02,20.991-4.247c1.823,1.823,2.458,4.205,1.737,6.537c-0.572,1.856-1.905,3.354-2.997,4.446
|
|
209
|
+
c-0.876,0.875-1.894,1.77-2.974,2.72c-1.246,1.097-2.534,2.229-3.805,3.498c-1.271,1.271-2.403,2.562-3.5,3.808
|
|
210
|
+
c-0.948,1.076-1.846,2.097-2.72,2.973c-1.093,1.093-2.591,2.425-4.446,2.998c-2.332,0.719-4.712,0.086-6.536-1.739
|
|
211
|
+
C270.541,75.391,272.366,66.362,279.56,59.17z M73.322,37.854c-0.928,1.05-1.799,2.042-2.648,2.895
|
|
212
|
+
c-1.063,1.063-2.521,2.358-4.329,2.919c-2.269,0.698-4.587,0.083-6.364-1.691c-4.646-4.647-2.866-13.436,4.138-20.438
|
|
213
|
+
c7.003-7.004,15.788-8.782,20.436-4.135c1.776,1.776,2.395,4.095,1.692,6.363c-0.561,1.807-1.854,3.265-2.918,4.326
|
|
214
|
+
c-0.854,0.854-1.846,1.727-2.896,2.648c-1.213,1.066-2.469,2.17-3.704,3.406C75.492,35.384,74.387,36.642,73.322,37.854z
|
|
215
|
+
M159.967,155.76c8.593-8.594,19.371-10.774,25.073-5.073c2.18,2.181,2.937,5.024,2.078,7.81
|
|
216
|
+
c-0.688,2.218-2.277,4.005-3.583,5.312c-1.047,1.047-2.265,2.112-3.553,3.248c-1.486,1.311-3.026,2.662-4.544,4.179
|
|
217
|
+
c-1.518,1.519-2.87,3.058-4.178,4.547c-1.136,1.287-2.205,2.505-3.251,3.55c-1.306,1.31-3.093,2.896-5.311,3.582
|
|
218
|
+
c-2.784,0.859-5.628,0.104-7.811-2.077C149.189,175.132,151.374,164.354,159.967,155.76z M299.11,262.103
|
|
219
|
+
c-0.868,0.866-2.056,1.923-3.524,2.376c-1.846,0.569-3.729,0.068-5.178-1.377c-3.783-3.781-2.338-10.933,3.365-16.633
|
|
220
|
+
c5.697-5.7,12.849-7.146,16.632-3.362c1.443,1.443,1.945,3.33,1.376,5.179c-0.453,1.471-1.51,2.656-2.375,3.521
|
|
221
|
+
c-0.694,0.692-1.5,1.402-2.355,2.155c-0.984,0.866-2.008,1.766-3.013,2.771c-1.007,1.006-1.907,2.026-2.771,3.016
|
|
222
|
+
C300.512,260.604,299.802,261.409,299.11,262.103z"
|
|
223
|
+
/>,
|
|
224
|
+
408
|
|
225
|
+
);
|
|
226
|
+
|
|
227
|
+
export const keyboardIcon = ptIconWrapper(
|
|
228
|
+
<path
|
|
229
|
+
d="M459,76.5H51c-28.05,0-51,22.95-51,51v255c0,28.05,22.95,51,51,51h408c28.05,0,51-22.95,51-51v-255
|
|
230
|
+
C510,99.45,487.05,76.5,459,76.5z M229.5,153h51v51h-51V153z M229.5,229.5h51v51h-51V229.5z M153,153h51v51h-51V153z M153,229.5
|
|
231
|
+
h51v51h-51V229.5z M127.5,280.5h-51v-51h51V280.5z M127.5,204h-51v-51h51V204z M357,382.5H153v-51h204V382.5z M357,280.5h-51v-51
|
|
232
|
+
h51V280.5z M357,204h-51v-51h51V204z M433.5,280.5h-51v-51h51V280.5z M433.5,204h-51v-51h51V204z"
|
|
233
|
+
/>,
|
|
234
|
+
510
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
export const cardDetailsIcon = ptIconWrapper(
|
|
238
|
+
<path d="M0 1v15h16v-15h-16zM5 15h-4v-2h4v2zM5 12h-4v-2h4v2zM5 9h-4v-2h4v2zM5 6h-4v-2h4v2zM10 15h-4v-2h4v2zM10 12h-4v-2h4v2zM10 9h-4v-2h4v2zM10 6h-4v-2h4v2zM15 15h-4v-2h4v2zM15 12h-4v-2h4v2zM15 9h-4v-2h4v2zM15 6h-4v-2h4v2z" />,
|
|
239
|
+
16
|
|
240
|
+
);
|
|
241
|
+
|
|
242
|
+
export const driveIcon = ptIconWrapper(
|
|
243
|
+
<path d="M3.43603795,88.5119265 C23.3708564,91.4404738 38.3921729,92.9047475 48.4999876,92.9047475 C58.6078012,92.9047475 73.629123,91.4404741 93.5639531,88.5119274 C95.2032165,88.2711007 96.7273247,89.4047659 96.9681426,91.0440307 C96.9893526,91.1884089 97,91.3341423 97,91.4800701 L97,107.744476 C97,111.31055 96.6286976,112.603695 95.9314692,113.907399 C95.2342408,115.211103 94.2110865,116.234257 92.9073828,116.931486 C91.6036791,117.628714 90.3105342,118.000016 86.7444592,118.000016 L7.99999216,118.000018 C3.58171416,118.000018 -7.83970393e-06,114.418296 -7.83970393e-06,110.000018 L-4.09640811e-06,91.4800715 C-3.66343299e-06,89.8232154 1.34314386,88.4800686 2.99999987,88.4800691 C3.14592727,88.4800691 3.29166018,88.4907165 3.43603795,88.5119265 Z M83,109 C85.7614237,109 88,106.761424 88,104 C88,101.238576 85.7614237,99 83,99 C80.2385763,99 78,101.238576 78,104 C78,106.761424 80.2385763,109 83,109 Z M6.409713,-4.7629794e-06 L92.0000094,-5.32856263e-06 C94.7614331,-5.32856263e-06 97.0000094,2.23857092 97.0000094,4.99999467 L96.9999988,78.7012655 C96.9999985,81.1780126 95.1867839,83.2815128 92.7370976,83.6466335 C73.4923515,86.5150237 59.0825898,87.9492188 49.5078125,87.9492188 C39.8981757,87.9492188 24.8299316,86.5045615 4.30308,83.6152471 C1.8352477,83.2678794 -4.15112213e-16,81.1562148 -7.2031343e-16,78.664055 L-5.47672869e-16,6.40970824 C-8.2062246e-16,4.18091139 0.232064028,3.37269579 0.667831759,2.55788098 C1.10359949,1.74306616 1.74307093,1.10359473 2.55788574,0.667826996 C3.37270056,0.232059265 4.18091615,-4.7629794e-06 6.409713,-4.7629794e-06 Z" />,
|
|
244
|
+
118
|
|
245
|
+
);
|
|
246
|
+
|
|
247
|
+
export const sharedDriveIcon = ptIconWrapper(
|
|
248
|
+
<path d="M3.43603795,88.5119265 C23.3708564,91.4404738 38.3921729,92.9047475 48.4999876,92.9047475 C58.6078012,92.9047475 73.629123,91.4404741 93.5639531,88.5119274 C95.2032165,88.2711007 96.7273247,89.4047659 96.9681426,91.0440307 C96.9893526,91.1884089 97,91.3341423 97,91.4800701 L97,107.744476 C97,111.31055 96.6286976,112.603695 95.9314692,113.907399 C95.2342408,115.211103 94.2110865,116.234257 92.9073828,116.931486 C91.6036791,117.628714 90.3105342,118.000016 86.7444592,118.000016 L7.99999216,118.000018 C3.58171416,118.000018 -7.83970393e-06,114.418296 -7.83970393e-06,110.000018 L-4.09640811e-06,91.4800715 C-3.66343299e-06,89.8232154 1.34314386,88.4800686 2.99999987,88.4800691 C3.14592727,88.4800691 3.29166018,88.4907165 3.43603795,88.5119265 Z M83,109 C85.7614237,109 88,106.761424 88,104 C88,101.238576 85.7614237,99 83,99 C80.2385763,99 78,101.238576 78,104 C78,106.761424 80.2385763,109 83,109 Z M6.409713,-4.76297942e-06 L92.0000094,-5.32856265e-06 C94.7614331,-5.32856265e-06 97.0000094,2.23857092 97.0000094,4.99999467 L96.9999988,78.7012655 C96.9999985,81.1780126 95.1867839,83.2815128 92.7370976,83.6466335 C73.4923515,86.5150237 59.0825898,87.9492187 49.5078125,87.9492187 C39.8981757,87.9492187 24.8299316,86.5045615 4.30308,83.6152471 C1.8352477,83.2678794 0,81.1562148 0,78.664055 L0,6.40970824 C0,4.18091139 0.232064028,3.37269579 0.667831759,2.55788098 C1.10359949,1.74306616 1.74307093,1.10359473 2.55788574,0.667826996 C3.37270056,0.232059265 4.18091615,-4.76297942e-06 6.409713,-4.76297942e-06 Z M34.5,44 C40.2989899,44 45,39.2989899 45,33.5 C45,27.7010101 40.2989899,23 34.5,23 C28.7010101,23 24,27.7010101 24,33.5 C24,39.2989899 28.7010101,44 34.5,44 Z M62.5,44 C68.2989899,44 73,39.2989899 73,33.5 C73,27.7010101 68.2989899,23 62.5,23 C56.7010101,23 52,27.7010101 52,33.5 C52,39.2989899 56.7010101,44 62.5,44 Z M20.8721872,53.305407 C19.6237953,53.7046093 18.4776589,54.3716607 17.513903,55.2599284 L11.3029078,60.9844337 C10.4724337,61.7498593 10,62.8277779 10,63.9571864 C10,66.1899707 11.8100293,68 14.0428136,68 L55.5006139,68 C56.586339,68 57.6281123,67.5711243 58.399154,66.8067333 C60.0139018,65.2059138 60.0251928,62.5991815 58.4243733,60.9844337 L53.0983398,55.61206 C51.9986427,54.5027948 50.6291819,53.6988328 49.1246127,53.2792208 C43.6762779,51.7597403 38.813167,51 34.53528,51 C30.2328886,51 25.6785244,51.768469 20.8721872,53.305407 Z M55.1013142,52.1395907 C54.8512014,52.2195701 63.0672623,60.0701677 64.1184052,62.212177 C65.3406403,64.7028362 62.51133,68.9586233 64.7538996,68 L83.5006139,68 C84.586339,68 85.6281123,67.5711243 86.399154,66.8067333 C88.0139018,65.2059138 88.0251928,62.5991815 86.4243733,60.9844337 L81.0983398,55.61206 C79.9986427,54.5027948 78.6291819,53.6988328 77.1246127,53.2792208 C71.6762779,51.7597403 59.9076513,50.6026527 55.1013142,52.1395907 Z" />,
|
|
249
|
+
118
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
export const proteinIcon = ptIconWrapper(
|
|
253
|
+
<g>
|
|
254
|
+
<clipPath id="p.0">
|
|
255
|
+
<path
|
|
256
|
+
d="m0 0l389.5118 0l0 331.30185l-389.5118 0l0 -331.30185z"
|
|
257
|
+
clip-rule="nonzero"
|
|
258
|
+
/>
|
|
259
|
+
</clipPath>
|
|
260
|
+
<g clip-path="url(#p.0)">
|
|
261
|
+
<path
|
|
262
|
+
fill="#000000"
|
|
263
|
+
fill-opacity="0.0"
|
|
264
|
+
d="m0 0l389.5118 0l0 331.30185l-389.5118 0z"
|
|
265
|
+
fillRule="evenodd"
|
|
266
|
+
/>
|
|
267
|
+
<path
|
|
268
|
+
fill="#000000"
|
|
269
|
+
d="m71.94922 63.06311l38.58268 143.93701l-28.062996 7.5275574l-38.582676 -143.93701z"
|
|
270
|
+
fillRule="evenodd"
|
|
271
|
+
/>
|
|
272
|
+
<path
|
|
273
|
+
stroke="#000000"
|
|
274
|
+
stroke-width="1.0"
|
|
275
|
+
stroke-linejoin="round"
|
|
276
|
+
stroke-linecap="butt"
|
|
277
|
+
d="m71.94922 63.06311l38.58268 143.93701l-28.062996 7.5275574l-38.582676 -143.93701z"
|
|
278
|
+
fillRule="evenodd"
|
|
279
|
+
/>
|
|
280
|
+
<path
|
|
281
|
+
fill="#000000"
|
|
282
|
+
d="m272.28754 86.877945l63.496063 165.79527l-24.850372 9.51181l-63.49608 -165.79527z"
|
|
283
|
+
fillRule="evenodd"
|
|
284
|
+
/>
|
|
285
|
+
<path
|
|
286
|
+
stroke="#000000"
|
|
287
|
+
stroke-width="1.0"
|
|
288
|
+
stroke-linejoin="round"
|
|
289
|
+
stroke-linecap="butt"
|
|
290
|
+
d="m272.28754 86.877945l63.496063 165.79527l-24.850372 9.51181l-63.49608 -165.79527z"
|
|
291
|
+
fillRule="evenodd"
|
|
292
|
+
/>
|
|
293
|
+
<path
|
|
294
|
+
fill="#000000"
|
|
295
|
+
d="m247.43701 98.60844l-91.40158 121.10236l-22.047241 -16.661423l91.40158 -121.102356z"
|
|
296
|
+
fillRule="evenodd"
|
|
297
|
+
/>
|
|
298
|
+
<path
|
|
299
|
+
stroke="#000000"
|
|
300
|
+
stroke-width="1.0"
|
|
301
|
+
stroke-linejoin="round"
|
|
302
|
+
stroke-linecap="butt"
|
|
303
|
+
d="m247.43701 98.60844l-91.40158 121.10236l-22.047241 -16.661423l91.40158 -121.102356z"
|
|
304
|
+
fillRule="evenodd"
|
|
305
|
+
/>
|
|
306
|
+
<path
|
|
307
|
+
fill="#000000"
|
|
308
|
+
d="m54.86483 245.521l0 0c0 -38.503372 31.213158 -69.71654 69.71654 -69.71654l0 0c18.489967 0 36.22265 7.3451233 49.297035 20.41951c13.074387 13.074387 20.419495 30.807053 20.419495 49.297028l0 0c0 38.503387 -31.21315 69.71652 -69.71653 69.71652l0 0c-38.50338 0 -69.71654 -31.213135 -69.71654 -69.71652zm34.85827 0l0 0c0 19.251678 15.606575 34.858276 34.85827 34.858276c19.251686 0 34.85827 -15.606598 34.85827 -34.858276c0 -19.251694 -15.606583 -34.85826 -34.85827 -34.85826l0 0c-19.251694 0 -34.85827 15.606567 -34.85827 34.85826z"
|
|
309
|
+
fillRule="evenodd"
|
|
310
|
+
/>
|
|
311
|
+
<path
|
|
312
|
+
stroke="#000000"
|
|
313
|
+
stroke-width="1.0"
|
|
314
|
+
stroke-linejoin="round"
|
|
315
|
+
stroke-linecap="butt"
|
|
316
|
+
d="m54.86483 245.521l0 0c0 -38.503372 31.213158 -69.71654 69.71654 -69.71654l0 0c18.489967 0 36.22265 7.3451233 49.297035 20.41951c13.074387 13.074387 20.419495 30.807053 20.419495 49.297028l0 0c0 38.503387 -31.21315 69.71652 -69.71653 69.71652l0 0c-38.50338 0 -69.71654 -31.213135 -69.71654 -69.71652zm34.85827 0l0 0c0 19.251678 15.606575 34.858276 34.85827 34.858276c19.251686 0 34.85827 -15.606598 34.85827 -34.858276c0 -19.251694 -15.606583 -34.85826 -34.85827 -34.85826l0 0c-19.251694 0 -34.85827 15.606567 -34.85827 34.85826z"
|
|
317
|
+
fillRule="evenodd"
|
|
318
|
+
/>
|
|
319
|
+
<path
|
|
320
|
+
fill="#000000"
|
|
321
|
+
d="m5.1929135 45.20866l0 0c0 -23.013313 18.655977 -41.66929 41.669292 -41.66929l0 0c11.051384 0 21.650131 4.390145 29.464638 12.204653c7.8145065 7.8145075 12.204651 18.413258 12.204651 29.464638l0 0c0 23.013317 -18.655975 41.669292 -41.66929 41.669292l0 0c-23.013315 0 -41.669292 -18.655975 -41.669292 -41.669292zm20.834646 0l0 0c0 11.506657 9.32799 20.834644 20.834646 20.834644c11.506657 0 20.834648 -9.327988 20.834648 -20.834644c0 -11.506657 -9.3279915 -20.834644 -20.834648 -20.834644l0 0c-11.506657 0 -20.834646 9.327988 -20.834646 20.834644z"
|
|
322
|
+
fillRule="evenodd"
|
|
323
|
+
/>
|
|
324
|
+
<path
|
|
325
|
+
stroke="#000000"
|
|
326
|
+
stroke-width="1.0"
|
|
327
|
+
stroke-linejoin="round"
|
|
328
|
+
stroke-linecap="butt"
|
|
329
|
+
d="m5.1929135 45.20866l0 0c0 -23.013313 18.655977 -41.66929 41.669292 -41.66929l0 0c11.051384 0 21.650131 4.390145 29.464638 12.204653c7.8145065 7.8145075 12.204651 18.413258 12.204651 29.464638l0 0c0 23.013317 -18.655975 41.669292 -41.66929 41.669292l0 0c-23.013315 0 -41.669292 -18.655975 -41.669292 -41.669292zm20.834646 0l0 0c0 11.506657 9.32799 20.834644 20.834646 20.834644c11.506657 0 20.834648 -9.327988 20.834648 -20.834644c0 -11.506657 -9.3279915 -20.834644 -20.834648 -20.834644l0 0c-11.506657 0 -20.834646 9.327988 -20.834646 20.834644z"
|
|
330
|
+
fillRule="evenodd"
|
|
331
|
+
/>
|
|
332
|
+
<path
|
|
333
|
+
fill="#000000"
|
|
334
|
+
d="m190.6811 62.027557l0 0c0 -30.397404 24.641968 -55.039368 55.039368 -55.039368l0 0c14.597336 0 28.596817 5.7987747 38.918716 16.120659c10.321869 10.321886 16.120667 24.321363 16.120667 38.91871l0 0c0 30.397408 -24.641968 55.039375 -55.039383 55.039375l0 0c-30.3974 0 -55.039368 -24.641968 -55.039368 -55.039375zm27.519684 0l0 0c0 15.198708 12.320984 27.519684 27.519684 27.519684c15.198715 0 27.519669 -12.320976 27.519669 -27.519684c0 -15.1987 -12.320953 -27.519684 -27.519669 -27.519684l0 0c-15.1987 0 -27.519684 12.320984 -27.519684 27.519684z"
|
|
335
|
+
fillRule="evenodd"
|
|
336
|
+
/>
|
|
337
|
+
<path
|
|
338
|
+
stroke="#000000"
|
|
339
|
+
stroke-width="1.0"
|
|
340
|
+
stroke-linejoin="round"
|
|
341
|
+
stroke-linecap="butt"
|
|
342
|
+
d="m190.6811 62.027557l0 0c0 -30.397404 24.641968 -55.039368 55.039368 -55.039368l0 0c14.597336 0 28.596817 5.7987747 38.918716 16.120659c10.321869 10.321886 16.120667 24.321363 16.120667 38.91871l0 0c0 30.397408 -24.641968 55.039375 -55.039383 55.039375l0 0c-30.3974 0 -55.039368 -24.641968 -55.039368 -55.039375zm27.519684 0l0 0c0 15.198708 12.320984 27.519684 27.519684 27.519684c15.198715 0 27.519669 -12.320976 27.519669 -27.519684c0 -15.1987 -12.320953 -27.519684 -27.519669 -27.519684l0 0c-15.1987 0 -27.519684 12.320984 -27.519684 27.519684z"
|
|
343
|
+
fillRule="evenodd"
|
|
344
|
+
/>
|
|
345
|
+
<path
|
|
346
|
+
fill="#000000"
|
|
347
|
+
d="m287.5 279.35303l0 0c0 -26.73581 21.673645 -48.409454 48.409454 -48.409454l0 0c12.838989 0 25.1521 5.1002655 34.23065 14.1788025c9.078522 9.078522 14.1788025 21.391663 14.1788025 34.23065l0 0c0 26.735779 -21.673645 48.409454 -48.409454 48.409454l0 0c-26.73581 0 -48.409454 -21.673676 -48.409454 -48.409454zm24.204712 0l0 0c0 13.367889 10.8368225 24.204712 24.204742 24.204712c13.367889 0 24.204712 -10.8368225 24.204712 -24.204712c0 -13.36792 -10.8368225 -24.204727 -24.204712 -24.204727l0 0c-13.36792 0 -24.204742 10.836807 -24.204742 24.204727z"
|
|
348
|
+
fillRule="evenodd"
|
|
349
|
+
/>
|
|
350
|
+
<path
|
|
351
|
+
stroke="#000000"
|
|
352
|
+
stroke-width="1.0"
|
|
353
|
+
stroke-linejoin="round"
|
|
354
|
+
stroke-linecap="butt"
|
|
355
|
+
d="m287.5 279.35303l0 0c0 -26.73581 21.673645 -48.409454 48.409454 -48.409454l0 0c12.838989 0 25.1521 5.1002655 34.23065 14.1788025c9.078522 9.078522 14.1788025 21.391663 14.1788025 34.23065l0 0c0 26.735779 -21.673645 48.409454 -48.409454 48.409454l0 0c-26.73581 0 -48.409454 -21.673676 -48.409454 -48.409454zm24.204712 0l0 0c0 13.367889 10.8368225 24.204712 24.204742 24.204712c13.367889 0 24.204712 -10.8368225 24.204712 -24.204712c0 -13.36792 -10.8368225 -24.204727 -24.204712 -24.204727l0 0c-13.36792 0 -24.204742 10.836807 -24.204742 24.204727z"
|
|
356
|
+
fillRule="evenodd"
|
|
357
|
+
/>
|
|
358
|
+
</g>
|
|
359
|
+
</g>,
|
|
360
|
+
400
|
|
361
|
+
);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {options} options
|
|
3
|
+
* @typedef {object} options
|
|
4
|
+
* @property {boolean} isPlural Are we searching for 1 thing or many?
|
|
5
|
+
* @property {string} queryName What the props come back on ( by default = modelName + 'Query')
|
|
6
|
+
*/
|
|
7
|
+
import { reduxForm } from "redux-form";
|
|
8
|
+
import { branch, compose, withProps } from "recompose";
|
|
9
|
+
import { withRouter } from "react-router-dom";
|
|
10
|
+
|
|
11
|
+
/*
|
|
12
|
+
Right now DataTable is doing the same as withTableParams, so the logic is being
|
|
13
|
+
run twice. We need to refactor this to make it more DRY.
|
|
14
|
+
We could do two possible refactorings:
|
|
15
|
+
- remove withTableParams and just give all the appropiate props to DataTable. This would
|
|
16
|
+
make the component simpler.
|
|
17
|
+
- remove the logic from DataTable and just use withTableParams and a new hook called
|
|
18
|
+
useTableParams. This would be more flexible in the case we want to be able to use
|
|
19
|
+
pagination in a different component.
|
|
20
|
+
We should avoid having the component handle all the different
|
|
21
|
+
cases of input because of the next reasons:
|
|
22
|
+
1. It makes the component more complex and harder to understand.
|
|
23
|
+
2. It makes the component harder to test.
|
|
24
|
+
3. It makes the component harder to reuse.
|
|
25
|
+
4. Maintaining the the logic in the component is harder.
|
|
26
|
+
Keeping the logic and uses simple makes maintaining easier.
|
|
27
|
+
|
|
28
|
+
In my opinion, reduxForm could be replaced here with regular redux or even just be taken down.
|
|
29
|
+
Could be a major simplification, but this needs to be analized with lims for better
|
|
30
|
+
understanding if it's possible.
|
|
31
|
+
*/
|
|
32
|
+
export default compose(
|
|
33
|
+
// form prop is needed for redux-form, but we are giving this prop as
|
|
34
|
+
// formName, so we need to rename it. Previously it was done in the withTableParams, but now
|
|
35
|
+
// it doesn't have it by default.
|
|
36
|
+
withProps(({ formName }) => ({ form: formName })),
|
|
37
|
+
// the formName is passed via withTableParams and is often user overridden
|
|
38
|
+
branch(props => !props.noForm, reduxForm({})),
|
|
39
|
+
// don't use withRouter if noRouter is passed!
|
|
40
|
+
branch(props => !props.noRouter, withRouter)
|
|
41
|
+
);
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { toNumber } from "lodash-es";
|
|
2
|
+
import { getVals } from "./getVals";
|
|
3
|
+
import { isValueEmpty } from "./isValueEmpty";
|
|
4
|
+
import { isTruthy } from "./isTruthy";
|
|
5
|
+
|
|
6
|
+
export const defaultFormatters = {
|
|
7
|
+
boolean: newVal => {
|
|
8
|
+
return isTruthy(newVal);
|
|
9
|
+
},
|
|
10
|
+
dropdown: (newVal, field) => {
|
|
11
|
+
const valsMap = {};
|
|
12
|
+
getVals(field.values).forEach(v => {
|
|
13
|
+
valsMap[v.toLowerCase().trim()] = v;
|
|
14
|
+
});
|
|
15
|
+
return valsMap[newVal?.toLowerCase().trim()] || newVal;
|
|
16
|
+
},
|
|
17
|
+
dropdownMulti: (newVal, field) => {
|
|
18
|
+
const valsMap = {};
|
|
19
|
+
getVals(field.values).forEach(v => {
|
|
20
|
+
valsMap[v.toLowerCase().trim()] = v;
|
|
21
|
+
});
|
|
22
|
+
if (!newVal) return;
|
|
23
|
+
return newVal
|
|
24
|
+
.split(",")
|
|
25
|
+
.map(v => valsMap[v.toLowerCase().trim()] || v)
|
|
26
|
+
.join(",");
|
|
27
|
+
},
|
|
28
|
+
number: newVal => {
|
|
29
|
+
if (isValueEmpty(newVal)) return newVal;
|
|
30
|
+
return toNumber(newVal);
|
|
31
|
+
}
|
|
32
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { isNumber } from "lodash-es";
|
|
2
|
+
import { getVals } from "./getVals";
|
|
3
|
+
import { isValueEmpty } from "./isValueEmpty";
|
|
4
|
+
|
|
5
|
+
export const defaultValidators = {
|
|
6
|
+
dropdown: (newVal, field) => {
|
|
7
|
+
const err = "Please choose one of the accepted values";
|
|
8
|
+
if (!newVal) {
|
|
9
|
+
if (field.isRequired) return err;
|
|
10
|
+
} else if (!getVals(field.values).includes(newVal)) {
|
|
11
|
+
return err;
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
dropdownMulti: (newVal, field) => {
|
|
15
|
+
const err = "Please choose one of the accepted values";
|
|
16
|
+
if (!newVal) {
|
|
17
|
+
if (field.isRequired) return err;
|
|
18
|
+
} else {
|
|
19
|
+
let err;
|
|
20
|
+
newVal.split(",").some(v => {
|
|
21
|
+
if (!getVals(field.values).includes(v)) {
|
|
22
|
+
err = `${v} is not an accepted value`;
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
return false;
|
|
26
|
+
});
|
|
27
|
+
return err;
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
number: (newVal, field) => {
|
|
31
|
+
if (isValueEmpty(newVal) && !field.isRequired) return;
|
|
32
|
+
if (isNaN(newVal) || !isNumber(newVal)) {
|
|
33
|
+
return "Must be a number";
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
string: (newVal, field) => {
|
|
37
|
+
if (!field.isRequired) return false;
|
|
38
|
+
if (!newVal) return "Please enter a value here";
|
|
39
|
+
}
|
|
40
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { set } from "lodash-es";
|
|
2
|
+
import { defaultValidators } from "./defaultValidators";
|
|
3
|
+
import { defaultFormatters } from "./defaultFormatters";
|
|
4
|
+
|
|
5
|
+
//(mutative) responsible for formatting and then validating the
|
|
6
|
+
|
|
7
|
+
export const editCellHelper = ({
|
|
8
|
+
entity,
|
|
9
|
+
path,
|
|
10
|
+
schema,
|
|
11
|
+
columnSchema,
|
|
12
|
+
newVal
|
|
13
|
+
}) => {
|
|
14
|
+
let nv = newVal;
|
|
15
|
+
|
|
16
|
+
const colSchema =
|
|
17
|
+
columnSchema || schema?.fields?.find(({ path: p }) => p === path) || {};
|
|
18
|
+
path = path || colSchema.path;
|
|
19
|
+
const { format, validate, type } = colSchema;
|
|
20
|
+
let error;
|
|
21
|
+
if (nv === undefined && colSchema.defaultValue !== undefined)
|
|
22
|
+
nv = colSchema.defaultValue;
|
|
23
|
+
|
|
24
|
+
if (format) {
|
|
25
|
+
nv = format(nv, colSchema);
|
|
26
|
+
}
|
|
27
|
+
if (defaultFormatters[type]) {
|
|
28
|
+
nv = defaultFormatters[type](nv, colSchema);
|
|
29
|
+
}
|
|
30
|
+
if (validate) {
|
|
31
|
+
error = validate(nv, colSchema, entity);
|
|
32
|
+
}
|
|
33
|
+
if (!error) {
|
|
34
|
+
const validator =
|
|
35
|
+
defaultValidators[type] ||
|
|
36
|
+
type === "string" ||
|
|
37
|
+
(type === undefined && defaultValidators.string);
|
|
38
|
+
if (validator) {
|
|
39
|
+
error = validator(nv, colSchema);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
set(entity, path, nv);
|
|
43
|
+
return { entity, error };
|
|
44
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { getFieldPathToField } from "./getFieldPathToField";
|
|
2
|
+
|
|
3
|
+
export const formatPasteData = ({ schema, newVal, path }) => {
|
|
4
|
+
const pathToField = getFieldPathToField(schema);
|
|
5
|
+
const column = pathToField[path];
|
|
6
|
+
if (column.type === "genericSelect") {
|
|
7
|
+
if (newVal?.__genSelCol === path) {
|
|
8
|
+
newVal = newVal.__strVal;
|
|
9
|
+
} else {
|
|
10
|
+
newVal = undefined;
|
|
11
|
+
}
|
|
12
|
+
} else {
|
|
13
|
+
newVal = Object.hasOwn(newVal, "__strVal") ? newVal.__strVal : newVal;
|
|
14
|
+
}
|
|
15
|
+
return newVal;
|
|
16
|
+
};
|
package/getAllRows.js
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const getAllRows = e => {
|
|
2
|
+
const el = e.target.querySelector(".data-table-container")
|
|
3
|
+
? e.target.querySelector(".data-table-container")
|
|
4
|
+
: e.target.closest(".data-table-container");
|
|
5
|
+
|
|
6
|
+
const allRowEls = el.querySelectorAll(".rt-tr");
|
|
7
|
+
if (!allRowEls || !allRowEls.length) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
return allRowEls;
|
|
11
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const getCellCopyText = cellWrapper => {
|
|
2
|
+
const text = cellWrapper && cellWrapper.getAttribute("data-copy-text");
|
|
3
|
+
const jsonText = cellWrapper && cellWrapper.getAttribute("data-copy-json");
|
|
4
|
+
|
|
5
|
+
const textContent = text || cellWrapper.textContent || "";
|
|
6
|
+
return [textContent, jsonText];
|
|
7
|
+
};
|
package/getCellInfo.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { getIdOrCodeOrIndex } from "./getIdOrCodeOrIndex";
|
|
2
|
+
|
|
3
|
+
export const getCellInfo = ({
|
|
4
|
+
columnIndex,
|
|
5
|
+
columnPath,
|
|
6
|
+
rowId,
|
|
7
|
+
schema,
|
|
8
|
+
entities,
|
|
9
|
+
rowIndex,
|
|
10
|
+
isEntityDisabled,
|
|
11
|
+
entity
|
|
12
|
+
}) => {
|
|
13
|
+
const leftpath = schema.fields[columnIndex - 1]?.path;
|
|
14
|
+
const rightpath = schema.fields[columnIndex + 1]?.path;
|
|
15
|
+
const cellIdToLeft = leftpath && `${rowId}:${leftpath}`;
|
|
16
|
+
const cellIdToRight = rightpath && `${rowId}:${rightpath}`;
|
|
17
|
+
const rowAboveId =
|
|
18
|
+
entities[rowIndex - 1] &&
|
|
19
|
+
getIdOrCodeOrIndex(entities[rowIndex - 1], rowIndex - 1);
|
|
20
|
+
const rowBelowId =
|
|
21
|
+
entities[rowIndex + 1] &&
|
|
22
|
+
getIdOrCodeOrIndex(entities[rowIndex + 1], rowIndex + 1);
|
|
23
|
+
const cellIdAbove = rowAboveId && `${rowAboveId}:${columnPath}`;
|
|
24
|
+
const cellIdBelow = rowBelowId && `${rowBelowId}:${columnPath}`;
|
|
25
|
+
|
|
26
|
+
const cellId = `${rowId}:${columnPath}`;
|
|
27
|
+
const rowDisabled = isEntityDisabled(entity);
|
|
28
|
+
return {
|
|
29
|
+
cellId,
|
|
30
|
+
cellIdAbove,
|
|
31
|
+
cellIdToRight,
|
|
32
|
+
cellIdBelow,
|
|
33
|
+
cellIdToLeft,
|
|
34
|
+
rowDisabled
|
|
35
|
+
};
|
|
36
|
+
};
|
package/getCellVal.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { get } from "lodash-es";
|
|
2
|
+
import { isString } from "lodash-es";
|
|
3
|
+
import { isTruthy } from "./isTruthy";
|
|
4
|
+
|
|
5
|
+
export const getCellVal = (ent, path, col) => {
|
|
6
|
+
const isBool = col?.type === "boolean";
|
|
7
|
+
let selectedCellVal = get(ent, path, "");
|
|
8
|
+
if (isBool) {
|
|
9
|
+
if (isString(selectedCellVal)) {
|
|
10
|
+
selectedCellVal = selectedCellVal.toLowerCase();
|
|
11
|
+
}
|
|
12
|
+
selectedCellVal =
|
|
13
|
+
selectedCellVal === "true" ||
|
|
14
|
+
selectedCellVal === true ||
|
|
15
|
+
selectedCellVal === 1 ||
|
|
16
|
+
selectedCellVal === "yes";
|
|
17
|
+
selectedCellVal = isTruthy(selectedCellVal);
|
|
18
|
+
}
|
|
19
|
+
return selectedCellVal;
|
|
20
|
+
};
|