alytus-ff 0.1.3 → 0.1.4
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/.idea/alytus-ff.iml +1 -1
- package/.idea/compiler.xml +8 -0
- package/.idea/misc.xml +1 -1
- package/README.md +11 -0
- package/dist/alytus-ff.es.js +29 -23
- package/dist/alytus-ff.umd.js +1 -1
- package/dist/components/Page/PageTitle.vue.d.ts +12 -0
- package/dist/components/index.d.ts +1 -0
- package/{index.ts → dist/index.d.ts} +1 -2
- package/dist/types/base.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/utils/data_sync.d.ts +6 -0
- package/dist/utils/date.d.ts +1 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +6 -6
- package/src/components/index.ts +1 -0
- package/src/index.ts +2 -0
- package/src/types/base.js +2 -0
- package/src/types/base.js.map +1 -0
- package/src/types/base.ts +4 -0
- package/src/utils/data_sync.js +24 -0
- package/src/utils/data_sync.js.map +1 -0
- package/src/utils/data_sync.ts +25 -0
- package/src/utils/date.js +7 -0
- package/src/utils/date.js.map +1 -0
- package/src/utils/index.ts +2 -0
- package/tsconfig.json +3 -0
- package/types/components/index.d.ts +1 -0
- package/types/index.d.ts +2 -0
- package/vite.config.ts +10 -2
- package/components/index.ts +0 -4
- package/dist/style.css +0 -1
- package/index.d.ts +0 -8
- package/utils/index.ts +0 -4
package/.idea/alytus-ff.iml
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<module type="PYTHON_MODULE" version="4">
|
|
3
3
|
<component name="NewModuleRootManager">
|
|
4
4
|
<content url="file://$MODULE_DIR$" />
|
|
5
|
-
<orderEntry type="
|
|
5
|
+
<orderEntry type="jdk" jdkName="Remote Python 3.12.1 Docker Compose (django at [/Users/eivinas/Dev/CafeMenu/docker-compose.yml])" jdkType="Python SDK" />
|
|
6
6
|
<orderEntry type="sourceFolder" forTests="false" />
|
|
7
7
|
</component>
|
|
8
8
|
</module>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
+
<project version="4">
|
|
3
|
+
<component name="TypeScriptCompiler">
|
|
4
|
+
<option name="nodeInterpreterTextField" value="$USER_HOME$/.nvm/versions/node/v20.17.0/bin/node" />
|
|
5
|
+
<option name="recompileOnChanges" value="true" />
|
|
6
|
+
<option name="versionType" value="EMBEDDED" />
|
|
7
|
+
</component>
|
|
8
|
+
</project>
|
package/.idea/misc.xml
CHANGED
|
@@ -3,5 +3,5 @@
|
|
|
3
3
|
<component name="Black">
|
|
4
4
|
<option name="sdkName" value="Python 2.7" />
|
|
5
5
|
</component>
|
|
6
|
-
<component name="ProjectRootManager" version="2" project-jdk-name="Python
|
|
6
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="Remote Python 3.12.1 Docker Compose (django at [/Users/eivinas/Dev/CafeMenu/docker-compose.yml])" project-jdk-type="Python SDK" />
|
|
7
7
|
</project>
|
package/README.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
1
|
|
|
2
2
|
# Alytus-ff
|
|
3
3
|
|
|
4
|
+
## Publish
|
|
5
|
+
|
|
6
|
+
````commandline
|
|
7
|
+
npm version patch # For patch updates (1.0.1 -> 1.0.2)
|
|
8
|
+
npm version minor # For minor updates (1.0.1 -> 1.1.0)
|
|
9
|
+
npm version major # For major updates (1.0.1 -> 2.0.0)
|
|
10
|
+
|
|
11
|
+
npm run build
|
|
12
|
+
|
|
13
|
+
npm publish
|
|
14
|
+
````
|
package/dist/alytus-ff.es.js
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as n } from "vue";
|
|
2
|
+
const p = (r) => {
|
|
3
|
+
if (typeof r == "object")
|
|
4
|
+
return r;
|
|
5
|
+
const t = r.substr(0, 10).split("-");
|
|
6
|
+
return new Date(parseInt(t[0], 10), parseInt(t[1], 10) - 1, t.length <= 2 ? 1 : parseInt(t[2], 10));
|
|
7
|
+
}, o = (r, t) => {
|
|
8
|
+
for (const e in r)
|
|
9
|
+
if (r[e].id === t.id) {
|
|
10
|
+
r[e] = t;
|
|
11
|
+
return;
|
|
12
|
+
}
|
|
13
|
+
r.push(t);
|
|
14
|
+
}, i = (r, t) => {
|
|
15
|
+
for (const e in t)
|
|
16
|
+
Object.prototype.hasOwnProperty.call(t, e) && (r[e] = t[e]);
|
|
17
|
+
}, a = (r, t) => {
|
|
18
|
+
for (let e = 0; e < r.length; e++)
|
|
19
|
+
if (r[e].id === t) {
|
|
20
|
+
r.splice(e, 1);
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
n({
|
|
3
25
|
name: "PageTitle",
|
|
4
26
|
props: {
|
|
5
27
|
title: {
|
|
@@ -7,26 +29,10 @@ const u = a({
|
|
|
7
29
|
required: !0
|
|
8
30
|
}
|
|
9
31
|
}
|
|
10
|
-
})
|
|
11
|
-
const n = t.__vccOpts || t;
|
|
12
|
-
for (const [o, r] of e)
|
|
13
|
-
n[o] = r;
|
|
14
|
-
return n;
|
|
15
|
-
}, f = { class: "mt-6 mb-3 ec-page-title" }, _ = { class: "text-h5 font-weight-bold" };
|
|
16
|
-
function m(t, e, n, o, r, g) {
|
|
17
|
-
return c(), p("div", f, [
|
|
18
|
-
s("span", _, i(t.title), 1),
|
|
19
|
-
s("div", null, [
|
|
20
|
-
l(t.$slots, "buttons")
|
|
21
|
-
])
|
|
22
|
-
]);
|
|
23
|
-
}
|
|
24
|
-
const b = /* @__PURE__ */ d(u, [["render", m]]), y = (t) => {
|
|
25
|
-
if (typeof t == "object") return t;
|
|
26
|
-
const e = t.substr(0, 10).split("-");
|
|
27
|
-
return new Date(parseInt(e[0], 10), parseInt(e[1], 10) - 1, e.length <= 2 ? 1 : parseInt(e[2], 10));
|
|
28
|
-
};
|
|
32
|
+
});
|
|
29
33
|
export {
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
p as parseSysDate,
|
|
35
|
+
a as removeFromListById,
|
|
36
|
+
i as syncItemChanges,
|
|
37
|
+
o as syncToList
|
|
32
38
|
};
|
package/dist/alytus-ff.umd.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(r,s){typeof exports=="object"&&typeof module<"u"?s(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],s):(r=typeof globalThis<"u"?globalThis:r||self,s(r["Alytus-FF"]={},r.Vue))})(this,function(r,s){"use strict";const i=e=>{if(typeof e=="object")return e;const t=e.substr(0,10).split("-");return new Date(parseInt(t[0],10),parseInt(t[1],10)-1,t.length<=2?1:parseInt(t[2],10))},o=(e,t)=>{for(const n in e)if(e[n].id===t.id){e[n]=t;return}e.push(t)},p=(e,t)=>{for(const n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},u=(e,t)=>{for(let n=0;n<e.length;n++)if(e[n].id===t){e.splice(n,1);return}};s.defineComponent({name:"PageTitle",props:{title:{type:String,required:!0}}}),r.parseSysDate=i,r.removeFromListById=u,r.syncItemChanges=p,r.syncToList=o,Object.defineProperty(r,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
declare const _default: import('vue').DefineComponent<{
|
|
2
|
+
title: {
|
|
3
|
+
type: StringConstructor;
|
|
4
|
+
required: true;
|
|
5
|
+
};
|
|
6
|
+
}, unknown, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
7
|
+
title: {
|
|
8
|
+
type: StringConstructor;
|
|
9
|
+
required: true;
|
|
10
|
+
};
|
|
11
|
+
}>>, {}, {}>;
|
|
12
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Page/PageTitle.vue';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { Dict } from '../types/base';
|
|
2
|
+
export declare const syncToList: (collection: Dict[], item: Dict) => void;
|
|
3
|
+
export declare const syncItemChanges: (obj: Dict, changes: Dict) => void;
|
|
4
|
+
export declare const removeFromListById: (collection: {
|
|
5
|
+
id: number;
|
|
6
|
+
}[], item_id: number) => void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const parseSysDate: (d_str: string) => Date;
|
package/package.json
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "alytus-ff",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.4",
|
|
5
5
|
"description": "Frontend framework",
|
|
6
6
|
"main": "index.ts",
|
|
7
|
-
"types": "index.d.ts",
|
|
7
|
+
"types": "dist/types/index.d.ts",
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "
|
|
10
|
-
"build
|
|
11
|
-
"test": "echo \"Error: no test specified\" && exit 1"
|
|
9
|
+
"build": "vite build",
|
|
10
|
+
"build:types": "vue-tsc --declaration --emitDeclarationOnly --outDir dist/types"
|
|
12
11
|
},
|
|
13
12
|
"author": "EG",
|
|
14
13
|
"license": "ISC",
|
|
@@ -22,6 +21,7 @@
|
|
|
22
21
|
"sass": "^1.77.8",
|
|
23
22
|
"sass-loader": "^16.0.1",
|
|
24
23
|
"typescript": "^5.5.4",
|
|
25
|
-
"vite": "^5.4.2"
|
|
24
|
+
"vite": "^5.4.2",
|
|
25
|
+
"vite-plugin-dts": "^4.2.1"
|
|
26
26
|
}
|
|
27
27
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Page/PageTitle.vue"
|
package/src/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.js","sourceRoot":"","sources":["base.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export const syncToList = (collection, item) => {
|
|
2
|
+
for (const i in collection) {
|
|
3
|
+
if (collection[i].id === item.id) {
|
|
4
|
+
collection[i] = item;
|
|
5
|
+
return;
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
collection.push(item);
|
|
9
|
+
};
|
|
10
|
+
export const syncItemChanges = (obj, changes) => {
|
|
11
|
+
for (const prop in changes) {
|
|
12
|
+
if (Object.prototype.hasOwnProperty.call(changes, prop))
|
|
13
|
+
obj[prop] = changes[prop];
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
export const removeFromListById = (collection, item_id) => {
|
|
17
|
+
for (let i = 0; i < collection.length; i++) {
|
|
18
|
+
if (collection[i].id === item_id) {
|
|
19
|
+
collection.splice(i, 1);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=data_sync.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data_sync.js","sourceRoot":"","sources":["data_sync.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,UAAkB,EAAE,IAAU,EAAE,EAAE;IACzD,KAAK,MAAM,CAAC,IAAI,UAAU,EAAE;QACxB,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,EAAE;YAC9B,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAA;YACpB,OAAM;SACT;KACJ;IACD,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAS,EAAE,OAAa,EAAE,EAAE;IACxD,KAAK,MAAM,IAAI,IAAI,OAAO,EAAE;QACxB,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC;YACnD,GAAG,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;KACjC;AACL,CAAC,CAAA;AACD,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,UAA4B,EAAE,OAAe,EAAE,EAAE;IAChF,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACxC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,EAAE;YAC9B,UAAU,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;YACxB,OAAO;SACV;KACJ;AACL,CAAC,CAAA"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import {Dict} from "@/types/base";
|
|
2
|
+
|
|
3
|
+
export const syncToList = (collection: Dict[], item: Dict) => {
|
|
4
|
+
for (const i in collection) {
|
|
5
|
+
if (collection[i].id === item.id) {
|
|
6
|
+
collection[i] = item
|
|
7
|
+
return
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
collection.push(item);
|
|
11
|
+
}
|
|
12
|
+
export const syncItemChanges = (obj: Dict, changes: Dict) => {
|
|
13
|
+
for (const prop in changes) {
|
|
14
|
+
if (Object.prototype.hasOwnProperty.call(changes, prop))
|
|
15
|
+
obj[prop] = changes[prop];
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
export const removeFromListById = (collection: { id: number }[], item_id: number) => {
|
|
19
|
+
for (let i = 0; i < collection.length; i++) {
|
|
20
|
+
if (collection[i].id === item_id) {
|
|
21
|
+
collection.splice(i, 1);
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export const parseSysDate = (d_str) => {
|
|
2
|
+
if (typeof (d_str) === "object")
|
|
3
|
+
return d_str;
|
|
4
|
+
const arr = d_str.substr(0, 10).split("-");
|
|
5
|
+
return new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, arr.length <= 2 ? 1 : parseInt(arr[2], 10));
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=date.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date.js","sourceRoot":"","sources":["date.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAa,EAAE,EAAE;IAC1C,IAAI,OAAM,CAAC,KAAK,CAAC,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC7C,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC3C,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,GAAG,CAAC,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;AAChH,CAAC,CAAA"}
|
package/tsconfig.json
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
+
"declaration": true, // Generate declaration files (.d.ts)
|
|
4
|
+
"declarationDir": "types", // Specify the output directory for declaration files
|
|
5
|
+
"emitDeclarationOnly": true, // Only emit .d.ts files, no JavaScript
|
|
3
6
|
"target": "esnext",
|
|
4
7
|
"module": "esnext",
|
|
5
8
|
"moduleResolution": "node",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Page/PageTitle.vue";
|
package/types/index.d.ts
ADDED
package/vite.config.ts
CHANGED
|
@@ -1,11 +1,19 @@
|
|
|
1
1
|
import { defineConfig } from 'vite';
|
|
2
2
|
import vue from '@vitejs/plugin-vue';
|
|
3
|
+
import dts from 'vite-plugin-dts';
|
|
3
4
|
|
|
4
5
|
export default defineConfig({
|
|
5
|
-
plugins: [
|
|
6
|
+
plugins: [
|
|
7
|
+
vue(),
|
|
8
|
+
dts({
|
|
9
|
+
outputDir: 'dist/types', // Output directory for .d.ts files
|
|
10
|
+
insertTypesEntry: true, // Generates an entry file for types
|
|
11
|
+
copyDtsFiles: true, // Copies .d.ts files to the output directory
|
|
12
|
+
})
|
|
13
|
+
],
|
|
6
14
|
build: {
|
|
7
15
|
lib: {
|
|
8
|
-
entry: './index.ts',
|
|
16
|
+
entry: './src/index.ts',
|
|
9
17
|
name: 'Alytus-FF',
|
|
10
18
|
fileName: (format) => `alytus-ff.${format}.js`,
|
|
11
19
|
},
|
package/components/index.ts
DELETED
package/dist/style.css
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.ec-page-title,.ec-page-subtitle{display:flex;justify-content:space-between;align-items:center}.ec-page-title .v-btn,.ec-page-subtitle .v-btn{text-transform:unset;letter-spacing:.045em}
|
package/index.d.ts
DELETED
package/utils/index.ts
DELETED