@castlabs/ui 4.18.2

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 (140) hide show
  1. package/README.md +94 -0
  2. package/dist/assets/castlabs-logo.svg +2 -0
  3. package/dist/assets/cookie.svg +1 -0
  4. package/dist/castlabs-ui-editor.common.js +23189 -0
  5. package/dist/castlabs-ui-editor.common.js.map +1 -0
  6. package/dist/castlabs-ui-editor.css +1 -0
  7. package/dist/castlabs-ui-editor.umd.js +23208 -0
  8. package/dist/castlabs-ui-editor.umd.js.map +1 -0
  9. package/dist/castlabs-ui-editor.umd.min.js +10 -0
  10. package/dist/castlabs-ui-editor.umd.min.js.map +1 -0
  11. package/dist/castlabs-ui.common.js +6828 -0
  12. package/dist/castlabs-ui.common.js.map +1 -0
  13. package/dist/castlabs-ui.core.js +1031 -0
  14. package/dist/castlabs-ui.css +12 -0
  15. package/dist/castlabs-ui.module.d.ts +83 -0
  16. package/dist/castlabs-ui.module.js +1031 -0
  17. package/dist/castlabs-ui.umd.js +6847 -0
  18. package/dist/castlabs-ui.umd.js.map +1 -0
  19. package/dist/castlabs-ui.umd.min.js +8 -0
  20. package/dist/castlabs-ui.umd.min.js.map +1 -0
  21. package/dist/demo.html +1 -0
  22. package/dist/favicon/192.png +0 -0
  23. package/dist/favicon/512.png +0 -0
  24. package/dist/favicon/apple-touch-icon.png +0 -0
  25. package/dist/favicon/favicon-unread.svg +75 -0
  26. package/dist/favicon/favicon.ico +0 -0
  27. package/dist/favicon/favicon.svg +43 -0
  28. package/dist/favicon/manifest.webmanifest +6 -0
  29. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCCwR26eg.f31394d2.woff2 +0 -0
  30. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCFwR26eg.00073a59.woff2 +0 -0
  31. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCGwR0.faa92a75.woff2 +0 -0
  32. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCIwR26eg.f8e38fba.woff2 +0 -0
  33. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCJwR26eg.f1d5cd16.woff2 +0 -0
  34. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCKwR26eg.ebbe259f.woff2 +0 -0
  35. package/dist/fonts/BngRUXNETWXI6LwhGYvaxZikqbCLwR26eg.e3d460d0.woff2 +0 -0
  36. package/dist/fonts/fa-brands-400.18993be8.woff2 +0 -0
  37. package/dist/fonts/fa-regular-400.e45bb696.woff2 +0 -0
  38. package/dist/fonts/fa-solid-900.16e3d2f0.woff2 +0 -0
  39. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Udc1UAw.6de93dc1.woff2 +0 -0
  40. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Wdc1UAw.55c9461f.woff2 +0 -0
  41. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Xdc1UAw.111f8c99.woff2 +0 -0
  42. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0Zdc0.92257a03.woff2 +0 -0
  43. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0adc1UAw.1844ded3.woff2 +0 -0
  44. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0bdc1UAw.719267ea.woff2 +0 -0
  45. package/dist/fonts/mem6YaGs126MiZpBA-UFUK0ddc1UAw.037dea2d.woff2 +0 -0
  46. package/dist/fonts/mem8YaGs126MiZpBA-UFUZ0bbck.6869bd80.woff2 +0 -0
  47. package/dist/fonts/mem8YaGs126MiZpBA-UFV50bbck.05a41692.woff2 +0 -0
  48. package/dist/fonts/mem8YaGs126MiZpBA-UFVZ0b.38ffdf27.woff2 +0 -0
  49. package/dist/fonts/mem8YaGs126MiZpBA-UFVp0bbck.f12c0c2c.woff2 +0 -0
  50. package/dist/fonts/mem8YaGs126MiZpBA-UFW50bbck.03f14837.woff2 +0 -0
  51. package/dist/fonts/mem8YaGs126MiZpBA-UFWJ0bbck.abcca84a.woff2 +0 -0
  52. package/dist/fonts/mem8YaGs126MiZpBA-UFWp0bbck.4d1e267c.woff2 +0 -0
  53. package/package.json +71 -0
  54. package/plugins/uid/index.js +16 -0
  55. package/plugins/uid/index.ts +16 -0
  56. package/src/assets/castlabs-logo.svg +2 -0
  57. package/src/assets/cookie.svg +1 -0
  58. package/src/components/ClAlert/style.scss +117 -0
  59. package/src/components/ClBadge/style.scss +122 -0
  60. package/src/components/ClButton/style.scss +338 -0
  61. package/src/components/ClCard/style.scss +61 -0
  62. package/src/components/ClCard/style.variables.scss +179 -0
  63. package/src/components/ClDropdown/style.scss +272 -0
  64. package/src/components/ClDropzone/style.scss +21 -0
  65. package/src/components/ClFooter/style.scss +119 -0
  66. package/src/components/ClIcon/style.scss +58 -0
  67. package/src/components/ClIconotron/style.scss +86 -0
  68. package/src/components/ClList/style.scss +93 -0
  69. package/src/components/ClList/style.variables.scss +133 -0
  70. package/src/components/ClListGroup/style.scss +9 -0
  71. package/src/components/ClPagination/style.scss +123 -0
  72. package/src/components/ClProgress/style.scss +49 -0
  73. package/src/components/ClScrollbar/style.scss +14 -0
  74. package/src/components/ClSpinner/style.scss +26 -0
  75. package/src/components/ClTabs/style.scss +90 -0
  76. package/src/components/ClToggle/style.scss +97 -0
  77. package/src/components/ClTooltip/style.scss +46 -0
  78. package/src/components/ClWizard/style.scss +173 -0
  79. package/src/components/form/ClField/style.scss +45 -0
  80. package/src/components/form/ClFieldCheck/style.scss +99 -0
  81. package/src/components/form/ClFieldFile/style.scss +71 -0
  82. package/src/components/form/ClFieldGroup/style.scss +73 -0
  83. package/src/components/form/ClFieldInput/style.scss +118 -0
  84. package/src/components/form/ClFieldSelect/style.scss +39 -0
  85. package/src/components/form/ClFieldSet/style.scss +16 -0
  86. package/src/components/form/ClForm/style.scss +87 -0
  87. package/src/components/modal/ClModal/style.scss +138 -0
  88. package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +444 -0
  89. package/src/components/navigation/ClNavSide/ClNavSideMenu/style.scss +51 -0
  90. package/src/components/navigation/ClNavSide/style.scss +81 -0
  91. package/src/components/navigation/ClNavTop/style.scss +305 -0
  92. package/src/components/section/ClSectionHeadline/style.scss +49 -0
  93. package/src/components/section/ClSectionMainSide/style.scss +60 -0
  94. package/src/components/table/ClTable/style.scss +23 -0
  95. package/src/components/table/ClTable/style.variables.scss +155 -0
  96. package/src/components/table/ClTableCel/Actions/style.scss +11 -0
  97. package/src/components/table/ClTableCel/Audit/style.scss +26 -0
  98. package/src/components/table/ClTableCel/Boolean/style.scss +12 -0
  99. package/src/components/table/ClTableCel/Checkbox/style.scss +18 -0
  100. package/src/components/table/ClTableCel/Code/style.scss +13 -0
  101. package/src/components/table/ClTableCel/Currency/style.scss +9 -0
  102. package/src/components/table/ClTableCel/Date/style.scss +12 -0
  103. package/src/components/table/ClTableCel/ID/style.scss +16 -0
  104. package/src/components/table/ClTableCel/Links/style.scss +44 -0
  105. package/src/components/table/ClTableCel/style.scss +7 -0
  106. package/src/components/table/ClTableCel/style.variables.scss +25 -0
  107. package/src/components/table/ClTableFootChecked/style.scss +2 -0
  108. package/src/components/table/ClTableHead/style.scss +36 -0
  109. package/src/components/text/ClCopy/style.scss +42 -0
  110. package/src/components/text/ClHashtag/style.scss +31 -0
  111. package/src/components/text/ClLinkExternal/style.scss +147 -0
  112. package/src/components/text/ClOrg/style.scss +40 -0
  113. package/src/components/text/ClPlan/style.scss +35 -0
  114. package/src/components/text/ClRole/style.scss +39 -0
  115. package/src/components/widget/ClBackCancelOk/style.scss +3 -0
  116. package/src/components/widget/ClCookieBanner/style.scss +40 -0
  117. package/src/components/widget/ClPage/style.scss +11 -0
  118. package/src/fonts/FontAwesome5/FontAwesome5.scss +6121 -0
  119. package/src/fonts/NotoSansMono/NotoSansMono.scss +82 -0
  120. package/src/fonts/OpenSansVariable/OpenSansVariable.scss +183 -0
  121. package/src/styles/_global.scss +70 -0
  122. package/src/styles/abstracts/color.scss +127 -0
  123. package/src/styles/abstracts/layer.scss +10 -0
  124. package/src/styles/abstracts/spacing.scss +35 -0
  125. package/src/styles/abstracts/tools.scss +117 -0
  126. package/src/styles/assets/logo.scss +22 -0
  127. package/src/styles/components/button.variables.scss +18 -0
  128. package/src/styles/components/form.variables.scss +51 -0
  129. package/src/styles/layout/animation.scss +39 -0
  130. package/src/styles/layout/grid.scss +144 -0
  131. package/src/styles/layout/grid.variables.scss +50 -0
  132. package/src/styles/layout/section.scss +90 -0
  133. package/src/styles/layout/spacing.scss +295 -0
  134. package/src/styles/layout/typography.scss +321 -0
  135. package/src/styles/layout/typography.variables.scss +363 -0
  136. package/src/styles/ui.scss +98 -0
  137. package/src/styles/vendors/bootstrap.scss +28 -0
  138. package/src/styles/vendors/castlabs.scss +17 -0
  139. package/types/castlabs-ui.module.d.ts +83 -0
  140. package/types/index.d.ts +140 -0
