Skip to content

Commit

Permalink
Prepare work for v0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierstoval committed Oct 22, 2023
1 parent ce2b187 commit bd359d0
Show file tree
Hide file tree
Showing 98 changed files with 309 additions and 1,653 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# v0.3.0

Changes:

- **BC Break**: lib was previously in the `admin/` subdirectory. This part has been removed, library is now accessible from its root path.
- **BC Break**: all Svelte templates have been moved to the `themes/carbon/` directory: this will further help with themes integration.
- **BC Break**: Svelte templates are no longer available from library's root, only via the `themes/` directory.
- Add a changelog
- Try to uniformize file imports
- Remove code from older repository
- Fix some linting errors

# v0.2.3

Changes:

- Add `initLocale` function helper to lib exports, this allows users to execute the function themselves **before** the library does

# v0.2.2

Changes:

- Fix demo crud state provider and processor
- Transform peer deps into normal deps, and update installation readme
- Update documentation to add more details about state providers and processors

# v0.2.1

Changes:

- Fix file imports to use only js, because svelte-package doesn't change it

# v0.2.0

New version, complete revamp of previous version.

# v0.1.0

Prototype, stored in a previous `v0` branch.
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ First, create a classic [SvelteKit project](https://kit.svelte.dev/), as a simpl

#### The Dashboard config

Then, create a `src/lib/admin/Dashboard.ts` file, and start writing the necessary data to create a Dasbhoard object:
Then, create a `src/lib/Dashboard.ts` file, and start writing the necessary data to create a Dasbhoard object:

```typescript
// src/lib/admin/Dashboard.ts
// src/lib/Dashboard.ts

// Some fancy icons for a neat UI:
import Book from 'carbon-icons-svelte/lib/Book.svelte';
Expand Down Expand Up @@ -78,10 +78,10 @@ export const dashboard = new DashboardDefinition({

#### The Crud config

Then, create the `src/lib/admin/booksCrud.ts` file, it will host your "Books" Crud configuration:
Then, create the `src/lib/booksCrud.ts` file, it will host your "Books" Crud configuration:

```typescript
// src/lib/admin/booksCrud.ts
// src/lib/booksCrud.ts

// Again, some icons to pop your admin!
import Pen from 'carbon-icons-svelte/lib/Pen.svelte';
Expand Down Expand Up @@ -176,7 +176,11 @@ Create a `src/routes/[crud]/[operation]/+page.svelte` file with the following co
// The Dashboard component that will render all the things,
// and the function helper that gathers URL parameters
import { Dashboard, getRequestParams } from '@orbitale/svelte-admin';
import { Dashboard } from '@orbitale/svelte-admin/themes/carbon';
// This function helps retrieving the [crud] and [operation] variables from the URL,
// as well as the potential query string params like "?id=..."
import { getRequestParams } from '@orbitale/svelte-admin';
// This is a custom Svelte store created by SvelteKit,
// it points to an instance of a Page object,
Expand All @@ -194,7 +198,7 @@ Create a `src/routes/[crud]/[operation]/+page.svelte` file with the following co
// That's your custom dashboard!
// The "$lib" alias is configured by SvelteKit,
// it always points to your "src/lib/" directory.
import { dashboard } from '$lib/admin/Dashboard.ts';
import { dashboard } from '$lib/Dashboard.ts';
// The "$:" syntax is valid Javascript code that tells Svelte
// that the following code is reactive, based on the values it depends on.
Expand Down Expand Up @@ -224,10 +228,11 @@ Here is the shorter version with no comments, if you want to copy-paste for a qu

```html
<script lang="ts">
import { Dashboard, getRequestParams } from '@orbitale/svelte-admin';
import { Dashboard } from '@orbitale/svelte-admin/themes/carbon';
import { getRequestParams } from '@orbitale/svelte-admin';
import { page } from '$app/stores';
import { browser } from '$app/environment';
import { dashboard } from '$lib/admin/Dashboard.ts';
import { dashboard } from '$lib/Dashboard.ts';
$: crud = $page.params.crud;
$: operation = $page.params.operation;
Expand Down Expand Up @@ -321,6 +326,7 @@ In the meantime, here is the roadmap for future features:
- Add pagination in the `List` operation.
- Tabs are supported in `CrudForm`, but "grid sections" are also needed, to have more form components on a single screen.
- Add support for validation in CrudForm (therefore Edit and New operations).
- Add other themes than Carbon, which is the default for now.

---

Expand Down
27 changes: 0 additions & 27 deletions old_code/ActionParams.ts

This file was deleted.

12 changes: 0 additions & 12 deletions old_code/AssociatedField.ts

This file was deleted.

11 changes: 0 additions & 11 deletions old_code/AssociatedItem.ts

This file was deleted.

14 changes: 0 additions & 14 deletions old_code/CallbackAction.ts

This file was deleted.

10 changes: 0 additions & 10 deletions old_code/Collection.ts

This file was deleted.

27 changes: 0 additions & 27 deletions old_code/CollectionField.ts

This file was deleted.

34 changes: 0 additions & 34 deletions old_code/ConfigFilter.ts

This file was deleted.

13 changes: 0 additions & 13 deletions old_code/DefaultAction.ts

This file was deleted.

45 changes: 0 additions & 45 deletions old_code/Field.ts

This file was deleted.

11 changes: 0 additions & 11 deletions old_code/FieldHtmlProperties.ts

This file was deleted.

34 changes: 0 additions & 34 deletions old_code/FieldOptions.ts

This file was deleted.

9 changes: 0 additions & 9 deletions old_code/FilterType.ts

This file was deleted.

28 changes: 0 additions & 28 deletions old_code/FilterWithValue.ts

This file was deleted.

Loading

0 comments on commit bd359d0

Please sign in to comment.