not-bulma 1.0.43 → 1.0.44
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/package.json +2 -2
- package/src/frame/index.js +44 -40
- package/src/frame/stores.js +56 -0
package/package.json
CHANGED
package/src/frame/index.js
CHANGED
|
@@ -3,67 +3,71 @@
|
|
|
3
3
|
/*
|
|
4
4
|
Common functions
|
|
5
5
|
*/
|
|
6
|
-
import notCommon from
|
|
6
|
+
import notCommon from "./common.js";
|
|
7
7
|
|
|
8
8
|
/*
|
|
9
9
|
framework wide parser for data access
|
|
10
10
|
*/
|
|
11
|
-
import notPath from
|
|
11
|
+
import notPath from "not-path";
|
|
12
12
|
|
|
13
|
+
import notRouter from "./router.js";
|
|
13
14
|
|
|
14
|
-
import
|
|
15
|
-
|
|
16
|
-
import * as notAPI from './api';
|
|
15
|
+
import * as notAPI from "./api";
|
|
16
|
+
import * as notStores from "./stores";
|
|
17
17
|
/*
|
|
18
18
|
basic event handlers and core data modifiers
|
|
19
19
|
*/
|
|
20
|
-
import notBase from
|
|
20
|
+
import notBase from "./base.js";
|
|
21
21
|
|
|
22
|
-
import {COMPONENTS, FIELDS, VARIANTS} from
|
|
22
|
+
import { COMPONENTS, FIELDS, VARIANTS } from "./LIB.js";
|
|
23
23
|
/*
|
|
24
24
|
application main infrastructure setter
|
|
25
25
|
*/
|
|
26
|
-
import notApp from
|
|
26
|
+
import notApp from "./app.js";
|
|
27
27
|
/*
|
|
28
28
|
user controllers
|
|
29
29
|
*/
|
|
30
|
-
import notController from
|
|
31
|
-
import notRecord from
|
|
32
|
-
import notInterface from
|
|
30
|
+
import notController from "./controller.js";
|
|
31
|
+
import notRecord from "./record.js"; // wrapper for data with server live interactions
|
|
32
|
+
import notInterface from "./interface.js"; // wrapper for data with server live interactions
|
|
33
33
|
|
|
34
34
|
import {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
} from
|
|
35
|
+
notTable,
|
|
36
|
+
UIForm,
|
|
37
|
+
notForm,
|
|
38
|
+
notFormSet,
|
|
39
|
+
notFormUtils,
|
|
40
|
+
notBreadcrumbs,
|
|
41
|
+
notTopMenu,
|
|
42
|
+
notSideMenu,
|
|
43
|
+
} from "./components";
|
|
44
44
|
|
|
45
|
-
import notCRUD from
|
|
45
|
+
import notCRUD from "./crud/controller.crud.js";
|
|
46
46
|
|
|
47
47
|
const ncCRUD = notCRUD; //legacy alias
|
|
48
48
|
|
|
49
49
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
50
|
+
notCommon,
|
|
51
|
+
notPath,
|
|
52
|
+
notController,
|
|
53
|
+
notBase,
|
|
54
|
+
notRouter,
|
|
55
|
+
notRecord,
|
|
56
|
+
notInterface,
|
|
57
|
+
notApp,
|
|
58
|
+
notAPI,
|
|
59
|
+
notStores,
|
|
60
|
+
notCRUD,
|
|
61
|
+
ncCRUD,
|
|
62
|
+
COMPONENTS,
|
|
63
|
+
FIELDS,
|
|
64
|
+
VARIANTS,
|
|
65
|
+
notTable,
|
|
66
|
+
UIForm,
|
|
67
|
+
notForm,
|
|
68
|
+
notFormSet,
|
|
69
|
+
notFormUtils,
|
|
70
|
+
notBreadcrumbs,
|
|
71
|
+
notTopMenu,
|
|
72
|
+
notSideMenu,
|
|
69
73
|
};
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { writable } from "svelte/store";
|
|
2
|
+
|
|
3
|
+
const ALL = {};
|
|
4
|
+
|
|
5
|
+
function exist(key) {
|
|
6
|
+
return Object.hasOwn(ALL, key);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
function get(key) {
|
|
10
|
+
if (exist(key)) {
|
|
11
|
+
return ALL[key];
|
|
12
|
+
} else {
|
|
13
|
+
return false;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function create(
|
|
18
|
+
key,
|
|
19
|
+
props = {
|
|
20
|
+
raw: [],
|
|
21
|
+
filtered: [],
|
|
22
|
+
selected: {},
|
|
23
|
+
}
|
|
24
|
+
) {
|
|
25
|
+
if (!exist(key)) {
|
|
26
|
+
if (Object.keys(props).length > 0) {
|
|
27
|
+
ALL[key] = {};
|
|
28
|
+
Object.keys(props).forEach((name) => {
|
|
29
|
+
ALL[key][name] = writable(props[name]);
|
|
30
|
+
});
|
|
31
|
+
} else {
|
|
32
|
+
throw new Error("store's props wasn't specified");
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return ALL[key];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Creates object that is fake Store
|
|
40
|
+
* Some time this is useful when you need to initialize local var,
|
|
41
|
+
* before you could get actual Stores from central storage by its ID
|
|
42
|
+
* @params {mixed} val data of type that is actual storage will contain
|
|
43
|
+
* @returns {Object}
|
|
44
|
+
*/
|
|
45
|
+
|
|
46
|
+
function fake(val) {
|
|
47
|
+
return {
|
|
48
|
+
subscribe(f) {
|
|
49
|
+
f(val);
|
|
50
|
+
return () => {};
|
|
51
|
+
},
|
|
52
|
+
set() {},
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export { create, get, fake };
|