@coffer-org/plugin-core 1.1.0 → 1.2.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/index.d.ts CHANGED
@@ -1,3 +1,2 @@
1
1
  declare const _default: import("@coffer-org/sdk/plugin").PluginManifest;
2
2
  export default _default;
3
- //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,21 +1,28 @@
1
- /**
2
- * Базовий плагін 'core'. Кореневий вузол дерева залежностей.
3
- *
4
- * Реєструє вбудовані іменовані списки опцій:
5
- * - 'countries' — усі країни ISO 3166-1 alpha-2 (i18n-ключі core.countries.*)
6
- * - 'colors' — 113-кольорова палітра (slug як value, label = i18n core.colors.<slug>)
7
- * - 'sex' — стать (i18n-ключі core.sex.*)
8
- * - 'languages' — усі мови ISO 639-1 (native-назви як label)
9
- */
10
1
  import { definePlugin } from '@coffer-org/sdk/plugin';
11
2
  import { COUNTRIES } from '@coffer-org/sdk/countries';
12
3
  import { BASIC_COLORS } from '@coffer-org/sdk/color-names';
13
- import { SEX_OPTIONS, LANGUAGES } from '@coffer-org/sdk/fields';
4
+ import { field, SEX_OPTIONS, LANGUAGES, WEEKDAY_OPTIONS } from '@coffer-org/sdk/fields';
14
5
  import { CURRENCY_CODES, currencySymbol, currencyName } from '@coffer-org/sdk/currencies';
6
+ import { defineSettings } from '@coffer-org/sdk/settings';
15
7
  export default definePlugin({
16
8
  id: 'core',
17
9
  version: '1.0.0',
18
10
  dependsOn: [],
11
+ settings: defineSettings({
12
+ label: 'core.settings.label',
13
+ fields: [
14
+ field.select({
15
+ key: 'language',
16
+ label: 'core.settings.language',
17
+ default: 'uk',
18
+ options: [
19
+ { value: 'uk', title: 'Українська' },
20
+ { value: 'ru', title: 'Русский' },
21
+ { value: 'en', title: 'English' },
22
+ ],
23
+ }),
24
+ ],
25
+ }),
19
26
  optionLists: [
20
27
  {
21
28
  name: 'countries',
@@ -39,6 +46,10 @@ export default definePlugin({
39
46
  name: 'sex',
40
47
  options: [...SEX_OPTIONS],
41
48
  },
49
+ {
50
+ name: 'weekdays',
51
+ options: [...WEEKDAY_OPTIONS],
52
+ },
42
53
  {
43
54
  name: 'languages',
44
55
  options: LANGUAGES.map((l) => ({ value: l.code, title: l.name })),
@@ -51,7 +62,5 @@ export default definePlugin({
51
62
  subtitle: currencySymbol(code),
52
63
  })),
53
64
  },
54
- // service-types / access-types переїхали у plugin-devices (домен «мережа»).
55
65
  ],
56
66
  });
57
- //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,10 @@
1
1
  {
2
2
  "name": "@coffer-org/plugin-core",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "type": "module",
5
+ "engines": {
6
+ "node": ">=24"
7
+ },
5
8
  "files": [
6
9
  "dist"
7
10
  ],
@@ -17,6 +20,6 @@
17
20
  "postpack": "node ../../scripts/swap-exports.mjs src"
18
21
  },
19
22
  "dependencies": {
20
- "@coffer-org/sdk": "^1.1.0"
23
+ "@coffer-org/sdk": "^1.2.0"
21
24
  }
22
25
  }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAeA,wBAyCG"}
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1F,eAAe,YAAY,CAAC;IAC1B,EAAE,EAAE,MAAM;IACV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