@g1cloud/bluesea 5.0.0-alpha.1

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 (69) hide show
  1. package/LICENSE +6 -0
  2. package/css/bluesea-base.scss +6 -0
  3. package/css/component.scss +164 -0
  4. package/css/font.scss +3 -0
  5. package/css/frame/default.scss +149 -0
  6. package/css/layout.scss +116 -0
  7. package/css/reset.scss +58 -0
  8. package/css/utility.scss +228 -0
  9. package/css/variable.scss +34 -0
  10. package/dist/bluesea.js +2465 -0
  11. package/dist/bluesea.umd.cjs +2466 -0
  12. package/dist/component/BSButton.vue.d.ts +15 -0
  13. package/dist/component/basic/BSPopup.vue.d.ts +9 -0
  14. package/dist/component/grid/BSDateRangeFilter.vue.d.ts +56 -0
  15. package/dist/component/grid/BSDateRangeFilters.vue.d.ts +23 -0
  16. package/dist/component/grid/BSGrid.vue.d.ts +80 -0
  17. package/dist/component/grid/BSGridCell.vue.d.ts +47 -0
  18. package/dist/component/grid/BSGridCheckboxCell.vue.d.ts +19 -0
  19. package/dist/component/grid/BSGridCheckboxHeaderCell.vue.d.ts +19 -0
  20. package/dist/component/grid/BSGridControl.vue.d.ts +53 -0
  21. package/dist/component/grid/BSGridHeaderCell.vue.d.ts +20 -0
  22. package/dist/component/grid/BSGridLookup.vue.d.ts +21 -0
  23. package/dist/component/grid/BSGridPageNavigation.vue.d.ts +51 -0
  24. package/dist/component/grid/BSTextFilter.vue.d.ts +41 -0
  25. package/dist/component/grid/DateFilterModel.d.ts +4 -0
  26. package/dist/component/grid/GridLib.d.ts +3 -0
  27. package/dist/component/grid/GridModel.d.ts +35 -0
  28. package/dist/component/input/BSCheckbox.vue.d.ts +50 -0
  29. package/dist/component/input/BSCheckboxGroup.vue.d.ts +43 -0
  30. package/dist/component/input/BSDateInput.vue.d.ts +56 -0
  31. package/dist/component/input/BSMultiSelect.vue.d.ts +43 -0
  32. package/dist/component/input/BSNumberInput.vue.d.ts +49 -0
  33. package/dist/component/input/BSRadioButton.vue.d.ts +61 -0
  34. package/dist/component/input/BSRadioButtonGroup.vue.d.ts +43 -0
  35. package/dist/component/input/BSSelect.vue.d.ts +43 -0
  36. package/dist/component/input/BSSelectModel.d.ts +0 -0
  37. package/dist/component/input/BSSelectPopup.vue.d.ts +55 -0
  38. package/dist/component/input/BSTextArea.vue.d.ts +49 -0
  39. package/dist/component/input/BSTextInput.vue.d.ts +49 -0
  40. package/dist/component/input/BSTreeSelect.vue.d.ts +43 -0
  41. package/dist/component/input/InternalDateInput.vue.d.ts +36 -0
  42. package/dist/component/layout/BSTabSheet.vue.d.ts +37 -0
  43. package/dist/component/layout/TabSheetModel.d.ts +5 -0
  44. package/dist/component/tree/BSTree.vue.d.ts +63 -0
  45. package/dist/component/tree/BSTreeRow.vue.d.ts +54 -0
  46. package/dist/component/tree/TreeLib.d.ts +5 -0
  47. package/dist/component/tree/TreeModel.d.ts +2 -0
  48. package/dist/directive/vClickOutside.d.ts +11 -0
  49. package/dist/frame/FrameModel.d.ts +23 -0
  50. package/dist/frame/default/DefaultBody.vue.d.ts +2 -0
  51. package/dist/frame/default/DefaultFrameModel.d.ts +35 -0
  52. package/dist/frame/default/DefaultHeader.vue.d.ts +2 -0
  53. package/dist/frame/default/HeaderLogo.vue.d.ts +2 -0
  54. package/dist/frame/default/HeaderTab.vue.d.ts +16 -0
  55. package/dist/frame/default/HeaderTabs.vue.d.ts +2 -0
  56. package/dist/frame/default/SidebarMenu.vue.d.ts +2 -0
  57. package/dist/frame/default/SidebarMenuItem.vue.d.ts +16 -0
  58. package/dist/frame/default/SidebarMenuLink.vue.d.ts +20 -0
  59. package/dist/index.d.ts +35 -0
  60. package/dist/model/CommonTypes.d.ts +8 -0
  61. package/dist/model/FilterModel.d.ts +69 -0
  62. package/dist/model/SearchModel.d.ts +16 -0
  63. package/dist/style.css +3665 -0
  64. package/dist/util/componentUtil.d.ts +7 -0
  65. package/dist/util/formatUtil.d.ts +61 -0
  66. package/dist/util/routeUtil.d.ts +2 -0
  67. package/dist/util/typeUtil.d.ts +18 -0
  68. package/dist/util/waitUtil.d.ts +19 -0
  69. package/package.json +48 -0
