Skip to content

Commit

Permalink
Support Laravel Nova 5.2.0 (#27)
Browse files Browse the repository at this point in the history
* Support Laravel Nova 5.2.0

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

* wip

Signed-off-by: Mior Muhammad Zaki <[email protected]>

---------

Signed-off-by: Mior Muhammad Zaki <[email protected]>
  • Loading branch information
crynobone authored Feb 4, 2025
1 parent 9b21918 commit 9092d66
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 109 deletions.
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
},
"require-dev": {
"larastan/larastan": "^2.4",
"laravel/nova": "^5.0",
"laravel/nova": "^5.2",
"laravel/pint": "^1.17",
"orchestra/pest-plugin-testbench": "^2.0|^3.0",
"orchestra/testbench": "^8.30|^9.8",
"phpstan/phpstan": "^1.12",
"spatie/laravel-ray": "^1.39"
},
"conflict": {
"laravel/nova": "<5.1.6 || >=6.0.0"
"laravel/nova": "<5.2.0 || >=6.0.0"
},
"autoload": {
"psr-4": {
Expand Down
5 changes: 5 additions & 0 deletions dist/composables/useResourceInformation.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
export function useResourceInformation(): {
resourceInformation: (resourceName: any) => any;
viaResourceInformation: (viaRelation: any) => any;
authorizedToCreate: (resourceName: any, relationshipType?: any) => any;
};
17 changes: 17 additions & 0 deletions dist/mixins/InteractsWithDates.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
declare namespace _default {
namespace computed {
/**
* Get the user's local timezone.
*
* @returns {string}
*/
function userTimezone(): string;
/**
* Determine if the user is used to 12 hour time.
*
* @returns {boolean}
*/
function usesTwelveHourTime(): boolean;
}
}
export default _default;
2 changes: 2 additions & 0 deletions dist/mixins/packages.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export { default as DependentFormField } from "./DependentFormField";
export { default as HandlesFormRequest } from "./HandlesFormRequest";
export { default as HandlesUploads } from "./HandlesUploads";
export { default as InteractsWithResourceInformation } from "./InteractsWithResourceInformation";
export { default as InteractsWithDates } from "./InteractsWithDates";
export { default as Localization } from "./Localization";
export { default as MetricBehavior } from "./MetricBehavior";
export { default as FieldValue } from "./FieldValue";
Expand All @@ -18,4 +19,5 @@ export { default as HasCards } from "./HasCards";
export { default as HandlesPanelVisibility } from "./HandlesPanelVisibility";
export { Errors } from "../util/FormValidation";
export { useLocalization } from "../composables/useLocalization";
export { useResourceInformation } from "../composables/useResourceInformation";
export { default as CopiesToClipboard, useCopyValueToClipboard } from "./CopiesToClipboard";
22 changes: 16 additions & 6 deletions dist/nova.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @typedef {Object<string, any>} AppConfig
* @typedef {import('./util/FormValidation').Form} Form
* @typedef {(app: VueApp, store: VueStore) => void} BootingCallback
* @typedef {(app: VueApp, store: VueStore) => void} BootedCallback
*/
export default class Nova {
/**
Expand All @@ -19,6 +20,11 @@ export default class Nova {
* @type {Array<BootingCallback>}
*/
protected bootingCallbacks: Array<BootingCallback>;
/**
* @protected
* @type {Array<BootedCallback>}
*/
protected bootedCallbacks: Array<BootedCallback>;
/** @readonly */
readonly appConfig: {
[x: string]: any;
Expand Down Expand Up @@ -52,23 +58,26 @@ export default class Nova {
/** @private */
private __liftOff;
/**
* Register a callback to be called before Nova starts. This is used to bootstrap
* Register booting callback to be called before Nova starts. This is used to bootstrap
* addons, tools, custom fields, or anything else Nova needs
*
* @param {BootingCallback} callback
*/
booting(callback: BootingCallback): void;
/**
* Register booted callback to be called before Nova starts. This is used to bootstrap
* addons, tools, custom fields, or anything else Nova needs
*
* @param {BootedCallback} callback
*/
booted(callback: BootedCallback): void;
/**
* Execute all of the booting callbacks.
*/
boot(): void;
/** @type {VueStore} */
store: VueStore;
/**
* @param {BootingCallback} callback
*/
booted(callback: BootingCallback): void;
countdown(): Promise<void>;
countdown(): void;
/** @protected */
protected mountTo: Element;
/**
Expand Down Expand Up @@ -274,3 +283,4 @@ export type AppConfig = {
};
export type Form = import("./util/FormValidation").Form;
export type BootingCallback = (app: VueApp, store: VueStore) => void;
export type BootedCallback = (app: VueApp, store: VueStore) => void;
Loading

0 comments on commit 9092d66

Please sign in to comment.