2021-01-18 16:12:45 -05:00
|
|
|
{
|
|
|
|
"name": "discourse",
|
|
|
|
"version": "0.0.0",
|
|
|
|
"private": true,
|
2022-08-17 23:27:16 +01:00
|
|
|
"description": "A platform for community discussion. Free, open, simple.",
|
|
|
|
"license": "GPL-2.0-only",
|
|
|
|
"author": "Discourse",
|
2021-01-18 16:12:45 -05:00
|
|
|
"directories": {
|
|
|
|
"doc": "doc",
|
|
|
|
"test": "tests"
|
|
|
|
},
|
|
|
|
"scripts": {
|
|
|
|
"build": "ember build",
|
|
|
|
"start": "ember serve",
|
2024-09-03 10:51:07 +01:00
|
|
|
"test": "ember test"
|
2021-01-18 16:12:45 -05:00
|
|
|
},
|
2021-08-26 22:19:44 +01:00
|
|
|
"dependencies": {
|
2024-12-04 01:30:39 +01:00
|
|
|
"@faker-js/faker": "^9.3.0",
|
2024-12-02 12:19:33 +00:00
|
|
|
"@glimmer/syntax": "^0.93.1",
|
2025-01-02 13:37:16 +01:00
|
|
|
"@highlightjs/cdn-assets": "11.11.1",
|
2024-10-23 01:36:39 +02:00
|
|
|
"@json-editor/json-editor": "2.15.2",
|
2024-10-03 01:04:40 +02:00
|
|
|
"@messageformat/core": "^3.4.0",
|
2024-06-17 18:21:04 +02:00
|
|
|
"@messageformat/runtime": "^3.0.1",
|
2025-01-08 00:14:34 +01:00
|
|
|
"ace-builds": "^1.37.3",
|
2024-12-02 01:04:20 +01:00
|
|
|
"decorator-transforms": "^2.3.0",
|
2024-09-03 10:51:07 +01:00
|
|
|
"discourse-hbr": "workspace:1.0.0",
|
|
|
|
"discourse-widget-hbs": "workspace:1.0.0",
|
DEV: Introduce 'dev tools' toolbar and plugin-outlet debugger (#30624)
This commit introduces a new 'dev tools' feature for core, theme and plugin developers. This is enabled by default in development environments, and can be enabled in production by running `enableDevTools()` in the browser console.
When enabled, it will load a separate dev-tools JS/CSS bundle, and show a new toolbar on the left of the page. Dev Tools will remain enabled until the 'x' button is clicked, or `disableDevTools()` is run in the console.
The toolbar currently has three buttons:
- "Toggle safe mode" provides an easy way to toggle all themes/plugins on/off
- "Toggle verbose localization" is a toggle for our existing locale debugging feature
- "Debug plugin outlets" is inspired by the popular 'plugin outlet locations' theme component. It hooks into core's plugin outlet system, and renders a button into every single outlet. Those buttons have a tooltip which shows more information about the outlet, including all of the outletArg values. To inspect the value further, buttons allow the values to be saved to globals and logged to the console.
All of this is implemented under `/static`, and is only async-import()-d when the dev tools are enabled. Therefore, we can continue to add more tools, with zero performance cost to ordinary users of Discourse.
2025-01-08 15:26:18 +00:00
|
|
|
"ember-curry-component": "^0.1.0",
|
2023-11-14 13:06:53 +01:00
|
|
|
"ember-route-template": "^1.0.3",
|
2024-09-03 10:51:07 +01:00
|
|
|
"ember-tracked-storage-polyfill": "^1.0.0",
|
2023-08-02 01:07:36 +02:00
|
|
|
"handlebars": "^4.7.8",
|
2025-01-02 13:37:16 +01:00
|
|
|
"highlight.js": "11.11.1",
|
DEV: form-kit
This PR introduces FormKit, a component-based form library designed to simplify form creation and management. This library provides a single `Form` component, various field components, controls, validation mechanisms, and customization options. Additionally, it includes helpers to facilitate testing and writing specifications for forms.
1. **Form Component**:
- The main component that encapsulates form logic and structure.
- Yields various utilities like `Field`, `Submit`, `Alert`, etc.
**Example Usage**:
```gjs
import Form from "discourse/form";
<template>
<Form as |form|>
<form.Field
@name="username"
@title="Username"
@validation="required"
as |field|
>
<field.Input />
</form.Field>
<form.Field @name="age" @title="Age" as |field|>
<field.Input @type="number" />
</form.Field>
<form.Submit />
</Form>
</template>
```
2. **Validation**:
- Built-in validation rules such as `required`, `number`, `length`, and `url`.
- Custom validation callbacks for more complex validation logic.
**Example Usage**:
```javascript
validateUsername(name, value, data, { addError }) {
if (data.bar / 2 === value) {
addError(name, "That's not how maths work.");
}
}
```
```hbs
<form.Field @name="username" @validate={{this.validateUsername}} />
```
3. **Customization**:
- Plugin outlets for extending form functionality.
- Styling capabilities through propagated attributes.
- Custom controls with properties provided by `form` and `field`.
**Example Usage**:
```hbs
<Form class="my-form" as |form|>
<form.Field class="my-field" as |field|>
<MyCustomControl id={{field.id}} @onChange={{field.set}} />
</form.Field>
</Form>
```
4. **Helpers for Testing**:
- Test assertions for form and field validation.
**Example usage**:
```javascript
assert.form().hasErrors("the form shows errors");
assert.form().field("foo").hasValue("bar", "user has set the value");
```
- Helper for interacting with he form
**Example usage**:
```javascript
await formKit().field("foo").fillIn("bar");
```
5. **Page Object for System Specs**:
- Page objects for interacting with forms in system specs.
- Methods for submitting forms, checking alerts, and interacting with fields.
**Example Usage**:
```ruby
form = PageObjects::Components::FormKit.new(".my-form")
form.submit
expect(form).to have_an_alert("message")
```
**Field Interactions**:
```ruby
field = form.field("foo")
expect(field).to have_value("bar")
field.fill_in("bar")
```
6. **Collections handling**:
- A specific component to handle array of objects
**Example Usage**:
```gjs
<Form @data={{hash foo=(array (hash bar=1) (hash bar=2))}} as |form|>
<form.Collection @name="foo" as |collection|>
<collection.Field @name="bar" @title="Bar" as |field|>
<field.Input />
</collection.Field>
</form.Collection>
</Form>
```
2024-07-17 11:59:35 +02:00
|
|
|
"immer": "^10.1.1",
|
2024-10-31 22:51:49 +01:00
|
|
|
"jspreadsheet-ce": "^4.15.0",
|
2024-05-13 11:03:31 +08:00
|
|
|
"morphlex": "^0.0.16",
|
2024-09-03 10:51:07 +01:00
|
|
|
"pretty-text": "workspace:1.0.0"
|
2023-04-20 14:57:40 +02:00
|
|
|
},
|
|
|
|
"devDependencies": {
|
2024-10-27 23:06:49 +01:00
|
|
|
"@babel/core": "^7.26.0",
|
2024-12-05 23:14:58 +01:00
|
|
|
"@babel/standalone": "^7.26.4",
|
2023-08-25 13:44:26 +02:00
|
|
|
"@colors/colors": "^1.6.0",
|
2023-06-30 13:01:45 +02:00
|
|
|
"@discourse/backburner.js": "^2.7.1-0",
|
|
|
|
"@discourse/itsatrap": "^2.0.10",
|
|
|
|
"@ember-compat/tracked-built-ins": "^0.9.1",
|
2023-10-12 12:02:08 +02:00
|
|
|
"@ember/legacy-built-in-components": "^0.5.0",
|
2024-10-27 23:20:31 +01:00
|
|
|
"@ember/optional-features": "^2.2.0",
|
2023-06-30 13:01:45 +02:00
|
|
|
"@ember/render-modifiers": "^2.1.0",
|
2024-08-27 13:31:12 +01:00
|
|
|
"@ember/string": "^4.0.0",
|
2024-09-05 10:46:28 +02:00
|
|
|
"@ember/test-helpers": "^4.0.4",
|
2024-12-08 22:48:56 +01:00
|
|
|
"@ember/test-waiters": "^4.0.0",
|
2025-01-08 01:14:49 +01:00
|
|
|
"@embroider/compat": "^3.8.0",
|
|
|
|
"@embroider/core": "^3.5.0",
|
2024-12-16 23:11:37 +01:00
|
|
|
"@embroider/macros": "^1.16.10",
|
2024-05-30 14:11:57 +01:00
|
|
|
"@embroider/router": "^2.1.8",
|
2024-12-22 22:33:02 +01:00
|
|
|
"@embroider/webpack": "^4.0.9",
|
2025-01-08 00:13:28 +01:00
|
|
|
"@floating-ui/dom": "^1.6.13",
|
2023-06-30 13:01:45 +02:00
|
|
|
"@glimmer/component": "^1.1.2",
|
|
|
|
"@glimmer/tracking": "^1.1.2",
|
|
|
|
"@popperjs/core": "^2.11.8",
|
2025-01-08 00:13:52 +01:00
|
|
|
"@swc/core": "^1.10.6",
|
2024-10-23 23:29:32 +02:00
|
|
|
"@types/jquery": "^3.5.32",
|
2024-10-31 22:31:10 +01:00
|
|
|
"@types/qunit": "^2.19.12",
|
2024-01-16 23:43:19 +01:00
|
|
|
"@types/rsvp": "^4.0.9",
|
2024-10-28 14:01:44 +00:00
|
|
|
"@uppy/aws-s3": "^4.1.0",
|
|
|
|
"@uppy/core": "^4.2.2",
|
|
|
|
"@uppy/drop-target": "3.0.1",
|
|
|
|
"@uppy/utils": "^6.0.3",
|
|
|
|
"@uppy/xhr-upload": "^4.2.1",
|
2024-09-10 09:46:38 +02:00
|
|
|
"a11y-dialog": "8.1.1",
|
2024-09-03 10:51:07 +01:00
|
|
|
"admin": "workspace:1.0.0",
|
2024-03-01 17:20:15 +01:00
|
|
|
"autosize": "^6.0.1",
|
2024-04-29 00:45:54 +02:00
|
|
|
"babel-import-util": "^3.0.0",
|
2024-09-10 09:45:56 +02:00
|
|
|
"babel-plugin-ember-template-compilation": "^2.3.0",
|
2023-06-30 13:01:45 +02:00
|
|
|
"bootstrap": "3.4.1",
|
2023-05-03 04:25:13 -04:00
|
|
|
"broccoli-asset-rev": "^3.0.0",
|
2024-09-03 10:51:07 +01:00
|
|
|
"custom-proxy": "workspace:1.0.0",
|
2023-06-30 13:01:45 +02:00
|
|
|
"deepmerge": "^4.3.1",
|
2024-09-03 10:51:07 +01:00
|
|
|
"deprecation-silencer": "workspace:1.0.0",
|
|
|
|
"dialog-holder": "workspace:1.0.0",
|
|
|
|
"discourse-common": "workspace:1.0.0",
|
|
|
|
"discourse-i18n": "workspace:1.0.0",
|
|
|
|
"discourse-markdown-it": "workspace:1.0.0",
|
|
|
|
"discourse-plugins": "workspace:1.0.0",
|
2024-11-06 01:06:08 +01:00
|
|
|
"ember-auto-import": "^2.10.0",
|
2023-06-30 13:01:45 +02:00
|
|
|
"ember-buffered-proxy": "^2.1.1",
|
2023-07-27 10:56:03 +08:00
|
|
|
"ember-cached-decorator-polyfill": "^1.0.2",
|
2025-01-05 00:23:20 +01:00
|
|
|
"ember-cli": "~6.1.0",
|
2024-06-11 01:25:22 +02:00
|
|
|
"ember-cli-app-version": "^7.0.0",
|
2023-10-11 00:18:58 +02:00
|
|
|
"ember-cli-babel": "^8.2.0",
|
2025-01-02 13:18:48 +01:00
|
|
|
"ember-cli-deprecation-workflow": "^3.1.0",
|
2023-08-09 11:26:42 +02:00
|
|
|
"ember-cli-htmlbars": "^6.3.0",
|
2023-05-03 04:25:13 -04:00
|
|
|
"ember-cli-inject-live-reload": "^2.1.0",
|
2024-09-03 10:51:07 +01:00
|
|
|
"ember-cli-progress-ci": "workspace:1.0.0",
|
2023-05-03 04:25:13 -04:00
|
|
|
"ember-cli-sri": "^2.1.1",
|
|
|
|
"ember-cli-terser": "^4.0.2",
|
2023-06-30 13:01:45 +02:00
|
|
|
"ember-decorators": "^6.1.1",
|
2024-01-10 20:57:56 +01:00
|
|
|
"ember-exam": "^9.0.0",
|
2024-09-30 16:51:34 +02:00
|
|
|
"ember-load-initializers": "^3.0.1",
|
2024-07-05 15:25:46 +02:00
|
|
|
"ember-modifier": "^4.2.0",
|
2024-12-19 18:38:29 +01:00
|
|
|
"ember-qunit": "^9.0.1",
|
2024-12-11 11:09:25 -03:00
|
|
|
"ember-source": "~5.12.0",
|
2024-11-13 01:38:14 +01:00
|
|
|
"ember-template-imports": "^4.2.0",
|
2024-07-26 14:49:45 +02:00
|
|
|
"ember-test-selectors": "^7.0.0",
|
2024-09-03 10:51:07 +01:00
|
|
|
"float-kit": "workspace:1.0.0",
|
2024-03-05 22:56:43 +01:00
|
|
|
"html-entities": "^2.5.2",
|
2024-01-16 23:44:00 +01:00
|
|
|
"imports-loader": "^5.0.0",
|
2023-10-26 00:39:40 +02:00
|
|
|
"jquery": "^3.7.1",
|
2023-06-30 13:01:45 +02:00
|
|
|
"js-yaml": "^4.1.0",
|
2024-12-23 09:41:22 +01:00
|
|
|
"jsuites": "^5.8.3",
|
2023-05-03 04:25:13 -04:00
|
|
|
"loader.js": "^4.7.0",
|
2024-09-03 10:51:07 +01:00
|
|
|
"make-plural": "^7.4.0",
|
2023-08-15 10:20:55 +08:00
|
|
|
"message-bus-client": "^4.3.8",
|
2023-05-03 04:25:13 -04:00
|
|
|
"pretender": "^3.4.7",
|
2024-12-09 00:41:30 +01:00
|
|
|
"qunit": "^2.23.1",
|
2024-12-02 13:18:28 +01:00
|
|
|
"qunit-dom": "^3.4.0",
|
2024-07-12 12:07:13 +01:00
|
|
|
"sass": "^1.77.7",
|
2024-09-03 10:51:07 +01:00
|
|
|
"select-kit": "workspace:1.0.0",
|
2024-09-16 09:02:04 +10:00
|
|
|
"sinon": "^19.0.2",
|
2023-05-03 04:25:13 -04:00
|
|
|
"source-map": "^0.7.4",
|
2024-12-05 23:18:45 +01:00
|
|
|
"terser": "^5.37.0",
|
2024-09-11 12:54:01 +02:00
|
|
|
"testem": "^3.15.2",
|
2024-09-03 10:51:07 +01:00
|
|
|
"truth-helpers": "workspace:1.0.0",
|
2023-06-30 13:01:45 +02:00
|
|
|
"util": "^0.12.5",
|
|
|
|
"virtual-dom": "^2.1.1",
|
2024-12-05 23:52:02 +01:00
|
|
|
"webpack": "^5.97.1",
|
2024-09-18 15:50:24 +01:00
|
|
|
"webpack-retry-chunk-load-plugin": "^3.1.1",
|
2023-11-07 10:24:49 +00:00
|
|
|
"webpack-stats-plugin": "^1.1.3",
|
2024-03-04 09:04:07 +08:00
|
|
|
"xss": "^1.0.15"
|
2023-06-30 13:01:45 +02:00
|
|
|
},
|
|
|
|
"engines": {
|
2024-02-27 10:48:30 +01:00
|
|
|
"node": ">= 18",
|
2024-09-03 10:51:07 +01:00
|
|
|
"npm": "please-use-pnpm",
|
|
|
|
"yarn": "please-use-pnpm",
|
|
|
|
"pnpm": ">= 9"
|
2024-09-04 21:14:13 +02:00
|
|
|
},
|
2023-06-30 13:01:45 +02:00
|
|
|
"ember": {
|
2023-07-18 10:00:19 +01:00
|
|
|
"edition": "octane"
|
2021-01-18 16:12:45 -05:00
|
|
|
}
|
2024-06-17 18:21:04 +02:00
|
|
|
}
|