@navette-js/tables 0.0.0-stage → 1.0.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,51 @@
1
1
  {
2
2
  "name": "@navette-js/tables",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.0-beta.2",
4
+ "description": "Interactive tables for Navette admin panels.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./lib/index.d.ts",
10
+ "default": "./lib/index.js"
11
+ }
12
+ },
13
+ "types": "./lib/index.d.ts",
14
+ "files": [
15
+ "lib",
16
+ "views",
17
+ "LICENSE",
18
+ "README.md"
19
+ ],
20
+ "engines": {
21
+ "node": ">=24"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+https://github.com/NavetteJS/navette.git",
26
+ "directory": "packages/tables"
27
+ },
28
+ "homepage": "https://github.com/NavetteJS/navette#readme",
29
+ "bugs": {
30
+ "url": "https://github.com/NavetteJS/navette/issues"
31
+ },
32
+ "keywords": [
33
+ "navette",
34
+ "admin",
35
+ "panel",
36
+ "livewire",
37
+ "express",
38
+ "node"
39
+ ],
40
+ "dependencies": {
41
+ "@navette-js/support": "1.0.0-beta.2",
42
+ "@navette-js/database": "1.0.0-beta.2",
43
+ "@navette-js/actions": "1.0.0-beta.2",
44
+ "@navette-js/forms": "1.0.0-beta.2",
45
+ "@navette-js/schemas": "1.0.0-beta.2"
46
+ },
47
+ "publishConfig": {
48
+ "access": "public",
49
+ "tag": "beta"
50
+ }
51
+ }
@@ -0,0 +1 @@
1
+ <%- assetUrl('js/filament/tables/components/' + path + '.js') %>
@@ -0,0 +1,146 @@
1
+ <%# Column manager dropdown; only the id, labels and color classes are filled in here.
2
+ The list itself is rendered by Alpine (filamentTableColumnManager) from the `tableColumns` state. %>
3
+ <div
4
+ x-data="filamentDropdown({ isMenu: false })"
5
+ class="fi-dropdown fi-ta-col-manager-dropdown" wire:key="<%= id %>.table.column-manager"
6
+ >
7
+ <div
8
+ x-on:mousedown="if ($event.button === 0) toggle($event)"
9
+ class="fi-dropdown-trigger"
10
+ >
11
+ <button title="<%= t('filament-tables::table.actions.column_manager.label') %>" aria-label="<%= t('filament-tables::table.actions.column_manager.label') %>" type="button" wire:loading.attr="aria-disabled" wire:loading.class="fi-disabled" class="fi-force-enabled fi-ac-icon-btn-action fi-icon-btn fi-size-md" >
12
+ <svg class="fi-icon fi-size-md" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true" data-slot="icon">
13
+ <path d="M14 17h2.75A2.25 2.25 0 0 0 19 14.75v-9.5A2.25 2.25 0 0 0 16.75 3H14v14ZM12.5 3h-5v14h5V3ZM3.25 3H6v14H3.25A2.25 2.25 0 0 1 1 14.75v-9.5A2.25 2.25 0 0 1 3.25 3Z"/>
14
+ </svg>
15
+ </button>
16
+ </div>
17
+ <div
18
+ x-cloak
19
+ x-float.placement.bottom-end.shift.offset="{ offset: 8, }"
20
+ x-ref="panel"
21
+ x-transition:enter-start="fi-opacity-0"
22
+ x-transition:leave-end="fi-opacity-0"
23
+ wire:ignore.self
24
+ wire:key="<%= id %>.table.column-manager.panel"
25
+ class="fi-dropdown-panel fi-width-xs"
26
+ style=""
27
+ >
28
+ <div
29
+ x-data="filamentTableColumnManager({
30
+ columns: $wire.entangle('tableColumns'),
31
+ isLive: false,
32
+ })"
33
+ class="fi-ta-col-manager"
34
+ >
35
+ <div class="fi-ta-col-manager-header">
36
+ <h2 class="fi-ta-col-manager-heading"><%= t('filament-tables::table.column_manager.heading') %></h2>
37
+ <div>
38
+ <button
39
+ class="<%- cls([...dangerLinkClasses, 'fi-link', 'fi-size-md']) %>" type="button" wire:loading.attr="aria-disabled" wire:loading.class="fi-disabled" wire:target="resetTableColumnManager" wire:click="resetTableColumnManager" wire:loading.remove.delay.default="" x-on:click="resetDeferredColumns"
40
+ >
41
+ <svg
42
+ fill="none"
43
+ viewBox="0 0 24 24"
44
+ xmlns="http://www.w3.org/2000/svg"
45
+ aria-hidden="true" wire:loading.delay.default="" wire:target="resetTableColumnManager" class="fi-icon fi-loading-indicator fi-size-md"
46
+ >
47
+ <path
48
+ clip-rule="evenodd"
49
+ d="M12 19C15.866 19 19 15.866 19 12C19 8.13401 15.866 5 12 5C8.13401 5 5 8.13401 5 12C5 15.866 8.13401 19 12 19ZM12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z"
50
+ fill-rule="evenodd"
51
+ fill="currentColor"
52
+ opacity="0.2"
53
+ ></path>
54
+ <path
55
+ d="M2 12C2 6.47715 6.47715 2 12 2V5C8.13401 5 5 8.13401 5 12H2Z"
56
+ fill="currentColor"
57
+ ></path>
58
+ </svg>
59
+ <span class="fi-link-label"><%= t('filament-tables::table.column_manager.actions.reset.label') %></span>
60
+ </button> </div>
61
+ </div>
62
+ <div
63
+ x-id="['fi-ta-col-manager-group-checkbox', 'fi-ta-col-manager-column-checkbox']"
64
+ class="fi-grid fi-grid-direction-col lg:fi-grid-cols fi-ta-col-manager-items" style="--cols-lg: 1; --cols-default: 1;"
65
+ >
66
+ <template
67
+ x-for="column in getVisibleColumns()"
68
+ x-bind:key="JSON.stringify([column.type, column.name])"
69
+ >
70
+ <div
71
+ >
72
+ <template x-if="column.type === 'group'">
73
+ <div class="fi-ta-col-manager-group">
74
+ <div class="fi-ta-col-manager-item">
75
+ <label
76
+ x-bind:for="$id('fi-ta-col-manager-group-checkbox', column.name)" class="fi-ta-col-manager-label"
77
+ >
78
+ <input
79
+ type="checkbox"
80
+ class="fi-checkbox-input fi-valid"
81
+ x-bind:id="$id('fi-ta-col-manager-group-checkbox', column.name)"
82
+ x-bind:checked="(groupedColumns[column.name] || {}).checked || false"
83
+ x-bind:disabled="(groupedColumns[column.name] || {}).disabled || false"
84
+ x-effect="$el.indeterminate = (groupedColumns[column.name] || {}).indeterminate || false"
85
+ x-on:change="toggleGroup(column.name)"
86
+ />
87
+ <span x-html="column.label"></span>
88
+ </label>
89
+ </div>
90
+ <div
91
+ class="fi-ta-col-manager-group-items"
92
+ >
93
+ <template
94
+ x-for="groupColumn in getVisibleColumns(column.name)"
95
+ x-bind:key="JSON.stringify([groupColumn.type, groupColumn.name])"
96
+ >
97
+ <div
98
+ >
99
+ <div class="fi-ta-col-manager-item">
100
+ <label
101
+ x-bind:for="$id('fi-ta-col-manager-column-checkbox', groupColumn.name)" class="fi-ta-col-manager-label"
102
+ >
103
+ <input
104
+ type="checkbox"
105
+ class="fi-checkbox-input fi-valid"
106
+ x-bind:id="$id('fi-ta-col-manager-column-checkbox', groupColumn.name)"
107
+ x-bind:checked="(getColumn(groupColumn.name, column.name) || {}).isToggled || false"
108
+ x-bind:disabled="(getColumn(groupColumn.name, column.name) || {}).isToggleable === false"
109
+ x-on:change="toggleColumn(groupColumn.name, column.name)"
110
+ />
111
+ <span
112
+ x-html="groupColumn.label"
113
+ ></span>
114
+ </label>
115
+ </div>
116
+ </div>
117
+ </template>
118
+ </div>
119
+ </div>
120
+ </template>
121
+ <template x-if="column.type !== 'group'">
122
+ <div class="fi-ta-col-manager-item">
123
+ <label
124
+ x-bind:for="$id('fi-ta-col-manager-column-checkbox', column.name)" class="fi-ta-col-manager-label"
125
+ >
126
+ <input
127
+ type="checkbox"
128
+ class="fi-checkbox-input fi-valid"
129
+ x-bind:id="$id('fi-ta-col-manager-column-checkbox', column.name)"
130
+ x-bind:checked="(getColumn(column.name, null) || {}).isToggled || false"
131
+ x-bind:disabled="(getColumn(column.name, null) || {}).isToggleable === false"
132
+ x-on:change="toggleColumn(column.name)"
133
+ />
134
+ <span x-html="column.label"></span>
135
+ </label>
136
+ </div>
137
+ </template>
138
+ </div>
139
+ </template>
140
+ </div>
141
+ <div class="fi-ta-col-manager-actions-ctn">
142
+ <button type="button" wire:loading.attr="aria-disabled" wire:loading.class="fi-disabled" class="<%- cls(['fi-ac-btn-action', 'fi-btn', 'fi-size-md', ...primaryButtonClasses]) %>" x-on:click="applyTableColumnManager" ><%= t('filament-tables::table.column_manager.actions.apply.label') %></button>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </div>