@elice/material-assignment 1.260305.0 → 1.260430.0
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/cjs/components/material-assignment/MaterialAssignmentContent.js +3 -4
- package/cjs/components/material-assignment/MaterialAssignmentUploadModal.js +2 -2
- package/cjs/components/material-assignment-admin/MaterialAssignmentAdmin.styled.d.ts +8 -22
- package/cjs/components/shared/MaterialAssignmentContainer.d.ts +1 -0
- package/es/components/material-assignment/MaterialAssignmentContent.js +3 -4
- package/es/components/material-assignment/MaterialAssignmentUploadModal.js +1 -1
- package/es/components/material-assignment-admin/MaterialAssignmentAdmin.styled.d.ts +8 -22
- package/es/components/shared/MaterialAssignmentContainer.d.ts +1 -0
- package/package.json +28 -17
- package/cjs/node_modules/@elice/mui-system/es/tokens/colors/green.js +0 -31
- package/cjs/node_modules/@elice/mui-system/es/tokens/colors/orange.js +0 -31
- package/cjs/node_modules/@elice/utils/es/texts/validateUrl.js +0 -18
- package/es/node_modules/@elice/mui-system/es/tokens/colors/green.js +0 -29
- package/es/node_modules/@elice/mui-system/es/tokens/colors/orange.js +0 -29
- package/es/node_modules/@elice/utils/es/texts/validateUrl.js +0 -16
|
@@ -11,12 +11,11 @@ var blocks = require('@elice/blocks');
|
|
|
11
11
|
var designTokens = require('@elice/design-tokens');
|
|
12
12
|
var intl = require('@elice/intl');
|
|
13
13
|
var materialSharedUtils = require('@elice/material-shared-utils');
|
|
14
|
+
var muiSystem = require('@elice/mui-system');
|
|
14
15
|
var types = require('@elice/types');
|
|
15
16
|
var MaterialAssignmentContainer = require('../shared/MaterialAssignmentContainer.js');
|
|
16
17
|
var color = require('./constants/color.js');
|
|
17
18
|
var MaterialAssignmentUploadModal = require('./MaterialAssignmentUploadModal.js');
|
|
18
|
-
var green = require('../../node_modules/@elice/mui-system/es/tokens/colors/green.js');
|
|
19
|
-
var orange = require('../../node_modules/@elice/mui-system/es/tokens/colors/orange.js');
|
|
20
19
|
|
|
21
20
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
22
21
|
|
|
@@ -26,10 +25,10 @@ var React__default = /*#__PURE__*/_interopDefaultCompat(React);
|
|
|
26
25
|
var GRADE_LIST_COUNT = 20;
|
|
27
26
|
var StyledSubmittedText = /*#__PURE__*/_styled__default.default(blocks.Text, {
|
|
28
27
|
target: "e1wk5tfe4"
|
|
29
|
-
})("color:",
|
|
28
|
+
})("color:", muiSystem.colors.green[400], ";");
|
|
30
29
|
var StyledNoSubmittedText = /*#__PURE__*/_styled__default.default(blocks.Text, {
|
|
31
30
|
target: "e1wk5tfe3"
|
|
32
|
-
})("color:",
|
|
31
|
+
})("color:", muiSystem.colors.orange[400], ";");
|
|
33
32
|
var StyledTableHeaderCell = /*#__PURE__*/_styled__default.default("td", {
|
|
34
33
|
target: "e1wk5tfe2"
|
|
35
34
|
})("color:", color.DARK_TEXT_TERTIARY_COLOR, "!important;");
|
|
@@ -11,7 +11,7 @@ var apiClient = require('@elice/api-client');
|
|
|
11
11
|
var blocks = require('@elice/blocks');
|
|
12
12
|
var designTokens = require('@elice/design-tokens');
|
|
13
13
|
var intl = require('@elice/intl');
|
|
14
|
-
var
|
|
14
|
+
var utils = require('@elice/utils');
|
|
15
15
|
|
|
16
16
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e : { default: e }; }
|
|
17
17
|
|
|
@@ -193,7 +193,7 @@ var MaterialAssignmentUploadModal = function MaterialAssignmentUploadModal(_ref)
|
|
|
193
193
|
rules: {
|
|
194
194
|
required: true,
|
|
195
195
|
validate: function validate(url) {
|
|
196
|
-
return
|
|
196
|
+
return utils.validateUrl(url !== null && url !== void 0 ? url : '') ? true : intl$1.formatMessage({
|
|
197
197
|
id: 'materialAssignment.input.invalid'
|
|
198
198
|
});
|
|
199
199
|
}
|
|
@@ -1,25 +1,11 @@
|
|
|
1
|
-
import { Text } from '@elice/blocks';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
theme?: import("@emotion/react").Theme;
|
|
8
|
-
}, {}, {}>;
|
|
9
|
-
export declare const StyledMaterialAssignmentAdminTextareaWrapper: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: import("@emotion/react").Theme;
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
-
export declare const StyledMaterialAssignmentAdminManualScoreEditButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
14
|
-
theme?: import("@emotion/react").Theme;
|
|
15
|
-
as?: React.ElementType;
|
|
16
|
-
} & {
|
|
1
|
+
import { Flex, Text } from '@elice/blocks';
|
|
2
|
+
import type { ComponentProps, ComponentType } from 'react';
|
|
3
|
+
export declare const StyledMaterialAssignmentAdminContainer: ComponentType<ComponentProps<'div'>>;
|
|
4
|
+
export declare const StyledMaterialAssignmentAdminGradeWrapper: ComponentType<ComponentProps<typeof Flex>>;
|
|
5
|
+
export declare const StyledMaterialAssignmentAdminTextareaWrapper: ComponentType<ComponentProps<'div'>>;
|
|
6
|
+
export declare const StyledMaterialAssignmentAdminManualScoreEditButtonWrapper: ComponentType<ComponentProps<'div'> & {
|
|
17
7
|
disabled: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare const StyledMaterialAssignmentAdminManualScoreEditButton:
|
|
20
|
-
theme?: import("@emotion/react").Theme;
|
|
21
|
-
} & {
|
|
8
|
+
}>;
|
|
9
|
+
export declare const StyledMaterialAssignmentAdminManualScoreEditButton: ComponentType<ComponentProps<typeof Text> & {
|
|
22
10
|
disabled: boolean;
|
|
23
|
-
}, {}, {
|
|
24
|
-
ref?: import("react").Ref<Text> | undefined;
|
|
25
11
|
}>;
|
|
@@ -7,20 +7,19 @@ import { Text, Button, Spinner, Vspace, InfoTable, TableNext, Hspace } from '@el
|
|
|
7
7
|
import { base } from '@elice/design-tokens';
|
|
8
8
|
import { useRawEliceIntl } from '@elice/intl';
|
|
9
9
|
import { useMaterialConfigApiClientUpdate, useMaterialFetchRaw } from '@elice/material-shared-utils';
|
|
10
|
+
import { colors } from '@elice/mui-system';
|
|
10
11
|
import { enums } from '@elice/types';
|
|
11
12
|
import MaterialAssignmentContainer from '../shared/MaterialAssignmentContainer.js';
|
|
12
13
|
import { DARK_TEXT_TERTIARY_COLOR } from './constants/color.js';
|
|
13
14
|
import MaterialAssignmentUploadModal from './MaterialAssignmentUploadModal.js';
|
|
14
|
-
import { green } from '../../node_modules/@elice/mui-system/es/tokens/colors/green.js';
|
|
15
|
-
import { orange } from '../../node_modules/@elice/mui-system/es/tokens/colors/orange.js';
|
|
16
15
|
|
|
17
16
|
var GRADE_LIST_COUNT = 20;
|
|
18
17
|
var StyledSubmittedText = /*#__PURE__*/_styled(Text, {
|
|
19
18
|
target: "e1wk5tfe4"
|
|
20
|
-
})("color:", green[400], ";");
|
|
19
|
+
})("color:", colors.green[400], ";");
|
|
21
20
|
var StyledNoSubmittedText = /*#__PURE__*/_styled(Text, {
|
|
22
21
|
target: "e1wk5tfe3"
|
|
23
|
-
})("color:", orange[400], ";");
|
|
22
|
+
})("color:", colors.orange[400], ";");
|
|
24
23
|
var StyledTableHeaderCell = /*#__PURE__*/_styled("td", {
|
|
25
24
|
target: "e1wk5tfe2"
|
|
26
25
|
})("color:", DARK_TEXT_TERTIARY_COLOR, "!important;");
|
|
@@ -7,7 +7,7 @@ import { postOrgMaterialAssignmentSubmissionAdd } from '@elice/api-client';
|
|
|
7
7
|
import { Files, Modal, Alert, Vspace, Radio, RadioButton, Input, Checkbox, Text, Notification } from '@elice/blocks';
|
|
8
8
|
import { base } from '@elice/design-tokens';
|
|
9
9
|
import { useRawEliceIntl } from '@elice/intl';
|
|
10
|
-
import { validateUrl } from '
|
|
10
|
+
import { validateUrl } from '@elice/utils';
|
|
11
11
|
|
|
12
12
|
var StyledAssignmentContentFiles = /*#__PURE__*/_styled(Files, {
|
|
13
13
|
target: "eua09co0"
|
|
@@ -1,25 +1,11 @@
|
|
|
1
|
-
import { Text } from '@elice/blocks';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export declare const
|
|
7
|
-
theme?: import("@emotion/react").Theme;
|
|
8
|
-
}, {}, {}>;
|
|
9
|
-
export declare const StyledMaterialAssignmentAdminTextareaWrapper: import("@emotion/styled").StyledComponent<{
|
|
10
|
-
theme?: import("@emotion/react").Theme;
|
|
11
|
-
as?: React.ElementType;
|
|
12
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
-
export declare const StyledMaterialAssignmentAdminManualScoreEditButtonWrapper: import("@emotion/styled").StyledComponent<{
|
|
14
|
-
theme?: import("@emotion/react").Theme;
|
|
15
|
-
as?: React.ElementType;
|
|
16
|
-
} & {
|
|
1
|
+
import { Flex, Text } from '@elice/blocks';
|
|
2
|
+
import type { ComponentProps, ComponentType } from 'react';
|
|
3
|
+
export declare const StyledMaterialAssignmentAdminContainer: ComponentType<ComponentProps<'div'>>;
|
|
4
|
+
export declare const StyledMaterialAssignmentAdminGradeWrapper: ComponentType<ComponentProps<typeof Flex>>;
|
|
5
|
+
export declare const StyledMaterialAssignmentAdminTextareaWrapper: ComponentType<ComponentProps<'div'>>;
|
|
6
|
+
export declare const StyledMaterialAssignmentAdminManualScoreEditButtonWrapper: ComponentType<ComponentProps<'div'> & {
|
|
17
7
|
disabled: boolean;
|
|
18
|
-
}
|
|
19
|
-
export declare const StyledMaterialAssignmentAdminManualScoreEditButton:
|
|
20
|
-
theme?: import("@emotion/react").Theme;
|
|
21
|
-
} & {
|
|
8
|
+
}>;
|
|
9
|
+
export declare const StyledMaterialAssignmentAdminManualScoreEditButton: ComponentType<ComponentProps<typeof Text> & {
|
|
22
10
|
disabled: boolean;
|
|
23
|
-
}, {}, {
|
|
24
|
-
ref?: import("react").Ref<Text> | undefined;
|
|
25
11
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elice/material-assignment",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.260430.0",
|
|
4
4
|
"description": "User view and editing components of Elice material assignment",
|
|
5
5
|
"repository": "https://git.elicer.io/elice/frontend/library/elice-material",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -14,14 +14,6 @@
|
|
|
14
14
|
"README.md"
|
|
15
15
|
],
|
|
16
16
|
"sideEffects": false,
|
|
17
|
-
"scripts": {
|
|
18
|
-
"start": "run-s watch",
|
|
19
|
-
"prebuild": "run-s clean",
|
|
20
|
-
"build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.ts --configPlugin typescript -f es -f cjs",
|
|
21
|
-
"watch": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es -f cjs -w",
|
|
22
|
-
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
23
|
-
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
24
|
-
},
|
|
25
17
|
"peerDependencies": {
|
|
26
18
|
"@elice/api-client": "^1",
|
|
27
19
|
"@elice/blocks": "^1",
|
|
@@ -29,13 +21,15 @@
|
|
|
29
21
|
"@elice/icons": "^1",
|
|
30
22
|
"@elice/intl": "^0",
|
|
31
23
|
"@elice/markdown": "^1",
|
|
32
|
-
"@elice/
|
|
33
|
-
"@elice/material-shared-utils": "1.260305.0",
|
|
24
|
+
"@elice/mui-system": "^5",
|
|
34
25
|
"@elice/types": "^1",
|
|
26
|
+
"@elice/utils": "^1",
|
|
35
27
|
"@emotion/react": "^11.10.0",
|
|
36
28
|
"@emotion/styled": "^11.10.0",
|
|
37
29
|
"react": "^16.8.0 || ^17.0.0 || ^18.0.0",
|
|
38
|
-
"react-use": "^17.0.0"
|
|
30
|
+
"react-use": "^17.0.0",
|
|
31
|
+
"@elice/material-shared-types": "1.260430.0",
|
|
32
|
+
"@elice/material-shared-utils": "1.260430.0"
|
|
39
33
|
},
|
|
40
34
|
"dependencies": {
|
|
41
35
|
"classnames": "^2.2.0",
|
|
@@ -51,14 +45,31 @@
|
|
|
51
45
|
"@elice/icons-legacy": "npm:@elice/icons@0.230814.0",
|
|
52
46
|
"@elice/intl": "0.241127.0",
|
|
53
47
|
"@elice/markdown": "1.241015.0",
|
|
54
|
-
"@elice/
|
|
55
|
-
"@elice/
|
|
48
|
+
"@elice/mui-system": "5.251204.0",
|
|
49
|
+
"@elice/rollup-config": "^1.260406.0",
|
|
56
50
|
"@elice/types": "^1.251229.0",
|
|
51
|
+
"@elice/utils": "^1.250930.0",
|
|
57
52
|
"@emotion/react": "^11.10.0",
|
|
58
53
|
"@emotion/styled": "^11.10.0",
|
|
59
54
|
"@types/classnames": "^2.3.1",
|
|
60
55
|
"@types/react": "~17.0.9",
|
|
61
|
-
"
|
|
62
|
-
"
|
|
56
|
+
"cross-env": "^7.0.3",
|
|
57
|
+
"del-cli": "^3.0.1",
|
|
58
|
+
"eslint": "~9.39.0",
|
|
59
|
+
"npm-run-all": "^4.1.5",
|
|
60
|
+
"react": "~18.2.0",
|
|
61
|
+
"react-use": "^17.2.4",
|
|
62
|
+
"rollup": "^4.0.0",
|
|
63
|
+
"typescript": "~5.9.3",
|
|
64
|
+
"@elice/material-shared-types": "1.260430.0",
|
|
65
|
+
"@elice/material-shared-utils": "1.260430.0"
|
|
66
|
+
},
|
|
67
|
+
"scripts": {
|
|
68
|
+
"start": "run-s watch",
|
|
69
|
+
"prebuild": "run-s clean",
|
|
70
|
+
"build": "cross-env NODE_ENV=production rollup -c ../../rollup.config.ts --configPlugin typescript -f es -f cjs",
|
|
71
|
+
"watch": "rollup -c ../../rollup.config.ts --configPlugin typescript -f es -f cjs -w",
|
|
72
|
+
"lint": "eslint --ext .ts,.tsx ./src --max-warnings=0",
|
|
73
|
+
"clean": "del-cli \"es/*\" \"cjs/*\" \"dist/*\""
|
|
63
74
|
}
|
|
64
|
-
}
|
|
75
|
+
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Color "Green" palette for Elice Design System.
|
|
5
|
-
* (https://zeroheight.com/28e7b9d96/p/25a3d8-color/b/281ad3/t/7636cc)
|
|
6
|
-
*
|
|
7
|
-
* - `50`: `#e8f5e9`
|
|
8
|
-
* - `100`: `#c8e6c9`
|
|
9
|
-
* - `200`: `#a5d6a7`
|
|
10
|
-
* - `300`: `#81c784`
|
|
11
|
-
* - `400`: `#66bb6a`
|
|
12
|
-
* - `500`: `#4caf50`
|
|
13
|
-
* - `600`: `#43a047`
|
|
14
|
-
* - `700`: `#388e3c`
|
|
15
|
-
* - `800`: `#2e7d32`
|
|
16
|
-
* - `900`: `#1b5e20`
|
|
17
|
-
*/
|
|
18
|
-
var green = Object.freeze({
|
|
19
|
-
50: '#e8f5e9',
|
|
20
|
-
100: '#c8e6c9',
|
|
21
|
-
200: '#a5d6a7',
|
|
22
|
-
300: '#81c784',
|
|
23
|
-
400: '#66bb6a',
|
|
24
|
-
500: '#4caf50',
|
|
25
|
-
600: '#43a047',
|
|
26
|
-
700: '#388e3c',
|
|
27
|
-
800: '#2e7d32',
|
|
28
|
-
900: '#1b5e20'
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
exports.green = green;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Color "Orange" palette for Elice Design System.
|
|
5
|
-
* (https://zeroheight.com/28e7b9d96/p/25a3d8-color/b/281ad3/t/05a83c)
|
|
6
|
-
*
|
|
7
|
-
* - `50`: `#fff3e0`
|
|
8
|
-
* - `100`: `#ffe0b2`
|
|
9
|
-
* - `200`: `#ffcc80`
|
|
10
|
-
* - `300`: `#ffb74d`
|
|
11
|
-
* - `400`: `#ffa726`
|
|
12
|
-
* - `500`: `#ff9800`
|
|
13
|
-
* - `600`: `#fb8c00`
|
|
14
|
-
* - `700`: `#f57c00`
|
|
15
|
-
* - `800`: `#ef6c00`
|
|
16
|
-
* - `900`: `#e65100`
|
|
17
|
-
*/
|
|
18
|
-
var orange = Object.freeze({
|
|
19
|
-
50: '#fff3e0',
|
|
20
|
-
100: '#ffe0b2',
|
|
21
|
-
200: '#ffcc80',
|
|
22
|
-
300: '#ffb74d',
|
|
23
|
-
400: '#ffa726',
|
|
24
|
-
500: '#ff9800',
|
|
25
|
-
600: '#fb8c00',
|
|
26
|
-
700: '#f57c00',
|
|
27
|
-
800: '#ef6c00',
|
|
28
|
-
900: '#e65100'
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
exports.orange = orange;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
*
|
|
5
|
-
* Returns result whether url is valid or not
|
|
6
|
-
* api-regex: https://git.elicer.io/elice/backend/elice-api/-/blob/master/api/func/validator.py#L228
|
|
7
|
-
* @param {string} url
|
|
8
|
-
* @returns {boolean}
|
|
9
|
-
*/
|
|
10
|
-
function validateUrl(url) {
|
|
11
|
-
if (typeof url !== 'string') {
|
|
12
|
-
return false;
|
|
13
|
-
}
|
|
14
|
-
const urlRegex = new RegExp(/^(?:https?):\/\/(?:[^\s:@/]+(?::[^\s:@/]*)?@)?(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-_]{0,61}[a-zA-Z0-9])?\.)+(?:[a-zA-Z]{2,6}\.?|[a-zA-Z0-9\-_]{2,}\.?)|localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::\d{2,5})?(?:\/?|[/?]\S+)$/);
|
|
15
|
-
return urlRegex.test(url);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
exports.validateUrl = validateUrl;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Color "Green" palette for Elice Design System.
|
|
3
|
-
* (https://zeroheight.com/28e7b9d96/p/25a3d8-color/b/281ad3/t/7636cc)
|
|
4
|
-
*
|
|
5
|
-
* - `50`: `#e8f5e9`
|
|
6
|
-
* - `100`: `#c8e6c9`
|
|
7
|
-
* - `200`: `#a5d6a7`
|
|
8
|
-
* - `300`: `#81c784`
|
|
9
|
-
* - `400`: `#66bb6a`
|
|
10
|
-
* - `500`: `#4caf50`
|
|
11
|
-
* - `600`: `#43a047`
|
|
12
|
-
* - `700`: `#388e3c`
|
|
13
|
-
* - `800`: `#2e7d32`
|
|
14
|
-
* - `900`: `#1b5e20`
|
|
15
|
-
*/
|
|
16
|
-
var green = Object.freeze({
|
|
17
|
-
50: '#e8f5e9',
|
|
18
|
-
100: '#c8e6c9',
|
|
19
|
-
200: '#a5d6a7',
|
|
20
|
-
300: '#81c784',
|
|
21
|
-
400: '#66bb6a',
|
|
22
|
-
500: '#4caf50',
|
|
23
|
-
600: '#43a047',
|
|
24
|
-
700: '#388e3c',
|
|
25
|
-
800: '#2e7d32',
|
|
26
|
-
900: '#1b5e20'
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export { green };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Color "Orange" palette for Elice Design System.
|
|
3
|
-
* (https://zeroheight.com/28e7b9d96/p/25a3d8-color/b/281ad3/t/05a83c)
|
|
4
|
-
*
|
|
5
|
-
* - `50`: `#fff3e0`
|
|
6
|
-
* - `100`: `#ffe0b2`
|
|
7
|
-
* - `200`: `#ffcc80`
|
|
8
|
-
* - `300`: `#ffb74d`
|
|
9
|
-
* - `400`: `#ffa726`
|
|
10
|
-
* - `500`: `#ff9800`
|
|
11
|
-
* - `600`: `#fb8c00`
|
|
12
|
-
* - `700`: `#f57c00`
|
|
13
|
-
* - `800`: `#ef6c00`
|
|
14
|
-
* - `900`: `#e65100`
|
|
15
|
-
*/
|
|
16
|
-
var orange = Object.freeze({
|
|
17
|
-
50: '#fff3e0',
|
|
18
|
-
100: '#ffe0b2',
|
|
19
|
-
200: '#ffcc80',
|
|
20
|
-
300: '#ffb74d',
|
|
21
|
-
400: '#ffa726',
|
|
22
|
-
500: '#ff9800',
|
|
23
|
-
600: '#fb8c00',
|
|
24
|
-
700: '#f57c00',
|
|
25
|
-
800: '#ef6c00',
|
|
26
|
-
900: '#e65100'
|
|
27
|
-
});
|
|
28
|
-
|
|
29
|
-
export { orange };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
* Returns result whether url is valid or not
|
|
4
|
-
* api-regex: https://git.elicer.io/elice/backend/elice-api/-/blob/master/api/func/validator.py#L228
|
|
5
|
-
* @param {string} url
|
|
6
|
-
* @returns {boolean}
|
|
7
|
-
*/
|
|
8
|
-
function validateUrl(url) {
|
|
9
|
-
if (typeof url !== 'string') {
|
|
10
|
-
return false;
|
|
11
|
-
}
|
|
12
|
-
const urlRegex = new RegExp(/^(?:https?):\/\/(?:[^\s:@/]+(?::[^\s:@/]*)?@)?(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9\-_]{0,61}[a-zA-Z0-9])?\.)+(?:[a-zA-Z]{2,6}\.?|[a-zA-Z0-9\-_]{2,}\.?)|localhost|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::\d{2,5})?(?:\/?|[/?]\S+)$/);
|
|
13
|
-
return urlRegex.test(url);
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export { validateUrl };
|