Skip to content

Commit 9092d66

Browse files
authored
Support Laravel Nova 5.2.0 (#27)
* 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]>
1 parent 9b21918 commit 9092d66

File tree

7 files changed

+152
-109
lines changed

7 files changed

+152
-109
lines changed

composer.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,15 @@
1313
},
1414
"require-dev": {
1515
"larastan/larastan": "^2.4",
16-
"laravel/nova": "^5.0",
16+
"laravel/nova": "^5.2",
1717
"laravel/pint": "^1.17",
1818
"orchestra/pest-plugin-testbench": "^2.0|^3.0",
1919
"orchestra/testbench": "^8.30|^9.8",
2020
"phpstan/phpstan": "^1.12",
2121
"spatie/laravel-ray": "^1.39"
2222
},
2323
"conflict": {
24-
"laravel/nova": "<5.1.6 || >=6.0.0"
24+
"laravel/nova": "<5.2.0 || >=6.0.0"
2525
},
2626
"autoload": {
2727
"psr-4": {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
export function useResourceInformation(): {
2+
resourceInformation: (resourceName: any) => any;
3+
viaResourceInformation: (viaRelation: any) => any;
4+
authorizedToCreate: (resourceName: any, relationshipType?: any) => any;
5+
};

dist/mixins/InteractsWithDates.d.ts

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
declare namespace _default {
2+
namespace computed {
3+
/**
4+
* Get the user's local timezone.
5+
*
6+
* @returns {string}
7+
*/
8+
function userTimezone(): string;
9+
/**
10+
* Determine if the user is used to 12 hour time.
11+
*
12+
* @returns {boolean}
13+
*/
14+
function usesTwelveHourTime(): boolean;
15+
}
16+
}
17+
export default _default;

dist/mixins/packages.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export { default as DependentFormField } from "./DependentFormField";
66
export { default as HandlesFormRequest } from "./HandlesFormRequest";
77
export { default as HandlesUploads } from "./HandlesUploads";
88
export { default as InteractsWithResourceInformation } from "./InteractsWithResourceInformation";
9+
export { default as InteractsWithDates } from "./InteractsWithDates";
910
export { default as Localization } from "./Localization";
1011
export { default as MetricBehavior } from "./MetricBehavior";
1112
export { default as FieldValue } from "./FieldValue";
@@ -18,4 +19,5 @@ export { default as HasCards } from "./HasCards";
1819
export { default as HandlesPanelVisibility } from "./HandlesPanelVisibility";
1920
export { Errors } from "../util/FormValidation";
2021
export { useLocalization } from "../composables/useLocalization";
22+
export { useResourceInformation } from "../composables/useResourceInformation";
2123
export { default as CopiesToClipboard, useCopyValueToClipboard } from "./CopiesToClipboard";

dist/nova.d.ts

+16-6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* @typedef {Object<string, any>} AppConfig
99
* @typedef {import('./util/FormValidation').Form} Form
1010
* @typedef {(app: VueApp, store: VueStore) => void} BootingCallback
11+
* @typedef {(app: VueApp, store: VueStore) => void} BootedCallback
1112
*/
1213
export default class Nova {
1314
/**
@@ -19,6 +20,11 @@ export default class Nova {
1920
* @type {Array<BootingCallback>}
2021
*/
2122
protected bootingCallbacks: Array<BootingCallback>;
23+
/**
24+
* @protected
25+
* @type {Array<BootedCallback>}
26+
*/
27+
protected bootedCallbacks: Array<BootedCallback>;
2228
/** @readonly */
2329
readonly appConfig: {
2430
[x: string]: any;
@@ -52,23 +58,26 @@ export default class Nova {
5258
/** @private */
5359
private __liftOff;
5460
/**
55-
* Register a callback to be called before Nova starts. This is used to bootstrap
61+
* Register booting callback to be called before Nova starts. This is used to bootstrap
5662
* addons, tools, custom fields, or anything else Nova needs
5763
*
5864
* @param {BootingCallback} callback
5965
*/
6066
booting(callback: BootingCallback): void;
67+
/**
68+
* Register booted callback to be called before Nova starts. This is used to bootstrap
69+
* addons, tools, custom fields, or anything else Nova needs
70+
*
71+
* @param {BootedCallback} callback
72+
*/
73+
booted(callback: BootedCallback): void;
6174
/**
6275
* Execute all of the booting callbacks.
6376
*/
6477
boot(): void;
6578
/** @type {VueStore} */
6679
store: VueStore;
67-
/**
68-
* @param {BootingCallback} callback
69-
*/
70-
booted(callback: BootingCallback): void;
71-
countdown(): Promise<void>;
80+
countdown(): void;
7281
/** @protected */
7382
protected mountTo: Element;
7483
/**
@@ -274,3 +283,4 @@ export type AppConfig = {
274283
};
275284
export type Form = import("./util/FormValidation").Form;
276285
export type BootingCallback = (app: VueApp, store: VueStore) => void;
286+
export type BootedCallback = (app: VueApp, store: VueStore) => void;

0 commit comments

Comments
 (0)