@@ -0,0 +1,98 @@
1
+ ////
2
+ /// @group global
3
+ /// @access public
4
+ ////
5
+
6
+ // This file is the root for this lib's stylesheet and will include all others.
7
+
8
+ // Hint: Component-specific rules go into the vue components folders impored below.
9
+
10
+ @use 'sass:math';
11
+
12
+ $castlabs-ui-asset-prefix: '..' !default;
13
+
14
+ @import 'bootstrap/scss/bootstrap-reboot';
15
+ @import 'bootstrap/scss/helpers/ratio';
16
+ @import 'global';
17
+ @import 'assets/logo';
18
+ @import 'layout/spacing';
19
+ @import 'layout/grid';
20
+ @import 'layout/typography';
21
+ @import 'layout/section';
22
+ @import 'layout/animation';
23
+
24
+ // Vue components
25
+ @import '../components/ClAlert/style';
26
+ @import '../components/ClBadge/style';
27
+ @import '../components/ClButton/style';
28
+ @import '../components/ClCard/style';
29
+ @import '../components/ClDropdown/style';
30
+ @import '../components/ClDropzone/style';
31
+ @import '../components/ClFooter/style';
32
+ @import '../components/ClIcon/style';
33
+ @import '../components/ClIconotron/style';
34
+ @import '../components/ClList/style';
35
+ @import '../components/ClListGroup/style';
36
+ @import '../components/ClPagination/style';
37
+ @import '../components/ClProgress/style';
38
+ @import '../components/ClScrollbar/style';
39
+ @import '../components/ClSpinner/style';
40
+ @import '../components/ClTabs/style';
41
+ @import '../components/ClToggle/style';
42
+ @import '../components/ClTooltip/style';
43
+ @import '../components/ClWizard/style';
44
+ @import '../components/form/ClForm/style';
45
+ @import '../components/form/ClField/style';
46
+ @import '../components/form/ClFieldCheck/style';
47
+ @import '../components/form/ClFieldFile/style';
48
+ @import '../components/form/ClFieldInput/style';
49
+ @import '../components/form/ClFieldSelect/style';
50
+ @import '../components/form/ClFieldSet/style';
51
+ @import '../components/form/ClFieldGroup/style';
52
+ @import '../components/modal/ClModal/style';
53
+ @import '../components/navigation/ClNavSide/style';
54
+ @import '../components/navigation/ClNavSide/ClNavDrawer/style';
55
+ @import '../components/navigation/ClNavSide/ClNavSideMenu/style';
56
+ @import '../components/navigation/ClNavTop/style';
57
+ @import '../components/section/ClSectionHeadline/style';
58
+ @import '../components/section/ClSectionMainSide/style';
59
+ @import '../components/table/ClTable/style';
60
+ @import '../components/table/ClTableFootChecked/style';
61
+ @import '../components/table/ClTableHead/style';
62
+ @import '../components/table/ClTableCel/style';
63
+ @import '../components/table/ClTableCel/Actions/style';
64
+ @import '../components/table/ClTableCel/Audit/style';
65
+ @import '../components/table/ClTableCel/Boolean/style';
66
+ @import '../components/table/ClTableCel/Checkbox/style';
67
+ @import '../components/table/ClTableCel/Code/style';
68
+ @import '../components/table/ClTableCel/Currency/style';
69
+ @import '../components/table/ClTableCel/Date/style';
70
+ @import '../components/table/ClTableCel/ID/style';
71
+ @import '../components/table/ClTableCel/Links/style';
72
+ @import '../components/text/ClCopy/style';
73
+ @import '../components/text/ClLinkExternal/style';
74
+ @import '../components/text/ClOrg/style';
75
+ @import '../components/text/ClPlan/style';
76
+ @import '../components/text/ClRole/style';
77
+ @import '../components/text/ClHashtag/style';
78
+ @import '../components/widget/ClBackCancelOk/style';
79
+ @import '../components/widget/ClCookieBanner/style';
80
+ @import '../components/widget/ClPage/style';
81
+
82
+ // --- globals -----------------------------------------------------------------
83
+
84
+ .cl-shadow {
85
+ @include color-shadow-3d;
86
+ }
87
+
88
+ .cl-hidden {
89
+ visibility: hidden;
90
+ }
91
+
92
+ .cl-cursor-link {
93
+ cursor: pointer;
94
+ }
95
+
96
+ .cl-cursor-not-allowed {
97
+ cursor: not-allowed;
98
+ }
@@ -0,0 +1,28 @@
1
+ ////
2
+ /// @group vendors
3
+ /// @access public
4
+ ////
5
+
6
+ // This file will define/override variables used by bootstrap to customize it
7
+ // to our needs.
8
+
9
+ $primary: $color-ci-red;
10
+
11
+ $border-radius: 3px;
12
+ $border-radius-sm: $border-radius;
13
+ $border-radius-lg: $border-radius;
14
+
15
+ $btn-focus-width: px(2);
16
+
17
+ $input-btn-focus-color: $color-ci-blue;
18
+
19
+ $transition-base: all 0.1s ease-in-out;
20
+
21
+ $grid-breakpoints: (
22
+ xs: 0,
23
+ sm: 576px,
24
+ md: 768px,
25
+ lg: 992px,
26
+ xl: 1200px,
27
+ xxl: 1400px
28
+ );
@@ -0,0 +1,17 @@
1
+ .cl-theme-v2 {
2
+ .cl-section-primary.cl-section-tight {
3
+ background-color: $color-ci-haze;
4
+
5
+ h1 {
6
+ color: $color-ci-dusk;
7
+ }
8
+ }
9
+
10
+ .cl-nav-top {
11
+ border-bottom: 2px solid $color-ci-red;
12
+
13
+ .col-12 {
14
+ height: calc(3rem - 2px) !important; // sass-lint:disable-line no-important
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,83 @@
1
+ /* eslint-disable @typescript-eslint/no-explicit-any */
2
+
3
+ declare module '@castlabs/ui/dist/castlabs-ui.module.js' {
4
+ export function clScrollToId (id: string, smooth?: boolean): void
5
+
6
+ export function clModalHide(): void
7
+ export function clModalShow (id: string, value?: any): void
8
+ export function clModalValue (id: string): any
9
+ export function clModalIsShown (id?: string): boolean
10
+
11
+ export function clPaginate (array: any[], pageNo?: number, pageSize?: number): any[]
12
+
13
+ export function clFocus (selector?: string): void
14
+
15
+ export function clFormReset (id: string, fields?: any[]): void
16
+ export function clFormFieldReset (ref: any, oldValue: any): void
17
+ export function clFormIsValid (id: string): boolean
18
+ export function clFormIsValidAsync (id: string): Promise<boolean>
19
+ export function clFormFieldFocusFirstInvalid (id: string): void
20
+ export function clFormAutofocus (id: string): void
21
+ export function clRefClField (ref: unknown): any
22
+ export function clRefClFieldGroup (ref: unknown): any
23
+ export function clRefHTMLElement (ref: unknown): HTMLElement
24
+
25
+ export function clFormatFilesize (bytes: number): string
26
+ export function clFormatDate (date: Date): string
27
+ export function clFormatTimeUTC (date: Date): string
28
+ export function clFormatDateTimeUTC (date: Date, seconds?: boolean): string
29
+ export function clFormatDuration (from: Date, until: Date, seconds?: boolean, ms?: boolean): string
30
+ export function clFormatPeriod (date: Date): string
31
+ export function clFormatNumber (amount: number, decimalPlaces?: number): string
32
+ export function clFormatAmount (amount: number, currency: string, decimalPlaces?: number): string
33
+ export function clFormatRange (from: number, to: number): string
34
+ export function clFormatCardNumber (card: string): string
35
+
36
+ export function clSynchronizedSubmit (component: any, callback: () => Promise<any>, id?: string): Promise<any>
37
+ export function clSynchronizedSubmitAsync (component: any, callback: () => Promise<any>, id?: string): Promise<any>
38
+
39
+ export function clSort (
40
+ a: object[] | '() => object[] | null | undefined' | null | undefined,
41
+ property: string,
42
+ order?: string,
43
+ caseSensitive?: boolean
44
+ ): object[]
45
+ export function clTableSorter (
46
+ sort: (col: number, order: 'ASC' | 'DESC') => { sorted: object[], sortedOrder: 'ASC' | 'DESC' },
47
+ initialCol?: number,
48
+ initialOrder?: string
49
+ ): any
50
+ export function clTableSorterObjects<Type> (dataCallback: () => Type[], keys: string[], initialCol?: number): {
51
+ col: number,
52
+ order: 'ASC' | 'DESC' | 'NONE',
53
+ set: (col: number, order: string) => void,
54
+ get: (col: number) => string,
55
+ sorted: Type[],
56
+ sorter: () => any,
57
+ sort: (col?: number, order?: string) => 'ASC' | 'DESC' | 'NONE',
58
+ }
59
+ export function clDebounce (callback: any, ms?: number, key?: string): void
60
+
61
+ export function clRandomString (length?: number, words?: string[]): string
62
+ export function clRandomList (length?: number, words?: string[]): string[]
63
+ export function clCopyData (data: any): void
64
+
65
+ export type ClReloadFunction = (forced: boolean, arg1?: any, arg2?: any, arg3?: any, arg4?: any) => Promise<any>
66
+ export type ClReloadArray = [method: ClReloadFunction, arg1?: any, arg2?: any, arg3?: any, arg4?: any]
67
+ export function clReload (
68
+ component: any,
69
+ forced?: [] | (ClReloadFunction | ClReloadArray)[],
70
+ optional?: [] | (ClReloadFunction | ClReloadArray)[],
71
+ loading?: boolean
72
+ ): Promise<any>
73
+ export function clReloadStore (component: any, forced?: any[], optional?: any[], loading?: boolean): Promise<any>
74
+
75
+ // search utils
76
+ export function clMatch (string: string, expression?: string, caseSensitive?: boolean): boolean
77
+
78
+ // test utils
79
+ export function clGetAllComponents(): object
80
+ export function clGetAllPlugins(): [{ install: (app: any) => void }]
81
+ export function clPatch (source: any, patches: any): object
82
+ export function clPatchStore (source: any, patches: any): object
83
+ }
@@ -0,0 +1,140 @@
1
+ import type { App, VueConstructor } from 'vue'
2
+
3
+ declare function install (Vue: App): void
4
+ export default install
5
+
6
+ export function castlabsUi (Vue: App): void
7
+
8
+ export const ClAlert: VueConstructor
9
+ export const ClBackCancelOk: VueConstructor
10
+ export const ClCookieBanner: VueConstructor
11
+ export const ClDropzone: VueConstructor
12
+ export const ClField: VueConstructor
13
+ export const ClFieldCheck: VueConstructor
14
+ export const ClFieldGroup: VueConstructor
15
+ export const ClIconotron: VueConstructor
16
+ export const ClInfo: VueConstructor
17
+ export const ClMockRouterLink: VueConstructor
18
+ export const ClModal: VueConstructor
19
+ export const ClModalConfirm: VueConstructor
20
+ export const ClModalOk: VueConstructor
21
+ export const ClNavSide: VueConstructor
22
+ export const ClNavTop: VueConstructor
23
+ export const ClPage: VueConstructor
24
+ export const ClPagination: VueConstructor
25
+ export const ClSectionForm: VueConstructor
26
+ export const ClSectionHeadline: VueConstructor
27
+ export const ClSectionMain: VueConstructor
28
+ export const ClSectionMainSide: VueConstructor
29
+ export const ClSpinner: VueConstructor
30
+ export const ClTable: VueConstructor
31
+ export const ClTableCel: VueConstructor
32
+ export const ClTableCelActions: VueConstructor
33
+ export const ClTableCelAudit: VueConstructor
34
+ export const ClTableCelBoolean: VueConstructor
35
+ export const ClTableCelCheckbox: VueConstructor
36
+ export const ClTableCelCode: VueConstructor
37
+ export const ClTableCelCurrency: VueConstructor
38
+ export const ClTableCelDate: VueConstructor
39
+ export const ClTableCelId: VueConstructor
40
+ export const ClTableCelLinks: VueConstructor
41
+ export const ClTableCelUuid: VueConstructor
42
+ export const ClTableFootChecked: VueConstructor
43
+ export const ClTableHead: VueConstructor
44
+ export const ClTabs: VueConstructor
45
+ export const ClToggle: VueConstructor
46
+
47
+ export const ClCopy: VueConstructor
48
+ export const ClCreditcardNumber: VueConstructor
49
+ export const ClHashtag: VueConstructor
50
+ export const ClLinkExternal: VueConstructor
51
+ export const ClMailto: VueConstructor
52
+ export const ClOrg: VueConstructor
53
+ export const ClPlan: VueConstructor
54
+ export const ClRole: VueConstructor
55
+
56
+ export const ClLorem: VueConstructor
57
+
58
+ // --- utils/ui ----------------------------------------------------------------
59
+
60
+ /* eslint-disable @typescript-eslint/no-explicit-any */
61
+
62
+ export function clScrollToId (id: string, smooth?: boolean): void
63
+
64
+ export function clModalHide(): void
65
+ export function clModalShow (id: string, value?: any): void
66
+ export function clModalValue (id: string): any
67
+ export function clModalIsShown (id?: string): boolean
68
+
69
+ export function clPaginate (array: any[], pageNo?: number, pageSize?: number): any[]
70
+
71
+ export function clFocus (selector?: string): void
72
+
73
+ export function clFormReset (id: string, fields?: (typeof ClField | typeof ClFieldGroup)[]): void
74
+ export function clFormFieldReset (ref: any, oldValue: any): void
75
+ export function clFormIsValid (id: string): boolean
76
+ export function clFormIsValidAsync (id: string): Promise<boolean>
77
+ export function clFormFieldFocusFirstInvalid (id: string): void
78
+ export function clFormAutofocus (id: string): void
79
+ export function clRefClField (ref: unknown): typeof ClField
80
+ export function clRefClFieldGroup (ref: unknown): typeof ClFieldGroup
81
+ export function clRefHTMLElement (ref: unknown): HTMLElement
82
+
83
+ export function clFormatFilesize (bytes: number): string
84
+ export function clFormatDate (date: Date): string
85
+ export function clFormatTimeUTC (date: Date): string
86
+ export function clFormatDateTimeUTC (date: Date, seconds?: boolean): string
87
+ export function clFormatDuration (from: Date, until: Date, seconds?: boolean, ms?: boolean): string
88
+ export function clFormatPeriod (date: Date): string
89
+ export function clFormatNumber (amount: number, decimalPlaces?: number): string
90
+ export function clFormatAmount (amount: number, currency: string, decimalPlaces?: number): string
91
+ export function clFormatRange (from: number, to: number): string
92
+ export function clFormatCardNumber (card: string): string
93
+
94
+ export function clSynchronizedSubmit (component: any, callback: () => Promise<any>, id?: string): Promise<any>
95
+ export function clSynchronizedSubmitAsync (component: any, callback: () => Promise<any>, id?: string): Promise<any>
96
+
97
+ export function clSort (
98
+ a: object[] | '() => object[] | null | undefined' | null | undefined,
99
+ property: string,
100
+ order?: string,
101
+ caseSensitive?: boolean
102
+ ): object[]
103
+ export function clTableSorter (
104
+ sort: (col: number, order: 'ASC' | 'DESC') => { sorted: object[], sortedOrder: 'ASC' | 'DESC' },
105
+ initialCol?: number,
106
+ initialOrder?: string
107
+ ): any
108
+ export function clTableSorterObjects<Type> (dataCallback: () => Type[], keys: string[], initialCol?: number): {
109
+ col: number,
110
+ order: 'ASC' | 'DESC' | 'NONE',
111
+ set: (col: number, order: string) => void,
112
+ get: (col: number) => string,
113
+ sorted: Type[],
114
+ sorter: () => any,
115
+ sort: (col?: number, order?: string) => 'ASC' | 'DESC' | 'NONE',
116
+ }
117
+ export function clDebounce (callback: any, ms?: number, key?: string): void
118
+
119
+ export function clRandomString (length?: number, words?: string[]): string
120
+ export function clRandomList (length?: number, words?: string[]): string[]
121
+ export function clCopyData (data: any): void
122
+
123
+ export type ClReloadFunction = (forced: boolean, arg1?: any, arg2?: any, arg3?: any, arg4?: any) => Promise<any>
124
+ export type ClReloadArray = [method: ClReloadFunction, arg1?: any, arg2?: any, arg3?: any, arg4?: any]
125
+ export function clReload (
126
+ component: any,
127
+ forced?: [] | (ClReloadFunction | ClReloadArray)[],
128
+ optional?: [] | (ClReloadFunction | ClReloadArray)[],
129
+ loading?: boolean
130
+ ): Promise<any>
131
+ export function clReloadStore (component: any, forced?: any[], optional?: any[], loading?: boolean): Promise<any>
132
+
133
+ // search utils
134
+ export function clMatch (string: string, expression?: string, caseSensitive?: boolean): boolean
135
+
136
+ // test utils
137
+ export function clGetAllComponents(): object
138
+ export function clGetAllPlugins(): [{ install: (app: any) => void }]
139
+ export function clPatch (source: any, patches: any): object
140
+ export function clPatchStore (source: any, patches: any): object