super 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.yardopts +2 -1
- data/README.md +55 -23
- data/app/assets/javascripts/super/application.js +1062 -261
- data/app/assets/stylesheets/super/application.css +72775 -50711
- data/app/controllers/super/application_controller.rb +39 -50
- data/app/helpers/super/application_helper.rb +24 -17
- data/app/views/layouts/super/application.html.erb +4 -0
- data/app/views/super/application/{_resources_header.html.erb → _collection_header.html.erb} +5 -6
- data/app/views/super/application/_flash.html.erb +13 -13
- data/app/views/super/application/_form_field_select.html.erb +1 -1
- data/app/views/super/application/_form_has_many.html.erb +1 -1
- data/app/views/super/application/{_resource_header.html.erb → _member_header.html.erb} +6 -6
- data/app/views/super/application/_super_layout.html.erb +7 -12
- data/app/views/super/application/_super_panel.html.erb +2 -6
- data/app/views/super/application/_super_schema_display_actions.html.erb +5 -0
- data/app/views/super/application/_super_schema_display_index.html.erb +39 -0
- data/app/views/super/application/_super_schema_display_show.html.erb +8 -0
- data/app/views/super/application/{_form.html.erb → _super_schema_form.html.erb} +2 -4
- data/app/views/super/application/edit.html.erb +2 -2
- data/app/views/super/application/index.html.erb +2 -2
- data/app/views/super/application/new.html.erb +2 -2
- data/app/views/super/application/show.html.erb +2 -2
- data/app/views/super/feather/{_chevron_down.svg → _chevron_down.html} +0 -0
- data/config/locales/en.yml +5 -0
- data/docs/cheat.md +41 -0
- data/docs/webpacker.md +1 -1
- data/frontend/super-frontend/dist/application.css +72775 -50711
- data/frontend/super-frontend/dist/application.js +1062 -261
- data/frontend/super-frontend/package.json +1 -1
- data/frontend/super-frontend/src/javascripts/super/apply_template_controller.ts +6 -8
- data/frontend/super-frontend/tailwind.config.js +7 -1
- data/frontend/super-frontend/yarn.lock +1103 -1195
- data/lib/generators/super/install/install_generator.rb +16 -0
- data/lib/super.rb +2 -2
- data/lib/super/action_inquirer.rb +2 -2
- data/lib/super/client_error.rb +43 -0
- data/lib/super/configuration.rb +1 -1
- data/lib/super/controls.rb +17 -101
- data/lib/super/controls/optional.rb +65 -0
- data/lib/super/controls/required.rb +41 -0
- data/lib/super/controls/steps.rb +115 -0
- data/lib/super/display/schema_types.rb +45 -2
- data/lib/super/error.rb +8 -9
- data/lib/super/form.rb +48 -0
- data/lib/super/form/schema_types.rb +8 -1
- data/lib/super/layout.rb +28 -0
- data/lib/super/link.rb +55 -32
- data/lib/super/panel.rb +13 -0
- data/lib/super/partial/resolving.rb +24 -0
- data/lib/super/schema.rb +19 -5
- data/lib/super/version.rb +1 -1
- data/lib/super/view_helper.rb +1 -1
- metadata +40 -15
- data/app/views/super/application/_index.html.erb +0 -45
- data/app/views/super/application/_show.html.erb +0 -10
- data/docs/controls.md +0 -39
- data/lib/super/display.rb +0 -9
- data/lib/super/step.rb +0 -36
- data/lib/tasks/super_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd2be7e756bd5000efcf53557039621d67df3705df3a35c5806256c66ee4e96
|
4
|
+
data.tar.gz: eccb74df362766a46c1fc951ca327168a4febb06cacd11f3297201e898576053
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85ab056714996f2030f786e4f9498761b41374614078a7fd27155a1200cce25b583361d5b44f02c7f1bf88b6792e83ea40c9985bd6f5c51f3e117b0950732b7c
|
7
|
+
data.tar.gz: 5e7dc0e1216c67fb5a24cb392dc5d5f1193dbc4ac8acafc39afadd42809ba7cd15c813b729fef9e3026a87cdfaf69eadfe3ef670b9099b62d75fde1c8d14c058
|
data/.yardopts
CHANGED
data/README.md
CHANGED
@@ -1,14 +1,30 @@
|
|
1
1
|
# Super
|
2
2
|
|
3
|
-
Super is
|
3
|
+
Super is an admin framework for Ruby on Rails applications. Super helps you make
|
4
|
+
powerful admin pages quickly.
|
4
5
|
|
5
|
-
Super
|
6
|
-
pages. It builds on top of Rails controllers and views, so it's straightforward
|
7
|
-
to customize. It's fully configurable without a DSL.
|
6
|
+
Super strives to let engineers build great admin pages quickly and easily by:
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
8
|
+
* Providing a useful CRUD interface
|
9
|
+
* Relying on Rails' built in features whenever possible
|
10
|
+
* Preferring plain Ruby objects rather than requiring DSLs
|
11
|
+
* Supporting a wide range of Ruby and Rails versions
|
12
|
+
* Having zero dependencies
|
13
|
+
|
14
|
+
|
15
|
+
Super has no dependencies. That means when you install Super, only Super gets
|
16
|
+
added to your `Gemfile.lock`. This leads to many benefits:
|
17
|
+
|
18
|
+
* Super doesn't require common Rails libraries like [Kaminari][Kaminari],
|
19
|
+
[Devise][Devise], or [Sass][Sass], so it'll never conflict with the libraries
|
20
|
+
you have installed. If you want to upgrade Super, you won't have to upgrade
|
21
|
+
any of your other gems. And if you want to upgrade your other gems, you won't
|
22
|
+
have to upgrade Super! This will greatly reduce your maintenance burden since
|
23
|
+
your admin framework won't dictate which libraries and which versions your
|
24
|
+
application uses.
|
25
|
+
* All code has the possibility of bugs and security issues, whether they're
|
26
|
+
written by you or by others. Having fewer dependencies can reduce the risk of
|
27
|
+
introducing problems into your application.
|
12
28
|
|
13
29
|
|
14
30
|
## Features
|
@@ -16,41 +32,49 @@ powerful.
|
|
16
32
|
* Sprockets and Webpacker compatibility
|
17
33
|
* Note: Webpacker support depends on one additional NPM package for parsing
|
18
34
|
ERB
|
19
|
-
* Pagination
|
20
35
|
* Configurable forms (new and edit forms)
|
36
|
+
* Nested associations are supported out of the box
|
21
37
|
* Configurable display (index and show tables)
|
22
|
-
* Supports Rails 5.0+, Ruby 2.3+
|
23
|
-
* Configurable without a DSL
|
24
|
-
* Looks reasonably nice and modern
|
25
38
|
* Pre-built frontend assets (doesn't require Sass, PostCSS, Babel, etc)
|
26
39
|
* Vendored assets include
|
27
40
|
* Stimulus JS
|
41
|
+
* Rails UJS
|
28
42
|
* Tailwind CSS
|
29
|
-
|
43
|
+
* Supports Rails 5.0+, Ruby 2.3+
|
44
|
+
|
30
45
|
|
31
|
-
Super
|
32
|
-
|
33
|
-
|
46
|
+
## Super doesn't fit my needs. What should I look at?
|
47
|
+
|
48
|
+
There are lots of Rails admin frameworks. I've personally used
|
49
|
+
[ActiveAdmin][ActiveAdmin] and [Administrate][Administrate], and I had some
|
50
|
+
brief exposure to [RailsAdmin][RailsAdmin].
|
51
|
+
|
52
|
+
If you need a ton of features, I'd probably suggest looking at ActiveAdmin. It
|
53
|
+
relies pretty heavily on DSLs but is pretty flexible and popular.
|
54
|
+
|
55
|
+
I like Administrate as well. I found that it doesn't have quite as many features
|
56
|
+
as ActiveAdmin, but it's nice and feels like developing a normal Rails app.
|
57
|
+
There's no DSL.
|
34
58
|
|
35
59
|
|
36
60
|
## Professional edition
|
37
61
|
|
38
|
-
Super Professional is a paid add-on
|
62
|
+
Super Professional is a paid add-on that provides additional benefits:
|
39
63
|
|
40
|
-
*
|
64
|
+
* Productivity improvements and quality of life features for admins
|
41
65
|
* Priority email support
|
42
66
|
* Supporting long term development of Super
|
43
67
|
* An LGPL exemption
|
44
68
|
|
45
|
-
It
|
46
|
-
notified of its availability
|
69
|
+
It isn't available yet. Contact me if you're interested, or subscribe to the
|
70
|
+
[newsletter][newsletter] to be notified of its availability and for brief,
|
71
|
+
occasional updates to Super.
|
47
72
|
|
48
73
|
|
49
74
|
## Demos
|
50
75
|
|
51
76
|
* [Super Demo][super_demo]
|
52
77
|
* [Super Demo source][super_demo_source]
|
53
|
-
* [Super Professional Demo][super_professional]
|
54
78
|
|
55
79
|
|
56
80
|
## Installation and Usage
|
@@ -58,6 +82,11 @@ notified of its availability or for brief, occasional updates.
|
|
58
82
|
See [Quick start](./docs/quick_start.md)
|
59
83
|
|
60
84
|
|
85
|
+
## Path to 1.0
|
86
|
+
|
87
|
+
See [STABILITY](./STABILITY.md)
|
88
|
+
|
89
|
+
|
61
90
|
## Contributing
|
62
91
|
|
63
92
|
See [CONTRIBUTING](./CONTRIBUTING.md)
|
@@ -68,9 +97,12 @@ See [CONTRIBUTING](./CONTRIBUTING.md)
|
|
68
97
|
The gem is available under the terms of the [GNU LGPLv3](./LICENSE).
|
69
98
|
|
70
99
|
|
71
|
-
[
|
72
|
-
[
|
100
|
+
[Administrate]: https://github.com/thoughtbot/administrate
|
101
|
+
[ActiveAdmin]: https://github.com/activeadmin/activeadmin
|
102
|
+
[RailsAdmin]: https://github.com/sferik/rails_admin
|
103
|
+
[Kaminari]: https://github.com/kaminari/kaminari
|
104
|
+
[Devise]: https://github.com/heartcombo/devise
|
105
|
+
[Sass]: https://github.com/sass/sassc-ruby
|
73
106
|
[newsletter]: https://tinyletter.com/zachahn
|
74
107
|
[super_demo]: https://demo-super.herokuapp.com/admin/members
|
75
108
|
[super_demo_source]: https://github.com/zachahn/super_demo
|
76
|
-
[super_professional]: https://demo-super-professional.herokuapp.com/admin/members
|
@@ -866,7 +866,7 @@ Released under the MIT license
|
|
866
866
|
}
|
867
867
|
}).call(this);
|
868
868
|
|
869
|
-
},{}],"../node_modules/@stimulus/core/dist/
|
869
|
+
},{}],"../node_modules/@stimulus/core/dist/event_listener.js":[function(require,module,exports) {
|
870
870
|
"use strict";
|
871
871
|
|
872
872
|
Object.defineProperty(exports, "__esModule", {
|
@@ -877,18 +877,19 @@ exports.EventListener = void 0;
|
|
877
877
|
var EventListener =
|
878
878
|
/** @class */
|
879
879
|
function () {
|
880
|
-
function EventListener(eventTarget, eventName) {
|
880
|
+
function EventListener(eventTarget, eventName, eventOptions) {
|
881
881
|
this.eventTarget = eventTarget;
|
882
882
|
this.eventName = eventName;
|
883
|
+
this.eventOptions = eventOptions;
|
883
884
|
this.unorderedBindings = new Set();
|
884
885
|
}
|
885
886
|
|
886
887
|
EventListener.prototype.connect = function () {
|
887
|
-
this.eventTarget.addEventListener(this.eventName, this,
|
888
|
+
this.eventTarget.addEventListener(this.eventName, this, this.eventOptions);
|
888
889
|
};
|
889
890
|
|
890
891
|
EventListener.prototype.disconnect = function () {
|
891
|
-
this.eventTarget.removeEventListener(this.eventName, this,
|
892
|
+
this.eventTarget.removeEventListener(this.eventName, this, this.eventOptions);
|
892
893
|
}; // Binding observer delegate
|
893
894
|
|
894
895
|
/** @hidden */
|
@@ -926,7 +927,7 @@ function () {
|
|
926
927
|
return leftIndex < rightIndex ? -1 : leftIndex > rightIndex ? 1 : 0;
|
927
928
|
});
|
928
929
|
},
|
929
|
-
enumerable:
|
930
|
+
enumerable: false,
|
930
931
|
configurable: true
|
931
932
|
});
|
932
933
|
return EventListener;
|
@@ -948,7 +949,7 @@ function extendEvent(event) {
|
|
948
949
|
});
|
949
950
|
}
|
950
951
|
}
|
951
|
-
},{}],"../node_modules/@stimulus/core/dist/
|
952
|
+
},{}],"../node_modules/@stimulus/core/dist/dispatcher.js":[function(require,module,exports) {
|
952
953
|
"use strict";
|
953
954
|
|
954
955
|
Object.defineProperty(exports, "__esModule", {
|
@@ -991,7 +992,7 @@ function () {
|
|
991
992
|
return listeners.concat(Array.from(map.values()));
|
992
993
|
}, []);
|
993
994
|
},
|
994
|
-
enumerable:
|
995
|
+
enumerable: false,
|
995
996
|
configurable: true
|
996
997
|
}); // Binding observer delegate
|
997
998
|
|
@@ -1018,24 +1019,26 @@ function () {
|
|
1018
1019
|
|
1019
1020
|
Dispatcher.prototype.fetchEventListenerForBinding = function (binding) {
|
1020
1021
|
var eventTarget = binding.eventTarget,
|
1021
|
-
eventName = binding.eventName
|
1022
|
-
|
1022
|
+
eventName = binding.eventName,
|
1023
|
+
eventOptions = binding.eventOptions;
|
1024
|
+
return this.fetchEventListener(eventTarget, eventName, eventOptions);
|
1023
1025
|
};
|
1024
1026
|
|
1025
|
-
Dispatcher.prototype.fetchEventListener = function (eventTarget, eventName) {
|
1027
|
+
Dispatcher.prototype.fetchEventListener = function (eventTarget, eventName, eventOptions) {
|
1026
1028
|
var eventListenerMap = this.fetchEventListenerMapForEventTarget(eventTarget);
|
1027
|
-
var
|
1029
|
+
var cacheKey = this.cacheKey(eventName, eventOptions);
|
1030
|
+
var eventListener = eventListenerMap.get(cacheKey);
|
1028
1031
|
|
1029
1032
|
if (!eventListener) {
|
1030
|
-
eventListener = this.createEventListener(eventTarget, eventName);
|
1031
|
-
eventListenerMap.set(
|
1033
|
+
eventListener = this.createEventListener(eventTarget, eventName, eventOptions);
|
1034
|
+
eventListenerMap.set(cacheKey, eventListener);
|
1032
1035
|
}
|
1033
1036
|
|
1034
1037
|
return eventListener;
|
1035
1038
|
};
|
1036
1039
|
|
1037
|
-
Dispatcher.prototype.createEventListener = function (eventTarget, eventName) {
|
1038
|
-
var eventListener = new _event_listener.EventListener(eventTarget, eventName);
|
1040
|
+
Dispatcher.prototype.createEventListener = function (eventTarget, eventName, eventOptions) {
|
1041
|
+
var eventListener = new _event_listener.EventListener(eventTarget, eventName, eventOptions);
|
1039
1042
|
|
1040
1043
|
if (this.started) {
|
1041
1044
|
eventListener.connect();
|
@@ -1055,27 +1058,36 @@ function () {
|
|
1055
1058
|
return eventListenerMap;
|
1056
1059
|
};
|
1057
1060
|
|
1061
|
+
Dispatcher.prototype.cacheKey = function (eventName, eventOptions) {
|
1062
|
+
var parts = [eventName];
|
1063
|
+
Object.keys(eventOptions).sort().forEach(function (key) {
|
1064
|
+
parts.push("" + (eventOptions[key] ? "" : "!") + key);
|
1065
|
+
});
|
1066
|
+
return parts.join(":");
|
1067
|
+
};
|
1068
|
+
|
1058
1069
|
return Dispatcher;
|
1059
1070
|
}();
|
1060
1071
|
|
1061
1072
|
exports.Dispatcher = Dispatcher;
|
1062
|
-
},{"./event_listener":"../node_modules/@stimulus/core/dist/
|
1073
|
+
},{"./event_listener":"../node_modules/@stimulus/core/dist/event_listener.js"}],"../node_modules/@stimulus/core/dist/action_descriptor.js":[function(require,module,exports) {
|
1063
1074
|
"use strict";
|
1064
1075
|
|
1065
1076
|
Object.defineProperty(exports, "__esModule", {
|
1066
1077
|
value: true
|
1067
1078
|
});
|
1068
|
-
exports.
|
1079
|
+
exports.parseActionDescriptorString = parseActionDescriptorString;
|
1069
1080
|
exports.stringifyEventTarget = stringifyEventTarget;
|
1070
|
-
// capture nos.: 12 23 4 43 1 5 56 7
|
1071
|
-
var descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#(.+))?$/;
|
1081
|
+
// capture nos.: 12 23 4 43 1 5 56 7 768 9 98
|
1082
|
+
var descriptorPattern = /^((.+?)(@(window|document))?->)?(.+?)(#([^:]+?))(:(.+))?$/;
|
1072
1083
|
|
1073
|
-
function
|
1084
|
+
function parseActionDescriptorString(descriptorString) {
|
1074
1085
|
var source = descriptorString.trim();
|
1075
1086
|
var matches = source.match(descriptorPattern) || [];
|
1076
1087
|
return {
|
1077
1088
|
eventTarget: parseEventTarget(matches[4]),
|
1078
1089
|
eventName: matches[2],
|
1090
|
+
eventOptions: matches[9] ? parseEventOptions(matches[9]) : {},
|
1079
1091
|
identifier: matches[5],
|
1080
1092
|
methodName: matches[7]
|
1081
1093
|
};
|
@@ -1089,6 +1101,14 @@ function parseEventTarget(eventTargetName) {
|
|
1089
1101
|
}
|
1090
1102
|
}
|
1091
1103
|
|
1104
|
+
function parseEventOptions(eventOptions) {
|
1105
|
+
return eventOptions.split(":").reduce(function (options, token) {
|
1106
|
+
var _a;
|
1107
|
+
|
1108
|
+
return Object.assign(options, (_a = {}, _a[token.replace(/^!/, "")] = !/^!/.test(token), _a));
|
1109
|
+
}, {});
|
1110
|
+
}
|
1111
|
+
|
1092
1112
|
function stringifyEventTarget(eventTarget) {
|
1093
1113
|
if (eventTarget == window) {
|
1094
1114
|
return "window";
|
@@ -1096,7 +1116,7 @@ function stringifyEventTarget(eventTarget) {
|
|
1096
1116
|
return "document";
|
1097
1117
|
}
|
1098
1118
|
}
|
1099
|
-
},{}],"../node_modules/@stimulus/core/dist/
|
1119
|
+
},{}],"../node_modules/@stimulus/core/dist/action.js":[function(require,module,exports) {
|
1100
1120
|
"use strict";
|
1101
1121
|
|
1102
1122
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1115,12 +1135,13 @@ function () {
|
|
1115
1135
|
this.index = index;
|
1116
1136
|
this.eventTarget = descriptor.eventTarget || element;
|
1117
1137
|
this.eventName = descriptor.eventName || getDefaultEventNameForElement(element) || error("missing event name");
|
1138
|
+
this.eventOptions = descriptor.eventOptions || {};
|
1118
1139
|
this.identifier = descriptor.identifier || error("missing identifier");
|
1119
1140
|
this.methodName = descriptor.methodName || error("missing method name");
|
1120
1141
|
}
|
1121
1142
|
|
1122
1143
|
Action.forToken = function (token) {
|
1123
|
-
return new this(token.element, token.index, (0, _action_descriptor.
|
1144
|
+
return new this(token.element, token.index, (0, _action_descriptor.parseActionDescriptorString)(token.content));
|
1124
1145
|
};
|
1125
1146
|
|
1126
1147
|
Action.prototype.toString = function () {
|
@@ -1132,7 +1153,7 @@ function () {
|
|
1132
1153
|
get: function () {
|
1133
1154
|
return (0, _action_descriptor.stringifyEventTarget)(this.eventTarget);
|
1134
1155
|
},
|
1135
|
-
enumerable:
|
1156
|
+
enumerable: false,
|
1136
1157
|
configurable: true
|
1137
1158
|
});
|
1138
1159
|
return Action;
|
@@ -1150,13 +1171,13 @@ var defaultEventNames = {
|
|
1150
1171
|
return "submit";
|
1151
1172
|
},
|
1152
1173
|
"input": function (e) {
|
1153
|
-
return e.getAttribute("type") == "submit" ? "click" : "
|
1174
|
+
return e.getAttribute("type") == "submit" ? "click" : "input";
|
1154
1175
|
},
|
1155
1176
|
"select": function (e) {
|
1156
1177
|
return "change";
|
1157
1178
|
},
|
1158
1179
|
"textarea": function (e) {
|
1159
|
-
return "
|
1180
|
+
return "input";
|
1160
1181
|
}
|
1161
1182
|
};
|
1162
1183
|
|
@@ -1171,7 +1192,7 @@ function getDefaultEventNameForElement(element) {
|
|
1171
1192
|
function error(message) {
|
1172
1193
|
throw new Error(message);
|
1173
1194
|
}
|
1174
|
-
},{"./action_descriptor":"../node_modules/@stimulus/core/dist/
|
1195
|
+
},{"./action_descriptor":"../node_modules/@stimulus/core/dist/action_descriptor.js"}],"../node_modules/@stimulus/core/dist/binding.js":[function(require,module,exports) {
|
1175
1196
|
"use strict";
|
1176
1197
|
|
1177
1198
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1191,21 +1212,28 @@ function () {
|
|
1191
1212
|
get: function () {
|
1192
1213
|
return this.action.index;
|
1193
1214
|
},
|
1194
|
-
enumerable:
|
1215
|
+
enumerable: false,
|
1195
1216
|
configurable: true
|
1196
1217
|
});
|
1197
1218
|
Object.defineProperty(Binding.prototype, "eventTarget", {
|
1198
1219
|
get: function () {
|
1199
1220
|
return this.action.eventTarget;
|
1200
1221
|
},
|
1201
|
-
enumerable:
|
1222
|
+
enumerable: false,
|
1223
|
+
configurable: true
|
1224
|
+
});
|
1225
|
+
Object.defineProperty(Binding.prototype, "eventOptions", {
|
1226
|
+
get: function () {
|
1227
|
+
return this.action.eventOptions;
|
1228
|
+
},
|
1229
|
+
enumerable: false,
|
1202
1230
|
configurable: true
|
1203
1231
|
});
|
1204
1232
|
Object.defineProperty(Binding.prototype, "identifier", {
|
1205
1233
|
get: function () {
|
1206
1234
|
return this.context.identifier;
|
1207
1235
|
},
|
1208
|
-
enumerable:
|
1236
|
+
enumerable: false,
|
1209
1237
|
configurable: true
|
1210
1238
|
});
|
1211
1239
|
|
@@ -1219,7 +1247,7 @@ function () {
|
|
1219
1247
|
get: function () {
|
1220
1248
|
return this.action.eventName;
|
1221
1249
|
},
|
1222
|
-
enumerable:
|
1250
|
+
enumerable: false,
|
1223
1251
|
configurable: true
|
1224
1252
|
});
|
1225
1253
|
Object.defineProperty(Binding.prototype, "method", {
|
@@ -1232,7 +1260,7 @@ function () {
|
|
1232
1260
|
|
1233
1261
|
throw new Error("Action \"" + this.action + "\" references undefined method \"" + this.methodName + "\"");
|
1234
1262
|
},
|
1235
|
-
enumerable:
|
1263
|
+
enumerable: false,
|
1236
1264
|
configurable: true
|
1237
1265
|
});
|
1238
1266
|
|
@@ -1265,7 +1293,7 @@ function () {
|
|
1265
1293
|
} else if (eventTarget instanceof Element && this.element.contains(eventTarget)) {
|
1266
1294
|
return this.scope.containsElement(eventTarget);
|
1267
1295
|
} else {
|
1268
|
-
return
|
1296
|
+
return this.scope.containsElement(this.action.element);
|
1269
1297
|
}
|
1270
1298
|
};
|
1271
1299
|
|
@@ -1273,35 +1301,35 @@ function () {
|
|
1273
1301
|
get: function () {
|
1274
1302
|
return this.context.controller;
|
1275
1303
|
},
|
1276
|
-
enumerable:
|
1304
|
+
enumerable: false,
|
1277
1305
|
configurable: true
|
1278
1306
|
});
|
1279
1307
|
Object.defineProperty(Binding.prototype, "methodName", {
|
1280
1308
|
get: function () {
|
1281
1309
|
return this.action.methodName;
|
1282
1310
|
},
|
1283
|
-
enumerable:
|
1311
|
+
enumerable: false,
|
1284
1312
|
configurable: true
|
1285
1313
|
});
|
1286
1314
|
Object.defineProperty(Binding.prototype, "element", {
|
1287
1315
|
get: function () {
|
1288
1316
|
return this.scope.element;
|
1289
1317
|
},
|
1290
|
-
enumerable:
|
1318
|
+
enumerable: false,
|
1291
1319
|
configurable: true
|
1292
1320
|
});
|
1293
1321
|
Object.defineProperty(Binding.prototype, "scope", {
|
1294
1322
|
get: function () {
|
1295
1323
|
return this.context.scope;
|
1296
1324
|
},
|
1297
|
-
enumerable:
|
1325
|
+
enumerable: false,
|
1298
1326
|
configurable: true
|
1299
1327
|
});
|
1300
1328
|
return Binding;
|
1301
1329
|
}();
|
1302
1330
|
|
1303
1331
|
exports.Binding = Binding;
|
1304
|
-
},{}],"../node_modules/@stimulus/mutation-observers/dist/
|
1332
|
+
},{}],"../node_modules/@stimulus/mutation-observers/dist/element_observer.js":[function(require,module,exports) {
|
1305
1333
|
"use strict";
|
1306
1334
|
|
1307
1335
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1479,7 +1507,7 @@ function () {
|
|
1479
1507
|
}();
|
1480
1508
|
|
1481
1509
|
exports.ElementObserver = ElementObserver;
|
1482
|
-
},{}],"../node_modules/@stimulus/mutation-observers/dist/
|
1510
|
+
},{}],"../node_modules/@stimulus/mutation-observers/dist/attribute_observer.js":[function(require,module,exports) {
|
1483
1511
|
"use strict";
|
1484
1512
|
|
1485
1513
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1502,14 +1530,14 @@ function () {
|
|
1502
1530
|
get: function () {
|
1503
1531
|
return this.elementObserver.element;
|
1504
1532
|
},
|
1505
|
-
enumerable:
|
1533
|
+
enumerable: false,
|
1506
1534
|
configurable: true
|
1507
1535
|
});
|
1508
1536
|
Object.defineProperty(AttributeObserver.prototype, "selector", {
|
1509
1537
|
get: function () {
|
1510
1538
|
return "[" + this.attributeName + "]";
|
1511
1539
|
},
|
1512
|
-
enumerable:
|
1540
|
+
enumerable: false,
|
1513
1541
|
configurable: true
|
1514
1542
|
});
|
1515
1543
|
|
@@ -1529,7 +1557,7 @@ function () {
|
|
1529
1557
|
get: function () {
|
1530
1558
|
return this.elementObserver.started;
|
1531
1559
|
},
|
1532
|
-
enumerable:
|
1560
|
+
enumerable: false,
|
1533
1561
|
configurable: true
|
1534
1562
|
}); // Element observer delegate
|
1535
1563
|
|
@@ -1565,7 +1593,144 @@ function () {
|
|
1565
1593
|
}();
|
1566
1594
|
|
1567
1595
|
exports.AttributeObserver = AttributeObserver;
|
1568
|
-
},{"./element_observer":"../node_modules/@stimulus/mutation-observers/dist/
|
1596
|
+
},{"./element_observer":"../node_modules/@stimulus/mutation-observers/dist/element_observer.js"}],"../node_modules/@stimulus/mutation-observers/dist/string_map_observer.js":[function(require,module,exports) {
|
1597
|
+
"use strict";
|
1598
|
+
|
1599
|
+
Object.defineProperty(exports, "__esModule", {
|
1600
|
+
value: true
|
1601
|
+
});
|
1602
|
+
exports.StringMapObserver = void 0;
|
1603
|
+
|
1604
|
+
var StringMapObserver =
|
1605
|
+
/** @class */
|
1606
|
+
function () {
|
1607
|
+
function StringMapObserver(element, delegate) {
|
1608
|
+
var _this = this;
|
1609
|
+
|
1610
|
+
this.element = element;
|
1611
|
+
this.delegate = delegate;
|
1612
|
+
this.started = false;
|
1613
|
+
this.stringMap = new Map();
|
1614
|
+
this.mutationObserver = new MutationObserver(function (mutations) {
|
1615
|
+
return _this.processMutations(mutations);
|
1616
|
+
});
|
1617
|
+
}
|
1618
|
+
|
1619
|
+
StringMapObserver.prototype.start = function () {
|
1620
|
+
if (!this.started) {
|
1621
|
+
this.started = true;
|
1622
|
+
this.mutationObserver.observe(this.element, {
|
1623
|
+
attributes: true
|
1624
|
+
});
|
1625
|
+
this.refresh();
|
1626
|
+
}
|
1627
|
+
};
|
1628
|
+
|
1629
|
+
StringMapObserver.prototype.stop = function () {
|
1630
|
+
if (this.started) {
|
1631
|
+
this.mutationObserver.takeRecords();
|
1632
|
+
this.mutationObserver.disconnect();
|
1633
|
+
this.started = false;
|
1634
|
+
}
|
1635
|
+
};
|
1636
|
+
|
1637
|
+
StringMapObserver.prototype.refresh = function () {
|
1638
|
+
if (this.started) {
|
1639
|
+
for (var _i = 0, _a = this.knownAttributeNames; _i < _a.length; _i++) {
|
1640
|
+
var attributeName = _a[_i];
|
1641
|
+
this.refreshAttribute(attributeName);
|
1642
|
+
}
|
1643
|
+
}
|
1644
|
+
}; // Mutation record processing
|
1645
|
+
|
1646
|
+
|
1647
|
+
StringMapObserver.prototype.processMutations = function (mutations) {
|
1648
|
+
if (this.started) {
|
1649
|
+
for (var _i = 0, mutations_1 = mutations; _i < mutations_1.length; _i++) {
|
1650
|
+
var mutation = mutations_1[_i];
|
1651
|
+
this.processMutation(mutation);
|
1652
|
+
}
|
1653
|
+
}
|
1654
|
+
};
|
1655
|
+
|
1656
|
+
StringMapObserver.prototype.processMutation = function (mutation) {
|
1657
|
+
var attributeName = mutation.attributeName;
|
1658
|
+
|
1659
|
+
if (attributeName) {
|
1660
|
+
this.refreshAttribute(attributeName);
|
1661
|
+
}
|
1662
|
+
}; // State tracking
|
1663
|
+
|
1664
|
+
|
1665
|
+
StringMapObserver.prototype.refreshAttribute = function (attributeName) {
|
1666
|
+
var key = this.delegate.getStringMapKeyForAttribute(attributeName);
|
1667
|
+
|
1668
|
+
if (key != null) {
|
1669
|
+
if (!this.stringMap.has(attributeName)) {
|
1670
|
+
this.stringMapKeyAdded(key, attributeName);
|
1671
|
+
}
|
1672
|
+
|
1673
|
+
var value = this.element.getAttribute(attributeName);
|
1674
|
+
|
1675
|
+
if (this.stringMap.get(attributeName) != value) {
|
1676
|
+
this.stringMapValueChanged(value, key);
|
1677
|
+
}
|
1678
|
+
|
1679
|
+
if (value == null) {
|
1680
|
+
this.stringMap.delete(attributeName);
|
1681
|
+
this.stringMapKeyRemoved(key, attributeName);
|
1682
|
+
} else {
|
1683
|
+
this.stringMap.set(attributeName, value);
|
1684
|
+
}
|
1685
|
+
}
|
1686
|
+
};
|
1687
|
+
|
1688
|
+
StringMapObserver.prototype.stringMapKeyAdded = function (key, attributeName) {
|
1689
|
+
if (this.delegate.stringMapKeyAdded) {
|
1690
|
+
this.delegate.stringMapKeyAdded(key, attributeName);
|
1691
|
+
}
|
1692
|
+
};
|
1693
|
+
|
1694
|
+
StringMapObserver.prototype.stringMapValueChanged = function (value, key) {
|
1695
|
+
if (this.delegate.stringMapValueChanged) {
|
1696
|
+
this.delegate.stringMapValueChanged(value, key);
|
1697
|
+
}
|
1698
|
+
};
|
1699
|
+
|
1700
|
+
StringMapObserver.prototype.stringMapKeyRemoved = function (key, attributeName) {
|
1701
|
+
if (this.delegate.stringMapKeyRemoved) {
|
1702
|
+
this.delegate.stringMapKeyRemoved(key, attributeName);
|
1703
|
+
}
|
1704
|
+
};
|
1705
|
+
|
1706
|
+
Object.defineProperty(StringMapObserver.prototype, "knownAttributeNames", {
|
1707
|
+
get: function () {
|
1708
|
+
return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)));
|
1709
|
+
},
|
1710
|
+
enumerable: false,
|
1711
|
+
configurable: true
|
1712
|
+
});
|
1713
|
+
Object.defineProperty(StringMapObserver.prototype, "currentAttributeNames", {
|
1714
|
+
get: function () {
|
1715
|
+
return Array.from(this.element.attributes).map(function (attribute) {
|
1716
|
+
return attribute.name;
|
1717
|
+
});
|
1718
|
+
},
|
1719
|
+
enumerable: false,
|
1720
|
+
configurable: true
|
1721
|
+
});
|
1722
|
+
Object.defineProperty(StringMapObserver.prototype, "recordedAttributeNames", {
|
1723
|
+
get: function () {
|
1724
|
+
return Array.from(this.stringMap.keys());
|
1725
|
+
},
|
1726
|
+
enumerable: false,
|
1727
|
+
configurable: true
|
1728
|
+
});
|
1729
|
+
return StringMapObserver;
|
1730
|
+
}();
|
1731
|
+
|
1732
|
+
exports.StringMapObserver = StringMapObserver;
|
1733
|
+
},{}],"../node_modules/@stimulus/multimap/dist/set_operations.js":[function(require,module,exports) {
|
1569
1734
|
"use strict";
|
1570
1735
|
|
1571
1736
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1603,7 +1768,7 @@ function prune(map, key) {
|
|
1603
1768
|
map.delete(key);
|
1604
1769
|
}
|
1605
1770
|
}
|
1606
|
-
},{}],"../node_modules/@stimulus/multimap/dist/
|
1771
|
+
},{}],"../node_modules/@stimulus/multimap/dist/multimap.js":[function(require,module,exports) {
|
1607
1772
|
"use strict";
|
1608
1773
|
|
1609
1774
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1627,7 +1792,7 @@ function () {
|
|
1627
1792
|
return values.concat(Array.from(set));
|
1628
1793
|
}, []);
|
1629
1794
|
},
|
1630
|
-
enumerable:
|
1795
|
+
enumerable: false,
|
1631
1796
|
configurable: true
|
1632
1797
|
});
|
1633
1798
|
Object.defineProperty(Multimap.prototype, "size", {
|
@@ -1637,7 +1802,7 @@ function () {
|
|
1637
1802
|
return size + set.size;
|
1638
1803
|
}, 0);
|
1639
1804
|
},
|
1640
|
-
enumerable:
|
1805
|
+
enumerable: false,
|
1641
1806
|
configurable: true
|
1642
1807
|
});
|
1643
1808
|
|
@@ -1686,7 +1851,7 @@ function () {
|
|
1686
1851
|
}();
|
1687
1852
|
|
1688
1853
|
exports.Multimap = Multimap;
|
1689
|
-
},{"./set_operations":"../node_modules/@stimulus/multimap/dist/
|
1854
|
+
},{"./set_operations":"../node_modules/@stimulus/multimap/dist/set_operations.js"}],"../node_modules/@stimulus/multimap/dist/indexed_multimap.js":[function(require,module,exports) {
|
1690
1855
|
"use strict";
|
1691
1856
|
|
1692
1857
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1699,12 +1864,16 @@ var _multimap = require("./multimap");
|
|
1699
1864
|
var _set_operations = require("./set_operations");
|
1700
1865
|
|
1701
1866
|
var __extends = void 0 && (void 0).__extends || function () {
|
1702
|
-
var extendStatics =
|
1703
|
-
|
1704
|
-
|
1705
|
-
d
|
1706
|
-
|
1707
|
-
|
1867
|
+
var extendStatics = function (d, b) {
|
1868
|
+
extendStatics = Object.setPrototypeOf || {
|
1869
|
+
__proto__: []
|
1870
|
+
} instanceof Array && function (d, b) {
|
1871
|
+
d.__proto__ = b;
|
1872
|
+
} || function (d, b) {
|
1873
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
1874
|
+
};
|
1875
|
+
|
1876
|
+
return extendStatics(d, b);
|
1708
1877
|
};
|
1709
1878
|
|
1710
1879
|
return function (d, b) {
|
@@ -1734,7 +1903,7 @@ function (_super) {
|
|
1734
1903
|
get: function () {
|
1735
1904
|
return Array.from(this.keysByValue.keys());
|
1736
1905
|
},
|
1737
|
-
enumerable:
|
1906
|
+
enumerable: false,
|
1738
1907
|
configurable: true
|
1739
1908
|
});
|
1740
1909
|
|
@@ -1763,17 +1932,31 @@ function (_super) {
|
|
1763
1932
|
}(_multimap.Multimap);
|
1764
1933
|
|
1765
1934
|
exports.IndexedMultimap = IndexedMultimap;
|
1766
|
-
},{"./multimap":"../node_modules/@stimulus/multimap/dist/
|
1935
|
+
},{"./multimap":"../node_modules/@stimulus/multimap/dist/multimap.js","./set_operations":"../node_modules/@stimulus/multimap/dist/set_operations.js"}],"../node_modules/@stimulus/multimap/dist/index.js":[function(require,module,exports) {
|
1767
1936
|
"use strict";
|
1768
1937
|
|
1769
1938
|
Object.defineProperty(exports, "__esModule", {
|
1770
1939
|
value: true
|
1771
1940
|
});
|
1772
1941
|
|
1773
|
-
var
|
1942
|
+
var _indexed_multimap = require("./indexed_multimap");
|
1943
|
+
|
1944
|
+
Object.keys(_indexed_multimap).forEach(function (key) {
|
1945
|
+
if (key === "default" || key === "__esModule") return;
|
1946
|
+
if (key in exports && exports[key] === _indexed_multimap[key]) return;
|
1947
|
+
Object.defineProperty(exports, key, {
|
1948
|
+
enumerable: true,
|
1949
|
+
get: function () {
|
1950
|
+
return _indexed_multimap[key];
|
1951
|
+
}
|
1952
|
+
});
|
1953
|
+
});
|
1954
|
+
|
1955
|
+
var _multimap = require("./multimap");
|
1774
1956
|
|
1775
1957
|
Object.keys(_multimap).forEach(function (key) {
|
1776
1958
|
if (key === "default" || key === "__esModule") return;
|
1959
|
+
if (key in exports && exports[key] === _multimap[key]) return;
|
1777
1960
|
Object.defineProperty(exports, key, {
|
1778
1961
|
enumerable: true,
|
1779
1962
|
get: function () {
|
@@ -1782,18 +1965,19 @@ Object.keys(_multimap).forEach(function (key) {
|
|
1782
1965
|
});
|
1783
1966
|
});
|
1784
1967
|
|
1785
|
-
var
|
1968
|
+
var _set_operations = require("./set_operations");
|
1786
1969
|
|
1787
|
-
Object.keys(
|
1970
|
+
Object.keys(_set_operations).forEach(function (key) {
|
1788
1971
|
if (key === "default" || key === "__esModule") return;
|
1972
|
+
if (key in exports && exports[key] === _set_operations[key]) return;
|
1789
1973
|
Object.defineProperty(exports, key, {
|
1790
1974
|
enumerable: true,
|
1791
1975
|
get: function () {
|
1792
|
-
return
|
1976
|
+
return _set_operations[key];
|
1793
1977
|
}
|
1794
1978
|
});
|
1795
1979
|
});
|
1796
|
-
},{"./
|
1980
|
+
},{"./indexed_multimap":"../node_modules/@stimulus/multimap/dist/indexed_multimap.js","./multimap":"../node_modules/@stimulus/multimap/dist/multimap.js","./set_operations":"../node_modules/@stimulus/multimap/dist/set_operations.js"}],"../node_modules/@stimulus/mutation-observers/dist/token_list_observer.js":[function(require,module,exports) {
|
1797
1981
|
"use strict";
|
1798
1982
|
|
1799
1983
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1818,7 +2002,7 @@ function () {
|
|
1818
2002
|
get: function () {
|
1819
2003
|
return this.attributeObserver.started;
|
1820
2004
|
},
|
1821
|
-
enumerable:
|
2005
|
+
enumerable: false,
|
1822
2006
|
configurable: true
|
1823
2007
|
});
|
1824
2008
|
|
@@ -1838,14 +2022,14 @@ function () {
|
|
1838
2022
|
get: function () {
|
1839
2023
|
return this.attributeObserver.element;
|
1840
2024
|
},
|
1841
|
-
enumerable:
|
2025
|
+
enumerable: false,
|
1842
2026
|
configurable: true
|
1843
2027
|
});
|
1844
2028
|
Object.defineProperty(TokenListObserver.prototype, "attributeName", {
|
1845
2029
|
get: function () {
|
1846
2030
|
return this.attributeObserver.attributeName;
|
1847
2031
|
},
|
1848
|
-
enumerable:
|
2032
|
+
enumerable: false,
|
1849
2033
|
configurable: true
|
1850
2034
|
}); // Attribute observer delegate
|
1851
2035
|
|
@@ -1944,7 +2128,7 @@ function zip(left, right) {
|
|
1944
2128
|
function tokensAreEqual(left, right) {
|
1945
2129
|
return left && right && left.index == right.index && left.content == right.content;
|
1946
2130
|
}
|
1947
|
-
},{"./attribute_observer":"../node_modules/@stimulus/mutation-observers/dist/
|
2131
|
+
},{"./attribute_observer":"../node_modules/@stimulus/mutation-observers/dist/attribute_observer.js","@stimulus/multimap":"../node_modules/@stimulus/multimap/dist/index.js"}],"../node_modules/@stimulus/mutation-observers/dist/value_list_observer.js":[function(require,module,exports) {
|
1948
2132
|
"use strict";
|
1949
2133
|
|
1950
2134
|
Object.defineProperty(exports, "__esModule", {
|
@@ -1968,7 +2152,7 @@ function () {
|
|
1968
2152
|
get: function () {
|
1969
2153
|
return this.tokenListObserver.started;
|
1970
2154
|
},
|
1971
|
-
enumerable:
|
2155
|
+
enumerable: false,
|
1972
2156
|
configurable: true
|
1973
2157
|
});
|
1974
2158
|
|
@@ -1988,14 +2172,14 @@ function () {
|
|
1988
2172
|
get: function () {
|
1989
2173
|
return this.tokenListObserver.element;
|
1990
2174
|
},
|
1991
|
-
enumerable:
|
2175
|
+
enumerable: false,
|
1992
2176
|
configurable: true
|
1993
2177
|
});
|
1994
2178
|
Object.defineProperty(ValueListObserver.prototype, "attributeName", {
|
1995
2179
|
get: function () {
|
1996
2180
|
return this.tokenListObserver.attributeName;
|
1997
2181
|
},
|
1998
|
-
enumerable:
|
2182
|
+
enumerable: false,
|
1999
2183
|
configurable: true
|
2000
2184
|
});
|
2001
2185
|
|
@@ -2058,17 +2242,18 @@ function () {
|
|
2058
2242
|
}();
|
2059
2243
|
|
2060
2244
|
exports.ValueListObserver = ValueListObserver;
|
2061
|
-
},{"./token_list_observer":"../node_modules/@stimulus/mutation-observers/dist/
|
2245
|
+
},{"./token_list_observer":"../node_modules/@stimulus/mutation-observers/dist/token_list_observer.js"}],"../node_modules/@stimulus/mutation-observers/dist/index.js":[function(require,module,exports) {
|
2062
2246
|
"use strict";
|
2063
2247
|
|
2064
2248
|
Object.defineProperty(exports, "__esModule", {
|
2065
2249
|
value: true
|
2066
2250
|
});
|
2067
2251
|
|
2068
|
-
var _attribute_observer = require("./
|
2252
|
+
var _attribute_observer = require("./attribute_observer");
|
2069
2253
|
|
2070
2254
|
Object.keys(_attribute_observer).forEach(function (key) {
|
2071
2255
|
if (key === "default" || key === "__esModule") return;
|
2256
|
+
if (key in exports && exports[key] === _attribute_observer[key]) return;
|
2072
2257
|
Object.defineProperty(exports, key, {
|
2073
2258
|
enumerable: true,
|
2074
2259
|
get: function () {
|
@@ -2077,10 +2262,11 @@ Object.keys(_attribute_observer).forEach(function (key) {
|
|
2077
2262
|
});
|
2078
2263
|
});
|
2079
2264
|
|
2080
|
-
var _element_observer = require("./
|
2265
|
+
var _element_observer = require("./element_observer");
|
2081
2266
|
|
2082
2267
|
Object.keys(_element_observer).forEach(function (key) {
|
2083
2268
|
if (key === "default" || key === "__esModule") return;
|
2269
|
+
if (key in exports && exports[key] === _element_observer[key]) return;
|
2084
2270
|
Object.defineProperty(exports, key, {
|
2085
2271
|
enumerable: true,
|
2086
2272
|
get: function () {
|
@@ -2089,10 +2275,24 @@ Object.keys(_element_observer).forEach(function (key) {
|
|
2089
2275
|
});
|
2090
2276
|
});
|
2091
2277
|
|
2092
|
-
var
|
2278
|
+
var _string_map_observer = require("./string_map_observer");
|
2279
|
+
|
2280
|
+
Object.keys(_string_map_observer).forEach(function (key) {
|
2281
|
+
if (key === "default" || key === "__esModule") return;
|
2282
|
+
if (key in exports && exports[key] === _string_map_observer[key]) return;
|
2283
|
+
Object.defineProperty(exports, key, {
|
2284
|
+
enumerable: true,
|
2285
|
+
get: function () {
|
2286
|
+
return _string_map_observer[key];
|
2287
|
+
}
|
2288
|
+
});
|
2289
|
+
});
|
2290
|
+
|
2291
|
+
var _token_list_observer = require("./token_list_observer");
|
2093
2292
|
|
2094
2293
|
Object.keys(_token_list_observer).forEach(function (key) {
|
2095
2294
|
if (key === "default" || key === "__esModule") return;
|
2295
|
+
if (key in exports && exports[key] === _token_list_observer[key]) return;
|
2096
2296
|
Object.defineProperty(exports, key, {
|
2097
2297
|
enumerable: true,
|
2098
2298
|
get: function () {
|
@@ -2101,10 +2301,11 @@ Object.keys(_token_list_observer).forEach(function (key) {
|
|
2101
2301
|
});
|
2102
2302
|
});
|
2103
2303
|
|
2104
|
-
var _value_list_observer = require("./
|
2304
|
+
var _value_list_observer = require("./value_list_observer");
|
2105
2305
|
|
2106
2306
|
Object.keys(_value_list_observer).forEach(function (key) {
|
2107
2307
|
if (key === "default" || key === "__esModule") return;
|
2308
|
+
if (key in exports && exports[key] === _value_list_observer[key]) return;
|
2108
2309
|
Object.defineProperty(exports, key, {
|
2109
2310
|
enumerable: true,
|
2110
2311
|
get: function () {
|
@@ -2112,7 +2313,7 @@ Object.keys(_value_list_observer).forEach(function (key) {
|
|
2112
2313
|
}
|
2113
2314
|
});
|
2114
2315
|
});
|
2115
|
-
},{"./
|
2316
|
+
},{"./attribute_observer":"../node_modules/@stimulus/mutation-observers/dist/attribute_observer.js","./element_observer":"../node_modules/@stimulus/mutation-observers/dist/element_observer.js","./string_map_observer":"../node_modules/@stimulus/mutation-observers/dist/string_map_observer.js","./token_list_observer":"../node_modules/@stimulus/mutation-observers/dist/token_list_observer.js","./value_list_observer":"../node_modules/@stimulus/mutation-observers/dist/value_list_observer.js"}],"../node_modules/@stimulus/core/dist/binding_observer.js":[function(require,module,exports) {
|
2116
2317
|
"use strict";
|
2117
2318
|
|
2118
2319
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2154,35 +2355,35 @@ function () {
|
|
2154
2355
|
get: function () {
|
2155
2356
|
return this.context.element;
|
2156
2357
|
},
|
2157
|
-
enumerable:
|
2358
|
+
enumerable: false,
|
2158
2359
|
configurable: true
|
2159
2360
|
});
|
2160
2361
|
Object.defineProperty(BindingObserver.prototype, "identifier", {
|
2161
2362
|
get: function () {
|
2162
2363
|
return this.context.identifier;
|
2163
2364
|
},
|
2164
|
-
enumerable:
|
2365
|
+
enumerable: false,
|
2165
2366
|
configurable: true
|
2166
2367
|
});
|
2167
2368
|
Object.defineProperty(BindingObserver.prototype, "actionAttribute", {
|
2168
2369
|
get: function () {
|
2169
2370
|
return this.schema.actionAttribute;
|
2170
2371
|
},
|
2171
|
-
enumerable:
|
2372
|
+
enumerable: false,
|
2172
2373
|
configurable: true
|
2173
2374
|
});
|
2174
2375
|
Object.defineProperty(BindingObserver.prototype, "schema", {
|
2175
2376
|
get: function () {
|
2176
2377
|
return this.context.schema;
|
2177
2378
|
},
|
2178
|
-
enumerable:
|
2379
|
+
enumerable: false,
|
2179
2380
|
configurable: true
|
2180
2381
|
});
|
2181
2382
|
Object.defineProperty(BindingObserver.prototype, "bindings", {
|
2182
2383
|
get: function () {
|
2183
2384
|
return Array.from(this.bindingsByAction.values());
|
2184
2385
|
},
|
2185
|
-
enumerable:
|
2386
|
+
enumerable: false,
|
2186
2387
|
configurable: true
|
2187
2388
|
});
|
2188
2389
|
|
@@ -2231,7 +2432,98 @@ function () {
|
|
2231
2432
|
}();
|
2232
2433
|
|
2233
2434
|
exports.BindingObserver = BindingObserver;
|
2234
|
-
},{"./action":"../node_modules/@stimulus/core/dist/
|
2435
|
+
},{"./action":"../node_modules/@stimulus/core/dist/action.js","./binding":"../node_modules/@stimulus/core/dist/binding.js","@stimulus/mutation-observers":"../node_modules/@stimulus/mutation-observers/dist/index.js"}],"../node_modules/@stimulus/core/dist/value_observer.js":[function(require,module,exports) {
|
2436
|
+
"use strict";
|
2437
|
+
|
2438
|
+
Object.defineProperty(exports, "__esModule", {
|
2439
|
+
value: true
|
2440
|
+
});
|
2441
|
+
exports.ValueObserver = void 0;
|
2442
|
+
|
2443
|
+
var _mutationObservers = require("@stimulus/mutation-observers");
|
2444
|
+
|
2445
|
+
var ValueObserver =
|
2446
|
+
/** @class */
|
2447
|
+
function () {
|
2448
|
+
function ValueObserver(context, receiver) {
|
2449
|
+
this.context = context;
|
2450
|
+
this.receiver = receiver;
|
2451
|
+
this.stringMapObserver = new _mutationObservers.StringMapObserver(this.element, this);
|
2452
|
+
this.valueDescriptorMap = this.controller.valueDescriptorMap;
|
2453
|
+
this.invokeChangedCallbacksForDefaultValues();
|
2454
|
+
}
|
2455
|
+
|
2456
|
+
ValueObserver.prototype.start = function () {
|
2457
|
+
this.stringMapObserver.start();
|
2458
|
+
};
|
2459
|
+
|
2460
|
+
ValueObserver.prototype.stop = function () {
|
2461
|
+
this.stringMapObserver.stop();
|
2462
|
+
};
|
2463
|
+
|
2464
|
+
Object.defineProperty(ValueObserver.prototype, "element", {
|
2465
|
+
get: function () {
|
2466
|
+
return this.context.element;
|
2467
|
+
},
|
2468
|
+
enumerable: false,
|
2469
|
+
configurable: true
|
2470
|
+
});
|
2471
|
+
Object.defineProperty(ValueObserver.prototype, "controller", {
|
2472
|
+
get: function () {
|
2473
|
+
return this.context.controller;
|
2474
|
+
},
|
2475
|
+
enumerable: false,
|
2476
|
+
configurable: true
|
2477
|
+
}); // String map observer delegate
|
2478
|
+
|
2479
|
+
ValueObserver.prototype.getStringMapKeyForAttribute = function (attributeName) {
|
2480
|
+
if (attributeName in this.valueDescriptorMap) {
|
2481
|
+
return this.valueDescriptorMap[attributeName].name;
|
2482
|
+
}
|
2483
|
+
};
|
2484
|
+
|
2485
|
+
ValueObserver.prototype.stringMapValueChanged = function (attributeValue, name) {
|
2486
|
+
this.invokeChangedCallbackForValue(name);
|
2487
|
+
};
|
2488
|
+
|
2489
|
+
ValueObserver.prototype.invokeChangedCallbacksForDefaultValues = function () {
|
2490
|
+
for (var _i = 0, _a = this.valueDescriptors; _i < _a.length; _i++) {
|
2491
|
+
var _b = _a[_i],
|
2492
|
+
key = _b.key,
|
2493
|
+
name_1 = _b.name,
|
2494
|
+
defaultValue = _b.defaultValue;
|
2495
|
+
|
2496
|
+
if (defaultValue != undefined && !this.controller.data.has(key)) {
|
2497
|
+
this.invokeChangedCallbackForValue(name_1);
|
2498
|
+
}
|
2499
|
+
}
|
2500
|
+
};
|
2501
|
+
|
2502
|
+
ValueObserver.prototype.invokeChangedCallbackForValue = function (name) {
|
2503
|
+
var methodName = name + "Changed";
|
2504
|
+
var method = this.receiver[methodName];
|
2505
|
+
|
2506
|
+
if (typeof method == "function") {
|
2507
|
+
var value = this.receiver[name];
|
2508
|
+
method.call(this.receiver, value);
|
2509
|
+
}
|
2510
|
+
};
|
2511
|
+
|
2512
|
+
Object.defineProperty(ValueObserver.prototype, "valueDescriptors", {
|
2513
|
+
get: function () {
|
2514
|
+
var valueDescriptorMap = this.valueDescriptorMap;
|
2515
|
+
return Object.keys(valueDescriptorMap).map(function (key) {
|
2516
|
+
return valueDescriptorMap[key];
|
2517
|
+
});
|
2518
|
+
},
|
2519
|
+
enumerable: false,
|
2520
|
+
configurable: true
|
2521
|
+
});
|
2522
|
+
return ValueObserver;
|
2523
|
+
}();
|
2524
|
+
|
2525
|
+
exports.ValueObserver = ValueObserver;
|
2526
|
+
},{"@stimulus/mutation-observers":"../node_modules/@stimulus/mutation-observers/dist/index.js"}],"../node_modules/@stimulus/core/dist/context.js":[function(require,module,exports) {
|
2235
2527
|
"use strict";
|
2236
2528
|
|
2237
2529
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2241,6 +2533,8 @@ exports.Context = void 0;
|
|
2241
2533
|
|
2242
2534
|
var _binding_observer = require("./binding_observer");
|
2243
2535
|
|
2536
|
+
var _value_observer = require("./value_observer");
|
2537
|
+
|
2244
2538
|
var Context =
|
2245
2539
|
/** @class */
|
2246
2540
|
function () {
|
@@ -2249,6 +2543,7 @@ function () {
|
|
2249
2543
|
this.scope = scope;
|
2250
2544
|
this.controller = new module.controllerConstructor(this);
|
2251
2545
|
this.bindingObserver = new _binding_observer.BindingObserver(this, this.dispatcher);
|
2546
|
+
this.valueObserver = new _value_observer.ValueObserver(this, this.controller);
|
2252
2547
|
|
2253
2548
|
try {
|
2254
2549
|
this.controller.initialize();
|
@@ -2259,6 +2554,7 @@ function () {
|
|
2259
2554
|
|
2260
2555
|
Context.prototype.connect = function () {
|
2261
2556
|
this.bindingObserver.start();
|
2557
|
+
this.valueObserver.start();
|
2262
2558
|
|
2263
2559
|
try {
|
2264
2560
|
this.controller.connect();
|
@@ -2274,6 +2570,7 @@ function () {
|
|
2274
2570
|
this.handleError(error, "disconnecting controller");
|
2275
2571
|
}
|
2276
2572
|
|
2573
|
+
this.valueObserver.stop();
|
2277
2574
|
this.bindingObserver.stop();
|
2278
2575
|
};
|
2279
2576
|
|
@@ -2281,42 +2578,42 @@ function () {
|
|
2281
2578
|
get: function () {
|
2282
2579
|
return this.module.application;
|
2283
2580
|
},
|
2284
|
-
enumerable:
|
2581
|
+
enumerable: false,
|
2285
2582
|
configurable: true
|
2286
2583
|
});
|
2287
2584
|
Object.defineProperty(Context.prototype, "identifier", {
|
2288
2585
|
get: function () {
|
2289
2586
|
return this.module.identifier;
|
2290
2587
|
},
|
2291
|
-
enumerable:
|
2588
|
+
enumerable: false,
|
2292
2589
|
configurable: true
|
2293
2590
|
});
|
2294
2591
|
Object.defineProperty(Context.prototype, "schema", {
|
2295
2592
|
get: function () {
|
2296
2593
|
return this.application.schema;
|
2297
2594
|
},
|
2298
|
-
enumerable:
|
2595
|
+
enumerable: false,
|
2299
2596
|
configurable: true
|
2300
2597
|
});
|
2301
2598
|
Object.defineProperty(Context.prototype, "dispatcher", {
|
2302
2599
|
get: function () {
|
2303
2600
|
return this.application.dispatcher;
|
2304
2601
|
},
|
2305
|
-
enumerable:
|
2602
|
+
enumerable: false,
|
2306
2603
|
configurable: true
|
2307
2604
|
});
|
2308
2605
|
Object.defineProperty(Context.prototype, "element", {
|
2309
2606
|
get: function () {
|
2310
2607
|
return this.scope.element;
|
2311
2608
|
},
|
2312
|
-
enumerable:
|
2609
|
+
enumerable: false,
|
2313
2610
|
configurable: true
|
2314
2611
|
});
|
2315
2612
|
Object.defineProperty(Context.prototype, "parentElement", {
|
2316
2613
|
get: function () {
|
2317
2614
|
return this.element.parentElement;
|
2318
2615
|
},
|
2319
|
-
enumerable:
|
2616
|
+
enumerable: false,
|
2320
2617
|
configurable: true
|
2321
2618
|
}); // Error handling
|
2322
2619
|
|
@@ -2342,21 +2639,76 @@ function () {
|
|
2342
2639
|
}();
|
2343
2640
|
|
2344
2641
|
exports.Context = Context;
|
2345
|
-
},{"./binding_observer":"../node_modules/@stimulus/core/dist/
|
2642
|
+
},{"./binding_observer":"../node_modules/@stimulus/core/dist/binding_observer.js","./value_observer":"../node_modules/@stimulus/core/dist/value_observer.js"}],"../node_modules/@stimulus/core/dist/inheritable_statics.js":[function(require,module,exports) {
|
2346
2643
|
"use strict";
|
2347
2644
|
|
2348
2645
|
Object.defineProperty(exports, "__esModule", {
|
2349
2646
|
value: true
|
2350
2647
|
});
|
2351
|
-
exports.
|
2648
|
+
exports.readInheritableStaticArrayValues = readInheritableStaticArrayValues;
|
2649
|
+
exports.readInheritableStaticObjectPairs = readInheritableStaticObjectPairs;
|
2650
|
+
|
2651
|
+
function readInheritableStaticArrayValues(constructor, propertyName) {
|
2652
|
+
var ancestors = getAncestorsForConstructor(constructor);
|
2653
|
+
return Array.from(ancestors.reduce(function (values, constructor) {
|
2654
|
+
getOwnStaticArrayValues(constructor, propertyName).forEach(function (name) {
|
2655
|
+
return values.add(name);
|
2656
|
+
});
|
2657
|
+
return values;
|
2658
|
+
}, new Set()));
|
2659
|
+
}
|
2660
|
+
|
2661
|
+
function readInheritableStaticObjectPairs(constructor, propertyName) {
|
2662
|
+
var ancestors = getAncestorsForConstructor(constructor);
|
2663
|
+
return ancestors.reduce(function (pairs, constructor) {
|
2664
|
+
pairs.push.apply(pairs, getOwnStaticObjectPairs(constructor, propertyName));
|
2665
|
+
return pairs;
|
2666
|
+
}, []);
|
2667
|
+
}
|
2668
|
+
|
2669
|
+
function getAncestorsForConstructor(constructor) {
|
2670
|
+
var ancestors = [];
|
2671
|
+
|
2672
|
+
while (constructor) {
|
2673
|
+
ancestors.push(constructor);
|
2674
|
+
constructor = Object.getPrototypeOf(constructor);
|
2675
|
+
}
|
2676
|
+
|
2677
|
+
return ancestors.reverse();
|
2678
|
+
}
|
2679
|
+
|
2680
|
+
function getOwnStaticArrayValues(constructor, propertyName) {
|
2681
|
+
var definition = constructor[propertyName];
|
2682
|
+
return Array.isArray(definition) ? definition : [];
|
2683
|
+
}
|
2684
|
+
|
2685
|
+
function getOwnStaticObjectPairs(constructor, propertyName) {
|
2686
|
+
var definition = constructor[propertyName];
|
2687
|
+
return definition ? Object.keys(definition).map(function (key) {
|
2688
|
+
return [key, definition[key]];
|
2689
|
+
}) : [];
|
2690
|
+
}
|
2691
|
+
},{}],"../node_modules/@stimulus/core/dist/blessing.js":[function(require,module,exports) {
|
2692
|
+
"use strict";
|
2693
|
+
|
2694
|
+
Object.defineProperty(exports, "__esModule", {
|
2695
|
+
value: true
|
2696
|
+
});
|
2697
|
+
exports.bless = bless;
|
2698
|
+
|
2699
|
+
var _inheritable_statics = require("./inheritable_statics");
|
2352
2700
|
|
2353
2701
|
var __extends = void 0 && (void 0).__extends || function () {
|
2354
|
-
var extendStatics =
|
2355
|
-
|
2356
|
-
|
2357
|
-
d
|
2358
|
-
|
2359
|
-
|
2702
|
+
var extendStatics = function (d, b) {
|
2703
|
+
extendStatics = Object.setPrototypeOf || {
|
2704
|
+
__proto__: []
|
2705
|
+
} instanceof Array && function (d, b) {
|
2706
|
+
d.__proto__ = b;
|
2707
|
+
} || function (d, b) {
|
2708
|
+
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
|
2709
|
+
};
|
2710
|
+
|
2711
|
+
return extendStatics(d, b);
|
2360
2712
|
};
|
2361
2713
|
|
2362
2714
|
return function (d, b) {
|
@@ -2369,37 +2721,96 @@ var __extends = void 0 && (void 0).__extends || function () {
|
|
2369
2721
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
2370
2722
|
};
|
2371
2723
|
}();
|
2372
|
-
/** @hidden */
|
2373
2724
|
|
2725
|
+
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
2726
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
2374
2727
|
|
2375
|
-
|
2376
|
-
|
2377
|
-
|
2378
|
-
|
2379
|
-
|
2728
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
|
2729
|
+
|
2730
|
+
return r;
|
2731
|
+
};
|
2732
|
+
|
2733
|
+
/** @hidden */
|
2734
|
+
function bless(constructor) {
|
2735
|
+
return shadow(constructor, getBlessedProperties(constructor));
|
2380
2736
|
}
|
2381
2737
|
|
2382
|
-
function
|
2383
|
-
var
|
2384
|
-
constructor.
|
2385
|
-
|
2738
|
+
function shadow(constructor, properties) {
|
2739
|
+
var shadowConstructor = extend(constructor);
|
2740
|
+
var shadowProperties = getShadowProperties(constructor.prototype, properties);
|
2741
|
+
Object.defineProperties(shadowConstructor.prototype, shadowProperties);
|
2742
|
+
return shadowConstructor;
|
2386
2743
|
}
|
2387
2744
|
|
2745
|
+
function getBlessedProperties(constructor) {
|
2746
|
+
var blessings = (0, _inheritable_statics.readInheritableStaticArrayValues)(constructor, "blessings");
|
2747
|
+
return blessings.reduce(function (blessedProperties, blessing) {
|
2748
|
+
var properties = blessing(constructor);
|
2749
|
+
|
2750
|
+
for (var key in properties) {
|
2751
|
+
var descriptor = blessedProperties[key] || {};
|
2752
|
+
blessedProperties[key] = Object.assign(descriptor, properties[key]);
|
2753
|
+
}
|
2754
|
+
|
2755
|
+
return blessedProperties;
|
2756
|
+
}, {});
|
2757
|
+
}
|
2758
|
+
|
2759
|
+
function getShadowProperties(prototype, properties) {
|
2760
|
+
return getOwnKeys(properties).reduce(function (shadowProperties, key) {
|
2761
|
+
var _a;
|
2762
|
+
|
2763
|
+
var descriptor = getShadowedDescriptor(prototype, properties, key);
|
2764
|
+
|
2765
|
+
if (descriptor) {
|
2766
|
+
Object.assign(shadowProperties, (_a = {}, _a[key] = descriptor, _a));
|
2767
|
+
}
|
2768
|
+
|
2769
|
+
return shadowProperties;
|
2770
|
+
}, {});
|
2771
|
+
}
|
2772
|
+
|
2773
|
+
function getShadowedDescriptor(prototype, properties, key) {
|
2774
|
+
var shadowingDescriptor = Object.getOwnPropertyDescriptor(prototype, key);
|
2775
|
+
var shadowedByValue = shadowingDescriptor && "value" in shadowingDescriptor;
|
2776
|
+
|
2777
|
+
if (!shadowedByValue) {
|
2778
|
+
var descriptor = Object.getOwnPropertyDescriptor(properties, key).value;
|
2779
|
+
|
2780
|
+
if (shadowingDescriptor) {
|
2781
|
+
descriptor.get = shadowingDescriptor.get || descriptor.get;
|
2782
|
+
descriptor.set = shadowingDescriptor.set || descriptor.set;
|
2783
|
+
}
|
2784
|
+
|
2785
|
+
return descriptor;
|
2786
|
+
}
|
2787
|
+
}
|
2788
|
+
|
2789
|
+
var getOwnKeys = function () {
|
2790
|
+
if (typeof Object.getOwnPropertySymbols == "function") {
|
2791
|
+
return function (object) {
|
2792
|
+
return __spreadArrays(Object.getOwnPropertyNames(object), Object.getOwnPropertySymbols(object));
|
2793
|
+
};
|
2794
|
+
} else {
|
2795
|
+
return Object.getOwnPropertyNames;
|
2796
|
+
}
|
2797
|
+
}();
|
2798
|
+
|
2388
2799
|
var extend = function () {
|
2389
2800
|
function extendWithReflect(constructor) {
|
2390
|
-
function
|
2391
|
-
var _newTarget = this && this instanceof
|
2801
|
+
function extended() {
|
2802
|
+
var _newTarget = this && this instanceof extended ? this.constructor : void 0;
|
2392
2803
|
|
2393
2804
|
return Reflect.construct(constructor, arguments, _newTarget);
|
2394
2805
|
}
|
2395
2806
|
|
2396
|
-
|
2807
|
+
extended.prototype = Object.create(constructor.prototype, {
|
2397
2808
|
constructor: {
|
2398
|
-
value:
|
2809
|
+
value: extended
|
2399
2810
|
}
|
2400
2811
|
});
|
2401
|
-
Reflect.setPrototypeOf(
|
2402
|
-
return
|
2812
|
+
Reflect.setPrototypeOf(extended, constructor);
|
2813
|
+
return extended;
|
2403
2814
|
}
|
2404
2815
|
|
2405
2816
|
function testReflectExtension() {
|
@@ -2422,19 +2833,36 @@ var extend = function () {
|
|
2422
2833
|
return (
|
2423
2834
|
/** @class */
|
2424
2835
|
function (_super) {
|
2425
|
-
__extends(
|
2836
|
+
__extends(extended, _super);
|
2426
2837
|
|
2427
|
-
function
|
2838
|
+
function extended() {
|
2428
2839
|
return _super !== null && _super.apply(this, arguments) || this;
|
2429
2840
|
}
|
2430
2841
|
|
2431
|
-
return
|
2842
|
+
return extended;
|
2432
2843
|
}(constructor)
|
2433
2844
|
);
|
2434
2845
|
};
|
2435
2846
|
}
|
2436
2847
|
}();
|
2437
|
-
},{}],"../node_modules/@stimulus/core/dist/
|
2848
|
+
},{"./inheritable_statics":"../node_modules/@stimulus/core/dist/inheritable_statics.js"}],"../node_modules/@stimulus/core/dist/definition.js":[function(require,module,exports) {
|
2849
|
+
"use strict";
|
2850
|
+
|
2851
|
+
Object.defineProperty(exports, "__esModule", {
|
2852
|
+
value: true
|
2853
|
+
});
|
2854
|
+
exports.blessDefinition = blessDefinition;
|
2855
|
+
|
2856
|
+
var _blessing = require("./blessing");
|
2857
|
+
|
2858
|
+
/** @hidden */
|
2859
|
+
function blessDefinition(definition) {
|
2860
|
+
return {
|
2861
|
+
identifier: definition.identifier,
|
2862
|
+
controllerConstructor: (0, _blessing.bless)(definition.controllerConstructor)
|
2863
|
+
};
|
2864
|
+
}
|
2865
|
+
},{"./blessing":"../node_modules/@stimulus/core/dist/blessing.js"}],"../node_modules/@stimulus/core/dist/module.js":[function(require,module,exports) {
|
2438
2866
|
"use strict";
|
2439
2867
|
|
2440
2868
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2460,21 +2888,21 @@ function () {
|
|
2460
2888
|
get: function () {
|
2461
2889
|
return this.definition.identifier;
|
2462
2890
|
},
|
2463
|
-
enumerable:
|
2891
|
+
enumerable: false,
|
2464
2892
|
configurable: true
|
2465
2893
|
});
|
2466
2894
|
Object.defineProperty(Module.prototype, "controllerConstructor", {
|
2467
2895
|
get: function () {
|
2468
2896
|
return this.definition.controllerConstructor;
|
2469
2897
|
},
|
2470
|
-
enumerable:
|
2898
|
+
enumerable: false,
|
2471
2899
|
configurable: true
|
2472
2900
|
});
|
2473
2901
|
Object.defineProperty(Module.prototype, "contexts", {
|
2474
2902
|
get: function () {
|
2475
2903
|
return Array.from(this.connectedContexts);
|
2476
2904
|
},
|
2477
|
-
enumerable:
|
2905
|
+
enumerable: false,
|
2478
2906
|
configurable: true
|
2479
2907
|
});
|
2480
2908
|
|
@@ -2508,7 +2936,74 @@ function () {
|
|
2508
2936
|
}();
|
2509
2937
|
|
2510
2938
|
exports.Module = Module;
|
2511
|
-
},{"./context":"../node_modules/@stimulus/core/dist/
|
2939
|
+
},{"./context":"../node_modules/@stimulus/core/dist/context.js","./definition":"../node_modules/@stimulus/core/dist/definition.js"}],"../node_modules/@stimulus/core/dist/class_map.js":[function(require,module,exports) {
|
2940
|
+
"use strict";
|
2941
|
+
|
2942
|
+
Object.defineProperty(exports, "__esModule", {
|
2943
|
+
value: true
|
2944
|
+
});
|
2945
|
+
exports.ClassMap = void 0;
|
2946
|
+
|
2947
|
+
var ClassMap =
|
2948
|
+
/** @class */
|
2949
|
+
function () {
|
2950
|
+
function ClassMap(scope) {
|
2951
|
+
this.scope = scope;
|
2952
|
+
}
|
2953
|
+
|
2954
|
+
ClassMap.prototype.has = function (name) {
|
2955
|
+
return this.data.has(this.getDataKey(name));
|
2956
|
+
};
|
2957
|
+
|
2958
|
+
ClassMap.prototype.get = function (name) {
|
2959
|
+
return this.data.get(this.getDataKey(name));
|
2960
|
+
};
|
2961
|
+
|
2962
|
+
ClassMap.prototype.getAttributeName = function (name) {
|
2963
|
+
return this.data.getAttributeNameForKey(this.getDataKey(name));
|
2964
|
+
};
|
2965
|
+
|
2966
|
+
ClassMap.prototype.getDataKey = function (name) {
|
2967
|
+
return name + "-class";
|
2968
|
+
};
|
2969
|
+
|
2970
|
+
Object.defineProperty(ClassMap.prototype, "data", {
|
2971
|
+
get: function () {
|
2972
|
+
return this.scope.data;
|
2973
|
+
},
|
2974
|
+
enumerable: false,
|
2975
|
+
configurable: true
|
2976
|
+
});
|
2977
|
+
return ClassMap;
|
2978
|
+
}();
|
2979
|
+
|
2980
|
+
exports.ClassMap = ClassMap;
|
2981
|
+
},{}],"../node_modules/@stimulus/core/dist/string_helpers.js":[function(require,module,exports) {
|
2982
|
+
"use strict";
|
2983
|
+
|
2984
|
+
Object.defineProperty(exports, "__esModule", {
|
2985
|
+
value: true
|
2986
|
+
});
|
2987
|
+
exports.camelize = camelize;
|
2988
|
+
exports.capitalize = capitalize;
|
2989
|
+
exports.dasherize = dasherize;
|
2990
|
+
|
2991
|
+
function camelize(value) {
|
2992
|
+
return value.replace(/(?:[_-])([a-z0-9])/g, function (_, char) {
|
2993
|
+
return char.toUpperCase();
|
2994
|
+
});
|
2995
|
+
}
|
2996
|
+
|
2997
|
+
function capitalize(value) {
|
2998
|
+
return value.charAt(0).toUpperCase() + value.slice(1);
|
2999
|
+
}
|
3000
|
+
|
3001
|
+
function dasherize(value) {
|
3002
|
+
return value.replace(/([A-Z])/g, function (_, char) {
|
3003
|
+
return "-" + char.toLowerCase();
|
3004
|
+
});
|
3005
|
+
}
|
3006
|
+
},{}],"../node_modules/@stimulus/core/dist/data_map.js":[function(require,module,exports) {
|
2512
3007
|
"use strict";
|
2513
3008
|
|
2514
3009
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2516,6 +3011,8 @@ Object.defineProperty(exports, "__esModule", {
|
|
2516
3011
|
});
|
2517
3012
|
exports.DataMap = void 0;
|
2518
3013
|
|
3014
|
+
var _string_helpers = require("./string_helpers");
|
3015
|
+
|
2519
3016
|
var DataMap =
|
2520
3017
|
/** @class */
|
2521
3018
|
function () {
|
@@ -2527,58 +3024,86 @@ function () {
|
|
2527
3024
|
get: function () {
|
2528
3025
|
return this.scope.element;
|
2529
3026
|
},
|
2530
|
-
enumerable:
|
3027
|
+
enumerable: false,
|
2531
3028
|
configurable: true
|
2532
3029
|
});
|
2533
3030
|
Object.defineProperty(DataMap.prototype, "identifier", {
|
2534
3031
|
get: function () {
|
2535
3032
|
return this.scope.identifier;
|
2536
3033
|
},
|
2537
|
-
enumerable:
|
3034
|
+
enumerable: false,
|
2538
3035
|
configurable: true
|
2539
3036
|
});
|
2540
3037
|
|
2541
3038
|
DataMap.prototype.get = function (key) {
|
2542
|
-
|
2543
|
-
return this.element.getAttribute(
|
3039
|
+
var name = this.getAttributeNameForKey(key);
|
3040
|
+
return this.element.getAttribute(name);
|
2544
3041
|
};
|
2545
3042
|
|
2546
3043
|
DataMap.prototype.set = function (key, value) {
|
2547
|
-
|
2548
|
-
this.element.setAttribute(
|
3044
|
+
var name = this.getAttributeNameForKey(key);
|
3045
|
+
this.element.setAttribute(name, value);
|
2549
3046
|
return this.get(key);
|
2550
3047
|
};
|
2551
3048
|
|
2552
3049
|
DataMap.prototype.has = function (key) {
|
2553
|
-
|
2554
|
-
return this.element.hasAttribute(
|
3050
|
+
var name = this.getAttributeNameForKey(key);
|
3051
|
+
return this.element.hasAttribute(name);
|
2555
3052
|
};
|
2556
3053
|
|
2557
3054
|
DataMap.prototype.delete = function (key) {
|
2558
3055
|
if (this.has(key)) {
|
2559
|
-
|
2560
|
-
this.element.removeAttribute(
|
3056
|
+
var name_1 = this.getAttributeNameForKey(key);
|
3057
|
+
this.element.removeAttribute(name_1);
|
2561
3058
|
return true;
|
2562
3059
|
} else {
|
2563
3060
|
return false;
|
2564
3061
|
}
|
2565
3062
|
};
|
2566
3063
|
|
2567
|
-
DataMap.prototype.
|
2568
|
-
return "data-" + this.identifier + "-" + dasherize(key);
|
3064
|
+
DataMap.prototype.getAttributeNameForKey = function (key) {
|
3065
|
+
return "data-" + this.identifier + "-" + (0, _string_helpers.dasherize)(key);
|
2569
3066
|
};
|
2570
3067
|
|
2571
3068
|
return DataMap;
|
2572
3069
|
}();
|
2573
3070
|
|
2574
3071
|
exports.DataMap = DataMap;
|
3072
|
+
},{"./string_helpers":"../node_modules/@stimulus/core/dist/string_helpers.js"}],"../node_modules/@stimulus/core/dist/guide.js":[function(require,module,exports) {
|
3073
|
+
"use strict";
|
2575
3074
|
|
2576
|
-
|
2577
|
-
|
2578
|
-
|
2579
|
-
|
2580
|
-
|
2581
|
-
|
3075
|
+
Object.defineProperty(exports, "__esModule", {
|
3076
|
+
value: true
|
3077
|
+
});
|
3078
|
+
exports.Guide = void 0;
|
3079
|
+
|
3080
|
+
var Guide =
|
3081
|
+
/** @class */
|
3082
|
+
function () {
|
3083
|
+
function Guide(logger) {
|
3084
|
+
this.warnedKeysByObject = new WeakMap();
|
3085
|
+
this.logger = logger;
|
3086
|
+
}
|
3087
|
+
|
3088
|
+
Guide.prototype.warn = function (object, key, message) {
|
3089
|
+
var warnedKeys = this.warnedKeysByObject.get(object);
|
3090
|
+
|
3091
|
+
if (!warnedKeys) {
|
3092
|
+
warnedKeys = new Set();
|
3093
|
+
this.warnedKeysByObject.set(object, warnedKeys);
|
3094
|
+
}
|
3095
|
+
|
3096
|
+
if (!warnedKeys.has(key)) {
|
3097
|
+
warnedKeys.add(key);
|
3098
|
+
this.logger.warn(message, object);
|
3099
|
+
}
|
3100
|
+
};
|
3101
|
+
|
3102
|
+
return Guide;
|
3103
|
+
}();
|
3104
|
+
|
3105
|
+
exports.Guide = Guide;
|
3106
|
+
},{}],"../node_modules/@stimulus/core/dist/selectors.js":[function(require,module,exports) {
|
2582
3107
|
"use strict";
|
2583
3108
|
|
2584
3109
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2590,7 +3115,7 @@ exports.attributeValueContainsToken = attributeValueContainsToken;
|
|
2590
3115
|
function attributeValueContainsToken(attributeName, token) {
|
2591
3116
|
return "[" + attributeName + "~=\"" + token + "\"]";
|
2592
3117
|
}
|
2593
|
-
},{}],"../node_modules/@stimulus/core/dist/
|
3118
|
+
},{}],"../node_modules/@stimulus/core/dist/target_set.js":[function(require,module,exports) {
|
2594
3119
|
"use strict";
|
2595
3120
|
|
2596
3121
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2600,6 +3125,14 @@ exports.TargetSet = void 0;
|
|
2600
3125
|
|
2601
3126
|
var _selectors = require("./selectors");
|
2602
3127
|
|
3128
|
+
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
3129
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
3130
|
+
|
3131
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
|
3132
|
+
|
3133
|
+
return r;
|
3134
|
+
};
|
3135
|
+
|
2603
3136
|
var TargetSet =
|
2604
3137
|
/** @class */
|
2605
3138
|
function () {
|
@@ -2611,21 +3144,21 @@ function () {
|
|
2611
3144
|
get: function () {
|
2612
3145
|
return this.scope.element;
|
2613
3146
|
},
|
2614
|
-
enumerable:
|
3147
|
+
enumerable: false,
|
2615
3148
|
configurable: true
|
2616
3149
|
});
|
2617
3150
|
Object.defineProperty(TargetSet.prototype, "identifier", {
|
2618
3151
|
get: function () {
|
2619
3152
|
return this.scope.identifier;
|
2620
3153
|
},
|
2621
|
-
enumerable:
|
3154
|
+
enumerable: false,
|
2622
3155
|
configurable: true
|
2623
3156
|
});
|
2624
3157
|
Object.defineProperty(TargetSet.prototype, "schema", {
|
2625
3158
|
get: function () {
|
2626
3159
|
return this.scope.schema;
|
2627
3160
|
},
|
2628
|
-
enumerable:
|
3161
|
+
enumerable: false,
|
2629
3162
|
configurable: true
|
2630
3163
|
});
|
2631
3164
|
|
@@ -2634,45 +3167,89 @@ function () {
|
|
2634
3167
|
};
|
2635
3168
|
|
2636
3169
|
TargetSet.prototype.find = function () {
|
3170
|
+
var _this = this;
|
3171
|
+
|
2637
3172
|
var targetNames = [];
|
2638
3173
|
|
2639
3174
|
for (var _i = 0; _i < arguments.length; _i++) {
|
2640
3175
|
targetNames[_i] = arguments[_i];
|
2641
3176
|
}
|
2642
3177
|
|
2643
|
-
|
2644
|
-
|
3178
|
+
return targetNames.reduce(function (target, targetName) {
|
3179
|
+
return target || _this.findTarget(targetName) || _this.findLegacyTarget(targetName);
|
3180
|
+
}, undefined);
|
2645
3181
|
};
|
2646
3182
|
|
2647
3183
|
TargetSet.prototype.findAll = function () {
|
3184
|
+
var _this = this;
|
3185
|
+
|
2648
3186
|
var targetNames = [];
|
2649
3187
|
|
2650
3188
|
for (var _i = 0; _i < arguments.length; _i++) {
|
2651
3189
|
targetNames[_i] = arguments[_i];
|
2652
3190
|
}
|
2653
3191
|
|
2654
|
-
|
3192
|
+
return targetNames.reduce(function (targets, targetName) {
|
3193
|
+
return __spreadArrays(targets, _this.findAllTargets(targetName), _this.findAllLegacyTargets(targetName));
|
3194
|
+
}, []);
|
3195
|
+
};
|
3196
|
+
|
3197
|
+
TargetSet.prototype.findTarget = function (targetName) {
|
3198
|
+
var selector = this.getSelectorForTargetName(targetName);
|
3199
|
+
return this.scope.findElement(selector);
|
3200
|
+
};
|
3201
|
+
|
3202
|
+
TargetSet.prototype.findAllTargets = function (targetName) {
|
3203
|
+
var selector = this.getSelectorForTargetName(targetName);
|
2655
3204
|
return this.scope.findAllElements(selector);
|
2656
3205
|
};
|
2657
3206
|
|
2658
|
-
TargetSet.prototype.
|
3207
|
+
TargetSet.prototype.getSelectorForTargetName = function (targetName) {
|
3208
|
+
var attributeName = "data-" + this.identifier + "-target";
|
3209
|
+
return (0, _selectors.attributeValueContainsToken)(attributeName, targetName);
|
3210
|
+
};
|
3211
|
+
|
3212
|
+
TargetSet.prototype.findLegacyTarget = function (targetName) {
|
3213
|
+
var selector = this.getLegacySelectorForTargetName(targetName);
|
3214
|
+
return this.deprecate(this.scope.findElement(selector), targetName);
|
3215
|
+
};
|
3216
|
+
|
3217
|
+
TargetSet.prototype.findAllLegacyTargets = function (targetName) {
|
2659
3218
|
var _this = this;
|
2660
3219
|
|
2661
|
-
|
2662
|
-
|
2663
|
-
|
3220
|
+
var selector = this.getLegacySelectorForTargetName(targetName);
|
3221
|
+
return this.scope.findAllElements(selector).map(function (element) {
|
3222
|
+
return _this.deprecate(element, targetName);
|
3223
|
+
});
|
2664
3224
|
};
|
2665
3225
|
|
2666
|
-
TargetSet.prototype.
|
3226
|
+
TargetSet.prototype.getLegacySelectorForTargetName = function (targetName) {
|
2667
3227
|
var targetDescriptor = this.identifier + "." + targetName;
|
2668
3228
|
return (0, _selectors.attributeValueContainsToken)(this.schema.targetAttribute, targetDescriptor);
|
2669
3229
|
};
|
2670
3230
|
|
3231
|
+
TargetSet.prototype.deprecate = function (element, targetName) {
|
3232
|
+
if (element) {
|
3233
|
+
var identifier = this.identifier;
|
3234
|
+
var attributeName = this.schema.targetAttribute;
|
3235
|
+
this.guide.warn(element, "target:" + targetName, "Please replace " + attributeName + "=\"" + identifier + "." + targetName + "\" with data-" + identifier + "-target=\"" + targetName + "\". " + ("The " + attributeName + " attribute is deprecated and will be removed in a future version of Stimulus."));
|
3236
|
+
}
|
3237
|
+
|
3238
|
+
return element;
|
3239
|
+
};
|
3240
|
+
|
3241
|
+
Object.defineProperty(TargetSet.prototype, "guide", {
|
3242
|
+
get: function () {
|
3243
|
+
return this.scope.guide;
|
3244
|
+
},
|
3245
|
+
enumerable: false,
|
3246
|
+
configurable: true
|
3247
|
+
});
|
2671
3248
|
return TargetSet;
|
2672
3249
|
}();
|
2673
3250
|
|
2674
3251
|
exports.TargetSet = TargetSet;
|
2675
|
-
},{"./selectors":"../node_modules/@stimulus/core/dist/
|
3252
|
+
},{"./selectors":"../node_modules/@stimulus/core/dist/selectors.js"}],"../node_modules/@stimulus/core/dist/scope.js":[function(require,module,exports) {
|
2676
3253
|
"use strict";
|
2677
3254
|
|
2678
3255
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2680,57 +3257,68 @@ Object.defineProperty(exports, "__esModule", {
|
|
2680
3257
|
});
|
2681
3258
|
exports.Scope = void 0;
|
2682
3259
|
|
3260
|
+
var _class_map = require("./class_map");
|
3261
|
+
|
2683
3262
|
var _data_map = require("./data_map");
|
2684
3263
|
|
2685
|
-
var
|
3264
|
+
var _guide = require("./guide");
|
2686
3265
|
|
2687
3266
|
var _selectors = require("./selectors");
|
2688
3267
|
|
3268
|
+
var _target_set = require("./target_set");
|
3269
|
+
|
3270
|
+
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
3271
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
3272
|
+
|
3273
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
|
3274
|
+
|
3275
|
+
return r;
|
3276
|
+
};
|
3277
|
+
|
2689
3278
|
var Scope =
|
2690
3279
|
/** @class */
|
2691
3280
|
function () {
|
2692
|
-
function Scope(schema, identifier,
|
2693
|
-
|
2694
|
-
|
2695
|
-
this.element = element;
|
3281
|
+
function Scope(schema, element, identifier, logger) {
|
3282
|
+
var _this = this;
|
3283
|
+
|
2696
3284
|
this.targets = new _target_set.TargetSet(this);
|
3285
|
+
this.classes = new _class_map.ClassMap(this);
|
2697
3286
|
this.data = new _data_map.DataMap(this);
|
3287
|
+
|
3288
|
+
this.containsElement = function (element) {
|
3289
|
+
return element.closest(_this.controllerSelector) === _this.element;
|
3290
|
+
};
|
3291
|
+
|
3292
|
+
this.schema = schema;
|
3293
|
+
this.element = element;
|
3294
|
+
this.identifier = identifier;
|
3295
|
+
this.guide = new _guide.Guide(logger);
|
2698
3296
|
}
|
2699
3297
|
|
2700
3298
|
Scope.prototype.findElement = function (selector) {
|
2701
|
-
return this.
|
3299
|
+
return this.element.matches(selector) ? this.element : this.queryElements(selector).find(this.containsElement);
|
2702
3300
|
};
|
2703
3301
|
|
2704
3302
|
Scope.prototype.findAllElements = function (selector) {
|
2705
|
-
|
2706
|
-
var tail = this.filterElements(Array.from(this.element.querySelectorAll(selector)));
|
2707
|
-
return head.concat(tail);
|
3303
|
+
return __spreadArrays(this.element.matches(selector) ? [this.element] : [], this.queryElements(selector).filter(this.containsElement));
|
2708
3304
|
};
|
2709
3305
|
|
2710
|
-
Scope.prototype.
|
2711
|
-
|
2712
|
-
|
2713
|
-
return elements.filter(function (element) {
|
2714
|
-
return _this.containsElement(element);
|
2715
|
-
});
|
2716
|
-
};
|
2717
|
-
|
2718
|
-
Scope.prototype.containsElement = function (element) {
|
2719
|
-
return element.closest(this.controllerSelector) === this.element;
|
3306
|
+
Scope.prototype.queryElements = function (selector) {
|
3307
|
+
return Array.from(this.element.querySelectorAll(selector));
|
2720
3308
|
};
|
2721
3309
|
|
2722
3310
|
Object.defineProperty(Scope.prototype, "controllerSelector", {
|
2723
3311
|
get: function () {
|
2724
3312
|
return (0, _selectors.attributeValueContainsToken)(this.schema.controllerAttribute, this.identifier);
|
2725
3313
|
},
|
2726
|
-
enumerable:
|
3314
|
+
enumerable: false,
|
2727
3315
|
configurable: true
|
2728
3316
|
});
|
2729
3317
|
return Scope;
|
2730
3318
|
}();
|
2731
3319
|
|
2732
3320
|
exports.Scope = Scope;
|
2733
|
-
},{"./data_map":"../node_modules/@stimulus/core/dist/
|
3321
|
+
},{"./class_map":"../node_modules/@stimulus/core/dist/class_map.js","./data_map":"../node_modules/@stimulus/core/dist/data_map.js","./guide":"../node_modules/@stimulus/core/dist/guide.js","./selectors":"../node_modules/@stimulus/core/dist/selectors.js","./target_set":"../node_modules/@stimulus/core/dist/target_set.js"}],"../node_modules/@stimulus/core/dist/scope_observer.js":[function(require,module,exports) {
|
2734
3322
|
"use strict";
|
2735
3323
|
|
2736
3324
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2738,8 +3326,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
2738
3326
|
});
|
2739
3327
|
exports.ScopeObserver = void 0;
|
2740
3328
|
|
2741
|
-
var _scope = require("./scope");
|
2742
|
-
|
2743
3329
|
var _mutationObservers = require("@stimulus/mutation-observers");
|
2744
3330
|
|
2745
3331
|
var ScopeObserver =
|
@@ -2766,7 +3352,7 @@ function () {
|
|
2766
3352
|
get: function () {
|
2767
3353
|
return this.schema.controllerAttribute;
|
2768
3354
|
},
|
2769
|
-
enumerable:
|
3355
|
+
enumerable: false,
|
2770
3356
|
configurable: true
|
2771
3357
|
}); // Value observer delegate
|
2772
3358
|
|
@@ -2779,7 +3365,7 @@ function () {
|
|
2779
3365
|
var scope = scopesByIdentifier.get(identifier);
|
2780
3366
|
|
2781
3367
|
if (!scope) {
|
2782
|
-
scope =
|
3368
|
+
scope = this.delegate.createScopeForElementAndIdentifier(element, identifier);
|
2783
3369
|
scopesByIdentifier.set(identifier, scope);
|
2784
3370
|
}
|
2785
3371
|
|
@@ -2826,7 +3412,7 @@ function () {
|
|
2826
3412
|
}();
|
2827
3413
|
|
2828
3414
|
exports.ScopeObserver = ScopeObserver;
|
2829
|
-
},{"
|
3415
|
+
},{"@stimulus/mutation-observers":"../node_modules/@stimulus/mutation-observers/dist/index.js"}],"../node_modules/@stimulus/core/dist/router.js":[function(require,module,exports) {
|
2830
3416
|
"use strict";
|
2831
3417
|
|
2832
3418
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2838,6 +3424,8 @@ var _module = require("./module");
|
|
2838
3424
|
|
2839
3425
|
var _multimap = require("@stimulus/multimap");
|
2840
3426
|
|
3427
|
+
var _scope = require("./scope");
|
3428
|
+
|
2841
3429
|
var _scope_observer = require("./scope_observer");
|
2842
3430
|
|
2843
3431
|
var Router =
|
@@ -2854,28 +3442,35 @@ function () {
|
|
2854
3442
|
get: function () {
|
2855
3443
|
return this.application.element;
|
2856
3444
|
},
|
2857
|
-
enumerable:
|
3445
|
+
enumerable: false,
|
2858
3446
|
configurable: true
|
2859
3447
|
});
|
2860
3448
|
Object.defineProperty(Router.prototype, "schema", {
|
2861
3449
|
get: function () {
|
2862
3450
|
return this.application.schema;
|
2863
3451
|
},
|
2864
|
-
enumerable:
|
3452
|
+
enumerable: false,
|
3453
|
+
configurable: true
|
3454
|
+
});
|
3455
|
+
Object.defineProperty(Router.prototype, "logger", {
|
3456
|
+
get: function () {
|
3457
|
+
return this.application.logger;
|
3458
|
+
},
|
3459
|
+
enumerable: false,
|
2865
3460
|
configurable: true
|
2866
3461
|
});
|
2867
3462
|
Object.defineProperty(Router.prototype, "controllerAttribute", {
|
2868
3463
|
get: function () {
|
2869
3464
|
return this.schema.controllerAttribute;
|
2870
3465
|
},
|
2871
|
-
enumerable:
|
3466
|
+
enumerable: false,
|
2872
3467
|
configurable: true
|
2873
3468
|
});
|
2874
3469
|
Object.defineProperty(Router.prototype, "modules", {
|
2875
3470
|
get: function () {
|
2876
3471
|
return Array.from(this.modulesByIdentifier.values());
|
2877
3472
|
},
|
2878
|
-
enumerable:
|
3473
|
+
enumerable: false,
|
2879
3474
|
configurable: true
|
2880
3475
|
});
|
2881
3476
|
Object.defineProperty(Router.prototype, "contexts", {
|
@@ -2884,7 +3479,7 @@ function () {
|
|
2884
3479
|
return contexts.concat(module.contexts);
|
2885
3480
|
}, []);
|
2886
3481
|
},
|
2887
|
-
enumerable:
|
3482
|
+
enumerable: false,
|
2888
3483
|
configurable: true
|
2889
3484
|
});
|
2890
3485
|
|
@@ -2930,6 +3525,12 @@ function () {
|
|
2930
3525
|
/** @hidden */
|
2931
3526
|
|
2932
3527
|
|
3528
|
+
Router.prototype.createScopeForElementAndIdentifier = function (element, identifier) {
|
3529
|
+
return new _scope.Scope(this.schema, element, identifier, this.logger);
|
3530
|
+
};
|
3531
|
+
/** @hidden */
|
3532
|
+
|
3533
|
+
|
2933
3534
|
Router.prototype.scopeConnected = function (scope) {
|
2934
3535
|
this.scopesByIdentifier.add(scope.identifier, scope);
|
2935
3536
|
var module = this.modulesByIdentifier.get(scope.identifier);
|
@@ -2971,7 +3572,7 @@ function () {
|
|
2971
3572
|
}();
|
2972
3573
|
|
2973
3574
|
exports.Router = Router;
|
2974
|
-
},{"./module":"../node_modules/@stimulus/core/dist/
|
3575
|
+
},{"./module":"../node_modules/@stimulus/core/dist/module.js","@stimulus/multimap":"../node_modules/@stimulus/multimap/dist/index.js","./scope":"../node_modules/@stimulus/core/dist/scope.js","./scope_observer":"../node_modules/@stimulus/core/dist/scope_observer.js"}],"../node_modules/@stimulus/core/dist/schema.js":[function(require,module,exports) {
|
2975
3576
|
"use strict";
|
2976
3577
|
|
2977
3578
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2984,7 +3585,7 @@ var defaultSchema = {
|
|
2984
3585
|
targetAttribute: "data-target"
|
2985
3586
|
};
|
2986
3587
|
exports.defaultSchema = defaultSchema;
|
2987
|
-
},{}],"../node_modules/@stimulus/core/dist/
|
3588
|
+
},{}],"../node_modules/@stimulus/core/dist/application.js":[function(require,module,exports) {
|
2988
3589
|
"use strict";
|
2989
3590
|
|
2990
3591
|
Object.defineProperty(exports, "__esModule", {
|
@@ -2999,6 +3600,12 @@ var _router = require("./router");
|
|
2999
3600
|
var _schema = require("./schema");
|
3000
3601
|
|
3001
3602
|
var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P, generator) {
|
3603
|
+
function adopt(value) {
|
3604
|
+
return value instanceof P ? value : new P(function (resolve) {
|
3605
|
+
resolve(value);
|
3606
|
+
});
|
3607
|
+
}
|
3608
|
+
|
3002
3609
|
return new (P || (P = Promise))(function (resolve, reject) {
|
3003
3610
|
function fulfilled(value) {
|
3004
3611
|
try {
|
@@ -3017,9 +3624,7 @@ var __awaiter = void 0 && (void 0).__awaiter || function (thisArg, _arguments, P
|
|
3017
3624
|
}
|
3018
3625
|
|
3019
3626
|
function step(result) {
|
3020
|
-
result.done ? resolve(result.value) :
|
3021
|
-
resolve(result.value);
|
3022
|
-
}).then(fulfilled, rejected);
|
3627
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
3023
3628
|
}
|
3024
3629
|
|
3025
3630
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
@@ -3058,8 +3663,8 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
3058
3663
|
if (f) throw new TypeError("Generator is already executing.");
|
3059
3664
|
|
3060
3665
|
while (_) try {
|
3061
|
-
if (f = 1, y && (t =
|
3062
|
-
if (y = 0, t) op = [0, t.value];
|
3666
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
3667
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
3063
3668
|
|
3064
3669
|
switch (op[0]) {
|
3065
3670
|
case 0:
|
@@ -3135,6 +3740,14 @@ var __generator = void 0 && (void 0).__generator || function (thisArg, body) {
|
|
3135
3740
|
}
|
3136
3741
|
};
|
3137
3742
|
|
3743
|
+
var __spreadArrays = void 0 && (void 0).__spreadArrays || function () {
|
3744
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
3745
|
+
|
3746
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++) for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++) r[k] = a[j];
|
3747
|
+
|
3748
|
+
return r;
|
3749
|
+
};
|
3750
|
+
|
3138
3751
|
var Application =
|
3139
3752
|
/** @class */
|
3140
3753
|
function () {
|
@@ -3147,6 +3760,7 @@ function () {
|
|
3147
3760
|
schema = _schema.defaultSchema;
|
3148
3761
|
}
|
3149
3762
|
|
3763
|
+
this.logger = console;
|
3150
3764
|
this.element = element;
|
3151
3765
|
this.schema = schema;
|
3152
3766
|
this.dispatcher = new _dispatcher.Dispatcher(this);
|
@@ -3171,8 +3785,8 @@ function () {
|
|
3171
3785
|
case 1:
|
3172
3786
|
_a.sent();
|
3173
3787
|
|
3174
|
-
this.router.start();
|
3175
3788
|
this.dispatcher.start();
|
3789
|
+
this.router.start();
|
3176
3790
|
return [2
|
3177
3791
|
/*return*/
|
3178
3792
|
];
|
@@ -3182,8 +3796,8 @@ function () {
|
|
3182
3796
|
};
|
3183
3797
|
|
3184
3798
|
Application.prototype.stop = function () {
|
3185
|
-
this.router.stop();
|
3186
3799
|
this.dispatcher.stop();
|
3800
|
+
this.router.stop();
|
3187
3801
|
};
|
3188
3802
|
|
3189
3803
|
Application.prototype.register = function (identifier, controllerConstructor) {
|
@@ -3202,7 +3816,7 @@ function () {
|
|
3202
3816
|
rest[_i - 1] = arguments[_i];
|
3203
3817
|
}
|
3204
3818
|
|
3205
|
-
var definitions = Array.isArray(head) ? head : [head]
|
3819
|
+
var definitions = Array.isArray(head) ? head : __spreadArrays([head], rest);
|
3206
3820
|
definitions.forEach(function (definition) {
|
3207
3821
|
return _this.router.loadDefinition(definition);
|
3208
3822
|
});
|
@@ -3217,7 +3831,7 @@ function () {
|
|
3217
3831
|
rest[_i - 1] = arguments[_i];
|
3218
3832
|
}
|
3219
3833
|
|
3220
|
-
var identifiers = Array.isArray(head) ? head : [head]
|
3834
|
+
var identifiers = Array.isArray(head) ? head : __spreadArrays([head], rest);
|
3221
3835
|
identifiers.forEach(function (identifier) {
|
3222
3836
|
return _this.router.unloadIdentifier(identifier);
|
3223
3837
|
});
|
@@ -3230,7 +3844,7 @@ function () {
|
|
3230
3844
|
return context.controller;
|
3231
3845
|
});
|
3232
3846
|
},
|
3233
|
-
enumerable:
|
3847
|
+
enumerable: false,
|
3234
3848
|
configurable: true
|
3235
3849
|
});
|
3236
3850
|
|
@@ -3241,7 +3855,7 @@ function () {
|
|
3241
3855
|
|
3242
3856
|
|
3243
3857
|
Application.prototype.handleError = function (error, message, detail) {
|
3244
|
-
|
3858
|
+
this.logger.error("%s\n\n%o\n\n%o", message, error, detail);
|
3245
3859
|
};
|
3246
3860
|
|
3247
3861
|
return Application;
|
@@ -3258,82 +3872,262 @@ function domReady() {
|
|
3258
3872
|
}
|
3259
3873
|
});
|
3260
3874
|
}
|
3261
|
-
},{"./dispatcher":"../node_modules/@stimulus/core/dist/
|
3875
|
+
},{"./dispatcher":"../node_modules/@stimulus/core/dist/dispatcher.js","./router":"../node_modules/@stimulus/core/dist/router.js","./schema":"../node_modules/@stimulus/core/dist/schema.js"}],"../node_modules/@stimulus/core/dist/class_properties.js":[function(require,module,exports) {
|
3262
3876
|
"use strict";
|
3263
3877
|
|
3264
3878
|
Object.defineProperty(exports, "__esModule", {
|
3265
3879
|
value: true
|
3266
3880
|
});
|
3267
|
-
exports.
|
3881
|
+
exports.ClassPropertiesBlessing = ClassPropertiesBlessing;
|
3882
|
+
|
3883
|
+
var _inheritable_statics = require("./inheritable_statics");
|
3884
|
+
|
3885
|
+
var _string_helpers = require("./string_helpers");
|
3268
3886
|
|
3269
3887
|
/** @hidden */
|
3270
|
-
function
|
3271
|
-
var
|
3272
|
-
|
3273
|
-
|
3274
|
-
|
3888
|
+
function ClassPropertiesBlessing(constructor) {
|
3889
|
+
var classes = (0, _inheritable_statics.readInheritableStaticArrayValues)(constructor, "classes");
|
3890
|
+
return classes.reduce(function (properties, classDefinition) {
|
3891
|
+
return Object.assign(properties, propertiesForClassDefinition(classDefinition));
|
3892
|
+
}, {});
|
3893
|
+
}
|
3275
3894
|
|
3276
|
-
|
3277
|
-
|
3278
|
-
var target = this.targets.find(name);
|
3895
|
+
function propertiesForClassDefinition(key) {
|
3896
|
+
var _a;
|
3279
3897
|
|
3280
|
-
|
3281
|
-
|
3282
|
-
|
3283
|
-
|
3284
|
-
|
3898
|
+
var name = key + "Class";
|
3899
|
+
return _a = {}, _a[name] = {
|
3900
|
+
get: function () {
|
3901
|
+
var classes = this.classes;
|
3902
|
+
|
3903
|
+
if (classes.has(key)) {
|
3904
|
+
return classes.get(key);
|
3905
|
+
} else {
|
3906
|
+
var attribute = classes.getAttributeName(key);
|
3907
|
+
throw new Error("Missing attribute \"" + attribute + "\"");
|
3285
3908
|
}
|
3286
|
-
}
|
3287
|
-
|
3288
|
-
|
3909
|
+
}
|
3910
|
+
}, _a["has" + (0, _string_helpers.capitalize)(name)] = {
|
3911
|
+
get: function () {
|
3912
|
+
return this.classes.has(key);
|
3913
|
+
}
|
3914
|
+
}, _a;
|
3915
|
+
}
|
3916
|
+
},{"./inheritable_statics":"../node_modules/@stimulus/core/dist/inheritable_statics.js","./string_helpers":"../node_modules/@stimulus/core/dist/string_helpers.js"}],"../node_modules/@stimulus/core/dist/target_properties.js":[function(require,module,exports) {
|
3917
|
+
"use strict";
|
3918
|
+
|
3919
|
+
Object.defineProperty(exports, "__esModule", {
|
3920
|
+
value: true
|
3921
|
+
});
|
3922
|
+
exports.TargetPropertiesBlessing = TargetPropertiesBlessing;
|
3923
|
+
|
3924
|
+
var _inheritable_statics = require("./inheritable_statics");
|
3925
|
+
|
3926
|
+
var _string_helpers = require("./string_helpers");
|
3927
|
+
|
3928
|
+
/** @hidden */
|
3929
|
+
function TargetPropertiesBlessing(constructor) {
|
3930
|
+
var targets = (0, _inheritable_statics.readInheritableStaticArrayValues)(constructor, "targets");
|
3931
|
+
return targets.reduce(function (properties, targetDefinition) {
|
3932
|
+
return Object.assign(properties, propertiesForTargetDefinition(targetDefinition));
|
3933
|
+
}, {});
|
3934
|
+
}
|
3935
|
+
|
3936
|
+
function propertiesForTargetDefinition(name) {
|
3937
|
+
var _a;
|
3938
|
+
|
3939
|
+
return _a = {}, _a[name + "Target"] = {
|
3940
|
+
get: function () {
|
3941
|
+
var target = this.targets.find(name);
|
3942
|
+
|
3943
|
+
if (target) {
|
3944
|
+
return target;
|
3945
|
+
} else {
|
3946
|
+
throw new Error("Missing target element \"" + this.identifier + "." + name + "\"");
|
3289
3947
|
}
|
3290
|
-
}
|
3948
|
+
}
|
3949
|
+
}, _a[name + "Targets"] = {
|
3950
|
+
get: function () {
|
3951
|
+
return this.targets.findAll(name);
|
3952
|
+
}
|
3953
|
+
}, _a["has" + (0, _string_helpers.capitalize)(name) + "Target"] = {
|
3954
|
+
get: function () {
|
3955
|
+
return this.targets.has(name);
|
3956
|
+
}
|
3957
|
+
}, _a;
|
3958
|
+
}
|
3959
|
+
},{"./inheritable_statics":"../node_modules/@stimulus/core/dist/inheritable_statics.js","./string_helpers":"../node_modules/@stimulus/core/dist/string_helpers.js"}],"../node_modules/@stimulus/core/dist/value_properties.js":[function(require,module,exports) {
|
3960
|
+
"use strict";
|
3961
|
+
|
3962
|
+
Object.defineProperty(exports, "__esModule", {
|
3963
|
+
value: true
|
3964
|
+
});
|
3965
|
+
exports.ValuePropertiesBlessing = ValuePropertiesBlessing;
|
3966
|
+
exports.propertiesForValueDefinitionPair = propertiesForValueDefinitionPair;
|
3967
|
+
|
3968
|
+
var _inheritable_statics = require("./inheritable_statics");
|
3969
|
+
|
3970
|
+
var _string_helpers = require("./string_helpers");
|
3971
|
+
|
3972
|
+
/** @hidden */
|
3973
|
+
function ValuePropertiesBlessing(constructor) {
|
3974
|
+
var valueDefinitionPairs = (0, _inheritable_statics.readInheritableStaticObjectPairs)(constructor, "values");
|
3975
|
+
var propertyDescriptorMap = {
|
3976
|
+
valueDescriptorMap: {
|
3291
3977
|
get: function () {
|
3292
|
-
|
3978
|
+
var _this = this;
|
3979
|
+
|
3980
|
+
return valueDefinitionPairs.reduce(function (result, valueDefinitionPair) {
|
3981
|
+
var _a;
|
3982
|
+
|
3983
|
+
var valueDescriptor = parseValueDefinitionPair(valueDefinitionPair);
|
3984
|
+
|
3985
|
+
var attributeName = _this.data.getAttributeNameForKey(valueDescriptor.key);
|
3986
|
+
|
3987
|
+
return Object.assign(result, (_a = {}, _a[attributeName] = valueDescriptor, _a));
|
3988
|
+
}, {});
|
3293
3989
|
}
|
3294
|
-
}
|
3295
|
-
}
|
3990
|
+
}
|
3991
|
+
};
|
3992
|
+
return valueDefinitionPairs.reduce(function (properties, valueDefinitionPair) {
|
3993
|
+
return Object.assign(properties, propertiesForValueDefinitionPair(valueDefinitionPair));
|
3994
|
+
}, propertyDescriptorMap);
|
3296
3995
|
}
|
3996
|
+
/** @hidden */
|
3297
3997
|
|
3298
|
-
|
3299
|
-
|
3300
|
-
|
3301
|
-
|
3302
|
-
|
3303
|
-
|
3304
|
-
|
3305
|
-
|
3998
|
+
|
3999
|
+
function propertiesForValueDefinitionPair(valueDefinitionPair) {
|
4000
|
+
var _a;
|
4001
|
+
|
4002
|
+
var definition = parseValueDefinitionPair(valueDefinitionPair);
|
4003
|
+
var type = definition.type,
|
4004
|
+
key = definition.key,
|
4005
|
+
name = definition.name;
|
4006
|
+
var read = readers[type],
|
4007
|
+
write = writers[type] || writers.default;
|
4008
|
+
return _a = {}, _a[name] = {
|
4009
|
+
get: function () {
|
4010
|
+
var value = this.data.get(key);
|
4011
|
+
|
4012
|
+
if (value !== null) {
|
4013
|
+
return read(value);
|
4014
|
+
} else {
|
4015
|
+
return definition.defaultValue;
|
4016
|
+
}
|
4017
|
+
},
|
4018
|
+
set: function (value) {
|
4019
|
+
if (value === undefined) {
|
4020
|
+
this.data.delete(key);
|
4021
|
+
} else {
|
4022
|
+
this.data.set(key, write(value));
|
4023
|
+
}
|
4024
|
+
}
|
4025
|
+
}, _a["has" + (0, _string_helpers.capitalize)(name)] = {
|
4026
|
+
get: function () {
|
4027
|
+
return this.data.has(key);
|
4028
|
+
}
|
4029
|
+
}, _a;
|
3306
4030
|
}
|
3307
4031
|
|
3308
|
-
function
|
3309
|
-
var
|
4032
|
+
function parseValueDefinitionPair(_a) {
|
4033
|
+
var token = _a[0],
|
4034
|
+
typeConstant = _a[1];
|
4035
|
+
var type = parseValueTypeConstant(typeConstant);
|
4036
|
+
return valueDescriptorForTokenAndType(token, type);
|
4037
|
+
}
|
3310
4038
|
|
3311
|
-
|
3312
|
-
|
3313
|
-
|
4039
|
+
function parseValueTypeConstant(typeConstant) {
|
4040
|
+
switch (typeConstant) {
|
4041
|
+
case Array:
|
4042
|
+
return "array";
|
4043
|
+
|
4044
|
+
case Boolean:
|
4045
|
+
return "boolean";
|
4046
|
+
|
4047
|
+
case Number:
|
4048
|
+
return "number";
|
4049
|
+
|
4050
|
+
case Object:
|
4051
|
+
return "object";
|
4052
|
+
|
4053
|
+
case String:
|
4054
|
+
return "string";
|
3314
4055
|
}
|
3315
4056
|
|
3316
|
-
|
4057
|
+
throw new Error("Unknown value type constant \"" + typeConstant + "\"");
|
3317
4058
|
}
|
3318
4059
|
|
3319
|
-
function
|
3320
|
-
var
|
3321
|
-
return
|
4060
|
+
function valueDescriptorForTokenAndType(token, type) {
|
4061
|
+
var key = (0, _string_helpers.dasherize)(token) + "-value";
|
4062
|
+
return {
|
4063
|
+
type: type,
|
4064
|
+
key: key,
|
4065
|
+
name: (0, _string_helpers.camelize)(key),
|
4066
|
+
|
4067
|
+
get defaultValue() {
|
4068
|
+
return defaultValuesByType[type];
|
4069
|
+
}
|
4070
|
+
|
4071
|
+
};
|
3322
4072
|
}
|
3323
4073
|
|
3324
|
-
|
3325
|
-
|
3326
|
-
|
3327
|
-
|
3328
|
-
|
4074
|
+
var defaultValuesByType = {
|
4075
|
+
get array() {
|
4076
|
+
return [];
|
4077
|
+
},
|
4078
|
+
|
4079
|
+
boolean: false,
|
4080
|
+
number: 0,
|
4081
|
+
|
4082
|
+
get object() {
|
4083
|
+
return {};
|
4084
|
+
},
|
4085
|
+
|
4086
|
+
string: ""
|
4087
|
+
};
|
4088
|
+
var readers = {
|
4089
|
+
array: function (value) {
|
4090
|
+
var array = JSON.parse(value);
|
4091
|
+
|
4092
|
+
if (!Array.isArray(array)) {
|
4093
|
+
throw new TypeError("Expected array");
|
3329
4094
|
}
|
3330
|
-
|
4095
|
+
|
4096
|
+
return array;
|
4097
|
+
},
|
4098
|
+
boolean: function (value) {
|
4099
|
+
return !(value == "0" || value == "false");
|
4100
|
+
},
|
4101
|
+
number: function (value) {
|
4102
|
+
return parseFloat(value);
|
4103
|
+
},
|
4104
|
+
object: function (value) {
|
4105
|
+
var object = JSON.parse(value);
|
4106
|
+
|
4107
|
+
if (object === null || typeof object != "object" || Array.isArray(object)) {
|
4108
|
+
throw new TypeError("Expected object");
|
4109
|
+
}
|
4110
|
+
|
4111
|
+
return object;
|
4112
|
+
},
|
4113
|
+
string: function (value) {
|
4114
|
+
return value;
|
4115
|
+
}
|
4116
|
+
};
|
4117
|
+
var writers = {
|
4118
|
+
default: writeString,
|
4119
|
+
array: writeJSON,
|
4120
|
+
object: writeJSON
|
4121
|
+
};
|
4122
|
+
|
4123
|
+
function writeJSON(value) {
|
4124
|
+
return JSON.stringify(value);
|
3331
4125
|
}
|
3332
4126
|
|
3333
|
-
function
|
3334
|
-
return
|
4127
|
+
function writeString(value) {
|
4128
|
+
return "" + value;
|
3335
4129
|
}
|
3336
|
-
},{}],"../node_modules/@stimulus/core/dist/
|
4130
|
+
},{"./inheritable_statics":"../node_modules/@stimulus/core/dist/inheritable_statics.js","./string_helpers":"../node_modules/@stimulus/core/dist/string_helpers.js"}],"../node_modules/@stimulus/core/dist/controller.js":[function(require,module,exports) {
|
3337
4131
|
"use strict";
|
3338
4132
|
|
3339
4133
|
Object.defineProperty(exports, "__esModule", {
|
@@ -3341,8 +4135,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
3341
4135
|
});
|
3342
4136
|
exports.Controller = void 0;
|
3343
4137
|
|
4138
|
+
var _class_properties = require("./class_properties");
|
4139
|
+
|
3344
4140
|
var _target_properties = require("./target_properties");
|
3345
4141
|
|
4142
|
+
var _value_properties = require("./value_properties");
|
4143
|
+
|
3346
4144
|
var Controller =
|
3347
4145
|
/** @class */
|
3348
4146
|
function () {
|
@@ -3350,50 +4148,53 @@ function () {
|
|
3350
4148
|
this.context = context;
|
3351
4149
|
}
|
3352
4150
|
|
3353
|
-
Controller.bless = function () {
|
3354
|
-
(0, _target_properties.defineTargetProperties)(this);
|
3355
|
-
};
|
3356
|
-
|
3357
4151
|
Object.defineProperty(Controller.prototype, "application", {
|
3358
4152
|
get: function () {
|
3359
4153
|
return this.context.application;
|
3360
4154
|
},
|
3361
|
-
enumerable:
|
4155
|
+
enumerable: false,
|
3362
4156
|
configurable: true
|
3363
4157
|
});
|
3364
4158
|
Object.defineProperty(Controller.prototype, "scope", {
|
3365
4159
|
get: function () {
|
3366
4160
|
return this.context.scope;
|
3367
4161
|
},
|
3368
|
-
enumerable:
|
4162
|
+
enumerable: false,
|
3369
4163
|
configurable: true
|
3370
4164
|
});
|
3371
4165
|
Object.defineProperty(Controller.prototype, "element", {
|
3372
4166
|
get: function () {
|
3373
4167
|
return this.scope.element;
|
3374
4168
|
},
|
3375
|
-
enumerable:
|
4169
|
+
enumerable: false,
|
3376
4170
|
configurable: true
|
3377
4171
|
});
|
3378
4172
|
Object.defineProperty(Controller.prototype, "identifier", {
|
3379
4173
|
get: function () {
|
3380
4174
|
return this.scope.identifier;
|
3381
4175
|
},
|
3382
|
-
enumerable:
|
4176
|
+
enumerable: false,
|
3383
4177
|
configurable: true
|
3384
4178
|
});
|
3385
4179
|
Object.defineProperty(Controller.prototype, "targets", {
|
3386
4180
|
get: function () {
|
3387
4181
|
return this.scope.targets;
|
3388
4182
|
},
|
3389
|
-
enumerable:
|
4183
|
+
enumerable: false,
|
4184
|
+
configurable: true
|
4185
|
+
});
|
4186
|
+
Object.defineProperty(Controller.prototype, "classes", {
|
4187
|
+
get: function () {
|
4188
|
+
return this.scope.classes;
|
4189
|
+
},
|
4190
|
+
enumerable: false,
|
3390
4191
|
configurable: true
|
3391
4192
|
});
|
3392
4193
|
Object.defineProperty(Controller.prototype, "data", {
|
3393
4194
|
get: function () {
|
3394
4195
|
return this.scope.data;
|
3395
4196
|
},
|
3396
|
-
enumerable:
|
4197
|
+
enumerable: false,
|
3397
4198
|
configurable: true
|
3398
4199
|
});
|
3399
4200
|
|
@@ -3406,12 +4207,14 @@ function () {
|
|
3406
4207
|
Controller.prototype.disconnect = function () {// Override in your subclass to respond when the controller is disconnected from the DOM
|
3407
4208
|
};
|
3408
4209
|
|
4210
|
+
Controller.blessings = [_class_properties.ClassPropertiesBlessing, _target_properties.TargetPropertiesBlessing, _value_properties.ValuePropertiesBlessing];
|
3409
4211
|
Controller.targets = [];
|
4212
|
+
Controller.values = {};
|
3410
4213
|
return Controller;
|
3411
4214
|
}();
|
3412
4215
|
|
3413
4216
|
exports.Controller = Controller;
|
3414
|
-
},{"./target_properties":"../node_modules/@stimulus/core/dist/
|
4217
|
+
},{"./class_properties":"../node_modules/@stimulus/core/dist/class_properties.js","./target_properties":"../node_modules/@stimulus/core/dist/target_properties.js","./value_properties":"../node_modules/@stimulus/core/dist/value_properties.js"}],"../node_modules/@stimulus/core/dist/index.js":[function(require,module,exports) {
|
3415
4218
|
"use strict";
|
3416
4219
|
|
3417
4220
|
Object.defineProperty(exports, "__esModule", {
|
@@ -3442,14 +4245,14 @@ Object.defineProperty(exports, "defaultSchema", {
|
|
3442
4245
|
}
|
3443
4246
|
});
|
3444
4247
|
|
3445
|
-
var _application = require("./
|
4248
|
+
var _application = require("./application");
|
3446
4249
|
|
3447
|
-
var _context = require("./
|
4250
|
+
var _context = require("./context");
|
3448
4251
|
|
3449
|
-
var _controller = require("./
|
4252
|
+
var _controller = require("./controller");
|
3450
4253
|
|
3451
|
-
var _schema = require("./
|
3452
|
-
},{"./
|
4254
|
+
var _schema = require("./schema");
|
4255
|
+
},{"./application":"../node_modules/@stimulus/core/dist/application.js","./context":"../node_modules/@stimulus/core/dist/context.js","./controller":"../node_modules/@stimulus/core/dist/controller.js","./schema":"../node_modules/@stimulus/core/dist/schema.js"}],"../node_modules/stimulus/index.js":[function(require,module,exports) {
|
3453
4256
|
"use strict";
|
3454
4257
|
|
3455
4258
|
Object.defineProperty(exports, "__esModule", {
|
@@ -3460,6 +4263,7 @@ var _core = require("@stimulus/core");
|
|
3460
4263
|
|
3461
4264
|
Object.keys(_core).forEach(function (key) {
|
3462
4265
|
if (key === "default" || key === "__esModule") return;
|
4266
|
+
if (key in exports && exports[key] === _core[key]) return;
|
3463
4267
|
Object.defineProperty(exports, key, {
|
3464
4268
|
enumerable: true,
|
3465
4269
|
get: function () {
|
@@ -3513,12 +4317,9 @@ function (_super) {
|
|
3513
4317
|
|
3514
4318
|
default_1.prototype.call = function (event) {
|
3515
4319
|
event.preventDefault();
|
3516
|
-
|
3517
|
-
|
3518
|
-
|
3519
|
-
var content = this.templateTarget.innerHTML.replace(/TEMPLATEINDEX/g, unixtime.toString());
|
3520
|
-
this.templateTarget.insertAdjacentHTML("beforebegin", content);
|
3521
|
-
}
|
4320
|
+
var unixtime = new Date().getTime();
|
4321
|
+
var content = this.templateTarget.innerHTML.replace(/TEMPLATEINDEX/g, unixtime.toString());
|
4322
|
+
this.templateTarget.insertAdjacentHTML("beforebegin", content);
|
3522
4323
|
};
|
3523
4324
|
|
3524
4325
|
default_1.targets = ["template"];
|