@shwfed/config 1.0.0 → 1.1.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/README.md +1 -0
- package/dist/module.json +1 -1
- package/dist/module.mjs +169 -23
- package/dist/runtime/components/config/footer.vue +0 -2
- package/dist/runtime/components/config/index.vue +13 -3
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue +85 -10
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/runtime.vue +18 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.daterange/schema.js +11 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue +85 -10
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/runtime.vue +18 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.datetimerange/schema.js +11 -4
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.d.vue.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue +87 -11
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/config.vue.d.ts +2 -2
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/runtime.vue +18 -6
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.d.ts +1 -1
- package/dist/runtime/components/form/fields/2026-04-27/com.shwfed.form.field.timerange/schema.js +11 -4
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/config.vue +3 -0
- package/dist/runtime/components/form/fields/2026-05-12/com.shwfed.form.field.upload/runtime.vue +8 -0
- package/dist/runtime/components/form/index.vue +2 -2
- package/dist/runtime/components/table/ai/columns-button.vue +91 -98
- package/dist/runtime/components/table/ai/data-source-button.vue +88 -95
- package/dist/runtime/components/table/index.vue +5 -7
- package/dist/runtime/plugins/ai/index.d.ts +1 -5
- package/dist/runtime/plugins/ai/index.js +185 -441
- package/dist/runtime/plugins/cel/index.js +7 -0
- package/dist/runtime/vendor/cel-js/PROMPT.md +8 -0
- package/package.json +4 -4
- package/dist/chunks/index.mjs +0 -212742
- package/dist/runtime/components/ai/byok-button.d.vue.ts +0 -3
- package/dist/runtime/components/ai/byok-button.vue +0 -48
- package/dist/runtime/components/ai/byok-button.vue.d.ts +0 -3
- package/dist/runtime/components/ai/byok-settings.d.vue.ts +0 -3
- package/dist/runtime/components/ai/byok-settings.vue +0 -282
- package/dist/runtime/components/ai/byok-settings.vue.d.ts +0 -3
- package/dist/runtime/plugins/ai/gate.d.ts +0 -1
- package/dist/runtime/plugins/ai/gate.js +0 -8
- package/dist/runtime/plugins/ai/settings-state.d.ts +0 -1
- package/dist/runtime/plugins/ai/settings-state.js +0 -2
- package/dist/runtime/plugins/ai/store.d.ts +0 -17
- package/dist/runtime/plugins/ai/store.js +0 -40
- package/dist/shared/config.DW2OtAXe.mjs +0 -86529
|
@@ -33,6 +33,13 @@ export default defineNuxtPlugin({
|
|
|
33
33
|
"media(string): bool",
|
|
34
34
|
(_self, q) => typeof window !== "undefined" && window.matchMedia(q).matches
|
|
35
35
|
);
|
|
36
|
+
env.registerFunction(
|
|
37
|
+
"list<number>.sum(): number",
|
|
38
|
+
(list) => list.reduce(
|
|
39
|
+
(acc, n) => acc.add(n),
|
|
40
|
+
Decimal.from(0)
|
|
41
|
+
)
|
|
42
|
+
);
|
|
36
43
|
return {
|
|
37
44
|
provide: {
|
|
38
45
|
cel: (expression, context) => {
|
|
@@ -103,6 +103,14 @@ size(b"data") // 4
|
|
|
103
103
|
[1, 2].size() // 2
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
+
### List aggregations
|
|
107
|
+
```cel
|
|
108
|
+
[1, 2, 3].sum() // 6
|
|
109
|
+
[1.5, 2.5].sum() // 4
|
|
110
|
+
items.map(i, i.price).sum() // total of mapped prices
|
|
111
|
+
```
|
|
112
|
+
Receiver must be statically typed `list<number>`. Works on number literals and `.map(...)` results; an unlisted variable typed as `dyn` will not match — wrap or type it first.
|
|
113
|
+
|
|
106
114
|
### String methods
|
|
107
115
|
```cel
|
|
108
116
|
"hello".contains("ell") // true
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shwfed/config",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Configurable UI for SHWFED",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dev": "npm run dev:prepare && nuxt dev playground",
|
|
33
33
|
"dev:build": "nuxt build playground",
|
|
34
34
|
"dev:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare playground",
|
|
35
|
-
"release": "npm run lint && npm run test && npm run prepack &&
|
|
35
|
+
"release": "npm run lint && npm run test && npm run prepack && bumpp && npm publish",
|
|
36
36
|
"lint": "eslint .",
|
|
37
37
|
"test": "vitest run",
|
|
38
38
|
"test:watch": "vitest watch",
|
|
@@ -44,6 +44,7 @@
|
|
|
44
44
|
"@date-fns/tz": "^1.4.1",
|
|
45
45
|
"@iconify/vue": "^5.0.1",
|
|
46
46
|
"@internationalized/date": "^3.12.1",
|
|
47
|
+
"@intlify/unplugin-vue-i18n": "^11.1.2",
|
|
47
48
|
"@nuxt/kit": "^4.4.5",
|
|
48
49
|
"@tailwindcss/typography": "^0.5.19",
|
|
49
50
|
"@tailwindcss/vite": "^4.3.0",
|
|
@@ -70,7 +71,6 @@
|
|
|
70
71
|
"devDependencies": {
|
|
71
72
|
"@commitlint/cli": "^21.0.0",
|
|
72
73
|
"@commitlint/config-conventional": "^21.0.0",
|
|
73
|
-
"@intlify/unplugin-vue-i18n": "^11.1.2",
|
|
74
74
|
"@nuxt/devtools": "^4.0.0-alpha.3",
|
|
75
75
|
"@nuxt/eslint-config": "^1.15.2",
|
|
76
76
|
"@nuxt/module-builder": "^1.0.2",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"@types/node": "25.7.0",
|
|
81
81
|
"@vitejs/plugin-vue": "^6.0.6",
|
|
82
82
|
"@vue/test-utils": "^2.4.10",
|
|
83
|
-
"
|
|
83
|
+
"bumpp": "^11.1.0",
|
|
84
84
|
"eslint": "^10.3.0",
|
|
85
85
|
"husky": "^9.1.7",
|
|
86
86
|
"jsdom": "^29.1.1",
|