@zeedhi/teknisa-components-vuetify 3.0.0 → 3.0.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 (59) hide show
  1. package/.package.json +10 -7
  2. package/dist/teknisa-vuetify.css +1 -1
  3. package/dist/teknisa-vuetify.js +3777 -14
  4. package/package.json +3 -3
  5. package/src/components/index.ts +22 -0
  6. package/src/components/public.ts +14 -18
  7. package/src/components/tek-grid/TekGrid.ts +318 -0
  8. package/src/components/tek-grid/TekGrid.vue +235 -0
  9. package/src/components/tek-grid/column-filter/TekGridColumnFilter.ts +244 -0
  10. package/src/components/tek-grid/column-filter/TekGridColumnFilter.vue +93 -0
  11. package/src/components/tek-grid/column-header/TekGridHeaderRow.ts +147 -0
  12. package/src/components/tek-grid/column-header/TekGridHeaderRow.vue +78 -0
  13. package/src/components/tek-grid/columns-button/TekGridColumnsButton.ts +96 -0
  14. package/src/components/tek-grid/columns-button/TekGridColumnsButton.vue +273 -0
  15. package/src/components/tek-grid/columns-button/TekGridColumnsOptionsController.ts +470 -0
  16. package/src/components/tek-grid/columns-button/TekGridColumnsOptionsModal.ts +513 -0
  17. package/src/components/tek-grid/filter-button/TekGridFilterButton.ts +47 -0
  18. package/src/components/tek-grid/filter-button/TekGridFilterButton.vue +28 -0
  19. package/src/components/tek-grid/indentation/TekGridIndentation.ts +21 -0
  20. package/src/components/tek-grid/indentation/TekGridIndentation.vue +33 -0
  21. package/src/components/tek-grid/layout-options/TekGridLayoutOptions.ts +119 -0
  22. package/src/components/tek-grid/layout-options/TekGridLayoutOptions.vue +172 -0
  23. package/src/components/tek-grid/row/TekGridFooterRow.ts +62 -0
  24. package/src/components/tek-grid/row/TekGridFooterRow.vue +64 -0
  25. package/src/components/tek-grid/row/TekGridGroupRow.ts +65 -0
  26. package/src/components/tek-grid/row/TekGridGroupRow.vue +65 -0
  27. package/src/components/tek-user-info/TekUserInfo.ts +51 -0
  28. package/src/components/tek-user-info/TekUserInfo.vue +53 -0
  29. package/src/components/tek-user-info/TekUserInfoList.ts +39 -0
  30. package/src/components/tek-user-info/TekUserInfoList.vue +12 -0
  31. package/src/composables/useTableLayout.ts +290 -0
  32. package/src/utils/isArrayOperation.ts +5 -0
  33. package/types/components/public.d.ts +8 -1
  34. package/types/components/tek-grid/TekGrid.d.ts +7211 -0
  35. package/types/components/tek-grid/TekGrid.ts.d.ts +7211 -0
  36. package/types/components/tek-grid/column-filter/TekGridColumnFilter.d.ts +130 -0
  37. package/types/components/tek-grid/column-filter/TekGridColumnFilter.ts.d.ts +130 -0
  38. package/types/components/tek-grid/column-header/TekGridHeaderRow.d.ts +225 -0
  39. package/types/components/tek-grid/column-header/TekGridHeaderRow.ts.d.ts +225 -0
  40. package/types/components/tek-grid/columns-button/TekGridColumnsButton.d.ts +2432 -0
  41. package/types/components/tek-grid/columns-button/TekGridColumnsButton.ts.d.ts +2432 -0
  42. package/types/components/tek-grid/columns-button/TekGridColumnsOptionsController.d.ts +66 -0
  43. package/types/components/tek-grid/columns-button/TekGridColumnsOptionsModal.d.ts +9 -0
  44. package/types/components/tek-grid/filter-button/TekGridFilterButton.d.ts +2920 -0
  45. package/types/components/tek-grid/filter-button/TekGridFilterButton.ts.d.ts +2920 -0
  46. package/types/components/tek-grid/indentation/TekGridIndentation.d.ts +32 -0
  47. package/types/components/tek-grid/indentation/TekGridIndentation.ts.d.ts +32 -0
  48. package/types/components/tek-grid/layout-options/TekGridLayoutOptions.d.ts +1893 -0
  49. package/types/components/tek-grid/layout-options/TekGridLayoutOptions.ts.d.ts +1893 -0
  50. package/types/components/tek-grid/row/TekGridFooterRow.d.ts +90 -0
  51. package/types/components/tek-grid/row/TekGridFooterRow.ts.d.ts +90 -0
  52. package/types/components/tek-grid/row/TekGridGroupRow.d.ts +87 -0
  53. package/types/components/tek-grid/row/TekGridGroupRow.ts.d.ts +87 -0
  54. package/types/components/tek-user-info/TekUserInfo.d.ts +1940 -0
  55. package/types/components/tek-user-info/TekUserInfo.ts.d.ts +1940 -0
  56. package/types/components/tek-user-info/TekUserInfoList.d.ts +1015 -0
  57. package/types/components/tek-user-info/TekUserInfoList.ts.d.ts +1015 -0
  58. package/types/composables/useTableLayout.d.ts +26 -0
  59. package/types/utils/isArrayOperation.d.ts +2 -0
