@webx-ui/module-catalog-brands 0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 webx-ui
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,34 @@
1
+ # @webx-ui/module-catalog-brands
2
+
3
+ Brands for the catalogue of the [WebX UI](https://github.com/webx-ui/webx-ui) admin panel: a logo,
4
+ a description and a page of their own, one per product, a choice of the filter.
5
+
6
+ The other half is the Composer package `webx-ui/module-catalog-brands`, which owns the brands, their
7
+ addresses and pages, the field of the product form, the column and the facet of the list, and the
8
+ bulk action «Set the brand». The section appears in the panel when both halves are installed,
9
+ beside `@webx-ui/module-catalog`.
10
+
11
+ ## Install
12
+
13
+ ```bash
14
+ npm install @webx-ui/module-catalog-brands
15
+ ```
16
+
17
+ ```ts
18
+ import { createAdmin } from '@webx-ui/module-admin'
19
+ import { catalog } from '@webx-ui/module-catalog'
20
+ import { catalogBrands } from '@webx-ui/module-catalog-brands'
21
+ import { media } from '@webx-ui/module-media'
22
+ import '@webx-ui/module-catalog/style.css'
23
+ import '@webx-ui/module-catalog-brands/style.css'
24
+
25
+ createAdmin({
26
+ basePath: '/cms',
27
+ modules: [...catalog(), ...catalogBrands(), media()],
28
+ }).mount()
29
+ ```
30
+
31
+ `catalogBrands()` is one section — the list of brands in the order of the site, and the page of
32
+ one: «Main» (name, address, logo, published, featured), «Description», «SEO» and «History». The
33
+ logo is picked from the library of `@webx-ui/module-media`. The brand field of the product form, the
34
+ column and the filter of the list come through the catalogue's registries and need nothing here.
@@ -0,0 +1,2 @@
1
+ export { catalogBrands, catalogBrandsOptions, type CatalogBrandsOptions } from './module';
2
+ export { catalogBrandsMessages } from './messages';
package/dist/index.js ADDED
@@ -0,0 +1,62 @@
1
+ import { dictionarySection as a, dictionaryOptions as s } from "@webx-ui/module-catalog";
2
+ const r = {
3
+ module: {
4
+ title: "Brands",
5
+ brand: "Brand"
6
+ },
7
+ brand: {
8
+ title: "Name",
9
+ slug: "Address",
10
+ "slug-help": "The brand's page and its value in the filter's address: /brands/apple/, /laptops/brand_apple/.",
11
+ description: "Description",
12
+ "description-help": "The text at the top of the brand's page.",
13
+ logo_id: "Logo",
14
+ is_visible: "Published",
15
+ "visible-help": "Off, the brand's page answers 404, the filter leaves it out and cards do not show it. Its products keep it.",
16
+ is_featured: "Featured",
17
+ "featured-help": "Among the «popular brands» a template shows with brands()->featured().",
18
+ "tab-main": "Main",
19
+ "tab-description": "Description",
20
+ "tab-seo": "SEO",
21
+ "tab-history": "History",
22
+ new: "New brand",
23
+ empty: "No brands yet.",
24
+ "empty-help": "A brand has a page of its own with the products of it, and is a choice of the catalogue filter.",
25
+ order: "The order here is the order on the site: the filter, the popular brands and the list of brands",
26
+ hidden: "Not published",
27
+ count: "Products: :count",
28
+ "show-items": "Show its products",
29
+ "delete-blocked": "While products are of this brand it cannot go — take it off them first.",
30
+ "delete-text": "It goes to the bin, and its page answers that it is gone.",
31
+ deleted: "The brand is in the bin.",
32
+ saved: "The brand is saved."
33
+ },
34
+ product: {
35
+ brand: "Brand",
36
+ "brand-help": "Empty means no brand.",
37
+ "brand-empty": "No brand"
38
+ },
39
+ bulk: {
40
+ "set-brand": "Set the brand"
41
+ }
42
+ }, t = {
43
+ id: "catalog-brands",
44
+ slug: "brands",
45
+ screen: "catalog.brand-form",
46
+ facet: "brand",
47
+ namespace: "webx-catalog-brands",
48
+ group: "brand",
49
+ messages: r
50
+ };
51
+ function d(e = {}) {
52
+ return s({ ...t, catalog: e.path });
53
+ }
54
+ function o(e = {}) {
55
+ return [a({ ...t, catalog: e.path })];
56
+ }
57
+ export {
58
+ o as catalogBrands,
59
+ r as catalogBrandsMessages,
60
+ d as catalogBrandsOptions
61
+ };
62
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../src/messages.ts","../src/module.ts"],"sourcesContent":["import type { Messages } from '@webx-ui/module-admin'\n\n/**\n * The English this package speaks on its own, before the server's dictionary arrives, or without\n * one. The server ships the same lines under `webx-catalog-brands::` and overrides these;\n * `messages.test.ts` keeps the two sets of keys equal.\n */\nexport const catalogBrandsMessages: Record<string, Messages> = {\n module: {\n title: 'Brands',\n brand: 'Brand',\n },\n brand: {\n title: 'Name',\n slug: 'Address',\n 'slug-help':\n \"The brand's page and its value in the filter's address: /brands/apple/, /laptops/brand_apple/.\",\n description: 'Description',\n 'description-help': \"The text at the top of the brand's page.\",\n logo_id: 'Logo',\n is_visible: 'Published',\n 'visible-help':\n \"Off, the brand's page answers 404, the filter leaves it out and cards do not show it. Its products keep it.\",\n is_featured: 'Featured',\n 'featured-help': 'Among the «popular brands» a template shows with brands()->featured().',\n 'tab-main': 'Main',\n 'tab-description': 'Description',\n 'tab-seo': 'SEO',\n 'tab-history': 'History',\n new: 'New brand',\n empty: 'No brands yet.',\n 'empty-help':\n 'A brand has a page of its own with the products of it, and is a choice of the catalogue filter.',\n order:\n 'The order here is the order on the site: the filter, the popular brands and the list of brands',\n hidden: 'Not published',\n count: 'Products: :count',\n 'show-items': 'Show its products',\n 'delete-blocked': 'While products are of this brand it cannot go — take it off them first.',\n 'delete-text': 'It goes to the bin, and its page answers that it is gone.',\n deleted: 'The brand is in the bin.',\n saved: 'The brand is saved.',\n },\n product: {\n brand: 'Brand',\n 'brand-help': 'Empty means no brand.',\n 'brand-empty': 'No brand',\n },\n bulk: {\n 'set-brand': 'Set the brand',\n },\n}\n","import type { AdminModule } from '@webx-ui/module-admin'\nimport {\n dictionaryOptions,\n dictionarySection,\n type DictionaryOptions,\n} from '@webx-ui/module-catalog'\nimport { catalogBrandsMessages } from './messages'\n\nexport interface CatalogBrandsOptions {\n /** Where the catalogue lives inside the panel — the same as `catalog({ path })`. */\n path?: string\n}\n\nconst BRANDS: DictionaryOptions = {\n id: 'catalog-brands',\n slug: 'brands',\n screen: 'catalog.brand-form',\n facet: 'brand',\n namespace: 'webx-catalog-brands',\n group: 'brand',\n messages: catalogBrandsMessages,\n}\n\n/** The brands as the panel's shared category screens see them. */\nexport function catalogBrandsOptions(options: CatalogBrandsOptions = {}) {\n return dictionaryOptions({ ...BRANDS, catalog: options.path })\n}\n\n/**\n * Brands as a section of the panel (§2.3 of the dictionaries spec): the list in the order of the\n * site — the filter, the popular brands, the page of all of them — each with its address, and the\n * page of one, which is the server's `catalog.brand-form`: «Main» with the logo out of the media\n * library, «Description», «SEO» and «History». In the «Catalog» group after «Products».\n *\n * The brand of a product (`wx-select` over `catalog/brands`), its name in the list, the filter and\n * «Set the brand» come through the catalogue's registries. The logo field is `wx-media` — the\n * media module's, which a panel with brands has.\n */\nexport function catalogBrands(options: CatalogBrandsOptions = {}): AdminModule[] {\n return [dictionarySection({ ...BRANDS, catalog: options.path })]\n}\n"],"names":["catalogBrandsMessages","BRANDS","catalogBrandsOptions","options","dictionaryOptions","catalogBrands","dictionarySection"],"mappings":";AAOO,MAAMA,IAAkD;AAAA,EAC7D,QAAQ;AAAA,IACN,OAAO;AAAA,IACP,OAAO;AAAA,EAAA;AAAA,EAET,OAAO;AAAA,IACL,OAAO;AAAA,IACP,MAAM;AAAA,IACN,aACE;AAAA,IACF,aAAa;AAAA,IACb,oBAAoB;AAAA,IACpB,SAAS;AAAA,IACT,YAAY;AAAA,IACZ,gBACE;AAAA,IACF,aAAa;AAAA,IACb,iBAAiB;AAAA,IACjB,YAAY;AAAA,IACZ,mBAAmB;AAAA,IACnB,WAAW;AAAA,IACX,eAAe;AAAA,IACf,KAAK;AAAA,IACL,OAAO;AAAA,IACP,cACE;AAAA,IACF,OACE;AAAA,IACF,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,cAAc;AAAA,IACd,kBAAkB;AAAA,IAClB,eAAe;AAAA,IACf,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;AAAA,EAET,SAAS;AAAA,IACP,OAAO;AAAA,IACP,cAAc;AAAA,IACd,eAAe;AAAA,EAAA;AAAA,EAEjB,MAAM;AAAA,IACJ,aAAa;AAAA,EAAA;AAEjB,GCtCMC,IAA4B;AAAA,EAChC,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,QAAQ;AAAA,EACR,OAAO;AAAA,EACP,WAAW;AAAA,EACX,OAAO;AAAA,EACP,UAAUD;AACZ;AAGO,SAASE,EAAqBC,IAAgC,IAAI;AACvE,SAAOC,EAAkB,EAAE,GAAGH,GAAQ,SAASE,EAAQ,MAAM;AAC/D;AAYO,SAASE,EAAcF,IAAgC,IAAmB;AAC/E,SAAO,CAACG,EAAkB,EAAE,GAAGL,GAAQ,SAASE,EAAQ,KAAA,CAAM,CAAC;AACjE;"}
@@ -0,0 +1,7 @@
1
+ import { Messages } from '@webx-ui/module-admin';
2
+ /**
3
+ * The English this package speaks on its own, before the server's dictionary arrives, or without
4
+ * one. The server ships the same lines under `webx-catalog-brands::` and overrides these;
5
+ * `messages.test.ts` keeps the two sets of keys equal.
6
+ */
7
+ export declare const catalogBrandsMessages: Record<string, Messages>;
@@ -0,0 +1,18 @@
1
+ import { AdminModule } from '@webx-ui/module-admin';
2
+ export interface CatalogBrandsOptions {
3
+ /** Where the catalogue lives inside the panel — the same as `catalog({ path })`. */
4
+ path?: string;
5
+ }
6
+ /** The brands as the panel's shared category screens see them. */
7
+ export declare function catalogBrandsOptions(options?: CatalogBrandsOptions): import('@webx-ui/module-admin').CategoriesOptions;
8
+ /**
9
+ * Brands as a section of the panel (§2.3 of the dictionaries spec): the list in the order of the
10
+ * site — the filter, the popular brands, the page of all of them — each with its address, and the
11
+ * page of one, which is the server's `catalog.brand-form`: «Main» with the logo out of the media
12
+ * library, «Description», «SEO» and «History». In the «Catalog» group after «Products».
13
+ *
14
+ * The brand of a product (`wx-select` over `catalog/brands`), its name in the list, the filter and
15
+ * «Set the brand» come through the catalogue's registries. The logo field is `wx-media` — the
16
+ * media module's, which a panel with brands has.
17
+ */
18
+ export declare function catalogBrands(options?: CatalogBrandsOptions): AdminModule[];
package/dist/style.css ADDED
File without changes
package/package.json ADDED
@@ -0,0 +1,69 @@
1
+ {
2
+ "name": "@webx-ui/module-catalog-brands",
3
+ "version": "0.1.0",
4
+ "description": "Brands for the catalogue of the WebX UI admin panel: a reference book with logos, descriptions and pages of their own, a field of the product form, a column and a filter of the list.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "sideEffects": [
8
+ "*.css"
9
+ ],
10
+ "keywords": [
11
+ "webx-ui",
12
+ "vue",
13
+ "admin",
14
+ "cms",
15
+ "catalog",
16
+ "e-commerce",
17
+ "brands",
18
+ "manufacturers"
19
+ ],
20
+ "repository": {
21
+ "type": "git",
22
+ "url": "git+https://github.com/webx-ui/webx-ui.git",
23
+ "directory": "packages/module-catalog-brands"
24
+ },
25
+ "homepage": "https://github.com/webx-ui/webx-ui/tree/main/packages/module-catalog-brands",
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "files": [
30
+ "dist"
31
+ ],
32
+ "main": "./dist/index.js",
33
+ "module": "./dist/index.js",
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "import": "./dist/index.js"
39
+ },
40
+ "./style.css": "./dist/style.css",
41
+ "./dist/style.css": "./dist/style.css",
42
+ "./package.json": "./package.json"
43
+ },
44
+ "peerDependencies": {
45
+ "vue": "^3.5.0",
46
+ "vue-router": "^4.5.0"
47
+ },
48
+ "dependencies": {
49
+ "@webx-ui/core": "^0.34.2",
50
+ "@webx-ui/module-admin": "^0.21.0",
51
+ "@webx-ui/module-catalog": "^0.4.0",
52
+ "@webx-ui/schema": "^0.6.4"
53
+ },
54
+ "devDependencies": {
55
+ "@types/node": "^24.10.1",
56
+ "@vitejs/plugin-vue": "^6.0.1",
57
+ "typescript": "^5.9.3",
58
+ "vite": "^7.1.14",
59
+ "vite-plugin-dts": "^4.5.4",
60
+ "vue": "^3.5.24",
61
+ "vue-router": "^4.5.1",
62
+ "vue-tsc": "^3.1.3"
63
+ },
64
+ "scripts": {
65
+ "build": "vite build",
66
+ "dev": "vite build --watch",
67
+ "typecheck": "vue-tsc -p tsconfig.json --noEmit"
68
+ }
69
+ }