@wix/site-service-configuration 1.0.4 → 1.0.6

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.
@@ -1,14 +1,54 @@
1
1
  import type { ServiceDefinition } from '@wix/services-definitions';
2
+ /** Values the host supplies when it creates the service. */
2
3
  export type IConfigurationServiceConfig = {
4
+ /** Whether the site is running in QA mode. */
3
5
  readonly qaMode?: boolean;
6
+ /** Whether the site tracks site visitors' clicks for analytics. */
4
7
  readonly trackClicksAnalytics?: boolean;
8
+ /** Whether components that embed custom HTML in an iframe must sandbox it. */
5
9
  readonly sandboxInHTMLComp?: boolean;
6
10
  };
11
+ /**
12
+ * Reports the site's click tracking, embedded HTML sandboxing, and QA mode settings.
13
+ *
14
+ * @beta
15
+ */
7
16
  export interface IConfigurationService {
17
+ /**
18
+ * Whether the site is running in QA mode.
19
+ *
20
+ * This value doesn't change for the lifetime of the page.
21
+ *
22
+ * @exampleValue false
23
+ */
8
24
  readonly qaMode: boolean;
25
+ /**
26
+ * Whether the site tracks site visitors' clicks for analytics.
27
+ *
28
+ * The value comes from the site's click tracking setting. The service doesn't report any clicks.
29
+ * When this value is `true`, your code reports them.
30
+ *
31
+ * The value doesn't account for preview. Before you report a click, check `previewMode` from
32
+ * `@wix/site-service-editor-context`, and don't report clicks while a Wix user previews the site.
33
+ *
34
+ * This value doesn't change for the lifetime of the page.
35
+ *
36
+ * @exampleValue true
37
+ */
9
38
  readonly trackClicksAnalytics: boolean;
39
+ /**
40
+ * Whether components that embed custom HTML in an iframe must sandbox it.
41
+ *
42
+ * The service doesn't sandbox anything. When this value is `true`, set the iframe's `sandbox`
43
+ * attribute yourself. When it's `false`, leave the attribute off.
44
+ *
45
+ * This value doesn't change for the lifetime of the page.
46
+ *
47
+ * @exampleValue true
48
+ */
10
49
  readonly sandboxInHTMLComp: boolean;
11
50
  }
51
+ /** @internal Private service. Documented in the code, but left out of the developer docs. */
12
52
  export type IConfigurationDefinition = ServiceDefinition<IConfigurationService, IConfigurationServiceConfig>;
13
53
  export declare const ConfigurationDefinition: string & {
14
54
  __api: IConfigurationService;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AAiB5C,QAAA,uBAAuB,GAAG,IAAA,oCAAa,EACnD,iCAAiC,CACjC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/definition/index.ts"],"names":[],"mappings":";;;AAAA,oEAAyD;AAyD5C,QAAA,uBAAuB,GAAG,IAAA,oCAAa,EACnD,iCAAiC,CACjC,CAAA"}
@@ -1,14 +1,54 @@
1
1
  import type { ServiceDefinition } from '@wix/services-definitions';
2
+ /** Values the host supplies when it creates the service. */
2
3
  export type IConfigurationServiceConfig = {
4
+ /** Whether the site is running in QA mode. */
3
5
  readonly qaMode?: boolean;
6
+ /** Whether the site tracks site visitors' clicks for analytics. */
4
7
  readonly trackClicksAnalytics?: boolean;
8
+ /** Whether components that embed custom HTML in an iframe must sandbox it. */
5
9
  readonly sandboxInHTMLComp?: boolean;
6
10
  };
11
+ /**
12
+ * Reports the site's click tracking, embedded HTML sandboxing, and QA mode settings.
13
+ *
14
+ * @beta
15
+ */
7
16
  export interface IConfigurationService {
17
+ /**
18
+ * Whether the site is running in QA mode.
19
+ *
20
+ * This value doesn't change for the lifetime of the page.
21
+ *
22
+ * @exampleValue false
23
+ */
8
24
  readonly qaMode: boolean;
25
+ /**
26
+ * Whether the site tracks site visitors' clicks for analytics.
27
+ *
28
+ * The value comes from the site's click tracking setting. The service doesn't report any clicks.
29
+ * When this value is `true`, your code reports them.
30
+ *
31
+ * The value doesn't account for preview. Before you report a click, check `previewMode` from
32
+ * `@wix/site-service-editor-context`, and don't report clicks while a Wix user previews the site.
33
+ *
34
+ * This value doesn't change for the lifetime of the page.
35
+ *
36
+ * @exampleValue true
37
+ */
9
38
  readonly trackClicksAnalytics: boolean;
39
+ /**
40
+ * Whether components that embed custom HTML in an iframe must sandbox it.
41
+ *
42
+ * The service doesn't sandbox anything. When this value is `true`, set the iframe's `sandbox`
43
+ * attribute yourself. When it's `false`, leave the attribute off.
44
+ *
45
+ * This value doesn't change for the lifetime of the page.
46
+ *
47
+ * @exampleValue true
48
+ */
10
49
  readonly sandboxInHTMLComp: boolean;
11
50
  }
51
+ /** @internal Private service. Documented in the code, but left out of the developer docs. */
12
52
  export type IConfigurationDefinition = ServiceDefinition<IConfigurationService, IConfigurationServiceConfig>;
13
53
  export declare const ConfigurationDefinition: string & {
14
54
  __api: IConfigurationService;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAiBzD,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CACnD,iCAAiC,CACjC,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/definition/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAA;AAyDzD,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CACnD,iCAAiC,CACjC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/site-service-configuration",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "license": "UNLICENSED",
5
5
  "files": [
6
6
  "dist",
@@ -49,8 +49,8 @@
49
49
  },
50
50
  "scripts": {
51
51
  "build": "tsc -b . && tsc --project tsconfig.cjs.json",
52
- "lint": "yarn run -T lint:package $npm_package_name",
53
- "test": "vitest --run && yarn test-type-check",
52
+ "lint": "pnpm --workspace-root run lint:package --package $npm_package_name",
53
+ "test": "vitest --run && pnpm run test-type-check",
54
54
  "test-type-check": "echo 'validating typescript in test files' && tsc --project tsconfig.test.json && echo 'Finished validating typescript in test files successfully'"
55
55
  },
56
56
  "dependencies": {
@@ -78,5 +78,5 @@
78
78
  ]
79
79
  }
80
80
  },
