@wix/ditto-codegen-public 1.0.19 → 1.0.21
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/examples-apps/survey-manager/README.md +21 -0
- package/dist/examples-apps/survey-manager/package-lock.json +14252 -0
- package/dist/examples-apps/survey-manager/package.json +36 -0
- package/dist/examples-apps/survey-manager/src/dashboard/pages/page.tsx +551 -0
- package/dist/examples-apps/survey-manager/src/dashboard/pages/wix_logo.svg +18 -0
- package/dist/examples-apps/survey-manager/src/extensions.ts +12 -0
- package/dist/examples-apps/survey-manager/tsconfig.json +8 -0
- package/dist/examples-apps/survey-manager/wix.config.json +4 -0
- package/dist/out.js +39 -211
- package/package.json +2 -2
package/dist/out.js
CHANGED
|
@@ -77546,7 +77546,7 @@ var require_versions = __commonJS({
|
|
|
77546
77546
|
exports2.version = {
|
|
77547
77547
|
major: 4,
|
|
77548
77548
|
minor: 1,
|
|
77549
|
-
patch:
|
|
77549
|
+
patch: 11
|
|
77550
77550
|
};
|
|
77551
77551
|
}
|
|
77552
77552
|
});
|
|
@@ -78308,6 +78308,19 @@ var require_schemas = __commonJS({
|
|
|
78308
78308
|
}
|
|
78309
78309
|
exports2.$ZodObject = core.$constructor("$ZodObject", (inst, def) => {
|
|
78310
78310
|
exports2.$ZodType.init(inst, def);
|
|
78311
|
+
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
78312
|
+
if (!desc?.get) {
|
|
78313
|
+
const sh = def.shape;
|
|
78314
|
+
Object.defineProperty(def, "shape", {
|
|
78315
|
+
get: () => {
|
|
78316
|
+
const newSh = { ...sh };
|
|
78317
|
+
Object.defineProperty(def, "shape", {
|
|
78318
|
+
value: newSh
|
|
78319
|
+
});
|
|
78320
|
+
return newSh;
|
|
78321
|
+
}
|
|
78322
|
+
});
|
|
78323
|
+
}
|
|
78311
78324
|
const _normalized = util.cached(() => normalizeDef(def));
|
|
78312
78325
|
util.defineLazy(inst._zod, "propValues", () => {
|
|
78313
78326
|
const shape = def.shape;
|
|
@@ -89140,16 +89153,12 @@ var require_schemas2 = __commonJS({
|
|
|
89140
89153
|
inst.type = def.type;
|
|
89141
89154
|
Object.defineProperty(inst, "_def", { value: def });
|
|
89142
89155
|
inst.check = (...checks2) => {
|
|
89143
|
-
return inst.clone(
|
|
89144
|
-
|
|
89145
|
-
...def,
|
|
89146
|
-
|
|
89147
|
-
|
|
89148
|
-
|
|
89149
|
-
]
|
|
89150
|
-
}
|
|
89151
|
-
// { parent: true }
|
|
89152
|
-
);
|
|
89156
|
+
return inst.clone(index_js_1.util.mergeDefs(def, {
|
|
89157
|
+
checks: [
|
|
89158
|
+
...def.checks ?? [],
|
|
89159
|
+
...checks2.map((ch) => typeof ch === "function" ? { _zod: { check: ch, def: { check: "custom" }, onattach: [] } } : ch)
|
|
89160
|
+
]
|
|
89161
|
+
}));
|
|
89153
89162
|
};
|
|
89154
89163
|
inst.clone = (def2, params) => core.clone(inst, def2, params);
|
|
89155
89164
|
inst.brand = () => inst;
|
|
@@ -89608,7 +89617,9 @@ var require_schemas2 = __commonJS({
|
|
|
89608
89617
|
exports2.ZodObject = core.$constructor("ZodObject", (inst, def) => {
|
|
89609
89618
|
core.$ZodObjectJIT.init(inst, def);
|
|
89610
89619
|
exports2.ZodType.init(inst, def);
|
|
89611
|
-
index_js_1.util.defineLazy(inst, "shape", () =>
|
|
89620
|
+
index_js_1.util.defineLazy(inst, "shape", () => {
|
|
89621
|
+
return def.shape;
|
|
89622
|
+
});
|
|
89612
89623
|
inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
|
|
89613
89624
|
inst.catchall = (catchall) => inst.clone({ ...inst._zod.def, catchall });
|
|
89614
89625
|
inst.passthrough = () => inst.clone({ ...inst._zod.def, catchall: unknown() });
|
|
@@ -89630,10 +89641,7 @@ var require_schemas2 = __commonJS({
|
|
|
89630
89641
|
function object(shape, params) {
|
|
89631
89642
|
const def = {
|
|
89632
89643
|
type: "object",
|
|
89633
|
-
|
|
89634
|
-
index_js_1.util.assignProp(this, "shape", shape ? index_js_1.util.objectClone(shape) : {});
|
|
89635
|
-
return this.shape;
|
|
89636
|
-
},
|
|
89644
|
+
shape: shape ?? {},
|
|
89637
89645
|
...index_js_1.util.normalizeParams(params)
|
|
89638
89646
|
};
|
|
89639
89647
|
return new exports2.ZodObject(def);
|
|
@@ -89641,10 +89649,7 @@ var require_schemas2 = __commonJS({
|
|
|
89641
89649
|
function strictObject(shape, params) {
|
|
89642
89650
|
return new exports2.ZodObject({
|
|
89643
89651
|
type: "object",
|
|
89644
|
-
|
|
89645
|
-
index_js_1.util.assignProp(this, "shape", index_js_1.util.objectClone(shape));
|
|
89646
|
-
return this.shape;
|
|
89647
|
-
},
|
|
89652
|
+
shape,
|
|
89648
89653
|
catchall: never(),
|
|
89649
89654
|
...index_js_1.util.normalizeParams(params)
|
|
89650
89655
|
});
|
|
@@ -89652,10 +89657,7 @@ var require_schemas2 = __commonJS({
|
|
|
89652
89657
|
function looseObject(shape, params) {
|
|
89653
89658
|
return new exports2.ZodObject({
|
|
89654
89659
|
type: "object",
|
|
89655
|
-
|
|
89656
|
-
index_js_1.util.assignProp(this, "shape", index_js_1.util.objectClone(shape));
|
|
89657
|
-
return this.shape;
|
|
89658
|
-
},
|
|
89660
|
+
shape,
|
|
89659
89661
|
catchall: unknown(),
|
|
89660
89662
|
...index_js_1.util.normalizeParams(params)
|
|
89661
89663
|
});
|
|
@@ -114342,11 +114344,24 @@ var require_load_examples = __commonJS({
|
|
|
114342
114344
|
[types.CustomElementPlugin]: [],
|
|
114343
114345
|
[types.CustomElementWidget]: []
|
|
114344
114346
|
}
|
|
114347
|
+
},
|
|
114348
|
+
SurveyManager: {
|
|
114349
|
+
path: "survey-manager",
|
|
114350
|
+
description: "A dashboard app that allows administrators to create and manage rating (1-5) survey questions and view aggregated results",
|
|
114351
|
+
files: {
|
|
114352
|
+
[types.APIExtension]: [],
|
|
114353
|
+
[types.DashboardPage]: ["survey-manager/src/dashboard/pages/page.tsx"],
|
|
114354
|
+
[types.EmbeddedScript]: [],
|
|
114355
|
+
[types.ServicePluginExtension]: [],
|
|
114356
|
+
[types.CustomElementPlugin]: [],
|
|
114357
|
+
[types.CustomElementWidget]: []
|
|
114358
|
+
}
|
|
114345
114359
|
}
|
|
114346
114360
|
};
|
|
114347
114361
|
exports2.examples = {
|
|
114348
114362
|
[types.APIExtension]: [appsExamples.AIChatbot],
|
|
114349
114363
|
[types.DashboardPage]: [
|
|
114364
|
+
appsExamples.SurveyManager,
|
|
114350
114365
|
appsExamples.AIChatbot,
|
|
114351
114366
|
appsExamples.CustomProductsCatalog,
|
|
114352
114367
|
appsExamples.MixPanelAnalystic,
|
|
@@ -115231,196 +115246,12 @@ dashboard.onBeforeUnload(() => {
|
|
|
115231
115246
|
}
|
|
115232
115247
|
});
|
|
115233
115248
|
|
|
115234
|
-
// dist/system-prompts/dashboardPage/buttonAndModalExamples.js
|
|
115235
|
-
var require_buttonAndModalExamples = __commonJS({
|
|
115236
|
-
"dist/system-prompts/dashboardPage/buttonAndModalExamples.js"(exports2) {
|
|
115237
|
-
"use strict";
|
|
115238
|
-
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
115239
|
-
exports2.buttonAndModalExamples = void 0;
|
|
115240
|
-
exports2.buttonAndModalExamples = `
|
|
115241
|
-
## Dashboard UI Components - Buttons and Modals Examples
|
|
115242
|
-
|
|
115243
|
-
### Essential Imports for Dashboard Components
|
|
115244
|
-
|
|
115245
|
-
\`\`\`typescript
|
|
115246
|
-
import React, { type FC, useState, useEffect } from 'react';
|
|
115247
|
-
import { dashboard } from '@wix/dashboard';
|
|
115248
|
-
import {
|
|
115249
|
-
Button,
|
|
115250
|
-
Page,
|
|
115251
|
-
WixDesignSystemProvider,
|
|
115252
|
-
Tabs,
|
|
115253
|
-
Card,
|
|
115254
|
-
Table,
|
|
115255
|
-
TableActionCell,
|
|
115256
|
-
TableToolbar,
|
|
115257
|
-
Modal,
|
|
115258
|
-
CustomModalLayout,
|
|
115259
|
-
FormField,
|
|
115260
|
-
Input,
|
|
115261
|
-
ToggleSwitch,
|
|
115262
|
-
Layout,
|
|
115263
|
-
Cell,
|
|
115264
|
-
Badge,
|
|
115265
|
-
Box,
|
|
115266
|
-
Text,
|
|
115267
|
-
} from '@wix/design-system';
|
|
115268
|
-
import '@wix/design-system/styles.global.css';
|
|
115269
|
-
import * as Icons from '@wix/wix-ui-icons-common';
|
|
115270
|
-
import { items } from "@wix/data";
|
|
115271
|
-
\`\`\`
|
|
115272
|
-
|
|
115273
|
-
### Button Examples
|
|
115274
|
-
|
|
115275
|
-
#### Primary Action Buttons
|
|
115276
|
-
\`\`\`typescript
|
|
115277
|
-
// Add/Create button with icon
|
|
115278
|
-
<Button
|
|
115279
|
-
size="small"
|
|
115280
|
-
prefixIcon={<Icons.Add />}
|
|
115281
|
-
onClick={() => openModal('item')}
|
|
115282
|
-
>
|
|
115283
|
-
Add Item
|
|
115284
|
-
</Button>
|
|
115285
|
-
|
|
115286
|
-
// Save button (primary)
|
|
115287
|
-
<Button
|
|
115288
|
-
priority="primary"
|
|
115289
|
-
onClick={handleSave}
|
|
115290
|
-
disabled={loading}
|
|
115291
|
-
>
|
|
115292
|
-
{loading ? 'Saving...' : 'Save'}
|
|
115293
|
-
</Button>
|
|
115294
|
-
\`\`\`
|
|
115295
|
-
|
|
115296
|
-
#### Table Action Buttons
|
|
115297
|
-
\`\`\`typescript
|
|
115298
|
-
const columns = [
|
|
115299
|
-
{ title: 'Name', render: (row: YourType) => row.name },
|
|
115300
|
-
{
|
|
115301
|
-
render: (row: YourType) => (
|
|
115302
|
-
<TableActionCell
|
|
115303
|
-
primaryAction={{
|
|
115304
|
-
text: 'Edit',
|
|
115305
|
-
onClick: () => openModal('item', row)
|
|
115306
|
-
}}
|
|
115307
|
-
secondaryActions={[
|
|
115308
|
-
{
|
|
115309
|
-
text: 'Delete',
|
|
115310
|
-
icon: <Icons.DeleteSmall />,
|
|
115311
|
-
onClick: () => handleDelete(row._id!)
|
|
115312
|
-
}
|
|
115313
|
-
]}
|
|
115314
|
-
/>
|
|
115315
|
-
)
|
|
115316
|
-
}
|
|
115317
|
-
];
|
|
115318
|
-
\`\`\`
|
|
115319
|
-
|
|
115320
|
-
### Modal Examples
|
|
115321
|
-
|
|
115322
|
-
#### State Management for Modals
|
|
115323
|
-
\`\`\`typescript
|
|
115324
|
-
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
115325
|
-
const [modalType, setModalType] = useState<'item'>('item');
|
|
115326
|
-
const [editingItem, setEditingItem] = useState<YourType | null>(null);
|
|
115327
|
-
const [formData, setFormData] = useState<any>({});
|
|
115328
|
-
|
|
115329
|
-
const openModal = (type: 'item', item?: YourType) => {
|
|
115330
|
-
setModalType(type);
|
|
115331
|
-
setEditingItem(item || null);
|
|
115332
|
-
|
|
115333
|
-
// Initialize form data based on editing or creating
|
|
115334
|
-
if (item) {
|
|
115335
|
-
setFormData({
|
|
115336
|
-
name: item.name,
|
|
115337
|
-
description: item.description,
|
|
115338
|
-
isActive: item.isActive,
|
|
115339
|
-
// ... other fields
|
|
115340
|
-
});
|
|
115341
|
-
} else {
|
|
115342
|
-
setFormData({
|
|
115343
|
-
name: '',
|
|
115344
|
-
description: '',
|
|
115345
|
-
isActive: true,
|
|
115346
|
-
// ... default values
|
|
115347
|
-
});
|
|
115348
|
-
}
|
|
115349
|
-
|
|
115350
|
-
setIsModalOpen(true);
|
|
115351
|
-
};
|
|
115352
|
-
|
|
115353
|
-
const closeModal = () => {
|
|
115354
|
-
setIsModalOpen(false);
|
|
115355
|
-
setEditingItem(null);
|
|
115356
|
-
setFormData({});
|
|
115357
|
-
};
|
|
115358
|
-
\`\`\`
|
|
115359
|
-
|
|
115360
|
-
#### Basic Modal with Form
|
|
115361
|
-
\`\`\`typescript
|
|
115362
|
-
<Modal isOpen={isModalOpen} onRequestClose={closeModal}>
|
|
115363
|
-
<CustomModalLayout
|
|
115364
|
-
primaryButtonText="Save"
|
|
115365
|
-
secondaryButtonText="Cancel"
|
|
115366
|
-
onCloseButtonClick={closeModal}
|
|
115367
|
-
primaryButtonOnClick={handleSave}
|
|
115368
|
-
secondaryButtonOnClick={closeModal}
|
|
115369
|
-
title={\`\${editingItem ? 'Edit' : 'Add'} Item\`}
|
|
115370
|
-
content={
|
|
115371
|
-
<Layout gap="24px">
|
|
115372
|
-
<Cell span={12}>
|
|
115373
|
-
<FormField label="Name">
|
|
115374
|
-
<Input
|
|
115375
|
-
value={formData.name || ''}
|
|
115376
|
-
onChange={(e) => setFormData({ ...formData, name: e.target.value })}
|
|
115377
|
-
placeholder="Enter item name"
|
|
115378
|
-
/>
|
|
115379
|
-
</FormField>
|
|
115380
|
-
</Cell>
|
|
115381
|
-
<Cell span={12}>
|
|
115382
|
-
<FormField label="Description">
|
|
115383
|
-
<Input
|
|
115384
|
-
value={formData.description || ''}
|
|
115385
|
-
onChange={(e) => setFormData({ ...formData, description: e.target.value })}
|
|
115386
|
-
placeholder="Enter description"
|
|
115387
|
-
/>
|
|
115388
|
-
</FormField>
|
|
115389
|
-
</Cell>
|
|
115390
|
-
<Cell span={6}>
|
|
115391
|
-
<FormField label="Price">
|
|
115392
|
-
<Input
|
|
115393
|
-
type="number"
|
|
115394
|
-
value={formData.price || ''}
|
|
115395
|
-
onChange={(e) => setFormData({ ...formData, price: Number(e.target.value) })}
|
|
115396
|
-
placeholder="0.00"
|
|
115397
|
-
/>
|
|
115398
|
-
</FormField>
|
|
115399
|
-
</Cell>
|
|
115400
|
-
<Cell span={6}>
|
|
115401
|
-
<FormField label="Active" labelPlacement="right" stretchContent={false}>
|
|
115402
|
-
<ToggleSwitch
|
|
115403
|
-
checked={formData.isActive || false}
|
|
115404
|
-
onChange={() => setFormData({ ...formData, isActive: !formData.isActive })}
|
|
115405
|
-
/>
|
|
115406
|
-
</FormField>
|
|
115407
|
-
</Cell>
|
|
115408
|
-
</Layout>
|
|
115409
|
-
}
|
|
115410
|
-
/>
|
|
115411
|
-
</Modal>
|
|
115412
|
-
\`\`\`
|
|
115413
|
-
`;
|
|
115414
|
-
}
|
|
115415
|
-
});
|
|
115416
|
-
|
|
115417
115249
|
// dist/system-prompts/dashboardPage/wdsPackage.js
|
|
115418
115250
|
var require_wdsPackage = __commonJS({
|
|
115419
115251
|
"dist/system-prompts/dashboardPage/wdsPackage.js"(exports2) {
|
|
115420
115252
|
"use strict";
|
|
115421
115253
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
115422
115254
|
exports2.buildWdsSystemPrompt = buildWdsSystemPrompt;
|
|
115423
|
-
var buttonAndModalExamples_1 = require_buttonAndModalExamples();
|
|
115424
115255
|
var STORIES_URL = "https://mykolass.wixsite.com/storybook-builder/_functions/getStoriesList?production=true&library=wix-style-react";
|
|
115425
115256
|
function normalize(text) {
|
|
115426
115257
|
return (text || "").toLowerCase();
|
|
@@ -115473,9 +115304,6 @@ ${exampleLines}
|
|
|
115473
115304
|
<wds_reference>
|
|
115474
115305
|
<source>Wix Design System \u2014 filtered components</source>
|
|
115475
115306
|
${blocks}
|
|
115476
|
-
|
|
115477
|
-
${buttonAndModalExamples_1.buttonAndModalExamples}
|
|
115478
|
-
|
|
115479
115307
|
</wds_reference>`;
|
|
115480
115308
|
}
|
|
115481
115309
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/ditto-codegen-public",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.21",
|
|
4
4
|
"description": "AI-powered Wix CLI app generator - standalone executable",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "node build.mjs",
|
|
@@ -24,5 +24,5 @@
|
|
|
24
24
|
"@wix/ditto-codegen": "1.0.0",
|
|
25
25
|
"esbuild": "^0.25.9"
|
|
26
26
|
},
|
|
27
|
-
"falconPackageHash": "
|
|
27
|
+
"falconPackageHash": "c768bb17a30be1152e5ce34e531e2808f5f77ede5af1fd56496ce1ac"
|
|
28
28
|
}
|