@wix/astro 2.23.0 → 2.25.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/build/dependencies/astro-backend-extensions/types/index.d.ts +15 -1
- package/build/dependencies/astro-core/types/index.d.ts +3 -1
- package/build/dependencies/astro-translations/chunk-YRKN4TFH.js +136 -0
- package/build/dependencies/astro-translations/index.d.ts +5 -0
- package/build/dependencies/astro-translations/index.js +133 -0
- package/build/dependencies/astro-translations/middleware/static-translations.d.ts +5 -0
- package/build/dependencies/astro-translations/middleware/static-translations.js +58 -0
- package/build/dependencies/astro-trusted-backoffice-extensions/types/index.d.ts +30 -4
- package/build/integration/builders-experimental.js +2 -2
- package/build/integration/builders-trusted.d.ts +32 -4
- package/build/integration/builders-trusted.js +8 -4
- package/build/integration/builders-trusted.js.map +1 -1
- package/build/integration/builders.d.ts +2 -1
- package/build/integration/builders.js +3 -3
- package/build/integration/{chunk-2K4KOKVV.js → chunk-23MOLCVI.js} +3 -3
- package/build/integration/chunk-23MOLCVI.js.map +1 -0
- package/build/integration/{chunk-C2WQBOJF.js → chunk-CTGNWVC3.js} +48 -10
- package/build/integration/chunk-CTGNWVC3.js.map +1 -0
- package/build/integration/{chunk-2K65FTYR.js → chunk-LQFJQHEX.js} +57 -33
- package/build/integration/chunk-LQFJQHEX.js.map +1 -0
- package/build/integration/{chunk-LKZKWQSB.js → chunk-S5CQHYTB.js} +5 -3
- package/build/integration/{chunk-LKZKWQSB.js.map → chunk-S5CQHYTB.js.map} +1 -1
- package/build/integration/{chunk-KH7M6QFM.js → chunk-XF55M5AE.js} +5 -5
- package/build/integration/chunk-XF55M5AE.js.map +1 -0
- package/build/integration/{index.d-DVHQaDA6.d.ts → index.d-BUVlSCHa.d.ts} +18 -4
- package/build/integration/index.d.ts +4 -1
- package/build/integration/index.js +129 -10
- package/build/integration/index.js.map +1 -1
- package/package.json +6 -4
- package/build/integration/chunk-2K4KOKVV.js.map +0 -1
- package/build/integration/chunk-2K65FTYR.js.map +0 -1
- package/build/integration/chunk-C2WQBOJF.js.map +0 -1
- package/build/integration/chunk-KH7M6QFM.js.map +0 -1
|
@@ -2,6 +2,20 @@ import { WixIntegration } from '@wix/astro-core';
|
|
|
2
2
|
|
|
3
3
|
declare const createIntegration: () => WixIntegration;
|
|
4
4
|
|
|
5
|
+
interface BookingsStaffSortingProvider {
|
|
6
|
+
type: 'BookingsStaffSortingProvider';
|
|
7
|
+
options: Options$7;
|
|
8
|
+
}
|
|
9
|
+
interface Options$7 {
|
|
10
|
+
id: string;
|
|
11
|
+
name: string;
|
|
12
|
+
dashboardPluginId?: string;
|
|
13
|
+
methodDescription: string;
|
|
14
|
+
methodName: string;
|
|
15
|
+
source: string;
|
|
16
|
+
}
|
|
17
|
+
declare function bookingsStaffSortingProvider(options: Options$7): BookingsStaffSortingProvider;
|
|
18
|
+
|
|
5
19
|
interface EcomAdditionalFees {
|
|
6
20
|
type: 'EcomAdditionalFees';
|
|
7
21
|
options: Options$6;
|
|
@@ -85,4 +99,4 @@ interface Options {
|
|
|
85
99
|
}
|
|
86
100
|
declare function webhook(options: Options): Webhook;
|
|
87
101
|
|
|
88
|
-
export { createIntegration as default, ecomAdditionalFees, ecomDiscountTriggers, ecomGiftCards, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook };
|
|
102
|
+
export { bookingsStaffSortingProvider, createIntegration as default, ecomAdditionalFees, ecomDiscountTriggers, ecomGiftCards, ecomPaymentSettings, ecomShippingRates, ecomValidations, webhook };
|
|
@@ -10,12 +10,14 @@ declare class Model extends EventEmitter<EventMap> {
|
|
|
10
10
|
appId: string;
|
|
11
11
|
env: Record<string, string>;
|
|
12
12
|
extensions: BaseExtension[];
|
|
13
|
+
rootDir: string;
|
|
13
14
|
srcDir: string;
|
|
14
15
|
private server;
|
|
15
|
-
constructor({ appId, env, extensions, server, srcDir, }: {
|
|
16
|
+
constructor({ appId, env, extensions, rootDir, server, srcDir, }: {
|
|
16
17
|
appId: string;
|
|
17
18
|
env: Record<string, string>;
|
|
18
19
|
extensions: BaseExtension[];
|
|
20
|
+
rootDir: string;
|
|
19
21
|
server: ViteDevServer;
|
|
20
22
|
srcDir: string;
|
|
21
23
|
});
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
// ../../node_modules/outdent/lib-module/index.js
|
|
2
|
+
function noop() {
|
|
3
|
+
var args = [];
|
|
4
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
5
|
+
args[_i] = arguments[_i];
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
function createWeakMap() {
|
|
9
|
+
if (typeof WeakMap !== "undefined") {
|
|
10
|
+
return /* @__PURE__ */ new WeakMap();
|
|
11
|
+
} else {
|
|
12
|
+
return fakeSetOrMap();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
function fakeSetOrMap() {
|
|
16
|
+
return {
|
|
17
|
+
add: noop,
|
|
18
|
+
delete: noop,
|
|
19
|
+
get: noop,
|
|
20
|
+
set: noop,
|
|
21
|
+
has: function(k) {
|
|
22
|
+
return false;
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
var hop = Object.prototype.hasOwnProperty;
|
|
27
|
+
var has = function(obj, prop) {
|
|
28
|
+
return hop.call(obj, prop);
|
|
29
|
+
};
|
|
30
|
+
function extend(target, source) {
|
|
31
|
+
for (var prop in source) {
|
|
32
|
+
if (has(source, prop)) {
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return target;
|
|
37
|
+
}
|
|
38
|
+
var reLeadingNewline = /^[ \t]*(?:\r\n|\r|\n)/;
|
|
39
|
+
var reTrailingNewline = /(?:\r\n|\r|\n)[ \t]*$/;
|
|
40
|
+
var reStartsWithNewlineOrIsEmpty = /^(?:[\r\n]|$)/;
|
|
41
|
+
var reDetectIndentation = /(?:\r\n|\r|\n)([ \t]*)(?:[^ \t\r\n]|$)/;
|
|
42
|
+
var reOnlyWhitespaceWithAtLeastOneNewline = /^[ \t]*[\r\n][ \t\r\n]*$/;
|
|
43
|
+
function _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options) {
|
|
44
|
+
var indentationLevel = 0;
|
|
45
|
+
var match = strings[0].match(reDetectIndentation);
|
|
46
|
+
if (match) {
|
|
47
|
+
indentationLevel = match[1].length;
|
|
48
|
+
}
|
|
49
|
+
var reSource = "(\\r\\n|\\r|\\n).{0," + indentationLevel + "}";
|
|
50
|
+
var reMatchIndent = new RegExp(reSource, "g");
|
|
51
|
+
if (firstInterpolatedValueSetsIndentationLevel) {
|
|
52
|
+
strings = strings.slice(1);
|
|
53
|
+
}
|
|
54
|
+
var newline = options.newline, trimLeadingNewline = options.trimLeadingNewline, trimTrailingNewline = options.trimTrailingNewline;
|
|
55
|
+
var normalizeNewlines = typeof newline === "string";
|
|
56
|
+
var l = strings.length;
|
|
57
|
+
var outdentedStrings = strings.map(function(v, i) {
|
|
58
|
+
v = v.replace(reMatchIndent, "$1");
|
|
59
|
+
if (i === 0 && trimLeadingNewline) {
|
|
60
|
+
v = v.replace(reLeadingNewline, "");
|
|
61
|
+
}
|
|
62
|
+
if (i === l - 1 && trimTrailingNewline) {
|
|
63
|
+
v = v.replace(reTrailingNewline, "");
|
|
64
|
+
}
|
|
65
|
+
if (normalizeNewlines) {
|
|
66
|
+
v = v.replace(/\r\n|\n|\r/g, function(_) {
|
|
67
|
+
return newline;
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return v;
|
|
71
|
+
});
|
|
72
|
+
return outdentedStrings;
|
|
73
|
+
}
|
|
74
|
+
function concatStringsAndValues(strings, values) {
|
|
75
|
+
var ret = "";
|
|
76
|
+
for (var i = 0, l = strings.length; i < l; i++) {
|
|
77
|
+
ret += strings[i];
|
|
78
|
+
if (i < l - 1) {
|
|
79
|
+
ret += values[i];
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
return ret;
|
|
83
|
+
}
|
|
84
|
+
function isTemplateStringsArray(v) {
|
|
85
|
+
return has(v, "raw") && has(v, "length");
|
|
86
|
+
}
|
|
87
|
+
function createInstance(options) {
|
|
88
|
+
var arrayAutoIndentCache = createWeakMap();
|
|
89
|
+
var arrayFirstInterpSetsIndentCache = createWeakMap();
|
|
90
|
+
function outdent(stringsOrOptions) {
|
|
91
|
+
var values = [];
|
|
92
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
93
|
+
values[_i - 1] = arguments[_i];
|
|
94
|
+
}
|
|
95
|
+
if (isTemplateStringsArray(stringsOrOptions)) {
|
|
96
|
+
var strings = stringsOrOptions;
|
|
97
|
+
var firstInterpolatedValueSetsIndentationLevel = (values[0] === outdent || values[0] === defaultOutdent) && reOnlyWhitespaceWithAtLeastOneNewline.test(strings[0]) && reStartsWithNewlineOrIsEmpty.test(strings[1]);
|
|
98
|
+
var cache = firstInterpolatedValueSetsIndentationLevel ? arrayFirstInterpSetsIndentCache : arrayAutoIndentCache;
|
|
99
|
+
var renderedArray = cache.get(strings);
|
|
100
|
+
if (!renderedArray) {
|
|
101
|
+
renderedArray = _outdentArray(strings, firstInterpolatedValueSetsIndentationLevel, options);
|
|
102
|
+
cache.set(strings, renderedArray);
|
|
103
|
+
}
|
|
104
|
+
if (values.length === 0) {
|
|
105
|
+
return renderedArray[0];
|
|
106
|
+
}
|
|
107
|
+
var rendered = concatStringsAndValues(renderedArray, firstInterpolatedValueSetsIndentationLevel ? values.slice(1) : values);
|
|
108
|
+
return rendered;
|
|
109
|
+
} else {
|
|
110
|
+
return createInstance(extend(extend({}, options), stringsOrOptions || {}));
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
var fullOutdent = extend(outdent, {
|
|
114
|
+
string: function(str) {
|
|
115
|
+
return _outdentArray([str], false, options)[0];
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
return fullOutdent;
|
|
119
|
+
}
|
|
120
|
+
var defaultOutdent = createInstance({
|
|
121
|
+
trimLeadingNewline: true,
|
|
122
|
+
trimTrailingNewline: true
|
|
123
|
+
});
|
|
124
|
+
if (typeof module !== "undefined") {
|
|
125
|
+
try {
|
|
126
|
+
module.exports = defaultOutdent;
|
|
127
|
+
Object.defineProperty(defaultOutdent, "__esModule", { value: true });
|
|
128
|
+
defaultOutdent.default = defaultOutdent;
|
|
129
|
+
defaultOutdent.outdent = defaultOutdent;
|
|
130
|
+
} catch (e) {
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
export {
|
|
135
|
+
defaultOutdent
|
|
136
|
+
};
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultOutdent
|
|
3
|
+
} from "./chunk-YRKN4TFH.js";
|
|
4
|
+
|
|
5
|
+
// src/utils/loadTranslations.ts
|
|
6
|
+
import { readdir } from "fs/promises";
|
|
7
|
+
import { join as join2 } from "path";
|
|
8
|
+
import { fileURLToPath } from "url";
|
|
9
|
+
|
|
10
|
+
// ../fs-utils/src/index.ts
|
|
11
|
+
import { randomBytes } from "crypto";
|
|
12
|
+
import {
|
|
13
|
+
access,
|
|
14
|
+
readFile as fsReadFile,
|
|
15
|
+
writeFile as fsWriteFile,
|
|
16
|
+
mkdir,
|
|
17
|
+
rm
|
|
18
|
+
} from "fs/promises";
|
|
19
|
+
import { EOL, tmpdir } from "os";
|
|
20
|
+
import { dirname, join } from "path";
|
|
21
|
+
async function readJson(file) {
|
|
22
|
+
return JSON.parse(await fsReadFile(file, "utf-8"));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// src/utils/loadTranslations.ts
|
|
26
|
+
import { toNamespaceDictionary } from "@wix/headless-localization-utils";
|
|
27
|
+
|
|
28
|
+
// src/constants.ts
|
|
29
|
+
var TRANSLATIONS_METADATA_FILENAME = "metadata.json";
|
|
30
|
+
var TRANSLATIONS_FILENAME = "translations.json";
|
|
31
|
+
|
|
32
|
+
// src/utils/errorMessages.ts
|
|
33
|
+
function createTranslationFilesError(translationsDir) {
|
|
34
|
+
return new Error(defaultOutdent`
|
|
35
|
+
Failed to load translation file(s).
|
|
36
|
+
💡 Tip: create a file '${translationsDir}/translations.json' in your project, then use the Wix CLI to push these keys.
|
|
37
|
+
|
|
38
|
+
Example translation file structure:
|
|
39
|
+
{
|
|
40
|
+
"hello": "Hello",
|
|
41
|
+
"goodbye": "Goodbye"
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
🔍 Need Help?
|
|
45
|
+
- Visit our docs: https://dev.wix.com/docs/go-headless
|
|
46
|
+
`);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
// src/utils/loadTranslations.ts
|
|
50
|
+
async function loadTranslationFile(filePath) {
|
|
51
|
+
return readJson(filePath).then(
|
|
52
|
+
(data) => toNamespaceDictionary(data)
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
async function loadAllTranslations(astroConfig) {
|
|
56
|
+
const srcDir = fileURLToPath(astroConfig.srcDir);
|
|
57
|
+
const rootDir = fileURLToPath(astroConfig.root);
|
|
58
|
+
const tempDir = join2(rootDir, ".wix");
|
|
59
|
+
const multilingualDir = join2(tempDir, "multilingual");
|
|
60
|
+
const primaryTranslationPath = join2(srcDir, TRANSLATIONS_FILENAME);
|
|
61
|
+
const pulledTranslationsDir = join2(multilingualDir, "translations");
|
|
62
|
+
let metadata;
|
|
63
|
+
let primaryTranslation;
|
|
64
|
+
try {
|
|
65
|
+
metadata = await loadMetadata(multilingualDir);
|
|
66
|
+
primaryTranslation = await loadPrimaryTranslation(
|
|
67
|
+
primaryTranslationPath,
|
|
68
|
+
metadata
|
|
69
|
+
);
|
|
70
|
+
} catch {
|
|
71
|
+
throw createTranslationFilesError(srcDir);
|
|
72
|
+
}
|
|
73
|
+
const wixTranslations = await loadTranslations(pulledTranslationsDir);
|
|
74
|
+
return { ...wixTranslations, ...primaryTranslation };
|
|
75
|
+
}
|
|
76
|
+
async function loadMetadata(translationsMetadataDir) {
|
|
77
|
+
const metadataPath = join2(
|
|
78
|
+
translationsMetadataDir,
|
|
79
|
+
TRANSLATIONS_METADATA_FILENAME
|
|
80
|
+
);
|
|
81
|
+
return await readJson(metadataPath);
|
|
82
|
+
}
|
|
83
|
+
async function loadPrimaryTranslation(primaryTranslationPath, metadata) {
|
|
84
|
+
const translationContent = await loadTranslationFile(primaryTranslationPath);
|
|
85
|
+
return {
|
|
86
|
+
[metadata.primaryLanguageCode]: translationContent
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
async function loadTranslations(translationsDir) {
|
|
90
|
+
const files = await readdir(translationsDir);
|
|
91
|
+
const jsonFiles = files.filter((file) => file.endsWith(".json"));
|
|
92
|
+
const translations = {};
|
|
93
|
+
for (const file of jsonFiles) {
|
|
94
|
+
const languageCode = file.replace(".json", "");
|
|
95
|
+
const filePath = join2(translationsDir, file);
|
|
96
|
+
translations[languageCode] = await loadTranslationFile(filePath);
|
|
97
|
+
}
|
|
98
|
+
return translations;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// src/index.ts
|
|
102
|
+
var createIntegration = () => {
|
|
103
|
+
return {
|
|
104
|
+
name: "@wix/astro/static-translations",
|
|
105
|
+
hooks: {
|
|
106
|
+
"astro:config:setup": async ({
|
|
107
|
+
addMiddleware,
|
|
108
|
+
config: astroConfig,
|
|
109
|
+
updateConfig
|
|
110
|
+
}) => {
|
|
111
|
+
const translations = await loadAllTranslations(astroConfig);
|
|
112
|
+
updateConfig({
|
|
113
|
+
vite: {
|
|
114
|
+
define: {
|
|
115
|
+
__WIX_TRANSLATIONS__: JSON.stringify(translations)
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
addMiddleware({
|
|
120
|
+
entrypoint: new URL(
|
|
121
|
+
"../dependencies/astro-translations/middleware/static-translations.js",
|
|
122
|
+
import.meta.url
|
|
123
|
+
),
|
|
124
|
+
order: "pre"
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
};
|
|
130
|
+
var index_default = createIntegration;
|
|
131
|
+
export {
|
|
132
|
+
index_default as default
|
|
133
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import {
|
|
2
|
+
defaultOutdent
|
|
3
|
+
} from "../chunk-YRKN4TFH.js";
|
|
4
|
+
|
|
5
|
+
// src/middleware/static-translations.ts
|
|
6
|
+
import { i18n } from "@wix/essentials";
|
|
7
|
+
|
|
8
|
+
// ../request-transform-utils/src/transformStreamUtils.ts
|
|
9
|
+
function injectBeforeTransformStream(predicate, htmlToInject) {
|
|
10
|
+
let hasInjected = false;
|
|
11
|
+
return new TransformStream({
|
|
12
|
+
transform: (chunk, controller) => {
|
|
13
|
+
if (!hasInjected) {
|
|
14
|
+
const index = chunk.indexOf(predicate);
|
|
15
|
+
if (index > -1) {
|
|
16
|
+
chunk = chunk.slice(0, index) + htmlToInject + chunk.slice(index);
|
|
17
|
+
hasInjected = true;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
controller.enqueue(chunk);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// ../request-transform-utils/src/index.ts
|
|
26
|
+
var headTransformStream = (htmlToInject) => injectBeforeTransformStream("</head>", htmlToInject);
|
|
27
|
+
|
|
28
|
+
// src/middleware/static-translations.ts
|
|
29
|
+
import { multilingual } from "@wix/site";
|
|
30
|
+
globalThis.__wix_translations__ = __WIX_TRANSLATIONS__;
|
|
31
|
+
var onRequest = async (context, next) => {
|
|
32
|
+
const response = await next();
|
|
33
|
+
const contentType = response.headers.get("Content-Type");
|
|
34
|
+
if (contentType !== "text/html" || context.url.pathname.startsWith("/_wix") || !response.body) {
|
|
35
|
+
return response;
|
|
36
|
+
}
|
|
37
|
+
const filteredTranslations = getFilteredTranslations();
|
|
38
|
+
const translationsScript = defaultOutdent`
|
|
39
|
+
<script>window.__wix_translations__ = ${JSON.stringify(filteredTranslations)};</script>
|
|
40
|
+
`;
|
|
41
|
+
return new Response(
|
|
42
|
+
response.body.pipeThrough(new TextDecoderStream()).pipeThrough(headTransformStream(translationsScript)).pipeThrough(new TextEncoderStream()),
|
|
43
|
+
response
|
|
44
|
+
);
|
|
45
|
+
};
|
|
46
|
+
function getFilteredTranslations() {
|
|
47
|
+
const allTranslations = globalThis.__wix_translations__ ?? {};
|
|
48
|
+
const pickLanguage = (lang) => lang != null && allTranslations[lang] ? { [lang]: allTranslations[lang] } : {};
|
|
49
|
+
const currentLanguage = i18n.getLanguage();
|
|
50
|
+
const primaryLanguage = multilingual.listSupportedLanguages().find((language) => language.primary)?.id;
|
|
51
|
+
return {
|
|
52
|
+
...pickLanguage(currentLanguage),
|
|
53
|
+
...pickLanguage(primaryLanguage)
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
export {
|
|
57
|
+
onRequest
|
|
58
|
+
};
|
|
@@ -4,14 +4,25 @@ declare const createIntegration: () => WixIntegration;
|
|
|
4
4
|
|
|
5
5
|
interface TrustedBackofficePage {
|
|
6
6
|
type: 'TrustedBackofficePage';
|
|
7
|
-
options: Options;
|
|
7
|
+
options: Options$1;
|
|
8
8
|
}
|
|
9
|
-
interface
|
|
9
|
+
interface MetaDataKeyword {
|
|
10
|
+
id: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
interface Options$1 {
|
|
10
14
|
id: string;
|
|
11
15
|
activeSidebarPageId?: string;
|
|
16
|
+
additionalRoutes?: string[];
|
|
12
17
|
component: string;
|
|
13
18
|
fullPage?: boolean;
|
|
14
19
|
hideInSidebar?: boolean;
|
|
20
|
+
metaData?: {
|
|
21
|
+
description?: string;
|
|
22
|
+
keywords?: MetaDataKeyword[];
|
|
23
|
+
searchable?: boolean;
|
|
24
|
+
title?: string;
|
|
25
|
+
};
|
|
15
26
|
pageCategoryId?: string;
|
|
16
27
|
previousRoutePaths?: string[];
|
|
17
28
|
priority?: number;
|
|
@@ -19,6 +30,21 @@ interface Options {
|
|
|
19
30
|
routePath: string;
|
|
20
31
|
title: string;
|
|
21
32
|
}
|
|
22
|
-
declare function trustedBackofficePage(options: Options): TrustedBackofficePage;
|
|
33
|
+
declare function trustedBackofficePage(options: Options$1): TrustedBackofficePage;
|
|
34
|
+
|
|
35
|
+
interface TrustedBackofficeWidget {
|
|
36
|
+
type: 'TrustedBackofficeWidget';
|
|
37
|
+
options: Options;
|
|
38
|
+
}
|
|
39
|
+
interface Options {
|
|
40
|
+
id: string;
|
|
41
|
+
component: string;
|
|
42
|
+
height?: number;
|
|
43
|
+
requiredPermission?: string;
|
|
44
|
+
slotIds?: string[];
|
|
45
|
+
title: string;
|
|
46
|
+
width?: number;
|
|
47
|
+
}
|
|
48
|
+
declare function trustedBackofficeWidget(options: Options): TrustedBackofficeWidget;
|
|
23
49
|
|
|
24
|
-
export { createIntegration as default, trustedBackofficePage };
|
|
50
|
+
export { createIntegration as default, trustedBackofficePage, trustedBackofficeWidget };
|
|
@@ -3,10 +3,10 @@ const require = _createRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
contextProvider,
|
|
5
5
|
functionLibrary
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XF55M5AE.js";
|
|
7
7
|
import {
|
|
8
8
|
init_esm_shims
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-23MOLCVI.js";
|
|
10
10
|
|
|
11
11
|
// src/builders-experimental.ts
|
|
12
12
|
init_esm_shims();
|
|
@@ -1,17 +1,28 @@
|
|
|
1
|
-
import { c as customElement, e as ecomAdditionalFees, a as ecomDiscountTriggers,
|
|
1
|
+
import { b as bookingsStaffSortingProvider, c as customElement, e as ecomAdditionalFees, a as ecomDiscountTriggers, d as ecomGiftCards, f as ecomPaymentSettings, g as ecomShippingRates, h as ecomValidations, i as embeddedScript, w as webhook, s as siteComponent, j as siteComponentPanel, k as sitePlugin } from './index.d-BUVlSCHa.js';
|
|
2
2
|
import { g as genericExtension } from './index.d-D4c48TR0.js';
|
|
3
3
|
export { a as app } from './index.d-D4c48TR0.js';
|
|
4
4
|
|
|
5
5
|
interface TrustedBackofficePage {
|
|
6
6
|
type: 'TrustedBackofficePage';
|
|
7
|
-
options: Options;
|
|
7
|
+
options: Options$1;
|
|
8
8
|
}
|
|
9
|
-
interface
|
|
9
|
+
interface MetaDataKeyword {
|
|
10
|
+
id: string;
|
|
11
|
+
value: string;
|
|
12
|
+
}
|
|
13
|
+
interface Options$1 {
|
|
10
14
|
id: string;
|
|
11
15
|
activeSidebarPageId?: string;
|
|
16
|
+
additionalRoutes?: string[];
|
|
12
17
|
component: string;
|
|
13
18
|
fullPage?: boolean;
|
|
14
19
|
hideInSidebar?: boolean;
|
|
20
|
+
metaData?: {
|
|
21
|
+
description?: string;
|
|
22
|
+
keywords?: MetaDataKeyword[];
|
|
23
|
+
searchable?: boolean;
|
|
24
|
+
title?: string;
|
|
25
|
+
};
|
|
15
26
|
pageCategoryId?: string;
|
|
16
27
|
previousRoutePaths?: string[];
|
|
17
28
|
priority?: number;
|
|
@@ -19,10 +30,27 @@ interface Options {
|
|
|
19
30
|
routePath: string;
|
|
20
31
|
title: string;
|
|
21
32
|
}
|
|
22
|
-
declare function trustedBackofficePage(options: Options): TrustedBackofficePage;
|
|
33
|
+
declare function trustedBackofficePage(options: Options$1): TrustedBackofficePage;
|
|
34
|
+
|
|
35
|
+
interface TrustedBackofficeWidget {
|
|
36
|
+
type: 'TrustedBackofficeWidget';
|
|
37
|
+
options: Options;
|
|
38
|
+
}
|
|
39
|
+
interface Options {
|
|
40
|
+
id: string;
|
|
41
|
+
component: string;
|
|
42
|
+
height?: number;
|
|
43
|
+
requiredPermission?: string;
|
|
44
|
+
slotIds?: string[];
|
|
45
|
+
title: string;
|
|
46
|
+
width?: number;
|
|
47
|
+
}
|
|
48
|
+
declare function trustedBackofficeWidget(options: Options): TrustedBackofficeWidget;
|
|
23
49
|
|
|
24
50
|
declare const extensions: {
|
|
51
|
+
bookingsStaffSortingProvider: typeof bookingsStaffSortingProvider;
|
|
25
52
|
customElement: typeof customElement;
|
|
53
|
+
dashboardExportedComponent: typeof trustedBackofficeWidget;
|
|
26
54
|
dashboardPage: typeof trustedBackofficePage;
|
|
27
55
|
ecomAdditionalFees: typeof ecomAdditionalFees;
|
|
28
56
|
ecomDiscountTriggers: typeof ecomDiscountTriggers;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { createRequire as _createRequire } from 'node:module';
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
|
-
trustedBackofficePage
|
|
5
|
-
|
|
4
|
+
trustedBackofficePage,
|
|
5
|
+
trustedBackofficeWidget
|
|
6
|
+
} from "./chunk-LQFJQHEX.js";
|
|
6
7
|
import {
|
|
7
8
|
app,
|
|
9
|
+
bookingsStaffSortingProvider,
|
|
8
10
|
customElement,
|
|
9
11
|
ecomAdditionalFees,
|
|
10
12
|
ecomDiscountTriggers,
|
|
@@ -18,15 +20,17 @@ import {
|
|
|
18
20
|
siteComponentPanel,
|
|
19
21
|
sitePlugin,
|
|
20
22
|
webhook
|
|
21
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-CTGNWVC3.js";
|
|
22
24
|
import {
|
|
23
25
|
init_esm_shims
|
|
24
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-23MOLCVI.js";
|
|
25
27
|
|
|
26
28
|
// src/builders-trusted.ts
|
|
27
29
|
init_esm_shims();
|
|
28
30
|
var extensions = {
|
|
31
|
+
bookingsStaffSortingProvider,
|
|
29
32
|
customElement,
|
|
33
|
+
dashboardExportedComponent: trustedBackofficeWidget,
|
|
30
34
|
dashboardPage: trustedBackofficePage,
|
|
31
35
|
ecomAdditionalFees,
|
|
32
36
|
ecomDiscountTriggers,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/builders-trusted.ts"],"sourcesContent":["import {\n ecomAdditionalFees,\n ecomDiscountTriggers,\n ecomGiftCards,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n webhook as event,\n} from '@wix/astro-backend-extensions';\nimport { genericExtension } from '@wix/astro-core';\nimport {\n customElement,\n sitePlugin,\n} from '@wix/astro-custom-elements-extensions';\nimport { embeddedScript } from '@wix/astro-embedded-scripts-extensions';\nimport { siteComponentPanel } from '@wix/astro-site-component-panels-extensions';\nimport { siteComponent } from '@wix/astro-site-components-extensions';\nimport { trustedBackofficePage as dashboardPage
|
|
1
|
+
{"version":3,"sources":["../../src/builders-trusted.ts"],"sourcesContent":["import {\n bookingsStaffSortingProvider,\n ecomAdditionalFees,\n ecomDiscountTriggers,\n ecomGiftCards,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n webhook as event,\n} from '@wix/astro-backend-extensions';\nimport { genericExtension } from '@wix/astro-core';\nimport {\n customElement,\n sitePlugin,\n} from '@wix/astro-custom-elements-extensions';\nimport { embeddedScript } from '@wix/astro-embedded-scripts-extensions';\nimport { siteComponentPanel } from '@wix/astro-site-component-panels-extensions';\nimport { siteComponent } from '@wix/astro-site-components-extensions';\nimport {\n trustedBackofficeWidget as dashboardExportedComponent,\n trustedBackofficePage as dashboardPage,\n} from '@wix/astro-trusted-backoffice-extensions';\n\nexport { app } from '@wix/astro-core';\n\nexport const extensions = {\n bookingsStaffSortingProvider,\n customElement,\n dashboardExportedComponent,\n dashboardPage,\n ecomAdditionalFees,\n ecomDiscountTriggers,\n ecomGiftCards,\n ecomPaymentSettings,\n ecomShippingRates,\n ecomValidations,\n embeddedScript,\n event,\n genericExtension,\n siteComponent,\n siteComponentPanel,\n sitePlugin,\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAyBO,IAAM,aAAa;AAAA,EACxB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as customElement, e as ecomAdditionalFees, a as ecomDiscountTriggers,
|
|
1
|
+
import { b as bookingsStaffSortingProvider, c as customElement, e as ecomAdditionalFees, a as ecomDiscountTriggers, d as ecomGiftCards, f as ecomPaymentSettings, g as ecomShippingRates, h as ecomValidations, i as embeddedScript, w as webhook, s as siteComponent, j as siteComponentPanel, k as sitePlugin } from './index.d-BUVlSCHa.js';
|
|
2
2
|
import { g as genericExtension } from './index.d-D4c48TR0.js';
|
|
3
3
|
export { a as app } from './index.d-D4c48TR0.js';
|
|
4
4
|
|
|
@@ -66,6 +66,7 @@ interface Options {
|
|
|
66
66
|
declare function backofficePage(options: Options): BackofficePage;
|
|
67
67
|
|
|
68
68
|
declare const extensions: {
|
|
69
|
+
bookingsStaffSortingProvider: typeof bookingsStaffSortingProvider;
|
|
69
70
|
customElement: typeof customElement;
|
|
70
71
|
dashboardMenuPlugin: typeof backofficeExtensionMenuPlugin;
|
|
71
72
|
dashboardModal: typeof backofficeModal;
|
|
@@ -2,11 +2,11 @@ import { createRequire as _createRequire } from 'node:module';
|
|
|
2
2
|
const require = _createRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
extensions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-S5CQHYTB.js";
|
|
6
6
|
import {
|
|
7
7
|
app
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-CTGNWVC3.js";
|
|
9
|
+
import "./chunk-23MOLCVI.js";
|
|
10
10
|
export {
|
|
11
11
|
app,
|
|
12
12
|
extensions
|
|
@@ -434,8 +434,8 @@ async function buildAll(configs) {
|
|
|
434
434
|
}
|
|
435
435
|
return viteBuildOutputToRollupOutputs(buildOutput);
|
|
436
436
|
}
|
|
437
|
-
function cacheDir(name) {
|
|
438
|
-
return join("node_modules", ".vite-wix", name);
|
|
437
|
+
function cacheDir(rootDir, name) {
|
|
438
|
+
return join(rootDir, "node_modules", ".vite-wix", name);
|
|
439
439
|
}
|
|
440
440
|
async function createTemporaryViteServer(viteConfig) {
|
|
441
441
|
const server = await createServer(
|
|
@@ -1084,4 +1084,4 @@ export {
|
|
|
1084
1084
|
defaultOutdent,
|
|
1085
1085
|
m
|
|
1086
1086
|
};
|
|
1087
|
-
//# sourceMappingURL=chunk-
|
|
1087
|
+
//# sourceMappingURL=chunk-23MOLCVI.js.map
|