@@ -0,0 +1,7 @@
1
+ declare const componentUtil: {
2
+ handleExternalErrorMessage(showErrorMessage: boolean, errorMessage?: string, elementId?: string): void;
3
+ generateNextId(prefix: string): string;
4
+ isRelativeSize(size?: string): boolean;
5
+ delayed<T>(func: () => T, millis?: number): void;
6
+ };
7
+ export default componentUtil;
@@ -0,0 +1,61 @@
1
+ import { Dayjs } from "dayjs";
2
+ export declare const formatUtil: {
3
+ /**
4
+ * 개행 문자('\r', '\n')를 '<br/>' 태그로 변경한다.
5
+ * @param str 변경할 String
6
+ * @return 개행문자가 '<br/>'로 변경된 String
7
+ */
8
+ escapeNewLine(str?: string): string;
9
+ /**
10
+ * `str` 안의 `&<>"'` 문자를 escape 처리한다.
11
+ * @param str 변경할 String
12
+ */
13
+ escapeHtml(str?: string): string;
14
+ /**
15
+ * String 을 개행 문자('\r', '\n') 기준으로 나눈다.
16
+ * @param str
17
+ * @return 개행문자로 나누어진 string 의 array
18
+ */
19
+ splitNewLine(str?: string): Array<string>;
20
+ /**
21
+ * 날짜를 주어진 형식의 문자열로 변환한다.
22
+ * ````javascript
23
+ * formatUtil.formatDate('2020-10-04T12:34:56.000') // returns "2020.10.04"
24
+ * formatUtil.formatDate('2020-10-04T12:34:56.000', 'MINUTE') // returns "2020.10.04 12:34"
25
+ * formatUtil.formatDate(null, 'DATE') // returns ''
26
+ * formatUtil.formatDate(undefined, 'DATE') // returns ''
27
+ * ````
28
+ * @param date 날짜. string, Date, Dayjs 타입 중 하나.
29
+ * @param pattern 'DATE', 'MINUTE', 또는 날짜 패턴 (ex: 'YYYY.MM.DD')
30
+ * @returns pattern 형식으로 변환된 문자열. date 나 pattern 이 false 이면 빈 문자열을 리턴한다.
31
+ */
32
+ formatDate(date?: string | Date | Dayjs | null, pattern?: string): string;
33
+ /**
34
+ * 숫자에 구분점을 넣는다.
35
+ * @param value
36
+ * @return
37
+ */
38
+ formatNumber(value?: number | string | null): string | null;
39
+ /**
40
+ * rate 를 받아 percent 를 출력한다.
41
+ * * 0.1 -> 10%
42
+ * * 0.55 -> 55%
43
+ * * 0.551 -> 55.1%
44
+ * @param value 비율 값
45
+ * @param withUnit true 이면 % 를 붙이고, false 이면 붙이지 않는다.
46
+ * @param decimalPlace 소숫점 n번째에서 반올림한다.
47
+ */
48
+ formatPercent(value?: number | string | null, withUnit?: boolean, decimalPlace?: number): string | null;
49
+ /**
50
+ * 신용카드번호를 4자리 단위로 나누어 구분자를 넣는다.
51
+ * @param value
52
+ * @param separator 구분자
53
+ */
54
+ formatCreditCardNo(value: string, separator?: string): string | undefined;
55
+ /**
56
+ * `HTML`태그가 포함된 문자열에서 text만 남긴다.
57
+ * @param textIncludedHTMLElement HTML 태그를 포함하는 문자열
58
+ * @return HTML 태그가 제거된 문자열
59
+ */
60
+ toPlainText(textIncludedHTMLElement?: string): string;
61
+ };
@@ -0,0 +1,2 @@
1
+ import { RouteLocation } from "vue-router";
2
+ export declare const parsePathParam: (route: RouteLocation) => string[];
@@ -0,0 +1,18 @@
1
+ export type FunctionPropertyNames<T> = {
2
+ [K in keyof T]: T[K] extends Function ? K : never;
3
+ }[keyof T];
4
+ export type FunctionProperties<T> = Pick<T, FunctionPropertyNames<T>>;
5
+ export type NonFunctionPropertyNames<T> = {
6
+ [K in keyof T]: T[K] extends Function ? never : K;
7
+ }[keyof T];
8
+ export type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
9
+ export type PartialNonFunctionProperties<T> = Partial<NonFunctionProperties<T>>;
10
+ export type RawData<T> = PartialNonFunctionProperties<T>;
11
+ /**
12
+ * Array 의 filter 로 null/undefined 가 아닌 것을 걸러낼 때 사용한다.
13
+ * ```ts
14
+ * const array: (string | null)[] = ['test', null, 'sample', undefined]
15
+ * const filtered: string[] = array.filter(notNull)
16
+ * ```
17
+ */
18
+ export declare function notNull<T>(value: T | null | undefined): value is T;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * 특정 조건이 완료될 때까지 여러 번 계속 시도한다.
3
+ * @param condition 조건
4
+ * @param intervalMilliseconds 시도 간격
5
+ * @param maxTrial 최대 시도 수
6
+ */
7
+ export declare const waitUntil: (condition: () => boolean, intervalMilliseconds?: number, maxTrial?: number) => Promise<void>;
8
+ /**
9
+ * 일정 시간동안 기다린다.
10
+ * @param milliSec 기다리는 시간
11
+ */
12
+ export declare const waitDuring: (milliSec?: number) => Promise<void>;
13
+ export declare const tryUntil: (until: () => boolean | undefined, tryCall: () => void, intervalMilliseconds?: number, maxTrial?: number) => void;
14
+ declare const _default: {
15
+ waitUntil: (condition: () => boolean, intervalMilliseconds?: number, maxTrial?: number) => Promise<void>;
16
+ waitDuring: (milliSec?: number) => Promise<void>;
17
+ tryUntil: (until: () => boolean | undefined, tryCall: () => void, intervalMilliseconds?: number, maxTrial?: number) => void;
18
+ };
19
+ export default _default;
package/package.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@g1cloud/bluesea",
3
+ "private": false,
4
+ "version": "5.0.0-alpha.1",
5
+ "description": "Ui Library for g1cloud BackOffice.",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">= 20.10.0"
9
+ },
10
+ "author": "kimos@g1project.net",
11
+ "license": "LicenseRef-LICENSE",
12
+ "files": [
13
+ "dist",
14
+ "css",
15
+ "!dist/tests"
16
+ ],
17
+ "module": "dist/bluesea.js",
18
+ "types": "dist/index.d.ts",
19
+ "dependencies": {
20
+ "dayjs": "^1.11.10",
21
+ "vue": "^3.3.8",
22
+ "vue-router": "^4.2.5",
23
+ "@vue/shared": "^3.4.5"
24
+ },
25
+ "devDependencies": {
26
+ "@types/node": "^20.10.2",
27
+ "@vitejs/plugin-vue": "^4.5.0",
28
+ "@vitest/coverage-v8": "^1.1.3",
29
+ "jsdom": "^23.1.0",
30
+ "typescript": "^5.2.2",
31
+ "vite": "^5.0.0",
32
+ "vite-plugin-dts": "^3.6.4",
33
+ "vitest": "^1.1.3",
34
+ "vitest-canvas-mock": "^0.3.3",
35
+ "vue-tsc": "^1.8.22"
36
+ },
37
+ "peerDependencies": {
38
+ "dayjs": "^1.11.10",
39
+ "vue": "^3.3.8",
40
+ "vue-router": "^4.2.5"
41
+ },
42
+ "scripts": {
43
+ "dev": "vite",
44
+ "build": "vue-tsc && vite build",
45
+ "preview": "vite preview",
46
+ "test": "vitest"
47
+ }
48
+ }