@wix/ditto-codegen-public 1.0.20 → 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/out.js CHANGED
@@ -114344,11 +114344,24 @@ var require_load_examples = __commonJS({
114344
114344
  [types.CustomElementPlugin]: [],
114345
114345
  [types.CustomElementWidget]: []
114346
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
+ }
114347
114359
  }
114348
114360
  };
114349
114361
  exports2.examples = {
114350
114362
  [types.APIExtension]: [appsExamples.AIChatbot],
114351
114363
  [types.DashboardPage]: [
114364
+ appsExamples.SurveyManager,
114352
114365
  appsExamples.AIChatbot,
114353
114366
  appsExamples.CustomProductsCatalog,
114354
114367
  appsExamples.MixPanelAnalystic,
@@ -115233,196 +115246,12 @@ dashboard.onBeforeUnload(() => {
115233
115246
  }
115234
115247
  });
115235
115248
 
115236
- // dist/system-prompts/dashboardPage/buttonAndModalExamples.js
115237
- var require_buttonAndModalExamples = __commonJS({
115238
- "dist/system-prompts/dashboardPage/buttonAndModalExamples.js"(exports2) {
115239
- "use strict";
115240
- Object.defineProperty(exports2, "__esModule", { value: true });
115241
- exports2.buttonAndModalExamples = void 0;
115242
- exports2.buttonAndModalExamples = `
115243
- ## Dashboard UI Components - Buttons and Modals Examples
115244
-
115245
- ### Essential Imports for Dashboard Components
115246
-
115247
- \`\`\`typescript
115248
- import React, { type FC, useState, useEffect } from 'react';
115249
- import { dashboard } from '@wix/dashboard';
115250
- import {
115251
- Button,
115252
- Page,
115253
- WixDesignSystemProvider,
115254
- Tabs,
115255
- Card,
115256
- Table,
115257
- TableActionCell,
115258
- TableToolbar,
115259
- Modal,
115260
- CustomModalLayout,
115261
- FormField,
115262
- Input,
115263
- ToggleSwitch,
115264
- Layout,
115265
- Cell,
115266
- Badge,
115267
- Box,
115268
- Text,
115269
- } from '@wix/design-system';
115270
- import '@wix/design-system/styles.global.css';
115271
- import * as Icons from '@wix/wix-ui-icons-common';
115272
- import { items } from "@wix/data";
115273
- \`\`\`
115274
-
115275
- ### Button Examples
115276
-
115277
- #### Primary Action Buttons
115278
- \`\`\`typescript
115279
- // Add/Create button with icon
115280
- <Button
115281
- size="small"
115282
- prefixIcon={<Icons.Add />}
115283
- onClick={() => openModal('item')}
115284
- >
115285
- Add Item
115286
- </Button>
115287
-
115288
- // Save button (primary)
115289
- <Button
115290
- priority="primary"
115291
- onClick={handleSave}
115292
- disabled={loading}
115293
- >
115294
- {loading ? 'Saving...' : 'Save'}
115295
- </Button>
115296
- \`\`\`
115297
-
115298
- #### Table Action Buttons
115299
- \`\`\`typescript
115300
- const columns = [
115301
- { title: 'Name', render: (row: YourType) => row.name },
115302
- {
115303
- render: (row: YourType) => (
115304
- <TableActionCell
115305
- primaryAction={{
115306
- text: 'Edit',
115307
- onClick: () => openModal('item', row)
115308
- }}
115309
- secondaryActions={[
115310
- {
115311
- text: 'Delete',
115312
- icon: <Icons.DeleteSmall />,
115313
- onClick: () => handleDelete(row._id!)
115314
- }
115315
- ]}
115316
- />
115317
- )
115318
- }
115319
- ];
115320
- \`\`\`
115321
-
115322
- ### Modal Examples
115323
-
115324
- #### State Management for Modals
115325
- \`\`\`typescript
115326
- const [isModalOpen, setIsModalOpen] = useState(false);
115327
- const [modalType, setModalType] = useState<'item'>('item');
115328
- const [editingItem, setEditingItem] = useState<YourType | null>(null);
115329
- const [formData, setFormData] = useState<any>({});
115330
-
115331
- const openModal = (type: 'item', item?: YourType) => {
115332
- setModalType(type);
115333
- setEditingItem(item || null);
115334
-
115335
- // Initialize form data based on editing or creating
115336
- if (item) {
115337
- setFormData({
115338
- name: item.name,
115339
- description: item.description,
115340
- isActive: item.isActive,
115341
- // ... other fields
115342
- });
115343
- } else {
115344
- setFormData({
115345
- name: '',
115346
- description: '',
115347
- isActive: true,
115348
- // ... default values
115349
- });
115350
- }
115351
-
115352
- setIsModalOpen(true);
115353
- };
115354
-
115355
- const closeModal = () => {
115356
- setIsModalOpen(false);
115357
- setEditingItem(null);
115358
- setFormData({});
115359
- };
115360
- \`\`\`
115361
-
115362
- #### Basic Modal with Form
115363
- \`\`\`typescript
115364
- <Modal isOpen={isModalOpen} onRequestClose={closeModal}>
115365
- <CustomModalLayout
115366
- primaryButtonText="Save"
115367
- secondaryButtonText="Cancel"
115368
- onCloseButtonClick={closeModal}
115369
- primaryButtonOnClick={handleSave}
115370
- secondaryButtonOnClick={closeModal}
115371
- title={\`\${editingItem ? 'Edit' : 'Add'} Item\`}
115372
- content={
115373
- <Layout gap="24px">
115374
- <Cell span={12}>
115375
- <FormField label="Name">
115376
- <Input
115377
- value={formData.name || ''}
115378
- onChange={(e) => setFormData({ ...formData, name: e.target.value })}
115379
- placeholder="Enter item name"
115380
- />
115381
- </FormField>
115382
- </Cell>
115383
- <Cell span={12}>
115384
- <FormField label="Description">
115385
- <Input
115386
- value={formData.description || ''}
115387
- onChange={(e) => setFormData({ ...formData, description: e.target.value })}
115388
- placeholder="Enter description"
115389
- />
115390
- </FormField>
115391
- </Cell>
115392
- <Cell span={6}>
115393
- <FormField label="Price">
115394
- <Input
115395
- type="number"
115396
- value={formData.price || ''}
115397
- onChange={(e) => setFormData({ ...formData, price: Number(e.target.value) })}
115398
- placeholder="0.00"
115399
- />
115400
- </FormField>
115401
- </Cell>
115402
- <Cell span={6}>
115403
- <FormField label="Active" labelPlacement="right" stretchContent={false}>
115404
- <ToggleSwitch
115405
- checked={formData.isActive || false}
115406
- onChange={() => setFormData({ ...formData, isActive: !formData.isActive })}
115407
- />
115408
- </FormField>
115409
- </Cell>
115410
- </Layout>
115411
- }
115412
- />
115413
- </Modal>
115414
- \`\`\`
115415
- `;
115416
- }
115417
- });
115418
-
115419
115249
  // dist/system-prompts/dashboardPage/wdsPackage.js
115420
115250
  var require_wdsPackage = __commonJS({
115421
115251
  "dist/system-prompts/dashboardPage/wdsPackage.js"(exports2) {
115422
115252
  "use strict";
115423
115253
  Object.defineProperty(exports2, "__esModule", { value: true });
115424
115254
  exports2.buildWdsSystemPrompt = buildWdsSystemPrompt;
115425
- var buttonAndModalExamples_1 = require_buttonAndModalExamples();
115426
115255
  var STORIES_URL = "https://mykolass.wixsite.com/storybook-builder/_functions/getStoriesList?production=true&library=wix-style-react";
115427
115256
  function normalize(text) {
115428
115257
  return (text || "").toLowerCase();
@@ -115475,9 +115304,6 @@ ${exampleLines}
115475
115304
  <wds_reference>
115476
115305
  <source>Wix Design System \u2014 filtered components</source>
115477
115306
  ${blocks}
115478
-
115479
- ${buttonAndModalExamples_1.buttonAndModalExamples}
115480
-
115481
115307
  </wds_reference>`;
115482
115308
  }
115483
115309
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wix/ditto-codegen-public",
3
- "version": "1.0.20",
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": "e7f707cde56bb07ac5cf65afd75b1734a16d629892b00bb81abbc1c2"
27
+ "falconPackageHash": "c768bb17a30be1152e5ce34e531e2808f5f77ede5af1fd56496ce1ac"
28
28
  }