super 0.0.7 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.yardopts +0 -6
- data/CONTRIBUTING.md +56 -0
- data/README.md +49 -61
- data/Rakefile +16 -14
- data/app/assets/javascripts/super/application.js +297 -97
- data/app/assets/stylesheets/super/application.css +5600 -0
- data/app/controllers/super/application_controller.rb +20 -14
- data/app/helpers/super/form_builder_helper.rb +25 -0
- data/app/views/layouts/super/application.html.erb +23 -9
- data/app/views/super/application/{_super_schema_display_actions.html.erb → _display_actions.html.erb} +0 -0
- data/app/views/super/application/{_super_schema_display_index.html.erb → _display_index.html.erb} +6 -6
- data/app/views/super/application/_display_rich_text.html.erb +1 -0
- data/app/views/super/application/_display_show.html.erb +8 -0
- data/app/views/super/application/_filter.html.erb +5 -13
- data/app/views/super/application/_filter_type_select.html.erb +9 -19
- data/app/views/super/application/_filter_type_text.html.erb +7 -11
- data/app/views/super/application/_filter_type_timestamp.html.erb +6 -17
- data/app/views/super/application/_form.html.erb +15 -0
- data/app/views/super/application/_form_field__destroy.html.erb +1 -9
- data/app/views/super/application/_form_field_checkbox.html.erb +1 -0
- data/app/views/super/application/_form_field_rich_text_area.html.erb +1 -0
- data/app/views/super/application/_form_field_select.html.erb +1 -23
- data/app/views/super/application/_form_field_text.html.erb +1 -13
- data/app/views/super/application/{_super_layout.html.erb → _layout.html.erb} +7 -7
- data/app/views/super/application/{_super_pagination.html.erb → _pagination.html.erb} +1 -1
- data/app/views/super/application/{_super_panel.html.erb → _panel.html.erb} +2 -2
- data/app/views/super/application/_query.html.erb +18 -0
- data/app/views/super/application/_sort.html.erb +18 -0
- data/app/views/super/application/_sort_expression.html.erb +25 -0
- data/app/views/super/application/edit.html.erb +1 -0
- data/app/views/super/application/index.html.erb +1 -0
- data/app/views/super/application/new.html.erb +1 -0
- data/app/views/super/application/show.html.erb +1 -0
- data/app/views/super/feather/README.md +1 -0
- data/app/views/super/feather/_x.html +15 -0
- data/config/routes.rb +2 -0
- data/docs/cheat.md +8 -8
- data/frontend/super-frontend/dist/application.css +5600 -0
- data/frontend/super-frontend/dist/application.js +297 -97
- data/lib/generators/super/action_text/USAGE +23 -0
- data/lib/generators/super/action_text/action_text_generator.rb +32 -0
- data/lib/generators/super/action_text/templates/pack_super_action_text.css +23 -0
- data/lib/generators/super/action_text/templates/pack_super_action_text.js +4 -0
- data/lib/generators/super/install/install_generator.rb +18 -7
- data/lib/generators/super/install/templates/base_controller.rb.tt +9 -1
- data/lib/generators/super/install/templates/initializer.rb.tt +9 -2
- data/lib/generators/super/resource/resource_generator.rb +107 -30
- data/lib/generators/super/resource/templates/resources_controller.rb.tt +3 -39
- data/lib/generators/super/webpacker/USAGE +5 -4
- data/lib/generators/super/webpacker/webpacker_generator.rb +5 -2
- data/lib/super.rb +17 -0
- data/lib/super/action_inquirer.rb +2 -0
- data/lib/super/assets.rb +114 -38
- data/lib/super/client_error.rb +2 -0
- data/lib/super/compatibility.rb +2 -0
- data/lib/super/configuration.rb +16 -79
- data/lib/super/controls.rb +11 -25
- data/lib/super/controls/optional.rb +75 -16
- data/lib/super/controls/steps.rb +36 -58
- data/lib/super/controls/view.rb +55 -0
- data/lib/super/display.rb +88 -0
- data/lib/super/display/guesser.rb +36 -0
- data/lib/super/display/schema_types.rb +80 -78
- data/lib/super/engine.rb +5 -1
- data/lib/super/error.rb +21 -0
- data/lib/super/filter.rb +7 -130
- data/lib/super/filter/form_object.rb +94 -0
- data/lib/super/filter/guesser.rb +32 -0
- data/lib/super/filter/operator.rb +2 -0
- data/lib/super/filter/schema_types.rb +3 -7
- data/lib/super/form.rb +29 -40
- data/lib/super/form/builder.rb +206 -0
- data/lib/super/form/guesser.rb +29 -0
- data/lib/super/form/inline_errors.rb +28 -0
- data/lib/super/form/schema_types.rb +31 -29
- data/lib/super/form/strong_params.rb +31 -0
- data/lib/super/layout.rb +3 -1
- data/lib/super/link.rb +7 -0
- data/lib/super/navigation/automatic.rb +4 -2
- data/lib/super/pagination.rb +13 -17
- data/lib/super/panel.rb +3 -1
- data/lib/super/partial.rb +2 -0
- data/lib/super/partial/resolving.rb +2 -0
- data/lib/super/plugin.rb +2 -0
- data/lib/super/query/form_object.rb +48 -0
- data/lib/super/schema.rb +2 -25
- data/lib/super/schema/common.rb +27 -0
- data/lib/super/schema/guesser.rb +79 -0
- data/lib/super/sort.rb +110 -0
- data/lib/super/useful/builder.rb +25 -0
- data/lib/super/useful/enum.rb +63 -0
- data/lib/super/version.rb +3 -1
- data/lib/super/view_helper.rb +2 -19
- metadata +63 -34
- data/app/views/super/application/_form_inline_errors.html.erb +0 -10
- data/app/views/super/application/_super_schema_display_show.html.erb +0 -8
- data/app/views/super/application/_super_schema_form.html.erb +0 -15
- data/docs/README.md +0 -6
- data/docs/faq.md +0 -44
- data/docs/quick_start.md +0 -45
- data/docs/webpacker.md +0 -17
- data/docs/yard_customizations.rb +0 -41
- data/frontend/super-frontend/build.js +0 -36
- data/frontend/super-frontend/package.json +0 -21
- data/frontend/super-frontend/postcss.config.js +0 -6
- data/frontend/super-frontend/src/javascripts/super/application.ts +0 -18
- data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +0 -19
- data/frontend/super-frontend/src/javascripts/super/rails__ujs.d.ts +0 -1
- data/frontend/super-frontend/src/javascripts/super/toggle_pending_destruction_controller.ts +0 -15
- data/frontend/super-frontend/src/stylesheets/super/application.css +0 -77
- data/frontend/super-frontend/tailwind.config.js +0 -15
- data/frontend/super-frontend/tsconfig.json +0 -13
- data/frontend/super-frontend/yarn.lock +0 -5448
- data/lib/super/controls/required.rb +0 -41
@@ -4271,149 +4271,349 @@ Object.keys(_core).forEach(function (key) {
|
|
4271
4271
|
}
|
4272
4272
|
});
|
4273
4273
|
});
|
4274
|
-
},{"@stimulus/core":"../node_modules/@stimulus/core/dist/index.js"}],"javascripts/super/apply_template_controller.
|
4274
|
+
},{"@stimulus/core":"../node_modules/@stimulus/core/dist/index.js"}],"javascripts/super/apply_template_controller.js":[function(require,module,exports) {
|
4275
4275
|
"use strict";
|
4276
4276
|
|
4277
|
-
|
4278
|
-
|
4279
|
-
|
4280
|
-
|
4281
|
-
} instanceof Array && function (d, b) {
|
4282
|
-
d.__proto__ = b;
|
4283
|
-
} || function (d, b) {
|
4284
|
-
for (var p in b) {
|
4285
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
4286
|
-
}
|
4287
|
-
};
|
4277
|
+
Object.defineProperty(exports, "__esModule", {
|
4278
|
+
value: true
|
4279
|
+
});
|
4280
|
+
exports.default = void 0;
|
4288
4281
|
|
4289
|
-
|
4290
|
-
};
|
4282
|
+
var _stimulus = require("stimulus");
|
4291
4283
|
|
4292
|
-
|
4293
|
-
_extendStatics(d, b);
|
4284
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4294
4285
|
|
4295
|
-
|
4296
|
-
|
4286
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4287
|
+
|
4288
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
4289
|
+
|
4290
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
4291
|
+
|
4292
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
4293
|
+
|
4294
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
4295
|
+
|
4296
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
4297
|
+
|
4298
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
4299
|
+
|
4300
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
4301
|
+
|
4302
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
4303
|
+
|
4304
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
4305
|
+
|
4306
|
+
var _default = /*#__PURE__*/function (_Controller) {
|
4307
|
+
_inherits(_default, _Controller);
|
4308
|
+
|
4309
|
+
var _super = _createSuper(_default);
|
4310
|
+
|
4311
|
+
function _default() {
|
4312
|
+
_classCallCheck(this, _default);
|
4313
|
+
|
4314
|
+
return _super.apply(this, arguments);
|
4315
|
+
}
|
4316
|
+
|
4317
|
+
_createClass(_default, [{
|
4318
|
+
key: "call",
|
4319
|
+
value: function call(event) {
|
4320
|
+
event.preventDefault();
|
4321
|
+
var unixtime = new Date().getTime();
|
4322
|
+
var content = this.templateTarget.innerHTML.replace(/TEMPLATEINDEX/g, unixtime.toString());
|
4323
|
+
this.templateTarget.insertAdjacentHTML("beforebegin", content);
|
4324
|
+
}
|
4325
|
+
}], [{
|
4326
|
+
key: "targets",
|
4327
|
+
get: function get() {
|
4328
|
+
return ["template"];
|
4297
4329
|
}
|
4330
|
+
}]);
|
4298
4331
|
|
4299
|
-
|
4300
|
-
|
4301
|
-
|
4332
|
+
return _default;
|
4333
|
+
}(_stimulus.Controller);
|
4334
|
+
|
4335
|
+
exports.default = _default;
|
4336
|
+
},{"stimulus":"../node_modules/stimulus/index.js"}],"javascripts/super/clean_filter_param_controller.js":[function(require,module,exports) {
|
4337
|
+
"use strict";
|
4302
4338
|
|
4303
4339
|
Object.defineProperty(exports, "__esModule", {
|
4304
4340
|
value: true
|
4305
4341
|
});
|
4342
|
+
exports.default = void 0;
|
4306
4343
|
|
4307
|
-
var
|
4344
|
+
var _stimulus = require("stimulus");
|
4308
4345
|
|
4309
|
-
|
4310
|
-
|
4311
|
-
function (
|
4312
|
-
|
4346
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4347
|
+
|
4348
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4349
|
+
|
4350
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
4313
4351
|
|
4314
|
-
|
4315
|
-
|
4352
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
4353
|
+
|
4354
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
4355
|
+
|
4356
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
4357
|
+
|
4358
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
4359
|
+
|
4360
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
4361
|
+
|
4362
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
4363
|
+
|
4364
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
4365
|
+
|
4366
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
4367
|
+
|
4368
|
+
var _default = /*#__PURE__*/function (_Controller) {
|
4369
|
+
_inherits(_default, _Controller);
|
4370
|
+
|
4371
|
+
var _super = _createSuper(_default);
|
4372
|
+
|
4373
|
+
function _default() {
|
4374
|
+
_classCallCheck(this, _default);
|
4375
|
+
|
4376
|
+
return _super.apply(this, arguments);
|
4316
4377
|
}
|
4317
4378
|
|
4318
|
-
|
4319
|
-
|
4320
|
-
|
4321
|
-
|
4322
|
-
|
4323
|
-
|
4379
|
+
_createClass(_default, [{
|
4380
|
+
key: "call",
|
4381
|
+
value: function call() {
|
4382
|
+
var allControlsBlank = this.controlTargets.every(function (el) {
|
4383
|
+
return el.value === "";
|
4384
|
+
});
|
4385
|
+
|
4386
|
+
if (!allControlsBlank) {
|
4387
|
+
return;
|
4388
|
+
}
|
4389
|
+
|
4390
|
+
this.candidateTargets.forEach(function (el) {
|
4391
|
+
el.disabled = true;
|
4392
|
+
});
|
4393
|
+
}
|
4394
|
+
}], [{
|
4395
|
+
key: "targets",
|
4396
|
+
get: function get() {
|
4397
|
+
return ["candidate", "control"];
|
4398
|
+
}
|
4399
|
+
}]);
|
4324
4400
|
|
4325
|
-
|
4326
|
-
|
4327
|
-
}(stimulus_1.Controller);
|
4401
|
+
return _default;
|
4402
|
+
}(_stimulus.Controller);
|
4328
4403
|
|
4329
|
-
exports.default =
|
4330
|
-
},{"stimulus":"../node_modules/stimulus/index.js"}],"javascripts/super/
|
4404
|
+
exports.default = _default;
|
4405
|
+
},{"stimulus":"../node_modules/stimulus/index.js"}],"javascripts/super/clean_filter_params_controller.js":[function(require,module,exports) {
|
4331
4406
|
"use strict";
|
4332
4407
|
|
4333
|
-
|
4334
|
-
|
4335
|
-
|
4336
|
-
|
4337
|
-
} instanceof Array && function (d, b) {
|
4338
|
-
d.__proto__ = b;
|
4339
|
-
} || function (d, b) {
|
4340
|
-
for (var p in b) {
|
4341
|
-
if (b.hasOwnProperty(p)) d[p] = b[p];
|
4342
|
-
}
|
4343
|
-
};
|
4408
|
+
Object.defineProperty(exports, "__esModule", {
|
4409
|
+
value: true
|
4410
|
+
});
|
4411
|
+
exports.default = void 0;
|
4344
4412
|
|
4345
|
-
|
4346
|
-
};
|
4413
|
+
var _stimulus = require("stimulus");
|
4347
4414
|
|
4348
|
-
|
4349
|
-
_extendStatics(d, b);
|
4415
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4350
4416
|
|
4351
|
-
|
4352
|
-
|
4417
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4418
|
+
|
4419
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
4420
|
+
|
4421
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
4422
|
+
|
4423
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
4424
|
+
|
4425
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
4426
|
+
|
4427
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
4428
|
+
|
4429
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
4430
|
+
|
4431
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
4432
|
+
|
4433
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
4434
|
+
|
4435
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
4436
|
+
|
4437
|
+
var _default = /*#__PURE__*/function (_Controller) {
|
4438
|
+
_inherits(_default, _Controller);
|
4439
|
+
|
4440
|
+
var _super = _createSuper(_default);
|
4441
|
+
|
4442
|
+
function _default() {
|
4443
|
+
_classCallCheck(this, _default);
|
4444
|
+
|
4445
|
+
return _super.apply(this, arguments);
|
4446
|
+
}
|
4447
|
+
|
4448
|
+
_createClass(_default, [{
|
4449
|
+
key: "call",
|
4450
|
+
value: function call(event) {
|
4451
|
+
this.element.querySelectorAll("[data-controller='clean-filter-param']").forEach(function (el) {
|
4452
|
+
var controller = this.application.getControllerForElementAndIdentifier(el, "clean-filter-param");
|
4453
|
+
controller.call();
|
4454
|
+
}.bind(this));
|
4353
4455
|
}
|
4456
|
+
}]);
|
4354
4457
|
|
4355
|
-
|
4356
|
-
|
4357
|
-
|
4458
|
+
return _default;
|
4459
|
+
}(_stimulus.Controller);
|
4460
|
+
|
4461
|
+
exports.default = _default;
|
4462
|
+
},{"stimulus":"../node_modules/stimulus/index.js"}],"javascripts/super/delete_controller.js":[function(require,module,exports) {
|
4463
|
+
"use strict";
|
4358
4464
|
|
4359
4465
|
Object.defineProperty(exports, "__esModule", {
|
4360
4466
|
value: true
|
4361
4467
|
});
|
4468
|
+
exports.default = void 0;
|
4362
4469
|
|
4363
|
-
var
|
4470
|
+
var _stimulus = require("stimulus");
|
4364
4471
|
|
4365
|
-
|
4366
|
-
|
4367
|
-
function (
|
4368
|
-
|
4472
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4473
|
+
|
4474
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4475
|
+
|
4476
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
4369
4477
|
|
4370
|
-
|
4371
|
-
|
4478
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
4479
|
+
|
4480
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
4481
|
+
|
4482
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
4483
|
+
|
4484
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
4485
|
+
|
4486
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
4487
|
+
|
4488
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
4489
|
+
|
4490
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
4491
|
+
|
4492
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
4493
|
+
|
4494
|
+
var _default = /*#__PURE__*/function (_Controller) {
|
4495
|
+
_inherits(_default, _Controller);
|
4496
|
+
|
4497
|
+
var _super = _createSuper(_default);
|
4498
|
+
|
4499
|
+
function _default() {
|
4500
|
+
_classCallCheck(this, _default);
|
4501
|
+
|
4502
|
+
return _super.apply(this, arguments);
|
4372
4503
|
}
|
4373
4504
|
|
4374
|
-
|
4375
|
-
|
4505
|
+
_createClass(_default, [{
|
4506
|
+
key: "call",
|
4507
|
+
value: function call(event) {
|
4508
|
+
event.preventDefault();
|
4509
|
+
this.element.remove();
|
4510
|
+
}
|
4511
|
+
}]);
|
4376
4512
|
|
4377
|
-
|
4378
|
-
|
4379
|
-
|
4380
|
-
|
4381
|
-
|
4513
|
+
return _default;
|
4514
|
+
}(_stimulus.Controller);
|
4515
|
+
|
4516
|
+
exports.default = _default;
|
4517
|
+
},{"stimulus":"../node_modules/stimulus/index.js"}],"javascripts/super/toggle_pending_destruction_controller.js":[function(require,module,exports) {
|
4518
|
+
"use strict";
|
4519
|
+
|
4520
|
+
Object.defineProperty(exports, "__esModule", {
|
4521
|
+
value: true
|
4522
|
+
});
|
4523
|
+
exports.default = void 0;
|
4524
|
+
|
4525
|
+
var _stimulus = require("stimulus");
|
4526
|
+
|
4527
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4528
|
+
|
4529
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
4530
|
+
|
4531
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
4532
|
+
|
4533
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
|
4534
|
+
|
4535
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
4536
|
+
|
4537
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
4538
|
+
|
4539
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
4540
|
+
|
4541
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
|
4542
|
+
|
4543
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
4544
|
+
|
4545
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
|
4546
|
+
|
4547
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
4548
|
+
|
4549
|
+
var _default = /*#__PURE__*/function (_Controller) {
|
4550
|
+
_inherits(_default, _Controller);
|
4551
|
+
|
4552
|
+
var _super = _createSuper(_default);
|
4553
|
+
|
4554
|
+
function _default() {
|
4555
|
+
_classCallCheck(this, _default);
|
4556
|
+
|
4557
|
+
return _super.apply(this, arguments);
|
4558
|
+
}
|
4559
|
+
|
4560
|
+
_createClass(_default, [{
|
4561
|
+
key: "call",
|
4562
|
+
value: function call(event) {
|
4563
|
+
var target = event.target;
|
4564
|
+
|
4565
|
+
if (target) {
|
4566
|
+
if (target.checked) {
|
4567
|
+
this.element.classList.add("opacity-75", "bg-gray-100");
|
4568
|
+
} else {
|
4569
|
+
this.element.classList.remove("opacity-75", "bg-gray-100");
|
4570
|
+
}
|
4382
4571
|
}
|
4383
4572
|
}
|
4384
|
-
};
|
4573
|
+
}]);
|
4385
4574
|
|
4386
|
-
return
|
4387
|
-
}(
|
4575
|
+
return _default;
|
4576
|
+
}(_stimulus.Controller);
|
4388
4577
|
|
4389
|
-
exports.default =
|
4390
|
-
},{"stimulus":"../node_modules/stimulus/index.js"}],"javascripts/super/application.
|
4578
|
+
exports.default = _default;
|
4579
|
+
},{"stimulus":"../node_modules/stimulus/index.js"}],"javascripts/super/application.js":[function(require,module,exports) {
|
4391
4580
|
"use strict";
|
4392
4581
|
|
4393
|
-
var __importDefault = this && this.__importDefault || function (mod) {
|
4394
|
-
return mod && mod.__esModule ? mod : {
|
4395
|
-
"default": mod
|
4396
|
-
};
|
4397
|
-
};
|
4398
|
-
|
4399
4582
|
Object.defineProperty(exports, "__esModule", {
|
4400
4583
|
value: true
|
4401
4584
|
});
|
4585
|
+
Object.defineProperty(exports, "StimulusController", {
|
4586
|
+
enumerable: true,
|
4587
|
+
get: function () {
|
4588
|
+
return _stimulus.Controller;
|
4589
|
+
}
|
4590
|
+
});
|
4591
|
+
exports.StimulusApplication = void 0;
|
4402
4592
|
|
4403
|
-
var
|
4593
|
+
var _ujs = _interopRequireDefault(require("@rails/ujs"));
|
4404
4594
|
|
4405
|
-
var
|
4595
|
+
var _stimulus = require("stimulus");
|
4406
4596
|
|
4407
|
-
var
|
4597
|
+
var _apply_template_controller = _interopRequireDefault(require("./apply_template_controller"));
|
4408
4598
|
|
4409
|
-
var
|
4599
|
+
var _clean_filter_param_controller = _interopRequireDefault(require("./clean_filter_param_controller"));
|
4410
4600
|
|
4411
|
-
|
4412
|
-
|
4413
|
-
|
4414
|
-
|
4415
|
-
|
4416
|
-
|
4417
|
-
|
4418
|
-
|
4419
|
-
|
4601
|
+
var _clean_filter_params_controller = _interopRequireDefault(require("./clean_filter_params_controller"));
|
4602
|
+
|
4603
|
+
var _delete_controller = _interopRequireDefault(require("./delete_controller"));
|
4604
|
+
|
4605
|
+
var _toggle_pending_destruction_controller = _interopRequireDefault(require("./toggle_pending_destruction_controller"));
|
4606
|
+
|
4607
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
4608
|
+
|
4609
|
+
_ujs.default.start();
|
4610
|
+
|
4611
|
+
var StimulusApplication = _stimulus.Application.start();
|
4612
|
+
|
4613
|
+
exports.StimulusApplication = StimulusApplication;
|
4614
|
+
StimulusApplication.register("apply-template", _apply_template_controller.default);
|
4615
|
+
StimulusApplication.register("clean-filter-param", _clean_filter_param_controller.default);
|
4616
|
+
StimulusApplication.register("clean-filter-params", _clean_filter_params_controller.default);
|
4617
|
+
StimulusApplication.register("delete", _delete_controller.default);
|
4618
|
+
StimulusApplication.register("toggle-pending-destruction", _toggle_pending_destruction_controller.default);
|
4619
|
+
},{"@rails/ujs":"../node_modules/@rails/ujs/lib/assets/compiled/rails-ujs.js","stimulus":"../node_modules/stimulus/index.js","./apply_template_controller":"javascripts/super/apply_template_controller.js","./clean_filter_param_controller":"javascripts/super/clean_filter_param_controller.js","./clean_filter_params_controller":"javascripts/super/clean_filter_params_controller.js","./delete_controller":"javascripts/super/delete_controller.js","./toggle_pending_destruction_controller":"javascripts/super/toggle_pending_destruction_controller.js"}]},{},["javascripts/super/application.js"], "Super")
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Description:
|
2
|
+
Creates the necessary files for Super to support ActionText
|
3
|
+
|
4
|
+
Prerequisites:
|
5
|
+
|
6
|
+
* Webpacker must be installed on your Rails app
|
7
|
+
* Run: bundle exec rails webpacker:install
|
8
|
+
|
9
|
+
* ActionText must be installed on your Rails app
|
10
|
+
* Run: bundle exec rails action_text:install
|
11
|
+
|
12
|
+
Note that Super does NOT need to be configured to use Webpacker. But if you
|
13
|
+
do use Super with Webpacker, you can merge `action_text.js` into
|
14
|
+
`application.js.erb` file.
|
15
|
+
|
16
|
+
Example:
|
17
|
+
bin/rails webpacker:install # if you haven't already
|
18
|
+
bin/rails action_text:install # if you haven't already
|
19
|
+
bin/rails generate super:action_text
|
20
|
+
|
21
|
+
This will:
|
22
|
+
Create app/javascript/packs/super/action_text.js
|
23
|
+
Modify config/initializers/super.rb
|