@egjs/svelte-infinitegrid 4.10.2 → 4.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/infinitegrid.cjs.js +2 -2
- package/dist/infinitegrid.cjs.js.map +1 -1
- package/dist/infinitegrid.esm.js +2 -2
- package/dist/infinitegrid.esm.js.map +1 -1
- package/package.json +2 -2
- package/.DS_Store +0 -0
- package/.gitignore +0 -4
- package/.npmignore +0 -3
- package/CHANGELOG.md +0 -167
- package/global.d.ts +0 -8
- package/rollup.build.config.js +0 -32
- package/rollup.config.js +0 -83
- package/tsconfig.json +0 -6
package/dist/infinitegrid.cjs.js
CHANGED
|
@@ -4,7 +4,7 @@ name: @egjs/svelte-infinitegrid
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-infinitegrid
|
|
7
|
-
version: 4.
|
|
7
|
+
version: 4.11.0
|
|
8
8
|
*/
|
|
9
9
|
'use strict';
|
|
10
10
|
|
|
@@ -14,7 +14,7 @@ var infinitegrid = require('@egjs/infinitegrid');
|
|
|
14
14
|
|
|
15
15
|
const SVELTE_INFINITEGRID_PROPS = ["status", "useFirstRender", "useLoading", "usePlaceholder", "items", "itemBy", "groupBy"];
|
|
16
16
|
|
|
17
|
-
/* src/InfiniteGrid.svelte generated by Svelte v3.
|
|
17
|
+
/* src/InfiniteGrid.svelte generated by Svelte v3.59.2 */
|
|
18
18
|
const get_default_slot_changes_1 = dirty => ({
|
|
19
19
|
visibleItems: dirty & /*visibleItems*/8
|
|
20
20
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infinitegrid.cjs.js","sources":["../src/consts.js","../src/InfiniteGrid.svelte","../src/InfiniteGrid.js","../src/grids/MasonryInfiniteGrid.js","../src/grids/JustifiedInfiniteGrid.js","../src/grids/FrameInfiniteGrid.js","../src/grids/PackingInfiniteGrid.js"],"sourcesContent":["export const SVELTE_INFINITEGRID_PROPS = [\n \"status\",\n \"useFirstRender\",\n \"useLoading\",\n \"usePlaceholder\",\n \"items\",\n \"itemBy\",\n \"groupBy\",\n];\n","<script>\n /**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\n import {\n onMount,\n beforeUpdate,\n createEventDispatcher,\n onDestroy,\n afterUpdate,\n } from \"svelte\";\n import {\n INFINITEGRID_EVENTS,\n Renderer,\n CONTAINER_CLASS_NAME,\n getRenderingItems,\n mountRenderingItems,\n } from \"@egjs/infinitegrid\";\n import { SVELTE_INFINITEGRID_PROPS } from \"./consts\";\n export let GridClass;\n export let vanillaGrid = null;\n\n const dispatch = createEventDispatcher();\n const renderer = new Renderer();\n let wrapper;\n let container;\n let isFirstMount = false;\n let attributes = {};\n let visibleItems = [];\n\n function updateAttributes(props) {\n attributes = { ...props };\n\n const defaultOptions = GridClass.defaultOptions;\n\n delete attributes[\"GridClass\"];\n for (const name in defaultOptions) {\n delete attributes[name];\n }\n SVELTE_INFINITEGRID_PROPS.forEach((name) => {\n delete attributes[name];\n });\n }\n function getItemInfos() {\n const items = $$props.items || [];\n const itemBy = $$props.itemBy || ((item) => item.key);\n const groupBy = $$props.groupBy || ((item) => item.groupKey);\n const infoBy = $$props.infoBy || (() => ({}));\n\n return items.map((item, i) => {\n const {\n data,\n ...rest\n } = infoBy(item, i) || {};\n return {\n groupKey: groupBy(item, i),\n key: itemBy(item, i),\n ...rest,\n data: {\n ...data,\n ...item,\n },\n };\n });\n }\n function updateVisibleChildren(props) {\n visibleItems = getRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: props.status,\n usePlaceholder: props.usePlaceholder,\n useFirstRender: props.useFirstRender,\n useLoading: props.useLoading,\n horizontal: props.horizontal,\n });\n }\n\n beforeUpdate(() => {\n updateAttributes($$props);\n updateVisibleChildren($$props);\n });\n\n onMount(() => {\n const defaultOptions = GridClass.defaultOptions;\n const options = {};\n\n for (const name in defaultOptions) {\n if (name in $$props) {\n options[name] = $$props[name];\n }\n }\n if (container) {\n options.container = container;\n }\n options.renderer = renderer;\n vanillaGrid = new GridClass(wrapper, options);\n\n for (const name in INFINITEGRID_EVENTS) {\n const eventName = INFINITEGRID_EVENTS[name];\n\n vanillaGrid.on(eventName, (e) => {\n dispatch(eventName, e);\n });\n }\n renderer.on(\"requestUpdate\", () => {\n updateVisibleChildren($$props);\n });\n\n mountRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: $$props.status,\n usePlaceholder: $$props.usePlaceholder,\n useFirstRender: $$props.useFirstRender,\n useLoading: $$props.useLoading,\n horizontal: $$props.horizontal,\n });\n renderer.updated();\n });\n afterUpdate(() => {\n if (isFirstMount) {\n isFirstMount = false;\n return;\n }\n const propertyTypes = GridClass.propertyTypes;\n\n for (const name in propertyTypes) {\n if (name in $$props) {\n vanillaGrid[name] = $$props[name];\n }\n }\n renderer.updated();\n });\n onDestroy(() => {\n vanillaGrid && vanillaGrid.destroy();\n });\n export function getInstance() {\n return vanillaGrid;\n }\n</script>\n\n<div bind:this={wrapper} {...attributes}>\n {#if $$props.container === true}\n <div class={CONTAINER_CLASS_NAME} bind:this={container}>\n <slot {visibleItems} />\n </div>\n {:else}\n <slot {visibleItems} />\n {/if}\n</div>\n","/**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\nimport InfiniteGrid from \"./InfiniteGrid.svelte\";\nimport { INFINITEGRID_METHODS } from \"@egjs/infinitegrid\";\n\nexport default /*#__PURE__*/ (() => {\n const prototype = InfiniteGrid.prototype;\n\n if (prototype) {\n INFINITEGRID_METHODS.forEach(name => {\n if (name in prototype) {\n return;\n }\n prototype[name] = function (...args) {\n const self = this.getInstance();\n const result = self[name](...args);\n\n if (result === self) {\n return this;\n } else {\n return result;\n }\n };\n });\n }\n return InfiniteGrid;\n})();\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { MasonryInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteMasonryInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteMasonryInfiniteGrid = InfiniteGrid;\n} else {\n SvelteMasonryInfiniteGrid = class SvelteMasonryInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteMasonryInfiniteGrid as MasonryInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { JustifiedInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteJustifiedInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteJustifiedInfiniteGrid = InfiniteGrid;\n} else {\n SvelteJustifiedInfiniteGrid = class SvelteJustifiedInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteJustifiedInfiniteGrid as JustifiedInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { FrameInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteFrameInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteFrameInfiniteGrid = InfiniteGrid;\n} else {\n SvelteFrameInfiniteGrid = class SvelteFrameInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteFrameInfiniteGrid as FrameInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { PackingInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SveltePackingInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SveltePackingInfiniteGrid = InfiniteGrid;\n} else {\n SveltePackingInfiniteGrid = class SveltePackingInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SveltePackingInfiniteGrid as PackingInfiniteGrid };\n"],"names":["SVELTE_INFINITEGRID_PROPS","CONTAINER_CLASS_NAME","insert","target","div","anchor","ctx","container","GridClass","$$props","vanillaGrid","dispatch","createEventDispatcher","renderer","Renderer","wrapper","attributes","visibleItems","updateAttributes","props","$$invalidate","defaultOptions","name","forEach","getItemInfos","items","itemBy","item","key","groupBy","groupKey","infoBy","map","i","data","rest","updateVisibleChildren","getRenderingItems","grid","status","usePlaceholder","useFirstRender","useLoading","horizontal","beforeUpdate","onMount","options","INFINITEGRID_EVENTS","eventName","on","e","mountRenderingItems","updated","afterUpdate","propertyTypes","onDestroy","destroy","getInstance","$$value","prototype","InfiniteGrid","INFINITEGRID_METHODS","args","self","result","SvelteMasonryInfiniteGrid","constructor","SvelteJustifiedInfiniteGrid","SvelteFrameInfiniteGrid","SveltePackingInfiniteGrid"],"mappings":";;;;;;;;;;;;;;AAAO,MAAMA,yBAAyB,GAAG,CACvC,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,SAAS,CACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCCuIeC,iCAAoB,CAAA,CAAA;;;AAAhCC,MAAAA,eAEK,CAAAC,MAAA,EAAAC,GAAA,EAAAC,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAHFC,GAAO,CAAA,CAAA,CAAA,CAACC,SAAS,KAAK,IAAI,EAAA,OAAA,CAAA,CAAA;;;;;kCADJD,GAAU,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;AAAvCJ,MAAAA,eAQK,CAAAC,MAAA,EAAAC,GAAA,EAAAC,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;+HARwBC,GAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAxH1BE,IAAAA,SAAAA;AAAS,GAAA,GAAAC,OAA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AAAA,2BAA2B,GAAG,MAAMA,2BAA2B,SAASP,YAAY,CAAC;IACnFM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,kCAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;ACXA,IAAIsB,uBAAuB,CAAA;AAE3B,IAAI,OAAOR,YAAY,KAAK,QAAQ,EAAE;AACpCQ,EAAAA,uBAAuB,GAAGR,YAAY,CAAA;AACxC,CAAC,MAAM;AACLQ,EAAAA,uBAAuB,GAAG,MAAMA,uBAAuB,SAASR,YAAY,CAAC;IAC3EM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,8BAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;ACXA,IAAIuB,yBAAyB,CAAA;AAE7B,IAAI,OAAOT,YAAY,KAAK,QAAQ,EAAE;AACpCS,EAAAA,yBAAyB,GAAGT,YAAY,CAAA;AAC1C,CAAC,MAAM;AACLS,EAAAA,yBAAyB,GAAG,MAAMA,yBAAyB,SAAST,YAAY,CAAC;IAC/EM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,gCAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"infinitegrid.cjs.js","sources":["../src/consts.js","../src/InfiniteGrid.svelte","../src/InfiniteGrid.js","../src/grids/MasonryInfiniteGrid.js","../src/grids/JustifiedInfiniteGrid.js","../src/grids/FrameInfiniteGrid.js","../src/grids/PackingInfiniteGrid.js"],"sourcesContent":["export const SVELTE_INFINITEGRID_PROPS = [\n \"status\",\n \"useFirstRender\",\n \"useLoading\",\n \"usePlaceholder\",\n \"items\",\n \"itemBy\",\n \"groupBy\",\n];\n","<script>\n /**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\n import {\n onMount,\n beforeUpdate,\n createEventDispatcher,\n onDestroy,\n afterUpdate,\n } from \"svelte\";\n import {\n INFINITEGRID_EVENTS,\n Renderer,\n CONTAINER_CLASS_NAME,\n getRenderingItems,\n mountRenderingItems,\n } from \"@egjs/infinitegrid\";\n import { SVELTE_INFINITEGRID_PROPS } from \"./consts\";\n export let GridClass;\n export let vanillaGrid = null;\n\n const dispatch = createEventDispatcher();\n const renderer = new Renderer();\n let wrapper;\n let container;\n let isFirstMount = false;\n let attributes = {};\n let visibleItems = [];\n\n function updateAttributes(props) {\n attributes = { ...props };\n\n const defaultOptions = GridClass.defaultOptions;\n\n delete attributes[\"GridClass\"];\n for (const name in defaultOptions) {\n delete attributes[name];\n }\n SVELTE_INFINITEGRID_PROPS.forEach((name) => {\n delete attributes[name];\n });\n }\n function getItemInfos() {\n const items = $$props.items || [];\n const itemBy = $$props.itemBy || ((item) => item.key);\n const groupBy = $$props.groupBy || ((item) => item.groupKey);\n const infoBy = $$props.infoBy || (() => ({}));\n\n return items.map((item, i) => {\n const {\n data,\n ...rest\n } = infoBy(item, i) || {};\n return {\n groupKey: groupBy(item, i),\n key: itemBy(item, i),\n ...rest,\n data: {\n ...data,\n ...item,\n },\n };\n });\n }\n function updateVisibleChildren(props) {\n visibleItems = getRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: props.status,\n usePlaceholder: props.usePlaceholder,\n useFirstRender: props.useFirstRender,\n useLoading: props.useLoading,\n horizontal: props.horizontal,\n });\n }\n\n beforeUpdate(() => {\n updateAttributes($$props);\n updateVisibleChildren($$props);\n });\n\n onMount(() => {\n const defaultOptions = GridClass.defaultOptions;\n const options = {};\n\n for (const name in defaultOptions) {\n if (name in $$props) {\n options[name] = $$props[name];\n }\n }\n if (container) {\n options.container = container;\n }\n options.renderer = renderer;\n vanillaGrid = new GridClass(wrapper, options);\n\n for (const name in INFINITEGRID_EVENTS) {\n const eventName = INFINITEGRID_EVENTS[name];\n\n vanillaGrid.on(eventName, (e) => {\n dispatch(eventName, e);\n });\n }\n renderer.on(\"requestUpdate\", () => {\n updateVisibleChildren($$props);\n });\n\n mountRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: $$props.status,\n usePlaceholder: $$props.usePlaceholder,\n useFirstRender: $$props.useFirstRender,\n useLoading: $$props.useLoading,\n horizontal: $$props.horizontal,\n });\n renderer.updated();\n });\n afterUpdate(() => {\n if (isFirstMount) {\n isFirstMount = false;\n return;\n }\n const propertyTypes = GridClass.propertyTypes;\n\n for (const name in propertyTypes) {\n if (name in $$props) {\n vanillaGrid[name] = $$props[name];\n }\n }\n renderer.updated();\n });\n onDestroy(() => {\n vanillaGrid && vanillaGrid.destroy();\n });\n export function getInstance() {\n return vanillaGrid;\n }\n</script>\n\n<div bind:this={wrapper} {...attributes}>\n {#if $$props.container === true}\n <div class={CONTAINER_CLASS_NAME} bind:this={container}>\n <slot {visibleItems} />\n </div>\n {:else}\n <slot {visibleItems} />\n {/if}\n</div>\n","/**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\nimport InfiniteGrid from \"./InfiniteGrid.svelte\";\nimport { INFINITEGRID_METHODS } from \"@egjs/infinitegrid\";\n\nexport default /*#__PURE__*/ (() => {\n const prototype = InfiniteGrid.prototype;\n\n if (prototype) {\n INFINITEGRID_METHODS.forEach(name => {\n if (name in prototype) {\n return;\n }\n prototype[name] = function (...args) {\n const self = this.getInstance();\n const result = self[name](...args);\n\n if (result === self) {\n return this;\n } else {\n return result;\n }\n };\n });\n }\n return InfiniteGrid;\n})();\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { MasonryInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteMasonryInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteMasonryInfiniteGrid = InfiniteGrid;\n} else {\n SvelteMasonryInfiniteGrid = class SvelteMasonryInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteMasonryInfiniteGrid as MasonryInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { JustifiedInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteJustifiedInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteJustifiedInfiniteGrid = InfiniteGrid;\n} else {\n SvelteJustifiedInfiniteGrid = class SvelteJustifiedInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteJustifiedInfiniteGrid as JustifiedInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { FrameInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteFrameInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteFrameInfiniteGrid = InfiniteGrid;\n} else {\n SvelteFrameInfiniteGrid = class SvelteFrameInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteFrameInfiniteGrid as FrameInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { PackingInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SveltePackingInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SveltePackingInfiniteGrid = InfiniteGrid;\n} else {\n SveltePackingInfiniteGrid = class SveltePackingInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SveltePackingInfiniteGrid as PackingInfiniteGrid };\n"],"names":["SVELTE_INFINITEGRID_PROPS","CONTAINER_CLASS_NAME","insert","target","div","anchor","ctx","container","GridClass","$$props","vanillaGrid","dispatch","createEventDispatcher","renderer","Renderer","wrapper","attributes","visibleItems","updateAttributes","props","$$invalidate","defaultOptions","name","forEach","getItemInfos","items","itemBy","item","key","groupBy","groupKey","infoBy","map","i","data","rest","updateVisibleChildren","getRenderingItems","grid","status","usePlaceholder","useFirstRender","useLoading","horizontal","beforeUpdate","onMount","options","INFINITEGRID_EVENTS","eventName","on","e","mountRenderingItems","updated","afterUpdate","propertyTypes","onDestroy","destroy","getInstance","$$value","prototype","InfiniteGrid","INFINITEGRID_METHODS","args","self","result","SvelteMasonryInfiniteGrid","constructor","SvelteJustifiedInfiniteGrid","SvelteFrameInfiniteGrid","SveltePackingInfiniteGrid"],"mappings":";;;;;;;;;;;;;;AAAO,MAAMA,yBAAyB,GAAG,CACvC,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,EAChB,OAAO,EACP,QAAQ,EACR,SAAS,CACV;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kCCuIeC,iCAAoB,CAAA,CAAA;;;AAAhCC,MAAAA,eAEK,CAAAC,MAAA,EAAAC,GAAA,EAAAC,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAHFC,GAAO,CAAA,CAAA,CAAA,CAACC,SAAS,KAAK,IAAI,EAAA,OAAA,CAAA,CAAA;;;;;kCADJD,GAAU,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;AAAvCJ,MAAAA,eAQK,CAAAC,MAAA,EAAAC,GAAA,EAAAC,MAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;+HARwBC,GAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;AAxH1BE,IAAAA,SAAAA;AAAS,GAAA,GAAAC,OAAA,CAAA;EACT,IAAA;AAAAC,IAAAA,WAAW,GAAI,IAAA;AA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,YAAY,CAAC;IACnFM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,kCAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;ACXA,IAAIsB,uBAAuB,CAAA;AAE3B,IAAI,OAAOR,YAAY,KAAK,QAAQ,EAAE;AACpCQ,EAAAA,uBAAuB,GAAGR,YAAY,CAAA;AACxC,CAAC,MAAM;AACLQ,EAAAA,uBAAuB,GAAG,MAAMA,uBAAuB,SAASR,YAAY,CAAC;IAC3EM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,8BAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;ACXA,IAAIuB,yBAAyB,CAAA;AAE7B,IAAI,OAAOT,YAAY,KAAK,QAAQ,EAAE;AACpCS,EAAAA,yBAAyB,GAAGT,YAAY,CAAA;AAC1C,CAAC,MAAM;AACLS,EAAAA,yBAAyB,GAAG,MAAMA,yBAAyB,SAAST,YAAY,CAAC;IAC/EM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,gCAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;;;;;;;;;;;;"}
|
package/dist/infinitegrid.esm.js
CHANGED
|
@@ -4,7 +4,7 @@ name: @egjs/svelte-infinitegrid
|
|
|
4
4
|
license: MIT
|
|
5
5
|
author: NAVER Corp.
|
|
6
6
|
repository: https://github.com/naver/egjs-infinitegrid
|
|
7
|
-
version: 4.
|
|
7
|
+
version: 4.11.0
|
|
8
8
|
*/
|
|
9
9
|
import { SvelteComponent, init, safe_not_equal, assign, element, set_attributes, insert, group_outros, transition_out, check_outros, transition_in, get_spread_update, detach, exclude_internal_props, binding_callbacks, create_slot, update_slot_base, get_all_dirty_from_scope, get_slot_changes, attr } from 'svelte/internal';
|
|
10
10
|
import { createEventDispatcher, beforeUpdate, onMount, afterUpdate, onDestroy } from 'svelte';
|
|
@@ -12,7 +12,7 @@ import { Renderer, INFINITEGRID_EVENTS, mountRenderingItems, getRenderingItems,
|
|
|
12
12
|
|
|
13
13
|
const SVELTE_INFINITEGRID_PROPS = ["status", "useFirstRender", "useLoading", "usePlaceholder", "items", "itemBy", "groupBy"];
|
|
14
14
|
|
|
15
|
-
/* src/InfiniteGrid.svelte generated by Svelte v3.
|
|
15
|
+
/* src/InfiniteGrid.svelte generated by Svelte v3.59.2 */
|
|
16
16
|
const get_default_slot_changes_1 = dirty => ({
|
|
17
17
|
visibleItems: dirty & /*visibleItems*/8
|
|
18
18
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infinitegrid.esm.js","sources":["../src/consts.js","../src/InfiniteGrid.svelte","../src/InfiniteGrid.js","../src/grids/MasonryInfiniteGrid.js","../src/grids/JustifiedInfiniteGrid.js","../src/grids/FrameInfiniteGrid.js","../src/grids/PackingInfiniteGrid.js"],"sourcesContent":["export const SVELTE_INFINITEGRID_PROPS = [\n \"status\",\n \"useFirstRender\",\n \"useLoading\",\n \"usePlaceholder\",\n \"items\",\n \"itemBy\",\n \"groupBy\",\n];\n","<script>\n /**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\n import {\n onMount,\n beforeUpdate,\n createEventDispatcher,\n onDestroy,\n afterUpdate,\n } from \"svelte\";\n import {\n INFINITEGRID_EVENTS,\n Renderer,\n CONTAINER_CLASS_NAME,\n getRenderingItems,\n mountRenderingItems,\n } from \"@egjs/infinitegrid\";\n import { SVELTE_INFINITEGRID_PROPS } from \"./consts\";\n export let GridClass;\n export let vanillaGrid = null;\n\n const dispatch = createEventDispatcher();\n const renderer = new Renderer();\n let wrapper;\n let container;\n let isFirstMount = false;\n let attributes = {};\n let visibleItems = [];\n\n function updateAttributes(props) {\n attributes = { ...props };\n\n const defaultOptions = GridClass.defaultOptions;\n\n delete attributes[\"GridClass\"];\n for (const name in defaultOptions) {\n delete attributes[name];\n }\n SVELTE_INFINITEGRID_PROPS.forEach((name) => {\n delete attributes[name];\n });\n }\n function getItemInfos() {\n const items = $$props.items || [];\n const itemBy = $$props.itemBy || ((item) => item.key);\n const groupBy = $$props.groupBy || ((item) => item.groupKey);\n const infoBy = $$props.infoBy || (() => ({}));\n\n return items.map((item, i) => {\n const {\n data,\n ...rest\n } = infoBy(item, i) || {};\n return {\n groupKey: groupBy(item, i),\n key: itemBy(item, i),\n ...rest,\n data: {\n ...data,\n ...item,\n },\n };\n });\n }\n function updateVisibleChildren(props) {\n visibleItems = getRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: props.status,\n usePlaceholder: props.usePlaceholder,\n useFirstRender: props.useFirstRender,\n useLoading: props.useLoading,\n horizontal: props.horizontal,\n });\n }\n\n beforeUpdate(() => {\n updateAttributes($$props);\n updateVisibleChildren($$props);\n });\n\n onMount(() => {\n const defaultOptions = GridClass.defaultOptions;\n const options = {};\n\n for (const name in defaultOptions) {\n if (name in $$props) {\n options[name] = $$props[name];\n }\n }\n if (container) {\n options.container = container;\n }\n options.renderer = renderer;\n vanillaGrid = new GridClass(wrapper, options);\n\n for (const name in INFINITEGRID_EVENTS) {\n const eventName = INFINITEGRID_EVENTS[name];\n\n vanillaGrid.on(eventName, (e) => {\n dispatch(eventName, e);\n });\n }\n renderer.on(\"requestUpdate\", () => {\n updateVisibleChildren($$props);\n });\n\n mountRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: $$props.status,\n usePlaceholder: $$props.usePlaceholder,\n useFirstRender: $$props.useFirstRender,\n useLoading: $$props.useLoading,\n horizontal: $$props.horizontal,\n });\n renderer.updated();\n });\n afterUpdate(() => {\n if (isFirstMount) {\n isFirstMount = false;\n return;\n }\n const propertyTypes = GridClass.propertyTypes;\n\n for (const name in propertyTypes) {\n if (name in $$props) {\n vanillaGrid[name] = $$props[name];\n }\n }\n renderer.updated();\n });\n onDestroy(() => {\n vanillaGrid && vanillaGrid.destroy();\n });\n export function getInstance() {\n return vanillaGrid;\n }\n</script>\n\n<div bind:this={wrapper} {...attributes}>\n {#if $$props.container === true}\n <div class={CONTAINER_CLASS_NAME} bind:this={container}>\n <slot {visibleItems} />\n </div>\n {:else}\n <slot {visibleItems} />\n {/if}\n</div>\n","/**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\nimport InfiniteGrid from \"./InfiniteGrid.svelte\";\nimport { INFINITEGRID_METHODS } from \"@egjs/infinitegrid\";\n\nexport default /*#__PURE__*/ (() => {\n const prototype = InfiniteGrid.prototype;\n\n if (prototype) {\n INFINITEGRID_METHODS.forEach(name => {\n if (name in prototype) {\n return;\n }\n prototype[name] = function (...args) {\n const self = this.getInstance();\n const result = self[name](...args);\n\n if (result === self) {\n return this;\n } else {\n return result;\n }\n };\n });\n }\n return InfiniteGrid;\n})();\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { MasonryInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteMasonryInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteMasonryInfiniteGrid = InfiniteGrid;\n} else {\n SvelteMasonryInfiniteGrid = class SvelteMasonryInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteMasonryInfiniteGrid as MasonryInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { JustifiedInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteJustifiedInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteJustifiedInfiniteGrid = InfiniteGrid;\n} else {\n SvelteJustifiedInfiniteGrid = class SvelteJustifiedInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteJustifiedInfiniteGrid as JustifiedInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { FrameInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteFrameInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteFrameInfiniteGrid = InfiniteGrid;\n} else {\n SvelteFrameInfiniteGrid = class SvelteFrameInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteFrameInfiniteGrid as FrameInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { PackingInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SveltePackingInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SveltePackingInfiniteGrid = InfiniteGrid;\n} else {\n SveltePackingInfiniteGrid = class SveltePackingInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SveltePackingInfiniteGrid as PackingInfiniteGrid };\n"],"names":["SVELTE_INFINITEGRID_PROPS","CONTAINER_CLASS_NAME","insert","target","div","anchor","ctx","container","GridClass","$$props","vanillaGrid","dispatch","createEventDispatcher","renderer","Renderer","wrapper","attributes","visibleItems","updateAttributes","props","$$invalidate","defaultOptions","name","forEach","getItemInfos","items","itemBy","item","key","groupBy","groupKey","infoBy","map","i","data","rest","updateVisibleChildren","getRenderingItems","grid","status","usePlaceholder","useFirstRender","useLoading","horizontal","beforeUpdate","onMount","options","INFINITEGRID_EVENTS","eventName","on","e","mountRenderingItems","updated","afterUpdate","propertyTypes","onDestroy","destroy","getInstance","$$value","prototype","InfiniteGrid","INFINITEGRID_METHODS","args","self","result","SvelteMasonryInfiniteGrid","constructor","SvelteJustifiedInfiniteGrid","SvelteFrameInfiniteGrid","SveltePackingInfiniteGrid"],"mappings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BAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;ACXA,IAAIuB,0BAAyB;AAE7B,IAAI,OAAOT,YAAY,KAAK,QAAQ,EAAE;AACpCS,EAAAA,yBAAyB,GAAGT,YAAY,CAAA;AAC1C,CAAC,MAAM;AACLS,EAAAA,yBAAyB,GAAG,MAAMA,yBAAyB,SAAST,YAAY,CAAC;IAC/EM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,mBAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;;;"}
|
|
1
|
+
{"version":3,"file":"infinitegrid.esm.js","sources":["../src/consts.js","../src/InfiniteGrid.svelte","../src/InfiniteGrid.js","../src/grids/MasonryInfiniteGrid.js","../src/grids/JustifiedInfiniteGrid.js","../src/grids/FrameInfiniteGrid.js","../src/grids/PackingInfiniteGrid.js"],"sourcesContent":["export const SVELTE_INFINITEGRID_PROPS = [\n \"status\",\n \"useFirstRender\",\n \"useLoading\",\n \"usePlaceholder\",\n \"items\",\n \"itemBy\",\n \"groupBy\",\n];\n","<script>\n /**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\n import {\n onMount,\n beforeUpdate,\n createEventDispatcher,\n onDestroy,\n afterUpdate,\n } from \"svelte\";\n import {\n INFINITEGRID_EVENTS,\n Renderer,\n CONTAINER_CLASS_NAME,\n getRenderingItems,\n mountRenderingItems,\n } from \"@egjs/infinitegrid\";\n import { SVELTE_INFINITEGRID_PROPS } from \"./consts\";\n export let GridClass;\n export let vanillaGrid = null;\n\n const dispatch = createEventDispatcher();\n const renderer = new Renderer();\n let wrapper;\n let container;\n let isFirstMount = false;\n let attributes = {};\n let visibleItems = [];\n\n function updateAttributes(props) {\n attributes = { ...props };\n\n const defaultOptions = GridClass.defaultOptions;\n\n delete attributes[\"GridClass\"];\n for (const name in defaultOptions) {\n delete attributes[name];\n }\n SVELTE_INFINITEGRID_PROPS.forEach((name) => {\n delete attributes[name];\n });\n }\n function getItemInfos() {\n const items = $$props.items || [];\n const itemBy = $$props.itemBy || ((item) => item.key);\n const groupBy = $$props.groupBy || ((item) => item.groupKey);\n const infoBy = $$props.infoBy || (() => ({}));\n\n return items.map((item, i) => {\n const {\n data,\n ...rest\n } = infoBy(item, i) || {};\n return {\n groupKey: groupBy(item, i),\n key: itemBy(item, i),\n ...rest,\n data: {\n ...data,\n ...item,\n },\n };\n });\n }\n function updateVisibleChildren(props) {\n visibleItems = getRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: props.status,\n usePlaceholder: props.usePlaceholder,\n useFirstRender: props.useFirstRender,\n useLoading: props.useLoading,\n horizontal: props.horizontal,\n });\n }\n\n beforeUpdate(() => {\n updateAttributes($$props);\n updateVisibleChildren($$props);\n });\n\n onMount(() => {\n const defaultOptions = GridClass.defaultOptions;\n const options = {};\n\n for (const name in defaultOptions) {\n if (name in $$props) {\n options[name] = $$props[name];\n }\n }\n if (container) {\n options.container = container;\n }\n options.renderer = renderer;\n vanillaGrid = new GridClass(wrapper, options);\n\n for (const name in INFINITEGRID_EVENTS) {\n const eventName = INFINITEGRID_EVENTS[name];\n\n vanillaGrid.on(eventName, (e) => {\n dispatch(eventName, e);\n });\n }\n renderer.on(\"requestUpdate\", () => {\n updateVisibleChildren($$props);\n });\n\n mountRenderingItems(getItemInfos(), {\n grid: vanillaGrid,\n status: $$props.status,\n usePlaceholder: $$props.usePlaceholder,\n useFirstRender: $$props.useFirstRender,\n useLoading: $$props.useLoading,\n horizontal: $$props.horizontal,\n });\n renderer.updated();\n });\n afterUpdate(() => {\n if (isFirstMount) {\n isFirstMount = false;\n return;\n }\n const propertyTypes = GridClass.propertyTypes;\n\n for (const name in propertyTypes) {\n if (name in $$props) {\n vanillaGrid[name] = $$props[name];\n }\n }\n renderer.updated();\n });\n onDestroy(() => {\n vanillaGrid && vanillaGrid.destroy();\n });\n export function getInstance() {\n return vanillaGrid;\n }\n</script>\n\n<div bind:this={wrapper} {...attributes}>\n {#if $$props.container === true}\n <div class={CONTAINER_CLASS_NAME} bind:this={container}>\n <slot {visibleItems} />\n </div>\n {:else}\n <slot {visibleItems} />\n {/if}\n</div>\n","/**\n * egjs-infinitegrid\n * Copyright (c) 2021-present NAVER Corp.\n * MIT license\n */\nimport InfiniteGrid from \"./InfiniteGrid.svelte\";\nimport { INFINITEGRID_METHODS } from \"@egjs/infinitegrid\";\n\nexport default /*#__PURE__*/ (() => {\n const prototype = InfiniteGrid.prototype;\n\n if (prototype) {\n INFINITEGRID_METHODS.forEach(name => {\n if (name in prototype) {\n return;\n }\n prototype[name] = function (...args) {\n const self = this.getInstance();\n const result = self[name](...args);\n\n if (result === self) {\n return this;\n } else {\n return result;\n }\n };\n });\n }\n return InfiniteGrid;\n})();\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { MasonryInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteMasonryInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteMasonryInfiniteGrid = InfiniteGrid;\n} else {\n SvelteMasonryInfiniteGrid = class SvelteMasonryInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteMasonryInfiniteGrid as MasonryInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { JustifiedInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteJustifiedInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteJustifiedInfiniteGrid = InfiniteGrid;\n} else {\n SvelteJustifiedInfiniteGrid = class SvelteJustifiedInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteJustifiedInfiniteGrid as JustifiedInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { FrameInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SvelteFrameInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SvelteFrameInfiniteGrid = InfiniteGrid;\n} else {\n SvelteFrameInfiniteGrid = class SvelteFrameInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SvelteFrameInfiniteGrid as FrameInfiniteGrid };\n","import InfiniteGrid from \"../InfiniteGrid.js\";\nimport { PackingInfiniteGrid as GridClass } from \"@egjs/infinitegrid\";\n\n\nlet SveltePackingInfiniteGrid;\n\nif (typeof InfiniteGrid === \"object\") {\n SveltePackingInfiniteGrid = InfiniteGrid;\n} else {\n SveltePackingInfiniteGrid = class SveltePackingInfiniteGrid extends InfiniteGrid {\n constructor(options) {\n options.props.GridClass = GridClass;\n super(options);\n }\n }\n}\nexport { SveltePackingInfiniteGrid as PackingInfiniteGrid };\n"],"names":["SVELTE_INFINITEGRID_PROPS","CONTAINER_CLASS_NAME","insert","target","div","anchor","ctx","container","GridClass","$$props","vanillaGrid","dispatch","createEventDispatcher","renderer","Renderer","wrapper","attributes","visibleItems","updateAttributes","props","$$invalidate","defaultOptions","name","forEach","getItemInfos","items","itemBy","item","key","groupBy","groupKey","infoBy","map","i","data","rest","updateVisibleChildren","getRenderingItems","grid","status","usePlaceholder","useFirstRender","useLoading","horizontal","beforeUpdate","onMount","options","INFINITEGRID_EVENTS","eventName","on","e","mountRenderingItems","updated","afterUpdate","propertyTypes","onDestroy","destroy","getInstance","$$value","prototype","InfiniteGrid","INFINITEGRID_METHODS","args","self","result","SvelteMasonryInfiniteGrid","constructor","SvelteJustifiedInfiniteGrid","SvelteFrameInfiniteGrid","SveltePackingInfiniteGrid"],"mappings":";;;;;;;;;;;;AAAO,MAAMA,yBAAyB,GAAG,CACvC,QAAQ,EACR,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,E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IAAIuB,0BAAyB;AAE7B,IAAI,OAAOT,YAAY,KAAK,QAAQ,EAAE;AACpCS,EAAAA,yBAAyB,GAAGT,YAAY,CAAA;AAC1C,CAAC,MAAM;AACLS,EAAAA,yBAAyB,GAAG,MAAMA,yBAAyB,SAAST,YAAY,CAAC;IAC/EM,WAAWA,CAACpB,OAAO,EAAE;AACnBA,MAAAA,OAAO,CAAC3B,KAAK,CAACX,SAAS,GAAGA,mBAAS,CAAA;MACnC,KAAK,CAACsC,OAAO,CAAC,CAAA;AAChB,KAAA;GACD,CAAA;AACH;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@egjs/svelte-infinitegrid",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.11.0",
|
|
4
4
|
"description": "A Svelte component that can arrange items infinitely according to the type of grids",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"svelte": "src/index.js",
|
|
@@ -74,6 +74,6 @@
|
|
|
74
74
|
"typescript": "^4.5.0 <4.6.0"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@egjs/infinitegrid": "~4.
|
|
77
|
+
"@egjs/infinitegrid": "~4.11.0"
|
|
78
78
|
}
|
|
79
79
|
}
|
package/.DS_Store
DELETED
|
Binary file
|
package/.gitignore
DELETED
package/.npmignore
DELETED
package/CHANGELOG.md
DELETED
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
## [4.10.0](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.9.0...@egjs/svelte-infinitegrid@4.10.0) (2023-05-26)
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
### :rocket: New Features
|
|
10
|
-
|
|
11
|
-
* add infoBy prop for frameworks (#538) ([6fd5c0b](https://github.com/naver/egjs-infinitegrid/commit/6fd5c0b36f2aded59d3fce54d880f8882b2a3ec6))
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
### :mega: Other
|
|
15
|
-
|
|
16
|
-
* update packages versions ([dce9a8c](https://github.com/naver/egjs-infinitegrid/commit/dce9a8c79342d01190b59197b82bf11d25c5665c))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
## [4.9.0](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.8.1...@egjs/svelte-infinitegrid@4.9.0) (2023-03-17)
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
### :bug: Bug Fix
|
|
24
|
-
|
|
25
|
-
* fix svelte module naming (#529) ([5e3d9fe](https://github.com/naver/egjs-infinitegrid/commit/5e3d9fefbc45066e1256a408a909045f7c4c70f7))
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
### :mega: Other
|
|
29
|
-
|
|
30
|
-
* update packages versions ([f628845](https://github.com/naver/egjs-infinitegrid/commit/f628845d3e3a8d0cb91f1802c352d12944b6a2a7))
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
## [4.8.1](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.7.1...@egjs/svelte-infinitegrid@4.8.1) (2023-01-27)
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
### :rocket: New Features
|
|
38
|
-
|
|
39
|
-
* update `@egjs/grid` module ([081acd5](https://github.com/naver/egjs-infinitegrid/commit/081acd53fd4ccd00b16e70e8ef86f11a63bd764c))
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
### :mega: Other
|
|
43
|
-
|
|
44
|
-
* update packages versions ([191e57f](https://github.com/naver/egjs-infinitegrid/commit/191e57fbb4df5c2fc8f990fa44e2819bdadf5ee6))
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
## 4.7.1 (2022-09-08)
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
### :rocket: New Features
|
|
52
|
-
|
|
53
|
-
* add storybook (#321) ([a726015](https://github.com/naver/egjs-infinitegrid/commit/a726015066824842ef2ba05cd53e1f7a3514d8ae))
|
|
54
|
-
* add svelte-infinitegrid@3.0.0 (#301) ([8c878c9](https://github.com/naver/egjs-infinitegrid/commit/8c878c9e8d4a43ab2e98f21cb124677c7fd8f0b4))
|
|
55
|
-
* support ResizeObserver#464 (#470) ([4400701](https://github.com/naver/egjs-infinitegrid/commit/4400701b5eafc52b41eb9d496bad48f551bcf96e))
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
### :bug: Bug Fix
|
|
59
|
-
|
|
60
|
-
* change afterUpdate lifecycle (#304) ([4851854](https://github.com/naver/egjs-infinitegrid/commit/4851854348524ffb247316c8bd5ddc71b7deb678))
|
|
61
|
-
* fix error in multiple groups (#387) ([02df50f](https://github.com/naver/egjs-infinitegrid/commit/02df50f52644c461e2397458bef428dcb868f02f))
|
|
62
|
-
* fix setStatus method's default value (#373) ([5f8f9a2](https://github.com/naver/egjs-infinitegrid/commit/5f8f9a27a6bc8e55e49247dd6455713b77efeaf1))
|
|
63
|
-
* fix setStatus' getter (#377) ([16fa80c](https://github.com/naver/egjs-infinitegrid/commit/16fa80c042579c9766b5143b1787980930405d78))
|
|
64
|
-
* fix svelte types (#460) ([cace348](https://github.com/naver/egjs-infinitegrid/commit/cace34814d65c53562648da5713d4191242e61bd))
|
|
65
|
-
* fix svelte version issue (#315) ([bee5b3d](https://github.com/naver/egjs-infinitegrid/commit/bee5b3d272261b69c9366079f028560c43c30f63))
|
|
66
|
-
* fix svelte-infinitegrid's typo ([6fe14d5](https://github.com/naver/egjs-infinitegrid/commit/6fe14d5deba9922fe3864b2ed758cdaaa73a9fa0))
|
|
67
|
-
* fix types (#457) ([f402d62](https://github.com/naver/egjs-infinitegrid/commit/f402d62ca0335c00e6bff2f68b1c343cfc6a285d))
|
|
68
|
-
* fix types (#510) ([96adfd7](https://github.com/naver/egjs-infinitegrid/commit/96adfd7bd66c6d77015818417990339da1b59311))
|
|
69
|
-
* support svelte SSR (#430) ([1518182](https://github.com/naver/egjs-infinitegrid/commit/1518182c36483574ac4a9c4ef5896d45f9c5ed05))
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
### :memo: Documentation
|
|
73
|
-
|
|
74
|
-
* fix README ([a512be4](https://github.com/naver/egjs-infinitegrid/commit/a512be426af33ed949fa07c3e790a705f90ae655))
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### :mega: Other
|
|
78
|
-
|
|
79
|
-
* release 4.2.0-rc ([110b5d4](https://github.com/naver/egjs-infinitegrid/commit/110b5d4ae845d7812da1cf5727366c22840ed82a))
|
|
80
|
-
* Release 4.3.0 ([d18031e](https://github.com/naver/egjs-infinitegrid/commit/d18031ee3e9bf7f012e7bf1b0157572ba78f70b0))
|
|
81
|
-
* Release 4.3.1 ([165e354](https://github.com/naver/egjs-infinitegrid/commit/165e354bb6382cba61e0670ab16096193fdf2a2b))
|
|
82
|
-
* Release 4.4.0 ([2b066a8](https://github.com/naver/egjs-infinitegrid/commit/2b066a83470719fc78940317fe0ab44fa21fc378))
|
|
83
|
-
* Release 4.5.0 ([23e0885](https://github.com/naver/egjs-infinitegrid/commit/23e0885c2ae29130b34613227291ee6f0b102c75))
|
|
84
|
-
* Release 4.6.0 ([d529854](https://github.com/naver/egjs-infinitegrid/commit/d529854917ef31afbbb138dec8af98ef8c3c1d47))
|
|
85
|
-
* Release 4.7.0 ([9a1c5a0](https://github.com/naver/egjs-infinitegrid/commit/9a1c5a0985381a632c00cae94481cb1a50425aa0))
|
|
86
|
-
* **release:** Release 3.6.2 ([7e0201b](https://github.com/naver/egjs-infinitegrid/commit/7e0201ba39ec4989ca02b81d84594ae1967c5488))
|
|
87
|
-
* **release:** Release 3.6.3 ([91d264c](https://github.com/naver/egjs-infinitegrid/commit/91d264c22142828ea9c26d19cb747c42c65773d7))
|
|
88
|
-
* **release:** Release 3.7.0 ([83982dd](https://github.com/naver/egjs-infinitegrid/commit/83982dd04cf2a52c0d165925de0a3ec14d4acb0a))
|
|
89
|
-
* **release:** Release 3.7.1 ([e89e4a3](https://github.com/naver/egjs-infinitegrid/commit/e89e4a386a577dc2deffb822a56b6fdfb9808525))
|
|
90
|
-
* **release:** Release 3.8.0 ([0318d41](https://github.com/naver/egjs-infinitegrid/commit/0318d416acb63611890dc752815386af7497ca19))
|
|
91
|
-
* **release:** Release 3.8.1 ([578263b](https://github.com/naver/egjs-infinitegrid/commit/578263bd36356f1e976dbf78d8eab423cf84a4ef))
|
|
92
|
-
* **release:** Release 3.8.2 ([bc043cc](https://github.com/naver/egjs-infinitegrid/commit/bc043ccd840bdbd28907d6c5592bc86cf3722c95))
|
|
93
|
-
* **release:** Release 3.8.3 ([dbb97ee](https://github.com/naver/egjs-infinitegrid/commit/dbb97ee7e368ee0a3bf512e20c3cd7f2c33b2e7a))
|
|
94
|
-
* **release:** Release 3.8.4 ([67f5300](https://github.com/naver/egjs-infinitegrid/commit/67f53003f0faa58039fd560682097f6ecf4534c1))
|
|
95
|
-
* **release:** Release 3.9.0 ([9d2dca7](https://github.com/naver/egjs-infinitegrid/commit/9d2dca76591a7b033108641783418e2dc183edf3))
|
|
96
|
-
* **release:** Release 4.0.0 ([7b77f77](https://github.com/naver/egjs-infinitegrid/commit/7b77f77e3e0444fc1162458133db1303c6531903))
|
|
97
|
-
* **release:** Release 4.1.0 ([57dc167](https://github.com/naver/egjs-infinitegrid/commit/57dc167b7a1e6fc60a39d8fa990c28294ef4722b))
|
|
98
|
-
* **release:** Release 4.1.1 ([ad36273](https://github.com/naver/egjs-infinitegrid/commit/ad3627396d64c421100d9623c3bfaf6a3c1bc40d))
|
|
99
|
-
* **release:** Release 4.2.1 ([414faa6](https://github.com/naver/egjs-infinitegrid/commit/414faa683fe5e60d746d99ba1944b086ff4b23e4))
|
|
100
|
-
* update @egjs/infinitegrid to frameworks ([cc2458d](https://github.com/naver/egjs-infinitegrid/commit/cc2458dc59229865041c22d0c40068813779d132))
|
|
101
|
-
* update package.json ([c9d1faa](https://github.com/naver/egjs-infinitegrid/commit/c9d1faa896d84672771caccb086f0002bd282370))
|
|
102
|
-
* update packages versions ([212d1bc](https://github.com/naver/egjs-infinitegrid/commit/212d1bcf22c60fde09989f373d61738a195d9902))
|
|
103
|
-
* update packages versions ([e438c00](https://github.com/naver/egjs-infinitegrid/commit/e438c00929ba28bd001d6174bd57efd918144686))
|
|
104
|
-
* update packages versions ([d4aa615](https://github.com/naver/egjs-infinitegrid/commit/d4aa615a8cd3e25b621500e2a7b243dcc9696eef))
|
|
105
|
-
* update packages versions ([171bb74](https://github.com/naver/egjs-infinitegrid/commit/171bb74f708110a2fd986276c9b8d65472fa64ab))
|
|
106
|
-
* update packages versions ([29bdea0](https://github.com/naver/egjs-infinitegrid/commit/29bdea08f334113e4a73180dd5f9e803c4befc99))
|
|
107
|
-
* update packages versions ([47f9348](https://github.com/naver/egjs-infinitegrid/commit/47f9348042e19c789b986ec936ed042a3838afc8))
|
|
108
|
-
* update packages versions ([bc07e37](https://github.com/naver/egjs-infinitegrid/commit/bc07e37a5fb40e94f87cd1b07f1f7a843ddbe7e8))
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
## [4.7.0](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.6.0...@egjs/svelte-infinitegrid@4.7.0) (2022-09-02)
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
### :bug: Bug Fix
|
|
116
|
-
|
|
117
|
-
* fix types (#510) ([96adfd7](https://github.com/naver/egjs-infinitegrid/commit/96adfd7bd66c6d77015818417990339da1b59311))
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
### :mega: Other
|
|
121
|
-
|
|
122
|
-
* update packages versions ([e438c00](https://github.com/naver/egjs-infinitegrid/commit/e438c00929ba28bd001d6174bd57efd918144686))
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
## [4.6.0](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.5.0...@egjs/svelte-infinitegrid@4.6.0) (2022-07-26)
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
### :mega: Other
|
|
130
|
-
|
|
131
|
-
* update packages versions ([d4aa615](https://github.com/naver/egjs-infinitegrid/commit/d4aa615a8cd3e25b621500e2a7b243dcc9696eef))
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
## [4.5.0](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.4.0...@egjs/svelte-infinitegrid@4.5.0) (2022-06-23)
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
### :mega: Other
|
|
139
|
-
|
|
140
|
-
* update packages versions ([171bb74](https://github.com/naver/egjs-infinitegrid/commit/171bb74f708110a2fd986276c9b8d65472fa64ab))
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
## [4.4.0](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.3.1...@egjs/svelte-infinitegrid@4.4.0) (2022-05-25)
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
### :mega: Other
|
|
148
|
-
|
|
149
|
-
* update packages versions ([29bdea0](https://github.com/naver/egjs-infinitegrid/commit/29bdea08f334113e4a73180dd5f9e803c4befc99))
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
## [4.3.1](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.3.0...@egjs/svelte-infinitegrid@4.3.1) (2022-05-17)
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
### :mega: Other
|
|
157
|
-
|
|
158
|
-
* update packages versions ([47f9348](https://github.com/naver/egjs-infinitegrid/commit/47f9348042e19c789b986ec936ed042a3838afc8))
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
## [4.3.0](https://github.com/naver/egjs-infinitegrid/compare/@egjs/svelte-infinitegrid@4.2.1...@egjs/svelte-infinitegrid@4.3.0) (2022-05-13)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
### :mega: Other
|
|
166
|
-
|
|
167
|
-
* update packages versions ([bc07e37](https://github.com/naver/egjs-infinitegrid/commit/bc07e37a5fb40e94f87cd1b07f1f7a843ddbe7e8))
|
package/global.d.ts
DELETED
package/rollup.build.config.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import buildHelper from "@egjs/build-helper";
|
|
2
|
-
import svelte from "rollup-plugin-svelte";
|
|
3
|
-
import sveltePreprocess from "svelte-preprocess";
|
|
4
|
-
|
|
5
|
-
const defaultOptions = {
|
|
6
|
-
tsconfig: "",
|
|
7
|
-
commonjs: true,
|
|
8
|
-
external: {
|
|
9
|
-
svelte: "svelte",
|
|
10
|
-
},
|
|
11
|
-
plugins: [
|
|
12
|
-
svelte({
|
|
13
|
-
preprocess: sveltePreprocess(),
|
|
14
|
-
}),
|
|
15
|
-
],
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
export default buildHelper([
|
|
19
|
-
{
|
|
20
|
-
...defaultOptions,
|
|
21
|
-
input: "./src/index.umd.js",
|
|
22
|
-
output: "dist/infinitegrid.cjs.js",
|
|
23
|
-
format: "cjs",
|
|
24
|
-
},
|
|
25
|
-
{
|
|
26
|
-
...defaultOptions,
|
|
27
|
-
input: "./src/index.js",
|
|
28
|
-
output: "dist/infinitegrid.esm.js",
|
|
29
|
-
format: "es",
|
|
30
|
-
exports: "named",
|
|
31
|
-
},
|
|
32
|
-
]);
|
package/rollup.config.js
DELETED
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import svelte from 'rollup-plugin-svelte';
|
|
2
|
-
import commonjs from '@rollup/plugin-commonjs';
|
|
3
|
-
import resolve from '@rollup/plugin-node-resolve';
|
|
4
|
-
import livereload from 'rollup-plugin-livereload';
|
|
5
|
-
import { terser } from 'rollup-plugin-terser';
|
|
6
|
-
import sveltePreprocess from 'svelte-preprocess';
|
|
7
|
-
import typescript from '@rollup/plugin-typescript';
|
|
8
|
-
import css from 'rollup-plugin-css-only';
|
|
9
|
-
|
|
10
|
-
const production = !process.env.ROLLUP_WATCH;
|
|
11
|
-
|
|
12
|
-
function serve() {
|
|
13
|
-
let server;
|
|
14
|
-
|
|
15
|
-
function toExit() {
|
|
16
|
-
if (server) server.kill(0);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
return {
|
|
20
|
-
writeBundle() {
|
|
21
|
-
if (server) return;
|
|
22
|
-
server = require('child_process').spawn('npm', ['run', 'start', '--', '--dev'], {
|
|
23
|
-
stdio: ['ignore', 'inherit', 'inherit'],
|
|
24
|
-
shell: true
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
process.on('SIGTERM', toExit);
|
|
28
|
-
process.on('exit', toExit);
|
|
29
|
-
}
|
|
30
|
-
};
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default {
|
|
34
|
-
input: 'src/main.ts',
|
|
35
|
-
output: {
|
|
36
|
-
sourcemap: true,
|
|
37
|
-
format: 'iife',
|
|
38
|
-
name: 'app',
|
|
39
|
-
file: 'public/build/bundle.js'
|
|
40
|
-
},
|
|
41
|
-
plugins: [
|
|
42
|
-
svelte({
|
|
43
|
-
preprocess: sveltePreprocess({ sourceMap: !production }),
|
|
44
|
-
compilerOptions: {
|
|
45
|
-
// enable run-time checks when not in production
|
|
46
|
-
dev: !production
|
|
47
|
-
}
|
|
48
|
-
}),
|
|
49
|
-
// we'll extract any component CSS out into
|
|
50
|
-
// a separate file - better for performance
|
|
51
|
-
css({ output: 'bundle.css' }),
|
|
52
|
-
|
|
53
|
-
// If you have external dependencies installed from
|
|
54
|
-
// npm, you'll most likely need these plugins. In
|
|
55
|
-
// some cases you'll need additional configuration -
|
|
56
|
-
// consult the documentation for details:
|
|
57
|
-
// https://github.com/rollup/plugins/tree/master/packages/commonjs
|
|
58
|
-
resolve({
|
|
59
|
-
browser: true,
|
|
60
|
-
dedupe: ['svelte']
|
|
61
|
-
}),
|
|
62
|
-
commonjs(),
|
|
63
|
-
typescript({
|
|
64
|
-
sourceMap: !production,
|
|
65
|
-
inlineSources: !production
|
|
66
|
-
}),
|
|
67
|
-
|
|
68
|
-
// In dev mode, call `npm run start` once
|
|
69
|
-
// the bundle has been generated
|
|
70
|
-
!production && serve(),
|
|
71
|
-
|
|
72
|
-
// Watch the `public` directory and refresh the
|
|
73
|
-
// browser on changes when not in production
|
|
74
|
-
!production && livereload('public'),
|
|
75
|
-
|
|
76
|
-
// If we're building for production (npm run build
|
|
77
|
-
// instead of npm run dev), minify
|
|
78
|
-
production && terser()
|
|
79
|
-
],
|
|
80
|
-
watch: {
|
|
81
|
-
clearScreen: false
|
|
82
|
-
}
|
|
83
|
-
};
|