@@ -0,0 +1,273 @@
1
+ <template>
2
+ <v-menu
3
+ :id="instance.name"
4
+ v-model="menuIsOpened"
5
+ :class="['zd-iterable-columns-button', 'tek-grid-columns-button', instance.cssClass]"
6
+ :style="instance.cssStyle"
7
+ :closeOnContentClick="false"
8
+ offset-y
9
+ content-class="zd-iterable-columns-button-options tek-grid-columns-button-options"
10
+ >
11
+ <template v-slot:activator="{ props: onMenu }">
12
+ <v-tooltip bottom>
13
+ <template v-slot:activator="{ props: onTooltip }">
14
+ <zd-activator-wrapper
15
+ :child-props="{
16
+ component: 'ZdButton',
17
+ name: instance.name,
18
+ instanceObject: instance,
19
+ }"
20
+ v-bind="mergeProps(onMenu, onTooltip)"
21
+ ></zd-activator-wrapper>
22
+ </template>
23
+ <span>{{ $t('TEKGRID_COLUMNS') }}</span>
24
+ </v-tooltip>
25
+ </template>
26
+
27
+ <v-card class="zd-pa-2">
28
+ <div class="tek-grid-columns-button-table-wrapper zd-mb-2">
29
+ <table class="tek-grid-columns-button-table" :id="instance.name + '_columns_table'">
30
+ <thead>
31
+ <tr>
32
+ <th><!--Name--></th>
33
+ <th>{{ $t('TEKGRID_COLUMN_VISIBLE') }}</th>
34
+ <th v-if="!instance.hideGroups">{{ $t('TEKGRID_COLUMN_GROUPED') }}</th>
35
+ <th v-if="!instance.hideGroups">{{ $t('TEKGRID_COLUMN_AGGREGATION') }}</th>
36
+ </tr>
37
+ </thead>
38
+ <tbody>
39
+ <tr
40
+ v-for="column in instance.filteredColumns()"
41
+ :key="column.name"
42
+ :name="column.name"
43
+ >
44
+ <td class="tek-grid-columns-button-column-name sortHandle">
45
+ <span>⦙⦙</span>{{ $t(column.label) }}
46
+ </td>
47
+ <td>
48
+ <zd-checkbox
49
+ :name="instance.name + '_column_visible_' + column.name"
50
+ :value="column.grouped || column.isVisible"
51
+ :events="{
52
+ change: instance.controller.showHideTekColumn.bind(instance.controller, column)
53
+ }"
54
+ />
55
+ </td>
56
+ <td v-if="!instance.hideGroups">
57
+ <zd-checkbox
58
+ v-if="column.type !== 'action'"
59
+ :name="instance.name + '_column_grouped_' + column.name"
60
+ :value="column.grouped"
61
+ :events="{
62
+ change: instance.controller.changeGroupedColumn.bind(instance.controller, column)
63
+ }"
64
+ />
65
+ </td>
66
+ <td v-if="!instance.hideGroups" class="tek-grid-columns-button-column-aggregation">
67
+ <zd-select
68
+ v-if="column.type !== 'action'"
69
+ :name="instance.name + '_column_aggregation_' + column.name"
70
+ v-bind="{
71
+ value: column.aggregation,
72
+ disabled: column.grouped || !column.isVisible,
73
+ events: {
74
+ change: instance.controller.changeAggregationColumn.bind(instance.controller, column)
75
+ },
76
+ dataText: 'text',
77
+ dataValue: 'value',
78
+ autocomplete: false,
79
+ showHelper: false,
80
+ showLabel: false,
81
+ datasource: {
82
+ data: instance.getAggregationSelectData(),
83
+ },
84
+ }"
85
+ />
86
+ </td>
87
+ </tr>
88
+ </tbody>
89
+ </table>
90
+ </div>
91
+ <div class="tek-grid-columns-button-table-footer">
92
+ <zd-button
93
+ :name="instance.name + '_columns_table_footer_button'"
94
+ label="TEKGRID_MORE_OPTIONS"
95
+ small
96
+ outline
97
+ cssClass="zd-ma-2 zd-mr-1"
98
+ @click="moreOptions()"
99
+ ></zd-button>
100
+ <zd-button
101
+ :name="instance.name + '_columns_table_footer_close'"
102
+ label="TEKGRID_CLOSE"
103
+ small
104
+ cssClass="zd-ma-2 zd-ml-1"
105
+ @click="close()"
106
+ ></zd-button>
107
+ </div>
108
+ </v-card>
109
+ </v-menu>
110
+ </template>
111
+
112
+ <script lang="ts" src="./TekGridColumnsButton.ts"></script>
113
+
114
+ <style lang="scss">
115
+ .tek-grid-columns-button-options {
116
+ max-height: 250px;
117
+ display: flex;
118
+ flex-direction: column;
119
+ background-color: #fff;
120
+
121
+ &.theme--dark {
122
+ background-color: #1e1e1e
123
+ }
124
+
125
+ .tek-grid-columns-button-table-wrapper {
126
+ flex: 1;
127
+ overflow-y: auto;
128
+
129
+ .tek-grid-columns-button-table {
130
+ font-size: 13px;
131
+ border-spacing: 0;
132
+ width: 100%;
133
+
134
+ thead {
135
+ tr {
136
+ th {
137
+ padding: var(--spacing-2) var(--spacing-2) var(--spacing-1) var(--spacing-2);
138
+ white-space: nowrap;
139
+ text-align: left;
140
+ position: sticky;
141
+ top: 0;
142
+ z-index: 10;
143
+ background-color: var(--zd-background-base);
144
+ }
145
+ }
146
+ }
147
+
148
+ tbody {
149
+ tr {
150
+ td {
151
+ padding: var(--spacing-1) var(--spacing-2);
152
+ white-space: nowrap;
153
+
154
+ &.tek-grid-columns-button-column-name {
155
+ cursor: -webkit-grab;
156
+
157
+ > span {
158
+ padding-right: 4px;
159
+ }
160
+ }
161
+
162
+ &.tek-grid-columns-button-column-aggregation {
163
+ max-width: 150px;
164
+ }
165
+ }
166
+ }
167
+ }
168
+ }
169
+ }
170
+
171
+ .tek-grid-columns-button-table-footer {
172
+ display: flex;
173
+
174
+ .zd-button {
175
+ flex: 1;
176
+ }
177
+ }
178
+ }
179
+
180
+ .tek-grid-columns-button-sortable-drag {
181
+ background: white;
182
+ }
183
+
184
+ // column options modal
185
+ .tek-grid-column-option-box {
186
+ margin: var(--spacing-1);
187
+ background: #ccc;
188
+ padding: 2px var(--spacing-1);
189
+ cursor: pointer;
190
+
191
+ > * {
192
+ display: inline-block;
193
+ }
194
+
195
+ > .zd-icon {
196
+ font-size: 0.9rem;
197
+ margin-left: var(--spacing-2);
198
+ }
199
+
200
+ &.tek-grid-column-option-grouped-true {
201
+ cursor: default;
202
+ background: #fafafa;
203
+
204
+ > .zd-icon {
205
+ display: none;
206
+ }
207
+ }
208
+
209
+ &.tek-grid-column-option-selected-true {
210
+ background: var(--v-primary-base);
211
+ color: white;
212
+
213
+ > .zd-icon {
214
+ color: white;
215
+ }
216
+ }
217
+ }
218
+
219
+
220
+ .tek-grid-column-option-container-col {
221
+ position: relative;
222
+
223
+ .tek-grid-column-option-container {
224
+ background: #eee;
225
+ padding: var(--spacing-1);
226
+ max-height: 100px;
227
+ min-height: 42px;
228
+ align-content: center;
229
+ position: relative;
230
+
231
+ .tek-iterable-footer {
232
+ display: none !important;
233
+ }
234
+
235
+ .zd-text.no-data {
236
+ position: absolute;
237
+ left: 50%;
238
+ top: 50%;
239
+ transform: translate(-50%, -50%);
240
+ text-align: center;
241
+ font-size: 0.7rem;
242
+ }
243
+ }
244
+
245
+ .tek-grid-column-option-label {
246
+ font-weight: var(--zd-font-body2-weight);
247
+ }
248
+
249
+ .tek-grid-column-option-select-all {
250
+ position: absolute;
251
+ top: 0.5rem;
252
+ right: var(--spacing-1);
253
+ color: var(--v-primary-base);
254
+ cursor: pointer;
255
+ font-size: 0.8rem;
256
+ }
257
+
258
+ .tek-grid-column-option-drop-here {
259
+ position: absolute;
260
+ z-index: 100;
261
+ left: 50%;
262
+ transform: translateX(-50%);
263
+ top: 35px;
264
+ }
265
+ }
266
+
267
+ .tek-grid-column-option-detail-name {
268
+ color: var(--v-primary-base);
269
+ font-weight: var(--zd-font-body2-weight);
270
+ font-size: 1.1rem;
271
+ margin-top: var(--spacing-6);
272
+ }
273
+ </style>