-
Notifications
You must be signed in to change notification settings - Fork 255
refactor!: tree shaking by adding subpath exports #445
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
Merged
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
2bfe5b0
refactor: tree shaking by adding subpath exports
RitvikSardana 1bc0aa0
chore: code cleanup
RitvikSardana 69f2de9
fix: export stylesheet properly
RitvikSardana 172d6f5
chore: restore tab component export
RitvikSardana e9c6497
fix: remove internal files from package exports
RitvikSardana e195e1b
fix: add module for frappe folder
RitvikSardana 3cc75e3
fix: add base-config for TS
RitvikSardana 77afef8
fix: move charts back to root barrel file
RitvikSardana 062219b
chore: move icons
RitvikSardana 7964824
chore: code cleanup
RitvikSardana cdca248
chore: code cleanup
RitvikSardana 2d6ee99
chore: code cleanup
RitvikSardana 63e079d
fix: handle more icons
RitvikSardana 310d590
chore: export remaining components
RitvikSardana File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // Since the export is via JS file, we need to declare the module here | ||
| declare module 'frappe-ui/frappe' { | ||
| import type { Component, ComputedRef, Ref } from 'vue' | ||
|
|
||
| // Onboarding | ||
| export interface OnboardingStep { | ||
| name: string | ||
| completed: boolean | ||
| [key: string]: any | ||
| } | ||
|
|
||
| export function useOnboarding(appName: string): | ||
| | { | ||
| steps: OnboardingStep[] | ||
| stepsCompleted: ComputedRef<number> | ||
| totalSteps: ComputedRef<number> | ||
| completedPercentage: ComputedRef<number> | ||
| isOnboardingStepsCompleted: Ref<boolean> | ||
| updateOnboardingStep: ( | ||
| step: string, | ||
| value?: boolean, | ||
| skipped?: boolean, | ||
| callback?: ((step: string, skipped: boolean) => void) | null, | ||
| ) => void | ||
| skip: ( | ||
| step: string, | ||
| callback?: ((step: string, skipped: boolean) => void) | null, | ||
| ) => void | ||
| skipAll: (callback?: ((value: boolean) => void) | null) => void | ||
| reset: ( | ||
| step: string, | ||
| callback?: ((step: string, skipped: boolean) => void) | null, | ||
| ) => void | ||
| resetAll: (callback?: ((value: boolean) => void) | null) => void | ||
| setUp: (steps: OnboardingStep[]) => void | ||
| syncStatus: () => void | ||
| } | ||
| | undefined | ||
|
|
||
| // Help Modal | ||
| export const showHelpModal: Ref<boolean> | ||
| export const minimize: Ref<boolean> | ||
| export const HelpModal: Component | ||
|
|
||
| // Banners | ||
| export const GettingStartedBanner: Component | ||
| export const TrialBanner: Component | ||
| export const IntermediateStepModal: Component | ||
|
|
||
| // Components | ||
| export const Link: Component | ||
| export type { LinkProps } from './Link/types' | ||
| } |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export { default as CircleCheckIcon } from './CircleCheckIcon.vue' | ||
| export { default as DownSolidIcon } from './DownSolidIcon.vue' | ||
| export { default as GreenCheckIcon } from './GreenCheckIcon.vue' | ||
|
|
||
| // Frappe Icons | ||
| export { default as HelpIcon } from './HelpIcon.vue' | ||
| export { default as LightningIcon } from './LightningIcon.vue' | ||
| export { default as MaximizeIcon } from './MaximizeIcon.vue' | ||
| export { default as MinimizeIcon } from './MinimizeIcon.vue' | ||
| export { default as StepsIcon } from './StepsIcon.vue' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| export { default as DatePicker } from './DatePicker.vue' | ||
| export { default as DateRangePicker } from './DateRangePicker.vue' | ||
| export { default as DateTimePicker } from './DateTimePicker.vue' | ||
| export * from './types' | ||
| export { useDatePicker } from './useDatePicker' | ||
| export * from './utils' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,5 @@ | ||
| export { default as Sidebar } from './Sidebar.vue' | ||
| export { default as SidebarHeader } from './SidebarHeader.vue' | ||
| export { default as SidebarItem } from './SidebarItem.vue' | ||
| export { default as SidebarSection } from './SidebarSection.vue' | ||
| export type { SidebarProps } from './types' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,8 @@ | ||
| export * from './useCall/types' | ||
| export { useCall } from './useCall/useCall' | ||
| export { useList } from './useList/useList' | ||
| export { useDoc } from './useDoc/useDoc' | ||
| export { useDoctype } from './useDoctype/useDoctype' | ||
| export { useNewDoc } from './useNewDoc/useNewDoc' | ||
| export { useFrappeFetch } from './useFrappeFetch' | ||
| export * from './useList/types' | ||
| export { useList } from './useList/useList' | ||
| export { useNewDoc } from './useNewDoc/useNewDoc' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,9 @@ | ||
| export { createResource, getCachedResource } from './resources' | ||
| export { | ||
| createDocumentResource, | ||
| getCachedDocumentResource, | ||
| } from './documentResource' | ||
| export { createListResource, getCachedListResource } from './listResource' | ||
| export * from './local' | ||
| export { default as resourcesPlugin } from './plugin' | ||
| export * from './realtime' | ||
| export { createResource, getCachedResource } from './resources' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| import { Socket } from 'socket.io-client' | ||
|
|
||
| export function onDocUpdate( | ||
| socket: Socket, | ||
| doctype: string, | ||
| callback: (name: string) => void, | ||
| ): void { | ||
| subscribe(socket, doctype) | ||
| socket.on('list_update', (data) => { | ||
| if (data.doctype == doctype) { | ||
| callback(data.name) | ||
| } | ||
| }) | ||
| } | ||
|
|
||
| let subscribed: Record<string, boolean> = {} | ||
| function subscribe(socket: Socket, doctype: string): void { | ||
| if (subscribed[doctype]) return | ||
| socket.emit('doctype_subscribe', doctype) | ||
| subscribed[doctype] = true | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| { | ||
| "compilerOptions": { | ||
| "target": "ESNext", | ||
| "useDefineForClassFields": true, | ||
| "module": "ESNext", | ||
| "moduleResolution": "bundler", | ||
| "allowImportingTsExtensions": true, | ||
| "strict": true, | ||
| "jsx": "preserve", | ||
| "resolveJsonModule": true, | ||
| "isolatedModules": true, | ||
| "esModuleInterop": true, | ||
| "lib": ["ESNext", "DOM"], | ||
| "skipLibCheck": true, | ||
| "noEmit": true, | ||
| "types": ["vitest/globals", "unplugin-icons/types/vue"], | ||
| "baseUrl": ".", | ||
| "paths": { | ||
| "@/*": ["src/*"] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.