81
- "falconPackageHash": "703d23e438c5be3dc944089aab33a9ba0539dc6677194eae4b8b0da0"
81
+ "falconPackageHash": "73eb5bde7249168f6ec887cc3e20c42d26b13d0b64f687a0bdb89233"
82
82
  }
@@ -1,18 +1,58 @@
1
1
  import { defineService } from '@wix/services-definitions'
2
2
  import type { ServiceDefinition } from '@wix/services-definitions'
3
3
 
4
+ /** Values the host supplies when it creates the service. */
4
5
  export type IConfigurationServiceConfig = {
6
+ /** Whether the site is running in QA mode. */
5
7
  readonly qaMode?: boolean
8
+ /** Whether the site tracks site visitors' clicks for analytics. */
6
9
  readonly trackClicksAnalytics?: boolean
10
+ /** Whether components that embed custom HTML in an iframe must sandbox it. */
7
11
  readonly sandboxInHTMLComp?: boolean
8
12
  }
9
13
 
14
+ /**
15
+ * Reports the site's click tracking, embedded HTML sandboxing, and QA mode settings.
16
+ *
17
+ * @beta
18
+ */
10
19
  export interface IConfigurationService {
20
+ /**
21
+ * Whether the site is running in QA mode.
22
+ *
23
+ * This value doesn't change for the lifetime of the page.
24
+ *
25
+ * @exampleValue false
26
+ */
11
27
  readonly qaMode: boolean
28
+ /**
29
+ * Whether the site tracks site visitors' clicks for analytics.
30
+ *
31
+ * The value comes from the site's click tracking setting. The service doesn't report any clicks.
32
+ * When this value is `true`, your code reports them.
33
+ *
34
+ * The value doesn't account for preview. Before you report a click, check `previewMode` from
35
+ * `@wix/site-service-editor-context`, and don't report clicks while a Wix user previews the site.
36
+ *
37
+ * This value doesn't change for the lifetime of the page.
38
+ *
39
+ * @exampleValue true
40
+ */
12
41
  readonly trackClicksAnalytics: boolean
42
+ /**
43
+ * Whether components that embed custom HTML in an iframe must sandbox it.
44
+ *
45
+ * The service doesn't sandbox anything. When this value is `true`, set the iframe's `sandbox`
46
+ * attribute yourself. When it's `false`, leave the attribute off.
47
+ *
48
+ * This value doesn't change for the lifetime of the page.
49
+ *
50
+ * @exampleValue true
51
+ */
13
52
  readonly sandboxInHTMLComp: boolean
14
53
  }
15
54
 
55
+ /** @internal Private service. Documented in the code, but left out of the developer docs. */
16
56
  export type IConfigurationDefinition = ServiceDefinition<IConfigurationService, IConfigurationServiceConfig>
17
57
 
18
58
  export const ConfigurationDefinition = defineService<IConfigurationService, IConfigurationServiceConfig>(