@citruslime/ui 1.2.0-beta.0 → 1.2.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.
- package/README.md +5 -4
- package/dist/citrus-lime-ui.es.js +4602 -0
- package/dist/citrus-lime-ui.umd.js +2 -0
- package/dist/components/accordion/cl-ui-accordion.vue.d.ts +26 -0
- package/dist/components/accordion/index.d.ts +4 -0
- package/dist/components/accordion/item/cl-ui-accordion-item.vue.d.ts +35 -0
- package/dist/{@types/components/accordion/item.d.ts → components/accordion/types.d.ts} +0 -0
- package/dist/components/app/cl-ui-app.vue.d.ts +51 -0
- package/dist/components/app/index.d.ts +1 -0
- package/dist/components/button/cl-ui-button.vue.d.ts +51 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button/types.d.ts +4 -0
- package/dist/components/calendar/cl-ui-calendar.vue.d.ts +2 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/types.d.ts +2 -0
- package/dist/components/calendar/utils.d.ts +38 -0
- package/dist/components/card/cl-ui-card.vue.d.ts +27 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/types.d.ts +2 -0
- package/dist/components/combo-box/cl-ui-combo-box.vue.d.ts +583 -0
- package/dist/components/combo-box/index.d.ts +2 -0
- package/dist/components/combo-box/search-container/cl-ui-combo-box-search.vue.d.ts +276 -0
- package/dist/components/combo-box/search-container/header/cl-ui-combo-box-header.vue.d.ts +42 -0
- package/dist/components/combo-box/search-container/selectable/cl-ui-combo-box-selectable.vue.d.ts +81 -0
- package/dist/{@types/components/combo-box/item.d.ts → components/combo-box/types.d.ts} +0 -0
- package/dist/components/footer/index.d.ts +1 -0
- package/dist/components/grid/cell/cl-ui-grid-cell.vue.d.ts +72 -0
- package/dist/components/grid/cl-ui-grid.vue.d.ts +550 -0
- package/dist/components/grid/filter/cl-ui-grid-filter.vue.d.ts +72 -0
- package/dist/components/grid/filter/filter-methods.d.ts +5 -0
- package/dist/components/grid/footer/cl-ui-grid-footer.vue.d.ts +63 -0
- package/dist/components/grid/header/cl-ui-grid-header.vue.d.ts +207 -0
- package/dist/components/grid/index.d.ts +2 -0
- package/dist/components/grid/types.d.ts +92 -0
- package/dist/components/grid/view-manager/cl-ui-grid-view-manager.vue.d.ts +88 -0
- package/dist/components/header/index.d.ts +2 -0
- package/dist/components/header/menu/cl-ui-header-menu.vue.d.ts +40 -0
- package/dist/components/header/menu/index.d.ts +1 -0
- package/dist/components/index.d.ts +16 -14
- package/dist/components/input/cl-ui-input.vue.d.ts +2 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/types.d.ts +6 -0
- package/dist/components/input/utils.d.ts +44 -0
- package/dist/components/language-switcher/cl-ui-language-switcher.vue.d.ts +37 -0
- package/dist/components/language-switcher/index.d.ts +2 -0
- package/dist/{@types/language.d.ts → components/language-switcher/types.d.ts} +0 -1
- package/dist/components/loading-spinner/index.d.ts +1 -0
- package/dist/components/login/cl-ui-login.vue.d.ts +106 -0
- package/dist/components/login/index.d.ts +2 -0
- package/dist/{@types/components/login/authentication.d.ts → components/login/types.d.ts} +0 -0
- package/dist/components/modal/cl-ui-modal.vue.d.ts +49 -0
- package/dist/components/modal/index.d.ts +2 -0
- package/dist/components/modal/types.d.ts +4 -0
- package/dist/components/navigation/cl-ui-navigation.vue.d.ts +11 -0
- package/dist/components/navigation/group/cl-ui-navigation-group.vue.d.ts +12 -0
- package/dist/components/navigation/icon/cl-ui-navigation-icon.vue.d.ts +20 -0
- package/dist/components/navigation/index.d.ts +5 -0
- package/dist/components/notification/cl-ui-notification.vue.d.ts +36 -0
- package/dist/components/notification/index.d.ts +1 -0
- package/dist/components/notification/types.d.ts +9 -0
- package/dist/components/slider/cl-ui-slider.vue.d.ts +114 -0
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/tab/cl-ui-tab.vue.d.ts +52 -0
- package/dist/components/tab/header/cl-ui-tab-header.vue.d.ts +60 -0
- package/dist/components/tab/index.d.ts +4 -0
- package/dist/components/tab/types.d.ts +4 -0
- package/dist/composables/notification.d.ts +1 -1
- package/dist/main.d.ts +3 -5
- package/dist/style.css +1 -1
- package/dist/utils/i18n/config.d.ts +33 -0
- package/dist/utils/i18n/defaults.d.ts +4 -0
- package/dist/utils/i18n/index.d.ts +3 -0
- package/dist/utils/i18n/types.d.ts +97 -0
- package/dist/utils/index.d.ts +2 -6
- package/dist/utils/validation.d.ts +37 -0
- package/package.json +29 -13
- package/dist/.eslintrc.js +0 -448
- package/dist/.stylelintrc.js +0 -119
- package/dist/@types/appUser.d.ts +0 -10
- package/dist/@types/components/accordion/index.d.ts +0 -1
- package/dist/@types/components/combo-box/index.d.ts +0 -2
- package/dist/@types/components/combo-box/localisations.d.ts +0 -19
- package/dist/@types/components/grid/column.d.ts +0 -45
- package/dist/@types/components/grid/index.d.ts +0 -4
- package/dist/@types/components/grid/localisations.d.ts +0 -47
- package/dist/@types/components/grid/request.d.ts +0 -49
- package/dist/@types/components/grid/update.d.ts +0 -4
- package/dist/@types/components/header/index.d.ts +0 -2
- package/dist/@types/components/header/localisations.d.ts +0 -8
- package/dist/@types/components/header/navigation.d.ts +0 -15
- package/dist/@types/components/login/index.d.ts +0 -2
- package/dist/@types/components/login/localisations.d.ts +0 -7
- package/dist/@types/components/notification/index.d.ts +0 -1
- package/dist/@types/components/notification/item.d.ts +0 -7
- package/dist/@types/components/slider/index.d.ts +0 -1
- package/dist/@types/components/slider/localisations.d.ts +0 -3
- package/dist/@types/date-format.d.ts +0 -8
- package/dist/@types/debouncer.d.ts +0 -6
- package/dist/@types/index.d.ts +0 -15
- package/dist/@types/locale.d.ts +0 -10
- package/dist/@types/number-format.d.ts +0 -7
- package/dist/@types/string-format.d.ts +0 -3
- package/dist/@types/string.d.ts +0 -47
- package/dist/theme.js +0 -122
- package/dist/ui.es.js +0 -1
- package/dist/ui.umd.js +0 -1
- package/dist/utils/copy.d.ts +0 -8
- package/dist/utils/debouncer.d.ts +0 -8
- package/dist/utils/extensions/string-utilities.d.ts +0 -83
- package/dist/utils/extensions/string.d.ts +0 -1
- package/dist/utils/i18n/datetime-formats.d.ts +0 -3
- package/dist/utils/i18n/number-formats.d.ts +0 -3
- package/dist/utils/id.d.ts +0 -6
- package/dist/utils/name-of.d.ts +0 -7
- package/dist/utils/sort.d.ts +0 -9
- package/dist/utils/url-params.d.ts +0 -8
- package/src/components/accordion/accordion.vue +0 -30
- package/src/components/button/button.vue +0 -28
- package/src/components/calendar/calendar.vue +0 -35
- package/src/components/card/card.vue +0 -54
- package/src/components/combo-box/combo-box.vue +0 -78
- package/src/components/combo-box/search-container/header-option/header-option.vue +0 -21
- package/src/components/combo-box/search-container/search-container.vue +0 -57
- package/src/components/combo-box/search-container/selectable-option/selectable-option.vue +0 -27
- package/src/components/footer/footer.vue +0 -23
- package/src/components/grid/cell/cell.vue +0 -64
- package/src/components/grid/filter/filter.vue +0 -93
- package/src/components/grid/footer/footer.vue +0 -91
- package/src/components/grid/grid.vue +0 -194
- package/src/components/grid/header/header.vue +0 -39
- package/src/components/grid/view-manager/view-manager.vue +0 -73
- package/src/components/header/header-helper/header-helper.vue +0 -95
- package/src/components/header/header.vue +0 -33
- package/src/components/header/navigation/navigation.vue +0 -84
- package/src/components/language-switcher/language-switcher.vue +0 -36
- package/src/components/loading-spinner/loading-spinner.vue +0 -8
- package/src/components/login/login.vue +0 -101
- package/src/components/modal/modal.vue +0 -48
- package/src/components/notification/notification.vue +0 -36
- package/src/components/slider/slider.vue +0 -41
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./card"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div class="overflow-hidden relative"
|
|
5
|
-
:class="{
|
|
6
|
-
'shadow': shadowSize === 'small',
|
|
7
|
-
'shadow-md': shadowSize === 'medium',
|
|
8
|
-
'shadow-lg': shadowSize === 'large',
|
|
9
|
-
|
|
10
|
-
'hover:shadow-md': hover && shadowSize === 'small',
|
|
11
|
-
'hover:shadow-lg': hover && shadowSize === 'medium',
|
|
12
|
-
'hover:shadow-xl': hover && shadowSize === 'large'
|
|
13
|
-
}">
|
|
14
|
-
<div v-if="$slots.image"
|
|
15
|
-
:class="{
|
|
16
|
-
'p-2': size === 'small' && padImage,
|
|
17
|
-
'p-4': size === 'medium' && padImage,
|
|
18
|
-
'p-8': size === 'large' && padImage
|
|
19
|
-
}">
|
|
20
|
-
<slot name="image"></slot>
|
|
21
|
-
</div>
|
|
22
|
-
|
|
23
|
-
<div v-if="title !== ''"
|
|
24
|
-
class="border-grey-2 font-normal"
|
|
25
|
-
:class="{
|
|
26
|
-
'p-2 text-xl leading-8': size === 'small',
|
|
27
|
-
'p-4 text-2xl leading-9': size === 'medium',
|
|
28
|
-
'p-8 text-4xl leading-10': size === 'large',
|
|
29
|
-
'border-t': $slots.image && padImage
|
|
30
|
-
}">
|
|
31
|
-
{{ title }}
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<div class="border-grey-2"
|
|
35
|
-
:class="{
|
|
36
|
-
'p-2': size === 'small',
|
|
37
|
-
'p-4': size === 'medium',
|
|
38
|
-
'p-8': size === 'large',
|
|
39
|
-
'border-t': ($slots.image && padImage && title === '') || title !== ''
|
|
40
|
-
}">
|
|
41
|
-
<slot></slot>
|
|
42
|
-
</div>
|
|
43
|
-
|
|
44
|
-
<div v-if="$slots.footer"
|
|
45
|
-
class="border-grey-2 border-t"
|
|
46
|
-
:class="{
|
|
47
|
-
'p-2': size === 'small',
|
|
48
|
-
'p-4': size === 'medium',
|
|
49
|
-
'p-8': size === 'large'
|
|
50
|
-
}">
|
|
51
|
-
<slot name="footer"></slot>
|
|
52
|
-
</div>
|
|
53
|
-
</div>
|
|
54
|
-
</template>
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./combo-box"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div>
|
|
5
|
-
<div class="flex">
|
|
6
|
-
<input v-model="currentText"
|
|
7
|
-
:class="{ 'cursor-pointer': disabled === false }"
|
|
8
|
-
type="text"
|
|
9
|
-
:placeholder="hintText"
|
|
10
|
-
:disabled="disabled"
|
|
11
|
-
@focus="toggleDropdown(true)">
|
|
12
|
-
|
|
13
|
-
<div v-if="required && disabled === false"
|
|
14
|
-
class="relative right-20">
|
|
15
|
-
<div class="absolute flex float-right font-semibold mt-2 text-danger-default text-sm">
|
|
16
|
-
{{ localisations.required }}
|
|
17
|
-
|
|
18
|
-
<ph-warning class="ml-1 mt-1" />
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
|
|
22
|
-
<div class="border border-grey-1 float-right hover:bg-primary-default hover:text-white px-1 py-2.5 text-grey-3 w-min"
|
|
23
|
-
:class="{
|
|
24
|
-
'bg-off-white cursor-default hover:bg-off-white hover:text-grey-3': disabled,
|
|
25
|
-
'cursor-pointer': disabled === false
|
|
26
|
-
}"
|
|
27
|
-
@click="toggleDropdown(true)">
|
|
28
|
-
<ph-caret-down weight="fill" />
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<cl-ui-modal size="x-small"
|
|
33
|
-
:title="createHeader"
|
|
34
|
-
:confirm-button="localisations.create"
|
|
35
|
-
:cancel-button="localisations.cancel"
|
|
36
|
-
:confirm-enabled="objectToCreateValid"
|
|
37
|
-
@confirm="createObject">
|
|
38
|
-
<template #trigger="{toggleModal}">
|
|
39
|
-
<cl-ui-combo-box-search-container v-show="searchContainerVisible"
|
|
40
|
-
:can-create-new-object="canCreateNewObject"
|
|
41
|
-
:can-clear-selected-object="canClearSelectedObject"
|
|
42
|
-
:localisations="localisations"
|
|
43
|
-
:loading="loading"
|
|
44
|
-
:results="results"
|
|
45
|
-
:object-type="objectType"
|
|
46
|
-
:object-parent-type="objectParentType"
|
|
47
|
-
:error-message="errorMessage"
|
|
48
|
-
:current-object-name="currentText"
|
|
49
|
-
:is-visible="searchContainerVisible"
|
|
50
|
-
@create-object="toggleModal"
|
|
51
|
-
@select-object="selectObject"
|
|
52
|
-
@clear-object="clearObject"
|
|
53
|
-
@search="search"
|
|
54
|
-
@hide-dropdown="toggleDropdown(false)" />
|
|
55
|
-
</template>
|
|
56
|
-
|
|
57
|
-
<cl-ui-combo-box v-if="objectParentType !== ''"
|
|
58
|
-
v-model:current-object="parentItem"
|
|
59
|
-
class="mt-3"
|
|
60
|
-
:results="parentResults"
|
|
61
|
-
:loading="loading"
|
|
62
|
-
:object-type="objectParentType"
|
|
63
|
-
:object-created-response="parentObjectCreatedResponse"
|
|
64
|
-
:can-create-new-object="canCreateNewObject"
|
|
65
|
-
:can-clear-selected-object="canClearSelectedObject"
|
|
66
|
-
:error-message="errorMessage"
|
|
67
|
-
@search="searchParent"
|
|
68
|
-
@create-object="createParentObject" />
|
|
69
|
-
|
|
70
|
-
<label class="mt-3">
|
|
71
|
-
{{ localisations.createProperty }}
|
|
72
|
-
</label>
|
|
73
|
-
|
|
74
|
-
<input v-model="objectToCreateValue"
|
|
75
|
-
type="text">
|
|
76
|
-
</cl-ui-modal>
|
|
77
|
-
</div>
|
|
78
|
-
</template>
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./header-option"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div class="bg-grey-2 border-b border-grey-2 border-t flex p-1">
|
|
5
|
-
<div v-if="additionalText !== ''"
|
|
6
|
-
class="w-1/2">
|
|
7
|
-
{{ additionalText }}
|
|
8
|
-
</div>
|
|
9
|
-
<div :class="{
|
|
10
|
-
'w-1/2': additionalText !== '',
|
|
11
|
-
'w-full': additionalText === ''
|
|
12
|
-
}">
|
|
13
|
-
{{ text }}
|
|
14
|
-
</div>
|
|
15
|
-
<div v-show="showClearButton"
|
|
16
|
-
class="cursor-pointer float-right"
|
|
17
|
-
@mousedown="$emit('clear-object')">
|
|
18
|
-
<ph-trash class="hover:text-link-default mt-1 rounded-full" />
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
21
|
-
</template>
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./search-container"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div ref="container"
|
|
5
|
-
class="bg-white border border-collapse border-grey-0 h-52 overflow-y-auto p-2 text-sm"
|
|
6
|
-
@keydown.up.prevent.stop="onKeyboardArrowUp(firstIndexInResults)"
|
|
7
|
-
@keydown.down.prevent.stop="onKeyboardArrowDown(firstIndexInResults)"
|
|
8
|
-
@keyup.enter.prevent.stop="onKeyboardEnter">
|
|
9
|
-
<div class="flex">
|
|
10
|
-
<input ref="searchBox"
|
|
11
|
-
v-model="searchText"
|
|
12
|
-
type="text"
|
|
13
|
-
:placeholder="searchHint"
|
|
14
|
-
@keyup="search"
|
|
15
|
-
@blur="hideDropdown">
|
|
16
|
-
|
|
17
|
-
<cl-ui-loading-spinner v-if="loading"
|
|
18
|
-
class="absolute ml-2 mt-11" />
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<cl-ui-combo-box-header-option v-if="currentObjectName !== ''"
|
|
22
|
-
:show-clear-button="canClearSelectedObject"
|
|
23
|
-
:text="currentObjectName"
|
|
24
|
-
@clear-object="$emit('clear-object')" />
|
|
25
|
-
|
|
26
|
-
<cl-ui-combo-box-header-option v-if="objectParentType !== '' && results !== null && results.length > 0 && errorMessage === ''"
|
|
27
|
-
:text="objectType"
|
|
28
|
-
:additional-text="objectParentType" />
|
|
29
|
-
|
|
30
|
-
<cl-ui-combo-box-header-option v-if="results !== null && results.length === 0 && canCreateNewObject === false && errorMessage === ''"
|
|
31
|
-
:text="noResults" />
|
|
32
|
-
|
|
33
|
-
<cl-ui-combo-box-header-option v-if="errorMessage !== ''"
|
|
34
|
-
class="!bg-danger-light text-danger-dark"
|
|
35
|
-
:text="combinedErrorMessage" />
|
|
36
|
-
|
|
37
|
-
<cl-ui-combo-box-selectable-option v-if="showAddNewOption"
|
|
38
|
-
:is-create-new-option="true"
|
|
39
|
-
:text="addPrompt"
|
|
40
|
-
:index="-1"
|
|
41
|
-
:localisations="localisations"
|
|
42
|
-
:selected-index="currentSelection"
|
|
43
|
-
@create-object="createObject"
|
|
44
|
-
@option-highlighted="updateSelectedObjectIndex" />
|
|
45
|
-
|
|
46
|
-
<div v-if="errorMessage === '' && results !== null">
|
|
47
|
-
<cl-ui-combo-box-selectable-option v-for="(result, index) in results"
|
|
48
|
-
:key="index"
|
|
49
|
-
:localisations="localisations"
|
|
50
|
-
:option="result"
|
|
51
|
-
:index="index"
|
|
52
|
-
:selected-index="currentSelection"
|
|
53
|
-
@select-object="selectObject"
|
|
54
|
-
@option-highlighted="updateSelectedObjectIndex" />
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
57
|
-
</template>
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./selectable-option"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div class="border-b border-grey-0 border-t cursor-pointer flex p-1"
|
|
5
|
-
:class="{
|
|
6
|
-
'bg-grey-0': isHighlighted === false,
|
|
7
|
-
'bg-primary-default text-white': isHighlighted
|
|
8
|
-
}"
|
|
9
|
-
@mousedown="optionSelected"
|
|
10
|
-
@mousemove="onHover(true)"
|
|
11
|
-
@mouseleave="onHover(false)">
|
|
12
|
-
<div v-if="option !== null && option.parentId !== 0 && option.parentId !== undefined"
|
|
13
|
-
class="w-1/2">
|
|
14
|
-
{{ displayedParent }}
|
|
15
|
-
</div>
|
|
16
|
-
<div :class="{
|
|
17
|
-
'w-1/2': displayedParent !== '',
|
|
18
|
-
'w-full': displayedParent === ''
|
|
19
|
-
}">
|
|
20
|
-
{{ displayedText }}
|
|
21
|
-
</div>
|
|
22
|
-
<div v-show="isCreateNewOption"
|
|
23
|
-
class="float-right py-1.5">
|
|
24
|
-
<ph-plus-circle class="bg-primary-default rounded-full text-white" />
|
|
25
|
-
</div>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./footer"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div class="flex flex-wrap left-0 w-full">
|
|
5
|
-
<div v-if="$slots.default"
|
|
6
|
-
class="w-full">
|
|
7
|
-
<slot></slot>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div v-show="leftText !== '' || rightText !== ''"
|
|
11
|
-
class="leading-10 px-8 py-1 text-sm w-full">
|
|
12
|
-
<strong v-show="leftText !== ''"
|
|
13
|
-
class="float-left">
|
|
14
|
-
{{ leftText }}
|
|
15
|
-
</strong>
|
|
16
|
-
|
|
17
|
-
<strong v-show="rightText !== ''"
|
|
18
|
-
class="float-right">
|
|
19
|
-
{{ rightText }}
|
|
20
|
-
</strong>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</template>
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./cell"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<td v-if="editMode && column.field && column.editable"
|
|
5
|
-
v-bind="$attrs">
|
|
6
|
-
<strong class="lg:hidden mr-2">
|
|
7
|
-
{{ column.caption }}
|
|
8
|
-
</strong>
|
|
9
|
-
|
|
10
|
-
<slot :name="`${column.name}Edit`"
|
|
11
|
-
v-bind="{ cellFocused, column, record: currentRecord }"></slot>
|
|
12
|
-
</td>
|
|
13
|
-
<td v-else
|
|
14
|
-
v-bind="$attrs">
|
|
15
|
-
<strong class="lg:hidden mr-2">
|
|
16
|
-
{{ column.caption }}
|
|
17
|
-
</strong>
|
|
18
|
-
|
|
19
|
-
<!-- Slot contents -->
|
|
20
|
-
<slot v-if="column.type === GridColumnType.SLOT"
|
|
21
|
-
:name="column.name"
|
|
22
|
-
v-bind="{ column, record }"></slot>
|
|
23
|
-
<!-- Booleans -->
|
|
24
|
-
<input v-else-if="column.type === GridColumnType.BOOLEAN && column.field !== undefined"
|
|
25
|
-
type="checkbox"
|
|
26
|
-
:checked="getBooleanValue(record, column.field)"
|
|
27
|
-
disabled>
|
|
28
|
-
<!-- Dates and datetimes -->
|
|
29
|
-
<template v-else-if="(column.type === GridColumnType.DATE || column.type === GridColumnType.DATETIME) && column.field !== undefined">
|
|
30
|
-
<template v-if="column.format !== undefined">
|
|
31
|
-
{{ d(new Date(getStringValue(record, column.field)), column.format, currentLocale) }}
|
|
32
|
-
</template>
|
|
33
|
-
<template v-else-if="column.type === GridColumnType.DATE">
|
|
34
|
-
{{ d(new Date(getStringValue(record, column.field)), DateFormat.DATE, currentLocale) }}
|
|
35
|
-
</template>
|
|
36
|
-
<template v-else>
|
|
37
|
-
{{ d(new Date(getStringValue(record, column.field)), DateFormat.DATETIME, currentLocale) }}
|
|
38
|
-
</template>
|
|
39
|
-
</template>
|
|
40
|
-
<!-- Numbers -->
|
|
41
|
-
<template v-else-if="column.type === GridColumnType.NUMBER && column.field">
|
|
42
|
-
<template v-if="column.format === NumberFormat.MULTIPLIER">
|
|
43
|
-
×{{ getNumericValue(record, column.field) }}
|
|
44
|
-
</template>
|
|
45
|
-
<template v-else-if="column.format !== undefined">
|
|
46
|
-
{{ n(getNumericValue(record, column.field), column.format, currentLocale) }}
|
|
47
|
-
</template>
|
|
48
|
-
<template v-else>
|
|
49
|
-
{{ getNumericValue(record, column.field) }}
|
|
50
|
-
</template>
|
|
51
|
-
</template>
|
|
52
|
-
<!-- Strings -->
|
|
53
|
-
<template v-else-if="column.field !== undefined">
|
|
54
|
-
<span v-if="column.maxLength !== undefined"
|
|
55
|
-
class="inline-block whitespace-nowrap">
|
|
56
|
-
{{ getStringValue(record, column.field).trimToLength(column.maxLength, column.format !== undefined ? column.format === StringFormat.ELLIPSIS : false) }}
|
|
57
|
-
</span>
|
|
58
|
-
<span v-else
|
|
59
|
-
class="inline-block whitespace-nowrap">
|
|
60
|
-
{{ getStringValue(record, column.field) }}
|
|
61
|
-
</span>
|
|
62
|
-
</template>
|
|
63
|
-
</td>
|
|
64
|
-
</template>
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./filter"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div v-if="column.filterable === undefined || column.filterable === true"
|
|
5
|
-
class="border-grey-2 flex rounded w-full"
|
|
6
|
-
:class="{
|
|
7
|
-
'border-b p-5': column.type === GridColumnType.SLOT && (column.slotType === undefined || column.field === undefined),
|
|
8
|
-
'border': column.type !== GridColumnType.SLOT || (column.slotType !== undefined && column.field !== undefined)
|
|
9
|
-
}">
|
|
10
|
-
<div v-if="column.type !== GridColumnType.SLOT || (column.slotType !== undefined && column.field !== undefined)"
|
|
11
|
-
class="border-grey-2 border-r capitalize group inline relative w-auto">
|
|
12
|
-
<div class="bg-off-white flex h-full items-center justify-center w-10">
|
|
13
|
-
<ph-sliders-horizontal :size="20" />
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div class="absolute bg-white flex-wrap font-normal group-hover:flex group-hover:h-auto group-hover:w-52 h-0 hidden pb-2 shadow-lg text-left text-sm top-10 z-10"
|
|
17
|
-
:class="{ 'left-0': firstHalf, '-left-44': !firstHalf }">
|
|
18
|
-
<strong class="p-3">
|
|
19
|
-
{{ localisations.currentMethod }}
|
|
20
|
-
</strong>
|
|
21
|
-
|
|
22
|
-
<span class="px-4 py-1 w-full">
|
|
23
|
-
{{ currentFilterMethod?.description }}
|
|
24
|
-
|
|
25
|
-
<span class="float-right"
|
|
26
|
-
v-html="currentFilterMethod?.icon"></span>
|
|
27
|
-
</span>
|
|
28
|
-
|
|
29
|
-
<strong class="p-3">
|
|
30
|
-
{{ localisations.availableMethods }}
|
|
31
|
-
</strong>
|
|
32
|
-
|
|
33
|
-
<span v-for="(filterMethod, index) in allowedFilterMethods"
|
|
34
|
-
:key="index"
|
|
35
|
-
class="cursor-pointer hover:bg-off-white px-4 py-1 w-full"
|
|
36
|
-
@click.prevent="setFilterMethod(filterMethod.method)">
|
|
37
|
-
{{ filterMethod.description }}
|
|
38
|
-
|
|
39
|
-
<span class="float-right"
|
|
40
|
-
v-html="filterMethod.icon"></span>
|
|
41
|
-
</span>
|
|
42
|
-
</div>
|
|
43
|
-
</div>
|
|
44
|
-
|
|
45
|
-
<!-- Booleans -->
|
|
46
|
-
<select v-if="column.type === GridColumnType.BOOLEAN ||
|
|
47
|
-
(column.slotType === GridColumnType.BOOLEAN && typeof column.field !== 'undefined')"
|
|
48
|
-
class="border-none w-full"
|
|
49
|
-
@change="setFilter($event.target)">
|
|
50
|
-
<option :value="undefined"></option>
|
|
51
|
-
|
|
52
|
-
<option value="true"
|
|
53
|
-
:selected="currentFilter === 'true'">
|
|
54
|
-
{{ localisations.true }}
|
|
55
|
-
</option>
|
|
56
|
-
|
|
57
|
-
<option value="false"
|
|
58
|
-
:selected="currentFilter === 'false'">
|
|
59
|
-
{{ localisations.false }}
|
|
60
|
-
</option>
|
|
61
|
-
</select>
|
|
62
|
-
<!-- Dates & DateTimes -->
|
|
63
|
-
<cl-ui-calendar v-else-if="column.type === GridColumnType.DATE || column.type === GridColumnType.DATETIME ||
|
|
64
|
-
((column.slotType === GridColumnType.DATE || column.slotType === GridColumnType.DATETIME) && typeof column.field !== 'undefined')"
|
|
65
|
-
:date="currentDateFilter"
|
|
66
|
-
class="border-none w-full"
|
|
67
|
-
:type="column.type"
|
|
68
|
-
:date-placeholder="localisations.selectDate"
|
|
69
|
-
:date-time-placeholder="localisations.selectDateTime"
|
|
70
|
-
:current-locale="currentLocale"
|
|
71
|
-
@update:date="setDateFilter($event)" />
|
|
72
|
-
<!-- Numbers -->
|
|
73
|
-
<input v-else-if="column.type === GridColumnType.NUMBER ||
|
|
74
|
-
(column.slotType === GridColumnType.NUMBER && typeof column.field !== 'undefined')"
|
|
75
|
-
:value="currentFilter"
|
|
76
|
-
class="border-none w-full"
|
|
77
|
-
type="text"
|
|
78
|
-
@keyup.arrow-up="setFilter(null, (currentNumberFilter + 1).toString())"
|
|
79
|
-
@keyup.arrow-down="setFilter(null, (currentNumberFilter - 1).toString())"
|
|
80
|
-
@input="debounce(setNumberFilter, [ $event.target ])">
|
|
81
|
-
<!-- Strings -->
|
|
82
|
-
<input v-else-if="column.type !== GridColumnType.SLOT ||
|
|
83
|
-
(column.slotType === GridColumnType.STRING && typeof column.field !== 'undefined')"
|
|
84
|
-
:value="currentFilter"
|
|
85
|
-
class="border-none w-full"
|
|
86
|
-
type="text"
|
|
87
|
-
@input="debounce(setFilter, [ $event.target ])">
|
|
88
|
-
</div>
|
|
89
|
-
<div v-else
|
|
90
|
-
class="flex w-full">
|
|
91
|
-
|
|
92
|
-
</div>
|
|
93
|
-
</template>
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<script lang="ts" src="./footer"></script>
|
|
2
|
-
|
|
3
|
-
<template>
|
|
4
|
-
<div v-if="data && data.results?.length && request"
|
|
5
|
-
class="flex flex-wrap justify-end mt-4 w-full">
|
|
6
|
-
<div class="bg-off-white border border-grey-0 flex items-center lg:w-auto mb-2 px-3 py-2 rounded shadow-md text-sm w-full">
|
|
7
|
-
<span class="text-grey-3 w-max">
|
|
8
|
-
{{ localisations.jumpToPage }}
|
|
9
|
-
</span>
|
|
10
|
-
|
|
11
|
-
<input class="!h-8 !inline-block !ml-2 !text-sm !w-max"
|
|
12
|
-
:value="request.pageNumber"
|
|
13
|
-
type="number"
|
|
14
|
-
@input="debounce(setPageFromInput, [ $event.target ])">
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
|
-
<div class="bg-off-white border border-grey-0 flex flex-wrap items-center lg:ml-2 lg:w-auto mb-2 mb:flex-nowrap px-3 py-2 rounded shadow-md text-sm w-full">
|
|
18
|
-
<div class="flex flex-wrap lg:p-2 mb-2 md:mb-0 md:w-auto text-sm w-full">
|
|
19
|
-
<li class="flex flex-wrap lg:mb-0 lg:mr-2 lg:w-auto mb-2 w-full">
|
|
20
|
-
<span class="lg:mr-2 lg:w-auto text-grey-3 w-full">
|
|
21
|
-
{{ localisations.page }}
|
|
22
|
-
</span>
|
|
23
|
-
</li>
|
|
24
|
-
<ul class="flex flex-wrap mb:flex-nowrap text-sm">
|
|
25
|
-
<li class="pr-2">
|
|
26
|
-
{{ n(request.pageNumber, NumberFormat.INTEGER, currentLocale) }} / {{ n(totalPages, NumberFormat.INTEGER, currentLocale) }}
|
|
27
|
-
</li>
|
|
28
|
-
|
|
29
|
-
<li v-show="request.pageNumber > 1"
|
|
30
|
-
class="cursor-pointer lg:mr-2 mr-1 mt-1"
|
|
31
|
-
@click="setPage(1)">
|
|
32
|
-
<ph-caret-double-left :size="14" />
|
|
33
|
-
</li>
|
|
34
|
-
|
|
35
|
-
<li v-show="request.pageNumber > 1"
|
|
36
|
-
class="cursor-pointer lg:mr-2 mr-1 mt-1"
|
|
37
|
-
@click="setPage(request.pageNumber - 1)">
|
|
38
|
-
<ph-caret-left :size="14" />
|
|
39
|
-
</li>
|
|
40
|
-
|
|
41
|
-
<li v-for="(number, index) in pageNumbers"
|
|
42
|
-
:key="index"
|
|
43
|
-
class="cursor-pointer lg:mr-2 mr-1"
|
|
44
|
-
:class="{
|
|
45
|
-
'text-black font-black': request.pageNumber === number,
|
|
46
|
-
'text-grey-6': request.pageNumber !== number
|
|
47
|
-
}"
|
|
48
|
-
@click="setPage(number)">
|
|
49
|
-
{{ n(number, NumberFormat.INTEGER, currentLocale) }}
|
|
50
|
-
</li>
|
|
51
|
-
|
|
52
|
-
<li v-show="request.pageNumber < totalPages"
|
|
53
|
-
class="cursor-pointer lg:mr-2 mr-1 mt-1"
|
|
54
|
-
@click="setPage(request.pageNumber + 1)">
|
|
55
|
-
<ph-caret-right :size="14" />
|
|
56
|
-
</li>
|
|
57
|
-
|
|
58
|
-
<li v-show="request.pageNumber < totalPages"
|
|
59
|
-
class="cursor-pointer lg:mr-2 mr-1 mt-1"
|
|
60
|
-
@click="setPage(totalPages)">
|
|
61
|
-
<ph-caret-double-right :size="14" />
|
|
62
|
-
</li>
|
|
63
|
-
</ul>
|
|
64
|
-
</div>
|
|
65
|
-
|
|
66
|
-
<ul class="flex flex-wrap lg:p-2 mb-2 md:mb-0 md:w-auto text-sm w-full">
|
|
67
|
-
<li class="lg:mb-0 lg:mr-2 lg:w-auto mb-2 text-grey-3 w-full">
|
|
68
|
-
{{ localisations.pageSize }}
|
|
69
|
-
</li>
|
|
70
|
-
|
|
71
|
-
<li v-for="(size, index) in pageSizes"
|
|
72
|
-
:key="index"
|
|
73
|
-
class="cursor-pointer lg:mr-2 mr-1"
|
|
74
|
-
:class="{ 'text-black font-black': request.pageSize === size, 'text-grey-6': request.pageSize !== size }"
|
|
75
|
-
@click="setPageSize(size)">
|
|
76
|
-
{{ n(size, NumberFormat.INTEGER, currentLocale) }}
|
|
77
|
-
</li>
|
|
78
|
-
</ul>
|
|
79
|
-
|
|
80
|
-
<ul class="lg:p-2 mb-2 md:mb-0 md:w-auto w-full">
|
|
81
|
-
<li class="block lg:inline-block lg:mb-0 lg:mr-1 lg:w-auto mb-2 text-grey-3 w-full">
|
|
82
|
-
{{ localisations.totalRecords }}
|
|
83
|
-
</li>
|
|
84
|
-
|
|
85
|
-
<li class="block lg:inline-block">
|
|
86
|
-
{{ n(data.totalRecords, NumberFormat.INTEGER, currentLocale) }}
|
|
87
|
-
</li>
|
|
88
|
-
</ul>
|
|
89
|
-
</div>
|
|
90
|
-
</div>
|
|
91
|
-
</template>
|