Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hotfix - Rename livewiretables namespace #574

Merged
merged 7 commits into from
Sep 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -61,17 +61,17 @@
<tbody>
@foreach($associations->filter(fn($product) => $product['inverse'] == $showInverseAssociations) as $index => $product)
<tr class="lt-bg-white even:lt-bg-gray-50" wire:key="table_row_{{ $product['target_id'] }}">
<x-tables::cell>
<x-l-tables::cell>
<img src="{{ $product['thumbnail']}}" class="w-12 rounded">
</x-tables::cell>
</x-l-tables::cell>

<x-tables::cell>
<x-l-tables::cell>
<a href="{{ route('hub.products.show', $product['target_id']) }}" class="lt-text-blue-600 hover:underline">
{{ $product['name'] }}
</a>
</x-tables::cell>
</x-l-tables::cell>

<x-tables::cell>
<x-l-tables::cell>
<x-hub::input.select wire:model="associations.{{ $index }}.type">
<option value="alternate">
{{ __('adminhub::partials.products.associations.alternate') }}
Expand All @@ -83,13 +83,13 @@
{{ __('adminhub::partials.products.associations.up-sell') }}
</option>
</x-hub::input.select>
</x-tables::cell>
</x-l-tables::cell>

<x-tables::cell>
<x-l-tables::cell>
<button type="button" wire:click.prevent="removeAssociation({{ $index }})" class="text-red-500 hover:underline">
{{ __('adminhub::global.remove') }}
</button>
</x-tables::cell>
</x-l-tables::cell>
</tr>
@endforeach
</tbody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(OrdersTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -57,7 +57,7 @@ public function can_see_columns()
$orders = Order::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(OrdersTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($columns as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(ActivityLogTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -41,7 +41,7 @@ public function can_see_columns_and_data()
$channels = Channel::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(ActivityLogTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(AttributesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -41,7 +41,7 @@ public function can_see_columns_and_data()
$types = AttributeManifest::getTypes();

$component = Livewire::actingAs($staff, 'staff')->test(AttributesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(ChannelsTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -38,7 +38,7 @@ public function can_see_columns_and_data()
$records = Channel::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(ChannelsTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(CurrenciesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -38,7 +38,7 @@ public function can_see_columns_and_data()
$records = Currency::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(CurrenciesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(LanguagesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -38,7 +38,7 @@ public function can_see_columns_and_data()
$records = Language::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(LanguagesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(StaffTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -37,7 +37,7 @@ public function can_see_columns_and_data()
$records = Staff::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(StaffTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(TagsTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -39,7 +39,7 @@ public function can_see_columns_and_data()
Tag::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(TagsTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function can_mount_component()
]);

Livewire::actingAs($staff, 'staff')->test(TaxZonesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');
}

/** @test */
Expand All @@ -38,7 +38,7 @@ public function can_see_columns_and_data()
TaxZone::factory(5)->create();

$component = Livewire::actingAs($staff, 'staff')->test(TaxZonesTable::class)
->assertViewIs('tables::index');
->assertViewIs('l-tables::index');

foreach ($component->get('columns') as $column) {
$component->assertSee($column->getHeading());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public function down()
Schema::table($this->prefix.'products', function ($table) {
if (DB::getDriverName() !== 'sqlite') {
$table->dropForeign(['brand_id']);
};
}
$table->dropColumn('brand_id');
});
}
Expand Down
15 changes: 15 additions & 0 deletions utils/livewire-tables/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

# [Unreleased]

## Changed

- Updated `tables` view namespace to `l-tables`

# 0.1.0-rc.1

Initial release.
2 changes: 1 addition & 1 deletion utils/livewire-tables/dist/livewire-tables/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion utils/livewire-tables/dist/mix-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"/livewire-tables/app.css": "/livewire-tables/app.css?id=ed1b839a769f2a0479f8cd315e809815"
"/livewire-tables/app.css": "/livewire-tables/app.css?id=221199ffc920d5ade684160ac9868146"
}
4 changes: 2 additions & 2 deletions utils/livewire-tables/resources/views/action-cell.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div x-data="{ isActive: false }"
class="lt-relative">
<x-tables::button size="xs"
<x-l-tables::button size="xs"
aria-label="Toggle Menu"
x-on:click="isActive = !isActive">
<span>
Expand All @@ -15,7 +15,7 @@ class="lt-w-4 lt-h-4"
d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z"
clip-rule="evenodd" />
</svg>
</x-tables::button>
</x-l-tables::button>

<div x-cloak
x-transition
Expand Down
4 changes: 2 additions & 2 deletions utils/livewire-tables/resources/views/actions/bulk.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ class="lt-px-3 lt-py-2 lt-text-sm lt-font-medium lt-text-gray-600 lt-transition
</span>
</button>

<x-tables::support.modal wire:model="showModal">
<x-l-tables::support.modal wire:model="showModal">
<div>
@livewire('hub.components.tables.actions.update-status', [
'ids' => $selectedIds,
])
</div>
</x-tables::support.modal>
</x-l-tables::support.modal>
</div>
Loading