Spiegel von
https://github.com/paviliondev/discourse-custom-wizard.git
synchronisiert 2024-11-24 02:10:29 +01:00
Linting
Dieser Commit ist enthalten in:
Ursprung
c54602a9ce
Commit
ce55b4671e
105 geänderte Dateien mit 4275 neuen und 8679 gelöschten Zeilen
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "eslint-config-discourse"
|
|
||||||
}
|
|
|
@ -1 +0,0 @@
|
||||||
{}
|
|
1
.prettierrc.cjs
Normale Datei
1
.prettierrc.cjs
Normale Datei
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require("@discourse/lint-configs/prettier");
|
1
.template-lintrc.cjs
Normale Datei
1
.template-lintrc.cjs
Normale Datei
|
@ -0,0 +1 @@
|
||||||
|
module.exports = require("@discourse/lint-configs/template-lint");
|
|
@ -1,4 +0,0 @@
|
||||||
module.exports = {
|
|
||||||
plugins: ["ember-template-lint-plugin-discourse"],
|
|
||||||
extends: "discourse:recommended",
|
|
||||||
};
|
|
10
.travis.yml
10
.travis.yml
|
@ -1,10 +0,0 @@
|
||||||
services:
|
|
||||||
- docker
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- git clone --depth=1 https://github.com/discourse/discourse-plugin-ci
|
|
||||||
|
|
||||||
install: true
|
|
||||||
|
|
||||||
script:
|
|
||||||
- discourse-plugin-ci/script.sh
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
|
||||||
import { alias, equal, or } from "@ember/object/computed";
|
import { alias, equal, or } from "@ember/object/computed";
|
||||||
|
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
@ -17,6 +17,7 @@ export default Component.extend({
|
||||||
isExternal: equal("field.id", "external"),
|
isExternal: equal("field.id", "external"),
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
|
this._super(...arguments);
|
||||||
this.set("originalField", JSON.parse(JSON.stringify(this.field)));
|
this.set("originalField", JSON.parse(JSON.stringify(this.field)));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import CategorySelector from "select-kit/components/category-selector";
|
|
||||||
import { computed } from "@ember/object";
|
import { computed } from "@ember/object";
|
||||||
import { makeArray } from "discourse-common/lib/helpers";
|
import { makeArray } from "discourse-common/lib/helpers";
|
||||||
|
import CategorySelector from "select-kit/components/category-selector";
|
||||||
|
|
||||||
export default CategorySelector.extend({
|
export default CategorySelector.extend({
|
||||||
classNames: ["category-selector", "wizard-category-selector"],
|
classNames: ["category-selector", "wizard-category-selector"],
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import ComposerEditor from "discourse/components/composer-editor";
|
|
||||||
import discourseComputed, { bind } from "discourse-common/utils/decorators";
|
|
||||||
import { alias } from "@ember/object/computed";
|
|
||||||
import { uploadIcon } from "discourse/lib/uploads";
|
|
||||||
import { dasherize } from "@ember/string";
|
|
||||||
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
|
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
import { action } from "@ember/object";
|
import { action } from "@ember/object";
|
||||||
|
import { alias } from "@ember/object/computed";
|
||||||
|
import { service } from "@ember/service";
|
||||||
|
import { dasherize } from "@ember/string";
|
||||||
|
import ComposerEditor from "discourse/components/composer-editor";
|
||||||
|
import InsertHyperlink from "discourse/components/modal/insert-hyperlink";
|
||||||
|
import { uploadIcon } from "discourse/lib/uploads";
|
||||||
|
import discourseComputed, { bind } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export const wizardComposerEdtiorEventPrefix = "wizard-editor";
|
export const wizardComposerEdtiorEventPrefix = "wizard-editor";
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
options=(hash popupTitle=b.title icon=b.icon)
|
options=(hash popupTitle=b.title icon=b.icon)
|
||||||
}}
|
}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<div>{{d.icon}}</div>
|
<div>{{b.icon}}</div>
|
||||||
<button
|
<button
|
||||||
class="wizard-btn {{b.className}}"
|
class="wizard-btn {{b.className}}"
|
||||||
{{action b.action b}}
|
{{action b.action b}}
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
import { observes } from "discourse-common/utils/decorators";
|
|
||||||
import Category from "discourse/models/category";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import Category from "discourse/models/category";
|
||||||
|
import { observes } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
categories: [],
|
categories: [],
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
|
this._super(...arguments);
|
||||||
const property = this.field.property || "id";
|
const property = this.field.property || "id";
|
||||||
const value = this.field.value;
|
const value = this.field.value;
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { loadOneboxes } from "discourse/lib/load-oneboxes";
|
|
||||||
import { schedule } from "@ember/runloop";
|
import { schedule } from "@ember/runloop";
|
||||||
import discourseDebounce from "discourse-common/lib/debounce";
|
import $ from "jquery";
|
||||||
import { resolveAllShortUrls } from "pretty-text/upload-short-url";
|
import { resolveAllShortUrls } from "pretty-text/upload-short-url";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
|
import { loadOneboxes } from "discourse/lib/load-oneboxes";
|
||||||
|
import discourseDebounce from "discourse-common/lib/debounce";
|
||||||
import { on } from "discourse-common/utils/decorators";
|
import { on } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
import Component from "@ember/component";
|
||||||
|
import EmberObject, { action } from "@ember/object";
|
||||||
import {
|
import {
|
||||||
default as computed,
|
default as computed,
|
||||||
observes,
|
observes,
|
||||||
} from "discourse-common/utils/decorators";
|
} from "discourse-common/utils/decorators";
|
||||||
import Component from "@ember/component";
|
|
||||||
import EmberObject, { action } from "@ember/object";
|
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
showPreview: false,
|
showPreview: false,
|
||||||
|
|
|
@ -4,6 +4,7 @@ export default Component.extend({
|
||||||
topics: [],
|
topics: [],
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
|
this._super(...arguments);
|
||||||
const value = this.field.value;
|
const value = this.field.value;
|
||||||
|
|
||||||
if (value) {
|
if (value) {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import UppyUpload from "discourse/lib/uppy/uppy-upload";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import { action } from "@ember/object";
|
||||||
import { getOwner } from "@ember/owner";
|
import { getOwner } from "@ember/owner";
|
||||||
import { service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
|
import UppyUpload from "discourse/lib/uppy/uppy-upload";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import I18n from "discourse-i18n";
|
import I18n from "discourse-i18n";
|
||||||
import { action } from "@ember/object";
|
|
||||||
|
|
||||||
export default class CustomWizardFieldUpload extends Component {
|
export default class CustomWizardFieldUpload extends Component {
|
||||||
@service siteSettings;
|
@service siteSettings;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { dasherize } from "@ember/string";
|
import { dasherize } from "@ember/string";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
|
||||||
import { cook } from "discourse/lib/text";
|
import { cook } from "discourse/lib/text";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNameBindings: [
|
classNameBindings: [
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import ComboBox from "select-kit/components/combo-box";
|
|
||||||
import { computed } from "@ember/object";
|
import { computed } from "@ember/object";
|
||||||
import { makeArray } from "discourse-common/lib/helpers";
|
import { makeArray } from "discourse-common/lib/helpers";
|
||||||
|
import ComboBox from "select-kit/components/combo-box";
|
||||||
|
|
||||||
export default ComboBox.extend({
|
export default ComboBox.extend({
|
||||||
content: computed("groups.[]", "field.content.[]", function () {
|
content: computed("groups.[]", "field.content.[]", function () {
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import CustomWizard from "../models/custom-wizard";
|
import { getOwner } from "@ember/application";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { dasherize } from "@ember/string";
|
import { dasherize } from "@ember/string";
|
||||||
import getURL from "discourse-common/lib/get-url";
|
|
||||||
import cookie from "discourse/lib/cookie";
|
import cookie from "discourse/lib/cookie";
|
||||||
import { getOwner } from "@ember/application";
|
import getURL from "discourse-common/lib/get-url";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
import CustomWizard from "../models/custom-wizard";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNameBindings: [":wizard-no-access", "reasonClass"],
|
classNameBindings: [":wizard-no-access", "reasonClass"],
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { bind } from "@ember/runloop";
|
import { bind } from "@ember/runloop";
|
||||||
|
import $ from "jquery";
|
||||||
import { observes } from "discourse-common/utils/decorators";
|
import { observes } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
|
@ -7,10 +8,12 @@ export default Component.extend({
|
||||||
showTopics: true,
|
showTopics: true,
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
|
this._super(...arguments);
|
||||||
$(document).on("click", bind(this, this.documentClick));
|
$(document).on("click", bind(this, this.documentClick));
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
|
this._super(...arguments);
|
||||||
$(document).off("click", bind(this, this.documentClick));
|
$(document).off("click", bind(this, this.documentClick));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import getUrl from "discourse-common/lib/get-url";
|
import { alias, not, or } from "@ember/object/computed";
|
||||||
import { htmlSafe } from "@ember/template";
|
|
||||||
import { schedule } from "@ember/runloop";
|
import { schedule } from "@ember/runloop";
|
||||||
|
import { htmlSafe } from "@ember/template";
|
||||||
|
import $ from "jquery";
|
||||||
import { cook } from "discourse/lib/text";
|
import { cook } from "discourse/lib/text";
|
||||||
|
import getUrl from "discourse-common/lib/get-url";
|
||||||
|
import discourseLater from "discourse-common/lib/later";
|
||||||
|
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||||
import CustomWizard, {
|
import CustomWizard, {
|
||||||
updateCachedWizard,
|
updateCachedWizard,
|
||||||
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
|
} from "discourse/plugins/discourse-custom-wizard/discourse/models/custom-wizard";
|
||||||
import { alias, not, or } from "@ember/object/computed";
|
|
||||||
import discourseLater from "discourse-common/lib/later";
|
|
||||||
import { wizardComposerEdtiorEventPrefix } from "./custom-wizard-composer-editor";
|
import { wizardComposerEdtiorEventPrefix } from "./custom-wizard-composer-editor";
|
||||||
|
|
||||||
const uploadStartedEventKeys = ["upload-started"];
|
const uploadStartedEventKeys = ["upload-started"];
|
||||||
|
@ -181,7 +182,7 @@ export default Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
showMessage(message) {
|
showMessage(message) {
|
||||||
this.sendAction(message);
|
this.showMessage(message);
|
||||||
},
|
},
|
||||||
|
|
||||||
stylingDropdownChanged(id, value) {
|
stylingDropdownChanged(id, value) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import TagChooser from "select-kit/components/tag-chooser";
|
|
||||||
import { makeArray } from "discourse-common/lib/helpers";
|
import { makeArray } from "discourse-common/lib/helpers";
|
||||||
|
import TagChooser from "select-kit/components/tag-chooser";
|
||||||
|
|
||||||
export default TagChooser.extend({
|
export default TagChooser.extend({
|
||||||
_transformJson(context, json) {
|
_transformJson(context, json) {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import computed from "discourse-common/utils/decorators";
|
|
||||||
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
|
||||||
import I18n from "I18n";
|
|
||||||
import TextField from "discourse/components/text-field";
|
import TextField from "discourse/components/text-field";
|
||||||
|
import { isLTR, isRTL, siteDir } from "discourse/lib/text-direction";
|
||||||
|
import computed from "discourse-common/utils/decorators";
|
||||||
|
import I18n from "I18n";
|
||||||
|
|
||||||
export default TextField.extend({
|
export default TextField.extend({
|
||||||
attributeBindings: [
|
attributeBindings: [
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import MultiSelectComponent from "select-kit/components/multi-select";
|
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
import { searchForTerm } from "discourse/lib/search";
|
import { searchForTerm } from "discourse/lib/search";
|
||||||
import { makeArray } from "discourse-common/lib/helpers";
|
import { makeArray } from "discourse-common/lib/helpers";
|
||||||
|
import MultiSelectComponent from "select-kit/components/multi-select";
|
||||||
|
|
||||||
export default MultiSelectComponent.extend({
|
export default MultiSelectComponent.extend({
|
||||||
classNames: ["topic-selector", "wizard-topic-selector"],
|
classNames: ["topic-selector", "wizard-topic-selector"],
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
import WizardFieldValidator from "discourse/plugins/discourse-custom-wizard/discourse/components/validator";
|
|
||||||
import { deepMerge } from "discourse-common/lib/object";
|
|
||||||
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
|
||||||
import { cancel, later } from "@ember/runloop";
|
|
||||||
import { A } from "@ember/array";
|
import { A } from "@ember/array";
|
||||||
import EmberObject, { computed } from "@ember/object";
|
import EmberObject, { computed } from "@ember/object";
|
||||||
import { and, equal, notEmpty } from "@ember/object/computed";
|
import { and, equal, notEmpty } from "@ember/object/computed";
|
||||||
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
import { cancel, later } from "@ember/runloop";
|
||||||
import { dasherize } from "@ember/string";
|
import { dasherize } from "@ember/string";
|
||||||
|
import { categoryBadgeHTML } from "discourse/helpers/category-link";
|
||||||
|
import { deepMerge } from "discourse-common/lib/object";
|
||||||
|
import discourseComputed, { observes } from "discourse-common/utils/decorators";
|
||||||
|
import WizardFieldValidator from "discourse/plugins/discourse-custom-wizard/discourse/components/validator";
|
||||||
|
|
||||||
export default WizardFieldValidator.extend({
|
export default WizardFieldValidator.extend({
|
||||||
classNames: ["similar-topics-validator"],
|
classNames: ["similar-topics-validator"],
|
||||||
|
|
|
@ -28,10 +28,12 @@ export default Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
|
this._super(...arguments);
|
||||||
this.appEvents.on("custom-wizard:validate", this, this.checkIsValid);
|
this.appEvents.on("custom-wizard:validate", this, this.checkIsValid);
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
|
this._super(...arguments);
|
||||||
this.appEvents.off("custom-wizard:validate", this, this.checkIsValid);
|
this.appEvents.off("custom-wizard:validate", this, this.checkIsValid);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
|
||||||
import { empty, equal, or } from "@ember/object/computed";
|
|
||||||
import { notificationLevels, selectKitContent } from "../lib/wizard";
|
|
||||||
import { computed } from "@ember/object";
|
|
||||||
import UndoChanges from "../mixins/undo-changes";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import { computed } from "@ember/object";
|
||||||
|
import { empty, equal, or } from "@ember/object/computed";
|
||||||
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import { notificationLevels, selectKitContent } from "../lib/wizard";
|
||||||
|
import UndoChanges from "../mixins/undo-changes";
|
||||||
|
|
||||||
export default Component.extend(UndoChanges, {
|
export default Component.extend(UndoChanges, {
|
||||||
componentType: "action",
|
componentType: "action",
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
|
||||||
import { equal, or } from "@ember/object/computed";
|
|
||||||
import { computed } from "@ember/object";
|
|
||||||
import { selectKitContent } from "../lib/wizard";
|
|
||||||
import UndoChanges from "../mixins/undo-changes";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import { computed } from "@ember/object";
|
||||||
|
import { equal, or } from "@ember/object/computed";
|
||||||
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
|
import { selectKitContent } from "../lib/wizard";
|
||||||
import wizardSchema from "../lib/wizard-schema";
|
import wizardSchema from "../lib/wizard-schema";
|
||||||
|
import UndoChanges from "../mixins/undo-changes";
|
||||||
|
|
||||||
export default Component.extend(UndoChanges, {
|
export default Component.extend(UndoChanges, {
|
||||||
componentType: "field",
|
componentType: "field",
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
import { A } from "@ember/array";
|
||||||
|
import Component from "@ember/component";
|
||||||
|
import EmberObject from "@ember/object";
|
||||||
|
import { notEmpty } from "@ember/object/computed";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { generateName } from "../lib/wizard";
|
import { generateName } from "../lib/wizard";
|
||||||
import {
|
import {
|
||||||
setWizardDefaults,
|
|
||||||
default as wizardSchema,
|
default as wizardSchema,
|
||||||
|
setWizardDefaults,
|
||||||
} from "../lib/wizard-schema";
|
} from "../lib/wizard-schema";
|
||||||
import { notEmpty } from "@ember/object/computed";
|
|
||||||
import EmberObject from "@ember/object";
|
|
||||||
import Component from "@ember/component";
|
|
||||||
import { A } from "@ember/array";
|
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNameBindings: [":wizard-links", "itemType"],
|
classNameBindings: [":wizard-links", "itemType"],
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import { gt } from "@ember/object/computed";
|
|
||||||
import { computed } from "@ember/object";
|
import { computed } from "@ember/object";
|
||||||
import { defaultConnector } from "../lib/wizard-mapper";
|
import { gt } from "@ember/object/computed";
|
||||||
import { later } from "@ember/runloop";
|
import { later } from "@ember/runloop";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import { defaultConnector } from "../lib/wizard-mapper";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNameBindings: [
|
classNameBindings: [
|
||||||
|
@ -19,6 +19,7 @@ export default Component.extend({
|
||||||
}),
|
}),
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
|
this._super();
|
||||||
if (!this.connector) {
|
if (!this.connector) {
|
||||||
later(() => {
|
later(() => {
|
||||||
this.set(
|
this.set(
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
|
import { A } from "@ember/array";
|
||||||
|
import Component from "@ember/component";
|
||||||
import { computed, set } from "@ember/object";
|
import { computed, set } from "@ember/object";
|
||||||
import { alias, equal, not, or } from "@ember/object/computed";
|
import { alias, equal, not, or } from "@ember/object/computed";
|
||||||
|
import { observes } from "discourse-common/utils/decorators";
|
||||||
import {
|
import {
|
||||||
connectorContent,
|
connectorContent,
|
||||||
defaultConnector,
|
defaultConnector,
|
||||||
|
@ -7,9 +10,6 @@ import {
|
||||||
inputTypesContent,
|
inputTypesContent,
|
||||||
newPair,
|
newPair,
|
||||||
} from "../lib/wizard-mapper";
|
} from "../lib/wizard-mapper";
|
||||||
import Component from "@ember/component";
|
|
||||||
import { observes } from "discourse-common/utils/decorators";
|
|
||||||
import { A } from "@ember/array";
|
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNameBindings: [":mapper-input", "inputType"],
|
classNameBindings: [":mapper-input", "inputType"],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { connectorContent } from "../lib/wizard-mapper";
|
|
||||||
import { alias, gt } from "@ember/object/computed";
|
|
||||||
import { computed } from "@ember/object";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import { computed } from "@ember/object";
|
||||||
|
import { alias, gt } from "@ember/object/computed";
|
||||||
|
import { connectorContent } from "../lib/wizard-mapper";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNameBindings: [":mapper-pair", "hasConnector::no-connector"],
|
classNameBindings: [":mapper-pair", "hasConnector::no-connector"],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
tagName: "a",
|
tagName: "a",
|
||||||
|
|
|
@ -1,21 +1,22 @@
|
||||||
import { alias, gt, or } from "@ember/object/computed";
|
import { getOwner } from "@ember/application";
|
||||||
|
import Component from "@ember/component";
|
||||||
import { computed } from "@ember/object";
|
import { computed } from "@ember/object";
|
||||||
|
import { alias, gt, or } from "@ember/object/computed";
|
||||||
|
import { bind, later } from "@ember/runloop";
|
||||||
|
import { service } from "@ember/service";
|
||||||
|
import $ from "jquery";
|
||||||
import {
|
import {
|
||||||
default as discourseComputed,
|
default as discourseComputed,
|
||||||
observes,
|
observes,
|
||||||
} from "discourse-common/utils/decorators";
|
} from "discourse-common/utils/decorators";
|
||||||
import { getOwner } from "@ember/application";
|
import I18n from "I18n";
|
||||||
import { defaultSelectionType, selectionTypes } from "../lib/wizard-mapper";
|
|
||||||
import {
|
import {
|
||||||
generateName,
|
generateName,
|
||||||
sentenceCase,
|
sentenceCase,
|
||||||
snakeCase,
|
snakeCase,
|
||||||
userProperties,
|
userProperties,
|
||||||
} from "../lib/wizard";
|
} from "../lib/wizard";
|
||||||
import Component from "@ember/component";
|
import { defaultSelectionType, selectionTypes } from "../lib/wizard-mapper";
|
||||||
import { bind, later } from "@ember/runloop";
|
|
||||||
import I18n from "I18n";
|
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
|
|
||||||
const customFieldActionMap = {
|
const customFieldActionMap = {
|
||||||
topic: ["create_topic", "send_message"],
|
topic: ["create_topic", "send_message"],
|
||||||
|
@ -134,9 +135,7 @@ export default Component.extend({
|
||||||
listEnabled: computed("options.listSelection", "inputType", function () {
|
listEnabled: computed("options.listSelection", "inputType", function () {
|
||||||
return this.optionEnabled("listSelection");
|
return this.optionEnabled("listSelection");
|
||||||
}),
|
}),
|
||||||
valueEnabled: computed("connector", function () {
|
valueEnabled: computed.equal("connector", "is"),
|
||||||
return this.connector === "is";
|
|
||||||
}),
|
|
||||||
|
|
||||||
@discourseComputed(
|
@discourseComputed(
|
||||||
"site.groups",
|
"site.groups",
|
||||||
|
@ -179,6 +178,7 @@ export default Component.extend({
|
||||||
showTypes: false,
|
showTypes: false,
|
||||||
|
|
||||||
didInsertElement() {
|
didInsertElement() {
|
||||||
|
this._super(...arguments);
|
||||||
if (
|
if (
|
||||||
!this.activeType ||
|
!this.activeType ||
|
||||||
(this.activeType && !this[`${this.activeType}Enabled`])
|
(this.activeType && !this[`${this.activeType}Enabled`])
|
||||||
|
@ -190,6 +190,7 @@ export default Component.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
willDestroyElement() {
|
willDestroyElement() {
|
||||||
|
this._super(...arguments);
|
||||||
$(document).off("click", bind(this, this.documentClick));
|
$(document).off("click", bind(this, this.documentClick));
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
import { newInput, selectionTypes } from "../lib/wizard-mapper";
|
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
|
||||||
import { later } from "@ember/runloop";
|
|
||||||
import Component from "@ember/component";
|
|
||||||
import { A } from "@ember/array";
|
import { A } from "@ember/array";
|
||||||
|
import Component from "@ember/component";
|
||||||
|
import { later } from "@ember/runloop";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
import { newInput, selectionTypes } from "../lib/wizard-mapper";
|
||||||
|
|
||||||
export default Component.extend({
|
export default Component.extend({
|
||||||
classNames: "wizard-mapper",
|
classNames: "wizard-mapper",
|
||||||
|
|
||||||
didReceiveAttrs() {
|
didReceiveAttrs() {
|
||||||
|
this._super();
|
||||||
if (this.inputs && this.inputs.constructor !== Array) {
|
if (this.inputs && this.inputs.constructor !== Array) {
|
||||||
later(() => this.set("inputs", null));
|
later(() => this.set("inputs", null));
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
|
||||||
import { not, notEmpty } from "@ember/object/computed";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import { not, notEmpty } from "@ember/object/computed";
|
||||||
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
const icons = {
|
const icons = {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import { cloneJSON } from "discourse-common/lib/object";
|
|
||||||
import Category from "discourse/models/category";
|
import Category from "discourse/models/category";
|
||||||
|
import { cloneJSON } from "discourse-common/lib/object";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
import { action, computed } from "@ember/object";
|
|
||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
|
import { action, computed } from "@ember/object";
|
||||||
|
import { service } from "@ember/service";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
export default class WizardSubscriptionBadge extends Component {
|
export default class WizardSubscriptionBadge extends Component {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { computed } from "@ember/object";
|
import { computed } from "@ember/object";
|
||||||
import { inject as service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
|
|
||||||
export default class WizardSubscriptionContainer extends Component {
|
export default class WizardSubscriptionContainer extends Component {
|
||||||
@service subscription;
|
@service subscription;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import SingleSelectComponent from "select-kit/components/single-select";
|
import { service } from "@ember/service";
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import SingleSelectComponent from "select-kit/components/single-select";
|
||||||
|
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||||
|
|
||||||
const nameKey = function (feature, attribute, value) {
|
const nameKey = function (feature, attribute, value) {
|
||||||
if (feature === "action") {
|
if (feature === "action") {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
|
|
||||||
import { computed } from "@ember/object";
|
import { computed } from "@ember/object";
|
||||||
import { reads } from "@ember/object/computed";
|
import { reads } from "@ember/object/computed";
|
||||||
|
import SingleSelectHeaderComponent from "select-kit/components/select-kit/single-select-header";
|
||||||
|
|
||||||
export default SingleSelectHeaderComponent.extend({
|
export default SingleSelectHeaderComponent.extend({
|
||||||
classNames: ["combo-box-header", "wizard-subscription-selector-header"],
|
classNames: ["combo-box-header", "wizard-subscription-selector-header"],
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
|
import SelectKitRowComponent from "select-kit/components/select-kit/select-kit-row";
|
||||||
|
|
||||||
export default SelectKitRowComponent.extend({
|
export default SelectKitRowComponent.extend({
|
||||||
classNameBindings: ["isDisabled:disabled"],
|
classNameBindings: ["isDisabled:disabled"],
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { action } from "@ember/object";
|
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
import Component from "@glimmer/component";
|
import Component from "@glimmer/component";
|
||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
|
import { action } from "@ember/object";
|
||||||
|
import { service } from "@ember/service";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
|
||||||
import { notEmpty } from "@ember/object/computed";
|
|
||||||
import { userProperties } from "../lib/wizard";
|
|
||||||
import { scheduleOnce } from "@ember/runloop";
|
|
||||||
import Component from "@ember/component";
|
import Component from "@ember/component";
|
||||||
|
import { notEmpty } from "@ember/object/computed";
|
||||||
|
import { scheduleOnce } from "@ember/runloop";
|
||||||
|
import $ from "jquery";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import { userProperties } from "../lib/wizard";
|
||||||
|
|
||||||
const excludedUserProperties = ["profile_background", "card_background"];
|
const excludedUserProperties = ["profile_background", "card_background"];
|
||||||
|
|
||||||
|
@ -19,12 +20,14 @@ export default Component.extend({
|
||||||
this._super(...arguments);
|
this._super(...arguments);
|
||||||
|
|
||||||
if (!this.barEnabled) {
|
if (!this.barEnabled) {
|
||||||
scheduleOnce("afterRender", () => {
|
scheduleOnce("afterRender", this, this._hideButtonBar);
|
||||||
$(this.element).find(".d-editor-button-bar").addClass("hidden");
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
_hideButtonBar() {
|
||||||
|
$(this.element).find(".d-editor-button-bar").addClass("hidden");
|
||||||
|
},
|
||||||
|
|
||||||
@discourseComputed("forcePreview")
|
@discourseComputed("forcePreview")
|
||||||
previewLabel(forcePreview) {
|
previewLabel(forcePreview) {
|
||||||
return I18n.t("admin.wizard.editor.preview", {
|
return I18n.t("admin.wizard.editor.preview", {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import UserChooserComponent from "select-kit/components/user-chooser";
|
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import UserChooserComponent from "select-kit/components/user-chooser";
|
||||||
|
|
||||||
export const WIZARD_USER = "wizard-user";
|
export const WIZARD_USER = "wizard-user";
|
||||||
|
|
||||||
|
|
|
@ -4,21 +4,21 @@
|
||||||
<div class="display-row">
|
<div class="display-row">
|
||||||
<div class="field">{{i18n "admin.wizard.user.redirect.label"}}</div>
|
<div class="field">{{i18n "admin.wizard.user.redirect.label"}}</div>
|
||||||
<div class="value">
|
<div class="value">
|
||||||
{{#if model.redirect_to_wizard}}
|
{{#if @model.redirect_to_wizard}}
|
||||||
<LinkTo
|
<LinkTo
|
||||||
@route="adminWizardsWizardShow"
|
@route="adminWizardsWizardShow"
|
||||||
@model={{dasherize model.redirect_to_wizard}}
|
@model={{dasherize @model.redirect_to_wizard}}
|
||||||
>
|
>
|
||||||
{{model.redirect_to_wizard}}
|
{{@model.redirect_to_wizard}}
|
||||||
</LinkTo>
|
</LinkTo>
|
||||||
{{else}}
|
{{else}}
|
||||||
—
|
—
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{#if model.redirect_to_wizard}}
|
{{#if @model.redirect_to_wizard}}
|
||||||
<DButton
|
<DButton
|
||||||
@action={{fn model.clearWizardRedirect model}}
|
@action={{fn @model.clearWizardRedirect @model}}
|
||||||
@label="admin.wizard.user.redirect.remove_label"
|
@label="admin.wizard.user.redirect.remove_label"
|
||||||
@title="admin.wizard.user.redirect.remove_title"
|
@title="admin.wizard.user.redirect.remove_title"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
</label>
|
</label>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
{{combo-box
|
{{combo-box
|
||||||
value=wizardListVal
|
value=this.wizardListVal
|
||||||
content=wizardList
|
content=this.wizardList
|
||||||
onChange=(action "changeWizard")
|
onChange=(action "changeWizard")
|
||||||
options=(hash none="admin.wizard.select")
|
options=(hash none="admin.wizard.select")
|
||||||
}}
|
}}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import CustomWizardAdmin from "../../models/custom-wizard-admin";
|
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
import CustomWizardAdmin from "../../models/custom-wizard-admin";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
setupComponent(attrs, component) {
|
setupComponent(attrs, component) {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{{#each site.complete_custom_wizard as |wizard|}}
|
{{#each @site.complete_custom_wizard as |wizard|}}
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="alert alert-info alert-wizard">
|
<div class="alert alert-info alert-wizard">
|
||||||
<a href={{wizard.url}}>{{i18n
|
<a href={{wizard.url}}>{{i18n
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
|
import Controller from "@ember/controller";
|
||||||
|
import { and, equal, not } from "@ember/object/computed";
|
||||||
|
import { service } from "@ember/service";
|
||||||
|
import { underscore } from "@ember/string";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import CustomWizardApi from "../models/custom-wizard-api";
|
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
import { and, equal, not } from "@ember/object/computed";
|
|
||||||
import { selectKitContent } from "../lib/wizard";
|
|
||||||
import { underscore } from "@ember/string";
|
|
||||||
import Controller from "@ember/controller";
|
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { inject as service } from "@ember/service";
|
import { selectKitContent } from "../lib/wizard";
|
||||||
|
import CustomWizardApi from "../models/custom-wizard-api";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
|
||||||
import { notEmpty } from "@ember/object/computed";
|
|
||||||
import CustomWizardLogs from "../models/custom-wizard-logs";
|
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
|
import { notEmpty } from "@ember/object/computed";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
import CustomWizardLogs from "../models/custom-wizard-logs";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
refreshing: false,
|
refreshing: false,
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
import Controller from "@ember/controller";
|
|
||||||
import { observes } from "discourse-common/utils/decorators";
|
|
||||||
import { empty } from "@ember/object/computed";
|
|
||||||
import CustomWizardManager from "../models/custom-wizard-manager";
|
|
||||||
import { A } from "@ember/array";
|
import { A } from "@ember/array";
|
||||||
import I18n from "I18n";
|
import Controller from "@ember/controller";
|
||||||
|
import { empty } from "@ember/object/computed";
|
||||||
import { underscore } from "@ember/string";
|
import { underscore } from "@ember/string";
|
||||||
|
import $ from "jquery";
|
||||||
|
import { observes } from "discourse-common/utils/decorators";
|
||||||
|
import I18n from "I18n";
|
||||||
|
import CustomWizardManager from "../models/custom-wizard-manager";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
messageUrl:
|
messageUrl:
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
import { empty } from "@ember/object/computed";
|
import { empty } from "@ember/object/computed";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import { service } from "@ember/service";
|
||||||
import { fmt } from "discourse/lib/computed";
|
import { fmt } from "discourse/lib/computed";
|
||||||
import { inject as service } from "@ember/service";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import AdminWizardsColumnsModal from "../components/modal/admin-wizards-columns";
|
import AdminWizardsColumnsModal from "../components/modal/admin-wizards-columns";
|
||||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
|
||||||
import { formatModel } from "../lib/wizard-submission";
|
import { formatModel } from "../lib/wizard-submission";
|
||||||
|
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
modal: service(),
|
modal: service(),
|
||||||
|
|
|
@ -1,18 +1,19 @@
|
||||||
|
import Controller from "@ember/controller";
|
||||||
|
import { action } from "@ember/object";
|
||||||
|
import { notEmpty } from "@ember/object/computed";
|
||||||
|
import { later, scheduleOnce } from "@ember/runloop";
|
||||||
|
import { service } from "@ember/service";
|
||||||
|
import { dasherize } from "@ember/string";
|
||||||
|
import $ from "jquery";
|
||||||
|
import copyText from "discourse/lib/copy-text";
|
||||||
import {
|
import {
|
||||||
default as discourseComputed,
|
default as discourseComputed,
|
||||||
observes,
|
observes,
|
||||||
} from "discourse-common/utils/decorators";
|
} from "discourse-common/utils/decorators";
|
||||||
import { notEmpty } from "@ember/object/computed";
|
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
import NextSessionScheduledModal from "../components/modal/next-session-scheduled";
|
|
||||||
import { generateId, wizardFieldList } from "../lib/wizard";
|
|
||||||
import { dasherize } from "@ember/string";
|
|
||||||
import { later, scheduleOnce } from "@ember/runloop";
|
|
||||||
import Controller from "@ember/controller";
|
|
||||||
import copyText from "discourse/lib/copy-text";
|
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
import { filterValues } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard-schema";
|
||||||
import { action } from "@ember/object";
|
import NextSessionScheduledModal from "../components/modal/next-session-scheduled";
|
||||||
|
import { generateId, wizardFieldList } from "../lib/wizard";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
modal: service(),
|
modal: service(),
|
||||||
|
@ -28,7 +29,11 @@ export default Controller.extend({
|
||||||
this.set("currentField", fields && fields.length ? fields[0] : null);
|
this.set("currentField", fields && fields.length ? fields[0] : null);
|
||||||
}
|
}
|
||||||
|
|
||||||
scheduleOnce("afterRender", () => $("body").addClass("admin-wizard"));
|
scheduleOnce("afterRender", this, this._addBodyClass);
|
||||||
|
},
|
||||||
|
|
||||||
|
_addBodyClass() {
|
||||||
|
$("body").addClass("admin-wizard");
|
||||||
},
|
},
|
||||||
|
|
||||||
@observes("wizard.name")
|
@observes("wizard.name")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
|
||||||
import { equal } from "@ember/object/computed";
|
import { equal } from "@ember/object/computed";
|
||||||
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
creating: equal("wizardId", "create"),
|
creating: equal("wizardId", "create"),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
import { or } from "@ember/object/computed";
|
import { or } from "@ember/object/computed";
|
||||||
import { inject as service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
subscription: service(),
|
subscription: service(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Controller from "@ember/controller";
|
import Controller from "@ember/controller";
|
||||||
|
import { service } from "@ember/service";
|
||||||
import getUrl from "discourse-common/lib/get-url";
|
import getUrl from "discourse-common/lib/get-url";
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
|
|
||||||
export default Controller.extend({
|
export default Controller.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import I18n from "I18n";
|
|
||||||
import Handlebars from "handlebars";
|
import Handlebars from "handlebars";
|
||||||
|
import I18n from "I18n";
|
||||||
|
|
||||||
export default function wizardCharCounter(body, maxLength) {
|
export default function wizardCharCounter(body, maxLength) {
|
||||||
let bodyLength = body ? body.length : 0;
|
let bodyLength = body ? body.length : 0;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import DiscourseURL from "discourse/lib/url";
|
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
|
||||||
import getUrl from "discourse-common/lib/get-url";
|
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
|
import DiscourseURL from "discourse/lib/url";
|
||||||
|
import getUrl from "discourse-common/lib/get-url";
|
||||||
import CustomWizardTextareaEditor from "../components/custom-wizard-textarea-editor";
|
import CustomWizardTextareaEditor from "../components/custom-wizard-textarea-editor";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import DiscourseURL from "discourse/lib/url";
|
|
||||||
import { withPluginApi } from "discourse/lib/plugin-api";
|
|
||||||
import { dasherize } from "@ember/string";
|
import { dasherize } from "@ember/string";
|
||||||
|
import { withPluginApi } from "discourse/lib/plugin-api";
|
||||||
|
import DiscourseURL from "discourse/lib/url";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "custom-wizard-redirect",
|
name: "custom-wizard-redirect",
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
import { A } from "@ember/array";
|
||||||
|
import EmberObject from "@ember/object";
|
||||||
import { camelCase, listProperties } from "../lib/wizard";
|
import { camelCase, listProperties } from "../lib/wizard";
|
||||||
import wizardSchema from "../lib/wizard-schema";
|
import wizardSchema from "../lib/wizard-schema";
|
||||||
import EmberObject from "@ember/object";
|
|
||||||
import { A } from "@ember/array";
|
|
||||||
|
|
||||||
function present(val) {
|
function present(val) {
|
||||||
if (val === null || val === undefined) {
|
if (val === null || val === undefined) {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import EmberObject from "@ember/object";
|
|
||||||
import { A } from "@ember/array";
|
import { A } from "@ember/array";
|
||||||
|
import EmberObject from "@ember/object";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
|
||||||
// Inputs
|
// Inputs
|
||||||
|
|
|
@ -23,7 +23,6 @@ const wizard = {
|
||||||
required: ["id"],
|
required: ["id"],
|
||||||
dependent: {
|
dependent: {
|
||||||
after_time: "after_time_scheduled",
|
after_time: "after_time_scheduled",
|
||||||
after_time: "after_time_groups",
|
|
||||||
},
|
},
|
||||||
objectArrays: {
|
objectArrays: {
|
||||||
step: {
|
step: {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import wizardSchema from "./wizard-schema";
|
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
|
import wizardSchema from "./wizard-schema";
|
||||||
|
|
||||||
function selectKitContent(content) {
|
function selectKitContent(content) {
|
||||||
return content.map((i) => ({ id: i, name: i }));
|
return content.map((i) => ({ id: i, name: i }));
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import Mixin from "@ember/object/mixin";
|
|
||||||
import { getOwner } from "@ember/application";
|
import { getOwner } from "@ember/application";
|
||||||
import { readOnly } from "@ember/object/computed";
|
import { readOnly } from "@ember/object/computed";
|
||||||
|
import Mixin from "@ember/object/mixin";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
|
||||||
const PRODUCT_PAGE = "https://custom-wizard.pavilion.tech/pricing";
|
const PRODUCT_PAGE = "https://custom-wizard.pavilion.tech/pricing";
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { listProperties } from "../lib/wizard";
|
|
||||||
import { default as wizardSchema } from "../lib/wizard-schema";
|
|
||||||
import { get, set } from "@ember/object";
|
import { get, set } from "@ember/object";
|
||||||
import Mixin from "@ember/object/mixin";
|
import Mixin from "@ember/object/mixin";
|
||||||
import { deepEqual } from "discourse-common/lib/object";
|
import { deepEqual } from "discourse-common/lib/object";
|
||||||
|
import { listProperties } from "../lib/wizard";
|
||||||
|
import { default as wizardSchema } from "../lib/wizard-schema";
|
||||||
|
|
||||||
const observedCache = [];
|
const observedCache = [];
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import { buildProperties, mapped, present } from "../lib/wizard-json";
|
|
||||||
import { listProperties, snakeCase } from "../lib/wizard";
|
|
||||||
import wizardSchema from "../lib/wizard-schema";
|
|
||||||
import { Promise } from "rsvp";
|
import { Promise } from "rsvp";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
|
import { listProperties, snakeCase } from "../lib/wizard";
|
||||||
|
import { buildProperties, mapped, present } from "../lib/wizard-json";
|
||||||
|
import wizardSchema from "../lib/wizard-schema";
|
||||||
|
|
||||||
const GUEST_GROUP_ID = -1;
|
const GUEST_GROUP_ID = -1;
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ const CustomWizardAdmin = EmberObject.extend({
|
||||||
if (property === "api_body") {
|
if (property === "api_body") {
|
||||||
try {
|
try {
|
||||||
value = JSON.parse(value);
|
value = JSON.parse(value);
|
||||||
} catch (e) {
|
} catch {
|
||||||
result.error = {
|
result.error = {
|
||||||
type: "invalid",
|
type: "invalid",
|
||||||
params: { type, property },
|
params: { type, property },
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
|
import { A } from "@ember/array";
|
||||||
|
import EmberObject from "@ember/object";
|
||||||
|
import { dasherize } from "@ember/string";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
import { default as discourseComputed } from "discourse-common/utils/decorators";
|
||||||
import EmberObject from "@ember/object";
|
|
||||||
import { A } from "@ember/array";
|
|
||||||
|
|
||||||
const CustomWizardApi = EmberObject.extend({
|
const CustomWizardApi = EmberObject.extend({
|
||||||
@discourseComputed("name")
|
@discourseComputed("name")
|
||||||
redirectUri(name) {
|
redirectUri(name) {
|
||||||
let nameParam = name.toString().dasherize();
|
let nameParam = dasherize(name);
|
||||||
const baseUrl =
|
const baseUrl =
|
||||||
location.protocol +
|
location.protocol +
|
||||||
"//" +
|
"//" +
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { ajax } from "discourse/lib/ajax";
|
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import { isEmpty } from "@ember/utils";
|
import { isEmpty } from "@ember/utils";
|
||||||
|
import { ajax } from "discourse/lib/ajax";
|
||||||
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
|
||||||
const CustomWizardCustomField = EmberObject.extend({
|
const CustomWizardCustomField = EmberObject.extend({
|
||||||
isNew: isEmpty("id"),
|
isNew: isEmpty("id"),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { translationOrText } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard";
|
import { translationOrText } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard";
|
||||||
|
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
||||||
|
|
||||||
const StandardFieldValidation = [
|
const StandardFieldValidation = [
|
||||||
"text",
|
"text",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import EmberObject from "@ember/object";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import EmberObject from "@ember/object";
|
|
||||||
|
|
||||||
const CustomWizardLogs = EmberObject.extend();
|
const CustomWizardLogs = EmberObject.extend();
|
||||||
const logItemTypes = {
|
const logItemTypes = {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import EmberObject from "@ember/object";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import EmberObject from "@ember/object";
|
|
||||||
import getURL from "discourse-common/lib/get-url";
|
import getURL from "discourse-common/lib/get-url";
|
||||||
|
|
||||||
const CustomWizardManager = EmberObject.extend();
|
const CustomWizardManager = EmberObject.extend();
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
import { later } from "@ember/runloop";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import { later } from "@ember/runloop";
|
|
||||||
import { translationOrText } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard";
|
import { translationOrText } from "discourse/plugins/discourse-custom-wizard/discourse/lib/wizard";
|
||||||
|
import ValidState from "discourse/plugins/discourse-custom-wizard/discourse/mixins/valid-state";
|
||||||
|
|
||||||
export default EmberObject.extend(ValidState, {
|
export default EmberObject.extend(ValidState, {
|
||||||
id: null,
|
id: null,
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
import EmberObject from "@ember/object";
|
import EmberObject from "@ember/object";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
import discourseComputed from "discourse-common/utils/decorators";
|
import DiscourseURL from "discourse/lib/url";
|
||||||
import getUrl from "discourse-common/lib/get-url";
|
import getUrl from "discourse-common/lib/get-url";
|
||||||
|
import discourseComputed from "discourse-common/utils/decorators";
|
||||||
import CustomWizardField from "./custom-wizard-field";
|
import CustomWizardField from "./custom-wizard-field";
|
||||||
import CustomWizardStep from "./custom-wizard-step";
|
import CustomWizardStep from "./custom-wizard-step";
|
||||||
import DiscourseURL from "discourse/lib/url";
|
|
||||||
|
|
||||||
const CustomWizard = EmberObject.extend({
|
const CustomWizard = EmberObject.extend({
|
||||||
@discourseComputed("steps.length")
|
@discourseComputed("steps.length")
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import CustomWizardApi from "../models/custom-wizard-api";
|
import { service } from "@ember/service";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import { inject as service } from "@ember/service";
|
import CustomWizardApi from "../models/custom-wizard-api";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { service } from "@ember/service";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import CustomWizardApi from "../models/custom-wizard-api";
|
import CustomWizardApi from "../models/custom-wizard-api";
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
|
import { A } from "@ember/array";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import CustomWizardCustomField from "../models/custom-wizard-custom-field";
|
import CustomWizardCustomField from "../models/custom-wizard-custom-field";
|
||||||
import { A } from "@ember/array";
|
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
model() {
|
model() {
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import CustomWizardLogs from "../models/custom-wizard-logs";
|
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
|
||||||
import { A } from "@ember/array";
|
import { A } from "@ember/array";
|
||||||
import { inject as service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import CustomWizardLogs from "../models/custom-wizard-logs";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import { service } from "@ember/service";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { inject as service } from "@ember/service";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
model() {
|
model() {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import { A } from "@ember/array";
|
import { A } from "@ember/array";
|
||||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
import { service } from "@ember/service";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import { formatModel } from "../lib/wizard-submission";
|
import { formatModel } from "../lib/wizard-submission";
|
||||||
import { inject as service } from "@ember/service";
|
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import { service } from "@ember/service";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { inject as service } from "@ember/service";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
import { service } from "@ember/service";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { inject as service } from "@ember/service";
|
import CustomWizardAdmin from "../models/custom-wizard-admin";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
|
||||||
import { buildFieldTypes, buildFieldValidations } from "../lib/wizard-schema";
|
|
||||||
import EmberObject, { set } from "@ember/object";
|
|
||||||
import { A } from "@ember/array";
|
import { A } from "@ember/array";
|
||||||
|
import EmberObject, { set } from "@ember/object";
|
||||||
|
import { service } from "@ember/service";
|
||||||
import { all } from "rsvp";
|
import { all } from "rsvp";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { inject as service } from "@ember/service";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
|
import { buildFieldTypes, buildFieldValidations } from "../lib/wizard-schema";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
import { service } from "@ember/service";
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { getCachedWizard } from "../models/custom-wizard";
|
|
||||||
import Route from "@ember/routing/route";
|
import Route from "@ember/routing/route";
|
||||||
import { inject as service } from "@ember/service";
|
import { service } from "@ember/service";
|
||||||
|
import { getCachedWizard } from "../models/custom-wizard";
|
||||||
|
|
||||||
export default Route.extend({
|
export default Route.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
|
import { action } from "@ember/object";
|
||||||
|
import Route from "@ember/routing/route";
|
||||||
|
import { service } from "@ember/service";
|
||||||
|
import { scrollTop } from "discourse/mixins/scroll-top";
|
||||||
import I18n from "I18n";
|
import I18n from "I18n";
|
||||||
import { getCachedWizard } from "../models/custom-wizard";
|
import { getCachedWizard } from "../models/custom-wizard";
|
||||||
import Route from "@ember/routing/route";
|
|
||||||
import { scrollTop } from "discourse/mixins/scroll-top";
|
|
||||||
import { action } from "@ember/object";
|
|
||||||
import { inject as service } from "@ember/service";
|
|
||||||
|
|
||||||
export default Route.extend({
|
export default Route.extend({
|
||||||
router: service(),
|
router: service(),
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
|
import { service } from "@ember/service";
|
||||||
import I18n from "I18n";
|
|
||||||
import DiscourseRoute from "discourse/routes/discourse";
|
import DiscourseRoute from "discourse/routes/discourse";
|
||||||
import { inject as service } from "@ember/service";
|
import I18n from "I18n";
|
||||||
|
import { findCustomWizard, updateCachedWizard } from "../models/custom-wizard";
|
||||||
|
|
||||||
export default DiscourseRoute.extend({
|
export default DiscourseRoute.extend({
|
||||||
dialog: service(),
|
dialog: service(),
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import Service from "@ember/service";
|
|
||||||
import { tracked } from "@glimmer/tracking";
|
import { tracked } from "@glimmer/tracking";
|
||||||
|
import Service from "@ember/service";
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
|
||||||
|
|
3
eslint.config.mjs
Normale Datei
3
eslint.config.mjs
Normale Datei
|
@ -0,0 +1,3 @@
|
||||||
|
import DiscourseRecommended from "@discourse/lint-configs/eslint";
|
||||||
|
|
||||||
|
export default [...DiscourseRecommended];
|
5363
package-lock.json
generiert
5363
package-lock.json
generiert
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
18
package.json
18
package.json
|
@ -1,11 +1,15 @@
|
||||||
{
|
{
|
||||||
"name": "discourse-custom-wizard",
|
"private": true,
|
||||||
"version": "1.0.0",
|
|
||||||
"repository": "git@github.com:paviliondev/discourse-custom-wizard.git",
|
|
||||||
"author": "Pavilion",
|
|
||||||
"license": "GPL V2",
|
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eslint-config-discourse": "^3.4.0",
|
"@discourse/lint-configs": "2.2.1",
|
||||||
"semver": "^7.3.5"
|
"ember-template-lint": "6.0.0",
|
||||||
|
"eslint": "9.14.0",
|
||||||
|
"prettier": "2.8.8"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18",
|
||||||
|
"npm": "please-use-pnpm",
|
||||||
|
"yarn": "please-use-pnpm",
|
||||||
|
"pnpm": ">= 9"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
4007
pnpm-lock.yaml
Normale Datei
4007
pnpm-lock.yaml
Normale Datei
Datei-Diff unterdrückt, da er zu groß ist
Diff laden
|
@ -1,11 +1,11 @@
|
||||||
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
query,
|
query,
|
||||||
queryAll,
|
queryAll,
|
||||||
visible,
|
visible,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
getCustomFields,
|
getCustomFields,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import { click, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
query,
|
query,
|
||||||
queryAll,
|
queryAll,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, visit } from "@ember/test-helpers";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
getSuppliers,
|
getSuppliers,
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, find, findAll, visit } from "@ember/test-helpers";
|
import { click, find, findAll, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
|
import { acceptance, query } from "discourse/tests/helpers/qunit-helpers";
|
||||||
import {
|
import {
|
||||||
getSuppliers,
|
getSuppliers,
|
||||||
getUnsubscribedAdminWizards,
|
getUnsubscribedAdminWizards,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import { click, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
query,
|
query,
|
||||||
queryAll,
|
queryAll,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, visit } from "@ember/test-helpers";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
getAnotherWizardSubmission,
|
getAnotherWizardSubmission,
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
|
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
query,
|
query,
|
||||||
queryAll,
|
queryAll,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
getBusinessAdminWizard,
|
getBusinessAdminWizard,
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
import { click, currentURL, fillIn, findAll, visit } from "@ember/test-helpers";
|
||||||
|
import $ from "jquery";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
exists,
|
exists,
|
||||||
|
@ -5,8 +8,6 @@ import {
|
||||||
queryAll,
|
queryAll,
|
||||||
visible,
|
visible,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, currentURL, fillIn, findAll, visit } from "@ember/test-helpers";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
getAdminTestingWizard,
|
getAdminTestingWizard,
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||||
|
import $ from "jquery";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
exists,
|
exists,
|
||||||
|
@ -5,8 +8,6 @@ import {
|
||||||
queryAll,
|
queryAll,
|
||||||
visible,
|
visible,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
getAdminTestingWizard,
|
getAdminTestingWizard,
|
||||||
|
|
|
@ -1,3 +1,6 @@
|
||||||
|
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
||||||
|
import $ from "jquery";
|
||||||
|
import { test } from "qunit";
|
||||||
import {
|
import {
|
||||||
acceptance,
|
acceptance,
|
||||||
exists,
|
exists,
|
||||||
|
@ -5,8 +8,6 @@ import {
|
||||||
queryAll,
|
queryAll,
|
||||||
visible,
|
visible,
|
||||||
} from "discourse/tests/helpers/qunit-helpers";
|
} from "discourse/tests/helpers/qunit-helpers";
|
||||||
import { test } from "qunit";
|
|
||||||
import { click, currentURL, fillIn, visit } from "@ember/test-helpers";
|
|
||||||
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
import selectKit from "discourse/tests/helpers/select-kit-helper";
|
||||||
import {
|
import {
|
||||||
getAdminTestingWizard,
|
getAdminTestingWizard,
|
||||||
|
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
Laden …
In neuem Issue referenzieren