init component
This commit is contained in:
4
node_modules/buetify/lib/components/notices/index.d.ts
generated
vendored
Executable file
4
node_modules/buetify/lib/components/notices/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
export * from './notification';
|
||||
export * from './snackbar';
|
||||
export * from './toast';
|
||||
export * from './noticeContainer';
|
||||
5
node_modules/buetify/lib/components/notices/index.js
generated
vendored
Executable file
5
node_modules/buetify/lib/components/notices/index.js
generated
vendored
Executable file
@@ -0,0 +1,5 @@
|
||||
export * from './notification';
|
||||
export * from './snackbar';
|
||||
export * from './toast';
|
||||
export * from './noticeContainer';
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/buetify/lib/components/notices/index.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../src/components/notices/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAd;AACA,cAAc,YAAd;AACA,cAAc,SAAd;AACA,cAAc,mBAAd","sourcesContent":["export * from './notification';\nexport * from './snackbar';\nexport * from './toast';\nexport * from './noticeContainer';\n"],"sourceRoot":"","file":"index.js"}
|
||||
36
node_modules/buetify/lib/components/notices/noticeContainer/BNoticeContainer.d.ts
generated
vendored
Executable file
36
node_modules/buetify/lib/components/notices/noticeContainer/BNoticeContainer.d.ts
generated
vendored
Executable file
@@ -0,0 +1,36 @@
|
||||
import { IO } from 'fp-ts/lib/IO';
|
||||
import { VNode } from 'vue';
|
||||
import { Transition, TransitionClasses } from '../../../types/Transition';
|
||||
export interface NoticeOptions {
|
||||
render: IO<VNode[]>;
|
||||
duration: number;
|
||||
shouldQueue: boolean;
|
||||
transition: Transition;
|
||||
}
|
||||
export interface Notice {
|
||||
id: number;
|
||||
render: IO<VNode[] | undefined>;
|
||||
transition: TransitionClasses;
|
||||
onAfterLeave: IO<void>;
|
||||
}
|
||||
declare const BNoticeContainer: import("vue").DefineComponent<{}, {
|
||||
rootZ: import("vue").ComputedRef<-1 | 999>;
|
||||
showNotice: (params: NoticeOptions) => IO<void>;
|
||||
notices: {
|
||||
id: number;
|
||||
render: IO<VNode[] | undefined>;
|
||||
transition: {
|
||||
css?: boolean | undefined;
|
||||
name?: string | undefined;
|
||||
'enter-from-class'?: string | undefined;
|
||||
'enter-active-class'?: string | undefined;
|
||||
'enter-to-class'?: string | undefined;
|
||||
'leave-from-class'?: string | undefined;
|
||||
'leave-active-class'?: string | undefined;
|
||||
'leave-to-class'?: string | undefined;
|
||||
};
|
||||
onAfterLeave: IO<void>;
|
||||
}[];
|
||||
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{} & {}>, {}>;
|
||||
export declare type NoticeContainer = InstanceType<typeof BNoticeContainer>;
|
||||
export default BNoticeContainer;
|
||||
84
node_modules/buetify/lib/components/notices/noticeContainer/BNoticeContainer.js
generated
vendored
Executable file
84
node_modules/buetify/lib/components/notices/noticeContainer/BNoticeContainer.js
generated
vendored
Executable file
@@ -0,0 +1,84 @@
|
||||
import { constVoid } from 'fp-ts/lib/function';
|
||||
import { formatTransition } from '../../../composables/transition';
|
||||
import { defineComponent, h, Transition as transition, computed, reactive, nextTick } from 'vue';
|
||||
import { constEmptyArray } from '../../../utils/helpers';
|
||||
let id = 0;
|
||||
|
||||
function generateNotice(notice) {
|
||||
return h(transition, {
|
||||
key: notice.id,
|
||||
...notice.transition,
|
||||
onAfterLeague: notice.onAfterLeave
|
||||
}, notice.render);
|
||||
}
|
||||
|
||||
const BNoticeContainer = defineComponent({
|
||||
name: 'b-notice-container',
|
||||
|
||||
setup() {
|
||||
const notices = reactive([]);
|
||||
const rootZ = computed(() => notices.length ? 999 : -1);
|
||||
|
||||
function addNotice(options) {
|
||||
const nId = id++;
|
||||
|
||||
function remove() {
|
||||
const index = notices.findIndex(n => n.id === nId);
|
||||
|
||||
if (index > -1) {
|
||||
notices.splice(index, 1);
|
||||
}
|
||||
}
|
||||
|
||||
const newNotice = reactive({
|
||||
id: nId,
|
||||
render: constEmptyArray,
|
||||
transition: formatTransition(options.transition),
|
||||
onAfterLeave: remove
|
||||
});
|
||||
notices.push(newNotice);
|
||||
nextTick().then(() => {
|
||||
newNotice.render = options.render;
|
||||
});
|
||||
return remove;
|
||||
}
|
||||
|
||||
function showNotice(params) {
|
||||
if (params.shouldQueue && notices.length > 0) {
|
||||
let remove = constVoid;
|
||||
setTimeout(() => {
|
||||
remove = showNotice(params);
|
||||
}, 250);
|
||||
return () => {
|
||||
remove();
|
||||
};
|
||||
}
|
||||
|
||||
const removeNotice = addNotice(params);
|
||||
|
||||
if (params.duration === 0) {
|
||||
return removeNotice;
|
||||
} else {
|
||||
setTimeout(removeNotice, params.duration);
|
||||
return removeNotice;
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
rootZ,
|
||||
showNotice,
|
||||
notices
|
||||
};
|
||||
},
|
||||
|
||||
render() {
|
||||
return h('div', {
|
||||
style: {
|
||||
'z-index': this.rootZ
|
||||
}
|
||||
}, this.notices.map(generateNotice));
|
||||
}
|
||||
|
||||
});
|
||||
export default BNoticeContainer;
|
||||
//# sourceMappingURL=BNoticeContainer.js.map
|
||||
1
node_modules/buetify/lib/components/notices/noticeContainer/BNoticeContainer.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/noticeContainer/BNoticeContainer.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/notices/noticeContainer/BNoticeContainer.ts"],"names":[],"mappings":"AAAA,SAAS,SAAT,QAA0B,oBAA1B;AAGA,SAAS,gBAAT,QAAiC,iCAAjC;AAEA,SAAS,eAAT,EAA0B,CAA1B,EAA6B,UAAU,IAAI,UAA3C,EAAuD,QAAvD,EAAiE,QAAjE,EAA2E,QAA3E,QAA2F,KAA3F;AACA,SAAS,eAAT,QAAgC,wBAAhC;AAgBA,IAAI,EAAE,GAAG,CAAT;;AAEA,SAAS,cAAT,CAAwB,MAAxB,EAAsC;AACpC,SAAO,CAAC,CAAC,UAAD,EAAa;AAAE,IAAA,GAAG,EAAE,MAAM,CAAC,EAAd;AAAkB,OAAG,MAAM,CAAC,UAA5B;AAAwC,IAAA,aAAa,EAAE,MAAM,CAAC;AAA9D,GAAb,EAA2F,MAAM,CAAC,MAAlG,CAAR;AACD;;AAED,MAAM,gBAAgB,GAAG,eAAe,CAAC;AACvC,EAAA,IAAI,EAAE,oBADiC;;AAEvC,EAAA,KAAK,GAAA;AACH,UAAM,OAAO,GAAG,QAAQ,CAAC,EAAD,CAAxB;AAEA,UAAM,KAAK,GAAG,QAAQ,CAAC,MAAO,OAAO,CAAC,MAAR,GAAiB,GAAjB,GAAuB,CAAC,CAAhC,CAAtB;;AAEA,aAAS,SAAT,CAAmB,OAAnB,EAAyC;AACvC,YAAM,GAAG,GAAG,EAAE,EAAd;;AACA,eAAS,MAAT,GAAe;AACb,cAAM,KAAK,GAAG,OAAO,CAAC,SAAR,CAAkB,CAAC,IAAI,CAAC,CAAC,EAAF,KAAS,GAAhC,CAAd;;AACA,YAAI,KAAK,GAAG,CAAC,CAAb,EAAgB;AACd,UAAA,OAAO,CAAC,MAAR,CAAe,KAAf,EAAsB,CAAtB;AACD;AACF;;AACD,YAAM,SAAS,GAAW,QAAQ,CAAC;AACjC,QAAA,EAAE,EAAE,GAD6B;AAEjC,QAAA,MAAM,EAAE,eAFyB;AAGjC,QAAA,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,UAAT,CAHK;AAIjC,QAAA,YAAY,EAAE;AAJmB,OAAD,CAAlC;AAMA,MAAA,OAAO,CAAC,IAAR,CAAa,SAAb;AACA,MAAA,QAAQ,GAAG,IAAX,CAAgB,MAAK;AACnB,QAAA,SAAS,CAAC,MAAV,GAAmB,OAAO,CAAC,MAA3B;AACD,OAFD;AAGA,aAAO,MAAP;AACD;;AAED,aAAS,UAAT,CAAoB,MAApB,EAAyC;AACvC,UAAI,MAAM,CAAC,WAAP,IAAsB,OAAO,CAAC,MAAR,GAAiB,CAA3C,EAA8C;AAC5C,YAAI,MAAM,GAAG,SAAb;AACA,QAAA,UAAU,CAAC,MAAK;AACd,UAAA,MAAM,GAAG,UAAU,CAAC,MAAD,CAAnB;AACD,SAFS,EAEP,GAFO,CAAV;AAGA,eAAO,MAAK;AACV,UAAA,MAAM;AACP,SAFD;AAGD;;AACD,YAAM,YAAY,GAAG,SAAS,CAAC,MAAD,CAA9B;;AACA,UAAI,MAAM,CAAC,QAAP,KAAoB,CAAxB,EAA2B;AACzB,eAAO,YAAP;AACD,OAFD,MAEO;AACL,QAAA,UAAU,CAAC,YAAD,EAAe,MAAM,CAAC,QAAtB,CAAV;AACA,eAAO,YAAP;AACD;AACF;;AAED,WAAO;AACL,MAAA,KADK;AAEL,MAAA,UAFK;AAGL,MAAA;AAHK,KAAP;AAKD,GApDsC;;AAqDvC,EAAA,MAAM,GAAA;AACJ,WAAO,CAAC,CAAC,KAAD,EAAQ;AAAE,MAAA,KAAK,EAAE;AAAE,mBAAW,KAAK;AAAlB;AAAT,KAAR,EAA8C,KAAK,OAAL,CAAa,GAAb,CAAiB,cAAjB,CAA9C,CAAR;AACD;;AAvDsC,CAAD,CAAxC;AA4DA,eAAe,gBAAf","sourcesContent":["import { constVoid } from 'fp-ts/lib/function';\nimport { IO } from 'fp-ts/lib/IO';\nimport { VNode } from 'vue';\nimport { formatTransition } from '../../../composables/transition';\nimport { Transition, TransitionClasses } from '../../../types/Transition';\nimport { defineComponent, h, Transition as transition, computed, reactive, nextTick } from 'vue';\nimport { constEmptyArray } from '../../../utils/helpers';\n\nexport interface NoticeOptions {\n render: IO<VNode[]>;\n duration: number;\n shouldQueue: boolean;\n transition: Transition;\n}\n\nexport interface Notice {\n id: number;\n render: IO<VNode[] | undefined>;\n transition: TransitionClasses;\n onAfterLeave: IO<void>;\n}\n\nlet id = 0;\n\nfunction generateNotice(notice: Notice): VNode {\n return h(transition, { key: notice.id, ...notice.transition, onAfterLeague: notice.onAfterLeave }, notice.render);\n}\n\nconst BNoticeContainer = defineComponent({\n name: 'b-notice-container',\n setup() {\n const notices = reactive([] as Notice[]);\n\n const rootZ = computed(() => (notices.length ? 999 : -1));\n\n function addNotice(options: NoticeOptions): IO<void> {\n const nId = id++;\n function remove() {\n const index = notices.findIndex(n => n.id === nId);\n if (index > -1) {\n notices.splice(index, 1);\n }\n }\n const newNotice: Notice = reactive({\n id: nId,\n render: constEmptyArray,\n transition: formatTransition(options.transition),\n onAfterLeave: remove\n });\n notices.push(newNotice);\n nextTick().then(() => {\n newNotice.render = options.render;\n });\n return remove;\n }\n\n function showNotice(params: NoticeOptions): IO<void> {\n if (params.shouldQueue && notices.length > 0) {\n let remove = constVoid;\n setTimeout(() => {\n remove = showNotice(params);\n }, 250);\n return () => {\n remove();\n };\n }\n const removeNotice = addNotice(params);\n if (params.duration === 0) {\n return removeNotice;\n } else {\n setTimeout(removeNotice, params.duration);\n return removeNotice;\n }\n }\n\n return {\n rootZ,\n showNotice,\n notices\n };\n },\n render() {\n return h('div', { style: { 'z-index': this.rootZ } }, this.notices.map(generateNotice));\n }\n});\n\nexport type NoticeContainer = InstanceType<typeof BNoticeContainer>;\n\nexport default BNoticeContainer;\n"],"sourceRoot":"","file":"BNoticeContainer.js"}
|
||||
3
node_modules/buetify/lib/components/notices/noticeContainer/index.d.ts
generated
vendored
Executable file
3
node_modules/buetify/lib/components/notices/noticeContainer/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
import BNoticeContainer from './BNoticeContainer';
|
||||
export { BNoticeContainer };
|
||||
export default BNoticeContainer;
|
||||
4
node_modules/buetify/lib/components/notices/noticeContainer/index.js
generated
vendored
Executable file
4
node_modules/buetify/lib/components/notices/noticeContainer/index.js
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
import BNoticeContainer from './BNoticeContainer';
|
||||
export { BNoticeContainer };
|
||||
export default BNoticeContainer;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/buetify/lib/components/notices/noticeContainer/index.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/noticeContainer/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/notices/noticeContainer/index.ts"],"names":[],"mappings":"AAAA,OAAO,gBAAP,MAA6B,oBAA7B;AAEA,SAAS,gBAAT;AAEA,eAAe,gBAAf","sourcesContent":["import BNoticeContainer from './BNoticeContainer';\n\nexport { BNoticeContainer };\n\nexport default BNoticeContainer;\n"],"sourceRoot":"","file":"index.js"}
|
||||
215
node_modules/buetify/lib/components/notices/notification/BNotification.d.ts
generated
vendored
Executable file
215
node_modules/buetify/lib/components/notices/notification/BNotification.d.ts
generated
vendored
Executable file
@@ -0,0 +1,215 @@
|
||||
import '../../../sass/helpers/animations.sass';
|
||||
import '../sass/notices.sass';
|
||||
import { FunctionN } from 'fp-ts/lib/function';
|
||||
import { IO } from 'fp-ts/lib/IO';
|
||||
import { VNode, PropType, ExtractPropTypes, ComponentOptions, FunctionalComponent } from 'vue';
|
||||
export declare const BNotificationPropsDefinition: {
|
||||
isNotice: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
icon: {
|
||||
type: PropType<FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any>>;
|
||||
};
|
||||
transition: {
|
||||
type: PropType<import("../../..").Transition>;
|
||||
required: boolean;
|
||||
};
|
||||
position: {
|
||||
type: PropType<import("../../..").PositionVariant>;
|
||||
default: "is-bottom";
|
||||
};
|
||||
duration: {
|
||||
type: PropType<number>;
|
||||
default: number;
|
||||
};
|
||||
message: {
|
||||
type: PropType<string>;
|
||||
};
|
||||
shouldQueue: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
variant: {
|
||||
type: PropType<import("../../..").ColorVariant>;
|
||||
default: "";
|
||||
};
|
||||
isIndefinite: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
title: {
|
||||
type: PropType<string>;
|
||||
};
|
||||
isClosable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
size: {
|
||||
type: PropType<import("../../..").SizeVariant>;
|
||||
default: "";
|
||||
};
|
||||
iconSize: {
|
||||
type: PropType<import("../../..").SizeVariant>;
|
||||
default: "";
|
||||
};
|
||||
useAutoClose: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
useIcon: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
icons: {
|
||||
type: PropType<Partial<import("../../../composables/message").MessageIcons>>;
|
||||
default: import("fp-ts/lib/function").Lazy<Partial<import("../../../composables/message").MessageIcons>>;
|
||||
};
|
||||
onToggle: {
|
||||
type: PropType<FunctionN<[boolean], void>>;
|
||||
required: false;
|
||||
};
|
||||
onSetOn: {
|
||||
type: PropType<IO<void>>;
|
||||
required: false;
|
||||
};
|
||||
onSetOff: {
|
||||
type: PropType<IO<void>>;
|
||||
required: false;
|
||||
};
|
||||
isActive: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
hasPopup: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
};
|
||||
export declare type BNotificationProps = ExtractPropTypes<typeof BNotificationPropsDefinition>;
|
||||
declare const _default: import("vue").DefineComponent<{
|
||||
isNotice: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
icon: {
|
||||
type: PropType<FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any>>;
|
||||
};
|
||||
transition: {
|
||||
type: PropType<import("../../..").Transition>;
|
||||
required: boolean;
|
||||
};
|
||||
position: {
|
||||
type: PropType<import("../../..").PositionVariant>;
|
||||
default: "is-bottom";
|
||||
};
|
||||
duration: {
|
||||
type: PropType<number>;
|
||||
default: number;
|
||||
};
|
||||
message: {
|
||||
type: PropType<string>;
|
||||
};
|
||||
shouldQueue: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
variant: {
|
||||
type: PropType<import("../../..").ColorVariant>;
|
||||
default: "";
|
||||
};
|
||||
isIndefinite: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
title: {
|
||||
type: PropType<string>;
|
||||
};
|
||||
isClosable: {
|
||||
type: BooleanConstructor;
|
||||
default: boolean;
|
||||
};
|
||||
size: {
|
||||
type: PropType<import("../../..").SizeVariant>;
|
||||
default: "";
|
||||
};
|
||||
iconSize: {
|
||||
type: PropType<import("../../..").SizeVariant>;
|
||||
default: "";
|
||||
};
|
||||
useAutoClose: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
useIcon: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
icons: {
|
||||
type: PropType<Partial<import("../../../composables/message").MessageIcons>>;
|
||||
default: import("fp-ts/lib/function").Lazy<Partial<import("../../../composables/message").MessageIcons>>;
|
||||
};
|
||||
onToggle: {
|
||||
type: PropType<FunctionN<[boolean], void>>;
|
||||
required: false;
|
||||
};
|
||||
onSetOn: {
|
||||
type: PropType<IO<void>>;
|
||||
required: false;
|
||||
};
|
||||
onSetOff: {
|
||||
type: PropType<IO<void>>;
|
||||
required: false;
|
||||
};
|
||||
isActive: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
hasPopup: {
|
||||
type: PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
}, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}> | VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
||||
hasPopup: boolean;
|
||||
variant: import("../../..").ColorVariant;
|
||||
size: import("../../..").SizeVariant;
|
||||
icons: Partial<import("../../../composables/message").MessageIcons>;
|
||||
duration: number;
|
||||
position: import("../../..").PositionVariant;
|
||||
shouldQueue: boolean;
|
||||
isIndefinite: boolean;
|
||||
isActive: boolean;
|
||||
isClosable: boolean;
|
||||
iconSize: import("../../..").SizeVariant;
|
||||
useAutoClose: boolean;
|
||||
useIcon: boolean;
|
||||
isNotice: boolean;
|
||||
} & {
|
||||
onToggle?: FunctionN<[boolean], void> | undefined;
|
||||
onSetOn?: IO<void> | undefined;
|
||||
onSetOff?: IO<void> | undefined;
|
||||
transition?: string | import("../../..").TransitionClasses | undefined;
|
||||
icon?: FunctionalComponent<{}, {}> | ComponentOptions<{}, any, any, any, any, any, any, any> | undefined;
|
||||
title?: string | undefined;
|
||||
message?: string | undefined;
|
||||
}>, {
|
||||
hasPopup: boolean;
|
||||
variant: import("../../..").ColorVariant;
|
||||
size: import("../../..").SizeVariant;
|
||||
icons: Partial<import("../../../composables/message").MessageIcons>;
|
||||
duration: number;
|
||||
position: import("../../..").PositionVariant;
|
||||
shouldQueue: boolean;
|
||||
isIndefinite: boolean;
|
||||
isActive: boolean;
|
||||
isClosable: boolean;
|
||||
iconSize: import("../../..").SizeVariant;
|
||||
useAutoClose: boolean;
|
||||
useIcon: boolean;
|
||||
isNotice: boolean;
|
||||
}>;
|
||||
export default _default;
|
||||
73
node_modules/buetify/lib/components/notices/notification/BNotification.js
generated
vendored
Executable file
73
node_modules/buetify/lib/components/notices/notification/BNotification.js
generated
vendored
Executable file
@@ -0,0 +1,73 @@
|
||||
import "../../../../src/sass/helpers/animations.sass";
|
||||
import "../../../../src/components/notices/sass/notices.sass";
|
||||
import { constant } from 'fp-ts/lib/function';
|
||||
import { useMessage, UseMessagePropsDefinition } from '../../../composables/message';
|
||||
import { useNoticeController, UseNoticePropsDefinition } from '../../../composables/noticeController';
|
||||
import { formatTransition } from '../../../composables/transition';
|
||||
import { Transition, h, defineComponent, shallowRef, withDirectives, vShow } from 'vue';
|
||||
import { constEmptyArray } from '../../../utils/helpers';
|
||||
export const BNotificationPropsDefinition = { ...UseMessagePropsDefinition,
|
||||
...UseNoticePropsDefinition,
|
||||
isNotice: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
icon: {
|
||||
type: [Object, Function]
|
||||
}
|
||||
};
|
||||
|
||||
function generateCloseButton(props, messageController, noticeController) {
|
||||
return h('button', {
|
||||
class: 'delete',
|
||||
onClick: props.isNotice ? noticeController.close : messageController.setOff
|
||||
});
|
||||
}
|
||||
|
||||
function generateIcon(messageController) {
|
||||
const icon = messageController.icon.value;
|
||||
return icon ? h('div', {
|
||||
class: 'media-left'
|
||||
}, [h(icon, {
|
||||
size: messageController.iconSize.value
|
||||
})]) : undefined;
|
||||
}
|
||||
|
||||
function generateNoticeContent(context, message) {
|
||||
return h('div', {
|
||||
class: 'media-content'
|
||||
}, context.slots.default && context.slots.default() || h('p', message));
|
||||
}
|
||||
|
||||
function generateNoticeBody(props, context, messageController, noticeController, message) {
|
||||
return h('div', {
|
||||
class: 'media'
|
||||
}, props.useIcon && messageController.icon.value ? [generateIcon(messageController), generateNoticeContent(context, message)] : [generateNoticeContent(context, message)]);
|
||||
}
|
||||
|
||||
function getGenerateNotice(props, context, messageController, noticeController) {
|
||||
return options => () => {
|
||||
const notice = h('article', {
|
||||
class: ['notification', options.variant ?? props.variant, options.position ?? props.position]
|
||||
}, props.isClosable ? [generateCloseButton(props, messageController, noticeController), generateNoticeBody(props, context, messageController, noticeController, options.message ?? props.message)] : [generateNoticeBody(props, context, messageController, noticeController, options.message ?? props.message)]);
|
||||
return props.isNotice ? [notice] : [withDirectives(notice, [[vShow, messageController.isOn.value]])];
|
||||
};
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
name: 'b-notification',
|
||||
props: BNotificationPropsDefinition,
|
||||
|
||||
setup(props, context) {
|
||||
const renderNotification = shallowRef(constant(constEmptyArray));
|
||||
const noticeController = useNoticeController(props, renderNotification);
|
||||
const messageController = useMessage(props);
|
||||
renderNotification.value = getGenerateNotice(props, context, messageController, noticeController);
|
||||
return () => props.isNotice ? context.slots.trigger && context.slots.trigger({
|
||||
open: noticeController.open,
|
||||
close: noticeController.close
|
||||
}) : h(Transition, props.transition ? formatTransition(props.transition) : {}, renderNotification.value({}));
|
||||
}
|
||||
|
||||
});
|
||||
//# sourceMappingURL=BNotification.js.map
|
||||
1
node_modules/buetify/lib/components/notices/notification/BNotification.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/notification/BNotification.js.map
generated
vendored
Executable file
File diff suppressed because one or more lines are too long
3
node_modules/buetify/lib/components/notices/notification/index.d.ts
generated
vendored
Executable file
3
node_modules/buetify/lib/components/notices/notification/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
import BNotification from './BNotification';
|
||||
export { BNotification };
|
||||
export default BNotification;
|
||||
4
node_modules/buetify/lib/components/notices/notification/index.js
generated
vendored
Executable file
4
node_modules/buetify/lib/components/notices/notification/index.js
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
import BNotification from './BNotification';
|
||||
export { BNotification };
|
||||
export default BNotification;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/buetify/lib/components/notices/notification/index.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/notification/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/notices/notification/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAP,MAA0B,iBAA1B;AAEA,SAAS,aAAT;AAEA,eAAe,aAAf","sourcesContent":["import BNotification from './BNotification';\n\nexport { BNotification };\n\nexport default BNotification;\n"],"sourceRoot":"","file":"index.js"}
|
||||
61
node_modules/buetify/lib/components/notices/snackbar/BSnackbar.d.ts
generated
vendored
Executable file
61
node_modules/buetify/lib/components/notices/snackbar/BSnackbar.d.ts
generated
vendored
Executable file
@@ -0,0 +1,61 @@
|
||||
import '../../../sass/helpers/animations.sass';
|
||||
import '../sass/notices.sass';
|
||||
declare const _default: import("vue").DefineComponent<{
|
||||
position: {
|
||||
type: import("vue").PropType<import("../../..").PositionVariant>;
|
||||
default: "is-bottom-right";
|
||||
};
|
||||
actionText: {
|
||||
type: import("vue").PropType<string>;
|
||||
default: string;
|
||||
};
|
||||
onAction: {
|
||||
type: import("vue").PropType<import("fp-ts/lib/IO").IO<void>>;
|
||||
default: import("fp-ts/lib/function").Lazy<() => void>;
|
||||
};
|
||||
variant: {
|
||||
type: import("vue").PropType<import("../../..").ColorVariant>;
|
||||
default: "is-success";
|
||||
};
|
||||
transition: {
|
||||
type: import("vue").PropType<import("../../..").Transition>;
|
||||
required: boolean;
|
||||
};
|
||||
duration: {
|
||||
type: import("vue").PropType<number>;
|
||||
default: number;
|
||||
};
|
||||
message: {
|
||||
type: import("vue").PropType<string>;
|
||||
};
|
||||
shouldQueue: {
|
||||
type: import("vue").PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
isIndefinite: {
|
||||
type: import("vue").PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
||||
variant: import("../../..").ColorVariant;
|
||||
duration: number;
|
||||
position: import("../../..").PositionVariant;
|
||||
shouldQueue: boolean;
|
||||
isIndefinite: boolean;
|
||||
actionText: string;
|
||||
onAction: import("fp-ts/lib/IO").IO<void>;
|
||||
} & {
|
||||
transition?: string | import("../../..").TransitionClasses | undefined;
|
||||
message?: string | undefined;
|
||||
}>, {
|
||||
variant: import("../../..").ColorVariant;
|
||||
duration: number;
|
||||
position: import("../../..").PositionVariant;
|
||||
shouldQueue: boolean;
|
||||
isIndefinite: boolean;
|
||||
actionText: string;
|
||||
onAction: import("fp-ts/lib/IO").IO<void>;
|
||||
}>;
|
||||
export default _default;
|
||||
17
node_modules/buetify/lib/components/notices/snackbar/BSnackbar.js
generated
vendored
Executable file
17
node_modules/buetify/lib/components/notices/snackbar/BSnackbar.js
generated
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
import "../../../../src/sass/helpers/animations.sass";
|
||||
import "../../../../src/components/notices/sass/notices.sass";
|
||||
import { defineComponent } from 'vue';
|
||||
import { SnackbarPropsDefinition, useSnackbar } from '../../../composables/snackbar';
|
||||
export default defineComponent({
|
||||
name: 'b-snackbar',
|
||||
props: SnackbarPropsDefinition,
|
||||
|
||||
setup(props, {
|
||||
slots
|
||||
}) {
|
||||
const controller = useSnackbar(props, slots);
|
||||
return () => slots.default && slots.default(controller);
|
||||
}
|
||||
|
||||
});
|
||||
//# sourceMappingURL=BSnackbar.js.map
|
||||
1
node_modules/buetify/lib/components/notices/snackbar/BSnackbar.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/snackbar/BSnackbar.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/notices/snackbar/BSnackbar.ts"],"names":[],"mappings":"AAAA,OAAO,8CAAP;AACA,OAAO,sDAAP;AACA,SAAS,eAAT,QAAgC,KAAhC;AACA,SAAS,uBAAT,EAAkC,WAAlC,QAAqD,+BAArD;AAEA,eAAe,eAAe,CAAC;AAC7B,EAAA,IAAI,EAAE,YADuB;AAE7B,EAAA,KAAK,EAAE,uBAFsB;;AAG7B,EAAA,KAAK,CAAC,KAAD,EAAQ;AAAE,IAAA;AAAF,GAAR,EAAiB;AACpB,UAAM,UAAU,GAAG,WAAW,CAAC,KAAD,EAAQ,KAAR,CAA9B;AACA,WAAO,MAAM,KAAK,CAAC,OAAN,IAAiB,KAAK,CAAC,OAAN,CAAc,UAAd,CAA9B;AACD;;AAN4B,CAAD,CAA9B","sourcesContent":["import '../../../sass/helpers/animations.sass';\nimport '../sass/notices.sass';\nimport { defineComponent } from 'vue';\nimport { SnackbarPropsDefinition, useSnackbar } from '../../../composables/snackbar';\n\nexport default defineComponent({\n name: 'b-snackbar',\n props: SnackbarPropsDefinition,\n setup(props, { slots }) {\n const controller = useSnackbar(props, slots);\n return () => slots.default && slots.default(controller);\n }\n});\n"],"sourceRoot":"","file":"BSnackbar.js"}
|
||||
3
node_modules/buetify/lib/components/notices/snackbar/index.d.ts
generated
vendored
Executable file
3
node_modules/buetify/lib/components/notices/snackbar/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
import BSnackbar from './BSnackbar';
|
||||
export { BSnackbar };
|
||||
export default BSnackbar;
|
||||
4
node_modules/buetify/lib/components/notices/snackbar/index.js
generated
vendored
Executable file
4
node_modules/buetify/lib/components/notices/snackbar/index.js
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
import BSnackbar from './BSnackbar';
|
||||
export { BSnackbar };
|
||||
export default BSnackbar;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/buetify/lib/components/notices/snackbar/index.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/snackbar/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/notices/snackbar/index.ts"],"names":[],"mappings":"AAAA,OAAO,SAAP,MAAsB,aAAtB;AAEA,SAAS,SAAT;AAEA,eAAe,SAAf","sourcesContent":["import BSnackbar from './BSnackbar';\n\nexport { BSnackbar };\n\nexport default BSnackbar;\n"],"sourceRoot":"","file":"index.js"}
|
||||
47
node_modules/buetify/lib/components/notices/toast/BToast.d.ts
generated
vendored
Executable file
47
node_modules/buetify/lib/components/notices/toast/BToast.d.ts
generated
vendored
Executable file
@@ -0,0 +1,47 @@
|
||||
declare const _default: import("vue").DefineComponent<{
|
||||
transition: {
|
||||
type: import("vue").PropType<import("../../..").Transition>;
|
||||
required: boolean;
|
||||
};
|
||||
position: {
|
||||
type: import("vue").PropType<import("../../..").PositionVariant>;
|
||||
default: "is-bottom";
|
||||
};
|
||||
duration: {
|
||||
type: import("vue").PropType<number>;
|
||||
default: number;
|
||||
};
|
||||
message: {
|
||||
type: import("vue").PropType<string>;
|
||||
};
|
||||
shouldQueue: {
|
||||
type: import("vue").PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
variant: {
|
||||
type: import("vue").PropType<import("../../..").ColorVariant>;
|
||||
default: "";
|
||||
};
|
||||
isIndefinite: {
|
||||
type: import("vue").PropType<boolean>;
|
||||
default: boolean;
|
||||
};
|
||||
}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
||||
[key: string]: any;
|
||||
}>[] | undefined, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<{
|
||||
variant: import("../../..").ColorVariant;
|
||||
duration: number;
|
||||
position: import("../../..").PositionVariant;
|
||||
shouldQueue: boolean;
|
||||
isIndefinite: boolean;
|
||||
} & {
|
||||
transition?: string | import("../../..").TransitionClasses | undefined;
|
||||
message?: string | undefined;
|
||||
}>, {
|
||||
variant: import("../../..").ColorVariant;
|
||||
duration: number;
|
||||
position: import("../../..").PositionVariant;
|
||||
shouldQueue: boolean;
|
||||
isIndefinite: boolean;
|
||||
}>;
|
||||
export default _default;
|
||||
16
node_modules/buetify/lib/components/notices/toast/BToast.js
generated
vendored
Executable file
16
node_modules/buetify/lib/components/notices/toast/BToast.js
generated
vendored
Executable file
@@ -0,0 +1,16 @@
|
||||
import { UseNoticePropsDefinition } from '../../../composables/noticeController';
|
||||
import { defineComponent } from 'vue';
|
||||
import { useToast } from '../../../composables/toast';
|
||||
export default defineComponent({
|
||||
name: 'b-toast',
|
||||
props: UseNoticePropsDefinition,
|
||||
|
||||
setup(props, {
|
||||
slots
|
||||
}) {
|
||||
const controller = useToast(props, slots);
|
||||
return () => slots.default && slots.default(controller);
|
||||
}
|
||||
|
||||
});
|
||||
//# sourceMappingURL=BToast.js.map
|
||||
1
node_modules/buetify/lib/components/notices/toast/BToast.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/toast/BToast.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/notices/toast/BToast.ts"],"names":[],"mappings":"AAAA,SAAS,wBAAT,QAAyC,uCAAzC;AACA,SAAS,eAAT,QAAgC,KAAhC;AACA,SAAS,QAAT,QAAyB,4BAAzB;AAEA,eAAe,eAAe,CAAC;AAC7B,EAAA,IAAI,EAAE,SADuB;AAE7B,EAAA,KAAK,EAAE,wBAFsB;;AAG7B,EAAA,KAAK,CAAC,KAAD,EAAQ;AAAE,IAAA;AAAF,GAAR,EAAiB;AACpB,UAAM,UAAU,GAAG,QAAQ,CAAC,KAAD,EAAQ,KAAR,CAA3B;AACA,WAAO,MAAM,KAAK,CAAC,OAAN,IAAiB,KAAK,CAAC,OAAN,CAAc,UAAd,CAA9B;AACD;;AAN4B,CAAD,CAA9B","sourcesContent":["import { UseNoticePropsDefinition } from '../../../composables/noticeController';\nimport { defineComponent } from 'vue';\nimport { useToast } from '../../../composables/toast';\n\nexport default defineComponent({\n name: 'b-toast',\n props: UseNoticePropsDefinition,\n setup(props, { slots }) {\n const controller = useToast(props, slots);\n return () => slots.default && slots.default(controller);\n }\n});\n"],"sourceRoot":"","file":"BToast.js"}
|
||||
3
node_modules/buetify/lib/components/notices/toast/index.d.ts
generated
vendored
Executable file
3
node_modules/buetify/lib/components/notices/toast/index.d.ts
generated
vendored
Executable file
@@ -0,0 +1,3 @@
|
||||
import BToast from './BToast';
|
||||
export { BToast };
|
||||
export default BToast;
|
||||
4
node_modules/buetify/lib/components/notices/toast/index.js
generated
vendored
Executable file
4
node_modules/buetify/lib/components/notices/toast/index.js
generated
vendored
Executable file
@@ -0,0 +1,4 @@
|
||||
import BToast from './BToast';
|
||||
export { BToast };
|
||||
export default BToast;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/buetify/lib/components/notices/toast/index.js.map
generated
vendored
Executable file
1
node_modules/buetify/lib/components/notices/toast/index.js.map
generated
vendored
Executable file
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../../../src/components/notices/toast/index.ts"],"names":[],"mappings":"AAAA,OAAO,MAAP,MAAmB,UAAnB;AAEA,SAAS,MAAT;AAEA,eAAe,MAAf","sourcesContent":["import BToast from './BToast';\n\nexport { BToast };\n\nexport default BToast;\n"],"sourceRoot":"","file":"index.js"}
|
||||
Reference in New Issue
Block a user