@htmlbricks/hb-cookie-law-banner 0.8.37 → 0.8.43

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/extra/docs.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup } from "@htmlbricks/hb-jsutils/main";
1
+ import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "@htmlbricks/hb-jsutils/main";
2
+ import type { Component } from "../app/types/webcomponent.type";
2
3
 
3
4
  export const storybookArgs = {
4
5
  allowdecline: { control: { type: "boolean" } },
@@ -23,14 +24,20 @@ export const styleSetup: StyleSetup = {
23
24
  parts: cssParts,
24
25
  };
25
26
 
26
- export const componentSetup = {
27
+ const examples: Component[] = [
28
+ {
29
+ allowdecline: "yes",
30
+ },
31
+ ];
32
+ export const componentSetup: ComponentSetup & { examples: Component[] } = {
33
+ definitions: null,
27
34
  storybookArgs,
28
35
  styleSetup,
29
36
  htmlSlots,
30
37
  i18n: i18nLanguages,
31
- examples: [],
32
- name: "",
33
- category: "",
34
- tags: [],
38
+ examples,
39
+ name: "hb-cookie-law-banner",
40
+ category: "layout",
41
+ tags: ["layout"],
35
42
  size: {},
36
43
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@htmlbricks/hb-cookie-law-banner",
3
3
  "displayName": "Svelte cookielaw WebComponent",
4
4
  "description": "Svelte cookielaw WebComponent",
5
- "version": "0.8.37",
5
+ "version": "0.8.43",
6
6
  "main": "release/release.js",
7
7
  "publishConfig": {
8
8
  "access": "public"
@@ -20,15 +20,18 @@
20
20
  "start": "sirv dist",
21
21
  "dev": "rm -rf ./dist && rollup -c -w",
22
22
  "build": "rm -rf ./dist && rollup -c",
23
- "generate-docs": "cp $PWD/dist/docs.js $PWD/dist/docs.mjs && generate-json-from-js-object --input $PWD/dist/docs.mjs --var componentSetup --output $PWD/dist/docs.type.d.json && rm $PWD/dist/docs.mjs",
24
- "generate-schema": "ts-json-schema-generator --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json",
23
+ "generate-manifest": "npm run generate-schemes && manifester --dir $PWD",
24
+ "generate-component-schema": "ts-json-schema-generator --type 'Component' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent.type.d.json",
25
+ "generate-events-schema": "ts-json-schema-generator --type 'Events' --path 'app/types/webcomponent.type.d.ts' > dist/webcomponent_events.type.d.json",
26
+ "generate-schemes": "npm run generate-events-schema && npm run generate-component-schema",
25
27
  "copydest": "rm -rf release && mkdir -p release && mkdir -p release && cp dist/* ./release/",
26
28
  "build-extra": "tsc --moduleResolution node --module es2020 --esModuleInterop true --outDir dist --sourceMap --skipLibCheck extra/*",
27
- "build:release": "PRODUCTION=true npm run build && npm run build-extra && npm run generate-schema && npm run generate-docs && npm run copydest",
29
+ "build:release": "PRODUCTION=true npm run build && npm run build-extra && npm run generate-manifest && npm run copydest",
28
30
  "prepublish": "npm run build:release"
29
31
  },
30
32
  "devDependencies": {
31
- "@htmlbricks/hb-jsutils": "^0.8.37",
33
+ "@htmlbricks/hb-jsutils": "^0.8.43",
34
+ "@htmlbricks/manifester": "^0.0.5",
32
35
  "@rollup/plugin-alias": "^3.1.2",
33
36
  "@rollup/plugin-commonjs": "^18.0.0",
34
37
  "@rollup/plugin-json": "^4.1.0",
@@ -42,7 +45,6 @@
42
45
  "eslint": "^7.25.0",
43
46
  "eslint-plugin-jsdoc": "^33.0.0",
44
47
  "eslint-plugin-svelte3": "^3.2.0",
45
- "generate-json-from-js-object": "^0.0.17",
46
48
  "node-sass": "^6.0.1",
47
49
  "postcss": "^8.2.13",
48
50
  "postcss-load-config": "^3.0.1",
@@ -73,5 +75,5 @@
73
75
  "webcomponents"
74
76
  ],
75
77
  "contributors": [],
76
- "gitHead": "1a737cc2f90ff5f9c3bd06a155743e47329e8861"
78
+ "gitHead": "00bfec0d080db03f42972124577a880c9bf2570e"
77
79
  }
package/release/docs.js CHANGED
@@ -19,15 +19,21 @@ export var styleSetup = {
19
19
  vars: cssVars,
20
20
  parts: cssParts
21
21
  };
22
+ var examples = [
23
+ {
24
+ allowdecline: "yes"
25
+ },
26
+ ];
22
27
  export var componentSetup = {
28
+ definitions: null,
23
29
  storybookArgs: storybookArgs,
24
30
  styleSetup: styleSetup,
25
31
  htmlSlots: htmlSlots,
26
32
  i18n: i18nLanguages,
27
- examples: [],
28
- name: "",
29
- category: "",
30
- tags: [],
33
+ examples: examples,
34
+ name: "hb-cookie-law-banner",
35
+ category: "layout",
36
+ tags: ["layout"],
31
37
  size: {}
32
38
  };
33
39
  //# sourceMappingURL=docs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"docs.js","sourceRoot":"","sources":["../extra/docs.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,IAAM,aAAa,GAAG;IAC5B,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;IAC9C,QAAQ,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IACvC,iBAAiB,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE;IAChD,YAAY,EAAE,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE;IAC7C,eAAe,EAAE,EAAE,MAAM,EAAE,sBAAsB,EAAE;CACnD,CAAC;AAEF,IAAM,OAAO,GAAa,EAAE,CAAC;AAC7B,MAAM,CAAC,IAAM,QAAQ,GAAc,EAAE,CAAC;AACtC,MAAM,CAAC,IAAM,SAAS,GAAe;IACpC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE;IAClC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE,EAAE;CACjC,CAAC;AACF,MAAM,CAAC,IAAM,aAAa,GAAe;IACxC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,E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nC,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE;CACnC,CAAC;AACF,MAAM,CAAC,IAAM,UAAU,GAAe;IACrC,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,QAAQ;CACf,CAAC;AAEF,IAAM,QAAQ,GAAgB;IAC7B;QACC,YAAY,EAAE,KAAK;KACnB;CACD,CAAC;AACF,MAAM,CAAC,IAAM,cAAc,GAA+C;IACzE,WAAW,EAAE,IAAI;IACjB,aAAa,eAAA;IACb,UAAU,YAAA;IACV,SAAS,WAAA;IACT,IAAI,EAAE,aAAa;IACnB,QAAQ,UAAA;IACR,IAAI,EAAE,sBAAsB;IAC5B,QAAQ,EAAE,QAAQ;IAClB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,IAAI,EAAE,EAAE;CACR,CAAC"}
@@ -0,0 +1,39 @@
1
+ export var storybookArgs = {
2
+ allowdecline: { control: { type: "boolean" } },
3
+ i18nlang: { control: { type: "text" } },
4
+ cookielawuri4more: { control: { type: "text" } },
5
+ capabilities: { control: { type: "object" } },
6
+ acceptCookieLaw: { action: "acceptCookieLawEvent" }
7
+ };
8
+ var cssVars = [];
9
+ export var cssParts = [];
10
+ export var htmlSlots = [
11
+ { name: "title", description: "" },
12
+ { name: "text", description: "" },
13
+ ];
14
+ export var i18nLanguages = [
15
+ { lang: "it", language: "italian" },
16
+ { lang: "en", language: "english" },
17
+ ];
18
+ export var styleSetup = {
19
+ vars: cssVars,
20
+ parts: cssParts
21
+ };
22
+ var examples = [
23
+ {
24
+ allowdecline: "yes"
25
+ },
26
+ ];
27
+ export var componentSetup = {
28
+ definitions: null,
29
+ storybookArgs: storybookArgs,
30
+ styleSetup: styleSetup,
31
+ htmlSlots: htmlSlots,
32
+ i18n: i18nLanguages,
33
+ examples: examples,
34
+ name: "hb-cookie-law-banner",
35
+ category: "layout",
36
+ tags: ["layout"],
37
+ size: {}
38
+ };
39
+ //# sourceMappingURL=docs.js.map
package/release/docs.ts CHANGED
@@ -1,4 +1,5 @@
1
- import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup } from "@htmlbricks/hb-jsutils/main";
1
+ import type { CssPart, CssVar, HtmlSlot, i18nLang, StyleSetup, ComponentSetup } from "@htmlbricks/hb-jsutils/main";
2
+ import type { Component } from "../app/types/webcomponent.type";
2
3
 
3
4
  export const storybookArgs = {
4
5
  allowdecline: { control: { type: "boolean" } },
@@ -23,14 +24,20 @@ export const styleSetup: StyleSetup = {
23
24
  parts: cssParts,
24
25
  };
25
26
 
26
- export const componentSetup = {
27
+ const examples: Component[] = [
28
+ {
29
+ allowdecline: "yes",
30
+ },
31
+ ];
32
+ export const componentSetup: ComponentSetup & { examples: Component[] } = {
33
+ definitions: null,
27
34
  storybookArgs,
28
35
  styleSetup,
29
36
  htmlSlots,
30
37
  i18n: i18nLanguages,
31
- examples: [],
32
- name: "",
33
- category: "",
34
- tags: [],
38
+ examples,
39
+ name: "hb-cookie-law-banner",
40
+ category: "layout",
41
+ tags: ["layout"],
35
42
  size: {},
36
43
  };
@@ -0,0 +1,220 @@
1
+ {
2
+ "definitions": {
3
+ "events": {
4
+ "$ref": "#/definitions/Events",
5
+ "$schema": "http://json-schema.org/draft-07/schema#",
6
+ "definitions": {
7
+ "Events": {
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "acceptCookieLaw": {
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "accepted": {
14
+ "enum": [
15
+ "yes",
16
+ "no"
17
+ ],
18
+ "type": "string"
19
+ }
20
+ },
21
+ "required": [
22
+ "accepted"
23
+ ],
24
+ "type": "object"
25
+ }
26
+ },
27
+ "required": [
28
+ "acceptCookieLaw"
29
+ ],
30
+ "type": "object"
31
+ }
32
+ }
33
+ },
34
+ "component": {
35
+ "$ref": "#/definitions/Component",
36
+ "$schema": "http://json-schema.org/draft-07/schema#",
37
+ "definitions": {
38
+ "Component": {
39
+ "additionalProperties": false,
40
+ "properties": {
41
+ "allowdecline": {
42
+ "enum": [
43
+ "yes",
44
+ "no"
45
+ ],
46
+ "type": "string"
47
+ },
48
+ "capabilities": {
49
+ "$ref": "#/definitions/ICapabilities"
50
+ },
51
+ "cookielawuri4more": {
52
+ "type": "string"
53
+ },
54
+ "i18nlang": {
55
+ "type": "string"
56
+ },
57
+ "id": {
58
+ "type": "string"
59
+ },
60
+ "style": {
61
+ "type": "string"
62
+ }
63
+ },
64
+ "type": "object"
65
+ },
66
+ "ICapabilities": {
67
+ "additionalProperties": false,
68
+ "properties": {
69
+ "groups": {
70
+ "items": {
71
+ "additionalProperties": false,
72
+ "properties": {
73
+ "_id": {
74
+ "type": "string"
75
+ },
76
+ "label": {
77
+ "type": "string"
78
+ },
79
+ "type": {
80
+ "type": "string"
81
+ }
82
+ },
83
+ "required": [
84
+ "_id",
85
+ "label",
86
+ "type"
87
+ ],
88
+ "type": "object"
89
+ },
90
+ "type": "array"
91
+ },
92
+ "items": {
93
+ "items": {
94
+ "additionalProperties": false,
95
+ "properties": {
96
+ "_id": {
97
+ "type": "string"
98
+ },
99
+ "cookieExpirationInSeconds": {
100
+ "type": "number"
101
+ },
102
+ "cookieName": {
103
+ "type": "string"
104
+ },
105
+ "description": {
106
+ "type": "string"
107
+ },
108
+ "descriptionUrl": {
109
+ "type": "string"
110
+ },
111
+ "groupId": {
112
+ "type": "string"
113
+ },
114
+ "isMandatory": {
115
+ "type": "boolean"
116
+ },
117
+ "isMarketing": {
118
+ "type": "boolean"
119
+ },
120
+ "isSessionCookie": {
121
+ "type": "boolean"
122
+ },
123
+ "isTechnical": {
124
+ "type": "boolean"
125
+ },
126
+ "isThirdPartyOwned": {
127
+ "type": "boolean"
128
+ },
129
+ "scope": {
130
+ "type": "string"
131
+ },
132
+ "thirdCompanyName": {
133
+ "type": "string"
134
+ },
135
+ "title": {
136
+ "type": "string"
137
+ }
138
+ },
139
+ "required": [
140
+ "groupId",
141
+ "title",
142
+ "scope",
143
+ "_id",
144
+ "cookieName"
145
+ ],
146
+ "type": "object"
147
+ },
148
+ "type": "array"
149
+ }
150
+ },
151
+ "required": [
152
+ "groups",
153
+ "items"
154
+ ],
155
+ "type": "object"
156
+ }
157
+ }
158
+ }
159
+ },
160
+ "storybookArgs": {
161
+ "allowdecline": {
162
+ "control": {
163
+ "type": "boolean"
164
+ }
165
+ },
166
+ "i18nlang": {
167
+ "control": {
168
+ "type": "text"
169
+ }
170
+ },
171
+ "cookielawuri4more": {
172
+ "control": {
173
+ "type": "text"
174
+ }
175
+ },
176
+ "capabilities": {
177
+ "control": {
178
+ "type": "object"
179
+ }
180
+ },
181
+ "acceptCookieLaw": {
182
+ "action": "acceptCookieLawEvent"
183
+ }
184
+ },
185
+ "styleSetup": {
186
+ "vars": [],
187
+ "parts": []
188
+ },
189
+ "htmlSlots": [
190
+ {
191
+ "name": "title",
192
+ "description": ""
193
+ },
194
+ {
195
+ "name": "text",
196
+ "description": ""
197
+ }
198
+ ],
199
+ "i18n": [
200
+ {
201
+ "lang": "it",
202
+ "language": "italian"
203
+ },
204
+ {
205
+ "lang": "en",
206
+ "language": "english"
207
+ }
208
+ ],
209
+ "examples": [
210
+ {
211
+ "allowdecline": "yes"
212
+ }
213
+ ],
214
+ "name": "hb-cookie-law-banner",
215
+ "category": "layout",
216
+ "tags": [
217
+ "layout"
218
+ ],
219
+ "size": {}
220
+ }
@@ -1,4 +1,5 @@
1
1
  {
2
+ "$ref": "#/definitions/Component",
2
3
  "$schema": "http://json-schema.org/draft-07/schema#",
3
4
  "definitions": {
4
5
  "Component": {
@@ -29,31 +30,6 @@
29
30
  },
30
31
  "type": "object"
31
32
  },
32
- "Events": {
33
- "additionalProperties": false,
34
- "properties": {
35
- "acceptCookieLaw": {
36
- "additionalProperties": false,
37
- "properties": {
38
- "accepted": {
39
- "enum": [
40
- "yes",
41
- "no"
42
- ],
43
- "type": "string"
44
- }
45
- },
46
- "required": [
47
- "accepted"
48
- ],
49
- "type": "object"
50
- }
51
- },
52
- "required": [
53
- "acceptCookieLaw"
54
- ],
55
- "type": "object"
56
- },
57
33
  "ICapabilities": {
58
34
  "additionalProperties": false,
59
35
  "properties": {
@@ -0,0 +1,31 @@
1
+ {
2
+ "$ref": "#/definitions/Events",
3
+ "$schema": "http://json-schema.org/draft-07/schema#",
4
+ "definitions": {
5
+ "Events": {
6
+ "additionalProperties": false,
7
+ "properties": {
8
+ "acceptCookieLaw": {
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "accepted": {
12
+ "enum": [
13
+ "yes",
14
+ "no"
15
+ ],
16
+ "type": "string"
17
+ }
18
+ },
19
+ "required": [
20
+ "accepted"
21
+ ],
22
+ "type": "object"
23
+ }
24
+ },
25
+ "required": [
26
+ "acceptCookieLaw"
27
+ ],
28
+ "type": "object"
29
+ }
30
+ }
31
+ }
@@ -1,56 +0,0 @@
1
- {
2
- "storybookArgs": {
3
- "allowdecline": {
4
- "control": {
5
- "type": "boolean"
6
- }
7
- },
8
- "i18nlang": {
9
- "control": {
10
- "type": "text"
11
- }
12
- },
13
- "cookielawuri4more": {
14
- "control": {
15
- "type": "text"
16
- }
17
- },
18
- "capabilities": {
19
- "control": {
20
- "type": "object"
21
- }
22
- },
23
- "acceptCookieLaw": {
24
- "action": "acceptCookieLawEvent"
25
- }
26
- },
27
- "styleSetup": {
28
- "vars": [],
29
- "parts": []
30
- },
31
- "htmlSlots": [
32
- {
33
- "name": "title",
34
- "description": ""
35
- },
36
- {
37
- "name": "text",
38
- "description": ""
39
- }
40
- ],
41
- "i18n": [
42
- {
43
- "lang": "it",
44
- "language": "italian"
45
- },
46
- {
47
- "lang": "en",
48
- "language": "english"
49
- }
50
- ],
51
- "examples": [],
52
- "name": "",
53
- "category": "",
54
- "tags": [],
55
- "size": {}
56
- }